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,133 @@
|
|
|
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 _UnitBasedAttribute = _interopRequireDefault(require("./UnitBasedAttribute"));
|
|
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 DimensionBasedAttribute model module.
|
|
31
|
+
* @module model/DimensionBasedAttribute
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var DimensionBasedAttribute = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>DimensionBasedAttribute</code>.
|
|
37
|
+
* Container for attributes which are dimension based for example ItemDimensions, etc.
|
|
38
|
+
* @alias module:model/DimensionBasedAttribute
|
|
39
|
+
*/
|
|
40
|
+
function DimensionBasedAttribute() {
|
|
41
|
+
_classCallCheck(this, DimensionBasedAttribute);
|
|
42
|
+
DimensionBasedAttribute.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(DimensionBasedAttribute, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>DimensionBasedAttribute</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/DimensionBasedAttribute} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/DimensionBasedAttribute} The populated <code>DimensionBasedAttribute</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new DimensionBasedAttribute();
|
|
66
|
+
if (data.hasOwnProperty('height')) {
|
|
67
|
+
obj['height'] = _UnitBasedAttribute["default"].constructFromObject(data['height']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('length')) {
|
|
70
|
+
obj['length'] = _UnitBasedAttribute["default"].constructFromObject(data['length']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('weight')) {
|
|
73
|
+
obj['weight'] = _UnitBasedAttribute["default"].constructFromObject(data['weight']);
|
|
74
|
+
}
|
|
75
|
+
if (data.hasOwnProperty('width')) {
|
|
76
|
+
obj['width'] = _UnitBasedAttribute["default"].constructFromObject(data['width']);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return obj;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Validates the JSON data with respect to <code>DimensionBasedAttribute</code>.
|
|
84
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
85
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DimensionBasedAttribute</code>.
|
|
86
|
+
*/
|
|
87
|
+
}, {
|
|
88
|
+
key: "validateJSON",
|
|
89
|
+
value: function validateJSON(data) {
|
|
90
|
+
// validate the optional field `height`
|
|
91
|
+
if (data['height']) {
|
|
92
|
+
// data not null
|
|
93
|
+
_UnitBasedAttribute["default"].validateJSON(data['height']);
|
|
94
|
+
}
|
|
95
|
+
// validate the optional field `length`
|
|
96
|
+
if (data['length']) {
|
|
97
|
+
// data not null
|
|
98
|
+
_UnitBasedAttribute["default"].validateJSON(data['length']);
|
|
99
|
+
}
|
|
100
|
+
// validate the optional field `weight`
|
|
101
|
+
if (data['weight']) {
|
|
102
|
+
// data not null
|
|
103
|
+
_UnitBasedAttribute["default"].validateJSON(data['weight']);
|
|
104
|
+
}
|
|
105
|
+
// validate the optional field `width`
|
|
106
|
+
if (data['width']) {
|
|
107
|
+
// data not null
|
|
108
|
+
_UnitBasedAttribute["default"].validateJSON(data['width']);
|
|
109
|
+
}
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
}]);
|
|
113
|
+
}();
|
|
114
|
+
/**
|
|
115
|
+
* @member {module:model/UnitBasedAttribute} height
|
|
116
|
+
*/
|
|
117
|
+
DimensionBasedAttribute.prototype['height'] = undefined;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @member {module:model/UnitBasedAttribute} length
|
|
121
|
+
*/
|
|
122
|
+
DimensionBasedAttribute.prototype['length'] = undefined;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @member {module:model/UnitBasedAttribute} weight
|
|
126
|
+
*/
|
|
127
|
+
DimensionBasedAttribute.prototype['weight'] = undefined;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @member {module:model/UnitBasedAttribute} width
|
|
131
|
+
*/
|
|
132
|
+
DimensionBasedAttribute.prototype['width'] = undefined;
|
|
133
|
+
var _default = exports["default"] = DimensionBasedAttribute;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default ErrorData;
|
|
2
|
+
/**
|
|
3
|
+
* The ErrorData model module.
|
|
4
|
+
* @module model/ErrorData
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class ErrorData {
|
|
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, code: any, message: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>ErrorData</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/ErrorData} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/ErrorData} The populated <code>ErrorData</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): ErrorData;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>ErrorData</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>ErrorData</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>ErrorData</code>.
|
|
30
|
+
* Error information for partial failures within a successful response. Used when an operation succeeds overall but encounters errors for specific items or resources.
|
|
31
|
+
* @alias module:model/ErrorData
|
|
32
|
+
* @param code {String} A unique code identifying the specific error condition (e.g., 'InvalidItemId', 'ItemNotFound')
|
|
33
|
+
* @param message {String} A human-readable description of the error
|
|
34
|
+
*/
|
|
35
|
+
constructor(code: string, message: string);
|
|
36
|
+
code: string;
|
|
37
|
+
message: string;
|
|
38
|
+
}
|
|
39
|
+
declare namespace ErrorData {
|
|
40
|
+
let RequiredProperties: string[];
|
|
41
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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 ErrorData model module.
|
|
33
|
+
* @module model/ErrorData
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var ErrorData = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>ErrorData</code>.
|
|
39
|
+
* Error information for partial failures within a successful response. Used when an operation succeeds overall but encounters errors for specific items or resources.
|
|
40
|
+
* @alias module:model/ErrorData
|
|
41
|
+
* @param code {String} A unique code identifying the specific error condition (e.g., 'InvalidItemId', 'ItemNotFound')
|
|
42
|
+
* @param message {String} A human-readable description of the error
|
|
43
|
+
*/
|
|
44
|
+
function ErrorData(code, message) {
|
|
45
|
+
_classCallCheck(this, ErrorData);
|
|
46
|
+
ErrorData.initialize(this, code, message);
|
|
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(ErrorData, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, code, message) {
|
|
57
|
+
obj['code'] = code;
|
|
58
|
+
obj['message'] = message;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Constructs a <code>ErrorData</code> from a plain JavaScript object, optionally creating a new instance.
|
|
63
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
64
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
65
|
+
* @param {module:model/ErrorData} obj Optional instance to populate.
|
|
66
|
+
* @return {module:model/ErrorData} The populated <code>ErrorData</code> instance.
|
|
67
|
+
*/
|
|
68
|
+
}, {
|
|
69
|
+
key: "constructFromObject",
|
|
70
|
+
value: function constructFromObject(data, obj) {
|
|
71
|
+
if (data) {
|
|
72
|
+
obj = obj || new ErrorData();
|
|
73
|
+
if (data.hasOwnProperty('code')) {
|
|
74
|
+
obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
|
|
75
|
+
}
|
|
76
|
+
if (data.hasOwnProperty('message')) {
|
|
77
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Validates the JSON data with respect to <code>ErrorData</code>.
|
|
85
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
86
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ErrorData</code>.
|
|
87
|
+
*/
|
|
88
|
+
}, {
|
|
89
|
+
key: "validateJSON",
|
|
90
|
+
value: function validateJSON(data) {
|
|
91
|
+
// check to make sure all required properties are present in the JSON string
|
|
92
|
+
var _iterator = _createForOfIteratorHelper(ErrorData.RequiredProperties),
|
|
93
|
+
_step;
|
|
94
|
+
try {
|
|
95
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
96
|
+
var property = _step.value;
|
|
97
|
+
if (!data.hasOwnProperty(property)) {
|
|
98
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// ensure the json data is a string
|
|
102
|
+
} catch (err) {
|
|
103
|
+
_iterator.e(err);
|
|
104
|
+
} finally {
|
|
105
|
+
_iterator.f();
|
|
106
|
+
}
|
|
107
|
+
if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) {
|
|
108
|
+
throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']);
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
112
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
113
|
+
}
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
}]);
|
|
117
|
+
}();
|
|
118
|
+
ErrorData.RequiredProperties = ["code", "message"];
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* A unique code identifying the specific error condition (e.g., 'InvalidItemId', 'ItemNotFound')
|
|
122
|
+
* @member {String} code
|
|
123
|
+
*/
|
|
124
|
+
ErrorData.prototype['code'] = undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A human-readable description of the error
|
|
128
|
+
* @member {String} message
|
|
129
|
+
*/
|
|
130
|
+
ErrorData.prototype['message'] = undefined;
|
|
131
|
+
var _default = exports["default"] = ErrorData;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export default ExternalIds;
|
|
2
|
+
/**
|
|
3
|
+
* The ExternalIds model module.
|
|
4
|
+
* @module model/ExternalIds
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class ExternalIds {
|
|
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>ExternalIds</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/ExternalIds} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/ExternalIds} The populated <code>ExternalIds</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): ExternalIds;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>ExternalIds</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>ExternalIds</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
eans: import('./MultiValuedAttribute').default;
|
|
29
|
+
isbns: import('./MultiValuedAttribute').default;
|
|
30
|
+
upcs: import('./MultiValuedAttribute').default;
|
|
31
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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 _MultiValuedAttribute = _interopRequireDefault(require("./MultiValuedAttribute"));
|
|
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 ExternalIds model module.
|
|
31
|
+
* @module model/ExternalIds
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var ExternalIds = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>ExternalIds</code>.
|
|
37
|
+
* Container for set of identifiers that is used globally to identify a particular product.
|
|
38
|
+
* @alias module:model/ExternalIds
|
|
39
|
+
*/
|
|
40
|
+
function ExternalIds() {
|
|
41
|
+
_classCallCheck(this, ExternalIds);
|
|
42
|
+
ExternalIds.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(ExternalIds, null, [{
|
|
51
|
+
key: "initialize",
|
|
52
|
+
value: function initialize(obj) {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Constructs a <code>ExternalIds</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/ExternalIds} obj Optional instance to populate.
|
|
59
|
+
* @return {module:model/ExternalIds} The populated <code>ExternalIds</code> instance.
|
|
60
|
+
*/
|
|
61
|
+
}, {
|
|
62
|
+
key: "constructFromObject",
|
|
63
|
+
value: function constructFromObject(data, obj) {
|
|
64
|
+
if (data) {
|
|
65
|
+
obj = obj || new ExternalIds();
|
|
66
|
+
if (data.hasOwnProperty('eans')) {
|
|
67
|
+
obj['eans'] = _MultiValuedAttribute["default"].constructFromObject(data['eans']);
|
|
68
|
+
}
|
|
69
|
+
if (data.hasOwnProperty('isbns')) {
|
|
70
|
+
obj['isbns'] = _MultiValuedAttribute["default"].constructFromObject(data['isbns']);
|
|
71
|
+
}
|
|
72
|
+
if (data.hasOwnProperty('upcs')) {
|
|
73
|
+
obj['upcs'] = _MultiValuedAttribute["default"].constructFromObject(data['upcs']);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obj;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Validates the JSON data with respect to <code>ExternalIds</code>.
|
|
81
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
82
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ExternalIds</code>.
|
|
83
|
+
*/
|
|
84
|
+
}, {
|
|
85
|
+
key: "validateJSON",
|
|
86
|
+
value: function validateJSON(data) {
|
|
87
|
+
// validate the optional field `eans`
|
|
88
|
+
if (data['eans']) {
|
|
89
|
+
// data not null
|
|
90
|
+
_MultiValuedAttribute["default"].validateJSON(data['eans']);
|
|
91
|
+
}
|
|
92
|
+
// validate the optional field `isbns`
|
|
93
|
+
if (data['isbns']) {
|
|
94
|
+
// data not null
|
|
95
|
+
_MultiValuedAttribute["default"].validateJSON(data['isbns']);
|
|
96
|
+
}
|
|
97
|
+
// validate the optional field `upcs`
|
|
98
|
+
if (data['upcs']) {
|
|
99
|
+
// data not null
|
|
100
|
+
_MultiValuedAttribute["default"].validateJSON(data['upcs']);
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
}]);
|
|
105
|
+
}();
|
|
106
|
+
/**
|
|
107
|
+
* @member {module:model/MultiValuedAttribute} eans
|
|
108
|
+
*/
|
|
109
|
+
ExternalIds.prototype['eans'] = undefined;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @member {module:model/MultiValuedAttribute} isbns
|
|
113
|
+
*/
|
|
114
|
+
ExternalIds.prototype['isbns'] = undefined;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @member {module:model/MultiValuedAttribute} upcs
|
|
118
|
+
*/
|
|
119
|
+
ExternalIds.prototype['upcs'] = undefined;
|
|
120
|
+
var _default = exports["default"] = ExternalIds;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export default Feed;
|
|
2
|
+
/**
|
|
3
|
+
* The Feed model module.
|
|
4
|
+
* @module model/Feed
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
*/
|
|
7
|
+
declare class Feed {
|
|
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, feedName: any, size: any, md5: any, lastUpdated: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* Constructs a <code>Feed</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/Feed} obj Optional instance to populate.
|
|
19
|
+
* @return {module:model/Feed} The populated <code>Feed</code> instance.
|
|
20
|
+
*/
|
|
21
|
+
static constructFromObject(data: any, obj: any): Feed;
|
|
22
|
+
/**
|
|
23
|
+
* Validates the JSON data with respect to <code>Feed</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>Feed</code>.
|
|
26
|
+
*/
|
|
27
|
+
static validateJSON(data: any): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a new <code>Feed</code>.
|
|
30
|
+
* @alias module:model/Feed
|
|
31
|
+
* @param feedName {String}
|
|
32
|
+
* @param size {Number}
|
|
33
|
+
* @param md5 {String}
|
|
34
|
+
* @param lastUpdated {String}
|
|
35
|
+
*/
|
|
36
|
+
constructor(feedName: string, size: number, md5: string, lastUpdated: string);
|
|
37
|
+
feedName: string;
|
|
38
|
+
size: number;
|
|
39
|
+
md5: string;
|
|
40
|
+
lastUpdated: string;
|
|
41
|
+
}
|
|
42
|
+
declare namespace Feed {
|
|
43
|
+
let RequiredProperties: string[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
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 Feed model module.
|
|
33
|
+
* @module model/Feed
|
|
34
|
+
* @version 1.0.0
|
|
35
|
+
*/
|
|
36
|
+
var Feed = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new <code>Feed</code>.
|
|
39
|
+
* @alias module:model/Feed
|
|
40
|
+
* @param feedName {String}
|
|
41
|
+
* @param size {Number}
|
|
42
|
+
* @param md5 {String}
|
|
43
|
+
* @param lastUpdated {String}
|
|
44
|
+
*/
|
|
45
|
+
function Feed(feedName, size, md5, lastUpdated) {
|
|
46
|
+
_classCallCheck(this, Feed);
|
|
47
|
+
Feed.initialize(this, feedName, size, md5, lastUpdated);
|
|
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(Feed, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, feedName, size, md5, lastUpdated) {
|
|
58
|
+
obj['feedName'] = feedName;
|
|
59
|
+
obj['size'] = size;
|
|
60
|
+
obj['md5'] = md5;
|
|
61
|
+
obj['lastUpdated'] = lastUpdated;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Constructs a <code>Feed</code> from a plain JavaScript object, optionally creating a new instance.
|
|
66
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
67
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
68
|
+
* @param {module:model/Feed} obj Optional instance to populate.
|
|
69
|
+
* @return {module:model/Feed} The populated <code>Feed</code> instance.
|
|
70
|
+
*/
|
|
71
|
+
}, {
|
|
72
|
+
key: "constructFromObject",
|
|
73
|
+
value: function constructFromObject(data, obj) {
|
|
74
|
+
if (data) {
|
|
75
|
+
obj = obj || new Feed();
|
|
76
|
+
if (data.hasOwnProperty('feedName')) {
|
|
77
|
+
obj['feedName'] = _ApiClient["default"].convertToType(data['feedName'], 'String');
|
|
78
|
+
}
|
|
79
|
+
if (data.hasOwnProperty('size')) {
|
|
80
|
+
obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number');
|
|
81
|
+
}
|
|
82
|
+
if (data.hasOwnProperty('md5')) {
|
|
83
|
+
obj['md5'] = _ApiClient["default"].convertToType(data['md5'], 'String');
|
|
84
|
+
}
|
|
85
|
+
if (data.hasOwnProperty('lastUpdated')) {
|
|
86
|
+
obj['lastUpdated'] = _ApiClient["default"].convertToType(data['lastUpdated'], 'String');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return obj;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Validates the JSON data with respect to <code>Feed</code>.
|
|
94
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
95
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Feed</code>.
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "validateJSON",
|
|
99
|
+
value: function validateJSON(data) {
|
|
100
|
+
// check to make sure all required properties are present in the JSON string
|
|
101
|
+
var _iterator = _createForOfIteratorHelper(Feed.RequiredProperties),
|
|
102
|
+
_step;
|
|
103
|
+
try {
|
|
104
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
105
|
+
var property = _step.value;
|
|
106
|
+
if (!data.hasOwnProperty(property)) {
|
|
107
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// ensure the json data is a string
|
|
111
|
+
} catch (err) {
|
|
112
|
+
_iterator.e(err);
|
|
113
|
+
} finally {
|
|
114
|
+
_iterator.f();
|
|
115
|
+
}
|
|
116
|
+
if (data['feedName'] && !(typeof data['feedName'] === 'string' || data['feedName'] instanceof String)) {
|
|
117
|
+
throw new Error("Expected the field `feedName` to be a primitive type in the JSON string but got " + data['feedName']);
|
|
118
|
+
}
|
|
119
|
+
// ensure the json data is a string
|
|
120
|
+
if (data['md5'] && !(typeof data['md5'] === 'string' || data['md5'] instanceof String)) {
|
|
121
|
+
throw new Error("Expected the field `md5` to be a primitive type in the JSON string but got " + data['md5']);
|
|
122
|
+
}
|
|
123
|
+
// ensure the json data is a string
|
|
124
|
+
if (data['lastUpdated'] && !(typeof data['lastUpdated'] === 'string' || data['lastUpdated'] instanceof String)) {
|
|
125
|
+
throw new Error("Expected the field `lastUpdated` to be a primitive type in the JSON string but got " + data['lastUpdated']);
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
}]);
|
|
130
|
+
}();
|
|
131
|
+
Feed.RequiredProperties = ["feedName", "size", "md5", "lastUpdated"];
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @member {String} feedName
|
|
135
|
+
*/
|
|
136
|
+
Feed.prototype['feedName'] = undefined;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @member {Number} size
|
|
140
|
+
*/
|
|
141
|
+
Feed.prototype['size'] = undefined;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @member {String} md5
|
|
145
|
+
*/
|
|
146
|
+
Feed.prototype['md5'] = undefined;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @member {String} lastUpdated
|
|
150
|
+
*/
|
|
151
|
+
Feed.prototype['lastUpdated'] = undefined;
|
|
152
|
+
var _default = exports["default"] = Feed;
|