squarefi-bff-api-module 1.36.5 → 1.36.7

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.
@@ -368,84 +368,65 @@ export declare namespace API {
368
368
  }
369
369
  }
370
370
  namespace Counterparties {
371
- type CounterpartyType = components['schemas']['CounterpartyAccountDto']['type'];
372
- type Counterparty = components['schemas']['CounterpartyAccountDto'];
371
+ type CounterpartyType = componentsV1Frontend['schemas']['CounterpartyAccount']['type'];
372
+ type Counterparty = componentsV1Frontend['schemas']['CounterpartyAccount'];
373
+ type CounterpartyWithDestinations = Counterparty & {
374
+ destinations: Destination.List.CounterpartyDestinationListItem[];
375
+ };
373
376
  namespace Destination {
374
- type CounterpartyDestinationType = components['schemas']['CounterpartyDestinationDto']['type'];
377
+ type CounterpartyDestinationType = componentsV1Frontend['schemas']['CounterpartyDestination']['type'];
375
378
  type BankingDestinationType = Extract<CounterpartyDestinationType, 'FEDWIRE'> | Extract<CounterpartyDestinationType, 'ACH'> | Extract<CounterpartyDestinationType, 'SWIFT'> | Extract<CounterpartyDestinationType, 'SEPA'> | Extract<CounterpartyDestinationType, 'CHAPS'> | Extract<CounterpartyDestinationType, 'FPS'>;
376
379
  type CryptoDestinationType = Extract<CounterpartyDestinationType, 'CRYPTO_EXTERNAL'> | Extract<CounterpartyDestinationType, 'CRYPTO_INTERNAL'>;
377
- type DestinationType = BankingDestinationType | CryptoDestinationType;
380
+ type InternalDestinationType = Extract<CounterpartyDestinationType, 'INTERNAL'>;
381
+ type DestinationType = BankingDestinationType | CryptoDestinationType | InternalDestinationType;
378
382
  namespace List {
379
383
  interface DestinationListItemCommonFields {
380
384
  id: string;
381
- nickname: string;
385
+ nickname: string | null;
382
386
  type: CounterpartyDestinationType;
383
387
  created_at: string;
384
388
  }
385
- interface DestinationListItemExternalBankingData {
386
- account_number?: string;
387
- routing_number?: string;
388
- bank_name: string;
389
- note: string;
390
- swift_bic?: string;
391
- sort_code?: string;
392
- iban?: string;
393
- address: {
394
- city: string;
395
- country_id: number;
396
- state_id: number;
397
- postcode: string;
398
- street1: string;
399
- street2?: string;
400
- };
401
- }
402
- interface DestinationListItemExternalCryptoData {
403
- address: string;
404
- currency_id: string;
405
- memo?: string;
406
- }
389
+ type DestinationListItemExternalBankingData = NonNullable<componentsV1Frontend['schemas']['CounterpartyBankingData']>;
390
+ type DestinationListItemExternalCryptoData = NonNullable<componentsV1Frontend['schemas']['CounterpartyCryptoData']>;
391
+ type DestinationInternalData = NonNullable<componentsV1Frontend['schemas']['CounterpartyInternalData']>;
407
392
  interface DestinationListItemWithExternalBankingData extends DestinationListItemCommonFields {
408
393
  type: BankingDestinationType;
409
394
  external_banking_data: DestinationListItemExternalBankingData;
410
395
  external_crypto_data?: never;
396
+ internal_data?: never;
411
397
  }
412
398
  interface DestinationListItemWithExternalCryptoData extends DestinationListItemCommonFields {
413
399
  type: CryptoDestinationType;
414
400
  external_banking_data?: never;
415
401
  external_crypto_data: DestinationListItemExternalCryptoData;
402
+ internal_data?: never;
416
403
  }
417
- type CounterpartyDestinationListItem = DestinationListItemWithExternalBankingData | DestinationListItemWithExternalCryptoData;
418
- type Request = operations['CounterpartyDestinationsController_findAll']['parameters']['query'] & operations['CounterpartyDestinationsController_findAll']['parameters']['path'];
404
+ interface DestinationListItemWithInternalData extends DestinationListItemCommonFields {
405
+ type: InternalDestinationType;
406
+ external_banking_data?: never;
407
+ external_crypto_data?: never;
408
+ internal_data: DestinationInternalData;
409
+ }
410
+ type CounterpartyDestinationListItem = DestinationListItemWithExternalBankingData | DestinationListItemWithExternalCryptoData | DestinationListItemWithInternalData;
411
+ type Request = pathsV1Frontend['/frontend/counterparty/destinations/wallet/{wallet_id}']['get']['parameters']['path'] & NonNullable<pathsV1Frontend['/frontend/counterparty/destinations/wallet/{wallet_id}']['get']['parameters']['query']>;
419
412
  type Response = {
420
413
  total: number;
421
414
  data: CounterpartyDestinationListItem[];
422
415
  };
423
416
  }
424
417
  namespace Detail {
425
- type DestinationDetailItemCommonFields = API.Counterparties.Destination.List.DestinationListItemCommonFields;
426
- interface DestinationDetailItemExternalBankingData extends API.Counterparties.Destination.List.DestinationListItemExternalBankingData {
427
- address: API.Counterparties.Destination.List.DestinationListItemExternalBankingData['address'] & {
428
- country?: API.Location.Countries.Country;
429
- state?: API.Location.States.State;
430
- };
431
- }
432
- interface DestinationDetailItemExternalCryptoData extends API.Counterparties.Destination.List.DestinationListItemExternalCryptoData {
433
- currency: API.Currencies.Currency;
434
- }
435
- interface DestinationDetailItemWithExternalBankingData extends DestinationDetailItemCommonFields {
436
- type: BankingDestinationType;
437
- external_banking_data: DestinationDetailItemExternalBankingData;
438
- external_crypto_data?: never;
439
- }
440
- interface DestinationDetailItemWithExternalCryptoData extends DestinationDetailItemCommonFields {
441
- type: CryptoDestinationType;
442
- external_banking_data?: never;
443
- external_crypto_data: DestinationDetailItemExternalCryptoData;
418
+ type DestinationDetailItemCommonFields = List.DestinationListItemCommonFields;
419
+ type DestinationDetailItemExternalBankingData = List.DestinationListItemExternalBankingData;
420
+ type DestinationDetailItemExternalCryptoData = List.DestinationListItemExternalCryptoData;
421
+ type DestinationDetailItemWithExternalBankingData = List.DestinationListItemWithExternalBankingData;
422
+ type DestinationDetailItemWithExternalCryptoData = List.DestinationListItemWithExternalCryptoData;
423
+ type DestinationDetailItemWithInternalData = List.DestinationListItemWithInternalData;
424
+ type DestinationDetailItem = List.CounterpartyDestinationListItem;
425
+ interface Request {
426
+ counterparty_destination_id: string;
427
+ wallet_id?: string;
428
+ counterparty_account_id?: string;
444
429
  }
445
- type DestinationDetailItem = DestinationDetailItemWithExternalBankingData | DestinationDetailItemWithExternalCryptoData;
446
- type Request = operations['CounterpartyDestinationsController_findOne']['parameters']['path'] & {
447
- wallet_id: string;
448
- };
449
430
  type Response = DestinationDetailItem;
450
431
  }
451
432
  namespace Create {
@@ -457,48 +438,66 @@ export declare namespace API {
457
438
  swift_bic: string;
458
439
  }
459
440
  interface Request {
460
- wallet_id: string;
441
+ wallet_id?: string;
461
442
  counterparty_account_id: string;
462
443
  type: CounterpartyDestinationType;
463
- nickname: string;
464
- external_banking_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalBankingData;
465
- external_crypto_data?: Pick<API.Counterparties.Destination.Detail.DestinationDetailItemExternalCryptoData, 'currency_id' | 'address' | 'memo'>;
444
+ nickname?: string;
445
+ external_banking_data?: List.DestinationListItemExternalBankingData;
446
+ external_crypto_data?: Pick<List.DestinationListItemExternalCryptoData, 'currency_id' | 'address' | 'memo'>;
447
+ internal_data?: List.DestinationInternalData;
466
448
  }
467
- type Response = API.Counterparties.Destination.Detail.DestinationDetailItem;
449
+ type Response = Detail.DestinationDetailItem;
468
450
  }
469
451
  namespace Delete {
470
- type Request = operations['CounterpartyDestinationsController_delete']['parameters']['path'];
452
+ type Request = NonNullable<pathsV1Frontend['/frontend/counterparty/destinations/{id}']['delete']['parameters']['query']> & {
453
+ counterparty_destination_id: string;
454
+ wallet_id?: string;
455
+ counterparty_account_id?: string;
456
+ };
457
+ type Response = void;
471
458
  }
472
459
  namespace Update {
473
- type Request = operations['CounterpartyDestinationsController_update']['requestBody']['content']['application/json'] & operations['CounterpartyDestinationsController_update']['parameters']['path'];
474
- type Response = components['schemas']['CounterpartyDestinationDto'];
460
+ type Request = pathsV1Frontend['/frontend/counterparty/destinations/{id}']['patch']['requestBody']['content']['application/json'] & {
461
+ counterparty_destination_id: string;
462
+ wallet_id?: string;
463
+ counterparty_account_id?: string;
464
+ };
465
+ type Response = Detail.DestinationDetailItem;
475
466
  }
476
467
  }
477
468
  namespace GetById {
478
469
  interface Request {
479
- wallet_id: string;
480
470
  counterparty_account_id: string;
471
+ wallet_id?: string;
481
472
  }
482
- type Response = components['schemas']['CounterpartyAccountDto'];
473
+ type Response = CounterpartyWithDestinations;
483
474
  }
484
475
  namespace List {
485
- type Request = operations['CounterpartyAccountsController_findAll']['parameters']['query'] & operations['CounterpartyAccountsController_findAll']['parameters']['path'];
476
+ type Request = pathsV1Frontend['/frontend/counterparty/accounts/wallet/{wallet_id}']['get']['parameters']['path'] & NonNullable<pathsV1Frontend['/frontend/counterparty/accounts/wallet/{wallet_id}']['get']['parameters']['query']>;
486
477
  type Response = {
487
478
  total: number;
488
479
  data: Counterparty[];
489
480
  };
490
481
  }
491
482
  namespace Create {
492
- type Request = operations['CounterpartyAccountsController_create']['requestBody']['content']['application/json'] & operations['CounterpartyAccountsController_create']['parameters']['path'];
483
+ type Request = pathsV1Frontend['/frontend/counterparty/accounts/wallet/{wallet_id}']['post']['parameters']['path'] & pathsV1Frontend['/frontend/counterparty/accounts/wallet/{wallet_id}']['post']['requestBody']['content']['application/json'];
493
484
  type Response = Counterparty;
494
485
  }
495
486
  namespace Update {
496
- type Request = operations['CounterpartyAccountsController_update']['requestBody']['content']['application/json'] & operations['CounterpartyAccountsController_update']['parameters']['path'];
487
+ type Request = pathsV1Frontend['/frontend/counterparty/accounts/{id}']['patch']['requestBody']['content']['application/json'] & {
488
+ counterparty_account_id: string;
489
+ wallet_id?: string;
490
+ };
497
491
  type Response = Counterparty;
498
492
  }
499
493
  namespace Delete {
500
- type Request = operations['CounterpartyAccountsController_delete']['parameters']['path'];
501
- type Response = Counterparty;
494
+ interface Request {
495
+ counterparty_account_id: string;
496
+ wallet_id?: string;
497
+ }
498
+ type Response = {
499
+ message: string;
500
+ };
502
501
  }
503
502
  }
504
503
  namespace Currencies {
@@ -1343,7 +1342,14 @@ export declare namespace API {
1343
1342
  };
1344
1343
  }
1345
1344
  interface BraleResponse extends BaseOrderResponse {
1346
- order_type: 'BRL_WIRE_OFFRAMP' | 'BRL_ACH_OFFRAMP';
1345
+ order_type: 'BRL_WIRE_OFFRAMP' | 'BRL_ACH_OFFRAMP' | 'BRL_RTP_OFFRAMP';
1346
+ meta: {
1347
+ request_id: string;
1348
+ virtual_account_id: string;
1349
+ };
1350
+ }
1351
+ interface DlsResponse extends BaseOrderResponse {
1352
+ order_type: 'DLS_WIRE_OFFRAMP' | 'DLS_ACH_OFFRAMP' | 'DLS_SEPA_OFFRAMP' | 'DLS_SWIFT_OFFRAMP';
1347
1353
  meta: {
1348
1354
  request_id: string;
1349
1355
  virtual_account_id: string;
@@ -1471,6 +1477,36 @@ export declare namespace API {
1471
1477
  order_type: 'BRL_ACH_OFFRAMP';
1472
1478
  };
1473
1479
  }
1480
+ namespace BRL_RTP_OFFRAMP {
1481
+ type Request = Common.Request.OrderWithCounterpartyParams & Common.Request.OrderWithVirtualAccountParams;
1482
+ type Response = Common.Response.BraleResponse & {
1483
+ order_type: 'BRL_RTP_OFFRAMP';
1484
+ };
1485
+ }
1486
+ namespace DLS_WIRE_OFFRAMP {
1487
+ type Request = Common.Request.OrderWithVirtualAccountParams & Common.Request.OrderWithCounterpartyParams;
1488
+ type Response = Common.Response.DlsResponse & {
1489
+ order_type: 'DLS_WIRE_OFFRAMP';
1490
+ };
1491
+ }
1492
+ namespace DLS_ACH_OFFRAMP {
1493
+ type Request = Common.Request.OrderWithVirtualAccountParams & Common.Request.OrderWithCounterpartyParams;
1494
+ type Response = Common.Response.DlsResponse & {
1495
+ order_type: 'DLS_ACH_OFFRAMP';
1496
+ };
1497
+ }
1498
+ namespace DLS_SEPA_OFFRAMP {
1499
+ type Request = Common.Request.OrderWithVirtualAccountParams & Common.Request.OrderWithCounterpartyParams;
1500
+ type Response = Common.Response.DlsResponse & {
1501
+ order_type: 'DLS_SEPA_OFFRAMP';
1502
+ };
1503
+ }
1504
+ namespace DLS_SWIFT_OFFRAMP {
1505
+ type Request = Common.Request.OrderWithVirtualAccountParams & Common.Request.OrderWithCounterpartyParams;
1506
+ type Response = Common.Response.DlsResponse & {
1507
+ order_type: 'DLS_SWIFT_OFFRAMP';
1508
+ };
1509
+ }
1474
1510
  }
1475
1511
  }
1476
1512
  namespace OrderTypes {
@@ -128,7 +128,16 @@ export declare enum OrderType {
128
128
  BRL_ACH_OFFRAMP = "BRL_ACH_OFFRAMP",
129
129
  BRL_ACH_ONRAMP = "BRL_ACH_ONRAMP",
130
130
  BRL_WIRE_OFFRAMP = "BRL_WIRE_OFFRAMP",
131
- BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP"
131
+ BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP",
132
+ BRL_RTP_OFFRAMP = "BRL_RTP_OFFRAMP",
133
+ DLS_WIRE_ONRAMP = "DLS_WIRE_ONRAMP",
134
+ DLS_WIRE_OFFRAMP = "DLS_WIRE_OFFRAMP",
135
+ DLS_ACH_ONRAMP = "DLS_ACH_ONRAMP",
136
+ DLS_ACH_OFFRAMP = "DLS_ACH_OFFRAMP",
137
+ DLS_SEPA_ONRAMP = "DLS_SEPA_ONRAMP",
138
+ DLS_SEPA_OFFRAMP = "DLS_SEPA_OFFRAMP",
139
+ DLS_SWIFT_ONRAMP = "DLS_SWIFT_ONRAMP",
140
+ DLS_SWIFT_OFFRAMP = "DLS_SWIFT_OFFRAMP"
132
141
  }
133
142
  export declare enum WalletTransactionRecordType {
134
143
  CARD_PROVIDER_DEPOSIT = "CARD_PROVIDER_DEPOSIT",
@@ -215,7 +224,16 @@ export declare enum WalletTransactionRecordType {
215
224
  BRL_ACH_OFFRAMP = "BRL_ACH_OFFRAMP",
216
225
  BRL_ACH_ONRAMP = "BRL_ACH_ONRAMP",
217
226
  BRL_WIRE_OFFRAMP = "BRL_WIRE_OFFRAMP",
218
- BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP"
227
+ BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP",
228
+ BRL_RTP_OFFRAMP = "BRL_RTP_OFFRAMP",
229
+ DLS_WIRE_ONRAMP = "DLS_WIRE_ONRAMP",
230
+ DLS_WIRE_OFFRAMP = "DLS_WIRE_OFFRAMP",
231
+ DLS_ACH_ONRAMP = "DLS_ACH_ONRAMP",
232
+ DLS_ACH_OFFRAMP = "DLS_ACH_OFFRAMP",
233
+ DLS_SEPA_ONRAMP = "DLS_SEPA_ONRAMP",
234
+ DLS_SEPA_OFFRAMP = "DLS_SEPA_OFFRAMP",
235
+ DLS_SWIFT_ONRAMP = "DLS_SWIFT_ONRAMP",
236
+ DLS_SWIFT_OFFRAMP = "DLS_SWIFT_OFFRAMP"
219
237
  }
220
238
  export type OrderTypeMissingInWalletTransactionRecordType = Exclude<EnumValues<OrderType>, EnumValues<WalletTransactionRecordType>>;
221
239
  export declare const orderTypeIncludedInWalletTransactionRecordTypeCheck: IsUnionSubset<EnumValues<OrderType>, EnumValues<WalletTransactionRecordType>>;
@@ -336,7 +354,8 @@ export declare enum CounterpartyDestinationType {
336
354
  CRYPTO_EXTERNAL = "CRYPTO_EXTERNAL",
337
355
  CRYPTO_INTERNAL = "CRYPTO_INTERNAL",
338
356
  CHAPS = "CHAPS",
339
- FPS = "FPS"
357
+ FPS = "FPS",
358
+ INTERNAL = "INTERNAL"
340
359
  }
341
360
  export declare const counterpartyBankingDestinationTypes: Record<API.Counterparties.Destination.BankingDestinationType, CounterpartyDestinationType>;
342
361
  export declare const counterpartyCryptoDestinationTypes: Record<API.Counterparties.Destination.CryptoDestinationType, CounterpartyDestinationType>;
package/dist/constants.js CHANGED
@@ -130,6 +130,15 @@ export var OrderType;
130
130
  OrderType["BRL_ACH_ONRAMP"] = "BRL_ACH_ONRAMP";
131
131
  OrderType["BRL_WIRE_OFFRAMP"] = "BRL_WIRE_OFFRAMP";
132
132
  OrderType["BRL_WIRE_ONRAMP"] = "BRL_WIRE_ONRAMP";
133
+ OrderType["BRL_RTP_OFFRAMP"] = "BRL_RTP_OFFRAMP";
134
+ OrderType["DLS_WIRE_ONRAMP"] = "DLS_WIRE_ONRAMP";
135
+ OrderType["DLS_WIRE_OFFRAMP"] = "DLS_WIRE_OFFRAMP";
136
+ OrderType["DLS_ACH_ONRAMP"] = "DLS_ACH_ONRAMP";
137
+ OrderType["DLS_ACH_OFFRAMP"] = "DLS_ACH_OFFRAMP";
138
+ OrderType["DLS_SEPA_ONRAMP"] = "DLS_SEPA_ONRAMP";
139
+ OrderType["DLS_SEPA_OFFRAMP"] = "DLS_SEPA_OFFRAMP";
140
+ OrderType["DLS_SWIFT_ONRAMP"] = "DLS_SWIFT_ONRAMP";
141
+ OrderType["DLS_SWIFT_OFFRAMP"] = "DLS_SWIFT_OFFRAMP";
133
142
  // when extend do not forget to add new order type to the enum WalletTransactionRecordType
134
143
  })(OrderType || (OrderType = {}));
135
144
  export var WalletTransactionRecordType;
@@ -219,6 +228,15 @@ export var WalletTransactionRecordType;
219
228
  WalletTransactionRecordType["BRL_ACH_ONRAMP"] = "BRL_ACH_ONRAMP";
220
229
  WalletTransactionRecordType["BRL_WIRE_OFFRAMP"] = "BRL_WIRE_OFFRAMP";
221
230
  WalletTransactionRecordType["BRL_WIRE_ONRAMP"] = "BRL_WIRE_ONRAMP";
231
+ WalletTransactionRecordType["BRL_RTP_OFFRAMP"] = "BRL_RTP_OFFRAMP";
232
+ WalletTransactionRecordType["DLS_WIRE_ONRAMP"] = "DLS_WIRE_ONRAMP";
233
+ WalletTransactionRecordType["DLS_WIRE_OFFRAMP"] = "DLS_WIRE_OFFRAMP";
234
+ WalletTransactionRecordType["DLS_ACH_ONRAMP"] = "DLS_ACH_ONRAMP";
235
+ WalletTransactionRecordType["DLS_ACH_OFFRAMP"] = "DLS_ACH_OFFRAMP";
236
+ WalletTransactionRecordType["DLS_SEPA_ONRAMP"] = "DLS_SEPA_ONRAMP";
237
+ WalletTransactionRecordType["DLS_SEPA_OFFRAMP"] = "DLS_SEPA_OFFRAMP";
238
+ WalletTransactionRecordType["DLS_SWIFT_ONRAMP"] = "DLS_SWIFT_ONRAMP";
239
+ WalletTransactionRecordType["DLS_SWIFT_OFFRAMP"] = "DLS_SWIFT_OFFRAMP";
222
240
  })(WalletTransactionRecordType || (WalletTransactionRecordType = {}));
223
241
  export const orderTypeIncludedInWalletTransactionRecordTypeCheck = true;
224
242
  export var RequestStatus;
@@ -360,6 +378,8 @@ export var CounterpartyDestinationType;
360
378
  CounterpartyDestinationType["CRYPTO_INTERNAL"] = "CRYPTO_INTERNAL";
361
379
  CounterpartyDestinationType["CHAPS"] = "CHAPS";
362
380
  CounterpartyDestinationType["FPS"] = "FPS";
381
+ // Перевод на кошелёк внутри платформы (фронт-модуль контрагентов).
382
+ CounterpartyDestinationType["INTERNAL"] = "INTERNAL";
363
383
  })(CounterpartyDestinationType || (CounterpartyDestinationType = {}));
364
384
  export const counterpartyBankingDestinationTypes = {
365
385
  FEDWIRE: CounterpartyDestinationType.FEDWIRE,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.5",
3
+ "version": "1.36.7",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",