@capxul/sdk 0.1.0-alpha.4 → 0.1.0-alpha.8
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 +21 -0
- package/README.md +87 -5
- package/dist/{client-CcCtq5XO.d.ts → client-ByzDfG98.d.ts} +77 -34
- package/dist/{client-CXRKtbfn.d.cts → client-DDAVWtzJ.d.cts} +77 -34
- package/dist/client.cjs +894 -302
- package/dist/client.d.cts +2 -3
- package/dist/client.d.ts +2 -3
- package/dist/client.js +894 -302
- package/dist/index.cjs +1000 -418
- package/dist/index.d.cts +9 -10
- package/dist/index.d.ts +9 -10
- package/dist/index.js +1000 -418
- package/dist/types-PM4AQRLP.d.ts +1136 -0
- package/dist/types-hfcOE7Oi.d.cts +1136 -0
- package/dist/webhooks.d.cts +1 -2
- package/dist/webhooks.d.ts +1 -2
- package/package.json +5 -5
- package/dist/types-75UokagF.d.ts +0 -202
- package/dist/types-DVWojoy4.d.cts +0 -202
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-
|
|
2
|
-
export { a as AccountsClient, b as ApiKeyCreateResult, c as ApiKeysClient, d as AuthClient, e as AuthSessionStore, B as BrowserCapxulConfig, f as CapxulAuthConfig, g as CapxulConfig, h as CapxulDataClient, i as CapxulFlowFactories, j as CapxulSigningConfig, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, k as OrgDocumentsClient, l as OrgPaymentsClient, m as OrgSafesClient, n as OrgTransfersClient, o as OrgTreasuryClient, p as OrgWithdrawalsClient, q as OrganizationsClient, P as PaymentsClient, r as SubAccountsClient, T as TokenTransfer, s as TokenTransferId, t as TokenTransfersClient, u as TokenTransfersListInput, v as TokenTransfersListPage, w as TokenTransfersRetrieveInput, x as TransfersClient, y as TransportRuntime, z as TransportState, V as VirtualAccountsClient, F as VirtualCardsClient, W as WebhookEndpointCreateResult, G as WebhookEndpointsClient, I as WebhookEventsClient, J as WithdrawalsClient, K as createCapxulClient, N as makeHttpTransport, Q as toTokenTransferId } from './client-
|
|
1
|
+
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-DDAVWtzJ.cjs';
|
|
2
|
+
export { a as AccountsClient, b as ApiKeyCreateResult, c as ApiKeysClient, d as AuthClient, e as AuthSessionStore, B as BrowserCapxulConfig, f as CapxulAuthConfig, g as CapxulConfig, h as CapxulDataClient, i as CapxulFlowFactories, j as CapxulSigningConfig, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, k as OrgDocumentsClient, l as OrgPaymentsClient, m as OrgSafesClient, n as OrgTransfersClient, o as OrgTreasuryClient, p as OrgWithdrawalsClient, q as OrganizationsClient, P as PaymentsClient, r as SubAccountsClient, T as TokenTransfer, s as TokenTransferId, t as TokenTransfersClient, u as TokenTransfersListInput, v as TokenTransfersListPage, w as TokenTransfersRetrieveInput, x as TransfersClient, y as TransportRuntime, z as TransportState, V as VirtualAccountsClient, F as VirtualCardsClient, W as WebhookEndpointCreateResult, G as WebhookEndpointsClient, I as WebhookEventsClient, J as WithdrawalsClient, K as createCapxulClient, N as makeHttpTransport, Q as toTokenTransferId } from './client-DDAVWtzJ.cjs';
|
|
3
3
|
import * as xstate from 'xstate';
|
|
4
4
|
import { E as Email, U as Username, O as OperationId, N as NextAction } from './next-action-DkrwXYay.cjs';
|
|
5
5
|
export { A as AccountId, a as ApiKeyId, B as BalanceLedgerEntryId, C as CorrelationId, D as DocumentId, b as ExternalAccountId, K as KybProfileId, c as KycProfileId, M as MemberId, d as OrganizationId, P as PaymentId, e as PhoneNumber, S as SafeId, f as SubAccountId, T as TransactionIntentId, g as TransferId, h as TreasuryId, V as VirtualAccountId, i as VirtualCardId, W as WebhookEndpointId, j as WebhookEventId, k as WithdrawalId, t as toAccountId, l as toApiKeyId, m as toBalanceLedgerEntryId, n as toDocumentId, o as toEmail, p as toExternalAccountId, q as toKybProfileId, r as toKycProfileId, s as toMemberId, u as toOperationId, v as toOrganizationId, w as toPaymentId, x as toPhoneNumber, y as toSafeId, z as toSubAccountId, F as toTransferId, G as toTreasuryId, H as toUsername, I as toVirtualAccountId, J as toVirtualCardId, L as toWebhookEndpointId, Q as toWebhookEventId, R as toWithdrawalId } from './next-action-DkrwXYay.cjs';
|
|
6
6
|
import { C as CapxulError$1, a as CapxulErrorCode$1 } from './errors-GgKrSUKp.cjs';
|
|
7
7
|
export { b as CapxulErrorDetails, c as CapxulErrorEnvelope, d as CapxulResult } from './errors-GgKrSUKp.cjs';
|
|
8
|
-
import { A as Account } from './types-
|
|
9
|
-
export { a as AccountLookupResult, b as ApiKey, c as ApiKeyEnvironment, d as ApiKeyType, B as BalanceLedgerEntry, e as BankStatementDocument, C as CreatePaymentResult, f as CreateTransferResult, g as CreateWithdrawalResult, D as Document, E as ExternalAccount, h as ExternalAccountKind, I as InvoiceDocument, K as KybProfile, i as KycProfile, j as KycUploadDocument, L as List, M as Member, k as Money, O as Operation, l as OperationStatus, m as OperationSummary, n as Organization, P as PageInfo, o as Payment, p as PaymentParty, q as PaymentStatus, r as PayrollRunDocument, s as PayrollScheduleDocument, R as ReceiptDocument, S as Safe, t as Scope, u as Settlement, v as SubAccount, w as SubAccountOwnerKind, T as TaxFormDocument, x as TimestampIso, y as Transfer, z as TransferCustody, F as TransferEndpoint, G as TransferFx, H as TransferStatus, J as Treasury, U as UserIdentifier, V as VirtualAccount, N as VirtualAccountOwnerKind, Q as VirtualCard, W as VirtualCardLimits, X as VirtualCardOwnerKind, Y as WebhookEndpoint, Z as WebhookEvent, _ as Withdrawal, $ as WithdrawalStatus } from './types-
|
|
8
|
+
import { A as Account } from './types-hfcOE7Oi.cjs';
|
|
9
|
+
export { a as AccountLookupResult, b as ApiKey, c as ApiKeyEnvironment, d as ApiKeyType, B as BalanceLedgerEntry, e as BankStatementDocument, C as CreatePaymentResult, f as CreateTransferResult, g as CreateWithdrawalResult, D as Document, E as ExternalAccount, h as ExternalAccountKind, I as InvoiceDocument, K as KybProfile, i as KycProfile, j as KycUploadDocument, L as List, M as Member, k as Money, O as Operation, l as OperationStatus, m as OperationSummary, n as Organization, P as PageInfo, o as Payment, p as PaymentParty, q as PaymentStatus, r as PayrollRunDocument, s as PayrollScheduleDocument, R as ReceiptDocument, S as Safe, t as Scope, u as Settlement, v as SubAccount, w as SubAccountOwnerKind, T as TaxFormDocument, x as TimestampIso, y as Transfer, z as TransferCustody, F as TransferEndpoint, G as TransferFx, H as TransferStatus, J as Treasury, U as UserIdentifier, V as VirtualAccount, N as VirtualAccountOwnerKind, Q as VirtualCard, W as VirtualCardLimits, X as VirtualCardOwnerKind, Y as WebhookEndpoint, Z as WebhookEvent, _ as Withdrawal, $ as WithdrawalStatus } from './types-hfcOE7Oi.cjs';
|
|
10
10
|
import { Account as Account$1 } from 'viem';
|
|
11
11
|
export { WebhookVerificationOptions, WebhookVerificationResult, verifyWebhook } from './webhooks.cjs';
|
|
12
|
-
import '@repo/api-contract/gen/types';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Unified error type used across the entire stack: backend, SDK, and frontend.
|
|
@@ -119,7 +118,7 @@ declare function createAuthFlowMachine(client: CapxulClient): xstate.StateMachin
|
|
|
119
118
|
} | {
|
|
120
119
|
type: "trackSignedOut";
|
|
121
120
|
params: unknown;
|
|
122
|
-
}, never, never, "
|
|
121
|
+
}, never, never, "error" | "idle" | "sending_otp" | "otp_requested" | "verifying" | "authenticated" | "signing_out", string, xstate.NonReducibleUnknown, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
123
122
|
id: "auth";
|
|
124
123
|
states: {
|
|
125
124
|
readonly idle: {};
|
|
@@ -219,7 +218,7 @@ declare function createProvisioningMachine(client: CapxulClient): xstate.StateMa
|
|
|
219
218
|
}, {
|
|
220
219
|
type: "hasInput";
|
|
221
220
|
params: unknown;
|
|
222
|
-
}, never, "
|
|
221
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
223
222
|
readonly input: AccountProvisionPersonalInput;
|
|
224
223
|
}, {
|
|
225
224
|
readonly account: Account;
|
|
@@ -327,7 +326,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
327
326
|
}, {
|
|
328
327
|
type: "hasInput";
|
|
329
328
|
params: unknown;
|
|
330
|
-
}, never, "
|
|
329
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
331
330
|
readonly input: AccountProvisionPersonalInput;
|
|
332
331
|
}, {
|
|
333
332
|
readonly account: Account;
|
|
@@ -369,7 +368,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
369
368
|
}, {
|
|
370
369
|
type: "hasInput";
|
|
371
370
|
params: unknown;
|
|
372
|
-
}, never, "
|
|
371
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
373
372
|
readonly input: AccountProvisionPersonalInput;
|
|
374
373
|
}, {
|
|
375
374
|
readonly account: Account;
|
|
@@ -439,7 +438,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
439
438
|
} | {
|
|
440
439
|
type: "childReportedError";
|
|
441
440
|
params: unknown;
|
|
442
|
-
}, never, "
|
|
441
|
+
}, never, "error" | "provisioning" | "profile" | "complete" | "action_required", string, xstate.NonReducibleUnknown, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
443
442
|
id: "onboarding";
|
|
444
443
|
states: {
|
|
445
444
|
readonly profile: {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-
|
|
2
|
-
export { a as AccountsClient, b as ApiKeyCreateResult, c as ApiKeysClient, d as AuthClient, e as AuthSessionStore, B as BrowserCapxulConfig, f as CapxulAuthConfig, g as CapxulConfig, h as CapxulDataClient, i as CapxulFlowFactories, j as CapxulSigningConfig, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, k as OrgDocumentsClient, l as OrgPaymentsClient, m as OrgSafesClient, n as OrgTransfersClient, o as OrgTreasuryClient, p as OrgWithdrawalsClient, q as OrganizationsClient, P as PaymentsClient, r as SubAccountsClient, T as TokenTransfer, s as TokenTransferId, t as TokenTransfersClient, u as TokenTransfersListInput, v as TokenTransfersListPage, w as TokenTransfersRetrieveInput, x as TransfersClient, y as TransportRuntime, z as TransportState, V as VirtualAccountsClient, F as VirtualCardsClient, W as WebhookEndpointCreateResult, G as WebhookEndpointsClient, I as WebhookEventsClient, J as WithdrawalsClient, K as createCapxulClient, N as makeHttpTransport, Q as toTokenTransferId } from './client-
|
|
1
|
+
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-ByzDfG98.js';
|
|
2
|
+
export { a as AccountsClient, b as ApiKeyCreateResult, c as ApiKeysClient, d as AuthClient, e as AuthSessionStore, B as BrowserCapxulConfig, f as CapxulAuthConfig, g as CapxulConfig, h as CapxulDataClient, i as CapxulFlowFactories, j as CapxulSigningConfig, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, k as OrgDocumentsClient, l as OrgPaymentsClient, m as OrgSafesClient, n as OrgTransfersClient, o as OrgTreasuryClient, p as OrgWithdrawalsClient, q as OrganizationsClient, P as PaymentsClient, r as SubAccountsClient, T as TokenTransfer, s as TokenTransferId, t as TokenTransfersClient, u as TokenTransfersListInput, v as TokenTransfersListPage, w as TokenTransfersRetrieveInput, x as TransfersClient, y as TransportRuntime, z as TransportState, V as VirtualAccountsClient, F as VirtualCardsClient, W as WebhookEndpointCreateResult, G as WebhookEndpointsClient, I as WebhookEventsClient, J as WithdrawalsClient, K as createCapxulClient, N as makeHttpTransport, Q as toTokenTransferId } from './client-ByzDfG98.js';
|
|
3
3
|
import * as xstate from 'xstate';
|
|
4
4
|
import { E as Email, U as Username, O as OperationId, N as NextAction } from './next-action-DkrwXYay.js';
|
|
5
5
|
export { A as AccountId, a as ApiKeyId, B as BalanceLedgerEntryId, C as CorrelationId, D as DocumentId, b as ExternalAccountId, K as KybProfileId, c as KycProfileId, M as MemberId, d as OrganizationId, P as PaymentId, e as PhoneNumber, S as SafeId, f as SubAccountId, T as TransactionIntentId, g as TransferId, h as TreasuryId, V as VirtualAccountId, i as VirtualCardId, W as WebhookEndpointId, j as WebhookEventId, k as WithdrawalId, t as toAccountId, l as toApiKeyId, m as toBalanceLedgerEntryId, n as toDocumentId, o as toEmail, p as toExternalAccountId, q as toKybProfileId, r as toKycProfileId, s as toMemberId, u as toOperationId, v as toOrganizationId, w as toPaymentId, x as toPhoneNumber, y as toSafeId, z as toSubAccountId, F as toTransferId, G as toTreasuryId, H as toUsername, I as toVirtualAccountId, J as toVirtualCardId, L as toWebhookEndpointId, Q as toWebhookEventId, R as toWithdrawalId } from './next-action-DkrwXYay.js';
|
|
6
6
|
import { C as CapxulError$1, a as CapxulErrorCode$1 } from './errors-QHD5Tlok.js';
|
|
7
7
|
export { b as CapxulErrorDetails, c as CapxulErrorEnvelope, d as CapxulResult } from './errors-QHD5Tlok.js';
|
|
8
|
-
import { A as Account } from './types-
|
|
9
|
-
export { a as AccountLookupResult, b as ApiKey, c as ApiKeyEnvironment, d as ApiKeyType, B as BalanceLedgerEntry, e as BankStatementDocument, C as CreatePaymentResult, f as CreateTransferResult, g as CreateWithdrawalResult, D as Document, E as ExternalAccount, h as ExternalAccountKind, I as InvoiceDocument, K as KybProfile, i as KycProfile, j as KycUploadDocument, L as List, M as Member, k as Money, O as Operation, l as OperationStatus, m as OperationSummary, n as Organization, P as PageInfo, o as Payment, p as PaymentParty, q as PaymentStatus, r as PayrollRunDocument, s as PayrollScheduleDocument, R as ReceiptDocument, S as Safe, t as Scope, u as Settlement, v as SubAccount, w as SubAccountOwnerKind, T as TaxFormDocument, x as TimestampIso, y as Transfer, z as TransferCustody, F as TransferEndpoint, G as TransferFx, H as TransferStatus, J as Treasury, U as UserIdentifier, V as VirtualAccount, N as VirtualAccountOwnerKind, Q as VirtualCard, W as VirtualCardLimits, X as VirtualCardOwnerKind, Y as WebhookEndpoint, Z as WebhookEvent, _ as Withdrawal, $ as WithdrawalStatus } from './types-
|
|
8
|
+
import { A as Account } from './types-PM4AQRLP.js';
|
|
9
|
+
export { a as AccountLookupResult, b as ApiKey, c as ApiKeyEnvironment, d as ApiKeyType, B as BalanceLedgerEntry, e as BankStatementDocument, C as CreatePaymentResult, f as CreateTransferResult, g as CreateWithdrawalResult, D as Document, E as ExternalAccount, h as ExternalAccountKind, I as InvoiceDocument, K as KybProfile, i as KycProfile, j as KycUploadDocument, L as List, M as Member, k as Money, O as Operation, l as OperationStatus, m as OperationSummary, n as Organization, P as PageInfo, o as Payment, p as PaymentParty, q as PaymentStatus, r as PayrollRunDocument, s as PayrollScheduleDocument, R as ReceiptDocument, S as Safe, t as Scope, u as Settlement, v as SubAccount, w as SubAccountOwnerKind, T as TaxFormDocument, x as TimestampIso, y as Transfer, z as TransferCustody, F as TransferEndpoint, G as TransferFx, H as TransferStatus, J as Treasury, U as UserIdentifier, V as VirtualAccount, N as VirtualAccountOwnerKind, Q as VirtualCard, W as VirtualCardLimits, X as VirtualCardOwnerKind, Y as WebhookEndpoint, Z as WebhookEvent, _ as Withdrawal, $ as WithdrawalStatus } from './types-PM4AQRLP.js';
|
|
10
10
|
import { Account as Account$1 } from 'viem';
|
|
11
11
|
export { WebhookVerificationOptions, WebhookVerificationResult, verifyWebhook } from './webhooks.js';
|
|
12
|
-
import '@repo/api-contract/gen/types';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Unified error type used across the entire stack: backend, SDK, and frontend.
|
|
@@ -119,7 +118,7 @@ declare function createAuthFlowMachine(client: CapxulClient): xstate.StateMachin
|
|
|
119
118
|
} | {
|
|
120
119
|
type: "trackSignedOut";
|
|
121
120
|
params: unknown;
|
|
122
|
-
}, never, never, "
|
|
121
|
+
}, never, never, "error" | "idle" | "sending_otp" | "otp_requested" | "verifying" | "authenticated" | "signing_out", string, xstate.NonReducibleUnknown, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
123
122
|
id: "auth";
|
|
124
123
|
states: {
|
|
125
124
|
readonly idle: {};
|
|
@@ -219,7 +218,7 @@ declare function createProvisioningMachine(client: CapxulClient): xstate.StateMa
|
|
|
219
218
|
}, {
|
|
220
219
|
type: "hasInput";
|
|
221
220
|
params: unknown;
|
|
222
|
-
}, never, "
|
|
221
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
223
222
|
readonly input: AccountProvisionPersonalInput;
|
|
224
223
|
}, {
|
|
225
224
|
readonly account: Account;
|
|
@@ -327,7 +326,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
327
326
|
}, {
|
|
328
327
|
type: "hasInput";
|
|
329
328
|
params: unknown;
|
|
330
|
-
}, never, "
|
|
329
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
331
330
|
readonly input: AccountProvisionPersonalInput;
|
|
332
331
|
}, {
|
|
333
332
|
readonly account: Account;
|
|
@@ -369,7 +368,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
369
368
|
}, {
|
|
370
369
|
type: "hasInput";
|
|
371
370
|
params: unknown;
|
|
372
|
-
}, never, "
|
|
371
|
+
}, never, "done" | "error" | "idle" | "starting" | "running", string, {
|
|
373
372
|
readonly input: AccountProvisionPersonalInput;
|
|
374
373
|
}, {
|
|
375
374
|
readonly account: Account;
|
|
@@ -439,7 +438,7 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
|
|
|
439
438
|
} | {
|
|
440
439
|
type: "childReportedError";
|
|
441
440
|
params: unknown;
|
|
442
|
-
}, never, "
|
|
441
|
+
}, never, "error" | "provisioning" | "profile" | "complete" | "action_required", string, xstate.NonReducibleUnknown, xstate.NonReducibleUnknown, xstate.EventObject, xstate.MetaObject, {
|
|
443
442
|
id: "onboarding";
|
|
444
443
|
states: {
|
|
445
444
|
readonly profile: {};
|