@stable_sea/sdk 0.2.31 → 0.2.35
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 +5 -0
- package/dist/gen/schema.d.ts +9 -0
- package/dist/gen/session-schema.d.ts +53 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -615,6 +615,11 @@ its first chart refresh. The document's captured financial figures remain readab
|
|
|
615
615
|
before this it reported `chain: "unknown"`. Code that switches on `chain`
|
|
616
616
|
should accept the new value, and code that keyed a Solana balance by its
|
|
617
617
|
`unknown` row should expect the `solana` row instead.
|
|
618
|
+
- WisdomTree fund orders: an order settled over `onchain_solana` now fails with
|
|
619
|
+
`FailedPrecondition` (or `Unavailable` when the business's Solana switch cannot
|
|
620
|
+
be read, which is retryable) instead of `InvalidArgument`. Solana settlement
|
|
621
|
+
for WisdomTree funds is not live yet, so the order still cannot succeed.
|
|
622
|
+
Clients that branch on the status code for this rail should accept both.
|
|
618
623
|
|
|
619
624
|
## October 16 API contract
|
|
620
625
|
|
package/dist/gen/schema.d.ts
CHANGED
|
@@ -3296,6 +3296,15 @@ export interface components {
|
|
|
3296
3296
|
[name: string]: unknown;
|
|
3297
3297
|
};
|
|
3298
3298
|
content: {
|
|
3299
|
+
/**
|
|
3300
|
+
* @example {
|
|
3301
|
+
* "error": {
|
|
3302
|
+
* "type": "authentication_error",
|
|
3303
|
+
* "message": "unauthorized",
|
|
3304
|
+
* "request_id": "api-server/7hTXDzKxCA-000001"
|
|
3305
|
+
* }
|
|
3306
|
+
* }
|
|
3307
|
+
*/
|
|
3299
3308
|
"application/json": components["schemas"]["Error"];
|
|
3300
3309
|
};
|
|
3301
3310
|
};
|
|
@@ -95,7 +95,7 @@ export interface paths {
|
|
|
95
95
|
};
|
|
96
96
|
/**
|
|
97
97
|
* Read the business's e-signature enrollment (business)
|
|
98
|
-
* @description Reports whether the caller accepts their business's MSA by e-signature — the business is enrolled and its allow-list, when it has one, names the caller — the provider this deployment uses, and how the embedded signing page reports progress (protocol and the only allowed message origin). A caller who is not enrolled reads enrolled:false and accepts by click-through. While e-signature is paused on this deployment, an enrolled caller also reads enrolled:false and accepts by click-through, unless a signature request holds the current MSA document named by document_id (or, without document_id, any current MSA document of their business): they keep signing that document by e-signature until the request ends. A document_id that is not one of the business's MSA documents is then 404 document_not_found, as accepting it is. A caller who signs by e-signature while it is not running on this deployment gets 503 — never enrolled:false, because click-through acceptance is refused for them.
|
|
98
|
+
* @description Reports whether the caller accepts their business's MSA by e-signature — the business is enrolled and its allow-list, when it has one, names the caller — the provider this deployment uses, and how the embedded signing page reports progress (protocol and the only allowed message origin). A caller who is not enrolled reads enrolled:false and accepts by click-through. While e-signature is paused on this deployment, an enrolled caller also reads enrolled:false and accepts by click-through, unless a signature request holds the current MSA document named by document_id (or, without document_id, any current MSA document of their business): they keep signing that document by e-signature until the request ends. A document_id that is not one of the business's MSA documents is then 404 document_not_found, as accepting it is. A caller who signs by e-signature while it is not running on this deployment gets 503 — never enrolled:false, because click-through acceptance is refused for them. custody_contracts_enrolled says whether the caller signs their business's custody contracts by e-signature, in which case signing one by click-through is refused (409 esign_required).
|
|
99
99
|
*/
|
|
100
100
|
get: operations["compliance.esign.enrollment.get"];
|
|
101
101
|
put?: never;
|
|
@@ -120,8 +120,8 @@ export interface paths {
|
|
|
120
120
|
get: operations["compliance.esign.envelopes.list"];
|
|
121
121
|
put?: never;
|
|
122
122
|
/**
|
|
123
|
-
* Start or resume signing
|
|
124
|
-
* @description Composes (or resumes) the calling member's e-signature envelope
|
|
123
|
+
* Start or resume signing an agreement (business)
|
|
124
|
+
* @description Composes (or resumes) the calling member's e-signature envelope and returns it, plus a one-time embedded signing session when one can be issued. With `purpose` `msa` it signs the business's live MSA document named by `document_id`. With `purpose` `custody_contract` it signs the custody contract named by `contract_type`; the platform resolves the contract's document itself, so `document_id` must be absent. A request whose fields do not match its purpose, including an `msa` request without `document_id`, answers 400 `esign_purpose_invalid` with `param` naming the field. Requires e-sign enrollment (400 `esign_not_enrolled`, which is also the answer for `custody_contract` wherever custody contracts are not signed by e-signature), and the signer's authority attestation and title (400 `esign_authority_attestation_required`). An envelope another member started answers 409 `esign_signer_conflict` without a session; resuming the caller's own envelope with a title other than the one already placed on its document answers 409 `esign_title_conflict`; a document the caller cannot address answers 404 `document_not_found`; an agreement that changed while signing was starting, or a custody contract the business already signed, answers 409 `esign_source_changed`; a new envelope while this month's envelope count is at or above the platform's hard cap answers 409 `esign_envelope_cap_reached` (nothing is created or sent; resuming an envelope already started is not refused); a paused deployment answers 503, and an enrolled business on a deployment where e-signature is unavailable answers 503.
|
|
125
125
|
*/
|
|
126
126
|
post: operations["compliance.esign.envelopes.create"];
|
|
127
127
|
delete?: never;
|
|
@@ -1735,7 +1735,7 @@ export interface paths {
|
|
|
1735
1735
|
put?: never;
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Sign a custody contract on behalf of the session's group
|
|
1738
|
-
* @description Records the user's signature on the contract template identified by contract_type.
|
|
1738
|
+
* @description Records the user's signature on the contract template identified by contract_type. An unknown contract_type is 400 invalid_contract_type. A click-through that e-signature decides is refused with 409 esign_required: while an e-signature request for that contract is in progress or has been signed, or while the user signs their business's custody contracts by e-signature (custody_contracts_enrolled on GET /compliance/esign/enrollment). The user then signs, or has signed, through the e-signature request instead.
|
|
1739
1739
|
*/
|
|
1740
1740
|
post: operations["money.contracts.sign"];
|
|
1741
1741
|
delete?: never;
|
|
@@ -2568,6 +2568,7 @@ export interface components {
|
|
|
2568
2568
|
mime_type?: string;
|
|
2569
2569
|
};
|
|
2570
2570
|
EsignEnrollmentOutput: {
|
|
2571
|
+
custody_contracts_enrolled: boolean;
|
|
2571
2572
|
embed: components["schemas"]["EsignEmbedOutput"];
|
|
2572
2573
|
enrolled: boolean;
|
|
2573
2574
|
provider: string;
|
|
@@ -2586,6 +2587,7 @@ export interface components {
|
|
|
2586
2587
|
};
|
|
2587
2588
|
EsignEnvelopeView: {
|
|
2588
2589
|
artifacts: components["schemas"]["EsignEnvelopeArtifactsView"];
|
|
2590
|
+
contract_type?: components["schemas"]["EsignCustodyContractType"];
|
|
2589
2591
|
/** Format: date-time */
|
|
2590
2592
|
created_ts: string;
|
|
2591
2593
|
document: components["schemas"]["EsignEnvelopeDocumentView"];
|
|
@@ -2602,6 +2604,11 @@ export interface components {
|
|
|
2602
2604
|
executed_document: boolean;
|
|
2603
2605
|
provider_certificate: boolean;
|
|
2604
2606
|
};
|
|
2607
|
+
/**
|
|
2608
|
+
* @description A custody contract: custody_sa (the custodial services agreement) or trade_sa (the electronic trading agreement). On an envelope it names the contract a custody_contract envelope signs, and is absent when purpose is msa. On a create it is required when purpose is custody_contract and must be absent when purpose is msa.
|
|
2609
|
+
* @enum {string}
|
|
2610
|
+
*/
|
|
2611
|
+
EsignCustodyContractType: "custody_sa" | "trade_sa";
|
|
2605
2612
|
EsignEnvelopeDocumentView: {
|
|
2606
2613
|
associated_entity: string;
|
|
2607
2614
|
customer_legal_name?: string;
|
|
@@ -2610,7 +2617,7 @@ export interface components {
|
|
|
2610
2617
|
version: string;
|
|
2611
2618
|
};
|
|
2612
2619
|
/** @enum {string} */
|
|
2613
|
-
EsignEnvelopePurpose: "msa";
|
|
2620
|
+
EsignEnvelopePurpose: "msa" | "custody_contract";
|
|
2614
2621
|
EsignEnvelopeSignerView: {
|
|
2615
2622
|
display_name: string;
|
|
2616
2623
|
individual_id?: string | null;
|
|
@@ -2623,7 +2630,10 @@ export interface components {
|
|
|
2623
2630
|
};
|
|
2624
2631
|
/** @enum {string} */
|
|
2625
2632
|
EsignSignerStatus: "pending" | "viewed" | "signed" | "declined" | "reassigned";
|
|
2626
|
-
/**
|
|
2633
|
+
/**
|
|
2634
|
+
* @description Lifecycle of the envelope. preparing: being sent to the provider. awaiting_signatures: out for signature. archiving: signed; the executed copy and evidence are being stored. needs_repair: signed or sent, waiting on an operator; the signature stands. executed: signed and durably stored; the agreement it signs is accepted. declined/expired/voided/failed: ended without a signature; start a new envelope.
|
|
2635
|
+
* @enum {string}
|
|
2636
|
+
*/
|
|
2627
2637
|
EsignEnvelopeStatus: "preparing" | "awaiting_signatures" | "partially_signed" | "archiving" | "needs_repair" | "executed" | "declined" | "expired" | "voided" | "failed";
|
|
2628
2638
|
EsignEnvelopeVerificationView: {
|
|
2629
2639
|
certificate_sha256?: string | null;
|
|
@@ -2632,12 +2642,14 @@ export interface components {
|
|
|
2632
2642
|
};
|
|
2633
2643
|
EsignCreateEnvelopeInput: {
|
|
2634
2644
|
authority_attestation: boolean;
|
|
2635
|
-
|
|
2645
|
+
contract_type?: components["schemas"]["EsignCustodyContractType"];
|
|
2646
|
+
document_id?: string;
|
|
2636
2647
|
purpose: components["schemas"]["EsignEnvelopePurpose"];
|
|
2637
2648
|
title: string;
|
|
2638
2649
|
};
|
|
2639
2650
|
EsignCreateEnvelopeOutput: {
|
|
2640
2651
|
artifacts: components["schemas"]["EsignEnvelopeArtifactsView"];
|
|
2652
|
+
contract_type?: components["schemas"]["EsignCustodyContractType"];
|
|
2641
2653
|
/** Format: date-time */
|
|
2642
2654
|
created_ts: string;
|
|
2643
2655
|
document: components["schemas"]["EsignEnvelopeDocumentView"];
|
|
@@ -3806,6 +3818,8 @@ export interface components {
|
|
|
3806
3818
|
/** Format: base64 */
|
|
3807
3819
|
contract_pdf_contents?: string;
|
|
3808
3820
|
contract_type?: string;
|
|
3821
|
+
/** @description The template version to sign: the hex SHA-256 of the template PDF. An e-signature envelope for this contract signs it when its document version equals this value. */
|
|
3822
|
+
version: string;
|
|
3809
3823
|
};
|
|
3810
3824
|
CustodyDownloadContractOutput: {
|
|
3811
3825
|
/** Format: base64 */
|
|
@@ -3831,6 +3845,12 @@ export interface components {
|
|
|
3831
3845
|
created_by: string;
|
|
3832
3846
|
/** Format: date-time */
|
|
3833
3847
|
created_ts: string;
|
|
3848
|
+
/**
|
|
3849
|
+
* Format: date-time
|
|
3850
|
+
* @description Estimated time the trade of a movement with execution=after_funding is placed, while it has not been placed yet and that time has not passed. An estimate, not a commitment.
|
|
3851
|
+
*/
|
|
3852
|
+
estimated_execution_ts?: string;
|
|
3853
|
+
execution?: components["schemas"]["MoneyMovementsMovementExecution"];
|
|
3834
3854
|
/** Format: date-time */
|
|
3835
3855
|
failed_ts?: string;
|
|
3836
3856
|
fee?: components["schemas"]["MoneyfmtMoneyAmountView"];
|
|
@@ -3862,6 +3882,8 @@ export interface components {
|
|
|
3862
3882
|
transaction_count: number;
|
|
3863
3883
|
type: string;
|
|
3864
3884
|
};
|
|
3885
|
+
/** @enum {string} */
|
|
3886
|
+
MoneyMovementsMovementExecution: "after_funding";
|
|
3865
3887
|
MoneyMovementsTransactionSideView: {
|
|
3866
3888
|
amount: components["schemas"]["MoneyfmtMoneyAmountView"];
|
|
3867
3889
|
/** @description Whether amount is still an estimate — the leg's quoted subtotal, carried because the leg's figure is not final. True means the figure can still move and must be presented as an estimate rather than as a settled one. False means it can no longer change, either because the leg reached a terminal state or because it carries the figure the customer named at order entry (a fund buy's dollars, a fund sell's shares); it does not promise the figure was observed. */
|
|
@@ -4160,8 +4182,14 @@ export interface components {
|
|
|
4160
4182
|
amount_usd?: string;
|
|
4161
4183
|
amount_usd_view?: components["schemas"]["MoneyfmtMoneyAmountView"];
|
|
4162
4184
|
approval_preview?: components["schemas"]["TradesBuyApprovalPreview"];
|
|
4185
|
+
/**
|
|
4186
|
+
* Format: date-time
|
|
4187
|
+
* @description Estimated time an execution=after_funding order is placed, measured from this quote. An estimate, not a commitment.
|
|
4188
|
+
*/
|
|
4189
|
+
estimated_execution_ts?: string;
|
|
4163
4190
|
estimated_quantity?: string;
|
|
4164
4191
|
estimated_quantity_view?: components["schemas"]["MoneyfmtMoneyAmountView"];
|
|
4192
|
+
execution?: components["schemas"]["MoneyMovementsMovementExecution"];
|
|
4165
4193
|
/** Format: date-time */
|
|
4166
4194
|
expires_ts?: string;
|
|
4167
4195
|
express_buy?: components["schemas"]["TradesExpressBuyQuote"];
|
|
@@ -10080,6 +10108,24 @@ export interface operations {
|
|
|
10080
10108
|
"application/json": components["schemas"]["CustodySignContractAck"];
|
|
10081
10109
|
};
|
|
10082
10110
|
};
|
|
10111
|
+
/** @description Bad Request */
|
|
10112
|
+
400: {
|
|
10113
|
+
headers: {
|
|
10114
|
+
[name: string]: unknown;
|
|
10115
|
+
};
|
|
10116
|
+
content: {
|
|
10117
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
10118
|
+
};
|
|
10119
|
+
};
|
|
10120
|
+
/** @description Conflict */
|
|
10121
|
+
409: {
|
|
10122
|
+
headers: {
|
|
10123
|
+
[name: string]: unknown;
|
|
10124
|
+
};
|
|
10125
|
+
content: {
|
|
10126
|
+
"application/json": components["schemas"]["HttputilAPIError"];
|
|
10127
|
+
};
|
|
10128
|
+
};
|
|
10083
10129
|
/** @description Error response. */
|
|
10084
10130
|
default: {
|
|
10085
10131
|
headers: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stable_sea/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"files": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"vitest": "5.0.4"
|
|
42
42
|
},
|
|
43
43
|
"overrides": {
|
|
44
|
-
"js-yaml": "^
|
|
44
|
+
"js-yaml": "^4.3.2",
|
|
45
45
|
"nanoid": "^3.3.17",
|
|
46
46
|
"source-map-js": "^1.2.2"
|
|
47
47
|
}
|