@capxul/sdk 0.1.0-alpha.3 → 0.1.0-alpha.6
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/CHANGELOG.md +51 -0
- package/README.md +1 -1
- package/dist/{client-BI863O0y.d.ts → client-ChfXWMzO.d.ts} +244 -77
- package/dist/{client-CwcnMbGv.d.cts → client-DW_fW9DC.d.cts} +244 -77
- package/dist/client.cjs +982 -118
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +982 -118
- package/dist/index.cjs +1079 -224
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1079 -225
- package/dist/{types-BE3tVIOI.d.ts → types-CYvLP5pP.d.ts} +22 -3
- package/dist/{types-z4VLz9rS.d.cts → types-X02RbQ2u.d.cts} +22 -3
- package/dist/webhooks.d.cts +1 -1
- package/dist/webhooks.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as types from '@repo/api-contract/gen/types';
|
|
2
|
-
import { Y as PublicId, A as AccountId, S as SafeId, d as OrganizationId, c as KycProfileId, b as ExternalAccountId, f as SubAccountId, B as BalanceLedgerEntryId, a as ApiKeyId, h as TreasuryId, M as MemberId, K as KybProfileId, N as NextAction, P as PaymentId, g as TransferId, k as WithdrawalId, D as DocumentId, W as WebhookEndpointId, j as WebhookEventId, V as VirtualAccountId, i as VirtualCardId
|
|
2
|
+
import { Y as PublicId, A as AccountId, S as SafeId, d as OrganizationId, c as KycProfileId, b as ExternalAccountId, O as OperationId, C as CorrelationId, f as SubAccountId, B as BalanceLedgerEntryId, a as ApiKeyId, h as TreasuryId, M as MemberId, K as KybProfileId, N as NextAction, P as PaymentId, g as TransferId, k as WithdrawalId, D as DocumentId, W as WebhookEndpointId, j as WebhookEventId, V as VirtualAccountId, i as VirtualCardId } from './next-action-DkrwXYay.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SDK surface types.
|
|
@@ -131,7 +131,18 @@ type Treasury = Rebrand<types.Treasury, TreasuryId> & {
|
|
|
131
131
|
};
|
|
132
132
|
type KycProfile = Rebrand<types.KycProfile, KycProfileId>;
|
|
133
133
|
type KybProfile = Rebrand<types.KybProfile, KybProfileId>;
|
|
134
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Trust-chain operation summary is sourced from the wire's nested
|
|
136
|
+
* `operation: OperationSummary` field (see resources.mdx §canonical
|
|
137
|
+
* operation envelope). The wire surfaces `correlationId` as a plain
|
|
138
|
+
* string; we override the nested field with the kernel-branded SDK
|
|
139
|
+
* `OperationSummary` so callers get `CorrelationId` / `OperationId`
|
|
140
|
+
* brands. Required at the resource boundary (matches Withdrawal /
|
|
141
|
+
* Payment / Transfer / Organization).
|
|
142
|
+
*/
|
|
143
|
+
type ExternalAccount = Override<Rebrand<types.ExternalAccount, ExternalAccountId>, {
|
|
144
|
+
readonly operation: OperationSummary;
|
|
145
|
+
}>;
|
|
135
146
|
type ExternalAccountKind = types.ExternalAccountKind;
|
|
136
147
|
type PageInfo = types.PageInfo;
|
|
137
148
|
type List<T> = {
|
|
@@ -155,7 +166,15 @@ type Payment = WithStatus<WirePaymentWithBrand, PaymentStatus>;
|
|
|
155
166
|
type CreatePaymentResult = WithStatus<WirePaymentWithBrand, "processing" | "action_required" | "failed">;
|
|
156
167
|
type PaymentParty = types.PaymentParty;
|
|
157
168
|
type WireWithdrawalWithBrand = Rebrand<types.Withdrawal, WithdrawalId>;
|
|
158
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Canon-aligned superset (resources.mdx §withdrawal lifecycle note).
|
|
171
|
+
* Wider than `OperationStatus` because `submitted → completed` is a
|
|
172
|
+
* withdrawal-specific transition driven by external reconciliation
|
|
173
|
+
* the operation envelope cannot witness directly. Slice 1 of
|
|
174
|
+
* Withdrawals v1 (#440) widened this from `PaymentStatus` to match
|
|
175
|
+
* canon.
|
|
176
|
+
*/
|
|
177
|
+
type WithdrawalStatus = "draft" | "action_required" | "processing" | "submitted" | "completed" | "failed" | "canceled";
|
|
159
178
|
type Withdrawal = WithStatus<WireWithdrawalWithBrand, WithdrawalStatus>;
|
|
160
179
|
type CreateWithdrawalResult = WithStatus<WireWithdrawalWithBrand, "processing" | "action_required" | "failed">;
|
|
161
180
|
type WireTransferWithBrand = Rebrand<types.Transfer, TransferId>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as types from '@repo/api-contract/gen/types';
|
|
2
|
-
import { Y as PublicId, A as AccountId, S as SafeId, d as OrganizationId, c as KycProfileId, b as ExternalAccountId, f as SubAccountId, B as BalanceLedgerEntryId, a as ApiKeyId, h as TreasuryId, M as MemberId, K as KybProfileId, N as NextAction, P as PaymentId, g as TransferId, k as WithdrawalId, D as DocumentId, W as WebhookEndpointId, j as WebhookEventId, V as VirtualAccountId, i as VirtualCardId
|
|
2
|
+
import { Y as PublicId, A as AccountId, S as SafeId, d as OrganizationId, c as KycProfileId, b as ExternalAccountId, O as OperationId, C as CorrelationId, f as SubAccountId, B as BalanceLedgerEntryId, a as ApiKeyId, h as TreasuryId, M as MemberId, K as KybProfileId, N as NextAction, P as PaymentId, g as TransferId, k as WithdrawalId, D as DocumentId, W as WebhookEndpointId, j as WebhookEventId, V as VirtualAccountId, i as VirtualCardId } from './next-action-DkrwXYay.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SDK surface types.
|
|
@@ -131,7 +131,18 @@ type Treasury = Rebrand<types.Treasury, TreasuryId> & {
|
|
|
131
131
|
};
|
|
132
132
|
type KycProfile = Rebrand<types.KycProfile, KycProfileId>;
|
|
133
133
|
type KybProfile = Rebrand<types.KybProfile, KybProfileId>;
|
|
134
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Trust-chain operation summary is sourced from the wire's nested
|
|
136
|
+
* `operation: OperationSummary` field (see resources.mdx §canonical
|
|
137
|
+
* operation envelope). The wire surfaces `correlationId` as a plain
|
|
138
|
+
* string; we override the nested field with the kernel-branded SDK
|
|
139
|
+
* `OperationSummary` so callers get `CorrelationId` / `OperationId`
|
|
140
|
+
* brands. Required at the resource boundary (matches Withdrawal /
|
|
141
|
+
* Payment / Transfer / Organization).
|
|
142
|
+
*/
|
|
143
|
+
type ExternalAccount = Override<Rebrand<types.ExternalAccount, ExternalAccountId>, {
|
|
144
|
+
readonly operation: OperationSummary;
|
|
145
|
+
}>;
|
|
135
146
|
type ExternalAccountKind = types.ExternalAccountKind;
|
|
136
147
|
type PageInfo = types.PageInfo;
|
|
137
148
|
type List<T> = {
|
|
@@ -155,7 +166,15 @@ type Payment = WithStatus<WirePaymentWithBrand, PaymentStatus>;
|
|
|
155
166
|
type CreatePaymentResult = WithStatus<WirePaymentWithBrand, "processing" | "action_required" | "failed">;
|
|
156
167
|
type PaymentParty = types.PaymentParty;
|
|
157
168
|
type WireWithdrawalWithBrand = Rebrand<types.Withdrawal, WithdrawalId>;
|
|
158
|
-
|
|
169
|
+
/**
|
|
170
|
+
* Canon-aligned superset (resources.mdx §withdrawal lifecycle note).
|
|
171
|
+
* Wider than `OperationStatus` because `submitted → completed` is a
|
|
172
|
+
* withdrawal-specific transition driven by external reconciliation
|
|
173
|
+
* the operation envelope cannot witness directly. Slice 1 of
|
|
174
|
+
* Withdrawals v1 (#440) widened this from `PaymentStatus` to match
|
|
175
|
+
* canon.
|
|
176
|
+
*/
|
|
177
|
+
type WithdrawalStatus = "draft" | "action_required" | "processing" | "submitted" | "completed" | "failed" | "canceled";
|
|
159
178
|
type Withdrawal = WithStatus<WireWithdrawalWithBrand, WithdrawalStatus>;
|
|
160
179
|
type CreateWithdrawalResult = WithStatus<WireWithdrawalWithBrand, "processing" | "action_required" | "failed">;
|
|
161
180
|
type WireTransferWithBrand = Rebrand<types.Transfer, TransferId>;
|
package/dist/webhooks.d.cts
CHANGED
package/dist/webhooks.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"description": "Headless TypeScript client for Capxul's /v1/* HTTP contract.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
"vitest": "^4.1.2",
|
|
72
72
|
"zod": "^4.3.6",
|
|
73
73
|
"@repo/api-contract": "0.0.0",
|
|
74
|
-
"@repo/config": "0.0.0",
|
|
75
74
|
"@repo/backend": "0.0.0",
|
|
76
75
|
"@repo/observability": "0.0.0",
|
|
77
76
|
"@repo/platform-kernel": "0.0.0",
|
|
77
|
+
"@repo/config": "0.0.0",
|
|
78
78
|
"@repo/typescript-config": "0.0.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|