@capxul/sdk 4.1.2 → 4.1.4

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.
@@ -1576,6 +1576,7 @@ const ActivityFilterProps = {
1576
1576
  filter_status: Schema.optional(Schema.Array(Schema.Literals([
1577
1577
  "pending",
1578
1578
  "settling",
1579
+ "unresolved",
1579
1580
  "pending_claim",
1580
1581
  "scheduled",
1581
1582
  "streaming",
@@ -4358,6 +4359,7 @@ function verifiedOperationFields(attributes) {
4358
4359
  /** Observe a public Effect that already uses the canonical CapxulError channel. */
4359
4360
  async function runCapxulEffect(effect, controls, operation = CAPXUL_OPERATIONS.runtime.port, runPromise = Effect.runPromise) {
4360
4361
  const invocation = readInvocationObservation(controls);
4362
+ let owningSpan;
4361
4363
  const correlationId = safeEngineeringIdentifier(invocation?.context?.correlationId ?? controls?.correlation_id);
4362
4364
  const context = invocation?.active === false ? void 0 : sanitizeObservationContext(invocation?.context);
4363
4365
  const fields = {
@@ -4384,6 +4386,10 @@ async function runCapxulEffect(effect, controls, operation = CAPXUL_OPERATIONS.r
4384
4386
  const failure = error instanceof CapxulError ? error : void 0;
4385
4387
  const outcome = Exit.isSuccess(exit) ? "succeeded" : failure?.code === "CANCELLED" ? "cancelled" : failure !== void 0 && EXPECTED_OPERATION_OUTCOMES.has(failure.code) ? "refused" : "failed";
4386
4388
  const span = yield* Effect.currentSpan.pipe(Effect.orDie);
4389
+ if (Exit.isFailure(exit) && invocation?.active === true) owningSpan = Object.freeze({
4390
+ traceId: span.traceId,
4391
+ spanId: span.spanId
4392
+ });
4387
4393
  const completion = {
4388
4394
  ...fields,
4389
4395
  ...verifiedOperationFields(span.attributes),
@@ -4397,7 +4403,10 @@ async function runCapxulEffect(effect, controls, operation = CAPXUL_OPERATIONS.r
4397
4403
  yield* (outcome === "failed" ? Effect.logError("capxul_sdk_operation") : Effect.logInfo("capxul_sdk_operation")).pipe(Effect.annotateLogs(completion), Effect.catchCause(() => Effect.void));
4398
4404
  return yield* Exit.isSuccess(exit) ? Effect.succeed(exit.value) : Effect.failCause(exit.cause);
4399
4405
  }).pipe(Effect.withSpan(operation)), controls));
4400
- return !result.ok && invocation !== void 0 ? markFailureInvocationSnapshot(result, invocation) : result;
4406
+ return !result.ok && invocation !== void 0 ? markFailureInvocationSnapshot(result, {
4407
+ ...invocation,
4408
+ ...owningSpan === void 0 ? {} : { owningSpan }
4409
+ }) : result;
4401
4410
  }
4402
4411
  /** Map machine-internal failure state onto the public SDK error vocabulary. */
4403
4412
  function publicIdentityFailure(failure) {
@@ -5219,7 +5228,7 @@ const moneyExecutionContract = {
5219
5228
  };
5220
5229
  //#endregion
5221
5230
  //#region package.json
5222
- var version = "4.1.2";
5231
+ var version = "4.1.4";
5223
5232
  //#endregion
5224
5233
  //#region src/telemetry/exception-projection.ts
5225
5234
  /** Fixed fallback for failures that have no safe message. */
@@ -5277,8 +5286,13 @@ function postHogFailureObservation(policy, fixedSnapshot) {
5277
5286
  const safeFailure = sanitizeFailureObservation(failure);
5278
5287
  const directContext = callStartSnapshot?.context ?? directSnapshot?.context;
5279
5288
  const actorId = callStartSnapshot?.actorId;
5289
+ const span = callStartSnapshot?.owningSpan;
5280
5290
  return [safeFailure, {
5281
5291
  ...postHogProperties(safeFailure, directContext),
5292
+ ...span !== void 0 && /^(?!0+$)[0-9a-f]{32}$/u.test(span.traceId) && /^(?!0+$)[0-9a-f]{16}$/u.test(span.spanId) ? {
5293
+ trace_id: span.traceId,
5294
+ span_id: span.spanId
5295
+ } : {},
5282
5296
  ...actorId !== void 0 && /^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/u.test(actorId) ? {
5283
5297
  actor_id: actorId,
5284
5298
  actor_kind: "authenticated",
@@ -5449,7 +5463,8 @@ function report(adapter, kind, operation, cause, invocation, origin, authoritati
5449
5463
  }, {
5450
5464
  active: invocation.active,
5451
5465
  ...invocation.actorId === void 0 ? {} : { actorId: invocation.actorId },
5452
- ...context === void 0 ? {} : { context }
5466
+ ...context === void 0 ? {} : { context },
5467
+ ...invocation.owningSpan === void 0 ? {} : { owningSpan: invocation.owningSpan }
5453
5468
  });
5454
5469
  try {
5455
5470
  ignoreDeliveryFailure(kind === "operation" ? adapter.captureOperationFailure(failure) : adapter.captureException(failure));
@@ -6285,8 +6300,18 @@ function parsePaymentRequestKeyState(value) {
6285
6300
  if (typeof state.key !== "string" || !Array.isArray(state.active) || state.active.some((attempt) => typeof attempt !== "string") || typeof state.resolved !== "boolean") throw new TypeError("Invalid payment request key state");
6286
6301
  return state;
6287
6302
  }
6288
- async function paymentRequestKeyLifecycle(operation, intent, provided) {
6289
- if (provided !== void 0) return {
6303
+ /** A persisted caller key cannot displace another unresolved or active intent. */
6304
+ function managedRequestKeyState(state, provided, hasActiveAttempt) {
6305
+ if (provided === void 0 || state.key === provided) return state;
6306
+ if (!state.resolved || hasActiveAttempt) throw Errors.invalidInput("requestKey", "another request key is unresolved");
6307
+ return {
6308
+ key: provided,
6309
+ active: [],
6310
+ resolved: false
6311
+ };
6312
+ }
6313
+ async function paymentRequestKeyLifecycle(operation, intent, provided, options) {
6314
+ if (provided !== void 0 && options?.manageProvidedKey !== true) return {
6290
6315
  key: provided,
6291
6316
  finish: async () => void 0
6292
6317
  };
@@ -6299,11 +6324,12 @@ async function paymentRequestKeyLifecycle(operation, intent, provided) {
6299
6324
  })}`;
6300
6325
  if (typeof window === "undefined") {
6301
6326
  const attemptId = randomPaymentRequestKey();
6302
- const state = memoryPaymentRequestKeys.get(slot) ?? {
6303
- key: randomPaymentRequestKey(),
6327
+ let state = memoryPaymentRequestKeys.get(slot) ?? {
6328
+ key: provided ?? randomPaymentRequestKey(),
6304
6329
  active: [],
6305
6330
  resolved: false
6306
6331
  };
6332
+ state = managedRequestKeyState(state, provided, state.active.length > 0);
6307
6333
  state.active.push(attemptId);
6308
6334
  memoryPaymentRequestKeys.set(slot, state);
6309
6335
  let finished = false;
@@ -6327,14 +6353,15 @@ async function paymentRequestKeyLifecycle(operation, intent, provided) {
6327
6353
  const key = await manager.request(slot, async () => {
6328
6354
  const stored = window.localStorage.getItem(slot);
6329
6355
  let state = stored === null ? {
6330
- key: randomPaymentRequestKey(),
6356
+ key: provided ?? randomPaymentRequestKey(),
6331
6357
  active: [],
6332
6358
  resolved: false
6333
6359
  } : parsePaymentRequestKeyState(stored);
6334
6360
  const registered = state.active.includes(attemptId);
6335
6361
  const active = await heldPaymentAttemptIds(manager, slot);
6362
+ state = managedRequestKeyState(state, provided, active.some((id) => id !== attemptId));
6336
6363
  if (!registered && active.every((id) => id === attemptId) && state.resolved) state = {
6337
- key: randomPaymentRequestKey(),
6364
+ key: provided ?? randomPaymentRequestKey(),
6338
6365
  active: [],
6339
6366
  resolved: false
6340
6367
  };
@@ -8910,21 +8937,54 @@ function executionDependencies(deps) {
8910
8937
  signer: deps.signer
8911
8938
  };
8912
8939
  }
8940
+ /** Read only the exact backend prepare receipt, never an arbitrary signer failure. */
8941
+ function payrollResolution(error, requestKey) {
8942
+ const details = error.details;
8943
+ if (error.code !== "WRONG_STATE" || details?.method !== AUTHORIZE_RUN || details.requestKey !== requestKey || typeof details.commandId !== "string" || typeof details.runId !== "string") return void 0;
8944
+ return details.payrollResolution === "failed" || details.payrollResolution === "settled" ? details.payrollResolution : void 0;
8945
+ }
8913
8946
  function makePayrollMethods(deps, orgId) {
8914
8947
  const requestKeyScope = deps.requestKeyScope ?? `client-${crypto.randomUUID()}`;
8915
- async function authorize(input, controls) {
8948
+ async function authorize(input, controls, onRequestKey, onResolved) {
8916
8949
  const signal = controls?.signal;
8917
8950
  const execution = executionDependencies(deps);
8918
8951
  if (execution === null) return {
8919
8952
  ok: false,
8920
8953
  error: Errors.notImplemented("payroll", "executionComposition")
8921
8954
  };
8922
- const requestKey = await paymentRequestKeyLifecycle(`${requestKeyScope}:${AUTHORIZE_RUN}`, {
8955
+ const { requestKey: provided, ...canonicalInput } = input;
8956
+ const actorId = onRequestKey === void 0 ? void 0 : execution.actor.authSession()?.authUserId;
8957
+ if (onRequestKey !== void 0 && actorId === void 0) return {
8958
+ ok: false,
8959
+ error: Errors.notAuthenticated()
8960
+ };
8961
+ const requestKey = await paymentRequestKeyLifecycle(`${requestKeyScope}:${AUTHORIZE_RUN}`, onRequestKey === void 0 ? {
8923
8962
  orgId,
8924
8963
  input
8925
- }, input.requestKey);
8964
+ } : {
8965
+ actorId,
8966
+ orgId,
8967
+ input: canonicalInput
8968
+ }, provided, onRequestKey === void 0 ? void 0 : { manageProvidedKey: true });
8969
+ try {
8970
+ await onRequestKey?.(requestKey.key);
8971
+ if (onRequestKey !== void 0 && execution.actor.authSession()?.authUserId !== actorId) {
8972
+ await requestKey.finish(false).catch(() => void 0);
8973
+ return {
8974
+ ok: false,
8975
+ error: Errors.notAuthenticated()
8976
+ };
8977
+ }
8978
+ } catch (cause) {
8979
+ await requestKey.finish(false).catch(() => void 0);
8980
+ return {
8981
+ ok: false,
8982
+ error: cause instanceof CapxulError ? cause : Errors.unknown(cause)
8983
+ };
8984
+ }
8926
8985
  let authorized;
8927
8986
  let preparedClosed = false;
8987
+ let terminalReplay;
8928
8988
  const submitted = await executePrepared(execution, async (signerAddress) => {
8929
8989
  const prepared = await runIfActive(signal, AUTHORIZE_RUN, () => withInvocationParentSpan(Effect.suspend(() => deps.convexCall.action(payrollContract.authorizeRun, copyInvocationObservation(controls, { input: {
8930
8990
  orgId,
@@ -8934,7 +8994,10 @@ function makePayrollMethods(deps, orgId) {
8934
8994
  period: input.period,
8935
8995
  items: input.items
8936
8996
  } }))), controls), deps.runPromise);
8937
- if (!prepared.ok) return prepared;
8997
+ if (!prepared.ok) {
8998
+ terminalReplay = payrollResolution(prepared.error, requestKey.key);
8999
+ return prepared;
9000
+ }
8938
9001
  authorized = prepared.value.run;
8939
9002
  return {
8940
9003
  ok: true,
@@ -8947,8 +9010,12 @@ function makePayrollMethods(deps, orgId) {
8947
9010
  runId: authorized.id,
8948
9011
  items: input.items
8949
9012
  })(request), true, () => preparedClosed = true, signal, controls);
9013
+ const resolution = preparedClosed ? "failed" : terminalReplay;
9014
+ if (resolution !== void 0) try {
9015
+ await onResolved?.(resolution);
9016
+ } catch {}
8950
9017
  try {
8951
- await requestKey.finish(submitted.ok || preparedClosed);
9018
+ await requestKey.finish(submitted.ok || resolution !== void 0);
8952
9019
  } catch {}
8953
9020
  if (!submitted.ok) return submitted;
8954
9021
  return authorized === void 0 ? {
@@ -8970,7 +9037,7 @@ function makePayrollMethods(deps, orgId) {
8970
9037
  if (controls?.signal?.aborted === true) return yield* Effect.fail(Errors.cancelled({ operation: AUTHORIZE_RUN }));
8971
9038
  const parent = yield* Effect.currentSpan.pipe(Effect.orDie);
8972
9039
  const result = yield* Effect.tryPromise({
8973
- try: () => authorize(input, carryInvocationParentSpan(controls, parent)),
9040
+ try: () => authorize(input, carryInvocationParentSpan(controls, parent), options?.onRequestKey, options?.onResolved),
8974
9041
  catch: (cause) => cause instanceof CapxulError ? cause : Errors.unknown(cause)
8975
9042
  });
8976
9043
  return yield* result.ok ? Effect.succeed(result.value) : Effect.fail(result.error);
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { B as EVM_ADDRESS_RE, Ct as RevertSummary, E as Address, G as OrgId, I as CountryCode, J as PayrollGroupId, K as PartyId, M as AuthUserId, P as BudgetId, St as FailureMode, T as AccountId, U as Handle, W as Money, Y as PayrollRunId, _t as isCapxulError, a as SignerStatusStore, bt as ChainUpstream, c as AccountProviderSource, ct as toHandle, d as eip1193AccountProvider, dt as CAPXUL_ERROR_CODES, et as RoleKey, f as localPrivateKeyAccountProvider, ft as CapxulError, g as SmartAccount, h as Session, ht as Errors, i as SignerStatus, j as AuthSession, l as AccountRequirement, lt as toPartyId, m as Profile, mt as CapxulErrorDetails, n as CapxulSigner, o as injectedWalletSigner, ot as toAddress, p as CapxulResult, pt as CapxulErrorCode, r as Eip1193RequestProvider, rt as TesterKind, s as AccountProvider, st as toCountryCode, t as CapxulDigestSigner, u as Eip1193Provider, ut as CAPXUL_PAYMENTS_V2_ADDRESS, vt as CHAIN_UPSTREAMS, w as Account, xt as FAILURE_MODES, yt as ChainCause } from "./signer-C0hZ6Kiy.mjs";
2
- import { $ as OrganizationPaymentsMethods, $n as TelemetryPort, $t as DestinationListInput, A as OrgView, An as TargetsMethods, At as AddressBookMethods, B as PayrollGroupInput, Bn as OrgSetupStep, Bt as ActivityListParams, C as DetectPendingOrgInvitationsResult, Cn as PaymentType, Ct as ActorRelationshipMethods, D as OrgMethods, Dn as Ref, Dt as AddressBookAddInput, E as MemberView, En as RecipientResolution, Et as ActorRequestsMethods, F as RoleSpendCap, Fn as CompleteProfileInput, Ft as ActivityAnnotationInput, G as PayrollRun, Gn as InboxStatus, Gt as ActivitySummary, H as PayrollGroupsMethods, Hn as CurrentHoldings, Ht as ActivityPage, I as RoleView, In as IdentityMethods, It as ActivityDetail, J as PayrollRuns, Jn as PaymentStatus$1, Jt as ActorReference, K as PayrollRunItemInput, Kn as PAYMENT_DIRECTIONS, Kt as ActivitySummaryParams, L as AuthorizeRunInput, Ln as SmartAccountMethods, Lt as ActivityFilter, M as OrganizationAuditLogItem, Mn as AccountLifecycle, Mt as InboxItem, N as ResendInviteTokenInput, Nn as AccountSetupStep, Nt as InboxMethods, O as OrgScopedMethods, On as ResolvedTarget, Ot as AddressBookEntry, P as RoleDefinition, Pn as isSettingUpLifecycle, Pt as ActivityAnnotation, Q as OrganizationPaymentItemInput, Qt as DestinationKind, R as PayrollEngagementTerms, Rn as AuthMethods, Rt as ActivityItem, S as CreateOrgInput, Sn as PaymentTiming, St as ActorProfileMethods, T as MemberStatus, Tn as PaymentsPayInput, Tt as ActorRequestIssueInput, U as PayrollMethods, Un as Permission, Ut as ActivityRange, V as PayrollGroupMember, Vn as ActorRef, Vt as ActivityMethods, W as PayrollOptions, Wn as SubmittedPermissionExecution, Wt as ActivityReference, X as OrganizationPaymentBatchInput, Xt as Destination, Y as PayrollTermsUnit, Yn as RequestStatus, Yt as DepositInstructions, Z as OrganizationPaymentInput, Zt as DestinationAddInput, _ as SystemMethods, _n as PaymentDocumentRender, _t as PersonOnboarding, a as SdkFailureObservation, an as MeMethods, ar as StateLabel, at as PermissionReplaceInput, b as CurrentUserContext, bn as PaymentMoney, bt as AccountMethods, c as PostHogObservabilityOptions, cn as OfframpMethods, cr as isRestoring, ct as Budget, d as CreateCapxulClientInput, dn as OfframpStatus, dt as OrgMeOptions, en as DestinationPayload, er as Destination$1, et as PermissionAssignInput, f as IdentityProfileDetails, fn as Payment, ft as AccountsMethods, g as Holding, gn as PaymentDocumentRef, gt as OrganizationOnboardingInput, h as HoldingsMethods, hn as PaymentDocumentKind, ht as OrganizationOnboarding, i as ObservationDelivery, in as FinancialOpsMethods, ir as Readiness, it as PermissionOptions, j as OrganizationAccount, jn as fingerprintPaymentIntent, jt as InboxApproveInput, k as OrgTemplate, kn as TargetReference, kt as AddressBookLabelInput, l as postHogObservability, ln as OfframpQuote, lr as IdentityTransition, lt as OrgMe, m as IdentityRuntimeSendResult, mn as PaymentDirection, mt as OnboardingMethods, n as ObservationAdapter, nn as DestinationRemoveInput, nr as IdentityState, nt as PermissionCreateInput, o as HostObservability, on as MeProfile, or as destination, ot as PermissionRevokeInput, p as IdentityRuntime, pn as PaymentActivityEvidence, pt as CompletedPersonProfile, q as PayrollRunStatus, qn as PAYMENT_STATUSES, qt as ActivitySummaryTotal, r as ObservationContext, rn as DestinationsMethods, rr as OrgLane, rt as PermissionMethods, s as PostHogObservabilityClient, sn as MovementActivityEvidence, sr as isClaimed, st as PermissionReadResult, t as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, tn as DestinationRail, tr as IdentityEvent, tt as PermissionChangeInput, u as CapxulClient, un as OfframpQuoteInput, ur as InvocationControls, ut as OrgMeMethod, v as SystemHealth, vn as PaymentDocumentVerification, vt as PersonOnboardingInput, w as InviteMemberInput, wn as PaymentsMethods, wt as ActorRequest, x as CurrentUserMethods, xn as PaymentStatus, xt as ActorProfile, y as MediaMethods, yn as PaymentDocumentsMethods, yt as ReadyAccountLifecycle, z as PayrollGroup, zn as OrgLifecycle, zt as ActivityKind } from "./observation-D2JnjN2R.mjs";
2
+ import { $ as OrganizationPaymentItemInput, $t as DestinationKind, A as OrgView, An as TargetReference, At as AddressBookLabelInput, B as PayrollGroup, Bn as OrgLifecycle, Bt as ActivityKind, C as DetectPendingOrgInvitationsResult, Cn as PaymentTiming, Ct as ActorProfileMethods, D as OrgMethods, Dn as RecipientResolution, Dt as ActorRequestsMethods, E as MemberView, En as PaymentsPayInput, Et as ActorRequestIssueInput, F as RoleSpendCap, Fn as isSettingUpLifecycle, Ft as ActivityAnnotation, G as PayrollOptions, Gn as SubmittedPermissionExecution, Gt as ActivityReference, H as PayrollGroupMember, Hn as ActorRef, Ht as ActivityMethods, I as RoleView, In as CompleteProfileInput, It as ActivityAnnotationInput, J as PayrollRunStatus, Jn as PAYMENT_STATUSES, Jt as ActivitySummaryTotal, K as PayrollRun, Kn as InboxStatus, Kt as ActivitySummary, L as AuthorizeRunInput, Ln as IdentityMethods, Lt as ActivityDetail, M as OrganizationAuditLogItem, Mn as fingerprintPaymentIntent, Mt as InboxApproveInput, N as ResendInviteTokenInput, Nn as AccountLifecycle, Nt as InboxItem, O as OrgScopedMethods, On as Ref, Ot as AddressBookAddInput, P as RoleDefinition, Pn as AccountSetupStep, Pt as InboxMethods, Q as OrganizationPaymentInput, Qt as DestinationAddInput, R as AuthorizeRunOptions, Rn as SmartAccountMethods, Rt as ActivityFilter, S as CreateOrgInput, Sn as PaymentStatus, St as ActorProfile, T as MemberStatus, Tn as PaymentsMethods, Tt as ActorRequest, U as PayrollGroupsMethods, Un as CurrentHoldings, Ut as ActivityPage, V as PayrollGroupInput, Vn as OrgSetupStep, Vt as ActivityListParams, W as PayrollMethods, Wn as Permission, Wt as ActivityRange, X as PayrollTermsUnit, Xn as RequestStatus, Xt as DepositInstructions, Y as PayrollRuns, Yn as PaymentStatus$1, Yt as ActorReference, Z as OrganizationPaymentBatchInput, Zt as Destination, _ as SystemMethods, _n as PaymentDocumentRef, _t as OrganizationOnboardingInput, a as SdkFailureObservation, an as FinancialOpsMethods, ar as Readiness, at as PermissionOptions, b as CurrentUserContext, bn as PaymentDocumentsMethods, bt as ReadyAccountLifecycle, c as PostHogObservabilityOptions, cn as MovementActivityEvidence, cr as isClaimed, ct as PermissionReadResult, d as CreateCapxulClientInput, dn as OfframpQuoteInput, dr as InvocationControls, dt as OrgMeMethod, en as DestinationListInput, er as TelemetryPort, et as OrganizationPaymentsMethods, f as IdentityProfileDetails, fn as OfframpStatus, ft as OrgMeOptions, g as Holding, gn as PaymentDocumentKind, gt as OrganizationOnboarding, h as HoldingsMethods, hn as PaymentDirection, ht as OnboardingMethods, i as ObservationDelivery, in as DestinationsMethods, ir as OrgLane, it as PermissionMethods, j as OrganizationAccount, jn as TargetsMethods, jt as AddressBookMethods, k as OrgTemplate, kn as ResolvedTarget, kt as AddressBookEntry, l as postHogObservability, ln as OfframpMethods, lr as isRestoring, lt as Budget, m as IdentityRuntimeSendResult, mn as PaymentActivityEvidence, mt as CompletedPersonProfile, n as ObservationAdapter, nn as DestinationRail, nr as IdentityEvent, nt as PermissionChangeInput, o as HostObservability, on as MeMethods, or as StateLabel, ot as PermissionReplaceInput, p as IdentityRuntime, pn as Payment, pt as AccountsMethods, q as PayrollRunItemInput, qn as PAYMENT_DIRECTIONS, qt as ActivitySummaryParams, r as ObservationContext, rn as DestinationRemoveInput, rr as IdentityState, rt as PermissionCreateInput, s as PostHogObservabilityClient, sn as MeProfile, sr as destination, st as PermissionRevokeInput, t as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, tn as DestinationPayload, tr as Destination$1, tt as PermissionAssignInput, u as CapxulClient, un as OfframpQuote, ur as IdentityTransition, ut as OrgMe, v as SystemHealth, vn as PaymentDocumentRender, vt as PersonOnboarding, w as InviteMemberInput, wn as PaymentType, wt as ActorRelationshipMethods, x as CurrentUserMethods, xn as PaymentMoney, xt as AccountMethods, y as MediaMethods, yn as PaymentDocumentVerification, yt as PersonOnboardingInput, z as PayrollEngagementTerms, zn as AuthMethods, zt as ActivityItem } from "./observation-Bhdq9-l6.mjs";
3
3
  import "./OAuthBearerAuthClient-D-DLYlKj.mjs";
4
4
  import { Context, Effect, Layer } from "effect";
5
5
  import { Hex } from "viem";
@@ -626,4 +626,4 @@ declare function captureException(telemetry: TelemetryPort, error: unknown, cont
626
626
  */
627
627
  declare function captureExceptionSync(telemetry: TelemetryPort, error: unknown, context?: HandledErrorReportContext): void;
628
628
  //#endregion
629
- export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, 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 AuthMethods, type AuthSession, type AuthUserId, type AuthorizeRunInput, type Budget, type BudgetId, 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 CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOrgInput, type CurrentHoldings, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, type Eip1193Provider, type Eip1193RequestProvider, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, HANDLE_RE, type Handle, type HandledErrorReportContext, type Holding, type HoldingsMethods, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxItem, type InboxMethods, type InviteMemberInput, type InvocationControls, type MeMethods, type MeProfile, type MediaMethods, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type PartyId, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentKind, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentMoney, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, type PayrollGroupInput, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunId, type PayrollRunItemInput, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RevertSummary, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type SdkFailureObservation, type Session, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress, toHandle, toPartyId };
629
+ export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, 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 AuthMethods, type AuthSession, type AuthUserId, type AuthorizeRunInput, type AuthorizeRunOptions, type Budget, type BudgetId, 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 CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOrgInput, type CurrentHoldings, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, type Eip1193Provider, type Eip1193RequestProvider, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, HANDLE_RE, type Handle, type HandledErrorReportContext, type Holding, type HoldingsMethods, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxItem, type InboxMethods, type InviteMemberInput, type InvocationControls, type MeMethods, type MeProfile, type MediaMethods, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type PartyId, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentKind, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentMoney, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, type PayrollGroupInput, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunId, type PayrollRunItemInput, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RevertSummary, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type SdkFailureObservation, type Session, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress, toHandle, toPartyId };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as stampTelemetryEnvelope, A as safeExceptionLabel, B as resolveFailureMode, C as observeFailedResult, D as normalizeExceptionErrorKind, E as SDK_VERSION$1, F as causeChain, G as sanitizeObservationContext, H as readInvocationObservation, I as injectedWalletSigner, J as CAPXUL_FUNCTIONS, K as PAYMENT_DIRECTIONS, L as isSignerNotReadySignal, M as fromWei, N as isSettingUpLifecycle, O as normalizeExceptionOperation, P as formatTraceparent, Q as redactTelemetryProps, R as openfortSignerNotReadyCode, S as observationContextProps, T as EXCEPTION_MESSAGE, U as OBSERVATION_CONTEXT_HEADER, V as copyInvocationObservation, W as encodeObservationContextHeader, X as EngineeringTelemetryBootstrapPolicy, Y as BootstrapEnvelope, _ as fingerprintPaymentIntent, a as AccountReadPortTag, at as isRestoring, b as failureDetail, c as retryIdempotentRead, d as IdentityPortTag, et as CAPXUL_OPERATIONS, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, h as BootstrapPortTag, i as smartAccountErrorFromCapxul, it as isClaimed, j as version, k as projectSdkException, l as PRODUCT_INVOCATION, m as convexCallErrorFromCapxul, n as detectAuthCacheAdapter, nt as normalizeCapxulOperation, o as accountReadErrorFromCapxul, p as ConvexCallPortTag, q as PAYMENT_STATUSES, r as SmartAccountPortTag, rt as destination, s as TelemetryPortTag, t as assembleCapxulClient, tt as isCapxulOperation, u as wireChainId, v as toWei, w as postHogFailureObservation, x as failureEvidenceProps, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as signerFailure } from "./create-capxul-client-DGnNFym7.mjs";
1
+ import { $ as stampTelemetryEnvelope, A as safeExceptionLabel, B as resolveFailureMode, C as observeFailedResult, D as normalizeExceptionErrorKind, E as SDK_VERSION$1, F as causeChain, G as sanitizeObservationContext, H as readInvocationObservation, I as injectedWalletSigner, J as CAPXUL_FUNCTIONS, K as PAYMENT_DIRECTIONS, L as isSignerNotReadySignal, M as fromWei, N as isSettingUpLifecycle, O as normalizeExceptionOperation, P as formatTraceparent, Q as redactTelemetryProps, R as openfortSignerNotReadyCode, S as observationContextProps, T as EXCEPTION_MESSAGE, U as OBSERVATION_CONTEXT_HEADER, V as copyInvocationObservation, W as encodeObservationContextHeader, X as EngineeringTelemetryBootstrapPolicy, Y as BootstrapEnvelope, _ as fingerprintPaymentIntent, a as AccountReadPortTag, at as isRestoring, b as failureDetail, c as retryIdempotentRead, d as IdentityPortTag, et as CAPXUL_OPERATIONS, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, h as BootstrapPortTag, i as smartAccountErrorFromCapxul, it as isClaimed, j as version, k as projectSdkException, l as PRODUCT_INVOCATION, m as convexCallErrorFromCapxul, n as detectAuthCacheAdapter, nt as normalizeCapxulOperation, o as accountReadErrorFromCapxul, p as ConvexCallPortTag, q as PAYMENT_STATUSES, r as SmartAccountPortTag, rt as destination, s as TelemetryPortTag, t as assembleCapxulClient, tt as isCapxulOperation, u as wireChainId, v as toWei, w as postHogFailureObservation, x as failureEvidenceProps, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as signerFailure } from "./create-capxul-client-B3ET402J.mjs";
2
2
  import { $ as CapxulError, A as toAuthUserId, B as toJwtToken, D as toAddress, E as toAccountId, F as toDurationMs, H as toOrgId, I as toEmail, J as toSessionToken, K as toPublishableKey, L as toEpochMs, M as toChainId, N as toCountryCode, O as toAllowedOrigin, P as toCurrencyCode, Q as CAPXUL_ERROR_CODES, R as toEpochSeconds, T as currencySymbolFor, U as toPartyId, V as toKycTier, X as HANDLE_RE, Y as toTesterKind, Z as decodeConvexError, d as AuthClientError, f as AuthClientPortTag, g as BASE_SEPOLIA_CHAIN_ID, h as normalizeBindingEmail, it as FAILURE_MODES, l as ClockPortTag, m as CAPXUL_PAYMENTS_V2_ADDRESS, nt as isCapxulError, q as toRoleKey, rt as CHAIN_UPSTREAMS, s as AuthCachePortTag, tt as Errors, u as authClientPortFromPromiseAdapter, x as EVM_ADDRESS_RE, z as toHandle } from "./clock-C2AUlq1V.mjs";
3
3
  import { n as SystemClockLayer } from "./OAuthBearerAuthClient-BHvDR8_0.mjs";
4
4
  import { Cause, Context, Data, Duration, Effect, Exit, Layer, Result, Schedule, SchemaIssue, SchemaParser, Scope, Tracer } from "effect";
@@ -2188,6 +2188,12 @@ interface AuthorizeRunInput {
2188
2188
  type PayrollOptions = {
2189
2189
  readonly signal?: AbortSignal;
2190
2190
  };
2191
+ type AuthorizeRunOptions = PayrollOptions & {
2192
+ /** Persist this SDK-allocated key before the first backend write. Reject to prevent execution. */
2193
+ readonly onRequestKey?: (key: string) => void | Promise<void>;
2194
+ /** A prior command is conclusively closed. The current failed result remains a failure. */
2195
+ readonly onResolved?: (outcome: "failed" | "settled") => void | Promise<void>;
2196
+ };
2191
2197
  interface PayrollGroupsMethods {
2192
2198
  list(options?: PayrollOptions): Promise<CapxulResult<readonly PayrollGroup[]>>;
2193
2199
  save(input: PayrollGroupInput, options?: PayrollOptions): Promise<CapxulResult<PayrollGroup>>;
@@ -2195,7 +2201,7 @@ interface PayrollGroupsMethods {
2195
2201
  }
2196
2202
  interface PayrollMethods {
2197
2203
  runs(options?: PayrollOptions): Promise<CapxulResult<PayrollRuns>>;
2198
- authorizeRun(input: AuthorizeRunInput, options?: PayrollOptions): Promise<CapxulResult<PayrollRun>>;
2204
+ authorizeRun(input: AuthorizeRunInput, options?: AuthorizeRunOptions): Promise<CapxulResult<PayrollRun>>;
2199
2205
  /** The active engagement terms of the org's employed people (ruling Q3). */
2200
2206
  terms(options?: PayrollOptions): Promise<CapxulResult<readonly PayrollEngagementTerms[]>>;
2201
2207
  readonly groups: PayrollGroupsMethods;
@@ -2829,4 +2835,4 @@ interface ObservationAdapter {
2829
2835
  /** Stable PostHog event used for typed failures that are expected product outcomes. */
2830
2836
  declare const CAPXUL_SDK_EXPECTED_OUTCOME_EVENT = "capxul_sdk_expected_outcome";
2831
2837
  //#endregion
2832
- export { OrganizationPaymentsMethods as $, TelemetryPort as $n, DestinationListInput as $t, OrgView as A, TargetsMethods as An, AddressBookMethods as At, PayrollGroupInput as B, OrgSetupStep as Bn, ActivityListParams as Bt, DetectPendingOrgInvitationsResult as C, PaymentType as Cn, ActorRelationshipMethods as Ct, OrgMethods as D, Ref$1 as Dn, AddressBookAddInput as Dt, MemberView as E, RecipientResolution as En, ActorRequestsMethods as Et, RoleSpendCap as F, CompleteProfileInput as Fn, ActivityAnnotationInput as Ft, PayrollRun as G, InboxStatus as Gn, ActivitySummary as Gt, PayrollGroupsMethods as H, CurrentHoldings as Hn, ActivityPage as Ht, RoleView as I, IdentityMethods as In, ActivityDetail as It, PayrollRuns as J, PaymentStatus$1 as Jn, ActorReference as Jt, PayrollRunItemInput as K, PAYMENT_DIRECTIONS as Kn, ActivitySummaryParams as Kt, AuthorizeRunInput as L, SmartAccountMethods as Ln, ActivityFilter as Lt, OrganizationAuditLogItem as M, AccountLifecycle as Mn, InboxItem as Mt, ResendInviteTokenInput as N, AccountSetupStep as Nn, InboxMethods as Nt, OrgScopedMethods as O, ResolvedTarget as On, AddressBookEntry as Ot, RoleDefinition as P, isSettingUpLifecycle as Pn, ActivityAnnotation as Pt, OrganizationPaymentItemInput as Q, TelemetryIdentifyInput as Qn, DestinationKind as Qt, PayrollEngagementTerms as R, AuthMethods as Rn, ActivityItem as Rt, CreateOrgInput as S, PaymentTiming as Sn, ActorProfileMethods as St, MemberStatus as T, PaymentsPayInput as Tn, ActorRequestIssueInput as Tt, PayrollMethods as U, Permission as Un, ActivityRange as Ut, PayrollGroupMember as V, ActorRef as Vn, ActivityMethods as Vt, PayrollOptions as W, SubmittedPermissionExecution as Wn, ActivityReference as Wt, OrganizationPaymentBatchInput as X, TelemetryEvent as Xn, Destination as Xt, PayrollTermsUnit as Y, RequestStatus as Yn, DepositInstructions as Yt, OrganizationPaymentInput as Z, TelemetryGroupInput as Zn, DestinationAddInput as Zt, SystemMethods as _, PaymentDocumentRender as _n, PersonOnboarding as _t, SdkFailureObservation as a, MeMethods as an, StateLabel as ar, PermissionReplaceInput as at, CurrentUserContext as b, PaymentMoney as bn, AccountMethods as bt, PostHogObservabilityOptions as c, OfframpMethods as cn, isRestoring as cr, Budget as ct, CreateCapxulClientInput as d, OfframpStatus as dn, OrgMeOptions as dt, DestinationPayload as en, Destination$1 as er, PermissionAssignInput as et, IdentityProfileDetails as f, Payment as fn, AccountsMethods as ft, Holding as g, PaymentDocumentRef as gn, OrganizationOnboardingInput as gt, HoldingsMethods as h, PaymentDocumentKind as hn, OrganizationOnboarding as ht, ObservationDelivery as i, FinancialOpsMethods as in, Readiness as ir, PermissionOptions as it, OrganizationAccount as j, fingerprintPaymentIntent as jn, InboxApproveInput as jt, OrgTemplate as k, TargetReference as kn, AddressBookLabelInput as kt, postHogObservability as l, OfframpQuote as ln, IdentityTransition as lr, OrgMe as lt, IdentityRuntimeSendResult as m, PaymentDirection as mn, OnboardingMethods as mt, ObservationAdapter as n, DestinationRemoveInput as nn, IdentityState as nr, PermissionCreateInput as nt, HostObservability as o, MeProfile as on, destination as or, PermissionRevokeInput as ot, IdentityRuntime as p, PaymentActivityEvidence as pn, CompletedPersonProfile as pt, PayrollRunStatus as q, PAYMENT_STATUSES as qn, ActivitySummaryTotal as qt, ObservationContext as r, DestinationsMethods as rn, OrgLane as rr, PermissionMethods as rt, PostHogObservabilityClient as s, MovementActivityEvidence as sn, isClaimed as sr, PermissionReadResult as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, DestinationRail as tn, IdentityEvent as tr, PermissionChangeInput as tt, CapxulClient as u, OfframpQuoteInput as un, InvocationControls as ur, OrgMeMethod as ut, SystemHealth as v, PaymentDocumentVerification as vn, PersonOnboardingInput as vt, InviteMemberInput as w, PaymentsMethods as wn, ActorRequest as wt, CurrentUserMethods as x, PaymentStatus as xn, ActorProfile as xt, MediaMethods as y, PaymentDocumentsMethods as yn, ReadyAccountLifecycle as yt, PayrollGroup as z, OrgLifecycle as zn, ActivityKind as zt };
2838
+ export { OrganizationPaymentItemInput as $, TelemetryIdentifyInput as $n, DestinationKind as $t, OrgView as A, TargetReference as An, AddressBookLabelInput as At, PayrollGroup as B, OrgLifecycle as Bn, ActivityKind as Bt, DetectPendingOrgInvitationsResult as C, PaymentTiming as Cn, ActorProfileMethods as Ct, OrgMethods as D, RecipientResolution as Dn, ActorRequestsMethods as Dt, MemberView as E, PaymentsPayInput as En, ActorRequestIssueInput as Et, RoleSpendCap as F, isSettingUpLifecycle as Fn, ActivityAnnotation as Ft, PayrollOptions as G, SubmittedPermissionExecution as Gn, ActivityReference as Gt, PayrollGroupMember as H, ActorRef as Hn, ActivityMethods as Ht, RoleView as I, CompleteProfileInput as In, ActivityAnnotationInput as It, PayrollRunStatus as J, PAYMENT_STATUSES as Jn, ActivitySummaryTotal as Jt, PayrollRun as K, InboxStatus as Kn, ActivitySummary as Kt, AuthorizeRunInput as L, IdentityMethods as Ln, ActivityDetail as Lt, OrganizationAuditLogItem as M, fingerprintPaymentIntent as Mn, InboxApproveInput as Mt, ResendInviteTokenInput as N, AccountLifecycle as Nn, InboxItem as Nt, OrgScopedMethods as O, Ref$1 as On, AddressBookAddInput as Ot, RoleDefinition as P, AccountSetupStep as Pn, InboxMethods as Pt, OrganizationPaymentInput as Q, TelemetryGroupInput as Qn, DestinationAddInput as Qt, AuthorizeRunOptions as R, SmartAccountMethods as Rn, ActivityFilter as Rt, CreateOrgInput as S, PaymentStatus as Sn, ActorProfile as St, MemberStatus as T, PaymentsMethods as Tn, ActorRequest as Tt, PayrollGroupsMethods as U, CurrentHoldings as Un, ActivityPage as Ut, PayrollGroupInput as V, OrgSetupStep as Vn, ActivityListParams as Vt, PayrollMethods as W, Permission as Wn, ActivityRange as Wt, PayrollTermsUnit as X, RequestStatus as Xn, DepositInstructions as Xt, PayrollRuns as Y, PaymentStatus$1 as Yn, ActorReference as Yt, OrganizationPaymentBatchInput as Z, TelemetryEvent as Zn, Destination as Zt, SystemMethods as _, PaymentDocumentRef as _n, OrganizationOnboardingInput as _t, SdkFailureObservation as a, FinancialOpsMethods as an, Readiness as ar, PermissionOptions as at, CurrentUserContext as b, PaymentDocumentsMethods as bn, ReadyAccountLifecycle as bt, PostHogObservabilityOptions as c, MovementActivityEvidence as cn, isClaimed as cr, PermissionReadResult as ct, CreateCapxulClientInput as d, OfframpQuoteInput as dn, InvocationControls as dr, OrgMeMethod as dt, DestinationListInput as en, TelemetryPort as er, OrganizationPaymentsMethods as et, IdentityProfileDetails as f, OfframpStatus as fn, OrgMeOptions as ft, Holding as g, PaymentDocumentKind as gn, OrganizationOnboarding as gt, HoldingsMethods as h, PaymentDirection as hn, OnboardingMethods as ht, ObservationDelivery as i, DestinationsMethods as in, OrgLane as ir, PermissionMethods as it, OrganizationAccount as j, TargetsMethods as jn, AddressBookMethods as jt, OrgTemplate as k, ResolvedTarget as kn, AddressBookEntry as kt, postHogObservability as l, OfframpMethods as ln, isRestoring as lr, Budget as lt, IdentityRuntimeSendResult as m, PaymentActivityEvidence as mn, CompletedPersonProfile as mt, ObservationAdapter as n, DestinationRail as nn, IdentityEvent as nr, PermissionChangeInput as nt, HostObservability as o, MeMethods as on, StateLabel as or, PermissionReplaceInput as ot, IdentityRuntime as p, Payment as pn, AccountsMethods as pt, PayrollRunItemInput as q, PAYMENT_DIRECTIONS as qn, ActivitySummaryParams as qt, ObservationContext as r, DestinationRemoveInput as rn, IdentityState as rr, PermissionCreateInput as rt, PostHogObservabilityClient as s, MeProfile as sn, destination as sr, PermissionRevokeInput as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, DestinationPayload as tn, Destination$1 as tr, PermissionAssignInput as tt, CapxulClient as u, OfframpQuote as un, IdentityTransition as ur, OrgMe as ut, SystemHealth as v, PaymentDocumentRender as vn, PersonOnboarding as vt, InviteMemberInput as w, PaymentType as wn, ActorRelationshipMethods as wt, CurrentUserMethods as x, PaymentMoney as xn, AccountMethods as xt, MediaMethods as y, PaymentDocumentVerification as yn, PersonOnboardingInput as yt, PayrollEngagementTerms as z, AuthMethods as zn, ActivityItem as zt };
@@ -1,4 +1,4 @@
1
- import { Qn as TelemetryIdentifyInput, Xn as TelemetryEvent, Zn as TelemetryGroupInput, lr as IdentityTransition, n as ObservationAdapter, u as CapxulClient } from "../observation-D2JnjN2R.mjs";
1
+ import { $n as TelemetryIdentifyInput, Qn as TelemetryGroupInput, Zn as TelemetryEvent, n as ObservationAdapter, u as CapxulClient, ur as IdentityTransition } from "../observation-Bhdq9-l6.mjs";
2
2
  import { Effect, Layer } from "effect";
3
3
  //#region src/testing/telemetry/RecordingTelemetryAdapter.d.ts
4
4
  type RecordingTelemetryOperation = {
@@ -1,4 +1,4 @@
1
- import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-DGnNFym7.mjs";
1
+ import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-B3ET402J.mjs";
2
2
  import { $ as CapxulError, A as toAuthUserId, B as toJwtToken, D as toAddress, E as toAccountId, F as toDurationMs, I as toEmail, J as toSessionToken, K as toPublishableKey, L as toEpochMs, M as toChainId, N as toCountryCode, O as toAllowedOrigin, R as toEpochSeconds, V as toKycTier, _ as deriveCapxulSafeAddress, k as toAppId, n as InMemoryAuthCacheAdapter, t as readClockNow, tt as Errors, u as authClientPortFromPromiseAdapter, v as validateHandle, z as toHandle } from "../clock-C2AUlq1V.mjs";
3
3
  import { Effect, Result, Semaphore } from "effect";
4
4
  import { keccak256 } from "viem";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -47,12 +47,12 @@
47
47
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
48
48
  "vite-plus": "0.3.0",
49
49
  "vitest": "4.1.11",
50
- "@capxul/config": "0.3.0",
51
- "@capxul/typescript-config": "0.0.0",
52
50
  "@capxul/errors": "0.3.0",
51
+ "@capxul/observability": "4.1.4",
53
52
  "@capxul/types": "0.3.0",
54
- "@capxul/wire": "0.7.0",
55
- "@capxul/observability": "4.1.2"
53
+ "@capxul/config": "0.3.0",
54
+ "@capxul/typescript-config": "0.0.0",
55
+ "@capxul/wire": "0.7.0"
56
56
  },
57
57
  "_permissionlessPinReason": "permissionless.toSafeSmartAccount is pinned to 0.3.4 for live Safe deployment E2E. Counterfactual address fixtures captured 2026-05-17 in packages/backend/convex/_shared/__tests__/counterfactual.test.ts and packages/config/tests/safe.test.ts must be re-verified before upgrading.",
58
58
  "scripts": {