@sp-api-sdk/finances-api-2024-06-19 4.0.0 → 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.
package/dist/index.js CHANGED
@@ -1,304 +1,275 @@
1
- // src/client.ts
2
1
  import { createAxiosInstance } from "@sp-api-sdk/common";
3
-
4
- // src/api-model/api/finances-api.ts
5
- import globalAxios2 from "axios";
6
-
7
- // src/api-model/base.ts
8
2
  import globalAxios from "axios";
9
- var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
3
+ //#region src/api-model/base.ts
4
+ const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
10
5
  var BaseAPI = class {
11
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
12
- this.basePath = basePath;
13
- this.axios = axios;
14
- if (configuration) {
15
- this.configuration = configuration;
16
- this.basePath = configuration.basePath ?? basePath;
17
- }
18
- }
19
- basePath;
20
- axios;
21
- configuration;
6
+ basePath;
7
+ axios;
8
+ configuration;
9
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
10
+ this.basePath = basePath;
11
+ this.axios = axios;
12
+ if (configuration) {
13
+ this.configuration = configuration;
14
+ this.basePath = configuration.basePath ?? basePath;
15
+ }
16
+ }
22
17
  };
23
- var operationServerMap = {};
24
-
25
- // src/api-model/common.ts
26
- var DUMMY_BASE_URL = "https://example.com";
18
+ const operationServerMap = {};
19
+ //#endregion
20
+ //#region src/api-model/common.ts
21
+ const DUMMY_BASE_URL = "https://example.com";
27
22
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
28
- if (parameter == null) return;
29
- if (typeof parameter === "object") {
30
- if (Array.isArray(parameter) || parameter instanceof Set) {
31
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
32
- } else {
33
- Object.keys(parameter).forEach(
34
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
35
- );
36
- }
37
- } else {
38
- if (urlSearchParams.has(key)) {
39
- urlSearchParams.append(key, parameter);
40
- } else {
41
- urlSearchParams.set(key, parameter);
42
- }
43
- }
23
+ if (parameter == null) return;
24
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
25
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
26
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
27
+ else urlSearchParams.set(key, parameter);
44
28
  }
45
- var setSearchParams = function(url, ...objects) {
46
- const searchParams = new URLSearchParams(url.search);
47
- setFlattenedQueryParams(searchParams, objects);
48
- url.search = searchParams.toString();
29
+ const setSearchParams = function(url, ...objects) {
30
+ const searchParams = new URLSearchParams(url.search);
31
+ setFlattenedQueryParams(searchParams, objects);
32
+ url.search = searchParams.toString();
49
33
  };
50
- var toPathString = function(url) {
51
- return url.pathname + url.search + url.hash;
34
+ const toPathString = function(url) {
35
+ return url.pathname + url.search + url.hash;
52
36
  };
53
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
54
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
55
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
56
- return axios.request(axiosRequestArgs);
57
- };
37
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
38
+ return (axios = globalAxios, basePath = BASE_PATH) => {
39
+ const axiosRequestArgs = {
40
+ ...axiosArgs.options,
41
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
42
+ };
43
+ return axios.request(axiosRequestArgs);
44
+ };
58
45
  };
59
-
60
- // src/api-model/api/finances-api.ts
61
- var FinancesApiAxiosParamCreator = function(configuration) {
62
- return {
63
- /**
64
- * 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).
65
- * @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.
66
- * @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.
67
- * @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).
68
- * @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.
69
- * @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.
70
- * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
71
- * @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.
72
- * @param {*} [options] Override http request option.
73
- * @throws {RequiredError}
74
- */
75
- listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options = {}) => {
76
- const localVarPath = `/finances/2024-06-19/transactions`;
77
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
78
- let baseOptions;
79
- if (configuration) {
80
- baseOptions = configuration.baseOptions;
81
- }
82
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
83
- const localVarHeaderParameter = {};
84
- const localVarQueryParameter = {};
85
- if (postedAfter !== void 0) {
86
- localVarQueryParameter["postedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
87
- }
88
- if (postedBefore !== void 0) {
89
- localVarQueryParameter["postedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
90
- }
91
- if (marketplaceId !== void 0) {
92
- localVarQueryParameter["marketplaceId"] = marketplaceId;
93
- }
94
- if (transactionStatus !== void 0) {
95
- localVarQueryParameter["transactionStatus"] = transactionStatus;
96
- }
97
- if (relatedIdentifierName !== void 0) {
98
- localVarQueryParameter["relatedIdentifierName"] = relatedIdentifierName;
99
- }
100
- if (relatedIdentifierValue !== void 0) {
101
- localVarQueryParameter["relatedIdentifierValue"] = relatedIdentifierValue;
102
- }
103
- if (nextToken !== void 0) {
104
- localVarQueryParameter["nextToken"] = nextToken;
105
- }
106
- localVarHeaderParameter["Accept"] = "application/json";
107
- setSearchParams(localVarUrlObj, localVarQueryParameter);
108
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
109
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
110
- return {
111
- url: toPathString(localVarUrlObj),
112
- options: localVarRequestOptions
113
- };
114
- }
115
- };
46
+ //#endregion
47
+ //#region src/api-model/api/finances-api.ts
48
+ /**
49
+ * FinancesApi - axios parameter creator
50
+ */
51
+ const FinancesApiAxiosParamCreator = function(configuration) {
52
+ return {
53
+ /**
54
+ * 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).
55
+ * @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.
56
+ * @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.
57
+ * @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).
58
+ * @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.
59
+ * @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.
60
+ * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
61
+ * @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.
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options = {}) => {
66
+ const localVarUrlObj = new URL(`/finances/2024-06-19/transactions`, DUMMY_BASE_URL);
67
+ let baseOptions;
68
+ if (configuration) baseOptions = configuration.baseOptions;
69
+ const localVarRequestOptions = {
70
+ method: "GET",
71
+ ...baseOptions,
72
+ ...options
73
+ };
74
+ const localVarHeaderParameter = {};
75
+ const localVarQueryParameter = {};
76
+ if (postedAfter !== void 0) localVarQueryParameter["postedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
77
+ if (postedBefore !== void 0) localVarQueryParameter["postedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
78
+ if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
79
+ if (transactionStatus !== void 0) localVarQueryParameter["transactionStatus"] = transactionStatus;
80
+ if (relatedIdentifierName !== void 0) localVarQueryParameter["relatedIdentifierName"] = relatedIdentifierName;
81
+ if (relatedIdentifierValue !== void 0) localVarQueryParameter["relatedIdentifierValue"] = relatedIdentifierValue;
82
+ if (nextToken !== void 0) localVarQueryParameter["nextToken"] = nextToken;
83
+ localVarHeaderParameter["Accept"] = "application/json";
84
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
85
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
86
+ localVarRequestOptions.headers = {
87
+ ...localVarHeaderParameter,
88
+ ...headersFromBaseOptions,
89
+ ...options.headers
90
+ };
91
+ return {
92
+ url: toPathString(localVarUrlObj),
93
+ options: localVarRequestOptions
94
+ };
95
+ } };
116
96
  };
117
- var FinancesApiFp = function(configuration) {
118
- const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
119
- return {
120
- /**
121
- * 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).
122
- * @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.
123
- * @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.
124
- * @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).
125
- * @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.
126
- * @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.
127
- * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
128
- * @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.
129
- * @param {*} [options] Override http request option.
130
- * @throws {RequiredError}
131
- */
132
- async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options) {
133
- const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options);
134
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
135
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listTransactions"]?.[localVarOperationServerIndex]?.url;
136
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
137
- }
138
- };
97
+ /**
98
+ * FinancesApi - functional programming interface
99
+ */
100
+ const FinancesApiFp = function(configuration) {
101
+ const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
102
+ return {
103
+ /**
104
+ * 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).
105
+ * @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.
106
+ * @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.
107
+ * @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).
108
+ * @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.
109
+ * @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.
110
+ * @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
111
+ * @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.
112
+ * @param {*} [options] Override http request option.
113
+ * @throws {RequiredError}
114
+ */
115
+ async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options) {
116
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options);
117
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
118
+ const localVarOperationServerBasePath = operationServerMap["FinancesApi.listTransactions"]?.[localVarOperationServerIndex]?.url;
119
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
120
+ } };
139
121
  };
140
- var FinancesApiFactory = function(configuration, basePath, axios) {
141
- const localVarFp = FinancesApiFp(configuration);
142
- return {
143
- /**
144
- * 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).
145
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
146
- * @param {*} [options] Override http request option.
147
- * @throws {RequiredError}
148
- */
149
- listTransactions(requestParameters = {}, options) {
150
- return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(axios, basePath));
151
- }
152
- };
122
+ /**
123
+ * FinancesApi - factory interface
124
+ */
125
+ const FinancesApiFactory = function(configuration, basePath, axios) {
126
+ const localVarFp = FinancesApiFp(configuration);
127
+ return {
128
+ /**
129
+ * 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).
130
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
131
+ * @param {*} [options] Override http request option.
132
+ * @throws {RequiredError}
133
+ */
134
+ listTransactions(requestParameters = {}, options) {
135
+ return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(axios, basePath));
136
+ } };
153
137
  };
138
+ /**
139
+ * FinancesApi - object-oriented interface
140
+ */
154
141
  var FinancesApi = class extends BaseAPI {
155
- /**
156
- * 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).
157
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
158
- * @param {*} [options] Override http request option.
159
- * @throws {RequiredError}
160
- */
161
- listTransactions(requestParameters = {}, options) {
162
- 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));
163
- }
142
+ /**
143
+ * 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).
144
+ * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
145
+ * @param {*} [options] Override http request option.
146
+ * @throws {RequiredError}
147
+ */
148
+ listTransactions(requestParameters = {}, options) {
149
+ 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));
150
+ }
164
151
  };
165
-
166
- // src/api-model/configuration.ts
152
+ //#endregion
153
+ //#region src/api-model/configuration.ts
167
154
  var Configuration = class {
168
- /**
169
- * parameter for apiKey security
170
- * @param name security name
171
- */
172
- apiKey;
173
- /**
174
- * parameter for basic security
175
- */
176
- username;
177
- /**
178
- * parameter for basic security
179
- */
180
- password;
181
- /**
182
- * parameter for oauth2 security
183
- * @param name security name
184
- * @param scopes oauth2 scope
185
- */
186
- accessToken;
187
- /**
188
- * parameter for aws4 signature security
189
- * @param {Object} AWS4Signature - AWS4 Signature security
190
- * @param {string} options.region - aws region
191
- * @param {string} options.service - name of the service.
192
- * @param {string} credentials.accessKeyId - aws access key id
193
- * @param {string} credentials.secretAccessKey - aws access key
194
- * @param {string} credentials.sessionToken - aws session token
195
- * @memberof Configuration
196
- */
197
- awsv4;
198
- /**
199
- * override base path
200
- */
201
- basePath;
202
- /**
203
- * override server index
204
- */
205
- serverIndex;
206
- /**
207
- * base options for axios calls
208
- */
209
- baseOptions;
210
- /**
211
- * The FormData constructor that will be used to create multipart form data
212
- * requests. You can inject this here so that execution environments that
213
- * do not support the FormData class can still run the generated client.
214
- *
215
- * @type {new () => FormData}
216
- */
217
- formDataCtor;
218
- constructor(param = {}) {
219
- this.apiKey = param.apiKey;
220
- this.username = param.username;
221
- this.password = param.password;
222
- this.accessToken = param.accessToken;
223
- this.awsv4 = param.awsv4;
224
- this.basePath = param.basePath;
225
- this.serverIndex = param.serverIndex;
226
- this.baseOptions = {
227
- ...param.baseOptions,
228
- headers: {
229
- ...param.baseOptions?.headers
230
- }
231
- };
232
- this.formDataCtor = param.formDataCtor;
233
- }
234
- /**
235
- * Check if the given MIME is a JSON MIME.
236
- * JSON MIME examples:
237
- * application/json
238
- * application/json; charset=UTF8
239
- * APPLICATION/JSON
240
- * application/vnd.company+json
241
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
242
- * @return True if the given MIME is JSON, false otherwise.
243
- */
244
- isJsonMime(mime) {
245
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
246
- return mime !== null && jsonMime.test(mime);
247
- }
248
- };
249
-
250
- // src/api-model/models/business-context.ts
251
- var BusinessContextStoreNameEnum = {
252
- AmazonHaul: "AMAZON_HAUL"
155
+ /**
156
+ * parameter for apiKey security
157
+ * @param name security name
158
+ */
159
+ apiKey;
160
+ /**
161
+ * parameter for basic security
162
+ */
163
+ username;
164
+ /**
165
+ * parameter for basic security
166
+ */
167
+ password;
168
+ /**
169
+ * parameter for oauth2 security
170
+ * @param name security name
171
+ * @param scopes oauth2 scope
172
+ */
173
+ accessToken;
174
+ /**
175
+ * parameter for aws4 signature security
176
+ * @param {Object} AWS4Signature - AWS4 Signature security
177
+ * @param {string} options.region - aws region
178
+ * @param {string} options.service - name of the service.
179
+ * @param {string} credentials.accessKeyId - aws access key id
180
+ * @param {string} credentials.secretAccessKey - aws access key
181
+ * @param {string} credentials.sessionToken - aws session token
182
+ * @memberof Configuration
183
+ */
184
+ awsv4;
185
+ /**
186
+ * override base path
187
+ */
188
+ basePath;
189
+ /**
190
+ * override server index
191
+ */
192
+ serverIndex;
193
+ /**
194
+ * base options for axios calls
195
+ */
196
+ baseOptions;
197
+ /**
198
+ * The FormData constructor that will be used to create multipart form data
199
+ * requests. You can inject this here so that execution environments that
200
+ * do not support the FormData class can still run the generated client.
201
+ *
202
+ * @type {new () => FormData}
203
+ */
204
+ formDataCtor;
205
+ constructor(param = {}) {
206
+ this.apiKey = param.apiKey;
207
+ this.username = param.username;
208
+ this.password = param.password;
209
+ this.accessToken = param.accessToken;
210
+ this.awsv4 = param.awsv4;
211
+ this.basePath = param.basePath;
212
+ this.serverIndex = param.serverIndex;
213
+ this.baseOptions = {
214
+ ...param.baseOptions,
215
+ headers: { ...param.baseOptions?.headers }
216
+ };
217
+ this.formDataCtor = param.formDataCtor;
218
+ }
219
+ /**
220
+ * Check if the given MIME is a JSON MIME.
221
+ * JSON MIME examples:
222
+ * application/json
223
+ * application/json; charset=UTF8
224
+ * APPLICATION/JSON
225
+ * application/vnd.company+json
226
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
227
+ * @return True if the given MIME is JSON, false otherwise.
228
+ */
229
+ isJsonMime(mime) {
230
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
231
+ }
253
232
  };
254
-
255
- // src/api-model/models/item-related-identifier.ts
256
- var ItemRelatedIdentifierItemRelatedIdentifierNameEnum = {
257
- OrderAdjustmentItemId: "ORDER_ADJUSTMENT_ITEM_ID",
258
- CouponId: "COUPON_ID",
259
- RemovalShipmentItemId: "REMOVAL_SHIPMENT_ITEM_ID",
260
- TransactionId: "TRANSACTION_ID"
233
+ //#endregion
234
+ //#region src/api-model/models/business-context.ts
235
+ const BusinessContextStoreNameEnum = { AmazonHaul: "AMAZON_HAUL" };
236
+ //#endregion
237
+ //#region src/api-model/models/item-related-identifier.ts
238
+ const ItemRelatedIdentifierItemRelatedIdentifierNameEnum = {
239
+ OrderAdjustmentItemId: "ORDER_ADJUSTMENT_ITEM_ID",
240
+ CouponId: "COUPON_ID",
241
+ RemovalShipmentItemId: "REMOVAL_SHIPMENT_ITEM_ID",
242
+ TransactionId: "TRANSACTION_ID"
261
243
  };
262
-
263
- // src/api-model/models/related-identifier.ts
264
- var RelatedIdentifierRelatedIdentifierNameEnum = {
265
- OrderId: "ORDER_ID",
266
- ShipmentId: "SHIPMENT_ID",
267
- FinancialEventGroupId: "FINANCIAL_EVENT_GROUP_ID",
268
- RefundId: "REFUND_ID",
269
- InvoiceId: "INVOICE_ID",
270
- DisbursementId: "DISBURSEMENT_ID",
271
- TransferId: "TRANSFER_ID",
272
- DeferredTransactionId: "DEFERRED_TRANSACTION_ID",
273
- ReleaseTransactionId: "RELEASE_TRANSACTION_ID",
274
- SettlementId: "SETTLEMENT_ID"
244
+ //#endregion
245
+ //#region src/api-model/models/related-identifier.ts
246
+ const RelatedIdentifierRelatedIdentifierNameEnum = {
247
+ OrderId: "ORDER_ID",
248
+ ShipmentId: "SHIPMENT_ID",
249
+ FinancialEventGroupId: "FINANCIAL_EVENT_GROUP_ID",
250
+ RefundId: "REFUND_ID",
251
+ InvoiceId: "INVOICE_ID",
252
+ DisbursementId: "DISBURSEMENT_ID",
253
+ TransferId: "TRANSFER_ID",
254
+ DeferredTransactionId: "DEFERRED_TRANSACTION_ID",
255
+ ReleaseTransactionId: "RELEASE_TRANSACTION_ID",
256
+ SettlementId: "SETTLEMENT_ID"
275
257
  };
276
-
277
- // src/client.ts
278
- var clientRateLimits = [
279
- {
280
- method: "get",
281
- // eslint-disable-next-line prefer-regex-literals
282
- urlRegex: new RegExp("^/finances/2024-06-19/transactions$"),
283
- rate: 0.5,
284
- burst: 10
285
- }
286
- ];
258
+ //#endregion
259
+ //#region src/client.ts
260
+ const clientRateLimits = [{
261
+ method: "get",
262
+ urlRegex: /^\/finances\/2024\u{2D}06\u{2D}19\/transactions$/v,
263
+ rate: .5,
264
+ burst: 10
265
+ }];
287
266
  var FinancesApiClient = class extends FinancesApi {
288
- constructor(configuration) {
289
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
290
- super(new Configuration(), endpoint, axios);
291
- }
292
- };
293
- export {
294
- BusinessContextStoreNameEnum,
295
- FinancesApi,
296
- FinancesApiAxiosParamCreator,
297
- FinancesApiClient,
298
- FinancesApiFactory,
299
- FinancesApiFp,
300
- ItemRelatedIdentifierItemRelatedIdentifierNameEnum,
301
- RelatedIdentifierRelatedIdentifierNameEnum,
302
- clientRateLimits
267
+ constructor(configuration) {
268
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
269
+ super(new Configuration(), endpoint, axios);
270
+ }
303
271
  };
272
+ //#endregion
273
+ export { BusinessContextStoreNameEnum, FinancesApi, FinancesApiAxiosParamCreator, FinancesApiClient, FinancesApiFactory, FinancesApiFp, ItemRelatedIdentifierItemRelatedIdentifierNameEnum, RelatedIdentifierRelatedIdentifierNameEnum, clientRateLimits };
274
+
304
275
  //# sourceMappingURL=index.js.map