@stable_sea/sdk 0.2.3 → 0.2.4
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 +10 -0
- package/dist/gen/schema.d.ts +292 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -182,6 +182,16 @@ and wire transfers use the instructions returned by funding.
|
|
|
182
182
|
See [the funding guide](../../docs/api/funding.md) for the complete sequence,
|
|
183
183
|
permissions and retry behavior.
|
|
184
184
|
|
|
185
|
+
## Statement previews
|
|
186
|
+
|
|
187
|
+
Read the current month's interim document with
|
|
188
|
+
`client.GET("/v1/statements/preview")` and `money:read`. Its display-ready
|
|
189
|
+
balances, transactions and fees use the same native calculation as Terminal.
|
|
190
|
+
Values refresh about once a minute. Check `observed_ts`; missing,
|
|
191
|
+
stale or previous-month previews return 503. Opening balances remain provisional
|
|
192
|
+
until the previous month's statement is issued. Issued documents continue to use
|
|
193
|
+
`GET /v1/statements/{id}`.
|
|
194
|
+
|
|
185
195
|
## Contract changes
|
|
186
196
|
|
|
187
197
|
- `GET /v1/balances`: `chain` gains the value `solana`. A USDC balance held on
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -678,6 +678,68 @@ export interface paths {
|
|
|
678
678
|
patch?: never;
|
|
679
679
|
trace?: never;
|
|
680
680
|
};
|
|
681
|
+
"/v1/statement_generations": {
|
|
682
|
+
parameters: {
|
|
683
|
+
query?: never;
|
|
684
|
+
header?: never;
|
|
685
|
+
path?: never;
|
|
686
|
+
cookie?: never;
|
|
687
|
+
};
|
|
688
|
+
get?: never;
|
|
689
|
+
put?: never;
|
|
690
|
+
/**
|
|
691
|
+
* Generate a statement
|
|
692
|
+
* @description Requests the business's official statement for a closed UTC calendar month. Requires `money:statements_write` and an `Idempotency-Key`. Poll the returned generation with `money:read` until it succeeds or fails, then retrieve its `statement`. Existing statements are returned without reissuing them. Current key access, business availability and business statement eligibility are checked before execution. Retrying the same request and key returns its original pending receipt; the generation read reports the current outcome.
|
|
693
|
+
*
|
|
694
|
+
* Idempotency keys are shared by the business within one environment, including across API credentials and rotation. A replay keeps the original submitting credential as the processing authority; it does not replace that credential with the retrying key.
|
|
695
|
+
*/
|
|
696
|
+
post: operations["statement_generations.create"];
|
|
697
|
+
delete?: never;
|
|
698
|
+
options?: never;
|
|
699
|
+
head?: never;
|
|
700
|
+
patch?: never;
|
|
701
|
+
trace?: never;
|
|
702
|
+
};
|
|
703
|
+
"/v1/statement_generations/{id}": {
|
|
704
|
+
parameters: {
|
|
705
|
+
query?: never;
|
|
706
|
+
header?: never;
|
|
707
|
+
path?: never;
|
|
708
|
+
cookie?: never;
|
|
709
|
+
};
|
|
710
|
+
/**
|
|
711
|
+
* Retrieve a statement generation
|
|
712
|
+
* @description Returns the current processing outcome for this business and key environment. `pending` means processing or retrying; `succeeded` names the issued statement; `failed` includes a safe `failure_code`. A failed request does not cancel or change an issued statement. Resolve the cause before submitting another request with a new idempotency key.
|
|
713
|
+
*/
|
|
714
|
+
get: operations["statement_generations.get"];
|
|
715
|
+
put?: never;
|
|
716
|
+
post?: never;
|
|
717
|
+
delete?: never;
|
|
718
|
+
options?: never;
|
|
719
|
+
head?: never;
|
|
720
|
+
patch?: never;
|
|
721
|
+
trace?: never;
|
|
722
|
+
};
|
|
723
|
+
"/v1/statement_periods": {
|
|
724
|
+
parameters: {
|
|
725
|
+
query?: never;
|
|
726
|
+
header?: never;
|
|
727
|
+
path?: never;
|
|
728
|
+
cookie?: never;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* List supported statement periods
|
|
732
|
+
* @description Lists supported statement period types and their earliest UTC month start. Monthly generation also requires a closed month and the business's current business statement eligibility. Use this catalog with the issued statement list to choose a month. A supported calendar period is not a guarantee that a missing earlier statement can be issued after a later period has already been issued. This reference data is the same in Live and Sandbox.
|
|
733
|
+
*/
|
|
734
|
+
get: operations["statement_periods.catalog"];
|
|
735
|
+
put?: never;
|
|
736
|
+
post?: never;
|
|
737
|
+
delete?: never;
|
|
738
|
+
options?: never;
|
|
739
|
+
head?: never;
|
|
740
|
+
patch?: never;
|
|
741
|
+
trace?: never;
|
|
742
|
+
};
|
|
681
743
|
"/v1/statements": {
|
|
682
744
|
parameters: {
|
|
683
745
|
query?: never;
|
|
@@ -698,6 +760,30 @@ export interface paths {
|
|
|
698
760
|
patch?: never;
|
|
699
761
|
trace?: never;
|
|
700
762
|
};
|
|
763
|
+
"/v1/statements/preview": {
|
|
764
|
+
parameters: {
|
|
765
|
+
query?: never;
|
|
766
|
+
header?: never;
|
|
767
|
+
path?: never;
|
|
768
|
+
cookie?: never;
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* Preview the current statement
|
|
772
|
+
* @description Returns the authenticated business's month-to-date statement as display-ready JSON. Requires `money:read` and at least one money account that has not been archived. This read does not issue a statement. The preview refreshes about once a minute; an unavailable or older-than-two-minutes preview returns HTTP 503. At a UTC month boundary, it may be unavailable until the first refresh.
|
|
773
|
+
*
|
|
774
|
+
* Figures update until the month closes. Opening balances remain provisional until the previous month's statement is issued. The period uses UTC and ends at the preview time, normally rounded down to the minute. `observed_ts` is the preview calculation start; the underlying reads are not an atomic snapshot.
|
|
775
|
+
*
|
|
776
|
+
* Transactions exclude pay-ins and payouts, while balances and totals include their effects. Pending movements and movements settled across a period boundary can also prevent transaction amounts from reconciling to the totals. Missing valuations refuse the preview instead of reporting held assets as zero.
|
|
777
|
+
*/
|
|
778
|
+
get: operations["statements.preview"];
|
|
779
|
+
put?: never;
|
|
780
|
+
post?: never;
|
|
781
|
+
delete?: never;
|
|
782
|
+
options?: never;
|
|
783
|
+
head?: never;
|
|
784
|
+
patch?: never;
|
|
785
|
+
trace?: never;
|
|
786
|
+
};
|
|
701
787
|
"/v1/statements/{id}": {
|
|
702
788
|
parameters: {
|
|
703
789
|
query?: never;
|
|
@@ -1285,7 +1371,7 @@ export interface components {
|
|
|
1285
1371
|
object: "list";
|
|
1286
1372
|
};
|
|
1287
1373
|
/** @enum {string} */
|
|
1288
|
-
EventTypeName: "bank_account.created" | "bank_account.removed" | "bank_account_operation.updated" | "deposit.updated" | "deposit_quote.updated" | "external_wallet.created" | "external_wallet.updated" | "external_wallet_operation.updated" | "notification.created" | "order.updated" | "source_wallet_declaration.updated" | "transaction.created" | "transaction.updated";
|
|
1374
|
+
EventTypeName: "bank_account.created" | "bank_account.removed" | "bank_account_operation.updated" | "deposit.updated" | "deposit_quote.updated" | "external_wallet.created" | "external_wallet.updated" | "external_wallet_operation.updated" | "notification.created" | "order.updated" | "source_wallet_declaration.updated" | "statement_generation.updated" | "transaction.created" | "transaction.updated";
|
|
1289
1375
|
ExternalWallet: {
|
|
1290
1376
|
/** @description True when a Stable Sea operator registered this wallet for the business; false when the business added it itself. */
|
|
1291
1377
|
added_by_stable_sea: boolean;
|
|
@@ -1799,6 +1885,32 @@ export interface components {
|
|
|
1799
1885
|
type: "ach_offramp" | "ach_onramp" | "adjustment" | "buy_fund_token" | "buy_fund_token_return" | "buy_fund_token_return_sweep" | "deposit_hold" | "deposit_return" | "deposit_reversal" | "fund_cash_subscription" | "fund_dividend_payout" | "fund_distribution_payout" | "fund_gas_tank" | "fund_xlm_reserve" | "gas_tank_refill" | "gas_wallet_funding" | "go_account_conversion" | "go_account_custodial_transfer" | "go_account_external_send" | "held_deposit_release" | "onchain_deposit" | "onchain_withdrawal" | "ramp_fee_refund" | "reclassification" | "sell_fund_token" | "sell_fund_token_return" | "trade_order" | "treasury_booking" | "treasury_wire_credit" | "wire_offramp" | "wire_onramp";
|
|
1800
1886
|
withdrawal?: components["schemas"]["StatementWithdrawal"];
|
|
1801
1887
|
};
|
|
1888
|
+
StatementGeneration: {
|
|
1889
|
+
/** Format: date-time */
|
|
1890
|
+
created_ts: string;
|
|
1891
|
+
/**
|
|
1892
|
+
* @description Reason processing failed. Correct the cause before submitting a new request with a new idempotency key.
|
|
1893
|
+
* @enum {string}
|
|
1894
|
+
*/
|
|
1895
|
+
failure_code?: "permission_denied" | "api_key_revoked" | "business_locked" | "terms_acceptance_required" | "api_access_disabled" | "statement_ineligible" | "invalid_statement_month" | "statement_generation_refused" | "statement_processing_unavailable";
|
|
1896
|
+
id: string;
|
|
1897
|
+
livemode: boolean;
|
|
1898
|
+
/** @enum {string} */
|
|
1899
|
+
object: "statement_generation";
|
|
1900
|
+
/** Format: date-time */
|
|
1901
|
+
period_start_ts: string;
|
|
1902
|
+
/** @description The issued statement after processing succeeds. Retrieve it with GET /v1/statements/{id}. */
|
|
1903
|
+
statement?: string;
|
|
1904
|
+
/** @enum {string} */
|
|
1905
|
+
status: "pending" | "succeeded" | "failed";
|
|
1906
|
+
};
|
|
1907
|
+
StatementGenerationInput: {
|
|
1908
|
+
/**
|
|
1909
|
+
* Format: date-time
|
|
1910
|
+
* @description The first instant of a closed calendar month in UTC, for example 2026-09-01T00:00:00Z. Read available_from_ts in the statement-period catalog for the earliest supported period. Business statement eligibility still applies.
|
|
1911
|
+
*/
|
|
1912
|
+
period_start_ts: string;
|
|
1913
|
+
};
|
|
1802
1914
|
StatementLine: {
|
|
1803
1915
|
ending_native: string;
|
|
1804
1916
|
ending_usd: string;
|
|
@@ -1823,6 +1935,32 @@ export interface components {
|
|
|
1823
1935
|
/** Format: date-time */
|
|
1824
1936
|
start_ts: string;
|
|
1825
1937
|
};
|
|
1938
|
+
StatementPeriodAvailability: {
|
|
1939
|
+
/** Format: date-time */
|
|
1940
|
+
available_from_ts: string;
|
|
1941
|
+
/** @enum {string} */
|
|
1942
|
+
object: "statement_period";
|
|
1943
|
+
/** @enum {string} */
|
|
1944
|
+
type: "monthly";
|
|
1945
|
+
};
|
|
1946
|
+
StatementPeriodCatalog: {
|
|
1947
|
+
data: components["schemas"]["StatementPeriodAvailability"][];
|
|
1948
|
+
/** @enum {string} */
|
|
1949
|
+
object: "list";
|
|
1950
|
+
};
|
|
1951
|
+
StatementPreview: {
|
|
1952
|
+
balances: components["schemas"]["StatementLine"][];
|
|
1953
|
+
livemode: boolean;
|
|
1954
|
+
/** @enum {string} */
|
|
1955
|
+
object: "statement_preview";
|
|
1956
|
+
/** Format: date-time */
|
|
1957
|
+
observed_ts: string;
|
|
1958
|
+
period: components["schemas"]["StatementPeriod"];
|
|
1959
|
+
ramp_fees?: components["schemas"]["StatementRampFee"][];
|
|
1960
|
+
totals: components["schemas"]["StatementTotals"];
|
|
1961
|
+
/** @description In-scope movements. Pay-ins and payouts are excluded, although balances and totals include their effects. Pending entries can contain provisional amounts. */
|
|
1962
|
+
transactions: components["schemas"]["StatementEntry"][];
|
|
1963
|
+
};
|
|
1826
1964
|
StatementRampFee: {
|
|
1827
1965
|
/** Format: date-time */
|
|
1828
1966
|
assessed_ts: string;
|
|
@@ -3470,6 +3608,123 @@ export interface operations {
|
|
|
3470
3608
|
};
|
|
3471
3609
|
};
|
|
3472
3610
|
};
|
|
3611
|
+
"statement_generations.create": {
|
|
3612
|
+
parameters: {
|
|
3613
|
+
query?: never;
|
|
3614
|
+
header: {
|
|
3615
|
+
"Idempotency-Key": components["parameters"]["Idempotency-Key"];
|
|
3616
|
+
};
|
|
3617
|
+
path?: never;
|
|
3618
|
+
cookie?: never;
|
|
3619
|
+
};
|
|
3620
|
+
requestBody?: {
|
|
3621
|
+
content: {
|
|
3622
|
+
"application/json": components["schemas"]["StatementGenerationInput"];
|
|
3623
|
+
};
|
|
3624
|
+
};
|
|
3625
|
+
responses: {
|
|
3626
|
+
/** @description OK */
|
|
3627
|
+
200: {
|
|
3628
|
+
headers: {
|
|
3629
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3630
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3631
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3632
|
+
[name: string]: unknown;
|
|
3633
|
+
};
|
|
3634
|
+
content: {
|
|
3635
|
+
"application/json": components["schemas"]["StatementGeneration"];
|
|
3636
|
+
};
|
|
3637
|
+
};
|
|
3638
|
+
400: components["responses"]["Error400"];
|
|
3639
|
+
401: components["responses"]["Error401"];
|
|
3640
|
+
403: components["responses"]["Error403"];
|
|
3641
|
+
409: components["responses"]["Error409"];
|
|
3642
|
+
429: components["responses"]["Error429"];
|
|
3643
|
+
/** @description Error response. */
|
|
3644
|
+
default: {
|
|
3645
|
+
headers: {
|
|
3646
|
+
[name: string]: unknown;
|
|
3647
|
+
};
|
|
3648
|
+
content: {
|
|
3649
|
+
"application/json": components["schemas"]["Error"];
|
|
3650
|
+
};
|
|
3651
|
+
};
|
|
3652
|
+
};
|
|
3653
|
+
};
|
|
3654
|
+
"statement_generations.get": {
|
|
3655
|
+
parameters: {
|
|
3656
|
+
query?: never;
|
|
3657
|
+
header?: never;
|
|
3658
|
+
path: {
|
|
3659
|
+
id: string;
|
|
3660
|
+
};
|
|
3661
|
+
cookie?: never;
|
|
3662
|
+
};
|
|
3663
|
+
requestBody?: never;
|
|
3664
|
+
responses: {
|
|
3665
|
+
/** @description OK */
|
|
3666
|
+
200: {
|
|
3667
|
+
headers: {
|
|
3668
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3669
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3670
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3671
|
+
[name: string]: unknown;
|
|
3672
|
+
};
|
|
3673
|
+
content: {
|
|
3674
|
+
"application/json": components["schemas"]["StatementGeneration"];
|
|
3675
|
+
};
|
|
3676
|
+
};
|
|
3677
|
+
400: components["responses"]["Error400"];
|
|
3678
|
+
401: components["responses"]["Error401"];
|
|
3679
|
+
403: components["responses"]["Error403"];
|
|
3680
|
+
429: components["responses"]["Error429"];
|
|
3681
|
+
/** @description Error response. */
|
|
3682
|
+
default: {
|
|
3683
|
+
headers: {
|
|
3684
|
+
[name: string]: unknown;
|
|
3685
|
+
};
|
|
3686
|
+
content: {
|
|
3687
|
+
"application/json": components["schemas"]["Error"];
|
|
3688
|
+
};
|
|
3689
|
+
};
|
|
3690
|
+
};
|
|
3691
|
+
};
|
|
3692
|
+
"statement_periods.catalog": {
|
|
3693
|
+
parameters: {
|
|
3694
|
+
query?: never;
|
|
3695
|
+
header?: never;
|
|
3696
|
+
path?: never;
|
|
3697
|
+
cookie?: never;
|
|
3698
|
+
};
|
|
3699
|
+
requestBody?: never;
|
|
3700
|
+
responses: {
|
|
3701
|
+
/** @description OK */
|
|
3702
|
+
200: {
|
|
3703
|
+
headers: {
|
|
3704
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3705
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3706
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3707
|
+
[name: string]: unknown;
|
|
3708
|
+
};
|
|
3709
|
+
content: {
|
|
3710
|
+
"application/json": components["schemas"]["StatementPeriodCatalog"];
|
|
3711
|
+
};
|
|
3712
|
+
};
|
|
3713
|
+
400: components["responses"]["Error400"];
|
|
3714
|
+
401: components["responses"]["Error401"];
|
|
3715
|
+
403: components["responses"]["Error403"];
|
|
3716
|
+
429: components["responses"]["Error429"];
|
|
3717
|
+
/** @description Error response. */
|
|
3718
|
+
default: {
|
|
3719
|
+
headers: {
|
|
3720
|
+
[name: string]: unknown;
|
|
3721
|
+
};
|
|
3722
|
+
content: {
|
|
3723
|
+
"application/json": components["schemas"]["Error"];
|
|
3724
|
+
};
|
|
3725
|
+
};
|
|
3726
|
+
};
|
|
3727
|
+
};
|
|
3473
3728
|
"statements.list": {
|
|
3474
3729
|
parameters: {
|
|
3475
3730
|
query?: {
|
|
@@ -3513,6 +3768,42 @@ export interface operations {
|
|
|
3513
3768
|
};
|
|
3514
3769
|
};
|
|
3515
3770
|
};
|
|
3771
|
+
"statements.preview": {
|
|
3772
|
+
parameters: {
|
|
3773
|
+
query?: never;
|
|
3774
|
+
header?: never;
|
|
3775
|
+
path?: never;
|
|
3776
|
+
cookie?: never;
|
|
3777
|
+
};
|
|
3778
|
+
requestBody?: never;
|
|
3779
|
+
responses: {
|
|
3780
|
+
/** @description OK */
|
|
3781
|
+
200: {
|
|
3782
|
+
headers: {
|
|
3783
|
+
"X-RateLimit-Limit": components["headers"]["X-RateLimit-Limit"];
|
|
3784
|
+
"X-RateLimit-Remaining": components["headers"]["X-RateLimit-Remaining"];
|
|
3785
|
+
"X-RateLimit-Reset": components["headers"]["X-RateLimit-Reset"];
|
|
3786
|
+
[name: string]: unknown;
|
|
3787
|
+
};
|
|
3788
|
+
content: {
|
|
3789
|
+
"application/json": components["schemas"]["StatementPreview"];
|
|
3790
|
+
};
|
|
3791
|
+
};
|
|
3792
|
+
400: components["responses"]["Error400"];
|
|
3793
|
+
401: components["responses"]["Error401"];
|
|
3794
|
+
403: components["responses"]["Error403"];
|
|
3795
|
+
429: components["responses"]["Error429"];
|
|
3796
|
+
/** @description Error response. */
|
|
3797
|
+
default: {
|
|
3798
|
+
headers: {
|
|
3799
|
+
[name: string]: unknown;
|
|
3800
|
+
};
|
|
3801
|
+
content: {
|
|
3802
|
+
"application/json": components["schemas"]["Error"];
|
|
3803
|
+
};
|
|
3804
|
+
};
|
|
3805
|
+
};
|
|
3806
|
+
};
|
|
3516
3807
|
"statements.retrieve": {
|
|
3517
3808
|
parameters: {
|
|
3518
3809
|
query?: never;
|