@capxul/sdk 0.1.0-alpha.0 → 0.1.0-alpha.11
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 +136 -0
- package/README.md +87 -5
- package/dist/{client-o4R-ZFh2.d.ts → client-DSxth_GE.d.cts} +467 -117
- package/dist/{client-BNGGubL2.d.cts → client-xqKjPV9I.d.ts} +467 -117
- package/dist/client.cjs +2141 -476
- package/dist/client.d.cts +4 -5
- package/dist/client.d.ts +4 -5
- package/dist/client.js +2141 -476
- package/dist/errors-GgKrSUKp.d.cts +70 -0
- package/dist/errors-QHD5Tlok.d.ts +70 -0
- package/dist/errors.d.cts +2 -55
- package/dist/errors.d.ts +2 -55
- package/dist/index.cjs +2427 -764
- package/dist/index.d.cts +16 -11
- package/dist/index.d.ts +16 -11
- package/dist/index.js +2425 -765
- package/dist/next-action-DkrwXYay.d.cts +177 -0
- package/dist/next-action-DkrwXYay.d.ts +177 -0
- package/dist/types-PM4AQRLP.d.ts +1136 -0
- package/dist/types-hfcOE7Oi.d.cts +1136 -0
- package/dist/webhooks.d.cts +2 -3
- package/dist/webhooks.d.ts +2 -3
- package/package.json +12 -11
- package/dist/types-Cokyqgwm.d.cts +0 -202
- package/dist/types-Cokyqgwm.d.ts +0 -202
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-
|
|
2
|
-
export {
|
|
1
|
+
import { S as Session, C as CapxulError$1, a as CapxulClient, A as AccountProvisionPersonalInput } from './client-DSxth_GE.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-DSxth_GE.cjs';
|
|
3
3
|
import * as xstate from 'xstate';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
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-Cokyqgwm.cjs';
|
|
4
|
+
import { E as Email, U as Username, O as OperationId, N as NextAction } from './next-action-DkrwXYay.cjs';
|
|
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, a as CapxulErrorCode } from './errors-GgKrSUKp.cjs';
|
|
7
|
+
export { b as CapxulErrorDetails, c as CapxulErrorEnvelope, d as CapxulResult } from './errors-GgKrSUKp.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';
|
|
11
10
|
import { Account as Account$1 } from 'viem';
|
|
12
11
|
export { WebhookVerificationOptions, WebhookVerificationResult, verifyWebhook } from './webhooks.cjs';
|
|
13
|
-
import '@repo/api-contract/gen/types';
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* Auth flow errors may originate from two CapxulError surfaces:
|
|
@@ -480,6 +478,13 @@ declare function matchAction<A extends NextAction, R>(action: A, handlers: {
|
|
|
480
478
|
}>) => R;
|
|
481
479
|
}): R;
|
|
482
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Go-style error handling for async calls.
|
|
483
|
+
* Returns [error, null] on failure, [null, value] on success.
|
|
484
|
+
* Pure utility — no side effects, no reporter.
|
|
485
|
+
*/
|
|
486
|
+
declare function tryCatch<T>(promise: Promise<T>): Promise<[Error, null] | [null, T]>;
|
|
487
|
+
|
|
483
488
|
/**
|
|
484
489
|
* Convenience constructor for a viem `Account` backed by a raw private
|
|
485
490
|
* key — the CLI / server-side signer per CANON.md §4.28.
|
|
@@ -492,4 +497,4 @@ declare function matchAction<A extends NextAction, R>(action: A, handlers: {
|
|
|
492
497
|
*/
|
|
493
498
|
declare function createLocalSigner(privateKey: `0x${string}`): Account$1;
|
|
494
499
|
|
|
495
|
-
export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus };
|
|
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,16 +1,14 @@
|
|
|
1
|
-
import { S as Session, C as CapxulClient, A as AccountProvisionPersonalInput } from './client-
|
|
2
|
-
export {
|
|
1
|
+
import { S as Session, C as CapxulError$1, a as CapxulClient, A as AccountProvisionPersonalInput } from './client-xqKjPV9I.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-xqKjPV9I.js';
|
|
3
3
|
import * as xstate from 'xstate';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
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-Cokyqgwm.js';
|
|
4
|
+
import { E as Email, U as Username, O as OperationId, N as NextAction } from './next-action-DkrwXYay.js';
|
|
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, a as CapxulErrorCode } from './errors-QHD5Tlok.js';
|
|
7
|
+
export { b as CapxulErrorDetails, c as CapxulErrorEnvelope, d as CapxulResult } from './errors-QHD5Tlok.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';
|
|
11
10
|
import { Account as Account$1 } from 'viem';
|
|
12
11
|
export { WebhookVerificationOptions, WebhookVerificationResult, verifyWebhook } from './webhooks.js';
|
|
13
|
-
import '@repo/api-contract/gen/types';
|
|
14
12
|
|
|
15
13
|
/**
|
|
16
14
|
* Auth flow errors may originate from two CapxulError surfaces:
|
|
@@ -480,6 +478,13 @@ declare function matchAction<A extends NextAction, R>(action: A, handlers: {
|
|
|
480
478
|
}>) => R;
|
|
481
479
|
}): R;
|
|
482
480
|
|
|
481
|
+
/**
|
|
482
|
+
* Go-style error handling for async calls.
|
|
483
|
+
* Returns [error, null] on failure, [null, value] on success.
|
|
484
|
+
* Pure utility — no side effects, no reporter.
|
|
485
|
+
*/
|
|
486
|
+
declare function tryCatch<T>(promise: Promise<T>): Promise<[Error, null] | [null, T]>;
|
|
487
|
+
|
|
483
488
|
/**
|
|
484
489
|
* Convenience constructor for a viem `Account` backed by a raw private
|
|
485
490
|
* key — the CLI / server-side signer per CANON.md §4.28.
|
|
@@ -492,4 +497,4 @@ declare function matchAction<A extends NextAction, R>(action: A, handlers: {
|
|
|
492
497
|
*/
|
|
493
498
|
declare function createLocalSigner(privateKey: `0x${string}`): Account$1;
|
|
494
499
|
|
|
495
|
-
export { Account, AccountProvisionPersonalInput, type AuthFlowContext, type AuthFlowError, type AuthFlowEvent, CapxulClient, CapxulError, type OnboardingFlowContext, type OnboardingFlowError, type OnboardingFlowEvent, type OnboardingProfileInput, type OnboardingSubjectKind, type ProvisioningFlowContext, type ProvisioningFlowError, type ProvisioningFlowEvent, type ProvisioningFlowInput, type ProvisioningFlowOutput, Session, createAuthFlowMachine, createLocalSigner, createOnboardingFlowMachine, createProvisioningMachine as createProvisioningFlowMachine, matchAction, matchError, matchStatus };
|
|
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 };
|