@binance/rebate 3.0.1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,230 +1,247 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name2 in all)
8
- __defProp(target, name2, { get: all[name2], enumerable: true });
3
+ var __export = (all) => {
4
+ let target = {};
5
+ for (var name$1 in all) __defProp(target, name$1, {
6
+ get: all[name$1],
7
+ enumerable: true
8
+ });
9
+ return target;
9
10
  };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
11
 
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- BadRequestError: () => import_common4.BadRequestError,
24
- ConnectorClientError: () => import_common4.ConnectorClientError,
25
- ForbiddenError: () => import_common4.ForbiddenError,
26
- NetworkError: () => import_common4.NetworkError,
27
- NotFoundError: () => import_common4.NotFoundError,
28
- REBATE_REST_API_PROD_URL: () => import_common4.REBATE_REST_API_PROD_URL,
29
- RateLimitBanError: () => import_common4.RateLimitBanError,
30
- Rebate: () => Rebate,
31
- RebateRestAPI: () => rest_api_exports,
32
- RequiredError: () => import_common4.RequiredError,
33
- ServerError: () => import_common4.ServerError,
34
- TooManyRequestsError: () => import_common4.TooManyRequestsError,
35
- UnauthorizedError: () => import_common4.UnauthorizedError
36
- });
37
- module.exports = __toCommonJS(index_exports);
12
+ //#endregion
13
+ let __binance_common = require("@binance/common");
38
14
 
39
- // src/rebate.ts
40
- var import_common3 = require("@binance/common");
41
-
42
- // package.json
15
+ //#region package.json
43
16
  var name = "@binance/rebate";
44
- var version = "3.0.1";
45
-
46
- // src/rest-api/index.ts
47
- var rest_api_exports = {};
48
- __export(rest_api_exports, {
49
- RebateApi: () => RebateApi,
50
- RestAPI: () => RestAPI
51
- });
17
+ var version = "3.0.3";
52
18
 
53
- // src/rest-api/modules/rebate-api.ts
54
- var import_common = require("@binance/common");
55
- var RebateApiAxiosParamCreator = function(configuration) {
56
- return {
57
- /**
58
- * Get Spot Rebate History Records
59
- *
60
- * The max interval between startTime and endTime is 30 days.
61
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
62
- * The earliest startTime is supported on June 10, 2020
63
- * Return up to 200 records per request.
64
- *
65
- * Weight: 12000
66
- *
67
- * @summary Get Spot Rebate History Records (USER_DATA)
68
- * @param {number | bigint} [startTime]
69
- * @param {number | bigint} [endTime]
70
- * @param {number | bigint} [page] Default 1
71
- * @param {number | bigint} [recvWindow]
72
- *
73
- * @throws {RequiredError}
74
- */
75
- getSpotRebateHistoryRecords: async (startTime, endTime, page, recvWindow) => {
76
- const localVarQueryParameter = {};
77
- if (startTime !== void 0 && startTime !== null) {
78
- localVarQueryParameter["startTime"] = startTime;
79
- }
80
- if (endTime !== void 0 && endTime !== null) {
81
- localVarQueryParameter["endTime"] = endTime;
82
- }
83
- if (page !== void 0 && page !== null) {
84
- localVarQueryParameter["page"] = page;
85
- }
86
- if (recvWindow !== void 0 && recvWindow !== null) {
87
- localVarQueryParameter["recvWindow"] = recvWindow;
88
- }
89
- let _timeUnit;
90
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
91
- return {
92
- endpoint: "/sapi/v1/rebate/taxQuery",
93
- method: "GET",
94
- params: localVarQueryParameter,
95
- timeUnit: _timeUnit
96
- };
97
- }
98
- };
19
+ //#endregion
20
+ //#region src/rest-api/modules/rebate-api.ts
21
+ /**
22
+ * Binance Rebate REST API
23
+ *
24
+ * OpenAPI Specification for the Binance Rebate REST API
25
+ *
26
+ * The version of the OpenAPI document: 1.0.0
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ */
33
+ /**
34
+ * RebateApi - axios parameter creator
35
+ */
36
+ const RebateApiAxiosParamCreator = function(configuration) {
37
+ return { getSpotRebateHistoryRecords: async (startTime, endTime, page, recvWindow) => {
38
+ const localVarQueryParameter = {};
39
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
40
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
41
+ if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
42
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
43
+ let _timeUnit;
44
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
45
+ return {
46
+ endpoint: "/sapi/v1/rebate/taxQuery",
47
+ method: "GET",
48
+ params: localVarQueryParameter,
49
+ timeUnit: _timeUnit
50
+ };
51
+ } };
99
52
  };
53
+ /**
54
+ * RebateApi - object-oriented interface
55
+ * @class RebateApi
56
+ */
100
57
  var RebateApi = class {
101
- constructor(configuration) {
102
- this.configuration = configuration;
103
- this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);
104
- }
105
- /**
106
- * Get Spot Rebate History Records
107
- *
108
- * The max interval between startTime and endTime is 30 days.
109
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
110
- * The earliest startTime is supported on June 10, 2020
111
- * Return up to 200 records per request.
112
- *
113
- * Weight: 12000
114
- *
115
- * @summary Get Spot Rebate History Records (USER_DATA)
116
- * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
117
- * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
118
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
119
- * @memberof RebateApi
120
- * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
121
- */
122
- async getSpotRebateHistoryRecords(requestParameters = {}) {
123
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(
124
- requestParameters?.startTime,
125
- requestParameters?.endTime,
126
- requestParameters?.page,
127
- requestParameters?.recvWindow
128
- );
129
- return (0, import_common.sendRequest)(
130
- this.configuration,
131
- localVarAxiosArgs.endpoint,
132
- localVarAxiosArgs.method,
133
- localVarAxiosArgs.params,
134
- localVarAxiosArgs?.timeUnit,
135
- { isSigned: true }
136
- );
137
- }
58
+ constructor(configuration) {
59
+ this.configuration = configuration;
60
+ this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);
61
+ }
62
+ /**
63
+ * Get Spot Rebate History Records
64
+ *
65
+ * The max interval between startTime and endTime is 30 days.
66
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
67
+ * The earliest startTime is supported on June 10, 2020
68
+ * Return up to 200 records per request.
69
+ *
70
+ * Weight: 12000
71
+ *
72
+ * @summary Get Spot Rebate History Records (USER_DATA)
73
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
74
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
75
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
76
+ * @memberof RebateApi
77
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
78
+ */
79
+ async getSpotRebateHistoryRecords(requestParameters = {}) {
80
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.recvWindow);
81
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
82
+ }
138
83
  };
139
84
 
140
- // src/rest-api/rest-api.ts
141
- var import_common2 = require("@binance/common");
85
+ //#endregion
86
+ //#region src/rest-api/rest-api.ts
87
+ /**
88
+ * Binance Rebate REST API
89
+ *
90
+ * OpenAPI Specification for the Binance Rebate REST API
91
+ *
92
+ * The version of the OpenAPI document: 1.0.0
93
+ *
94
+ *
95
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
96
+ * https://openapi-generator.tech
97
+ * Do not edit the class manually.
98
+ */
142
99
  var RestAPI = class {
143
- constructor(configuration) {
144
- this.configuration = configuration;
145
- this.rebateApi = new RebateApi(configuration);
146
- }
147
- /**
148
- * Generic function to send a request.
149
- * @param endpoint - The API endpoint to call.
150
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
151
- * @param params - Query parameters for the request.
152
- *
153
- * @returns A promise resolving to the response data object.
154
- */
155
- sendRequest(endpoint, method, params = {}) {
156
- return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0);
157
- }
158
- /**
159
- * Generic function to send a signed request.
160
- * @param endpoint - The API endpoint to call.
161
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
162
- * @param params - Query parameters for the request.
163
- *
164
- * @returns A promise resolving to the response data object.
165
- */
166
- sendSignedRequest(endpoint, method, params = {}) {
167
- return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0, {
168
- isSigned: true
169
- });
170
- }
171
- /**
172
- * Get Spot Rebate History Records
173
- *
174
- * The max interval between startTime and endTime is 30 days.
175
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
176
- * The earliest startTime is supported on June 10, 2020
177
- * Return up to 200 records per request.
178
- *
179
- * Weight: 12000
180
- *
181
- * @summary Get Spot Rebate History Records (USER_DATA)
182
- * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
183
- *
184
- * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
185
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
186
- * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
187
- */
188
- getSpotRebateHistoryRecords(requestParameters = {}) {
189
- return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);
190
- }
100
+ constructor(configuration) {
101
+ this.configuration = configuration;
102
+ this.rebateApi = new RebateApi(configuration);
103
+ }
104
+ /**
105
+ * Generic function to send a request.
106
+ * @param endpoint - The API endpoint to call.
107
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
108
+ * @param params - Query parameters for the request.
109
+ *
110
+ * @returns A promise resolving to the response data object.
111
+ */
112
+ sendRequest(endpoint, method, params = {}) {
113
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
114
+ }
115
+ /**
116
+ * Generic function to send a signed request.
117
+ * @param endpoint - The API endpoint to call.
118
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
119
+ * @param params - Query parameters for the request.
120
+ *
121
+ * @returns A promise resolving to the response data object.
122
+ */
123
+ sendSignedRequest(endpoint, method, params = {}) {
124
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
125
+ }
126
+ /**
127
+ * Get Spot Rebate History Records
128
+ *
129
+ * The max interval between startTime and endTime is 30 days.
130
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
131
+ * The earliest startTime is supported on June 10, 2020
132
+ * Return up to 200 records per request.
133
+ *
134
+ * Weight: 12000
135
+ *
136
+ * @summary Get Spot Rebate History Records (USER_DATA)
137
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
138
+ *
139
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
140
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
141
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
142
+ */
143
+ getSpotRebateHistoryRecords(requestParameters = {}) {
144
+ return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);
145
+ }
191
146
  };
192
147
 
193
- // src/rebate.ts
148
+ //#endregion
149
+ //#region src/rest-api/index.ts
150
+ var rest_api_exports = /* @__PURE__ */ __export({
151
+ RebateApi: () => RebateApi,
152
+ RestAPI: () => RestAPI
153
+ });
154
+
155
+ //#endregion
156
+ //#region src/rebate.ts
194
157
  var Rebate = class {
195
- constructor(config) {
196
- const userAgent = (0, import_common3.buildUserAgent)(name, version);
197
- if (config?.configurationRestAPI) {
198
- const configRestAPI = new import_common3.ConfigurationRestAPI(
199
- config.configurationRestAPI
200
- );
201
- configRestAPI.basePath = configRestAPI.basePath || import_common3.REBATE_REST_API_PROD_URL;
202
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
203
- configRestAPI.baseOptions.headers = {
204
- ...configRestAPI.baseOptions.headers || {},
205
- "User-Agent": userAgent
206
- };
207
- this.restAPI = new RestAPI(configRestAPI);
208
- }
209
- }
158
+ constructor(config) {
159
+ const userAgent = (0, __binance_common.buildUserAgent)(name, version);
160
+ if (config?.configurationRestAPI) {
161
+ const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
162
+ configRestAPI.basePath = configRestAPI.basePath || __binance_common.REBATE_REST_API_PROD_URL;
163
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
164
+ configRestAPI.baseOptions.headers = {
165
+ ...configRestAPI.baseOptions.headers || {},
166
+ "User-Agent": userAgent
167
+ };
168
+ this.restAPI = new RestAPI(configRestAPI);
169
+ }
170
+ }
210
171
  };
211
172
 
212
- // src/index.ts
213
- var import_common4 = require("@binance/common");
214
- // Annotate the CommonJS export names for ESM import in node:
215
- 0 && (module.exports = {
216
- BadRequestError,
217
- ConnectorClientError,
218
- ForbiddenError,
219
- NetworkError,
220
- NotFoundError,
221
- REBATE_REST_API_PROD_URL,
222
- RateLimitBanError,
223
- Rebate,
224
- RebateRestAPI,
225
- RequiredError,
226
- ServerError,
227
- TooManyRequestsError,
228
- UnauthorizedError
173
+ //#endregion
174
+ Object.defineProperty(exports, 'BadRequestError', {
175
+ enumerable: true,
176
+ get: function () {
177
+ return __binance_common.BadRequestError;
178
+ }
179
+ });
180
+ Object.defineProperty(exports, 'ConnectorClientError', {
181
+ enumerable: true,
182
+ get: function () {
183
+ return __binance_common.ConnectorClientError;
184
+ }
185
+ });
186
+ Object.defineProperty(exports, 'ForbiddenError', {
187
+ enumerable: true,
188
+ get: function () {
189
+ return __binance_common.ForbiddenError;
190
+ }
191
+ });
192
+ Object.defineProperty(exports, 'NetworkError', {
193
+ enumerable: true,
194
+ get: function () {
195
+ return __binance_common.NetworkError;
196
+ }
197
+ });
198
+ Object.defineProperty(exports, 'NotFoundError', {
199
+ enumerable: true,
200
+ get: function () {
201
+ return __binance_common.NotFoundError;
202
+ }
203
+ });
204
+ Object.defineProperty(exports, 'REBATE_REST_API_PROD_URL', {
205
+ enumerable: true,
206
+ get: function () {
207
+ return __binance_common.REBATE_REST_API_PROD_URL;
208
+ }
209
+ });
210
+ Object.defineProperty(exports, 'RateLimitBanError', {
211
+ enumerable: true,
212
+ get: function () {
213
+ return __binance_common.RateLimitBanError;
214
+ }
215
+ });
216
+ exports.Rebate = Rebate;
217
+ Object.defineProperty(exports, 'RebateRestAPI', {
218
+ enumerable: true,
219
+ get: function () {
220
+ return rest_api_exports;
221
+ }
222
+ });
223
+ Object.defineProperty(exports, 'RequiredError', {
224
+ enumerable: true,
225
+ get: function () {
226
+ return __binance_common.RequiredError;
227
+ }
228
+ });
229
+ Object.defineProperty(exports, 'ServerError', {
230
+ enumerable: true,
231
+ get: function () {
232
+ return __binance_common.ServerError;
233
+ }
234
+ });
235
+ Object.defineProperty(exports, 'TooManyRequestsError', {
236
+ enumerable: true,
237
+ get: function () {
238
+ return __binance_common.TooManyRequestsError;
239
+ }
240
+ });
241
+ Object.defineProperty(exports, 'UnauthorizedError', {
242
+ enumerable: true,
243
+ get: function () {
244
+ return __binance_common.UnauthorizedError;
245
+ }
229
246
  });
230
247
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/rebate.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { Rebate, ConfigurationRebate } from './rebate';\nexport * as RebateRestAPI from './rest-api';\n\nexport {\n REBATE_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n","import { buildUserAgent, ConfigurationRestAPI, REBATE_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationRebate {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Rebate {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationRebate) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || REBATE_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/rebate\",\n \"description\": \"Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.\",\n \"version\": \"3.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Rebate\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetSpotRebateHistoryRecordsResponse } from '../types';\n\n/**\n * RebateApi - axios parameter creator\n */\nconst RebateApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getSpotRebateHistoryRecords: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/rebate/taxQuery',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RebateApi - interface\n * @interface RebateApi\n */\nexport interface RebateApiInterface {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApiInterface\n */\n getSpotRebateHistoryRecords(\n requestParameters?: GetSpotRebateHistoryRecordsRequest\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>;\n}\n\n/**\n * Request parameters for getSpotRebateHistoryRecords operation in RebateApi.\n * @interface GetSpotRebateHistoryRecordsRequest\n */\nexport interface GetSpotRebateHistoryRecordsRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly endTime?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly page?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RebateApi - object-oriented interface\n * @class RebateApi\n */\nexport class RebateApi implements RebateApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApi\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n public async getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.recvWindow\n );\n return sendRequest<GetSpotRebateHistoryRecordsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { RebateApi } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsRequest } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private rebateApi: RebateApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.rebateApi = new RebateApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n return this.rebateApi.getSpotRebateHistoryRecords(requestParame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AAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc;AAAA,MAClB;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AD1BA,IAAAC,iBAYO;","names":["import_common","import_common","import_common"]}
1
+ {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","REBATE_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/rebate.ts"],"sourcesContent":["{\n \"name\": \"@binance/rebate\",\n \"description\": \"Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.\",\n \"version\": \"3.0.3\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Rebate\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.1\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetSpotRebateHistoryRecordsResponse } from '../types';\n\n/**\n * RebateApi - axios parameter creator\n */\nconst RebateApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getSpotRebateHistoryRecords: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/rebate/taxQuery',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RebateApi - interface\n * @interface RebateApi\n */\nexport interface RebateApiInterface {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApiInterface\n */\n getSpotRebateHistoryRecords(\n requestParameters?: GetSpotRebateHistoryRecordsRequest\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>;\n}\n\n/**\n * Request parameters for getSpotRebateHistoryRecords operation in RebateApi.\n * @interface GetSpotRebateHistoryRecordsRequest\n */\nexport interface GetSpotRebateHistoryRecordsRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly endTime?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly page?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RebateApi - object-oriented interface\n * @class RebateApi\n */\nexport class RebateApi implements RebateApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApi\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n public async getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.recvWindow\n );\n return sendRequest<GetSpotRebateHistoryRecordsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { RebateApi } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsRequest } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private rebateApi: RebateApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.rebateApi = new RebateApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, REBATE_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationRebate {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Rebate {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationRebate) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || REBATE_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,6BAA6B,SAAU,eAAqC;AAC9E,QAAO,EAmBH,6BAA6B,OACzB,WACA,SACA,MACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;AAE1D,MAAI,cAAc,UAAa,cAAc,KACzC,wBA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