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