@capxul/cli 4.20.0-beta.29 → 4.20.0-beta.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -73
- package/dist/browser/signer.js +10 -4
- package/dist/browser/signer.js.map +1 -1
- package/dist/{entry-kvdchEO1.mjs → entry-Cp3LiVYn.mjs} +2134 -2318
- package/dist/entry-Cp3LiVYn.mjs.map +1 -0
- package/dist/main.mjs +1 -1
- package/dist/{organizations-BAIv8qyL.mjs → organizations-Dkb73lVO.mjs} +33 -20
- package/dist/organizations-Dkb73lVO.mjs.map +1 -0
- package/dist/{permission-approvals-DzfNZsW0.mjs → permission-approvals-C3cUSQeT.mjs} +2 -2
- package/dist/{permission-approvals-DzfNZsW0.mjs.map → permission-approvals-C3cUSQeT.mjs.map} +1 -1
- package/package.json +4 -4
- package/dist/entry-kvdchEO1.mjs.map +0 -1
- package/dist/organizations-BAIv8qyL.mjs.map +0 -1
package/dist/main.mjs
CHANGED
|
@@ -8,7 +8,7 @@ if (whoami === void 0) {
|
|
|
8
8
|
const [{ Cause, Effect, Exit, Logger }, { NodeRuntime, NodeServices }, { runCli }] = await Promise.all([
|
|
9
9
|
import("effect"),
|
|
10
10
|
import("@effect/platform-node"),
|
|
11
|
-
import("./entry-
|
|
11
|
+
import("./entry-Cp3LiVYn.mjs")
|
|
12
12
|
]);
|
|
13
13
|
NodeRuntime.runMain(runCli({
|
|
14
14
|
nodeVersion: versions.node,
|
|
@@ -4826,7 +4826,9 @@ const HomeSchema = Schema.Struct({
|
|
|
4826
4826
|
needsYou: Schema.NullOr(Schema.Struct({
|
|
4827
4827
|
requestsToPay: Schema.Array(Schema.String),
|
|
4828
4828
|
payrollToApprove: Schema.Array(Schema.String),
|
|
4829
|
-
paymentsToRetry: Schema.Array(Schema.String)
|
|
4829
|
+
paymentsToRetry: Schema.Array(Schema.String),
|
|
4830
|
+
/** The caller's capped Budgets in the Organization with nothing left this period. */
|
|
4831
|
+
budgetsUsedUp: Schema.Array(Schema.String)
|
|
4830
4832
|
})),
|
|
4831
4833
|
/** The newest rows of the actor's activity. */
|
|
4832
4834
|
recentActivity: Schema.NullOr(Schema.Array(ActivityItemSchema))
|
|
@@ -5555,7 +5557,8 @@ const PermissionReplacementInvitationSnapshotSchema = Schema.Struct({
|
|
|
5555
5557
|
"verified",
|
|
5556
5558
|
"mismatch",
|
|
5557
5559
|
"provider_failure",
|
|
5558
|
-
"applied"
|
|
5560
|
+
"applied",
|
|
5561
|
+
"abandoned"
|
|
5559
5562
|
]),
|
|
5560
5563
|
executionState: Schema.Literals([
|
|
5561
5564
|
"unprepared",
|
|
@@ -8067,7 +8070,8 @@ const PermissionCommandViewSchema = Schema.Struct({
|
|
|
8067
8070
|
"verified",
|
|
8068
8071
|
"mismatch",
|
|
8069
8072
|
"provider_failure",
|
|
8070
|
-
"applied"
|
|
8073
|
+
"applied",
|
|
8074
|
+
"abandoned"
|
|
8071
8075
|
]),
|
|
8072
8076
|
status: Schema.Literals([
|
|
8073
8077
|
"pending",
|
|
@@ -9508,7 +9512,9 @@ loadBudgetLeft: "permissions.authorities.loadBudgetLeft" },
|
|
|
9508
9512
|
/** The prepare action's transaction: authorize, plan and save the command. */
|
|
9509
9513
|
prepareIntent: "permissions.commands.prepareIntent",
|
|
9510
9514
|
/** The submit action's transaction: record the accepted UserOperation. */
|
|
9511
|
-
completeExecution: "permissions.commands.completeExecution"
|
|
9515
|
+
completeExecution: "permissions.commands.completeExecution",
|
|
9516
|
+
/** The prepare's cleanup: a saved command whose UserOperation could not be built ends. */
|
|
9517
|
+
abandonUnbuilt: "permissions.commands.abandonUnbuilt"
|
|
9512
9518
|
},
|
|
9513
9519
|
configurations: {
|
|
9514
9520
|
prepareIntent: "permissions.configurations.prepareIntent",
|
|
@@ -13047,7 +13053,10 @@ function clearAuthCacheEffect(authCache) {
|
|
|
13047
13053
|
const signOutProgramWithOptions = (options) => Effect.gen(function* () {
|
|
13048
13054
|
const deps = yield* CapxulDepsTag;
|
|
13049
13055
|
let phase = deps.actor.snapshot().phase;
|
|
13050
|
-
if (phase === "
|
|
13056
|
+
if (phase === "restoring") {
|
|
13057
|
+
yield* getSessionProgramWithOptions(options).pipe(Effect.catchIf(() => deps.actor.snapshot().phase === "faulted", () => Effect.void));
|
|
13058
|
+
phase = deps.actor.snapshot().phase;
|
|
13059
|
+
} else if (phase === "signed_out") {
|
|
13051
13060
|
const cached = yield* deps.authCache.getSession.pipe(Effect.mapError((e) => Errors.providerError("auth-cache", "getSession", e)));
|
|
13052
13061
|
if (cached !== null) {
|
|
13053
13062
|
yield* deps.actor.restoreAuthSession(cached, depsRequestOptions(deps, options)).pipe(Effect.mapError(actorError));
|
|
@@ -14471,7 +14480,7 @@ function mapAccountLifecycle(input) {
|
|
|
14471
14480
|
}
|
|
14472
14481
|
//#endregion
|
|
14473
14482
|
//#region ../../packages/sdk/package.json
|
|
14474
|
-
var version$1 = "4.20.0-beta.
|
|
14483
|
+
var version$1 = "4.20.0-beta.30";
|
|
14475
14484
|
//#endregion
|
|
14476
14485
|
//#region ../../packages/sdk/src/observability/telemetry/exception-projection.ts
|
|
14477
14486
|
/** Fixed fallback for failures that have no safe message. */
|
|
@@ -16822,21 +16831,25 @@ function recipientMatches$1(source, observation, target) {
|
|
|
16822
16831
|
const payrollEmailResolution = source.paymentType === "payroll" && to.kind === "party" && observation.recipient_locator_kind === "email";
|
|
16823
16832
|
return (observation.recipient_locator_kind === to.kind || payrollEmailResolution) && observation.recipient_address.toLowerCase() === target && observation.external_address_acknowledged === (source.externalAddressAcknowledged === true) && (to.kind !== "address" || to.address.toLowerCase() === target) && (to.kind !== "party" || observation.recipient_party_id === to.partyId) && (to.kind !== "handle" || observation.recipient_handle?.toLowerCase() === to.handle.toLowerCase());
|
|
16824
16833
|
}
|
|
16834
|
+
/**
|
|
16835
|
+
* The later release the caller asked for, or null for one paid at once. A
|
|
16836
|
+
* stored birth item names its operation; an Organization request item names
|
|
16837
|
+
* only its `timing` (#2439).
|
|
16838
|
+
*/
|
|
16839
|
+
function heldRelease(source) {
|
|
16840
|
+
if ("operation" in source) return source.operation === "create_commitment" ? source.release : null;
|
|
16841
|
+
return source.timing?.kind === "instant" ? null : source.timing ?? null;
|
|
16842
|
+
}
|
|
16825
16843
|
function operationMatches(source, item) {
|
|
16826
16844
|
if (item.operation !== "send" && item.operation !== "create_commitment") return false;
|
|
16827
16845
|
if (!Object.entries(PAYMENT_PURPOSE_KIND_CODES).some(([purpose, code]) => purpose === sourcePurpose(source) && code === item.kind)) return false;
|
|
16828
|
-
|
|
16829
|
-
|
|
16830
|
-
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
return item.startTime === start && item.cliffTime === cliff && item.endTime === end;
|
|
16836
|
-
}
|
|
16837
|
-
return true;
|
|
16838
|
-
}
|
|
16839
|
-
return item.operation === "send";
|
|
16846
|
+
const release = heldRelease(source);
|
|
16847
|
+
if (release === null) return item.operation === "send";
|
|
16848
|
+
if (item.operation !== "create_commitment") return false;
|
|
16849
|
+
const start = Math.floor((release.kind === "scheduled" ? release.at : release.startsAt) / 1e3);
|
|
16850
|
+
const cliff = Math.floor((release.kind === "scheduled" ? release.at : release.cliffAt ?? release.startsAt) / 1e3);
|
|
16851
|
+
const end = Math.floor((release.kind === "scheduled" ? release.at : release.endsAt) / 1e3);
|
|
16852
|
+
return item.startTime === start && item.cliffTime === cliff && item.endTime === end;
|
|
16840
16853
|
}
|
|
16841
16854
|
function itemFactsMatch(source, item, observation) {
|
|
16842
16855
|
const exact = toExactAssetAmount(source.amount, CONFIGURED_MONEY_ASSETS);
|
|
@@ -22073,7 +22086,7 @@ function makeApprovalsMethods(deps) {
|
|
|
22073
22086
|
const signal = options?.signal;
|
|
22074
22087
|
if (isCommandApproval(input)) return openApproval(signal, (signerAddress) => prepareVerifiedCommand(deps, input, signerAddress, signal));
|
|
22075
22088
|
if (isPermissionChange(input)) return openApproval(signal, async (signerAddress) => {
|
|
22076
|
-
const { prepareVerifiedPermissionChange } = await import("./permission-approvals-
|
|
22089
|
+
const { prepareVerifiedPermissionChange } = await import("./permission-approvals-C3cUSQeT.mjs");
|
|
22077
22090
|
return prepareVerifiedPermissionChange(deps, input, signerAddress, signal);
|
|
22078
22091
|
});
|
|
22079
22092
|
if ("organizationId" in input) return openApproval(signal, (signerAddress) => prepareVerifiedOrganizationPayment(deps, input, signerAddress, signal));
|
|
@@ -37591,4 +37604,4 @@ var ConvexOrganizationSetupAdapter = class {
|
|
|
37591
37604
|
//#endregion
|
|
37592
37605
|
export { callOperation as $, toPermissionId as $n, AuthClientError as $t, ConvexCallPortTag as A, redactUrlSecrets as An, toHandle as At, makePaymentsMethods as B, images as Bn, toCapxulResult as Bt, SmartAccountPortTag as C, PayrollGroupInputSchema as Cn, signerFailure as Ct, ConvexAccountLayer as D, ORGANIZATION_SETUP_STATUSES as Dn, toCountryCode as Dt, makeAccountsMethods as E, ORGANIZATION_SETUP_REASONS as En, makeClientRequestMethods as Et, decodePayrollRunInput as F, keepRefillOnChange as Fn, publicIdentityFailure as Ft, formatAssetAmount as G, toLowerHex as Gn, ClockPortTag as Gt, makeCheckoutMethods as H, PaymentDocumentOptionsSchema as Hn, ActorFailure as Ht, toPayrollGroupId as I, diagnostics as In, runIdentityFacade as It, toRaw as J, DurationMsSchema$1 as Jn, observationRequestHeaders as Jt, parseAssetAmount as K, PAYMENT_DIRECTIONS as Kn, BetterAuthNodeLayer as Kt, makeAccountMethods as L, AppIdSchema$1 as Ln, runPortEffect as Lt, bindProductTelemetryInvocation as M, CAPXUL_ERROR_CODES as Mn, validateHandle as Mt, registerProductTelemetryInvocation as N, isExpectedOutcome as Nn, makeAuthMethods as Nt, AccountReadPortTag as O, decodeChainCause as On, toKycTier as Ot, makeApprovalsMethods as P, toOrgId as Pn, askIdentity as Pt, BASE_SEPOLIA_CHAIN_ID as Q, toPermissionAssignmentId as Qn, sanitizeObservationContext as Qt, logDroppedEvent as R, toAllowedOrigin as Rn, sessionFromActor as Rt, ConvexSmartAccountLayer as S, PayrollGroupIdSchema as Sn, recoverRawDigestSigner as St, PonderIndexerAdapter as T, setups as Tn, makeCurrentUserMethods as Tt, makeTargetsMethods as U, isBytes32 as Un, carryInvocationParentSpan as Ut, makeDestinationsMethods as V, toAccountId as Vn, formatTraceparent as Vt, abandonPrepared as W, isHex as Wn, SystemClockLayer as Wt, fingerprintPaymentIntent as X, toEpochMs as Xn, copyInvocationObservation as Xt, isMoneyParseError as Y, EpochMsSchema$1 as Yn, attachInvocationObservation as Yt, TOKENS as Z, toBudgetId as Zn, readInvocationObservation as Zt, makeMeMethods as _, isCapxulOperation as _n, UNOBSERVABLE_SIGNER_STATUS as _t, verifiedConfiguration as a, redactTelemetryProps as an, toAddress as ar, postHogFailureObservation as at, makePaymentDocumentsMethods as b, details as bn, isSignerNotReadySignal as bt, deserializeCapxulError as c, CliCommandStartedTelemetryEventSchema as cn, CapxulError as cr, observationContextProps as ct, verifiedPreparation as d, CLI_CAPABILITIES as dn, isFailureMode as dr, SDK_VERSION as dt, AuthClientPortTag as en, ChainIdSchema$1 as er, asCapxulError as et, buildCommand as f, CLI_COMMAND_NAMES as fn, getFunctionName as fr, normalizeExceptionErrorKind as ft, bootIdentityFlow as g, CAPXUL_OPERATIONS as gn, version$1 as gt, executeIdentityProductObservation as h, stampTelemetryEnvelope as hn, safeExceptionLabel as ht, prepareConfiguration as i, AuthCachePortTag as in, isEvmAddress as ir, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as it, convexCallErrorFromCapxul as j, isCredentialField as jn, toPartyId as jt, TelemetryPortTag as k, redactSecrets as kn, toTesterKind as kt, preparePermission as l, CliDiagnosticCompletedTelemetryEventSchema as ln, isCapxulError as lr, withCapturedAttemptContext as lt, validateReplacementInput as m, EXCEPTION_EVENT_NAME as mn, projectSdkException as mt, makeOrgMethods as n, toAuthUserId as nn, toAssetId as nr, failureDetail as nt, ConvexOrganizationAdapter as o, TELEMETRY_EVENT_SCHEMAS as on, Errors as or, observeFailedResult as ot, decodePermissionIntent as p, CLI_INVOCATION_KINDS as pn, normalizeExceptionOperation as pt, requireAsset as q, PAYMENT_STATUSES as qn, BetterAuthBrowserLayer as qt, authorInvitation as r, toEmail as rn, toCurrencyCode as rr, failureEvidenceProps as rt, OrgPortTag as s, CliCommandCompletedTelemetryEventSchema as sn, absurd as sr, observeSdkClient as st, ConvexOrganizationSetupAdapter as t, detectAuthCacheAdapter as tn, currencySymbolFor as tr, toPublicError$1 as tt, preparedIdentity as u, CliFirstUsedTelemetryEventSchema as un, FAILURE_MODES$1 as ur, EXCEPTION_MESSAGE as ut, paymentPhase as v, normalizeCapxulOperation as vn, causeChain as vt, makeHoldingsMethods as w, FixedOfferDraftSchema as wn, resolveFailureMode as wt, makeSmartAccountMethods as x, onboardings as xn, openfortSignerNotReadyCode as xt, makeActivityMethods as y, OPERATIONS as yn, isEcdsaSignatureHex as yt, makeOfframpMethods as z, toPublishableKey as zn, runCapxulEffect as zt };
|
|
37593
37606
|
|
|
37594
|
-
//# sourceMappingURL=organizations-
|
|
37607
|
+
//# sourceMappingURL=organizations-Dkb73lVO.mjs.map
|