squarefi-bff-api-module 1.32.2 → 1.32.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.
|
@@ -4,11 +4,12 @@ export declare const counterparties: {
|
|
|
4
4
|
getById: ({ wallet_id, counterparty_account_id, }: API.Counterparties.GetById.Request) => Promise<API.Counterparties.GetById.Response>;
|
|
5
5
|
create: ({ wallet_id, ...data }: API.Counterparties.Create.Request) => Promise<API.Counterparties.Create.Response>;
|
|
6
6
|
update: ({ wallet_id, counterparty_account_id, ...data }: API.Counterparties.Update.Request) => Promise<API.Counterparties.Update.Response>;
|
|
7
|
+
delete: ({ wallet_id, counterparty_account_id, }: API.Counterparties.Delete.Request) => Promise<API.Counterparties.Delete.Response>;
|
|
7
8
|
destinations: {
|
|
8
9
|
getAll: ({ wallet_id, counterparty_account_id, ...params }: API.Counterparties.Destination.List.Request) => Promise<API.Counterparties.Destination.List.Response>;
|
|
9
10
|
getById: ({ wallet_id, counterparty_account_id, counterparty_destination_id, }: API.Counterparties.Destination.Detail.Request) => Promise<API.Counterparties.Destination.Detail.Response>;
|
|
10
11
|
create: ({ wallet_id, counterparty_account_id, ...data }: API.Counterparties.Destination.Create.Request) => Promise<API.Counterparties.Destination.Create.Response>;
|
|
11
12
|
update: ({ wallet_id, counterparty_account_id, counterparty_destination_id, ...data }: API.Counterparties.Destination.Update.Request) => Promise<API.Counterparties.Destination.Update.Response>;
|
|
12
|
-
delete: ({ wallet_id, counterparty_account_id, counterparty_destination_id, }: API.Counterparties.Destination.Delete.Request) => Promise<
|
|
13
|
+
delete: ({ wallet_id, counterparty_account_id, counterparty_destination_id, }: API.Counterparties.Destination.Delete.Request) => Promise<API.Counterparties.Destination.Delete.Response>;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
@@ -6,10 +6,18 @@ export const counterparties = {
|
|
|
6
6
|
getById: ({ wallet_id, counterparty_account_id, }) => apiClientV2.getRequest(`/counterparties/${wallet_id}/${counterparty_account_id}`),
|
|
7
7
|
create: ({ wallet_id, ...data }) => apiClientV2.postRequest(`/counterparties/${wallet_id}`, { data }),
|
|
8
8
|
update: ({ wallet_id, counterparty_account_id, ...data }) => apiClientV2.patchRequest(`/counterparties/${wallet_id}/${counterparty_account_id}`, { data }),
|
|
9
|
+
delete: ({ wallet_id, counterparty_account_id, }) => apiClientV2.deleteRequest(`/counterparties/${wallet_id}/${counterparty_account_id}`),
|
|
9
10
|
destinations: {
|
|
10
11
|
getAll: ({ wallet_id, counterparty_account_id, ...params }) => apiClientV2.getRequest(`/counterparties/${wallet_id}/${counterparty_account_id}/destinations`, { params }),
|
|
11
12
|
getById: ({ wallet_id, counterparty_account_id, counterparty_destination_id, }) => apiClientV2.getRequest(`/counterparties/${wallet_id}/${counterparty_account_id}/destinations/${counterparty_destination_id}`),
|
|
12
|
-
create: ({ wallet_id, counterparty_account_id,
|
|
13
|
+
create: ({ wallet_id, counterparty_account_id,
|
|
14
|
+
// 'verification-request-id': verificationRequestId, // TODO:verify request id not implemented yet on the backend
|
|
15
|
+
...data }) => apiClientV2.postRequest(`/counterparties/${wallet_id}/${counterparty_account_id}/destinations`, {
|
|
16
|
+
data,
|
|
17
|
+
// headers: { TODO:verify request id not implemented yet on the backend
|
|
18
|
+
// 'verification-request-id': verificationRequestId,
|
|
19
|
+
// },
|
|
20
|
+
}),
|
|
13
21
|
update: ({ wallet_id, counterparty_account_id, counterparty_destination_id, ...data }) => apiClientV2.patchRequest(`/counterparties/${wallet_id}/${counterparty_account_id}/destinations/${counterparty_destination_id}`, { data }),
|
|
14
22
|
delete: ({ wallet_id, counterparty_account_id, counterparty_destination_id, }) => apiClientV2.deleteRequest(`/counterparties/${wallet_id}/${counterparty_account_id}/destinations/${counterparty_destination_id}`),
|
|
15
23
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType,
|
|
1
|
+
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType, CurrencyType, IssuingProgramStatus, OrderPaymentMethod, OrderStatuses, OrderType, SortingDirection, SubAccountType, WalletTransactionMethod, WalletTransactionRecordType, WalletTransactionStatus, WalletTransactionType } from '../../constants';
|
|
2
2
|
import { WalletType } from '../..';
|
|
3
3
|
import { components, operations } from './autogen/apiV2.types';
|
|
4
4
|
export declare namespace API {
|
|
@@ -364,176 +364,65 @@ export declare namespace API {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
namespace Counterparties {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
367
|
+
type Counterparty = components['schemas']['CounterpartyAccountDto'];
|
|
368
|
+
namespace List {
|
|
369
|
+
type Request = {
|
|
370
|
+
wallet_id: string;
|
|
371
|
+
} & operations['CounterpartyAccountsController_findAll']['parameters']['query'];
|
|
372
|
+
type Response = operations['CounterpartyAccountsController_findAll']['responses']['200']['content']['application/json'];
|
|
373
|
+
}
|
|
374
|
+
namespace GetById {
|
|
375
|
+
type Request = operations['CounterpartyAccountsController_findOne']['parameters']['path'];
|
|
376
|
+
type Response = operations['CounterpartyAccountsController_findOne']['responses']['200']['content']['application/json'];
|
|
377
|
+
}
|
|
378
|
+
namespace Create {
|
|
379
|
+
type Request = {
|
|
380
|
+
wallet_id: string;
|
|
381
|
+
} & operations['CounterpartyAccountsController_create']['requestBody']['content']['application/json'];
|
|
382
|
+
type Response = operations['CounterpartyAccountsController_create']['responses']['200']['content']['application/json'];
|
|
383
|
+
}
|
|
384
|
+
namespace Update {
|
|
385
|
+
type Request = {
|
|
386
|
+
wallet_id: string;
|
|
387
|
+
counterparty_account_id: string;
|
|
388
|
+
} & operations['CounterpartyAccountsController_update']['requestBody']['content']['application/json'];
|
|
389
|
+
type Response = operations['CounterpartyAccountsController_update']['responses']['200']['content']['application/json'];
|
|
390
|
+
}
|
|
391
|
+
namespace Delete {
|
|
392
|
+
type Request = operations['CounterpartyAccountsController_delete']['parameters']['path'];
|
|
393
|
+
type Response = operations['CounterpartyAccountsController_delete']['responses']['200']['content']['application/json'];
|
|
375
394
|
}
|
|
376
395
|
namespace Destination {
|
|
377
396
|
namespace List {
|
|
378
|
-
|
|
379
|
-
id: string;
|
|
380
|
-
nickname: string;
|
|
381
|
-
type: CounterpartyDestinationType | string;
|
|
382
|
-
created_at: string;
|
|
383
|
-
}
|
|
384
|
-
interface DestinationListItemExternalBankingData {
|
|
385
|
-
account_number?: string;
|
|
386
|
-
routing_number?: string;
|
|
387
|
-
bank_name: string;
|
|
388
|
-
note: string;
|
|
389
|
-
swift_bic?: string;
|
|
390
|
-
address: {
|
|
391
|
-
city: string;
|
|
392
|
-
country_id: number;
|
|
393
|
-
state_id: number;
|
|
394
|
-
postcode: string;
|
|
395
|
-
street1: string;
|
|
396
|
-
street2?: string;
|
|
397
|
-
};
|
|
398
|
-
}
|
|
399
|
-
interface DestinationListItemExternalCryptoData {
|
|
400
|
-
address: string;
|
|
401
|
-
currency_id: string;
|
|
402
|
-
memo?: string;
|
|
403
|
-
}
|
|
404
|
-
interface DestinationListItemWithExternalBankingData extends DestinationListItemCommonFields {
|
|
405
|
-
type: CounterpartyDestinationType.DOMESTIC_WIRE | CounterpartyDestinationType.ACH | CounterpartyDestinationType.SWIFT | CounterpartyDestinationType.SEPA;
|
|
406
|
-
external_banking_data: DestinationListItemExternalBankingData;
|
|
407
|
-
external_crypto_data?: never;
|
|
408
|
-
}
|
|
409
|
-
interface DestinationListItemWithExternalCryptoData extends DestinationListItemCommonFields {
|
|
410
|
-
type: CounterpartyDestinationType.CRYPTO_EXTERNAL | CounterpartyDestinationType.CRYPTO_INTERNAL;
|
|
411
|
-
external_banking_data?: never;
|
|
412
|
-
external_crypto_data: DestinationListItemExternalCryptoData;
|
|
413
|
-
}
|
|
414
|
-
type CounterpartyDestinationListItem = DestinationListItemWithExternalBankingData | DestinationListItemWithExternalCryptoData;
|
|
415
|
-
interface Request {
|
|
397
|
+
type Request = {
|
|
416
398
|
wallet_id: string;
|
|
417
399
|
counterparty_account_id: string;
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
search?: string;
|
|
421
|
-
type?: CounterpartyDestinationType | string;
|
|
422
|
-
sort_by?: 'created_at' | 'nickname' | 'type';
|
|
423
|
-
sort_order?: SortingDirection;
|
|
424
|
-
filter?: {
|
|
425
|
-
type?: CounterpartyDestinationType;
|
|
426
|
-
nickname?: string;
|
|
427
|
-
created_at?: string;
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
type Response = {
|
|
431
|
-
total: number;
|
|
432
|
-
data: CounterpartyDestinationListItem[];
|
|
433
|
-
};
|
|
400
|
+
} & operations['CounterpartyDestinationsController_findAll']['parameters']['query'];
|
|
401
|
+
type Response = operations['CounterpartyDestinationsController_findAll']['responses']['200']['content']['application/json'];
|
|
434
402
|
}
|
|
435
403
|
namespace Detail {
|
|
436
|
-
type
|
|
437
|
-
|
|
438
|
-
address: API.Counterparties.Destination.List.DestinationListItemExternalBankingData['address'] & {
|
|
439
|
-
country?: API.Location.Countries.Country;
|
|
440
|
-
state?: API.Location.States.State;
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
interface DestinationDetailItemExternalCryptoData extends API.Counterparties.Destination.List.DestinationListItemExternalCryptoData {
|
|
444
|
-
currency: API.Currencies.Currency;
|
|
445
|
-
}
|
|
446
|
-
interface DestinationDetailItemWithExternalBankingData extends DestinationDetailItemCommonFields {
|
|
447
|
-
type: CounterpartyDestinationType.DOMESTIC_WIRE | CounterpartyDestinationType.ACH | CounterpartyDestinationType.SWIFT | CounterpartyDestinationType.SEPA;
|
|
448
|
-
external_banking_data: DestinationDetailItemExternalBankingData;
|
|
449
|
-
external_crypto_data?: never;
|
|
450
|
-
}
|
|
451
|
-
interface DestinationDetailItemWithExternalCryptoData extends DestinationDetailItemCommonFields {
|
|
452
|
-
type: CounterpartyDestinationType.CRYPTO_EXTERNAL | CounterpartyDestinationType.CRYPTO_INTERNAL;
|
|
453
|
-
external_banking_data?: never;
|
|
454
|
-
external_crypto_data: DestinationDetailItemExternalCryptoData;
|
|
455
|
-
}
|
|
456
|
-
type DestinationDetailItem = DestinationDetailItemWithExternalBankingData | DestinationDetailItemWithExternalCryptoData;
|
|
457
|
-
interface Request {
|
|
458
|
-
wallet_id: string;
|
|
459
|
-
counterparty_account_id: string;
|
|
460
|
-
counterparty_destination_id: string;
|
|
461
|
-
}
|
|
462
|
-
type Response = DestinationDetailItem;
|
|
404
|
+
type Request = operations['CounterpartyDestinationsController_findOne']['parameters']['path'];
|
|
405
|
+
type Response = operations['CounterpartyDestinationsController_findOne']['responses']['200']['content']['application/json'];
|
|
463
406
|
}
|
|
464
407
|
namespace Create {
|
|
465
|
-
|
|
466
|
-
account_number: string;
|
|
467
|
-
routing_number: string;
|
|
468
|
-
bank_name: string;
|
|
469
|
-
note: string;
|
|
470
|
-
swift_bic: string;
|
|
471
|
-
}
|
|
472
|
-
interface Request {
|
|
473
|
-
wallet_id: string;
|
|
474
|
-
counterparty_account_id: string;
|
|
475
|
-
type: CounterpartyDestinationType;
|
|
476
|
-
nickname: string;
|
|
477
|
-
external_banking_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalBankingData;
|
|
478
|
-
external_crypto_data?: Pick<API.Counterparties.Destination.Detail.DestinationDetailItemExternalCryptoData, 'currency_id' | 'address' | 'memo'>;
|
|
479
|
-
}
|
|
480
|
-
type Response = API.Counterparties.Destination.Detail.DestinationDetailItem;
|
|
481
|
-
}
|
|
482
|
-
namespace Delete {
|
|
483
|
-
interface Request {
|
|
408
|
+
type Request = {
|
|
484
409
|
wallet_id: string;
|
|
485
410
|
counterparty_account_id: string;
|
|
486
|
-
|
|
487
|
-
|
|
411
|
+
} & operations['CounterpartyDestinationsController_create']['requestBody']['content']['application/json'];
|
|
412
|
+
type Response = operations['CounterpartyDestinationsController_create']['responses']['200']['content']['application/json'];
|
|
488
413
|
}
|
|
489
414
|
namespace Update {
|
|
490
|
-
|
|
415
|
+
type Request = {
|
|
491
416
|
wallet_id: string;
|
|
492
417
|
counterparty_account_id: string;
|
|
493
418
|
counterparty_destination_id: string;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
type Response = API.Counterparties.Destination.Detail.DestinationDetailItemCommonFields;
|
|
419
|
+
} & operations['CounterpartyDestinationsController_update']['requestBody']['content']['application/json'];
|
|
420
|
+
type Response = operations['CounterpartyDestinationsController_update']['responses']['200']['content']['application/json'];
|
|
497
421
|
}
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
wallet_id: string;
|
|
502
|
-
counterparty_account_id: string;
|
|
503
|
-
}
|
|
504
|
-
type Response = Counterparty;
|
|
505
|
-
}
|
|
506
|
-
namespace List {
|
|
507
|
-
interface Request {
|
|
508
|
-
wallet_id: string;
|
|
509
|
-
offset?: number;
|
|
510
|
-
limit?: number;
|
|
511
|
-
sort_by?: 'created_at' | 'nickname' | 'type' | 'email' | 'phone';
|
|
512
|
-
sort_order?: SortingDirection;
|
|
513
|
-
filter?: {
|
|
514
|
-
type?: CounterpartyDestinationType;
|
|
515
|
-
nickname?: string;
|
|
516
|
-
created_at?: string;
|
|
517
|
-
search?: string;
|
|
518
|
-
};
|
|
422
|
+
namespace Delete {
|
|
423
|
+
type Request = operations['CounterpartyDestinationsController_delete']['parameters']['path'];
|
|
424
|
+
type Response = operations['CounterpartyDestinationsController_delete']['responses']['200']['content']['application/json'];
|
|
519
425
|
}
|
|
520
|
-
type Response = {
|
|
521
|
-
total: number;
|
|
522
|
-
data: Counterparty[];
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
namespace Create {
|
|
526
|
-
type Request = Omit<Counterparty, 'id' | 'created_at'> & {
|
|
527
|
-
wallet_id: string;
|
|
528
|
-
};
|
|
529
|
-
type Response = Counterparty;
|
|
530
|
-
}
|
|
531
|
-
namespace Update {
|
|
532
|
-
type Request = Partial<Omit<Counterparty, 'id' | 'created_at'>> & {
|
|
533
|
-
wallet_id: string;
|
|
534
|
-
counterparty_account_id: string;
|
|
535
|
-
};
|
|
536
|
-
type Response = Counterparty;
|
|
537
426
|
}
|
|
538
427
|
}
|
|
539
428
|
namespace Currencies {
|