squarefi-bff-api-module 1.36.108 → 1.36.110

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.
@@ -105,6 +105,15 @@ export declare const frontend: {
105
105
  };
106
106
  };
107
107
  };
108
+ aml: {
109
+ quote: ({ wallet_id, ...params }: API.Frontend.Aml.Quote.Request) => Promise<API.Frontend.Aml.Quote.Response>;
110
+ screenings: {
111
+ create: ({ wallet_id, idempotency_key, ...data }: API.Frontend.Aml.Screenings.Create.Request) => Promise<API.Frontend.Aml.Screenings.Create.Response>;
112
+ list: ({ wallet_id, ...params }: API.Frontend.Aml.Screenings.List.Request) => Promise<API.Frontend.Aml.Screenings.List.Response>;
113
+ getById: ({ wallet_id, id, }: API.Frontend.Aml.Screenings.GetById.Request) => Promise<API.Frontend.Aml.Screenings.GetById.Response>;
114
+ report: ({ wallet_id, id, }: API.Frontend.Aml.Screenings.Report.Request) => Promise<API.Frontend.Aml.Screenings.Report.Response>;
115
+ };
116
+ };
108
117
  reference: {
109
118
  exchangeRates: {
110
119
  list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
@@ -115,6 +124,12 @@ export declare const frontend: {
115
124
  orderTypes: {
116
125
  list: (params?: API.Frontend.Reference.OrderTypes.List.Request) => Promise<API.Frontend.Reference.OrderTypes.List.Response>;
117
126
  };
127
+ currencies: {
128
+ list: (params?: API.Frontend.Reference.Currencies.List.Request) => Promise<API.Frontend.Reference.Currencies.List.Response>;
129
+ };
130
+ chains: {
131
+ list: (params?: API.Frontend.Reference.Chains.List.Request) => Promise<API.Frontend.Reference.Chains.List.Response>;
132
+ };
118
133
  };
119
134
  notificationPreferences: {
120
135
  get: () => Promise<API.Frontend.NotificationPreferences.Get.Response>;
@@ -228,6 +228,21 @@ export const frontend = {
228
228
  },
229
229
  },
230
230
  },
231
+ // AML screening of crypto addresses. `quote` charges nothing; `screenings.create` charges the fee (an `AML_CHECK`
232
+ // order) and answers `PENDING` — wait for the realtime `WALLET_AML_SCREENINGS` hint, then `getById`, do not poll.
233
+ aml: {
234
+ quote: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/aml/${wallet_id}/quote`, { params }),
235
+ screenings: {
236
+ create: ({ wallet_id, idempotency_key, ...data }) => apiClientV1Frontend.postRequest(`/frontend/aml/${wallet_id}/screenings`, {
237
+ data,
238
+ headers: idempotency_key ? { 'Idempotency-Key': idempotency_key } : undefined,
239
+ }),
240
+ list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/aml/${wallet_id}/screenings`, { params }),
241
+ getById: ({ wallet_id, id, }) => apiClientV1Frontend.getRequest(`/frontend/aml/${wallet_id}/screenings/${id}`),
242
+ // With `responseType: 'blob'` an error body (JSON) arrives as a Blob too.
243
+ report: ({ wallet_id, id, }) => apiClientV1Frontend.getRequest(`/frontend/aml/${wallet_id}/screenings/${id}/report`, { responseType: 'blob' }),
244
+ },
245
+ },
231
246
  reference: {
232
247
  // Frontend twin of `exchange.byOrderType.*` (legacy `GET /exchange/`): the same tenant pairs, but paged in
233
248
  // memory — 50 per page by default, 500 at most, in no particular order — and behind the bearer session.
@@ -247,6 +262,18 @@ export const frontend = {
247
262
  orderTypes: {
248
263
  list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/order_types', { params }),
249
264
  },
265
+ // `aml_supported`: the tenant's AML provider can screen addresses on the token's network; always `false` while
266
+ // screening is off for the tenant. The backend pages it (50 by default), so the whole list is asked for by default.
267
+ currencies: {
268
+ list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/currencies', { params: { limit: 500, ...params } }),
269
+ },
270
+ // `aml_supported`: the tenant's AML provider can screen addresses on the network; always `false` while screening
271
+ // is off for the tenant. Paged like `currencies`, so the whole list is asked for by default.
272
+ chains: {
273
+ list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/chains', {
274
+ params: { limit: 500, ...params },
275
+ }),
276
+ },
250
277
  },
251
278
  // IN_APP stays on (400 INBOX_CHANNEL_LOCKED); channels vary by tenant (TELEGRAM needs a bot); PUT upserts any subset.
252
279
  notificationPreferences: {
@@ -1031,6 +1031,48 @@ export declare namespace API {
1031
1031
  }
1032
1032
  export {};
1033
1033
  }
1034
+ namespace Aml {
1035
+ type QuoteRoot = pathsV1Frontend['/frontend/aml/{wallet_id}/quote'];
1036
+ type ScreeningsRoot = pathsV1Frontend['/frontend/aml/{wallet_id}/screenings'];
1037
+ type ScreeningRoot = pathsV1Frontend['/frontend/aml/{wallet_id}/screenings/{id}'];
1038
+ type ReportRoot = pathsV1Frontend['/frontend/aml/{wallet_id}/screenings/{id}/report'];
1039
+ type Schemas = componentsV1Frontend['schemas'];
1040
+ export type Screening = Schemas['AmlScreening'];
1041
+ export type Quote = Schemas['AmlScreeningQuote'];
1042
+ export type Result = Schemas['AmlScreeningResult'];
1043
+ export type CheckedCategory = Schemas['AmlCheckedCategory'];
1044
+ export type Asset = Schemas['AmlScreeningAsset'];
1045
+ export type Provider = Schemas['AmlProvider'];
1046
+ export namespace Quote {
1047
+ type Request = QuoteRoot['get']['parameters']['path'] & QuoteRoot['get']['parameters']['query'];
1048
+ type Response = QuoteRoot['get']['responses'][200]['content']['application/json'];
1049
+ }
1050
+ export namespace Screenings {
1051
+ namespace Create {
1052
+ type Request = ScreeningsRoot['post']['parameters']['path'] & ScreeningsRoot['post']['requestBody']['content']['application/json'] & {
1053
+ /**
1054
+ * Sent as the `Idempotency-Key` header, 8–128 characters: a retry with the same key returns the
1055
+ * screening the first call created instead of charging again.
1056
+ */
1057
+ idempotency_key?: NonNullable<ScreeningsRoot['post']['parameters']['header']>['Idempotency-Key'];
1058
+ };
1059
+ type Response = ScreeningsRoot['post']['responses'][201]['content']['application/json'];
1060
+ }
1061
+ namespace List {
1062
+ type Request = ScreeningsRoot['get']['parameters']['path'] & NonNullable<ScreeningsRoot['get']['parameters']['query']>;
1063
+ type Response = ScreeningsRoot['get']['responses'][200]['content']['application/json'];
1064
+ }
1065
+ namespace GetById {
1066
+ type Request = ScreeningRoot['get']['parameters']['path'];
1067
+ type Response = ScreeningRoot['get']['responses'][200]['content']['application/json'];
1068
+ }
1069
+ namespace Report {
1070
+ type Request = ReportRoot['get']['parameters']['path'];
1071
+ type Response = Blob;
1072
+ }
1073
+ }
1074
+ export {};
1075
+ }
1034
1076
  namespace Reference {
1035
1077
  namespace ExchangeRates {
1036
1078
  type ExchangeRatesRoot = pathsV1Frontend['/frontend/reference/exchange_rates'];
@@ -1061,6 +1103,24 @@ export declare namespace API {
1061
1103
  }
1062
1104
  export {};
1063
1105
  }
1106
+ namespace Currencies {
1107
+ type CurrenciesRoot = pathsV1Frontend['/frontend/reference/currencies'];
1108
+ export type Currency = componentsV1Frontend['schemas']['ReferenceCurrency'];
1109
+ export namespace List {
1110
+ type Request = NonNullable<CurrenciesRoot['get']['parameters']['query']>;
1111
+ type Response = CurrenciesRoot['get']['responses'][200]['content']['application/json'];
1112
+ }
1113
+ export {};
1114
+ }
1115
+ namespace Chains {
1116
+ type ChainsRoot = pathsV1Frontend['/frontend/reference/chains'];
1117
+ export type Chain = componentsV1Frontend['schemas']['ReferenceChain'];
1118
+ export namespace List {
1119
+ type Request = NonNullable<ChainsRoot['get']['parameters']['query']>;
1120
+ type Response = ChainsRoot['get']['responses'][200]['content']['application/json'];
1121
+ }
1122
+ export {};
1123
+ }
1064
1124
  }
1065
1125
  namespace NotificationPreferences {
1066
1126
  type NotificationPreferencesRoot = pathsV1Frontend['/frontend/notification-preferences'];
@@ -1,4 +1,8 @@
1
1
  import { API } from '.';
2
+ import type { components as componentsV1External } from './api/types/autogen/apiV1External.types';
3
+ import type { components as componentsV1Frontend } from './api/types/autogen/apiV1Frontend.types';
4
+ import type { components as componentsV1Legacy } from './api/types/autogen/apiV1Legacy.types';
5
+ import type { components as componentsV1Tenant } from './api/types/autogen/apiV1Tenant.types';
2
6
  import { EnumValues, IsEnumEqualToUnion, EnumUnionMismatch, IsUnionSubset, UnionSubsetMismatch } from './utils/types';
3
7
  export type ValueWithLabel = {
4
8
  value: string;
@@ -131,6 +135,7 @@ export declare enum OrderType {
131
135
  BRL_ACH_ONRAMP = "BRL_ACH_ONRAMP",
132
136
  BRL_WIRE_OFFRAMP = "BRL_WIRE_OFFRAMP",
133
137
  BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP",
138
+ BRL_FEDNOW_ONRAMP = "BRL_FEDNOW_ONRAMP",
134
139
  BRL_RTP_OFFRAMP = "BRL_RTP_OFFRAMP",
135
140
  DLS_WIRE_ONRAMP = "DLS_WIRE_ONRAMP",
136
141
  DLS_WIRE_OFFRAMP = "DLS_WIRE_OFFRAMP",
@@ -146,6 +151,8 @@ export declare enum OrderType {
146
151
  BC1_SWIFT_OFFRAMP = "BC1_SWIFT_OFFRAMP",
147
152
  BC3_SEPA_ONRAMP = "BC3_SEPA_ONRAMP",
148
153
  BC3_SEPA_OFFRAMP = "BC3_SEPA_OFFRAMP",
154
+ BC3_SWIFT_ONRAMP = "BC3_SWIFT_ONRAMP",
155
+ BC3_SWIFT_OFFRAMP = "BC3_SWIFT_OFFRAMP",
149
156
  NARVI_SEPA_ONRAMP = "NARVI_SEPA_ONRAMP",
150
157
  NARVI_SEPA_OFFRAMP = "NARVI_SEPA_OFFRAMP",
151
158
  RPP_SWIFT_OFFRAMP = "RPP_SWIFT_OFFRAMP",
@@ -159,7 +166,10 @@ export declare enum OrderType {
159
166
  CARD_AUTH_REFUND = "CARD_AUTH_REFUND",
160
167
  REFUND_CARD_PREPAID = "REFUND_CARD_PREPAID",
161
168
  REFUND_CARD_SUBACCOUNT = "REFUND_CARD_SUBACCOUNT",
162
- ADJUSTMENT = "ADJUSTMENT"
169
+ ADJUSTMENT = "ADJUSTMENT",
170
+ MONTHLY_FEE = "MONTHLY_FEE",
171
+ REFERRAL_PAYOUT = "REFERRAL_PAYOUT",
172
+ AML_CHECK = "AML_CHECK"
163
173
  }
164
174
  export declare enum WalletTransactionRecordType {
165
175
  CARD_PROVIDER_DEPOSIT = "CARD_PROVIDER_DEPOSIT",
@@ -247,6 +257,7 @@ export declare enum WalletTransactionRecordType {
247
257
  BRL_ACH_ONRAMP = "BRL_ACH_ONRAMP",
248
258
  BRL_WIRE_OFFRAMP = "BRL_WIRE_OFFRAMP",
249
259
  BRL_WIRE_ONRAMP = "BRL_WIRE_ONRAMP",
260
+ BRL_FEDNOW_ONRAMP = "BRL_FEDNOW_ONRAMP",
250
261
  BRL_RTP_OFFRAMP = "BRL_RTP_OFFRAMP",
251
262
  DLS_WIRE_ONRAMP = "DLS_WIRE_ONRAMP",
252
263
  DLS_WIRE_OFFRAMP = "DLS_WIRE_OFFRAMP",
@@ -262,6 +273,8 @@ export declare enum WalletTransactionRecordType {
262
273
  BC1_SWIFT_OFFRAMP = "BC1_SWIFT_OFFRAMP",
263
274
  BC3_SEPA_ONRAMP = "BC3_SEPA_ONRAMP",
264
275
  BC3_SEPA_OFFRAMP = "BC3_SEPA_OFFRAMP",
276
+ BC3_SWIFT_ONRAMP = "BC3_SWIFT_ONRAMP",
277
+ BC3_SWIFT_OFFRAMP = "BC3_SWIFT_OFFRAMP",
265
278
  NARVI_SEPA_ONRAMP = "NARVI_SEPA_ONRAMP",
266
279
  NARVI_SEPA_OFFRAMP = "NARVI_SEPA_OFFRAMP",
267
280
  RPP_SWIFT_OFFRAMP = "RPP_SWIFT_OFFRAMP",
@@ -275,11 +288,17 @@ export declare enum WalletTransactionRecordType {
275
288
  CARD_AUTH_REFUND = "CARD_AUTH_REFUND",
276
289
  REFUND_CARD_PREPAID = "REFUND_CARD_PREPAID",
277
290
  REFUND_CARD_SUBACCOUNT = "REFUND_CARD_SUBACCOUNT",
278
- ADJUSTMENT = "ADJUSTMENT"
291
+ ADJUSTMENT = "ADJUSTMENT",
292
+ MONTHLY_FEE = "MONTHLY_FEE",
293
+ REFERRAL_PAYOUT = "REFERRAL_PAYOUT"
279
294
  }
280
295
  export type OrderTypeMissingInWalletTransactionRecordType = Exclude<EnumValues<OrderType>, EnumValues<WalletTransactionRecordType>>;
281
- export declare const orderTypeIncludedInWalletTransactionRecordTypeCheck: IsUnionSubset<EnumValues<OrderType>, EnumValues<WalletTransactionRecordType>>;
282
- export type OrderTypeIncludedInWalletTransactionRecordTypeMismatch = UnionSubsetMismatch<EnumValues<OrderType>, EnumValues<WalletTransactionRecordType>>;
296
+ type OrderTypeWithoutRecordType = EnumValues<OrderType.AML_CHECK>;
297
+ export declare const orderTypeIncludedInWalletTransactionRecordTypeCheck: IsUnionSubset<Exclude<EnumValues<OrderType>, OrderTypeWithoutRecordType>, EnumValues<WalletTransactionRecordType>>;
298
+ export type OrderTypeIncludedInWalletTransactionRecordTypeMismatch = UnionSubsetMismatch<Exclude<EnumValues<OrderType>, OrderTypeWithoutRecordType>, EnumValues<WalletTransactionRecordType>>;
299
+ type BackendOrderTypeId = componentsV1Frontend['schemas']['OrderTypeId'] | componentsV1Tenant['schemas']['OrderTypeId'] | componentsV1External['schemas']['OrderTypeId'] | componentsV1Legacy['schemas']['OrderTypeId'];
300
+ export declare const backendOrderTypeIdIncludedInOrderTypeCheck: IsUnionSubset<BackendOrderTypeId, EnumValues<OrderType>>;
301
+ export type BackendOrderTypeIdIncludedInOrderTypeMismatch = UnionSubsetMismatch<BackendOrderTypeId, EnumValues<OrderType>>;
283
302
  export declare enum RequestStatus {
284
303
  NONE = "none",
285
304
  PENDING = "pending",
package/dist/constants.js CHANGED
@@ -132,6 +132,7 @@ export var OrderType;
132
132
  OrderType["BRL_ACH_ONRAMP"] = "BRL_ACH_ONRAMP";
133
133
  OrderType["BRL_WIRE_OFFRAMP"] = "BRL_WIRE_OFFRAMP";
134
134
  OrderType["BRL_WIRE_ONRAMP"] = "BRL_WIRE_ONRAMP";
135
+ OrderType["BRL_FEDNOW_ONRAMP"] = "BRL_FEDNOW_ONRAMP";
135
136
  OrderType["BRL_RTP_OFFRAMP"] = "BRL_RTP_OFFRAMP";
136
137
  OrderType["DLS_WIRE_ONRAMP"] = "DLS_WIRE_ONRAMP";
137
138
  OrderType["DLS_WIRE_OFFRAMP"] = "DLS_WIRE_OFFRAMP";
@@ -147,6 +148,8 @@ export var OrderType;
147
148
  OrderType["BC1_SWIFT_OFFRAMP"] = "BC1_SWIFT_OFFRAMP";
148
149
  OrderType["BC3_SEPA_ONRAMP"] = "BC3_SEPA_ONRAMP";
149
150
  OrderType["BC3_SEPA_OFFRAMP"] = "BC3_SEPA_OFFRAMP";
151
+ OrderType["BC3_SWIFT_ONRAMP"] = "BC3_SWIFT_ONRAMP";
152
+ OrderType["BC3_SWIFT_OFFRAMP"] = "BC3_SWIFT_OFFRAMP";
150
153
  OrderType["NARVI_SEPA_ONRAMP"] = "NARVI_SEPA_ONRAMP";
151
154
  OrderType["NARVI_SEPA_OFFRAMP"] = "NARVI_SEPA_OFFRAMP";
152
155
  OrderType["RPP_SWIFT_OFFRAMP"] = "RPP_SWIFT_OFFRAMP";
@@ -161,6 +164,10 @@ export var OrderType;
161
164
  OrderType["REFUND_CARD_PREPAID"] = "REFUND_CARD_PREPAID";
162
165
  OrderType["REFUND_CARD_SUBACCOUNT"] = "REFUND_CARD_SUBACCOUNT";
163
166
  OrderType["ADJUSTMENT"] = "ADJUSTMENT";
167
+ OrderType["MONTHLY_FEE"] = "MONTHLY_FEE";
168
+ OrderType["REFERRAL_PAYOUT"] = "REFERRAL_PAYOUT";
169
+ // Not in WalletTransactionRecordType, see OrderTypeWithoutRecordType.
170
+ OrderType["AML_CHECK"] = "AML_CHECK";
164
171
  // when extend do not forget to add new order type to the enum WalletTransactionRecordType
165
172
  })(OrderType || (OrderType = {}));
166
173
  export var WalletTransactionRecordType;
@@ -250,6 +257,7 @@ export var WalletTransactionRecordType;
250
257
  WalletTransactionRecordType["BRL_ACH_ONRAMP"] = "BRL_ACH_ONRAMP";
251
258
  WalletTransactionRecordType["BRL_WIRE_OFFRAMP"] = "BRL_WIRE_OFFRAMP";
252
259
  WalletTransactionRecordType["BRL_WIRE_ONRAMP"] = "BRL_WIRE_ONRAMP";
260
+ WalletTransactionRecordType["BRL_FEDNOW_ONRAMP"] = "BRL_FEDNOW_ONRAMP";
253
261
  WalletTransactionRecordType["BRL_RTP_OFFRAMP"] = "BRL_RTP_OFFRAMP";
254
262
  WalletTransactionRecordType["DLS_WIRE_ONRAMP"] = "DLS_WIRE_ONRAMP";
255
263
  WalletTransactionRecordType["DLS_WIRE_OFFRAMP"] = "DLS_WIRE_OFFRAMP";
@@ -265,6 +273,8 @@ export var WalletTransactionRecordType;
265
273
  WalletTransactionRecordType["BC1_SWIFT_OFFRAMP"] = "BC1_SWIFT_OFFRAMP";
266
274
  WalletTransactionRecordType["BC3_SEPA_ONRAMP"] = "BC3_SEPA_ONRAMP";
267
275
  WalletTransactionRecordType["BC3_SEPA_OFFRAMP"] = "BC3_SEPA_OFFRAMP";
276
+ WalletTransactionRecordType["BC3_SWIFT_ONRAMP"] = "BC3_SWIFT_ONRAMP";
277
+ WalletTransactionRecordType["BC3_SWIFT_OFFRAMP"] = "BC3_SWIFT_OFFRAMP";
268
278
  WalletTransactionRecordType["NARVI_SEPA_ONRAMP"] = "NARVI_SEPA_ONRAMP";
269
279
  WalletTransactionRecordType["NARVI_SEPA_OFFRAMP"] = "NARVI_SEPA_OFFRAMP";
270
280
  WalletTransactionRecordType["RPP_SWIFT_OFFRAMP"] = "RPP_SWIFT_OFFRAMP";
@@ -279,8 +289,11 @@ export var WalletTransactionRecordType;
279
289
  WalletTransactionRecordType["REFUND_CARD_PREPAID"] = "REFUND_CARD_PREPAID";
280
290
  WalletTransactionRecordType["REFUND_CARD_SUBACCOUNT"] = "REFUND_CARD_SUBACCOUNT";
281
291
  WalletTransactionRecordType["ADJUSTMENT"] = "ADJUSTMENT";
292
+ WalletTransactionRecordType["MONTHLY_FEE"] = "MONTHLY_FEE";
293
+ WalletTransactionRecordType["REFERRAL_PAYOUT"] = "REFERRAL_PAYOUT";
282
294
  })(WalletTransactionRecordType || (WalletTransactionRecordType = {}));
283
295
  export const orderTypeIncludedInWalletTransactionRecordTypeCheck = true;
296
+ export const backendOrderTypeIdIncludedInOrderTypeCheck = true;
284
297
  export var RequestStatus;
285
298
  (function (RequestStatus) {
286
299
  RequestStatus["NONE"] = "none";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.108",
3
+ "version": "1.36.110",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",