amazon-creators-api 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +202 -0
- package/README.md +102 -0
- package/dist/ApiClient.d.ts +273 -0
- package/dist/ApiClient.js +895 -0
- package/dist/api/DefaultApi.d.ts +124 -0
- package/dist/api/DefaultApi.js +409 -0
- package/dist/api/TypedDefaultApi.d.ts +132 -0
- package/dist/api/TypedDefaultApi.js +223 -0
- package/dist/auth/OAuth2Config.d.ts +78 -0
- package/dist/auth/OAuth2Config.js +152 -0
- package/dist/auth/OAuth2TokenManager.d.ts +38 -0
- package/dist/auth/OAuth2TokenManager.js +177 -0
- package/dist/index.d.ts +94 -0
- package/dist/index.js +657 -0
- package/dist/model/AccessDeniedExceptionResponseContent.d.ts +42 -0
- package/dist/model/AccessDeniedExceptionResponseContent.js +139 -0
- package/dist/model/AccessDeniedReason.d.ts +32 -0
- package/dist/model/AccessDeniedReason.js +65 -0
- package/dist/model/Availability.d.ts +27 -0
- package/dist/model/Availability.js +60 -0
- package/dist/model/BrowseNode.d.ts +35 -0
- package/dist/model/BrowseNode.js +184 -0
- package/dist/model/BrowseNodeAncestor.d.ts +32 -0
- package/dist/model/BrowseNodeAncestor.js +129 -0
- package/dist/model/BrowseNodeChild.d.ts +31 -0
- package/dist/model/BrowseNodeChild.js +116 -0
- package/dist/model/BrowseNodeInfo.d.ts +30 -0
- package/dist/model/BrowseNodeInfo.js +128 -0
- package/dist/model/BrowseNodesResult.d.ts +29 -0
- package/dist/model/BrowseNodesResult.js +114 -0
- package/dist/model/ByLineInfo.d.ts +31 -0
- package/dist/model/ByLineInfo.js +141 -0
- package/dist/model/Classifications.d.ts +30 -0
- package/dist/model/Classifications.js +107 -0
- package/dist/model/Condition.d.ts +27 -0
- package/dist/model/Condition.js +60 -0
- package/dist/model/ContentInfo.d.ts +32 -0
- package/dist/model/ContentInfo.js +135 -0
- package/dist/model/ContentRating.d.ts +29 -0
- package/dist/model/ContentRating.js +94 -0
- package/dist/model/Contributor.d.ts +32 -0
- package/dist/model/Contributor.js +128 -0
- package/dist/model/CustomerReviews.d.ts +30 -0
- package/dist/model/CustomerReviews.js +102 -0
- package/dist/model/DealDetails.d.ts +34 -0
- package/dist/model/DealDetails.js +144 -0
- package/dist/model/DeliveryFlag.d.ts +37 -0
- package/dist/model/DeliveryFlag.js +70 -0
- package/dist/model/DimensionBasedAttribute.d.ts +32 -0
- package/dist/model/DimensionBasedAttribute.js +133 -0
- package/dist/model/ErrorData.d.ts +41 -0
- package/dist/model/ErrorData.js +131 -0
- package/dist/model/ExternalIds.d.ts +31 -0
- package/dist/model/ExternalIds.js +120 -0
- package/dist/model/Feed.d.ts +44 -0
- package/dist/model/Feed.js +152 -0
- package/dist/model/GetBrowseNodesRequestContent.d.ts +43 -0
- package/dist/model/GetBrowseNodesRequestContent.js +158 -0
- package/dist/model/GetBrowseNodesResource.d.ts +27 -0
- package/dist/model/GetBrowseNodesResource.js +60 -0
- package/dist/model/GetBrowseNodesResponseContent.d.ts +30 -0
- package/dist/model/GetBrowseNodesResponseContent.js +128 -0
- package/dist/model/GetFeedRequestContent.d.ts +38 -0
- package/dist/model/GetFeedRequestContent.js +114 -0
- package/dist/model/GetFeedResponseContent.d.ts +38 -0
- package/dist/model/GetFeedResponseContent.js +114 -0
- package/dist/model/GetItemsRequestContent.d.ts +45 -0
- package/dist/model/GetItemsRequestContent.js +188 -0
- package/dist/model/GetItemsResource.d.ts +187 -0
- package/dist/model/GetItemsResource.js +220 -0
- package/dist/model/GetItemsResponseContent.d.ts +30 -0
- package/dist/model/GetItemsResponseContent.js +128 -0
- package/dist/model/GetReportRequestContent.d.ts +38 -0
- package/dist/model/GetReportRequestContent.js +114 -0
- package/dist/model/GetReportResponseContent.d.ts +38 -0
- package/dist/model/GetReportResponseContent.js +114 -0
- package/dist/model/GetVariationsRequestContent.d.ts +48 -0
- package/dist/model/GetVariationsRequestContent.js +209 -0
- package/dist/model/GetVariationsResource.d.ts +202 -0
- package/dist/model/GetVariationsResource.js +235 -0
- package/dist/model/GetVariationsResponseContent.d.ts +30 -0
- package/dist/model/GetVariationsResponseContent.js +128 -0
- package/dist/model/ImageSize.d.ts +31 -0
- package/dist/model/ImageSize.js +108 -0
- package/dist/model/ImageType.d.ts +32 -0
- package/dist/model/ImageType.js +133 -0
- package/dist/model/Images.d.ts +30 -0
- package/dist/model/Images.js +127 -0
- package/dist/model/InternalServerExceptionResponseContent.d.ts +40 -0
- package/dist/model/InternalServerExceptionResponseContent.js +128 -0
- package/dist/model/Item.d.ts +38 -0
- package/dist/model/Item.js +228 -0
- package/dist/model/ItemInfo.d.ts +39 -0
- package/dist/model/ItemInfo.js +234 -0
- package/dist/model/ItemsResult.d.ts +29 -0
- package/dist/model/ItemsResult.js +114 -0
- package/dist/model/LanguageType.d.ts +30 -0
- package/dist/model/LanguageType.js +104 -0
- package/dist/model/Languages.d.ts +31 -0
- package/dist/model/Languages.js +138 -0
- package/dist/model/ListFeedsResponseContent.d.ts +29 -0
- package/dist/model/ListFeedsResponseContent.js +112 -0
- package/dist/model/ListReportsResponseContent.d.ts +38 -0
- package/dist/model/ListReportsResponseContent.js +132 -0
- package/dist/model/ManufactureInfo.d.ts +31 -0
- package/dist/model/ManufactureInfo.js +120 -0
- package/dist/model/Money.d.ts +31 -0
- package/dist/model/Money.js +112 -0
- package/dist/model/MultiValuedAttribute.d.ts +31 -0
- package/dist/model/MultiValuedAttribute.js +117 -0
- package/dist/model/OfferAvailabilityV2.d.ts +32 -0
- package/dist/model/OfferAvailabilityV2.js +120 -0
- package/dist/model/OfferConditionV2.d.ts +31 -0
- package/dist/model/OfferConditionV2.js +116 -0
- package/dist/model/OfferListingV2.d.ts +37 -0
- package/dist/model/OfferListingV2.js +189 -0
- package/dist/model/OfferLoyaltyPointsV2.d.ts +29 -0
- package/dist/model/OfferLoyaltyPointsV2.js +88 -0
- package/dist/model/OfferMerchantInfoV2.d.ts +30 -0
- package/dist/model/OfferMerchantInfoV2.js +104 -0
- package/dist/model/OfferPriceV2.d.ts +32 -0
- package/dist/model/OfferPriceV2.js +135 -0
- package/dist/model/OfferSavingBasis.d.ts +31 -0
- package/dist/model/OfferSavingBasis.js +115 -0
- package/dist/model/OfferSavings.d.ts +30 -0
- package/dist/model/OfferSavings.js +102 -0
- package/dist/model/OfferType.d.ts +32 -0
- package/dist/model/OfferType.js +65 -0
- package/dist/model/OffersV2.d.ts +29 -0
- package/dist/model/OffersV2.js +114 -0
- package/dist/model/ProductInfo.d.ts +34 -0
- package/dist/model/ProductInfo.js +162 -0
- package/dist/model/Rating.d.ts +29 -0
- package/dist/model/Rating.js +88 -0
- package/dist/model/Refinement.d.ts +31 -0
- package/dist/model/Refinement.js +138 -0
- package/dist/model/RefinementBin.d.ts +30 -0
- package/dist/model/RefinementBin.js +104 -0
- package/dist/model/ReportMetadata.d.ts +44 -0
- package/dist/model/ReportMetadata.js +152 -0
- package/dist/model/ResourceNotFoundExceptionResponseContent.d.ts +44 -0
- package/dist/model/ResourceNotFoundExceptionResponseContent.js +156 -0
- package/dist/model/SavingBasisType.d.ts +37 -0
- package/dist/model/SavingBasisType.js +70 -0
- package/dist/model/SearchItemsRequestContent.d.ts +51 -0
- package/dist/model/SearchItemsRequestContent.js +343 -0
- package/dist/model/SearchItemsResource.d.ts +192 -0
- package/dist/model/SearchItemsResource.js +225 -0
- package/dist/model/SearchItemsResponseContent.d.ts +30 -0
- package/dist/model/SearchItemsResponseContent.js +128 -0
- package/dist/model/SearchRefinements.d.ts +31 -0
- package/dist/model/SearchRefinements.js +140 -0
- package/dist/model/SearchResult.d.ts +32 -0
- package/dist/model/SearchResult.js +148 -0
- package/dist/model/SingleBooleanValuedAttribute.d.ts +31 -0
- package/dist/model/SingleBooleanValuedAttribute.js +112 -0
- package/dist/model/SingleIntegerValuedAttribute.d.ts +31 -0
- package/dist/model/SingleIntegerValuedAttribute.js +112 -0
- package/dist/model/SingleStringValuedAttribute.d.ts +31 -0
- package/dist/model/SingleStringValuedAttribute.js +116 -0
- package/dist/model/SortBy.d.ts +47 -0
- package/dist/model/SortBy.js +80 -0
- package/dist/model/TechnicalInfo.d.ts +30 -0
- package/dist/model/TechnicalInfo.js +108 -0
- package/dist/model/ThrottleExceptionResponseContent.d.ts +42 -0
- package/dist/model/ThrottleExceptionResponseContent.js +152 -0
- package/dist/model/TradeInInfo.d.ts +30 -0
- package/dist/model/TradeInInfo.js +102 -0
- package/dist/model/TradeInPrice.d.ts +31 -0
- package/dist/model/TradeInPrice.js +112 -0
- package/dist/model/UnauthorizedExceptionReason.d.ts +62 -0
- package/dist/model/UnauthorizedExceptionReason.js +95 -0
- package/dist/model/UnauthorizedExceptionResponseContent.d.ts +41 -0
- package/dist/model/UnauthorizedExceptionResponseContent.js +137 -0
- package/dist/model/UnitBasedAttribute.d.ts +32 -0
- package/dist/model/UnitBasedAttribute.js +124 -0
- package/dist/model/ValidationExceptionField.d.ts +41 -0
- package/dist/model/ValidationExceptionField.js +129 -0
- package/dist/model/ValidationExceptionReason.d.ts +47 -0
- package/dist/model/ValidationExceptionReason.js +80 -0
- package/dist/model/ValidationExceptionResponseContent.d.ts +43 -0
- package/dist/model/ValidationExceptionResponseContent.js +170 -0
- package/dist/model/VariationAttribute.d.ts +30 -0
- package/dist/model/VariationAttribute.js +104 -0
- package/dist/model/VariationDimension.d.ts +32 -0
- package/dist/model/VariationDimension.js +132 -0
- package/dist/model/VariationSummary.d.ts +32 -0
- package/dist/model/VariationSummary.js +146 -0
- package/dist/model/VariationSummaryPrice.d.ts +30 -0
- package/dist/model/VariationSummaryPrice.js +107 -0
- package/dist/model/VariationsResult.d.ts +30 -0
- package/dist/model/VariationsResult.js +128 -0
- package/dist/model/WebsiteSalesRank.d.ts +32 -0
- package/dist/model/WebsiteSalesRank.js +124 -0
- package/package.json +67 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
19
|
+
*
|
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
21
|
+
* You may not use this file except in compliance with the License.
|
|
22
|
+
* A copy of the License is located at
|
|
23
|
+
*
|
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
27
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
28
|
+
* express or implied. See the License for the specific language governing
|
|
29
|
+
* permissions and limitations under the License.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* The GetFeedResponseContent model module.
|
|
33
|
+
* @module model/GetFeedResponseContent
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var GetFeedResponseContent = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>GetFeedResponseContent</code>.
|
|
39
|
+
* @alias module:model/GetFeedResponseContent
|
|
40
|
+
* @param url {String}
|
|
41
|
+
*/
|
|
42
|
+
function GetFeedResponseContent(url) {
|
|
43
|
+
_classCallCheck(this, GetFeedResponseContent);
|
|
44
|
+
GetFeedResponseContent.initialize(this, url);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Initializes the fields of this object.
|
|
49
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
50
|
+
* Only for internal use.
|
|
51
|
+
*/
|
|
52
|
+
return _createClass(GetFeedResponseContent, null, [{
|
|
53
|
+
key: "initialize",
|
|
54
|
+
value: function initialize(obj, url) {
|
|
55
|
+
obj['url'] = url;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>GetFeedResponseContent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
60
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
61
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
62
|
+
* @param {module:model/GetFeedResponseContent} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/GetFeedResponseContent} The populated <code>GetFeedResponseContent</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new GetFeedResponseContent();
|
|
70
|
+
if (data.hasOwnProperty('url')) {
|
|
71
|
+
obj['url'] = _ApiClient["default"].convertToType(data['url'], 'String');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return obj;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Validates the JSON data with respect to <code>GetFeedResponseContent</code>.
|
|
79
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetFeedResponseContent</code>.
|
|
81
|
+
*/
|
|
82
|
+
}, {
|
|
83
|
+
key: "validateJSON",
|
|
84
|
+
value: function validateJSON(data) {
|
|
85
|
+
// check to make sure all required properties are present in the JSON string
|
|
86
|
+
var _iterator = _createForOfIteratorHelper(GetFeedResponseContent.RequiredProperties),
|
|
87
|
+
_step;
|
|
88
|
+
try {
|
|
89
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
90
|
+
var property = _step.value;
|
|
91
|
+
if (!data.hasOwnProperty(property)) {
|
|
92
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ensure the json data is a string
|
|
96
|
+
} catch (err) {
|
|
97
|
+
_iterator.e(err);
|
|
98
|
+
} finally {
|
|
99
|
+
_iterator.f();
|
|
100
|
+
}
|
|
101
|
+
if (data['url'] && !(typeof data['url'] === 'string' || data['url'] instanceof String)) {
|
|
102
|
+
throw new Error("Expected the field `url` to be a primitive type in the JSON string but got " + data['url']);
|
|
103
|
+
}
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
}]);
|
|
107
|
+
}();
|
|
108
|
+
GetFeedResponseContent.RequiredProperties = ["url"];
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @member {String} url
|
|
112
|
+
*/
|
|
113
|
+
GetFeedResponseContent.prototype['url'] = undefined;
|
|
114
|
+
var _default = exports["default"] = GetFeedResponseContent;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default GetItemsRequestContent;
|
|
2
|
+
/**
|
|
3
|
+
* The GetItemsRequestContent model module.
|
|
4
|
+
* @module model/GetItemsRequestContent
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class GetItemsRequestContent {
|
|
8
|
+
/**
|
|
9
|
+
* Initializes the fields of this object.
|
|
10
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
11
|
+
* Only for internal use.
|
|
12
|
+
*/
|
|
13
|
+
static initialize(obj: any, partnerTag: any, itemIds: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>GetItemsRequestContent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
16
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
17
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
18
|
+
* @param {module:model/GetItemsRequestContent} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/GetItemsRequestContent} The populated <code>GetItemsRequestContent</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): GetItemsRequestContent;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>GetItemsRequestContent</code>.
|
|
24
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
25
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetItemsRequestContent</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>GetItemsRequestContent</code>.
|
|
30
|
+
* @alias module:model/GetItemsRequestContent
|
|
31
|
+
* @param partnerTag {String} An alphanumeric token that uniquely identifies a partner. If the value of PartnerType is Associates, enter your Store Id or tracking ID.
|
|
32
|
+
* @param itemIds {Array.<String>}
|
|
33
|
+
*/
|
|
34
|
+
constructor(partnerTag: string, itemIds: Array<string>);
|
|
35
|
+
partnerTag: string;
|
|
36
|
+
itemIds: string[];
|
|
37
|
+
condition: import('./Condition').default;
|
|
38
|
+
currencyOfPreference: string;
|
|
39
|
+
languagesOfPreference: string[];
|
|
40
|
+
properties: Record<string, string>;
|
|
41
|
+
resources: import('./GetItemsResource').default[];
|
|
42
|
+
}
|
|
43
|
+
declare namespace GetItemsRequestContent {
|
|
44
|
+
let RequiredProperties: string[];
|
|
45
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _Condition = _interopRequireDefault(require("./Condition"));
|
|
9
|
+
var _GetItemsResource = _interopRequireDefault(require("./GetItemsResource"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
13
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
14
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
20
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
21
|
+
*
|
|
22
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
23
|
+
* You may not use this file except in compliance with the License.
|
|
24
|
+
* A copy of the License is located at
|
|
25
|
+
*
|
|
26
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
27
|
+
*
|
|
28
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
29
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
30
|
+
* express or implied. See the License for the specific language governing
|
|
31
|
+
* permissions and limitations under the License.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* The GetItemsRequestContent model module.
|
|
35
|
+
* @module model/GetItemsRequestContent
|
|
36
|
+
* @version 1.0.0
|
|
37
|
+
*/
|
|
38
|
+
var GetItemsRequestContent = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new <code>GetItemsRequestContent</code>.
|
|
41
|
+
* @alias module:model/GetItemsRequestContent
|
|
42
|
+
* @param partnerTag {String} An alphanumeric token that uniquely identifies a partner. If the value of PartnerType is Associates, enter your Store Id or tracking ID.
|
|
43
|
+
* @param itemIds {Array.<String>}
|
|
44
|
+
*/
|
|
45
|
+
function GetItemsRequestContent(partnerTag, itemIds) {
|
|
46
|
+
_classCallCheck(this, GetItemsRequestContent);
|
|
47
|
+
GetItemsRequestContent.initialize(this, partnerTag, itemIds);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the fields of this object.
|
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
53
|
+
* Only for internal use.
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(GetItemsRequestContent, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, partnerTag, itemIds) {
|
|
58
|
+
obj['partnerTag'] = partnerTag;
|
|
59
|
+
obj['itemIds'] = itemIds;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>GetItemsRequestContent</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/GetItemsRequestContent} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/GetItemsRequestContent} The populated <code>GetItemsRequestContent</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new GetItemsRequestContent();
|
|
74
|
+
if (data.hasOwnProperty('partnerTag')) {
|
|
75
|
+
obj['partnerTag'] = _ApiClient["default"].convertToType(data['partnerTag'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('itemIds')) {
|
|
78
|
+
obj['itemIds'] = _ApiClient["default"].convertToType(data['itemIds'], ['String']);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('condition')) {
|
|
81
|
+
obj['condition'] = _Condition["default"].constructFromObject(data['condition']);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('currencyOfPreference')) {
|
|
84
|
+
obj['currencyOfPreference'] = _ApiClient["default"].convertToType(data['currencyOfPreference'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('languagesOfPreference')) {
|
|
87
|
+
obj['languagesOfPreference'] = _ApiClient["default"].convertToType(data['languagesOfPreference'], ['String']);
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('properties')) {
|
|
90
|
+
obj['properties'] = _ApiClient["default"].convertToType(data['properties'], {
|
|
91
|
+
'String': 'String'
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (data.hasOwnProperty('resources')) {
|
|
95
|
+
obj['resources'] = _ApiClient["default"].convertToType(data['resources'], [_GetItemsResource["default"]]);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return obj;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Validates the JSON data with respect to <code>GetItemsRequestContent</code>.
|
|
103
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
104
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetItemsRequestContent</code>.
|
|
105
|
+
*/
|
|
106
|
+
}, {
|
|
107
|
+
key: "validateJSON",
|
|
108
|
+
value: function validateJSON(data) {
|
|
109
|
+
// check to make sure all required properties are present in the JSON string
|
|
110
|
+
var _iterator = _createForOfIteratorHelper(GetItemsRequestContent.RequiredProperties),
|
|
111
|
+
_step;
|
|
112
|
+
try {
|
|
113
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
114
|
+
var property = _step.value;
|
|
115
|
+
if (!data.hasOwnProperty(property)) {
|
|
116
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
} catch (err) {
|
|
121
|
+
_iterator.e(err);
|
|
122
|
+
} finally {
|
|
123
|
+
_iterator.f();
|
|
124
|
+
}
|
|
125
|
+
if (data['partnerTag'] && !(typeof data['partnerTag'] === 'string' || data['partnerTag'] instanceof String)) {
|
|
126
|
+
throw new Error("Expected the field `partnerTag` to be a primitive type in the JSON string but got " + data['partnerTag']);
|
|
127
|
+
}
|
|
128
|
+
// ensure the json data is an array
|
|
129
|
+
if (!Array.isArray(data['itemIds'])) {
|
|
130
|
+
throw new Error("Expected the field `itemIds` to be an array in the JSON data but got " + data['itemIds']);
|
|
131
|
+
}
|
|
132
|
+
// ensure the json data is a string
|
|
133
|
+
if (data['currencyOfPreference'] && !(typeof data['currencyOfPreference'] === 'string' || data['currencyOfPreference'] instanceof String)) {
|
|
134
|
+
throw new Error("Expected the field `currencyOfPreference` to be a primitive type in the JSON string but got " + data['currencyOfPreference']);
|
|
135
|
+
}
|
|
136
|
+
// ensure the json data is an array
|
|
137
|
+
if (!Array.isArray(data['languagesOfPreference'])) {
|
|
138
|
+
throw new Error("Expected the field `languagesOfPreference` to be an array in the JSON data but got " + data['languagesOfPreference']);
|
|
139
|
+
}
|
|
140
|
+
// ensure the json data is an array
|
|
141
|
+
if (!Array.isArray(data['resources'])) {
|
|
142
|
+
throw new Error("Expected the field `resources` to be an array in the JSON data but got " + data['resources']);
|
|
143
|
+
}
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
}]);
|
|
147
|
+
}();
|
|
148
|
+
GetItemsRequestContent.RequiredProperties = ["partnerTag", "itemIds"];
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* An alphanumeric token that uniquely identifies a partner. If the value of PartnerType is Associates, enter your Store Id or tracking ID.
|
|
152
|
+
* @member {String} partnerTag
|
|
153
|
+
*/
|
|
154
|
+
GetItemsRequestContent.prototype['partnerTag'] = undefined;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @member {Array.<String>} itemIds
|
|
158
|
+
*/
|
|
159
|
+
GetItemsRequestContent.prototype['itemIds'] = undefined;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* @member {module:model/Condition} condition
|
|
163
|
+
*/
|
|
164
|
+
GetItemsRequestContent.prototype['condition'] = undefined;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Currency of preference in which the prices information should be returned in response. By default the prices are returned in the default currency of the marketplace. Expected currency code format is the ISO 4217 currency code (i.e. USD, EUR etc.).
|
|
168
|
+
* @member {String} currencyOfPreference
|
|
169
|
+
*/
|
|
170
|
+
GetItemsRequestContent.prototype['currencyOfPreference'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Languages in order of preference in which the item information should be returned in response. By default the item information is returned in the default language of the marketplace.
|
|
174
|
+
* @member {Array.<String>} languagesOfPreference
|
|
175
|
+
*/
|
|
176
|
+
GetItemsRequestContent.prototype['languagesOfPreference'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Reserved parameter for specifying key-value pairs. This is a flexible mechanism for passing additional context or metadata to the API.
|
|
180
|
+
* @member {Object.<String, String>} properties
|
|
181
|
+
*/
|
|
182
|
+
GetItemsRequestContent.prototype['properties'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @member {Array.<module:model/GetItemsResource>} resources
|
|
186
|
+
*/
|
|
187
|
+
GetItemsRequestContent.prototype['resources'] = undefined;
|
|
188
|
+
var _default = exports["default"] = GetItemsRequestContent;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enum class GetItemsResource.
|
|
3
|
+
* @enum {}
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
export default class GetItemsResource {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a <code>GetItemsResource</code> enum value from a Javascript object name.
|
|
9
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
10
|
+
* @return {module:model/GetItemsResource} The enum <code>GetItemsResource</code> value.
|
|
11
|
+
*/
|
|
12
|
+
static constructFromObject(object: any): GetItemsResource;
|
|
13
|
+
/**
|
|
14
|
+
* value: "browseNodeInfo.browseNodes"
|
|
15
|
+
* @const
|
|
16
|
+
*/
|
|
17
|
+
"browseNodeInfo.browseNodes": string;
|
|
18
|
+
/**
|
|
19
|
+
* value: "browseNodeInfo.browseNodes.ancestor"
|
|
20
|
+
* @const
|
|
21
|
+
*/
|
|
22
|
+
"browseNodeInfo.browseNodes.ancestor": string;
|
|
23
|
+
/**
|
|
24
|
+
* value: "browseNodeInfo.browseNodes.salesRank"
|
|
25
|
+
* @const
|
|
26
|
+
*/
|
|
27
|
+
"browseNodeInfo.browseNodes.salesRank": string;
|
|
28
|
+
/**
|
|
29
|
+
* value: "browseNodeInfo.websiteSalesRank"
|
|
30
|
+
* @const
|
|
31
|
+
*/
|
|
32
|
+
"browseNodeInfo.websiteSalesRank": string;
|
|
33
|
+
/**
|
|
34
|
+
* value: "customerReviews.count"
|
|
35
|
+
* @const
|
|
36
|
+
*/
|
|
37
|
+
"customerReviews.count": string;
|
|
38
|
+
/**
|
|
39
|
+
* value: "customerReviews.starRating"
|
|
40
|
+
* @const
|
|
41
|
+
*/
|
|
42
|
+
"customerReviews.starRating": string;
|
|
43
|
+
/**
|
|
44
|
+
* value: "images.primary.small"
|
|
45
|
+
* @const
|
|
46
|
+
*/
|
|
47
|
+
"images.primary.small": string;
|
|
48
|
+
/**
|
|
49
|
+
* value: "images.primary.medium"
|
|
50
|
+
* @const
|
|
51
|
+
*/
|
|
52
|
+
"images.primary.medium": string;
|
|
53
|
+
/**
|
|
54
|
+
* value: "images.primary.large"
|
|
55
|
+
* @const
|
|
56
|
+
*/
|
|
57
|
+
"images.primary.large": string;
|
|
58
|
+
/**
|
|
59
|
+
* value: "images.primary.highRes"
|
|
60
|
+
* @const
|
|
61
|
+
*/
|
|
62
|
+
"images.primary.highRes": string;
|
|
63
|
+
/**
|
|
64
|
+
* value: "images.variants.small"
|
|
65
|
+
* @const
|
|
66
|
+
*/
|
|
67
|
+
"images.variants.small": string;
|
|
68
|
+
/**
|
|
69
|
+
* value: "images.variants.medium"
|
|
70
|
+
* @const
|
|
71
|
+
*/
|
|
72
|
+
"images.variants.medium": string;
|
|
73
|
+
/**
|
|
74
|
+
* value: "images.variants.large"
|
|
75
|
+
* @const
|
|
76
|
+
*/
|
|
77
|
+
"images.variants.large": string;
|
|
78
|
+
/**
|
|
79
|
+
* value: "images.variants.highRes"
|
|
80
|
+
* @const
|
|
81
|
+
*/
|
|
82
|
+
"images.variants.highRes": string;
|
|
83
|
+
/**
|
|
84
|
+
* value: "itemInfo.byLineInfo"
|
|
85
|
+
* @const
|
|
86
|
+
*/
|
|
87
|
+
"itemInfo.byLineInfo": string;
|
|
88
|
+
/**
|
|
89
|
+
* value: "itemInfo.contentInfo"
|
|
90
|
+
* @const
|
|
91
|
+
*/
|
|
92
|
+
"itemInfo.contentInfo": string;
|
|
93
|
+
/**
|
|
94
|
+
* value: "itemInfo.contentRating"
|
|
95
|
+
* @const
|
|
96
|
+
*/
|
|
97
|
+
"itemInfo.contentRating": string;
|
|
98
|
+
/**
|
|
99
|
+
* value: "itemInfo.classifications"
|
|
100
|
+
* @const
|
|
101
|
+
*/
|
|
102
|
+
"itemInfo.classifications": string;
|
|
103
|
+
/**
|
|
104
|
+
* value: "itemInfo.externalIds"
|
|
105
|
+
* @const
|
|
106
|
+
*/
|
|
107
|
+
"itemInfo.externalIds": string;
|
|
108
|
+
/**
|
|
109
|
+
* value: "itemInfo.features"
|
|
110
|
+
* @const
|
|
111
|
+
*/
|
|
112
|
+
"itemInfo.features": string;
|
|
113
|
+
/**
|
|
114
|
+
* value: "itemInfo.manufactureInfo"
|
|
115
|
+
* @const
|
|
116
|
+
*/
|
|
117
|
+
"itemInfo.manufactureInfo": string;
|
|
118
|
+
/**
|
|
119
|
+
* value: "itemInfo.productInfo"
|
|
120
|
+
* @const
|
|
121
|
+
*/
|
|
122
|
+
"itemInfo.productInfo": string;
|
|
123
|
+
/**
|
|
124
|
+
* value: "itemInfo.technicalInfo"
|
|
125
|
+
* @const
|
|
126
|
+
*/
|
|
127
|
+
"itemInfo.technicalInfo": string;
|
|
128
|
+
/**
|
|
129
|
+
* value: "itemInfo.title"
|
|
130
|
+
* @const
|
|
131
|
+
*/
|
|
132
|
+
"itemInfo.title": string;
|
|
133
|
+
/**
|
|
134
|
+
* value: "itemInfo.tradeInInfo"
|
|
135
|
+
* @const
|
|
136
|
+
*/
|
|
137
|
+
"itemInfo.tradeInInfo": string;
|
|
138
|
+
/**
|
|
139
|
+
* value: "parentASIN"
|
|
140
|
+
* @const
|
|
141
|
+
*/
|
|
142
|
+
parentASIN: 'parentASIN';
|
|
143
|
+
/**
|
|
144
|
+
* value: "offersV2.listings.availability"
|
|
145
|
+
* @const
|
|
146
|
+
*/
|
|
147
|
+
"offersV2.listings.availability": string;
|
|
148
|
+
/**
|
|
149
|
+
* value: "offersV2.listings.condition"
|
|
150
|
+
* @const
|
|
151
|
+
*/
|
|
152
|
+
"offersV2.listings.condition": string;
|
|
153
|
+
/**
|
|
154
|
+
* value: "offersV2.listings.dealDetails"
|
|
155
|
+
* @const
|
|
156
|
+
*/
|
|
157
|
+
"offersV2.listings.dealDetails": string;
|
|
158
|
+
/**
|
|
159
|
+
* value: "offersV2.listings.isBuyBoxWinner"
|
|
160
|
+
* @const
|
|
161
|
+
*/
|
|
162
|
+
"offersV2.listings.isBuyBoxWinner": string;
|
|
163
|
+
/**
|
|
164
|
+
* value: "offersV2.listings.loyaltyPoints"
|
|
165
|
+
* @const
|
|
166
|
+
*/
|
|
167
|
+
"offersV2.listings.loyaltyPoints": string;
|
|
168
|
+
/**
|
|
169
|
+
* value: "offersV2.listings.merchantInfo"
|
|
170
|
+
* @const
|
|
171
|
+
*/
|
|
172
|
+
"offersV2.listings.merchantInfo": string;
|
|
173
|
+
/**
|
|
174
|
+
* value: "offersV2.listings.price"
|
|
175
|
+
* @const
|
|
176
|
+
*/
|
|
177
|
+
"offersV2.listings.price": string;
|
|
178
|
+
/**
|
|
179
|
+
* value: "offersV2.listings.type"
|
|
180
|
+
* @const
|
|
181
|
+
*/
|
|
182
|
+
"offersV2.listings.type": string;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* *
|
|
186
|
+
*/
|
|
187
|
+
export type GetItemsResource = 'browseNodeInfo.browseNodes' | 'browseNodeInfo.browseNodes.ancestor' | 'browseNodeInfo.browseNodes.salesRank' | 'browseNodeInfo.websiteSalesRank' | 'customerReviews.count' | 'customerReviews.starRating' | 'images.primary.small' | 'images.primary.medium' | 'images.primary.large' | 'images.primary.highRes' | 'images.variants.small' | 'images.variants.medium' | 'images.variants.large' | 'images.variants.highRes' | 'itemInfo.byLineInfo' | 'itemInfo.contentInfo' | 'itemInfo.contentRating' | 'itemInfo.classifications' | 'itemInfo.externalIds' | 'itemInfo.features' | 'itemInfo.manufactureInfo' | 'itemInfo.productInfo' | 'itemInfo.technicalInfo' | 'itemInfo.title' | 'itemInfo.tradeInInfo' | 'parentASIN' | 'offersV2.listings.availability' | 'offersV2.listings.condition' | 'offersV2.listings.dealDetails' | 'offersV2.listings.isBuyBoxWinner' | 'offersV2.listings.loyaltyPoints' | 'offersV2.listings.merchantInfo' | 'offersV2.listings.price' | 'offersV2.listings.type';
|