squarefi-bff-api-module 1.36.67 → 1.36.68

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.
@@ -62,4 +62,9 @@ export declare const frontend: {
62
62
  };
63
63
  };
64
64
  };
65
+ reference: {
66
+ exchangeRates: {
67
+ list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
68
+ };
69
+ };
65
70
  };
@@ -131,4 +131,11 @@ export const frontend = {
131
131
  },
132
132
  },
133
133
  },
134
+ reference: {
135
+ // Frontend twin of `exchange.byOrderType.*` (legacy `GET /exchange/`): the same tenant pairs, but paged in
136
+ // memory — 50 per page by default, 500 at most, in no particular order — and behind the bearer session.
137
+ exchangeRates: {
138
+ list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/exchange_rates', { params }),
139
+ },
140
+ },
134
141
  };
@@ -8267,7 +8267,7 @@ export interface components {
8267
8267
  /** Format: uuid */
8268
8268
  transaction_amount_currency?: string | null;
8269
8269
  billing_amount?: number | null;
8270
- /** Format: uuid */
8270
+ /** @description Currency of `billing_amount`. Not uniform across rails: a currency uuid on most orders, an ISO code (e.g. `EUR`) on L2F off-ramps, the destination currency uuid on BC/DLS on-ramps. Use the order's `from_uuid` for the debited currency. */
8271
8271
  billing_amount_currency?: string | null;
8272
8272
  fee?: number | null;
8273
8273
  /** Format: uuid */
@@ -8286,6 +8286,11 @@ export interface components {
8286
8286
  from_currency_id?: string | null;
8287
8287
  /** Format: uuid */
8288
8288
  to_currency_id?: string | null;
8289
+ /**
8290
+ * @description Leg side of an internal transfer: 'out' on the sender's order, 'in' on the receiver's. Card authorizations carry 'out', their refunds 'in'.
8291
+ * @enum {string|null}
8292
+ */
8293
+ direction?: "in" | "out" | null;
8289
8294
  /** Format: uuid */
8290
8295
  counterparty_account_id?: string | null;
8291
8296
  counterparty_account_name?: string | null;
@@ -9374,12 +9374,18 @@ export interface paths {
9374
9374
  };
9375
9375
  requestBody?: never;
9376
9376
  responses: {
9377
- /** @description List of available order types */
9377
+ /** @description The whole order-type catalogue, each with the tenant markup */
9378
9378
  200: {
9379
9379
  headers: {
9380
9380
  [name: string]: unknown;
9381
9381
  };
9382
- content?: never;
9382
+ content: {
9383
+ "application/json": {
9384
+ /** @example true */
9385
+ success: boolean;
9386
+ data: components["schemas"]["OrderTypeInfo"][];
9387
+ };
9388
+ };
9383
9389
  };
9384
9390
  };
9385
9391
  };
@@ -9421,14 +9427,22 @@ export interface paths {
9421
9427
  headers: {
9422
9428
  [name: string]: unknown;
9423
9429
  };
9424
- content?: never;
9430
+ content: {
9431
+ "application/json": {
9432
+ /** @example true */
9433
+ success: boolean;
9434
+ data: components["schemas"]["OrderTypeInfo"];
9435
+ };
9436
+ };
9425
9437
  };
9426
9438
  /** @description Order type not found */
9427
9439
  404: {
9428
9440
  headers: {
9429
9441
  [name: string]: unknown;
9430
9442
  };
9431
- content?: never;
9443
+ content: {
9444
+ "application/json": components["schemas"]["ErrorResponse"];
9445
+ };
9432
9446
  };
9433
9447
  };
9434
9448
  };
@@ -10111,7 +10125,14 @@ export interface paths {
10111
10125
  headers: {
10112
10126
  [name: string]: unknown;
10113
10127
  };
10114
- content?: never;
10128
+ content: {
10129
+ "application/json": {
10130
+ /** @example true */
10131
+ success: boolean;
10132
+ data: components["schemas"]["ExchangeRate"][];
10133
+ pagination: components["schemas"]["PaginationResponse"];
10134
+ };
10135
+ };
10115
10136
  };
10116
10137
  401: components["responses"]["UnauthorizedError"];
10117
10138
  };
@@ -10164,7 +10185,14 @@ export interface paths {
10164
10185
  headers: {
10165
10186
  [name: string]: unknown;
10166
10187
  };
10167
- content?: never;
10188
+ content: {
10189
+ "application/json": {
10190
+ /** @example true */
10191
+ success: boolean;
10192
+ data: components["schemas"]["ReferenceOrderType"][];
10193
+ pagination: components["schemas"]["PaginationResponse"];
10194
+ };
10195
+ };
10168
10196
  };
10169
10197
  401: components["responses"]["UnauthorizedError"];
10170
10198
  };
@@ -14485,6 +14513,90 @@ export interface components {
14485
14513
  total: number;
14486
14514
  has_more: boolean;
14487
14515
  };
14516
+ /** @description A currency pair enabled for the tenant: the `exchange_rates` row with the tenant FX spread applied. Pairs a vendor rate table adds for its own order types (Reap Payments, `RPP_*`) have no `id`. */
14517
+ ExchangeRate: {
14518
+ /** @description Absent on a vendor-only pair */
14519
+ id?: number;
14520
+ /** Format: date-time */
14521
+ updated_at: string;
14522
+ /** @description Symbol of the currency sold */
14523
+ from?: string;
14524
+ /** @description Symbol of the currency bought */
14525
+ to?: string;
14526
+ /** @description Rate the tenant trades at — `base_rate` with `fx_spread_percent` taken off */
14527
+ rate: number;
14528
+ /** @description Exact inverse of `rate` */
14529
+ inverted_rate: number;
14530
+ /**
14531
+ * @description Feed the market rate came from; `reap_payments` on vendor pairs
14532
+ * @enum {string|null}
14533
+ */
14534
+ rate_source?: "cryptomus" | "coingecko" | "openexchangerates" | "reap_payments" | null;
14535
+ /** Format: uuid */
14536
+ from_uuid: string;
14537
+ /** Format: uuid */
14538
+ to_uuid: string;
14539
+ /** @description Market rate before the tenant FX spread */
14540
+ base_rate: number;
14541
+ /** @description Tenant FX spread taken off `base_rate`, in percent; 0 when none applies */
14542
+ fx_spread_percent: number;
14543
+ };
14544
+ /**
14545
+ * @description Rail an order type pays through (`order_types.payment_method`)
14546
+ * @enum {string}
14547
+ */
14548
+ OrderPaymentMethod: "ACH" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "RTP" | "INTERNAL" | "CARD";
14549
+ /** @description The tenant's markup for the order type (`tenant_order_type_rates`) */
14550
+ OrderTypeTenantRates: {
14551
+ markup_percent: number | null;
14552
+ markup_fixed: number | null;
14553
+ mon_min_usd: number | null;
14554
+ };
14555
+ /** @description An order type from the global catalogue (`order_types`), with its KYC rails and the tenant markup. */
14556
+ OrderTypeInfo: {
14557
+ /** @description Order type id, e.g. `TRANSFER_CARD_SUBACCOUNT` */
14558
+ id: string;
14559
+ name: string | null;
14560
+ description: string | null;
14561
+ /** @enum {string|null} */
14562
+ transaction_type: "deposit" | "withdrawal" | null;
14563
+ payment_method: components["schemas"]["OrderPaymentMethod"] | null;
14564
+ is_internal: boolean | null;
14565
+ /** @description Trusted order types skip the OTP step on approve */
14566
+ is_trusted: boolean;
14567
+ is_deprecated: boolean;
14568
+ /** @description Payouts are limited to the wallet owner's own account */
14569
+ first_party_only: boolean;
14570
+ /**
14571
+ * Format: uuid
14572
+ * @description Legacy single rail; use `order_types_kyc_rails`
14573
+ */
14574
+ kyc_rails_id: string | null;
14575
+ /** @description Minimum amount the product should allow */
14576
+ min_amount: number | null;
14577
+ /** @description Maximum amount the product should allow */
14578
+ max_amount: number | null;
14579
+ order_types_kyc_rails: {
14580
+ /** Format: uuid */
14581
+ id: string;
14582
+ /** Format: uuid */
14583
+ kyc_rail_id: string;
14584
+ }[];
14585
+ /** @description Null when the tenant has no rate row for the type; absent if the rates lookup failed */
14586
+ tenant_rates?: components["schemas"]["OrderTypeTenantRates"] | null;
14587
+ };
14588
+ /** @description An order type enabled for the tenant — one with a `tenant_order_type_rates` row. */
14589
+ ReferenceOrderType: {
14590
+ id: string;
14591
+ description: string | null;
14592
+ is_internal: boolean | null;
14593
+ payment_method: components["schemas"]["OrderPaymentMethod"] | null;
14594
+ is_trusted: boolean;
14595
+ min_amount: number | null;
14596
+ max_amount: number | null;
14597
+ first_party_only: boolean;
14598
+ tenant_rates: components["schemas"]["OrderTypeTenantRates"];
14599
+ };
14488
14600
  ErrorResponse: {
14489
14601
  /** @example false */
14490
14602
  success?: boolean;
@@ -15692,7 +15804,7 @@ export interface components {
15692
15804
  transaction_amount_currency?: string | null;
15693
15805
  /** @description Total amount debited (including fees) */
15694
15806
  billing_amount?: number | null;
15695
- /** Format: uuid */
15807
+ /** @description Currency of `billing_amount`. Not uniform across rails: a currency uuid on most orders, an ISO code (e.g. `EUR`) on L2F off-ramps, the destination currency uuid on BC/DLS on-ramps. Use the order's `from_uuid` for the debited currency. */
15696
15808
  billing_amount_currency?: string | null;
15697
15809
  fee?: number | null;
15698
15810
  /** Format: uuid */
@@ -15739,6 +15851,11 @@ export interface components {
15739
15851
  linked_order_uuid?: string | null;
15740
15852
  /** @description True when the order settled as an internal (on-platform) transfer */
15741
15853
  is_internal?: boolean | null;
15854
+ /**
15855
+ * @description Leg side of an internal transfer: 'out' on the sender's order, 'in' on the receiver's. Card authorizations carry 'out', their refunds 'in'.
15856
+ * @enum {string|null}
15857
+ */
15858
+ direction?: "in" | "out" | null;
15742
15859
  /** Format: uuid */
15743
15860
  counterparty_account_id?: string | null;
15744
15861
  counterparty_account_name?: string | null;
@@ -16259,6 +16376,11 @@ export interface components {
16259
16376
  to_fiat_account_id?: string;
16260
16377
  to_vendor_id?: string;
16261
16378
  txid?: string;
16379
+ /**
16380
+ * @description Which side of the movement this row is: 'out' debits the wallet, 'in' credits it. Set on internal-transfer legs (copied from the order's meta), card authorizations ('out') and their refunds ('in').
16381
+ * @enum {string}
16382
+ */
16383
+ direction?: "in" | "out";
16262
16384
  /** Format: uuid */
16263
16385
  order_id?: string;
16264
16386
  } & {
@@ -751,6 +751,17 @@ export declare namespace API {
751
751
  }
752
752
  }
753
753
  }
754
+ namespace Reference {
755
+ namespace ExchangeRates {
756
+ type ExchangeRatesRoot = pathsV1Frontend['/frontend/reference/exchange_rates'];
757
+ export type ExchangeRate = componentsV1Frontend['schemas']['ExchangeRate'];
758
+ export namespace List {
759
+ type Request = NonNullable<ExchangeRatesRoot['get']['parameters']['query']>;
760
+ type Response = ExchangeRatesRoot['get']['responses'][200]['content']['application/json'];
761
+ }
762
+ export {};
763
+ }
764
+ }
754
765
  namespace Issuing {
755
766
  type CardsRoot = pathsV1Frontend['/frontend/issuing/cards'];
756
767
  type CardRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}'];
@@ -2534,11 +2545,11 @@ export declare namespace API {
2534
2545
  }
2535
2546
  namespace Types {
2536
2547
  namespace List {
2537
- type Response = API.Orders.OrderTypes.List.Response;
2548
+ type Response = pathsV1Frontend['/frontend/orders/types']['get']['responses'][200]['content']['application/json'];
2538
2549
  }
2539
2550
  namespace GetById {
2540
2551
  type Request = pathsV1Frontend['/frontend/orders/types/{id}']['get']['parameters']['path'];
2541
- type Response = API.Orders.OrderTypes.OrderInfo;
2552
+ type Response = pathsV1Frontend['/frontend/orders/types/{id}']['get']['responses'][200]['content']['application/json'];
2542
2553
  }
2543
2554
  }
2544
2555
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.67",
3
+ "version": "1.36.68",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",