@sp-api-sdk/fba-inbound-eligibility-api-v1 4.2.0 → 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 (44) hide show
  1. package/README.md +4 -4
  2. package/dist/index.cjs +376 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +344 -0
  5. package/dist/index.d.ts +344 -0
  6. package/dist/index.js +331 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +23 -12
  9. package/dist/cjs/api-model/api/fba-inbound-eligibility-api.js +0 -134
  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/get-item-eligibility-preview-response.js +0 -15
  16. package/dist/cjs/api-model/models/index.js +0 -19
  17. package/dist/cjs/api-model/models/item-eligibility-preview.js +0 -63
  18. package/dist/cjs/api-model/models/model-error.js +0 -15
  19. package/dist/cjs/client.js +0 -21
  20. package/dist/cjs/index.js +0 -19
  21. package/dist/es/api-model/api/fba-inbound-eligibility-api.js +0 -124
  22. package/dist/es/api-model/api.js +0 -14
  23. package/dist/es/api-model/base.js +0 -44
  24. package/dist/es/api-model/common.js +0 -110
  25. package/dist/es/api-model/configuration.js +0 -94
  26. package/dist/es/api-model/index.js +0 -16
  27. package/dist/es/api-model/models/get-item-eligibility-preview-response.js +0 -14
  28. package/dist/es/api-model/models/index.js +0 -3
  29. package/dist/es/api-model/models/item-eligibility-preview.js +0 -60
  30. package/dist/es/api-model/models/model-error.js +0 -14
  31. package/dist/es/client.js +0 -17
  32. package/dist/es/index.js +0 -3
  33. package/dist/types/api-model/api/fba-inbound-eligibility-api.d.ts +0 -90
  34. package/dist/types/api-model/api.d.ts +0 -12
  35. package/dist/types/api-model/base.d.ts +0 -42
  36. package/dist/types/api-model/common.d.ts +0 -34
  37. package/dist/types/api-model/configuration.d.ts +0 -98
  38. package/dist/types/api-model/index.d.ts +0 -14
  39. package/dist/types/api-model/models/get-item-eligibility-preview-response.d.ts +0 -22
  40. package/dist/types/api-model/models/index.d.ts +0 -3
  41. package/dist/types/api-model/models/item-eligibility-preview.d.ts +0 -85
  42. package/dist/types/api-model/models/model-error.d.ts +0 -28
  43. package/dist/types/client.d.ts +0 -6
  44. package/dist/types/index.d.ts +0 -3
@@ -0,0 +1,344 @@
1
+ import { ClientConfiguration, RateLimit } from '@sp-api-sdk/common';
2
+ import * as axios from 'axios';
3
+ import { AxiosInstance, RawAxiosRequestConfig, AxiosPromise } from 'axios';
4
+
5
+ /**
6
+ * Selling Partner API for FBA Inbound Eligibilty
7
+ * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
8
+ *
9
+ * The version of the OpenAPI document: v1
10
+ *
11
+ *
12
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13
+ * https://openapi-generator.tech
14
+ * Do not edit the class manually.
15
+ */
16
+ interface AWSv4Configuration {
17
+ options?: {
18
+ region?: string;
19
+ service?: string;
20
+ };
21
+ credentials?: {
22
+ accessKeyId?: string;
23
+ secretAccessKey?: string;
24
+ sessionToken?: string;
25
+ };
26
+ }
27
+ interface ConfigurationParameters {
28
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
+ username?: string;
30
+ password?: string;
31
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
32
+ awsv4?: AWSv4Configuration;
33
+ basePath?: string;
34
+ serverIndex?: number;
35
+ baseOptions?: any;
36
+ formDataCtor?: new () => any;
37
+ }
38
+ declare class Configuration {
39
+ /**
40
+ * parameter for apiKey security
41
+ * @param name security name
42
+ */
43
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
44
+ /**
45
+ * parameter for basic security
46
+ */
47
+ username?: string;
48
+ /**
49
+ * parameter for basic security
50
+ */
51
+ password?: string;
52
+ /**
53
+ * parameter for oauth2 security
54
+ * @param name security name
55
+ * @param scopes oauth2 scope
56
+ */
57
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
58
+ /**
59
+ * parameter for aws4 signature security
60
+ * @param {Object} AWS4Signature - AWS4 Signature security
61
+ * @param {string} options.region - aws region
62
+ * @param {string} options.service - name of the service.
63
+ * @param {string} credentials.accessKeyId - aws access key id
64
+ * @param {string} credentials.secretAccessKey - aws access key
65
+ * @param {string} credentials.sessionToken - aws session token
66
+ * @memberof Configuration
67
+ */
68
+ awsv4?: AWSv4Configuration;
69
+ /**
70
+ * override base path
71
+ */
72
+ basePath?: string;
73
+ /**
74
+ * override server index
75
+ */
76
+ serverIndex?: number;
77
+ /**
78
+ * base options for axios calls
79
+ */
80
+ baseOptions?: any;
81
+ /**
82
+ * The FormData constructor that will be used to create multipart form data
83
+ * requests. You can inject this here so that execution environments that
84
+ * do not support the FormData class can still run the generated client.
85
+ *
86
+ * @type {new () => FormData}
87
+ */
88
+ formDataCtor?: new () => any;
89
+ constructor(param?: ConfigurationParameters);
90
+ /**
91
+ * Check if the given MIME is a JSON MIME.
92
+ * JSON MIME examples:
93
+ * application/json
94
+ * application/json; charset=UTF8
95
+ * APPLICATION/JSON
96
+ * application/vnd.company+json
97
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
98
+ * @return True if the given MIME is JSON, false otherwise.
99
+ */
100
+ isJsonMime(mime: string): boolean;
101
+ }
102
+
103
+ /**
104
+ * Selling Partner API for FBA Inbound Eligibilty
105
+ * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
106
+ *
107
+ * The version of the OpenAPI document: v1
108
+ *
109
+ *
110
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
111
+ * https://openapi-generator.tech
112
+ * Do not edit the class manually.
113
+ */
114
+
115
+ interface RequestArgs {
116
+ url: string;
117
+ options: RawAxiosRequestConfig;
118
+ }
119
+ declare class BaseAPI {
120
+ protected basePath: string;
121
+ protected axios: AxiosInstance;
122
+ protected configuration: Configuration | undefined;
123
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
124
+ }
125
+
126
+ /**
127
+ * Selling Partner API for FBA Inbound Eligibilty
128
+ * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
129
+ *
130
+ * The version of the OpenAPI document: v1
131
+ *
132
+ *
133
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
134
+ * https://openapi-generator.tech
135
+ * Do not edit the class manually.
136
+ */
137
+ /**
138
+ * The response object which contains the ASIN, marketplaceId if required, eligibility program, the eligibility status (boolean), and a list of ineligibility reason codes.
139
+ */
140
+ interface ItemEligibilityPreview {
141
+ /**
142
+ * The ASIN for which eligibility was determined.
143
+ */
144
+ 'asin': string;
145
+ /**
146
+ * The marketplace for which eligibility was determined.
147
+ */
148
+ 'marketplaceId'?: string;
149
+ /**
150
+ * The program for which eligibility was determined.
151
+ */
152
+ 'program': ItemEligibilityPreviewProgramEnum;
153
+ /**
154
+ * Indicates if the item is eligible for the program.
155
+ */
156
+ 'isEligibleForProgram': boolean;
157
+ /**
158
+ * Potential Ineligibility Reason Codes.
159
+ */
160
+ 'ineligibilityReasonList'?: Array<ItemEligibilityPreviewIneligibilityReasonListEnum>;
161
+ }
162
+ declare const ItemEligibilityPreviewProgramEnum: {
163
+ readonly Inbound: "INBOUND";
164
+ readonly Commingling: "COMMINGLING";
165
+ };
166
+ type ItemEligibilityPreviewProgramEnum = typeof ItemEligibilityPreviewProgramEnum[keyof typeof ItemEligibilityPreviewProgramEnum];
167
+ declare const ItemEligibilityPreviewIneligibilityReasonListEnum: {
168
+ readonly FbaInb0004: "FBA_INB_0004";
169
+ readonly FbaInb0006: "FBA_INB_0006";
170
+ readonly FbaInb0007: "FBA_INB_0007";
171
+ readonly FbaInb0008: "FBA_INB_0008";
172
+ readonly FbaInb0009: "FBA_INB_0009";
173
+ readonly FbaInb0010: "FBA_INB_0010";
174
+ readonly FbaInb0011: "FBA_INB_0011";
175
+ readonly FbaInb0012: "FBA_INB_0012";
176
+ readonly FbaInb0013: "FBA_INB_0013";
177
+ readonly FbaInb0014: "FBA_INB_0014";
178
+ readonly FbaInb0015: "FBA_INB_0015";
179
+ readonly FbaInb0016: "FBA_INB_0016";
180
+ readonly FbaInb0017: "FBA_INB_0017";
181
+ readonly FbaInb0018: "FBA_INB_0018";
182
+ readonly FbaInb0019: "FBA_INB_0019";
183
+ readonly FbaInb0034: "FBA_INB_0034";
184
+ readonly FbaInb0035: "FBA_INB_0035";
185
+ readonly FbaInb0036: "FBA_INB_0036";
186
+ readonly FbaInb0037: "FBA_INB_0037";
187
+ readonly FbaInb0038: "FBA_INB_0038";
188
+ readonly FbaInb0050: "FBA_INB_0050";
189
+ readonly FbaInb0051: "FBA_INB_0051";
190
+ readonly FbaInb0053: "FBA_INB_0053";
191
+ readonly FbaInb0055: "FBA_INB_0055";
192
+ readonly FbaInb0056: "FBA_INB_0056";
193
+ readonly FbaInb0059: "FBA_INB_0059";
194
+ readonly FbaInb0065: "FBA_INB_0065";
195
+ readonly FbaInb0066: "FBA_INB_0066";
196
+ readonly FbaInb0067: "FBA_INB_0067";
197
+ readonly FbaInb0068: "FBA_INB_0068";
198
+ readonly FbaInb0095: "FBA_INB_0095";
199
+ readonly FbaInb0097: "FBA_INB_0097";
200
+ readonly FbaInb0098: "FBA_INB_0098";
201
+ readonly FbaInb0099: "FBA_INB_0099";
202
+ readonly FbaInb0100: "FBA_INB_0100";
203
+ readonly FbaInb0103: "FBA_INB_0103";
204
+ readonly FbaInb0104: "FBA_INB_0104";
205
+ readonly FbaInb0197: "FBA_INB_0197";
206
+ readonly FbaInb0342: "FBA_INB_0342";
207
+ readonly FbaInb0465: "FBA_INB_0465";
208
+ readonly UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE";
209
+ };
210
+ type ItemEligibilityPreviewIneligibilityReasonListEnum = typeof ItemEligibilityPreviewIneligibilityReasonListEnum[keyof typeof ItemEligibilityPreviewIneligibilityReasonListEnum];
211
+
212
+ /**
213
+ * Selling Partner API for FBA Inbound Eligibilty
214
+ * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
215
+ *
216
+ * The version of the OpenAPI document: v1
217
+ *
218
+ *
219
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
220
+ * https://openapi-generator.tech
221
+ * Do not edit the class manually.
222
+ */
223
+
224
+ /**
225
+ * The response schema for the getItemEligibilityPreview operation.
226
+ */
227
+ interface GetItemEligibilityPreviewResponse {
228
+ 'payload'?: ItemEligibilityPreview;
229
+ /**
230
+ * A list of error responses returned when a request is unsuccessful.
231
+ */
232
+ 'errors'?: Array<Error>;
233
+ }
234
+
235
+ /**
236
+ * Selling Partner API for FBA Inbound Eligibilty
237
+ * With the FBA Inbound Eligibility API, you can build applications that let sellers get eligibility previews for items before shipping them to Amazon\'s fulfillment centers. With this API you can find out if an item is eligible for inbound shipment to Amazon\'s fulfillment centers in a specific marketplace. You can also find out if an item is eligible for using the manufacturer barcode for FBA inventory tracking. Sellers can use this information to inform their decisions about which items to ship Amazon\'s fulfillment centers.
238
+ *
239
+ * The version of the OpenAPI document: v1
240
+ *
241
+ *
242
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
243
+ * https://openapi-generator.tech
244
+ * Do not edit the class manually.
245
+ */
246
+ /**
247
+ * Error response returned when the request is unsuccessful.
248
+ */
249
+ interface ModelError {
250
+ /**
251
+ * An error code that identifies the type of error that occurred.
252
+ */
253
+ 'code': string;
254
+ /**
255
+ * A message that describes the error condition in a human-readable form.
256
+ */
257
+ 'message'?: string;
258
+ /**
259
+ * Additional information that can help the caller understand or fix the issue.
260
+ */
261
+ 'details'?: string;
262
+ }
263
+
264
+ /**
265
+ * FbaInboundEligibilityApi - axios parameter creator
266
+ */
267
+ declare const FbaInboundEligibilityApiAxiosParamCreator: (configuration?: Configuration) => {
268
+ /**
269
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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 {string} asin The ASIN of the item for which you want an eligibility preview.
271
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
272
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
273
+ * @param {*} [options] Override http request option.
274
+ * @throws {RequiredError}
275
+ */
276
+ getItemEligibilityPreview: (asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
277
+ };
278
+ /**
279
+ * FbaInboundEligibilityApi - functional programming interface
280
+ */
281
+ declare const FbaInboundEligibilityApiFp: (configuration?: Configuration) => {
282
+ /**
283
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
284
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
285
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
286
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ getItemEligibilityPreview(asin: string, program: GetItemEligibilityPreviewProgramEnum, marketplaceIds?: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetItemEligibilityPreviewResponse>>;
291
+ };
292
+ /**
293
+ * FbaInboundEligibilityApi - factory interface
294
+ */
295
+ declare const FbaInboundEligibilityApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
296
+ /**
297
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
298
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ getItemEligibilityPreview(requestParameters: FbaInboundEligibilityApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig): AxiosPromise<GetItemEligibilityPreviewResponse>;
303
+ };
304
+ /**
305
+ * Request parameters for getItemEligibilityPreview operation in FbaInboundEligibilityApi.
306
+ */
307
+ interface FbaInboundEligibilityApiGetItemEligibilityPreviewRequest {
308
+ /**
309
+ * The ASIN of the item for which you want an eligibility preview.
310
+ */
311
+ readonly asin: string;
312
+ /**
313
+ * The program that you want to check eligibility against.
314
+ */
315
+ readonly program: GetItemEligibilityPreviewProgramEnum;
316
+ /**
317
+ * The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
318
+ */
319
+ readonly marketplaceIds?: Array<string>;
320
+ }
321
+ /**
322
+ * FbaInboundEligibilityApi - object-oriented interface
323
+ */
324
+ declare class FbaInboundEligibilityApi extends BaseAPI {
325
+ /**
326
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
327
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ getItemEligibilityPreview(requestParameters: FbaInboundEligibilityApiGetItemEligibilityPreviewRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<GetItemEligibilityPreviewResponse, any, {}>>;
332
+ }
333
+ declare const GetItemEligibilityPreviewProgramEnum: {
334
+ readonly Inbound: "INBOUND";
335
+ readonly Commingling: "COMMINGLING";
336
+ };
337
+ type GetItemEligibilityPreviewProgramEnum = typeof GetItemEligibilityPreviewProgramEnum[keyof typeof GetItemEligibilityPreviewProgramEnum];
338
+
339
+ declare const clientRateLimits: RateLimit[];
340
+ declare class FbaInboundEligibilityApiClient extends FbaInboundEligibilityApi {
341
+ constructor(configuration: ClientConfiguration);
342
+ }
343
+
344
+ export { FbaInboundEligibilityApi, FbaInboundEligibilityApiAxiosParamCreator, FbaInboundEligibilityApiClient, FbaInboundEligibilityApiFactory, FbaInboundEligibilityApiFp, type FbaInboundEligibilityApiGetItemEligibilityPreviewRequest, GetItemEligibilityPreviewProgramEnum, type GetItemEligibilityPreviewResponse, type ItemEligibilityPreview, ItemEligibilityPreviewIneligibilityReasonListEnum, ItemEligibilityPreviewProgramEnum, type ModelError, clientRateLimits };
package/dist/index.js ADDED
@@ -0,0 +1,331 @@
1
+ // src/client.ts
2
+ import { createAxiosInstance } from "@sp-api-sdk/common";
3
+
4
+ // src/api-model/api/fba-inbound-eligibility-api.ts
5
+ import globalAxios2 from "axios";
6
+
7
+ // src/api-model/base.ts
8
+ import globalAxios from "axios";
9
+ var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
10
+ var COLLECTION_FORMATS = {
11
+ csv: ",",
12
+ ssv: " ",
13
+ tsv: " ",
14
+ pipes: "|"
15
+ };
16
+ var BaseAPI = class {
17
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
18
+ this.basePath = basePath;
19
+ this.axios = axios;
20
+ if (configuration) {
21
+ this.configuration = configuration;
22
+ this.basePath = configuration.basePath ?? basePath;
23
+ }
24
+ }
25
+ basePath;
26
+ axios;
27
+ configuration;
28
+ };
29
+ var RequiredError = class extends Error {
30
+ constructor(field, msg) {
31
+ super(msg);
32
+ this.field = field;
33
+ this.name = "RequiredError";
34
+ }
35
+ field;
36
+ };
37
+ var operationServerMap = {};
38
+
39
+ // src/api-model/common.ts
40
+ var DUMMY_BASE_URL = "https://example.com";
41
+ var assertParamExists = function(functionName, paramName, paramValue) {
42
+ if (paramValue === null || paramValue === void 0) {
43
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
44
+ }
45
+ };
46
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
47
+ if (parameter == null) return;
48
+ if (typeof parameter === "object") {
49
+ if (Array.isArray(parameter) || parameter instanceof Set) {
50
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
51
+ } else {
52
+ Object.keys(parameter).forEach(
53
+ (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
54
+ );
55
+ }
56
+ } else {
57
+ if (urlSearchParams.has(key)) {
58
+ urlSearchParams.append(key, parameter);
59
+ } else {
60
+ urlSearchParams.set(key, parameter);
61
+ }
62
+ }
63
+ }
64
+ var setSearchParams = function(url, ...objects) {
65
+ const searchParams = new URLSearchParams(url.search);
66
+ setFlattenedQueryParams(searchParams, objects);
67
+ url.search = searchParams.toString();
68
+ };
69
+ var toPathString = function(url) {
70
+ return url.pathname + url.search + url.hash;
71
+ };
72
+ var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
73
+ return (axios = globalAxios3, basePath = BASE_PATH2) => {
74
+ const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
75
+ return axios.request(axiosRequestArgs);
76
+ };
77
+ };
78
+
79
+ // src/api-model/api/fba-inbound-eligibility-api.ts
80
+ var FbaInboundEligibilityApiAxiosParamCreator = function(configuration) {
81
+ return {
82
+ /**
83
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
84
+ * @param {string} asin The ASIN of the item for which you want an eligibility preview.
85
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
86
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ getItemEligibilityPreview: async (asin, program, marketplaceIds, options = {}) => {
91
+ assertParamExists("getItemEligibilityPreview", "asin", asin);
92
+ assertParamExists("getItemEligibilityPreview", "program", program);
93
+ const localVarPath = `/fba/inbound/v1/eligibility/itemPreview`;
94
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
95
+ let baseOptions;
96
+ if (configuration) {
97
+ baseOptions = configuration.baseOptions;
98
+ }
99
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
100
+ const localVarHeaderParameter = {};
101
+ const localVarQueryParameter = {};
102
+ if (marketplaceIds) {
103
+ localVarQueryParameter["marketplaceIds"] = marketplaceIds.join(COLLECTION_FORMATS.csv);
104
+ }
105
+ if (asin !== void 0) {
106
+ localVarQueryParameter["asin"] = asin;
107
+ }
108
+ if (program !== void 0) {
109
+ localVarQueryParameter["program"] = program;
110
+ }
111
+ localVarHeaderParameter["Accept"] = "application/json,ItemEligibilityPreview";
112
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
113
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
114
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
115
+ return {
116
+ url: toPathString(localVarUrlObj),
117
+ options: localVarRequestOptions
118
+ };
119
+ }
120
+ };
121
+ };
122
+ var FbaInboundEligibilityApiFp = function(configuration) {
123
+ const localVarAxiosParamCreator = FbaInboundEligibilityApiAxiosParamCreator(configuration);
124
+ return {
125
+ /**
126
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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 {string} asin The ASIN of the item for which you want an eligibility preview.
128
+ * @param {GetItemEligibilityPreviewProgramEnum} program The program that you want to check eligibility against.
129
+ * @param {Array<string>} [marketplaceIds] The identifier for the marketplace in which you want to determine eligibility. Required only when program&#x3D;INBOUND.
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ */
133
+ async getItemEligibilityPreview(asin, program, marketplaceIds, options) {
134
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getItemEligibilityPreview(asin, program, marketplaceIds, options);
135
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
136
+ const localVarOperationServerBasePath = operationServerMap["FbaInboundEligibilityApi.getItemEligibilityPreview"]?.[localVarOperationServerIndex]?.url;
137
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
138
+ }
139
+ };
140
+ };
141
+ var FbaInboundEligibilityApiFactory = function(configuration, basePath, axios) {
142
+ const localVarFp = FbaInboundEligibilityApiFp(configuration);
143
+ return {
144
+ /**
145
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
146
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
147
+ * @param {*} [options] Override http request option.
148
+ * @throws {RequiredError}
149
+ */
150
+ getItemEligibilityPreview(requestParameters, options) {
151
+ return localVarFp.getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(axios, basePath));
152
+ }
153
+ };
154
+ };
155
+ var FbaInboundEligibilityApi = class extends BaseAPI {
156
+ /**
157
+ * This operation gets an eligibility preview for an item that you specify. You can specify the type of eligibility preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which you want to determine the item\'s eligibility. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 1 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The 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).
158
+ * @param {FbaInboundEligibilityApiGetItemEligibilityPreviewRequest} requestParameters Request parameters.
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ getItemEligibilityPreview(requestParameters, options) {
163
+ return FbaInboundEligibilityApiFp(this.configuration).getItemEligibilityPreview(requestParameters.asin, requestParameters.program, requestParameters.marketplaceIds, options).then((request) => request(this.axios, this.basePath));
164
+ }
165
+ };
166
+ var GetItemEligibilityPreviewProgramEnum = {
167
+ Inbound: "INBOUND",
168
+ Commingling: "COMMINGLING"
169
+ };
170
+
171
+ // src/api-model/configuration.ts
172
+ var Configuration = class {
173
+ /**
174
+ * parameter for apiKey security
175
+ * @param name security name
176
+ */
177
+ apiKey;
178
+ /**
179
+ * parameter for basic security
180
+ */
181
+ username;
182
+ /**
183
+ * parameter for basic security
184
+ */
185
+ password;
186
+ /**
187
+ * parameter for oauth2 security
188
+ * @param name security name
189
+ * @param scopes oauth2 scope
190
+ */
191
+ accessToken;
192
+ /**
193
+ * parameter for aws4 signature security
194
+ * @param {Object} AWS4Signature - AWS4 Signature security
195
+ * @param {string} options.region - aws region
196
+ * @param {string} options.service - name of the service.
197
+ * @param {string} credentials.accessKeyId - aws access key id
198
+ * @param {string} credentials.secretAccessKey - aws access key
199
+ * @param {string} credentials.sessionToken - aws session token
200
+ * @memberof Configuration
201
+ */
202
+ awsv4;
203
+ /**
204
+ * override base path
205
+ */
206
+ basePath;
207
+ /**
208
+ * override server index
209
+ */
210
+ serverIndex;
211
+ /**
212
+ * base options for axios calls
213
+ */
214
+ baseOptions;
215
+ /**
216
+ * The FormData constructor that will be used to create multipart form data
217
+ * requests. You can inject this here so that execution environments that
218
+ * do not support the FormData class can still run the generated client.
219
+ *
220
+ * @type {new () => FormData}
221
+ */
222
+ formDataCtor;
223
+ constructor(param = {}) {
224
+ this.apiKey = param.apiKey;
225
+ this.username = param.username;
226
+ this.password = param.password;
227
+ this.accessToken = param.accessToken;
228
+ this.awsv4 = param.awsv4;
229
+ this.basePath = param.basePath;
230
+ this.serverIndex = param.serverIndex;
231
+ this.baseOptions = {
232
+ ...param.baseOptions,
233
+ headers: {
234
+ ...param.baseOptions?.headers
235
+ }
236
+ };
237
+ this.formDataCtor = param.formDataCtor;
238
+ }
239
+ /**
240
+ * Check if the given MIME is a JSON MIME.
241
+ * JSON MIME examples:
242
+ * application/json
243
+ * application/json; charset=UTF8
244
+ * APPLICATION/JSON
245
+ * application/vnd.company+json
246
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
247
+ * @return True if the given MIME is JSON, false otherwise.
248
+ */
249
+ isJsonMime(mime) {
250
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
251
+ return mime !== null && jsonMime.test(mime);
252
+ }
253
+ };
254
+
255
+ // src/api-model/models/item-eligibility-preview.ts
256
+ var ItemEligibilityPreviewProgramEnum = {
257
+ Inbound: "INBOUND",
258
+ Commingling: "COMMINGLING"
259
+ };
260
+ var ItemEligibilityPreviewIneligibilityReasonListEnum = {
261
+ FbaInb0004: "FBA_INB_0004",
262
+ FbaInb0006: "FBA_INB_0006",
263
+ FbaInb0007: "FBA_INB_0007",
264
+ FbaInb0008: "FBA_INB_0008",
265
+ FbaInb0009: "FBA_INB_0009",
266
+ FbaInb0010: "FBA_INB_0010",
267
+ FbaInb0011: "FBA_INB_0011",
268
+ FbaInb0012: "FBA_INB_0012",
269
+ FbaInb0013: "FBA_INB_0013",
270
+ FbaInb0014: "FBA_INB_0014",
271
+ FbaInb0015: "FBA_INB_0015",
272
+ FbaInb0016: "FBA_INB_0016",
273
+ FbaInb0017: "FBA_INB_0017",
274
+ FbaInb0018: "FBA_INB_0018",
275
+ FbaInb0019: "FBA_INB_0019",
276
+ FbaInb0034: "FBA_INB_0034",
277
+ FbaInb0035: "FBA_INB_0035",
278
+ FbaInb0036: "FBA_INB_0036",
279
+ FbaInb0037: "FBA_INB_0037",
280
+ FbaInb0038: "FBA_INB_0038",
281
+ FbaInb0050: "FBA_INB_0050",
282
+ FbaInb0051: "FBA_INB_0051",
283
+ FbaInb0053: "FBA_INB_0053",
284
+ FbaInb0055: "FBA_INB_0055",
285
+ FbaInb0056: "FBA_INB_0056",
286
+ FbaInb0059: "FBA_INB_0059",
287
+ FbaInb0065: "FBA_INB_0065",
288
+ FbaInb0066: "FBA_INB_0066",
289
+ FbaInb0067: "FBA_INB_0067",
290
+ FbaInb0068: "FBA_INB_0068",
291
+ FbaInb0095: "FBA_INB_0095",
292
+ FbaInb0097: "FBA_INB_0097",
293
+ FbaInb0098: "FBA_INB_0098",
294
+ FbaInb0099: "FBA_INB_0099",
295
+ FbaInb0100: "FBA_INB_0100",
296
+ FbaInb0103: "FBA_INB_0103",
297
+ FbaInb0104: "FBA_INB_0104",
298
+ FbaInb0197: "FBA_INB_0197",
299
+ FbaInb0342: "FBA_INB_0342",
300
+ FbaInb0465: "FBA_INB_0465",
301
+ UnknownInbErrorCode: "UNKNOWN_INB_ERROR_CODE"
302
+ };
303
+
304
+ // src/client.ts
305
+ var clientRateLimits = [
306
+ {
307
+ method: "get",
308
+ // eslint-disable-next-line prefer-regex-literals
309
+ urlRegex: new RegExp("^/fba/inbound/v1/eligibility/itemPreview$"),
310
+ rate: 1,
311
+ burst: 1
312
+ }
313
+ ];
314
+ var FbaInboundEligibilityApiClient = class extends FbaInboundEligibilityApi {
315
+ constructor(configuration) {
316
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
317
+ super(new Configuration(), endpoint, axios);
318
+ }
319
+ };
320
+ export {
321
+ FbaInboundEligibilityApi,
322
+ FbaInboundEligibilityApiAxiosParamCreator,
323
+ FbaInboundEligibilityApiClient,
324
+ FbaInboundEligibilityApiFactory,
325
+ FbaInboundEligibilityApiFp,
326
+ GetItemEligibilityPreviewProgramEnum,
327
+ ItemEligibilityPreviewIneligibilityReasonListEnum,
328
+ ItemEligibilityPreviewProgramEnum,
329
+ clientRateLimits
330
+ };
331
+ //# sourceMappingURL=index.js.map