@capxul/sdk 4.20.0-beta.26 → 4.20.0-beta.27

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.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as CurrentUserMethods, $a as NormalizedCapxulOperation, $i as FixedOfferDraft, $n as OrganizationPaymentsMethods, $o as CHAIN_UPSTREAMS, $r as CompletedPersonProfile, $t as PermissionRevokeInput, A as assetSymbolFor, Aa as InvitationId, Ai as PaymentDocumentReadRef, An as AddressBookMethods, Ao as toAccountId, Ar as MeMethods, At as PayrollGroupsMethods, B as CreateCapxulClientInput, Ba as OfferedAuthority, Bi as SignerStatus, Bn as CreateOfferCheckoutInput, Bo as AuthUserId, Br as ActivityItem, Bt as PayrollGroupInputSchema, C as OpenfortBrowserAuth, Ca as OrganizationSetupSnapshot, Ci as PaymentsPayOptions, Cn as DestinationsMethods, Co as PermissionId, Cr as Approval, Ct as decodePayrollRunInput, D as createOpenfortBrowserSigner, Da as EndingReason, Di as PaymentInstructionInput, Dn as AddressBookAddInput, Do as toPermissionId, Dr as AccountMethods, Dt as PayrollGroup, Ea as AuthorityRef, Ei as PaymentDocumentOptionsSchema, En as ActorRelationshipMethods, Eo as toPermissionAssignmentId, Er as isSettingUpLifecycle, Et as PayrollEngagementTerms, F as MoneyParseError, Fa as InvitationTarget, Fi as ActorRef, Fn as InboxApproveInput, Fo as Handle, Fr as requestPhase, Ft as PayrollRunStatus, G as UploadImageResult, Ga as Permission, Gi as AccountRequirement, Gn as Ref, Go as AssetAmount, Gr as ActivityRange, Gt as PermissionChangeInput, H as IdentityRuntime, Ha as PermissionReplacementPreview, Hi as injectedWalletSigner, Hn as PayRequestRegisteredInput, Ho as EVM_ADDRESS_RE, Hr as ActivityListParams, Ht as decodePermissionIntent, I as MoneyParseErrorReason, Ia as InvitationView, Ii as fingerprintPaymentIntent, In as InboxFulfillOptions, Io as PartyId, Ir as ActivityAnnotation, It as PayrollRuns, J as Destination$1, Ji as localPrivateKeyAccountProvider, Jn as TargetsMethods, Jo as toAssetId, Jr as ActivitySummaryParams, Jt as PermissionOptions, K as SystemHealth, Ki as Eip1193Provider, Kn as ResolvedTarget, Ko as AssetId, Kr as ActivityReference, Kt as PermissionCreateInput, L as isMoneyParseError, La as InviteGrant, Li as CapxulDigestSigner, Ln as InboxItem, Lo as toHandle, Lr as ActivityAnnotationInput, Lt as PayrollTermsUnit, M as parseAssetAmount, Ma as InvitationPageInput, Mi as PaymentDocumentVerification, Mn as ActorRequestIssueInput, Mo as TesterKind, Mr as ActivityPhase, Mt as PayrollOptions, N as requireAsset, Na as InvitationPhase, Ni as PAYMENT_DIRECTIONS, Nn as ActorRequestsMethods, No as toCountryCode, Nr as inboxPhase, Nt as PayrollRun, O as CAPXUL_PAYMENTS_V2_ADDRESS, Oa as GranteeRef, Oi as SupportingReceiptInput, On as AddressBookEntry, Oo as Account, Or as DepositInstructions, Ot as PayrollGroupInput, P as toRaw, Pa as InvitationRecovery, Pi as PAYMENT_STATUSES, Pn as OffersMethods, Po as HANDLE_RE, Pr as paymentPhase, Pt as PayrollRunItemInput, Q as CurrentUserContext, Qa as CapxulOperation, Qi as FixedOffer, Qn as OrganizationPaymentRetryPreview, Qo as isCapxulError, Qr as PaymentDocumentsMethods, Qt as PermissionReplaceInput, R as parseMoney, Ra as InviteInput, Ri as CapxulSigner, Rn as InboxMethods, Ro as toPartyId, Rr as ActivityDetail, Rt as PayrollRunSnapshot, S as devPrivateKeySigner, Sa as OrganizationSetupPageInput, Si as PaymentsPayInput, Sn as DestinationRemoveInput, So as BudgetId, Sr as OrganizationApprovalInput, St as RoleView, T as OpenfortBrowserSignerBootstrap, Ta as Unsubscribe, Ti as PaymentDocumentOptions, Tn as ActorProfileMethods, To as toBudgetId, Tr as AccountSetupStep, Tt as AuthorizeRunOptions, U as IdentityRuntimeSendResult, Ua as BudgetIntent, Ui as AccountProvider, Un as isCheckoutSettlementConsumed, Uo as toAddress, Ur as ActivityMethods, Ut as PermissionAssignInput, V as IdentityProfileDetails, Va as SpendingScope, Vi as SignerStatusStore, Vn as PayInvoiceRegisteredInput, Vo as Address, Vr as ActivityKind, Vt as PayrollRunDetail, W as MediaMethods, Wa as CurrentPolicy, Wi as AccountProviderSource, Wn as RecipientResolution, Wo as Errors, Wr as ActivityPage, Wt as PermissionAssignmentEffect, X as isClaimed, Xa as TelemetryPort, Xi as CheckoutReconciliation, Xn as OrganizationPaymentInput, Xo as CapxulError, Xr as MovementActivityEvidence, Xt as PermissionPrepared, Y as destination, Yi as CheckoutReceipt, Yn as OrganizationPaymentBatchInput, Yo as toCurrencyCode, Yr as ActivitySummaryTotal, Yt as PermissionPolicyChange, Z as isRestoring, Za as CAPXUL_OPERATIONS, Zi as CheckoutState, Zn as OrganizationPaymentItemInput, Zo as CapxulErrorDetails, Zr as PaymentActivityEvidence, Zt as PermissionReadResult, _ as OpenfortEmbeddedWalletApi, _a as RequestPaymentConfirmation, _i as PaymentSnapshot, _n as DestinationAddInput, _o as OrgId, _r as AssetMetadata, _t as OrgView, a as captureException, aa as InvoiceCheckoutPreparation, ai as PersonOnboardingInput, an as InvitationSubscriptionOptions, ao as ObservationContext, ar as FinancialOpsMethods, as as CAPXUL_ERROR_CODES, at as IdentityEvent, b as DevPrivateKeySignerInput, ba as OrganizationSetup, bi as PaymentTiming, bn as DestinationPayload, bo as PayrollRunId, br as ApprovalWaitOptions, bt as OrganizationAuditLogItem, c as createCapxulClient, ca as InvoiceCheckoutSummary, ci as IdentityMethods, cn as InvitePrepared, cr as positionPeg, ct as OrgLane, d as PostHogObservabilityClient, da as PreparedInvoiceCheckoutExecution, di as Payment, dn as OwnInvitationsMethod, dr as AccountsMethods, dt as AssignmentProjection, ea as FixedOfferDraftSchema, ei as OnboardingMethods, en as PermissionCommandSnapshot, eo as isCapxulOperation, er as OfframpMethods, es as ChainCause, et as AuthMethods, f as PostHogObservabilityOptions, fa as PreparedRequestCheckoutExecution, fi as PaymentDirection, fn as Budget, fo as ActorReference, fr as Rate, ft as MemberIdentityProjection, g as openfortEmbeddedSignerFromWallet, ga as RequestCheckoutSummary, gi as PaymentPrepared, gn as Destination, go as ORGANIZATION_SETUP_REASONS, gr as valueIn, gt as OrgScopedMethods, h as embeddedSigner, ha as RequestCheckoutState, hi as PaymentMoney, hn as OrgMeOptions, ho as Page, hr as valueActivitySummary, ht as OrgMethods, i as HandledErrorReportContext, ia as PreparedOfferCheckoutExecution, ii as PersonOnboarding, in as InvitationSnapshot, io as ObservationAdapter, ir as PaymentsMethods, is as FailureMode, it as ClientRequestView, j as formatAssetAmount, ja as InvitationPage, ji as PaymentDocumentRender, jn as ActorRequest, jo as CountryCode, jr as MeProfile, jt as PayrollMethods, k as formatMoney, ka as InvitationAcceptInput, ki as PaymentDocumentDownload, kn as AddressBookLabelInput, ko as AccountId, kr as Home, kt as PayrollGroupMember, l as CapxulClientInput, la as PrepareInvoiceCheckoutExecutionInput, li as Profile, ln as InvitePreviewInput, lr as HoldingsMethods, lt as Readiness, m as OpenfortEmbeddedSignerInput, ma as RequestCheckoutReconciliation, mi as PaymentDocumentRef, mn as OrgMeMethod, mo as OperationResult, mr as Valuation, mt as MemberView, n as checkoutUrl, na as OfferCheckoutPreparation, ni as OrganizationOnboardingInput, nn as SubmittedPermissionExecution, nr as OfframpQuoteInput, ns as RevertSummary, nt as AccountSetupPolicy, o as captureExceptionSync, oa as InvoiceCheckoutReconciliation, oi as ReadyAccountLifecycle, on as InviteMethod, oo as ObservationDelivery, or as SmartAccount, os as CapxulErrorCode, ot as IdentityTransition, p as postHogObservability, pa as RequestCheckoutPreparation, pi as PaymentDocumentKind, pn as OrgMe, po as CapxulResult, pr as RateSource, pt as MemberStatus, q as SystemMethods, qi as eip1193AccountProvider, qn as TargetReference, qo as Money, qr as ActivitySummary, qt as PermissionMethods, r as LineItemV3, ra as PrepareOfferCheckoutExecutionInput, ri as OrganizationOnboardingOptions, rn as PermissionIntent, rr as OfframpStatus, rs as FAILURE_MODES, rt as ClientRequests, s as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, sa as InvoiceCheckoutState, si as CompleteProfileInput, sn as InviteOptions, so as SdkFailureObservation, sr as SmartAccountMethods, ss as EXPECTED_OPERATION_OUTCOMES, st as IdentityState, t as CheckoutLinkReference, ta as OfferCheckout, ti as OrganizationOnboarding, tn as PermissionCommandView, to as normalizeCapxulOperation, tr as OfframpQuote, ts as ChainUpstream, tt as Session, u as HostObservability, ua as PrepareRequestCheckoutExecutionInput, ui as PayoutAddress, un as OrgInvitations, ur as CurrentHoldings, ut as StateLabel, v as OpenfortEmbeddedWalletPort, va as RequestPaymentTerms, vi as PaymentStatus, vn as DestinationKind, vo as toOrgId, vr as TOKENS, vt as OrganizationAccess, w as OpenfortBrowserSigner, wa as SetupIssue, wi as InvoiceDraft, wn as ActorProfile, wo as RoleKey, wr as AccountLifecycle, wt as AuthorizeRunInput, x as deriveDevPrivateKey, xa as OrganizationSetupPage, xi as PaymentType, xn as DestinationRail, xo as toPayrollGroupId, xr as ApprovalsMethods, xt as RoleDefinition, y as openfortEmbeddedWalletPort, ya as InvocationControls, yi as PaymentSubscriptionOptions, yn as DestinationListInput, yo as PayrollGroupId, yr as ApprovalOutcome, yt as OrganizationAccount, z as CapxulClient, za as InvitePreview, zi as Eip1193RequestProvider, zn as CheckoutsMethods, zo as AuthSession, zr as ActivityFilter, zt as PayrollGroupIdSchema } from "./index-JnWL305d.mjs";
2
- export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupPolicy, type AccountSetupStep, type AccountsMethods, type ActivityAnnotation, type ActivityAnnotationInput, type ActivityDetail, type ActivityFilter, type ActivityItem, type ActivityKind, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityPhase, type ActivityRange, type ActivityReference, type ActivitySummary, type ActivitySummaryParams, type ActivitySummaryTotal, type ActorProfile, type ActorProfileMethods, type ActorRef, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type Approval, type ApprovalOutcome, type ApprovalWaitOptions, type ApprovalsMethods, type AssetAmount, type AssetId, type AssetMetadata, type AssignmentProjection, type AuthMethods, type AuthSession, type AuthUserId, type AuthorityRef, type AuthorizeRunInput, type AuthorizeRunOptions, type Budget, type BudgetId, type BudgetIntent, CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulOperation, type CapxulResult, type CapxulSigner, type ChainCause, type ChainUpstream, type CheckoutLinkReference, type CheckoutReceipt, type CheckoutReconciliation, type CheckoutState, type CheckoutsMethods, type ClientRequestView, type ClientRequests, type CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOfferCheckoutInput, type CurrentHoldings, type CurrentPolicy, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, EXPECTED_OPERATION_OUTCOMES, type Eip1193Provider, type Eip1193RequestProvider, type EndingReason, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, type FixedOffer, type FixedOfferDraft, FixedOfferDraftSchema, type GranteeRef, HANDLE_RE, type Handle, type HandledErrorReportContext, type HoldingsMethods, type Home, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxFulfillOptions, type InboxItem, type InboxMethods, type InvitationAcceptInput, type InvitationId, type InvitationPage, type InvitationPageInput, type InvitationPhase, type InvitationRecovery, type InvitationSnapshot, type InvitationSubscriptionOptions, type InvitationTarget, type InvitationView, type InviteGrant, type InviteInput, type InviteMethod, type InviteOptions, type InvitePrepared, type InvitePreview, type InvitePreviewInput, type InvocationControls, type InvoiceCheckoutPreparation, type InvoiceCheckoutReconciliation, type InvoiceCheckoutState, type InvoiceCheckoutSummary, type InvoiceDraft, type LineItemV3, type MeMethods, type MeProfile, type MediaMethods, type MemberIdentityProjection, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, ORGANIZATION_SETUP_REASONS, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfferCheckout, type OfferCheckoutPreparation, type OfferedAuthority, type OffersMethods, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortBrowserAuth, type OpenfortBrowserSigner, type OpenfortBrowserSignerBootstrap, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OperationResult, type OrgId, type OrgInvitations, type OrgLane, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgView, type OrganizationAccess, type OrganizationAccount, type OrganizationApprovalInput, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationOnboardingOptions, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentRetryPreview, type OrganizationPaymentsMethods, type OrganizationSetup, type OrganizationSetupPage, type OrganizationSetupPageInput, type OrganizationSetupSnapshot, type OwnInvitationsMethod, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type Page, type PartyId, type PayInvoiceRegisteredInput, type PayRequestRegisteredInput, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentDownload, type PaymentDocumentKind, type PaymentDocumentOptions, PaymentDocumentOptionsSchema, type PaymentDocumentReadRef, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentInstructionInput, type PaymentMoney, type PaymentPrepared, type PaymentSnapshot, type PaymentStatus, type PaymentSubscriptionOptions, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PaymentsPayOptions, type PayoutAddress, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, PayrollGroupIdSchema, type PayrollGroupInput, PayrollGroupInputSchema, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunDetail, type PayrollRunId, type PayrollRunItemInput, type PayrollRunSnapshot, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionAssignmentEffect, type PermissionChangeInput, type PermissionCommandSnapshot, type PermissionCommandView, type PermissionCreateInput, type PermissionId, type PermissionIntent, type PermissionMethods, type PermissionOptions, type PermissionPolicyChange, type PermissionPrepared, type PermissionReadResult, type PermissionReplaceInput, type PermissionReplacementPreview, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type PrepareInvoiceCheckoutExecutionInput, type PrepareOfferCheckoutExecutionInput, type PrepareRequestCheckoutExecutionInput, type PreparedInvoiceCheckoutExecution, type PreparedOfferCheckoutExecution, type PreparedRequestCheckoutExecution, type Profile, type Rate, type RateSource, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type RequestCheckoutPreparation, type RequestCheckoutReconciliation, type RequestCheckoutState, type RequestCheckoutSummary, type RequestPaymentConfirmation, type RequestPaymentTerms, type ResolvedTarget, type RevertSummary, type RoleDefinition, type RoleKey, type RoleView, type SdkFailureObservation, type Session, type SetupIssue, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type SpendingScope, type StateLabel, type SubmittedPermissionExecution, type SupportingReceiptInput, type SystemHealth, type SystemMethods, TOKENS, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, type Unsubscribe, type UploadImageResult, type Valuation, assetSymbolFor, captureException, captureExceptionSync, checkoutUrl, createCapxulClient, createOpenfortBrowserSigner, decodePayrollRunInput, decodePermissionIntent, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isCheckoutSettlementConsumed, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, positionPeg, postHogObservability, requestPhase, requireAsset, destination as resolveIdentityDestination, toAccountId, toAssetId, toBudgetId, toCountryCode, toCurrencyCode, toAddress as toEvmAddress, toHandle, toOrgId, toPartyId, toPayrollGroupId, toPermissionAssignmentId, toPermissionId, toRaw, valueActivitySummary, valueIn };
1
+ import { $ as CurrentUserMethods, $i as CheckoutReceipt, $n as TOKENS, $o as toCurrencyCode, $r as ActivitySummaryTotal, $t as DestinationKind, A as assetSymbolFor, Aa as AuthorityRef, Ai as PaymentDocumentOptionsSchema, An as OrganizationPaymentBatchInput, Ao as toPermissionAssignmentId, Ar as isSettingUpLifecycle, At as PermissionPolicyChange, B as CreateCapxulClientInput, Ba as InvitationView, Bi as fingerprintPaymentIntent, Bn as FinancialOpsMethods, Bo as PartyId, Br as ActivityAnnotation, Bt as InvitationSubscriptionOptions, C as OpenfortBrowserAuth, Ca as InvocationControls, Ci as PaymentSubscriptionOptions, Cn as PayRequestRegisteredInput, Co as PayrollGroupId, Cr as PayrollRunSnapshot, Ct as decodePermissionIntent, D as createOpenfortBrowserSigner, Da as OrganizationSetupSnapshot, Di as PaymentsPayOptions, Dn as ResolvedTarget, Do as PermissionId, Dr as Approval, Dt as PermissionCreateInput, Ea as OrganizationSetupPageInput, Ei as PaymentsPayInput, En as Ref, Eo as BudgetId, Er as PayrollRunDetail, Et as PermissionChangeInput, F as MoneyParseError, Fa as InvitationPage, Fi as PaymentDocumentRender, Fn as OfframpMethods, Fo as CountryCode, Fr as MeProfile, Ft as PermissionCommandSnapshot, G as UploadImageResult, Ga as SpendingScope, Gi as SignerStatusStore, Gn as CurrentHoldings, Go as Address, Gr as ActivityKind, Gt as OrgInvitations, H as IdentityRuntime, Ha as InviteInput, Hi as CapxulSigner, Hn as SmartAccountMethods, Ho as toPartyId, Hr as ActivityDetail, Ht as InviteOptions, I as MoneyParseErrorReason, Ia as InvitationPageInput, Ii as PaymentDocumentVerification, In as OfframpQuote, Io as TesterKind, Ir as ActivityPhase, It as PermissionCommandView, J as Destination$1, Ja as CurrentPolicy, Ji as AccountProviderSource, Jn as RateSource, Jo as Errors, Jr as ActivityPage, Jt as OrgMe, K as SystemHealth, Ka as PermissionReplacementPreview, Ki as injectedWalletSigner, Kn as AccountsMethods, Ko as EVM_ADDRESS_RE, Kr as ActivityListParams, Kt as OwnInvitationsMethod, L as isMoneyParseError, La as InvitationPhase, Li as PAYMENT_DIRECTIONS, Ln as OfframpQuoteInput, Lo as toCountryCode, Lr as inboxPhase, Lt as SubmittedPermissionExecution, M as parseAssetAmount, Ma as GranteeRef, Mi as SupportingReceiptInput, Mn as OrganizationPaymentItemInput, Mo as Account, Mr as DepositInstructions, Mt as PermissionReadResult, N as requireAsset, Na as InvitationAcceptInput, Ni as PaymentDocumentDownload, Nn as OrganizationPaymentRetryPreview, No as AccountId, Nr as Home, Nt as PermissionReplaceInput, O as CAPXUL_PAYMENTS_V2_ADDRESS, Oa as SetupIssue, Oi as InvoiceDraft, On as TargetReference, Oo as RoleKey, Or as AccountLifecycle, Ot as PermissionMethods, P as toRaw, Pa as InvitationId, Pi as PaymentDocumentReadRef, Pn as OrganizationPaymentsMethods, Po as toAccountId, Pr as MeMethods, Pt as PermissionRevokeInput, Q as CurrentUserContext, Qi as localPrivateKeyAccountProvider, Qn as AssetMetadata, Qo as toAssetId, Qr as ActivitySummaryParams, Qt as DestinationAddInput, R as parseMoney, Ra as InvitationRecovery, Ri as PAYMENT_STATUSES, Rn as OfframpStatus, Ro as HANDLE_RE, Rr as paymentPhase, Rt as PermissionIntent, S as devPrivateKeySigner, Sa as RequestPaymentTerms, Si as PaymentStatus, Sn as PayInvoiceRegisteredInput, So as toOrgId, Sr as PayrollTermsUnit, St as RoleView, T as OpenfortBrowserSignerBootstrap, Ta as OrganizationSetupPage, Ti as PaymentType, Tn as RecipientResolution, To as toPayrollGroupId, Tr as PayrollGroupInputSchema, Tt as PermissionAssignmentEffect, U as IdentityRuntimeSendResult, Ua as InvitePreview, Ui as Eip1193RequestProvider, Un as positionPeg, Uo as AuthSession, Ur as ActivityFilter, Ut as InvitePrepared, V as IdentityProfileDetails, Va as InviteGrant, Vi as CapxulDigestSigner, Vn as SmartAccount, Vo as toHandle, Vr as ActivityAnnotationInput, Vt as InviteMethod, W as MediaMethods, Wa as OfferedAuthority, Wi as SignerStatus, Wn as HoldingsMethods, Wo as AuthUserId, Wr as ActivityItem, Wt as InvitePreviewInput, X as isClaimed, Xi as Eip1193Provider, Xn as valueActivitySummary, Xo as AssetId, Xr as ActivityReference, Xt as OrgMeOptions, Y as destination, Ya as Permission, Yi as AccountRequirement, Yn as Valuation, Yo as AssetAmount, Yr as ActivityRange, Yt as OrgMeMethod, Z as isRestoring, Zi as eip1193AccountProvider, Zn as valueIn, Zo as Money, Zr as ActivitySummary, Zt as Destination, _ as OpenfortEmbeddedWalletApi, _a as RequestCheckoutPreparation, _i as PaymentDocumentKind, _n as InboxFulfillOptions, _o as CapxulResult, _r as PayrollOptions, _t as OrgView, a as captureException, aa as OfferCheckout, ai as OrganizationOnboarding, an as ActorProfile, ao as normalizeCapxulOperation, ar as PayrollRunApprovalInput, as as ChainUpstream, at as IdentityEvent, b as DevPrivateKeySignerInput, ba as RequestCheckoutSummary, bi as PaymentPrepared, bn as CheckoutsMethods, bo as ORGANIZATION_SETUP_REASONS, br as PayrollRunStatus, bt as OrganizationAuditLogItem, c as createCapxulClient, ca as PreparedOfferCheckoutExecution, ci as PersonOnboarding, cn as AddressBookAddInput, co as ObservationAdapter, cr as decodePayrollRunInput, cs as FailureMode, ct as OrgLane, d as PostHogObservabilityClient, da as InvoiceCheckoutState, di as CompleteProfileInput, dn as AddressBookMethods, do as SdkFailureObservation, dr as PayrollEngagementTerms, ds as EXPECTED_OPERATION_OUTCOMES, dt as AssignmentProjection, ea as CheckoutReconciliation, ei as MovementActivityEvidence, en as DestinationListInput, eo as TelemetryPort, er as ApprovalInput, es as CapxulError, et as AuthMethods, f as PostHogObservabilityOptions, fa as InvoiceCheckoutSummary, fi as IdentityMethods, fn as ActorRequest, fr as PayrollGroup, ft as MemberIdentityProjection, g as openfortEmbeddedSignerFromWallet, ga as PreparedRequestCheckoutExecution, gi as PaymentDirection, gn as InboxApproveInput, go as ActorReference, gr as PayrollMethods, gt as OrgScopedMethods, h as embeddedSigner, ha as PreparedInvoiceCheckoutExecution, hi as Payment, hn as OffersMethods, hr as PayrollGroupsMethods, ht as OrgMethods, i as HandledErrorReportContext, ia as FixedOfferDraftSchema, ii as OnboardingMethods, in as DestinationsMethods, io as isCapxulOperation, ir as OrganizationApprovalInput, is as ChainCause, it as ClientRequestView, j as formatAssetAmount, ja as EndingReason, ji as PaymentInstructionInput, jn as OrganizationPaymentInput, jo as toPermissionId, jr as AccountMethods, jt as PermissionPrepared, k as formatMoney, ka as Unsubscribe, ki as PaymentDocumentOptions, kn as TargetsMethods, ko as toBudgetId, kr as AccountSetupStep, kt as PermissionOptions, l as CapxulClientInput, la as InvoiceCheckoutPreparation, li as PersonOnboardingInput, ln as AddressBookEntry, lo as ObservationContext, lr as AuthorizeRunInput, ls as CAPXUL_ERROR_CODES, lt as Readiness, m as OpenfortEmbeddedSignerInput, ma as PrepareRequestCheckoutExecutionInput, mi as PayoutAddress, mn as ActorRequestsMethods, mr as PayrollGroupMember, mt as MemberView, n as checkoutUrl, na as FixedOffer, ni as PaymentDocumentsMethods, nn as DestinationRail, no as CapxulOperation, nr as ApprovalWaitOptions, ns as isCapxulError, nt as AccountSetupPolicy, o as captureExceptionSync, oa as OfferCheckoutPreparation, oi as OrganizationOnboardingInput, on as ActorProfileMethods, or as RequestApprovalInput, os as RevertSummary, ot as IdentityTransition, p as postHogObservability, pa as PrepareInvoiceCheckoutExecutionInput, pi as Profile, pn as ActorRequestIssueInput, pr as PayrollGroupInput, pt as MemberStatus, q as SystemMethods, qa as BudgetIntent, qi as AccountProvider, qn as Rate, qo as toAddress, qr as ActivityMethods, qt as Budget, r as LineItemV3, ra as FixedOfferDraft, ri as CompletedPersonProfile, rn as DestinationRemoveInput, ro as NormalizedCapxulOperation, rr as ApprovalsMethods, rs as CHAIN_UPSTREAMS, rt as ClientRequests, s as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, sa as PrepareOfferCheckoutExecutionInput, si as OrganizationOnboardingOptions, sn as ActorRelationshipMethods, sr as RetryApprovalInput, ss as FAILURE_MODES, st as IdentityState, t as CheckoutLinkReference, ta as CheckoutState, ti as PaymentActivityEvidence, tn as DestinationPayload, to as CAPXUL_OPERATIONS, tr as ApprovalOutcome, ts as CapxulErrorDetails, tt as Session, u as HostObservability, ua as InvoiceCheckoutReconciliation, ui as ReadyAccountLifecycle, un as AddressBookLabelInput, uo as ObservationDelivery, ur as AuthorizeRunOptions, us as CapxulErrorCode, ut as StateLabel, v as OpenfortEmbeddedWalletPort, va as RequestCheckoutReconciliation, vi as PaymentDocumentRef, vn as InboxItem, vo as OperationResult, vr as PayrollRun, vt as OrganizationAccess, w as OpenfortBrowserSigner, wa as OrganizationSetup, wi as PaymentTiming, wn as isCheckoutSettlementConsumed, wo as PayrollRunId, wr as PayrollGroupIdSchema, wt as PermissionAssignInput, x as deriveDevPrivateKey, xa as RequestPaymentConfirmation, xi as PaymentSnapshot, xn as CreateOfferCheckoutInput, xo as OrgId, xr as PayrollRuns, xt as RoleDefinition, y as openfortEmbeddedWalletPort, ya as RequestCheckoutState, yi as PaymentMoney, yn as InboxMethods, yo as Page, yr as PayrollRunItemInput, yt as OrganizationAccount, z as CapxulClient, za as InvitationTarget, zi as ActorRef, zn as PaymentsMethods, zo as Handle, zr as requestPhase, zt as InvitationSnapshot } from "./index-BjDZXc7n.mjs";
2
+ export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupPolicy, type AccountSetupStep, type AccountsMethods, type ActivityAnnotation, type ActivityAnnotationInput, type ActivityDetail, type ActivityFilter, type ActivityItem, type ActivityKind, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityPhase, type ActivityRange, type ActivityReference, type ActivitySummary, type ActivitySummaryParams, type ActivitySummaryTotal, type ActorProfile, type ActorProfileMethods, type ActorRef, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type Approval, type ApprovalInput, type ApprovalOutcome, type ApprovalWaitOptions, type ApprovalsMethods, type AssetAmount, type AssetId, type AssetMetadata, type AssignmentProjection, type AuthMethods, type AuthSession, type AuthUserId, type AuthorityRef, type AuthorizeRunInput, type AuthorizeRunOptions, type Budget, type BudgetId, type BudgetIntent, CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulOperation, type CapxulResult, type CapxulSigner, type ChainCause, type ChainUpstream, type CheckoutLinkReference, type CheckoutReceipt, type CheckoutReconciliation, type CheckoutState, type CheckoutsMethods, type ClientRequestView, type ClientRequests, type CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOfferCheckoutInput, type CurrentHoldings, type CurrentPolicy, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, EXPECTED_OPERATION_OUTCOMES, type Eip1193Provider, type Eip1193RequestProvider, type EndingReason, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, type FixedOffer, type FixedOfferDraft, FixedOfferDraftSchema, type GranteeRef, HANDLE_RE, type Handle, type HandledErrorReportContext, type HoldingsMethods, type Home, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxFulfillOptions, type InboxItem, type InboxMethods, type InvitationAcceptInput, type InvitationId, type InvitationPage, type InvitationPageInput, type InvitationPhase, type InvitationRecovery, type InvitationSnapshot, type InvitationSubscriptionOptions, type InvitationTarget, type InvitationView, type InviteGrant, type InviteInput, type InviteMethod, type InviteOptions, type InvitePrepared, type InvitePreview, type InvitePreviewInput, type InvocationControls, type InvoiceCheckoutPreparation, type InvoiceCheckoutReconciliation, type InvoiceCheckoutState, type InvoiceCheckoutSummary, type InvoiceDraft, type LineItemV3, type MeMethods, type MeProfile, type MediaMethods, type MemberIdentityProjection, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, ORGANIZATION_SETUP_REASONS, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfferCheckout, type OfferCheckoutPreparation, type OfferedAuthority, type OffersMethods, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortBrowserAuth, type OpenfortBrowserSigner, type OpenfortBrowserSignerBootstrap, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OperationResult, type OrgId, type OrgInvitations, type OrgLane, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgView, type OrganizationAccess, type OrganizationAccount, type OrganizationApprovalInput, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationOnboardingOptions, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentRetryPreview, type OrganizationPaymentsMethods, type OrganizationSetup, type OrganizationSetupPage, type OrganizationSetupPageInput, type OrganizationSetupSnapshot, type OwnInvitationsMethod, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type Page, type PartyId, type PayInvoiceRegisteredInput, type PayRequestRegisteredInput, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentDownload, type PaymentDocumentKind, type PaymentDocumentOptions, PaymentDocumentOptionsSchema, type PaymentDocumentReadRef, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentInstructionInput, type PaymentMoney, type PaymentPrepared, type PaymentSnapshot, type PaymentStatus, type PaymentSubscriptionOptions, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PaymentsPayOptions, type PayoutAddress, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, PayrollGroupIdSchema, type PayrollGroupInput, PayrollGroupInputSchema, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunApprovalInput, type PayrollRunDetail, type PayrollRunId, type PayrollRunItemInput, type PayrollRunSnapshot, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionAssignmentEffect, type PermissionChangeInput, type PermissionCommandSnapshot, type PermissionCommandView, type PermissionCreateInput, type PermissionId, type PermissionIntent, type PermissionMethods, type PermissionOptions, type PermissionPolicyChange, type PermissionPrepared, type PermissionReadResult, type PermissionReplaceInput, type PermissionReplacementPreview, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type PrepareInvoiceCheckoutExecutionInput, type PrepareOfferCheckoutExecutionInput, type PrepareRequestCheckoutExecutionInput, type PreparedInvoiceCheckoutExecution, type PreparedOfferCheckoutExecution, type PreparedRequestCheckoutExecution, type Profile, type Rate, type RateSource, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type RequestApprovalInput, type RequestCheckoutPreparation, type RequestCheckoutReconciliation, type RequestCheckoutState, type RequestCheckoutSummary, type RequestPaymentConfirmation, type RequestPaymentTerms, type ResolvedTarget, type RetryApprovalInput, type RevertSummary, type RoleDefinition, type RoleKey, type RoleView, type SdkFailureObservation, type Session, type SetupIssue, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type SpendingScope, type StateLabel, type SubmittedPermissionExecution, type SupportingReceiptInput, type SystemHealth, type SystemMethods, TOKENS, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, type Unsubscribe, type UploadImageResult, type Valuation, assetSymbolFor, captureException, captureExceptionSync, checkoutUrl, createCapxulClient, createOpenfortBrowserSigner, decodePayrollRunInput, decodePermissionIntent, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isCheckoutSettlementConsumed, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, positionPeg, postHogObservability, requestPhase, requireAsset, destination as resolveIdentityDestination, toAccountId, toAssetId, toBudgetId, toCountryCode, toCurrencyCode, toAddress as toEvmAddress, toHandle, toOrgId, toPartyId, toPayrollGroupId, toPermissionAssignmentId, toPermissionId, toRaw, valueActivitySummary, valueIn };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as decodePermissionIntent, d as devPrivateKeySigner, f as createOpenfortBrowserSigner, g as decodePayrollRunInput, h as openfortEmbeddedWalletPort, i as postHogObservability, m as openfortEmbeddedSignerFromWallet, p as embeddedSigner, t as createCapxulClient$1, u as deriveDevPrivateKey, v as toPayrollGroupId } from "./production-D3saI6ME.mjs";
2
- import { $ as toRaw, Ar as toAssetId, Ct as CAPXUL_PAYMENTS_V2_ADDRESS, Dn as isCapxulOperation, En as CAPXUL_OPERATIONS, Er as toPermissionId, Et as TOKENS, Fr as toAddress, Hi as CapxulError, Hn as PayrollGroupIdSchema, Jt as SDK_VERSION, Nr as EVM_ADDRESS_RE, On as normalizeCapxulOperation, Q as requireAsset, Qt as safeExceptionLabel, S as valueIn, Tr as toPermissionAssignmentId, Ui as isCapxulError, Un as PayrollGroupInputSchema, Vi as Errors, Vt as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, W as isCheckoutSettlementConsumed, Wi as FAILURE_MODES, X as formatAssetAmount, Xt as normalizeExceptionOperation, Y as assetSymbolFor, Yt as normalizeExceptionErrorKind, Z as parseAssetAmount, Zt as projectSdkException, _n as toPartyId, a as paymentPhase, ar as toOrgId, br as PAYMENT_DIRECTIONS, cn as signerFailure, ei as CAPXUL_ERROR_CODES, en as isSettingUpLifecycle, et as isMoneyParseError, fn as toCountryCode, gn as toHandle, hn as HANDLE_RE, i as inboxPhase, jr as toCurrencyCode, kr as currencySymbolFor, ln as resolveFailureMode, mr as PaymentDocumentOptionsSchema, o as requestPhase, pr as toAccountId, qn as FixedOfferDraftSchema, qt as EXCEPTION_MESSAGE, rn as injectedWalletSigner, rr as CHAIN_UPSTREAMS, rt as fingerprintPaymentIntent, ti as EXPECTED_OPERATION_OUTCOMES, tr as ORGANIZATION_SETUP_REASONS, tt as parseMoney, wn as EXCEPTION_EVENT_NAME, wr as toBudgetId, x as valueActivitySummary, xr as PAYMENT_STATUSES, y as positionPeg, zt as failureDetail } from "./access-BEMUjtyy.mjs";
1
+ import { d as devPrivateKeySigner, f as createOpenfortBrowserSigner, g as decodePermissionIntent, h as openfortEmbeddedWalletPort, i as postHogObservability, m as openfortEmbeddedSignerFromWallet, p as embeddedSigner, t as createCapxulClient$1, u as deriveDevPrivateKey } from "./production-D5uC-i8N.mjs";
2
+ import { $ as parseAssetAmount, Bn as FixedOfferDraftSchema, Cr as toAssetId, Dn as isCapxulOperation, Dt as TOKENS, En as CAPXUL_OPERATIONS, Er as EVM_ADDRESS_RE, F as decodePayrollRunInput, Fi as FAILURE_MODES, I as toPayrollGroupId, Jn as ORGANIZATION_SETUP_REASONS, Jr as EXPECTED_OPERATION_OUTCOMES, Jt as SDK_VERSION, Mi as Errors, Ni as CapxulError, On as normalizeCapxulOperation, Or as toAddress, Pi as isCapxulError, Q as formatAssetAmount, Qn as toOrgId, Qt as safeExceptionLabel, Rn as PayrollGroupIdSchema, S as valueIn, Sr as currencySymbolFor, Tt as CAPXUL_PAYMENTS_V2_ADDRESS, Vt as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, Xn as CHAIN_UPSTREAMS, Xt as normalizeExceptionOperation, Yt as normalizeExceptionErrorKind, Z as assetSymbolFor, Zt as projectSdkException, _n as toPartyId, _r as toBudgetId, a as paymentPhase, at as fingerprintPaymentIntent, cn as signerFailure, en as isSettingUpLifecycle, et as requireAsset, fn as toCountryCode, gn as toHandle, hn as HANDLE_RE, i as inboxPhase, ln as resolveFailureMode, mr as PAYMENT_STATUSES, nt as isMoneyParseError, o as requestPhase, or as toAccountId, pr as PAYMENT_DIRECTIONS, q as isCheckoutSettlementConsumed, qr as CAPXUL_ERROR_CODES, qt as EXCEPTION_MESSAGE, rn as injectedWalletSigner, rt as parseMoney, sr as PaymentDocumentOptionsSchema, tt as toRaw, vr as toPermissionAssignmentId, wn as EXCEPTION_EVENT_NAME, wr as toCurrencyCode, x as valueActivitySummary, y as positionPeg, yr as toPermissionId, zn as PayrollGroupInputSchema, zt as failureDetail } from "./access-BnlgphFT.mjs";
3
3
  import { Effect } from "effect";
4
4
  import { privateKeyToAccount } from "viem/accounts";
5
5
  //#region src/access/identity/selectors.ts
@@ -1,4 +1,4 @@
1
- import { Ri as CapxulSigner, co as AuthCacheError, do as CachedJwt, lo as AuthCachePort, no as OAuthBearerAuthClientInput, ro as oauthBearerAuthClient, uo as AuthCachePortTag, zo as AuthSession } from "../index-JnWL305d.mjs";
1
+ import { Hi as CapxulSigner, Uo as AuthSession, fo as AuthCacheError, ho as CachedJwt, mo as AuthCachePortTag, oo as OAuthBearerAuthClientInput, po as AuthCachePort, so as oauthBearerAuthClient } from "../index-BjDZXc7n.mjs";
2
2
  import { Effect, FileSystem, Layer, Path } from "effect";
3
3
  import { Hex } from "viem";
4
4
  //#region src/access/auth-cache/file-system.d.ts
@@ -1,4 +1,4 @@
1
- import { Ai as parseAuthSession, Di as globalLocalStorage, Fr as toAddress, Ji as AuthCacheError, Ki as isRecord, Oi as InMemoryAuthCacheAdapter, Yi as AuthCachePortTag, ai as oauthBearerAuthClient, ji as parseCachedJwt, ki as BrowserAuthCacheAdapter } from "../access-BEMUjtyy.mjs";
1
+ import { Bi as AuthCachePortTag, Ci as parseAuthSession, Li as isRecord, Or as toAddress, Qr as oauthBearerAuthClient, Si as BrowserAuthCacheAdapter, bi as globalLocalStorage, wi as parseCachedJwt, xi as InMemoryAuthCacheAdapter, zi as AuthCacheError } from "../access-BnlgphFT.mjs";
2
2
  import { Effect, FileSystem, Layer, Option, Path } from "effect";
3
3
  import { privateKeyToAccount } from "viem/accounts";
4
4
  import * as os from "node:os";
@@ -1,4 +1,4 @@
1
- import { $n as workspaces, $r as formatTraceparent, $t as version$1, A as registerProductTelemetryInvocation, An as details, At as safe4337MultiSendUserOpCallData, B as paymentRequestKeyLifecycle, Bi as toNonEmptyStringBrand, Bn as terms, Br as makeAuthMethods, Bt as failureEvidenceProps, C as AccountReadPortTag, Cn as CLI_INVOCATION_KINDS, Cr as EpochMsSchema, Ct as CAPXUL_PAYMENTS_V2_ADDRESS, D as convexCallErrorFromCapxul, Di as globalLocalStorage, Dn as isCapxulOperation, Dr as toRoleKey, Dt as deriveCapxulSafeAddress, E as ConvexCallPortTag, Ei as detectAuthCacheAdapter, En as CAPXUL_OPERATIONS, Er as toPermissionId, F as logDroppedEvent, Fi as toAuthUserId, Fn as replacements, Fr as toAddress, Ft as callOperation, G as makeTargetsMethods, Gi as isFailureMode, Gn as PayrollRunIdSchema, Gr as sessionFromActor, Gt as observationContextProps, H as makeActorRelationshipMethods, Hi as CapxulError, Hr as publicIdentityFailure, Ht as postHogFailureObservation, I as makeOrganizationPaymentsMethods, Ii as toEmail, In as PreparedPermissionExecutionSchema, It as asCapxulError, Jn as invitations, Jr as withVerifiedOrganizationScope, K as subscribeFreshQuery, Ki as isRecord, Kn as PayrollRunItemInputSchema, Kr as observationOnlyControls, Kt as withCapturedAttemptContext, L as makeOfframpMethods, Ln as PermissionCommandViewSchema, Lt as mapPage, M as makeApprovalsMethods, Mn as authorities, Mr as toExactAssetAmount, Mt as BASE_SEPOLIA_CHAIN_ID, N as makeAccountMethods, Ni as toEpochMs, Nn as commands, Nt as MULTI_SEND_CALL_ONLY, O as retryIdempotentRead, On as normalizeCapxulOperation, Or as ChainIdSchema, Ot as normalizeSafeSaltEmail, P as emitDepositInitiated, Pn as configurations, Pr as isEvmAddress, Pt as SAFE_SENTINEL_OWNERS, Qn as treasuries, Qr as toCapxulResult, R as makePaymentsMethods, Rn as groups, Rr as absurd, Rt as toPublicError, Si as toPublishableKey, Sn as CLI_COMMAND_NAMES, Sr as DurationMsSchema, St as SEND_SIGNATURE, T as TelemetryPortTag, Ti as AuthClientPortTag, Tn as stampTelemetryEnvelope, Tr as toPermissionAssignmentId, Tt as CONFIGURED_MONEY_ASSETS, U as makeCheckoutMethods, Ui as isCapxulError, Ur as runIdentityFacade, Ut as observeFailedResult, V as makeDestinationsMethods, Vi as Errors, Vn as AuthorizePayrollRunExecutionInputSchema, Vr as askIdentity, Wi as FAILURE_MODES, Wn as PayrollRunDetailSchema, Wr as runPortEffect, Wt as observeSdkClient, Xn as roles, Xr as defectAsCapxulError, Yi as AuthCachePortTag, Yn as members, Yr as awaitCapxulResult, Zn as setups, Zr as runIfActive, _ as accountFromAccountPositions, _i as redactSecrets, _n as toPartyId, _r as toLowerAddress, _t as ROLES_SET_TRANSACTION_UNWRAPPER_ABI, an as isSignerNotReadySignal, ar as toOrgId, at as ORG_BUDGET_ACTIONS, b as MONEY_READ_RATES, bi as toAllowedOrigin, bn as redactTelemetryProps, bt as SAFE_ENABLE_MODULE_ABI, c as makePaymentDocumentsMethods, ci as ClockPortTag, cn as signerFailure, cr as decodePermissionIntent$1, ct as resolveOrgPermissionIdentity, d as SmartAccountPortTag, di as BetterAuthBrowserLayer, dn as makeClientRequestMethods, dr as AppIdSchema, dt as MULTI_SEND_SELECTOR, ei as CAPXUL_ERROR_CODES, er as OrganizationSetupSchema, fi as observationRequestHeaders, fn as toCountryCode, fr as images, ft as OPERATOR, g as ConvexAccountLayer, gi as sanitizeObservationContext, gn as toHandle, gr as toExactHex, gt as ROLES_SET_ALLOWANCE_ABI, h as makeAccountsMethods, hi as readInvocationObservation, hr as isBytes32, ht as ROLES_EXEC_TRANSACTION_WITH_ROLE_ABI, ii as withInvocationParentSpan, in as isEcdsaSignatureHex, ir as decodeChainCause, it as moneySafeOpDigest, jn as onboardings, jt as buildSafeMultiSendExecTransactionCall, k as bindProductTelemetryInvocation, kn as OPERATIONS, kt as safe4337ExecuteUserOpCallData, l as makeSmartAccountMethods, lr as CurrentPolicySchema, lt as CREATE_COMMITMENT_SIGNATURE, m as PonderIndexerAdapter, mi as copyInvocationObservation, mn as toTesterKind, mt as ROLES_ASSIGN_ROLES_ABI, n as bootIdentityFlow, ni as ActorFailure, nn as causeChain, nr as ORGANIZATION_SETUP_STATUSES, nt as canonicalJson, oi as SystemClockLayer, on as openfortSignerNotReadyCode, or as InvitationViewSchema, ot as roleKeyForPermission, p as makeHoldingsMethods, pi as attachInvocationObservation, pn as toKycTier, pr as toAccountId, pt as PARAMETER_TYPE, q as executePrepared, qi as readField, qr as runCapxulEffect, r as makeMeMethods, ri as carryInvocationParentSpan, s as makeActivityMethods, sn as recoverRawDigestSigner, sr as hashPermissionReplacementPreview, st as ZODIAC_MODULE_PROXY_FACTORY, t as executeIdentityProductObservation, tn as UNOBSERVABLE_SIGNER_STATUS, tr as ORGANIZATION_SETUP_REASONS, u as ConvexSmartAccountLayer, ui as BetterAuthNodeLayer, un as makeCurrentUserMethods, ur as diagnostics, ut as MODULE_PROXY_FACTORY_ABI, v as accountPositionsFromWire, vi as redactUrlSecrets, vn as validateHandle, vr as toLowerBytes32, vt as ROLES_SET_UP_ABI, wi as AuthClientError, wr as toBudgetId, wt as hashAdjustmentsV3, xn as CLI_CAPABILITIES, xt as SEND_BATCH_SIGNATURE, yi as isCredentialField, yr as toLowerHex, yt as ROLE_MANAGEMENT_SIGNATURES, z as waitForPaymentSubmission, zi as isNonEmptyString, zn as runs, zr as reference, zt as failureDetail } from "./access-BEMUjtyy.mjs";
1
+ import { $n as InvitationViewSchema, $r as SystemClockLayer, $t as version$1, A as registerProductTelemetryInvocation, An as details, At as safe4337ExecuteUserOpCallData, B as makeOrganizationPaymentsMethods, Bi as AuthCachePortTag, Br as runCapxulEffect, Bt as failureEvidenceProps, C as AccountReadPortTag, Cn as CLI_INVOCATION_KINDS, Ct as SEND_BATCH_SIGNATURE, D as convexCallErrorFromCapxul, Dn as isCapxulOperation, Dr as isEvmAddress, E as ConvexCallPortTag, Ei as toEpochMs, En as CAPXUL_OPERATIONS, Et as CONFIGURED_MONEY_ASSETS, Fi as FAILURE_MODES, Fn as replacements, Fr as publicIdentityFailure, Ft as SAFE_SENTINEL_OWNERS, G as makeActorRelationshipMethods, Gn as treasuries, Gr as toCapxulResult, Gt as observationContextProps, H as makePaymentsMethods, Hn as members, Hr as awaitCapxulResult, Ht as postHogFailureObservation, Ii as isFailureMode, In as PreparedPermissionExecutionSchema, Ir as runIdentityFacade, It as callOperation, J as makeTargetsMethods, Jn as ORGANIZATION_SETUP_REASONS, K as makeCheckoutMethods, Kn as workspaces, Kr as formatTraceparent, Kt as withCapturedAttemptContext, L as makeAccountMethods, Li as isRecord, Ln as PermissionCommandViewSchema, Lr as runPortEffect, Lt as asCapxulError, M as makeApprovalsMethods, Mi as Errors, Mn as authorities, Mr as reference, Mt as buildSafeMultiSendExecTransactionCall, N as makePayrollMethods, Ni as CapxulError, Nn as commands, Nr as makeAuthMethods, Nt as BASE_SEPOLIA_CHAIN_ID, O as retryIdempotentRead, Oi as toAuthUserId, On as normalizeCapxulOperation, Or as toAddress, Ot as deriveCapxulSafeAddress, P as makeUnavailablePayrollMethods, Pi as isCapxulError, Pn as configurations, Pr as askIdentity, Pt as MULTI_SEND_CALL_ONLY, Qn as toOrgId, R as emitDepositInitiated, Ri as readField, Rr as sessionFromActor, Rt as toPublicError, Sn as CLI_COMMAND_NAMES, St as SAFE_ENABLE_MODULE_ABI, T as TelemetryPortTag, Tn as stampTelemetryEnvelope, Tr as toExactAssetAmount, Tt as CAPXUL_PAYMENTS_V2_ADDRESS, U as waitForPaymentSubmission, Un as roles, Ur as defectAsCapxulError, Ut as observeFailedResult, V as makeOfframpMethods, Vn as invitations, Vr as withVerifiedOrganizationScope, W as makeDestinationsMethods, Wn as setups, Wr as runIfActive, Wt as observeSdkClient, Xr as carryInvocationParentSpan, Y as subscribeFreshQuery, Yn as ORGANIZATION_SETUP_STATUSES, Yr as ActorFailure, Zn as decodeChainCause, Zr as withInvocationParentSpan, _ as accountFromAccountPositions, _i as AuthClientError, _n as toPartyId, _r as toBudgetId, _t as ROLES_EXEC_TRANSACTION_WITH_ROLE_ABI, ai as observationRequestHeaders, an as isSignerNotReadySignal, ar as images, b as MONEY_READ_RATES, bi as globalLocalStorage, bn as redactTelemetryProps, br as toRoleKey, bt as ROLES_SET_UP_ABI, c as makePaymentDocumentsMethods, ci as readInvocationObservation, cn as signerFailure, cr as isBytes32, ct as roleKeyForPermission, d as SmartAccountPortTag, di as redactUrlSecrets, dn as makeClientRequestMethods, dr as toLowerBytes32, dt as CREATE_COMMITMENT_SIGNATURE, er as hashPermissionReplacementPreview, fi as isCredentialField, fn as toCountryCode, fr as toLowerHex, ft as MODULE_PROXY_FACTORY_ABI, g as ConvexAccountLayer, gn as toHandle, gr as EpochMsSchema, gt as ROLES_ASSIGN_ROLES_ABI, h as makeAccountsMethods, hi as toPublishableKey, hr as DurationMsSchema, ht as PARAMETER_TYPE, ii as BetterAuthBrowserLayer, in as isEcdsaSignatureHex, ir as AppIdSchema, it as canonicalJson, jn as onboardings, jr as absurd, jt as safe4337MultiSendUserOpCallData, k as bindProductTelemetryInvocation, ki as toEmail, kn as OPERATIONS, kt as normalizeSafeSaltEmail, l as makeSmartAccountMethods, li as sanitizeObservationContext, lr as toExactHex, lt as ZODIAC_MODULE_PROXY_FACTORY, m as PonderIndexerAdapter, mn as toTesterKind, mt as OPERATOR, n as bootIdentityFlow, nn as causeChain, nr as CurrentPolicySchema, oi as attachInvocationObservation, on as openfortSignerNotReadyCode, or as toAccountId, ot as moneySafeOpDigest, p as makeHoldingsMethods, pi as toAllowedOrigin, pn as toKycTier, pt as MULTI_SEND_SELECTOR, qn as OrganizationSetupSchema, qr as CAPXUL_ERROR_CODES, r as makeMeMethods, ri as BetterAuthNodeLayer, rr as diagnostics, s as makeActivityMethods, si as copyInvocationObservation, sn as recoverRawDigestSigner, st as ORG_BUDGET_ACTIONS, t as executeIdentityProductObservation, ti as ClockPortTag, tn as UNOBSERVABLE_SIGNER_STATUS, tr as decodePermissionIntent$1, u as ConvexSmartAccountLayer, ui as redactSecrets, un as makeCurrentUserMethods, ur as toLowerAddress, ut as resolveOrgPermissionIdentity, v as accountPositionsFromWire, vi as AuthClientPortTag, vn as validateHandle, vr as toPermissionAssignmentId, vt as ROLES_SET_ALLOWANCE_ABI, wt as SEND_SIGNATURE, xn as CLI_CAPABILITIES, xr as ChainIdSchema, xt as ROLE_MANAGEMENT_SIGNATURES, yi as detectAuthCacheAdapter, yr as toPermissionId, yt as ROLES_SET_TRANSACTION_UNWRAPPER_ABI, z as logDroppedEvent, zr as observationOnlyControls, zt as failureDetail } from "./access-BnlgphFT.mjs";
2
2
  import { Cause, Clock, Context, Data, Deferred, Duration, Effect, Exit, FiberSet, Layer, Logger, Metric, Option, Predicate, References, Result, Schedule, Schema, SchemaIssue, SchemaParser, Scope, Stream, Tracer } from "effect";
3
3
  import { getFunctionName } from "convex/server";
4
4
  import { BaseError, decodeFunctionData, encodeAbiParameters, encodeFunctionData, formatUnits, getContractAddress, keccak256, padHex, parseAbiParameters, stringToHex, toBytes, toFunctionSelector, toHex } from "viem";
@@ -76,14 +76,6 @@ function isPostHogUrlProperty(key) {
76
76
  return normalized.includes("url") || normalized.includes("referrer") || normalized.includes("path") || normalized.includes("filename");
77
77
  }
78
78
  //#endregion
79
- //#region ../protocol/src/payroll/model.ts
80
- function toPayrollRunId(raw) {
81
- return toNonEmptyStringBrand(raw, "payrollRunId", (value) => isNonEmptyString(value));
82
- }
83
- function toPayrollGroupId(raw) {
84
- return toNonEmptyStringBrand(raw, "payrollGroupId", (value) => isNonEmptyString(value));
85
- }
86
- //#endregion
87
79
  //#region src/permissions/command-decoding.ts
88
80
  /** The caller's input as a command: ids branded and the intent decoded, or invalid input thrown. */
89
81
  const buildCommand = {
@@ -11232,411 +11224,6 @@ function makePermissionMethods(deps, orgId) {
11232
11224
  };
11233
11225
  }
11234
11226
  //#endregion
11235
- //#region src/payroll/run-checks.ts
11236
- /** Match the caller's compensation to the committed V3 Payslip. */
11237
- function payslipIdentityMatches(message, item, index, runId, period) {
11238
- return message.runId === runId && message.itemIndex === index && message.employeeRef === item.partyId && message.periodStart === period.start && message.periodEnd === period.end && message.adjustmentsHash === hashAdjustmentsV3(item.adjustments);
11239
- }
11240
- function payslipAmountMatches(message, item) {
11241
- const exact = toExactAssetAmount(item.amount, CONFIGURED_MONEY_ASSETS);
11242
- return message.gross.asset === exact.asset && message.gross.minorUnits === item.gross && message.gross.decimals === exact.decimals && message.net.asset === exact.asset && message.net.minorUnits === item.net && message.net.decimals === exact.decimals;
11243
- }
11244
- function isRunItem(prepared, item, evidence, index, runId, period) {
11245
- if (prepared === void 0) return false;
11246
- const bundle = evidence.preparedCommand?.documentBundles?.[index];
11247
- const preparedItem = evidence.preparedCommand?.items[index];
11248
- const payslip = bundle?.envelope;
11249
- if (bundle === void 0 || payslip?.primaryType !== "Payslip") return false;
11250
- return canonicalJson(prepared.to) === canonicalJson(item.to) && prepared.paymentType === "payroll" && canonicalJson(prepared.amount) === canonicalJson(item.amount) && bundle.adjustments !== void 0 && canonicalJson(bundle.adjustments) === canonicalJson(item.adjustments) && payslipIdentityMatches(payslip.message, item, index, runId, period) && payslipAmountMatches(payslip.message, item) && (preparedItem?.operation === "send" || preparedItem?.operation === "create_commitment") && preparedItem.documentHash === evidence.preparedCommand?.instructionDocuments?.[index]?.documentHash;
11251
- }
11252
- /**
11253
- * The batch the backend derived from a payroll intent must be the batch this
11254
- * caller asked for, checked before the digest is signed.
11255
- *
11256
- * The payslip envelope on each item is server-built and carries the run row's
11257
- * own `issuedAt`, so the batch cannot be fingerprinted against a local copy
11258
- * (`matchesIntent` is unavailable here). What CAN be verified is every field
11259
- * the caller supplied — the org, the Budget, the request key, and per item the
11260
- * recipient, the amount and the payslip figures — plus the lineage binding the
11261
- * batch to the run just written. A prepared command that pays a different
11262
- * person, a different amount, from a different Budget, or under a different
11263
- * run never reaches the signer.
11264
- */
11265
- function isRunBatch(input) {
11266
- return (batch, evidence) => Promise.resolve(!("kind" in batch) && batch.orgId === input.orgId && batch.permissionId === input.permissionId && batch.requestKey === input.requestKey && batch.lineage?.kind === "payroll" && batch.lineage.runId === input.runId && batch.items.length === input.items.length && batch.items.every((item) => item.amount.asset === input.asset) && input.items.every((item, index) => isRunItem(batch.items[index], item, evidence, index, input.runId, input.period)));
11267
- }
11268
- /** A decoded detail is the run asked for, whole: its scope, membership and quantities agree. */
11269
- function checkPayrollRunDetail(value, orgId, runId) {
11270
- if (value === null) return {
11271
- ok: true,
11272
- value: null
11273
- };
11274
- if (value.orgId !== orgId || value.run.id !== runId || value.items.length === 0 || value.items.length !== value.run.recipientCount || new Set(value.items.map((item) => item.payment.id)).size !== value.items.length || value.items.some((item, index) => item.itemIndex !== index || item.amount.asset !== value.run.total.asset || item.payment.amount.asset !== item.amount.asset || item.payment.paymentType !== "payroll")) return {
11275
- ok: false,
11276
- error: Errors.invalidInput("run", "Payroll run scope or membership does not match")
11277
- };
11278
- try {
11279
- const total = toExactAssetAmount(value.run.total, CONFIGURED_MONEY_ASSETS);
11280
- let rawTotal = 0n;
11281
- for (const item of value.items) {
11282
- const amount = toExactAssetAmount(item.amount, CONFIGURED_MONEY_ASSETS);
11283
- const payment = toExactAssetAmount(item.payment.amount, CONFIGURED_MONEY_ASSETS);
11284
- if (amount.minorUnits !== payment.minorUnits) return {
11285
- ok: false,
11286
- error: Errors.invalidInput("run", "Payroll item quantity does not match its Payment")
11287
- };
11288
- rawTotal += BigInt(amount.minorUnits);
11289
- }
11290
- if (rawTotal !== BigInt(total.minorUnits)) return {
11291
- ok: false,
11292
- error: Errors.invalidInput("run", "Payroll run total does not match its items")
11293
- };
11294
- } catch {
11295
- return {
11296
- ok: false,
11297
- error: Errors.invalidInput("run", "Payroll run quantities are invalid")
11298
- };
11299
- }
11300
- return {
11301
- ok: true,
11302
- value
11303
- };
11304
- }
11305
- //#endregion
11306
- //#region src/payroll/run-decoding.ts
11307
- function toPayrollRun(wire) {
11308
- return {
11309
- id: toPayrollRunId(wire.id),
11310
- status: wire.status,
11311
- periodStart: wire.periodStart,
11312
- periodEnd: wire.periodEnd,
11313
- total: wire.total,
11314
- recipientCount: wire.recipientCount
11315
- };
11316
- }
11317
- function toPayrollRuns(wire) {
11318
- return {
11319
- ...mapPage(wire, toPayrollRun),
11320
- settledThisMonth: wire.settledThisMonth
11321
- };
11322
- }
11323
- function toPayrollGroup(wire) {
11324
- return {
11325
- id: toPayrollGroupId(wire.id),
11326
- name: wire.name,
11327
- tone: wire.tone,
11328
- members: wire.members.map((member) => ({
11329
- partyId: member.partyId,
11330
- amount: member.amount,
11331
- currency: member.currency
11332
- }))
11333
- };
11334
- }
11335
- function validateRunItems(input) {
11336
- for (const [index, item] of input.items.entries()) {
11337
- if (Schema.decodeResult(PayrollRunItemInputSchema, { onExcessProperty: "error" })(item)._tag === "Failure") return Errors.invalidInput(`items.${index}`, "invalid Payroll item");
11338
- try {
11339
- const exact = toExactAssetAmount(item.amount, CONFIGURED_MONEY_ASSETS);
11340
- const net = BigInt(item.net);
11341
- const gross = BigInt(item.gross);
11342
- const adjustments = item.adjustments.reduce((sum, row) => sum + BigInt(row.amount), 0n);
11343
- if (item.amount.asset !== input.asset || item.net !== exact.minorUnits || gross + adjustments !== net) return Errors.invalidInput(`items.${index}`, "invalid Payroll units");
11344
- } catch {
11345
- return Errors.invalidInput(`items.${index}`, "invalid Payroll units");
11346
- }
11347
- }
11348
- return null;
11349
- }
11350
- const RunInputSchema = Schema.Struct({
11351
- permissionId: AuthorizePayrollRunExecutionInputSchema.fields.permissionId,
11352
- asset: AuthorizePayrollRunExecutionInputSchema.fields.asset,
11353
- period: AuthorizePayrollRunExecutionInputSchema.fields.period,
11354
- items: AuthorizePayrollRunExecutionInputSchema.fields.items,
11355
- requestKey: Schema.optional(AuthorizePayrollRunExecutionInputSchema.fields.requestKey)
11356
- });
11357
- /** Decode caller input before session or signer work. Keep routing outside the input. */
11358
- function decodePayrollRunInput(value) {
11359
- try {
11360
- const decoded = Schema.decodeUnknownSync(RunInputSchema, { onExcessProperty: "error" })(value);
11361
- const input = {
11362
- permissionId: decoded.permissionId,
11363
- asset: decoded.asset,
11364
- period: decoded.period,
11365
- ...decoded.requestKey === void 0 ? {} : { requestKey: decoded.requestKey },
11366
- items: decoded.items.map((item) => ({
11367
- amount: item.amount,
11368
- gross: item.gross,
11369
- net: item.net,
11370
- adjustments: item.adjustments,
11371
- partyId: toPartyId(item.partyId),
11372
- to: item.to.kind === "party" ? {
11373
- kind: "party",
11374
- partyId: toPartyId(item.to.partyId)
11375
- } : item.to.kind === "address" ? {
11376
- kind: "address",
11377
- address: toAddress(item.to.address)
11378
- } : item.to
11379
- }))
11380
- };
11381
- if (input.items.length === 0 || input.period.start > input.period.end) throw Errors.invalidInput("input", "Payroll requires items and an ordered period");
11382
- const error = validateRunItems(input);
11383
- if (error !== null) throw error;
11384
- return input;
11385
- } catch (cause) {
11386
- throw cause instanceof CapxulError ? cause : Errors.invalidInput("input", "Invalid Payroll input");
11387
- }
11388
- }
11389
- /** Read only the exact backend prepare receipt, never an arbitrary signer failure. */
11390
- function payrollResolution(error, requestKey) {
11391
- const details = error.details;
11392
- if (error.code !== "WRONG_STATE" || details?.method !== runs.authorize.name || details.requestKey !== requestKey || typeof details.commandId !== "string" || typeof details.runId !== "string") return void 0;
11393
- return details.payrollResolution === "failed" || details.payrollResolution === "settled" ? details.payrollResolution : void 0;
11394
- }
11395
- function validatePayrollRunLookup(orgId, runId) {
11396
- return !Schema.is(PayrollRunIdSchema)(runId) || orgId.length === 0 ? {
11397
- ok: false,
11398
- error: Errors.invalidInput("runId", "Organization and run ID must be valid")
11399
- } : {
11400
- ok: true,
11401
- value: void 0
11402
- };
11403
- }
11404
- /** Strict saved detail decoder shared by the read and fresh stream. */
11405
- function decodePayrollRunDetail(raw, orgId, runId) {
11406
- const decoded = Schema.decodeUnknownResult(Schema.NullOr(PayrollRunDetailSchema), { onExcessProperty: "error" })(raw);
11407
- if (decoded._tag === "Failure") return {
11408
- ok: false,
11409
- error: Errors.invalidInput("run", "Invalid Payroll run detail")
11410
- };
11411
- return checkPayrollRunDetail(decoded.success, orgId, runId);
11412
- }
11413
- //#endregion
11414
- //#region src/payroll/run-subscription.ts
11415
- function detailValue(result) {
11416
- if (!result.ok) throw result.error;
11417
- return result.value;
11418
- }
11419
- function subscribePayrollRun(deps, orgId, runId, listener, options) {
11420
- const operation = CAPXUL_OPERATIONS.org.payroll.subscribeRun;
11421
- const valid = deps.validate(orgId, runId);
11422
- if (!valid.ok) return runCapxulEffect(Effect.fail(valid.error), observationOnlyControls(deps.invocationControls?.(options) ?? options), operation, deps.runPromise);
11423
- const decode = (raw) => detailValue(deps.decode(raw, orgId, runId));
11424
- return subscribeFreshQuery(deps, {
11425
- orgId,
11426
- runId
11427
- }, listener, operation, {
11428
- decode,
11429
- validateCached: (raw) => {
11430
- decode(raw);
11431
- },
11432
- invalidValue: (cause) => isCapxulError(cause) ? cause : Errors.invalidInput("run", "Invalid Payroll run detail"),
11433
- invalidScope: () => Errors.invalidInput("run", "Payroll run subscription scope does not match"),
11434
- lostValue: () => Errors.invalidInput("run", "Payroll run is no longer readable"),
11435
- unavailable: () => Errors.notImplemented("payroll", "subscribeRun")
11436
- }, options);
11437
- }
11438
- //#endregion
11439
- //#region src/payroll/run-authorization.ts
11440
- /**
11441
- * Authorize one payroll run: a stable request key, the prepared batch checked
11442
- * against the run the caller asked for, the signature, and the submission.
11443
- */
11444
- async function authorizePayrollRun(scope, input, controls, onRequestKey, onResolved) {
11445
- const { deps, orgId, requestKeyScope } = scope;
11446
- const signal = controls?.signal;
11447
- const execution = executionDependencies(deps);
11448
- if (execution === null) return {
11449
- ok: false,
11450
- error: Errors.notImplemented("payroll", "executionComposition")
11451
- };
11452
- try {
11453
- input = decodePayrollRunInput(input);
11454
- } catch (cause) {
11455
- return {
11456
- ok: false,
11457
- error: asCapxulError(cause)
11458
- };
11459
- }
11460
- const { requestKey: provided, ...canonicalInput } = input;
11461
- const actorId = onRequestKey === void 0 ? void 0 : execution.actor.authSession()?.authUserId;
11462
- if (onRequestKey !== void 0 && actorId === void 0) return {
11463
- ok: false,
11464
- error: Errors.notAuthenticated()
11465
- };
11466
- const requestKey = await paymentRequestKeyLifecycle(`${requestKeyScope}:${AUTHORIZE_RUN}`, onRequestKey === void 0 ? {
11467
- orgId,
11468
- input
11469
- } : {
11470
- actorId,
11471
- orgId,
11472
- input: canonicalInput
11473
- }, provided, onRequestKey === void 0 ? void 0 : { manageProvidedKey: true });
11474
- try {
11475
- await onRequestKey?.(requestKey.key);
11476
- if (onRequestKey !== void 0 && execution.actor.authSession()?.authUserId !== actorId) {
11477
- await requestKey.finish(false).catch(() => void 0);
11478
- return {
11479
- ok: false,
11480
- error: Errors.notAuthenticated()
11481
- };
11482
- }
11483
- } catch (cause) {
11484
- await requestKey.finish(false).catch(() => void 0);
11485
- return {
11486
- ok: false,
11487
- error: asCapxulError(cause)
11488
- };
11489
- }
11490
- let authorized;
11491
- let acceptedReplay;
11492
- let preparedClosed = false;
11493
- let terminalReplay;
11494
- const submitted = await executePrepared(execution, async (signerAddress) => {
11495
- const prepared = await runIfActive(signal, AUTHORIZE_RUN, () => withInvocationParentSpan(Effect.suspend(() => callOperation(deps.convexCall, runs.authorize, copyInvocationObservation(controls, {
11496
- orgId,
11497
- permissionId: input.permissionId,
11498
- asset: input.asset,
11499
- requestKey: requestKey.key,
11500
- signerAddress,
11501
- period: input.period,
11502
- items: input.items
11503
- }))).pipe(Effect.mapError((publicError) => ({ publicError }))), controls), deps.runPromise);
11504
- if (!prepared.ok) {
11505
- terminalReplay = payrollResolution(prepared.error, requestKey.key);
11506
- return prepared;
11507
- }
11508
- authorized = prepared.value.run;
11509
- acceptedReplay = prepared.value.replay.kind === "accepted" ? prepared.value.replay.submission : void 0;
11510
- return {
11511
- ok: true,
11512
- value: prepared.value.execution
11513
- };
11514
- }, (request, evidence) => authorized === void 0 || authorized.periodStart !== input.period.start || authorized.periodEnd !== input.period.end ? Promise.resolve(false) : isRunBatch({
11515
- orgId,
11516
- permissionId: input.permissionId,
11517
- requestKey: requestKey.key,
11518
- runId: authorized.id,
11519
- asset: input.asset,
11520
- period: input.period,
11521
- items: input.items
11522
- })(request, evidence), true, () => preparedClosed = true, signal, controls, void 0, () => acceptedReplay);
11523
- const resolution = preparedClosed ? "failed" : terminalReplay;
11524
- if (resolution !== void 0) try {
11525
- await onResolved?.(resolution);
11526
- } catch {}
11527
- try {
11528
- await requestKey.finish(submitted.ok || resolution !== void 0);
11529
- } catch {}
11530
- if (!submitted.ok) return submitted;
11531
- return authorized === void 0 ? {
11532
- ok: false,
11533
- error: Errors.unknown()
11534
- } : {
11535
- ok: true,
11536
- value: toPayrollRun(authorized)
11537
- };
11538
- }
11539
- const AUTHORIZE_RUN = runs.authorize.name;
11540
- function executionDependencies(deps) {
11541
- return deps.actor === void 0 || deps.chainId === void 0 || deps.signer === void 0 ? null : {
11542
- actor: deps.actor,
11543
- chainId: deps.chainId,
11544
- convexCall: deps.convexCall,
11545
- runPromise: deps.runPromise,
11546
- signer: deps.signer,
11547
- ...deps.telemetry === void 0 ? {} : { telemetry: deps.telemetry }
11548
- };
11549
- }
11550
- //#endregion
11551
- //#region src/payroll/runs.ts
11552
- function makePayrollMethods(deps, orgId) {
11553
- const requestKeyScope = deps.requestKeyScope ?? `client-${crypto.randomUUID()}`;
11554
- /** One observed call of one payroll row, its reply projected inside the call, under the row's name. */
11555
- const call = (row, args, options, project) => {
11556
- const controls = deps.invocationControls?.(options) ?? options;
11557
- return runPortEffect(callOperation(deps.convexCall, row, copyInvocationObservation(controls, args)).pipe(Effect.map(project), Effect.mapError((publicError) => ({ publicError }))), controls, row.name, deps.runPromise);
11558
- };
11559
- return {
11560
- subscribeRun: (runId, listener, options) => subscribePayrollRun({
11561
- actor: deps.actor,
11562
- convexCall: deps.convexCall,
11563
- query: reference(runs.get),
11564
- runPromise: deps.runPromise,
11565
- invocationControls: deps.invocationControls,
11566
- decode: decodePayrollRunDetail,
11567
- validate: validatePayrollRunLookup
11568
- }, orgId, runId, listener, options),
11569
- getRun: (runId, options) => {
11570
- const controls = deps.invocationControls?.(options) ?? options;
11571
- const lifetime = deps.actor?.authLifetime();
11572
- const operation = runs.get.name;
11573
- return runCapxulEffect(Effect.gen(function* () {
11574
- const lookup = validatePayrollRunLookup(orgId, runId);
11575
- if (!lookup.ok) return yield* Effect.fail(lookup.error);
11576
- if (lifetime === void 0 || lifetime.authUserId === null || deps.actor === void 0) return yield* Effect.fail(Errors.notAuthenticated());
11577
- const current = () => deps.actor?.matchesAuthLifetime(lifetime, lifetime.authUserId) === true;
11578
- if (!current()) return yield* Effect.fail(Errors.notAuthenticated());
11579
- const parent = yield* Effect.currentSpan.pipe(Effect.orDie);
11580
- const captured = carryInvocationParentSpan(controls, parent);
11581
- const run = yield* awaitCapxulResult(() => runIfActive(controls?.signal, operation, () => withInvocationParentSpan(Effect.suspend(() => callOperation(deps.convexCall, runs.get, copyInvocationObservation(captured, {
11582
- orgId,
11583
- runId
11584
- }))).pipe(Effect.mapError((publicError) => ({ publicError }))), captured), deps.runPromise));
11585
- if (!current()) return yield* Effect.fail(Errors.cancelled({ operation }));
11586
- const checked = checkPayrollRunDetail(run, orgId, runId);
11587
- return yield* checked.ok ? Effect.succeed(checked.value) : Effect.fail(checked.error);
11588
- }), observationOnlyControls(controls), operation, deps.runPromise);
11589
- },
11590
- runs: (options) => call(runs.list, { orgId }, options, toPayrollRuns),
11591
- authorizeRun: (input, options) => {
11592
- const controls = deps.invocationControls?.(options) ?? options;
11593
- return runCapxulEffect(Effect.gen(function* () {
11594
- if (controls?.signal?.aborted === true) return yield* Effect.fail(Errors.cancelled({ operation: AUTHORIZE_RUN }));
11595
- const parent = yield* Effect.currentSpan.pipe(Effect.orDie);
11596
- return yield* awaitCapxulResult(() => authorizePayrollRun({
11597
- deps,
11598
- orgId,
11599
- requestKeyScope
11600
- }, input, carryInvocationParentSpan(controls, parent), options?.onRequestKey, options?.onResolved));
11601
- }), observationOnlyControls(controls), AUTHORIZE_RUN, deps.runPromise);
11602
- },
11603
- terms: (options) => call(terms.list, { orgId }, options, (rates) => rates),
11604
- groups: {
11605
- list: (options) => call(groups.list, { orgId }, options, (saved) => mapPage(saved, toPayrollGroup)),
11606
- save: (input, options) => call(groups.save, {
11607
- orgId,
11608
- ...input.id === void 0 ? {} : { id: String(input.id) },
11609
- name: input.name,
11610
- tone: input.tone,
11611
- members: input.members
11612
- }, options, toPayrollGroup),
11613
- remove: (id, options) => call(groups.remove, {
11614
- orgId,
11615
- id
11616
- }, options, () => void 0)
11617
- }
11618
- };
11619
- }
11620
- const payrollUnavailable = () => Promise.resolve({
11621
- ok: false,
11622
- error: Errors.notImplemented("payroll", "executionComposition")
11623
- });
11624
- /** The bundle an unconfigured client exposes — every verb refuses, none throws. */
11625
- function makeUnavailablePayrollMethods() {
11626
- return {
11627
- getRun: payrollUnavailable,
11628
- subscribeRun: payrollUnavailable,
11629
- runs: payrollUnavailable,
11630
- authorizeRun: payrollUnavailable,
11631
- terms: payrollUnavailable,
11632
- groups: {
11633
- list: payrollUnavailable,
11634
- save: payrollUnavailable,
11635
- remove: payrollUnavailable
11636
- }
11637
- };
11638
- }
11639
- //#endregion
11640
11227
  //#region src/signing/embedded-wallet.ts
11641
11228
  function openfortEmbeddedWalletPort(input) {
11642
11229
  return {
@@ -17699,4 +17286,4 @@ async function createCapxulClient(input) {
17699
17286
  return createCapxulClientWithSignerControls(input, {});
17700
17287
  }
17701
17288
  //#endregion
17702
- export { decodePermissionIntent as _, cloneTelemetryEvent as a, identityErrorFromCapxul as c, devPrivateKeySigner as d, createOpenfortBrowserSigner as f, decodePayrollRunInput as g, openfortEmbeddedWalletPort as h, postHogObservability as i, bootstrapErrorFromCapxul as l, openfortEmbeddedSignerFromWallet as m, createCapxulClientWithSignerControls as n, cloneTelemetryProps as o, embeddedSigner as p, assembleCapxulClient as r, IdentityPortTag as s, createCapxulClient as t, deriveDevPrivateKey as u, toPayrollGroupId as v };
17289
+ export { cloneTelemetryEvent as a, identityErrorFromCapxul as c, devPrivateKeySigner as d, createOpenfortBrowserSigner as f, decodePermissionIntent as g, openfortEmbeddedWalletPort as h, postHogObservability as i, bootstrapErrorFromCapxul as l, openfortEmbeddedSignerFromWallet as m, createCapxulClientWithSignerControls as n, cloneTelemetryProps as o, embeddedSigner as p, assembleCapxulClient as r, IdentityPortTag as s, createCapxulClient as t, deriveDevPrivateKey as u };
@@ -1,4 +1,4 @@
1
- import { E as OpenfortBrowserSignerOptions, Ja as TelemetryEvent, Ka as TelemetryGroupInput, Ri as CapxulSigner, Ya as TelemetryPortEvent, ba as OrganizationSetup, io as ObservationAdapter, l as CapxulClientInput, ot as IdentityTransition, po as CapxulResult, qa as TelemetryIdentifyInput, z as CapxulClient } from "../index-JnWL305d.mjs";
1
+ import { $a as TelemetryPortEvent, E as OpenfortBrowserSignerOptions, Hi as CapxulSigner, Qa as TelemetryEvent, Xa as TelemetryGroupInput, Za as TelemetryIdentifyInput, _o as CapxulResult, co as ObservationAdapter, l as CapxulClientInput, ot as IdentityTransition, wa as OrganizationSetup, z as CapxulClient } from "../index-BjDZXc7n.mjs";
2
2
  import { Effect, Layer } from "effect";
3
3
  //#region src/platform/production-client.d.ts
4
4
  /** Per-client signing controls; only the testing entry exposes these to consumers. */
@@ -1,5 +1,5 @@
1
- import { a as cloneTelemetryEvent, c as identityErrorFromCapxul, l as bootstrapErrorFromCapxul, n as createCapxulClientWithSignerControls, o as cloneTelemetryProps, r as assembleCapxulClient, s as IdentityPortTag } from "../production-D3saI6ME.mjs";
2
- import { $ as toRaw, Ci as authClientPortFromPromiseAdapter, D as convexCallErrorFromCapxul, Dt as deriveCapxulSafeAddress, Fi as toAuthUserId, Fr as toAddress, Hi as CapxulError, Ii as toEmail, Ir as toChainId, J as assetAmountFromRaw, Li as toJwtToken, Lr as toWeiAmount, Mi as toDurationMs, Ni as toEpochMs, Oi as InMemoryAuthCacheAdapter, Pi as toEpochSeconds, Ri as toSessionToken, Rr as absurd, Si as toPublishableKey, Tt as CONFIGURED_MONEY_ASSETS, Vi as Errors, _ as accountFromAccountPositions, ar as toOrgId, bi as toAllowedOrigin, ci as ClockPortTag, f as smartAccountErrorFromCapxul, fn as toCountryCode, gn as toHandle, j as wireChainId, li as readClockNow, pn as toKycTier, pr as toAccountId, si as ClockError, vn as validateHandle, w as accountReadErrorFromCapxul, xi as toAppId, yn as redactTelemetryEvent } from "../access-BEMUjtyy.mjs";
1
+ import { a as cloneTelemetryEvent, c as identityErrorFromCapxul, l as bootstrapErrorFromCapxul, n as createCapxulClientWithSignerControls, o as cloneTelemetryProps, r as assembleCapxulClient, s as IdentityPortTag } from "../production-D5uC-i8N.mjs";
2
+ import { Ai as toJwtToken, Ar as toWeiAmount, D as convexCallErrorFromCapxul, Di as toEpochSeconds, Ei as toEpochMs, Et as CONFIGURED_MONEY_ASSETS, Mi as Errors, Ni as CapxulError, Oi as toAuthUserId, Or as toAddress, Ot as deriveCapxulSafeAddress, Qn as toOrgId, Ti as toDurationMs, X as assetAmountFromRaw, _ as accountFromAccountPositions, ei as ClockError, f as smartAccountErrorFromCapxul, fn as toCountryCode, gi as authClientPortFromPromiseAdapter, gn as toHandle, hi as toPublishableKey, j as wireChainId, ji as toSessionToken, jr as absurd, ki as toEmail, kr as toChainId, mi as toAppId, ni as readClockNow, or as toAccountId, pi as toAllowedOrigin, pn as toKycTier, ti as ClockPortTag, tt as toRaw, vn as validateHandle, w as accountReadErrorFromCapxul, xi as InMemoryAuthCacheAdapter, yn as redactTelemetryEvent } from "../access-BnlgphFT.mjs";
3
3
  import { Effect, Layer, Result, Semaphore } from "effect";
4
4
  import { getFunctionName } from "convex/server";
5
5
  //#region src/testing/production-client.ts