@sp-api-sdk/finances-api-2024-06-19 4.0.0 → 4.1.1
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 +3 -4
- package/dist/index.cjs +280 -322
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +421 -482
- package/dist/index.d.ts +421 -482
- package/dist/index.js +254 -283
- package/dist/index.js.map +1 -1
- package/package.json +14 -6
package/dist/index.cjs
CHANGED
|
@@ -1,349 +1,307 @@
|
|
|
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
|
-
BusinessContextStoreNameEnum: () => BusinessContextStoreNameEnum,
|
|
34
|
-
FinancesApi: () => FinancesApi,
|
|
35
|
-
FinancesApiAxiosParamCreator: () => FinancesApiAxiosParamCreator,
|
|
36
|
-
FinancesApiClient: () => FinancesApiClient,
|
|
37
|
-
FinancesApiFactory: () => FinancesApiFactory,
|
|
38
|
-
FinancesApiFp: () => FinancesApiFp,
|
|
39
|
-
ItemRelatedIdentifierItemRelatedIdentifierNameEnum: () => ItemRelatedIdentifierItemRelatedIdentifierNameEnum,
|
|
40
|
-
RelatedIdentifierRelatedIdentifierNameEnum: () => RelatedIdentifierRelatedIdentifierNameEnum,
|
|
41
|
-
clientRateLimits: () => clientRateLimits
|
|
42
|
-
});
|
|
43
|
-
module.exports = __toCommonJS(index_exports);
|
|
44
|
-
|
|
45
|
-
// src/client.ts
|
|
46
|
-
var import_common2 = require("@sp-api-sdk/common");
|
|
47
|
-
|
|
48
|
-
// src/api-model/api/finances-api.ts
|
|
49
|
-
var import_axios2 = __toESM(require("axios"), 1);
|
|
50
|
-
|
|
51
|
-
// src/api-model/base.ts
|
|
52
|
-
var import_axios = __toESM(require("axios"), 1);
|
|
53
|
-
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(/\/+$/, "");
|
|
54
29
|
var BaseAPI = class {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
30
|
+
basePath;
|
|
31
|
+
axios;
|
|
32
|
+
configuration;
|
|
33
|
+
constructor(configuration, basePath = BASE_PATH, axios$3 = axios.default) {
|
|
34
|
+
this.basePath = basePath;
|
|
35
|
+
this.axios = axios$3;
|
|
36
|
+
if (configuration) {
|
|
37
|
+
this.configuration = configuration;
|
|
38
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
66
41
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
42
|
+
const operationServerMap = {};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/api-model/common.ts
|
|
45
|
+
const DUMMY_BASE_URL = "https://example.com";
|
|
71
46
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
Object.keys(parameter).forEach(
|
|
78
|
-
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
} else {
|
|
82
|
-
if (urlSearchParams.has(key)) {
|
|
83
|
-
urlSearchParams.append(key, parameter);
|
|
84
|
-
} else {
|
|
85
|
-
urlSearchParams.set(key, parameter);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
47
|
+
if (parameter == null) return;
|
|
48
|
+
if (typeof parameter === "object") if (Array.isArray(parameter) || parameter instanceof Set) parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
49
|
+
else Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`));
|
|
50
|
+
else if (urlSearchParams.has(key)) urlSearchParams.append(key, parameter);
|
|
51
|
+
else urlSearchParams.set(key, parameter);
|
|
88
52
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
53
|
+
const setSearchParams = function(url, ...objects) {
|
|
54
|
+
const searchParams = new URLSearchParams(url.search);
|
|
55
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
56
|
+
url.search = searchParams.toString();
|
|
93
57
|
};
|
|
94
|
-
|
|
95
|
-
|
|
58
|
+
const toPathString = function(url) {
|
|
59
|
+
return url.pathname + url.search + url.hash;
|
|
96
60
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
61
|
+
const createRequestFunction = function(axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
62
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
63
|
+
const axiosRequestArgs = {
|
|
64
|
+
...axiosArgs.options,
|
|
65
|
+
url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url
|
|
66
|
+
};
|
|
67
|
+
return axios.request(axiosRequestArgs);
|
|
68
|
+
};
|
|
102
69
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
154
|
-
return {
|
|
155
|
-
url: toPathString(localVarUrlObj),
|
|
156
|
-
options: localVarRequestOptions
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
};
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/api-model/api/finances-api.ts
|
|
72
|
+
/**
|
|
73
|
+
* FinancesApi - axios parameter creator
|
|
74
|
+
*/
|
|
75
|
+
const FinancesApiAxiosParamCreator = function(configuration) {
|
|
76
|
+
return {
|
|
77
|
+
/**
|
|
78
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
79
|
+
* @param {string} [postedAfter] The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request. This field is required if you do not specify a related identifier.
|
|
80
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
|
|
81
|
+
* @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
82
|
+
* @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
|
|
83
|
+
* @param {string} [relatedIdentifierName] The name of the `relatedIdentifier`. **Possible values:** * `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction. * `ORDER_ID`: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be included in the response when available, they cannot be used for filtering purposes.
|
|
84
|
+
* @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
|
|
85
|
+
* @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.
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options = {}) => {
|
|
90
|
+
const localVarUrlObj = new URL(`/finances/2024-06-19/transactions`, DUMMY_BASE_URL);
|
|
91
|
+
let baseOptions;
|
|
92
|
+
if (configuration) baseOptions = configuration.baseOptions;
|
|
93
|
+
const localVarRequestOptions = {
|
|
94
|
+
method: "GET",
|
|
95
|
+
...baseOptions,
|
|
96
|
+
...options
|
|
97
|
+
};
|
|
98
|
+
const localVarHeaderParameter = {};
|
|
99
|
+
const localVarQueryParameter = {};
|
|
100
|
+
if (postedAfter !== void 0) localVarQueryParameter["postedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
|
|
101
|
+
if (postedBefore !== void 0) localVarQueryParameter["postedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
|
|
102
|
+
if (marketplaceId !== void 0) localVarQueryParameter["marketplaceId"] = marketplaceId;
|
|
103
|
+
if (transactionStatus !== void 0) localVarQueryParameter["transactionStatus"] = transactionStatus;
|
|
104
|
+
if (relatedIdentifierName !== void 0) localVarQueryParameter["relatedIdentifierName"] = relatedIdentifierName;
|
|
105
|
+
if (relatedIdentifierValue !== void 0) localVarQueryParameter["relatedIdentifierValue"] = relatedIdentifierValue;
|
|
106
|
+
if (nextToken !== void 0) localVarQueryParameter["nextToken"] = nextToken;
|
|
107
|
+
localVarHeaderParameter["Accept"] = "application/json";
|
|
108
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
109
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
110
|
+
localVarRequestOptions.headers = {
|
|
111
|
+
...localVarHeaderParameter,
|
|
112
|
+
...headersFromBaseOptions,
|
|
113
|
+
...options.headers
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
url: toPathString(localVarUrlObj),
|
|
117
|
+
options: localVarRequestOptions
|
|
118
|
+
};
|
|
119
|
+
} };
|
|
160
120
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
121
|
+
/**
|
|
122
|
+
* FinancesApi - functional programming interface
|
|
123
|
+
*/
|
|
124
|
+
const FinancesApiFp = function(configuration) {
|
|
125
|
+
const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
|
|
126
|
+
return {
|
|
127
|
+
/**
|
|
128
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
129
|
+
* @param {string} [postedAfter] The response includes financial events posted on or after this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be more than two minutes before the time of the request. This field is required if you do not specify a related identifier.
|
|
130
|
+
* @param {string} [postedBefore] The response includes financial events posted before (but not on) this date. This date must be in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The date-time must be later than `PostedAfter` and more than two minutes before the request was submitted. If `PostedAfter` and `PostedBefore` are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
|
|
131
|
+
* @param {string} [marketplaceId] The identifier of the marketplace from which you want to retrieve transactions. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids).
|
|
132
|
+
* @param {string} [transactionStatus] The status of the transaction. **Possible values:** * `DEFERRED`: the transaction is currently deferred. * `RELEASED`: the transaction is currently released. * `DEFERRED_RELEASED`: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to `DEFERRED_RELEASED` when the transaction is released.
|
|
133
|
+
* @param {string} [relatedIdentifierName] The name of the `relatedIdentifier`. **Possible values:** * `FINANCIAL_EVENT_GROUP_ID`: the financial event group ID associated with the transaction. * `ORDER_ID`: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only `relatedIdentifier` with filtering capabilities at the moment. While other `relatedIdentifier` values will be included in the response when available, they cannot be used for filtering purposes.
|
|
134
|
+
* @param {string} [relatedIdentifierValue] The value of the `relatedIdentifier`.
|
|
135
|
+
* @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.
|
|
136
|
+
* @param {*} [options] Override http request option.
|
|
137
|
+
* @throws {RequiredError}
|
|
138
|
+
*/
|
|
139
|
+
async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options) {
|
|
140
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options);
|
|
141
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
142
|
+
const localVarOperationServerBasePath = operationServerMap["FinancesApi.listTransactions"]?.[localVarOperationServerIndex]?.url;
|
|
143
|
+
return (axios$1, basePath) => createRequestFunction(localVarAxiosArgs, axios.default, BASE_PATH, configuration)(axios$1, localVarOperationServerBasePath || basePath);
|
|
144
|
+
} };
|
|
183
145
|
};
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
146
|
+
/**
|
|
147
|
+
* FinancesApi - factory interface
|
|
148
|
+
*/
|
|
149
|
+
const FinancesApiFactory = function(configuration, basePath, axios$2) {
|
|
150
|
+
const localVarFp = FinancesApiFp(configuration);
|
|
151
|
+
return {
|
|
152
|
+
/**
|
|
153
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
154
|
+
* @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
|
|
155
|
+
* @param {*} [options] Override http request option.
|
|
156
|
+
* @throws {RequiredError}
|
|
157
|
+
*/
|
|
158
|
+
listTransactions(requestParameters = {}, options) {
|
|
159
|
+
return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(axios$2, basePath));
|
|
160
|
+
} };
|
|
197
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* FinancesApi - object-oriented interface
|
|
164
|
+
*/
|
|
198
165
|
var FinancesApi = class extends BaseAPI {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
166
|
+
/**
|
|
167
|
+
* Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours. **Usage plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits).
|
|
168
|
+
* @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
|
|
169
|
+
* @param {*} [options] Override http request option.
|
|
170
|
+
* @throws {RequiredError}
|
|
171
|
+
*/
|
|
172
|
+
listTransactions(requestParameters = {}, options) {
|
|
173
|
+
return FinancesApiFp(this.configuration).listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(this.axios, this.basePath));
|
|
174
|
+
}
|
|
208
175
|
};
|
|
209
|
-
|
|
210
|
-
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/api-model/configuration.ts
|
|
211
178
|
var Configuration = class {
|
|
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
290
|
-
return mime !== null && jsonMime.test(mime);
|
|
291
|
-
}
|
|
179
|
+
/**
|
|
180
|
+
* parameter for apiKey security
|
|
181
|
+
* @param name security name
|
|
182
|
+
*/
|
|
183
|
+
apiKey;
|
|
184
|
+
/**
|
|
185
|
+
* parameter for basic security
|
|
186
|
+
*/
|
|
187
|
+
username;
|
|
188
|
+
/**
|
|
189
|
+
* parameter for basic security
|
|
190
|
+
*/
|
|
191
|
+
password;
|
|
192
|
+
/**
|
|
193
|
+
* parameter for oauth2 security
|
|
194
|
+
* @param name security name
|
|
195
|
+
* @param scopes oauth2 scope
|
|
196
|
+
*/
|
|
197
|
+
accessToken;
|
|
198
|
+
/**
|
|
199
|
+
* parameter for aws4 signature security
|
|
200
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
201
|
+
* @param {string} options.region - aws region
|
|
202
|
+
* @param {string} options.service - name of the service.
|
|
203
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
204
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
205
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
206
|
+
* @memberof Configuration
|
|
207
|
+
*/
|
|
208
|
+
awsv4;
|
|
209
|
+
/**
|
|
210
|
+
* override base path
|
|
211
|
+
*/
|
|
212
|
+
basePath;
|
|
213
|
+
/**
|
|
214
|
+
* override server index
|
|
215
|
+
*/
|
|
216
|
+
serverIndex;
|
|
217
|
+
/**
|
|
218
|
+
* base options for axios calls
|
|
219
|
+
*/
|
|
220
|
+
baseOptions;
|
|
221
|
+
/**
|
|
222
|
+
* The FormData constructor that will be used to create multipart form data
|
|
223
|
+
* requests. You can inject this here so that execution environments that
|
|
224
|
+
* do not support the FormData class can still run the generated client.
|
|
225
|
+
*
|
|
226
|
+
* @type {new () => FormData}
|
|
227
|
+
*/
|
|
228
|
+
formDataCtor;
|
|
229
|
+
constructor(param = {}) {
|
|
230
|
+
this.apiKey = param.apiKey;
|
|
231
|
+
this.username = param.username;
|
|
232
|
+
this.password = param.password;
|
|
233
|
+
this.accessToken = param.accessToken;
|
|
234
|
+
this.awsv4 = param.awsv4;
|
|
235
|
+
this.basePath = param.basePath;
|
|
236
|
+
this.serverIndex = param.serverIndex;
|
|
237
|
+
this.baseOptions = {
|
|
238
|
+
...param.baseOptions,
|
|
239
|
+
headers: { ...param.baseOptions?.headers }
|
|
240
|
+
};
|
|
241
|
+
this.formDataCtor = param.formDataCtor;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Check if the given MIME is a JSON MIME.
|
|
245
|
+
* JSON MIME examples:
|
|
246
|
+
* application/json
|
|
247
|
+
* application/json; charset=UTF8
|
|
248
|
+
* APPLICATION/JSON
|
|
249
|
+
* application/vnd.company+json
|
|
250
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
251
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
252
|
+
*/
|
|
253
|
+
isJsonMime(mime) {
|
|
254
|
+
return mime !== null && /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i.test(mime);
|
|
255
|
+
}
|
|
292
256
|
};
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/api-model/models/business-context.ts
|
|
259
|
+
const BusinessContextStoreNameEnum = { AmazonHaul: "AMAZON_HAUL" };
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/api-model/models/item-related-identifier.ts
|
|
262
|
+
const ItemRelatedIdentifierItemRelatedIdentifierNameEnum = {
|
|
263
|
+
OrderAdjustmentItemId: "ORDER_ADJUSTMENT_ITEM_ID",
|
|
264
|
+
CouponId: "COUPON_ID",
|
|
265
|
+
RemovalShipmentItemId: "REMOVAL_SHIPMENT_ITEM_ID",
|
|
266
|
+
TransactionId: "TRANSACTION_ID"
|
|
297
267
|
};
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region src/api-model/models/related-identifier.ts
|
|
270
|
+
const RelatedIdentifierRelatedIdentifierNameEnum = {
|
|
271
|
+
OrderId: "ORDER_ID",
|
|
272
|
+
ShipmentId: "SHIPMENT_ID",
|
|
273
|
+
FinancialEventGroupId: "FINANCIAL_EVENT_GROUP_ID",
|
|
274
|
+
RefundId: "REFUND_ID",
|
|
275
|
+
InvoiceId: "INVOICE_ID",
|
|
276
|
+
DisbursementId: "DISBURSEMENT_ID",
|
|
277
|
+
TransferId: "TRANSFER_ID",
|
|
278
|
+
DeferredTransactionId: "DEFERRED_TRANSACTION_ID",
|
|
279
|
+
ReleaseTransactionId: "RELEASE_TRANSACTION_ID",
|
|
280
|
+
SettlementId: "SETTLEMENT_ID"
|
|
305
281
|
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
DisbursementId: "DISBURSEMENT_ID",
|
|
315
|
-
TransferId: "TRANSFER_ID",
|
|
316
|
-
DeferredTransactionId: "DEFERRED_TRANSACTION_ID",
|
|
317
|
-
ReleaseTransactionId: "RELEASE_TRANSACTION_ID",
|
|
318
|
-
SettlementId: "SETTLEMENT_ID"
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
// src/client.ts
|
|
322
|
-
var clientRateLimits = [
|
|
323
|
-
{
|
|
324
|
-
method: "get",
|
|
325
|
-
// eslint-disable-next-line prefer-regex-literals
|
|
326
|
-
urlRegex: new RegExp("^/finances/2024-06-19/transactions$"),
|
|
327
|
-
rate: 0.5,
|
|
328
|
-
burst: 10
|
|
329
|
-
}
|
|
330
|
-
];
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/client.ts
|
|
284
|
+
const clientRateLimits = [{
|
|
285
|
+
method: "get",
|
|
286
|
+
urlRegex: /^\/finances\/2024\u{2D}06\u{2D}19\/transactions$/v,
|
|
287
|
+
rate: .5,
|
|
288
|
+
burst: 10
|
|
289
|
+
}];
|
|
331
290
|
var FinancesApiClient = class extends FinancesApi {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
291
|
+
constructor(configuration) {
|
|
292
|
+
const { axios, endpoint } = (0, _sp_api_sdk_common.createAxiosInstance)(configuration, clientRateLimits);
|
|
293
|
+
super(new Configuration(), endpoint, axios);
|
|
294
|
+
}
|
|
336
295
|
};
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
});
|
|
296
|
+
//#endregion
|
|
297
|
+
exports.BusinessContextStoreNameEnum = BusinessContextStoreNameEnum;
|
|
298
|
+
exports.FinancesApi = FinancesApi;
|
|
299
|
+
exports.FinancesApiAxiosParamCreator = FinancesApiAxiosParamCreator;
|
|
300
|
+
exports.FinancesApiClient = FinancesApiClient;
|
|
301
|
+
exports.FinancesApiFactory = FinancesApiFactory;
|
|
302
|
+
exports.FinancesApiFp = FinancesApiFp;
|
|
303
|
+
exports.ItemRelatedIdentifierItemRelatedIdentifierNameEnum = ItemRelatedIdentifierItemRelatedIdentifierNameEnum;
|
|
304
|
+
exports.RelatedIdentifierRelatedIdentifierNameEnum = RelatedIdentifierRelatedIdentifierNameEnum;
|
|
305
|
+
exports.clientRateLimits = clientRateLimits;
|
|
306
|
+
|
|
349
307
|
//# sourceMappingURL=index.cjs.map
|