@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1 4.0.16 → 5.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 (77) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +360 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +684 -0
  5. package/dist/index.d.ts +684 -0
  6. package/dist/index.js +314 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/vendor-direct-fulfillment-payments-api.js +0 -117
  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/additional-details.js +0 -20
  16. package/dist/cjs/api-model/models/address.js +0 -15
  17. package/dist/cjs/api-model/models/charge-details.js +0 -25
  18. package/dist/cjs/api-model/models/index.js +0 -30
  19. package/dist/cjs/api-model/models/invoice-detail.js +0 -15
  20. package/dist/cjs/api-model/models/invoice-item.js +0 -15
  21. package/dist/cjs/api-model/models/item-quantity.js +0 -15
  22. package/dist/cjs/api-model/models/model-error.js +0 -15
  23. package/dist/cjs/api-model/models/money.js +0 -15
  24. package/dist/cjs/api-model/models/party-identification.js +0 -15
  25. package/dist/cjs/api-model/models/submit-invoice-request.js +0 -15
  26. package/dist/cjs/api-model/models/submit-invoice-response.js +0 -15
  27. package/dist/cjs/api-model/models/tax-detail.js +0 -32
  28. package/dist/cjs/api-model/models/tax-registration-detail.js +0 -20
  29. package/dist/cjs/api-model/models/transaction-reference.js +0 -15
  30. package/dist/cjs/client.js +0 -21
  31. package/dist/cjs/index.js +0 -19
  32. package/dist/es/api-model/api/vendor-direct-fulfillment-payments-api.js +0 -107
  33. package/dist/es/api-model/api.js +0 -14
  34. package/dist/es/api-model/base.js +0 -44
  35. package/dist/es/api-model/common.js +0 -110
  36. package/dist/es/api-model/configuration.js +0 -94
  37. package/dist/es/api-model/index.js +0 -16
  38. package/dist/es/api-model/models/additional-details.js +0 -17
  39. package/dist/es/api-model/models/address.js +0 -14
  40. package/dist/es/api-model/models/charge-details.js +0 -22
  41. package/dist/es/api-model/models/index.js +0 -14
  42. package/dist/es/api-model/models/invoice-detail.js +0 -14
  43. package/dist/es/api-model/models/invoice-item.js +0 -14
  44. package/dist/es/api-model/models/item-quantity.js +0 -14
  45. package/dist/es/api-model/models/model-error.js +0 -14
  46. package/dist/es/api-model/models/money.js +0 -14
  47. package/dist/es/api-model/models/party-identification.js +0 -14
  48. package/dist/es/api-model/models/submit-invoice-request.js +0 -14
  49. package/dist/es/api-model/models/submit-invoice-response.js +0 -14
  50. package/dist/es/api-model/models/tax-detail.js +0 -29
  51. package/dist/es/api-model/models/tax-registration-detail.js +0 -17
  52. package/dist/es/api-model/models/transaction-reference.js +0 -14
  53. package/dist/es/client.js +0 -17
  54. package/dist/es/index.js +0 -3
  55. package/dist/types/api-model/api/vendor-direct-fulfillment-payments-api.d.ts +0 -74
  56. package/dist/types/api-model/api.d.ts +0 -12
  57. package/dist/types/api-model/base.d.ts +0 -42
  58. package/dist/types/api-model/common.d.ts +0 -34
  59. package/dist/types/api-model/configuration.d.ts +0 -98
  60. package/dist/types/api-model/index.d.ts +0 -14
  61. package/dist/types/api-model/models/additional-details.d.ts +0 -33
  62. package/dist/types/api-model/models/address.d.ts +0 -60
  63. package/dist/types/api-model/models/charge-details.d.ts +0 -37
  64. package/dist/types/api-model/models/index.d.ts +0 -14
  65. package/dist/types/api-model/models/invoice-detail.d.ts +0 -62
  66. package/dist/types/api-model/models/invoice-item.d.ts +0 -54
  67. package/dist/types/api-model/models/item-quantity.d.ts +0 -24
  68. package/dist/types/api-model/models/model-error.d.ts +0 -28
  69. package/dist/types/api-model/models/money.d.ts +0 -24
  70. package/dist/types/api-model/models/party-identification.d.ts +0 -27
  71. package/dist/types/api-model/models/submit-invoice-request.d.ts +0 -21
  72. package/dist/types/api-model/models/submit-invoice-response.d.ts +0 -22
  73. package/dist/types/api-model/models/tax-detail.d.ts +0 -44
  74. package/dist/types/api-model/models/tax-registration-detail.d.ts +0 -35
  75. package/dist/types/api-model/models/transaction-reference.d.ts +0 -20
  76. package/dist/types/client.d.ts +0 -6
  77. package/dist/types/index.d.ts +0 -3
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # `vendor-direct-fulfillment-payments-api-v1`
1
+ # `@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1)](https://www.npmjs.com/package/@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1)
4
4
  [![XO code style](https://img.shields.io/badge/code_style-xo-cyan)](https://github.com/xojs/xo)
@@ -25,10 +25,10 @@ npm install @sp-api-sdk/vendor-direct-fulfillment-payments-api-v1
25
25
  import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
26
26
  import {VendorDirectFulfillmentPaymentsApiClient} from '@sp-api-sdk/vendor-direct-fulfillment-payments-api-v1'
27
27
 
28
+ // `clientId` and `clientSecret` default to the `LWA_CLIENT_ID` and
29
+ // `LWA_CLIENT_SECRET` environment variables.
28
30
  const auth = new SellingPartnerApiAuth({
29
- clientId: process.env.LWA_CLIENT_ID,
30
- clientSecret: process.env.LWA_CLIENT_SECRET,
31
- refreshToken: 'Atzr|…',
31
+ refreshToken: await getRefreshTokenForSeller(sellerId),
32
32
  })
33
33
 
34
34
  const client = new VendorDirectFulfillmentPaymentsApiClient({
package/dist/index.cjs ADDED
@@ -0,0 +1,360 @@
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
+ AdditionalDetailsTypeEnum: () => AdditionalDetailsTypeEnum,
34
+ ChargeDetailsTypeEnum: () => ChargeDetailsTypeEnum,
35
+ TaxDetailTaxTypeEnum: () => TaxDetailTaxTypeEnum,
36
+ TaxRegistrationDetailTaxRegistrationTypeEnum: () => TaxRegistrationDetailTaxRegistrationTypeEnum,
37
+ VendorDirectFulfillmentPaymentsApi: () => VendorDirectFulfillmentPaymentsApi,
38
+ VendorDirectFulfillmentPaymentsApiAxiosParamCreator: () => VendorDirectFulfillmentPaymentsApiAxiosParamCreator,
39
+ VendorDirectFulfillmentPaymentsApiClient: () => VendorDirectFulfillmentPaymentsApiClient,
40
+ VendorDirectFulfillmentPaymentsApiFactory: () => VendorDirectFulfillmentPaymentsApiFactory,
41
+ VendorDirectFulfillmentPaymentsApiFp: () => VendorDirectFulfillmentPaymentsApiFp,
42
+ clientRateLimits: () => clientRateLimits
43
+ });
44
+ module.exports = __toCommonJS(index_exports);
45
+
46
+ // src/client.ts
47
+ var import_common2 = require("@sp-api-sdk/common");
48
+
49
+ // src/api-model/api/vendor-direct-fulfillment-payments-api.ts
50
+ var import_axios2 = __toESM(require("axios"), 1);
51
+
52
+ // src/api-model/base.ts
53
+ var import_axios = __toESM(require("axios"), 1);
54
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
55
+ var BaseAPI = class {
56
+ constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
57
+ this.basePath = basePath;
58
+ this.axios = axios;
59
+ if (configuration) {
60
+ this.configuration = configuration;
61
+ this.basePath = configuration.basePath ?? basePath;
62
+ }
63
+ }
64
+ basePath;
65
+ axios;
66
+ configuration;
67
+ };
68
+ var RequiredError = class extends Error {
69
+ constructor(field, msg) {
70
+ super(msg);
71
+ this.field = field;
72
+ this.name = "RequiredError";
73
+ }
74
+ field;
75
+ };
76
+ var operationServerMap = {};
77
+
78
+ // src/api-model/common.ts
79
+ var DUMMY_BASE_URL = "https://example.com";
80
+ var assertParamExists = function(functionName, paramName, paramValue) {
81
+ if (paramValue === null || paramValue === void 0) {
82
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
83
+ }
84
+ };
85
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
86
+ if (parameter == null) return;
87
+ if (typeof parameter === "object") {
88
+ if (Array.isArray(parameter) || parameter instanceof Set) {
89
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
90
+ } else {
91
+ Object.keys(parameter).forEach(
92
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
93
+ );
94
+ }
95
+ } else {
96
+ if (urlSearchParams.has(key)) {
97
+ urlSearchParams.append(key, parameter);
98
+ } else {
99
+ urlSearchParams.set(key, parameter);
100
+ }
101
+ }
102
+ }
103
+ var setSearchParams = function(url, ...objects) {
104
+ const searchParams = new URLSearchParams(url.search);
105
+ setFlattenedQueryParams(searchParams, objects);
106
+ url.search = searchParams.toString();
107
+ };
108
+ var replaceWithSerializableTypeIfNeeded = function(key, value) {
109
+ if (value instanceof Set) {
110
+ return Array.from(value);
111
+ } else {
112
+ return value;
113
+ }
114
+ };
115
+ var serializeDataIfNeeded = function(value, requestOptions, configuration) {
116
+ const nonString = typeof value !== "string";
117
+ const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
118
+ return needsSerialization ? JSON.stringify(value !== void 0 ? value : {}, replaceWithSerializableTypeIfNeeded) : value || "";
119
+ };
120
+ var toPathString = function(url) {
121
+ return url.pathname + url.search + url.hash;
122
+ };
123
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
124
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
125
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
126
+ return axios.request(axiosRequestArgs);
127
+ };
128
+ };
129
+
130
+ // src/api-model/api/vendor-direct-fulfillment-payments-api.ts
131
+ var VendorDirectFulfillmentPaymentsApiAxiosParamCreator = function(configuration) {
132
+ return {
133
+ /**
134
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).
135
+ * @param {SubmitInvoiceRequest} body The request body containing one or more invoices for vendor orders.
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ submitInvoice: async (body, options = {}) => {
140
+ assertParamExists("submitInvoice", "body", body);
141
+ const localVarPath = `/vendor/directFulfillment/payments/v1/invoices`;
142
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
143
+ let baseOptions;
144
+ if (configuration) {
145
+ baseOptions = configuration.baseOptions;
146
+ }
147
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
148
+ const localVarHeaderParameter = {};
149
+ const localVarQueryParameter = {};
150
+ localVarHeaderParameter["Content-Type"] = "application/json";
151
+ localVarHeaderParameter["Accept"] = "application/json";
152
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
153
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
155
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
156
+ return {
157
+ url: toPathString(localVarUrlObj),
158
+ options: localVarRequestOptions
159
+ };
160
+ }
161
+ };
162
+ };
163
+ var VendorDirectFulfillmentPaymentsApiFp = function(configuration) {
164
+ const localVarAxiosParamCreator = VendorDirectFulfillmentPaymentsApiAxiosParamCreator(configuration);
165
+ return {
166
+ /**
167
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).
168
+ * @param {SubmitInvoiceRequest} body The request body containing one or more invoices for vendor orders.
169
+ * @param {*} [options] Override http request option.
170
+ * @throws {RequiredError}
171
+ */
172
+ async submitInvoice(body, options) {
173
+ const localVarAxiosArgs = await localVarAxiosParamCreator.submitInvoice(body, options);
174
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
175
+ const localVarOperationServerBasePath = operationServerMap["VendorDirectFulfillmentPaymentsApi.submitInvoice"]?.[localVarOperationServerIndex]?.url;
176
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
177
+ }
178
+ };
179
+ };
180
+ var VendorDirectFulfillmentPaymentsApiFactory = function(configuration, basePath, axios) {
181
+ const localVarFp = VendorDirectFulfillmentPaymentsApiFp(configuration);
182
+ return {
183
+ /**
184
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).
185
+ * @param {VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest} requestParameters Request parameters.
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ submitInvoice(requestParameters, options) {
190
+ return localVarFp.submitInvoice(requestParameters.body, options).then((request) => request(axios, basePath));
191
+ }
192
+ };
193
+ };
194
+ var VendorDirectFulfillmentPaymentsApi = class extends BaseAPI {
195
+ /**
196
+ * Submits one or more invoices for a vendor\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).
197
+ * @param {VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest} requestParameters Request parameters.
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ submitInvoice(requestParameters, options) {
202
+ return VendorDirectFulfillmentPaymentsApiFp(this.configuration).submitInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
203
+ }
204
+ };
205
+
206
+ // src/api-model/configuration.ts
207
+ var Configuration = class {
208
+ /**
209
+ * parameter for apiKey security
210
+ * @param name security name
211
+ */
212
+ apiKey;
213
+ /**
214
+ * parameter for basic security
215
+ */
216
+ username;
217
+ /**
218
+ * parameter for basic security
219
+ */
220
+ password;
221
+ /**
222
+ * parameter for oauth2 security
223
+ * @param name security name
224
+ * @param scopes oauth2 scope
225
+ */
226
+ accessToken;
227
+ /**
228
+ * parameter for aws4 signature security
229
+ * @param {Object} AWS4Signature - AWS4 Signature security
230
+ * @param {string} options.region - aws region
231
+ * @param {string} options.service - name of the service.
232
+ * @param {string} credentials.accessKeyId - aws access key id
233
+ * @param {string} credentials.secretAccessKey - aws access key
234
+ * @param {string} credentials.sessionToken - aws session token
235
+ * @memberof Configuration
236
+ */
237
+ awsv4;
238
+ /**
239
+ * override base path
240
+ */
241
+ basePath;
242
+ /**
243
+ * override server index
244
+ */
245
+ serverIndex;
246
+ /**
247
+ * base options for axios calls
248
+ */
249
+ baseOptions;
250
+ /**
251
+ * The FormData constructor that will be used to create multipart form data
252
+ * requests. You can inject this here so that execution environments that
253
+ * do not support the FormData class can still run the generated client.
254
+ *
255
+ * @type {new () => FormData}
256
+ */
257
+ formDataCtor;
258
+ constructor(param = {}) {
259
+ this.apiKey = param.apiKey;
260
+ this.username = param.username;
261
+ this.password = param.password;
262
+ this.accessToken = param.accessToken;
263
+ this.awsv4 = param.awsv4;
264
+ this.basePath = param.basePath;
265
+ this.serverIndex = param.serverIndex;
266
+ this.baseOptions = {
267
+ ...param.baseOptions,
268
+ headers: {
269
+ ...param.baseOptions?.headers
270
+ }
271
+ };
272
+ this.formDataCtor = param.formDataCtor;
273
+ }
274
+ /**
275
+ * Check if the given MIME is a JSON MIME.
276
+ * JSON MIME examples:
277
+ * application/json
278
+ * application/json; charset=UTF8
279
+ * APPLICATION/JSON
280
+ * application/vnd.company+json
281
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
282
+ * @return True if the given MIME is JSON, false otherwise.
283
+ */
284
+ isJsonMime(mime) {
285
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
286
+ return mime !== null && jsonMime.test(mime);
287
+ }
288
+ };
289
+
290
+ // src/api-model/models/additional-details.ts
291
+ var AdditionalDetailsTypeEnum = {
292
+ Sur: "SUR",
293
+ Ocr: "OCR"
294
+ };
295
+
296
+ // src/api-model/models/charge-details.ts
297
+ var ChargeDetailsTypeEnum = {
298
+ Giftwrap: "GIFTWRAP",
299
+ Fulfillment: "FULFILLMENT",
300
+ Marketinginsert: "MARKETINGINSERT",
301
+ Packaging: "PACKAGING",
302
+ Loading: "LOADING",
303
+ Freightout: "FREIGHTOUT",
304
+ TaxCollectedAtSource: "TAX_COLLECTED_AT_SOURCE"
305
+ };
306
+
307
+ // src/api-model/models/tax-detail.ts
308
+ var TaxDetailTaxTypeEnum = {
309
+ Cgst: "CGST",
310
+ Sgst: "SGST",
311
+ Cess: "CESS",
312
+ Utgst: "UTGST",
313
+ Igst: "IGST",
314
+ MwSt: "MwSt.",
315
+ Pst: "PST",
316
+ Tva: "TVA",
317
+ Vat: "VAT",
318
+ Gst: "GST",
319
+ St: "ST",
320
+ Consumption: "Consumption",
321
+ MutuallyDefined: "MutuallyDefined",
322
+ DomesticVat: "DomesticVAT"
323
+ };
324
+
325
+ // src/api-model/models/tax-registration-detail.ts
326
+ var TaxRegistrationDetailTaxRegistrationTypeEnum = {
327
+ Vat: "VAT",
328
+ Gst: "GST"
329
+ };
330
+
331
+ // src/client.ts
332
+ var clientRateLimits = [
333
+ {
334
+ method: "post",
335
+ // eslint-disable-next-line prefer-regex-literals
336
+ urlRegex: new RegExp("^/vendor/directFulfillment/payments/v1/invoices$"),
337
+ rate: 10,
338
+ burst: 10
339
+ }
340
+ ];
341
+ var VendorDirectFulfillmentPaymentsApiClient = class extends VendorDirectFulfillmentPaymentsApi {
342
+ constructor(configuration) {
343
+ const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
344
+ super(new Configuration(), endpoint, axios);
345
+ }
346
+ };
347
+ // Annotate the CommonJS export names for ESM import in node:
348
+ 0 && (module.exports = {
349
+ AdditionalDetailsTypeEnum,
350
+ ChargeDetailsTypeEnum,
351
+ TaxDetailTaxTypeEnum,
352
+ TaxRegistrationDetailTaxRegistrationTypeEnum,
353
+ VendorDirectFulfillmentPaymentsApi,
354
+ VendorDirectFulfillmentPaymentsApiAxiosParamCreator,
355
+ VendorDirectFulfillmentPaymentsApiClient,
356
+ VendorDirectFulfillmentPaymentsApiFactory,
357
+ VendorDirectFulfillmentPaymentsApiFp,
358
+ clientRateLimits
359
+ });
360
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/api-model/api/vendor-direct-fulfillment-payments-api.ts","../src/api-model/base.ts","../src/api-model/common.ts","../src/api-model/configuration.ts","../src/api-model/models/additional-details.ts","../src/api-model/models/charge-details.ts","../src/api-model/models/tax-detail.ts","../src/api-model/models/tax-registration-detail.ts"],"sourcesContent":["export * from './client.js'\nexport * from './api-model/api.js'\nexport * from './api-model/models/index.js'\n","import {type ClientConfiguration, createAxiosInstance, type RateLimit} from '@sp-api-sdk/common'\n\nimport {Configuration, VendorDirectFulfillmentPaymentsApi} from './api-model/index.js'\n\nexport const clientRateLimits: RateLimit[] = [\n {\n method: 'post',\n // eslint-disable-next-line prefer-regex-literals\n urlRegex: new RegExp('^/vendor/directFulfillment/payments/v1/invoices$'),\n rate: 10,\n burst: 10,\n },\n]\n\nexport class VendorDirectFulfillmentPaymentsApiClient extends VendorDirectFulfillmentPaymentsApi {\n constructor(configuration: ClientConfiguration) {\n const {axios, endpoint} = createAxiosInstance(configuration, clientRateLimits)\n\n super(new Configuration(), endpoint, axios)\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from '../configuration.js';\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common.js';\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base.js';\n// @ts-ignore\nimport type { SubmitInvoiceRequest } from '../models/index.js';\n// @ts-ignore\nimport type { SubmitInvoiceResponse } from '../models/index.js';\n/**\n * VendorDirectFulfillmentPaymentsApi - axios parameter creator\n */\nexport const VendorDirectFulfillmentPaymentsApiAxiosParamCreator = function (configuration?: Configuration) {\n return {\n /**\n * Submits one or more invoices for a vendor\\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).\n * @param {SubmitInvoiceRequest} body The request body containing one or more invoices for vendor orders.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n submitInvoice: async (body: SubmitInvoiceRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {\n // verify required parameter 'body' is not null or undefined\n assertParamExists('submitInvoice', 'body', body)\n const localVarPath = `/vendor/directFulfillment/payments/v1/invoices`;\n // use dummy base URL string because the URL constructor only accepts absolute URLs.\n const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);\n let baseOptions;\n if (configuration) {\n baseOptions = configuration.baseOptions;\n }\n\n const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};\n const localVarHeaderParameter = {} as any;\n const localVarQueryParameter = {} as any;\n\n localVarHeaderParameter['Content-Type'] = 'application/json';\n localVarHeaderParameter['Accept'] = 'application/json';\n\n setSearchParams(localVarUrlObj, localVarQueryParameter);\n let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};\n localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};\n localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)\n\n return {\n url: toPathString(localVarUrlObj),\n options: localVarRequestOptions,\n };\n },\n }\n};\n\n/**\n * VendorDirectFulfillmentPaymentsApi - functional programming interface\n */\nexport const VendorDirectFulfillmentPaymentsApiFp = function(configuration?: Configuration) {\n const localVarAxiosParamCreator = VendorDirectFulfillmentPaymentsApiAxiosParamCreator(configuration)\n return {\n /**\n * Submits one or more invoices for a vendor\\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).\n * @param {SubmitInvoiceRequest} body The request body containing one or more invoices for vendor orders.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n async submitInvoice(body: SubmitInvoiceRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitInvoiceResponse>> {\n const localVarAxiosArgs = await localVarAxiosParamCreator.submitInvoice(body, options);\n const localVarOperationServerIndex = configuration?.serverIndex ?? 0;\n const localVarOperationServerBasePath = operationServerMap['VendorDirectFulfillmentPaymentsApi.submitInvoice']?.[localVarOperationServerIndex]?.url;\n return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);\n },\n }\n};\n\n/**\n * VendorDirectFulfillmentPaymentsApi - factory interface\n */\nexport const VendorDirectFulfillmentPaymentsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {\n const localVarFp = VendorDirectFulfillmentPaymentsApiFp(configuration)\n return {\n /**\n * Submits one or more invoices for a vendor\\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).\n * @param {VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n submitInvoice(requestParameters: VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<SubmitInvoiceResponse> {\n return localVarFp.submitInvoice(requestParameters.body, options).then((request) => request(axios, basePath));\n },\n };\n};\n\n/**\n * Request parameters for submitInvoice operation in VendorDirectFulfillmentPaymentsApi.\n */\nexport interface VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest {\n /**\n * The request body containing one or more invoices for vendor orders.\n */\n readonly body: SubmitInvoiceRequest\n}\n\n/**\n * VendorDirectFulfillmentPaymentsApi - object-oriented interface\n */\nexport class VendorDirectFulfillmentPaymentsApi extends BaseAPI {\n /**\n * Submits one or more invoices for a vendor\\'s direct fulfillment orders. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [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).\n * @param {VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest} requestParameters Request parameters.\n * @param {*} [options] Override http request option.\n * @throws {RequiredError}\n */\n public submitInvoice(requestParameters: VendorDirectFulfillmentPaymentsApiSubmitInvoiceRequest, options?: RawAxiosRequestConfig) {\n return VendorDirectFulfillmentPaymentsApiFp(this.configuration).submitInvoice(requestParameters.body, options).then((request) => request(this.axios, this.basePath));\n }\n}\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nimport type { Configuration } from './configuration.js';\n// Some imports not used depending on template conditions\n// @ts-ignore\nimport type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';\nimport globalAxios from 'axios';\n\nexport const BASE_PATH = \"https://sellingpartnerapi-na.amazon.com\".replace(/\\/+$/, \"\");\n\nexport const COLLECTION_FORMATS = {\n csv: \",\",\n ssv: \" \",\n tsv: \"\\t\",\n pipes: \"|\",\n};\n\nexport interface RequestArgs {\n url: string;\n options: RawAxiosRequestConfig;\n}\n\nexport class BaseAPI {\n protected configuration: Configuration | undefined;\n\n constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {\n if (configuration) {\n this.configuration = configuration;\n this.basePath = configuration.basePath ?? basePath;\n }\n }\n};\n\nexport class RequiredError extends Error {\n constructor(public field: string, msg?: string) {\n super(msg);\n this.name = \"RequiredError\"\n }\n}\n\ninterface ServerMap {\n [key: string]: {\n url: string,\n description: string,\n }[];\n}\n\nexport const operationServerMap: ServerMap = {\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport type { Configuration } from \"./configuration.js\";\nimport type { RequestArgs } from \"./base.js\";\nimport type { AxiosInstance, AxiosResponse } from 'axios';\nimport { RequiredError } from \"./base.js\";\n\nexport const DUMMY_BASE_URL = 'https://example.com'\n\n/**\n *\n * @throws {RequiredError}\n */\nexport const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) {\n if (paramValue === null || paramValue === undefined) {\n throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);\n }\n}\n\nexport const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) {\n if (configuration && configuration.apiKey) {\n const localVarApiKeyValue = typeof configuration.apiKey === 'function'\n ? await configuration.apiKey(keyParamName)\n : await configuration.apiKey;\n object[keyParamName] = localVarApiKeyValue;\n }\n}\n\nexport const setBasicAuthToObject = function (object: any, configuration?: Configuration) {\n if (configuration && (configuration.username || configuration.password)) {\n object[\"auth\"] = { username: configuration.username, password: configuration.password };\n }\n}\n\nexport const setBearerAuthToObject = async function (object: any, configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const accessToken = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken()\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n}\n\nexport const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) {\n if (configuration && configuration.accessToken) {\n const localVarAccessTokenValue = typeof configuration.accessToken === 'function'\n ? await configuration.accessToken(name, scopes)\n : await configuration.accessToken;\n object[\"Authorization\"] = \"Bearer \" + localVarAccessTokenValue;\n }\n}\n\n\nfunction setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = \"\"): void {\n if (parameter == null) return;\n if (typeof parameter === \"object\") {\n if (Array.isArray(parameter) || parameter instanceof Set) {\n (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));\n }\n else {\n Object.keys(parameter).forEach(currentKey =>\n setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)\n );\n }\n }\n else {\n if (urlSearchParams.has(key)) {\n urlSearchParams.append(key, parameter);\n }\n else {\n urlSearchParams.set(key, parameter);\n }\n }\n}\n\nexport const setSearchParams = function (url: URL, ...objects: any[]) {\n const searchParams = new URLSearchParams(url.search);\n setFlattenedQueryParams(searchParams, objects);\n url.search = searchParams.toString();\n}\n\n/**\n * JSON serialization helper function which replaces instances of unserializable types with serializable ones.\n * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.\n * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.\n */\n// @ts-ignore\nexport const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {\n if (value instanceof Set) {\n return Array.from(value);\n } else {\n return value;\n }\n}\n\nexport const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {\n const nonString = typeof value !== 'string';\n const needsSerialization = nonString && configuration && configuration.isJsonMime\n ? configuration.isJsonMime(requestOptions.headers['Content-Type'])\n : nonString;\n return needsSerialization\n ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)\n : (value || \"\");\n}\n\nexport const toPathString = function (url: URL) {\n return url.pathname + url.search + url.hash\n}\n\nexport const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {\n return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {\n const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url};\n return axios.request<T, R>(axiosRequestArgs);\n };\n}\n","/* tslint:disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\ninterface AWSv4Configuration {\n options?: {\n region?: string\n service?: string\n }\n credentials?: {\n accessKeyId?: string\n secretAccessKey?: string,\n sessionToken?: string\n }\n}\n\nexport interface ConfigurationParameters {\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n username?: string;\n password?: string;\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n awsv4?: AWSv4Configuration;\n basePath?: string;\n serverIndex?: number;\n baseOptions?: any;\n formDataCtor?: new () => any;\n}\n\nexport class Configuration {\n /**\n * parameter for apiKey security\n * @param name security name\n */\n apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);\n /**\n * parameter for basic security\n */\n username?: string;\n /**\n * parameter for basic security\n */\n password?: string;\n /**\n * parameter for oauth2 security\n * @param name security name\n * @param scopes oauth2 scope\n */\n accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);\n /**\n * parameter for aws4 signature security\n * @param {Object} AWS4Signature - AWS4 Signature security\n * @param {string} options.region - aws region\n * @param {string} options.service - name of the service.\n * @param {string} credentials.accessKeyId - aws access key id\n * @param {string} credentials.secretAccessKey - aws access key\n * @param {string} credentials.sessionToken - aws session token\n * @memberof Configuration\n */\n awsv4?: AWSv4Configuration;\n /**\n * override base path\n */\n basePath?: string;\n /**\n * override server index\n */\n serverIndex?: number;\n /**\n * base options for axios calls\n */\n baseOptions?: any;\n /**\n * The FormData constructor that will be used to create multipart form data\n * requests. You can inject this here so that execution environments that\n * do not support the FormData class can still run the generated client.\n *\n * @type {new () => FormData}\n */\n formDataCtor?: new () => any;\n\n constructor(param: ConfigurationParameters = {}) {\n this.apiKey = param.apiKey;\n this.username = param.username;\n this.password = param.password;\n this.accessToken = param.accessToken;\n this.awsv4 = param.awsv4;\n this.basePath = param.basePath;\n this.serverIndex = param.serverIndex;\n this.baseOptions = {\n ...param.baseOptions,\n headers: {\n ...param.baseOptions?.headers,\n },\n };\n this.formDataCtor = param.formDataCtor;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = /^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$/i;\n return mime !== null && jsonMime.test(mime);\n }\n}\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n\n/**\n * A field where the selling party can provide additional information for tax-related or any other purposes.\n */\nexport interface AdditionalDetails {\n /**\n * The type of the additional information provided by the selling party.\n */\n 'type': AdditionalDetailsTypeEnum;\n /**\n * The detail of the additional information provided by the selling party.\n */\n 'detail': string;\n /**\n * The language code of the additional information detail.\n */\n 'languageCode'?: string;\n}\n\nexport const AdditionalDetailsTypeEnum = {\n Sur: 'SUR',\n Ocr: 'OCR',\n} as const;\n\nexport type AdditionalDetailsTypeEnum = typeof AdditionalDetailsTypeEnum[keyof typeof AdditionalDetailsTypeEnum];\n\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { Money } from './money.js';\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { TaxDetail } from './tax-detail.js';\n\n/**\n * Monetary and tax details of the charge.\n */\nexport interface ChargeDetails {\n /**\n * Type of charge applied.\n */\n 'type': ChargeDetailsTypeEnum;\n 'chargeAmount': Money;\n /**\n * Individual tax details per line item.\n */\n 'taxDetails'?: Array<TaxDetail>;\n}\n\nexport const ChargeDetailsTypeEnum = {\n Giftwrap: 'GIFTWRAP',\n Fulfillment: 'FULFILLMENT',\n Marketinginsert: 'MARKETINGINSERT',\n Packaging: 'PACKAGING',\n Loading: 'LOADING',\n Freightout: 'FREIGHTOUT',\n TaxCollectedAtSource: 'TAX_COLLECTED_AT_SOURCE',\n} as const;\n\nexport type ChargeDetailsTypeEnum = typeof ChargeDetailsTypeEnum[keyof typeof ChargeDetailsTypeEnum];\n\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { Money } from './money.js';\n\n/**\n * Details of tax amount applied.\n */\nexport interface TaxDetail {\n /**\n * Type of the tax applied.\n */\n 'taxType': TaxDetailTaxTypeEnum;\n /**\n * A decimal number with no loss of precision. Useful when precision loss is unacceptable, as with currencies. Follows RFC7159 for number representation. <br>**Pattern** : `^-?(0|([1-9]\\\\d*))(\\\\.\\\\d+)?([eE][+-]?\\\\d+)?$`.\n */\n 'taxRate'?: string;\n 'taxAmount': Money;\n 'taxableAmount'?: Money;\n}\n\nexport const TaxDetailTaxTypeEnum = {\n Cgst: 'CGST',\n Sgst: 'SGST',\n Cess: 'CESS',\n Utgst: 'UTGST',\n Igst: 'IGST',\n MwSt: 'MwSt.',\n Pst: 'PST',\n Tva: 'TVA',\n Vat: 'VAT',\n Gst: 'GST',\n St: 'ST',\n Consumption: 'Consumption',\n MutuallyDefined: 'MutuallyDefined',\n DomesticVat: 'DomesticVAT',\n} as const;\n\nexport type TaxDetailTaxTypeEnum = typeof TaxDetailTaxTypeEnum[keyof typeof TaxDetailTaxTypeEnum];\n\n\n","/* tslint:disable */\n/* eslint-disable */\n/**\n * Selling Partner API for Direct Fulfillment Payments\n * The Selling Partner API for Direct Fulfillment Payments provides programmatic access to a direct fulfillment vendor\\'s invoice data.\n *\n * The version of the OpenAPI document: v1\n * \n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\n// May contain unused imports in some cases\n// @ts-ignore\nimport type { Address } from './address.js';\n\n/**\n * Tax registration details of the entity.\n */\nexport interface TaxRegistrationDetail {\n /**\n * Tax registration type for the entity.\n */\n 'taxRegistrationType'?: TaxRegistrationDetailTaxRegistrationTypeEnum;\n /**\n * Tax registration number for the entity. For example, VAT ID, Consumption Tax ID.\n */\n 'taxRegistrationNumber': string;\n 'taxRegistrationAddress'?: Address;\n /**\n * Tax registration message that can be used for additional tax related details.\n */\n 'taxRegistrationMessage'?: string;\n}\n\nexport const TaxRegistrationDetailTaxRegistrationTypeEnum = {\n Vat: 'VAT',\n Gst: 'GST',\n} as const;\n\nexport type TaxRegistrationDetailTaxRegistrationTypeEnum = typeof TaxRegistrationDetailTaxRegistrationTypeEnum[keyof typeof TaxRegistrationDetailTaxRegistrationTypeEnum];\n\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAA4E;;;ACiB5E,IAAAC,gBAAwB;;;ACExB,mBAAwB;AAEjB,IAAM,YAAY,0CAA0C,QAAQ,QAAQ,EAAE;AAc9E,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,eAAyC,WAAmB,WAAqB,QAAuB,aAAAC,SAAa;AAA5E;AAAwC;AACzF,QAAI,eAAe;AACf,WAAK,gBAAgB;AACrB,WAAK,WAAW,cAAc,YAAY;AAAA,IAC9C;AAAA,EACJ;AAAA,EALqD;AAAA,EAAwC;AAAA,EAFnF;AAQd;AAEO,IAAM,gBAAN,cAA4B,MAAM;AAAA,EACrC,YAAmB,OAAe,KAAc;AAC5C,UAAM,GAAG;AADM;AAEf,SAAK,OAAO;AAAA,EAChB;AAAA,EAHmB;AAIvB;AASO,IAAM,qBAAgC,CAC7C;;;AC1CO,IAAM,iBAAiB;AAMvB,IAAM,oBAAoB,SAAU,cAAsB,WAAmB,YAAqB;AACrG,MAAI,eAAe,QAAQ,eAAe,QAAW;AACjD,UAAM,IAAI,cAAc,WAAW,sBAAsB,SAAS,uCAAuC,YAAY,GAAG;AAAA,EAC5H;AACJ;AAoCA,SAAS,wBAAwB,iBAAkC,WAAgB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