@fantastic.dev/better-stripe 0.98.0 → 0.100.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 +12 -0
- package/README.md +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts +6 -0
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js +1 -1
- package/dist/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts +22 -0
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js +13 -5
- package/dist/client/billing/renewalAttach/internal/c10/attachEvents.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts +17 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js +140 -0
- package/dist/client/billing/renewalAttach/internal/operations/actorFailureControl.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts +9 -11
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js +3 -380
- package/dist/client/billing/renewalAttach/internal/operations/fixedTransport.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts +146 -0
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js +90 -139
- package/dist/client/billing/renewalAttach/internal/operations/initialAttach.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts +63 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js +380 -0
- package/dist/client/billing/renewalAttach/internal/operations/transportKernel.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.d.ts +10 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/attachAcknowledgement.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts +4 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js +12 -0
- package/dist/client/billing/renewalAttach/internal/producer/invocationProducer.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts +56 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js +49 -0
- package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js +3 -2
- package/dist/client/billing/renewalAttach/internal/producer/operationFactory.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts +13 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js +109 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryEntry.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts +368 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js +106 -0
- package/dist/client/billing/renewalAttach/internal/producer/recoveryFactory.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/output.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/output.js +22 -8
- package/dist/client/billing/renewalAttach/internal/recovery/output.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts +1 -0
- package/dist/client/billing/renewalAttach/internal/recovery/record.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/record.js +10 -2
- package/dist/client/billing/renewalAttach/internal/recovery/record.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts +12 -0
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js +96 -156
- package/dist/client/billing/renewalAttach/internal/recovery/recoveryActor.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts +18 -0
- package/dist/client/billing/renewalAttach/internal/recovery/relation.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js +15 -1
- package/dist/client/billing/renewalAttach/internal/recovery/relation.js.map +1 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +32 -32
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +32 -32
- package/dist/component/balanceFunding/mutations.d.ts +27 -27
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/queries.d.ts +1 -1
- package/dist/component/usage/allowance.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +67 -3
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/acquisition/ownedAcquisition.ts +3 -3
- package/src/client/billing/renewalAttach/internal/c10/attachEvents.ts +17 -5
- package/src/client/billing/renewalAttach/internal/operations/actorFailureControl.ts +165 -0
- package/src/client/billing/renewalAttach/internal/operations/fixedTransport.ts +4 -498
- package/src/client/billing/renewalAttach/internal/operations/initialAttach.ts +110 -160
- package/src/client/billing/renewalAttach/internal/operations/transportKernel.ts +500 -0
- package/src/client/billing/renewalAttach/internal/producer/attachAcknowledgement.ts +65 -0
- package/src/client/billing/renewalAttach/internal/producer/invocationProducer.ts +14 -0
- package/src/client/billing/renewalAttach/internal/producer/journalWorkFactory.ts +54 -0
- package/src/client/billing/renewalAttach/internal/producer/operationFactory.ts +3 -2
- package/src/client/billing/renewalAttach/internal/producer/producerAcknowledgement.integration.test.ts +320 -0
- package/src/client/billing/renewalAttach/internal/producer/producerAcknowledgementControls.integration.test.ts +411 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecovery.integration.test.ts +394 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryControls.integration.test.ts +437 -0
- package/src/client/billing/renewalAttach/internal/producer/producerRecoveryIsolation.integration.test.ts +332 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts +143 -0
- package/src/client/billing/renewalAttach/internal/producer/recoveryFactory.ts +135 -0
- package/src/client/billing/renewalAttach/internal/recovery/output.ts +34 -8
- package/src/client/billing/renewalAttach/internal/recovery/record.ts +16 -2
- package/src/client/billing/renewalAttach/internal/recovery/recoveryActor.ts +146 -188
- package/src/client/billing/renewalAttach/internal/recovery/relation.ts +17 -1
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +14 -1
|
@@ -43,7 +43,7 @@ export declare function operationForInitialLineage(token: object): Promise<Reado
|
|
|
43
43
|
rawRequest: import("stripe").Stripe["rawRequest"];
|
|
44
44
|
}>;
|
|
45
45
|
sink: Readonly<{
|
|
46
|
-
send(record: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[0], ack: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[1]): Promise<void>;
|
|
46
|
+
send(record: Parameters<(record: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[0], ack: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[1]) => Promise<void>>[0], ack: Parameters<(record: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[0], ack: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[1]) => Promise<void>>[1]): Promise<void>;
|
|
47
47
|
}>;
|
|
48
48
|
}>;
|
|
49
49
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationFactory.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/operationFactory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"operationFactory.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/operationFactory.ts"],"names":[],"mappings":"AAgHA,qFAAqF;AACrF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;8BAtClC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;yBAYd,UAAU,wRAAa,CAAC,CAAC,CAAC,OAAO,UAAU,wRAAa,CAAC,CAAC,CAAC;;;IA6C3E;AAED,4EAA4E;AAC5E,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO;;;;;;;;;;;;;GAsCjB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { readInitialLineage } from "./lineageAuthority.js";
|
|
2
|
+
import { journalWorkForInitialLineage } from "./journalWorkFactory.js";
|
|
2
3
|
import { ownerForInitialLineage } from "./ownerFactory.js";
|
|
3
4
|
import { ownedAwaitForInitialLineage } from "./ownedAwaitFactory.js";
|
|
4
5
|
import { captureInitialStockRawDelegate } from "./stockDelegateFactory.js";
|
|
@@ -59,7 +60,7 @@ async function construct(token) {
|
|
|
59
60
|
}),
|
|
60
61
|
})));
|
|
61
62
|
const delegate = captureInitialStockRawDelegate(token);
|
|
62
|
-
const send =
|
|
63
|
+
const send = journalWorkForInitialLineage(token).captureSend();
|
|
63
64
|
let spent = false;
|
|
64
65
|
const slot = Object.freeze({
|
|
65
66
|
takeOnce(...args) {
|
|
@@ -142,7 +143,7 @@ export async function retainInitialReceiptForLineage(token, receipt) {
|
|
|
142
143
|
if (typeof binding !== "string")
|
|
143
144
|
stop();
|
|
144
145
|
const receiptJSON = JSON.stringify(materialize(receiptNode));
|
|
145
|
-
const retained = await owned(() =>
|
|
146
|
+
const retained = await owned(() => journalWorkForInitialLineage(token).retain({
|
|
146
147
|
attemptId: lineage.reservation.attemptId,
|
|
147
148
|
expectedSequence: 2,
|
|
148
149
|
receiptJSON,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationFactory.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/operationFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,SAAS,IAAI;IACX,MAAM,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC3C,CAAC;AACD,MAAM,UAAU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G,GAAG,KAAK;SACzE;QACD;YACE,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;SACzD;QACD,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,gBAAgB,GAAG,QAAQ,CAAC,EAAE,EAAE;QAC9D,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACjD,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ;gBAAE,IAAI,EAAE,CAAC;YAC7C,OAAO;gBACL,QAAQ,EAAE,QAAQ;gBAClB,IAAI,EAAE,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC;aACxD,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC5B,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CACtB,MAAM,CAAC,MAAM,CAAC;QACZ,GAAG,GAAG;QACN,OAAO,EAAE,KAAK,GAAG,CAAC;QAClB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;YACrB,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,iBAAiB,EAAE,CAAC;SACrB,CAAC;KACH,CAAC,CACH,CACF,CAAC;IACF,MAAM,QAAQ,GAAG,8BAA8B,CAAC,KAAK,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"operationFactory.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/operationFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,sBAAs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AW,CAAC,SAAS;QACpD,QAAQ,CAAC,eAAe,KAAK,OAAO,CAAC,WAAW,CAAC,SAAS;QAC1D,QAAQ,CAAC,cAAc,KAAK,OAAO;QAEnC,IAAI,EAAE,CAAC;IACT,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SourceMethod } from "../operations/types.js";
|
|
2
|
+
/** Actual no-POST acknowledgement completion only, not a retained receipt lookup. */
|
|
3
|
+
export declare function readResumedAttachAcknowledgement(token: object): Readonly<{
|
|
4
|
+
originalEntry: unknown;
|
|
5
|
+
retainedPredicate: SourceMethod;
|
|
6
|
+
freshPredicate: SourceMethod;
|
|
7
|
+
output: unknown;
|
|
8
|
+
receipt: unknown;
|
|
9
|
+
}> | null;
|
|
10
|
+
export declare function captureLiveAttachRecovery(token: object): Readonly<{
|
|
11
|
+
invoke(): Promise<unknown>;
|
|
12
|
+
}>;
|
|
13
|
+
//# sourceMappingURL=recoveryEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recoveryEntry.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts"],"names":[],"mappings":"AAaA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAgBnE,qFAAqF;AACrF,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,MAAM;mBAR3C,OAAO;uBACH,YAAY;oBACf,YAAY;YACpB,OAAO;aACN,OAAO;UAWnB;AAGD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM;;GAStD"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { readInitialLineage } from "./lineageAuthority.js";
|
|
3
|
+
import { ownerForInitialLineage } from "./ownerFactory.js";
|
|
4
|
+
import { ownedAwaitForInitialLineage } from "./ownedAwaitFactory.js";
|
|
5
|
+
import { recoveryOperationForLineage } from "./recoveryFactory.js";
|
|
6
|
+
import { captureExplicitAttachRecoveryForLineage } from "../recovery/recoveryActor.js";
|
|
7
|
+
import { COMPILED_RECOVERY_ENTRIES } from "../operations/sourceOperations.js";
|
|
8
|
+
import { need, refuse, seven, sourceMethod, } from "../operations/initialActorData.js";
|
|
9
|
+
import { closed } from "../operations/types.js";
|
|
10
|
+
import { createRecoveryAttachEventCompiler } from "../c10/attachEvents.js";
|
|
11
|
+
import { constructRenewalScheduleAttachmentReceiptV2 as c3 } from "../../../renewalV2/index.js";
|
|
12
|
+
import { retainInitialReceiptForLineage } from "./operationFactory.js";
|
|
13
|
+
import { admitInitialOutput } from "../recovery/material.js";
|
|
14
|
+
const returnedAcknowledgements = new WeakMap();
|
|
15
|
+
/** Actual no-POST acknowledgement completion only, not a retained receipt lookup. */
|
|
16
|
+
export function readResumedAttachAcknowledgement(token) {
|
|
17
|
+
need(arguments.length === 1);
|
|
18
|
+
readInitialLineage(token);
|
|
19
|
+
const actual = returnedAcknowledgements.get(token);
|
|
20
|
+
if (!actual)
|
|
21
|
+
return null;
|
|
22
|
+
ownerForInitialLineage(token).check();
|
|
23
|
+
return actual;
|
|
24
|
+
}
|
|
25
|
+
const actors = new WeakMap();
|
|
26
|
+
export function captureLiveAttachRecovery(token) {
|
|
27
|
+
need(arguments.length === 1);
|
|
28
|
+
readInitialLineage(token);
|
|
29
|
+
let actor = actors.get(token);
|
|
30
|
+
if (!actor) {
|
|
31
|
+
actor = construct(token);
|
|
32
|
+
actors.set(token, actor);
|
|
33
|
+
}
|
|
34
|
+
return actor;
|
|
35
|
+
}
|
|
36
|
+
function construct(token) {
|
|
37
|
+
let consumed = false;
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
async invoke() {
|
|
40
|
+
need(arguments.length === 0);
|
|
41
|
+
if (consumed)
|
|
42
|
+
return refuse("invocation_consumed");
|
|
43
|
+
consumed = true;
|
|
44
|
+
need(Array.isArray(COMPILED_RECOVERY_ENTRIES) &&
|
|
45
|
+
!types.isProxy(COMPILED_RECOVERY_ENTRIES));
|
|
46
|
+
if (COMPILED_RECOVERY_ENTRIES.length === 0)
|
|
47
|
+
return refuse("no_qualified_recovery_class");
|
|
48
|
+
const owner = ownerForInitialLineage(token);
|
|
49
|
+
owner.check();
|
|
50
|
+
// This consumes actual attempt custody synchronously, before any await.
|
|
51
|
+
const frame = await recoveryOperationForLineage(token);
|
|
52
|
+
const snapshot = frame.snapshot;
|
|
53
|
+
need(sourceMethod(snapshot.entry, "coversRetained") ===
|
|
54
|
+
snapshot.retainedPredicate);
|
|
55
|
+
need(sourceMethod(snapshot.entry, "coversFresh") === snapshot.freshPredicate);
|
|
56
|
+
const relations = COMPILED_RECOVERY_ENTRIES.filter((value) => {
|
|
57
|
+
const relation = closed(value, ["originalEntry", "coversReplay"]);
|
|
58
|
+
sourceMethod(value, "coversReplay");
|
|
59
|
+
return relation.originalEntry === snapshot.entry;
|
|
60
|
+
});
|
|
61
|
+
need(relations.length === 1);
|
|
62
|
+
if (snapshot.response === null)
|
|
63
|
+
return captureExplicitAttachRecoveryForLineage(token).invoke();
|
|
64
|
+
const response = snapshot.response;
|
|
65
|
+
const owned = ownedAwaitForInitialLineage(token);
|
|
66
|
+
const compiler = createRecoveryAttachEventCompiler(token);
|
|
67
|
+
owner.check();
|
|
68
|
+
await owned(() => compiler.dispatch({
|
|
69
|
+
event: "dispatch",
|
|
70
|
+
stage: "attach",
|
|
71
|
+
request: snapshot.request,
|
|
72
|
+
}));
|
|
73
|
+
await owned(() => compiler.response({
|
|
74
|
+
event: "response",
|
|
75
|
+
stage: "attach",
|
|
76
|
+
request: snapshot.request,
|
|
77
|
+
body: response.body,
|
|
78
|
+
status: response.status,
|
|
79
|
+
}));
|
|
80
|
+
const receipt = await owned(() => c3({
|
|
81
|
+
attachRequest: snapshot.raw,
|
|
82
|
+
actualDispatch: seven(snapshot.request),
|
|
83
|
+
providerSnapshot: response.body,
|
|
84
|
+
}));
|
|
85
|
+
await owned(() => retainInitialReceiptForLineage(token, receipt));
|
|
86
|
+
await owned(() => compiler.receipt({
|
|
87
|
+
event: "receipt",
|
|
88
|
+
stage: "attach",
|
|
89
|
+
request: snapshot.request,
|
|
90
|
+
receipt,
|
|
91
|
+
}));
|
|
92
|
+
const admitted = admitInitialOutput(receipt, snapshot.prepared, snapshot.request);
|
|
93
|
+
owner.check();
|
|
94
|
+
returnedAcknowledgements.set(token, Object.freeze({
|
|
95
|
+
originalEntry: snapshot.entry,
|
|
96
|
+
retainedPredicate: snapshot.retainedPredicate,
|
|
97
|
+
freshPredicate: snapshot.freshPredicate,
|
|
98
|
+
output: admitted,
|
|
99
|
+
receipt: closed(admitted, [
|
|
100
|
+
"status",
|
|
101
|
+
"operationalAuthority",
|
|
102
|
+
"receipt",
|
|
103
|
+
]).receipt,
|
|
104
|
+
}));
|
|
105
|
+
return admitted;
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=recoveryEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recoveryEntry.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/recoveryEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EACL,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,GACb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAqB,MAAM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AAO,EACP,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,OAAO,CACjB,CAAC;YACF,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,wBAAwB,CAAC,GAAG,CAC1B,KAAK,EACL,MAAM,CAAC,MAAM,CAAC;gBACZ,aAAa,EAAE,QAAQ,CAAC,KAAK;gBAC7B,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;gBAC7C,cAAc,EAAE,QAAQ,CAAC,cAAc;gBACvC,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE;oBACxB,QAAQ;oBACR,sBAAsB;oBACtB,SAAS;iBACV,CAAC,CAAC,OAAO;aACX,CAAC,CACH,CAAC;YACF,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/** One reservation of actual initial custody, synchronously before construction awaits. */
|
|
2
|
+
export declare function recoveryOperationForLineage(token: object): Promise<Readonly<{
|
|
3
|
+
snapshot: Readonly<{
|
|
4
|
+
entry: unknown;
|
|
5
|
+
retainedPredicate: import("../operations/types.js").SourceMethod;
|
|
6
|
+
freshPredicate: import("../operations/types.js").SourceMethod;
|
|
7
|
+
originalRecord: unknown;
|
|
8
|
+
raw: import("../material/capture.js").AttachRaw;
|
|
9
|
+
prepared: Omit<{
|
|
10
|
+
version: 1;
|
|
11
|
+
scope: "platform";
|
|
12
|
+
expected: {
|
|
13
|
+
customerAccountId: string;
|
|
14
|
+
subscriptionId: string;
|
|
15
|
+
itemId: string;
|
|
16
|
+
currentPriceId: string;
|
|
17
|
+
currentProductId: string;
|
|
18
|
+
targetPriceId: string;
|
|
19
|
+
targetProductId: string;
|
|
20
|
+
periodStart: number;
|
|
21
|
+
periodEnd: number;
|
|
22
|
+
livemode: boolean;
|
|
23
|
+
};
|
|
24
|
+
quantity: number;
|
|
25
|
+
providerSnapshot: {
|
|
26
|
+
subscription: {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
id: string;
|
|
29
|
+
object: "subscription";
|
|
30
|
+
customer_account: string;
|
|
31
|
+
status: "active";
|
|
32
|
+
currency: string;
|
|
33
|
+
livemode: boolean;
|
|
34
|
+
schedule: null;
|
|
35
|
+
cancel_at: null;
|
|
36
|
+
cancel_at_period_end: false;
|
|
37
|
+
pause_collection: null;
|
|
38
|
+
pending_update: null;
|
|
39
|
+
default_source: null;
|
|
40
|
+
application_fee_percent: null;
|
|
41
|
+
payment_settings: {
|
|
42
|
+
payment_method_options: null;
|
|
43
|
+
payment_method_types: null;
|
|
44
|
+
save_default_payment_method: "off" | null;
|
|
45
|
+
} | null;
|
|
46
|
+
billing_schedules?: unknown[] | undefined;
|
|
47
|
+
items: {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
has_more: false;
|
|
50
|
+
data: [{
|
|
51
|
+
[x: string]: unknown;
|
|
52
|
+
id: string;
|
|
53
|
+
object: "subscription_item";
|
|
54
|
+
subscription: string;
|
|
55
|
+
current_period_start: number;
|
|
56
|
+
current_period_end: number;
|
|
57
|
+
quantity: number;
|
|
58
|
+
price: {
|
|
59
|
+
[x: string]: unknown;
|
|
60
|
+
id: string;
|
|
61
|
+
object: "price";
|
|
62
|
+
product: string | {
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
id: string;
|
|
65
|
+
object: "product";
|
|
66
|
+
deleted?: false | undefined;
|
|
67
|
+
};
|
|
68
|
+
active: boolean;
|
|
69
|
+
livemode: boolean;
|
|
70
|
+
type: "recurring";
|
|
71
|
+
currency: string;
|
|
72
|
+
billing_scheme: "per_unit";
|
|
73
|
+
recurring: {
|
|
74
|
+
[x: string]: unknown;
|
|
75
|
+
interval: "day" | "month" | "week" | "year";
|
|
76
|
+
interval_count: number;
|
|
77
|
+
usage_type: "licensed";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
targetPrice: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
id: string;
|
|
86
|
+
object: "price";
|
|
87
|
+
product: string | {
|
|
88
|
+
[x: string]: unknown;
|
|
89
|
+
id: string;
|
|
90
|
+
object: "product";
|
|
91
|
+
deleted?: false | undefined;
|
|
92
|
+
};
|
|
93
|
+
active: boolean;
|
|
94
|
+
livemode: boolean;
|
|
95
|
+
type: "recurring";
|
|
96
|
+
currency: string;
|
|
97
|
+
billing_scheme: "per_unit";
|
|
98
|
+
recurring: {
|
|
99
|
+
[x: string]: unknown;
|
|
100
|
+
interval: "day" | "month" | "week" | "year";
|
|
101
|
+
interval_count: number;
|
|
102
|
+
usage_type: "licensed";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
billingCustomer?: {
|
|
106
|
+
[x: string]: unknown;
|
|
107
|
+
id: string;
|
|
108
|
+
object: "customer";
|
|
109
|
+
customer_account: string;
|
|
110
|
+
livemode: boolean;
|
|
111
|
+
deleted?: false | undefined;
|
|
112
|
+
discount: {
|
|
113
|
+
[x: string]: unknown;
|
|
114
|
+
id: string;
|
|
115
|
+
object: "discount";
|
|
116
|
+
deleted?: false | undefined;
|
|
117
|
+
} | null;
|
|
118
|
+
} | undefined;
|
|
119
|
+
};
|
|
120
|
+
status: "prepared";
|
|
121
|
+
preservation: "requires_schedule_validation";
|
|
122
|
+
requestIdentity: {
|
|
123
|
+
key: string;
|
|
124
|
+
binding: string;
|
|
125
|
+
};
|
|
126
|
+
}, "requestIdentity" | "version"> & {
|
|
127
|
+
version: 2;
|
|
128
|
+
requestIdentity: {
|
|
129
|
+
key: string;
|
|
130
|
+
binding: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
request: import("../../../renewalV2/index.js").PreparedRenewalScheduleAttachmentV2;
|
|
134
|
+
response: Readonly<{
|
|
135
|
+
body: unknown;
|
|
136
|
+
status: number;
|
|
137
|
+
}> | null;
|
|
138
|
+
}>;
|
|
139
|
+
operation: null;
|
|
140
|
+
pair: null;
|
|
141
|
+
reader: null;
|
|
142
|
+
}> | Readonly<{
|
|
143
|
+
snapshot: Readonly<{
|
|
144
|
+
entry: unknown;
|
|
145
|
+
retainedPredicate: import("../operations/types.js").SourceMethod;
|
|
146
|
+
freshPredicate: import("../operations/types.js").SourceMethod;
|
|
147
|
+
originalRecord: unknown;
|
|
148
|
+
raw: import("../material/capture.js").AttachRaw;
|
|
149
|
+
prepared: Omit<{
|
|
150
|
+
version: 1;
|
|
151
|
+
scope: "platform";
|
|
152
|
+
expected: {
|
|
153
|
+
customerAccountId: string;
|
|
154
|
+
subscriptionId: string;
|
|
155
|
+
itemId: string;
|
|
156
|
+
currentPriceId: string;
|
|
157
|
+
currentProductId: string;
|
|
158
|
+
targetPriceId: string;
|
|
159
|
+
targetProductId: string;
|
|
160
|
+
periodStart: number;
|
|
161
|
+
periodEnd: number;
|
|
162
|
+
livemode: boolean;
|
|
163
|
+
};
|
|
164
|
+
quantity: number;
|
|
165
|
+
providerSnapshot: {
|
|
166
|
+
subscription: {
|
|
167
|
+
[x: string]: unknown;
|
|
168
|
+
id: string;
|
|
169
|
+
object: "subscription";
|
|
170
|
+
customer_account: string;
|
|
171
|
+
status: "active";
|
|
172
|
+
currency: string;
|
|
173
|
+
livemode: boolean;
|
|
174
|
+
schedule: null;
|
|
175
|
+
cancel_at: null;
|
|
176
|
+
cancel_at_period_end: false;
|
|
177
|
+
pause_collection: null;
|
|
178
|
+
pending_update: null;
|
|
179
|
+
default_source: null;
|
|
180
|
+
application_fee_percent: null;
|
|
181
|
+
payment_settings: {
|
|
182
|
+
payment_method_options: null;
|
|
183
|
+
payment_method_types: null;
|
|
184
|
+
save_default_payment_method: "off" | null;
|
|
185
|
+
} | null;
|
|
186
|
+
billing_schedules?: unknown[] | undefined;
|
|
187
|
+
items: {
|
|
188
|
+
[x: string]: unknown;
|
|
189
|
+
has_more: false;
|
|
190
|
+
data: [{
|
|
191
|
+
[x: string]: unknown;
|
|
192
|
+
id: string;
|
|
193
|
+
object: "subscription_item";
|
|
194
|
+
subscription: string;
|
|
195
|
+
current_period_start: number;
|
|
196
|
+
current_period_end: number;
|
|
197
|
+
quantity: number;
|
|
198
|
+
price: {
|
|
199
|
+
[x: string]: unknown;
|
|
200
|
+
id: string;
|
|
201
|
+
object: "price";
|
|
202
|
+
product: string | {
|
|
203
|
+
[x: string]: unknown;
|
|
204
|
+
id: string;
|
|
205
|
+
object: "product";
|
|
206
|
+
deleted?: false | undefined;
|
|
207
|
+
};
|
|
208
|
+
active: boolean;
|
|
209
|
+
livemode: boolean;
|
|
210
|
+
type: "recurring";
|
|
211
|
+
currency: string;
|
|
212
|
+
billing_scheme: "per_unit";
|
|
213
|
+
recurring: {
|
|
214
|
+
[x: string]: unknown;
|
|
215
|
+
interval: "day" | "month" | "week" | "year";
|
|
216
|
+
interval_count: number;
|
|
217
|
+
usage_type: "licensed";
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
}];
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
targetPrice: {
|
|
224
|
+
[x: string]: unknown;
|
|
225
|
+
id: string;
|
|
226
|
+
object: "price";
|
|
227
|
+
product: string | {
|
|
228
|
+
[x: string]: unknown;
|
|
229
|
+
id: string;
|
|
230
|
+
object: "product";
|
|
231
|
+
deleted?: false | undefined;
|
|
232
|
+
};
|
|
233
|
+
active: boolean;
|
|
234
|
+
livemode: boolean;
|
|
235
|
+
type: "recurring";
|
|
236
|
+
currency: string;
|
|
237
|
+
billing_scheme: "per_unit";
|
|
238
|
+
recurring: {
|
|
239
|
+
[x: string]: unknown;
|
|
240
|
+
interval: "day" | "month" | "week" | "year";
|
|
241
|
+
interval_count: number;
|
|
242
|
+
usage_type: "licensed";
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
billingCustomer?: {
|
|
246
|
+
[x: string]: unknown;
|
|
247
|
+
id: string;
|
|
248
|
+
object: "customer";
|
|
249
|
+
customer_account: string;
|
|
250
|
+
livemode: boolean;
|
|
251
|
+
deleted?: false | undefined;
|
|
252
|
+
discount: {
|
|
253
|
+
[x: string]: unknown;
|
|
254
|
+
id: string;
|
|
255
|
+
object: "discount";
|
|
256
|
+
deleted?: false | undefined;
|
|
257
|
+
} | null;
|
|
258
|
+
} | undefined;
|
|
259
|
+
};
|
|
260
|
+
status: "prepared";
|
|
261
|
+
preservation: "requires_schedule_validation";
|
|
262
|
+
requestIdentity: {
|
|
263
|
+
key: string;
|
|
264
|
+
binding: string;
|
|
265
|
+
};
|
|
266
|
+
}, "requestIdentity" | "version"> & {
|
|
267
|
+
version: 2;
|
|
268
|
+
requestIdentity: {
|
|
269
|
+
key: string;
|
|
270
|
+
binding: string;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
request: import("../../../renewalV2/index.js").PreparedRenewalScheduleAttachmentV2;
|
|
274
|
+
response: Readonly<{
|
|
275
|
+
body: unknown;
|
|
276
|
+
status: number;
|
|
277
|
+
}> | null;
|
|
278
|
+
}>;
|
|
279
|
+
operation: Readonly<{
|
|
280
|
+
owner: Readonly<{
|
|
281
|
+
basis: Readonly<import("../originalOwner.js").OriginalBasis>;
|
|
282
|
+
check(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
283
|
+
sample(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
284
|
+
subscribe(fn: () => void): () => void;
|
|
285
|
+
retire(): void;
|
|
286
|
+
}>;
|
|
287
|
+
originAssociation: object;
|
|
288
|
+
originalEntry: unknown;
|
|
289
|
+
originalRecord: unknown;
|
|
290
|
+
readPlan: readonly Readonly<{
|
|
291
|
+
resource: string;
|
|
292
|
+
path: string;
|
|
293
|
+
ordinal: number;
|
|
294
|
+
method: "GET";
|
|
295
|
+
body: undefined;
|
|
296
|
+
options: Readonly<{
|
|
297
|
+
apiVersion: string;
|
|
298
|
+
maxNetworkRetries: 0;
|
|
299
|
+
}>;
|
|
300
|
+
}>[];
|
|
301
|
+
delegate: Readonly<{
|
|
302
|
+
rawRequest: import("stripe").Stripe["rawRequest"];
|
|
303
|
+
}>;
|
|
304
|
+
sink: Readonly<{
|
|
305
|
+
send(record: Parameters<(record: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[0], ack: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[1]) => Promise<void>>[0], ack: Parameters<(record: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[0], ack: Parameters<(record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>>[1]) => Promise<void>>[1]): Promise<void>;
|
|
306
|
+
}>;
|
|
307
|
+
reserve(claimedOwner: unknown, origin: unknown, entry: unknown): Readonly<{}>;
|
|
308
|
+
}>;
|
|
309
|
+
pair: Readonly<{
|
|
310
|
+
transport: Readonly<{
|
|
311
|
+
readTransport: Readonly<{
|
|
312
|
+
rawRequest: (method: unknown, path: unknown, body: unknown, options: unknown) => Promise<unknown>;
|
|
313
|
+
}>;
|
|
314
|
+
postAttach: (...args: unknown[]) => Promise<Readonly<{
|
|
315
|
+
outcome: "not_started";
|
|
316
|
+
reason: string;
|
|
317
|
+
}> | Readonly<{
|
|
318
|
+
readonly outcome: "provider_rejected";
|
|
319
|
+
readonly phase: "post";
|
|
320
|
+
readonly ordinal: number;
|
|
321
|
+
readonly diagnostics: Readonly<{}>;
|
|
322
|
+
}> | Readonly<{
|
|
323
|
+
outcome: "fulfilled_safe";
|
|
324
|
+
body: unknown;
|
|
325
|
+
statusCode: number;
|
|
326
|
+
}> | Readonly<{
|
|
327
|
+
outcome: "fulfilled_unverified";
|
|
328
|
+
}>>;
|
|
329
|
+
takeReadRejection(...args: unknown[]): Readonly<{
|
|
330
|
+
phase: "read";
|
|
331
|
+
ordinal: number;
|
|
332
|
+
diagnostics: import("../operations/providerFailure.js").Diagnostics;
|
|
333
|
+
}> | null;
|
|
334
|
+
postDisposition(...args: unknown[]): import("../operations/transportKernel.js").PostDisposition;
|
|
335
|
+
}>;
|
|
336
|
+
capability: Readonly<{
|
|
337
|
+
assertSourceOperationBinding(operation: unknown, request: unknown, readPlan: unknown, delegate: unknown): boolean;
|
|
338
|
+
takeFulfilledQuarantine(...args: unknown[]): object | null;
|
|
339
|
+
assertVirginAcquisition(...args: unknown[]): boolean;
|
|
340
|
+
consumeReadCatch(...args: unknown[]): Readonly<{
|
|
341
|
+
phase: "read";
|
|
342
|
+
ordinal: number;
|
|
343
|
+
diagnostics: Readonly<{
|
|
344
|
+
statusCode?: number;
|
|
345
|
+
code?: string;
|
|
346
|
+
requestId?: string;
|
|
347
|
+
type?: string;
|
|
348
|
+
}>;
|
|
349
|
+
}> | null;
|
|
350
|
+
consumePostCatch(actualReply: unknown): Readonly<{
|
|
351
|
+
phase: "post";
|
|
352
|
+
ordinal: number;
|
|
353
|
+
diagnostics: Readonly<{
|
|
354
|
+
statusCode?: number;
|
|
355
|
+
code?: string;
|
|
356
|
+
requestId?: string;
|
|
357
|
+
type?: string;
|
|
358
|
+
}>;
|
|
359
|
+
}> | null;
|
|
360
|
+
}>;
|
|
361
|
+
}>;
|
|
362
|
+
reader: Readonly<{
|
|
363
|
+
acquire(): Promise<import("../acquisition/ownedAcquisition.js").RawAcquisitionResult>;
|
|
364
|
+
}>;
|
|
365
|
+
}>>;
|
|
366
|
+
/** Best-effort final read fence; this is not an atomic journal/provider lock. */
|
|
367
|
+
export declare function assertReplayFrontierForLineage(token: object): Promise<void>;
|
|
368
|
+
//# sourceMappingURL=recoveryFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recoveryFactory.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/recoveryFactory.ts"],"names":[],"mappings":"AAaA,2FAA2F;AAC3F,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA8D/B,OAAO,UAAU,OAAO,SAAS,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAtCjE;AA2ED,iFAAiF;AACjF,wBAAsB,8BAA8B,CAAC,KAAK,EAAE,MAAM,iBAoBjE"}
|