@sp-api-sdk/vendor-direct-fulfillment-shipping-api-v1 1.7.1

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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -0
  3. package/dist/cjs/index.js +6 -0
  4. package/dist/cjs/src/api-model/api/customer-invoices-api.js +213 -0
  5. package/dist/cjs/src/api-model/api/vendor-shipping-api.js +329 -0
  6. package/dist/cjs/src/api-model/api/vendor-shipping-labels-api.js +271 -0
  7. package/dist/cjs/src/api-model/api.js +19 -0
  8. package/dist/cjs/src/api-model/base.js +62 -0
  9. package/dist/cjs/src/api-model/common.js +137 -0
  10. package/dist/cjs/src/api-model/configuration.js +42 -0
  11. package/dist/cjs/src/api-model/index.js +19 -0
  12. package/dist/cjs/src/api-model/models/address.js +15 -0
  13. package/dist/cjs/src/api-model/models/container.js +25 -0
  14. package/dist/cjs/src/api-model/models/customer-invoice-list.js +15 -0
  15. package/dist/cjs/src/api-model/models/customer-invoice.js +15 -0
  16. package/dist/cjs/src/api-model/models/dimensions.js +25 -0
  17. package/dist/cjs/src/api-model/models/get-customer-invoice-response.js +15 -0
  18. package/dist/cjs/src/api-model/models/get-customer-invoices-response.js +15 -0
  19. package/dist/cjs/src/api-model/models/get-packing-slip-list-response.js +15 -0
  20. package/dist/cjs/src/api-model/models/get-packing-slip-response.js +15 -0
  21. package/dist/cjs/src/api-model/models/get-shipping-label-list-response.js +15 -0
  22. package/dist/cjs/src/api-model/models/get-shipping-label-response.js +15 -0
  23. package/dist/cjs/src/api-model/models/index.js +40 -0
  24. package/dist/cjs/src/api-model/models/item-quantity.js +15 -0
  25. package/dist/cjs/src/api-model/models/item.js +15 -0
  26. package/dist/cjs/src/api-model/models/label-data.js +15 -0
  27. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  28. package/dist/cjs/src/api-model/models/package.js +15 -0
  29. package/dist/cjs/src/api-model/models/packed-item.js +15 -0
  30. package/dist/cjs/src/api-model/models/packing-slip-list.js +15 -0
  31. package/dist/cjs/src/api-model/models/packing-slip.js +24 -0
  32. package/dist/cjs/src/api-model/models/pagination.js +15 -0
  33. package/dist/cjs/src/api-model/models/party-identification.js +15 -0
  34. package/dist/cjs/src/api-model/models/shipment-confirmation.js +15 -0
  35. package/dist/cjs/src/api-model/models/shipment-details.js +25 -0
  36. package/dist/cjs/src/api-model/models/shipment-status-update.js +15 -0
  37. package/dist/cjs/src/api-model/models/shipping-label-list.js +15 -0
  38. package/dist/cjs/src/api-model/models/shipping-label-request.js +15 -0
  39. package/dist/cjs/src/api-model/models/shipping-label.js +25 -0
  40. package/dist/cjs/src/api-model/models/status-update-details-shipment-schedule.js +15 -0
  41. package/dist/cjs/src/api-model/models/status-update-details.js +15 -0
  42. package/dist/cjs/src/api-model/models/submit-shipment-confirmations-request.js +15 -0
  43. package/dist/cjs/src/api-model/models/submit-shipment-confirmations-response.js +15 -0
  44. package/dist/cjs/src/api-model/models/submit-shipment-status-updates-request.js +15 -0
  45. package/dist/cjs/src/api-model/models/submit-shipment-status-updates-response.js +15 -0
  46. package/dist/cjs/src/api-model/models/submit-shipping-labels-request.js +15 -0
  47. package/dist/cjs/src/api-model/models/submit-shipping-labels-response.js +15 -0
  48. package/dist/cjs/src/api-model/models/tax-registration-details.js +25 -0
  49. package/dist/cjs/src/api-model/models/transaction-reference.js +15 -0
  50. package/dist/cjs/src/api-model/models/weight.js +25 -0
  51. package/dist/cjs/src/client.js +83 -0
  52. package/dist/cjs/src/error.js +10 -0
  53. package/dist/es/index.js +3 -0
  54. package/dist/es/src/api-model/api/customer-invoices-api.js +205 -0
  55. package/dist/es/src/api-model/api/vendor-shipping-api.js +321 -0
  56. package/dist/es/src/api-model/api/vendor-shipping-labels-api.js +263 -0
  57. package/dist/es/src/api-model/api.js +16 -0
  58. package/dist/es/src/api-model/base.js +56 -0
  59. package/dist/es/src/api-model/common.js +125 -0
  60. package/dist/es/src/api-model/configuration.js +38 -0
  61. package/dist/es/src/api-model/index.js +16 -0
  62. package/dist/es/src/api-model/models/address.js +14 -0
  63. package/dist/es/src/api-model/models/container.js +22 -0
  64. package/dist/es/src/api-model/models/customer-invoice-list.js +14 -0
  65. package/dist/es/src/api-model/models/customer-invoice.js +14 -0
  66. package/dist/es/src/api-model/models/dimensions.js +22 -0
  67. package/dist/es/src/api-model/models/get-customer-invoice-response.js +14 -0
  68. package/dist/es/src/api-model/models/get-customer-invoices-response.js +14 -0
  69. package/dist/es/src/api-model/models/get-packing-slip-list-response.js +14 -0
  70. package/dist/es/src/api-model/models/get-packing-slip-response.js +14 -0
  71. package/dist/es/src/api-model/models/get-shipping-label-list-response.js +14 -0
  72. package/dist/es/src/api-model/models/get-shipping-label-response.js +14 -0
  73. package/dist/es/src/api-model/models/index.js +37 -0
  74. package/dist/es/src/api-model/models/item-quantity.js +14 -0
  75. package/dist/es/src/api-model/models/item.js +14 -0
  76. package/dist/es/src/api-model/models/label-data.js +14 -0
  77. package/dist/es/src/api-model/models/model-error.js +14 -0
  78. package/dist/es/src/api-model/models/package.js +14 -0
  79. package/dist/es/src/api-model/models/packed-item.js +14 -0
  80. package/dist/es/src/api-model/models/packing-slip-list.js +14 -0
  81. package/dist/es/src/api-model/models/packing-slip.js +21 -0
  82. package/dist/es/src/api-model/models/pagination.js +14 -0
  83. package/dist/es/src/api-model/models/party-identification.js +14 -0
  84. package/dist/es/src/api-model/models/shipment-confirmation.js +14 -0
  85. package/dist/es/src/api-model/models/shipment-details.js +22 -0
  86. package/dist/es/src/api-model/models/shipment-status-update.js +14 -0
  87. package/dist/es/src/api-model/models/shipping-label-list.js +14 -0
  88. package/dist/es/src/api-model/models/shipping-label-request.js +14 -0
  89. package/dist/es/src/api-model/models/shipping-label.js +22 -0
  90. package/dist/es/src/api-model/models/status-update-details-shipment-schedule.js +14 -0
  91. package/dist/es/src/api-model/models/status-update-details.js +14 -0
  92. package/dist/es/src/api-model/models/submit-shipment-confirmations-request.js +14 -0
  93. package/dist/es/src/api-model/models/submit-shipment-confirmations-response.js +14 -0
  94. package/dist/es/src/api-model/models/submit-shipment-status-updates-request.js +14 -0
  95. package/dist/es/src/api-model/models/submit-shipment-status-updates-response.js +14 -0
  96. package/dist/es/src/api-model/models/submit-shipping-labels-request.js +14 -0
  97. package/dist/es/src/api-model/models/submit-shipping-labels-response.js +14 -0
  98. package/dist/es/src/api-model/models/tax-registration-details.js +22 -0
  99. package/dist/es/src/api-model/models/transaction-reference.js +14 -0
  100. package/dist/es/src/api-model/models/weight.js +22 -0
  101. package/dist/es/src/client.js +79 -0
  102. package/dist/es/src/error.js +6 -0
  103. package/dist/types/index.d.ts +3 -0
  104. package/dist/types/src/api-model/api/customer-invoices-api.d.ts +171 -0
  105. package/dist/types/src/api-model/api/vendor-shipping-api.d.ts +259 -0
  106. package/dist/types/src/api-model/api/vendor-shipping-labels-api.d.ts +215 -0
  107. package/dist/types/src/api-model/api.d.ts +14 -0
  108. package/dist/types/src/api-model/base.d.ts +55 -0
  109. package/dist/types/src/api-model/common.d.ts +65 -0
  110. package/dist/types/src/api-model/configuration.d.ts +83 -0
  111. package/dist/types/src/api-model/index.d.ts +14 -0
  112. package/dist/types/src/api-model/models/address.d.ts +84 -0
  113. package/dist/types/src/api-model/models/container.d.ts +101 -0
  114. package/dist/types/src/api-model/models/customer-invoice-list.d.ts +32 -0
  115. package/dist/types/src/api-model/models/customer-invoice.d.ts +30 -0
  116. package/dist/types/src/api-model/models/dimensions.d.ts +50 -0
  117. package/dist/types/src/api-model/models/get-customer-invoice-response.d.ts +31 -0
  118. package/dist/types/src/api-model/models/get-customer-invoices-response.d.ts +31 -0
  119. package/dist/types/src/api-model/models/get-packing-slip-list-response.d.ts +31 -0
  120. package/dist/types/src/api-model/models/get-packing-slip-response.d.ts +31 -0
  121. package/dist/types/src/api-model/models/get-shipping-label-list-response.d.ts +31 -0
  122. package/dist/types/src/api-model/models/get-shipping-label-response.d.ts +31 -0
  123. package/dist/types/src/api-model/models/index.d.ts +37 -0
  124. package/dist/types/src/api-model/models/item-quantity.d.ts +30 -0
  125. package/dist/types/src/api-model/models/item.d.ts +43 -0
  126. package/dist/types/src/api-model/models/label-data.d.ts +48 -0
  127. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  128. package/dist/types/src/api-model/models/package.d.ts +62 -0
  129. package/dist/types/src/api-model/models/packed-item.d.ts +43 -0
  130. package/dist/types/src/api-model/models/packing-slip-list.d.ts +32 -0
  131. package/dist/types/src/api-model/models/packing-slip.d.ts +43 -0
  132. package/dist/types/src/api-model/models/pagination.d.ts +24 -0
  133. package/dist/types/src/api-model/models/party-identification.d.ts +38 -0
  134. package/dist/types/src/api-model/models/shipment-confirmation.d.ts +58 -0
  135. package/dist/types/src/api-model/models/shipment-details.d.ts +56 -0
  136. package/dist/types/src/api-model/models/shipment-status-update.d.ts +44 -0
  137. package/dist/types/src/api-model/models/shipping-label-list.d.ts +32 -0
  138. package/dist/types/src/api-model/models/shipping-label-request.d.ts +44 -0
  139. package/dist/types/src/api-model/models/shipping-label.d.ts +58 -0
  140. package/dist/types/src/api-model/models/status-update-details-shipment-schedule.d.ts +36 -0
  141. package/dist/types/src/api-model/models/status-update-details.d.ts +56 -0
  142. package/dist/types/src/api-model/models/submit-shipment-confirmations-request.d.ts +25 -0
  143. package/dist/types/src/api-model/models/submit-shipment-confirmations-response.d.ts +31 -0
  144. package/dist/types/src/api-model/models/submit-shipment-status-updates-request.d.ts +25 -0
  145. package/dist/types/src/api-model/models/submit-shipment-status-updates-response.d.ts +31 -0
  146. package/dist/types/src/api-model/models/submit-shipping-labels-request.d.ts +25 -0
  147. package/dist/types/src/api-model/models/submit-shipping-labels-response.d.ts +31 -0
  148. package/dist/types/src/api-model/models/tax-registration-details.d.ts +51 -0
  149. package/dist/types/src/api-model/models/transaction-reference.d.ts +24 -0
  150. package/dist/types/src/api-model/models/weight.d.ts +38 -0
  151. package/dist/types/src/client.d.ts +13 -0
  152. package/dist/types/src/error.d.ts +3 -0
  153. package/package.json +53 -0
@@ -0,0 +1,263 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Direct Fulfillment Shipping
5
+ * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor\'s shipping 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
+ import globalAxios from 'axios';
15
+ // Some imports not used depending on template conditions
16
+ // @ts-ignore
17
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
18
+ // @ts-ignore
19
+ import { BASE_PATH, BaseAPI } from '../base';
20
+ /**
21
+ * VendorShippingLabelsApi - axios parameter creator
22
+ * @export
23
+ */
24
+ export const VendorShippingLabelsApiAxiosParamCreator = function (configuration) {
25
+ return {
26
+ /**
27
+ * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
28
+ * @param {string} purchaseOrderNumber The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ getShippingLabel: async (purchaseOrderNumber, options = {}) => {
33
+ // verify required parameter 'purchaseOrderNumber' is not null or undefined
34
+ assertParamExists('getShippingLabel', 'purchaseOrderNumber', purchaseOrderNumber);
35
+ const localVarPath = `/vendor/directFulfillment/shipping/v1/shippingLabels/{purchaseOrderNumber}`
36
+ .replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber)));
37
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
38
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
39
+ let baseOptions;
40
+ if (configuration) {
41
+ baseOptions = configuration.baseOptions;
42
+ }
43
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
44
+ const localVarHeaderParameter = {};
45
+ const localVarQueryParameter = {};
46
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
47
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
48
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
49
+ return {
50
+ url: toPathString(localVarUrlObj),
51
+ options: localVarRequestOptions,
52
+ };
53
+ },
54
+ /**
55
+ * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
56
+ * @param {string} createdAfter Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
57
+ * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
58
+ * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
59
+ * @param {number} [limit] The limit to the number of records returned.
60
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
61
+ * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ getShippingLabels: async (createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options = {}) => {
66
+ // verify required parameter 'createdAfter' is not null or undefined
67
+ assertParamExists('getShippingLabels', 'createdAfter', createdAfter);
68
+ // verify required parameter 'createdBefore' is not null or undefined
69
+ assertParamExists('getShippingLabels', 'createdBefore', createdBefore);
70
+ const localVarPath = `/vendor/directFulfillment/shipping/v1/shippingLabels`;
71
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
72
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
73
+ let baseOptions;
74
+ if (configuration) {
75
+ baseOptions = configuration.baseOptions;
76
+ }
77
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
78
+ const localVarHeaderParameter = {};
79
+ const localVarQueryParameter = {};
80
+ if (shipFromPartyId !== undefined) {
81
+ localVarQueryParameter['shipFromPartyId'] = shipFromPartyId;
82
+ }
83
+ if (limit !== undefined) {
84
+ localVarQueryParameter['limit'] = limit;
85
+ }
86
+ if (createdAfter !== undefined) {
87
+ localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
88
+ createdAfter.toISOString() :
89
+ createdAfter;
90
+ }
91
+ if (createdBefore !== undefined) {
92
+ localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
93
+ createdBefore.toISOString() :
94
+ createdBefore;
95
+ }
96
+ if (sortOrder !== undefined) {
97
+ localVarQueryParameter['sortOrder'] = sortOrder;
98
+ }
99
+ if (nextToken !== undefined) {
100
+ localVarQueryParameter['nextToken'] = nextToken;
101
+ }
102
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
103
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
105
+ return {
106
+ url: toPathString(localVarUrlObj),
107
+ options: localVarRequestOptions,
108
+ };
109
+ },
110
+ /**
111
+ * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
112
+ * @param {SubmitShippingLabelsRequest} body
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ submitShippingLabelRequest: async (body, options = {}) => {
117
+ // verify required parameter 'body' is not null or undefined
118
+ assertParamExists('submitShippingLabelRequest', 'body', body);
119
+ const localVarPath = `/vendor/directFulfillment/shipping/v1/shippingLabels`;
120
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
121
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
122
+ let baseOptions;
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ }
126
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
127
+ const localVarHeaderParameter = {};
128
+ const localVarQueryParameter = {};
129
+ localVarHeaderParameter['Content-Type'] = 'application/json';
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
133
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
134
+ return {
135
+ url: toPathString(localVarUrlObj),
136
+ options: localVarRequestOptions,
137
+ };
138
+ },
139
+ };
140
+ };
141
+ /**
142
+ * VendorShippingLabelsApi - functional programming interface
143
+ * @export
144
+ */
145
+ export const VendorShippingLabelsApiFp = function (configuration) {
146
+ const localVarAxiosParamCreator = VendorShippingLabelsApiAxiosParamCreator(configuration);
147
+ return {
148
+ /**
149
+ * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
150
+ * @param {string} purchaseOrderNumber The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
151
+ * @param {*} [options] Override http request option.
152
+ * @throws {RequiredError}
153
+ */
154
+ async getShippingLabel(purchaseOrderNumber, options) {
155
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabel(purchaseOrderNumber, options);
156
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
157
+ },
158
+ /**
159
+ * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
160
+ * @param {string} createdAfter Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
161
+ * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
162
+ * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
163
+ * @param {number} [limit] The limit to the number of records returned.
164
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
165
+ * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
166
+ * @param {*} [options] Override http request option.
167
+ * @throws {RequiredError}
168
+ */
169
+ async getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
170
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options);
171
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
172
+ },
173
+ /**
174
+ * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
175
+ * @param {SubmitShippingLabelsRequest} body
176
+ * @param {*} [options] Override http request option.
177
+ * @throws {RequiredError}
178
+ */
179
+ async submitShippingLabelRequest(body, options) {
180
+ const localVarAxiosArgs = await localVarAxiosParamCreator.submitShippingLabelRequest(body, options);
181
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
182
+ },
183
+ };
184
+ };
185
+ /**
186
+ * VendorShippingLabelsApi - factory interface
187
+ * @export
188
+ */
189
+ export const VendorShippingLabelsApiFactory = function (configuration, basePath, axios) {
190
+ const localVarFp = VendorShippingLabelsApiFp(configuration);
191
+ return {
192
+ /**
193
+ * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
194
+ * @param {string} purchaseOrderNumber The purchase order number for which you want to return the shipping label. It should be the same purchaseOrderNumber as received in the order.
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ getShippingLabel(purchaseOrderNumber, options) {
199
+ return localVarFp.getShippingLabel(purchaseOrderNumber, options).then((request) => request(axios, basePath));
200
+ },
201
+ /**
202
+ * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
203
+ * @param {string} createdAfter Shipping labels that became available after this date and time will be included in the result. Must be in ISO-8601 date/time format.
204
+ * @param {string} createdBefore Shipping labels that became available before this date and time will be included in the result. Must be in ISO-8601 date/time format.
205
+ * @param {string} [shipFromPartyId] The vendor warehouseId for order fulfillment. If not specified, the result will contain orders for all warehouses.
206
+ * @param {number} [limit] The limit to the number of records returned.
207
+ * @param {'ASC' | 'DESC'} [sortOrder] Sort ASC or DESC by order creation date.
208
+ * @param {string} [nextToken] Used for pagination when there are more ship labels than the specified result size limit. The token value is returned in the previous API call.
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options) {
213
+ return localVarFp.getShippingLabels(createdAfter, createdBefore, shipFromPartyId, limit, sortOrder, nextToken, options).then((request) => request(axios, basePath));
214
+ },
215
+ /**
216
+ * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
217
+ * @param {SubmitShippingLabelsRequest} body
218
+ * @param {*} [options] Override http request option.
219
+ * @throws {RequiredError}
220
+ */
221
+ submitShippingLabelRequest(body, options) {
222
+ return localVarFp.submitShippingLabelRequest(body, options).then((request) => request(axios, basePath));
223
+ },
224
+ };
225
+ };
226
+ /**
227
+ * VendorShippingLabelsApi - object-oriented interface
228
+ * @export
229
+ * @class VendorShippingLabelsApi
230
+ * @extends {BaseAPI}
231
+ */
232
+ export class VendorShippingLabelsApi extends BaseAPI {
233
+ /**
234
+ * Returns a shipping label for the purchaseOrderNumber that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
235
+ * @param {VendorShippingLabelsApiGetShippingLabelRequest} requestParameters Request parameters.
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ * @memberof VendorShippingLabelsApi
239
+ */
240
+ getShippingLabel(requestParameters, options) {
241
+ return VendorShippingLabelsApiFp(this.configuration).getShippingLabel(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath));
242
+ }
243
+ /**
244
+ * Returns a list of shipping labels created during the time frame that you specify. You define that time frame using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to search must not be more than 7 days. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
245
+ * @param {VendorShippingLabelsApiGetShippingLabelsRequest} requestParameters Request parameters.
246
+ * @param {*} [options] Override http request option.
247
+ * @throws {RequiredError}
248
+ * @memberof VendorShippingLabelsApi
249
+ */
250
+ getShippingLabels(requestParameters, options) {
251
+ return VendorShippingLabelsApiFp(this.configuration).getShippingLabels(requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.shipFromPartyId, requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
252
+ }
253
+ /**
254
+ * Creates a shipping label for a purchase order and returns a transactionId for reference. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
255
+ * @param {VendorShippingLabelsApiSubmitShippingLabelRequestRequest} requestParameters Request parameters.
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ * @memberof VendorShippingLabelsApi
259
+ */
260
+ submitShippingLabelRequest(requestParameters, options) {
261
+ return VendorShippingLabelsApiFp(this.configuration).submitShippingLabelRequest(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
262
+ }
263
+ }
@@ -0,0 +1,16 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Direct Fulfillment Shipping
5
+ * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor\'s shipping 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
+ export * from './api/customer-invoices-api';
15
+ export * from './api/vendor-shipping-api';
16
+ export * from './api/vendor-shipping-labels-api';
@@ -0,0 +1,56 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Direct Fulfillment Shipping
5
+ * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor\'s shipping 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
+ // Some imports not used depending on template conditions
15
+ // @ts-ignore
16
+ import globalAxios from 'axios';
17
+ export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
18
+ /**
19
+ *
20
+ * @export
21
+ */
22
+ export const COLLECTION_FORMATS = {
23
+ csv: ",",
24
+ ssv: " ",
25
+ tsv: "\t",
26
+ pipes: "|",
27
+ };
28
+ /**
29
+ *
30
+ * @export
31
+ * @class BaseAPI
32
+ */
33
+ export class BaseAPI {
34
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
35
+ this.basePath = basePath;
36
+ this.axios = axios;
37
+ if (configuration) {
38
+ this.configuration = configuration;
39
+ this.basePath = configuration.basePath || this.basePath;
40
+ }
41
+ }
42
+ }
43
+ ;
44
+ /**
45
+ *
46
+ * @export
47
+ * @class RequiredError
48
+ * @extends {Error}
49
+ */
50
+ export class RequiredError extends Error {
51
+ constructor(field, msg) {
52
+ super(msg);
53
+ this.field = field;
54
+ this.name = "RequiredError";
55
+ }
56
+ }
@@ -0,0 +1,125 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Selling Partner API for Direct Fulfillment Shipping
5
+ * The Selling Partner API for Direct Fulfillment Shipping provides programmatic access to a direct fulfillment vendor\'s shipping 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
+ import { RequiredError } from "./base";
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export const DUMMY_BASE_URL = 'https://example.com';
20
+ /**
21
+ *
22
+ * @throws {RequiredError}
23
+ * @export
24
+ */
25
+ export const assertParamExists = function (functionName, paramName, paramValue) {
26
+ if (paramValue === null || paramValue === undefined) {
27
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
28
+ }
29
+ };
30
+ /**
31
+ *
32
+ * @export
33
+ */
34
+ export const setApiKeyToObject = async function (object, keyParamName, configuration) {
35
+ if (configuration && configuration.apiKey) {
36
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
37
+ ? await configuration.apiKey(keyParamName)
38
+ : await configuration.apiKey;
39
+ object[keyParamName] = localVarApiKeyValue;
40
+ }
41
+ };
42
+ /**
43
+ *
44
+ * @export
45
+ */
46
+ export const setBasicAuthToObject = function (object, configuration) {
47
+ if (configuration && (configuration.username || configuration.password)) {
48
+ object["auth"] = { username: configuration.username, password: configuration.password };
49
+ }
50
+ };
51
+ /**
52
+ *
53
+ * @export
54
+ */
55
+ export const setBearerAuthToObject = async function (object, configuration) {
56
+ if (configuration && configuration.accessToken) {
57
+ const accessToken = typeof configuration.accessToken === 'function'
58
+ ? await configuration.accessToken()
59
+ : await configuration.accessToken;
60
+ object["Authorization"] = "Bearer " + accessToken;
61
+ }
62
+ };
63
+ /**
64
+ *
65
+ * @export
66
+ */
67
+ export const setOAuthToObject = async function (object, name, scopes, configuration) {
68
+ if (configuration && configuration.accessToken) {
69
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
70
+ ? await configuration.accessToken(name, scopes)
71
+ : await configuration.accessToken;
72
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
73
+ }
74
+ };
75
+ /**
76
+ *
77
+ * @export
78
+ */
79
+ export const setSearchParams = function (url, ...objects) {
80
+ const searchParams = new URLSearchParams(url.search);
81
+ for (const object of objects) {
82
+ for (const key in object) {
83
+ if (Array.isArray(object[key])) {
84
+ searchParams.delete(key);
85
+ for (const item of object[key]) {
86
+ searchParams.append(key, item);
87
+ }
88
+ }
89
+ else {
90
+ searchParams.set(key, object[key]);
91
+ }
92
+ }
93
+ }
94
+ url.search = searchParams.toString();
95
+ };
96
+ /**
97
+ *
98
+ * @export
99
+ */
100
+ export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
101
+ const nonString = typeof value !== 'string';
102
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
103
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
104
+ : nonString;
105
+ return needsSerialization
106
+ ? JSON.stringify(value !== undefined ? value : {})
107
+ : (value || "");
108
+ };
109
+ /**
110
+ *
111
+ * @export
112
+ */
113
+ export const toPathString = function (url) {
114
+ return url.pathname + url.search + url.hash;
115
+ };
116
+ /**
117
+ *
118
+ * @export
119
+ */
120
+ export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
121
+ return (axios = globalAxios, basePath = BASE_PATH) => {
122
+ const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
123
+ return axios.request(axiosRequestArgs);
124
+ };
125
+ };