squarefi-bff-api-module 1.36.76 → 1.36.78
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/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/rfi.d.ts +11 -0
- package/dist/api/rfi.js +26 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +1 -119
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +786 -149
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +1550 -6071
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +1 -107
- package/dist/api/types/types.d.ts +83 -2
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { list } from './list';
|
|
|
10
10
|
import { massPayouts } from './mass-payouts';
|
|
11
11
|
import { orders } from './orders';
|
|
12
12
|
import { referrals } from './referrals';
|
|
13
|
+
import { rfi } from './rfi';
|
|
13
14
|
import { statements } from './statements';
|
|
14
15
|
import { storage } from './storage';
|
|
15
16
|
import { tenants } from './tenants';
|
|
@@ -30,6 +31,7 @@ type Api = {
|
|
|
30
31
|
massPayouts: typeof massPayouts;
|
|
31
32
|
orders: typeof orders;
|
|
32
33
|
referrals: typeof referrals;
|
|
34
|
+
rfi: typeof rfi;
|
|
33
35
|
statements: typeof statements;
|
|
34
36
|
storage: typeof storage;
|
|
35
37
|
tenants: typeof tenants;
|
package/dist/api/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { list } from './list';
|
|
|
10
10
|
import { massPayouts } from './mass-payouts';
|
|
11
11
|
import { orders } from './orders';
|
|
12
12
|
import { referrals } from './referrals';
|
|
13
|
+
import { rfi } from './rfi';
|
|
13
14
|
import { statements } from './statements';
|
|
14
15
|
import { storage } from './storage';
|
|
15
16
|
import { tenants } from './tenants';
|
|
@@ -30,6 +31,7 @@ export const squarefi_bff_api_client = {
|
|
|
30
31
|
massPayouts,
|
|
31
32
|
orders,
|
|
32
33
|
referrals,
|
|
34
|
+
rfi,
|
|
33
35
|
statements,
|
|
34
36
|
storage,
|
|
35
37
|
tenants,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { API } from './types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Requests for information from compliance (SFI-2280), scoped by `wallet_id`. The client can only
|
|
4
|
+
* read and answer them: the spec declares no method to close, edit or delete one.
|
|
5
|
+
*/
|
|
6
|
+
export declare const rfi: {
|
|
7
|
+
list: ({ wallet_id, ...params }: API.Rfi.List.Request) => Promise<API.Rfi.List.Response>;
|
|
8
|
+
getById: ({ wallet_id, case_id }: API.Rfi.GetById.Request) => Promise<API.Rfi.GetById.Response>;
|
|
9
|
+
reply: ({ wallet_id, case_id, body, files, signal, timeout, }: API.Rfi.Reply.Request) => Promise<API.Rfi.Reply.Response>;
|
|
10
|
+
getAttachmentLink: ({ wallet_id, case_id, attachment_id, }: API.Rfi.GetAttachmentLink.Request) => Promise<API.Rfi.GetAttachmentLink.Response>;
|
|
11
|
+
};
|
package/dist/api/rfi.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
2
|
+
/**
|
|
3
|
+
* Requests for information from compliance (SFI-2280), scoped by `wallet_id`. The client can only
|
|
4
|
+
* read and answer them: the spec declares no method to close, edit or delete one.
|
|
5
|
+
*/
|
|
6
|
+
export const rfi = {
|
|
7
|
+
list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}`, { params }),
|
|
8
|
+
getById: ({ wallet_id, case_id }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}/${case_id}`),
|
|
9
|
+
// Each file is its own part named `files` (repeated, not `files[]`) — the form verified live.
|
|
10
|
+
// Content-Type is left to the browser, which adds the multipart boundary. A reply carries up to
|
|
11
|
+
// 10 files of 20 MB, which the client's 60 s default timeout may not cover: pass `timeout`.
|
|
12
|
+
reply: ({ wallet_id, case_id, body, files, signal, timeout, }) => {
|
|
13
|
+
const formData = new FormData();
|
|
14
|
+
if (body)
|
|
15
|
+
formData.append('body', body);
|
|
16
|
+
files?.forEach((file) => formData.append('files', file));
|
|
17
|
+
return apiClientV1Frontend.postRequest(`/frontend/rfi/${wallet_id}/${case_id}/messages`, {
|
|
18
|
+
data: formData,
|
|
19
|
+
signal,
|
|
20
|
+
timeout,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
// The signed link lives `expires_in` seconds (about 120): open it right away and request a new
|
|
24
|
+
// one for every download instead of storing it.
|
|
25
|
+
getAttachmentLink: ({ wallet_id, case_id, attachment_id, }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}/${case_id}/attachments/${attachment_id}`),
|
|
26
|
+
};
|
|
@@ -784,125 +784,7 @@ export interface paths {
|
|
|
784
784
|
};
|
|
785
785
|
};
|
|
786
786
|
put?: never;
|
|
787
|
-
|
|
788
|
-
post: {
|
|
789
|
-
parameters: {
|
|
790
|
-
query?: never;
|
|
791
|
-
header?: never;
|
|
792
|
-
path?: never;
|
|
793
|
-
cookie?: never;
|
|
794
|
-
};
|
|
795
|
-
requestBody: {
|
|
796
|
-
content: {
|
|
797
|
-
"application/json": {
|
|
798
|
-
/**
|
|
799
|
-
* Format: uuid
|
|
800
|
-
* @description Parent counterparty account ID
|
|
801
|
-
*/
|
|
802
|
-
counterparty_account_id: string;
|
|
803
|
-
/**
|
|
804
|
-
* @description Payment rail type
|
|
805
|
-
* @enum {string}
|
|
806
|
-
*/
|
|
807
|
-
type: "ACH" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
|
|
808
|
-
/** @description User-friendly alias for this destination */
|
|
809
|
-
nickname?: string;
|
|
810
|
-
/** @description Required for banking types (ACH, SWIFT, SEPA, CHAPS, FPS, FEDWIRE) */
|
|
811
|
-
banking_data?: {
|
|
812
|
-
/** @description Bank account number */
|
|
813
|
-
account_number?: string;
|
|
814
|
-
/** @description Routing/sort code */
|
|
815
|
-
routing_number?: string;
|
|
816
|
-
/** @description Bank name */
|
|
817
|
-
bank_name?: string;
|
|
818
|
-
/** @description SWIFT/BIC code */
|
|
819
|
-
swift_bic?: string;
|
|
820
|
-
/** @description IBAN */
|
|
821
|
-
iban?: string;
|
|
822
|
-
/** @description Sort code (6 digits, UK banking) */
|
|
823
|
-
sort_code?: string;
|
|
824
|
-
/** @description Additional notes/reference */
|
|
825
|
-
note?: string;
|
|
826
|
-
/** @description Bank/beneficiary postal address */
|
|
827
|
-
address?: {
|
|
828
|
-
country_id?: number;
|
|
829
|
-
city?: string;
|
|
830
|
-
postcode?: string;
|
|
831
|
-
street1?: string;
|
|
832
|
-
street2?: string;
|
|
833
|
-
/** @description Required when the selected country has states; countries without states may omit it */
|
|
834
|
-
state_id?: number | null;
|
|
835
|
-
};
|
|
836
|
-
};
|
|
837
|
-
/** @description Required for crypto types (CRYPTO_EXTERNAL, CRYPTO_INTERNAL) */
|
|
838
|
-
crypto_data?: {
|
|
839
|
-
/** @description Blockchain address */
|
|
840
|
-
address?: string;
|
|
841
|
-
/**
|
|
842
|
-
* Format: uuid
|
|
843
|
-
* @description Currency UUID
|
|
844
|
-
*/
|
|
845
|
-
currency_id?: string;
|
|
846
|
-
/** @description Memo/tag (for XRP, XLM, etc.) */
|
|
847
|
-
memo?: string;
|
|
848
|
-
/**
|
|
849
|
-
* @description Hosting classification of the address (custodial VASP, self-hosted/unhosted, or unknown)
|
|
850
|
-
* @default unknown
|
|
851
|
-
* @enum {string}
|
|
852
|
-
*/
|
|
853
|
-
wallet_custody_type?: "custodial" | "selfhosted" | "unknown";
|
|
854
|
-
};
|
|
855
|
-
/** @description Required for type INTERNAL — points at the receiver wallet on the same platform. */
|
|
856
|
-
internal_data?: {
|
|
857
|
-
/**
|
|
858
|
-
* Format: uuid
|
|
859
|
-
* @description Target (receiver) wallet uuid on the same platform.
|
|
860
|
-
*/
|
|
861
|
-
wallet_id: string;
|
|
862
|
-
/** @description Optional, reserved for future use. */
|
|
863
|
-
description?: string;
|
|
864
|
-
};
|
|
865
|
-
};
|
|
866
|
-
};
|
|
867
|
-
};
|
|
868
|
-
responses: {
|
|
869
|
-
/** @description Destination created */
|
|
870
|
-
201: {
|
|
871
|
-
headers: {
|
|
872
|
-
[name: string]: unknown;
|
|
873
|
-
};
|
|
874
|
-
content: {
|
|
875
|
-
"application/json": {
|
|
876
|
-
/** @example true */
|
|
877
|
-
success?: boolean;
|
|
878
|
-
data?: {
|
|
879
|
-
destination?: components["schemas"]["CounterpartyDestination"];
|
|
880
|
-
/** @example Destination created successfully */
|
|
881
|
-
message?: string;
|
|
882
|
-
};
|
|
883
|
-
};
|
|
884
|
-
};
|
|
885
|
-
};
|
|
886
|
-
/** @description Validation error */
|
|
887
|
-
400: {
|
|
888
|
-
headers: {
|
|
889
|
-
[name: string]: unknown;
|
|
890
|
-
};
|
|
891
|
-
content: {
|
|
892
|
-
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
893
|
-
};
|
|
894
|
-
};
|
|
895
|
-
/** @description Account not found */
|
|
896
|
-
404: {
|
|
897
|
-
headers: {
|
|
898
|
-
[name: string]: unknown;
|
|
899
|
-
};
|
|
900
|
-
content: {
|
|
901
|
-
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
902
|
-
};
|
|
903
|
-
};
|
|
904
|
-
};
|
|
905
|
-
};
|
|
787
|
+
post?: never;
|
|
906
788
|
delete?: never;
|
|
907
789
|
options?: never;
|
|
908
790
|
head?: never;
|