diff --git a/src/ApiClient.js b/src/ApiClient.js
deleted file mode 100644
index 8a21b33..0000000
--- a/src/ApiClient.js
+++ /dev/null
@@ -1,600 +0,0 @@
-/**
- * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
- /**
- * ProductAdvertisingAPI
- * https://webservices.amazon.com/paapi5/documentation/index.html
- *
- */
-
-var awsv4 = require('./auth/SignHelper');
-
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['superagent', 'querystring'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('superagent'), require('querystring'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.ApiClient = factory(root.superagent, root.querystring);
- }
-}(this, function(superagent, querystring) {
- 'use strict';
-
- /**
- * @module ApiClient
- * @version 1.0.0
- */
-
- /**
- * 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
- * contents of this file should be regarded as internal but are documented for completeness.
- * @alias module:ApiClient
- * @class
- */
- var exports = function() {
- /**
- * The base URL against which to resolve every API call's (relative) path.
- * @type {String}
- * @default https://webservices.amazon.com
- */
- this.basePath = 'https://webservices.amazon.com'.replace(/\/+$/, '');
-
- /**
- * The Access Key ID which uniquely identifies you.
- * @type {String}
- */
- this.accessKey = null;
-
- /**
- * A key that is used in conjunction with the Access Key ID to cryptographically
- * sign an API request.
- * @type {String}
- */
- this.secretKey = null;
-
- /**
- * The host that receives the Amazon Product Advertising API GenNext request.
- * @type {String}
- * @default webservices.amazon.com
- */
- this.host = 'webservices.amazon.com';
-
- /**
- * The service's region where the request is targeted.
- * @type {String}
- * @default us-east-1
- */
- this.region = 'us-east-1';
-
- /**
- * The authentication methods to be included for all API calls.
- * @type {Array.
- * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
- * param.
- */
- exports.prototype.paramToString = function(param) {
- if (param == undefined || param == null) {
- return '';
- }
- if (param instanceof Date) {
- return param.toJSON();
- }
- return param.toString();
- };
-
- /**
- * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
- * NOTE: query parameters are not handled here.
- * @param {String} path The path to append to the base URL.
- * @param {Object} pathParams The parameter values to append.
- * @returns {String} The encoded path with parameter values substituted.
- */
- exports.prototype.buildUrl = function(path, pathParams) {
- if (!path.match(/^\//)) {
- path = '/' + path;
- }
- var url = "https://" + this.host + path;
- var _this = this;
- url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) {
- var value;
- if (pathParams.hasOwnProperty(key)) {
- value = _this.paramToString(pathParams[key]);
- } else {
- value = fullMatch;
- }
- return encodeURIComponent(value);
- });
- return url;
- };
-
- /**
- * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
- *
- * @param {String} contentType The MIME content type to check.
- * @returns {Boolean} true if contentType represents JSON, otherwise false.
- */
- exports.prototype.isJsonMime = function(contentType) {
- return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
- };
-
- /**
- * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
- * @param {Array.true if param represents a file.
- */
- exports.prototype.isFileParam = function(param) {
- // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
- if (typeof require === 'function') {
- var fs;
- try {
- fs = require('fs');
- } catch (err) {}
- if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
- return true;
- }
- }
- // Buffer in Node.js
- if (typeof Buffer === 'function' && param instanceof Buffer) {
- return true;
- }
- // Blob in browser
- if (typeof Blob === 'function' && param instanceof Blob) {
- return true;
- }
- // File in browser (it seems File object is also instance of Blob, but keep this for safe)
- if (typeof File === 'function' && param instanceof File) {
- return true;
- }
- return false;
- };
-
- /**
- * Normalizes parameter values:
- *
- *
- * @param {Object.csv
- * @const
- */
- CSV: ',',
- /**
- * Space-separated values. Value: ssv
- * @const
- */
- SSV: ' ',
- /**
- * Tab-separated values. Value: tsv
- * @const
- */
- TSV: '\t',
- /**
- * Pipe(|)-separated values. Value: pipes
- * @const
- */
- PIPES: '|',
- /**
- * Native array. Value: multi
- * @const
- */
- MULTI: 'multi'
- };
-
- /**
- * Builds a string representation of an array-type actual parameter, according to the given collection format.
- * @param {Array} param An array parameter.
- * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
- * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
- * param as is if collectionFormat is multi.
- */
- exports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) {
- if (param == null) {
- return null;
- }
- switch (collectionFormat) {
- case 'csv':
- return param.map(this.paramToString).join(',');
- case 'ssv':
- return param.map(this.paramToString).join(' ');
- case 'tsv':
- return param.map(this.paramToString).join('\t');
- case 'pipes':
- return param.map(this.paramToString).join('|');
- case 'multi':
- // return the array directly as SuperAgent will handle it as expected
- return param.map(this.paramToString);
- default:
- throw new Error('Unknown collection format: ' + collectionFormat);
- }
- };
-
- /**
- * Deserializes an HTTP response body into a value of the specified type.
- * @param {Object} response A SuperAgent response object.
- * @param {(String|Array.data will be converted to this type.
- * @returns A value of the specified type.
- */
- exports.prototype.deserialize = function deserialize(response, returnType) {
- if (response == null || returnType == null || response.status == 204) {
- return null;
- }
- // Rely on SuperAgent for parsing response body.
- // See http://visionmedia.github.io/superagent/#parsing-response-bodies
- var data = response.body;
- if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
- // SuperAgent does not always produce a body; use the unparsed response as a fallback
- data = response.text;
- }
- return exports.convertToType(data, returnType);
- };
-
- /**
- * Invokes the REST service using the supplied settings and parameters.
- * @param {String} path The base URL to invoke.
- * @param {String} httpMethod The HTTP method to use.
- * @param {Object.data will be converted to this type.
- * @returns An instance of the specified type or null or undefined if data is null or undefined.
- */
- exports.convertToType = function(data, type) {
- if (data === null || data === undefined)
- return data
-
- switch (type) {
- case 'Boolean':
- return Boolean(data);
- case 'Integer':
- return parseInt(data, 10);
- case 'Number':
- return parseFloat(data);
- case 'String':
- return String(data);
- case 'Date':
- return this.parseDate(String(data));
- case 'Blob':
- return data;
- default:
- if (type === Object) {
- // generic object, return directly
- return data;
- } else if (typeof type === 'function') {
- // for model type like: User
- return type.constructFromObject(data);
- } else if (Array.isArray(type)) {
- // for array type like: ['String']
- var itemType = type[0];
- return data.map(function(item) {
- return exports.convertToType(item, itemType);
- });
- } else if (typeof type === 'object') {
- // for plain object type like: {'String': 'Integer'}
- var keyType, valueType;
- for (var k in type) {
- if (type.hasOwnProperty(k)) {
- keyType = k;
- valueType = type[k];
- break;
- }
- }
- var result = {};
- for (var k in data) {
- if (data.hasOwnProperty(k)) {
- var key = exports.convertToType(k, keyType);
- var value = exports.convertToType(data[k], valueType);
- result[key] = value;
- }
- }
- return result;
- } else {
- // for unknown type, return the data directly
- return data;
- }
- }
- };
-
- /**
- * Constructs a new map or array model from REST data.
- * @param data {Object|Array} The REST data.
- * @param obj {Object|Array} The target object or array.
- */
- exports.constructFromObject = function(data, obj, itemType) {
- if (Array.isArray(data)) {
- for (var i = 0; i < data.length; i++) {
- if (data.hasOwnProperty(i))
- obj[i] = exports.convertToType(data[i], itemType);
- }
- } else {
- for (var k in data) {
- if (data.hasOwnProperty(k))
- obj[k] = exports.convertToType(data[k], itemType);
- }
- }
- };
-
- /**
- * The default API client implementation.
- * @type {module:ApiClient}
- */
- exports.instance = new exports();
-
- return exports;
-}));
diff --git a/src/ApiClient.ts b/src/ApiClient.ts
new file mode 100644
index 0000000..09611f6
--- /dev/null
+++ b/src/ApiClient.ts
@@ -0,0 +1,588 @@
+/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
+ * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+ /**
+ * ProductAdvertisingAPI
+ * https://webservices.amazon.com/paapi5/documentation/index.html
+ *
+ */
+
+ import * as awsv4 from './auth/SignHelper';
+ import superagent from 'superagent';
+ import querystring from 'querystring';
+
+ export interface Stringifiable {
+ toString(): string;
+ }
+
+ const PRODUCT_ADVERTISING_API = 'ProductAdvertisingAPI';
+
+ //wtf:
+ // (function(root, factory) {
+ // if (typeof define === 'function' && define.amd) {
+ // // AMD. Register as an anonymous module.
+ // define(['superagent', 'querystring'], factory);
+ // } else if (typeof module === 'object' && module.exports) {
+ // // CommonJS-like environments that support module.exports, like Node.
+ // module.exports = factory(require('superagent'), require('querystring'));
+ // } else {
+ // // Browser globals (root is window)
+ // if (!root.ProductAdvertisingAPIv1) {
+ // root.ProductAdvertisingAPIv1 = {};
+ // }
+ // root.ProductAdvertisingAPIv1.ApiClient = factory(root.superagent, root.querystring);
+ // }
+ // }(this, function(superagent, querystring) {
+ // 'use strict';
+
+ /**
+ * @module ApiClient
+ * @version 1.0.0
+ */
+
+ /**
+ * Enumeration of collection format separator strategies.
+ * @enum {String}
+ * @readonly
+ */
+ export enum CollectionFormatEnum {
+ /**
+ * Comma-separated values. Value: csv
+ * @const
+ */
+ CSV = ',',
+ /**
+ * Space-separated values. Value: ssv
+ * @const
+ */
+ SSV = ' ',
+ /**
+ * Tab-separated values. Value: tsv
+ * @const
+ */
+ TSV = '\t',
+ /**
+ * Pipe(|)-separated values. Value: pipes
+ * @const
+ */
+ PIPES = '|',
+ /**
+ * Native array. Value: multi
+ * @const
+ */
+ MULTI = 'multi',
+ };
+
+ /**
+ * 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
+ * contents of this file should be regarded as internal but are documented for completeness.
+ * @alias module:ApiClient
+ * @class
+ */
+ export class ApiClient {
+ /**
+ * The default API client implementation.
+ * @type {module:ApiClient}
+ */
+ public static instance = new ApiClient();
+ /**
+ * The base URL against which to resolve every API call's (relative) path.
+ * @type {String}
+ * @default https://webservices.amazon.com
+ */
+ public basePath: string = 'https://webservices.amazon.com'.replace(/\/+$/, '');
+ /**
+ * The Access Key ID which uniquely identifies you.
+ * @type {String}
+ */
+ public accessKey: string|null = null;
+ /**
+ * A key that is used in conjunction with the Access Key ID to cryptographically
+ * sign an API request.
+ * @type string
+ */
+ public secretKey: string|null = null;
+ /**
+ * The host that receives the Amazon Product Advertising API GenNext request.
+ * @type string
+ * @default 'webservices.amazon.com'
+ */
+ public host: string = 'webservices.amazon.com';
+ /**
+ * The service's region where the request is targeted.
+ * @type string
+ * @default 'us-east-1'
+ */
+ public region: string = 'us-east-1';
+ /**
+ * The authentication methods to be included for all API calls.
+ * @type {Array.param.
+ */
+ public paramToString(param: string|Stringifiable|Date|undefined|null) {
+ if (param == undefined || param == null) {
+ return '';
+ }
+ if (param instanceof Date) {
+ return param.toJSON();
+ }
+ return param.toString();
+ };
+
+ /**
+ * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
+ * NOTE: query parameters are not handled here.
+ * @param {String} path The path to append to the base URL.
+ * @param {Object} pathParams The parameter values to append.
+ * @returns {String} The encoded path with parameter values substituted.
+ */
+ public buildUrl(path: string, pathParams: Record
+ * JSON content type examples:
+ *
+ *
+ * @param {String} contentType The MIME content type to check.
+ * @returns {Boolean} true if contentType represents JSON, otherwise false.
+ */
+ public isJsonMime(contentType: string) {
+ return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
+ };
+
+ /**
+ * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
+ * @param {Array.true if param represents a file.
+ */
+ public isFileParam(param: any) {
+ // fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
+ if (typeof require === 'function') {
+ var fs;
+ try {
+ fs = require('fs');
+ } catch (err) {}
+ if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
+ return true;
+ }
+ }
+ // Buffer in Node.js
+ if (typeof Buffer === 'function' && param instanceof Buffer) {
+ return true;
+ }
+ // Blob in browser
+ if (typeof Blob === 'function' && param instanceof Blob) {
+ return true;
+ }
+ // File in browser (it seems File object is also instance of Blob, but keep this for safe)
+ if (typeof File === 'function' && param instanceof File) {
+ return true;
+ }
+ return false;
+ };
+
+ /**
+ * Normalizes parameter values:
+ *
+ *
+ * @param {Object.param as is if collectionFormat is multi.
+ */
+ public buildCollectionParam(param: any[], collectionFormat: CollectionFormatEnum) {
+ if (param == null) {
+ return null;
+ }
+ switch (collectionFormat) {
+ case CollectionFormatEnum.CSV:
+ return param.map(this.paramToString).join(',');
+ case CollectionFormatEnum.SSV:
+ return param.map(this.paramToString).join(' ');
+ case CollectionFormatEnum.TSV:
+ return param.map(this.paramToString).join('\t');
+ case CollectionFormatEnum.PIPES:
+ return param.map(this.paramToString).join('|');
+ case CollectionFormatEnum.MULTI:
+ // return the array directly as SuperAgent will handle it as expected
+ return param.map(this.paramToString);
+ default:
+ throw new Error('Unknown collection format: ' + collectionFormat);
+ }
+ };
+
+ /**
+ * Deserializes an HTTP response body into a value of the specified type.
+ * @param {Object} response A SuperAgent response object.
+ * @param {(String|Array.data will be converted to this type.
+ * @returns A value of the specified type.
+ */
+ public deserialize(response: superagent.Response, returnType: string|string[]|any|any[]) {
+ if (response == null || returnType == null || response.status == 204) {
+ return null;
+ }
+ // Rely on SuperAgent for parsing response body.
+ // See http://visionmedia.github.io/superagent/#parsing-response-bodies
+ var data = response.body;
+ if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
+ // SuperAgent does not always produce a body; use the unparsed response as a fallback
+ data = response.text;
+ }
+ return ApiClient.convertToType(data, returnType);
+ };
+
+ /**
+ * Invokes the REST service using the supplied settings and parameters.
+ * @param {String} path The base URL to invoke.
+ * @param {String} httpMethod The HTTP method to use.
+ * @param {String} apiName
+ * @param {Object.data will be converted to this type.
+ * @returns An instance of the specified type or null or undefined if data is null or undefined.
+ */
+ public static convertToType(data: string|any|any[], type: string|string[]|any|any[]) {
+ if (data === null || data === undefined)
+ return data
+
+ switch (type) {
+ case 'Boolean':
+ return Boolean(data);
+ case 'Integer':
+ return parseInt(data, 10);
+ case 'Number':
+ return parseFloat(data);
+ case 'String':
+ return String(data);
+ case 'Date':
+ return ApiClient.parseDate(String(data));
+ case 'Blob':
+ return data;
+ default:
+ if (type === Object) {
+ // generic object, return directly
+ return data;
+ } else if (typeof type === 'function') {
+ // for model type like: User
+ return type.constructFromObject(data);
+ } else if (Array.isArray(type)) {
+ // for array type like: ['String']
+ var itemType = type[0];
+ return data.map(function(item: any) {
+ return ApiClient.convertToType(item, itemType);
+ });
+ } else if (typeof type === 'object') {
+ // for plain object type like: {'String': 'Integer'}
+ var keyType, valueType;
+ for (var k in type) {
+ if (type.hasOwnProperty(k)) {
+ keyType = k;
+ valueType = type[k];
+ break;
+ }
+ }
+ var result: Record
- * The index module provides access to constructors for all the classes which comprise the public API.
- *
- * var ProductAdvertisingAPIv1 = require('index'); // See note below*.
- * var xxxSvc = new ProductAdvertisingAPIv1.XxxApi(); // Allocate the API class we're going to use.
- * var yyyModel = new ProductAdvertisingAPIv1.Yyy(); // Construct a model instance.
- * yyyModel.someProperty = 'someValue';
- * ...
- * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
- * ...
- *
- * *NOTE: For a top-level AMD script, use require(['index'], function(){...})
- * and put the application logic within the callback function.
- *
- * A non-AMD browser application (discouraged) might do something like this: - *
- * var xxxSvc = new ProductAdvertisingAPIv1.XxxApi(); // Allocate the API class we're going to use. - * var yyy = new ProductAdvertisingAPIv1.Yyy(); // Construct a model instance. - * yyyModel.someProperty = 'someValue'; - * ... - * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. - * ... - *- * - * @module index - * @version 1.0.0 - */ - var exports = { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient: ApiClient, - /** - * The Availability model constructor. - * @property {module:model/Availability} - */ - Availability: Availability, - /** - * The BrowseNode model constructor. - * @property {module:model/BrowseNode} - */ - BrowseNode: BrowseNode, - /** - * The BrowseNodeAncestor model constructor. - * @property {module:model/BrowseNodeAncestor} - */ - BrowseNodeAncestor: BrowseNodeAncestor, - /** - * The BrowseNodeChild model constructor. - * @property {module:model/BrowseNodeChild} - */ - BrowseNodeChild: BrowseNodeChild, - /** - * The BrowseNodeInfo model constructor. - * @property {module:model/BrowseNodeInfo} - */ - BrowseNodeInfo: BrowseNodeInfo, - /** - * The BrowseNodesResult model constructor. - * @property {module:model/BrowseNodesResult} - */ - BrowseNodesResult: BrowseNodesResult, - /** - * The ByLineInfo model constructor. - * @property {module:model/ByLineInfo} - */ - ByLineInfo: ByLineInfo, - /** - * The Classifications model constructor. - * @property {module:model/Classifications} - */ - Classifications: Classifications, - /** - * The Condition model constructor. - * @property {module:model/Condition} - */ - Condition: Condition, - /** - * The ContentInfo model constructor. - * @property {module:model/ContentInfo} - */ - ContentInfo: ContentInfo, - /** - * The ContentRating model constructor. - * @property {module:model/ContentRating} - */ - ContentRating: ContentRating, - /** - * The Contributor model constructor. - * @property {module:model/Contributor} - */ - Contributor: Contributor, - /** - * The CustomerReviews model constructor. - * @property {module:model/CustomerReviews} - */ - CustomerReviews: CustomerReviews, - /** - * The DeliveryFlag model constructor. - * @property {module:model/DeliveryFlag} - */ - DeliveryFlag: DeliveryFlag, - /** - * The DimensionBasedAttribute model constructor. - * @property {module:model/DimensionBasedAttribute} - */ - DimensionBasedAttribute: DimensionBasedAttribute, - /** - * The DurationPrice model constructor. - * @property {module:model/DurationPrice} - */ - DurationPrice: DurationPrice, - /** - * The ErrorData model constructor. - * @property {module:model/ErrorData} - */ - ErrorData: ErrorData, - /** - * The ExternalIds model constructor. - * @property {module:model/ExternalIds} - */ - ExternalIds: ExternalIds, - /** - * The GetBrowseNodesRequest model constructor. - * @property {module:model/GetBrowseNodesRequest} - */ - GetBrowseNodesRequest: GetBrowseNodesRequest, - /** - * The GetBrowseNodesResource model constructor. - * @property {module:model/GetBrowseNodesResource} - */ - GetBrowseNodesResource: GetBrowseNodesResource, - /** - * The GetBrowseNodesResponse model constructor. - * @property {module:model/GetBrowseNodesResponse} - */ - GetBrowseNodesResponse: GetBrowseNodesResponse, - /** - * The GetItemsRequest model constructor. - * @property {module:model/GetItemsRequest} - */ - GetItemsRequest: GetItemsRequest, - /** - * The GetItemsResource model constructor. - * @property {module:model/GetItemsResource} - */ - GetItemsResource: GetItemsResource, - /** - * The GetItemsResponse model constructor. - * @property {module:model/GetItemsResponse} - */ - GetItemsResponse: GetItemsResponse, - /** - * The GetVariationsRequest model constructor. - * @property {module:model/GetVariationsRequest} - */ - GetVariationsRequest: GetVariationsRequest, - /** - * The GetVariationsResource model constructor. - * @property {module:model/GetVariationsResource} - */ - GetVariationsResource: GetVariationsResource, - /** - * The GetVariationsResponse model constructor. - * @property {module:model/GetVariationsResponse} - */ - GetVariationsResponse: GetVariationsResponse, - /** - * The ImageSize model constructor. - * @property {module:model/ImageSize} - */ - ImageSize: ImageSize, - /** - * The ImageType model constructor. - * @property {module:model/ImageType} - */ - ImageType: ImageType, - /** - * The Images model constructor. - * @property {module:model/Images} - */ - Images: Images, - /** - * The Item model constructor. - * @property {module:model/Item} - */ - Item: Item, - /** - * The ItemIdType model constructor. - * @property {module:model/ItemIdType} - */ - ItemIdType: ItemIdType, - /** - * The ItemInfo model constructor. - * @property {module:model/ItemInfo} - */ - ItemInfo: ItemInfo, - /** - * The ItemsResult model constructor. - * @property {module:model/ItemsResult} - */ - ItemsResult: ItemsResult, - /** - * The LanguageType model constructor. - * @property {module:model/LanguageType} - */ - LanguageType: LanguageType, - /** - * The Languages model constructor. - * @property {module:model/Languages} - */ - Languages: Languages, - /** - * The ManufactureInfo model constructor. - * @property {module:model/ManufactureInfo} - */ - ManufactureInfo: ManufactureInfo, - /** - * The MaxPrice model constructor. - * @property {module:model/MaxPrice} - */ - MaxPrice: MaxPrice, - /** - * The Merchant model constructor. - * @property {module:model/Merchant} - */ - Merchant: Merchant, - /** - * The MinPrice model constructor. - * @property {module:model/MinPrice} - */ - MinPrice: MinPrice, - /** - * The MinReviewsRating model constructor. - * @property {module:model/MinReviewsRating} - */ - MinReviewsRating: MinReviewsRating, - /** - * The MinSavingPercent model constructor. - * @property {module:model/MinSavingPercent} - */ - MinSavingPercent: MinSavingPercent, - /** - * The MultiValuedAttribute model constructor. - * @property {module:model/MultiValuedAttribute} - */ - MultiValuedAttribute: MultiValuedAttribute, - /** - * The OfferAvailability model constructor. - * @property {module:model/OfferAvailability} - */ - OfferAvailability: OfferAvailability, - /** - * The OfferCondition model constructor. - * @property {module:model/OfferCondition} - */ - OfferCondition: OfferCondition, - /** - * The OfferConditionNote model constructor. - * @property {module:model/OfferConditionNote} - */ - OfferConditionNote: OfferConditionNote, - /** - * The OfferCount model constructor. - * @property {module:model/OfferCount} - */ - OfferCount: OfferCount, - /** - * The OfferDeliveryInfo model constructor. - * @property {module:model/OfferDeliveryInfo} - */ - OfferDeliveryInfo: OfferDeliveryInfo, - /** - * The OfferListing model constructor. - * @property {module:model/OfferListing} - */ - OfferListing: OfferListing, - /** - * The OfferLoyaltyPoints model constructor. - * @property {module:model/OfferLoyaltyPoints} - */ - OfferLoyaltyPoints: OfferLoyaltyPoints, - /** - * The OfferMerchantInfo model constructor. - * @property {module:model/OfferMerchantInfo} - */ - OfferMerchantInfo: OfferMerchantInfo, - /** - * The OfferPrice model constructor. - * @property {module:model/OfferPrice} - */ - OfferPrice: OfferPrice, - /** - * The OfferProgramEligibility model constructor. - * @property {module:model/OfferProgramEligibility} - */ - OfferProgramEligibility: OfferProgramEligibility, - /** - * The OfferPromotion model constructor. - * @property {module:model/OfferPromotion} - */ - OfferPromotion: OfferPromotion, - /** - * The OfferSavings model constructor. - * @property {module:model/OfferSavings} - */ - OfferSavings: OfferSavings, - /** - * The OfferShippingCharge model constructor. - * @property {module:model/OfferShippingCharge} - */ - OfferShippingCharge: OfferShippingCharge, - /** - * The OfferSubCondition model constructor. - * @property {module:model/OfferSubCondition} - */ - OfferSubCondition: OfferSubCondition, - /** - * The OfferSummary model constructor. - * @property {module:model/OfferSummary} - */ - OfferSummary: OfferSummary, - /** - * The Offers model constructor. - * @property {module:model/Offers} - */ - Offers: Offers, - /** - * The PartnerType model constructor. - * @property {module:model/PartnerType} - */ - PartnerType: PartnerType, - /** - * The Price model constructor. - * @property {module:model/Price} - */ - Price: Price, - /** - * The PriceType model constructor. - * @property {module:model/PriceType} - */ - PriceType: PriceType, - /** - * The ProductAdvertisingAPIClientException model constructor. - * @property {module:model/ProductAdvertisingAPIClientException} - */ - ProductAdvertisingAPIClientException: ProductAdvertisingAPIClientException, - /** - * The ProductAdvertisingAPIServiceException model constructor. - * @property {module:model/ProductAdvertisingAPIServiceException} - */ - ProductAdvertisingAPIServiceException: ProductAdvertisingAPIServiceException, - /** - * The ProductInfo model constructor. - * @property {module:model/ProductInfo} - */ - ProductInfo: ProductInfo, - /** - * The Properties model constructor. - * @property {module:model/Properties} - */ - Properties: Properties, - /** - * The Rating model constructor. - * @property {module:model/Rating} - */ - Rating: Rating, - /** - * The Refinement model constructor. - * @property {module:model/Refinement} - */ - Refinement: Refinement, - /** - * The RefinementBin model constructor. - * @property {module:model/RefinementBin} - */ - RefinementBin: RefinementBin, - /** - * The RentalOfferListing model constructor. - * @property {module:model/RentalOfferListing} - */ - RentalOfferListing: RentalOfferListing, - /** - * The RentalOffers model constructor. - * @property {module:model/RentalOffers} - */ - RentalOffers: RentalOffers, - /** - * The SearchItemsRequest model constructor. - * @property {module:model/SearchItemsRequest} - */ - SearchItemsRequest: SearchItemsRequest, - /** - * The SearchItemsResource model constructor. - * @property {module:model/SearchItemsResource} - */ - SearchItemsResource: SearchItemsResource, - /** - * The SearchItemsResponse model constructor. - * @property {module:model/SearchItemsResponse} - */ - SearchItemsResponse: SearchItemsResponse, - /** - * The SearchRefinements model constructor. - * @property {module:model/SearchRefinements} - */ - SearchRefinements: SearchRefinements, - /** - * The SearchResult model constructor. - * @property {module:model/SearchResult} - */ - SearchResult: SearchResult, - /** - * The SingleBooleanValuedAttribute model constructor. - * @property {module:model/SingleBooleanValuedAttribute} - */ - SingleBooleanValuedAttribute: SingleBooleanValuedAttribute, - /** - * The SingleIntegerValuedAttribute model constructor. - * @property {module:model/SingleIntegerValuedAttribute} - */ - SingleIntegerValuedAttribute: SingleIntegerValuedAttribute, - /** - * The SingleStringValuedAttribute model constructor. - * @property {module:model/SingleStringValuedAttribute} - */ - SingleStringValuedAttribute: SingleStringValuedAttribute, - /** - * The SortBy model constructor. - * @property {module:model/SortBy} - */ - SortBy: SortBy, - /** - * The TechnicalInfo model constructor. - * @property {module:model/TechnicalInfo} - */ - TechnicalInfo: TechnicalInfo, - /** - * The TradeInInfo model constructor. - * @property {module:model/TradeInInfo} - */ - TradeInInfo: TradeInInfo, - /** - * The TradeInPrice model constructor. - * @property {module:model/TradeInPrice} - */ - TradeInPrice: TradeInPrice, - /** - * The UnitBasedAttribute model constructor. - * @property {module:model/UnitBasedAttribute} - */ - UnitBasedAttribute: UnitBasedAttribute, - /** - * The VariationAttribute model constructor. - * @property {module:model/VariationAttribute} - */ - VariationAttribute: VariationAttribute, - /** - * The VariationDimension model constructor. - * @property {module:model/VariationDimension} - */ - VariationDimension: VariationDimension, - /** - * The VariationSummary model constructor. - * @property {module:model/VariationSummary} - */ - VariationSummary: VariationSummary, - /** - * The VariationsResult model constructor. - * @property {module:model/VariationsResult} - */ - VariationsResult: VariationsResult, - /** - * The WebsiteSalesRank model constructor. - * @property {module:model/WebsiteSalesRank} - */ - WebsiteSalesRank: WebsiteSalesRank, - /** - * The DefaultApi service constructor. - * @property {module:api/DefaultApi} - */ - DefaultApi: DefaultApi - }; - - return exports; -})); diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..0eaec59 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,522 @@ +/** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * + * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + /** + * ProductAdvertisingAPI + * https://webservices.amazon.com/paapi5/documentation/index.html + * + */ + +import { ApiClient } from "./ApiClient"; +import { ByLineInfo } from "./model/ByLineInfo"; +import { Classifications } from "./model/Classifications"; +import { Condition } from "./model/Condition"; +import { Contributor } from "./model/Contributor"; +import { OfferSavings } from "./model/OfferSavings"; +import { PriceType } from "./model/PriceType"; +import { SingleBooleanValuedAttribute } from "./model/SingleBooleanValuedAttribute"; +import { SingleIntegerValuedAttribute } from "./model/SingleIntegerValuedAttribute"; +import { SingleStringValuedAttribute } from "./model/SingleStringValuedAttribute"; + +/** + * ProductAdvertisingAPI 5.0 NodeJS SDK.
index module provides access to constructors for all the classes which comprise the public API.
+ * + * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: + *
+ * var ProductAdvertisingAPIv1 = require('index'); // See note below*.
+ * var xxxSvc = new ProductAdvertisingAPIv1.XxxApi(); // Allocate the API class we're going to use.
+ * var yyyModel = new ProductAdvertisingAPIv1.Yyy(); // Construct a model instance.
+ * yyyModel.someProperty = 'someValue';
+ * ...
+ * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+ * ...
+ *
+ * *NOTE: For a top-level AMD script, use require(['index'], function(){...})
+ * and put the application logic within the callback function.
+ *
+ * + * A non-AMD browser application (discouraged) might do something like this: + *
+ * var xxxSvc = new ProductAdvertisingAPIv1.XxxApi(); // Allocate the API class we're going to use. + * var yyy = new ProductAdvertisingAPIv1.Yyy(); // Construct a model instance. + * yyyModel.someProperty = 'someValue'; + * ... + * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service. + * ... + *+ * + * @module index + * @version 1.0.0 + */ +export { + /** + * The ApiClient constructor. + * @property {module:ApiClient} + */ + ApiClient, + /** + * The Availability model constructor. + * @property {module:model/Availability} + */ + Availability: Availability, + /** + * The BrowseNode model constructor. + * @property {module:model/BrowseNode} + */ + BrowseNode: BrowseNode, + /** + * The BrowseNodeAncestor model constructor. + * @property {module:model/BrowseNodeAncestor} + */ + BrowseNodeAncestor: BrowseNodeAncestor, + /** + * The BrowseNodeChild model constructor. + * @property {module:model/BrowseNodeChild} + */ + BrowseNodeChild: BrowseNodeChild, + /** + * The BrowseNodeInfo model constructor. + * @property {module:model/BrowseNodeInfo} + */ + BrowseNodeInfo: BrowseNodeInfo, + /** + * The BrowseNodesResult model constructor. + * @property {module:model/BrowseNodesResult} + */ + BrowseNodesResult: BrowseNodesResult, + /** + * The ByLineInfo model constructor. + * @property {module:model/ByLineInfo} + */ + ByLineInfo, + /** + * The Classifications model constructor. + * @property {module:model/Classifications} + */ + Classifications, + /** + * The Condition model constructor. + * @property {module:model/Condition} + */ + Condition, + /** + * The ContentInfo model constructor. + * @property {module:model/ContentInfo} + */ + ContentInfo: ContentInfo, + /** + * The ContentRating model constructor. + * @property {module:model/ContentRating} + */ + ContentRating: ContentRating, + /** + * The Contributor model constructor. + * @property {module:model/Contributor} + */ + Contributor, + /** + * The CustomerReviews model constructor. + * @property {module:model/CustomerReviews} + */ + CustomerReviews: CustomerReviews, + /** + * The DeliveryFlag model constructor. + * @property {module:model/DeliveryFlag} + */ + DeliveryFlag: DeliveryFlag, + /** + * The DimensionBasedAttribute model constructor. + * @property {module:model/DimensionBasedAttribute} + */ + DimensionBasedAttribute: DimensionBasedAttribute, + /** + * The DurationPrice model constructor. + * @property {module:model/DurationPrice} + */ + DurationPrice: DurationPrice, + /** + * The ErrorData model constructor. + * @property {module:model/ErrorData} + */ + ErrorData: ErrorData, + /** + * The ExternalIds model constructor. + * @property {module:model/ExternalIds} + */ + ExternalIds: ExternalIds, + /** + * The GetBrowseNodesRequest model constructor. + * @property {module:model/GetBrowseNodesRequest} + */ + GetBrowseNodesRequest: GetBrowseNodesRequest, + /** + * The GetBrowseNodesResource model constructor. + * @property {module:model/GetBrowseNodesResource} + */ + GetBrowseNodesResource: GetBrowseNodesResource, + /** + * The GetBrowseNodesResponse model constructor. + * @property {module:model/GetBrowseNodesResponse} + */ + GetBrowseNodesResponse: GetBrowseNodesResponse, + /** + * The GetItemsRequest model constructor. + * @property {module:model/GetItemsRequest} + */ + GetItemsRequest: GetItemsRequest, + /** + * The GetItemsResource model constructor. + * @property {module:model/GetItemsResource} + */ + GetItemsResource: GetItemsResource, + /** + * The GetItemsResponse model constructor. + * @property {module:model/GetItemsResponse} + */ + GetItemsResponse: GetItemsResponse, + /** + * The GetVariationsRequest model constructor. + * @property {module:model/GetVariationsRequest} + */ + GetVariationsRequest: GetVariationsRequest, + /** + * The GetVariationsResource model constructor. + * @property {module:model/GetVariationsResource} + */ + GetVariationsResource: GetVariationsResource, + /** + * The GetVariationsResponse model constructor. + * @property {module:model/GetVariationsResponse} + */ + GetVariationsResponse: GetVariationsResponse, + /** + * The ImageSize model constructor. + * @property {module:model/ImageSize} + */ + ImageSize: ImageSize, + /** + * The ImageType model constructor. + * @property {module:model/ImageType} + */ + ImageType: ImageType, + /** + * The Images model constructor. + * @property {module:model/Images} + */ + Images: Images, + /** + * The Item model constructor. + * @property {module:model/Item} + */ + Item: Item, + /** + * The ItemIdType model constructor. + * @property {module:model/ItemIdType} + */ + ItemIdType: ItemIdType, + /** + * The ItemInfo model constructor. + * @property {module:model/ItemInfo} + */ + ItemInfo: ItemInfo, + /** + * The ItemsResult model constructor. + * @property {module:model/ItemsResult} + */ + ItemsResult: ItemsResult, + /** + * The LanguageType model constructor. + * @property {module:model/LanguageType} + */ + LanguageType: LanguageType, + /** + * The Languages model constructor. + * @property {module:model/Languages} + */ + Languages: Languages, + /** + * The ManufactureInfo model constructor. + * @property {module:model/ManufactureInfo} + */ + ManufactureInfo: ManufactureInfo, + /** + * The MaxPrice model constructor. + * @property {module:model/MaxPrice} + */ + MaxPrice: MaxPrice, + /** + * The Merchant model constructor. + * @property {module:model/Merchant} + */ + Merchant: Merchant, + /** + * The MinPrice model constructor. + * @property {module:model/MinPrice} + */ + MinPrice: MinPrice, + /** + * The MinReviewsRating model constructor. + * @property {module:model/MinReviewsRating} + */ + MinReviewsRating: MinReviewsRating, + /** + * The MinSavingPercent model constructor. + * @property {module:model/MinSavingPercent} + */ + MinSavingPercent: MinSavingPercent, + /** + * The MultiValuedAttribute model constructor. + * @property {module:model/MultiValuedAttribute} + */ + MultiValuedAttribute: MultiValuedAttribute, + /** + * The OfferAvailability model constructor. + * @property {module:model/OfferAvailability} + */ + OfferAvailability: OfferAvailability, + /** + * The OfferCondition model constructor. + * @property {module:model/OfferCondition} + */ + OfferCondition: OfferCondition, + /** + * The OfferConditionNote model constructor. + * @property {module:model/OfferConditionNote} + */ + OfferConditionNote: OfferConditionNote, + /** + * The OfferCount model constructor. + * @property {module:model/OfferCount} + */ + OfferCount: OfferCount, + /** + * The OfferDeliveryInfo model constructor. + * @property {module:model/OfferDeliveryInfo} + */ + OfferDeliveryInfo: OfferDeliveryInfo, + /** + * The OfferListing model constructor. + * @property {module:model/OfferListing} + */ + OfferListing: OfferListing, + /** + * The OfferLoyaltyPoints model constructor. + * @property {module:model/OfferLoyaltyPoints} + */ + OfferLoyaltyPoints: OfferLoyaltyPoints, + /** + * The OfferMerchantInfo model constructor. + * @property {module:model/OfferMerchantInfo} + */ + OfferMerchantInfo: OfferMerchantInfo, + /** + * The OfferPrice model constructor. + * @property {module:model/OfferPrice} + */ + OfferPrice: OfferPrice, + /** + * The OfferProgramEligibility model constructor. + * @property {module:model/OfferProgramEligibility} + */ + OfferProgramEligibility: OfferProgramEligibility, + /** + * The OfferPromotion model constructor. + * @property {module:model/OfferPromotion} + */ + OfferPromotion: OfferPromotion, + /** + * The OfferSavings model constructor. + * @property {module:model/OfferSavings} + */ + OfferSavings, + /** + * The OfferShippingCharge model constructor. + * @property {module:model/OfferShippingCharge} + */ + OfferShippingCharge: OfferShippingCharge, + /** + * The OfferSubCondition model constructor. + * @property {module:model/OfferSubCondition} + */ + OfferSubCondition: OfferSubCondition, + /** + * The OfferSummary model constructor. + * @property {module:model/OfferSummary} + */ + OfferSummary: OfferSummary, + /** + * The Offers model constructor. + * @property {module:model/Offers} + */ + Offers: Offers, + /** + * The PartnerType model constructor. + * @property {module:model/PartnerType} + */ + PartnerType: PartnerType, + /** + * The Price model constructor. + * @property {module:model/Price} + */ + Price: Price, + /** + * The PriceType model constructor. + * @property {module:model/PriceType} + */ + PriceType, + /** + * The ProductAdvertisingAPIClientException model constructor. + * @property {module:model/ProductAdvertisingAPIClientException} + */ + ProductAdvertisingAPIClientException: ProductAdvertisingAPIClientException, + /** + * The ProductAdvertisingAPIServiceException model constructor. + * @property {module:model/ProductAdvertisingAPIServiceException} + */ + ProductAdvertisingAPIServiceException: ProductAdvertisingAPIServiceException, + /** + * The ProductInfo model constructor. + * @property {module:model/ProductInfo} + */ + ProductInfo: ProductInfo, + /** + * The Properties model constructor. + * @property {module:model/Properties} + */ + Properties: Properties, + /** + * The Rating model constructor. + * @property {module:model/Rating} + */ + Rating: Rating, + /** + * The Refinement model constructor. + * @property {module:model/Refinement} + */ + Refinement: Refinement, + /** + * The RefinementBin model constructor. + * @property {module:model/RefinementBin} + */ + RefinementBin: RefinementBin, + /** + * The RentalOfferListing model constructor. + * @property {module:model/RentalOfferListing} + */ + RentalOfferListing: RentalOfferListing, + /** + * The RentalOffers model constructor. + * @property {module:model/RentalOffers} + */ + RentalOffers: RentalOffers, + /** + * The SearchItemsRequest model constructor. + * @property {module:model/SearchItemsRequest} + */ + SearchItemsRequest: SearchItemsRequest, + /** + * The SearchItemsResource model constructor. + * @property {module:model/SearchItemsResource} + */ + SearchItemsResource: SearchItemsResource, + /** + * The SearchItemsResponse model constructor. + * @property {module:model/SearchItemsResponse} + */ + SearchItemsResponse: SearchItemsResponse, + /** + * The SearchRefinements model constructor. + * @property {module:model/SearchRefinements} + */ + SearchRefinements: SearchRefinements, + /** + * The SearchResult model constructor. + * @property {module:model/SearchResult} + */ + SearchResult: SearchResult, + /** + * The SingleBooleanValuedAttribute model constructor. + * @property {module:model/SingleBooleanValuedAttribute} + */ + SingleBooleanValuedAttribute, + /** + * The SingleIntegerValuedAttribute model constructor. + * @property {module:model/SingleIntegerValuedAttribute} + */ + SingleIntegerValuedAttribute, + /** + * The SingleStringValuedAttribute model constructor. + * @property {module:model/SingleStringValuedAttribute} + */ + SingleStringValuedAttribute, + /** + * The SortBy model constructor. + * @property {module:model/SortBy} + */ + SortBy: SortBy, + /** + * The TechnicalInfo model constructor. + * @property {module:model/TechnicalInfo} + */ + TechnicalInfo: TechnicalInfo, + /** + * The TradeInInfo model constructor. + * @property {module:model/TradeInInfo} + */ + TradeInInfo: TradeInInfo, + /** + * The TradeInPrice model constructor. + * @property {module:model/TradeInPrice} + */ + TradeInPrice: TradeInPrice, + /** + * The UnitBasedAttribute model constructor. + * @property {module:model/UnitBasedAttribute} + */ + UnitBasedAttribute: UnitBasedAttribute, + /** + * The VariationAttribute model constructor. + * @property {module:model/VariationAttribute} + */ + VariationAttribute: VariationAttribute, + /** + * The VariationDimension model constructor. + * @property {module:model/VariationDimension} + */ + VariationDimension: VariationDimension, + /** + * The VariationSummary model constructor. + * @property {module:model/VariationSummary} + */ + VariationSummary: VariationSummary, + /** + * The VariationsResult model constructor. + * @property {module:model/VariationsResult} + */ + VariationsResult: VariationsResult, + /** + * The WebsiteSalesRank model constructor. + * @property {module:model/WebsiteSalesRank} + */ + WebsiteSalesRank: WebsiteSalesRank, + /** + * The DefaultApi service constructor. + * @property {module:api/DefaultApi} + */ + DefaultApi: DefaultApi +}; \ No newline at end of file diff --git a/src/model/Availability.js b/src/model/Availability.ts similarity index 97% rename from src/model/Availability.js rename to src/model/Availability.ts index d6f9ec5..df9a50e 100644 --- a/src/model/Availability.js +++ b/src/model/Availability.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/BrowseNode.js b/src/model/BrowseNode.ts similarity index 98% rename from src/model/BrowseNode.js rename to src/model/BrowseNode.ts index cc6f918..f2a2d9b 100644 --- a/src/model/BrowseNode.js +++ b/src/model/BrowseNode.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/BrowseNodeAncestor.js b/src/model/BrowseNodeAncestor.ts similarity index 98% rename from src/model/BrowseNodeAncestor.js rename to src/model/BrowseNodeAncestor.ts index e46fbaa..ed3282a 100644 --- a/src/model/BrowseNodeAncestor.js +++ b/src/model/BrowseNodeAncestor.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/BrowseNodeChild.js b/src/model/BrowseNodeChild.ts similarity index 98% rename from src/model/BrowseNodeChild.js rename to src/model/BrowseNodeChild.ts index f2e5e2e..9cf2241 100644 --- a/src/model/BrowseNodeChild.js +++ b/src/model/BrowseNodeChild.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/BrowseNodeInfo.js b/src/model/BrowseNodeInfo.ts similarity index 98% rename from src/model/BrowseNodeInfo.js rename to src/model/BrowseNodeInfo.ts index 8f4754a..1680e93 100644 --- a/src/model/BrowseNodeInfo.js +++ b/src/model/BrowseNodeInfo.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/BrowseNodesResult.js b/src/model/BrowseNodesResult.ts similarity index 97% rename from src/model/BrowseNodesResult.js rename to src/model/BrowseNodesResult.ts index 4f9f1a0..521a267 100644 --- a/src/model/BrowseNodesResult.js +++ b/src/model/BrowseNodesResult.ts @@ -1,4 +1,6 @@ /** + * Adapted to TypeScript by David A. Ball. (c) 2024. + * * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/model/ByLineInfo.js b/src/model/ByLineInfo.js deleted file mode 100644 index d189cee..0000000 --- a/src/model/ByLineInfo.js +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ - - /** - * ProductAdvertisingAPI - * https://webservices.amazon.com/paapi5/documentation/index.html - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['ApiClient', 'model/Contributor', 'model/SingleStringValuedAttribute'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('./Contributor'), require('./SingleStringValuedAttribute')); - } else { - // Browser globals (root is window) - if (!root.ProductAdvertisingAPIv1) { - root.ProductAdvertisingAPIv1 = {}; - } - root.ProductAdvertisingAPIv1.ByLineInfo = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.Contributor, root.ProductAdvertisingAPIv1.SingleStringValuedAttribute); - } -}(this, function(ApiClient, Contributor, SingleStringValuedAttribute) { - 'use strict'; - - - - - /** - * The ByLineInfo model module. - * @module model/ByLineInfo - * @version 1.0.0 - */ - - /** - * Constructs a new
ByLineInfo.
- * @alias module:model/ByLineInfo
- * @class
- */
- var exports = function() {
- var _this = this;
-
-
-
-
- };
-
- /**
- * Constructs a ByLineInfo from a plain JavaScript object, optionally creating a new instance.
- * Copies all relevant properties from data to obj if supplied or a new instance if not.
- * @param {Object} data The plain JavaScript object bearing properties of interest.
- * @param {module:model/ByLineInfo} obj Optional instance to populate.
- * @return {module:model/ByLineInfo} The populated ByLineInfo instance.
- */
- exports.constructFromObject = function(data, obj) {
- if (data) {
- obj = obj || new exports();
-
- if (data.hasOwnProperty('Brand')) {
- obj['Brand'] = SingleStringValuedAttribute.constructFromObject(data['Brand']);
- }
- if (data.hasOwnProperty('Contributors')) {
- obj['Contributors'] = ApiClient.convertToType(data['Contributors'], [Contributor]);
- }
- if (data.hasOwnProperty('Manufacturer')) {
- obj['Manufacturer'] = SingleStringValuedAttribute.constructFromObject(data['Manufacturer']);
- }
- }
- return obj;
- }
-
- /**
- * @member {module:model/SingleStringValuedAttribute} Brand
- */
- exports.prototype['Brand'] = undefined;
- /**
- * @member {Array.ByLineInfo.
+ * @alias module:model/ByLineInfo
+ * @class
+ */
+export class ByLineInfo {
+ /**
+ * @member {module:model/SingleStringValuedAttribute} Brand
+ */
+ public Brand?: SingleStringValuedAttribute;
+ /**
+ * @member {Array.ByLineInfo from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data to obj if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/ByLineInfo} obj Optional instance to populate.
+ * @return {module:model/ByLineInfo} The populated ByLineInfo instance.
+ */
+ public static constructFromObject(data: any, obj?: ByLineInfo) {
+ if (data) {
+ obj = obj || new ByLineInfo();
+
+ if (data.hasOwnProperty('Brand')) {
+ obj.Brand = SingleStringValuedAttribute.constructFromObject(data['Brand']);
+ }
+ if (data.hasOwnProperty('Contributors')) {
+ obj.Contributors = ApiClient.convertToType(data['Contributors'], [Contributor]);
+ }
+ if (data.hasOwnProperty('Manufacturer')) {
+ obj.Manufacturer = SingleStringValuedAttribute.constructFromObject(data['Manufacturer']);
+ }
+ }
+ return obj;
+ }
+};
diff --git a/src/model/Classifications.js b/src/model/Classifications.ts
similarity index 50%
rename from src/model/Classifications.js
rename to src/model/Classifications.ts
index a3338b6..c521c23 100644
--- a/src/model/Classifications.js
+++ b/src/model/Classifications.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -19,43 +21,29 @@
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient', 'model/SingleStringValuedAttribute'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'), require('./SingleStringValuedAttribute'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.Classifications = factory(root.ProductAdvertisingAPIv1.ApiClient, root.ProductAdvertisingAPIv1.SingleStringValuedAttribute);
- }
-}(this, function(ApiClient, SingleStringValuedAttribute) {
- 'use strict';
-
-
+/**
+ * The Classifications model module.
+ * @module model/Classifications
+ * @version 1.0.0
+ */
+import { ApiClient } from "../ApiClient";
+import { SingleStringValuedAttribute } from "./SingleStringValuedAttribute";
+/**
+ * Constructs a new Classifications.
+ * @alias module:model/Classifications
+ * @class
+ */
+export class Classifications {
/**
- * The Classifications model module.
- * @module model/Classifications
- * @version 1.0.0
+ * @member {module:model/SingleStringValuedAttribute} Binding
*/
-
+ public Binding?: SingleStringValuedAttribute;
/**
- * Constructs a new Classifications.
- * @alias module:model/Classifications
- * @class
+ * @member {module:model/SingleStringValuedAttribute} ProductGroup
*/
- var exports = function() {
- var _this = this;
-
-
-
- };
+ public ProductGroup?: SingleStringValuedAttribute;
/**
* Constructs a Classifications from a plain JavaScript object, optionally creating a new instance.
@@ -64,32 +52,17 @@
* @param {module:model/Classifications} obj Optional instance to populate.
* @return {module:model/Classifications} The populated Classifications instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public static constructFromObject(data: any, obj?: Classifications) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new Classifications();
if (data.hasOwnProperty('Binding')) {
- obj['Binding'] = SingleStringValuedAttribute.constructFromObject(data['Binding']);
+ obj.Binding = SingleStringValuedAttribute.constructFromObject(data['Binding']);
}
if (data.hasOwnProperty('ProductGroup')) {
- obj['ProductGroup'] = SingleStringValuedAttribute.constructFromObject(data['ProductGroup']);
+ obj.ProductGroup = SingleStringValuedAttribute.constructFromObject(data['ProductGroup']);
}
}
return obj;
}
-
- /**
- * @member {module:model/SingleStringValuedAttribute} Binding
- */
- exports.prototype['Binding'] = undefined;
- /**
- * @member {module:model/SingleStringValuedAttribute} ProductGroup
- */
- exports.prototype['ProductGroup'] = undefined;
-
-
-
- return exports;
-}));
-
-
+};
diff --git a/src/model/Condition.js b/src/model/Condition.js
deleted file mode 100644
index 2737732..0000000
--- a/src/model/Condition.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
- /**
- * ProductAdvertisingAPI
- * https://webservices.amazon.com/paapi5/documentation/index.html
- *
- */
-
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.Condition = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
- /**
- * Enum class Condition.
- * @enum {}
- * @readonly
- */
- var exports = {
- /**
- * value: "Any"
- * @const
- */
- "Any": "Any",
- /**
- * value: "Collectible"
- * @const
- */
- "Collectible": "Collectible",
- /**
- * value: "New"
- * @const
- */
- "New": "New",
- /**
- * value: "Refurbished"
- * @const
- */
- "Refurbished": "Refurbished",
- /**
- * value: "Used"
- * @const
- */
- "Used": "Used" };
-
- /**
- * Returns a Condition enum value from a Javascript object name.
- * @param {Object} data The plain JavaScript object containing the name of the enum value.
- * @return {module:model/Condition} The enum Condition value.
- */
- exports.constructFromObject = function(object) {
- return object;
- }
-
- return exports;
-}));
-
-
diff --git a/src/model/Condition.ts b/src/model/Condition.ts
new file mode 100644
index 0000000..a624147
--- /dev/null
+++ b/src/model/Condition.ts
@@ -0,0 +1,89 @@
+/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+/**
+ * ProductAdvertisingAPI
+ * https://webservices.amazon.com/paapi5/documentation/index.html
+ *
+ */
+
+export const enum ConditionValue {
+ /**
+ * value: "Any"
+ * @const
+ */
+ Any = "Any",
+ /**
+ * value: "Collectible"
+ * @const
+ */
+ Collectible = "Collectible",
+ /**
+ * value: "New"
+ * @const
+ */
+ New = "New",
+ /**
+ * value: "Refurbished"
+ * @const
+ */
+ Refurbished = "Refurbished",
+ /**
+ * value: "Used"
+ * @const
+ */
+ Used = "Used",
+}
+
+/**
+ * Enum class Condition.
+ * @enum {}
+ * @readonly
+ */
+export class Condition extends String {
+ /**
+ * value: "Any"
+ * @const
+ */
+ public static get Any() { return ConditionValue.Any; }
+ /**
+ * value: "Collectible"
+ * @const
+ */
+ public static get Collectible() { return ConditionValue.Collectible; }
+ /**
+ * value: "New"
+ * @const
+ */
+ public static get New() { return ConditionValue.New; }
+ /**
+ * value: "Refurbished"
+ * @const
+ */
+ public static get Refurbished() { return ConditionValue.Refurbished; }
+ /**
+ * value: "Used"
+ * @const
+ */
+ public static get Used() { return ConditionValue.Used; }
+ /**
+ * Returns a Condition enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/Condition} The enum Condition value.
+ */
+ public static constructFromObject = function(object: Condition|ConditionValue|string) { return object; }
+};
diff --git a/src/model/ContentInfo.js b/src/model/ContentInfo.ts
similarity index 98%
rename from src/model/ContentInfo.js
rename to src/model/ContentInfo.ts
index 89aebfd..aa63631 100644
--- a/src/model/ContentInfo.js
+++ b/src/model/ContentInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ContentRating.js b/src/model/ContentRating.ts
similarity index 97%
rename from src/model/ContentRating.js
rename to src/model/ContentRating.ts
index 1d2f130..c547549 100644
--- a/src/model/ContentRating.js
+++ b/src/model/ContentRating.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Contributor.js b/src/model/Contributor.ts
similarity index 51%
rename from src/model/Contributor.js
rename to src/model/Contributor.ts
index 615e12c..a5d5ef2 100644
--- a/src/model/Contributor.js
+++ b/src/model/Contributor.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -19,45 +21,36 @@
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.Contributor = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
+/**
+ * The Contributor model module.
+ * @module model/Contributor
+ * @version 1.0.0
+ */
+import { ApiClient } from "../ApiClient";
+/**
+ * Constructs a new Contributor.
+ * @alias module:model/Contributor
+ * @class
+ */
+export class Contributor {
/**
- * The Contributor model module.
- * @module model/Contributor
- * @version 1.0.0
+ * @member {String} Locale
*/
-
+ public Locale?: string;
/**
- * Constructs a new Contributor.
- * @alias module:model/Contributor
- * @class
+ * @member {String} Name
*/
- var exports = function() {
- var _this = this;
-
-
-
-
-
- };
+ public Name?: string;
+ /**
+ * @member {String} Role
+ */
+ public Role?: string;
+ /**
+ * @member {String} RoleType
+ */
+ public RoleType?: string;
/**
* Constructs a Contributor from a plain JavaScript object, optionally creating a new instance.
@@ -66,46 +59,23 @@
* @param {module:model/Contributor} obj Optional instance to populate.
* @return {module:model/Contributor} The populated Contributor instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public static constructFromObject(data: any, obj?: Contributor) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new Contributor();
if (data.hasOwnProperty('Locale')) {
- obj['Locale'] = ApiClient.convertToType(data['Locale'], 'String');
+ obj.Locale = ApiClient.convertToType(data['Locale'], 'String');
}
if (data.hasOwnProperty('Name')) {
- obj['Name'] = ApiClient.convertToType(data['Name'], 'String');
+ obj.Name = ApiClient.convertToType(data['Name'], 'String');
}
if (data.hasOwnProperty('Role')) {
- obj['Role'] = ApiClient.convertToType(data['Role'], 'String');
+ obj.Role = ApiClient.convertToType(data['Role'], 'String');
}
if (data.hasOwnProperty('RoleType')) {
- obj['RoleType'] = ApiClient.convertToType(data['RoleType'], 'String');
+ obj.RoleType = ApiClient.convertToType(data['RoleType'], 'String');
}
}
return obj;
}
-
- /**
- * @member {String} Locale
- */
- exports.prototype['Locale'] = undefined;
- /**
- * @member {String} Name
- */
- exports.prototype['Name'] = undefined;
- /**
- * @member {String} Role
- */
- exports.prototype['Role'] = undefined;
- /**
- * @member {String} RoleType
- */
- exports.prototype['RoleType'] = undefined;
-
-
-
- return exports;
-}));
-
-
+}
diff --git a/src/model/CustomerReviews.js b/src/model/CustomerReviews.ts
similarity index 98%
rename from src/model/CustomerReviews.js
rename to src/model/CustomerReviews.ts
index efa6459..fe17a0e 100644
--- a/src/model/CustomerReviews.js
+++ b/src/model/CustomerReviews.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/DeliveryFlag.js b/src/model/DeliveryFlag.ts
similarity index 97%
rename from src/model/DeliveryFlag.js
rename to src/model/DeliveryFlag.ts
index 8e6d843..005acd2 100644
--- a/src/model/DeliveryFlag.js
+++ b/src/model/DeliveryFlag.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/DimensionBasedAttribute.js b/src/model/DimensionBasedAttribute.ts
similarity index 98%
rename from src/model/DimensionBasedAttribute.js
rename to src/model/DimensionBasedAttribute.ts
index 3497650..04dc7a1 100644
--- a/src/model/DimensionBasedAttribute.js
+++ b/src/model/DimensionBasedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/DurationPrice.js b/src/model/DurationPrice.ts
similarity index 98%
rename from src/model/DurationPrice.js
rename to src/model/DurationPrice.ts
index 120f60a..0bf0e42 100644
--- a/src/model/DurationPrice.js
+++ b/src/model/DurationPrice.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ErrorData.js b/src/model/ErrorData.ts
similarity index 97%
rename from src/model/ErrorData.js
rename to src/model/ErrorData.ts
index f39015f..16d3096 100644
--- a/src/model/ErrorData.js
+++ b/src/model/ErrorData.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ExternalIds.js b/src/model/ExternalIds.ts
similarity index 98%
rename from src/model/ExternalIds.js
rename to src/model/ExternalIds.ts
index 8dd3beb..e43a48b 100644
--- a/src/model/ExternalIds.js
+++ b/src/model/ExternalIds.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetBrowseNodesRequest.js b/src/model/GetBrowseNodesRequest.ts
similarity index 98%
rename from src/model/GetBrowseNodesRequest.js
rename to src/model/GetBrowseNodesRequest.ts
index 26897cf..4e2de03 100644
--- a/src/model/GetBrowseNodesRequest.js
+++ b/src/model/GetBrowseNodesRequest.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetBrowseNodesResource.js b/src/model/GetBrowseNodesResource.ts
similarity index 97%
rename from src/model/GetBrowseNodesResource.js
rename to src/model/GetBrowseNodesResource.ts
index 4e65b10..b2d6ff7 100644
--- a/src/model/GetBrowseNodesResource.js
+++ b/src/model/GetBrowseNodesResource.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetBrowseNodesResponse.js b/src/model/GetBrowseNodesResponse.ts
similarity index 98%
rename from src/model/GetBrowseNodesResponse.js
rename to src/model/GetBrowseNodesResponse.ts
index afbd6f0..3b04e3c 100644
--- a/src/model/GetBrowseNodesResponse.js
+++ b/src/model/GetBrowseNodesResponse.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetItemsRequest.js b/src/model/GetItemsRequest.ts
similarity index 99%
rename from src/model/GetItemsRequest.js
rename to src/model/GetItemsRequest.ts
index e3c976d..2e9097b 100644
--- a/src/model/GetItemsRequest.js
+++ b/src/model/GetItemsRequest.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetItemsResource.js b/src/model/GetItemsResource.ts
similarity index 99%
rename from src/model/GetItemsResource.js
rename to src/model/GetItemsResource.ts
index ac8c4af..e607eac 100644
--- a/src/model/GetItemsResource.js
+++ b/src/model/GetItemsResource.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetItemsResponse.js b/src/model/GetItemsResponse.ts
similarity index 98%
rename from src/model/GetItemsResponse.js
rename to src/model/GetItemsResponse.ts
index 50eae7c..3460e3e 100644
--- a/src/model/GetItemsResponse.js
+++ b/src/model/GetItemsResponse.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetVariationsRequest.js b/src/model/GetVariationsRequest.ts
similarity index 99%
rename from src/model/GetVariationsRequest.js
rename to src/model/GetVariationsRequest.ts
index bd2ca34..fc94c25 100644
--- a/src/model/GetVariationsRequest.js
+++ b/src/model/GetVariationsRequest.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetVariationsResource.js b/src/model/GetVariationsResource.ts
similarity index 99%
rename from src/model/GetVariationsResource.js
rename to src/model/GetVariationsResource.ts
index 311d91a..1520c16 100644
--- a/src/model/GetVariationsResource.js
+++ b/src/model/GetVariationsResource.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/GetVariationsResponse.js b/src/model/GetVariationsResponse.ts
similarity index 98%
rename from src/model/GetVariationsResponse.js
rename to src/model/GetVariationsResponse.ts
index 2b638e9..f6f3124 100644
--- a/src/model/GetVariationsResponse.js
+++ b/src/model/GetVariationsResponse.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ImageSize.js b/src/model/ImageSize.ts
similarity index 98%
rename from src/model/ImageSize.js
rename to src/model/ImageSize.ts
index f9ec6c6..5c7ab10 100644
--- a/src/model/ImageSize.js
+++ b/src/model/ImageSize.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ImageType.js b/src/model/ImageType.ts
similarity index 98%
rename from src/model/ImageType.js
rename to src/model/ImageType.ts
index b8da3dd..e66f3a9 100644
--- a/src/model/ImageType.js
+++ b/src/model/ImageType.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Images.js b/src/model/Images.ts
similarity index 97%
rename from src/model/Images.js
rename to src/model/Images.ts
index 6e545c9..cd95e26 100644
--- a/src/model/Images.js
+++ b/src/model/Images.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Item.js b/src/model/Item.ts
similarity index 98%
rename from src/model/Item.js
rename to src/model/Item.ts
index 6a7de7e..d944147 100644
--- a/src/model/Item.js
+++ b/src/model/Item.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ItemIdType.js b/src/model/ItemIdType.ts
similarity index 97%
rename from src/model/ItemIdType.js
rename to src/model/ItemIdType.ts
index 91442eb..065e1cd 100644
--- a/src/model/ItemIdType.js
+++ b/src/model/ItemIdType.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ItemInfo.js b/src/model/ItemInfo.ts
similarity index 99%
rename from src/model/ItemInfo.js
rename to src/model/ItemInfo.ts
index 9444e13..23e3609 100644
--- a/src/model/ItemInfo.js
+++ b/src/model/ItemInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ItemsResult.js b/src/model/ItemsResult.ts
similarity index 97%
rename from src/model/ItemsResult.js
rename to src/model/ItemsResult.ts
index 64f0bee..80e22e0 100644
--- a/src/model/ItemsResult.js
+++ b/src/model/ItemsResult.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/LanguageType.js b/src/model/LanguageType.ts
similarity index 97%
rename from src/model/LanguageType.js
rename to src/model/LanguageType.ts
index 90e1a33..de27180 100644
--- a/src/model/LanguageType.js
+++ b/src/model/LanguageType.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Languages.js b/src/model/Languages.ts
similarity index 98%
rename from src/model/Languages.js
rename to src/model/Languages.ts
index b4b6f77..b30b67c 100644
--- a/src/model/Languages.js
+++ b/src/model/Languages.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ManufactureInfo.js b/src/model/ManufactureInfo.ts
similarity index 98%
rename from src/model/ManufactureInfo.js
rename to src/model/ManufactureInfo.ts
index 460b39b..c2f4a39 100644
--- a/src/model/ManufactureInfo.js
+++ b/src/model/ManufactureInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/MaxPrice.js b/src/model/MaxPrice.ts
similarity index 97%
rename from src/model/MaxPrice.js
rename to src/model/MaxPrice.ts
index dfeb99a..d523c02 100644
--- a/src/model/MaxPrice.js
+++ b/src/model/MaxPrice.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Merchant.js b/src/model/Merchant.ts
similarity index 97%
rename from src/model/Merchant.js
rename to src/model/Merchant.ts
index 0795b3e..4842697 100644
--- a/src/model/Merchant.js
+++ b/src/model/Merchant.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/MinPrice.js b/src/model/MinPrice.ts
similarity index 97%
rename from src/model/MinPrice.js
rename to src/model/MinPrice.ts
index e5b8b24..7c04803 100644
--- a/src/model/MinPrice.js
+++ b/src/model/MinPrice.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/MinReviewsRating.js b/src/model/MinReviewsRating.ts
similarity index 97%
rename from src/model/MinReviewsRating.js
rename to src/model/MinReviewsRating.ts
index 10e09c8..8985ce7 100644
--- a/src/model/MinReviewsRating.js
+++ b/src/model/MinReviewsRating.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/MinSavingPercent.js b/src/model/MinSavingPercent.ts
similarity index 97%
rename from src/model/MinSavingPercent.js
rename to src/model/MinSavingPercent.ts
index b53a04e..7272a4f 100644
--- a/src/model/MinSavingPercent.js
+++ b/src/model/MinSavingPercent.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/MultiValuedAttribute.js b/src/model/MultiValuedAttribute.ts
similarity index 98%
rename from src/model/MultiValuedAttribute.js
rename to src/model/MultiValuedAttribute.ts
index 3457fe0..51c70a9 100644
--- a/src/model/MultiValuedAttribute.js
+++ b/src/model/MultiValuedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferAvailability.js b/src/model/OfferAvailability.ts
similarity index 98%
rename from src/model/OfferAvailability.js
rename to src/model/OfferAvailability.ts
index 191beb6..81ac273 100644
--- a/src/model/OfferAvailability.js
+++ b/src/model/OfferAvailability.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferCondition.js b/src/model/OfferCondition.ts
similarity index 98%
rename from src/model/OfferCondition.js
rename to src/model/OfferCondition.ts
index f30709e..f2f6c21 100644
--- a/src/model/OfferCondition.js
+++ b/src/model/OfferCondition.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferConditionNote.js b/src/model/OfferConditionNote.ts
similarity index 97%
rename from src/model/OfferConditionNote.js
rename to src/model/OfferConditionNote.ts
index 109c33d..be468b1 100644
--- a/src/model/OfferConditionNote.js
+++ b/src/model/OfferConditionNote.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferCount.js b/src/model/OfferCount.ts
similarity index 97%
rename from src/model/OfferCount.js
rename to src/model/OfferCount.ts
index f90d34f..1df7ee9 100644
--- a/src/model/OfferCount.js
+++ b/src/model/OfferCount.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferDeliveryInfo.js b/src/model/OfferDeliveryInfo.ts
similarity index 98%
rename from src/model/OfferDeliveryInfo.js
rename to src/model/OfferDeliveryInfo.ts
index cce4a60..2821cf9 100644
--- a/src/model/OfferDeliveryInfo.js
+++ b/src/model/OfferDeliveryInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferListing.js b/src/model/OfferListing.ts
similarity index 99%
rename from src/model/OfferListing.js
rename to src/model/OfferListing.ts
index 50bf770..0dfd60d 100644
--- a/src/model/OfferListing.js
+++ b/src/model/OfferListing.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferLoyaltyPoints.js b/src/model/OfferLoyaltyPoints.ts
similarity index 97%
rename from src/model/OfferLoyaltyPoints.js
rename to src/model/OfferLoyaltyPoints.ts
index 795300a..e66c304 100644
--- a/src/model/OfferLoyaltyPoints.js
+++ b/src/model/OfferLoyaltyPoints.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferMerchantInfo.js b/src/model/OfferMerchantInfo.ts
similarity index 98%
rename from src/model/OfferMerchantInfo.js
rename to src/model/OfferMerchantInfo.ts
index fee3aa8..b38fb76 100644
--- a/src/model/OfferMerchantInfo.js
+++ b/src/model/OfferMerchantInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferPrice.js b/src/model/OfferPrice.ts
similarity index 95%
rename from src/model/OfferPrice.js
rename to src/model/OfferPrice.ts
index 14d1cd6..83716c5 100644
--- a/src/model/OfferPrice.js
+++ b/src/model/OfferPrice.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -39,11 +41,13 @@
- /**
- * The OfferPrice model module.
- * @module model/OfferPrice
- * @version 1.0.0
- */
+/**
+ * The OfferPrice model module.
+ * @module model/OfferPrice
+ * @version 1.0.0
+ */
+
+import { ApiClient } from '../ApiClient';
/**
* Constructs a new OfferPrice.
diff --git a/src/model/OfferProgramEligibility.js b/src/model/OfferProgramEligibility.ts
similarity index 98%
rename from src/model/OfferProgramEligibility.js
rename to src/model/OfferProgramEligibility.ts
index aee2ee2..64f0689 100644
--- a/src/model/OfferProgramEligibility.js
+++ b/src/model/OfferProgramEligibility.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferPromotion.js b/src/model/OfferPromotion.ts
similarity index 98%
rename from src/model/OfferPromotion.js
rename to src/model/OfferPromotion.ts
index 70e7572..4429cb8 100644
--- a/src/model/OfferPromotion.js
+++ b/src/model/OfferPromotion.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferSavings.js b/src/model/OfferSavings.ts
similarity index 50%
rename from src/model/OfferSavings.js
rename to src/model/OfferSavings.ts
index 5880396..8c558e6 100644
--- a/src/model/OfferSavings.js
+++ b/src/model/OfferSavings.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -19,46 +21,40 @@
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.OfferSavings = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
+/**
+ * The OfferSavings model module.
+ * @module model/OfferSavings
+ * @version 1.0.0
+ */
+import { ApiClient } from "../ApiClient";
+/**
+ * Constructs a new OfferSavings.
+ * @alias module:model/OfferSavings
+ * @class
+ */
+export class OfferSavings {
/**
- * The OfferSavings model module.
- * @module model/OfferSavings
- * @version 1.0.0
+ * @member {Number} Amount
*/
-
+ public Amount?: number;
/**
- * Constructs a new OfferSavings.
- * @alias module:model/OfferSavings
- * @class
+ * @member {String} Currency
*/
- var exports = function() {
- var _this = this;
-
-
-
-
-
-
- };
+ public Currency?: string;
+ /**
+ * @member {String} DisplayAmount
+ */
+ public DisplayAmount?: string;
+ /**
+ * @member {Number} Percentage
+ */
+ public Percentage?: number;
+ /**
+ * @member {Number} PricePerUnit
+ */
+ public PricePerUnit?: number;
/**
* Constructs a OfferSavings from a plain JavaScript object, optionally creating a new instance.
@@ -67,53 +63,26 @@
* @param {module:model/OfferSavings} obj Optional instance to populate.
* @return {module:model/OfferSavings} The populated OfferSavings instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public static constructFromObject(data: any, obj?: OfferSavings) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new OfferSavings();
if (data.hasOwnProperty('Amount')) {
- obj['Amount'] = ApiClient.convertToType(data['Amount'], 'Number');
+ obj.Amount = ApiClient.convertToType(data['Amount'], 'Number');
}
if (data.hasOwnProperty('Currency')) {
- obj['Currency'] = ApiClient.convertToType(data['Currency'], 'String');
+ obj.Currency = ApiClient.convertToType(data['Currency'], 'String');
}
if (data.hasOwnProperty('DisplayAmount')) {
- obj['DisplayAmount'] = ApiClient.convertToType(data['DisplayAmount'], 'String');
+ obj.DisplayAmount = ApiClient.convertToType(data['DisplayAmount'], 'String');
}
if (data.hasOwnProperty('Percentage')) {
- obj['Percentage'] = ApiClient.convertToType(data['Percentage'], 'Number');
+ obj.Percentage = ApiClient.convertToType(data['Percentage'], 'Number');
}
if (data.hasOwnProperty('PricePerUnit')) {
- obj['PricePerUnit'] = ApiClient.convertToType(data['PricePerUnit'], 'Number');
+ obj.PricePerUnit = ApiClient.convertToType(data['PricePerUnit'], 'Number');
}
}
return obj;
}
-
- /**
- * @member {Number} Amount
- */
- exports.prototype['Amount'] = undefined;
- /**
- * @member {String} Currency
- */
- exports.prototype['Currency'] = undefined;
- /**
- * @member {String} DisplayAmount
- */
- exports.prototype['DisplayAmount'] = undefined;
- /**
- * @member {Number} Percentage
- */
- exports.prototype['Percentage'] = undefined;
- /**
- * @member {Number} PricePerUnit
- */
- exports.prototype['PricePerUnit'] = undefined;
-
-
-
- return exports;
-}));
-
-
+};
diff --git a/src/model/OfferShippingCharge.js b/src/model/OfferShippingCharge.ts
similarity index 98%
rename from src/model/OfferShippingCharge.js
rename to src/model/OfferShippingCharge.ts
index f68f008..e8934dd 100644
--- a/src/model/OfferShippingCharge.js
+++ b/src/model/OfferShippingCharge.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferSubCondition.js b/src/model/OfferSubCondition.ts
similarity index 98%
rename from src/model/OfferSubCondition.js
rename to src/model/OfferSubCondition.ts
index 5583c2a..69efd51 100644
--- a/src/model/OfferSubCondition.js
+++ b/src/model/OfferSubCondition.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/OfferSummary.js b/src/model/OfferSummary.ts
similarity index 98%
rename from src/model/OfferSummary.js
rename to src/model/OfferSummary.ts
index c99284c..738a270 100644
--- a/src/model/OfferSummary.js
+++ b/src/model/OfferSummary.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Offers.js b/src/model/Offers.ts
similarity index 98%
rename from src/model/Offers.js
rename to src/model/Offers.ts
index a24f9f2..a5fcc73 100644
--- a/src/model/Offers.js
+++ b/src/model/Offers.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/PartnerType.js b/src/model/PartnerType.ts
similarity index 97%
rename from src/model/PartnerType.js
rename to src/model/PartnerType.ts
index 0077984..c9fca93 100644
--- a/src/model/PartnerType.js
+++ b/src/model/PartnerType.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Price.js b/src/model/Price.ts
similarity index 98%
rename from src/model/Price.js
rename to src/model/Price.ts
index 46ecd0f..dffa294 100644
--- a/src/model/Price.js
+++ b/src/model/Price.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/PriceType.js b/src/model/PriceType.js
deleted file mode 100644
index fbcac64..0000000
--- a/src/model/PriceType.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License.
- * A copy of the License is located at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * or in the "license" file accompanying this file. This file is distributed
- * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- * express or implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
- /**
- * ProductAdvertisingAPI
- * https://webservices.amazon.com/paapi5/documentation/index.html
- *
- */
-
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.PriceType = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
- /**
- * Enum class PriceType.
- * @enum {}
- * @readonly
- */
- var exports = {
- /**
- * value: "LIST_PRICE"
- * @const
- */
- "LIST_PRICE": "LIST_PRICE",
- /**
- * value: "LOWEST_PRICE"
- * @const
- */
- "LOWEST_PRICE": "LOWEST_PRICE",
- /**
- * value: "LOWEST_PRICE_STRIKETHROUGH"
- * @const
- */
- "LOWEST_PRICE_STRIKETHROUGH": "LOWEST_PRICE_STRIKETHROUGH",
- /**
- * value: "WAS_PRICE"
- * @const
- */
- "WAS_PRICE": "WAS_PRICE" };
-
- /**
- * Returns a PriceType enum value from a Javascript object name.
- * @param {Object} data The plain JavaScript object containing the name of the enum value.
- * @return {module:model/PriceType} The enum PriceType value.
- */
- exports.constructFromObject = function(object) {
- return object;
- }
-
- return exports;
-}));
-
-
diff --git a/src/model/PriceType.ts b/src/model/PriceType.ts
new file mode 100644
index 0000000..6587e55
--- /dev/null
+++ b/src/model/PriceType.ts
@@ -0,0 +1,81 @@
+/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
+ * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License").
+ * You may not use this file except in compliance with the License.
+ * A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed
+ * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ * express or implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+ /**
+ * ProductAdvertisingAPI
+ * https://webservices.amazon.com/paapi5/documentation/index.html
+ *
+ */
+
+/**
+ * Enum class PriceType.
+ * @enum {}
+ * @readonly
+ */
+export const enum PriceTypeValue {
+ /**
+ * value: "LIST_PRICE"
+ * @const
+ */
+ LIST_PRICE = "LIST_PRICE",
+ /**
+ * value: "LOWEST_PRICE"
+ * @const
+ */
+ LOWEST_PRICE = "LOWEST_PRICE",
+ /**
+ * value: "LOWEST_PRICE_STRIKETHROUGH"
+ * @const
+ */
+ LOWEST_PRICE_STRIKETHROUGH = "LOWEST_PRICE_STRIKETHROUGH",
+ /**
+ * value: "WAS_PRICE"
+ * @const
+ */
+ WAS_PRICE = "WAS_PRICE"
+};
+
+export class PriceType extends String {
+ /**
+ * value: "LIST_PRICE"
+ * @const
+ */
+ public static get LIST_PRICE() { return PriceTypeValue.LIST_PRICE; }
+ /**
+ * value: "LOWEST_PRICE"
+ * @const
+ */
+ public static get LOWEST_PRICE() { return PriceTypeValue.LOWEST_PRICE; }
+ /**
+ * value: "LOWEST_PRICE_STRIKETHROUGH"
+ * @const
+ */
+ public static get LOWEST_PRICE_STRIKETHROUGH() { return PriceTypeValue.LOWEST_PRICE_STRIKETHROUGH; }
+ /**
+ * value: "WAS_PRICE"
+ * @const
+ */
+ public static get WAS_PRICE() { return PriceType.WAS_PRICE; }
+ /**
+ * Returns a PriceType enum value from a Javascript object name.
+ * @param {Object} data The plain JavaScript object containing the name of the enum value.
+ * @return {module:model/PriceType} The enum PriceType value.
+ */
+ public static constructFromObject(object: PriceType|PriceTypeValue|string) {
+ return object;
+ }
+};
diff --git a/src/model/ProductAdvertisingAPIClientException.js b/src/model/ProductAdvertisingAPIClientException.ts
similarity index 98%
rename from src/model/ProductAdvertisingAPIClientException.js
rename to src/model/ProductAdvertisingAPIClientException.ts
index 4ea4027..a296d20 100644
--- a/src/model/ProductAdvertisingAPIClientException.js
+++ b/src/model/ProductAdvertisingAPIClientException.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ProductAdvertisingAPIServiceException.js b/src/model/ProductAdvertisingAPIServiceException.ts
similarity index 97%
rename from src/model/ProductAdvertisingAPIServiceException.js
rename to src/model/ProductAdvertisingAPIServiceException.ts
index 3b1abbd..958f9d1 100644
--- a/src/model/ProductAdvertisingAPIServiceException.js
+++ b/src/model/ProductAdvertisingAPIServiceException.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/ProductInfo.js b/src/model/ProductInfo.ts
similarity index 98%
rename from src/model/ProductInfo.js
rename to src/model/ProductInfo.ts
index 719aa0d..6ad506d 100644
--- a/src/model/ProductInfo.js
+++ b/src/model/ProductInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Properties.js b/src/model/Properties.ts
similarity index 97%
rename from src/model/Properties.js
rename to src/model/Properties.ts
index c0d844c..48f0857 100644
--- a/src/model/Properties.js
+++ b/src/model/Properties.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Rating.js b/src/model/Rating.ts
similarity index 97%
rename from src/model/Rating.js
rename to src/model/Rating.ts
index 82faf6e..5d16fe0 100644
--- a/src/model/Rating.js
+++ b/src/model/Rating.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/Refinement.js b/src/model/Refinement.ts
similarity index 98%
rename from src/model/Refinement.js
rename to src/model/Refinement.ts
index 44febc6..72368fa 100644
--- a/src/model/Refinement.js
+++ b/src/model/Refinement.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/RefinementBin.js b/src/model/RefinementBin.ts
similarity index 97%
rename from src/model/RefinementBin.js
rename to src/model/RefinementBin.ts
index ebb0573..935a25f 100644
--- a/src/model/RefinementBin.js
+++ b/src/model/RefinementBin.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/RentalOfferListing.js b/src/model/RentalOfferListing.ts
similarity index 98%
rename from src/model/RentalOfferListing.js
rename to src/model/RentalOfferListing.ts
index 71e948e..05b4e60 100644
--- a/src/model/RentalOfferListing.js
+++ b/src/model/RentalOfferListing.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/RentalOffers.js b/src/model/RentalOffers.ts
similarity index 97%
rename from src/model/RentalOffers.js
rename to src/model/RentalOffers.ts
index 2856276..b5de45f 100644
--- a/src/model/RentalOffers.js
+++ b/src/model/RentalOffers.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SearchItemsRequest.js b/src/model/SearchItemsRequest.ts
similarity index 99%
rename from src/model/SearchItemsRequest.js
rename to src/model/SearchItemsRequest.ts
index 1e2a410..7b29608 100644
--- a/src/model/SearchItemsRequest.js
+++ b/src/model/SearchItemsRequest.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SearchItemsResource.js b/src/model/SearchItemsResource.ts
similarity index 99%
rename from src/model/SearchItemsResource.js
rename to src/model/SearchItemsResource.ts
index 685328f..4d24f54 100644
--- a/src/model/SearchItemsResource.js
+++ b/src/model/SearchItemsResource.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SearchItemsResponse.js b/src/model/SearchItemsResponse.ts
similarity index 98%
rename from src/model/SearchItemsResponse.js
rename to src/model/SearchItemsResponse.ts
index 0f0c1a3..94f588d 100644
--- a/src/model/SearchItemsResponse.js
+++ b/src/model/SearchItemsResponse.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SearchRefinements.js b/src/model/SearchRefinements.ts
similarity index 98%
rename from src/model/SearchRefinements.js
rename to src/model/SearchRefinements.ts
index 5428032..cbe86a3 100644
--- a/src/model/SearchRefinements.js
+++ b/src/model/SearchRefinements.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SearchResult.js b/src/model/SearchResult.ts
similarity index 98%
rename from src/model/SearchResult.js
rename to src/model/SearchResult.ts
index 5baf6c2..1993047 100644
--- a/src/model/SearchResult.js
+++ b/src/model/SearchResult.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/SingleBooleanValuedAttribute.js b/src/model/SingleBooleanValuedAttribute.ts
similarity index 51%
rename from src/model/SingleBooleanValuedAttribute.js
rename to src/model/SingleBooleanValuedAttribute.ts
index 4136fb3..78f8fb4 100644
--- a/src/model/SingleBooleanValuedAttribute.js
+++ b/src/model/SingleBooleanValuedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -19,44 +21,32 @@
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.SingleBooleanValuedAttribute = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
+import { ApiClient } from "../ApiClient";
+/**
+ * The SingleBooleanValuedAttribute model module.
+ * @module model/SingleBooleanValuedAttribute
+ * @version 1.0.0
+ */
+/**
+ * Constructs a new SingleBooleanValuedAttribute.
+ * @alias module:model/SingleBooleanValuedAttribute
+ * @class
+ */
+export class SingleBooleanValuedAttribute {
/**
- * The SingleBooleanValuedAttribute model module.
- * @module model/SingleBooleanValuedAttribute
- * @version 1.0.0
+ * @member {Boolean} DisplayValue
*/
-
+ public DisplayValue?: boolean;
/**
- * Constructs a new SingleBooleanValuedAttribute.
- * @alias module:model/SingleBooleanValuedAttribute
- * @class
+ * @member {String} Label
*/
- var exports = function() {
- var _this = this;
-
-
-
-
- };
+ public Label?: string;
+ /**
+ * @member {String} Locale
+ */
+ public Locale?: string;
/**
* Constructs a SingleBooleanValuedAttribute from a plain JavaScript object, optionally creating a new instance.
@@ -65,39 +55,20 @@
* @param {module:model/SingleBooleanValuedAttribute} obj Optional instance to populate.
* @return {module:model/SingleBooleanValuedAttribute} The populated SingleBooleanValuedAttribute instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public constructFromObject(data: any, obj?: SingleBooleanValuedAttribute) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new SingleBooleanValuedAttribute();
if (data.hasOwnProperty('DisplayValue')) {
- obj['DisplayValue'] = ApiClient.convertToType(data['DisplayValue'], 'Boolean');
+ obj.DisplayValue = ApiClient.convertToType(data['DisplayValue'], 'Boolean');
}
if (data.hasOwnProperty('Label')) {
- obj['Label'] = ApiClient.convertToType(data['Label'], 'String');
+ obj.Label = ApiClient.convertToType(data['Label'], 'String');
}
if (data.hasOwnProperty('Locale')) {
- obj['Locale'] = ApiClient.convertToType(data['Locale'], 'String');
+ obj.Locale = ApiClient.convertToType(data['Locale'], 'String');
}
}
return obj;
}
-
- /**
- * @member {Boolean} DisplayValue
- */
- exports.prototype['DisplayValue'] = undefined;
- /**
- * @member {String} Label
- */
- exports.prototype['Label'] = undefined;
- /**
- * @member {String} Locale
- */
- exports.prototype['Locale'] = undefined;
-
-
-
- return exports;
-}));
-
-
+}
diff --git a/src/model/SingleIntegerValuedAttribute.js b/src/model/SingleIntegerValuedAttribute.ts
similarity index 51%
rename from src/model/SingleIntegerValuedAttribute.js
rename to src/model/SingleIntegerValuedAttribute.ts
index 67e2880..3900b06 100644
--- a/src/model/SingleIntegerValuedAttribute.js
+++ b/src/model/SingleIntegerValuedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -19,44 +21,32 @@
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.SingleIntegerValuedAttribute = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
+import { ApiClient } from "../ApiClient";
+/**
+ * The SingleIntegerValuedAttribute model module.
+ * @module model/SingleIntegerValuedAttribute
+ * @version 1.0.0
+ */
+/**
+ * Constructs a new SingleIntegerValuedAttribute.
+ * @alias module:model/SingleIntegerValuedAttribute
+ * @class
+ */
+export class SingleIntegerValuedAttribute {
/**
- * The SingleIntegerValuedAttribute model module.
- * @module model/SingleIntegerValuedAttribute
- * @version 1.0.0
+ * @member {Number} DisplayValue
*/
-
+ public DisplayValue?: number;
/**
- * Constructs a new SingleIntegerValuedAttribute.
- * @alias module:model/SingleIntegerValuedAttribute
- * @class
+ * @member {String} Label
*/
- var exports = function() {
- var _this = this;
-
-
-
-
- };
+ public Label?: string;
+ /**
+ * @member {String} Locale
+ */
+ public Locale?: string;
/**
* Constructs a SingleIntegerValuedAttribute from a plain JavaScript object, optionally creating a new instance.
@@ -65,39 +55,20 @@
* @param {module:model/SingleIntegerValuedAttribute} obj Optional instance to populate.
* @return {module:model/SingleIntegerValuedAttribute} The populated SingleIntegerValuedAttribute instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public static constructFromObject(data: any, obj?: SingleIntegerValuedAttribute) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new SingleIntegerValuedAttribute();
if (data.hasOwnProperty('DisplayValue')) {
- obj['DisplayValue'] = ApiClient.convertToType(data['DisplayValue'], 'Number');
+ obj.DisplayValue = ApiClient.convertToType(data['DisplayValue'], 'Number');
}
if (data.hasOwnProperty('Label')) {
- obj['Label'] = ApiClient.convertToType(data['Label'], 'String');
+ obj.Label = ApiClient.convertToType(data['Label'], 'String');
}
if (data.hasOwnProperty('Locale')) {
- obj['Locale'] = ApiClient.convertToType(data['Locale'], 'String');
+ obj.Locale = ApiClient.convertToType(data['Locale'], 'String');
}
}
return obj;
}
-
- /**
- * @member {Number} DisplayValue
- */
- exports.prototype['DisplayValue'] = undefined;
- /**
- * @member {String} Label
- */
- exports.prototype['Label'] = undefined;
- /**
- * @member {String} Locale
- */
- exports.prototype['Locale'] = undefined;
-
-
-
- return exports;
-}));
-
-
+}
diff --git a/src/model/SingleStringValuedAttribute.js b/src/model/SingleStringValuedAttribute.ts
similarity index 51%
rename from src/model/SingleStringValuedAttribute.js
rename to src/model/SingleStringValuedAttribute.ts
index 1a6c83c..97644b7 100644
--- a/src/model/SingleStringValuedAttribute.js
+++ b/src/model/SingleStringValuedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
@@ -13,50 +15,38 @@
* permissions and limitations under the License.
*/
- /**
+/**
* ProductAdvertisingAPI
* https://webservices.amazon.com/paapi5/documentation/index.html
*
*/
-(function(root, factory) {
- if (typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['ApiClient'], factory);
- } else if (typeof module === 'object' && module.exports) {
- // CommonJS-like environments that support module.exports, like Node.
- module.exports = factory(require('../ApiClient'));
- } else {
- // Browser globals (root is window)
- if (!root.ProductAdvertisingAPIv1) {
- root.ProductAdvertisingAPIv1 = {};
- }
- root.ProductAdvertisingAPIv1.SingleStringValuedAttribute = factory(root.ProductAdvertisingAPIv1.ApiClient);
- }
-}(this, function(ApiClient) {
- 'use strict';
-
-
+import { ApiClient } from "../ApiClient";
+/**
+ * The SingleStringValuedAttribute model module.
+ * @module model/SingleStringValuedAttribute
+ * @version 1.0.0
+ */
+/**
+ * Constructs a new SingleStringValuedAttribute.
+ * @alias module:model/SingleStringValuedAttribute
+ * @class
+ */
+export class SingleStringValuedAttribute {
/**
- * The SingleStringValuedAttribute model module.
- * @module model/SingleStringValuedAttribute
- * @version 1.0.0
+ * @member {String} DisplayValue
*/
-
+ public DisplayValue?: string;
/**
- * Constructs a new SingleStringValuedAttribute.
- * @alias module:model/SingleStringValuedAttribute
- * @class
+ * @member {String} Label
*/
- var exports = function() {
- var _this = this;
-
-
-
-
- };
+ public Label?: string;
+ /**
+ * @member {String} Locale
+ */
+ public Locale?: string;
/**
* Constructs a SingleStringValuedAttribute from a plain JavaScript object, optionally creating a new instance.
@@ -65,39 +55,20 @@
* @param {module:model/SingleStringValuedAttribute} obj Optional instance to populate.
* @return {module:model/SingleStringValuedAttribute} The populated SingleStringValuedAttribute instance.
*/
- exports.constructFromObject = function(data, obj) {
+ public static constructFromObject(data: any, obj?: SingleStringValuedAttribute) {
if (data) {
- obj = obj || new exports();
+ obj = obj || new SingleStringValuedAttribute();
if (data.hasOwnProperty('DisplayValue')) {
- obj['DisplayValue'] = ApiClient.convertToType(data['DisplayValue'], 'String');
+ obj.DisplayValue = ApiClient.convertToType(data['DisplayValue'], 'String');
}
if (data.hasOwnProperty('Label')) {
- obj['Label'] = ApiClient.convertToType(data['Label'], 'String');
+ obj.Label = ApiClient.convertToType(data['Label'], 'String');
}
if (data.hasOwnProperty('Locale')) {
- obj['Locale'] = ApiClient.convertToType(data['Locale'], 'String');
+ obj.Locale = ApiClient.convertToType(data['Locale'], 'String');
}
}
return obj;
}
-
- /**
- * @member {String} DisplayValue
- */
- exports.prototype['DisplayValue'] = undefined;
- /**
- * @member {String} Label
- */
- exports.prototype['Label'] = undefined;
- /**
- * @member {String} Locale
- */
- exports.prototype['Locale'] = undefined;
-
-
-
- return exports;
-}));
-
-
+}
diff --git a/src/model/SortBy.js b/src/model/SortBy.ts
similarity index 97%
rename from src/model/SortBy.js
rename to src/model/SortBy.ts
index d8839ce..1b2499e 100644
--- a/src/model/SortBy.js
+++ b/src/model/SortBy.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/TechnicalInfo.js b/src/model/TechnicalInfo.ts
similarity index 98%
rename from src/model/TechnicalInfo.js
rename to src/model/TechnicalInfo.ts
index 4b0386b..82e6fd5 100644
--- a/src/model/TechnicalInfo.js
+++ b/src/model/TechnicalInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/TradeInInfo.js b/src/model/TradeInInfo.ts
similarity index 98%
rename from src/model/TradeInInfo.js
rename to src/model/TradeInInfo.ts
index 2f00c08..db3b5a3 100644
--- a/src/model/TradeInInfo.js
+++ b/src/model/TradeInInfo.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/TradeInPrice.js b/src/model/TradeInPrice.ts
similarity index 98%
rename from src/model/TradeInPrice.js
rename to src/model/TradeInPrice.ts
index 54f3ba7..ac9e497 100644
--- a/src/model/TradeInPrice.js
+++ b/src/model/TradeInPrice.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/UnitBasedAttribute.js b/src/model/UnitBasedAttribute.ts
similarity index 98%
rename from src/model/UnitBasedAttribute.js
rename to src/model/UnitBasedAttribute.ts
index 9ee24a1..917e721 100644
--- a/src/model/UnitBasedAttribute.js
+++ b/src/model/UnitBasedAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/VariationAttribute.js b/src/model/VariationAttribute.ts
similarity index 97%
rename from src/model/VariationAttribute.js
rename to src/model/VariationAttribute.ts
index ad9658a..3f43e65 100644
--- a/src/model/VariationAttribute.js
+++ b/src/model/VariationAttribute.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/VariationDimension.js b/src/model/VariationDimension.ts
similarity index 98%
rename from src/model/VariationDimension.js
rename to src/model/VariationDimension.ts
index dd04468..261aedb 100644
--- a/src/model/VariationDimension.js
+++ b/src/model/VariationDimension.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/VariationSummary.js b/src/model/VariationSummary.ts
similarity index 98%
rename from src/model/VariationSummary.js
rename to src/model/VariationSummary.ts
index 3b30b28..972cc31 100644
--- a/src/model/VariationSummary.js
+++ b/src/model/VariationSummary.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/VariationsResult.js b/src/model/VariationsResult.ts
similarity index 98%
rename from src/model/VariationsResult.js
rename to src/model/VariationsResult.ts
index 4f0f158..81513f7 100644
--- a/src/model/VariationsResult.js
+++ b/src/model/VariationsResult.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
diff --git a/src/model/WebsiteSalesRank.js b/src/model/WebsiteSalesRank.ts
similarity index 98%
rename from src/model/WebsiteSalesRank.js
rename to src/model/WebsiteSalesRank.ts
index f486f41..9b171b3 100644
--- a/src/model/WebsiteSalesRank.js
+++ b/src/model/WebsiteSalesRank.ts
@@ -1,4 +1,6 @@
/**
+ * Adapted to TypeScript by David A. Ball. (c) 2024.
+ *
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").