@stable_sea/sdk 0.1.6 → 0.2.1

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/README.md CHANGED
@@ -21,7 +21,7 @@ import { createStableSeaClient } from "@stable_sea/sdk";
21
21
  const client = createStableSeaClient({
22
22
  apiKey: process.env.STABLE_SEA_API_KEY!,
23
23
  baseUrl: process.env.STABLE_SEA_BASE_URL!,
24
- version: "2026-07-23",
24
+ version: "2026-10-11",
25
25
  });
26
26
  ```
27
27
 
@@ -113,7 +113,9 @@ in Terminal. Submit registration with `POST /v1/bank_accounts`, poll the returne
113
113
  `baop_` ID at `GET /v1/bank_account_operations/{id}`, then read the resulting
114
114
  `bacc_` account. Registration preserves Terminal's screening rules and does not
115
115
  enable funding or payouts. Remove an account with
116
- `POST /v1/bank_accounts/{id}/remove`; pending transactions prevent removal.
116
+ `DELETE /v1/bank_accounts/{id}` without a body or idempotency key. HTTP 202
117
+ returns an operation to poll; repeat DELETE after success for a 200 deletion
118
+ receipt. Pending transactions prevent removal.
117
119
 
118
120
  See [the bank account guide](../../docs/api/bank-accounts.md) for examples and retry behavior.
119
121
 
@@ -165,3 +167,14 @@ permissions and retry behavior.
165
167
  before this it reported `chain: "unknown"`. Code that switches on `chain`
166
168
  should accept the new value, and code that keyed a Solana balance by its
167
169
  `unknown` row should expect the `solana` row instead.
170
+
171
+ ## October 11 API contract
172
+
173
+ Update to the latest SDK before using the revised contract. Send bank removal
174
+ with `client.DELETE("/v1/bank_accounts/{id}")`, without a body or idempotency key.
175
+ Read bank and wallet operation `status` instead of `state`. Retrieve issued
176
+ statement content with `GET /v1/statements/{id}`; the `/content` route is retired.
177
+
178
+ The HTTP request pin is `2026-10-11`. The retired pin returns
179
+ `400 unsupported_api_version`. Existing API keys remain valid; stored key and
180
+ thin-event/webhook versions are preserved.
package/dist/client.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import createClient from "openapi-fetch";
2
2
  import type { FetchResponse } from "openapi-fetch";
3
- import type { paths } from "./gen/schema.js";
3
+ import type { components, paths } from "./gen/schema.js";
4
4
  export interface StableSeaClientOptions {
5
5
  apiKey: string;
6
6
  baseUrl: string;
7
- version?: "2026-07-23";
7
+ version?: components["schemas"]["HTTPAPIVersion"];
8
8
  }
9
9
  type GeneratedClient = ReturnType<typeof createClient<paths>>;
10
10
  type MutationPath = {
@@ -182,27 +182,13 @@ export interface paths {
182
182
  get: operations["bank_accounts.get"];
183
183
  put?: never;
184
184
  post?: never;
185
- delete?: never;
186
- options?: never;
187
- head?: never;
188
- patch?: never;
189
- trace?: never;
190
- };
191
- "/v1/bank_accounts/{id}/remove": {
192
- parameters: {
193
- query?: never;
194
- header?: never;
195
- path?: never;
196
- cookie?: never;
197
- };
198
- get?: never;
199
- put?: never;
200
185
  /**
201
186
  * Remove a bank account
202
- * @description Archives a saved bank account using Terminal's removal restrictions. Pending transactions prevent removal. Poll the returned operation for the outcome. Removal preserves transaction history and does not cancel or reverse a deposit. Requires money:bank_accounts_write and an Idempotency-Key.
187
+ * @description Archives a saved bank account and preserves its transaction history. Pending transactions prevent removal. Requires `money:bank_accounts_write`; send no body or idempotency key.
188
+ *
189
+ * HTTP 202 returns a processing operation: poll it until `status` is `succeeded` or `failed`. Repeat DELETE while pending to retrieve the same operation. After success, repeat DELETE to receive HTTP 200 with `id` and `deleted: true`. After a failed operation, resolve its cause and repeat DELETE to submit a new attempt. Removal does not cancel or reverse a deposit.
203
190
  */
204
- post: operations["bank_accounts.remove"];
205
- delete?: never;
191
+ delete: operations["bank_accounts.delete"];
206
192
  options?: never;
207
193
  head?: never;
208
194
  patch?: never;
@@ -434,10 +420,10 @@ export interface paths {
434
420
  get: operations["external_wallets.get"];
435
421
  put?: never;
436
422
  /**
437
- * Rename an external wallet
438
- * @description Submits a rename for a wallet your business connected. The new name is screened using Terminal's existing rules. Poll the returned operation for the outcome. The address, network and other wallet properties remain unchanged.
423
+ * Update an external wallet
424
+ * @description Updates supported fields on a connected wallet. Currently only `name` is mutable; omitted or null fields remain unchanged. A new name is screened using the existing rules. Poll the returned operation until `status` is `succeeded` or `failed`. Address, network and screening status are server-controlled.
439
425
  */
440
- post: operations["external_wallets.rename"];
426
+ post: operations["external_wallets.update"];
441
427
  delete?: never;
442
428
  options?: never;
443
429
  head?: never;
@@ -695,29 +681,9 @@ export interface paths {
695
681
  };
696
682
  /**
697
683
  * Retrieve a statement
698
- * @description Returns one statement by id. A statement that has been corrected still resolves, and carries superseded_by naming the document that replaced it.
699
- */
700
- get: operations["statements.retrieve"];
701
- put?: never;
702
- post?: never;
703
- delete?: never;
704
- options?: never;
705
- head?: never;
706
- patch?: never;
707
- trace?: never;
708
- };
709
- "/v1/statements/{id}/content": {
710
- parameters: {
711
- query?: never;
712
- header?: never;
713
- path?: never;
714
- cookie?: never;
715
- };
716
- /**
717
- * Retrieve statement content
718
684
  * @description Returns the immutable issued statement values as display-ready JSON. Corrected statements remain retrievable and name their replacement. Pay-ins and payouts are not served on this API, so they are not listed in transactions; the balances and totals are the printed ones and still include their effect, which means a statement for a period in which the business made a payment does not reconcile from its transactions alone.
719
685
  */
720
- get: operations["statements.content.retrieve"];
686
+ get: operations["statements.retrieve"];
721
687
  put?: never;
722
688
  post?: never;
723
689
  delete?: never;
@@ -1009,7 +975,7 @@ export interface components {
1009
975
  pending_incoming_native: string;
1010
976
  /** @description pending_incoming_native valued in USD. Omitted when no rate is available at created_ts. */
1011
977
  pending_incoming_usd?: string;
1012
- /** @description Value outgoing from this balance and not yet settled, in the asset's own units. Never netted against pending_incoming_native. A single movement's pass-through legs are netted inside this figure: an account credited and debited within one movement counts once, not twice in both directions. */
978
+ /** @description Value reserved for outgoing movements or confirmed bank-return recovery, in the asset's own units. Never netted against pending_incoming_native. A single movement's pass-through legs are netted inside this figure: an account credited and debited within one movement counts once, not twice in both directions. */
1013
979
  pending_outgoing_native: string;
1014
980
  /** @description pending_outgoing_native valued in USD. Omitted when no rate is available at created_ts. */
1015
981
  pending_outgoing_usd?: string;
@@ -1076,6 +1042,11 @@ export interface components {
1076
1042
  mx_bank_account?: components["schemas"]["MXBankAccountCreateDetails"];
1077
1043
  us_bank_account?: components["schemas"]["USBankAccountCreateDetails"];
1078
1044
  };
1045
+ BankAccountDeleted: {
1046
+ /** @enum {boolean} */
1047
+ deleted: true;
1048
+ id: string;
1049
+ };
1079
1050
  BankAccountList: {
1080
1051
  data: components["schemas"]["BankAccount"][];
1081
1052
  has_more: boolean;
@@ -1095,7 +1066,7 @@ export interface components {
1095
1066
  /** @enum {string} */
1096
1067
  operation: "create" | "remove";
1097
1068
  /** @enum {string} */
1098
- state: "pending" | "succeeded" | "failed";
1069
+ status: "pending" | "succeeded" | "failed";
1099
1070
  };
1100
1071
  Decimal: string;
1101
1072
  Deposit: {
@@ -1337,12 +1308,12 @@ export interface components {
1337
1308
  /** @enum {string} */
1338
1309
  object: "external_wallet_operation";
1339
1310
  /** @enum {string} */
1340
- operation: "create" | "rename";
1311
+ operation: "create" | "update";
1341
1312
  /** @enum {string} */
1342
- state: "pending" | "succeeded" | "failed";
1313
+ status: "pending" | "succeeded" | "failed";
1343
1314
  };
1344
- ExternalWalletRenameInput: {
1345
- name: string;
1315
+ ExternalWalletUpdateInput: {
1316
+ name?: string | null;
1346
1317
  };
1347
1318
  FundingMethod: {
1348
1319
  ach?: {
@@ -1419,6 +1390,8 @@ export interface components {
1419
1390
  /** Format: date-time */
1420
1391
  observed_ts: string;
1421
1392
  };
1393
+ /** @enum {string} */
1394
+ HTTPAPIVersion: "2026-10-11";
1422
1395
  List: {
1423
1396
  data: components["schemas"]["Resource"][];
1424
1397
  has_more: boolean;
@@ -1718,15 +1691,21 @@ export interface components {
1718
1691
  label: string;
1719
1692
  symbol: string;
1720
1693
  };
1721
- StatementContent: {
1694
+ StatementDetail: {
1722
1695
  balances: components["schemas"]["StatementLine"][];
1723
1696
  /** Format: date-time */
1724
1697
  created_ts: string;
1725
1698
  id: string;
1726
1699
  livemode: boolean;
1700
+ /** Format: int32 */
1701
+ number: number;
1727
1702
  /** @enum {string} */
1728
- object: "statement_content";
1703
+ object: "statement";
1729
1704
  period: components["schemas"]["StatementPeriod"];
1705
+ /** Format: date-time */
1706
+ period_end_ts: string;
1707
+ /** Format: date-time */
1708
+ period_start_ts: string;
1730
1709
  ramp_fees?: components["schemas"]["StatementRampFee"][];
1731
1710
  superseded_by?: string;
1732
1711
  totals: components["schemas"]["StatementTotals"];
@@ -2035,7 +2014,7 @@ export interface components {
2035
2014
  };
2036
2015
  parameters: {
2037
2016
  "Idempotency-Key": string;
2038
- "Stable-Sea-Version": components["schemas"]["APIVersion"];
2017
+ "Stable-Sea-Version": components["schemas"]["HTTPAPIVersion"];
2039
2018
  };
2040
2019
  requestBodies: never;
2041
2020
  headers: {
@@ -2411,12 +2390,10 @@ export interface operations {
2411
2390
  };
2412
2391
  };
2413
2392
  };
2414
- "bank_accounts.remove": {
2393
+ "bank_accounts.delete": {
2415
2394
  parameters: {
2416
2395
  query?: never;
2417
- header: {
2418
- "Idempotency-Key": components["parameters"]["Idempotency-Key"];
2419
- };
2396
+ header?: never;
2420
2397
  path: {
2421
2398
  id: string;
2422
2399
  };
@@ -2432,6 +2409,15 @@ export interface operations {
2432
2409
  "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
2433
2410
  [name: string]: unknown;
2434
2411
  };
2412
+ content: {
2413
+ "application/json": components["schemas"]["BankAccountDeleted"];
2414
+ };
2415
+ };
2416
+ /** @description Accepted */
2417
+ 202: {
2418
+ headers: {
2419
+ [name: string]: unknown;
2420
+ };
2435
2421
  content: {
2436
2422
  "application/json": components["schemas"]["BankAccountOperation"];
2437
2423
  };
@@ -2439,7 +2425,6 @@ export interface operations {
2439
2425
  400: components["responses"]["Error400"];
2440
2426
  401: components["responses"]["Error401"];
2441
2427
  403: components["responses"]["Error403"];
2442
- 409: components["responses"]["Error409"];
2443
2428
  429: components["responses"]["Error429"];
2444
2429
  /** @description Error response. */
2445
2430
  default: {
@@ -2895,7 +2880,7 @@ export interface operations {
2895
2880
  };
2896
2881
  };
2897
2882
  };
2898
- "external_wallets.rename": {
2883
+ "external_wallets.update": {
2899
2884
  parameters: {
2900
2885
  query?: never;
2901
2886
  header: {
@@ -2908,7 +2893,7 @@ export interface operations {
2908
2893
  };
2909
2894
  requestBody?: {
2910
2895
  content: {
2911
- "application/json": components["schemas"]["ExternalWalletRenameInput"];
2896
+ "application/json": components["schemas"]["ExternalWalletUpdateInput"];
2912
2897
  };
2913
2898
  };
2914
2899
  responses: {
@@ -3443,46 +3428,7 @@ export interface operations {
3443
3428
  [name: string]: unknown;
3444
3429
  };
3445
3430
  content: {
3446
- "application/json": components["schemas"]["Statement"];
3447
- };
3448
- };
3449
- 400: components["responses"]["Error400"];
3450
- 401: components["responses"]["Error401"];
3451
- 403: components["responses"]["Error403"];
3452
- 429: components["responses"]["Error429"];
3453
- /** @description Error response. */
3454
- default: {
3455
- headers: {
3456
- [name: string]: unknown;
3457
- };
3458
- content: {
3459
- "application/json": components["schemas"]["Error"];
3460
- };
3461
- };
3462
- };
3463
- };
3464
- "statements.content.retrieve": {
3465
- parameters: {
3466
- query?: never;
3467
- header?: never;
3468
- path: {
3469
- /** @description The statement id. */
3470
- id: string;
3471
- };
3472
- cookie?: never;
3473
- };
3474
- requestBody?: never;
3475
- responses: {
3476
- /** @description OK */
3477
- 200: {
3478
- headers: {
3479
- "X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
3480
- "X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
3481
- "X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
3482
- [name: string]: unknown;
3483
- };
3484
- content: {
3485
- "application/json": components["schemas"]["StatementContent"];
3431
+ "application/json": components["schemas"]["StatementDetail"];
3486
3432
  };
3487
3433
  };
3488
3434
  400: components["responses"]["Error400"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [