@capxul/sdk 0.1.0-alpha.6 → 0.1.0-alpha.9

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/dist/index.d.cts CHANGED
@@ -1,36 +1,14 @@
1
- import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-DW_fW9DC.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-DW_fW9DC.cjs';
1
+ import { S as Session, C as CapxulError$1, a as CapxulClient, A as AccountProvisionPersonalInput } from './client-DG6ODWu6.cjs';
2
+ export { b as AccountsClient, c as ApiKeyCreateResult, d as ApiKeysClient, e as AuthBootstrapFlowContext, f as AuthBootstrapFlowError, g as AuthBootstrapFlowEvent, h as AuthBootstrapReason, i as AuthBootstrapToken, j as AuthClient, k as AuthSessionStore, B as BrowserCapxulConfig, l as CapxulAuthConfig, m as CapxulConfig, n as CapxulDataClient, o as CapxulFlowFactories, p as CapxulSigningConfig, q as CompleteBootstrapInput, r as CompleteBootstrapResult, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, s as OrgDocumentsClient, t as OrgPaymentsClient, u as OrgSafesClient, v as OrgTransfersClient, w as OrgTreasuryClient, x as OrgWithdrawalsClient, y as OrganizationsClient, P as PaymentsClient, z as SubAccountsClient, T as TokenTransfer, F as TokenTransferId, G as TokenTransfersClient, I as TokenTransfersListInput, J as TokenTransfersListPage, K as TokenTransfersRetrieveInput, N as TransfersClient, Q as TransportRuntime, R as TransportState, V as VerifyOtpResult, U as VirtualAccountsClient, W as VirtualCardsClient, X as WebhookEndpointCreateResult, Y as WebhookEndpointsClient, Z as WebhookEventsClient, _ as WithdrawalsClient, $ as createAuthBootstrapFlowMachine, a0 as createCapxulClient, a1 as makeHttpTransport, a2 as toTokenTransferId } from './client-DG6ODWu6.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
- import { C as CapxulError$1, a as CapxulErrorCode$1 } from './errors-GgKrSUKp.cjs';
6
+ import { C as CapxulError, a as CapxulErrorCode } 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-X02RbQ2u.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-X02RbQ2u.cjs';
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
-
14
- /**
15
- * Unified error type used across the entire stack: backend, SDK, and frontend.
16
- * One class, one set of codes, one language.
17
- *
18
- * Backend throws CapxulError → withErrorBoundary serializes to ConvexError →
19
- * SDK deserializes back to CapxulError → frontend routes on err.code.
20
- */
21
- type CapxulErrorCode = "NOT_AUTHENTICATED" | "EMAIL_DELIVERY_FAILED" | "API_KEY_INVALID" | "API_KEY_EXPIRED" | "PROFILE_NOT_FOUND" | "SMART_ACCOUNT_MISSING" | "PLAYER_NOT_FOUND" | "ACCOUNT_NOT_FOUND" | "PROVIDER_ERROR" | "INVALID_INPUT" | "ENV_MISSING" | "NOT_IMPLEMENTED" | "VERIFICATION_REQUIRED" | "INSUFFICIENT_BALANCE" | "INVALID_RECIPIENT" | "TRANSACTION_FAILED" | "RATE_LIMITED" | "NETWORK_ERROR" | "PERMISSION_DENIED" | "IDEMPOTENCY_CONFLICT" | "NOT_FOUND" | "OPERATION_CANCELED" | "OPERATION_TIMEOUT" | "ACTION_REQUIRED" | "KYC_REQUIRED" | "POLICY_DENIED" | "SAFE_NOT_READY" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "RECONCILIATION_FAILED" | "INTERNAL_ERROR" | "QUOTE_EXPIRED" | "QUOTE_NOT_FOUND" | "UNKNOWN";
22
- declare class CapxulError extends Error {
23
- readonly code: CapxulErrorCode;
24
- readonly details?: Record<string, unknown>;
25
- readonly correlationId?: string;
26
- readonly layer?: string;
27
- constructor(code: CapxulErrorCode, message: string, options?: {
28
- cause?: unknown;
29
- details?: Record<string, unknown>;
30
- correlationId?: string;
31
- layer?: string;
32
- });
33
- }
34
12
 
35
13
  /**
36
14
  * Auth flow errors may originate from two CapxulError surfaces:
@@ -43,7 +21,7 @@ declare class CapxulError extends Error {
43
21
  * union keeps either origin assignable to `context.error` without an
44
22
  * `as` cast at the call site.
45
23
  */
46
- type AuthFlowError = CapxulError$1 | CapxulError;
24
+ type AuthFlowError = CapxulError | CapxulError$1;
47
25
  type AuthFlowContext = {
48
26
  readonly email: Email | null;
49
27
  readonly session: Session | null;
@@ -142,7 +120,7 @@ declare function createAuthFlowMachine(client: CapxulClient): xstate.StateMachin
142
120
  *
143
121
  * Both share `.code`, `.message`, `.details`, and extend `Error`.
144
122
  */
145
- type ProvisioningFlowError = CapxulError$1 | CapxulError;
123
+ type ProvisioningFlowError = CapxulError | CapxulError$1;
146
124
  type ProvisioningFlowContext = {
147
125
  readonly input: AccountProvisionPersonalInput | null;
148
126
  readonly account: Account | null;
@@ -249,7 +227,7 @@ declare function createProvisioningMachine(client: CapxulClient): xstate.StateMa
249
227
  *
250
228
  * Both share `.code`, `.message`, `.details`, and extend `Error`.
251
229
  */
252
- type OnboardingFlowError = CapxulError$1 | CapxulError;
230
+ type OnboardingFlowError = CapxulError | CapxulError$1;
253
231
  /** Subjects supported by the onboarding flow. */
254
232
  type OnboardingSubjectKind = "account" | "organization";
255
233
  /**
@@ -462,8 +440,8 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
462
440
  * No `default:` arm needed — the compile-time exhaustiveness check is
463
441
  * the contract.
464
442
  */
465
- declare function matchError<Codes extends CapxulErrorCode$1, R>(err: CapxulError$1<Codes>, handlers: {
466
- [K in Codes]: (err: CapxulError$1<K>) => R;
443
+ declare function matchError<Codes extends CapxulErrorCode, R>(err: CapxulError<Codes>, handlers: {
444
+ [K in Codes]: (err: CapxulError<K>) => R;
467
445
  }): R;
468
446
  /**
469
447
  * Exhaustive resource-status dispatch per CANON.md §4.44.
@@ -519,4 +497,4 @@ declare function tryCatch<T>(promise: Promise<T>): Promise<[Error, null] | [null
519
497
  */
520
498
  declare function createLocalSigner(privateKey: `0x${string}`): Account$1;
521
499
 
522
- export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError$1 as CapxulError, CapxulErrorCode$1 as CapxulErrorCode, Email, NextAction, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, OperationId, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, Username, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus, tryCatch };
500
+ export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError, CapxulErrorCode, Email, NextAction, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, OperationId, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, Username, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus, tryCatch };
package/dist/index.d.ts CHANGED
@@ -1,36 +1,14 @@
1
- import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-ChfXWMzO.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-ChfXWMzO.js';
1
+ import { S as Session, C as CapxulError$1, a as CapxulClient, A as AccountProvisionPersonalInput } from './client-ChZrdf3R.js';
2
+ export { b as AccountsClient, c as ApiKeyCreateResult, d as ApiKeysClient, e as AuthBootstrapFlowContext, f as AuthBootstrapFlowError, g as AuthBootstrapFlowEvent, h as AuthBootstrapReason, i as AuthBootstrapToken, j as AuthClient, k as AuthSessionStore, B as BrowserCapxulConfig, l as CapxulAuthConfig, m as CapxulConfig, n as CapxulDataClient, o as CapxulFlowFactories, p as CapxulSigningConfig, q as CompleteBootstrapInput, r as CompleteBootstrapResult, D as DocumentsClient, E as ExternalAccountsClient, H as HttpTransport, L as LocalPrivateKeySignerProvider, M as MeClient, O as OperationsClient, s as OrgDocumentsClient, t as OrgPaymentsClient, u as OrgSafesClient, v as OrgTransfersClient, w as OrgTreasuryClient, x as OrgWithdrawalsClient, y as OrganizationsClient, P as PaymentsClient, z as SubAccountsClient, T as TokenTransfer, F as TokenTransferId, G as TokenTransfersClient, I as TokenTransfersListInput, J as TokenTransfersListPage, K as TokenTransfersRetrieveInput, N as TransfersClient, Q as TransportRuntime, R as TransportState, V as VerifyOtpResult, U as VirtualAccountsClient, W as VirtualCardsClient, X as WebhookEndpointCreateResult, Y as WebhookEndpointsClient, Z as WebhookEventsClient, _ as WithdrawalsClient, $ as createAuthBootstrapFlowMachine, a0 as createCapxulClient, a1 as makeHttpTransport, a2 as toTokenTransferId } from './client-ChZrdf3R.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
- import { C as CapxulError$1, a as CapxulErrorCode$1 } from './errors-QHD5Tlok.js';
6
+ import { C as CapxulError, a as CapxulErrorCode } 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-CYvLP5pP.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-CYvLP5pP.js';
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
-
14
- /**
15
- * Unified error type used across the entire stack: backend, SDK, and frontend.
16
- * One class, one set of codes, one language.
17
- *
18
- * Backend throws CapxulError → withErrorBoundary serializes to ConvexError →
19
- * SDK deserializes back to CapxulError → frontend routes on err.code.
20
- */
21
- type CapxulErrorCode = "NOT_AUTHENTICATED" | "EMAIL_DELIVERY_FAILED" | "API_KEY_INVALID" | "API_KEY_EXPIRED" | "PROFILE_NOT_FOUND" | "SMART_ACCOUNT_MISSING" | "PLAYER_NOT_FOUND" | "ACCOUNT_NOT_FOUND" | "PROVIDER_ERROR" | "INVALID_INPUT" | "ENV_MISSING" | "NOT_IMPLEMENTED" | "VERIFICATION_REQUIRED" | "INSUFFICIENT_BALANCE" | "INVALID_RECIPIENT" | "TRANSACTION_FAILED" | "RATE_LIMITED" | "NETWORK_ERROR" | "PERMISSION_DENIED" | "IDEMPOTENCY_CONFLICT" | "NOT_FOUND" | "OPERATION_CANCELED" | "OPERATION_TIMEOUT" | "ACTION_REQUIRED" | "KYC_REQUIRED" | "POLICY_DENIED" | "SAFE_NOT_READY" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED" | "RECONCILIATION_FAILED" | "INTERNAL_ERROR" | "QUOTE_EXPIRED" | "QUOTE_NOT_FOUND" | "UNKNOWN";
22
- declare class CapxulError extends Error {
23
- readonly code: CapxulErrorCode;
24
- readonly details?: Record<string, unknown>;
25
- readonly correlationId?: string;
26
- readonly layer?: string;
27
- constructor(code: CapxulErrorCode, message: string, options?: {
28
- cause?: unknown;
29
- details?: Record<string, unknown>;
30
- correlationId?: string;
31
- layer?: string;
32
- });
33
- }
34
12
 
35
13
  /**
36
14
  * Auth flow errors may originate from two CapxulError surfaces:
@@ -43,7 +21,7 @@ declare class CapxulError extends Error {
43
21
  * union keeps either origin assignable to `context.error` without an
44
22
  * `as` cast at the call site.
45
23
  */
46
- type AuthFlowError = CapxulError$1 | CapxulError;
24
+ type AuthFlowError = CapxulError | CapxulError$1;
47
25
  type AuthFlowContext = {
48
26
  readonly email: Email | null;
49
27
  readonly session: Session | null;
@@ -142,7 +120,7 @@ declare function createAuthFlowMachine(client: CapxulClient): xstate.StateMachin
142
120
  *
143
121
  * Both share `.code`, `.message`, `.details`, and extend `Error`.
144
122
  */
145
- type ProvisioningFlowError = CapxulError$1 | CapxulError;
123
+ type ProvisioningFlowError = CapxulError | CapxulError$1;
146
124
  type ProvisioningFlowContext = {
147
125
  readonly input: AccountProvisionPersonalInput | null;
148
126
  readonly account: Account | null;
@@ -249,7 +227,7 @@ declare function createProvisioningMachine(client: CapxulClient): xstate.StateMa
249
227
  *
250
228
  * Both share `.code`, `.message`, `.details`, and extend `Error`.
251
229
  */
252
- type OnboardingFlowError = CapxulError$1 | CapxulError;
230
+ type OnboardingFlowError = CapxulError | CapxulError$1;
253
231
  /** Subjects supported by the onboarding flow. */
254
232
  type OnboardingSubjectKind = "account" | "organization";
255
233
  /**
@@ -462,8 +440,8 @@ declare function createOnboardingFlowMachine(client: CapxulClient): xstate.State
462
440
  * No `default:` arm needed — the compile-time exhaustiveness check is
463
441
  * the contract.
464
442
  */
465
- declare function matchError<Codes extends CapxulErrorCode$1, R>(err: CapxulError$1<Codes>, handlers: {
466
- [K in Codes]: (err: CapxulError$1<K>) => R;
443
+ declare function matchError<Codes extends CapxulErrorCode, R>(err: CapxulError<Codes>, handlers: {
444
+ [K in Codes]: (err: CapxulError<K>) => R;
467
445
  }): R;
468
446
  /**
469
447
  * Exhaustive resource-status dispatch per CANON.md §4.44.
@@ -519,4 +497,4 @@ declare function tryCatch<T>(promise: Promise<T>): Promise<[Error, null] | [null
519
497
  */
520
498
  declare function createLocalSigner(privateKey: `0x${string}`): Account$1;
521
499
 
522
- export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError$1 as CapxulError, CapxulErrorCode$1 as CapxulErrorCode, Email, NextAction, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, OperationId, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, Username, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus, tryCatch };
500
+ export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError, CapxulErrorCode, Email, NextAction, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, OperationId, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, Username, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus, tryCatch };