@sp-api-sdk/product-pricing-api-2022-05-01 1.1.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 (96) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -0
  3. package/dist/cjs/index.js +5 -0
  4. package/dist/cjs/src/api-model/api/product-pricing-api.js +119 -0
  5. package/dist/cjs/src/api-model/api.js +17 -0
  6. package/dist/cjs/src/api-model/base.js +66 -0
  7. package/dist/cjs/src/api-model/common.js +143 -0
  8. package/dist/cjs/src/api-model/configuration.js +91 -0
  9. package/dist/cjs/src/api-model/index.js +19 -0
  10. package/dist/cjs/src/api-model/models/batch-request.js +15 -0
  11. package/dist/cjs/src/api-model/models/batch-response.js +15 -0
  12. package/dist/cjs/src/api-model/models/condition.js +28 -0
  13. package/dist/cjs/src/api-model/models/errors.js +15 -0
  14. package/dist/cjs/src/api-model/models/featured-offer-expected-price-request-params.js +15 -0
  15. package/dist/cjs/src/api-model/models/featured-offer-expected-price-request.js +15 -0
  16. package/dist/cjs/src/api-model/models/featured-offer-expected-price-response-all-of.js +15 -0
  17. package/dist/cjs/src/api-model/models/featured-offer-expected-price-response-body.js +15 -0
  18. package/dist/cjs/src/api-model/models/featured-offer-expected-price-response.js +15 -0
  19. package/dist/cjs/src/api-model/models/featured-offer-expected-price-result.js +15 -0
  20. package/dist/cjs/src/api-model/models/featured-offer-expected-price.js +15 -0
  21. package/dist/cjs/src/api-model/models/featured-offer.js +15 -0
  22. package/dist/cjs/src/api-model/models/fulfillment-type.js +25 -0
  23. package/dist/cjs/src/api-model/models/get-featured-offer-expected-price-batch-request.js +15 -0
  24. package/dist/cjs/src/api-model/models/get-featured-offer-expected-price-batch-response.js +15 -0
  25. package/dist/cjs/src/api-model/models/http-method.js +28 -0
  26. package/dist/cjs/src/api-model/models/http-status-line.js +15 -0
  27. package/dist/cjs/src/api-model/models/index.js +25 -0
  28. package/dist/cjs/src/api-model/models/model-error.js +15 -0
  29. package/dist/cjs/src/api-model/models/money-type.js +15 -0
  30. package/dist/cjs/src/api-model/models/offer-identifier.js +15 -0
  31. package/dist/cjs/src/api-model/models/points.js +15 -0
  32. package/dist/cjs/src/api-model/models/price.js +15 -0
  33. package/dist/cjs/src/client.js +21 -0
  34. package/dist/es/index.js +2 -0
  35. package/dist/es/src/api-model/api/product-pricing-api.js +111 -0
  36. package/dist/es/src/api-model/api.js +14 -0
  37. package/dist/es/src/api-model/base.js +60 -0
  38. package/dist/es/src/api-model/common.js +131 -0
  39. package/dist/es/src/api-model/configuration.js +87 -0
  40. package/dist/es/src/api-model/index.js +16 -0
  41. package/dist/es/src/api-model/models/batch-request.js +14 -0
  42. package/dist/es/src/api-model/models/batch-response.js +14 -0
  43. package/dist/es/src/api-model/models/condition.js +25 -0
  44. package/dist/es/src/api-model/models/errors.js +14 -0
  45. package/dist/es/src/api-model/models/featured-offer-expected-price-request-params.js +14 -0
  46. package/dist/es/src/api-model/models/featured-offer-expected-price-request.js +14 -0
  47. package/dist/es/src/api-model/models/featured-offer-expected-price-response-all-of.js +14 -0
  48. package/dist/es/src/api-model/models/featured-offer-expected-price-response-body.js +14 -0
  49. package/dist/es/src/api-model/models/featured-offer-expected-price-response.js +14 -0
  50. package/dist/es/src/api-model/models/featured-offer-expected-price-result.js +14 -0
  51. package/dist/es/src/api-model/models/featured-offer-expected-price.js +14 -0
  52. package/dist/es/src/api-model/models/featured-offer.js +14 -0
  53. package/dist/es/src/api-model/models/fulfillment-type.js +22 -0
  54. package/dist/es/src/api-model/models/get-featured-offer-expected-price-batch-request.js +14 -0
  55. package/dist/es/src/api-model/models/get-featured-offer-expected-price-batch-response.js +14 -0
  56. package/dist/es/src/api-model/models/http-method.js +25 -0
  57. package/dist/es/src/api-model/models/http-status-line.js +14 -0
  58. package/dist/es/src/api-model/models/index.js +22 -0
  59. package/dist/es/src/api-model/models/model-error.js +14 -0
  60. package/dist/es/src/api-model/models/money-type.js +14 -0
  61. package/dist/es/src/api-model/models/offer-identifier.js +14 -0
  62. package/dist/es/src/api-model/models/points.js +14 -0
  63. package/dist/es/src/api-model/models/price.js +14 -0
  64. package/dist/es/src/client.js +17 -0
  65. package/dist/types/index.d.ts +2 -0
  66. package/dist/types/src/api-model/api/product-pricing-api.d.ts +84 -0
  67. package/dist/types/src/api-model/api.d.ts +12 -0
  68. package/dist/types/src/api-model/base.d.ts +55 -0
  69. package/dist/types/src/api-model/common.d.ts +66 -0
  70. package/dist/types/src/api-model/configuration.d.ts +83 -0
  71. package/dist/types/src/api-model/index.d.ts +14 -0
  72. package/dist/types/src/api-model/models/batch-request.d.ts +47 -0
  73. package/dist/types/src/api-model/models/batch-response.d.ts +33 -0
  74. package/dist/types/src/api-model/models/condition.d.ts +24 -0
  75. package/dist/types/src/api-model/models/errors.d.ts +24 -0
  76. package/dist/types/src/api-model/models/featured-offer-expected-price-request-params.d.ts +30 -0
  77. package/dist/types/src/api-model/models/featured-offer-expected-price-request.d.ts +19 -0
  78. package/dist/types/src/api-model/models/featured-offer-expected-price-response-all-of.d.ts +32 -0
  79. package/dist/types/src/api-model/models/featured-offer-expected-price-response-body.d.ts +38 -0
  80. package/dist/types/src/api-model/models/featured-offer-expected-price-response.d.ts +18 -0
  81. package/dist/types/src/api-model/models/featured-offer-expected-price-result.d.ts +44 -0
  82. package/dist/types/src/api-model/models/featured-offer-expected-price.d.ts +32 -0
  83. package/dist/types/src/api-model/models/featured-offer.d.ts +39 -0
  84. package/dist/types/src/api-model/models/fulfillment-type.d.ts +21 -0
  85. package/dist/types/src/api-model/models/get-featured-offer-expected-price-batch-request.d.ts +25 -0
  86. package/dist/types/src/api-model/models/get-featured-offer-expected-price-batch-response.d.ts +25 -0
  87. package/dist/types/src/api-model/models/http-method.d.ts +24 -0
  88. package/dist/types/src/api-model/models/http-status-line.d.ts +30 -0
  89. package/dist/types/src/api-model/models/index.d.ts +22 -0
  90. package/dist/types/src/api-model/models/model-error.d.ts +36 -0
  91. package/dist/types/src/api-model/models/money-type.d.ts +30 -0
  92. package/dist/types/src/api-model/models/offer-identifier.d.ts +49 -0
  93. package/dist/types/src/api-model/models/points.d.ts +31 -0
  94. package/dist/types/src/api-model/models/price.d.ts +38 -0
  95. package/dist/types/src/client.d.ts +6 -0
  96. package/package.json +55 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Bizon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # `product-pricing-api-2022-05-01`
2
+
3
+ The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products.
4
+
5
+ For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
6
+
7
+ [![npm version](https://badgen.net/npm/v/@sp-api-sdk/product-pricing-api-2022-05-01)](https://www.npmjs.com/package/@sp-api-sdk/product-pricing-api-2022-05-01)
8
+ [![XO code style](https://badgen.net/badge/code%20style/XO/cyan)](https://github.com/xojs/xo)
9
+
10
+ ## Documentation
11
+
12
+ Learn more about this Selling Partner API by visiting the [official documentation](https://developer-docs.amazon.com/sp-api/docs).
13
+
14
+ Also, see the [generated documentation](https://bizon.github.io/selling-partner-api-sdk/modules/_sp_api_sdk_product_pricing_api_2022_05_01.html) for this API client.
15
+
16
+ ## Installing
17
+
18
+ ```sh
19
+ yarn add @sp-api-sdk/product-pricing-api-2022-05-01
20
+ ```
21
+
22
+ ```sh
23
+ npm install @sp-api-sdk/product-pricing-api-2022-05-01
24
+ ```
25
+
26
+ ## Getting Started
27
+
28
+ ```javascript
29
+ import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
30
+ import {ProductPricingApiClient} from '@sp-api-sdk/product-pricing-api-2022-05-01'
31
+
32
+ const auth = new SellingPartnerApiAuth({
33
+ clientId: process.env.LWA_CLIENT_ID,
34
+ clientSecret: process.env.LWA_CLIENT_SECRET,
35
+ refreshToken: 'Atzr|…',
36
+ accessKeyId: '',
37
+ secretAccessKey: '',
38
+ role: {
39
+ arn: 'arn:aws:iam::…',
40
+ },
41
+ })
42
+
43
+ const client = new ProductPricingApiClient({
44
+ auth,
45
+ region: 'eu',
46
+ })
47
+ ```
48
+
49
+ ## Rate Limiting
50
+
51
+ In order to retry rate limited requests (HTTP 429), you can configure the API client as such:
52
+
53
+ ```javascript
54
+ const client = new ProductPricingApiClient({
55
+ auth,
56
+ region: 'eu',
57
+ rateLimiting: {
58
+ retry: true,
59
+ // Optionally specify a callback that will be called on every retry.
60
+ onRetry: (retryInfo) => {
61
+ console.log(retryInfo)
62
+ },
63
+ },
64
+ })
65
+ ```
66
+
67
+ The rate limits used for each route are specified in the [API documentation](https://developer-docs.amazon.com/sp-api/docs).
68
+
69
+ ## Logging
70
+
71
+ You can enable logging for both SP-API requests and responses by configuring the `logging.request` and `logging.response` properties.
72
+
73
+ ```javascript
74
+ const client = new ProductPricingApiClient({
75
+ auth,
76
+ region: 'eu',
77
+ logging: {
78
+ request: {
79
+ logger: console.debug
80
+ },
81
+ response: {
82
+ logger: console.debug
83
+ },
84
+ error: true,
85
+ },
86
+ })
87
+ ```
88
+
89
+ Specifying `true` will use the default options, specifying an object will allow you to override the default options.
90
+ This uses [axios-logger](https://github.com/hg-pyun/axios-logger) under the hood.
91
+ By default, if enabled, the `request` and `response` loggers will use `console.info` and the `error` logger will use `console.error`.
92
+
93
+
94
+ ## License
95
+
96
+ MIT
97
+
98
+ ## Miscellaneous
99
+
100
+ ```
101
+ ╚⊙ ⊙╝
102
+ ╚═(███)═╝
103
+ ╚═(███)═╝
104
+ ╚═(███)═╝
105
+ ╚═(███)═╝
106
+ ╚═(███)═╝
107
+ ╚═(███)═╝
108
+ ```
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./src/client"), exports);
5
+ tslib_1.__exportStar(require("./src/api-model/models"), exports);
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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.ProductPricingApi = exports.ProductPricingApiFactory = exports.ProductPricingApiFp = exports.ProductPricingApiAxiosParamCreator = void 0;
17
+ const tslib_1 = require("tslib");
18
+ const axios_1 = tslib_1.__importDefault(require("axios"));
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ const common_1 = require("../common");
22
+ // @ts-ignore
23
+ const base_1 = require("../base");
24
+ /**
25
+ * ProductPricingApi - axios parameter creator
26
+ * @export
27
+ */
28
+ const ProductPricingApiAxiosParamCreator = function (configuration) {
29
+ return {
30
+ /**
31
+ * Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request body. The response for each successful (HTTP status code 200) request in the set includes the computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions). This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing offers may change, and different offers may be featured based on other factors, including fulfillment capabilities to a specific customer. The response to an unsuccessful request includes the available error text. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.033 | 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).
32
+ * @param {GetFeaturedOfferExpectedPriceBatchRequest} getFeaturedOfferExpectedPriceBatchRequestBody
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ */
36
+ getFeaturedOfferExpectedPriceBatch: async (getFeaturedOfferExpectedPriceBatchRequestBody, options = {}) => {
37
+ // verify required parameter 'getFeaturedOfferExpectedPriceBatchRequestBody' is not null or undefined
38
+ (0, common_1.assertParamExists)('getFeaturedOfferExpectedPriceBatch', 'getFeaturedOfferExpectedPriceBatchRequestBody', getFeaturedOfferExpectedPriceBatchRequestBody);
39
+ const localVarPath = `/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice`;
40
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
41
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
42
+ let baseOptions;
43
+ if (configuration) {
44
+ baseOptions = configuration.baseOptions;
45
+ }
46
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
47
+ const localVarHeaderParameter = {};
48
+ const localVarQueryParameter = {};
49
+ localVarHeaderParameter['Content-Type'] = 'application/json';
50
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
51
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
52
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
53
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(getFeaturedOfferExpectedPriceBatchRequestBody, localVarRequestOptions, configuration);
54
+ return {
55
+ url: (0, common_1.toPathString)(localVarUrlObj),
56
+ options: localVarRequestOptions,
57
+ };
58
+ },
59
+ };
60
+ };
61
+ exports.ProductPricingApiAxiosParamCreator = ProductPricingApiAxiosParamCreator;
62
+ /**
63
+ * ProductPricingApi - functional programming interface
64
+ * @export
65
+ */
66
+ const ProductPricingApiFp = function (configuration) {
67
+ const localVarAxiosParamCreator = (0, exports.ProductPricingApiAxiosParamCreator)(configuration);
68
+ return {
69
+ /**
70
+ * Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request body. The response for each successful (HTTP status code 200) request in the set includes the computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions). This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing offers may change, and different offers may be featured based on other factors, including fulfillment capabilities to a specific customer. The response to an unsuccessful request includes the available error text. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.033 | 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).
71
+ * @param {GetFeaturedOfferExpectedPriceBatchRequest} getFeaturedOfferExpectedPriceBatchRequestBody
72
+ * @param {*} [options] Override http request option.
73
+ * @throws {RequiredError}
74
+ */
75
+ async getFeaturedOfferExpectedPriceBatch(getFeaturedOfferExpectedPriceBatchRequestBody, options) {
76
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getFeaturedOfferExpectedPriceBatch(getFeaturedOfferExpectedPriceBatchRequestBody, options);
77
+ return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
78
+ },
79
+ };
80
+ };
81
+ exports.ProductPricingApiFp = ProductPricingApiFp;
82
+ /**
83
+ * ProductPricingApi - factory interface
84
+ * @export
85
+ */
86
+ const ProductPricingApiFactory = function (configuration, basePath, axios) {
87
+ const localVarFp = (0, exports.ProductPricingApiFp)(configuration);
88
+ return {
89
+ /**
90
+ * Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request body. The response for each successful (HTTP status code 200) request in the set includes the computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions). This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing offers may change, and different offers may be featured based on other factors, including fulfillment capabilities to a specific customer. The response to an unsuccessful request includes the available error text. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.033 | 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).
91
+ * @param {GetFeaturedOfferExpectedPriceBatchRequest} getFeaturedOfferExpectedPriceBatchRequestBody
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ getFeaturedOfferExpectedPriceBatch(getFeaturedOfferExpectedPriceBatchRequestBody, options) {
96
+ return localVarFp.getFeaturedOfferExpectedPriceBatch(getFeaturedOfferExpectedPriceBatchRequestBody, options).then((request) => request(axios, basePath));
97
+ },
98
+ };
99
+ };
100
+ exports.ProductPricingApiFactory = ProductPricingApiFactory;
101
+ /**
102
+ * ProductPricingApi - object-oriented interface
103
+ * @export
104
+ * @class ProductPricingApi
105
+ * @extends {BaseAPI}
106
+ */
107
+ class ProductPricingApi extends base_1.BaseAPI {
108
+ /**
109
+ * Returns the set of responses that correspond to the batched list of up to 40 requests defined in the request body. The response for each successful (HTTP status code 200) request in the set includes the computed listing price at or below which a seller can expect to become the featured offer (before applicable promotions). This is called the featured offer expected price (FOEP). Featured offer is not guaranteed, because competing offers may change, and different offers may be featured based on other factors, including fulfillment capabilities to a specific customer. The response to an unsuccessful request includes the available error text. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.033 | 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).
110
+ * @param {ProductPricingApiGetFeaturedOfferExpectedPriceBatchRequest} requestParameters Request parameters.
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ * @memberof ProductPricingApi
114
+ */
115
+ getFeaturedOfferExpectedPriceBatch(requestParameters, options) {
116
+ return (0, exports.ProductPricingApiFp)(this.configuration).getFeaturedOfferExpectedPriceBatch(requestParameters.getFeaturedOfferExpectedPriceBatchRequestBody, options).then((request) => request(this.axios, this.basePath));
117
+ }
118
+ }
119
+ exports.ProductPricingApi = ProductPricingApi;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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
+ const tslib_1 = require("tslib");
17
+ tslib_1.__exportStar(require("./api/product-pricing-api"), exports);
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
+ const tslib_1 = require("tslib");
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ const axios_1 = tslib_1.__importDefault(require("axios"));
21
+ exports.BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.COLLECTION_FORMATS = {
27
+ csv: ",",
28
+ ssv: " ",
29
+ tsv: "\t",
30
+ pipes: "|",
31
+ };
32
+ /**
33
+ *
34
+ * @export
35
+ * @class BaseAPI
36
+ */
37
+ class BaseAPI {
38
+ basePath;
39
+ axios;
40
+ configuration;
41
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
42
+ this.basePath = basePath;
43
+ this.axios = axios;
44
+ if (configuration) {
45
+ this.configuration = configuration;
46
+ this.basePath = configuration.basePath || this.basePath;
47
+ }
48
+ }
49
+ }
50
+ exports.BaseAPI = BaseAPI;
51
+ ;
52
+ /**
53
+ *
54
+ * @export
55
+ * @class RequiredError
56
+ * @extends {Error}
57
+ */
58
+ class RequiredError extends Error {
59
+ field;
60
+ name = "RequiredError";
61
+ constructor(field, msg) {
62
+ super(msg);
63
+ this.field = field;
64
+ }
65
+ }
66
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
+ const base_1 = require("./base");
18
+ /**
19
+ *
20
+ * @export
21
+ */
22
+ exports.DUMMY_BASE_URL = 'https://example.com';
23
+ /**
24
+ *
25
+ * @throws {RequiredError}
26
+ * @export
27
+ */
28
+ const assertParamExists = function (functionName, paramName, paramValue) {
29
+ if (paramValue === null || paramValue === undefined) {
30
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
31
+ }
32
+ };
33
+ exports.assertParamExists = assertParamExists;
34
+ /**
35
+ *
36
+ * @export
37
+ */
38
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
39
+ if (configuration && configuration.apiKey) {
40
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
41
+ ? await configuration.apiKey(keyParamName)
42
+ : await configuration.apiKey;
43
+ object[keyParamName] = localVarApiKeyValue;
44
+ }
45
+ };
46
+ exports.setApiKeyToObject = setApiKeyToObject;
47
+ /**
48
+ *
49
+ * @export
50
+ */
51
+ const setBasicAuthToObject = function (object, configuration) {
52
+ if (configuration && (configuration.username || configuration.password)) {
53
+ object["auth"] = { username: configuration.username, password: configuration.password };
54
+ }
55
+ };
56
+ exports.setBasicAuthToObject = setBasicAuthToObject;
57
+ /**
58
+ *
59
+ * @export
60
+ */
61
+ const setBearerAuthToObject = async function (object, configuration) {
62
+ if (configuration && configuration.accessToken) {
63
+ const accessToken = typeof configuration.accessToken === 'function'
64
+ ? await configuration.accessToken()
65
+ : await configuration.accessToken;
66
+ object["Authorization"] = "Bearer " + accessToken;
67
+ }
68
+ };
69
+ exports.setBearerAuthToObject = setBearerAuthToObject;
70
+ /**
71
+ *
72
+ * @export
73
+ */
74
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
75
+ if (configuration && configuration.accessToken) {
76
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
77
+ ? await configuration.accessToken(name, scopes)
78
+ : await configuration.accessToken;
79
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
80
+ }
81
+ };
82
+ exports.setOAuthToObject = setOAuthToObject;
83
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
84
+ if (typeof parameter === "object") {
85
+ if (Array.isArray(parameter)) {
86
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
87
+ }
88
+ else {
89
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
90
+ }
91
+ }
92
+ else {
93
+ if (urlSearchParams.has(key)) {
94
+ urlSearchParams.append(key, parameter);
95
+ }
96
+ else {
97
+ urlSearchParams.set(key, parameter);
98
+ }
99
+ }
100
+ }
101
+ /**
102
+ *
103
+ * @export
104
+ */
105
+ const setSearchParams = function (url, ...objects) {
106
+ const searchParams = new URLSearchParams(url.search);
107
+ setFlattenedQueryParams(searchParams, objects);
108
+ url.search = searchParams.toString();
109
+ };
110
+ exports.setSearchParams = setSearchParams;
111
+ /**
112
+ *
113
+ * @export
114
+ */
115
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
116
+ const nonString = typeof value !== 'string';
117
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
118
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
119
+ : nonString;
120
+ return needsSerialization
121
+ ? JSON.stringify(value !== undefined ? value : {})
122
+ : (value || "");
123
+ };
124
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
125
+ /**
126
+ *
127
+ * @export
128
+ */
129
+ const toPathString = function (url) {
130
+ return url.pathname + url.search + url.hash;
131
+ };
132
+ exports.toPathString = toPathString;
133
+ /**
134
+ *
135
+ * @export
136
+ */
137
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
138
+ return (axios = globalAxios, basePath = BASE_PATH) => {
139
+ const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
140
+ return axios.request(axiosRequestArgs);
141
+ };
142
+ };
143
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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.Configuration = void 0;
17
+ class Configuration {
18
+ /**
19
+ * parameter for apiKey security
20
+ * @param name security name
21
+ * @memberof Configuration
22
+ */
23
+ apiKey;
24
+ /**
25
+ * parameter for basic security
26
+ *
27
+ * @type {string}
28
+ * @memberof Configuration
29
+ */
30
+ username;
31
+ /**
32
+ * parameter for basic security
33
+ *
34
+ * @type {string}
35
+ * @memberof Configuration
36
+ */
37
+ password;
38
+ /**
39
+ * parameter for oauth2 security
40
+ * @param name security name
41
+ * @param scopes oauth2 scope
42
+ * @memberof Configuration
43
+ */
44
+ accessToken;
45
+ /**
46
+ * override base path
47
+ *
48
+ * @type {string}
49
+ * @memberof Configuration
50
+ */
51
+ basePath;
52
+ /**
53
+ * base options for axios calls
54
+ *
55
+ * @type {any}
56
+ * @memberof Configuration
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.basePath = param.basePath;
73
+ this.baseOptions = param.baseOptions;
74
+ this.formDataCtor = param.formDataCtor;
75
+ }
76
+ /**
77
+ * Check if the given MIME is a JSON MIME.
78
+ * JSON MIME examples:
79
+ * application/json
80
+ * application/json; charset=UTF8
81
+ * APPLICATION/JSON
82
+ * application/vnd.company+json
83
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
84
+ * @return True if the given MIME is JSON, false otherwise.
85
+ */
86
+ isJsonMime(mime) {
87
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
88
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
89
+ }
90
+ }
91
+ exports.Configuration = Configuration;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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
+ const tslib_1 = require("tslib");
17
+ tslib_1.__exportStar(require("./api"), exports);
18
+ tslib_1.__exportStar(require("./configuration"), exports);
19
+ tslib_1.__exportStar(require("./models"), exports);
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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 });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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 });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Selling Partner API for Pricing
6
+ * The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, see the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7
+ *
8
+ * The version of the OpenAPI document: 2022-05-01
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.Condition = void 0;
17
+ /**
18
+ * The condition of the item.
19
+ * @export
20
+ * @enum {string}
21
+ */
22
+ exports.Condition = {
23
+ New: 'New',
24
+ Used: 'Used',
25
+ Collectible: 'Collectible',
26
+ Refurbished: 'Refurbished',
27
+ Club: 'Club'
28
+ };