@sp-api-sdk/finances-api-v0 5.0.0 → 5.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,508 +1,491 @@
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
18
  var RequiredError = class extends Error {
24
- constructor(field, msg) {
25
- super(msg);
26
- this.field = field;
27
- this.name = "RequiredError";
28
- }
29
- field;
19
+ field;
20
+ constructor(field, msg) {
21
+ super(msg);
22
+ this.field = field;
23
+ this.name = "RequiredError";
24
+ }
30
25
  };
31
- var operationServerMap = {};
32
-
33
- // src/api-model/common.ts
34
- var DUMMY_BASE_URL = "https://example.com";
35
- var assertParamExists = function(functionName, paramName, paramValue) {
36
- if (paramValue === null || paramValue === void 0) {
37
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
38
- }
26
+ const operationServerMap = {};
27
+ //#endregion
28
+ //#region src/api-model/common.ts
29
+ const DUMMY_BASE_URL = "https://example.com";
30
+ /**
31
+ *
32
+ * @throws {RequiredError}
33
+ */
34
+ const assertParamExists = function(functionName, paramName, paramValue) {
35
+ if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
39
36
  };
40
37
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
41
- if (parameter == null) return;
42
- if (typeof parameter === "object") {
43
- if (Array.isArray(parameter) || parameter instanceof Set) {
44
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
45
- } else {
46
- Object.keys(parameter).forEach(
47
- (currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
48
- );
49
- }
50
- } else {
51
- if (urlSearchParams.has(key)) {
52
- urlSearchParams.append(key, parameter);
53
- } else {
54
- urlSearchParams.set(key, parameter);
55
- }
56
- }
38
+ if (parameter == null) return;
39
+ if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
40
+ else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
41
+ else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
42
+ else urlSearchParams.set(key, parameter);
57
43
  }
58
- var setSearchParams = function(url, ...objects) {
59
- const searchParams = new URLSearchParams(url.search);
60
- setFlattenedQueryParams(searchParams, objects);
61
- url.search = searchParams.toString();
44
+ const setSearchParams = function(url, ...objects) {
45
+ const searchParams = new URLSearchParams(url.search);
46
+ setFlattenedQueryParams(searchParams, objects);
47
+ url.search = searchParams.toString();
62
48
  };
63
- var toPathString = function(url) {
64
- return url.pathname + url.search + url.hash;
49
+ const toPathString = function(url) {
50
+ return url.pathname + url.search + url.hash;
65
51
  };
66
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
67
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
68
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
69
- return axios.request(axiosRequestArgs);
70
- };
52
+ const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
53
+ return (axios = globalAxios, basePath = BASE_PATH) => {
54
+ const axiosRequestArgs = {
55
+ ...axiosArgs.options,
56
+ url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
57
+ };
58
+ return axios.request(axiosRequestArgs);
59
+ };
71
60
  };
72
-
73
- // src/api-model/api/finances-api.ts
74
- var FinancesApiAxiosParamCreator = function(configuration) {
75
- return {
76
- /**
77
- * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
78
- * @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
79
- * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
80
- * @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
81
- * @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.
82
- * @param {*} [options] Override http request option.
83
- * @throws {RequiredError}
84
- */
85
- listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
86
- const localVarPath = `/finances/v0/financialEventGroups`;
87
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
88
- let baseOptions;
89
- if (configuration) {
90
- baseOptions = configuration.baseOptions;
91
- }
92
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
93
- const localVarHeaderParameter = {};
94
- const localVarQueryParameter = {};
95
- if (maxResultsPerPage !== void 0) {
96
- localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
97
- }
98
- if (financialEventGroupStartedBefore !== void 0) {
99
- localVarQueryParameter["FinancialEventGroupStartedBefore"] = financialEventGroupStartedBefore instanceof Date ? financialEventGroupStartedBefore.toISOString() : financialEventGroupStartedBefore;
100
- }
101
- if (financialEventGroupStartedAfter !== void 0) {
102
- localVarQueryParameter["FinancialEventGroupStartedAfter"] = financialEventGroupStartedAfter instanceof Date ? financialEventGroupStartedAfter.toISOString() : financialEventGroupStartedAfter;
103
- }
104
- if (nextToken !== void 0) {
105
- localVarQueryParameter["NextToken"] = nextToken;
106
- }
107
- localVarHeaderParameter["Accept"] = "application/json";
108
- setSearchParams(localVarUrlObj, localVarQueryParameter);
109
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
110
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
111
- return {
112
- url: toPathString(localVarUrlObj),
113
- options: localVarRequestOptions
114
- };
115
- },
116
- /**
117
- * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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 {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
119
- * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
120
- * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
121
- * @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.
122
- * @param {*} [options] Override http request option.
123
- * @throws {RequiredError}
124
- */
125
- listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
126
- const localVarPath = `/finances/v0/financialEvents`;
127
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
128
- let baseOptions;
129
- if (configuration) {
130
- baseOptions = configuration.baseOptions;
131
- }
132
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
133
- const localVarHeaderParameter = {};
134
- const localVarQueryParameter = {};
135
- if (maxResultsPerPage !== void 0) {
136
- localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
137
- }
138
- if (postedAfter !== void 0) {
139
- localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
140
- }
141
- if (postedBefore !== void 0) {
142
- localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
143
- }
144
- if (nextToken !== void 0) {
145
- localVarQueryParameter["NextToken"] = nextToken;
146
- }
147
- localVarHeaderParameter["Accept"] = "application/json";
148
- setSearchParams(localVarUrlObj, localVarQueryParameter);
149
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
151
- return {
152
- url: toPathString(localVarUrlObj),
153
- options: localVarRequestOptions
154
- };
155
- },
156
- /**
157
- * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
158
- * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
159
- * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
160
- * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
161
- * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
162
- * @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.
163
- * @param {*} [options] Override http request option.
164
- * @throws {RequiredError}
165
- */
166
- listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
167
- assertParamExists("listFinancialEventsByGroupId", "eventGroupId", eventGroupId);
168
- const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`.replace("{eventGroupId}", encodeURIComponent(String(eventGroupId)));
169
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
170
- let baseOptions;
171
- if (configuration) {
172
- baseOptions = configuration.baseOptions;
173
- }
174
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
175
- const localVarHeaderParameter = {};
176
- const localVarQueryParameter = {};
177
- if (maxResultsPerPage !== void 0) {
178
- localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
179
- }
180
- if (postedAfter !== void 0) {
181
- localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
182
- }
183
- if (postedBefore !== void 0) {
184
- localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
185
- }
186
- if (nextToken !== void 0) {
187
- localVarQueryParameter["NextToken"] = nextToken;
188
- }
189
- localVarHeaderParameter["Accept"] = "application/json";
190
- setSearchParams(localVarUrlObj, localVarQueryParameter);
191
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
192
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
193
- return {
194
- url: toPathString(localVarUrlObj),
195
- options: localVarRequestOptions
196
- };
197
- },
198
- /**
199
- * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
200
- * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
201
- * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
202
- * @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.
203
- * @param {*} [options] Override http request option.
204
- * @throws {RequiredError}
205
- */
206
- listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
207
- assertParamExists("listFinancialEventsByOrderId", "orderId", orderId);
208
- const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`.replace("{orderId}", encodeURIComponent(String(orderId)));
209
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
210
- let baseOptions;
211
- if (configuration) {
212
- baseOptions = configuration.baseOptions;
213
- }
214
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
215
- const localVarHeaderParameter = {};
216
- const localVarQueryParameter = {};
217
- if (maxResultsPerPage !== void 0) {
218
- localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
219
- }
220
- if (nextToken !== void 0) {
221
- localVarQueryParameter["NextToken"] = nextToken;
222
- }
223
- localVarHeaderParameter["Accept"] = "application/json";
224
- setSearchParams(localVarUrlObj, localVarQueryParameter);
225
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
226
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
227
- return {
228
- url: toPathString(localVarUrlObj),
229
- options: localVarRequestOptions
230
- };
231
- }
232
- };
61
+ //#endregion
62
+ //#region src/api-model/api/finances-api.ts
63
+ /**
64
+ * FinancesApi - axios parameter creator
65
+ */
66
+ const FinancesApiAxiosParamCreator = function(configuration) {
67
+ return {
68
+ /**
69
+ * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
70
+ * @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
71
+ * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
72
+ * @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
73
+ * @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.
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
78
+ const localVarUrlObj = new URL(`/finances/v0/financialEventGroups`, DUMMY_BASE_URL);
79
+ let baseOptions;
80
+ if (configuration) baseOptions = configuration.baseOptions;
81
+ const localVarRequestOptions = {
82
+ method: "GET",
83
+ ...baseOptions,
84
+ ...options
85
+ };
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
89
+ if (financialEventGroupStartedBefore !== void 0) localVarQueryParameter["FinancialEventGroupStartedBefore"] = financialEventGroupStartedBefore instanceof Date ? financialEventGroupStartedBefore.toISOString() : financialEventGroupStartedBefore;
90
+ if (financialEventGroupStartedAfter !== void 0) localVarQueryParameter["FinancialEventGroupStartedAfter"] = financialEventGroupStartedAfter instanceof Date ? financialEventGroupStartedAfter.toISOString() : financialEventGroupStartedAfter;
91
+ if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
92
+ localVarHeaderParameter["Accept"] = "application/json";
93
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
94
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
95
+ localVarRequestOptions.headers = {
96
+ ...localVarHeaderParameter,
97
+ ...headersFromBaseOptions,
98
+ ...options.headers
99
+ };
100
+ return {
101
+ url: toPathString(localVarUrlObj),
102
+ options: localVarRequestOptions
103
+ };
104
+ },
105
+ /**
106
+ * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
107
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
108
+ * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
109
+ * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
110
+ * @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.
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
115
+ const localVarUrlObj = new URL(`/finances/v0/financialEvents`, DUMMY_BASE_URL);
116
+ let baseOptions;
117
+ if (configuration) baseOptions = configuration.baseOptions;
118
+ const localVarRequestOptions = {
119
+ method: "GET",
120
+ ...baseOptions,
121
+ ...options
122
+ };
123
+ const localVarHeaderParameter = {};
124
+ const localVarQueryParameter = {};
125
+ if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
126
+ if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
127
+ if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
128
+ if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
129
+ localVarHeaderParameter["Accept"] = "application/json";
130
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
131
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
132
+ localVarRequestOptions.headers = {
133
+ ...localVarHeaderParameter,
134
+ ...headersFromBaseOptions,
135
+ ...options.headers
136
+ };
137
+ return {
138
+ url: toPathString(localVarUrlObj),
139
+ options: localVarRequestOptions
140
+ };
141
+ },
142
+ /**
143
+ * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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 {string} eventGroupId The identifier of the financial event group to which the events belong.
145
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
146
+ * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
147
+ * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
148
+ * @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.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
153
+ assertParamExists("listFinancialEventsByGroupId", "eventGroupId", eventGroupId);
154
+ const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`.replace("{eventGroupId}", encodeURIComponent(String(eventGroupId)));
155
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
156
+ let baseOptions;
157
+ if (configuration) baseOptions = configuration.baseOptions;
158
+ const localVarRequestOptions = {
159
+ method: "GET",
160
+ ...baseOptions,
161
+ ...options
162
+ };
163
+ const localVarHeaderParameter = {};
164
+ const localVarQueryParameter = {};
165
+ if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
166
+ if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
167
+ if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
168
+ if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
169
+ localVarHeaderParameter["Accept"] = "application/json";
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = {
173
+ ...localVarHeaderParameter,
174
+ ...headersFromBaseOptions,
175
+ ...options.headers
176
+ };
177
+ return {
178
+ url: toPathString(localVarUrlObj),
179
+ options: localVarRequestOptions
180
+ };
181
+ },
182
+ /**
183
+ * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
184
+ * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
185
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
186
+ * @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.
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ */
190
+ listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
191
+ assertParamExists("listFinancialEventsByOrderId", "orderId", orderId);
192
+ const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`.replace("{orderId}", encodeURIComponent(String(orderId)));
193
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
194
+ let baseOptions;
195
+ if (configuration) baseOptions = configuration.baseOptions;
196
+ const localVarRequestOptions = {
197
+ method: "GET",
198
+ ...baseOptions,
199
+ ...options
200
+ };
201
+ const localVarHeaderParameter = {};
202
+ const localVarQueryParameter = {};
203
+ if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
204
+ if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
205
+ localVarHeaderParameter["Accept"] = "application/json";
206
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
207
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
208
+ localVarRequestOptions.headers = {
209
+ ...localVarHeaderParameter,
210
+ ...headersFromBaseOptions,
211
+ ...options.headers
212
+ };
213
+ return {
214
+ url: toPathString(localVarUrlObj),
215
+ options: localVarRequestOptions
216
+ };
217
+ }
218
+ };
233
219
  };
234
- var FinancesApiFp = function(configuration) {
235
- const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
236
- return {
237
- /**
238
- * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
239
- * @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
240
- * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
241
- * @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
242
- * @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.
243
- * @param {*} [options] Override http request option.
244
- * @throws {RequiredError}
245
- */
246
- async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
247
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
248
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
249
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventGroups"]?.[localVarOperationServerIndex]?.url;
250
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
251
- },
252
- /**
253
- * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
254
- * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
255
- * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
256
- * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
257
- * @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.
258
- * @param {*} [options] Override http request option.
259
- * @throws {RequiredError}
260
- */
261
- async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
262
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
263
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
264
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEvents"]?.[localVarOperationServerIndex]?.url;
265
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
266
- },
267
- /**
268
- * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
269
- * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
270
- * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
271
- * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
272
- * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
273
- * @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.
274
- * @param {*} [options] Override http request option.
275
- * @throws {RequiredError}
276
- */
277
- async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
278
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
279
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
280
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByGroupId"]?.[localVarOperationServerIndex]?.url;
281
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
282
- },
283
- /**
284
- * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
285
- * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
286
- * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
287
- * @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.
288
- * @param {*} [options] Override http request option.
289
- * @throws {RequiredError}
290
- */
291
- async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
292
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
293
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
294
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByOrderId"]?.[localVarOperationServerIndex]?.url;
295
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
296
- }
297
- };
220
+ /**
221
+ * FinancesApi - functional programming interface
222
+ */
223
+ const FinancesApiFp = function(configuration) {
224
+ const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
225
+ return {
226
+ /**
227
+ * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
228
+ * @param {number} [maxResultsPerPage] The maximum number of results per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
229
+ * @param {string} [financialEventGroupStartedBefore] A date that selects financial event groups that opened before (but not at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be after `FinancialEventGroupStartedAfter` and more than two minutes before the time of request. If `FinancialEventGroupStartedAfter` and `FinancialEventGroupStartedBefore` are more than 180 days apart, no financial event groups are returned.
230
+ * @param {string} [financialEventGroupStartedAfter] A date that selects financial event groups that opened after (or at) a specified date and time, in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. The date-time must be more than two minutes before you submit the request.
231
+ * @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.
232
+ * @param {*} [options] Override http request option.
233
+ * @throws {RequiredError}
234
+ */
235
+ async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
236
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
237
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
238
+ const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventGroups"]?.[localVarOperationServerIndex]?.url;
239
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
240
+ },
241
+ /**
242
+ * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
243
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
244
+ * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
245
+ * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
246
+ * @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.
247
+ * @param {*} [options] Override http request option.
248
+ * @throws {RequiredError}
249
+ */
250
+ async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
251
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
252
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
253
+ const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEvents"]?.[localVarOperationServerIndex]?.url;
254
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
255
+ },
256
+ /**
257
+ * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
258
+ * @param {string} eventGroupId The identifier of the financial event group to which the events belong.
259
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
260
+ * @param {string} [postedAfter] The response includes financial events posted after (or 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 more than two minutes before the time of the request.
261
+ * @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. If you include the `PostedBefore` parameter in your request, you must also specify the `PostedAfter` parameter. **Default:** Two minutes before the time of the request.
262
+ * @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.
263
+ * @param {*} [options] Override http request option.
264
+ * @throws {RequiredError}
265
+ */
266
+ async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
267
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
268
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
269
+ const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByGroupId"]?.[localVarOperationServerIndex]?.url;
270
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
271
+ },
272
+ /**
273
+ * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
274
+ * @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
275
+ * @param {number} [maxResultsPerPage] The maximum number of results to return per page. If the response exceeds the maximum number of transactions or 10 MB, the response is `InvalidInput`.
276
+ * @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.
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
281
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
282
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
283
+ const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByOrderId"]?.[localVarOperationServerIndex]?.url;
284
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
285
+ }
286
+ };
298
287
  };
299
- var FinancesApiFactory = function(configuration, basePath, axios) {
300
- const localVarFp = FinancesApiFp(configuration);
301
- return {
302
- /**
303
- * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
304
- * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
305
- * @param {*} [options] Override http request option.
306
- * @throws {RequiredError}
307
- */
308
- listFinancialEventGroups(requestParameters = {}, options) {
309
- return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios, basePath));
310
- },
311
- /**
312
- * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
313
- * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
314
- * @param {*} [options] Override http request option.
315
- * @throws {RequiredError}
316
- */
317
- listFinancialEvents(requestParameters = {}, options) {
318
- return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
319
- },
320
- /**
321
- * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
322
- * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
323
- * @param {*} [options] Override http request option.
324
- * @throws {RequiredError}
325
- */
326
- listFinancialEventsByGroupId(requestParameters, options) {
327
- return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
328
- },
329
- /**
330
- * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
331
- * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
332
- * @param {*} [options] Override http request option.
333
- * @throws {RequiredError}
334
- */
335
- listFinancialEventsByOrderId(requestParameters, options) {
336
- return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios, basePath));
337
- }
338
- };
288
+ /**
289
+ * FinancesApi - factory interface
290
+ */
291
+ const FinancesApiFactory = function(configuration, basePath, axios) {
292
+ const localVarFp = FinancesApiFp(configuration);
293
+ return {
294
+ /**
295
+ * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
296
+ * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ */
300
+ listFinancialEventGroups(requestParameters = {}, options) {
301
+ return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios, basePath));
302
+ },
303
+ /**
304
+ * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
305
+ * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
306
+ * @param {*} [options] Override http request option.
307
+ * @throws {RequiredError}
308
+ */
309
+ listFinancialEvents(requestParameters = {}, options) {
310
+ return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
311
+ },
312
+ /**
313
+ * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
314
+ * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
315
+ * @param {*} [options] Override http request option.
316
+ * @throws {RequiredError}
317
+ */
318
+ listFinancialEventsByGroupId(requestParameters, options) {
319
+ return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios, basePath));
320
+ },
321
+ /**
322
+ * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
323
+ * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
324
+ * @param {*} [options] Override http request option.
325
+ * @throws {RequiredError}
326
+ */
327
+ listFinancialEventsByOrderId(requestParameters, options) {
328
+ return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios, basePath));
329
+ }
330
+ };
339
331
  };
332
+ /**
333
+ * FinancesApi - object-oriented interface
334
+ */
340
335
  var FinancesApi = class extends BaseAPI {
341
- /**
342
- * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
343
- * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
344
- * @param {*} [options] Override http request option.
345
- * @throws {RequiredError}
346
- */
347
- listFinancialEventGroups(requestParameters = {}, options) {
348
- return FinancesApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
349
- }
350
- /**
351
- * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
352
- * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
353
- * @param {*} [options] Override http request option.
354
- * @throws {RequiredError}
355
- */
356
- listFinancialEvents(requestParameters = {}, options) {
357
- return FinancesApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
358
- }
359
- /**
360
- * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
361
- * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
362
- * @param {*} [options] Override http request option.
363
- * @throws {RequiredError}
364
- */
365
- listFinancialEventsByGroupId(requestParameters, options) {
366
- return FinancesApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
367
- }
368
- /**
369
- * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
370
- * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
371
- * @param {*} [options] Override http request option.
372
- * @throws {RequiredError}
373
- */
374
- listFinancialEventsByOrderId(requestParameters, options) {
375
- return FinancesApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
376
- }
336
+ /**
337
+ * Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
338
+ * @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
339
+ * @param {*} [options] Override http request option.
340
+ * @throws {RequiredError}
341
+ */
342
+ listFinancialEventGroups(requestParameters = {}, options) {
343
+ return FinancesApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
344
+ }
345
+ /**
346
+ * Returns financial events for the specified data range. Orders from the last 48 hours might not be included in financial events. **Note:** in `ListFinancialEvents`, deferred events don\'t show up in responses until they are released. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
347
+ * @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
348
+ * @param {*} [options] Override http request option.
349
+ * @throws {RequiredError}
350
+ */
351
+ listFinancialEvents(requestParameters = {}, options) {
352
+ return FinancesApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
353
+ }
354
+ /**
355
+ * Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. **Note:** This operation only retrieves a group\'s data for the past two years. A request for data spanning more than two years produces an empty response. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
356
+ * @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
357
+ * @param {*} [options] Override http request option.
358
+ * @throws {RequiredError}
359
+ */
360
+ listFinancialEventsByGroupId(requestParameters, options) {
361
+ return FinancesApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
362
+ }
363
+ /**
364
+ * Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 30 | 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 can 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).
365
+ * @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
366
+ * @param {*} [options] Override http request option.
367
+ * @throws {RequiredError}
368
+ */
369
+ listFinancialEventsByOrderId(requestParameters, options) {
370
+ return FinancesApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
371
+ }
377
372
  };
378
-
379
- // src/api-model/configuration.ts
373
+ //#endregion
374
+ //#region src/api-model/configuration.ts
380
375
  var Configuration = class {
381
- /**
382
- * parameter for apiKey security
383
- * @param name security name
384
- */
385
- apiKey;
386
- /**
387
- * parameter for basic security
388
- */
389
- username;
390
- /**
391
- * parameter for basic security
392
- */
393
- password;
394
- /**
395
- * parameter for oauth2 security
396
- * @param name security name
397
- * @param scopes oauth2 scope
398
- */
399
- accessToken;
400
- /**
401
- * parameter for aws4 signature security
402
- * @param {Object} AWS4Signature - AWS4 Signature security
403
- * @param {string} options.region - aws region
404
- * @param {string} options.service - name of the service.
405
- * @param {string} credentials.accessKeyId - aws access key id
406
- * @param {string} credentials.secretAccessKey - aws access key
407
- * @param {string} credentials.sessionToken - aws session token
408
- * @memberof Configuration
409
- */
410
- awsv4;
411
- /**
412
- * override base path
413
- */
414
- basePath;
415
- /**
416
- * override server index
417
- */
418
- serverIndex;
419
- /**
420
- * base options for axios calls
421
- */
422
- baseOptions;
423
- /**
424
- * The FormData constructor that will be used to create multipart form data
425
- * requests. You can inject this here so that execution environments that
426
- * do not support the FormData class can still run the generated client.
427
- *
428
- * @type {new () => FormData}
429
- */
430
- formDataCtor;
431
- constructor(param = {}) {
432
- this.apiKey = param.apiKey;
433
- this.username = param.username;
434
- this.password = param.password;
435
- this.accessToken = param.accessToken;
436
- this.awsv4 = param.awsv4;
437
- this.basePath = param.basePath;
438
- this.serverIndex = param.serverIndex;
439
- this.baseOptions = {
440
- ...param.baseOptions,
441
- headers: {
442
- ...param.baseOptions?.headers
443
- }
444
- };
445
- this.formDataCtor = param.formDataCtor;
446
- }
447
- /**
448
- * Check if the given MIME is a JSON MIME.
449
- * JSON MIME examples:
450
- * application/json
451
- * application/json; charset=UTF8
452
- * APPLICATION/JSON
453
- * application/vnd.company+json
454
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
455
- * @return True if the given MIME is JSON, false otherwise.
456
- */
457
- isJsonMime(mime) {
458
- const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
459
- return mime !== null && jsonMime.test(mime);
460
- }
376
+ /**
377
+ * parameter for apiKey security
378
+ * @param name security name
379
+ */
380
+ apiKey;
381
+ /**
382
+ * parameter for basic security
383
+ */
384
+ username;
385
+ /**
386
+ * parameter for basic security
387
+ */
388
+ password;
389
+ /**
390
+ * parameter for oauth2 security
391
+ * @param name security name
392
+ * @param scopes oauth2 scope
393
+ */
394
+ accessToken;
395
+ /**
396
+ * parameter for aws4 signature security
397
+ * @param {Object} AWS4Signature - AWS4 Signature security
398
+ * @param {string} options.region - aws region
399
+ * @param {string} options.service - name of the service.
400
+ * @param {string} credentials.accessKeyId - aws access key id
401
+ * @param {string} credentials.secretAccessKey - aws access key
402
+ * @param {string} credentials.sessionToken - aws session token
403
+ * @memberof Configuration
404
+ */
405
+ awsv4;
406
+ /**
407
+ * override base path
408
+ */
409
+ basePath;
410
+ /**
411
+ * override server index
412
+ */
413
+ serverIndex;
414
+ /**
415
+ * base options for axios calls
416
+ */
417
+ baseOptions;
418
+ /**
419
+ * The FormData constructor that will be used to create multipart form data
420
+ * requests. You can inject this here so that execution environments that
421
+ * do not support the FormData class can still run the generated client.
422
+ *
423
+ * @type {new () => FormData}
424
+ */
425
+ formDataCtor;
426
+ constructor(param = {}) {
427
+ this.apiKey = param.apiKey;
428
+ this.username = param.username;
429
+ this.password = param.password;
430
+ this.accessToken = param.accessToken;
431
+ this.awsv4 = param.awsv4;
432
+ this.basePath = param.basePath;
433
+ this.serverIndex = param.serverIndex;
434
+ this.baseOptions = {
435
+ ...param.baseOptions,
436
+ headers: { ...param.baseOptions?.headers }
437
+ };
438
+ this.formDataCtor = param.formDataCtor;
439
+ }
440
+ /**
441
+ * Check if the given MIME is a JSON MIME.
442
+ * JSON MIME examples:
443
+ * application/json
444
+ * application/json; charset=UTF8
445
+ * APPLICATION/JSON
446
+ * application/vnd.company+json
447
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
448
+ * @return True if the given MIME is JSON, false otherwise.
449
+ */
450
+ isJsonMime(mime) {
451
+ return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
452
+ }
461
453
  };
462
-
463
- // src/client.ts
464
- var clientRateLimits = [
465
- {
466
- method: "get",
467
- // eslint-disable-next-line prefer-regex-literals
468
- urlRegex: new RegExp("^/finances/v0/financialEventGroups$"),
469
- rate: 0.5,
470
- burst: 30
471
- },
472
- {
473
- method: "get",
474
- // eslint-disable-next-line prefer-regex-literals
475
- urlRegex: new RegExp("^/finances/v0/financialEventGroups/[^/]*/financialEvents$"),
476
- rate: 0.5,
477
- burst: 30
478
- },
479
- {
480
- method: "get",
481
- // eslint-disable-next-line prefer-regex-literals
482
- urlRegex: new RegExp("^/finances/v0/orders/[^/]*/financialEvents$"),
483
- rate: 0.5,
484
- burst: 30
485
- },
486
- {
487
- method: "get",
488
- // eslint-disable-next-line prefer-regex-literals
489
- urlRegex: new RegExp("^/finances/v0/financialEvents$"),
490
- rate: 0.5,
491
- burst: 30
492
- }
454
+ //#endregion
455
+ //#region src/client.ts
456
+ const clientRateLimits = [
457
+ {
458
+ method: "get",
459
+ urlRegex: /^\/finances\/v0\/financialEventGroups$/v,
460
+ rate: .5,
461
+ burst: 30
462
+ },
463
+ {
464
+ method: "get",
465
+ urlRegex: /^\/finances\/v0\/financialEventGroups\/[^\/]*\/financialEvents$/v,
466
+ rate: .5,
467
+ burst: 30
468
+ },
469
+ {
470
+ method: "get",
471
+ urlRegex: /^\/finances\/v0\/orders\/[^\/]*\/financialEvents$/v,
472
+ rate: .5,
473
+ burst: 30
474
+ },
475
+ {
476
+ method: "get",
477
+ urlRegex: /^\/finances\/v0\/financialEvents$/v,
478
+ rate: .5,
479
+ burst: 30
480
+ }
493
481
  ];
494
482
  var FinancesApiClient = class extends FinancesApi {
495
- constructor(configuration) {
496
- const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
497
- super(new Configuration(), endpoint, axios);
498
- }
499
- };
500
- export {
501
- FinancesApi,
502
- FinancesApiAxiosParamCreator,
503
- FinancesApiClient,
504
- FinancesApiFactory,
505
- FinancesApiFp,
506
- clientRateLimits
483
+ constructor(configuration) {
484
+ const { axios, endpoint } = createAxiosInstance(configuration, clientRateLimits);
485
+ super(new Configuration(), endpoint, axios);
486
+ }
507
487
  };
488
+ //#endregion
489
+ export { FinancesApi, FinancesApiAxiosParamCreator, FinancesApiClient, FinancesApiFactory, FinancesApiFp, clientRateLimits };
490
+
508
491
  //# sourceMappingURL=index.js.map