@sp-api-sdk/finances-api-2024-06-19 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,349 +1,307 @@
1
- "use strict";
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
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
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
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
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
- constructor(configuration, basePath = BASE_PATH, axios = import_axios.default) {
56
- this.basePath = basePath;
57
- this.axios = axios;
58
- if (configuration) {
59
- this.configuration = configuration;
60
- this.basePath = configuration.basePath ?? basePath;
61
- }
62
- }
63
- basePath;
64
- axios;
65
- configuration;
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
- var operationServerMap = {};
68
-
69
- // src/api-model/common.ts
70
- var DUMMY_BASE_URL = "https://example.com";
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
- if (parameter == null) return;
73
- if (typeof parameter === "object") {
74
- if (Array.isArray(parameter) || parameter instanceof Set) {
75
- parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
76
- } else {
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
- var setSearchParams = function(url, ...objects) {
90
- const searchParams = new URLSearchParams(url.search);
91
- setFlattenedQueryParams(searchParams, objects);
92
- url.search = searchParams.toString();
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
- var toPathString = function(url) {
95
- return url.pathname + url.search + url.hash;
58
+ const toPathString = function(url) {
59
+ return url.pathname + url.search + url.hash;
96
60
  };
97
- var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
98
- return (axios = globalAxios3, basePath = BASE_PATH2) => {
99
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
100
- return axios.request(axiosRequestArgs);
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
- // src/api-model/api/finances-api.ts
105
- var FinancesApiAxiosParamCreator = function(configuration) {
106
- return {
107
- /**
108
- * 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).
109
- * @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.
110
- * @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 &#x60;PostedAfter&#x60; and more than two minutes before the request was submitted. If &#x60;PostedAfter&#x60; and &#x60;PostedBefore&#x60; are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
111
- * @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).
112
- * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
113
- * @param {string} [relatedIdentifierName] The name of the &#x60;relatedIdentifier&#x60;. **Possible values:** * &#x60;FINANCIAL_EVENT_GROUP_ID&#x60;: the financial event group ID associated with the transaction. * &#x60;ORDER_ID&#x60;: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only &#x60;relatedIdentifier&#x60; with filtering capabilities at the moment. While other &#x60;relatedIdentifier&#x60; values will be included in the response when available, they cannot be used for filtering purposes.
114
- * @param {string} [relatedIdentifierValue] The value of the &#x60;relatedIdentifier&#x60;.
115
- * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; 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 &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
116
- * @param {*} [options] Override http request option.
117
- * @throws {RequiredError}
118
- */
119
- listTransactions: async (postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options = {}) => {
120
- const localVarPath = `/finances/2024-06-19/transactions`;
121
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
122
- let baseOptions;
123
- if (configuration) {
124
- baseOptions = configuration.baseOptions;
125
- }
126
- const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
127
- const localVarHeaderParameter = {};
128
- const localVarQueryParameter = {};
129
- if (postedAfter !== void 0) {
130
- localVarQueryParameter["postedAfter"] = postedAfter instanceof Date ? postedAfter.toISOString() : postedAfter;
131
- }
132
- if (postedBefore !== void 0) {
133
- localVarQueryParameter["postedBefore"] = postedBefore instanceof Date ? postedBefore.toISOString() : postedBefore;
134
- }
135
- if (marketplaceId !== void 0) {
136
- localVarQueryParameter["marketplaceId"] = marketplaceId;
137
- }
138
- if (transactionStatus !== void 0) {
139
- localVarQueryParameter["transactionStatus"] = transactionStatus;
140
- }
141
- if (relatedIdentifierName !== void 0) {
142
- localVarQueryParameter["relatedIdentifierName"] = relatedIdentifierName;
143
- }
144
- if (relatedIdentifierValue !== void 0) {
145
- localVarQueryParameter["relatedIdentifierValue"] = relatedIdentifierValue;
146
- }
147
- if (nextToken !== void 0) {
148
- localVarQueryParameter["nextToken"] = nextToken;
149
- }
150
- localVarHeaderParameter["Accept"] = "application/json";
151
- setSearchParams(localVarUrlObj, localVarQueryParameter);
152
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
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 &#x60;PostedAfter&#x60; and more than two minutes before the request was submitted. If &#x60;PostedAfter&#x60; and &#x60;PostedBefore&#x60; 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:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
83
+ * @param {string} [relatedIdentifierName] The name of the &#x60;relatedIdentifier&#x60;. **Possible values:** * &#x60;FINANCIAL_EVENT_GROUP_ID&#x60;: the financial event group ID associated with the transaction. * &#x60;ORDER_ID&#x60;: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only &#x60;relatedIdentifier&#x60; with filtering capabilities at the moment. While other &#x60;relatedIdentifier&#x60; values will be included in the response when available, they cannot be used for filtering purposes.
84
+ * @param {string} [relatedIdentifierValue] The value of the &#x60;relatedIdentifier&#x60;.
85
+ * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; 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 &#x60;nextToken&#x60; 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
- var FinancesApiFp = function(configuration) {
162
- const localVarAxiosParamCreator = FinancesApiAxiosParamCreator(configuration);
163
- return {
164
- /**
165
- * 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).
166
- * @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.
167
- * @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 &#x60;PostedAfter&#x60; and more than two minutes before the request was submitted. If &#x60;PostedAfter&#x60; and &#x60;PostedBefore&#x60; are more than 180 days apart, the response is empty. **Default:** Two minutes before the time of the request.
168
- * @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).
169
- * @param {string} [transactionStatus] The status of the transaction. **Possible values:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
170
- * @param {string} [relatedIdentifierName] The name of the &#x60;relatedIdentifier&#x60;. **Possible values:** * &#x60;FINANCIAL_EVENT_GROUP_ID&#x60;: the financial event group ID associated with the transaction. * &#x60;ORDER_ID&#x60;: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only &#x60;relatedIdentifier&#x60; with filtering capabilities at the moment. While other &#x60;relatedIdentifier&#x60; values will be included in the response when available, they cannot be used for filtering purposes.
171
- * @param {string} [relatedIdentifierValue] The value of the &#x60;relatedIdentifier&#x60;.
172
- * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; 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 &#x60;nextToken&#x60; is null. Note that this operation can return empty pages.
173
- * @param {*} [options] Override http request option.
174
- * @throws {RequiredError}
175
- */
176
- async listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options) {
177
- const localVarAxiosArgs = await localVarAxiosParamCreator.listTransactions(postedAfter, postedBefore, marketplaceId, transactionStatus, relatedIdentifierName, relatedIdentifierValue, nextToken, options);
178
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
179
- const localVarOperationServerBasePath = operationServerMap["FinancesApi.listTransactions"]?.[localVarOperationServerIndex]?.url;
180
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, import_axios2.default, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
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 &#x60;PostedAfter&#x60; and more than two minutes before the request was submitted. If &#x60;PostedAfter&#x60; and &#x60;PostedBefore&#x60; 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:** * &#x60;DEFERRED&#x60;: the transaction is currently deferred. * &#x60;RELEASED&#x60;: the transaction is currently released. * &#x60;DEFERRED_RELEASED&#x60;: the transaction was deferred in the past, but is now released. The status of a deferred transaction is updated to &#x60;DEFERRED_RELEASED&#x60; when the transaction is released.
133
+ * @param {string} [relatedIdentifierName] The name of the &#x60;relatedIdentifier&#x60;. **Possible values:** * &#x60;FINANCIAL_EVENT_GROUP_ID&#x60;: the financial event group ID associated with the transaction. * &#x60;ORDER_ID&#x60;: the order ID associated with the transaction. **Note:** FINANCIAL_EVENT_GROUP_ID and ORDER_ID are the only &#x60;relatedIdentifier&#x60; with filtering capabilities at the moment. While other &#x60;relatedIdentifier&#x60; values will be included in the response when available, they cannot be used for filtering purposes.
134
+ * @param {string} [relatedIdentifierValue] The value of the &#x60;relatedIdentifier&#x60;.
135
+ * @param {string} [nextToken] The response includes &#x60;nextToken&#x60; when the number of results exceeds the specified &#x60;pageSize&#x60; 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 &#x60;nextToken&#x60; 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
- var FinancesApiFactory = function(configuration, basePath, axios) {
185
- const localVarFp = FinancesApiFp(configuration);
186
- return {
187
- /**
188
- * 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).
189
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
190
- * @param {*} [options] Override http request option.
191
- * @throws {RequiredError}
192
- */
193
- listTransactions(requestParameters = {}, options) {
194
- return localVarFp.listTransactions(requestParameters.postedAfter, requestParameters.postedBefore, requestParameters.marketplaceId, requestParameters.transactionStatus, requestParameters.relatedIdentifierName, requestParameters.relatedIdentifierValue, requestParameters.nextToken, options).then((request) => request(axios, basePath));
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
- * 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).
201
- * @param {FinancesApiListTransactionsRequest} requestParameters Request parameters.
202
- * @param {*} [options] Override http request option.
203
- * @throws {RequiredError}
204
- */
205
- listTransactions(requestParameters = {}, options) {
206
- 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));
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
- // src/api-model/configuration.ts
176
+ //#endregion
177
+ //#region src/api-model/configuration.ts
211
178
  var Configuration = class {
212
- /**
213
- * parameter for apiKey security
214
- * @param name security name
215
- */
216
- apiKey;
217
- /**
218
- * parameter for basic security
219
- */
220
- username;
221
- /**
222
- * parameter for basic security
223
- */
224
- password;
225
- /**
226
- * parameter for oauth2 security
227
- * @param name security name
228
- * @param scopes oauth2 scope
229
- */
230
- accessToken;
231
- /**
232
- * parameter for aws4 signature security
233
- * @param {Object} AWS4Signature - AWS4 Signature security
234
- * @param {string} options.region - aws region
235
- * @param {string} options.service - name of the service.
236
- * @param {string} credentials.accessKeyId - aws access key id
237
- * @param {string} credentials.secretAccessKey - aws access key
238
- * @param {string} credentials.sessionToken - aws session token
239
- * @memberof Configuration
240
- */
241
- awsv4;
242
- /**
243
- * override base path
244
- */
245
- basePath;
246
- /**
247
- * override server index
248
- */
249
- serverIndex;
250
- /**
251
- * base options for axios calls
252
- */
253
- baseOptions;
254
- /**
255
- * The FormData constructor that will be used to create multipart form data
256
- * requests. You can inject this here so that execution environments that
257
- * do not support the FormData class can still run the generated client.
258
- *
259
- * @type {new () => FormData}
260
- */
261
- formDataCtor;
262
- constructor(param = {}) {
263
- this.apiKey = param.apiKey;
264
- this.username = param.username;
265
- this.password = param.password;
266
- this.accessToken = param.accessToken;
267
- this.awsv4 = param.awsv4;
268
- this.basePath = param.basePath;
269
- this.serverIndex = param.serverIndex;
270
- this.baseOptions = {
271
- ...param.baseOptions,
272
- headers: {
273
- ...param.baseOptions?.headers
274
- }
275
- };
276
- this.formDataCtor = param.formDataCtor;
277
- }
278
- /**
279
- * Check if the given MIME is a JSON MIME.
280
- * JSON MIME examples:
281
- * application/json
282
- * application/json; charset=UTF8
283
- * APPLICATION/JSON
284
- * application/vnd.company+json
285
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
286
- * @return True if the given MIME is JSON, false otherwise.
287
- */
288
- isJsonMime(mime) {
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
- // src/api-model/models/business-context.ts
295
- var BusinessContextStoreNameEnum = {
296
- AmazonHaul: "AMAZON_HAUL"
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
- // src/api-model/models/item-related-identifier.ts
300
- var ItemRelatedIdentifierItemRelatedIdentifierNameEnum = {
301
- OrderAdjustmentItemId: "ORDER_ADJUSTMENT_ITEM_ID",
302
- CouponId: "COUPON_ID",
303
- RemovalShipmentItemId: "REMOVAL_SHIPMENT_ITEM_ID",
304
- TransactionId: "TRANSACTION_ID"
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
- // src/api-model/models/related-identifier.ts
308
- var RelatedIdentifierRelatedIdentifierNameEnum = {
309
- OrderId: "ORDER_ID",
310
- ShipmentId: "SHIPMENT_ID",
311
- FinancialEventGroupId: "FINANCIAL_EVENT_GROUP_ID",
312
- RefundId: "REFUND_ID",
313
- InvoiceId: "INVOICE_ID",
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
- constructor(configuration) {
333
- const { axios, endpoint } = (0, import_common2.createAxiosInstance)(configuration, clientRateLimits);
334
- super(new Configuration(), endpoint, axios);
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
- // Annotate the CommonJS export names for ESM import in node:
338
- 0 && (module.exports = {
339
- BusinessContextStoreNameEnum,
340
- FinancesApi,
341
- FinancesApiAxiosParamCreator,
342
- FinancesApiClient,
343
- FinancesApiFactory,
344
- FinancesApiFp,
345
- ItemRelatedIdentifierItemRelatedIdentifierNameEnum,
346
- RelatedIdentifierRelatedIdentifierNameEnum,
347
- clientRateLimits
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