@capxul/sdk 2.4.0 → 2.5.0

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.
@@ -293,6 +293,12 @@ function toPartyId(raw) {
293
293
  function toBudgetId(raw) {
294
294
  return toNonEmptyStringBrand(raw, "budgetId");
295
295
  }
296
+ function toPayrollRunId(raw) {
297
+ return toNonEmptyStringBrand(raw, "payrollRunId");
298
+ }
299
+ function toPayrollGroupId(raw) {
300
+ return toNonEmptyStringBrand(raw, "payrollGroupId");
301
+ }
296
302
  function toOrgId(raw) {
297
303
  return toNonEmptyStringBrand(raw, "orgId");
298
304
  }
@@ -488,4 +494,4 @@ Layer.effect(AuthCachePortTag, Effect.sync(() => new InMemoryAuthCacheAdapter())
488
494
  cause
489
495
  }))));
490
496
  //#endregion
491
- export { toPartyId as A, toDurationMs as C, toJwtToken as D, toEpochSeconds as E, CAPXUL_ERROR_CODES as F, CapxulError as I, EXPECTED_OPERATION_OUTCOMES as L, toRoleKey as M, toSessionToken as N, toKycTier as O, decodeConvexError as P, Errors as R, toCurrencyCode as S, toEpochMs as T, toAppId as _, AuthCacheError as a, toChainId as b, BYTES32_RE as c, WEI_RE as d, ZERO_BYTES32 as f, toAllowedOrigin as g, toAddress as h, parseCachedJwt as i, toPublishableKey as j, toOrgId as k, EVM_ADDRESS_RE as l, toAccountId as m, BrowserAuthCacheAdapter as n, AuthCachePortTag as o, currencySymbolFor as p, parseAuthSession as r, APP_ID_RE as s, InMemoryAuthCacheAdapter as t, SUPPORTED_CURRENCY_CODES as u, toAuthUserId as v, toEmail as w, toCountryCode as x, toBudgetId as y, isCapxulError as z };
497
+ export { toPartyId as A, Errors as B, toDurationMs as C, toJwtToken as D, toEpochSeconds as E, toSessionToken as F, decodeConvexError as I, CAPXUL_ERROR_CODES as L, toPayrollRunId as M, toPublishableKey as N, toKycTier as O, toRoleKey as P, CapxulError as R, toCurrencyCode as S, toEpochMs as T, isCapxulError as V, toAppId as _, AuthCacheError as a, toChainId as b, BYTES32_RE as c, WEI_RE as d, ZERO_BYTES32 as f, toAllowedOrigin as g, toAddress as h, parseCachedJwt as i, toPayrollGroupId as j, toOrgId as k, EVM_ADDRESS_RE as l, toAccountId as m, BrowserAuthCacheAdapter as n, AuthCachePortTag as o, currencySymbolFor as p, parseAuthSession as r, APP_ID_RE as s, InMemoryAuthCacheAdapter as t, SUPPORTED_CURRENCY_CODES as u, toAuthUserId as v, toEmail as w, toCountryCode as x, toBudgetId as y, EXPECTED_OPERATION_OUTCOMES as z };
@@ -1,4 +1,4 @@
1
- import { A as toPartyId, I as CapxulError, L as EXPECTED_OPERATION_OUTCOMES, M as toRoleKey, R as Errors, S as toCurrencyCode, b as toChainId, c as BYTES32_RE, d as WEI_RE, f as ZERO_BYTES32, h as toAddress, k as toOrgId, l as EVM_ADDRESS_RE$1, m as toAccountId, n as BrowserAuthCacheAdapter, s as APP_ID_RE, t as InMemoryAuthCacheAdapter, u as SUPPORTED_CURRENCY_CODES, v as toAuthUserId, w as toEmail, x as toCountryCode, y as toBudgetId, z as isCapxulError } from "./InMemoryAuthCacheAdapter-qMpBOGb3.mjs";
1
+ import { A as toPartyId, B as Errors, M as toPayrollRunId, P as toRoleKey, R as CapxulError, S as toCurrencyCode, V as isCapxulError, b as toChainId, c as BYTES32_RE, d as WEI_RE, f as ZERO_BYTES32, h as toAddress, j as toPayrollGroupId, k as toOrgId, l as EVM_ADDRESS_RE$1, m as toAccountId, n as BrowserAuthCacheAdapter, s as APP_ID_RE, t as InMemoryAuthCacheAdapter, u as SUPPORTED_CURRENCY_CODES, v as toAuthUserId, w as toEmail, x as toCountryCode, y as toBudgetId, z as EXPECTED_OPERATION_OUTCOMES } from "./InMemoryAuthCacheAdapter-D5Cv0yz0.mjs";
2
2
  import { concat, encodeAbiParameters, encodeFunctionData, encodePacked, formatUnits, getContractAddress, keccak256, padHex, parseUnits, recoverAddress, stringToHex, toBytes, toEventSelector, toFunctionSelector, toFunctionSignature } from "viem";
3
3
  import { Context, Data, Deferred, Effect, Exit, Fiber, Layer, Queue, Ref, Result, Schema, SchemaGetter, Scope } from "effect";
4
4
  import { makeFunctionReference } from "convex/server";
@@ -1490,6 +1490,15 @@ const CAPXUL_FUNCTIONS = {
1490
1490
  resumeBootstrapSubmission: "org/actions:resumeBootstrapSubmission",
1491
1491
  submitBootstrap: "org/actions:submitBootstrap"
1492
1492
  },
1493
+ "payroll/actions": { authorizeRun: "payroll/actions:authorizeRun" },
1494
+ "payroll/mutations": {
1495
+ removeGroup: "payroll/mutations:removeGroup",
1496
+ saveGroup: "payroll/mutations:saveGroup"
1497
+ },
1498
+ "payroll/queries": {
1499
+ groups: "payroll/queries:groups",
1500
+ runs: "payroll/queries:runs"
1501
+ },
1493
1502
  "permission/actions": { verify: "permission/actions:verify" },
1494
1503
  "permission/mutations": { command: "permission/mutations:command" },
1495
1504
  "permission/queries": {
@@ -2683,7 +2692,7 @@ Schema.Struct({
2683
2692
  items: Schema.Array(OrganizationPaymentExecutionItemSchema),
2684
2693
  lineage: Schema.optional(PaymentCommandLineageSchema)
2685
2694
  });
2686
- Schema.Struct({
2695
+ const PreparedPaymentCommandExecutionSchema = Schema.Struct({
2687
2696
  executionId: MoneyExecutionIdSchema,
2688
2697
  commandId: PaymentCommandIdSchema,
2689
2698
  paymentIds: Schema.Array(PaymentIdSchema),
@@ -2776,6 +2785,69 @@ Schema.Struct({
2776
2785
  userOpHash: Bytes32Schema,
2777
2786
  value: PermissionResourceSchema
2778
2787
  });
2788
+ const PayrollRunStatusSchema = Schema.Literals([
2789
+ "draft",
2790
+ "authorized",
2791
+ "settled"
2792
+ ]);
2793
+ const PayrollRunIdSchema = Schema.String.pipe(Schema.refine((value) => /^payroll_run_[0-9a-f]{64}$/u.test(value), { message: "payrollRunId must be a payroll_run_ digest identifier" }));
2794
+ const SignedMinorUnitSchema = Schema.String.pipe(Schema.refine((value) => /^-?(0|[1-9][0-9]*)$/u.test(value), { message: "must be an integer minor-unit string" }));
2795
+ const MinorUnitSchema = Schema.String.pipe(Schema.refine((value) => /^(0|[1-9][0-9]*)$/u.test(value), { message: "must be a non-negative integer minor-unit string" }));
2796
+ const PayrollRunItemInputSchema = Schema.Struct({
2797
+ to: PaymentRef,
2798
+ partyId: nonEmpty("partyId"),
2799
+ gross: MinorUnitSchema,
2800
+ net: MinorUnitSchema,
2801
+ adjustments: Schema.Array(Schema.Struct({
2802
+ label: Schema.String,
2803
+ amount: SignedMinorUnitSchema
2804
+ }))
2805
+ });
2806
+ Schema.Struct({
2807
+ orgId: nonEmpty("orgId"),
2808
+ permissionId: PermissionIdSchema,
2809
+ requestKey: nonEmpty("requestKey"),
2810
+ signerAddress: AddressSchema$1,
2811
+ period: Schema.Struct({
2812
+ start: nonNegativeInteger("period.start"),
2813
+ end: nonNegativeInteger("period.end")
2814
+ }),
2815
+ items: Schema.Array(PayrollRunItemInputSchema)
2816
+ });
2817
+ const PayrollRunSchema = Schema.Struct({
2818
+ id: PayrollRunIdSchema,
2819
+ status: PayrollRunStatusSchema,
2820
+ periodStart: nonNegativeInteger("periodStart"),
2821
+ periodEnd: nonNegativeInteger("periodEnd"),
2822
+ total: FinancialOpsMoney,
2823
+ recipientCount: nonNegativeInteger("recipientCount")
2824
+ });
2825
+ Schema.Struct({
2826
+ runs: Schema.Array(PayrollRunSchema),
2827
+ settledThisMonth: FinancialOpsMoney
2828
+ });
2829
+ Schema.Struct({
2830
+ run: PayrollRunSchema,
2831
+ execution: PreparedPaymentCommandExecutionSchema
2832
+ });
2833
+ const PayrollGroupIdSchema = Schema.String.pipe(Schema.refine((value) => /^payroll_group_[0-9A-Z]{26}$/u.test(value), { message: "payrollGroupId must be a payroll_group_ ULID identifier" }));
2834
+ const PayrollGroupMemberSchema = Schema.Struct({
2835
+ partyId: PartyIdSchema,
2836
+ amount: Schema.String,
2837
+ currency: CurrencyCodeSchema$1
2838
+ });
2839
+ Schema.Struct({
2840
+ id: PayrollGroupIdSchema,
2841
+ name: nonEmpty("name"),
2842
+ tone: Schema.String,
2843
+ members: Schema.Array(PayrollGroupMemberSchema)
2844
+ });
2845
+ Schema.Struct({
2846
+ id: Schema.optional(PayrollGroupIdSchema),
2847
+ name: Schema.String,
2848
+ tone: Schema.String,
2849
+ members: Schema.Array(PayrollGroupMemberSchema)
2850
+ });
2779
2851
  `
2780
2852
  .capxul-doc{--ink:#1d1d1f;--muted:#6e6e73;--line:#e7e7ea;--accent:#0a7d4b;--bg:#fff;
2781
2853
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif;
@@ -4542,7 +4614,10 @@ function canonicalJson(value) {
4542
4614
  async function fingerprintPaymentIntent(intent) {
4543
4615
  return keccak256(toBytes(canonicalJson(intent)));
4544
4616
  }
4545
- async function executePrepared(deps, prepare, expectedRequest, signal) {
4617
+ function matchesIntent(expected) {
4618
+ return async (request) => await fingerprintPaymentIntent(request) === await fingerprintPaymentIntent(expected);
4619
+ }
4620
+ async function executePrepared(deps, prepare, isExpectedRequest, signal) {
4546
4621
  if (isAborted$1(signal)) return {
4547
4622
  ok: false,
4548
4623
  error: Errors.cancelled({ operation: "payments" })
@@ -4563,7 +4638,7 @@ async function executePrepared(deps, prepare, expectedRequest, signal) {
4563
4638
  }
4564
4639
  const prepared = await prepare(signerAddress);
4565
4640
  if (!prepared.ok) return prepared;
4566
- if (await fingerprintPaymentIntent(prepared.value.request) !== await fingerprintPaymentIntent(expectedRequest)) return {
4641
+ if (!await isExpectedRequest(prepared.value.request)) return {
4567
4642
  ok: false,
4568
4643
  error: Errors.invalidInput("payment", "prepared command mismatch")
4569
4644
  };
@@ -4598,13 +4673,13 @@ function executePaymentLifecycle(deps, intent, signal) {
4598
4673
  return executePrepared(deps, (signerAddress) => runIfActive(signal, "payments.prepareLifecycleExecution", () => deps.convexCall.action(deps.functions.preparePaymentLifecycleExecution, { input: {
4599
4674
  signerAddress,
4600
4675
  intent
4601
- } })), intent, signal);
4676
+ } })), matchesIntent(intent), signal);
4602
4677
  }
4603
4678
  function executeOrganizationPayment(deps, input, signal) {
4604
4679
  return executePrepared(deps, (signerAddress) => runIfActive(signal, "organizationPayments.prepareExecution", () => deps.convexCall.action(deps.functions.prepareOrganizationPaymentExecution, { input: {
4605
4680
  ...input,
4606
4681
  signerAddress
4607
- } })), input, signal);
4682
+ } })), matchesIntent(input), signal);
4608
4683
  }
4609
4684
  //#endregion
4610
4685
  //#region src/surface/money.ts
@@ -5453,7 +5528,7 @@ function mapOk(result, f) {
5453
5528
  }
5454
5529
  //#endregion
5455
5530
  //#region package.json
5456
- var version = "2.4.0";
5531
+ var version = "2.5.0";
5457
5532
  //#endregion
5458
5533
  //#region src/ports/auth-client.ts
5459
5534
  var AuthClientError = class extends Data.TaggedError("AuthClientError") {};
@@ -7520,7 +7595,7 @@ function makePermissionMethods(deps, orgId) {
7520
7595
  }
7521
7596
  //#endregion
7522
7597
  //#region src/surface/organization-payments.ts
7523
- function executionDependencies(input) {
7598
+ function executionDependencies$1(input) {
7524
7599
  return input.actor === void 0 || input.chainId === void 0 || input.signer === void 0 ? null : {
7525
7600
  actor: input.actor,
7526
7601
  chainId: input.chainId,
@@ -7537,7 +7612,7 @@ function makeOrganizationPaymentsMethods(deps, orgId) {
7537
7612
  ok: false,
7538
7613
  error: Errors.cancelled({ operation })
7539
7614
  };
7540
- const execution = executionDependencies(deps);
7615
+ const execution = executionDependencies$1(deps);
7541
7616
  if (execution === null) return {
7542
7617
  ok: false,
7543
7618
  error: Errors.notImplemented("organizationPayments", "executionComposition")
@@ -7632,6 +7707,197 @@ function makeOrganizationPaymentsMethods(deps, orgId) {
7632
7707
  };
7633
7708
  }
7634
7709
  //#endregion
7710
+ //#region src/contract/payroll.ts
7711
+ const payrollContract = {
7712
+ authorizeRun: makeFunctionReference(CAPXUL_FUNCTIONS["payroll/actions"].authorizeRun),
7713
+ runs: makeFunctionReference(CAPXUL_FUNCTIONS["payroll/queries"].runs),
7714
+ groups: makeFunctionReference(CAPXUL_FUNCTIONS["payroll/queries"].groups),
7715
+ saveGroup: makeFunctionReference(CAPXUL_FUNCTIONS["payroll/mutations"].saveGroup),
7716
+ removeGroup: makeFunctionReference(CAPXUL_FUNCTIONS["payroll/mutations"].removeGroup)
7717
+ };
7718
+ //#endregion
7719
+ //#region src/surface/payroll.ts
7720
+ const AUTHORIZE_RUN = "payroll.authorizeRun";
7721
+ function toPayrollRun(wire) {
7722
+ return {
7723
+ id: toPayrollRunId(wire.id),
7724
+ status: wire.status,
7725
+ periodStart: wire.periodStart,
7726
+ periodEnd: wire.periodEnd,
7727
+ total: wire.total,
7728
+ recipientCount: wire.recipientCount
7729
+ };
7730
+ }
7731
+ function toPayrollRuns(wire) {
7732
+ return {
7733
+ runs: wire.runs.map(toPayrollRun),
7734
+ settledThisMonth: wire.settledThisMonth
7735
+ };
7736
+ }
7737
+ function toPayrollGroup(wire) {
7738
+ return {
7739
+ id: toPayrollGroupId(wire.id),
7740
+ name: wire.name,
7741
+ tone: wire.tone,
7742
+ members: wire.members.map((member) => ({
7743
+ partyId: member.partyId,
7744
+ amount: member.amount,
7745
+ currency: member.currency
7746
+ }))
7747
+ };
7748
+ }
7749
+ const MINOR_UNIT_INTEGER = /^-?\d+$/u;
7750
+ /**
7751
+ * One prepared `Money` counted in the minor units `net` is written in, or
7752
+ * `null` when the value is not a decimal number. `amount.value` is a DECIMAL
7753
+ * string (`"200"` at 6 decimals is 200000000 minor units), so comparing it to
7754
+ * `net` directly would compare two different units and pass nothing.
7755
+ */
7756
+ function minorUnits(amount) {
7757
+ const [whole = "", fraction = ""] = amount.value.split(".");
7758
+ if (!/^\d+$/u.test(whole) || !/^\d*$/u.test(fraction) || fraction.length > amount.decimals) return null;
7759
+ return BigInt(whole + fraction.padEnd(amount.decimals, "0"));
7760
+ }
7761
+ /**
7762
+ * One prepared item must pay the person this caller named, the amount this
7763
+ * caller set, under a payslip that attests to the same figures.
7764
+ *
7765
+ * `issuedAt` and `employerRef` are server facts the caller cannot contradict,
7766
+ * so they are not compared. Everything the caller DID supply is: the recipient
7767
+ * `Ref`, the transfer amount against `net`, and the payslip's employee, gross
7768
+ * and net. Adjustments are not in the signed command at all — the backend
7769
+ * enforces `gross + Σ adjustments === net` (ADR-0022 R8), and gross and net
7770
+ * being right is what the signer can prove here.
7771
+ */
7772
+ function isRunItem(prepared, item) {
7773
+ if (prepared === void 0) return false;
7774
+ const payslip = prepared.document;
7775
+ return canonicalJson(prepared.to) === canonicalJson(item.to) && prepared.paymentType === "payroll" && MINOR_UNIT_INTEGER.test(item.net) && minorUnits(prepared.amount) === BigInt(item.net) && payslip?.primaryType === "Payslip" && payslip.message.employeeRef === item.partyId && payslip.message.gross === item.gross && payslip.message.net === item.net;
7776
+ }
7777
+ /**
7778
+ * The batch the backend derived from a payroll intent must be the batch this
7779
+ * caller asked for, checked before the digest is signed.
7780
+ *
7781
+ * The payslip envelope on each item is server-built and carries the run row's
7782
+ * own `issuedAt`, so the batch cannot be fingerprinted against a local copy
7783
+ * (`matchesIntent` is unavailable here). What CAN be verified is every field
7784
+ * the caller supplied — the org, the Budget, the request key, and per item the
7785
+ * recipient, the amount and the payslip figures — plus the lineage binding the
7786
+ * batch to the run just written. A prepared command that pays a different
7787
+ * person, a different amount, from a different Budget, or under a different
7788
+ * run never reaches the signer.
7789
+ */
7790
+ function isRunBatch(input) {
7791
+ return (request) => {
7792
+ const batch = request;
7793
+ return Promise.resolve(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 && input.items.every((item, index) => isRunItem(batch.items?.[index], item)));
7794
+ };
7795
+ }
7796
+ function executionDependencies(deps) {
7797
+ return deps.actor === void 0 || deps.chainId === void 0 || deps.signer === void 0 ? null : {
7798
+ actor: deps.actor,
7799
+ chainId: deps.chainId,
7800
+ convexCall: deps.convexCall,
7801
+ functions: moneyExecutionContract,
7802
+ signer: deps.signer
7803
+ };
7804
+ }
7805
+ function makePayrollMethods(deps, orgId) {
7806
+ const requestKeyScope = deps.requestKeyScope ?? `client-${crypto.randomUUID()}`;
7807
+ async function authorize(input, signal) {
7808
+ const execution = executionDependencies(deps);
7809
+ if (execution === null) return {
7810
+ ok: false,
7811
+ error: Errors.notImplemented("payroll", "executionComposition")
7812
+ };
7813
+ const requestKey = await paymentRequestKeyLifecycle(`${requestKeyScope}:${AUTHORIZE_RUN}`, {
7814
+ orgId,
7815
+ input
7816
+ }, input.requestKey);
7817
+ let authorized;
7818
+ const submitted = await executePrepared(execution, async (signerAddress) => {
7819
+ const prepared = await runIfActive(signal, AUTHORIZE_RUN, () => deps.convexCall.action(payrollContract.authorizeRun, { input: {
7820
+ orgId,
7821
+ permissionId: input.permissionId,
7822
+ requestKey: requestKey.key,
7823
+ signerAddress,
7824
+ period: input.period,
7825
+ items: input.items
7826
+ } }));
7827
+ if (!prepared.ok) return prepared;
7828
+ authorized = prepared.value.run;
7829
+ return {
7830
+ ok: true,
7831
+ value: prepared.value.execution
7832
+ };
7833
+ }, (request) => authorized === void 0 || authorized.periodStart !== input.period.start || authorized.periodEnd !== input.period.end ? Promise.resolve(false) : isRunBatch({
7834
+ orgId,
7835
+ permissionId: input.permissionId,
7836
+ requestKey: requestKey.key,
7837
+ runId: authorized.id,
7838
+ items: input.items
7839
+ })(request), signal);
7840
+ try {
7841
+ await requestKey.finish(submitted.ok);
7842
+ } catch {}
7843
+ if (!submitted.ok) return submitted;
7844
+ return authorized === void 0 ? {
7845
+ ok: false,
7846
+ error: Errors.unknown()
7847
+ } : {
7848
+ ok: true,
7849
+ value: toPayrollRun(authorized)
7850
+ };
7851
+ }
7852
+ return {
7853
+ runs: (options) => runIfActive(options?.signal, "payroll.runs", () => Effect.map(deps.convexCall.query(payrollContract.runs, { orgId }), toPayrollRuns)),
7854
+ authorizeRun: async (input, options) => {
7855
+ if (options?.signal?.aborted === true) return {
7856
+ ok: false,
7857
+ error: Errors.cancelled({ operation: AUTHORIZE_RUN })
7858
+ };
7859
+ try {
7860
+ return await authorize(input, options?.signal);
7861
+ } catch (cause) {
7862
+ return {
7863
+ ok: false,
7864
+ error: cause instanceof CapxulError ? cause : Errors.unknown(cause)
7865
+ };
7866
+ }
7867
+ },
7868
+ groups: {
7869
+ list: (options) => runIfActive(options?.signal, "payroll.groups.list", () => Effect.map(deps.convexCall.query(payrollContract.groups, { orgId }), (groups) => groups.map(toPayrollGroup))),
7870
+ save: (input, options) => runIfActive(options?.signal, "payroll.groups.save", () => Effect.map(deps.convexCall.mutation(payrollContract.saveGroup, {
7871
+ orgId,
7872
+ ...input.id === void 0 ? {} : { id: String(input.id) },
7873
+ name: input.name,
7874
+ tone: input.tone,
7875
+ members: input.members
7876
+ }), toPayrollGroup)),
7877
+ remove: (id, options) => runIfActive(options?.signal, "payroll.groups.remove", () => Effect.map(deps.convexCall.mutation(payrollContract.removeGroup, {
7878
+ orgId,
7879
+ id
7880
+ }), () => void 0))
7881
+ }
7882
+ };
7883
+ }
7884
+ const payrollUnavailable = () => Promise.resolve({
7885
+ ok: false,
7886
+ error: Errors.notImplemented("payroll", "executionComposition")
7887
+ });
7888
+ /** The bundle an unconfigured client exposes — every verb refuses, none throws. */
7889
+ function makeUnavailablePayrollMethods() {
7890
+ return {
7891
+ runs: payrollUnavailable,
7892
+ authorizeRun: payrollUnavailable,
7893
+ groups: {
7894
+ list: payrollUnavailable,
7895
+ save: payrollUnavailable,
7896
+ remove: payrollUnavailable
7897
+ }
7898
+ };
7899
+ }
7900
+ //#endregion
7635
7901
  //#region src/surface/_shared/org-telemetry.ts
7636
7902
  /** Extract the domain from an email for telemetry (never the local part / PII). */
7637
7903
  function emailDomain$1(email) {
@@ -8169,6 +8435,13 @@ function makeOrgMethods(deps) {
8169
8435
  ...deps.actor === void 0 ? {} : { actor: deps.actor },
8170
8436
  ...deps.chainId === void 0 ? {} : { chainId: Number(deps.chainId) },
8171
8437
  ...deps.signer === void 0 ? {} : { signer: deps.signer }
8438
+ }, String(orgId)),
8439
+ payroll: convexCall === void 0 ? makeUnavailablePayrollMethods() : makePayrollMethods({
8440
+ convexCall,
8441
+ ...deps.requestKeyScope === void 0 ? {} : { requestKeyScope: deps.requestKeyScope },
8442
+ ...deps.actor === void 0 ? {} : { actor: deps.actor },
8443
+ ...deps.chainId === void 0 ? {} : { chainId: Number(deps.chainId) },
8444
+ ...deps.signer === void 0 ? {} : { signer: deps.signer }
8172
8445
  }, String(orgId))
8173
8446
  };
8174
8447
  }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as toCountryCode, B as OrgId, C as Address, N as CountryCode, O as AuthSession, Q as toAddress, S as AccountId, V as PartyId, a as SignerStatusStore, c as AccountProviderSource, d as eip1193AccountProvider, et as CAPXUL_ERROR_CODES, f as localPrivateKeyAccountProvider, g as SmartAccount, h as Session, i as SignerStatus, it as Errors, j as BudgetId, k as AuthUserId, l as AccountRequirement, m as Profile, n as CapxulSigner, nt as CapxulErrorCode, o as injectedWalletSigner, ot as FailureMode, p as CapxulResult, q as RoleKey, r as Eip1193RequestProvider, rt as CapxulErrorDetails, s as AccountProvider, st as isCapxulError, t as CapxulDigestSigner, tt as CapxulError, u as Eip1193Provider, x as Account, z as Money } from "./signer-BGTaqZqg.mjs";
2
- import { $ as AccountsMethods, $t as PaymentDocumentRef, A as OrgView, An as PAYMENT_STATUSES, At as Destination, B as OrganizationPaymentsMethods, Bn as IdentityState, Bt as MeMethods, C as DetectPendingOrgInvitationsResult, Cn as OrgSetupStep, Ct as ActivityRange, D as OrgMethods, Dn as SubmittedPermissionExecution, Dt as ActivitySummaryTotal, E as MemberView, En as Permission, Et as ActivitySummaryParams, F as RoleSpendCap, Ft as DestinationRail, G as PermissionOptions, Gn as isClaimed, Gt as OfframpQuoteInput, H as PermissionChangeInput, Hn as Readiness, Ht as MovementActivityEvidence, I as RoleView, In as TelemetryPort, It as DestinationRemoveInput, J as PermissionReadResult, Jn as InvocationControls, Jt as PayeesMethods, K as PermissionReplaceInput, Kn as isRestoring, Kt as OfframpStatus, L as OrganizationPaymentBatchInput, Ln as CAPXUL_PAYMENTS_V2_ADDRESS, Lt as DestinationsMethods, M as OrganizationAuditLogItem, Mn as RequestStatus, Mt as DestinationKind, N as ResendInviteTokenInput, Nt as DestinationListInput, O as OrgScopedMethods, On as InboxStatus, Ot as ActorReference, P as RoleDefinition, Pt as DestinationPayload, Q as OrgMeOptions, Qt as PaymentDocumentKind, R as OrganizationPaymentInput, Rn as Destination$1, Rt as FinancialOpsMethods, S as CreateOrgInput, Sn as OrgLifecycle, St as ActivityPage, T as MemberStatus, Tn as CurrentHoldings, Tt as ActivitySummary, U as PermissionCreateInput, Un as StateLabel, Ut as OfframpMethods, V as PermissionAssignInput, Vn as OrgLane, Vt as MeProfile, W as PermissionMethods, Wn as destination, Wt as OfframpQuote, X as OrgMe, Xt as PaymentActivityEvidence, Y as Budget, Yt as Payment, Z as OrgMeMethod, Zt as PaymentDirection, _ as SystemMethods, _n as AccountSetupStep, _t as ActivityFilter, a as SdkFailureObservation, an as PaymentTiming, at as ActorRequestIssueInput, b as CurrentUserContext, bn as SmartAccountMethods, bt as ActivityListParams, c as PostHogObservabilityOptions, cn as PaymentsPayInput, ct as AddressBookEntry, d as CreateCapxulClientInput, dn as Ref, dt as InboxApproveInput, en as PaymentDocumentRender, et as AccountMethods, f as IdentityProfileDetails, fn as ResolvedTarget, ft as InboxItem, g as Holding, gn as AccountLifecycle, gt as ActivityDetail, h as HoldingsMethods, hn as fingerprintPaymentIntent, ht as ActivityAnnotationInput, i as ObservationDelivery, in as PaymentStatus, it as ActorRequest, j as OrganizationAccount, jn as PaymentStatus$1, jt as DestinationAddInput, k as OrgTemplate, kn as PAYMENT_DIRECTIONS, kt as DepositInstructions, l as postHogObservability, ln as RecipientResolution, lt as AddressBookLabelInput, m as IdentityRuntimeSendResult, mn as TargetsMethods, mt as ActivityAnnotation, n as ObservationAdapter, nn as PaymentDocumentsMethods, nt as ActorProfileMethods, o as HostObservability, on as PaymentType, ot as ActorRequestsMethods, p as IdentityRuntime, pn as TargetReference, pt as InboxMethods, q as PermissionRevokeInput, qn as IdentityTransition, qt as Payee, r as ObservationContext, rn as PaymentMoney, rt as ActorRelationshipMethods, s as PostHogObservabilityClient, sn as PaymentsMethods, st as AddressBookAddInput, t as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, tn as PaymentDocumentVerification, tt as ActorProfile, u as CapxulClient, un as RecipientResolutionKind, ut as AddressBookMethods, v as SystemHealth, vn as isSettingUpLifecycle, vt as ActivityItem, w as InviteMemberInput, wn as ActorRef, wt as ActivityReference, x as CurrentUserMethods, xn as AuthMethods, xt as ActivityMethods, y as MediaMethods, yn as IdentityMethods, yt as ActivityKind, z as OrganizationPaymentItemInput, zn as IdentityEvent, zt as HandlesMethods } from "./observation-BfCkJY5z.mjs";
1
+ import { B as OrgId, C as Address, N as CountryCode, O as AuthSession, S as AccountId, U as PayrollGroupId, V as PartyId, W as PayrollRunId, Y as RoleKey, a as SignerStatusStore, at as CapxulErrorDetails, c as AccountProviderSource, ct as FailureMode, d as eip1193AccountProvider, et as toAddress, f as localPrivateKeyAccountProvider, g as SmartAccount, h as Session, i as SignerStatus, it as CapxulErrorCode, j as BudgetId, k as AuthUserId, l as AccountRequirement, lt as isCapxulError, m as Profile, n as CapxulSigner, nt as CAPXUL_ERROR_CODES, o as injectedWalletSigner, ot as Errors, p as CapxulResult, r as Eip1193RequestProvider, rt as CapxulError, s as AccountProvider, t as CapxulDigestSigner, tt as toCountryCode, u as Eip1193Provider, x as Account, z as Money } from "./signer-CRzTIrau.mjs";
2
+ import { $ as PermissionChangeInput, $n as Readiness, $t as MovementActivityEvidence, A as OrgView, An as IdentityMethods, At as ActivityKind, B as PayrollGroupMember, Bn as PAYMENT_DIRECTIONS, Bt as DepositInstructions, C as DetectPendingOrgInvitationsResult, Cn as ResolvedTarget, Ct as InboxItem, D as OrgMethods, Dn as AccountLifecycle, Dt as ActivityDetail, E as MemberView, En as fingerprintPaymentIntent, Et as ActivityAnnotationInput, F as RoleSpendCap, Fn as ActorRef, Ft as ActivityReference, G as PayrollRunItemInput, Gt as DestinationPayload, H as PayrollMethods, Hn as PaymentStatus$1, Ht as DestinationAddInput, I as RoleView, In as CurrentHoldings, It as ActivitySummary, J as OrganizationPaymentBatchInput, Jn as CAPXUL_PAYMENTS_V2_ADDRESS, Jt as DestinationsMethods, K as PayrollRunStatus, Kt as DestinationRail, L as AuthorizeRunInput, Ln as Permission, Lt as ActivitySummaryParams, M as OrganizationAuditLogItem, Mn as AuthMethods, Mt as ActivityMethods, N as ResendInviteTokenInput, Nn as OrgLifecycle, Nt as ActivityPage, O as OrgScopedMethods, On as AccountSetupStep, Ot as ActivityFilter, P as RoleDefinition, Pn as OrgSetupStep, Pt as ActivityRange, Q as PermissionAssignInput, Qn as OrgLane, Qt as MeProfile, R as PayrollGroup, Rn as SubmittedPermissionExecution, Rt as ActivitySummaryTotal, S as CreateOrgInput, Sn as Ref, St as InboxApproveInput, T as MemberStatus, Tn as TargetsMethods, Tt as ActivityAnnotation, U as PayrollOptions, Un as RequestStatus, Ut as DestinationKind, V as PayrollGroupsMethods, Vn as PAYMENT_STATUSES, Vt as Destination, W as PayrollRun, Wt as DestinationListInput, X as OrganizationPaymentItemInput, Xn as IdentityEvent, Xt as HandlesMethods, Y as OrganizationPaymentInput, Yn as Destination$1, Yt as FinancialOpsMethods, Z as OrganizationPaymentsMethods, Zn as IdentityState, Zt as MeMethods, _ as SystemMethods, _n as PaymentType, _t as ActorRequestsMethods, a as SdkFailureObservation, an as PayeesMethods, ar as InvocationControls, at as PermissionReadResult, b as CurrentUserContext, bn as RecipientResolution, bt as AddressBookLabelInput, c as PostHogObservabilityOptions, cn as PaymentDirection, ct as OrgMeMethod, d as CreateCapxulClientInput, dn as PaymentDocumentRender, dt as AccountMethods, en as OfframpMethods, er as StateLabel, et as PermissionCreateInput, f as IdentityProfileDetails, fn as PaymentDocumentVerification, ft as ActorProfile, g as Holding, gn as PaymentTiming, gt as ActorRequestIssueInput, h as HoldingsMethods, hn as PaymentStatus, ht as ActorRequest, i as ObservationDelivery, in as Payee, ir as IdentityTransition, it as PermissionRevokeInput, j as OrganizationAccount, jn as SmartAccountMethods, jt as ActivityListParams, k as OrgTemplate, kn as isSettingUpLifecycle, kt as ActivityItem, l as postHogObservability, ln as PaymentDocumentKind, lt as OrgMeOptions, m as IdentityRuntimeSendResult, mn as PaymentMoney, mt as ActorRelationshipMethods, n as ObservationAdapter, nn as OfframpQuoteInput, nr as isClaimed, nt as PermissionOptions, o as HostObservability, on as Payment, ot as Budget, p as IdentityRuntime, pn as PaymentDocumentsMethods, pt as ActorProfileMethods, q as PayrollRuns, qn as TelemetryPort, qt as DestinationRemoveInput, r as ObservationContext, rn as OfframpStatus, rr as isRestoring, rt as PermissionReplaceInput, s as PostHogObservabilityClient, sn as PaymentActivityEvidence, st as OrgMe, t as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, tn as OfframpQuote, tr as destination, tt as PermissionMethods, u as CapxulClient, un as PaymentDocumentRef, ut as AccountsMethods, v as SystemHealth, vn as PaymentsMethods, vt as AddressBookAddInput, w as InviteMemberInput, wn as TargetReference, wt as InboxMethods, x as CurrentUserMethods, xn as RecipientResolutionKind, xt as AddressBookMethods, y as MediaMethods, yn as PaymentsPayInput, yt as AddressBookEntry, z as PayrollGroupInput, zn as InboxStatus, zt as ActorReference } from "./observation-CyNjyQxv.mjs";
3
3
  import { Hex } from "viem";
4
4
  import { Context, Effect, Layer } from "effect";
5
5
  import { FunctionReference } from "convex/server";
@@ -203,4 +203,4 @@ declare function captureException(telemetry: TelemetryPort, error: unknown, cont
203
203
  */
204
204
  declare function captureExceptionSync(telemetry: TelemetryPort, error: unknown, context?: HandledErrorReportContext): void;
205
205
  //#endregion
206
- 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 Budget, type BudgetId, CAPXUL_ERROR_CODES, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, 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, type Eip1193Provider, type Eip1193RequestProvider, Errors, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, 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 ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, 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 OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type PartyId, type Payee, type PayeesMethods, 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 Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type RecipientResolution, type RecipientResolutionKind, type Ref, type ResendInviteTokenInput, type ResolvedTarget, 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, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
206
+ 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_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, 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, type Eip1193Provider, type Eip1193RequestProvider, Errors, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, 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 ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, 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 OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type PartyId, type Payee, type PayeesMethods, 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 PayrollGroup, type PayrollGroupId, type PayrollGroupInput, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunId, type PayrollRunItemInput, type PayrollRunStatus, type PayrollRuns, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type RecipientResolution, type RecipientResolutionKind, type Ref, type ResendInviteTokenInput, type ResolvedTarget, 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, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as isClaimed, A as fingerprintPaymentIntent, B as OBSERVATION_CONTEXT_HEADER, C as ClockPortTag, D as AuthClientError, E as authClientPortFromPromiseAdapter, F as copyInvocationObservation, G as CAPXUL_FUNCTIONS, H as sanitizeObservationContext, I as readInvocationObservation, J as CAPXUL_PAYMENTS_V2_ADDRESS, K as BootstrapEnvelope, L as causeChain, M as fromWei, N as isSettingUpLifecycle, O as AuthClientPortTag, P as formatTraceparent, Q as destination, R as injectedWalletSigner, S as ClockError, T as bootstrapErrorFromCapxul, U as PAYMENT_DIRECTIONS, V as encodeObservationContextHeader, W as PAYMENT_STATUSES, X as BASE_SEPOLIA_CHAIN_ID, Y as normalizeBindingEmail, _ as wireChainId, a as observeFailedResult, b as ConvexCallPortTag, c as captureExceptionSync, d as TelemetryPortTag, et as isRestoring, g as accountReadErrorFromCapxul, h as AccountReadPortTag, i as observationContextProps, j as toWei, k as version, l as detectAuthCacheAdapter, m as smartAccountErrorFromCapxul, n as postHogProductTelemetry, o as postHogFailureObservation, p as SmartAccountPortTag, q as EngineeringTelemetryBootstrapPolicy, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, s as captureException, t as assembleCapxulClient, u as PostHogTelemetryLayer, v as IdentityPortTag, w as BootstrapPortTag, x as convexCallErrorFromCapxul, y as identityErrorFromCapxul, z as signerFailure } from "./create-capxul-client-BrE6tLg6.mjs";
2
- import { C as toDurationMs, D as toJwtToken, E as toEpochSeconds, F as CAPXUL_ERROR_CODES, I as CapxulError, M as toRoleKey, N as toSessionToken, O as toKycTier, P as decodeConvexError, R as Errors, S as toCurrencyCode, T as toEpochMs, b as toChainId, g as toAllowedOrigin, h as toAddress, j as toPublishableKey, k as toOrgId, m as toAccountId, o as AuthCachePortTag, p as currencySymbolFor, v as toAuthUserId, w as toEmail, x as toCountryCode, z as isCapxulError } from "./InMemoryAuthCacheAdapter-qMpBOGb3.mjs";
1
+ import { $ as isClaimed, A as fingerprintPaymentIntent, B as OBSERVATION_CONTEXT_HEADER, C as ClockPortTag, D as AuthClientError, E as authClientPortFromPromiseAdapter, F as copyInvocationObservation, G as CAPXUL_FUNCTIONS, H as sanitizeObservationContext, I as readInvocationObservation, J as CAPXUL_PAYMENTS_V2_ADDRESS, K as BootstrapEnvelope, L as causeChain, M as fromWei, N as isSettingUpLifecycle, O as AuthClientPortTag, P as formatTraceparent, Q as destination, R as injectedWalletSigner, S as ClockError, T as bootstrapErrorFromCapxul, U as PAYMENT_DIRECTIONS, V as encodeObservationContextHeader, W as PAYMENT_STATUSES, X as BASE_SEPOLIA_CHAIN_ID, Y as normalizeBindingEmail, _ as wireChainId, a as observeFailedResult, b as ConvexCallPortTag, c as captureExceptionSync, d as TelemetryPortTag, et as isRestoring, g as accountReadErrorFromCapxul, h as AccountReadPortTag, i as observationContextProps, j as toWei, k as version, l as detectAuthCacheAdapter, m as smartAccountErrorFromCapxul, n as postHogProductTelemetry, o as postHogFailureObservation, p as SmartAccountPortTag, q as EngineeringTelemetryBootstrapPolicy, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, s as captureException, t as assembleCapxulClient, u as PostHogTelemetryLayer, v as IdentityPortTag, w as BootstrapPortTag, x as convexCallErrorFromCapxul, y as identityErrorFromCapxul, z as signerFailure } from "./create-capxul-client-Btl4qyNC.mjs";
2
+ import { B as Errors, C as toDurationMs, D as toJwtToken, E as toEpochSeconds, F as toSessionToken, I as decodeConvexError, L as CAPXUL_ERROR_CODES, N as toPublishableKey, O as toKycTier, P as toRoleKey, R as CapxulError, S as toCurrencyCode, T as toEpochMs, V as isCapxulError, b as toChainId, g as toAllowedOrigin, h as toAddress, k as toOrgId, m as toAccountId, o as AuthCachePortTag, p as currencySymbolFor, v as toAuthUserId, w as toEmail, x as toCountryCode } from "./InMemoryAuthCacheAdapter-D5Cv0yz0.mjs";
3
3
  import { keccak256, recoverAddress, stringToHex } from "viem";
4
4
  import { Cause, Context, Data, Effect, Exit, Layer, Result, SchemaIssue, SchemaParser, Scope, Tracer } from "effect";
5
5
  import { getFunctionName, makeFunctionReference } from "convex/server";
@@ -1,4 +1,4 @@
1
- import { O as AuthSession, _ as AuthCacheError, b as CachedJwt, n as CapxulSigner, v as AuthCachePort, y as AuthCachePortTag } from "../signer-BGTaqZqg.mjs";
1
+ import { O as AuthSession, _ as AuthCacheError, b as CachedJwt, n as CapxulSigner, v as AuthCachePort, y as AuthCachePortTag } from "../signer-CRzTIrau.mjs";
2
2
  import { Hex } from "viem";
3
3
  import { Effect, FileSystem, Layer, Path } from "effect";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as AuthCacheError, h as toAddress, i as parseCachedJwt, n as BrowserAuthCacheAdapter, o as AuthCachePortTag, r as parseAuthSession, t as InMemoryAuthCacheAdapter } from "../InMemoryAuthCacheAdapter-qMpBOGb3.mjs";
1
+ import { a as AuthCacheError, h as toAddress, i as parseCachedJwt, n as BrowserAuthCacheAdapter, o as AuthCachePortTag, r as parseAuthSession, t as InMemoryAuthCacheAdapter } from "../InMemoryAuthCacheAdapter-D5Cv0yz0.mjs";
2
2
  import { Effect, FileSystem, Layer, Path } from "effect";
3
3
  import { privateKeyToAccount } from "viem/accounts";
4
4
  import * as os from "node:os";
@@ -1,4 +1,4 @@
1
- import { A as BlockNumber, B as OrgId, C as Address$1, D as AppId, E as AnonymousDistinctId, F as DocumentHash, G as Profile, H as PaymentCommandId, I as DurationMs, J as SessionToken, K as PublishableKey, L as Email, M as ChainId, N as CountryCode, O as AuthSession, P as CurrencyCode, R as EpochMs, T as AllowedOrigin, U as PermissionAssignmentId, V as PartyId, W as PermissionId, X as TxHash, Y as SmartAccount, Z as WeiAmount, a as SignerStatusStore, at as Failure, b as CachedJwt, c as AccountProviderSource, g as SmartAccount$1, h as Session$1, j as BudgetId, k as AuthUserId, l as AccountRequirement, m as Profile$1, n as CapxulSigner, nt as CapxulErrorCode, ot as FailureMode, p as CapxulResult, q as RoleKey, rt as CapxulErrorDetails, tt as CapxulError, v as AuthCachePort, w as AllowanceKey, x as Account$1, z as Money } from "./signer-BGTaqZqg.mjs";
1
+ import { $ as WeiAmount, A as BlockNumber, B as OrgId, C as Address$1, D as AppId, E as AnonymousDistinctId, F as DocumentHash, G as PermissionAssignmentId, H as PaymentCommandId, I as DurationMs, J as PublishableKey, K as PermissionId, L as Email, M as ChainId, N as CountryCode, O as AuthSession, P as CurrencyCode, Q as TxHash, R as EpochMs, T as AllowedOrigin, U as PayrollGroupId, V as PartyId, W as PayrollRunId, X as SessionToken, Y as RoleKey, Z as SmartAccount, a as SignerStatusStore, at as CapxulErrorDetails, b as CachedJwt, c as AccountProviderSource, ct as FailureMode, g as SmartAccount$1, h as Session$1, it as CapxulErrorCode, j as BudgetId, k as AuthUserId, l as AccountRequirement, m as Profile$1, n as CapxulSigner, p as CapxulResult, q as Profile, rt as CapxulError, st as Failure, v as AuthCachePort, w as AllowanceKey, x as Account$1, z as Money } from "./signer-CRzTIrau.mjs";
2
2
  import { Address, Hex } from "viem";
3
3
  import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
4
4
  import { FunctionReference } from "convex/server";
@@ -614,6 +614,8 @@ declare const SubmittedPermissionExecutionSchema: Schema.Struct<{
614
614
  }>>]>;
615
615
  }>;
616
616
  type SubmittedPermissionExecution = Schema.Schema.Type<typeof SubmittedPermissionExecutionSchema>;
617
+ declare const PayrollRunStatusSchema: Schema.Literals<readonly ["draft", "authorized", "settled"]>;
618
+ type PayrollRunStatus$1 = Schema.Schema.Type<typeof PayrollRunStatusSchema>;
617
619
  //#endregion
618
620
  //#region ../wire/src/observation-context.d.ts
619
621
  /**
@@ -2065,6 +2067,114 @@ interface OrganizationPaymentsMethods {
2065
2067
  }): Promise<CapxulResult<readonly Payment[]>>;
2066
2068
  }
2067
2069
  //#endregion
2070
+ //#region src/surface/payroll.d.ts
2071
+ /** ADR-0022 R9: where the run stands on the shipped command lifecycle. */
2072
+ type PayrollRunStatus = PayrollRunStatus$1;
2073
+ /** One authorized payroll run. `total` is the sum of its items' nets. */
2074
+ interface PayrollRun {
2075
+ readonly id: PayrollRunId;
2076
+ readonly status: PayrollRunStatus;
2077
+ /** Epoch milliseconds. An instant run has `periodStart === periodEnd`. */
2078
+ readonly periodStart: number;
2079
+ readonly periodEnd: number;
2080
+ readonly total: Money;
2081
+ readonly recipientCount: number;
2082
+ }
2083
+ /**
2084
+ * An organization's runs, newest first, with the month total beside them.
2085
+ *
2086
+ * The aggregate travels WITH the list because the backend computes it over
2087
+ * every settled run in the calendar month while the list is one page. A
2088
+ * consumer that summed `runs` would under-report an employer past the page.
2089
+ */
2090
+ interface PayrollRuns {
2091
+ readonly runs: readonly PayrollRun[];
2092
+ /** Σ net of the runs that SETTLED this calendar month — the "Paid This Month" fact. */
2093
+ readonly settledThisMonth: Money;
2094
+ }
2095
+ /**
2096
+ * One saved recipient on a group. `amount` is the employer's TYPED text, not
2097
+ * minor units: a group is a draft the run composer prefills, and the run
2098
+ * engine is the one place that parses an amount into money.
2099
+ */
2100
+ interface PayrollGroupMember {
2101
+ /** The recipient's `PartyId` — the stable id (ADR-0022 R1), never an email. */
2102
+ readonly partyId: string;
2103
+ readonly amount: string;
2104
+ readonly currency: CurrencyCode;
2105
+ }
2106
+ /** A saved roster the employer pays again. Server-held, so every member sees it. */
2107
+ interface PayrollGroup {
2108
+ readonly id: PayrollGroupId;
2109
+ readonly name: string;
2110
+ /** A stored display preference; the consumer narrows it to its own union. */
2111
+ readonly tone: string;
2112
+ readonly members: readonly PayrollGroupMember[];
2113
+ }
2114
+ /** `id` absent creates a group; `id` present replaces that group in place. */
2115
+ interface PayrollGroupInput {
2116
+ readonly id?: PayrollGroupId;
2117
+ readonly name: string;
2118
+ readonly tone: string;
2119
+ readonly members: readonly PayrollGroupMember[];
2120
+ }
2121
+ /**
2122
+ * One person on one run. `net` is what they are paid; `gross` plus every
2123
+ * adjustment must equal it (ADR-0022 R8) and the backend refuses a run where
2124
+ * it does not. Both are minor-unit strings; an adjustment is signed.
2125
+ */
2126
+ interface PayrollRunItemInput {
2127
+ /**
2128
+ * The recipient. An email `Ref` or a party `Ref` in v1 — the backend refuses
2129
+ * any other kind, because the recipient is what the party is DERIVED from.
2130
+ */
2131
+ readonly to: Ref$1;
2132
+ /**
2133
+ * The caller's ASSERTION of the party `to` resolves to, never the authority
2134
+ * for it. The backend resolves `to` — an email through the invite path's
2135
+ * person-party ensure, a party `Ref` through the same recipient resolution
2136
+ * the batch runs — and refuses the run when this id is not that party, so
2137
+ * the money, the `employed` edge and the payslip's employee can never name
2138
+ * three different people.
2139
+ */
2140
+ readonly partyId: string;
2141
+ readonly gross: string;
2142
+ readonly net: string;
2143
+ readonly adjustments: readonly {
2144
+ readonly label: string;
2145
+ readonly amount: string;
2146
+ }[];
2147
+ }
2148
+ interface AuthorizeRunInput {
2149
+ /** The Budget the run spends from. The caller selects it; nothing is picked for them. */
2150
+ readonly permissionId: string;
2151
+ /** Epoch milliseconds. An instant run passes `start === end` — the payslip renders the date. */
2152
+ readonly period: {
2153
+ readonly start: number;
2154
+ readonly end: number;
2155
+ };
2156
+ readonly items: readonly PayrollRunItemInput[];
2157
+ /**
2158
+ * Supply one to reuse a key minted elsewhere. Left absent, the shipped
2159
+ * fingerprint lifecycle derives it from this intent, so a retry of the same
2160
+ * run replays the SAME command instead of paying twice.
2161
+ */
2162
+ readonly requestKey?: string;
2163
+ }
2164
+ type PayrollOptions = {
2165
+ readonly signal?: AbortSignal;
2166
+ };
2167
+ interface PayrollGroupsMethods {
2168
+ list(options?: PayrollOptions): Promise<CapxulResult<readonly PayrollGroup[]>>;
2169
+ save(input: PayrollGroupInput, options?: PayrollOptions): Promise<CapxulResult<PayrollGroup>>;
2170
+ remove(id: PayrollGroupId, options?: PayrollOptions): Promise<CapxulResult<void>>;
2171
+ }
2172
+ interface PayrollMethods {
2173
+ runs(options?: PayrollOptions): Promise<CapxulResult<PayrollRuns>>;
2174
+ authorizeRun(input: AuthorizeRunInput, options?: PayrollOptions): Promise<CapxulResult<PayrollRun>>;
2175
+ readonly groups: PayrollGroupsMethods;
2176
+ }
2177
+ //#endregion
2068
2178
  //#region src/surface/org.d.ts
2069
2179
  /** The membership state for one Organization member. */
2070
2180
  type MemberStatus = "pending" | "pending_safe" | "pending_grant" | "active" | "revoked" | "expired";
@@ -2214,6 +2324,13 @@ interface OrgScopedMethods extends ActorRelationshipMethods {
2214
2324
  */
2215
2325
  readonly permissions: PermissionMethods;
2216
2326
  readonly payments: OrganizationPaymentsMethods;
2327
+ /**
2328
+ * Pay the team: the runs this Organization has authorized, the verb that
2329
+ * authorizes one, and the saved groups a run is composed from (#1452).
2330
+ * `authorizeRun` is a payment command like any other — same Budget gate,
2331
+ * same signature, same request-key idempotency.
2332
+ */
2333
+ readonly payroll: PayrollMethods;
2217
2334
  auditLog(options?: {
2218
2335
  readonly signal?: AbortSignal;
2219
2336
  }): Promise<CapxulResult<readonly OrganizationAuditLogItem[]>>;
@@ -2615,4 +2732,4 @@ interface ObservationAdapter {
2615
2732
  /** Stable PostHog event used for typed failures that are expected product outcomes. */
2616
2733
  declare const CAPXUL_SDK_EXPECTED_OUTCOME_EVENT = "capxul_sdk_expected_outcome";
2617
2734
  //#endregion
2618
- export { AccountsMethods as $, PaymentDocumentRef as $t, OrgView as A, PAYMENT_STATUSES as An, Destination as At, OrganizationPaymentsMethods as B, IdentityState as Bn, MeMethods as Bt, DetectPendingOrgInvitationsResult as C, OrgSetupStep as Cn, ActivityRange as Ct, OrgMethods as D, SubmittedPermissionExecution as Dn, ActivitySummaryTotal as Dt, MemberView as E, Permission as En, ActivitySummaryParams as Et, RoleSpendCap as F, TelemetryIdentifyInput as Fn, DestinationRail as Ft, PermissionOptions as G, isClaimed as Gn, OfframpQuoteInput as Gt, PermissionChangeInput as H, Readiness as Hn, MovementActivityEvidence as Ht, RoleView as I, TelemetryPort as In, DestinationRemoveInput as It, PermissionReadResult as J, InvocationControls as Jn, PayeesMethods as Jt, PermissionReplaceInput as K, isRestoring as Kn, OfframpStatus as Kt, OrganizationPaymentBatchInput as L, CAPXUL_PAYMENTS_V2_ADDRESS as Ln, DestinationsMethods as Lt, OrganizationAuditLogItem as M, RequestStatus as Mn, DestinationKind as Mt, ResendInviteTokenInput as N, TelemetryEvent as Nn, DestinationListInput as Nt, OrgScopedMethods as O, InboxStatus as On, ActorReference as Ot, RoleDefinition as P, TelemetryGroupInput as Pn, DestinationPayload as Pt, OrgMeOptions as Q, PaymentDocumentKind as Qt, OrganizationPaymentInput as R, Destination$1 as Rn, FinancialOpsMethods as Rt, CreateOrgInput as S, OrgLifecycle as Sn, ActivityPage as St, MemberStatus as T, CurrentHoldings as Tn, ActivitySummary as Tt, PermissionCreateInput as U, StateLabel as Un, OfframpMethods as Ut, PermissionAssignInput as V, OrgLane as Vn, MeProfile as Vt, PermissionMethods as W, destination as Wn, OfframpQuote as Wt, OrgMe as X, PaymentActivityEvidence as Xt, Budget as Y, Payment as Yt, OrgMeMethod as Z, PaymentDirection as Zt, SystemMethods as _, AccountSetupStep as _n, ActivityFilter as _t, SdkFailureObservation as a, PaymentTiming as an, ActorRequestIssueInput as at, CurrentUserContext as b, SmartAccountMethods as bn, ActivityListParams as bt, PostHogObservabilityOptions as c, PaymentsPayInput as cn, AddressBookEntry as ct, CreateCapxulClientInput as d, Ref$1 as dn, InboxApproveInput as dt, PaymentDocumentRender as en, AccountMethods as et, IdentityProfileDetails as f, ResolvedTarget as fn, InboxItem as ft, Holding as g, AccountLifecycle as gn, ActivityDetail as gt, HoldingsMethods as h, fingerprintPaymentIntent as hn, ActivityAnnotationInput as ht, ObservationDelivery as i, PaymentStatus as in, ActorRequest as it, OrganizationAccount as j, PaymentStatus$1 as jn, DestinationAddInput as jt, OrgTemplate as k, PAYMENT_DIRECTIONS as kn, DepositInstructions as kt, postHogObservability as l, RecipientResolution as ln, AddressBookLabelInput as lt, IdentityRuntimeSendResult as m, TargetsMethods as mn, ActivityAnnotation as mt, ObservationAdapter as n, PaymentDocumentsMethods as nn, ActorProfileMethods as nt, HostObservability as o, PaymentType as on, ActorRequestsMethods as ot, IdentityRuntime as p, TargetReference as pn, InboxMethods as pt, PermissionRevokeInput as q, IdentityTransition as qn, Payee as qt, ObservationContext as r, PaymentMoney as rn, ActorRelationshipMethods as rt, PostHogObservabilityClient as s, PaymentsMethods as sn, AddressBookAddInput as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, PaymentDocumentVerification as tn, ActorProfile as tt, CapxulClient as u, RecipientResolutionKind as un, AddressBookMethods as ut, SystemHealth as v, isSettingUpLifecycle as vn, ActivityItem as vt, InviteMemberInput as w, ActorRef as wn, ActivityReference as wt, CurrentUserMethods as x, AuthMethods as xn, ActivityMethods as xt, MediaMethods as y, IdentityMethods as yn, ActivityKind as yt, OrganizationPaymentItemInput as z, IdentityEvent as zn, HandlesMethods as zt };
2735
+ export { PermissionChangeInput as $, Readiness as $n, MovementActivityEvidence as $t, OrgView as A, IdentityMethods as An, ActivityKind as At, PayrollGroupMember as B, PAYMENT_DIRECTIONS as Bn, DepositInstructions as Bt, DetectPendingOrgInvitationsResult as C, ResolvedTarget as Cn, InboxItem as Ct, OrgMethods as D, AccountLifecycle as Dn, ActivityDetail as Dt, MemberView as E, fingerprintPaymentIntent as En, ActivityAnnotationInput as Et, RoleSpendCap as F, ActorRef as Fn, ActivityReference as Ft, PayrollRunItemInput as G, TelemetryGroupInput as Gn, DestinationPayload as Gt, PayrollMethods as H, PaymentStatus$1 as Hn, DestinationAddInput as Ht, RoleView as I, CurrentHoldings as In, ActivitySummary as It, OrganizationPaymentBatchInput as J, CAPXUL_PAYMENTS_V2_ADDRESS as Jn, DestinationsMethods as Jt, PayrollRunStatus as K, TelemetryIdentifyInput as Kn, DestinationRail as Kt, AuthorizeRunInput as L, Permission as Ln, ActivitySummaryParams as Lt, OrganizationAuditLogItem as M, AuthMethods as Mn, ActivityMethods as Mt, ResendInviteTokenInput as N, OrgLifecycle as Nn, ActivityPage as Nt, OrgScopedMethods as O, AccountSetupStep as On, ActivityFilter as Ot, RoleDefinition as P, OrgSetupStep as Pn, ActivityRange as Pt, PermissionAssignInput as Q, OrgLane as Qn, MeProfile as Qt, PayrollGroup as R, SubmittedPermissionExecution as Rn, ActivitySummaryTotal as Rt, CreateOrgInput as S, Ref$1 as Sn, InboxApproveInput as St, MemberStatus as T, TargetsMethods as Tn, ActivityAnnotation as Tt, PayrollOptions as U, RequestStatus as Un, DestinationKind as Ut, PayrollGroupsMethods as V, PAYMENT_STATUSES as Vn, Destination as Vt, PayrollRun as W, TelemetryEvent as Wn, DestinationListInput as Wt, OrganizationPaymentItemInput as X, IdentityEvent as Xn, HandlesMethods as Xt, OrganizationPaymentInput as Y, Destination$1 as Yn, FinancialOpsMethods as Yt, OrganizationPaymentsMethods as Z, IdentityState as Zn, MeMethods as Zt, SystemMethods as _, PaymentType as _n, ActorRequestsMethods as _t, SdkFailureObservation as a, PayeesMethods as an, InvocationControls as ar, PermissionReadResult as at, CurrentUserContext as b, RecipientResolution as bn, AddressBookLabelInput as bt, PostHogObservabilityOptions as c, PaymentDirection as cn, OrgMeMethod as ct, CreateCapxulClientInput as d, PaymentDocumentRender as dn, AccountMethods as dt, OfframpMethods as en, StateLabel as er, PermissionCreateInput as et, IdentityProfileDetails as f, PaymentDocumentVerification as fn, ActorProfile as ft, Holding as g, PaymentTiming as gn, ActorRequestIssueInput as gt, HoldingsMethods as h, PaymentStatus as hn, ActorRequest as ht, ObservationDelivery as i, Payee as in, IdentityTransition as ir, PermissionRevokeInput as it, OrganizationAccount as j, SmartAccountMethods as jn, ActivityListParams as jt, OrgTemplate as k, isSettingUpLifecycle as kn, ActivityItem as kt, postHogObservability as l, PaymentDocumentKind as ln, OrgMeOptions as lt, IdentityRuntimeSendResult as m, PaymentMoney as mn, ActorRelationshipMethods as mt, ObservationAdapter as n, OfframpQuoteInput as nn, isClaimed as nr, PermissionOptions as nt, HostObservability as o, Payment as on, Budget as ot, IdentityRuntime as p, PaymentDocumentsMethods as pn, ActorProfileMethods as pt, PayrollRuns as q, TelemetryPort as qn, DestinationRemoveInput as qt, ObservationContext as r, OfframpStatus as rn, isRestoring as rr, PermissionReplaceInput as rt, PostHogObservabilityClient as s, PaymentActivityEvidence as sn, OrgMe as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, OfframpQuote as tn, destination as tr, PermissionMethods as tt, CapxulClient as u, PaymentDocumentRef as un, AccountsMethods as ut, SystemHealth as v, PaymentsMethods as vn, AddressBookAddInput as vt, InviteMemberInput as w, TargetReference as wn, InboxMethods as wt, CurrentUserMethods as x, RecipientResolutionKind as xn, AddressBookMethods as xt, MediaMethods as y, PaymentsPayInput as yn, AddressBookEntry as yt, PayrollGroupInput as z, InboxStatus as zn, ActorReference as zt };
@@ -196,6 +196,8 @@ type PermissionId = Brand<string, "PermissionId">;
196
196
  type PermissionAssignmentId = Brand<string, "PermissionAssignmentId">;
197
197
  type BudgetId = Brand<string, "BudgetId">;
198
198
  type PaymentCommandId = Brand<string, "PaymentCommandId">;
199
+ type PayrollRunId = Brand<string, "PayrollRunId">;
200
+ type PayrollGroupId = Brand<string, "PayrollGroupId">;
199
201
  type OrgId = Brand<string, "OrgId">;
200
202
  type AppId = Brand<string, "AppId">;
201
203
  type AllowedOrigin = Brand<string, "AllowedOrigin">;
@@ -406,4 +408,4 @@ interface Eip1193RequestProvider {
406
408
  */
407
409
  declare function injectedWalletSigner(provider: Eip1193RequestProvider): CapxulSigner;
408
410
  //#endregion
409
- export { toCountryCode as $, BlockNumber as A, OrgId as B, Address$1 as C, AppId as D, AnonymousDistinctId as E, DocumentHash as F, Profile$1 as G, PaymentCommandId as H, DurationMs as I, SessionToken as J, PublishableKey as K, Email as L, ChainId as M, CountryCode as N, AuthSession as O, CurrencyCode as P, toAddress as Q, EpochMs as R, AccountId as S, AllowedOrigin as T, PermissionAssignmentId as U, PartyId as V, PermissionId as W, TxHash as X, SmartAccount$1 as Y, WeiAmount as Z, AuthCacheError as _, SignerStatusStore as a, Failure as at, CachedJwt as b, AccountProviderSource as c, eip1193AccountProvider as d, CAPXUL_ERROR_CODES as et, localPrivateKeyAccountProvider as f, SmartAccount as g, Session as h, SignerStatus as i, Errors as it, BudgetId as j, AuthUserId as k, AccountRequirement as l, Profile as m, CapxulSigner as n, CapxulErrorCode as nt, injectedWalletSigner as o, FailureMode as ot, CapxulResult as p, RoleKey as q, Eip1193RequestProvider as r, CapxulErrorDetails as rt, AccountProvider as s, isCapxulError as st, CapxulDigestSigner as t, CapxulError as tt, Eip1193Provider as u, AuthCachePort as v, AllowanceKey as w, Account$1 as x, AuthCachePortTag as y, Money as z };
411
+ export { WeiAmount as $, BlockNumber as A, OrgId as B, Address$1 as C, AppId as D, AnonymousDistinctId as E, DocumentHash as F, PermissionAssignmentId as G, PaymentCommandId as H, DurationMs as I, PublishableKey as J, PermissionId as K, Email as L, ChainId as M, CountryCode as N, AuthSession as O, CurrencyCode as P, TxHash as Q, EpochMs as R, AccountId as S, AllowedOrigin as T, PayrollGroupId as U, PartyId as V, PayrollRunId as W, SessionToken as X, RoleKey as Y, SmartAccount$1 as Z, AuthCacheError as _, SignerStatusStore as a, CapxulErrorDetails as at, CachedJwt as b, AccountProviderSource as c, FailureMode as ct, eip1193AccountProvider as d, toAddress as et, localPrivateKeyAccountProvider as f, SmartAccount as g, Session as h, SignerStatus as i, CapxulErrorCode as it, BudgetId as j, AuthUserId as k, AccountRequirement as l, isCapxulError as lt, Profile as m, CapxulSigner as n, CAPXUL_ERROR_CODES as nt, injectedWalletSigner as o, Errors as ot, CapxulResult as p, Profile$1 as q, Eip1193RequestProvider as r, CapxulError as rt, AccountProvider as s, Failure as st, CapxulDigestSigner as t, toCountryCode as tt, Eip1193Provider as u, AuthCachePort as v, AllowanceKey as w, Account$1 as x, AuthCachePortTag as y, Money as z };
@@ -1,4 +1,4 @@
1
- import { Fn as TelemetryIdentifyInput, Nn as TelemetryEvent, Pn as TelemetryGroupInput, n as ObservationAdapter, qn as IdentityTransition, u as CapxulClient } from "../observation-BfCkJY5z.mjs";
1
+ import { Gn as TelemetryGroupInput, Kn as TelemetryIdentifyInput, Wn as TelemetryEvent, ir as IdentityTransition, n as ObservationAdapter, u as CapxulClient } from "../observation-CyNjyQxv.mjs";
2
2
  import { Effect, Layer } from "effect";
3
3
 
4
4
  //#region src/testing/telemetry/RecordingTelemetryAdapter.d.ts
@@ -1,5 +1,5 @@
1
- import { E as authClientPortFromPromiseAdapter, M as fromWei, T as bootstrapErrorFromCapxul, Z as deriveCapxulSafeAddress, _ as wireChainId, f as redactTelemetryEvent, g as accountReadErrorFromCapxul, j as toWei, m as smartAccountErrorFromCapxul, t as assembleCapxulClient, x as convexCallErrorFromCapxul, y as identityErrorFromCapxul } from "../create-capxul-client-BrE6tLg6.mjs";
2
- import { C as toDurationMs, D as toJwtToken, E as toEpochSeconds, I as CapxulError, N as toSessionToken, O as toKycTier, R as Errors, T as toEpochMs, _ as toAppId, b as toChainId, g as toAllowedOrigin, h as toAddress, j as toPublishableKey, m as toAccountId, t as InMemoryAuthCacheAdapter, v as toAuthUserId, w as toEmail, x as toCountryCode } from "../InMemoryAuthCacheAdapter-qMpBOGb3.mjs";
1
+ import { E as authClientPortFromPromiseAdapter, M as fromWei, T as bootstrapErrorFromCapxul, Z as deriveCapxulSafeAddress, _ as wireChainId, f as redactTelemetryEvent, g as accountReadErrorFromCapxul, j as toWei, m as smartAccountErrorFromCapxul, t as assembleCapxulClient, x as convexCallErrorFromCapxul, y as identityErrorFromCapxul } from "../create-capxul-client-Btl4qyNC.mjs";
2
+ import { B as Errors, C as toDurationMs, D as toJwtToken, E as toEpochSeconds, F as toSessionToken, N as toPublishableKey, O as toKycTier, R as CapxulError, T as toEpochMs, _ as toAppId, b as toChainId, g as toAllowedOrigin, h as toAddress, m as toAccountId, t as InMemoryAuthCacheAdapter, v as toAuthUserId, w as toEmail, x as toCountryCode } from "../InMemoryAuthCacheAdapter-D5Cv0yz0.mjs";
3
3
  import { keccak256 } from "viem";
4
4
  import { Effect, Result, Semaphore } from "effect";
5
5
  import { getFunctionName } from "convex/server";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capxul/sdk",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Xelmar-tech/infrastructure.git",
@@ -46,12 +46,12 @@
46
46
  "typescript": "npm:@typescript/typescript6@6.0.2",
47
47
  "vite-plus": "0.1.23",
48
48
  "vitest": "npm:@voidzero-dev/vite-plus-test@0.1.23",
49
- "@capxul/config": "0.2.0",
50
- "@capxul/errors": "0.0.1",
49
+ "@capxul/types": "0.2.0",
51
50
  "@capxul/typescript-config": "0.0.0",
51
+ "@capxul/config": "0.2.0",
52
+ "@capxul/observability": "2.5.0",
52
53
  "@capxul/wire": "0.5.0",
53
- "@capxul/observability": "2.4.0",
54
- "@capxul/types": "0.2.0"
54
+ "@capxul/errors": "0.0.1"
55
55
  },
56
56
  "_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.",
57
57
  "scripts": {