@fantastic.dev/better-stripe 0.90.0 → 0.91.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.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +41 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +187 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts +2 -23
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js +1 -112
- package/dist/client/billing/renewalAttach/internal/acquisition/rawAcquisition.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts +8 -3
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js +1 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/rawWireSource.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/test-fixtures/sourcePort.d.mts +1 -1
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js +454 -0
- package/dist/client/billing/renewalAttach/internal/configure/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js +99 -0
- package/dist/client/billing/renewalAttach/internal/configure/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js +274 -0
- package/dist/client/billing/renewalAttach/internal/configure/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts +3 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js +9 -0
- package/dist/client/billing/renewalAttach/internal/configure/replay.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts +39 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js +245 -0
- package/dist/client/billing/renewalAttach/internal/configure/request.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts +88 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js +289 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js +362 -0
- package/dist/client/billing/renewalAttach/internal/observation/actor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts +9 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js +215 -0
- package/dist/client/billing/renewalAttach/internal/observation/capture.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js +190 -0
- package/dist/client/billing/renewalAttach/internal/observation/profile.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js +317 -0
- package/dist/client/billing/renewalAttach/internal/observation/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts +79 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js +27 -0
- package/dist/client/billing/renewalAttach/internal/observation/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js +229 -0
- package/dist/client/billing/renewalAttach/internal/operations/configureReadTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +163 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +443 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +467 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js +59 -0
- package/dist/client/billing/renewalAttach/internal/operations/ownedAwait.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts +10 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js +48 -0
- package/dist/client/billing/renewalAttach/internal/operations/providerFailure.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts +20 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js +44 -0
- package/dist/client/billing/renewalAttach/internal/operations/sourceOperations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts +42 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js +158 -0
- package/dist/client/billing/renewalAttach/internal/operations/types.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js +214 -0
- package/dist/client/billing/renewalAttach/internal/preflight/configurePreflight.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts +33 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js +208 -0
- package/dist/client/billing/renewalAttach/internal/preflight/grammar.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js +25 -0
- package/dist/client/billing/renewalAttach/internal/preflight/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js +93 -0
- package/dist/client/billing/renewalAttach/internal/preflight/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts +7 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js +153 -0
- package/dist/client/billing/renewalAttach/internal/preflight/relations.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js +221 -0
- package/dist/client/billing/renewalAttach/internal/recovery/material.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +8 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +101 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +186 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +5 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +498 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +21 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +119 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +16 -16
- package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
- package/dist/component/balanceFunding/mutations.d.ts +16 -16
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/payoutRelease/queries.d.ts +2 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/processingCostReconciliation/rollback.d.ts +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +26 -8
- package/docs/renewal-material-observation.md +37 -0
- package/docs/renewal-phase-assembly.md +68 -0
- package/docs/renewal-raw-acquisition.md +19 -5
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +304 -0
- package/src/client/billing/renewalAttach/internal/acquisition/rawAcquisition.ts +2 -160
- package/src/client/billing/renewalAttach/internal/acquisition/rawWireSource.ts +15 -3
- package/src/client/billing/renewalAttach/internal/configure/actor.ts +575 -0
- package/src/client/billing/renewalAttach/internal/configure/capture.ts +117 -0
- package/src/client/billing/renewalAttach/internal/configure/dispatch.integration.test.ts +32 -0
- package/src/client/billing/renewalAttach/internal/configure/limits.test.ts +510 -0
- package/src/client/billing/renewalAttach/internal/configure/order.integration.test.ts +207 -0
- package/src/client/billing/renewalAttach/internal/configure/output.ts +372 -0
- package/src/client/billing/renewalAttach/internal/configure/ownership.integration.test.ts +148 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.integration.test.ts +173 -0
- package/src/client/billing/renewalAttach/internal/configure/replay.ts +13 -0
- package/src/client/billing/renewalAttach/internal/configure/request.ts +312 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.integration.test.ts +507 -0
- package/src/client/billing/renewalAttach/internal/configure/transport.ts +348 -0
- package/src/client/billing/renewalAttach/internal/observation/actor.ts +444 -0
- package/src/client/billing/renewalAttach/internal/observation/capture.ts +250 -0
- package/src/client/billing/renewalAttach/internal/observation/observation.integration.test.ts +220 -0
- package/src/client/billing/renewalAttach/internal/observation/observationRetirement.integration.test.ts +60 -0
- package/src/client/billing/renewalAttach/internal/observation/profile.ts +264 -0
- package/src/client/billing/renewalAttach/internal/observation/record.ts +408 -0
- package/src/client/billing/renewalAttach/internal/observation/types.ts +102 -0
- package/src/client/billing/renewalAttach/internal/operations/configureReadTransport.ts +285 -0
- package/src/client/billing/renewalAttach/internal/operations/defaultBindings.test.ts +69 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +574 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.integration.test.ts +34 -0
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +535 -0
- package/src/client/billing/renewalAttach/internal/operations/ownedAwait.ts +63 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.integration.test.ts +61 -0
- package/src/client/billing/renewalAttach/internal/operations/providerFailure.ts +66 -0
- package/src/client/billing/renewalAttach/internal/operations/sourceOperations.ts +50 -0
- package/src/client/billing/renewalAttach/internal/operations/transport.integration.test.ts +116 -0
- package/src/client/billing/renewalAttach/internal/operations/types.ts +223 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.integration.test.ts +285 -0
- package/src/client/billing/renewalAttach/internal/preflight/configurePreflight.ts +258 -0
- package/src/client/billing/renewalAttach/internal/preflight/configureReads.integration.test.ts +139 -0
- package/src/client/billing/renewalAttach/internal/preflight/grammar.ts +257 -0
- package/src/client/billing/renewalAttach/internal/preflight/output.ts +42 -0
- package/src/client/billing/renewalAttach/internal/preflight/owner.integration.test.ts +82 -0
- package/src/client/billing/renewalAttach/internal/preflight/preflight.integration.test.ts +354 -0
- package/src/client/billing/renewalAttach/internal/preflight/record.ts +127 -0
- package/src/client/billing/renewalAttach/internal/preflight/relations.ts +209 -0
- package/src/client/billing/renewalAttach/internal/recovery/material.ts +311 -0
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +136 -0
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +230 -0
- package/src/client/billing/renewalAttach/internal/recovery/recovery.integration.test.ts +463 -0
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +599 -0
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +175 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachEntries.ts +217 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachObservations.ts +226 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenario.ts +556 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioAssertions.ts +180 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/attachScenarioBarriers.ts +144 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightAssertions.ts +122 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightBarriers.ts +330 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightControls.ts +139 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configurePreflightOperation.ts +513 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadNativeBaseline.ts +344 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadOperation.ts +278 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureReadPort.ts +17 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteAssertions.ts +533 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteBarriers.ts +125 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteDeclarations.ts +314 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteHistory.ts +463 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteObservations.ts +515 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/configureWriteOperation.ts +600 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationAssertions.ts +211 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationDeclarations.ts +192 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationHTTP.ts +197 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationObservations.ts +269 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationOperation.ts +262 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/observationProbe.ts +319 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/ownedOperations.ts +94 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/sourceOperationPort.ts +16 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/stockHttp.ts +21 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { need, closed, freeze } from "../material/nodeKernel.js";
|
|
2
|
+
import { equal, referenceId } from "../../../renewalAggregate/shared.js";
|
|
3
|
+
function object(value) {
|
|
4
|
+
need(value !== null && typeof value === "object" && !Array.isArray(value));
|
|
5
|
+
return value;
|
|
6
|
+
}
|
|
7
|
+
const couponID = (id) => typeof id === "string" &&
|
|
8
|
+
id.length > 0 &&
|
|
9
|
+
id.length <= 255 &&
|
|
10
|
+
/\S/.test(id) &&
|
|
11
|
+
id !== "." &&
|
|
12
|
+
id !== "..";
|
|
13
|
+
/** Complete Coupon counterpart relation; no enriched body replaces retained raw JSON. */
|
|
14
|
+
function rebuild(b) {
|
|
15
|
+
const subscription = b.wireSubscription;
|
|
16
|
+
need(subscription &&
|
|
17
|
+
subscription.items &&
|
|
18
|
+
Array.isArray(subscription.items.data) &&
|
|
19
|
+
subscription.items.data.length === 1);
|
|
20
|
+
const lists = [subscription.discounts, subscription.items.data[0].discounts];
|
|
21
|
+
need(lists.every((x) => Array.isArray(x) && x.length <= 20));
|
|
22
|
+
need(Array.isArray(b.couponReads) && b.couponReads.length <= 40);
|
|
23
|
+
const ids = new Map();
|
|
24
|
+
const joined = lists.map((list) => list.map((discount, index) => {
|
|
25
|
+
need(discount && discount.source);
|
|
26
|
+
const ref = discount.source.coupon, id = typeof ref === "string" ? ref : ref?.id;
|
|
27
|
+
need(couponID(id));
|
|
28
|
+
if (!ids.has(id)) {
|
|
29
|
+
const i = ids.size, row = closed(b.couponReads[i], [
|
|
30
|
+
"couponId",
|
|
31
|
+
"wireCoupon",
|
|
32
|
+
"association",
|
|
33
|
+
]), association = closed(row.association, ["resource", "ordinal"]);
|
|
34
|
+
need(row.couponId === id &&
|
|
35
|
+
association.resource === "coupon" &&
|
|
36
|
+
association.ordinal === 4 + i);
|
|
37
|
+
const c = object(row.wireCoupon);
|
|
38
|
+
need(c.id === id && c.object === "coupon" && c.deleted !== true);
|
|
39
|
+
ids.set(id, i);
|
|
40
|
+
}
|
|
41
|
+
const couponReadIndex = ids.get(id);
|
|
42
|
+
need(couponReadIndex !== undefined);
|
|
43
|
+
const coupon = b.couponReads[couponReadIndex].wireCoupon;
|
|
44
|
+
need(typeof ref === "string" || equal(ref, coupon));
|
|
45
|
+
const joinedDiscount = {
|
|
46
|
+
...discount,
|
|
47
|
+
source: { ...discount.source, coupon },
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
index,
|
|
51
|
+
discountId: discount.id,
|
|
52
|
+
originalCouponReference: ref,
|
|
53
|
+
couponReadIndex,
|
|
54
|
+
joinedDiscount,
|
|
55
|
+
};
|
|
56
|
+
}));
|
|
57
|
+
need(ids.size === b.couponReads.length &&
|
|
58
|
+
equal(b.derivedCouponJoins, { subscription: joined[0], item: joined[1] }));
|
|
59
|
+
return {
|
|
60
|
+
subscription: joined[0].map((x) => x.joinedDiscount),
|
|
61
|
+
item: joined[1].map((x) => x.joinedDiscount),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** One explicit root schedule association transition, with all residual material equal. */
|
|
65
|
+
export function replayCouponEligibility(value) {
|
|
66
|
+
const p = value.attachRequest.preparation, original = value.originalBundle, current = value.currentBundle;
|
|
67
|
+
need(Object.prototype.hasOwnProperty.call(original.wireSubscription, "schedule") &&
|
|
68
|
+
original.wireSubscription.schedule === null &&
|
|
69
|
+
Object.prototype.hasOwnProperty.call(current.wireSubscription, "schedule") &&
|
|
70
|
+
current.wireSubscription.schedule !== null);
|
|
71
|
+
const { schedule: oldAssociation, ...oldResidual } = original.wireSubscription, { schedule: currentAssociation, ...currentResidual } = current.wireSubscription;
|
|
72
|
+
need(oldAssociation === null &&
|
|
73
|
+
equal(p.subscription, original.wireSubscription) &&
|
|
74
|
+
equal(oldResidual, currentResidual));
|
|
75
|
+
for (const [key, wire] of [
|
|
76
|
+
["targetPrice", "wireTargetPrice"],
|
|
77
|
+
["billingCustomer", "wireBillingCustomer"],
|
|
78
|
+
])
|
|
79
|
+
need(equal(p[key], original[wire]) && equal(original[wire], current[wire]));
|
|
80
|
+
rebuild(original);
|
|
81
|
+
const joined = rebuild(current);
|
|
82
|
+
need(equal(original.couponReads, current.couponReads));
|
|
83
|
+
const expected = p.expected, context = {
|
|
84
|
+
customerAccountId: expected.customerAccountId,
|
|
85
|
+
livemode: expected.livemode,
|
|
86
|
+
};
|
|
87
|
+
const scheduleId = referenceId(currentAssociation, "sub_sched", "subscription_schedule", context), customerId = referenceId(current.wireSubscription.customer, "cus", "customer", context);
|
|
88
|
+
function check(v, kind, depth) {
|
|
89
|
+
need(depth <= 40);
|
|
90
|
+
const prefix = kind === "customer"
|
|
91
|
+
? "cus"
|
|
92
|
+
: kind === "subscription"
|
|
93
|
+
? "sub"
|
|
94
|
+
: "sub_sched", id = kind === "customer"
|
|
95
|
+
? customerId
|
|
96
|
+
: kind === "subscription"
|
|
97
|
+
? expected.subscriptionId
|
|
98
|
+
: scheduleId;
|
|
99
|
+
need(referenceId(v, prefix, kind, context) === id);
|
|
100
|
+
if (typeof v === "string")
|
|
101
|
+
return;
|
|
102
|
+
const node = object(v);
|
|
103
|
+
need(!Object.prototype.hasOwnProperty.call(node, "deleted") ||
|
|
104
|
+
node.deleted === false);
|
|
105
|
+
if (kind !== "customer" &&
|
|
106
|
+
Object.prototype.hasOwnProperty.call(node, "customer"))
|
|
107
|
+
check(node.customer, "customer", depth + 1);
|
|
108
|
+
if (kind === "subscription" &&
|
|
109
|
+
Object.prototype.hasOwnProperty.call(node, "schedule"))
|
|
110
|
+
check(node.schedule, "subscription_schedule", depth + 1);
|
|
111
|
+
if (kind === "subscription_schedule" &&
|
|
112
|
+
Object.prototype.hasOwnProperty.call(node, "subscription"))
|
|
113
|
+
check(node.subscription, "subscription", depth + 1);
|
|
114
|
+
}
|
|
115
|
+
check(current.wireSubscription, "subscription", 0);
|
|
116
|
+
check(current.wireBillingCustomer, "customer", 0);
|
|
117
|
+
return freeze(joined);
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=relation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relation.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/recovery/relation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGzE,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,OAAO,KAAgC,CAAC;AAC1C,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAW,EAAgB,EAAE,CAC7C,OAAO,EAAE,KAAK,QAAQ;IACtB,EAAE,CAAC,MAAM,GAAG,CAAC;IACb,EAAE,CAAC,MAAM,IAAI,GAAG;IAChB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IACb,EAAE,KAAK,GAAG;IACV,EAAE,KAAK,IAAI,CAAC;AAEd,yFAAyF;AACzF,SAAS,OAAO,CAAC,CAAS;IACxB,MAAM,YAAY,GAAG,CAAC,CAAC,gBAAgB,CAAC;IACxC,IAAI,CACF,YAAY;QACV,YAAY,CAAC,KAAK;QAClB,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CACvC,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;I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c,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;YACpD,IAAI,CAAC,OAAO,KAAK,KAAK,CACzB,CAAC;QACF,IACE,IAAI,KAAK,UAAU;YACnB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;YAEtD,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QAC9C,IACE,IAAI,KAAK,cAAc;YACvB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;YAEtD,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,uBAAuB,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;QAC3D,IACE,IAAI,KAAK,uBAAuB;YAChC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC;YAE1D,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,cAAc,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;IACnD,KAAK,CAAC,OAAO,CAAC,mBAAmB,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -2360,6 +2360,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2360
2360
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2361
2361
|
requestKey: string;
|
|
2362
2362
|
result?: {
|
|
2363
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2364
|
+
retryable: false;
|
|
2365
|
+
status: "conflict";
|
|
2366
|
+
} | {
|
|
2367
|
+
reason: "policy_invalid";
|
|
2368
|
+
retryable: false;
|
|
2369
|
+
status: "rejected";
|
|
2370
|
+
} | {
|
|
2363
2371
|
operation: {
|
|
2364
2372
|
accountId: string;
|
|
2365
2373
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2370,14 +2378,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2370
2378
|
} | {
|
|
2371
2379
|
enabled: boolean;
|
|
2372
2380
|
status: "unchanged";
|
|
2373
|
-
} | {
|
|
2374
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2375
|
-
retryable: false;
|
|
2376
|
-
status: "conflict";
|
|
2377
|
-
} | {
|
|
2378
|
-
reason: "policy_invalid";
|
|
2379
|
-
retryable: false;
|
|
2380
|
-
status: "rejected";
|
|
2381
2381
|
} | {
|
|
2382
2382
|
reason: "provider_pending";
|
|
2383
2383
|
retryable: true;
|
|
@@ -2388,6 +2388,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2388
2388
|
payload: import("convex/values").VString<string, "required">;
|
|
2389
2389
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2390
2390
|
result: import("convex/values").VUnion<{
|
|
2391
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2392
|
+
retryable: false;
|
|
2393
|
+
status: "conflict";
|
|
2394
|
+
} | {
|
|
2395
|
+
reason: "policy_invalid";
|
|
2396
|
+
retryable: false;
|
|
2397
|
+
status: "rejected";
|
|
2398
|
+
} | {
|
|
2391
2399
|
operation: {
|
|
2392
2400
|
accountId: string;
|
|
2393
2401
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2398,14 +2406,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2398
2406
|
} | {
|
|
2399
2407
|
enabled: boolean;
|
|
2400
2408
|
status: "unchanged";
|
|
2401
|
-
} | {
|
|
2402
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2403
|
-
retryable: false;
|
|
2404
|
-
status: "conflict";
|
|
2405
|
-
} | {
|
|
2406
|
-
reason: "policy_invalid";
|
|
2407
|
-
retryable: false;
|
|
2408
|
-
status: "rejected";
|
|
2409
2409
|
} | {
|
|
2410
2410
|
reason: "provider_pending";
|
|
2411
2411
|
retryable: true;
|
|
@@ -7215,6 +7215,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7215
7215
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
7216
7216
|
requestKey: string;
|
|
7217
7217
|
result?: {
|
|
7218
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7219
|
+
retryable: false;
|
|
7220
|
+
status: "conflict";
|
|
7221
|
+
} | {
|
|
7222
|
+
reason: "policy_invalid";
|
|
7223
|
+
retryable: false;
|
|
7224
|
+
status: "rejected";
|
|
7225
|
+
} | {
|
|
7218
7226
|
operation: {
|
|
7219
7227
|
accountId: string;
|
|
7220
7228
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7225,14 +7233,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7225
7233
|
} | {
|
|
7226
7234
|
enabled: boolean;
|
|
7227
7235
|
status: "unchanged";
|
|
7228
|
-
} | {
|
|
7229
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7230
|
-
retryable: false;
|
|
7231
|
-
status: "conflict";
|
|
7232
|
-
} | {
|
|
7233
|
-
reason: "policy_invalid";
|
|
7234
|
-
retryable: false;
|
|
7235
|
-
status: "rejected";
|
|
7236
7236
|
} | {
|
|
7237
7237
|
reason: "provider_pending";
|
|
7238
7238
|
retryable: true;
|
|
@@ -7243,6 +7243,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7243
7243
|
payload: import("convex/values").VString<string, "required">;
|
|
7244
7244
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
7245
7245
|
result: import("convex/values").VUnion<{
|
|
7246
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7247
|
+
retryable: false;
|
|
7248
|
+
status: "conflict";
|
|
7249
|
+
} | {
|
|
7250
|
+
reason: "policy_invalid";
|
|
7251
|
+
retryable: false;
|
|
7252
|
+
status: "rejected";
|
|
7253
|
+
} | {
|
|
7246
7254
|
operation: {
|
|
7247
7255
|
accountId: string;
|
|
7248
7256
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7253,14 +7261,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7253
7261
|
} | {
|
|
7254
7262
|
enabled: boolean;
|
|
7255
7263
|
status: "unchanged";
|
|
7256
|
-
} | {
|
|
7257
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7258
|
-
retryable: false;
|
|
7259
|
-
status: "conflict";
|
|
7260
|
-
} | {
|
|
7261
|
-
reason: "policy_invalid";
|
|
7262
|
-
retryable: false;
|
|
7263
|
-
status: "rejected";
|
|
7264
7264
|
} | {
|
|
7265
7265
|
reason: "provider_pending";
|
|
7266
7266
|
retryable: true;
|
|
@@ -2361,14 +2361,6 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
2361
2361
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2362
2362
|
requestKey: string;
|
|
2363
2363
|
result?: {
|
|
2364
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2365
|
-
retryable: false;
|
|
2366
|
-
status: "conflict";
|
|
2367
|
-
} | {
|
|
2368
|
-
reason: "policy_invalid";
|
|
2369
|
-
retryable: false;
|
|
2370
|
-
status: "rejected";
|
|
2371
|
-
} | {
|
|
2372
2364
|
operation: {
|
|
2373
2365
|
accountId: string;
|
|
2374
2366
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2379,6 +2371,14 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
2379
2371
|
} | {
|
|
2380
2372
|
enabled: boolean;
|
|
2381
2373
|
status: "unchanged";
|
|
2374
|
+
} | {
|
|
2375
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2376
|
+
retryable: false;
|
|
2377
|
+
status: "conflict";
|
|
2378
|
+
} | {
|
|
2379
|
+
reason: "policy_invalid";
|
|
2380
|
+
retryable: false;
|
|
2381
|
+
status: "rejected";
|
|
2382
2382
|
} | {
|
|
2383
2383
|
reason: "provider_pending";
|
|
2384
2384
|
retryable: true;
|
|
@@ -2389,14 +2389,6 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
2389
2389
|
payload: import("convex/values").VString<string, "required">;
|
|
2390
2390
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2391
2391
|
result: import("convex/values").VUnion<{
|
|
2392
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2393
|
-
retryable: false;
|
|
2394
|
-
status: "conflict";
|
|
2395
|
-
} | {
|
|
2396
|
-
reason: "policy_invalid";
|
|
2397
|
-
retryable: false;
|
|
2398
|
-
status: "rejected";
|
|
2399
|
-
} | {
|
|
2400
2392
|
operation: {
|
|
2401
2393
|
accountId: string;
|
|
2402
2394
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2407,6 +2399,14 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
2407
2399
|
} | {
|
|
2408
2400
|
enabled: boolean;
|
|
2409
2401
|
status: "unchanged";
|
|
2402
|
+
} | {
|
|
2403
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2404
|
+
retryable: false;
|
|
2405
|
+
status: "conflict";
|
|
2406
|
+
} | {
|
|
2407
|
+
reason: "policy_invalid";
|
|
2408
|
+
retryable: false;
|
|
2409
|
+
status: "rejected";
|
|
2410
2410
|
} | {
|
|
2411
2411
|
reason: "provider_pending";
|
|
2412
2412
|
retryable: true;
|
|
@@ -9,6 +9,17 @@ export declare const bridge: import("convex/server").RegisteredAction<"internal"
|
|
|
9
9
|
stripeSubscriptionId: string;
|
|
10
10
|
version: number;
|
|
11
11
|
}, Promise<{
|
|
12
|
+
status: "ready";
|
|
13
|
+
value: {
|
|
14
|
+
customerAccount: string;
|
|
15
|
+
enabled?: boolean | undefined;
|
|
16
|
+
paymentMethodId: string | null;
|
|
17
|
+
paymentMethodTypes?: string[] | null | undefined;
|
|
18
|
+
phase: "apply" | "attach" | "create";
|
|
19
|
+
providerApiVersion: string;
|
|
20
|
+
stripeSubscriptionId: string;
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
12
23
|
reason: "history_incomplete" | "provider_outcome_unknown";
|
|
13
24
|
retryable: false;
|
|
14
25
|
status: "unknown";
|
|
@@ -24,16 +35,5 @@ export declare const bridge: import("convex/server").RegisteredAction<"internal"
|
|
|
24
35
|
reason: "provider_pending";
|
|
25
36
|
retryable: true;
|
|
26
37
|
status: "not_ready";
|
|
27
|
-
} | {
|
|
28
|
-
status: "ready";
|
|
29
|
-
value: {
|
|
30
|
-
customerAccount: string;
|
|
31
|
-
enabled?: boolean | undefined;
|
|
32
|
-
paymentMethodId: string | null;
|
|
33
|
-
paymentMethodTypes?: string[] | null | undefined;
|
|
34
|
-
phase: "apply" | "attach" | "create";
|
|
35
|
-
providerApiVersion: string;
|
|
36
|
-
stripeSubscriptionId: string;
|
|
37
|
-
};
|
|
38
38
|
}>>;
|
|
39
39
|
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -22,6 +22,14 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
|
|
|
22
22
|
requestKey: string;
|
|
23
23
|
scopeKey: string;
|
|
24
24
|
}, Promise<{
|
|
25
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
26
|
+
retryable: false;
|
|
27
|
+
status: "conflict";
|
|
28
|
+
} | {
|
|
29
|
+
reason: "policy_invalid";
|
|
30
|
+
retryable: false;
|
|
31
|
+
status: "rejected";
|
|
32
|
+
} | {
|
|
25
33
|
operation: {
|
|
26
34
|
accountId: string;
|
|
27
35
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -32,14 +40,6 @@ export declare const begin: import("convex/server").RegisteredMutation<"public",
|
|
|
32
40
|
} | {
|
|
33
41
|
enabled: boolean;
|
|
34
42
|
status: "unchanged";
|
|
35
|
-
} | {
|
|
36
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
37
|
-
retryable: false;
|
|
38
|
-
status: "conflict";
|
|
39
|
-
} | {
|
|
40
|
-
reason: "policy_invalid";
|
|
41
|
-
retryable: false;
|
|
42
|
-
status: "rejected";
|
|
43
43
|
} | {
|
|
44
44
|
reason: "provider_pending";
|
|
45
45
|
retryable: true;
|
|
@@ -395,6 +395,14 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
|
|
|
395
395
|
requestKey: string;
|
|
396
396
|
scopeKey: string;
|
|
397
397
|
}, Promise<{
|
|
398
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
399
|
+
retryable: false;
|
|
400
|
+
status: "conflict";
|
|
401
|
+
} | {
|
|
402
|
+
reason: "policy_invalid";
|
|
403
|
+
retryable: false;
|
|
404
|
+
status: "rejected";
|
|
405
|
+
} | {
|
|
398
406
|
operation: {
|
|
399
407
|
accountId: string;
|
|
400
408
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -405,14 +413,6 @@ export declare const prepare: import("convex/server").RegisteredMutation<"public
|
|
|
405
413
|
} | {
|
|
406
414
|
enabled: boolean;
|
|
407
415
|
status: "unchanged";
|
|
408
|
-
} | {
|
|
409
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
410
|
-
retryable: false;
|
|
411
|
-
status: "conflict";
|
|
412
|
-
} | {
|
|
413
|
-
reason: "policy_invalid";
|
|
414
|
-
retryable: false;
|
|
415
|
-
status: "rejected";
|
|
416
416
|
} | {
|
|
417
417
|
reason: "provider_pending";
|
|
418
418
|
retryable: true;
|
|
@@ -2,6 +2,14 @@ import type { Infer } from "convex/values";
|
|
|
2
2
|
import type { MutationCtx } from "../_generated/server.js";
|
|
3
3
|
import { prepareArgs, finishPreparationArgs } from "./mutationValidators.js";
|
|
4
4
|
export declare function prepareHandler(ctx: MutationCtx, args: Infer<typeof prepareArgs>): Promise<{
|
|
5
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
6
|
+
retryable: false;
|
|
7
|
+
status: "conflict";
|
|
8
|
+
} | {
|
|
9
|
+
reason: "policy_invalid";
|
|
10
|
+
retryable: false;
|
|
11
|
+
status: "rejected";
|
|
12
|
+
} | {
|
|
5
13
|
operation: {
|
|
6
14
|
accountId: string;
|
|
7
15
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -12,14 +20,6 @@ export declare function prepareHandler(ctx: MutationCtx, args: Infer<typeof prep
|
|
|
12
20
|
} | {
|
|
13
21
|
enabled: boolean;
|
|
14
22
|
status: "unchanged";
|
|
15
|
-
} | {
|
|
16
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
17
|
-
retryable: false;
|
|
18
|
-
status: "conflict";
|
|
19
|
-
} | {
|
|
20
|
-
reason: "policy_invalid";
|
|
21
|
-
retryable: false;
|
|
22
|
-
status: "rejected";
|
|
23
23
|
} | {
|
|
24
24
|
reason: "provider_pending";
|
|
25
25
|
retryable: true;
|
|
@@ -163,10 +163,10 @@ export declare const snapshot: import("convex/server").RegisteredQuery<"public",
|
|
|
163
163
|
accountId: string;
|
|
164
164
|
ownerKey: string;
|
|
165
165
|
}, Promise<{
|
|
166
|
-
transfers?: undefined;
|
|
167
|
-
claims?: undefined;
|
|
168
166
|
status: "held";
|
|
169
167
|
reason: "snapshot_limit";
|
|
168
|
+
transfers?: undefined;
|
|
169
|
+
claims?: undefined;
|
|
170
170
|
} | {
|
|
171
171
|
reason?: undefined;
|
|
172
172
|
status: "ready";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/component/payoutRelease/queries.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAiBd,CAAC;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BlB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;GAQf,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,QAAQ;;;;YAsBE,MAAM;YAAmB,gBAAgB;;;;;YAS3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE1B,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare function checkRollback(ctx: MutationCtx, op: Doc<"processingCostR
|
|
|
14
14
|
readonly bindFunding?: undefined;
|
|
15
15
|
} | {
|
|
16
16
|
reason?: undefined;
|
|
17
|
-
retryable?: undefined;
|
|
17
|
+
readonly retryable?: undefined;
|
|
18
18
|
readonly status: "ready";
|
|
19
19
|
readonly bindFunding: boolean;
|
|
20
20
|
}>;
|
|
@@ -2351,14 +2351,6 @@ export declare function setupAllowance(): Promise<{
|
|
|
2351
2351
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2352
2352
|
requestKey: string;
|
|
2353
2353
|
result?: {
|
|
2354
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2355
|
-
retryable: false;
|
|
2356
|
-
status: "conflict";
|
|
2357
|
-
} | {
|
|
2358
|
-
reason: "policy_invalid";
|
|
2359
|
-
retryable: false;
|
|
2360
|
-
status: "rejected";
|
|
2361
|
-
} | {
|
|
2362
2354
|
operation: {
|
|
2363
2355
|
accountId: string;
|
|
2364
2356
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2369,6 +2361,14 @@ export declare function setupAllowance(): Promise<{
|
|
|
2369
2361
|
} | {
|
|
2370
2362
|
enabled: boolean;
|
|
2371
2363
|
status: "unchanged";
|
|
2364
|
+
} | {
|
|
2365
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2366
|
+
retryable: false;
|
|
2367
|
+
status: "conflict";
|
|
2368
|
+
} | {
|
|
2369
|
+
reason: "policy_invalid";
|
|
2370
|
+
retryable: false;
|
|
2371
|
+
status: "rejected";
|
|
2372
2372
|
} | {
|
|
2373
2373
|
reason: "provider_pending";
|
|
2374
2374
|
retryable: true;
|
|
@@ -2379,14 +2379,6 @@ export declare function setupAllowance(): Promise<{
|
|
|
2379
2379
|
payload: import("convex/values").VString<string, "required">;
|
|
2380
2380
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2381
2381
|
result: import("convex/values").VUnion<{
|
|
2382
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2383
|
-
retryable: false;
|
|
2384
|
-
status: "conflict";
|
|
2385
|
-
} | {
|
|
2386
|
-
reason: "policy_invalid";
|
|
2387
|
-
retryable: false;
|
|
2388
|
-
status: "rejected";
|
|
2389
|
-
} | {
|
|
2390
2382
|
operation: {
|
|
2391
2383
|
accountId: string;
|
|
2392
2384
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2397,6 +2389,14 @@ export declare function setupAllowance(): Promise<{
|
|
|
2397
2389
|
} | {
|
|
2398
2390
|
enabled: boolean;
|
|
2399
2391
|
status: "unchanged";
|
|
2392
|
+
} | {
|
|
2393
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2394
|
+
retryable: false;
|
|
2395
|
+
status: "conflict";
|
|
2396
|
+
} | {
|
|
2397
|
+
reason: "policy_invalid";
|
|
2398
|
+
retryable: false;
|
|
2399
|
+
status: "rejected";
|
|
2400
2400
|
} | {
|
|
2401
2401
|
reason: "provider_pending";
|
|
2402
2402
|
retryable: true;
|
|
@@ -49,12 +49,27 @@ changing its receiver, arguments, result or thrown value. The owner checks the
|
|
|
49
49
|
same original wall and monotonic time bounds and closes permanently on expiry,
|
|
50
50
|
regression or retirement. These modules do not read a clock at import time.
|
|
51
51
|
|
|
52
|
-
The
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
The internal initial-attachment and explicit-recovery actors compose these
|
|
53
|
+
guards with the raw reader and event continuations. Each captured invocation is
|
|
54
|
+
single-use. Before acquisition, an actor checks the exact Source operation,
|
|
55
|
+
read-plan and delegate identities and the complete locally rebuilt attachment
|
|
56
|
+
request. Retained and fresh coverage require literal `true` from their selected
|
|
57
|
+
entry predicates.
|
|
58
|
+
|
|
59
|
+
An admitted invocation has a distinct transport pair with at most 43 GETs and
|
|
60
|
+
one creation POST. Dispatch, safe response and receipt events each require
|
|
61
|
+
send completion and a matching acknowledgement. Explicit unknown recovery
|
|
62
|
+
retains the original request, key, first-dispatch time and owner, while using a
|
|
63
|
+
new transport pair. An observed Schedule remains unowned evidence; matching its
|
|
64
|
+
shape never substitutes for the acknowledged creation response. Complete
|
|
65
|
+
acknowledged results pass bounded JSON admission before the final owner check.
|
|
66
|
+
|
|
67
|
+
The compiled registries remain empty, and the original Source and stock client
|
|
68
|
+
bindings remain unbound. Normal actor invocation refuses before Source access;
|
|
69
|
+
there is no package-root export or qualified operational entry. These internal
|
|
70
|
+
Node-only mechanics establish no provider custody or native qualification and
|
|
71
|
+
expose no caller-supplied clock, client or qualification API. The public
|
|
72
|
+
preparation and receipt constructors are unchanged.
|
|
58
73
|
|
|
59
74
|
## Internal initial material consistency
|
|
60
75
|
|
|
@@ -333,8 +348,11 @@ does not authenticate a response, prove that a POST succeeded, establish
|
|
|
333
348
|
ownership, qualify a provider profile or authorize configuration. A coherent
|
|
334
349
|
unsigned forgery can pass. No transport status or observation time is invented.
|
|
335
350
|
Hosts must separately establish acknowledgement provenance and preserve the
|
|
336
|
-
original records. Existing V1 configure and receipt consumers still reject V2
|
|
337
|
-
|
|
351
|
+
original records. Existing V1 configure and receipt consumers still reject V2.
|
|
352
|
+
There is no public migration or V2 configure executor. The internal configure
|
|
353
|
+
writer has empty Source bindings and requires separate operation, transport and
|
|
354
|
+
custody qualification before it can be enabled; see
|
|
355
|
+
[renewal phase assembly](renewal-phase-assembly.md#internal-configure-dispatch-and-explicit-replay).
|
|
338
356
|
|
|
339
357
|
These helpers retain ordinary provider and caller metadata within their JSON
|
|
340
358
|
limits. They do not redact, encrypt or certify that input or output is safe to
|
|
@@ -122,3 +122,40 @@ about whole-process memory or other SDK methods. Invalid raw capture rejects wit
|
|
|
122
122
|
a fixed error; safe but insufficient material returns `unknown` or `conflict`
|
|
123
123
|
with a fixed reason. No raw provider error is logged or returned. The host remains
|
|
124
124
|
responsible for retaining its immutable request and response data when reads fail.
|
|
125
|
+
|
|
126
|
+
## Internal owned observation without a configure acknowledgement
|
|
127
|
+
|
|
128
|
+
`captureOwnedRenewalObservationV2` is internal; each captured handle permits one
|
|
129
|
+
invocation. Its fixed Source must bind the original Owner and origin, original
|
|
130
|
+
attachment entry and actual acknowledged attachment receipt identity to a distinct
|
|
131
|
+
observation entry. Reconstructing equal receipt data cannot establish that
|
|
132
|
+
association. The normal registry is empty and its loader unbound. There is no
|
|
133
|
+
public execution export or caller-supplied Owner, client or Source context.
|
|
134
|
+
|
|
135
|
+
After bounded record capture, the original configuration projection runs first.
|
|
136
|
+
A supported Failure returns the same object before the actor's explicit receipt
|
|
137
|
+
proof, classification or reads. Success requires the complete retained record and
|
|
138
|
+
attachment proof, original entry coverage and a live original Owner.
|
|
139
|
+
|
|
140
|
+
The read order is Schedule, expanded Subscription, target Price, billing Customer,
|
|
141
|
+
then unique Coupon IDs across the original and current subscription and item
|
|
142
|
+
discounts. Two distinct Coupon IDs give six GETs; the union permits at most 40
|
|
143
|
+
Coupons and 44 GETs. Complete bare response bodies and ordinary unknown fields are
|
|
144
|
+
retained. This invocation makes no POST, calls no configure-receipt constructor
|
|
145
|
+
and appends no C10 events.
|
|
146
|
+
|
|
147
|
+
`owned_observation_data` contains `observation`, `reads`, the final read's
|
|
148
|
+
`observedAt`, `retainedConfigureAcknowledgement: "absent"` and
|
|
149
|
+
`operationalAuthority: false`. The complete pure-helper result is preserved.
|
|
150
|
+
Record, observer input and result each remain within 500000 serialized characters
|
|
151
|
+
and UTF-8 bytes, 10000 nodes counting repeated occurrences, and depth 40. The
|
|
152
|
+
result is detached and frozen before its final Owner check. Owner checks guard
|
|
153
|
+
settled continuations; they do not promise immediate cancellation of pending HTTP.
|
|
154
|
+
|
|
155
|
+
This branch requires `configureAcknowledgement` to be absent. The public pure
|
|
156
|
+
helper's optional `configureReceipt` remains a separate input. The internal branch
|
|
157
|
+
does not widen the helper's absent-response pending/effective classes or
|
|
158
|
+
invoice-pointer limitation. Historical configure-response custody, successor
|
|
159
|
+
invoice evidence, genuine Source binding and provider qualification remain
|
|
160
|
+
separate requirements. These sequential reads do not atomically exclude other
|
|
161
|
+
provider writers or establish payment, authentication or entitlement.
|