@atomsolution/invoice-sdk-api 1.31.0 → 1.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -1128,6 +1128,22 @@ export interface GetQuotasError {
1128
1128
  */
1129
1129
  error?: string;
1130
1130
  }
1131
+ /**
1132
+ * @export
1133
+ * @interface GetTransactionHistoryResponse
1134
+ */
1135
+ export interface GetTransactionHistoryResponse {
1136
+ /**
1137
+ * Status of request
1138
+ * @type {string}
1139
+ */
1140
+ success?: string;
1141
+ /**
1142
+ * Transaction Histpry
1143
+ * @type {Array<any>}
1144
+ */
1145
+ data?: Array<any>;
1146
+ }
1131
1147
  /**
1132
1148
  * DefaultApi - axios parameter creator
1133
1149
  * @export
@@ -1244,6 +1260,26 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
1244
1260
  * @throws {RequiredError}
1245
1261
  */
1246
1262
  getQuotas: (params: GetQuotasRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1263
+ /**
1264
+ * Get transaction history
1265
+ * @summary
1266
+ * @param {string} bank
1267
+ * @param {string} provider
1268
+ * @param {string} taxCode
1269
+ * @param {number} [limit]
1270
+ * @param {number} [page]
1271
+ * @param {string} [sort]
1272
+ * @param {*} [options]
1273
+ * @throws {RequiredError}
1274
+ */
1275
+ getTransactionHistory: (params: {
1276
+ bank: string;
1277
+ provider: string;
1278
+ taxCode: string;
1279
+ limit?: number;
1280
+ page?: number;
1281
+ sort?: string;
1282
+ }, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1247
1283
  };
1248
1284
  /**
1249
1285
  * DefaultApi - functional programming interface
@@ -1366,6 +1402,21 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1366
1402
  * @throws {RequiredError}
1367
1403
  */
1368
1404
  getQuotas(params: GetQuotasRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetQuotasResponse>>;
1405
+ /**
1406
+ * Get transaction history
1407
+ * @summary
1408
+ * @param {*} params
1409
+ * @param {*} [options]
1410
+ * @throws {RequiredError}
1411
+ */
1412
+ getTransactionHistory(params: {
1413
+ bank: string;
1414
+ provider: string;
1415
+ taxCode: string;
1416
+ limit?: number;
1417
+ page?: number;
1418
+ sort?: string;
1419
+ }, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetTransactionHistoryResponse>>;
1369
1420
  };
1370
1421
  /**
1371
1422
  * Unified API functions distinguished by provider in configuration
@@ -1431,7 +1482,7 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1431
1482
  */
1432
1483
  getQuotas(params: GetQuotasRequest, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetQuotasResponse, any>>;
1433
1484
  /**
1434
- * Get Transaction History
1485
+ * Get Transaction History (Unified)
1435
1486
  */
1436
1487
  getTransactionHistory(params: {
1437
1488
  bank: string;
@@ -1440,5 +1491,5 @@ export declare const InvoiceApi: (configuration?: Configuration, basePath?: stri
1440
1491
  limit?: number;
1441
1492
  page?: number;
1442
1493
  sort?: string;
1443
- }, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<any, any>>;
1494
+ }, options?: RawAxiosRequestConfig): Promise<import('axios').AxiosResponse<GetTransactionHistoryResponse, any>>;
1444
1495
  };
package/dist/index.esm.js CHANGED
@@ -820,6 +820,60 @@ const DefaultApiAxiosParamCreator = function(configuration) {
820
820
  url: localVarUrlObj ? toPathString(localVarUrlObj) : "",
821
821
  options: localVarRequestOptions
822
822
  };
823
+ }),
824
+ /**
825
+ * Get transaction history
826
+ * @summary
827
+ * @param {string} bank
828
+ * @param {string} provider
829
+ * @param {string} taxCode
830
+ * @param {number} [limit]
831
+ * @param {number} [page]
832
+ * @param {string} [sort]
833
+ * @param {*} [options]
834
+ * @throws {RequiredError}
835
+ */
836
+ getTransactionHistory: (_0, ..._1) => __async(null, [_0, ..._1], function* (params, options = {}) {
837
+ assertParamExists("getTransactionHistory", "bank", params.bank);
838
+ assertParamExists("getTransactionHistory", "provider", params.provider);
839
+ assertParamExists("getTransactionHistory", "taxCode", params.taxCode);
840
+ let baseOptions;
841
+ const localVarPath = "/core-api/orders/history";
842
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
843
+ if (configuration) {
844
+ baseOptions = configuration.baseOptions;
845
+ }
846
+ const localVarRequestOptions = __spreadValues(__spreadValues({
847
+ method: "GET"
848
+ }, baseOptions), options);
849
+ const localVarHeaderParameter = {};
850
+ const localVarQueryParameter = {};
851
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
852
+ if (params.bank !== void 0) {
853
+ localVarQueryParameter["bank"] = params.bank;
854
+ }
855
+ if (params.provider !== void 0) {
856
+ localVarQueryParameter["provider"] = params.provider;
857
+ }
858
+ if (params.taxCode !== void 0) {
859
+ localVarQueryParameter["taxCode"] = params.taxCode;
860
+ }
861
+ if (params.limit !== void 0) {
862
+ localVarQueryParameter["limit"] = params.limit;
863
+ }
864
+ if (params.page !== void 0) {
865
+ localVarQueryParameter["page"] = params.page;
866
+ }
867
+ if (params.sort !== void 0) {
868
+ localVarQueryParameter["sort"] = params.sort;
869
+ }
870
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
871
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
872
+ localVarRequestOptions.headers = __spreadValues(__spreadValues(__spreadValues({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
873
+ return {
874
+ url: toPathString(localVarUrlObj),
875
+ options: localVarRequestOptions
876
+ };
823
877
  })
824
878
  };
825
879
  };
@@ -1147,6 +1201,27 @@ const DefaultApiFp = function(configuration) {
1147
1201
  configuration
1148
1202
  )(axios, localVarOperationServerBasePath || basePath);
1149
1203
  });
1204
+ },
1205
+ /**
1206
+ * Get transaction history
1207
+ * @summary
1208
+ * @param {*} params
1209
+ * @param {*} [options]
1210
+ * @throws {RequiredError}
1211
+ */
1212
+ getTransactionHistory(params, options) {
1213
+ return __async(this, null, function* () {
1214
+ var _a2, _b, _c;
1215
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTransactionHistory(params, options);
1216
+ const localVarOperationServerIndex = (_a2 = configuration == null ? void 0 : configuration.serverIndex) != null ? _a2 : 0;
1217
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap["DefaultApi.getTransactionHistory"]) == null ? void 0 : _b[localVarOperationServerIndex]) == null ? void 0 : _c.url;
1218
+ return (axios, basePath) => createRequestFunction(
1219
+ localVarAxiosArgs,
1220
+ globalAxios,
1221
+ BASE_PATH,
1222
+ configuration
1223
+ )(axios, localVarOperationServerBasePath || basePath);
1224
+ });
1150
1225
  }
1151
1226
  };
1152
1227
  };
@@ -1239,36 +1314,10 @@ const InvoiceApi = function(configuration, basePath, axios) {
1239
1314
  return localVarFp.getQuotas(params, options).then((request) => request(axios, basePath));
1240
1315
  },
1241
1316
  /**
1242
- * Get Transaction History
1317
+ * Get Transaction History (Unified)
1243
1318
  */
1244
1319
  getTransactionHistory(params, options) {
1245
- var _a, _b, _c;
1246
- if (!axios) {
1247
- return Promise.reject(new Error("Axios not found"));
1248
- }
1249
- const query = new URLSearchParams({
1250
- bank: params.bank,
1251
- provider: params.provider,
1252
- taxCode: params.taxCode,
1253
- limit: String((_a = params.limit) != null ? _a : 10),
1254
- page: String((_b = params.page) != null ? _b : 1),
1255
- sort: (_c = params.sort) != null ? _c : "-createdAt"
1256
- }).toString();
1257
- const url = "".concat(basePath || "", "/core-api/orders/history?").concat(query);
1258
- return axios.get(url, options).then((response) => {
1259
- if (!response) {
1260
- throw new Error("No response received");
1261
- }
1262
- return response;
1263
- }).catch((error) => {
1264
- error.requestContext = {
1265
- url,
1266
- params,
1267
- basePath,
1268
- method: "GET"
1269
- };
1270
- throw error;
1271
- });
1320
+ return localVarFp.getTransactionHistory(params, options).then((request) => request(axios, basePath));
1272
1321
  }
1273
1322
  };
1274
1323
  };