@sp-api-sdk/external-fulfillment-returns-api-2024-09-11 1.1.12 → 2.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 (71) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +461 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +707 -0
  5. package/dist/index.d.ts +707 -0
  6. package/dist/index.js +414 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/external-fulfillment-returns-api.js +0 -259
  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/error-list.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -28
  17. package/dist/cjs/api-model/models/invoice-information.js +0 -15
  18. package/dist/cjs/api-model/models/marketplace-channel-details.js +0 -15
  19. package/dist/cjs/api-model/models/marketplace-channel.js +0 -15
  20. package/dist/cjs/api-model/models/model-error.js +0 -15
  21. package/dist/cjs/api-model/models/otp-details.js +0 -15
  22. package/dist/cjs/api-model/models/replanning-details.js +0 -15
  23. package/dist/cjs/api-model/models/return-metadata.js +0 -15
  24. package/dist/cjs/api-model/models/return-shipping-info.js +0 -15
  25. package/dist/cjs/api-model/models/return.js +0 -46
  26. package/dist/cjs/api-model/models/returns-response.js +0 -15
  27. package/dist/cjs/api-model/models/tracking-info.js +0 -15
  28. package/dist/cjs/client.js +0 -13
  29. package/dist/cjs/index.js +0 -19
  30. package/dist/es/api-model/api/external-fulfillment-returns-api.js +0 -249
  31. package/dist/es/api-model/api.js +0 -14
  32. package/dist/es/api-model/base.js +0 -44
  33. package/dist/es/api-model/common.js +0 -110
  34. package/dist/es/api-model/configuration.js +0 -94
  35. package/dist/es/api-model/index.js +0 -16
  36. package/dist/es/api-model/models/error-list.js +0 -14
  37. package/dist/es/api-model/models/index.js +0 -12
  38. package/dist/es/api-model/models/invoice-information.js +0 -14
  39. package/dist/es/api-model/models/marketplace-channel-details.js +0 -14
  40. package/dist/es/api-model/models/marketplace-channel.js +0 -14
  41. package/dist/es/api-model/models/model-error.js +0 -14
  42. package/dist/es/api-model/models/otp-details.js +0 -14
  43. package/dist/es/api-model/models/replanning-details.js +0 -14
  44. package/dist/es/api-model/models/return-metadata.js +0 -14
  45. package/dist/es/api-model/models/return-shipping-info.js +0 -14
  46. package/dist/es/api-model/models/return.js +0 -43
  47. package/dist/es/api-model/models/returns-response.js +0 -14
  48. package/dist/es/api-model/models/tracking-info.js +0 -14
  49. package/dist/es/client.js +0 -9
  50. package/dist/es/index.js +0 -3
  51. package/dist/types/api-model/api/external-fulfillment-returns-api.d.ts +0 -195
  52. package/dist/types/api-model/api.d.ts +0 -12
  53. package/dist/types/api-model/base.d.ts +0 -42
  54. package/dist/types/api-model/common.d.ts +0 -34
  55. package/dist/types/api-model/configuration.d.ts +0 -98
  56. package/dist/types/api-model/index.d.ts +0 -14
  57. package/dist/types/api-model/models/error-list.d.ts +0 -20
  58. package/dist/types/api-model/models/index.d.ts +0 -12
  59. package/dist/types/api-model/models/invoice-information.d.ts +0 -20
  60. package/dist/types/api-model/models/marketplace-channel-details.d.ts +0 -42
  61. package/dist/types/api-model/models/marketplace-channel.d.ts +0 -24
  62. package/dist/types/api-model/models/model-error.d.ts +0 -28
  63. package/dist/types/api-model/models/otp-details.d.ts +0 -24
  64. package/dist/types/api-model/models/replanning-details.d.ts +0 -21
  65. package/dist/types/api-model/models/return-metadata.d.ts +0 -30
  66. package/dist/types/api-model/models/return-shipping-info.d.ts +0 -27
  67. package/dist/types/api-model/models/return.d.ts +0 -104
  68. package/dist/types/api-model/models/returns-response.d.ts +0 -25
  69. package/dist/types/api-model/models/tracking-info.d.ts +0 -24
  70. package/dist/types/client.d.ts +0 -6
  71. package/dist/types/index.d.ts +0 -3
@@ -1,259 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.ListReturnsStatusEnum = exports.ExternalFulfillmentReturnsApi = exports.ExternalFulfillmentReturnsApiFactory = exports.ExternalFulfillmentReturnsApiFp = exports.ExternalFulfillmentReturnsApiAxiosParamCreator = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- // Some imports not used depending on template conditions
22
- // @ts-ignore
23
- const common_1 = require("../common");
24
- // @ts-ignore
25
- const base_1 = require("../base");
26
- /**
27
- * ExternalFulfillmentReturnsApi - axios parameter creator
28
- */
29
- const ExternalFulfillmentReturnsApiAxiosParamCreator = function (configuration) {
30
- return {
31
- /**
32
- * Retrieve the return item with the specified ID.
33
- * @param {string} returnId The ID of the return item you want.
34
- * @param {*} [options] Override http request option.
35
- * @throws {RequiredError}
36
- */
37
- getReturn: async (returnId, options = {}) => {
38
- // verify required parameter 'returnId' is not null or undefined
39
- (0, common_1.assertParamExists)('getReturn', 'returnId', returnId);
40
- const localVarPath = `/externalFulfillment/2024-09-11/returns/{returnId}`
41
- .replace('{returnId}', encodeURIComponent(String(returnId)));
42
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
44
- let baseOptions;
45
- if (configuration) {
46
- baseOptions = configuration.baseOptions;
47
- }
48
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
49
- const localVarHeaderParameter = {};
50
- const localVarQueryParameter = {};
51
- localVarHeaderParameter['Accept'] = 'application/json';
52
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
53
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
54
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
55
- return {
56
- url: (0, common_1.toPathString)(localVarUrlObj),
57
- options: localVarRequestOptions,
58
- };
59
- },
60
- /**
61
- * Retrieve a list of return items. You can filter results by location, RMA ID, status, or time.
62
- * @param {string} [returnLocationId] The SmartConnect location ID of the location from which you want to retrieve return items.
63
- * @param {string} [rmaId] The RMA ID of the return items you want to list.
64
- * @param {ListReturnsStatusEnum} [status] The status of return items you want to list. You can retrieve all new return items with the `CREATED` status.
65
- * @param {string} [reverseTrackingId] The reverse tracking ID of the return items you want to list.
66
- * @param {string} [createdSince] Return items created after the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
67
- * @param {string} [createdUntil] Return items created before the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
68
- * @param {string} [lastUpdatedSince] Return items updated after the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. If you supply this parameter, you must also supply `returnLocationId` and `status`.
69
- * @param {string} [lastUpdatedUntil] Return items whose most recent update is before the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. If you supply this parameter, you must also supply `returnLocationId` and `status`.
70
- * @param {string} [lastUpdatedAfter] DEPRECATED. Use the `createdSince` parameter.
71
- * @param {string} [lastUpdatedBefore] DEPRECATED. Use the `createdUntil` parameter.
72
- * @param {number} [maxResults] The number of return items you want to include in the response. **Default:** 10 **Maximum:** 100
73
- * @param {string} [nextToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. 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.
74
- * @param {*} [options] Override http request option.
75
- * @throws {RequiredError}
76
- */
77
- listReturns: async (returnLocationId, rmaId, status, reverseTrackingId, createdSince, createdUntil, lastUpdatedSince, lastUpdatedUntil, lastUpdatedAfter, lastUpdatedBefore, maxResults, nextToken, options = {}) => {
78
- const localVarPath = `/externalFulfillment/2024-09-11/returns`;
79
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
81
- let baseOptions;
82
- if (configuration) {
83
- baseOptions = configuration.baseOptions;
84
- }
85
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
86
- const localVarHeaderParameter = {};
87
- const localVarQueryParameter = {};
88
- if (returnLocationId !== undefined) {
89
- localVarQueryParameter['returnLocationId'] = returnLocationId;
90
- }
91
- if (rmaId !== undefined) {
92
- localVarQueryParameter['rmaId'] = rmaId;
93
- }
94
- if (status !== undefined) {
95
- localVarQueryParameter['status'] = status;
96
- }
97
- if (reverseTrackingId !== undefined) {
98
- localVarQueryParameter['reverseTrackingId'] = reverseTrackingId;
99
- }
100
- if (createdSince !== undefined) {
101
- localVarQueryParameter['createdSince'] = (createdSince instanceof Date) ?
102
- createdSince.toISOString() :
103
- createdSince;
104
- }
105
- if (createdUntil !== undefined) {
106
- localVarQueryParameter['createdUntil'] = (createdUntil instanceof Date) ?
107
- createdUntil.toISOString() :
108
- createdUntil;
109
- }
110
- if (lastUpdatedSince !== undefined) {
111
- localVarQueryParameter['lastUpdatedSince'] = (lastUpdatedSince instanceof Date) ?
112
- lastUpdatedSince.toISOString() :
113
- lastUpdatedSince;
114
- }
115
- if (lastUpdatedUntil !== undefined) {
116
- localVarQueryParameter['lastUpdatedUntil'] = (lastUpdatedUntil instanceof Date) ?
117
- lastUpdatedUntil.toISOString() :
118
- lastUpdatedUntil;
119
- }
120
- if (lastUpdatedAfter !== undefined) {
121
- localVarQueryParameter['lastUpdatedAfter'] = (lastUpdatedAfter instanceof Date) ?
122
- lastUpdatedAfter.toISOString() :
123
- lastUpdatedAfter;
124
- }
125
- if (lastUpdatedBefore !== undefined) {
126
- localVarQueryParameter['lastUpdatedBefore'] = (lastUpdatedBefore instanceof Date) ?
127
- lastUpdatedBefore.toISOString() :
128
- lastUpdatedBefore;
129
- }
130
- if (maxResults !== undefined) {
131
- localVarQueryParameter['maxResults'] = maxResults;
132
- }
133
- if (nextToken !== undefined) {
134
- localVarQueryParameter['nextToken'] = nextToken;
135
- }
136
- localVarHeaderParameter['Accept'] = 'application/json';
137
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
138
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
139
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
140
- return {
141
- url: (0, common_1.toPathString)(localVarUrlObj),
142
- options: localVarRequestOptions,
143
- };
144
- },
145
- };
146
- };
147
- exports.ExternalFulfillmentReturnsApiAxiosParamCreator = ExternalFulfillmentReturnsApiAxiosParamCreator;
148
- /**
149
- * ExternalFulfillmentReturnsApi - functional programming interface
150
- */
151
- const ExternalFulfillmentReturnsApiFp = function (configuration) {
152
- const localVarAxiosParamCreator = (0, exports.ExternalFulfillmentReturnsApiAxiosParamCreator)(configuration);
153
- return {
154
- /**
155
- * Retrieve the return item with the specified ID.
156
- * @param {string} returnId The ID of the return item you want.
157
- * @param {*} [options] Override http request option.
158
- * @throws {RequiredError}
159
- */
160
- async getReturn(returnId, options) {
161
- const localVarAxiosArgs = await localVarAxiosParamCreator.getReturn(returnId, options);
162
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
163
- const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentReturnsApi.getReturn']?.[localVarOperationServerIndex]?.url;
164
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
165
- },
166
- /**
167
- * Retrieve a list of return items. You can filter results by location, RMA ID, status, or time.
168
- * @param {string} [returnLocationId] The SmartConnect location ID of the location from which you want to retrieve return items.
169
- * @param {string} [rmaId] The RMA ID of the return items you want to list.
170
- * @param {ListReturnsStatusEnum} [status] The status of return items you want to list. You can retrieve all new return items with the `CREATED` status.
171
- * @param {string} [reverseTrackingId] The reverse tracking ID of the return items you want to list.
172
- * @param {string} [createdSince] Return items created after the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
173
- * @param {string} [createdUntil] Return items created before the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
174
- * @param {string} [lastUpdatedSince] Return items updated after the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. If you supply this parameter, you must also supply `returnLocationId` and `status`.
175
- * @param {string} [lastUpdatedUntil] Return items whose most recent update is before the specified date are included in the response. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. If you supply this parameter, you must also supply `returnLocationId` and `status`.
176
- * @param {string} [lastUpdatedAfter] DEPRECATED. Use the `createdSince` parameter.
177
- * @param {string} [lastUpdatedBefore] DEPRECATED. Use the `createdUntil` parameter.
178
- * @param {number} [maxResults] The number of return items you want to include in the response. **Default:** 10 **Maximum:** 100
179
- * @param {string} [nextToken] A token that you use to retrieve the next page of results. The response includes `nextToken` when there are multiple pages of results. 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.
180
- * @param {*} [options] Override http request option.
181
- * @throws {RequiredError}
182
- */
183
- async listReturns(returnLocationId, rmaId, status, reverseTrackingId, createdSince, createdUntil, lastUpdatedSince, lastUpdatedUntil, lastUpdatedAfter, lastUpdatedBefore, maxResults, nextToken, options) {
184
- const localVarAxiosArgs = await localVarAxiosParamCreator.listReturns(returnLocationId, rmaId, status, reverseTrackingId, createdSince, createdUntil, lastUpdatedSince, lastUpdatedUntil, lastUpdatedAfter, lastUpdatedBefore, maxResults, nextToken, options);
185
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
186
- const localVarOperationServerBasePath = base_1.operationServerMap['ExternalFulfillmentReturnsApi.listReturns']?.[localVarOperationServerIndex]?.url;
187
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
188
- },
189
- };
190
- };
191
- exports.ExternalFulfillmentReturnsApiFp = ExternalFulfillmentReturnsApiFp;
192
- /**
193
- * ExternalFulfillmentReturnsApi - factory interface
194
- */
195
- const ExternalFulfillmentReturnsApiFactory = function (configuration, basePath, axios) {
196
- const localVarFp = (0, exports.ExternalFulfillmentReturnsApiFp)(configuration);
197
- return {
198
- /**
199
- * Retrieve the return item with the specified ID.
200
- * @param {ExternalFulfillmentReturnsApiGetReturnRequest} requestParameters Request parameters.
201
- * @param {*} [options] Override http request option.
202
- * @throws {RequiredError}
203
- */
204
- getReturn(requestParameters, options) {
205
- return localVarFp.getReturn(requestParameters.returnId, options).then((request) => request(axios, basePath));
206
- },
207
- /**
208
- * Retrieve a list of return items. You can filter results by location, RMA ID, status, or time.
209
- * @param {ExternalFulfillmentReturnsApiListReturnsRequest} requestParameters Request parameters.
210
- * @param {*} [options] Override http request option.
211
- * @throws {RequiredError}
212
- */
213
- listReturns(requestParameters = {}, options) {
214
- return localVarFp.listReturns(requestParameters.returnLocationId, requestParameters.rmaId, requestParameters.status, requestParameters.reverseTrackingId, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.lastUpdatedSince, requestParameters.lastUpdatedUntil, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.nextToken, options).then((request) => request(axios, basePath));
215
- },
216
- };
217
- };
218
- exports.ExternalFulfillmentReturnsApiFactory = ExternalFulfillmentReturnsApiFactory;
219
- /**
220
- * ExternalFulfillmentReturnsApi - object-oriented interface
221
- */
222
- class ExternalFulfillmentReturnsApi extends base_1.BaseAPI {
223
- /**
224
- * Retrieve the return item with the specified ID.
225
- * @param {ExternalFulfillmentReturnsApiGetReturnRequest} requestParameters Request parameters.
226
- * @param {*} [options] Override http request option.
227
- * @throws {RequiredError}
228
- */
229
- getReturn(requestParameters, options) {
230
- return (0, exports.ExternalFulfillmentReturnsApiFp)(this.configuration).getReturn(requestParameters.returnId, options).then((request) => request(this.axios, this.basePath));
231
- }
232
- /**
233
- * Retrieve a list of return items. You can filter results by location, RMA ID, status, or time.
234
- * @param {ExternalFulfillmentReturnsApiListReturnsRequest} requestParameters Request parameters.
235
- * @param {*} [options] Override http request option.
236
- * @throws {RequiredError}
237
- */
238
- listReturns(requestParameters = {}, options) {
239
- return (0, exports.ExternalFulfillmentReturnsApiFp)(this.configuration).listReturns(requestParameters.returnLocationId, requestParameters.rmaId, requestParameters.status, requestParameters.reverseTrackingId, requestParameters.createdSince, requestParameters.createdUntil, requestParameters.lastUpdatedSince, requestParameters.lastUpdatedUntil, requestParameters.lastUpdatedAfter, requestParameters.lastUpdatedBefore, requestParameters.maxResults, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
240
- }
241
- }
242
- exports.ExternalFulfillmentReturnsApi = ExternalFulfillmentReturnsApi;
243
- exports.ListReturnsStatusEnum = {
244
- Created: 'CREATED',
245
- CarrierNotifiedToPickUpFromCustomer: 'CARRIER_NOTIFIED_TO_PICK_UP_FROM_CUSTOMER',
246
- CarrierOutForPickUpFromCustomer: 'CARRIER_OUT_FOR_PICK_UP_FROM_CUSTOMER',
247
- CustomerCancelledPickUp: 'CUSTOMER_CANCELLED_PICK_UP',
248
- CustomerRescheduledPickUp: 'CUSTOMER_RESCHEDULED_PICK_UP',
249
- PickedFromCustomer: 'PICKED_FROM_CUSTOMER',
250
- InTransit: 'IN_TRANSIT',
251
- OutForDelivery: 'OUT_FOR_DELIVERY',
252
- Delivered: 'DELIVERED',
253
- Replanned: 'REPLANNED',
254
- CustomerDroppedOff: 'CUSTOMER_DROPPED_OFF',
255
- PartiallyProcessed: 'PARTIALLY_PROCESSED',
256
- Processed: 'PROCESSED',
257
- Rejected: 'REJECTED',
258
- Cancelled: 'CANCELLED',
259
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api/external-fulfillment-returns-api"), exports);
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
- const axios_1 = __importDefault(require("axios"));
21
- exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
- exports.COLLECTION_FORMATS = {
23
- csv: ",",
24
- ssv: " ",
25
- tsv: "\t",
26
- pipes: "|",
27
- };
28
- class BaseAPI {
29
- basePath;
30
- axios;
31
- configuration;
32
- constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
33
- this.basePath = basePath;
34
- this.axios = axios;
35
- if (configuration) {
36
- this.configuration = configuration;
37
- this.basePath = configuration.basePath ?? basePath;
38
- }
39
- }
40
- }
41
- exports.BaseAPI = BaseAPI;
42
- ;
43
- class RequiredError extends Error {
44
- field;
45
- constructor(field, msg) {
46
- super(msg);
47
- this.field = field;
48
- this.name = "RequiredError";
49
- }
50
- }
51
- exports.RequiredError = RequiredError;
52
- exports.operationServerMap = {};
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
- const base_1 = require("./base");
18
- exports.DUMMY_BASE_URL = 'https://example.com';
19
- /**
20
- *
21
- * @throws {RequiredError}
22
- */
23
- const assertParamExists = function (functionName, paramName, paramValue) {
24
- if (paramValue === null || paramValue === undefined) {
25
- throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
26
- }
27
- };
28
- exports.assertParamExists = assertParamExists;
29
- const setApiKeyToObject = async function (object, keyParamName, configuration) {
30
- if (configuration && configuration.apiKey) {
31
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
32
- ? await configuration.apiKey(keyParamName)
33
- : await configuration.apiKey;
34
- object[keyParamName] = localVarApiKeyValue;
35
- }
36
- };
37
- exports.setApiKeyToObject = setApiKeyToObject;
38
- const setBasicAuthToObject = function (object, configuration) {
39
- if (configuration && (configuration.username || configuration.password)) {
40
- object["auth"] = { username: configuration.username, password: configuration.password };
41
- }
42
- };
43
- exports.setBasicAuthToObject = setBasicAuthToObject;
44
- const setBearerAuthToObject = async function (object, configuration) {
45
- if (configuration && configuration.accessToken) {
46
- const accessToken = typeof configuration.accessToken === 'function'
47
- ? await configuration.accessToken()
48
- : await configuration.accessToken;
49
- object["Authorization"] = "Bearer " + accessToken;
50
- }
51
- };
52
- exports.setBearerAuthToObject = setBearerAuthToObject;
53
- const setOAuthToObject = async function (object, name, scopes, configuration) {
54
- if (configuration && configuration.accessToken) {
55
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
56
- ? await configuration.accessToken(name, scopes)
57
- : await configuration.accessToken;
58
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
59
- }
60
- };
61
- exports.setOAuthToObject = setOAuthToObject;
62
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
63
- if (parameter == null)
64
- return;
65
- if (typeof parameter === "object") {
66
- if (Array.isArray(parameter) || parameter instanceof Set) {
67
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
68
- }
69
- else {
70
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
71
- }
72
- }
73
- else {
74
- if (urlSearchParams.has(key)) {
75
- urlSearchParams.append(key, parameter);
76
- }
77
- else {
78
- urlSearchParams.set(key, parameter);
79
- }
80
- }
81
- }
82
- const setSearchParams = function (url, ...objects) {
83
- const searchParams = new URLSearchParams(url.search);
84
- setFlattenedQueryParams(searchParams, objects);
85
- url.search = searchParams.toString();
86
- };
87
- exports.setSearchParams = setSearchParams;
88
- /**
89
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
90
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
91
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
92
- */
93
- // @ts-ignore
94
- const replaceWithSerializableTypeIfNeeded = function (key, value) {
95
- if (value instanceof Set) {
96
- return Array.from(value);
97
- }
98
- else {
99
- return value;
100
- }
101
- };
102
- exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
- const serializeDataIfNeeded = function (value, requestOptions, configuration) {
104
- const nonString = typeof value !== 'string';
105
- const needsSerialization = nonString && configuration && configuration.isJsonMime
106
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
107
- : nonString;
108
- return needsSerialization
109
- ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
110
- : (value || "");
111
- };
112
- exports.serializeDataIfNeeded = serializeDataIfNeeded;
113
- const toPathString = function (url) {
114
- return url.pathname + url.search + url.hash;
115
- };
116
- exports.toPathString = toPathString;
117
- const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
118
- return (axios = globalAxios, basePath = BASE_PATH) => {
119
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
120
- return axios.request(axiosRequestArgs);
121
- };
122
- };
123
- exports.createRequestFunction = createRequestFunction;
@@ -1,98 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /**
4
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
5
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
6
- *
7
- * The version of the OpenAPI document: 2024-09-11
8
- * Contact: marketplaceapitest@amazon.com
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Configuration = void 0;
16
- class Configuration {
17
- /**
18
- * parameter for apiKey security
19
- * @param name security name
20
- */
21
- apiKey;
22
- /**
23
- * parameter for basic security
24
- */
25
- username;
26
- /**
27
- * parameter for basic security
28
- */
29
- password;
30
- /**
31
- * parameter for oauth2 security
32
- * @param name security name
33
- * @param scopes oauth2 scope
34
- */
35
- accessToken;
36
- /**
37
- * parameter for aws4 signature security
38
- * @param {Object} AWS4Signature - AWS4 Signature security
39
- * @param {string} options.region - aws region
40
- * @param {string} options.service - name of the service.
41
- * @param {string} credentials.accessKeyId - aws access key id
42
- * @param {string} credentials.secretAccessKey - aws access key
43
- * @param {string} credentials.sessionToken - aws session token
44
- * @memberof Configuration
45
- */
46
- awsv4;
47
- /**
48
- * override base path
49
- */
50
- basePath;
51
- /**
52
- * override server index
53
- */
54
- serverIndex;
55
- /**
56
- * base options for axios calls
57
- */
58
- baseOptions;
59
- /**
60
- * The FormData constructor that will be used to create multipart form data
61
- * requests. You can inject this here so that execution environments that
62
- * do not support the FormData class can still run the generated client.
63
- *
64
- * @type {new () => FormData}
65
- */
66
- formDataCtor;
67
- constructor(param = {}) {
68
- this.apiKey = param.apiKey;
69
- this.username = param.username;
70
- this.password = param.password;
71
- this.accessToken = param.accessToken;
72
- this.awsv4 = param.awsv4;
73
- this.basePath = param.basePath;
74
- this.serverIndex = param.serverIndex;
75
- this.baseOptions = {
76
- ...param.baseOptions,
77
- headers: {
78
- ...param.baseOptions?.headers,
79
- },
80
- };
81
- this.formDataCtor = param.formDataCtor;
82
- }
83
- /**
84
- * Check if the given MIME is a JSON MIME.
85
- * JSON MIME examples:
86
- * application/json
87
- * application/json; charset=UTF8
88
- * APPLICATION/JSON
89
- * application/vnd.company+json
90
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
91
- * @return True if the given MIME is JSON, false otherwise.
92
- */
93
- isJsonMime(mime) {
94
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
95
- return mime !== null && jsonMime.test(mime);
96
- }
97
- }
98
- exports.Configuration = Configuration;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- var desc = Object.getOwnPropertyDescriptor(m, k);
18
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
- desc = { enumerable: true, get: function() { return m[k]; } };
20
- }
21
- Object.defineProperty(o, k2, desc);
22
- }) : (function(o, m, k, k2) {
23
- if (k2 === undefined) k2 = k;
24
- o[k2] = m[k];
25
- }));
26
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- __exportStar(require("./api"), exports);
31
- __exportStar(require("./configuration"), exports);
32
- __exportStar(require("./models"), exports);
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./error-list"), exports);
18
- __exportStar(require("./invoice-information"), exports);
19
- __exportStar(require("./marketplace-channel"), exports);
20
- __exportStar(require("./marketplace-channel-details"), exports);
21
- __exportStar(require("./model-error"), exports);
22
- __exportStar(require("./otp-details"), exports);
23
- __exportStar(require("./replanning-details"), exports);
24
- __exportStar(require("./return"), exports);
25
- __exportStar(require("./return-metadata"), exports);
26
- __exportStar(require("./return-shipping-info"), exports);
27
- __exportStar(require("./returns-response"), exports);
28
- __exportStar(require("./tracking-info"), exports);
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Amazon External Fulfillment Return Item Processing
6
- * You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon\'s External Fulfillment returns management system.
7
- *
8
- * The version of the OpenAPI document: 2024-09-11
9
- * Contact: marketplaceapitest@amazon.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });