@sp-api-sdk/invoices-api-2024-06-19 2.1.3 → 3.0.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.
Files changed (109) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +1090 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/{types/api-model/api/invoices-api.d.ts → index.d.cts} +853 -45
  5. package/dist/index.d.ts +1408 -0
  6. package/dist/index.js +1042 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/invoices-api.js +0 -832
  10. package/dist/cjs/api-model/api.js +0 -30
  11. package/dist/cjs/api-model/base.js +0 -52
  12. package/dist/cjs/api-model/common.js +0 -123
  13. package/dist/cjs/api-model/configuration.js +0 -98
  14. package/dist/cjs/api-model/index.js +0 -32
  15. package/dist/cjs/api-model/models/attribute-option.js +0 -15
  16. package/dist/cjs/api-model/models/carrier-details-context.js +0 -15
  17. package/dist/cjs/api-model/models/error-list.js +0 -15
  18. package/dist/cjs/api-model/models/export-invoices-request.js +0 -15
  19. package/dist/cjs/api-model/models/export-invoices-response.js +0 -15
  20. package/dist/cjs/api-model/models/export-status.js +0 -25
  21. package/dist/cjs/api-model/models/export.js +0 -15
  22. package/dist/cjs/api-model/models/file-format.js +0 -22
  23. package/dist/cjs/api-model/models/get-invoice-response.js +0 -15
  24. package/dist/cjs/api-model/models/get-invoices-attributes-response.js +0 -15
  25. package/dist/cjs/api-model/models/get-invoices-document-response.js +0 -15
  26. package/dist/cjs/api-model/models/get-invoices-export-response.js +0 -15
  27. package/dist/cjs/api-model/models/get-invoices-exports-response.js +0 -15
  28. package/dist/cjs/api-model/models/get-invoices-response.js +0 -15
  29. package/dist/cjs/api-model/models/government-invoice-creation-status.js +0 -24
  30. package/dist/cjs/api-model/models/government-invoice-request.js +0 -15
  31. package/dist/cjs/api-model/models/government-invoice-status-response.js +0 -15
  32. package/dist/cjs/api-model/models/govt-invoice-document-response.js +0 -15
  33. package/dist/cjs/api-model/models/index.js +0 -41
  34. package/dist/cjs/api-model/models/invoice-document.js +0 -15
  35. package/dist/cjs/api-model/models/invoice-error.js +0 -15
  36. package/dist/cjs/api-model/models/invoice.js +0 -15
  37. package/dist/cjs/api-model/models/invoices-attributes.js +0 -15
  38. package/dist/cjs/api-model/models/invoices-document.js +0 -15
  39. package/dist/cjs/api-model/models/model-error.js +0 -15
  40. package/dist/cjs/api-model/models/transaction-identifier.js +0 -15
  41. package/dist/cjs/client.js +0 -84
  42. package/dist/cjs/index.js +0 -19
  43. package/dist/es/api-model/api/invoices-api.js +0 -822
  44. package/dist/es/api-model/api.js +0 -14
  45. package/dist/es/api-model/base.js +0 -44
  46. package/dist/es/api-model/common.js +0 -110
  47. package/dist/es/api-model/configuration.js +0 -94
  48. package/dist/es/api-model/index.js +0 -16
  49. package/dist/es/api-model/models/attribute-option.js +0 -14
  50. package/dist/es/api-model/models/carrier-details-context.js +0 -14
  51. package/dist/es/api-model/models/error-list.js +0 -14
  52. package/dist/es/api-model/models/export-invoices-request.js +0 -14
  53. package/dist/es/api-model/models/export-invoices-response.js +0 -14
  54. package/dist/es/api-model/models/export-status.js +0 -22
  55. package/dist/es/api-model/models/export.js +0 -14
  56. package/dist/es/api-model/models/file-format.js +0 -19
  57. package/dist/es/api-model/models/get-invoice-response.js +0 -14
  58. package/dist/es/api-model/models/get-invoices-attributes-response.js +0 -14
  59. package/dist/es/api-model/models/get-invoices-document-response.js +0 -14
  60. package/dist/es/api-model/models/get-invoices-export-response.js +0 -14
  61. package/dist/es/api-model/models/get-invoices-exports-response.js +0 -14
  62. package/dist/es/api-model/models/get-invoices-response.js +0 -14
  63. package/dist/es/api-model/models/government-invoice-creation-status.js +0 -21
  64. package/dist/es/api-model/models/government-invoice-request.js +0 -14
  65. package/dist/es/api-model/models/government-invoice-status-response.js +0 -14
  66. package/dist/es/api-model/models/govt-invoice-document-response.js +0 -14
  67. package/dist/es/api-model/models/index.js +0 -25
  68. package/dist/es/api-model/models/invoice-document.js +0 -14
  69. package/dist/es/api-model/models/invoice-error.js +0 -14
  70. package/dist/es/api-model/models/invoice.js +0 -14
  71. package/dist/es/api-model/models/invoices-attributes.js +0 -14
  72. package/dist/es/api-model/models/invoices-document.js +0 -14
  73. package/dist/es/api-model/models/model-error.js +0 -14
  74. package/dist/es/api-model/models/transaction-identifier.js +0 -14
  75. package/dist/es/client.js +0 -80
  76. package/dist/es/index.js +0 -3
  77. package/dist/types/api-model/api.d.ts +0 -12
  78. package/dist/types/api-model/base.d.ts +0 -42
  79. package/dist/types/api-model/common.d.ts +0 -34
  80. package/dist/types/api-model/configuration.d.ts +0 -98
  81. package/dist/types/api-model/index.d.ts +0 -14
  82. package/dist/types/api-model/models/attribute-option.d.ts +0 -24
  83. package/dist/types/api-model/models/carrier-details-context.d.ts +0 -48
  84. package/dist/types/api-model/models/error-list.d.ts +0 -20
  85. package/dist/types/api-model/models/export-invoices-request.d.ts +0 -52
  86. package/dist/types/api-model/models/export-invoices-response.d.ts +0 -20
  87. package/dist/types/api-model/models/export-status.d.ts +0 -21
  88. package/dist/types/api-model/models/export.d.ts +0 -38
  89. package/dist/types/api-model/models/file-format.d.ts +0 -18
  90. package/dist/types/api-model/models/get-invoice-response.d.ts +0 -18
  91. package/dist/types/api-model/models/get-invoices-attributes-response.d.ts +0 -18
  92. package/dist/types/api-model/models/get-invoices-document-response.d.ts +0 -18
  93. package/dist/types/api-model/models/get-invoices-export-response.d.ts +0 -18
  94. package/dist/types/api-model/models/get-invoices-exports-response.d.ts +0 -25
  95. package/dist/types/api-model/models/get-invoices-response.d.ts +0 -25
  96. package/dist/types/api-model/models/government-invoice-creation-status.d.ts +0 -20
  97. package/dist/types/api-model/models/government-invoice-request.d.ts +0 -41
  98. package/dist/types/api-model/models/government-invoice-status-response.d.ts +0 -27
  99. package/dist/types/api-model/models/govt-invoice-document-response.d.ts +0 -18
  100. package/dist/types/api-model/models/index.d.ts +0 -25
  101. package/dist/types/api-model/models/invoice-document.d.ts +0 -20
  102. package/dist/types/api-model/models/invoice-error.d.ts +0 -24
  103. package/dist/types/api-model/models/invoice.d.ts +0 -57
  104. package/dist/types/api-model/models/invoices-attributes.d.ts +0 -33
  105. package/dist/types/api-model/models/invoices-document.d.ts +0 -24
  106. package/dist/types/api-model/models/model-error.d.ts +0 -28
  107. package/dist/types/api-model/models/transaction-identifier.d.ts +0 -24
  108. package/dist/types/client.d.ts +0 -6
  109. package/dist/types/index.d.ts +0 -3
package/dist/index.cjs ADDED
@@ -0,0 +1,1090 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ ExportStatus: () => ExportStatus,
34
+ FileFormat: () => FileFormat,
35
+ GetInvoicesExportsStatusEnum: () => GetInvoicesExportsStatusEnum,
36
+ GetInvoicesSortByEnum: () => GetInvoicesSortByEnum,
37
+ GetInvoicesSortOrderEnum: () => GetInvoicesSortOrderEnum,
38
+ GovernmentInvoiceCreationStatus: () => GovernmentInvoiceCreationStatus,
39
+ InvoicesApi: () => InvoicesApi,
40
+ InvoicesApiAxiosParamCreator: () => InvoicesApiAxiosParamCreator,
41
+ InvoicesApiClient: () => InvoicesApiClient,
42
+ InvoicesApiFactory: () => InvoicesApiFactory,
43
+ InvoicesApiFp: () => InvoicesApiFp,
44
+ clientRateLimits: () => clientRateLimits
45
+ });
46
+ module.exports = __toCommonJS(index_exports);
47
+
48
+ // src/client.ts
49
+ var import_common2 = require("@sp-api-sdk/common");
50
+
51
+ // src/api-model/api/invoices-api.ts
52
+ var import_axios2 = __toESM(require("axios"), 1);
53
+
54
+ // src/api-model/base.ts
55
+ var import_axios = __toESM(require("axios"), 1);
56
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
57
+ var COLLECTION_FORMATS = {
58
+ csv: ",",
59
+ ssv: " ",
60
+ tsv: " ",
61
+ pipes: "|"
62
+ };
63
+ var BaseAPI = class {
64
+ constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
65
+ this.basePath = basePath;
66
+ this.axios = axios;
67
+ if (configuration) {
68
+ this.configuration = configuration;
69
+ this.basePath = configuration.basePath ?? basePath;
70
+ }
71
+ }
72
+ basePath;
73
+ axios;
74
+ configuration;
75
+ };
76
+ var RequiredError = class extends Error {
77
+ constructor(field, msg) {
78
+ super(msg);
79
+ this.field = field;
80
+ this.name = "RequiredError";
81
+ }
82
+ field;
83
+ };
84
+ var operationServerMap = {};
85
+
86
+ // src/api-model/common.ts
87
+ var DUMMY_BASE_URL = "https://example.com";
88
+ var assertParamExists = function(functionName, paramName, paramValue) {
89
+ if (paramValue === null || paramValue === void 0) {
90
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
91
+ }
92
+ };
93
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
94
+ if (parameter == null) return;
95
+ if (typeof parameter === "object") {
96
+ if (Array.isArray(parameter) || parameter instanceof Set) {
97
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
98
+ } else {
99
+ Object.keys(parameter).forEach(
100
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
101
+ );
102
+ }
103
+ } else {
104
+ if (urlSearchParams.has(key)) {
105
+ urlSearchParams.append(key, parameter);
106
+ } else {
107
+ urlSearchParams.set(key, parameter);
108
+ }
109
+ }
110
+ }
111
+ var setSearchParams = function(url, ...objects) {
112
+ const searchParams = new URLSearchParams(url.search);
113
+ setFlattenedQueryParams(searchParams, objects);
114
+ url.search = searchParams.toString();
115
+ };
116
+ var replaceWithSerializableTypeIfNeeded = function(key, value) {
117
+ if (value instanceof Set) {
118
+ return Array.from(value);
119
+ } else {
120
+ return value;
121
+ }
122
+ };
123
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
124
+ const nonString = typeof value !== "string";
125
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
126
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
127
+ };
128
+ var toPathString = function(url) {
129
+ return url.pathname + url.search + url.hash;
130
+ };
131
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
132
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
133
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
134
+ return axios.request(axiosRequestArgs);
135
+ };
136
+ };
137
+
138
+ // src/api-model/api/invoices-api.ts
139
+ var InvoicesApiAxiosParamCreator = function(configuration) {
140
+ return {
141
+ /**
142
+ * Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
143
+ * @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ createGovernmentInvoice: async (body, options = {}) => {
148
+ assertParamExists("createGovernmentInvoice", "body", body);
149
+ const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
151
+ let baseOptions;
152
+ if (configuration) {
153
+ baseOptions = configuration.baseOptions;
154
+ }
155
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
156
+ const localVarHeaderParameter = {};
157
+ const localVarQueryParameter = {};
158
+ localVarHeaderParameter["Content-Type"] = "application/json";
159
+ localVarHeaderParameter["Accept"] = "application/json";
160
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
161
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
162
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
163
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
164
+ return {
165
+ url: toPathString(localVarUrlObj),
166
+ options: localVarRequestOptions
167
+ };
168
+ },
169
+ /**
170
+ * Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
171
+ * @param {ExportInvoicesRequest} body Information required to create the export request.
172
+ * @param {*} [options] Override http request option.
173
+ * @throws {RequiredError}
174
+ */
175
+ createInvoicesExport: async (body, options = {}) => {
176
+ assertParamExists("createInvoicesExport", "body", body);
177
+ const localVarPath = `/tax/invoices/2024-06-19/exports`;
178
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
179
+ let baseOptions;
180
+ if (configuration) {
181
+ baseOptions = configuration.baseOptions;
182
+ }
183
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
184
+ const localVarHeaderParameter = {};
185
+ const localVarQueryParameter = {};
186
+ localVarHeaderParameter["Content-Type"] = "application/json";
187
+ localVarHeaderParameter["Accept"] = "application/json";
188
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
189
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
191
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions
195
+ };
196
+ },
197
+ /**
198
+ * Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
199
+ * @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
200
+ * @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
201
+ * @param {string} shipmentId The unique shipment identifier to get an invoice for.
202
+ * @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
203
+ * @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
204
+ * @param {string} [fileFormat] Requested file format. Default is XML
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ getGovernmentInvoiceDocument: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options = {}) => {
209
+ assertParamExists("getGovernmentInvoiceDocument", "marketplaceId", marketplaceId);
210
+ assertParamExists("getGovernmentInvoiceDocument", "transactionType", transactionType);
211
+ assertParamExists("getGovernmentInvoiceDocument", "shipmentId", shipmentId);
212
+ assertParamExists("getGovernmentInvoiceDocument", "invoiceType", invoiceType);
213
+ const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}`.replace("{shipmentId}", encodeURIComponent(String(shipmentId)));
214
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
215
+ let baseOptions;
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ }
219
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
220
+ const localVarHeaderParameter = {};
221
+ const localVarQueryParameter = {};
222
+ if (marketplaceId !== void 0) {
223
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
224
+ }
225
+ if (transactionType !== void 0) {
226
+ localVarQueryParameter["transactionType"] = transactionType;
227
+ }
228
+ if (invoiceType !== void 0) {
229
+ localVarQueryParameter["invoiceType"] = invoiceType;
230
+ }
231
+ if (inboundPlanId !== void 0) {
232
+ localVarQueryParameter["inboundPlanId"] = inboundPlanId;
233
+ }
234
+ if (fileFormat !== void 0) {
235
+ localVarQueryParameter["fileFormat"] = fileFormat;
236
+ }
237
+ localVarHeaderParameter["Accept"] = "application/json";
238
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
239
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
240
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
241
+ return {
242
+ url: toPathString(localVarUrlObj),
243
+ options: localVarRequestOptions
244
+ };
245
+ },
246
+ /**
247
+ * Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
248
+ * @param {string} marketplaceId The invoices status will match the marketplace that you specify.
249
+ * @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \'transactionType\' options using \'getInvoicesAttributes\' operation.
250
+ * @param {string} shipmentId The unique shipment identifier to get an invoice for.
251
+ * @param {string} invoiceType Marketplace specific classification of the invoice type. Check \'invoiceType\' options using \'getInvoicesAttributes\' operation.
252
+ * @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ getGovernmentInvoiceStatus: async (marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options = {}) => {
257
+ assertParamExists("getGovernmentInvoiceStatus", "marketplaceId", marketplaceId);
258
+ assertParamExists("getGovernmentInvoiceStatus", "transactionType", transactionType);
259
+ assertParamExists("getGovernmentInvoiceStatus", "shipmentId", shipmentId);
260
+ assertParamExists("getGovernmentInvoiceStatus", "invoiceType", invoiceType);
261
+ const localVarPath = `/tax/invoices/2024-06-19/governmentInvoiceRequests`;
262
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
263
+ let baseOptions;
264
+ if (configuration) {
265
+ baseOptions = configuration.baseOptions;
266
+ }
267
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
268
+ const localVarHeaderParameter = {};
269
+ const localVarQueryParameter = {};
270
+ if (marketplaceId !== void 0) {
271
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
272
+ }
273
+ if (transactionType !== void 0) {
274
+ localVarQueryParameter["transactionType"] = transactionType;
275
+ }
276
+ if (shipmentId !== void 0) {
277
+ localVarQueryParameter["shipmentId"] = shipmentId;
278
+ }
279
+ if (invoiceType !== void 0) {
280
+ localVarQueryParameter["invoiceType"] = invoiceType;
281
+ }
282
+ if (inboundPlanId !== void 0) {
283
+ localVarQueryParameter["inboundPlanId"] = inboundPlanId;
284
+ }
285
+ localVarHeaderParameter["Accept"] = "application/json";
286
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
287
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
288
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
289
+ return {
290
+ url: toPathString(localVarUrlObj),
291
+ options: localVarRequestOptions
292
+ };
293
+ },
294
+ /**
295
+ * Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
296
+ * @param {string} marketplaceId The marketplace from which you want the invoice.
297
+ * @param {string} invoiceId The invoice identifier.
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ getInvoice: async (marketplaceId, invoiceId, options = {}) => {
302
+ assertParamExists("getInvoice", "marketplaceId", marketplaceId);
303
+ assertParamExists("getInvoice", "invoiceId", invoiceId);
304
+ const localVarPath = `/tax/invoices/2024-06-19/invoices/{invoiceId}`.replace("{invoiceId}", encodeURIComponent(String(invoiceId)));
305
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
306
+ let baseOptions;
307
+ if (configuration) {
308
+ baseOptions = configuration.baseOptions;
309
+ }
310
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
311
+ const localVarHeaderParameter = {};
312
+ const localVarQueryParameter = {};
313
+ if (marketplaceId !== void 0) {
314
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
315
+ }
316
+ localVarHeaderParameter["Accept"] = "application/json";
317
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
318
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
319
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
320
+ return {
321
+ url: toPathString(localVarUrlObj),
322
+ options: localVarRequestOptions
323
+ };
324
+ },
325
+ /**
326
+ * Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
327
+ * @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
328
+ * @param {string} [transactionIdentifierName] The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.
329
+ * @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
330
+ * @param {string} [dateEnd] The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
331
+ * @param {string} [transactionType] The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.
332
+ * @param {string} [transactionIdentifierId] The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.
333
+ * @param {string} [dateStart] The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
334
+ * @param {string} [series] Return invoices with the specified series number.
335
+ * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
336
+ * @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
337
+ * @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.
338
+ * @param {Array<string>} [statuses] A list of statuses that you can use to filter invoices. Use the &#x60;getInvoicesAttributes&#x60; operation to check invoice status options. Min count: 1
339
+ * @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
340
+ * @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
341
+ * @param {*} [options] Override http request option.
342
+ * @throws {RequiredError}
343
+ */
344
+ getInvoices: async (marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options = {}) => {
345
+ assertParamExists("getInvoices", "marketplaceId", marketplaceId);
346
+ const localVarPath = `/tax/invoices/2024-06-19/invoices`;
347
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
348
+ let baseOptions;
349
+ if (configuration) {
350
+ baseOptions = configuration.baseOptions;
351
+ }
352
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
353
+ const localVarHeaderParameter = {};
354
+ const localVarQueryParameter = {};
355
+ if (transactionIdentifierName !== void 0) {
356
+ localVarQueryParameter["transactionIdentifierName"] = transactionIdentifierName;
357
+ }
358
+ if (pageSize !== void 0) {
359
+ localVarQueryParameter["pageSize"] = pageSize;
360
+ }
361
+ if (dateEnd !== void 0) {
362
+ localVarQueryParameter["dateEnd"] = dateEnd instanceof Date ? dateEnd.toISOString() : dateEnd;
363
+ }
364
+ if (marketplaceId !== void 0) {
365
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
366
+ }
367
+ if (transactionType !== void 0) {
368
+ localVarQueryParameter["transactionType"] = transactionType;
369
+ }
370
+ if (transactionIdentifierId !== void 0) {
371
+ localVarQueryParameter["transactionIdentifierId"] = transactionIdentifierId;
372
+ }
373
+ if (dateStart !== void 0) {
374
+ localVarQueryParameter["dateStart"] = dateStart instanceof Date ? dateStart.toISOString() : dateStart;
375
+ }
376
+ if (series !== void 0) {
377
+ localVarQueryParameter["series"] = series;
378
+ }
379
+ if (nextToken !== void 0) {
380
+ localVarQueryParameter["nextToken"] = nextToken;
381
+ }
382
+ if (sortOrder !== void 0) {
383
+ localVarQueryParameter["sortOrder"] = sortOrder;
384
+ }
385
+ if (invoiceType !== void 0) {
386
+ localVarQueryParameter["invoiceType"] = invoiceType;
387
+ }
388
+ if (statuses) {
389
+ localVarQueryParameter["statuses"] = statuses.join(COLLECTION_FORMATS.csv);
390
+ }
391
+ if (externalInvoiceId !== void 0) {
392
+ localVarQueryParameter["externalInvoiceId"] = externalInvoiceId;
393
+ }
394
+ if (sortBy !== void 0) {
395
+ localVarQueryParameter["sortBy"] = sortBy;
396
+ }
397
+ localVarHeaderParameter["Accept"] = "application/json";
398
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
399
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
400
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
401
+ return {
402
+ url: toPathString(localVarUrlObj),
403
+ options: localVarRequestOptions
404
+ };
405
+ },
406
+ /**
407
+ * Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
408
+ * @param {string} marketplaceId The marketplace identifier.
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ */
412
+ getInvoicesAttributes: async (marketplaceId, options = {}) => {
413
+ assertParamExists("getInvoicesAttributes", "marketplaceId", marketplaceId);
414
+ const localVarPath = `/tax/invoices/2024-06-19/attributes`;
415
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
416
+ let baseOptions;
417
+ if (configuration) {
418
+ baseOptions = configuration.baseOptions;
419
+ }
420
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
421
+ const localVarHeaderParameter = {};
422
+ const localVarQueryParameter = {};
423
+ if (marketplaceId !== void 0) {
424
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
425
+ }
426
+ localVarHeaderParameter["Accept"] = "application/json";
427
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
428
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
429
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
430
+ return {
431
+ url: toPathString(localVarUrlObj),
432
+ options: localVarRequestOptions
433
+ };
434
+ },
435
+ /**
436
+ * Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
437
+ * @param {string} invoicesDocumentId The export document identifier.
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ getInvoicesDocument: async (invoicesDocumentId, options = {}) => {
442
+ assertParamExists("getInvoicesDocument", "invoicesDocumentId", invoicesDocumentId);
443
+ const localVarPath = `/tax/invoices/2024-06-19/documents/{invoicesDocumentId}`.replace("{invoicesDocumentId}", encodeURIComponent(String(invoicesDocumentId)));
444
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
445
+ let baseOptions;
446
+ if (configuration) {
447
+ baseOptions = configuration.baseOptions;
448
+ }
449
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
450
+ const localVarHeaderParameter = {};
451
+ const localVarQueryParameter = {};
452
+ localVarHeaderParameter["Accept"] = "application/json";
453
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
454
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
455
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
456
+ return {
457
+ url: toPathString(localVarUrlObj),
458
+ options: localVarRequestOptions
459
+ };
460
+ },
461
+ /**
462
+ * Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
463
+ * @param {string} exportId The unique identifier for the export.
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ getInvoicesExport: async (exportId, options = {}) => {
468
+ assertParamExists("getInvoicesExport", "exportId", exportId);
469
+ const localVarPath = `/tax/invoices/2024-06-19/exports/{exportId}`.replace("{exportId}", encodeURIComponent(String(exportId)));
470
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
471
+ let baseOptions;
472
+ if (configuration) {
473
+ baseOptions = configuration.baseOptions;
474
+ }
475
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
476
+ const localVarHeaderParameter = {};
477
+ const localVarQueryParameter = {};
478
+ localVarHeaderParameter["Accept"] = "application/json";
479
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
480
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
481
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
482
+ return {
483
+ url: toPathString(localVarUrlObj),
484
+ options: localVarRequestOptions
485
+ };
486
+ },
487
+ /**
488
+ * Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
489
+ * @param {string} marketplaceId The returned exports match the specified marketplace.
490
+ * @param {string} [dateStart] The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
491
+ * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
492
+ * @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
493
+ * @param {string} [dateEnd] The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
494
+ * @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
495
+ * @param {*} [options] Override http request option.
496
+ * @throws {RequiredError}
497
+ */
498
+ getInvoicesExports: async (marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options = {}) => {
499
+ assertParamExists("getInvoicesExports", "marketplaceId", marketplaceId);
500
+ const localVarPath = `/tax/invoices/2024-06-19/exports`;
501
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
502
+ let baseOptions;
503
+ if (configuration) {
504
+ baseOptions = configuration.baseOptions;
505
+ }
506
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
507
+ const localVarHeaderParameter = {};
508
+ const localVarQueryParameter = {};
509
+ if (marketplaceId !== void 0) {
510
+ localVarQueryParameter["marketplaceId"] = marketplaceId;
511
+ }
512
+ if (dateStart !== void 0) {
513
+ localVarQueryParameter["dateStart"] = dateStart instanceof Date ? dateStart.toISOString() : dateStart;
514
+ }
515
+ if (nextToken !== void 0) {
516
+ localVarQueryParameter["nextToken"] = nextToken;
517
+ }
518
+ if (pageSize !== void 0) {
519
+ localVarQueryParameter["pageSize"] = pageSize;
520
+ }
521
+ if (dateEnd !== void 0) {
522
+ localVarQueryParameter["dateEnd"] = dateEnd instanceof Date ? dateEnd.toISOString() : dateEnd;
523
+ }
524
+ if (status !== void 0) {
525
+ localVarQueryParameter["status"] = status;
526
+ }
527
+ localVarHeaderParameter["Accept"] = "application/json";
528
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
529
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
530
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
531
+ return {
532
+ url: toPathString(localVarUrlObj),
533
+ options: localVarRequestOptions
534
+ };
535
+ }
536
+ };
537
+ };
538
+ var InvoicesApiFp = function(configuration) {
539
+ const localVarAxiosParamCreator = InvoicesApiAxiosParamCreator(configuration);
540
+ return {
541
+ /**
542
+ * Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
543
+ * @param {GovernmentInvoiceRequest} body Information required to create the government invoice.
544
+ * @param {*} [options] Override http request option.
545
+ * @throws {RequiredError}
546
+ */
547
+ async createGovernmentInvoice(body, options) {
548
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createGovernmentInvoice(body, options);
549
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
550
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.createGovernmentInvoice"]?.[localVarOperationServerIndex]?.url;
551
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
552
+ },
553
+ /**
554
+ * Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
555
+ * @param {ExportInvoicesRequest} body Information required to create the export request.
556
+ * @param {*} [options] Override http request option.
557
+ * @throws {RequiredError}
558
+ */
559
+ async createInvoicesExport(body, options) {
560
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createInvoicesExport(body, options);
561
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
562
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.createInvoicesExport"]?.[localVarOperationServerIndex]?.url;
563
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
564
+ },
565
+ /**
566
+ * Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
567
+ * @param {string} marketplaceId The invoices returned will match the marketplace that you specify.
568
+ * @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \&#39;transactionType\&#39; options using \&#39;getInvoicesAttributes\&#39; operation.
569
+ * @param {string} shipmentId The unique shipment identifier to get an invoice for.
570
+ * @param {string} invoiceType Marketplace specific classification of the invoice type. Check \&#39;invoiceType\&#39; options using \&#39;getInvoicesAttributes\&#39; operation.
571
+ * @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
572
+ * @param {string} [fileFormat] Requested file format. Default is XML
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ */
576
+ async getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options) {
577
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceDocument(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, fileFormat, options);
578
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
579
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getGovernmentInvoiceDocument"]?.[localVarOperationServerIndex]?.url;
580
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
581
+ },
582
+ /**
583
+ * Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
584
+ * @param {string} marketplaceId The invoices status will match the marketplace that you specify.
585
+ * @param {string} transactionType Marketplace specific classification of the transaction type that originated the invoice. Check \&#39;transactionType\&#39; options using \&#39;getInvoicesAttributes\&#39; operation.
586
+ * @param {string} shipmentId The unique shipment identifier to get an invoice for.
587
+ * @param {string} invoiceType Marketplace specific classification of the invoice type. Check \&#39;invoiceType\&#39; options using \&#39;getInvoicesAttributes\&#39; operation.
588
+ * @param {string} [inboundPlanId] The unique InboundPlan identifier in which the shipment is contained and for which the invoice will be created.
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ async getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options) {
593
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGovernmentInvoiceStatus(marketplaceId, transactionType, shipmentId, invoiceType, inboundPlanId, options);
594
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
595
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getGovernmentInvoiceStatus"]?.[localVarOperationServerIndex]?.url;
596
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
597
+ },
598
+ /**
599
+ * Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
600
+ * @param {string} marketplaceId The marketplace from which you want the invoice.
601
+ * @param {string} invoiceId The invoice identifier.
602
+ * @param {*} [options] Override http request option.
603
+ * @throws {RequiredError}
604
+ */
605
+ async getInvoice(marketplaceId, invoiceId, options) {
606
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoice(marketplaceId, invoiceId, options);
607
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
608
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoice"]?.[localVarOperationServerIndex]?.url;
609
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
610
+ },
611
+ /**
612
+ * Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
613
+ * @param {string} marketplaceId The response includes only the invoices that match the specified marketplace.
614
+ * @param {string} [transactionIdentifierName] The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the &#x60;transactionIdentifierId&#x60; field.Use the &#x60;getInvoicesAttributes&#x60; operation to check &#x60;transactionIdentifierName&#x60; options.
615
+ * @param {number} [pageSize] The maximum number of invoices you want to return in a single call. Minimum: 1 Maximum: 200
616
+ * @param {string} [dateEnd] The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.
617
+ * @param {string} [transactionType] The marketplace-specific classification of the transaction type for which the invoice was created. Use the &#x60;getInvoicesAttributes&#x60; operation to check &#x60;transactionType&#x60; options.
618
+ * @param {string} [transactionIdentifierId] The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the &#x60;transactionIdentifierName&#x60; field.
619
+ * @param {string} [dateStart] The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.
620
+ * @param {string} [series] Return invoices with the specified series number.
621
+ * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
622
+ * @param {GetInvoicesSortOrderEnum} [sortOrder] Sort the invoices in the response in ascending or descending order.
623
+ * @param {string} [invoiceType] The marketplace-specific classification of the invoice type. Use the &#x60;getInvoicesAttributes&#x60; operation to check &#x60;invoiceType&#x60; options.
624
+ * @param {Array<string>} [statuses] A list of statuses that you can use to filter invoices. Use the &#x60;getInvoicesAttributes&#x60; operation to check invoice status options. Min count: 1
625
+ * @param {string} [externalInvoiceId] Return invoices that match this external ID. This is typically the Government Invoice ID.
626
+ * @param {GetInvoicesSortByEnum} [sortBy] The attribute by which you want to sort the invoices in the response.
627
+ * @param {*} [options] Override http request option.
628
+ * @throws {RequiredError}
629
+ */
630
+ async getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options) {
631
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoices(marketplaceId, transactionIdentifierName, pageSize, dateEnd, transactionType, transactionIdentifierId, dateStart, series, nextToken, sortOrder, invoiceType, statuses, externalInvoiceId, sortBy, options);
632
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
633
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoices"]?.[localVarOperationServerIndex]?.url;
634
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
635
+ },
636
+ /**
637
+ * Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
638
+ * @param {string} marketplaceId The marketplace identifier.
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ async getInvoicesAttributes(marketplaceId, options) {
643
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesAttributes(marketplaceId, options);
644
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
645
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesAttributes"]?.[localVarOperationServerIndex]?.url;
646
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
647
+ },
648
+ /**
649
+ * Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
650
+ * @param {string} invoicesDocumentId The export document identifier.
651
+ * @param {*} [options] Override http request option.
652
+ * @throws {RequiredError}
653
+ */
654
+ async getInvoicesDocument(invoicesDocumentId, options) {
655
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesDocument(invoicesDocumentId, options);
656
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
657
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesDocument"]?.[localVarOperationServerIndex]?.url;
658
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
659
+ },
660
+ /**
661
+ * Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
662
+ * @param {string} exportId The unique identifier for the export.
663
+ * @param {*} [options] Override http request option.
664
+ * @throws {RequiredError}
665
+ */
666
+ async getInvoicesExport(exportId, options) {
667
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExport(exportId, options);
668
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
669
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesExport"]?.[localVarOperationServerIndex]?.url;
670
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
671
+ },
672
+ /**
673
+ * Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
674
+ * @param {string} marketplaceId The returned exports match the specified marketplace.
675
+ * @param {string} [dateStart] The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.
676
+ * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
677
+ * @param {number} [pageSize] The maximum number of invoices to return in a single call. Minimum: 1 Maximum: 100
678
+ * @param {string} [dateEnd] The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.
679
+ * @param {GetInvoicesExportsStatusEnum} [status] Return exports matching the status specified.
680
+ * @param {*} [options] Override http request option.
681
+ * @throws {RequiredError}
682
+ */
683
+ async getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options) {
684
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInvoicesExports(marketplaceId, dateStart, nextToken, pageSize, dateEnd, status, options);
685
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
686
+ const localVarOperationServerBasePath = operationServerMap["InvoicesApi.getInvoicesExports"]?.[localVarOperationServerIndex]?.url;
687
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
688
+ }
689
+ };
690
+ };
691
+ var InvoicesApiFactory = function(configuration, basePath, axios) {
692
+ const localVarFp = InvoicesApiFp(configuration);
693
+ return {
694
+ /**
695
+ * Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
696
+ * @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
697
+ * @param {*} [options] Override http request option.
698
+ * @throws {RequiredError}
699
+ */
700
+ createGovernmentInvoice(requestParameters, options) {
701
+ return localVarFp.createGovernmentInvoice(requestParameters.body, options).then((request) => request(axios, basePath));
702
+ },
703
+ /**
704
+ * Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
705
+ * @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ */
709
+ createInvoicesExport(requestParameters, options) {
710
+ return localVarFp.createInvoicesExport(requestParameters.body, options).then((request) => request(axios, basePath));
711
+ },
712
+ /**
713
+ * Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
714
+ * @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
715
+ * @param {*} [options] Override http request option.
716
+ * @throws {RequiredError}
717
+ */
718
+ getGovernmentInvoiceDocument(requestParameters, options) {
719
+ return localVarFp.getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(axios, basePath));
720
+ },
721
+ /**
722
+ * Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
723
+ * @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ getGovernmentInvoiceStatus(requestParameters, options) {
728
+ return localVarFp.getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(axios, basePath));
729
+ },
730
+ /**
731
+ * Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
732
+ * @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ */
736
+ getInvoice(requestParameters, options) {
737
+ return localVarFp.getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(axios, basePath));
738
+ },
739
+ /**
740
+ * Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
741
+ * @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
742
+ * @param {*} [options] Override http request option.
743
+ * @throws {RequiredError}
744
+ */
745
+ getInvoices(requestParameters, options) {
746
+ return localVarFp.getInvoices(requestParameters.marketplaceId, requestParameters.transactionIdentifierName, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.transactionType, requestParameters.transactionIdentifierId, requestParameters.dateStart, requestParameters.series, requestParameters.nextToken, requestParameters.sortOrder, requestParameters.invoiceType, requestParameters.statuses, requestParameters.externalInvoiceId, requestParameters.sortBy, options).then((request) => request(axios, basePath));
747
+ },
748
+ /**
749
+ * Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
750
+ * @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
751
+ * @param {*} [options] Override http request option.
752
+ * @throws {RequiredError}
753
+ */
754
+ getInvoicesAttributes(requestParameters, options) {
755
+ return localVarFp.getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(axios, basePath));
756
+ },
757
+ /**
758
+ * Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
759
+ * @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
760
+ * @param {*} [options] Override http request option.
761
+ * @throws {RequiredError}
762
+ */
763
+ getInvoicesDocument(requestParameters, options) {
764
+ return localVarFp.getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(axios, basePath));
765
+ },
766
+ /**
767
+ * Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
768
+ * @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ */
772
+ getInvoicesExport(requestParameters, options) {
773
+ return localVarFp.getInvoicesExport(requestParameters.exportId, options).then((request) => request(axios, basePath));
774
+ },
775
+ /**
776
+ * Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
777
+ * @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
778
+ * @param {*} [options] Override http request option.
779
+ * @throws {RequiredError}
780
+ */
781
+ getInvoicesExports(requestParameters, options) {
782
+ return localVarFp.getInvoicesExports(requestParameters.marketplaceId, requestParameters.dateStart, requestParameters.nextToken, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.status, options).then((request) => request(axios, basePath));
783
+ }
784
+ };
785
+ };
786
+ var InvoicesApi = class extends BaseAPI {
787
+ /**
788
+ * Submits an asynchronous government invoice creation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
789
+ * @param {InvoicesApiCreateGovernmentInvoiceRequest} requestParameters Request parameters.
790
+ * @param {*} [options] Override http request option.
791
+ * @throws {RequiredError}
792
+ */
793
+ createGovernmentInvoice(requestParameters, options) {
794
+ return InvoicesApiFp(this.configuration).createGovernmentInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
795
+ }
796
+ /**
797
+ * Creates an invoice export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
798
+ * @param {InvoicesApiCreateInvoicesExportRequest} requestParameters Request parameters.
799
+ * @param {*} [options] Override http request option.
800
+ * @throws {RequiredError}
801
+ */
802
+ createInvoicesExport(requestParameters, options) {
803
+ return InvoicesApiFp(this.configuration).createInvoicesExport(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
804
+ }
805
+ /**
806
+ * Returns an invoiceDocument object containing an invoiceDocumentUrl . **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
807
+ * @param {InvoicesApiGetGovernmentInvoiceDocumentRequest} requestParameters Request parameters.
808
+ * @param {*} [options] Override http request option.
809
+ * @throws {RequiredError}
810
+ */
811
+ getGovernmentInvoiceDocument(requestParameters, options) {
812
+ return InvoicesApiFp(this.configuration).getGovernmentInvoiceDocument(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, requestParameters.fileFormat, options).then((request) => request(this.axios, this.basePath));
813
+ }
814
+ /**
815
+ * Returns the status of an invoice generation request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
816
+ * @param {InvoicesApiGetGovernmentInvoiceStatusRequest} requestParameters Request parameters.
817
+ * @param {*} [options] Override http request option.
818
+ * @throws {RequiredError}
819
+ */
820
+ getGovernmentInvoiceStatus(requestParameters, options) {
821
+ return InvoicesApiFp(this.configuration).getGovernmentInvoiceStatus(requestParameters.marketplaceId, requestParameters.transactionType, requestParameters.shipmentId, requestParameters.invoiceType, requestParameters.inboundPlanId, options).then((request) => request(this.axios, this.basePath));
822
+ }
823
+ /**
824
+ * Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes. To get the full invoice, use the `createInvoicesExport` operation to start an export request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
825
+ * @param {InvoicesApiGetInvoiceRequest} requestParameters Request parameters.
826
+ * @param {*} [options] Override http request option.
827
+ * @throws {RequiredError}
828
+ */
829
+ getInvoice(requestParameters, options) {
830
+ return InvoicesApiFp(this.configuration).getInvoice(requestParameters.marketplaceId, requestParameters.invoiceId, options).then((request) => request(this.axios, this.basePath));
831
+ }
832
+ /**
833
+ * Returns invoice details for the invoices that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
834
+ * @param {InvoicesApiGetInvoicesRequest} requestParameters Request parameters.
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ getInvoices(requestParameters, options) {
839
+ return InvoicesApiFp(this.configuration).getInvoices(requestParameters.marketplaceId, requestParameters.transactionIdentifierName, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.transactionType, requestParameters.transactionIdentifierId, requestParameters.dateStart, requestParameters.series, requestParameters.nextToken, requestParameters.sortOrder, requestParameters.invoiceType, requestParameters.statuses, requestParameters.externalInvoiceId, requestParameters.sortBy, options).then((request) => request(this.axios, this.basePath));
840
+ }
841
+ /**
842
+ * Returns marketplace-dependent schemas and their respective set of possible values. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
843
+ * @param {InvoicesApiGetInvoicesAttributesRequest} requestParameters Request parameters.
844
+ * @param {*} [options] Override http request option.
845
+ * @throws {RequiredError}
846
+ */
847
+ getInvoicesAttributes(requestParameters, options) {
848
+ return InvoicesApiFp(this.configuration).getInvoicesAttributes(requestParameters.marketplaceId, options).then((request) => request(this.axios, this.basePath));
849
+ }
850
+ /**
851
+ * Returns the invoice document\'s ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
852
+ * @param {InvoicesApiGetInvoicesDocumentRequest} requestParameters Request parameters.
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ getInvoicesDocument(requestParameters, options) {
857
+ return InvoicesApiFp(this.configuration).getInvoicesDocument(requestParameters.invoicesDocumentId, options).then((request) => request(this.axios, this.basePath));
858
+ }
859
+ /**
860
+ * Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
861
+ * @param {InvoicesApiGetInvoicesExportRequest} requestParameters Request parameters.
862
+ * @param {*} [options] Override http request option.
863
+ * @throws {RequiredError}
864
+ */
865
+ getInvoicesExport(requestParameters, options) {
866
+ return InvoicesApiFp(this.configuration).getInvoicesExport(requestParameters.exportId, options).then((request) => request(this.axios, this.basePath));
867
+ }
868
+ /**
869
+ * Returns invoice exports details for exports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.1 | 20 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
870
+ * @param {InvoicesApiGetInvoicesExportsRequest} requestParameters Request parameters.
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ */
874
+ getInvoicesExports(requestParameters, options) {
875
+ return InvoicesApiFp(this.configuration).getInvoicesExports(requestParameters.marketplaceId, requestParameters.dateStart, requestParameters.nextToken, requestParameters.pageSize, requestParameters.dateEnd, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
876
+ }
877
+ };
878
+ var GetInvoicesSortOrderEnum = {
879
+ Desc: "DESC",
880
+ Asc: "ASC"
881
+ };
882
+ var GetInvoicesSortByEnum = {
883
+ StartDateTime: "START_DATE_TIME"
884
+ };
885
+ var GetInvoicesExportsStatusEnum = {
886
+ Requested: "REQUESTED",
887
+ Processing: "PROCESSING",
888
+ Done: "DONE",
889
+ Error: "ERROR"
890
+ };
891
+
892
+ // src/api-model/configuration.ts
893
+ var Configuration = class {
894
+ /**
895
+ * parameter for apiKey security
896
+ * @param name security name
897
+ */
898
+ apiKey;
899
+ /**
900
+ * parameter for basic security
901
+ */
902
+ username;
903
+ /**
904
+ * parameter for basic security
905
+ */
906
+ password;
907
+ /**
908
+ * parameter for oauth2 security
909
+ * @param name security name
910
+ * @param scopes oauth2 scope
911
+ */
912
+ accessToken;
913
+ /**
914
+ * parameter for aws4 signature security
915
+ * @param {Object} AWS4Signature - AWS4 Signature security
916
+ * @param {string} options.region - aws region
917
+ * @param {string} options.service - name of the service.
918
+ * @param {string} credentials.accessKeyId - aws access key id
919
+ * @param {string} credentials.secretAccessKey - aws access key
920
+ * @param {string} credentials.sessionToken - aws session token
921
+ * @memberof Configuration
922
+ */
923
+ awsv4;
924
+ /**
925
+ * override base path
926
+ */
927
+ basePath;
928
+ /**
929
+ * override server index
930
+ */
931
+ serverIndex;
932
+ /**
933
+ * base options for axios calls
934
+ */
935
+ baseOptions;
936
+ /**
937
+ * The FormData constructor that will be used to create multipart form data
938
+ * requests. You can inject this here so that execution environments that
939
+ * do not support the FormData class can still run the generated client.
940
+ *
941
+ * @type {new () => FormData}
942
+ */
943
+ formDataCtor;
944
+ constructor(param = {}) {
945
+ this.apiKey = param.apiKey;
946
+ this.username = param.username;
947
+ this.password = param.password;
948
+ this.accessToken = param.accessToken;
949
+ this.awsv4 = param.awsv4;
950
+ this.basePath = param.basePath;
951
+ this.serverIndex = param.serverIndex;
952
+ this.baseOptions = {
953
+ ...param.baseOptions,
954
+ headers: {
955
+ ...param.baseOptions?.headers
956
+ }
957
+ };
958
+ this.formDataCtor = param.formDataCtor;
959
+ }
960
+ /**
961
+ * Check if the given MIME is a JSON MIME.
962
+ * JSON MIME examples:
963
+ * application/json
964
+ * application/json; charset=UTF8
965
+ * APPLICATION/JSON
966
+ * application/vnd.company+json
967
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
968
+ * @return True if the given MIME is JSON, false otherwise.
969
+ */
970
+ isJsonMime(mime) {
971
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
972
+ return mime !== null && jsonMime.test(mime);
973
+ }
974
+ };
975
+
976
+ // src/api-model/models/export-status.ts
977
+ var ExportStatus = {
978
+ Requested: "REQUESTED",
979
+ Processing: "PROCESSING",
980
+ Done: "DONE",
981
+ Error: "ERROR"
982
+ };
983
+
984
+ // src/api-model/models/file-format.ts
985
+ var FileFormat = {
986
+ Xml: "XML"
987
+ };
988
+
989
+ // src/api-model/models/government-invoice-creation-status.ts
990
+ var GovernmentInvoiceCreationStatus = {
991
+ Processing: "PROCESSING",
992
+ Success: "SUCCESS",
993
+ Error: "ERROR"
994
+ };
995
+
996
+ // src/client.ts
997
+ var clientRateLimits = [
998
+ {
999
+ method: "get",
1000
+ // eslint-disable-next-line prefer-regex-literals
1001
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/attributes$"),
1002
+ rate: 1,
1003
+ burst: 1
1004
+ },
1005
+ {
1006
+ method: "get",
1007
+ // eslint-disable-next-line prefer-regex-literals
1008
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/documents/[^/]*$"),
1009
+ rate: 0.0167,
1010
+ burst: 1
1011
+ },
1012
+ {
1013
+ method: "post",
1014
+ // eslint-disable-next-line prefer-regex-literals
1015
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports$"),
1016
+ rate: 0.167,
1017
+ burst: 1
1018
+ },
1019
+ {
1020
+ method: "get",
1021
+ // eslint-disable-next-line prefer-regex-literals
1022
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports$"),
1023
+ rate: 0.1,
1024
+ burst: 20
1025
+ },
1026
+ {
1027
+ method: "get",
1028
+ // eslint-disable-next-line prefer-regex-literals
1029
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/exports/[^/]*$"),
1030
+ rate: 2,
1031
+ burst: 15
1032
+ },
1033
+ {
1034
+ method: "post",
1035
+ // eslint-disable-next-line prefer-regex-literals
1036
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests$"),
1037
+ rate: 0.0167,
1038
+ burst: 1
1039
+ },
1040
+ {
1041
+ method: "get",
1042
+ // eslint-disable-next-line prefer-regex-literals
1043
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests$"),
1044
+ rate: 0.0167,
1045
+ burst: 1
1046
+ },
1047
+ {
1048
+ method: "get",
1049
+ // eslint-disable-next-line prefer-regex-literals
1050
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/governmentInvoiceRequests/[^/]*$"),
1051
+ rate: 0.0167,
1052
+ burst: 1
1053
+ },
1054
+ {
1055
+ method: "get",
1056
+ // eslint-disable-next-line prefer-regex-literals
1057
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/invoices$"),
1058
+ rate: 0.1,
1059
+ burst: 20
1060
+ },
1061
+ {
1062
+ method: "get",
1063
+ // eslint-disable-next-line prefer-regex-literals
1064
+ urlRegex: new RegExp("^/tax/invoices/2024-06-19/invoices/[^/]*$"),
1065
+ rate: 2,
1066
+ burst: 15
1067
+ }
1068
+ ];
1069
+ var InvoicesApiClient = class extends InvoicesApi {
1070
+ constructor(configuration) {
1071
+ const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
1072
+ super(new Configuration(), endpoint, axios);
1073
+ }
1074
+ };
1075
+ // Annotate the CommonJS export names for ESM import in node:
1076
+ 0 && (module.exports = {
1077
+ ExportStatus,
1078
+ FileFormat,
1079
+ GetInvoicesExportsStatusEnum,
1080
+ GetInvoicesSortByEnum,
1081
+ GetInvoicesSortOrderEnum,
1082
+ GovernmentInvoiceCreationStatus,
1083
+ InvoicesApi,
1084
+ InvoicesApiAxiosParamCreator,
1085
+ InvoicesApiClient,
1086
+ InvoicesApiFactory,
1087
+ InvoicesApiFp,
1088
+ clientRateLimits
1089
+ });
1090
+ //# sourceMappingURL=index.cjs.map