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,132 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); } /**
|
|
15
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
16
|
+
*
|
|
17
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
18
|
+
* You may not use this file except in compliance with the License.
|
|
19
|
+
* A copy of the License is located at
|
|
20
|
+
*
|
|
21
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
22
|
+
*
|
|
23
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
24
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
25
|
+
* express or implied. See the License for the specific language governing
|
|
26
|
+
* permissions and limitations under the License.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The VariationDimension model module.
|
|
30
|
+
* @module model/VariationDimension
|
|
31
|
+
* @version 1.0.0
|
|
32
|
+
*/
|
|
33
|
+
var VariationDimension = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>VariationDimension</code>.
|
|
36
|
+
* The container for variation dimension which represent a dimension and all its possible values.
|
|
37
|
+
* @alias module:model/VariationDimension
|
|
38
|
+
*/
|
|
39
|
+
function VariationDimension() {
|
|
40
|
+
_classCallCheck(this, VariationDimension);
|
|
41
|
+
VariationDimension.initialize(this);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(VariationDimension, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj) {}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>VariationDimension</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/VariationDimension} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/VariationDimension} The populated <code>VariationDimension</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new VariationDimension();
|
|
65
|
+
if (data.hasOwnProperty('displayName')) {
|
|
66
|
+
obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('locale')) {
|
|
69
|
+
obj['locale'] = _ApiClient["default"].convertToType(data['locale'], 'String');
|
|
70
|
+
}
|
|
71
|
+
if (data.hasOwnProperty('name')) {
|
|
72
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
73
|
+
}
|
|
74
|
+
if (data.hasOwnProperty('values')) {
|
|
75
|
+
obj['values'] = _ApiClient["default"].convertToType(data['values'], ['String']);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return obj;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Validates the JSON data with respect to <code>VariationDimension</code>.
|
|
83
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
84
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>VariationDimension</code>.
|
|
85
|
+
*/
|
|
86
|
+
}, {
|
|
87
|
+
key: "validateJSON",
|
|
88
|
+
value: function validateJSON(data) {
|
|
89
|
+
// ensure the json data is a string
|
|
90
|
+
if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
|
|
91
|
+
throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
|
|
92
|
+
}
|
|
93
|
+
// ensure the json data is a string
|
|
94
|
+
if (data['locale'] && !(typeof data['locale'] === 'string' || data['locale'] instanceof String)) {
|
|
95
|
+
throw new Error("Expected the field `locale` to be a primitive type in the JSON string but got " + data['locale']);
|
|
96
|
+
}
|
|
97
|
+
// ensure the json data is a string
|
|
98
|
+
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
99
|
+
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
100
|
+
}
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data['values'])) {
|
|
103
|
+
throw new Error("Expected the field `values` to be an array in the JSON data but got " + data['values']);
|
|
104
|
+
}
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
}();
|
|
109
|
+
/**
|
|
110
|
+
* Display name of the variation dimension, suitable for presentation to users.
|
|
111
|
+
* @member {String} displayName
|
|
112
|
+
*/
|
|
113
|
+
VariationDimension.prototype['displayName'] = undefined;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Locale of the variation dimension display name.
|
|
117
|
+
* @member {String} locale
|
|
118
|
+
*/
|
|
119
|
+
VariationDimension.prototype['locale'] = undefined;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Name of the variation dimension (e.g., 'Size', 'Color').
|
|
123
|
+
* @member {String} name
|
|
124
|
+
*/
|
|
125
|
+
VariationDimension.prototype['name'] = undefined;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* List of possible values for this variation dimension.
|
|
129
|
+
* @member {Array.<String>} values
|
|
130
|
+
*/
|
|
131
|
+
VariationDimension.prototype['values'] = undefined;
|
|
132
|
+
var _default = exports["default"] = VariationDimension;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default VariationSummary;
|
|
2
|
+
/**
|
|
3
|
+
* The VariationSummary model module.
|
|
4
|
+
* @module model/VariationSummary
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class VariationSummary {
|
|
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): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>VariationSummary</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/VariationSummary} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/VariationSummary} The populated <code>VariationSummary</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): VariationSummary;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>VariationSummary</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>VariationSummary</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
pageCount: number;
|
|
29
|
+
price: import('./VariationSummaryPrice').default;
|
|
30
|
+
variationCount: number;
|
|
31
|
+
variationDimensions: import('./VariationDimension').default[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
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 _VariationDimension = _interopRequireDefault(require("./VariationDimension"));
|
|
9
|
+
var _VariationSummaryPrice = _interopRequireDefault(require("./VariationSummaryPrice"));
|
|
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 VariationSummary model module.
|
|
35
|
+
* @module model/VariationSummary
|
|
36
|
+
* @version 1.0.0
|
|
37
|
+
*/
|
|
38
|
+
var VariationSummary = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new <code>VariationSummary</code>.
|
|
41
|
+
* The container for Variations Summary response. It consists of metadata of variations response like page numbers, number of variations, Price range and Variation Dimensions.
|
|
42
|
+
* @alias module:model/VariationSummary
|
|
43
|
+
*/
|
|
44
|
+
function VariationSummary() {
|
|
45
|
+
_classCallCheck(this, VariationSummary);
|
|
46
|
+
VariationSummary.initialize(this);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(VariationSummary, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj) {}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>VariationSummary</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/VariationSummary} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/VariationSummary} The populated <code>VariationSummary</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new VariationSummary();
|
|
70
|
+
if (data.hasOwnProperty('pageCount')) {
|
|
71
|
+
obj['pageCount'] = _ApiClient["default"].convertToType(data['pageCount'], 'Number');
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('price')) {
|
|
74
|
+
obj['price'] = _VariationSummaryPrice["default"].constructFromObject(data['price']);
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('variationCount')) {
|
|
77
|
+
obj['variationCount'] = _ApiClient["default"].convertToType(data['variationCount'], 'Number');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('variationDimensions')) {
|
|
80
|
+
obj['variationDimensions'] = _ApiClient["default"].convertToType(data['variationDimensions'], [_VariationDimension["default"]]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Validates the JSON data with respect to <code>VariationSummary</code>.
|
|
88
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
89
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>VariationSummary</code>.
|
|
90
|
+
*/
|
|
91
|
+
}, {
|
|
92
|
+
key: "validateJSON",
|
|
93
|
+
value: function validateJSON(data) {
|
|
94
|
+
// validate the optional field `price`
|
|
95
|
+
if (data['price']) {
|
|
96
|
+
// data not null
|
|
97
|
+
_VariationSummaryPrice["default"].validateJSON(data['price']);
|
|
98
|
+
}
|
|
99
|
+
if (data['variationDimensions']) {
|
|
100
|
+
// data not null
|
|
101
|
+
// ensure the json data is an array
|
|
102
|
+
if (!Array.isArray(data['variationDimensions'])) {
|
|
103
|
+
throw new Error("Expected the field `variationDimensions` to be an array in the JSON data but got " + data['variationDimensions']);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `variationDimensions` (array)
|
|
106
|
+
var _iterator = _createForOfIteratorHelper(data['variationDimensions']),
|
|
107
|
+
_step;
|
|
108
|
+
try {
|
|
109
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
110
|
+
var item = _step.value;
|
|
111
|
+
_VariationDimension["default"].validateJSON(item);
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
_iterator.e(err);
|
|
115
|
+
} finally {
|
|
116
|
+
_iterator.f();
|
|
117
|
+
}
|
|
118
|
+
;
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
}]);
|
|
123
|
+
}();
|
|
124
|
+
/**
|
|
125
|
+
* Number of pages in the variation result set.
|
|
126
|
+
* @member {Number} pageCount
|
|
127
|
+
*/
|
|
128
|
+
VariationSummary.prototype['pageCount'] = undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @member {module:model/VariationSummaryPrice} price
|
|
132
|
+
*/
|
|
133
|
+
VariationSummary.prototype['price'] = undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Total number of variations available for the product. This represents the complete count of all child ASINs across all pages. Use this value along with pageCount to understand the full scope of available variations.
|
|
137
|
+
* @member {Number} variationCount
|
|
138
|
+
*/
|
|
139
|
+
VariationSummary.prototype['variationCount'] = undefined;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* List of variation dimensions associated with the product. Variation dimensions define the attributes on which products vary (e.g., size, color). Each dimension includes: - Display name and locale for presentation - Dimension name (internal identifier) - List of all possible values for that dimension For example, a clothing item might have two dimensions: 'Size' with values ['S', 'M', 'L'] and 'Color' with values ['Red', 'Blue', 'Green']. These dimensions help users understand how variations differ from each other.
|
|
143
|
+
* @member {Array.<module:model/VariationDimension>} variationDimensions
|
|
144
|
+
*/
|
|
145
|
+
VariationSummary.prototype['variationDimensions'] = undefined;
|
|
146
|
+
var _default = exports["default"] = VariationSummary;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default VariationSummaryPrice;
|
|
2
|
+
/**
|
|
3
|
+
* The VariationSummaryPrice model module.
|
|
4
|
+
* @module model/VariationSummaryPrice
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class VariationSummaryPrice {
|
|
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): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>VariationSummaryPrice</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/VariationSummaryPrice} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/VariationSummaryPrice} The populated <code>VariationSummaryPrice</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): VariationSummaryPrice;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>VariationSummaryPrice</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>VariationSummaryPrice</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
highestPrice: import('./Money').default;
|
|
29
|
+
lowestPrice: import('./Money').default;
|
|
30
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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 _Money = _interopRequireDefault(require("./Money"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
* Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
17
|
+
*
|
|
18
|
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
19
|
+
* You may not use this file except in compliance with the License.
|
|
20
|
+
* A copy of the License is located at
|
|
21
|
+
*
|
|
22
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
23
|
+
*
|
|
24
|
+
* or in the "license" file accompanying this file. This file is distributed
|
|
25
|
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
26
|
+
* express or implied. See the License for the specific language governing
|
|
27
|
+
* permissions and limitations under the License.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The VariationSummaryPrice model module.
|
|
31
|
+
* @module model/VariationSummaryPrice
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var VariationSummaryPrice = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>VariationSummaryPrice</code>.
|
|
37
|
+
* The container for highest and lowest price for variations.
|
|
38
|
+
* @alias module:model/VariationSummaryPrice
|
|
39
|
+
*/
|
|
40
|
+
function VariationSummaryPrice() {
|
|
41
|
+
_classCallCheck(this, VariationSummaryPrice);
|
|
42
|
+
VariationSummaryPrice.initialize(this);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the fields of this object.
|
|
47
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
+
* Only for internal use.
|
|
49
|
+
*/
|
|
50
|
+
return _createClass(VariationSummaryPrice, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>VariationSummaryPrice</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
+
* @param {module:model/VariationSummaryPrice} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/VariationSummaryPrice} The populated <code>VariationSummaryPrice</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new VariationSummaryPrice();
|
|
66
|
+
if (data.hasOwnProperty('highestPrice')) {
|
|
67
|
+
obj['highestPrice'] = _Money["default"].constructFromObject(data['highestPrice']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('lowestPrice')) {
|
|
70
|
+
obj['lowestPrice'] = _Money["default"].constructFromObject(data['lowestPrice']);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Validates the JSON data with respect to <code>VariationSummaryPrice</code>.
|
|
78
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
79
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>VariationSummaryPrice</code>.
|
|
80
|
+
*/
|
|
81
|
+
}, {
|
|
82
|
+
key: "validateJSON",
|
|
83
|
+
value: function validateJSON(data) {
|
|
84
|
+
// validate the optional field `highestPrice`
|
|
85
|
+
if (data['highestPrice']) {
|
|
86
|
+
// data not null
|
|
87
|
+
_Money["default"].validateJSON(data['highestPrice']);
|
|
88
|
+
}
|
|
89
|
+
// validate the optional field `lowestPrice`
|
|
90
|
+
if (data['lowestPrice']) {
|
|
91
|
+
// data not null
|
|
92
|
+
_Money["default"].validateJSON(data['lowestPrice']);
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
}]);
|
|
97
|
+
}();
|
|
98
|
+
/**
|
|
99
|
+
* @member {module:model/Money} highestPrice
|
|
100
|
+
*/
|
|
101
|
+
VariationSummaryPrice.prototype['highestPrice'] = undefined;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @member {module:model/Money} lowestPrice
|
|
105
|
+
*/
|
|
106
|
+
VariationSummaryPrice.prototype['lowestPrice'] = undefined;
|
|
107
|
+
var _default = exports["default"] = VariationSummaryPrice;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export default VariationsResult;
|
|
2
|
+
/**
|
|
3
|
+
* The VariationsResult model module.
|
|
4
|
+
* @module model/VariationsResult
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class VariationsResult {
|
|
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): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>VariationsResult</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/VariationsResult} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/VariationsResult} The populated <code>VariationsResult</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): VariationsResult;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>VariationsResult</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>VariationsResult</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
items: import('./Item').default[];
|
|
29
|
+
variationSummary: import('./VariationSummary').default;
|
|
30
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
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 _Item = _interopRequireDefault(require("./Item"));
|
|
9
|
+
var _VariationSummary = _interopRequireDefault(require("./VariationSummary"));
|
|
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 VariationsResult model module.
|
|
35
|
+
* @module model/VariationsResult
|
|
36
|
+
* @version 1.0.0
|
|
37
|
+
*/
|
|
38
|
+
var VariationsResult = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* Constructs a new <code>VariationsResult</code>.
|
|
41
|
+
* The container for Variations response. It consists of items and variation summary. Items contains the list of product variations with their attributes (e.g., different colors, sizes). VariationSummary provides metadata about the complete set of variations including pagination info, price range, and the dimensions along which products vary.
|
|
42
|
+
* @alias module:model/VariationsResult
|
|
43
|
+
*/
|
|
44
|
+
function VariationsResult() {
|
|
45
|
+
_classCallCheck(this, VariationsResult);
|
|
46
|
+
VariationsResult.initialize(this);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(VariationsResult, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj) {}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Constructs a <code>VariationsResult</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/VariationsResult} obj Optional instance to populate.
|
|
63
|
+
* @return {module:model/VariationsResult} The populated <code>VariationsResult</code> instance.
|
|
64
|
+
*/
|
|
65
|
+
}, {
|
|
66
|
+
key: "constructFromObject",
|
|
67
|
+
value: function constructFromObject(data, obj) {
|
|
68
|
+
if (data) {
|
|
69
|
+
obj = obj || new VariationsResult();
|
|
70
|
+
if (data.hasOwnProperty('items')) {
|
|
71
|
+
obj['items'] = _ApiClient["default"].convertToType(data['items'], [_Item["default"]]);
|
|
72
|
+
}
|
|
73
|
+
if (data.hasOwnProperty('variationSummary')) {
|
|
74
|
+
obj['variationSummary'] = _VariationSummary["default"].constructFromObject(data['variationSummary']);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return obj;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Validates the JSON data with respect to <code>VariationsResult</code>.
|
|
82
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
83
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>VariationsResult</code>.
|
|
84
|
+
*/
|
|
85
|
+
}, {
|
|
86
|
+
key: "validateJSON",
|
|
87
|
+
value: function validateJSON(data) {
|
|
88
|
+
if (data['items']) {
|
|
89
|
+
// data not null
|
|
90
|
+
// ensure the json data is an array
|
|
91
|
+
if (!Array.isArray(data['items'])) {
|
|
92
|
+
throw new Error("Expected the field `items` to be an array in the JSON data but got " + data['items']);
|
|
93
|
+
}
|
|
94
|
+
// validate the optional field `items` (array)
|
|
95
|
+
var _iterator = _createForOfIteratorHelper(data['items']),
|
|
96
|
+
_step;
|
|
97
|
+
try {
|
|
98
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
99
|
+
var item = _step.value;
|
|
100
|
+
_Item["default"].validateJSON(item);
|
|
101
|
+
}
|
|
102
|
+
} catch (err) {
|
|
103
|
+
_iterator.e(err);
|
|
104
|
+
} finally {
|
|
105
|
+
_iterator.f();
|
|
106
|
+
}
|
|
107
|
+
;
|
|
108
|
+
}
|
|
109
|
+
// validate the optional field `variationSummary`
|
|
110
|
+
if (data['variationSummary']) {
|
|
111
|
+
// data not null
|
|
112
|
+
_VariationSummary["default"].validateJSON(data['variationSummary']);
|
|
113
|
+
}
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
}]);
|
|
117
|
+
}();
|
|
118
|
+
/**
|
|
119
|
+
* List of Item which is a container for item information.
|
|
120
|
+
* @member {Array.<module:model/Item>} items
|
|
121
|
+
*/
|
|
122
|
+
VariationsResult.prototype['items'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @member {module:model/VariationSummary} variationSummary
|
|
126
|
+
*/
|
|
127
|
+
VariationsResult.prototype['variationSummary'] = undefined;
|
|
128
|
+
var _default = exports["default"] = VariationsResult;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default WebsiteSalesRank;
|
|
2
|
+
/**
|
|
3
|
+
* The WebsiteSalesRank model module.
|
|
4
|
+
* @module model/WebsiteSalesRank
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class WebsiteSalesRank {
|
|
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): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>WebsiteSalesRank</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/WebsiteSalesRank} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/WebsiteSalesRank} The populated <code>WebsiteSalesRank</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): WebsiteSalesRank;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>WebsiteSalesRank</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>WebsiteSalesRank</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
contextFreeName: string;
|
|
29
|
+
displayName: string;
|
|
30
|
+
id: string;
|
|
31
|
+
salesRank: number;
|
|
32
|
+
}
|