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
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Amazon Creators API Node.js SDK
|
|
2
|
+
|
|
3
|
+
   
|
|
4
|
+
|
|
5
|
+
This is an **unofficial TypeScript wrapper** for the [Amazon Creators API Node.js SDK](https://affiliate-program.amazon.com/creatorsapi/docs/en-us/get-started/using-sdk).
|
|
6
|
+
|
|
7
|
+
- [API Reference](https://affiliate-program.amazon.com/creatorsapi/docs/en-us/api-reference)
|
|
8
|
+
- [Getting Started](https://affiliate-program.amazon.com/creatorsapi/docs/en-us/get-started/using-sdk)
|
|
9
|
+
|
|
10
|
+
This package implements a thin TypeScript wrapper around Amazon's JS runtime internals to add proper types to the Node.js SDK.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Node.js version 14 or higher
|
|
15
|
+
- [Register](https://affiliate-program.amazon.com/creatorsapi/docs/en-us/onboarding/register-for-creators-api) for the Creators API
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install amazon-creators-api
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
See the [examples](examples) directory for usage examples.
|
|
26
|
+
|
|
27
|
+
### Get Items
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import {
|
|
31
|
+
ApiClient,
|
|
32
|
+
GetItemsRequestContent,
|
|
33
|
+
GetItemsResource,
|
|
34
|
+
TypedDefaultApi,
|
|
35
|
+
} from "amazon-creators-api";
|
|
36
|
+
|
|
37
|
+
// Initialize API client
|
|
38
|
+
const apiClient = new ApiClient();
|
|
39
|
+
|
|
40
|
+
// Add credential details
|
|
41
|
+
// You can find these in the Creators API dashboard: https://affiliate-program.amazon.com/creatorsapi
|
|
42
|
+
apiClient.credentialId = "<YOUR CREDENTIAL ID>";
|
|
43
|
+
apiClient.credentialSecret = "<YOUR CREDENTIAL SECRET>";
|
|
44
|
+
apiClient.version = "<YOUR CREDENTIAL VERSION>";
|
|
45
|
+
|
|
46
|
+
// Initialize typed API wrapper
|
|
47
|
+
const api = new TypedDefaultApi(apiClient);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Sample function to demonstrate GetItems API usage
|
|
51
|
+
*/
|
|
52
|
+
async function getItems(): Promise<void> {
|
|
53
|
+
/**
|
|
54
|
+
* Add marketplace. For more details, refer: https://affiliate-program.amazon.com/creatorsapi/docs/en-us/api-reference/common-request-headers-and-parameters#marketplace-locale-reference
|
|
55
|
+
*/
|
|
56
|
+
const marketplace = "<YOUR MARKETPLACE>"; // e.g. "www.amazon.com" for US marketplace
|
|
57
|
+
|
|
58
|
+
// Create GetItems request
|
|
59
|
+
// Enter your partner tag (store/tracking id)
|
|
60
|
+
const partnerTag = "<YOUR PARTNER TAG>";
|
|
61
|
+
|
|
62
|
+
// Choose item id(s) - ASINs to retrieve
|
|
63
|
+
const itemIds = ["B0DLFMFBJW", "B0BFC7WQ6R", "B00ZV9RDKK"];
|
|
64
|
+
|
|
65
|
+
const getItemsRequest = new GetItemsRequestContent(partnerTag, itemIds);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Choose resources you want from GetItemsResource enum
|
|
69
|
+
* For more details, refer: https://affiliate-program.amazon.com/creatorsapi/docs/en-us/api-reference/operations/get-items#resources-parameter
|
|
70
|
+
*/
|
|
71
|
+
const resources = [
|
|
72
|
+
"images.primary.medium",
|
|
73
|
+
"itemInfo.title",
|
|
74
|
+
"itemInfo.features",
|
|
75
|
+
"offersV2.listings.price",
|
|
76
|
+
"offersV2.listings.availability",
|
|
77
|
+
"offersV2.listings.condition",
|
|
78
|
+
"offersV2.listings.merchantInfo",
|
|
79
|
+
].map((resource) => GetItemsResource.constructFromObject(resource));
|
|
80
|
+
getItemsRequest.resources = resources;
|
|
81
|
+
|
|
82
|
+
try {
|
|
83
|
+
const response = await api.getItems(marketplace, getItemsRequest);
|
|
84
|
+
console.log("API called successfully.");
|
|
85
|
+
console.log("Complete Response:\n", JSON.stringify(response, null, 2));
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.log("Error calling Creators API!");
|
|
88
|
+
console.log("Full Error Object:\n", JSON.stringify(error, null, 2));
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
Contributions are welcome! Please open an [issue](https://github.com/ryanschiang/amazon-creators-api/issues) or submit a pull request.
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
Licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
|
|
99
|
+
|
|
100
|
+
Original authorship belongs to Amazon.com, Inc. or its affiliates. See the [NOTICE](NOTICE.txt) file for details.
|
|
101
|
+
|
|
102
|
+
Modifications copyright (c) 2026 Ryan Chiang.
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
export default ApiClient;
|
|
2
|
+
/**
|
|
3
|
+
* @module ApiClient
|
|
4
|
+
* @version 1.2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
8
|
+
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
|
9
|
+
* contents of this file should be regarded as internal but are documented for completeness.
|
|
10
|
+
* @alias module:ApiClient
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
13
|
+
declare class ApiClient {
|
|
14
|
+
/**
|
|
15
|
+
* Returns a boolean indicating if the parameter could be JSON.stringified
|
|
16
|
+
* @param param The actual parameter
|
|
17
|
+
* @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
|
|
18
|
+
*/
|
|
19
|
+
static canBeJsonified(str: any): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Parses an ISO-8601 string representation or epoch representation of a date value.
|
|
22
|
+
* @param {String} str The date value as a string.
|
|
23
|
+
* @returns {Date} The parsed date object.
|
|
24
|
+
*/
|
|
25
|
+
static parseDate(str: string): Date;
|
|
26
|
+
/**
|
|
27
|
+
* Converts a value to the specified type.
|
|
28
|
+
* @param {(String|Object)} data The data to convert, as a string or object.
|
|
29
|
+
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
|
|
30
|
+
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
|
|
31
|
+
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
|
|
32
|
+
* all properties on <code>data<code> will be converted to this type.
|
|
33
|
+
* @returns An instance of the specified type or null or undefined if data is null or undefined.
|
|
34
|
+
*/
|
|
35
|
+
static convertToType(data: (string | any), type: (string | Array<string> | any | Function)): any;
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new map or array model from REST data.
|
|
38
|
+
* @param data {Object|Array} The REST data.
|
|
39
|
+
* @param obj {Object|Array} The target object or array.
|
|
40
|
+
*/
|
|
41
|
+
static constructFromObject(data: any | any[], obj: any | any[], itemType: any): void;
|
|
42
|
+
/**
|
|
43
|
+
* The base URL against which to resolve every API call's (relative) path.
|
|
44
|
+
* Overrides the default value set in spec file if present
|
|
45
|
+
* @param {String} basePath
|
|
46
|
+
*/
|
|
47
|
+
constructor(basePath?: string);
|
|
48
|
+
/**
|
|
49
|
+
* The base URL against which to resolve every API call's (relative) path.
|
|
50
|
+
* @type {String}
|
|
51
|
+
* @default https://creatorsapi.amazon
|
|
52
|
+
*/
|
|
53
|
+
basePath: string;
|
|
54
|
+
/**
|
|
55
|
+
* The authentication methods to be included for all API calls.
|
|
56
|
+
* @type {Array.<String>}
|
|
57
|
+
*/
|
|
58
|
+
authentications: Array<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The default HTTP headers to be included for all API calls.
|
|
61
|
+
* @type {Array.<String>}
|
|
62
|
+
* @default {}
|
|
63
|
+
*/
|
|
64
|
+
defaultHeaders: Array<string>;
|
|
65
|
+
/**
|
|
66
|
+
* The default HTTP timeout for all API calls.
|
|
67
|
+
* @type {Number}
|
|
68
|
+
* @default 60000
|
|
69
|
+
*/
|
|
70
|
+
timeout: number;
|
|
71
|
+
/**
|
|
72
|
+
* If set to false an additional timestamp parameter is added to all API GET calls to
|
|
73
|
+
* prevent browser caching
|
|
74
|
+
* @type {Boolean}
|
|
75
|
+
* @default true
|
|
76
|
+
*/
|
|
77
|
+
cache: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* If set to true, the client will save the cookies from each server
|
|
80
|
+
* response, and return them in the next request.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
enableCookies: boolean;
|
|
84
|
+
agent: any;
|
|
85
|
+
requestAgent: any;
|
|
86
|
+
plugins: any;
|
|
87
|
+
/**
|
|
88
|
+
* OAuth2 credential ID
|
|
89
|
+
* @type {String}
|
|
90
|
+
*/
|
|
91
|
+
credentialId: string;
|
|
92
|
+
/**
|
|
93
|
+
* OAuth2 credential secret
|
|
94
|
+
* @type {String}
|
|
95
|
+
*/
|
|
96
|
+
credentialSecret: string;
|
|
97
|
+
/**
|
|
98
|
+
* OAuth2 credential version
|
|
99
|
+
* @type {String}
|
|
100
|
+
*/
|
|
101
|
+
version: string;
|
|
102
|
+
/**
|
|
103
|
+
* Marketplace identifier
|
|
104
|
+
* @type {String}
|
|
105
|
+
*/
|
|
106
|
+
marketplace: string;
|
|
107
|
+
/**
|
|
108
|
+
* OAuth2 token manager instance
|
|
109
|
+
* @type {OAuth2TokenManager}
|
|
110
|
+
*/
|
|
111
|
+
tokenManager: OAuth2TokenManager;
|
|
112
|
+
/**
|
|
113
|
+
* Custom OAuth2 auth endpoint URL
|
|
114
|
+
* @type {String}
|
|
115
|
+
*/
|
|
116
|
+
authEndpoint: string;
|
|
117
|
+
/**
|
|
118
|
+
* Sets the OAuth2 credential ID
|
|
119
|
+
* @param {String} credentialId The OAuth2 credential ID
|
|
120
|
+
*/
|
|
121
|
+
setCredentialId(credentialId: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* Gets the OAuth2 credential ID
|
|
124
|
+
* @returns {String} The OAuth2 credential ID
|
|
125
|
+
*/
|
|
126
|
+
getCredentialId(): string;
|
|
127
|
+
/**
|
|
128
|
+
* Sets the OAuth2 credential secret
|
|
129
|
+
* @param {String} credentialSecret The OAuth2 credential secret
|
|
130
|
+
*/
|
|
131
|
+
setCredentialSecret(credentialSecret: string): void;
|
|
132
|
+
/**
|
|
133
|
+
* Gets the OAuth2 credential secret
|
|
134
|
+
* @returns {String} The OAuth2 credential secret
|
|
135
|
+
*/
|
|
136
|
+
getCredentialSecret(): string;
|
|
137
|
+
/**
|
|
138
|
+
* Sets the credential version
|
|
139
|
+
* @param {String} version The credential version
|
|
140
|
+
*/
|
|
141
|
+
setVersion(version: string): void;
|
|
142
|
+
/**
|
|
143
|
+
* Gets the credential version
|
|
144
|
+
* @returns {String} The credential version
|
|
145
|
+
*/
|
|
146
|
+
getVersion(): string;
|
|
147
|
+
/**
|
|
148
|
+
* Sets the custom OAuth2 auth endpoint URL
|
|
149
|
+
* @param {String} authEndpoint The custom OAuth2 auth endpoint URL
|
|
150
|
+
*/
|
|
151
|
+
setAuthEndpoint(authEndpoint: string): void;
|
|
152
|
+
/**
|
|
153
|
+
* Gets the custom OAuth2 auth endpoint URL
|
|
154
|
+
* @returns {String} The custom OAuth2 auth endpoint URL
|
|
155
|
+
*/
|
|
156
|
+
getAuthEndpoint(): string;
|
|
157
|
+
/**
|
|
158
|
+
* Returns a string representation for an actual parameter.
|
|
159
|
+
* @param param The actual parameter.
|
|
160
|
+
* @returns {String} The string representation of <code>param</code>.
|
|
161
|
+
*/
|
|
162
|
+
paramToString(param: any): string;
|
|
163
|
+
/**
|
|
164
|
+
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values.
|
|
165
|
+
* NOTE: query parameters are not handled here.
|
|
166
|
+
* @param {String} path The path to append to the base URL.
|
|
167
|
+
* @param {Object} pathParams The parameter values to append.
|
|
168
|
+
* @param {String} apiBasePath Base path defined in the path, operation level to override the default one
|
|
169
|
+
* @returns {String} The encoded path with parameter values substituted.
|
|
170
|
+
*/
|
|
171
|
+
buildUrl(path: string, pathParams: any, apiBasePath: string): string;
|
|
172
|
+
/**
|
|
173
|
+
* Checks whether the given content type represents JSON.<br>
|
|
174
|
+
* JSON content type examples:<br>
|
|
175
|
+
* <ul>
|
|
176
|
+
* <li>application/json</li>
|
|
177
|
+
* <li>application/json; charset=UTF8</li>
|
|
178
|
+
* <li>APPLICATION/JSON</li>
|
|
179
|
+
* </ul>
|
|
180
|
+
* @param {String} contentType The MIME content type to check.
|
|
181
|
+
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
|
|
182
|
+
*/
|
|
183
|
+
isJsonMime(contentType: string): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
|
|
186
|
+
* @param {Array.<String>} contentTypes
|
|
187
|
+
* @returns {String} The chosen content type, preferring JSON.
|
|
188
|
+
*/
|
|
189
|
+
jsonPreferredMime(contentTypes: Array<string>): string;
|
|
190
|
+
/**
|
|
191
|
+
* Checks whether the given parameter value represents file-like content.
|
|
192
|
+
* @param param The parameter to check.
|
|
193
|
+
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
|
194
|
+
*/
|
|
195
|
+
isFileParam(param: any): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Normalizes parameter values:
|
|
198
|
+
* <ul>
|
|
199
|
+
* <li>remove nils</li>
|
|
200
|
+
* <li>keep files and arrays</li>
|
|
201
|
+
* <li>format to string with `paramToString` for other cases</li>
|
|
202
|
+
* </ul>
|
|
203
|
+
* @param {Object.<String, Object>} params The parameters as object properties.
|
|
204
|
+
* @returns {Object.<String, Object>} normalized parameters.
|
|
205
|
+
*/
|
|
206
|
+
normalizeParams(params: any): any;
|
|
207
|
+
/**
|
|
208
|
+
* Builds a string representation of an array-type actual parameter, according to the given collection format.
|
|
209
|
+
* @param {Array} param An array parameter.
|
|
210
|
+
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
|
|
211
|
+
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
|
|
212
|
+
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
|
|
213
|
+
*/
|
|
214
|
+
buildCollectionParam(param: any[], collectionFormat: any): string | any[];
|
|
215
|
+
/**
|
|
216
|
+
* Applies authentication headers to the request.
|
|
217
|
+
* @param {Object} request The request object created by a <code>superagent()</code> call.
|
|
218
|
+
* @param {Array.<String>} authNames An array of authentication method names.
|
|
219
|
+
*/
|
|
220
|
+
applyAuthToRequest(request: any, authNames: Array<string>): void;
|
|
221
|
+
/**
|
|
222
|
+
* Deserializes an HTTP response body into a value of the specified type.
|
|
223
|
+
* @param {Object} response A SuperAgent response object.
|
|
224
|
+
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
|
|
225
|
+
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
|
|
226
|
+
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
|
|
227
|
+
* all properties on <code>data<code> will be converted to this type.
|
|
228
|
+
* @returns A value of the specified type.
|
|
229
|
+
*/
|
|
230
|
+
deserialize(response: any, returnType: (string | Array<string> | any | Function)): any;
|
|
231
|
+
/**
|
|
232
|
+
* Invokes the REST service using the supplied settings and parameters.
|
|
233
|
+
* @param {String} path The base URL to invoke.
|
|
234
|
+
* @param {String} httpMethod The HTTP method to use.
|
|
235
|
+
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
|
|
236
|
+
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
|
|
237
|
+
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
|
|
238
|
+
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
|
|
239
|
+
* @param {Object} bodyParam The value to pass as the request body.
|
|
240
|
+
* @param {Array.<String>} authNames An array of authentication type names.
|
|
241
|
+
* @param {Array.<String>} contentTypes An array of request MIME types.
|
|
242
|
+
* @param {Array.<String>} accepts An array of acceptable response MIME types.
|
|
243
|
+
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
|
|
244
|
+
* constructor for a complex type.
|
|
245
|
+
* @param {String} apiBasePath base path defined in the operation/path level to override the default one
|
|
246
|
+
* @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
|
|
247
|
+
*/
|
|
248
|
+
callApi(path: string, httpMethod: string, pathParams: any, queryParams: any, headerParams: any, formParams: any, bodyParam: any, authNames: Array<string>, contentTypes: Array<string>, accepts: Array<string>, returnType: (string | any[] | ObjectFunction), apiBasePath: string): Promise<any>;
|
|
249
|
+
/**
|
|
250
|
+
* Gets an array of host settings
|
|
251
|
+
* @returns An array of host settings
|
|
252
|
+
*/
|
|
253
|
+
hostSettings(): {
|
|
254
|
+
url: string;
|
|
255
|
+
description: string;
|
|
256
|
+
}[];
|
|
257
|
+
getBasePathFromSettings(index: any, variables?: {}): string;
|
|
258
|
+
}
|
|
259
|
+
declare namespace ApiClient {
|
|
260
|
+
namespace CollectionFormatEnum {
|
|
261
|
+
let CSV: string;
|
|
262
|
+
let SSV: string;
|
|
263
|
+
let TSV: string;
|
|
264
|
+
let PIPES: string;
|
|
265
|
+
let MULTI: string;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* *
|
|
269
|
+
*/
|
|
270
|
+
type CollectionFormatEnum = string;
|
|
271
|
+
let instance: any;
|
|
272
|
+
}
|
|
273
|
+
import OAuth2TokenManager = require("./auth/OAuth2TokenManager.js");
|