@sp-api-sdk/vendor-direct-fulfillment-orders-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 (113) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +528 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +1088 -0
  5. package/dist/index.d.ts +1088 -0
  6. package/dist/index.js +480 -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-orders-api.js +0 -288
  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/acknowledgement-status.js +0 -15
  16. package/dist/cjs/api-model/models/address.js +0 -15
  17. package/dist/cjs/api-model/models/get-order-response.js +0 -15
  18. package/dist/cjs/api-model/models/get-orders-response.js +0 -15
  19. package/dist/cjs/api-model/models/gift-details.js +0 -15
  20. package/dist/cjs/api-model/models/index.js +0 -42
  21. package/dist/cjs/api-model/models/item-quantity.js +0 -19
  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/order-acknowledgement-item.js +0 -15
  25. package/dist/cjs/api-model/models/order-details-tax-total.js +0 -15
  26. package/dist/cjs/api-model/models/order-details.js +0 -22
  27. package/dist/cjs/api-model/models/order-item-acknowledgement.js +0 -15
  28. package/dist/cjs/api-model/models/order-item-tax-details.js +0 -15
  29. package/dist/cjs/api-model/models/order-item.js +0 -15
  30. package/dist/cjs/api-model/models/order-list.js +0 -15
  31. package/dist/cjs/api-model/models/order.js +0 -15
  32. package/dist/cjs/api-model/models/pagination.js +0 -15
  33. package/dist/cjs/api-model/models/party-identification.js +0 -15
  34. package/dist/cjs/api-model/models/scheduled-delivery-shipment.js +0 -15
  35. package/dist/cjs/api-model/models/shipment-dates.js +0 -15
  36. package/dist/cjs/api-model/models/shipment-details.js +0 -15
  37. package/dist/cjs/api-model/models/submit-acknowledgement-request.js +0 -15
  38. package/dist/cjs/api-model/models/submit-acknowledgement-response.js +0 -15
  39. package/dist/cjs/api-model/models/tax-details.js +0 -25
  40. package/dist/cjs/api-model/models/tax-registration-details.js +0 -20
  41. package/dist/cjs/api-model/models/transaction-id.js +0 -15
  42. package/dist/cjs/client.js +0 -35
  43. package/dist/cjs/index.js +0 -19
  44. package/dist/es/api-model/api/vendor-direct-fulfillment-orders-api.js +0 -278
  45. package/dist/es/api-model/api.js +0 -14
  46. package/dist/es/api-model/base.js +0 -44
  47. package/dist/es/api-model/common.js +0 -110
  48. package/dist/es/api-model/configuration.js +0 -94
  49. package/dist/es/api-model/index.js +0 -16
  50. package/dist/es/api-model/models/acknowledgement-status.js +0 -14
  51. package/dist/es/api-model/models/address.js +0 -14
  52. package/dist/es/api-model/models/get-order-response.js +0 -14
  53. package/dist/es/api-model/models/get-orders-response.js +0 -14
  54. package/dist/es/api-model/models/gift-details.js +0 -14
  55. package/dist/es/api-model/models/index.js +0 -26
  56. package/dist/es/api-model/models/item-quantity.js +0 -16
  57. package/dist/es/api-model/models/model-error.js +0 -14
  58. package/dist/es/api-model/models/money.js +0 -14
  59. package/dist/es/api-model/models/order-acknowledgement-item.js +0 -14
  60. package/dist/es/api-model/models/order-details-tax-total.js +0 -14
  61. package/dist/es/api-model/models/order-details.js +0 -19
  62. package/dist/es/api-model/models/order-item-acknowledgement.js +0 -14
  63. package/dist/es/api-model/models/order-item-tax-details.js +0 -14
  64. package/dist/es/api-model/models/order-item.js +0 -14
  65. package/dist/es/api-model/models/order-list.js +0 -14
  66. package/dist/es/api-model/models/order.js +0 -14
  67. package/dist/es/api-model/models/pagination.js +0 -14
  68. package/dist/es/api-model/models/party-identification.js +0 -14
  69. package/dist/es/api-model/models/scheduled-delivery-shipment.js +0 -14
  70. package/dist/es/api-model/models/shipment-dates.js +0 -14
  71. package/dist/es/api-model/models/shipment-details.js +0 -14
  72. package/dist/es/api-model/models/submit-acknowledgement-request.js +0 -14
  73. package/dist/es/api-model/models/submit-acknowledgement-response.js +0 -14
  74. package/dist/es/api-model/models/tax-details.js +0 -22
  75. package/dist/es/api-model/models/tax-registration-details.js +0 -17
  76. package/dist/es/api-model/models/transaction-id.js +0 -14
  77. package/dist/es/client.js +0 -31
  78. package/dist/es/index.js +0 -3
  79. package/dist/types/api-model/api/vendor-direct-fulfillment-orders-api.d.ts +0 -204
  80. package/dist/types/api-model/api.d.ts +0 -12
  81. package/dist/types/api-model/base.d.ts +0 -42
  82. package/dist/types/api-model/common.d.ts +0 -34
  83. package/dist/types/api-model/configuration.d.ts +0 -98
  84. package/dist/types/api-model/index.d.ts +0 -14
  85. package/dist/types/api-model/models/acknowledgement-status.d.ts +0 -24
  86. package/dist/types/api-model/models/address.d.ts +0 -64
  87. package/dist/types/api-model/models/get-order-response.d.ts +0 -22
  88. package/dist/types/api-model/models/get-orders-response.d.ts +0 -22
  89. package/dist/types/api-model/models/gift-details.d.ts +0 -24
  90. package/dist/types/api-model/models/index.d.ts +0 -26
  91. package/dist/types/api-model/models/item-quantity.d.ts +0 -28
  92. package/dist/types/api-model/models/model-error.d.ts +0 -28
  93. package/dist/types/api-model/models/money.d.ts +0 -24
  94. package/dist/types/api-model/models/order-acknowledgement-item.d.ts +0 -38
  95. package/dist/types/api-model/models/order-details-tax-total.d.ts +0 -21
  96. package/dist/types/api-model/models/order-details.d.ts +0 -50
  97. package/dist/types/api-model/models/order-item-acknowledgement.d.ts +0 -30
  98. package/dist/types/api-model/models/order-item-tax-details.d.ts +0 -21
  99. package/dist/types/api-model/models/order-item.d.ts +0 -43
  100. package/dist/types/api-model/models/order-list.d.ts +0 -23
  101. package/dist/types/api-model/models/order.d.ts +0 -22
  102. package/dist/types/api-model/models/pagination.d.ts +0 -20
  103. package/dist/types/api-model/models/party-identification.d.ts +0 -24
  104. package/dist/types/api-model/models/scheduled-delivery-shipment.d.ts +0 -28
  105. package/dist/types/api-model/models/shipment-dates.d.ts +0 -24
  106. package/dist/types/api-model/models/shipment-details.d.ts +0 -42
  107. package/dist/types/api-model/models/submit-acknowledgement-request.d.ts +0 -21
  108. package/dist/types/api-model/models/submit-acknowledgement-response.d.ts +0 -22
  109. package/dist/types/api-model/models/tax-details.d.ts +0 -37
  110. package/dist/types/api-model/models/tax-registration-details.d.ts +0 -35
  111. package/dist/types/api-model/models/transaction-id.d.ts +0 -20
  112. package/dist/types/client.d.ts +0 -6
  113. package/dist/types/index.d.ts +0 -3
package/package.json CHANGED
@@ -2,24 +2,35 @@
2
2
  "name": "@sp-api-sdk/vendor-direct-fulfillment-orders-api-v1",
3
3
  "author": "Bertrand Marron <bertrand@bizon.solutions>",
4
4
  "description": "The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data.",
5
- "version": "4.0.16",
6
- "main": "dist/cjs/index.js",
7
- "module": "dist/es/index.js",
8
- "types": "dist/types/index.d.ts",
5
+ "version": "5.0.0",
9
6
  "license": "MIT",
7
+ "type": "module",
8
+ "sideEffects": false,
9
+ "source": "./src/index.ts",
10
+ "main": "./dist/index.cjs",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "import": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "require": {
20
+ "types": "./dist/index.d.cts",
21
+ "default": "./dist/index.cjs"
22
+ }
23
+ }
24
+ },
10
25
  "publishConfig": {
11
26
  "access": "public"
12
27
  },
13
- "directories": {
14
- "lib": "dist"
15
- },
16
28
  "files": [
17
- "dist/**/*.js",
18
- "dist/**/*.d.ts"
29
+ "dist"
19
30
  ],
20
31
  "dependencies": {
21
- "@sp-api-sdk/common": "2.1.30",
22
- "axios": "^1.13.6"
32
+ "@sp-api-sdk/common": "3.0.0",
33
+ "axios": "^1.16.1"
23
34
  },
24
35
  "repository": {
25
36
  "type": "git",
@@ -40,5 +51,5 @@
40
51
  "sp sdk",
41
52
  "vendor direct fulfillment orders api"
42
53
  ],
43
- "gitHead": "ed62de76baf24107227aacb576cd494b2ecbf0b5"
54
+ "gitHead": "fc6f28dc89089e9987831b8a1a008f1871e55289"
44
55
  }
@@ -1,288 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Direct Fulfillment Orders
6
- * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor\'s order data.
7
- *
8
- * The version of the OpenAPI document: v1
9
- *
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.GetOrdersSortOrderEnum = exports.GetOrdersStatusEnum = exports.VendorDirectFulfillmentOrdersApi = exports.VendorDirectFulfillmentOrdersApiFactory = exports.VendorDirectFulfillmentOrdersApiFp = exports.VendorDirectFulfillmentOrdersApiAxiosParamCreator = 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
- * VendorDirectFulfillmentOrdersApi - axios parameter creator
28
- */
29
- const VendorDirectFulfillmentOrdersApiAxiosParamCreator = function (configuration) {
30
- return {
31
- /**
32
- * Returns purchase order information for the purchaseOrderNumber that you specify. **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).
33
- * @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
34
- * @param {*} [options] Override http request option.
35
- * @throws {RequiredError}
36
- */
37
- getOrder: async (purchaseOrderNumber, options = {}) => {
38
- // verify required parameter 'purchaseOrderNumber' is not null or undefined
39
- (0, common_1.assertParamExists)('getOrder', 'purchaseOrderNumber', purchaseOrderNumber);
40
- const localVarPath = `/vendor/directFulfillment/orders/v1/purchaseOrders/{purchaseOrderNumber}`
41
- .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber)));
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
- * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **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).
62
- * @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
63
- * @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
64
- * @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
65
- * @param {GetOrdersStatusEnum} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
66
- * @param {number} [limit] The limit to the number of purchase orders returned.
67
- * @param {GetOrdersSortOrderEnum} [sortOrder] Sort the list in ascending or descending order by order creation date.
68
- * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
69
- * @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
70
- * @param {*} [options] Override http request option.
71
- * @throws {RequiredError}
72
- */
73
- getOrders: async (createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options = {}) => {
74
- // verify required parameter 'createdAfter' is not null or undefined
75
- (0, common_1.assertParamExists)('getOrders', 'createdAfter', createdAfter);
76
- // verify required parameter 'createdBefore' is not null or undefined
77
- (0, common_1.assertParamExists)('getOrders', 'createdBefore', createdBefore);
78
- const localVarPath = `/vendor/directFulfillment/orders/v1/purchaseOrders`;
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 (shipFromPartyId !== undefined) {
89
- localVarQueryParameter['shipFromPartyId'] = shipFromPartyId;
90
- }
91
- if (status !== undefined) {
92
- localVarQueryParameter['status'] = status;
93
- }
94
- if (limit !== undefined) {
95
- localVarQueryParameter['limit'] = limit;
96
- }
97
- if (createdAfter !== undefined) {
98
- localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
99
- createdAfter.toISOString() :
100
- createdAfter;
101
- }
102
- if (createdBefore !== undefined) {
103
- localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
104
- createdBefore.toISOString() :
105
- createdBefore;
106
- }
107
- if (sortOrder !== undefined) {
108
- localVarQueryParameter['sortOrder'] = sortOrder;
109
- }
110
- if (nextToken !== undefined) {
111
- localVarQueryParameter['nextToken'] = nextToken;
112
- }
113
- if (includeDetails !== undefined) {
114
- localVarQueryParameter['includeDetails'] = includeDetails;
115
- }
116
- localVarHeaderParameter['Accept'] = 'application/json,payload';
117
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
118
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
119
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
120
- return {
121
- url: (0, common_1.toPathString)(localVarUrlObj),
122
- options: localVarRequestOptions,
123
- };
124
- },
125
- /**
126
- * Submits acknowledgements for one or more purchase 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).
127
- * @param {SubmitAcknowledgementRequest} body The request body containing the acknowledgement to an order.
128
- * @param {*} [options] Override http request option.
129
- * @throws {RequiredError}
130
- */
131
- submitAcknowledgement: async (body, options = {}) => {
132
- // verify required parameter 'body' is not null or undefined
133
- (0, common_1.assertParamExists)('submitAcknowledgement', 'body', body);
134
- const localVarPath = `/vendor/directFulfillment/orders/v1/acknowledgements`;
135
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
136
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
137
- let baseOptions;
138
- if (configuration) {
139
- baseOptions = configuration.baseOptions;
140
- }
141
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
142
- const localVarHeaderParameter = {};
143
- const localVarQueryParameter = {};
144
- localVarHeaderParameter['Content-Type'] = 'application/json';
145
- localVarHeaderParameter['Accept'] = 'application/json';
146
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
147
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
148
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
149
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
150
- return {
151
- url: (0, common_1.toPathString)(localVarUrlObj),
152
- options: localVarRequestOptions,
153
- };
154
- },
155
- };
156
- };
157
- exports.VendorDirectFulfillmentOrdersApiAxiosParamCreator = VendorDirectFulfillmentOrdersApiAxiosParamCreator;
158
- /**
159
- * VendorDirectFulfillmentOrdersApi - functional programming interface
160
- */
161
- const VendorDirectFulfillmentOrdersApiFp = function (configuration) {
162
- const localVarAxiosParamCreator = (0, exports.VendorDirectFulfillmentOrdersApiAxiosParamCreator)(configuration);
163
- return {
164
- /**
165
- * Returns purchase order information for the purchaseOrderNumber that you specify. **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).
166
- * @param {string} purchaseOrderNumber The order identifier for the purchase order that you want. Formatting Notes: alpha-numeric code.
167
- * @param {*} [options] Override http request option.
168
- * @throws {RequiredError}
169
- */
170
- async getOrder(purchaseOrderNumber, options) {
171
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrder(purchaseOrderNumber, options);
172
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
173
- const localVarOperationServerBasePath = base_1.operationServerMap['VendorDirectFulfillmentOrdersApi.getOrder']?.[localVarOperationServerIndex]?.url;
174
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
175
- },
176
- /**
177
- * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **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).
178
- * @param {string} createdAfter Purchase orders that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
179
- * @param {string} createdBefore Purchase orders that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
180
- * @param {string} [shipFromPartyId] The vendor warehouse identifier for the fulfillment warehouse. If not specified, the result will contain orders for all warehouses.
181
- * @param {GetOrdersStatusEnum} [status] Returns only the purchase orders that match the specified status. If not specified, the result will contain orders that match any status.
182
- * @param {number} [limit] The limit to the number of purchase orders returned.
183
- * @param {GetOrdersSortOrderEnum} [sortOrder] Sort the list in ascending or descending order by order creation date.
184
- * @param {string} [nextToken] Used for pagination when there are more orders than the specified result size limit. The token value is returned in the previous API call.
185
- * @param {boolean} [includeDetails] When true, returns the complete purchase order details. Otherwise, only purchase order numbers are returned.
186
- * @param {*} [options] Override http request option.
187
- * @throws {RequiredError}
188
- */
189
- async getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options) {
190
- const localVarAxiosArgs = await localVarAxiosParamCreator.getOrders(createdAfter, createdBefore, shipFromPartyId, status, limit, sortOrder, nextToken, includeDetails, options);
191
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
192
- const localVarOperationServerBasePath = base_1.operationServerMap['VendorDirectFulfillmentOrdersApi.getOrders']?.[localVarOperationServerIndex]?.url;
193
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
194
- },
195
- /**
196
- * Submits acknowledgements for one or more purchase 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 {SubmitAcknowledgementRequest} body The request body containing the acknowledgement to an order.
198
- * @param {*} [options] Override http request option.
199
- * @throws {RequiredError}
200
- */
201
- async submitAcknowledgement(body, options) {
202
- const localVarAxiosArgs = await localVarAxiosParamCreator.submitAcknowledgement(body, options);
203
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
204
- const localVarOperationServerBasePath = base_1.operationServerMap['VendorDirectFulfillmentOrdersApi.submitAcknowledgement']?.[localVarOperationServerIndex]?.url;
205
- return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
206
- },
207
- };
208
- };
209
- exports.VendorDirectFulfillmentOrdersApiFp = VendorDirectFulfillmentOrdersApiFp;
210
- /**
211
- * VendorDirectFulfillmentOrdersApi - factory interface
212
- */
213
- const VendorDirectFulfillmentOrdersApiFactory = function (configuration, basePath, axios) {
214
- const localVarFp = (0, exports.VendorDirectFulfillmentOrdersApiFp)(configuration);
215
- return {
216
- /**
217
- * Returns purchase order information for the purchaseOrderNumber that you specify. **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).
218
- * @param {VendorDirectFulfillmentOrdersApiGetOrderRequest} requestParameters Request parameters.
219
- * @param {*} [options] Override http request option.
220
- * @throws {RequiredError}
221
- */
222
- getOrder(requestParameters, options) {
223
- return localVarFp.getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(axios, basePath));
224
- },
225
- /**
226
- * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **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).
227
- * @param {VendorDirectFulfillmentOrdersApiGetOrdersRequest} requestParameters Request parameters.
228
- * @param {*} [options] Override http request option.
229
- * @throws {RequiredError}
230
- */
231
- getOrders(requestParameters, options) {
232
- return localVarFp.getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(axios, basePath));
233
- },
234
- /**
235
- * Submits acknowledgements for one or more purchase 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).
236
- * @param {VendorDirectFulfillmentOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
237
- * @param {*} [options] Override http request option.
238
- * @throws {RequiredError}
239
- */
240
- submitAcknowledgement(requestParameters, options) {
241
- return localVarFp.submitAcknowledgement(requestParameters.body, options).then((request) => request(axios, basePath));
242
- },
243
- };
244
- };
245
- exports.VendorDirectFulfillmentOrdersApiFactory = VendorDirectFulfillmentOrdersApiFactory;
246
- /**
247
- * VendorDirectFulfillmentOrdersApi - object-oriented interface
248
- */
249
- class VendorDirectFulfillmentOrdersApi extends base_1.BaseAPI {
250
- /**
251
- * Returns purchase order information for the purchaseOrderNumber that you specify. **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).
252
- * @param {VendorDirectFulfillmentOrdersApiGetOrderRequest} requestParameters Request parameters.
253
- * @param {*} [options] Override http request option.
254
- * @throws {RequiredError}
255
- */
256
- getOrder(requestParameters, options) {
257
- return (0, exports.VendorDirectFulfillmentOrdersApiFp)(this.configuration).getOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath));
258
- }
259
- /**
260
- * Returns a list of purchase orders created during the time frame that you specify. You define the time frame using the createdAfter and createdBefore parameters. You must use both parameters. You can choose to get only the purchase order numbers by setting the includeDetails parameter to false. In that case, the operation returns a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific order. **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).
261
- * @param {VendorDirectFulfillmentOrdersApiGetOrdersRequest} requestParameters Request parameters.
262
- * @param {*} [options] Override http request option.
263
- * @throws {RequiredError}
264
- */
265
- getOrders(requestParameters, options) {
266
- return (0, exports.VendorDirectFulfillmentOrdersApiFp)(this.configuration).getOrders(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.status, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, options).then((request) => request(this.axios, this.basePath));
267
- }
268
- /**
269
- * Submits acknowledgements for one or more purchase 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).
270
- * @param {VendorDirectFulfillmentOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
271
- * @param {*} [options] Override http request option.
272
- * @throws {RequiredError}
273
- */
274
- submitAcknowledgement(requestParameters, options) {
275
- return (0, exports.VendorDirectFulfillmentOrdersApiFp)(this.configuration).submitAcknowledgement(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
276
- }
277
- }
278
- exports.VendorDirectFulfillmentOrdersApi = VendorDirectFulfillmentOrdersApi;
279
- exports.GetOrdersStatusEnum = {
280
- New: 'NEW',
281
- Shipped: 'SHIPPED',
282
- Accepted: 'ACCEPTED',
283
- Cancelled: 'CANCELLED'
284
- };
285
- exports.GetOrdersSortOrderEnum = {
286
- Asc: 'ASC',
287
- Desc: 'DESC'
288
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Direct Fulfillment Orders
6
- * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor\'s order data.
7
- *
8
- * The version of the OpenAPI document: v1
9
- *
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/vendor-direct-fulfillment-orders-api"), exports);
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Selling Partner API for Direct Fulfillment Orders
6
- * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor\'s order data.
7
- *
8
- * The version of the OpenAPI document: v1
9
- *
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
- * Selling Partner API for Direct Fulfillment Orders
6
- * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor\'s order data.
7
- *
8
- * The version of the OpenAPI document: v1
9
- *
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
- * Selling Partner API for Direct Fulfillment Orders
5
- * The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor\'s order data.
6
- *
7
- * The version of the OpenAPI document: v1
8
- *
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 = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
95
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
96
- }
97
- }
98
- exports.Configuration = Configuration;