fix: Several parts of the API client were broken. Example code compiles now.
This commit is contained in:
parent
2293cf5b89
commit
b9ca1fd88b
|
@ -21,7 +21,7 @@
|
||||||
* https://webservices.amazon.com/paapi5/documentation/getbrowsenodes.html
|
* https://webservices.amazon.com/paapi5/documentation/getbrowsenodes.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ProductAdvertisingAPIv1 = require('./src/index');
|
import * as ProductAdvertisingAPIv1 from '../src/index.mjs';
|
||||||
|
|
||||||
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ function parseResponse(browseNodesResponseList) {
|
||||||
|
|
||||||
function onSuccess(data) {
|
function onSuccess(data) {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
var getBrowseNodesResponse = ProductAdvertisingAPIv1.GetBrowseNodesResponse.constructFromObject(data);
|
var getBrowseNodesResponse = ProductAdvertisingAPIv1.GetBrowseNodesResponse.constructFromObject(data)!;
|
||||||
console.log('Complete Response: \n' + JSON.stringify(getBrowseNodesResponse, null, 1));
|
console.log('Complete Response: \n' + JSON.stringify(getBrowseNodesResponse, null, 1));
|
||||||
if (getBrowseNodesResponse['BrowseNodesResult'] !== undefined) {
|
if (getBrowseNodesResponse['BrowseNodesResult'] !== undefined) {
|
||||||
console.log('Printing all browse node information in BrowseNodesResult:');
|
console.log('Printing all browse node information in BrowseNodesResult:');
|
|
@ -21,7 +21,7 @@
|
||||||
* https://webservices.amazon.com/paapi5/documentation/get-items.html
|
* https://webservices.amazon.com/paapi5/documentation/get-items.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ProductAdvertisingAPIv1 = require('./src/index');
|
import * as ProductAdvertisingAPIv1 from '../src/index.mjs';
|
||||||
|
|
||||||
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ function parseResponse(itemsResponseList) {
|
||||||
|
|
||||||
function onSuccess(data) {
|
function onSuccess(data) {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
var getItemsResponse = ProductAdvertisingAPIv1.GetItemsResponse.constructFromObject(data);
|
var getItemsResponse = ProductAdvertisingAPIv1.GetItemsResponse.constructFromObject(data)!;
|
||||||
console.log('Complete Response: \n' + JSON.stringify(getItemsResponse, null, 1));
|
console.log('Complete Response: \n' + JSON.stringify(getItemsResponse, null, 1));
|
||||||
if (getItemsResponse['ItemsResult'] !== undefined) {
|
if (getItemsResponse['ItemsResult'] !== undefined) {
|
||||||
console.log('Printing All Item Information in ItemsResult:');
|
console.log('Printing All Item Information in ItemsResult:');
|
|
@ -21,7 +21,7 @@
|
||||||
* https://webservices.amazon.com/paapi5/documentation/get-variations.html
|
* https://webservices.amazon.com/paapi5/documentation/get-variations.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ProductAdvertisingAPIv1 = require('./src/index');
|
import * as ProductAdvertisingAPIv1 from '../src/index.mjs';
|
||||||
|
|
||||||
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ getVariationsRequest['Resources'] = [
|
||||||
|
|
||||||
function onSuccess(data) {
|
function onSuccess(data) {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
var getVariationsResponse = ProductAdvertisingAPIv1.GetVariationsResponse.constructFromObject(data);
|
var getVariationsResponse = ProductAdvertisingAPIv1.GetVariationsResponse.constructFromObject(data)!;
|
||||||
console.log('Complete Response: \n' + JSON.stringify(getVariationsResponse, null, 1));
|
console.log('Complete Response: \n' + JSON.stringify(getVariationsResponse, null, 1));
|
||||||
if (getVariationsResponse['VariationsResult'] !== undefined) {
|
if (getVariationsResponse['VariationsResult'] !== undefined) {
|
||||||
//console.log('Complete VariationsResult: \n' + JSON.stringify(getVariationsResponse['VariationsResult'], null, 1));
|
//console.log('Complete VariationsResult: \n' + JSON.stringify(getVariationsResponse['VariationsResult'], null, 1));
|
||||||
|
@ -74,7 +74,7 @@ function onSuccess(data) {
|
||||||
console.log('VariationCount: ' + getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount']);
|
console.log('VariationCount: ' + getVariationsResponse['VariationsResult']['VariationSummary']['VariationCount']);
|
||||||
}
|
}
|
||||||
console.log('Printing First Item Information in VariationsResult:');
|
console.log('Printing First Item Information in VariationsResult:');
|
||||||
var item_0 = getVariationsResponse['VariationsResult']['Items'][0];
|
var item_0 = getVariationsResponse['VariationsResult']['Items']![0];
|
||||||
if (item_0 !== undefined) {
|
if (item_0 !== undefined) {
|
||||||
if (item_0['ASIN'] !== undefined) {
|
if (item_0['ASIN'] !== undefined) {
|
||||||
console.log('ASIN: ' + item_0['ASIN']);
|
console.log('ASIN: ' + item_0['ASIN']);
|
|
@ -21,7 +21,7 @@
|
||||||
* https://webservices.amazon.com/paapi5/documentation/search-items.html
|
* https://webservices.amazon.com/paapi5/documentation/search-items.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var ProductAdvertisingAPIv1 = require('./src/index');
|
import * as ProductAdvertisingAPIv1 from '../src/index.mjs';
|
||||||
|
|
||||||
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
var defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;
|
||||||
|
|
||||||
|
@ -66,11 +66,11 @@ searchItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'O
|
||||||
|
|
||||||
function onSuccess(data) {
|
function onSuccess(data) {
|
||||||
console.log('API called successfully.');
|
console.log('API called successfully.');
|
||||||
var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data);
|
var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data)!;
|
||||||
console.log('Complete Response: \n' + JSON.stringify(searchItemsResponse, null, 1));
|
console.log('Complete Response: \n' + JSON.stringify(searchItemsResponse, null, 1));
|
||||||
if (searchItemsResponse['SearchResult'] !== undefined) {
|
if (searchItemsResponse['SearchResult'] !== undefined) {
|
||||||
console.log('Printing First Item Information in SearchResult:');
|
console.log('Printing First Item Information in SearchResult:');
|
||||||
var item_0 = searchItemsResponse['SearchResult']['Items'][0];
|
var item_0 = searchItemsResponse['SearchResult']['Items']![0];
|
||||||
if (item_0 !== undefined) {
|
if (item_0 !== undefined) {
|
||||||
if (item_0['ASIN'] !== undefined) {
|
if (item_0['ASIN'] !== undefined) {
|
||||||
console.log('ASIN: ' + item_0['ASIN']);
|
console.log('ASIN: ' + item_0['ASIN']);
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "amazon-pa-api5-node-ts",
|
"name": "amazon-pa-api5-node-ts",
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "amazon-pa-api5-node-ts",
|
"name": "amazon-pa-api5-node-ts",
|
||||||
"version": "2.2.2",
|
"version": "2.2.4",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"superagent": "^9.0.0"
|
"superagent": "^9.0.0"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "amazon-pa-api5-node-ts",
|
"name": "amazon-pa-api5-node-ts",
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"description": "ProductAdvertisingAPI 5.0 NodeJS SDK rewritten in TypeScript.",
|
"description": "ProductAdvertisingAPI 5.0 NodeJS SDK rewritten in TypeScript.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"main": "dist/src/index.mjs",
|
"main": "dist/src/index.mjs",
|
||||||
|
|
|
@ -69,6 +69,11 @@
|
||||||
MULTI = 'multi',
|
MULTI = 'multi',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export interface ApiResponse<T> {
|
||||||
|
data: T;
|
||||||
|
response: any;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
||||||
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
||||||
|
@ -344,9 +349,9 @@
|
||||||
* constructor for a complex type.
|
* constructor for a complex type.
|
||||||
* @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
|
* @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
|
||||||
*/
|
*/
|
||||||
public callApi(path: string, httpMethod: string, apiName: string, pathParams: Record<string, string>,
|
public callApi<T>(path: string, httpMethod: string, apiName: string, pathParams: Record<string, string>,
|
||||||
queryParams: Record<string, any>, collectionQueryParams: Record<string, any>, headerParams: Record<string, any>, formParams: Record<string, any>, bodyParam: any, authNames: string[], contentTypes: string[], accepts: string[],
|
queryParams: Record<string, any>, collectionQueryParams: Record<string, any>, headerParams: Record<string, any>, formParams: Record<string, any>, bodyParam: any, authNames: string[], contentTypes: string[], accepts: string[],
|
||||||
returnType: string|string[]|any|any[]) {
|
returnType: string|string[]|any|any[]): Promise<ApiResponse<T>> {
|
||||||
|
|
||||||
// Throw error if credentials are not specified
|
// Throw error if credentials are not specified
|
||||||
if (this.accessKey === undefined || this.secretKey === undefined || this.accessKey === null || this.secretKey === null) {
|
if (this.accessKey === undefined || this.secretKey === undefined || this.accessKey === null || this.secretKey === null) {
|
||||||
|
@ -454,13 +459,13 @@
|
||||||
this.agent.attachCookies(request);
|
this.agent.attachCookies(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise<ApiResponse<T>>(function(resolve, reject) {
|
||||||
request.end(function(error, response) {
|
request.end(function(error, response) {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
var data = self.deserialize(response, returnType);
|
var data = self.deserialize(response, returnType) as T;
|
||||||
if (self.enableCookies && typeof window === 'undefined'){
|
if (self.enableCookies && typeof window === 'undefined'){
|
||||||
self.agent.saveCookies(response);
|
self.agent.saveCookies(response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ApiClient } from "../ApiClient.mjs";
|
import { ApiClient, type ApiResponse } from "../ApiClient.mjs";
|
||||||
|
import type { GetItemsResource } from "../index.mjs";
|
||||||
import { GetBrowseNodesRequest } from "../model/GetBrowseNodesRequest.mjs";
|
import { GetBrowseNodesRequest } from "../model/GetBrowseNodesRequest.mjs";
|
||||||
import { GetBrowseNodesResponse } from "../model/GetBrowseNodesResponse.mjs";
|
import { GetBrowseNodesResponse } from "../model/GetBrowseNodesResponse.mjs";
|
||||||
import { GetItemsRequest } from "../model/GetItemsRequest.mjs";
|
import { GetItemsRequest } from "../model/GetItemsRequest.mjs";
|
||||||
|
@ -55,7 +56,7 @@
|
||||||
* @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest
|
* @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBrowseNodesResponse} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBrowseNodesResponse} and HTTP response
|
||||||
*/
|
*/
|
||||||
public getBrowseNodesWithHttpInfo(getBrowseNodesRequest: GetBrowseNodesRequest) {
|
public getBrowseNodesWithHttpInfo(getBrowseNodesRequest: GetBrowseNodesRequest): Promise<ApiResponse<GetBrowseNodesResponse>> {
|
||||||
var postBody = getBrowseNodesRequest;
|
var postBody = getBrowseNodesRequest;
|
||||||
|
|
||||||
// verify the required parameter 'getBrowseNodesRequest' is set
|
// verify the required parameter 'getBrowseNodesRequest' is set
|
||||||
|
@ -91,11 +92,9 @@
|
||||||
* @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest
|
* @param {module:model/GetBrowseNodesRequest} getBrowseNodesRequest GetBrowseNodesRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBrowseNodesResponse}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBrowseNodesResponse}
|
||||||
*/
|
*/
|
||||||
public getBrowseNodes(getBrowseNodesRequest: GetBrowseNodesRequest) {
|
public getBrowseNodes(getBrowseNodesRequest: GetBrowseNodesRequest): Promise<GetBrowseNodesResponse> {
|
||||||
return this.getBrowseNodesWithHttpInfo(getBrowseNodesRequest)
|
return this.getBrowseNodesWithHttpInfo(getBrowseNodesRequest)
|
||||||
.then(function(response_and_data: any) {
|
.then((response_and_data: ApiResponse<GetBrowseNodesResponse>) => response_and_data.data);
|
||||||
return response_and_data.data;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +102,7 @@
|
||||||
* @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest
|
* @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetItemsResponse} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetItemsResponse} and HTTP response
|
||||||
*/
|
*/
|
||||||
public getItemsWithHttpInfo(getItemsRequest: GetItemsRequest) {
|
public getItemsWithHttpInfo(getItemsRequest: GetItemsRequest): Promise<ApiResponse<GetItemsResponse>> {
|
||||||
var postBody = getItemsRequest;
|
var postBody = getItemsRequest;
|
||||||
|
|
||||||
// verify the required parameter 'getItemsRequest' is set
|
// verify the required parameter 'getItemsRequest' is set
|
||||||
|
@ -139,11 +138,9 @@
|
||||||
* @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest
|
* @param {module:model/GetItemsRequest} getItemsRequest GetItemsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetItemsResponse}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetItemsResponse}
|
||||||
*/
|
*/
|
||||||
public getItems(getItemsRequest: GetItemsRequest) {
|
public getItems(getItemsRequest: GetItemsRequest): Promise<GetItemsResponse> {
|
||||||
return this.getItemsWithHttpInfo(getItemsRequest)
|
return this.getItemsWithHttpInfo(getItemsRequest)
|
||||||
.then(function(response_and_data: any) {
|
.then((response_and_data: ApiResponse<GetItemsResponse>) => response_and_data.data);
|
||||||
return response_and_data.data;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,7 +148,7 @@
|
||||||
* @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest
|
* @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetVariationsResponse} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetVariationsResponse} and HTTP response
|
||||||
*/
|
*/
|
||||||
public getVariationsWithHttpInfo(getVariationsRequest: GetVariationsRequest) {
|
public getVariationsWithHttpInfo(getVariationsRequest: GetVariationsRequest): Promise<ApiResponse<GetVariationsResponse>> {
|
||||||
var postBody = getVariationsRequest;
|
var postBody = getVariationsRequest;
|
||||||
|
|
||||||
// verify the required parameter 'getVariationsRequest' is set
|
// verify the required parameter 'getVariationsRequest' is set
|
||||||
|
@ -187,11 +184,9 @@
|
||||||
* @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest
|
* @param {module:model/GetVariationsRequest} getVariationsRequest GetVariationsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetVariationsResponse}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetVariationsResponse}
|
||||||
*/
|
*/
|
||||||
public getVariations(getVariationsRequest: GetVariationsRequest) {
|
public getVariations(getVariationsRequest: GetVariationsRequest): Promise<GetVariationsResponse> {
|
||||||
return this.getVariationsWithHttpInfo(getVariationsRequest)
|
return this.getVariationsWithHttpInfo(getVariationsRequest)
|
||||||
.then(function(response_and_data: any) {
|
.then((response_and_data: ApiResponse<GetVariationsResponse>) => response_and_data.data);
|
||||||
return response_and_data.data;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,7 +194,7 @@
|
||||||
* @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest
|
* @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchItemsResponse} and HTTP response
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/SearchItemsResponse} and HTTP response
|
||||||
*/
|
*/
|
||||||
public searchItemsWithHttpInfo(searchItemsRequest: SearchItemsRequest) {
|
public searchItemsWithHttpInfo(searchItemsRequest: SearchItemsRequest): Promise<ApiResponse<SearchItemsResponse>> {
|
||||||
var postBody = searchItemsRequest;
|
var postBody = searchItemsRequest;
|
||||||
|
|
||||||
// verify the required parameter 'searchItemsRequest' is set
|
// verify the required parameter 'searchItemsRequest' is set
|
||||||
|
@ -235,11 +230,9 @@
|
||||||
* @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest
|
* @param {module:model/SearchItemsRequest} searchItemsRequest SearchItemsRequest
|
||||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchItemsResponse}
|
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/SearchItemsResponse}
|
||||||
*/
|
*/
|
||||||
public searchItems(searchItemsRequest: SearchItemsRequest) {
|
public searchItems(searchItemsRequest: SearchItemsRequest): Promise<SearchItemsResponse> {
|
||||||
return this.searchItemsWithHttpInfo(searchItemsRequest)
|
return this.searchItemsWithHttpInfo(searchItemsRequest)
|
||||||
.then(function(response_and_data: any) {
|
.then((response_and_data: ApiResponse<SearchItemsResponse>) => response_and_data.data);
|
||||||
return response_and_data.data;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -63,7 +63,7 @@ export class GetBrowseNodesRequest {
|
||||||
/**
|
/**
|
||||||
* @member {Array.<module:model/GetBrowseNodesResource>} Resources
|
* @member {Array.<module:model/GetBrowseNodesResource>} Resources
|
||||||
*/
|
*/
|
||||||
public Resources?: GetBrowseNodesResource;
|
public Resources?: GetBrowseNodesResource[];
|
||||||
|
|
||||||
// not sure if this is ever going to be relevant:
|
// not sure if this is ever going to be relevant:
|
||||||
// public constructor(browseNodeIds, partnerTag, partnerType) {
|
// public constructor(browseNodeIds, partnerTag, partnerType) {
|
||||||
|
|
|
@ -26,17 +26,17 @@
|
||||||
* @enum {}
|
* @enum {}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
export const enum GetBrowseNodesResourceValues {
|
export const GetBrowseNodesResourceValues = {
|
||||||
/**
|
/**
|
||||||
* value: "BrowseNodes.Ancestor"
|
* value: "BrowseNodes.Ancestor"
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
Ancestor = "BrowseNodes.Ancestor",
|
"BrowseNodes.Ancestor": "BrowseNodes.Ancestor",
|
||||||
/**
|
/**
|
||||||
* value: "BrowseNodes.Children"
|
* value: "BrowseNodes.Children"
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
Children = "BrowseNodes.Children"
|
"BrowseNodes.Children": "BrowseNodes.Children",
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,20 +45,14 @@ export const enum GetBrowseNodesResourceValues {
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
export class GetBrowseNodesResource extends String {
|
export class GetBrowseNodesResource extends String {
|
||||||
/**
|
public constructor(s: string) {
|
||||||
* value: "BrowseNodes.Ancestor"
|
super(GetBrowseNodesResourceValues[s]);
|
||||||
* @const
|
}
|
||||||
*/
|
|
||||||
public static get Ancestor() { return GetBrowseNodesResourceValues.Ancestor; }
|
|
||||||
/**
|
|
||||||
* value: "BrowseNodes.Children"
|
|
||||||
* @const
|
|
||||||
*/
|
|
||||||
public static get Children() { return GetBrowseNodesResourceValues.Children; }
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>GetBrowseNodesResource</code> enum value from a Javascript object name.
|
* Returns a <code>GetBrowseNodesResource</code> enum value from a Javascript object name.
|
||||||
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
||||||
* @return {module:model/GetBrowseNodesResource} The enum <code>GetBrowseNodesResource</code> value.
|
* @return {module:model/GetBrowseNodesResource} The enum <code>GetBrowseNodesResource</code> value.
|
||||||
*/
|
*/
|
||||||
public static constructFromObject(object: GetBrowseNodesResource|GetBrowseNodesResourceValues|string) { return object; }
|
public static constructFromObject(object: GetBrowseNodesResource|string) { return object; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -330,12 +330,9 @@ export const GetItemsResourceValues = {
|
||||||
* @enum {}
|
* @enum {}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
export class GetItemsResource {
|
export class GetItemsResource extends String {
|
||||||
[key: string]: any;
|
public constructor(s: string) {
|
||||||
|
super(GetItemsResourceValues[s]);
|
||||||
public constructor() {
|
|
||||||
const self = this;
|
|
||||||
Object.keys(GetItemsResourceValues).forEach((key: string) => self[key] = GetItemsResource[key]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* @enum {}
|
* @enum {}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
export const GetVariationsResourceValues = {
|
export const GetVariationsResourceValues: Record<string, string> = {
|
||||||
/**
|
/**
|
||||||
* value: "BrowseNodeInfo.BrowseNodes"
|
* value: "BrowseNodeInfo.BrowseNodes"
|
||||||
* @const
|
* @const
|
||||||
|
@ -336,7 +336,7 @@ export const GetVariationsResourceValues = {
|
||||||
* value: "VariationSummary.VariationDimension"
|
* value: "VariationSummary.VariationDimension"
|
||||||
* @const
|
* @const
|
||||||
*/
|
*/
|
||||||
"VariationSummary.VariationDimension": "VariationSummary.VariationDimension"
|
"VariationSummary.VariationDimension": "VariationSummary.VariationDimension",
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -344,12 +344,9 @@ export const GetVariationsResourceValues = {
|
||||||
* @enum {}
|
* @enum {}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
export class GetVariationsResource {
|
export class GetVariationsResource extends String {
|
||||||
[key: string]: any;
|
public constructor(s: string) {
|
||||||
|
super(GetVariationsResourceValues[s]);
|
||||||
public constructor() {
|
|
||||||
const self = this;
|
|
||||||
Object.keys(GetVariationsResourceValues).forEach((key: string) => self[key] = GetVariationsResourceValues[key]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user