@sp-api-sdk/finances-api-2024-06-19 3.3.4 → 4.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 (95) hide show
  1. package/README.md +7 -8
  2. package/dist/index.cjs +307 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +730 -0
  5. package/dist/index.d.ts +730 -0
  6. package/dist/index.js +275 -0
  7. package/dist/index.js.map +1 -0
  8. package/package.json +26 -12
  9. package/dist/cjs/api-model/api/finances-api.js +0 -150
  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/amazon-pay-context.js +0 -15
  16. package/dist/cjs/api-model/models/breakdown.js +0 -15
  17. package/dist/cjs/api-model/models/business-context.js +0 -19
  18. package/dist/cjs/api-model/models/context-all-of.js +0 -15
  19. package/dist/cjs/api-model/models/context.js +0 -15
  20. package/dist/cjs/api-model/models/currency.js +0 -15
  21. package/dist/cjs/api-model/models/deferred-context.js +0 -15
  22. package/dist/cjs/api-model/models/error-list.js +0 -15
  23. package/dist/cjs/api-model/models/index.js +0 -36
  24. package/dist/cjs/api-model/models/item-related-identifier.js +0 -22
  25. package/dist/cjs/api-model/models/item.js +0 -15
  26. package/dist/cjs/api-model/models/list-transactions-response.js +0 -15
  27. package/dist/cjs/api-model/models/marketplace-details.js +0 -15
  28. package/dist/cjs/api-model/models/model-error.js +0 -15
  29. package/dist/cjs/api-model/models/payments-context.js +0 -15
  30. package/dist/cjs/api-model/models/product-context.js +0 -15
  31. package/dist/cjs/api-model/models/related-identifier.js +0 -28
  32. package/dist/cjs/api-model/models/selling-partner-metadata.js +0 -15
  33. package/dist/cjs/api-model/models/time-range-context.js +0 -15
  34. package/dist/cjs/api-model/models/transaction.js +0 -15
  35. package/dist/cjs/api-model/models/transactions-payload.js +0 -15
  36. package/dist/cjs/client.js +0 -21
  37. package/dist/cjs/index.js +0 -19
  38. package/dist/es/api-model/api/finances-api.js +0 -140
  39. package/dist/es/api-model/api.js +0 -14
  40. package/dist/es/api-model/base.js +0 -44
  41. package/dist/es/api-model/common.js +0 -110
  42. package/dist/es/api-model/configuration.js +0 -94
  43. package/dist/es/api-model/index.js +0 -16
  44. package/dist/es/api-model/models/amazon-pay-context.js +0 -14
  45. package/dist/es/api-model/models/breakdown.js +0 -14
  46. package/dist/es/api-model/models/business-context.js +0 -16
  47. package/dist/es/api-model/models/context-all-of.js +0 -14
  48. package/dist/es/api-model/models/context.js +0 -14
  49. package/dist/es/api-model/models/currency.js +0 -14
  50. package/dist/es/api-model/models/deferred-context.js +0 -14
  51. package/dist/es/api-model/models/error-list.js +0 -14
  52. package/dist/es/api-model/models/index.js +0 -20
  53. package/dist/es/api-model/models/item-related-identifier.js +0 -19
  54. package/dist/es/api-model/models/item.js +0 -14
  55. package/dist/es/api-model/models/list-transactions-response.js +0 -14
  56. package/dist/es/api-model/models/marketplace-details.js +0 -14
  57. package/dist/es/api-model/models/model-error.js +0 -14
  58. package/dist/es/api-model/models/payments-context.js +0 -14
  59. package/dist/es/api-model/models/product-context.js +0 -14
  60. package/dist/es/api-model/models/related-identifier.js +0 -25
  61. package/dist/es/api-model/models/selling-partner-metadata.js +0 -14
  62. package/dist/es/api-model/models/time-range-context.js +0 -14
  63. package/dist/es/api-model/models/transaction.js +0 -14
  64. package/dist/es/api-model/models/transactions-payload.js +0 -14
  65. package/dist/es/client.js +0 -17
  66. package/dist/es/index.js +0 -3
  67. package/dist/types/api-model/api/finances-api.d.ts +0 -109
  68. package/dist/types/api-model/api.d.ts +0 -12
  69. package/dist/types/api-model/base.d.ts +0 -42
  70. package/dist/types/api-model/common.d.ts +0 -34
  71. package/dist/types/api-model/configuration.d.ts +0 -98
  72. package/dist/types/api-model/index.d.ts +0 -14
  73. package/dist/types/api-model/models/amazon-pay-context.d.ts +0 -28
  74. package/dist/types/api-model/models/breakdown.d.ts +0 -26
  75. package/dist/types/api-model/models/business-context.d.ts +0 -24
  76. package/dist/types/api-model/models/context-all-of.d.ts +0 -14
  77. package/dist/types/api-model/models/context.d.ts +0 -23
  78. package/dist/types/api-model/models/currency.d.ts +0 -24
  79. package/dist/types/api-model/models/deferred-context.d.ts +0 -24
  80. package/dist/types/api-model/models/error-list.d.ts +0 -20
  81. package/dist/types/api-model/models/index.d.ts +0 -20
  82. package/dist/types/api-model/models/item-related-identifier.d.ts +0 -31
  83. package/dist/types/api-model/models/item.d.ts +0 -37
  84. package/dist/types/api-model/models/list-transactions-response.d.ts +0 -18
  85. package/dist/types/api-model/models/marketplace-details.d.ts +0 -24
  86. package/dist/types/api-model/models/model-error.d.ts +0 -28
  87. package/dist/types/api-model/models/payments-context.d.ts +0 -32
  88. package/dist/types/api-model/models/product-context.d.ts +0 -32
  89. package/dist/types/api-model/models/related-identifier.d.ts +0 -37
  90. package/dist/types/api-model/models/selling-partner-metadata.d.ts +0 -28
  91. package/dist/types/api-model/models/time-range-context.d.ts +0 -24
  92. package/dist/types/api-model/models/transaction.d.ts +0 -62
  93. package/dist/types/api-model/models/transactions-payload.d.ts +0 -25
  94. package/dist/types/client.d.ts +0 -6
  95. package/dist/types/index.d.ts +0 -3
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
7
- *
8
- * The version of the OpenAPI document: 2024-06-19
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 });
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
7
- *
8
- * The version of the OpenAPI document: 2024-06-19
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 });
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * The Selling Partner API for Finances
6
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
7
- *
8
- * The version of the OpenAPI document: 2024-06-19
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 });
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FinancesApiClient = exports.clientRateLimits = void 0;
4
- const common_1 = require("@sp-api-sdk/common");
5
- const api_model_1 = require("./api-model");
6
- exports.clientRateLimits = [
7
- {
8
- method: 'get',
9
- // eslint-disable-next-line prefer-regex-literals
10
- urlRegex: new RegExp('^/finances/2024-06-19/transactions$'),
11
- rate: 0.5,
12
- burst: 10,
13
- },
14
- ];
15
- class FinancesApiClient extends api_model_1.FinancesApi {
16
- constructor(configuration) {
17
- const { axios, endpoint } = (0, common_1.createAxiosInstance)(configuration, exports.clientRateLimits);
18
- super(new api_model_1.Configuration(), endpoint, axios);
19
- }
20
- }
21
- exports.FinancesApiClient = FinancesApiClient;
package/dist/cjs/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client"), exports);
18
- __exportStar(require("./api-model/api"), exports);
19
- __exportStar(require("./api-model/models"), exports);
@@ -1,140 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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, setSearchParams, toPathString, createRequestFunction } from '../common';
18
- // @ts-ignore
19
- import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
20
- /**
21
- * FinancesApi - axios parameter creator
22
- */
23
- export const FinancesApiAxiosParamCreator = function (configuration) {
24
- return {
25
- /**
26
- * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
27
- * @param {string} [postedAfter] The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request. This field is required if you do not specify a related identifier.
28
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
29
- * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
30
- * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
31
- * @param {string} [relatedIdentifierName] The name of the `relatedIdentifier`. **Possible values:** * `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction. * `ORDER_ID`: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be included in the response when available, they cannot be used for filtering purposes.
32
- * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
33
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
34
- * @param {*} [options] Override http request option.
35
- * @throws {RequiredError}
36
- */
37
- listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options = {}) => {
38
- const localVarPath = `/finances/2024-06-19/transactions`;
39
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
40
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
41
- let baseOptions;
42
- if (configuration) {
43
- baseOptions = configuration.baseOptions;
44
- }
45
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
46
- const localVarHeaderParameter = {};
47
- const localVarQueryParameter = {};
48
- if (postedAfter !== undefined) {
49
- localVarQueryParameter['postedAfter'] = (postedAfter instanceof Date) ?
50
- postedAfter.toISOString() :
51
- postedAfter;
52
- }
53
- if (postedBefore !== undefined) {
54
- localVarQueryParameter['postedBefore'] = (postedBefore instanceof Date) ?
55
- postedBefore.toISOString() :
56
- postedBefore;
57
- }
58
- if (marketplaceId !== undefined) {
59
- localVarQueryParameter['marketplaceId'] = marketplaceId;
60
- }
61
- if (transactionStatus !== undefined) {
62
- localVarQueryParameter['transactionStatus'] = transactionStatus;
63
- }
64
- if (relatedIdentifierName !== undefined) {
65
- localVarQueryParameter['relatedIdentifierName'] = relatedIdentifierName;
66
- }
67
- if (relatedIdentifierValue !== undefined) {
68
- localVarQueryParameter['relatedIdentifierValue'] = relatedIdentifierValue;
69
- }
70
- if (nextToken !== undefined) {
71
- localVarQueryParameter['nextToken'] = nextToken;
72
- }
73
- localVarHeaderParameter['Accept'] = 'application/json';
74
- setSearchParams(localVarUrlObj, localVarQueryParameter);
75
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
77
- return {
78
- url: toPathString(localVarUrlObj),
79
- options: localVarRequestOptions,
80
- };
81
- },
82
- };
83
- };
84
- /**
85
- * FinancesApi - functional programming interface
86
- */
87
- export const FinancesApiFp = function (configuration) {
88
- const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
89
- return {
90
- /**
91
- * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
92
- * @param {string} [postedAfter] The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request. This field is required if you do not specify a related identifier.
93
- * @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
94
- * @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
95
- * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
96
- * @param {string} [relatedIdentifierName] The name of the `relatedIdentifier`. **Possible values:** * `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction. * `ORDER_ID`: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be included in the response when available, they cannot be used for filtering purposes.
97
- * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
98
- * @param {string} [nextToken] The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.
99
- * @param {*} [options] Override http request option.
100
- * @throws {RequiredError}
101
- */
102
- async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options) {
103
- const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options);
104
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
105
- const localVarOperationServerBasePath = operationServerMap['FinancesApi.listTransactions']?.[localVarOperationServerIndex]?.url;
106
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
107
- },
108
- };
109
- };
110
- /**
111
- * FinancesApi - factory interface
112
- */
113
- export const FinancesApiFactory = function (configuration, basePath, axios) {
114
- const localVarFp = FinancesApiFp(configuration);
115
- return {
116
- /**
117
- * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
118
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
119
- * @param {*} [options] Override http request option.
120
- * @throws {RequiredError}
121
- */
122
- listTransactions(requestParameters = {}, options) {
123
- return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(axios, basePath));
124
- },
125
- };
126
- };
127
- /**
128
- * FinancesApi - object-oriented interface
129
- */
130
- export class FinancesApi extends BaseAPI {
131
- /**
132
- * Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
133
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
134
- * @param {*} [options] Override http request option.
135
- * @throws {RequiredError}
136
- */
137
- listTransactions(requestParameters = {}, options) {
138
- return FinancesApiFp(this.configuration).listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
139
- }
140
- }
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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/finances-api';
@@ -1,44 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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
- export const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
16
- export const COLLECTION_FORMATS = {
17
- csv: ",",
18
- ssv: " ",
19
- tsv: "\t",
20
- pipes: "|",
21
- };
22
- export class BaseAPI {
23
- basePath;
24
- axios;
25
- configuration;
26
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
27
- this.basePath = basePath;
28
- this.axios = axios;
29
- if (configuration) {
30
- this.configuration = configuration;
31
- this.basePath = configuration.basePath ?? basePath;
32
- }
33
- }
34
- }
35
- ;
36
- export class RequiredError extends Error {
37
- field;
38
- constructor(field, msg) {
39
- super(msg);
40
- this.field = field;
41
- this.name = "RequiredError";
42
- }
43
- }
44
- export const operationServerMap = {};
@@ -1,110 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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
- export const DUMMY_BASE_URL = 'https://example.com';
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export const assertParamExists = function (functionName, paramName, paramValue) {
21
- if (paramValue === null || paramValue === undefined) {
22
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
23
- }
24
- };
25
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
26
- if (configuration && configuration.apiKey) {
27
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
28
- ? await configuration.apiKey(keyParamName)
29
- : await configuration.apiKey;
30
- object[keyParamName] = localVarApiKeyValue;
31
- }
32
- };
33
- export const setBasicAuthToObject = function (object, configuration) {
34
- if (configuration && (configuration.username || configuration.password)) {
35
- object["auth"] = { username: configuration.username, password: configuration.password };
36
- }
37
- };
38
- export const setBearerAuthToObject = async function (object, configuration) {
39
- if (configuration && configuration.accessToken) {
40
- const accessToken = typeof configuration.accessToken === 'function'
41
- ? await configuration.accessToken()
42
- : await configuration.accessToken;
43
- object["Authorization"] = "Bearer " + accessToken;
44
- }
45
- };
46
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
47
- if (configuration && configuration.accessToken) {
48
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49
- ? await configuration.accessToken(name, scopes)
50
- : await configuration.accessToken;
51
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
52
- }
53
- };
54
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
55
- if (parameter == null)
56
- return;
57
- if (typeof parameter === "object") {
58
- if (Array.isArray(parameter) || parameter instanceof Set) {
59
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
60
- }
61
- else {
62
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
63
- }
64
- }
65
- else {
66
- if (urlSearchParams.has(key)) {
67
- urlSearchParams.append(key, parameter);
68
- }
69
- else {
70
- urlSearchParams.set(key, parameter);
71
- }
72
- }
73
- }
74
- export const setSearchParams = function (url, ...objects) {
75
- const searchParams = new URLSearchParams(url.search);
76
- setFlattenedQueryParams(searchParams, objects);
77
- url.search = searchParams.toString();
78
- };
79
- /**
80
- * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
- * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
- * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
- */
84
- // @ts-ignore
85
- export const replaceWithSerializableTypeIfNeeded = function (key, value) {
86
- if (value instanceof Set) {
87
- return Array.from(value);
88
- }
89
- else {
90
- return value;
91
- }
92
- };
93
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
94
- const nonString = typeof value !== 'string';
95
- const needsSerialization = nonString && configuration && configuration.isJsonMime
96
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
97
- : nonString;
98
- return needsSerialization
99
- ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
100
- : (value || "");
101
- };
102
- export const toPathString = function (url) {
103
- return url.pathname + url.search + url.hash;
104
- };
105
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
106
- return (axios = globalAxios, basePath = BASE_PATH) => {
107
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
108
- return axios.request(axiosRequestArgs);
109
- };
110
- };
@@ -1,94 +0,0 @@
1
- /* tslint:disable */
2
- /**
3
- * The Selling Partner API for Finances
4
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
5
- *
6
- * The version of the OpenAPI document: 2024-06-19
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- export class Configuration {
14
- /**
15
- * parameter for apiKey security
16
- * @param name security name
17
- */
18
- apiKey;
19
- /**
20
- * parameter for basic security
21
- */
22
- username;
23
- /**
24
- * parameter for basic security
25
- */
26
- password;
27
- /**
28
- * parameter for oauth2 security
29
- * @param name security name
30
- * @param scopes oauth2 scope
31
- */
32
- accessToken;
33
- /**
34
- * parameter for aws4 signature security
35
- * @param {Object} AWS4Signature - AWS4 Signature security
36
- * @param {string} options.region - aws region
37
- * @param {string} options.service - name of the service.
38
- * @param {string} credentials.accessKeyId - aws access key id
39
- * @param {string} credentials.secretAccessKey - aws access key
40
- * @param {string} credentials.sessionToken - aws session token
41
- * @memberof Configuration
42
- */
43
- awsv4;
44
- /**
45
- * override base path
46
- */
47
- basePath;
48
- /**
49
- * override server index
50
- */
51
- serverIndex;
52
- /**
53
- * base options for axios calls
54
- */
55
- baseOptions;
56
- /**
57
- * The FormData constructor that will be used to create multipart form data
58
- * requests. You can inject this here so that execution environments that
59
- * do not support the FormData class can still run the generated client.
60
- *
61
- * @type {new () => FormData}
62
- */
63
- formDataCtor;
64
- constructor(param = {}) {
65
- this.apiKey = param.apiKey;
66
- this.username = param.username;
67
- this.password = param.password;
68
- this.accessToken = param.accessToken;
69
- this.awsv4 = param.awsv4;
70
- this.basePath = param.basePath;
71
- this.serverIndex = param.serverIndex;
72
- this.baseOptions = {
73
- ...param.baseOptions,
74
- headers: {
75
- ...param.baseOptions?.headers,
76
- },
77
- };
78
- this.formDataCtor = param.formDataCtor;
79
- }
80
- /**
81
- * Check if the given MIME is a JSON MIME.
82
- * JSON MIME examples:
83
- * application/json
84
- * application/json; charset=UTF8
85
- * APPLICATION/JSON
86
- * application/vnd.company+json
87
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
- * @return True if the given MIME is JSON, false otherwise.
89
- */
90
- isJsonMime(mime) {
91
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
92
- return mime !== null && jsonMime.test(mime);
93
- }
94
- }
@@ -1,16 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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";
15
- export * from "./configuration";
16
- export * from "./models";
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,16 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 const BusinessContextStoreNameEnum = {
15
- AmazonHaul: 'AMAZON_HAUL',
16
- };
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};
@@ -1,14 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * The Selling Partner API for Finances
5
- * The Selling Partner API for Finances provides financial information relevant to a seller\'s business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
6
- *
7
- * The version of the OpenAPI document: 2024-06-19
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 {};