@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/README.md +4 -5
- package/dist/index.cjs +491 -521
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1398 -1932
- package/dist/index.d.ts +1398 -1932
- package/dist/index.js +468 -485
- package/dist/index.js.map +1 -1
- package/package.json +7 -4
package/dist/index.cjs
CHANGED
|
@@ -1,550 +1,520 @@
|
|
|
1
|
-
"
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
9
|
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
19
18
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// src/index.ts
|
|
31
|
-
var index_exports = {};
|
|
32
|
-
__export(index_exports, {
|
|
33
|
-
FinancesApi: () => FinancesApi,
|
|
34
|
-
FinancesApiAxiosParamCreator: () => FinancesApiAxiosParamCreator,
|
|
35
|
-
FinancesApiClient: () => FinancesApiClient,
|
|
36
|
-
FinancesApiFactory: () => FinancesApiFactory,
|
|
37
|
-
FinancesApiFp: () => FinancesApiFp,
|
|
38
|
-
clientRateLimits: () => clientRateLimits
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(index_exports);
|
|
41
|
-
|
|
42
|
-
// src/client.ts
|
|
43
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
44
|
-
|
|
45
|
-
// src/api-model/api/finances-api.ts
|
|
46
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
47
|
-
|
|
48
|
-
// src/api-model/base.ts
|
|
49
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
50
|
-
var BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let _sp_api_sdk_common = require("@sp-api-sdk/common");
|
|
25
|
+
let axios = require("axios");
|
|
26
|
+
axios = __toESM(axios, 1);
|
|
27
|
+
//#region src/api-model/base.ts
|
|
28
|
+
const BASE_PATH = "https://sellingpartnerapi-na.amazon.com".replace(/\/+$/, "");
|
|
51
29
|
var BaseAPI = class {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
30
|
+
basePath;
|
|
31
|
+
axios;
|
|
32
|
+
configuration;
|
|
33
|
+
constructor(configuration, basePath = BASE_PATH, axios$6 = axios.default) {
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios$6;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
63
41
|
};
|
|
64
42
|
var RequiredError = class extends Error {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
43
|
+
field;
|
|
44
|
+
constructor(field, msg) {
|
|
45
|
+
super(msg);
|
|
46
|
+
this.field = field;
|
|
47
|
+
this.name = "RequiredError";
|
|
48
|
+
}
|
|
71
49
|
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
50
|
+
const operationServerMap = {};
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/api-model/common.ts
|
|
53
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
*/
|
|
58
|
+
const assertParamExists = function(functionName, paramName, paramValue) {
|
|
59
|
+
if (paramValue === null || paramValue === void 0) throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
80
60
|
};
|
|
81
61
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
Object.keys(parameter).forEach(
|
|
88
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
if (urlSearchParams.has(key)) {
|
|
93
|
-
urlSearchParams.append(key, parameter);
|
|
94
|
-
} else {
|
|
95
|
-
urlSearchParams.set(key, parameter);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
62
|
+
if (parameter == null) return;
|
|
63
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
64
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
65
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
66
|
+
else urlSearchParams.set(key, parameter);
|
|
98
67
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
68
|
+
const setSearchParams = function(url, ...objects) {
|
|
69
|
+
const searchParams = new URLSearchParams(url.search);
|
|
70
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
71
|
+
url.search = searchParams.toString();
|
|
103
72
|
};
|
|
104
|
-
|
|
105
|
-
|
|
73
|
+
const toPathString = function(url) {
|
|
74
|
+
return url.pathname + url.search + url.hash;
|
|
106
75
|
};
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
76
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
77
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
78
|
+
const axiosRequestArgs = {
|
|
79
|
+
...axiosArgs.options,
|
|
80
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
81
|
+
};
|
|
82
|
+
return axios.request(axiosRequestArgs);
|
|
83
|
+
};
|
|
112
84
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
};
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/api-model/api/finances-api.ts
|
|
87
|
+
/**
|
|
88
|
+
* FinancesApi - axios parameter creator
|
|
89
|
+
*/
|
|
90
|
+
const FinancesApiAxiosParamCreator = function(configuration) {
|
|
91
|
+
return {
|
|
92
|
+
/**
|
|
93
|
+
* 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).
|
|
94
|
+
* @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`.
|
|
95
|
+
* @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.
|
|
96
|
+
* @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.
|
|
97
|
+
* @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.
|
|
98
|
+
* @param {*} [options] Override http request option.
|
|
99
|
+
* @throws {RequiredError}
|
|
100
|
+
*/
|
|
101
|
+
listFinancialEventGroups: async (maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options = {}) => {
|
|
102
|
+
const localVarUrlObj = new URL(`/finances/v0/financialEventGroups`, DUMMY_BASE_URL);
|
|
103
|
+
let baseOptions;
|
|
104
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
105
|
+
const localVarRequestOptions = {
|
|
106
|
+
method: "GET",
|
|
107
|
+
...baseOptions,
|
|
108
|
+
...options
|
|
109
|
+
};
|
|
110
|
+
const localVarHeaderParameter = {};
|
|
111
|
+
const localVarQueryParameter = {};
|
|
112
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
113
|
+
if (financialEventGroupStartedBefore !== void 0) localVarQueryParameter["FinancialEventGroupStartedBefore"] = financialEventGroupStartedBefore instanceof Date ? financialEventGroupStartedBefore.toISOString() : financialEventGroupStartedBefore;
|
|
114
|
+
if (financialEventGroupStartedAfter !== void 0) localVarQueryParameter["FinancialEventGroupStartedAfter"] = financialEventGroupStartedAfter instanceof Date ? financialEventGroupStartedAfter.toISOString() : financialEventGroupStartedAfter;
|
|
115
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
116
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
117
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
118
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
119
|
+
localVarRequestOptions.headers = {
|
|
120
|
+
...localVarHeaderParameter,
|
|
121
|
+
...headersFromBaseOptions,
|
|
122
|
+
...options.headers
|
|
123
|
+
};
|
|
124
|
+
return {
|
|
125
|
+
url: toPathString(localVarUrlObj),
|
|
126
|
+
options: localVarRequestOptions
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
/**
|
|
130
|
+
* 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).
|
|
131
|
+
* @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`.
|
|
132
|
+
* @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.
|
|
133
|
+
* @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.
|
|
134
|
+
* @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.
|
|
135
|
+
* @param {*} [options] Override http request option.
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
*/
|
|
138
|
+
listFinancialEvents: async (maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
139
|
+
const localVarUrlObj = new URL(`/finances/v0/financialEvents`, DUMMY_BASE_URL);
|
|
140
|
+
let baseOptions;
|
|
141
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
142
|
+
const localVarRequestOptions = {
|
|
143
|
+
method: "GET",
|
|
144
|
+
...baseOptions,
|
|
145
|
+
...options
|
|
146
|
+
};
|
|
147
|
+
const localVarHeaderParameter = {};
|
|
148
|
+
const localVarQueryParameter = {};
|
|
149
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
150
|
+
if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
151
|
+
if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
152
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
153
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
154
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
156
|
+
localVarRequestOptions.headers = {
|
|
157
|
+
...localVarHeaderParameter,
|
|
158
|
+
...headersFromBaseOptions,
|
|
159
|
+
...options.headers
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
url: toPathString(localVarUrlObj),
|
|
163
|
+
options: localVarRequestOptions
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
/**
|
|
167
|
+
* 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).
|
|
168
|
+
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
169
|
+
* @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`.
|
|
170
|
+
* @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.
|
|
171
|
+
* @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.
|
|
172
|
+
* @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.
|
|
173
|
+
* @param {*} [options] Override http request option.
|
|
174
|
+
* @throws {RequiredError}
|
|
175
|
+
*/
|
|
176
|
+
listFinancialEventsByGroupId: async (eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options = {}) => {
|
|
177
|
+
assertParamExists("listFinancialEventsByGroupId", "eventGroupId", eventGroupId);
|
|
178
|
+
const localVarPath = `/finances/v0/financialEventGroups/{eventGroupId}/financialEvents`.replace("{eventGroupId}", encodeURIComponent(String(eventGroupId)));
|
|
179
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
180
|
+
let baseOptions;
|
|
181
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
182
|
+
const localVarRequestOptions = {
|
|
183
|
+
method: "GET",
|
|
184
|
+
...baseOptions,
|
|
185
|
+
...options
|
|
186
|
+
};
|
|
187
|
+
const localVarHeaderParameter = {};
|
|
188
|
+
const localVarQueryParameter = {};
|
|
189
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
190
|
+
if (postedAfter !== void 0) localVarQueryParameter["PostedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
191
|
+
if (postedBefore !== void 0) localVarQueryParameter["PostedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
192
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
193
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
194
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
195
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
196
|
+
localVarRequestOptions.headers = {
|
|
197
|
+
...localVarHeaderParameter,
|
|
198
|
+
...headersFromBaseOptions,
|
|
199
|
+
...options.headers
|
|
200
|
+
};
|
|
201
|
+
return {
|
|
202
|
+
url: toPathString(localVarUrlObj),
|
|
203
|
+
options: localVarRequestOptions
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* 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).
|
|
208
|
+
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
209
|
+
* @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`.
|
|
210
|
+
* @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.
|
|
211
|
+
* @param {*} [options] Override http request option.
|
|
212
|
+
* @throws {RequiredError}
|
|
213
|
+
*/
|
|
214
|
+
listFinancialEventsByOrderId: async (orderId, maxResultsPerPage, nextToken, options = {}) => {
|
|
215
|
+
assertParamExists("listFinancialEventsByOrderId", "orderId", orderId);
|
|
216
|
+
const localVarPath = `/finances/v0/orders/{orderId}/financialEvents`.replace("{orderId}", encodeURIComponent(String(orderId)));
|
|
217
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
218
|
+
let baseOptions;
|
|
219
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
220
|
+
const localVarRequestOptions = {
|
|
221
|
+
method: "GET",
|
|
222
|
+
...baseOptions,
|
|
223
|
+
...options
|
|
224
|
+
};
|
|
225
|
+
const localVarHeaderParameter = {};
|
|
226
|
+
const localVarQueryParameter = {};
|
|
227
|
+
if (maxResultsPerPage !== void 0) localVarQueryParameter["MaxResultsPerPage"] = maxResultsPerPage;
|
|
228
|
+
if (nextToken !== void 0) localVarQueryParameter["NextToken"] = nextToken;
|
|
229
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
230
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
231
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
232
|
+
localVarRequestOptions.headers = {
|
|
233
|
+
...localVarHeaderParameter,
|
|
234
|
+
...headersFromBaseOptions,
|
|
235
|
+
...options.headers
|
|
236
|
+
};
|
|
237
|
+
return {
|
|
238
|
+
url: toPathString(localVarUrlObj),
|
|
239
|
+
options: localVarRequestOptions
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
};
|
|
274
243
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
244
|
+
/**
|
|
245
|
+
* FinancesApi - functional programming interface
|
|
246
|
+
*/
|
|
247
|
+
const FinancesApiFp = function(configuration) {
|
|
248
|
+
const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
|
|
249
|
+
return {
|
|
250
|
+
/**
|
|
251
|
+
* 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).
|
|
252
|
+
* @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`.
|
|
253
|
+
* @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.
|
|
254
|
+
* @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.
|
|
255
|
+
* @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.
|
|
256
|
+
* @param {*} [options] Override http request option.
|
|
257
|
+
* @throws {RequiredError}
|
|
258
|
+
*/
|
|
259
|
+
async listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options) {
|
|
260
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventGroups(maxResultsPerPage, financialEventGroupStartedBefore, financialEventGroupStartedAfter, nextToken, options);
|
|
261
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
262
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventGroups"]?.[localVarOperationServerIndex]?.url;
|
|
263
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
|
|
264
|
+
},
|
|
265
|
+
/**
|
|
266
|
+
* 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).
|
|
267
|
+
* @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`.
|
|
268
|
+
* @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.
|
|
269
|
+
* @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.
|
|
270
|
+
* @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.
|
|
271
|
+
* @param {*} [options] Override http request option.
|
|
272
|
+
* @throws {RequiredError}
|
|
273
|
+
*/
|
|
274
|
+
async listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
275
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEvents(maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
276
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
277
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEvents"]?.[localVarOperationServerIndex]?.url;
|
|
278
|
+
return (axios$2, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$2, localVarOperationServerBasePath || basePath);
|
|
279
|
+
},
|
|
280
|
+
/**
|
|
281
|
+
* 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).
|
|
282
|
+
* @param {string} eventGroupId The identifier of the financial event group to which the events belong.
|
|
283
|
+
* @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`.
|
|
284
|
+
* @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.
|
|
285
|
+
* @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.
|
|
286
|
+
* @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.
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
async listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options) {
|
|
291
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByGroupId(eventGroupId, maxResultsPerPage, postedAfter, postedBefore, nextToken, options);
|
|
292
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
293
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByGroupId"]?.[localVarOperationServerIndex]?.url;
|
|
294
|
+
return (axios$3, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$3, localVarOperationServerBasePath || basePath);
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* 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).
|
|
298
|
+
* @param {string} orderId An Amazon-defined order identifier, in 3-7-7 format.
|
|
299
|
+
* @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`.
|
|
300
|
+
* @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.
|
|
301
|
+
* @param {*} [options] Override http request option.
|
|
302
|
+
* @throws {RequiredError}
|
|
303
|
+
*/
|
|
304
|
+
async listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options) {
|
|
305
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listFinancialEventsByOrderId(orderId, maxResultsPerPage, nextToken, options);
|
|
306
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
307
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listFinancialEventsByOrderId"]?.[localVarOperationServerIndex]?.url;
|
|
308
|
+
return (axios$4, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$4, localVarOperationServerBasePath || basePath);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
339
311
|
};
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
312
|
+
/**
|
|
313
|
+
* FinancesApi - factory interface
|
|
314
|
+
*/
|
|
315
|
+
const FinancesApiFactory = function(configuration, basePath, axios$5) {
|
|
316
|
+
const localVarFp = FinancesApiFp(configuration);
|
|
317
|
+
return {
|
|
318
|
+
/**
|
|
319
|
+
* 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).
|
|
320
|
+
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
321
|
+
* @param {*} [options] Override http request option.
|
|
322
|
+
* @throws {RequiredError}
|
|
323
|
+
*/
|
|
324
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
325
|
+
return localVarFp.listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* 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).
|
|
329
|
+
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
330
|
+
* @param {*} [options] Override http request option.
|
|
331
|
+
* @throws {RequiredError}
|
|
332
|
+
*/
|
|
333
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
334
|
+
return localVarFp.listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
335
|
+
},
|
|
336
|
+
/**
|
|
337
|
+
* 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).
|
|
338
|
+
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
339
|
+
* @param {*} [options] Override http request option.
|
|
340
|
+
* @throws {RequiredError}
|
|
341
|
+
*/
|
|
342
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
343
|
+
return localVarFp.listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
344
|
+
},
|
|
345
|
+
/**
|
|
346
|
+
* 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).
|
|
347
|
+
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
348
|
+
* @param {*} [options] Override http request option.
|
|
349
|
+
* @throws {RequiredError}
|
|
350
|
+
*/
|
|
351
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
352
|
+
return localVarFp.listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(axios$5, basePath));
|
|
353
|
+
}
|
|
354
|
+
};
|
|
380
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* FinancesApi - object-oriented interface
|
|
358
|
+
*/
|
|
381
359
|
var FinancesApi = class extends BaseAPI {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
360
|
+
/**
|
|
361
|
+
* 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).
|
|
362
|
+
* @param {FinancesApiListFinancialEventGroupsRequest} requestParameters Request parameters.
|
|
363
|
+
* @param {*} [options] Override http request option.
|
|
364
|
+
* @throws {RequiredError}
|
|
365
|
+
*/
|
|
366
|
+
listFinancialEventGroups(requestParameters = {}, options) {
|
|
367
|
+
return FinancesApiFp(this.configuration).listFinancialEventGroups(requestParameters.maxResultsPerPage, requestParameters.financialEventGroupStartedBefore, requestParameters.financialEventGroupStartedAfter, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* 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).
|
|
371
|
+
* @param {FinancesApiListFinancialEventsRequest} requestParameters Request parameters.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
listFinancialEvents(requestParameters = {}, options) {
|
|
376
|
+
return FinancesApiFp(this.configuration).listFinancialEvents(requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* 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).
|
|
380
|
+
* @param {FinancesApiListFinancialEventsByGroupIdRequest} requestParameters Request parameters.
|
|
381
|
+
* @param {*} [options] Override http request option.
|
|
382
|
+
* @throws {RequiredError}
|
|
383
|
+
*/
|
|
384
|
+
listFinancialEventsByGroupId(requestParameters, options) {
|
|
385
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByGroupId(requestParameters.eventGroupId, requestParameters.maxResultsPerPage, requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* 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).
|
|
389
|
+
* @param {FinancesApiListFinancialEventsByOrderIdRequest} requestParameters Request parameters.
|
|
390
|
+
* @param {*} [options] Override http request option.
|
|
391
|
+
* @throws {RequiredError}
|
|
392
|
+
*/
|
|
393
|
+
listFinancialEventsByOrderId(requestParameters, options) {
|
|
394
|
+
return FinancesApiFp(this.configuration).listFinancialEventsByOrderId(requestParameters.orderId, requestParameters.maxResultsPerPage, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
395
|
+
}
|
|
418
396
|
};
|
|
419
|
-
|
|
420
|
-
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/api-model/configuration.ts
|
|
421
399
|
var Configuration = class {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
500
|
-
return mime !== null && jsonMime.test(mime);
|
|
501
|
-
}
|
|
400
|
+
/**
|
|
401
|
+
* parameter for apiKey security
|
|
402
|
+
* @param name security name
|
|
403
|
+
*/
|
|
404
|
+
apiKey;
|
|
405
|
+
/**
|
|
406
|
+
* parameter for basic security
|
|
407
|
+
*/
|
|
408
|
+
username;
|
|
409
|
+
/**
|
|
410
|
+
* parameter for basic security
|
|
411
|
+
*/
|
|
412
|
+
password;
|
|
413
|
+
/**
|
|
414
|
+
* parameter for oauth2 security
|
|
415
|
+
* @param name security name
|
|
416
|
+
* @param scopes oauth2 scope
|
|
417
|
+
*/
|
|
418
|
+
accessToken;
|
|
419
|
+
/**
|
|
420
|
+
* parameter for aws4 signature security
|
|
421
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
422
|
+
* @param {string} options.region - aws region
|
|
423
|
+
* @param {string} options.service - name of the service.
|
|
424
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
425
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
426
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
427
|
+
* @memberof Configuration
|
|
428
|
+
*/
|
|
429
|
+
awsv4;
|
|
430
|
+
/**
|
|
431
|
+
* override base path
|
|
432
|
+
*/
|
|
433
|
+
basePath;
|
|
434
|
+
/**
|
|
435
|
+
* override server index
|
|
436
|
+
*/
|
|
437
|
+
serverIndex;
|
|
438
|
+
/**
|
|
439
|
+
* base options for axios calls
|
|
440
|
+
*/
|
|
441
|
+
baseOptions;
|
|
442
|
+
/**
|
|
443
|
+
* The FormData constructor that will be used to create multipart form data
|
|
444
|
+
* requests. You can inject this here so that execution environments that
|
|
445
|
+
* do not support the FormData class can still run the generated client.
|
|
446
|
+
*
|
|
447
|
+
* @type {new () => FormData}
|
|
448
|
+
*/
|
|
449
|
+
formDataCtor;
|
|
450
|
+
constructor(param = {}) {
|
|
451
|
+
this.apiKey = param.apiKey;
|
|
452
|
+
this.username = param.username;
|
|
453
|
+
this.password = param.password;
|
|
454
|
+
this.accessToken = param.accessToken;
|
|
455
|
+
this.awsv4 = param.awsv4;
|
|
456
|
+
this.basePath = param.basePath;
|
|
457
|
+
this.serverIndex = param.serverIndex;
|
|
458
|
+
this.baseOptions = {
|
|
459
|
+
...param.baseOptions,
|
|
460
|
+
headers: { ...param.baseOptions?.headers }
|
|
461
|
+
};
|
|
462
|
+
this.formDataCtor = param.formDataCtor;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Check if the given MIME is a JSON MIME.
|
|
466
|
+
* JSON MIME examples:
|
|
467
|
+
* application/json
|
|
468
|
+
* application/json; charset=UTF8
|
|
469
|
+
* APPLICATION/JSON
|
|
470
|
+
* application/vnd.company+json
|
|
471
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
472
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
473
|
+
*/
|
|
474
|
+
isJsonMime(mime) {
|
|
475
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
476
|
+
}
|
|
502
477
|
};
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
urlRegex: new RegExp("^/finances/v0/financialEvents$"),
|
|
531
|
-
rate: 0.5,
|
|
532
|
-
burst: 30
|
|
533
|
-
}
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/client.ts
|
|
480
|
+
const clientRateLimits = [
|
|
481
|
+
{
|
|
482
|
+
method: "get",
|
|
483
|
+
urlRegex: /^\/finances\/v0\/financialEventGroups$/v,
|
|
484
|
+
rate: .5,
|
|
485
|
+
burst: 30
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
method: "get",
|
|
489
|
+
urlRegex: /^\/finances\/v0\/financialEventGroups\/[^\/]*\/financialEvents$/v,
|
|
490
|
+
rate: .5,
|
|
491
|
+
burst: 30
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
method: "get",
|
|
495
|
+
urlRegex: /^\/finances\/v0\/orders\/[^\/]*\/financialEvents$/v,
|
|
496
|
+
rate: .5,
|
|
497
|
+
burst: 30
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
method: "get",
|
|
501
|
+
urlRegex: /^\/finances\/v0\/financialEvents$/v,
|
|
502
|
+
rate: .5,
|
|
503
|
+
burst: 30
|
|
504
|
+
}
|
|
534
505
|
];
|
|
535
506
|
var FinancesApiClient = class extends FinancesApi {
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
507
|
+
constructor(configuration) {
|
|
508
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
509
|
+
super(new Configuration(), endpoint, axios);
|
|
510
|
+
}
|
|
540
511
|
};
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
});
|
|
512
|
+
//#endregion
|
|
513
|
+
exports.FinancesApi = FinancesApi;
|
|
514
|
+
exports.FinancesApiAxiosParamCreator = FinancesApiAxiosParamCreator;
|
|
515
|
+
exports.FinancesApiClient = FinancesApiClient;
|
|
516
|
+
exports.FinancesApiFactory = FinancesApiFactory;
|
|
517
|
+
exports.FinancesApiFp = FinancesApiFp;
|
|
518
|
+
exports.clientRateLimits = clientRateLimits;
|
|
519
|
+
|
|
550
520
|
//# sourceMappingURL=index.cjs.map
|