@fantastic.dev/better-stripe 0.104.0 → 0.105.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/configure/transport.d.ts +100 -0
- package/dist/client/billing/renewalAttach/internal/configure/transport.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/configure/transport.js +17 -2
- package/dist/client/billing/renewalAttach/internal/configure/transport.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.d.ts +16 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.js +46 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureFrontier.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts +25 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js +62 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalData.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts +14 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js +17 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.js.map +1 -1
- package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts +30 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWrite.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js +224 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWrite.js.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.d.ts +61 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.d.ts.map +1 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.js +73 -0
- package/dist/client/billing/renewalAttach/internal/producer/configureWriteFactory.js.map +1 -0
- 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 +43 -43
- package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
- package/dist/component/balanceFunding/queries.d.ts +1 -1
- package/dist/component/usageCredits/accounting.fixtures.d.ts +16 -16
- package/docs/renewal-context-reads.md +47 -4
- package/package.json +1 -1
- package/src/client/billing/renewalAttach/internal/configure/transport.ts +31 -2
- package/src/client/billing/renewalAttach/internal/producer/configureFrontier.ts +92 -0
- package/src/client/billing/renewalAttach/internal/producer/configureJournalData.ts +84 -0
- package/src/client/billing/renewalAttach/internal/producer/configureJournalWork.ts +16 -0
- package/src/client/billing/renewalAttach/internal/producer/configureWrite.ts +317 -0
- package/src/client/billing/renewalAttach/internal/producer/configureWriteFactory.ts +88 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureWrite.integration.test.ts +158 -0
- package/src/client/billing/renewalAttach/internal/producer/producerConfigureWriteControls.integration.test.ts +537 -0
- package/src/client/billing/renewalAttach/internal/test-fixtures/producerConfigureAdmission.ts +85 -2
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { freeze } from "../material/nodeKernel.js";
|
|
2
|
+
import { closed as closedFields } from "../operations/types.js";
|
|
3
|
+
import { readConfigureLineage } from "./configureLineage.js";
|
|
4
|
+
import { ownedAwaitForInitialLineage } from "./ownedAwaitFactory.js";
|
|
5
|
+
import { createAdmittedConfigureWriteTransport } from "../configure/transport.js";
|
|
6
|
+
import { createSelectedRawAcquisition } from "../acquisition/ownedAcquisition.js";
|
|
7
|
+
import { createAdmittedConfigureEventCompiler } from "../c10/configureEvents.js";
|
|
8
|
+
import { assertConfigurePreflightFrontier, assertConfigureWriteFrontier, } from "./configureFrontier.js";
|
|
9
|
+
import { journalWorkForConfigureLineage } from "./configureJournalWork.js";
|
|
10
|
+
import { checkConfigureRetention } from "./configureJournalData.js";
|
|
11
|
+
import { projectRenewalConfigurationV2, constructRenewalScheduleAttachmentReceiptV2, constructRenewalConfigurationReceiptV2, } from "../../../renewalV2/index.js";
|
|
12
|
+
import { verifyPreflightRecordDATA, verifyCurrentPreflightDATA, } from "../preflight/relations.js";
|
|
13
|
+
import { releasePreflightDATA } from "../preflight/output.js";
|
|
14
|
+
import { admitConfigureACK, admitConfigureFailure, configureControl, } from "../configure/output.js";
|
|
15
|
+
import { need, seven, stop } from "../configure/request.js";
|
|
16
|
+
import { equal } from "../../../renewalAggregate/shared.js";
|
|
17
|
+
import { renewalSnapshot } from "../../../renewalReplacementSnapshot.js";
|
|
18
|
+
function matchesCurrentBundle(value, record) {
|
|
19
|
+
return equal(value, {
|
|
20
|
+
...record.originalBundle,
|
|
21
|
+
wireSubscription: record.configuration.freshSubscription,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const attempts = new WeakMap();
|
|
25
|
+
const completions = new WeakMap();
|
|
26
|
+
/** One fixed initial configure attempt. No replay, caller frame or output registration. */
|
|
27
|
+
export function captureAdmittedConfigureWrite(token) {
|
|
28
|
+
const pair = createAdmittedConfigureWriteTransport(token);
|
|
29
|
+
need(arguments.length === 1);
|
|
30
|
+
const attempt = { pair, receipt: null, rawReceipt: null };
|
|
31
|
+
attempts.set(token, attempt);
|
|
32
|
+
const lineage = readConfigureLineage(token), owned = ownedAwaitForInitialLineage(lineage.parentToken);
|
|
33
|
+
const compiler = createAdmittedConfigureEventCompiler(token), work = journalWorkForConfigureLineage(token);
|
|
34
|
+
let used = false, closed = false, receiptKnown = false;
|
|
35
|
+
function guard() {
|
|
36
|
+
need(!closed);
|
|
37
|
+
pair.guard();
|
|
38
|
+
}
|
|
39
|
+
async function checked(call) {
|
|
40
|
+
guard();
|
|
41
|
+
const result = await owned(call);
|
|
42
|
+
guard();
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
function providerFailure(fact) {
|
|
46
|
+
const failure = admitConfigureFailure(fact.phase, fact.resource, fact.ordinal, pair.record.request, fact.diagnostics);
|
|
47
|
+
const error = Error("OWNED_CONFIGURE_PROVIDER_REJECTED");
|
|
48
|
+
Object.defineProperty(error, "failure", { value: failure });
|
|
49
|
+
return error;
|
|
50
|
+
}
|
|
51
|
+
return Object.freeze({
|
|
52
|
+
async invoke() {
|
|
53
|
+
need(!used);
|
|
54
|
+
used = true;
|
|
55
|
+
need(arguments.length === 0);
|
|
56
|
+
let actualError = null;
|
|
57
|
+
try {
|
|
58
|
+
guard();
|
|
59
|
+
await checked(() => assertConfigurePreflightFrontier(token));
|
|
60
|
+
const original = await checked(() => projectRenewalConfigurationV2(pair.record.configuration));
|
|
61
|
+
need(original.status === "projected_configure_request");
|
|
62
|
+
const attachment = await checked(() => constructRenewalScheduleAttachmentReceiptV2(pair.record.configuration.attachReceipt));
|
|
63
|
+
const record = verifyPreflightRecordDATA(pair.retained, original, attachment);
|
|
64
|
+
await checked(() => assertConfigurePreflightFrontier(token));
|
|
65
|
+
const reader = createSelectedRawAcquisition(pair.owner, pair.transport.readTransport, attachment.scheduleId);
|
|
66
|
+
const acquired = await checked(() => reader.acquire(record.configuration.preparation.expected));
|
|
67
|
+
if (!acquired.ok) {
|
|
68
|
+
const fact = pair.capability.consumeReadCatch();
|
|
69
|
+
if (fact) {
|
|
70
|
+
actualError = providerFailure(fact);
|
|
71
|
+
throw actualError;
|
|
72
|
+
}
|
|
73
|
+
return stop();
|
|
74
|
+
}
|
|
75
|
+
if (!matchesCurrentBundle(acquired.bundle, record))
|
|
76
|
+
return configureControl("not_dispatched", "preconfigure_baseline_changed");
|
|
77
|
+
const evidence = Object.freeze({
|
|
78
|
+
bundle: acquired.bundle,
|
|
79
|
+
schedule: acquired.schedule,
|
|
80
|
+
observedAt: acquired.observedAt,
|
|
81
|
+
});
|
|
82
|
+
verifyCurrentPreflightDATA(record, evidence);
|
|
83
|
+
const fresh = await checked(() => projectRenewalConfigurationV2({
|
|
84
|
+
...record.configuration,
|
|
85
|
+
freshSubscription: evidence.bundle.wireSubscription,
|
|
86
|
+
targetPrice: evidence.bundle.wireTargetPrice,
|
|
87
|
+
...(Object.prototype.hasOwnProperty.call(record.configuration, "billingCustomer")
|
|
88
|
+
? { billingCustomer: evidence.bundle.wireBillingCustomer }
|
|
89
|
+
: {}),
|
|
90
|
+
schedule: evidence.schedule,
|
|
91
|
+
observedAt: evidence.observedAt,
|
|
92
|
+
}));
|
|
93
|
+
need(fresh.status === "projected_configure_request" &&
|
|
94
|
+
equal(fresh, original) &&
|
|
95
|
+
equal(fresh, record.request));
|
|
96
|
+
need(Reflect.apply(pair.covers, pair.entry, [record, evidence, fresh]) ===
|
|
97
|
+
true);
|
|
98
|
+
guard();
|
|
99
|
+
releasePreflightDATA(record, evidence, fresh, original, attachment);
|
|
100
|
+
await checked(() => assertConfigurePreflightFrontier(token));
|
|
101
|
+
const dispatch = {
|
|
102
|
+
event: "dispatch",
|
|
103
|
+
stage: "configure",
|
|
104
|
+
request: original,
|
|
105
|
+
};
|
|
106
|
+
await checked(() => compiler.dispatch(dispatch));
|
|
107
|
+
await checked(() => assertConfigureWriteFrontier(token, [dispatch]));
|
|
108
|
+
const reply = await checked(() => pair.transport.postConfigure());
|
|
109
|
+
if (pair.capability.consumeNotStarted(reply))
|
|
110
|
+
return configureControl("not_dispatched", "post_not_started");
|
|
111
|
+
const fact = pair.capability.consumePostCatch(reply);
|
|
112
|
+
if (fact) {
|
|
113
|
+
actualError = providerFailure(fact);
|
|
114
|
+
throw actualError;
|
|
115
|
+
}
|
|
116
|
+
if (reply.outcome !== "fulfilled_safe")
|
|
117
|
+
return configureControl("configure_unknown", "post_unverified");
|
|
118
|
+
const response = {
|
|
119
|
+
event: "response",
|
|
120
|
+
stage: "configure",
|
|
121
|
+
request: original,
|
|
122
|
+
body: reply.body,
|
|
123
|
+
transport: reply.transport,
|
|
124
|
+
};
|
|
125
|
+
await checked(() => compiler.response(response));
|
|
126
|
+
const rawReceipt = Object.freeze({
|
|
127
|
+
configuration: record.configuration,
|
|
128
|
+
actualDispatch: seven(original),
|
|
129
|
+
providerSnapshot: reply.body,
|
|
130
|
+
transport: reply.transport,
|
|
131
|
+
});
|
|
132
|
+
const receipt = await checked(() => constructRenewalConfigurationReceiptV2(rawReceipt));
|
|
133
|
+
// Known receipt closes this once-only attempt before output admission or persistence.
|
|
134
|
+
receiptKnown = true;
|
|
135
|
+
attempt.receipt = freeze(receipt);
|
|
136
|
+
attempt.rawReceipt = freeze(rawReceipt);
|
|
137
|
+
guard();
|
|
138
|
+
const events = await checked(() => assertConfigureWriteFrontier(token, [dispatch, response]));
|
|
139
|
+
const receiptJSON = JSON.stringify(renewalSnapshot(receipt));
|
|
140
|
+
const retained = await checked(() => work.retain(receiptJSON));
|
|
141
|
+
const retention = checkConfigureRetention(retained, lineage.reservation, events, receipt.binding);
|
|
142
|
+
const known = {
|
|
143
|
+
receiptJSON,
|
|
144
|
+
receiptBinding: receipt.binding,
|
|
145
|
+
retention,
|
|
146
|
+
};
|
|
147
|
+
await checked(() => assertConfigureWriteFrontier(token, [dispatch, response], known));
|
|
148
|
+
const output = admitConfigureACK(record, rawReceipt, receipt);
|
|
149
|
+
const returned = closedFields(output, [
|
|
150
|
+
"status",
|
|
151
|
+
"originalRecord",
|
|
152
|
+
"rawReceipt",
|
|
153
|
+
"receipt",
|
|
154
|
+
"operationalAuthority",
|
|
155
|
+
]);
|
|
156
|
+
const published = {
|
|
157
|
+
event: "receipt",
|
|
158
|
+
stage: "configure",
|
|
159
|
+
request: original,
|
|
160
|
+
receipt,
|
|
161
|
+
};
|
|
162
|
+
await checked(() => compiler.receipt(published));
|
|
163
|
+
await checked(() => assertConfigureWriteFrontier(token, [dispatch, response, published], known));
|
|
164
|
+
const view = Object.freeze({
|
|
165
|
+
output,
|
|
166
|
+
receipt: returned.receipt,
|
|
167
|
+
rawReceipt: returned.rawReceipt,
|
|
168
|
+
acknowledgement: pair.preflight.acknowledgement,
|
|
169
|
+
originalEntry: pair.preflight.originalEntry,
|
|
170
|
+
configureEntry: pair.entry,
|
|
171
|
+
coversConfigure: pair.covers,
|
|
172
|
+
operationalAuthority: false,
|
|
173
|
+
});
|
|
174
|
+
guard();
|
|
175
|
+
// No callback, reflection or Owner sample follows the final gate before discard.
|
|
176
|
+
pair.capability.discardFulfilledQuarantine();
|
|
177
|
+
completions.set(token, { view, guard });
|
|
178
|
+
return output;
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
let live = false;
|
|
182
|
+
try {
|
|
183
|
+
guard();
|
|
184
|
+
live = true;
|
|
185
|
+
}
|
|
186
|
+
catch {
|
|
187
|
+
/* No reflection on provider data after closure. */
|
|
188
|
+
}
|
|
189
|
+
closed = true;
|
|
190
|
+
if (live && actualError === error)
|
|
191
|
+
throw error;
|
|
192
|
+
if (pair.transport.postDisposition() !== "NOT_STARTED" || receiptKnown)
|
|
193
|
+
return configureControl("configure_unknown", live ? "post_unverified" : "owner_closed_after_post");
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/** Actual returned ACK custody only, without accepting any copied receipt or output. */
|
|
200
|
+
export function readAdmittedConfigureAcknowledgement(token) {
|
|
201
|
+
need(arguments.length === 1);
|
|
202
|
+
const completed = completions.get(token);
|
|
203
|
+
need(completed);
|
|
204
|
+
completed.guard();
|
|
205
|
+
return completed.view;
|
|
206
|
+
}
|
|
207
|
+
/** Private live attempt DATA, never an ACK registration or replay grant. */
|
|
208
|
+
export function readAdmittedConfigureWriteAttempt(token) {
|
|
209
|
+
need(arguments.length === 1);
|
|
210
|
+
const attempt = attempts.get(token);
|
|
211
|
+
need(attempt);
|
|
212
|
+
attempt.pair.guard();
|
|
213
|
+
const view = Object.freeze({
|
|
214
|
+
postDisposition: attempt.pair.transport.postDisposition(),
|
|
215
|
+
receiptKnown: attempt.receipt !== null,
|
|
216
|
+
receipt: attempt.receipt,
|
|
217
|
+
rawReceipt: attempt.rawReceipt,
|
|
218
|
+
returned: completions.has(token),
|
|
219
|
+
operationalAuthority: false,
|
|
220
|
+
});
|
|
221
|
+
attempt.pair.guard();
|
|
222
|
+
return view;
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=configureWrite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureWrite.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureWrite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,oCAAoC,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EACL,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,EAC3C,sCAAsC,GACvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,KAAK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ACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AACD,wFAAwF;AACxF,MAAM,UAAU,oCAAoC,CAAC,KAAa;IAChE,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC7B,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChB,SAAS,CAAC,KAAK,EAAE,CAAC;IAClB,OAAO,SAAS,CAAC,IAAI,CAAC;AACxB,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,iCAAiC,CAAC,KAAa;IAC7D,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;IAC7B,MAAM,OAAO,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,IAAI,CAAC,OAAO,CAAC,CAAC;IACd,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;QACzB,eAAe,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE;QACzD,YAAY,EAAE,OAAO,CAAC,OAAO,KAAK,IAAI;QACtC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;QAChC,oBAAoB,EAAE,KAAc;KACrC,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Derive a fixed write frame from actual completed readonly custody. */
|
|
2
|
+
export declare function captureAdmittedConfigureWriteFrame(token: object, arity: number): Readonly<{
|
|
3
|
+
frame: Readonly<{
|
|
4
|
+
owner: Readonly<{
|
|
5
|
+
basis: Readonly<import("../originalOwner.js").OriginalBasis>;
|
|
6
|
+
check(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
7
|
+
sample(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
8
|
+
subscribe(fn: () => void): () => void;
|
|
9
|
+
retire(): void;
|
|
10
|
+
}>;
|
|
11
|
+
operation: object;
|
|
12
|
+
request: import("../../../renewalV2/index.js").ProjectedRenewalConfigurationV2;
|
|
13
|
+
readPlan: readonly Readonly<{
|
|
14
|
+
resource: "coupon" | "customer" | "price" | "schedule" | "subscription";
|
|
15
|
+
ordinal: number;
|
|
16
|
+
method: "GET";
|
|
17
|
+
path: string;
|
|
18
|
+
body: undefined;
|
|
19
|
+
options: Readonly<{
|
|
20
|
+
apiVersion: typeof import("../configure/request.js").API;
|
|
21
|
+
maxNetworkRetries: 0;
|
|
22
|
+
}>;
|
|
23
|
+
}>[];
|
|
24
|
+
delegate: Readonly<{
|
|
25
|
+
rawRequest: import("stripe").Stripe["rawRequest"];
|
|
26
|
+
}>;
|
|
27
|
+
}>;
|
|
28
|
+
expected: readonly Readonly<{
|
|
29
|
+
resource: "coupon" | "customer" | "price" | "schedule" | "subscription";
|
|
30
|
+
ordinal: number;
|
|
31
|
+
method: "GET";
|
|
32
|
+
path: string;
|
|
33
|
+
body: undefined;
|
|
34
|
+
id: string;
|
|
35
|
+
options: Readonly<{
|
|
36
|
+
apiVersion: typeof import("../configure/request.js").API;
|
|
37
|
+
maxNetworkRetries: 0;
|
|
38
|
+
}>;
|
|
39
|
+
}>[];
|
|
40
|
+
owner: Readonly<{
|
|
41
|
+
basis: Readonly<import("../originalOwner.js").OriginalBasis>;
|
|
42
|
+
check(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
43
|
+
sample(): Readonly<import("../originalOwner.js").OriginalSample>;
|
|
44
|
+
subscribe(fn: () => void): () => void;
|
|
45
|
+
retire(): void;
|
|
46
|
+
}>;
|
|
47
|
+
guard: () => void;
|
|
48
|
+
record: import("../preflight/grammar.js").PreflightRecord;
|
|
49
|
+
retained: import("../preflight/record.js").CapturedPreflightRecord;
|
|
50
|
+
preflight: Readonly<{
|
|
51
|
+
output: import("../preflight/grammar.js").PreflightOutput;
|
|
52
|
+
originalEntry: unknown;
|
|
53
|
+
preflightEntry: unknown;
|
|
54
|
+
coversPreflight: unknown;
|
|
55
|
+
acknowledgement: ReturnType<typeof import("../operations/configureReadTransport.js").createAdmittedConfigureReadTransport>["acknowledgement"];
|
|
56
|
+
operationalAuthority: false;
|
|
57
|
+
}>;
|
|
58
|
+
entry: any;
|
|
59
|
+
covers: import("../configure/request.js").SourceMethod;
|
|
60
|
+
}>;
|
|
61
|
+
//# sourceMappingURL=configureWriteFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureWriteFactory.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureWriteFactory.ts"],"names":[],"mappings":"AAUA,yEAAyE;AACzE,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0Ed"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { types } from "node:util";
|
|
2
|
+
import { COMPILED_CONFIGURE_WRITE_ENTRIES } from "../operations/sourceOperations.js";
|
|
3
|
+
import { closed } from "../operations/types.js";
|
|
4
|
+
import { readConfigureLineage } from "./configureLineage.js";
|
|
5
|
+
import { readAdmittedConfigurePreflight } from "./configurePreflight.js";
|
|
6
|
+
import { captureInitialStockRawDelegate } from "./stockDelegateFactory.js";
|
|
7
|
+
import { capturePreflightRecordDATA } from "../preflight/record.js";
|
|
8
|
+
import { expectedPlan, need, ownMethod } from "../configure/request.js";
|
|
9
|
+
const captures = new WeakSet();
|
|
10
|
+
/** Derive a fixed write frame from actual completed readonly custody. */
|
|
11
|
+
export function captureAdmittedConfigureWriteFrame(token, arity) {
|
|
12
|
+
need(typeof token === "object" && token !== null && !captures.has(token));
|
|
13
|
+
captures.add(token);
|
|
14
|
+
need(arity === 1);
|
|
15
|
+
const lineage = readConfigureLineage(token);
|
|
16
|
+
const preflight = readAdmittedConfigurePreflight(token);
|
|
17
|
+
need(!types.isProxy(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
|
|
18
|
+
Array.isArray(COMPILED_CONFIGURE_WRITE_ENTRIES));
|
|
19
|
+
const candidates = COMPILED_CONFIGURE_WRITE_ENTRIES.filter((entry) => {
|
|
20
|
+
const fields = closed(entry, ["originalEntry", "coversConfigure"]);
|
|
21
|
+
ownMethod(entry, "coversConfigure");
|
|
22
|
+
return fields.originalEntry === preflight.originalEntry;
|
|
23
|
+
});
|
|
24
|
+
need(candidates.length === 1);
|
|
25
|
+
const entry = candidates[0], covers = ownMethod(entry, "coversConfigure");
|
|
26
|
+
const record = preflight.output.originalRecord;
|
|
27
|
+
const retained = capturePreflightRecordDATA(record);
|
|
28
|
+
let closedFrame = false;
|
|
29
|
+
function guard() {
|
|
30
|
+
need(!closedFrame);
|
|
31
|
+
try {
|
|
32
|
+
const current = readConfigureLineage(token);
|
|
33
|
+
need(current.owner === lineage.owner &&
|
|
34
|
+
current.originalReservation === lineage.originalReservation &&
|
|
35
|
+
current.journal === lineage.journal);
|
|
36
|
+
need(readAdmittedConfigurePreflight(token) === preflight);
|
|
37
|
+
need(!types.isProxy(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
|
|
38
|
+
Array.isArray(COMPILED_CONFIGURE_WRITE_ENTRIES) &&
|
|
39
|
+
COMPILED_CONFIGURE_WRITE_ENTRIES.includes(entry));
|
|
40
|
+
const fields = closed(entry, ["originalEntry", "coversConfigure"]);
|
|
41
|
+
need(fields.originalEntry === preflight.originalEntry &&
|
|
42
|
+
fields.coversConfigure === covers &&
|
|
43
|
+
!types.isProxy(covers));
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
closedFrame = true;
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
guard();
|
|
51
|
+
const delegate = captureInitialStockRawDelegate(lineage.parentToken);
|
|
52
|
+
const expected = expectedPlan(record);
|
|
53
|
+
const readPlan = Object.freeze(expected.map(({ resource, ordinal, method, path, body, options }) => Object.freeze({ resource, ordinal, method, path, body, options })));
|
|
54
|
+
const frame = Object.freeze({
|
|
55
|
+
owner: lineage.owner,
|
|
56
|
+
operation: token,
|
|
57
|
+
request: record.request,
|
|
58
|
+
readPlan,
|
|
59
|
+
delegate,
|
|
60
|
+
});
|
|
61
|
+
return Object.freeze({
|
|
62
|
+
frame,
|
|
63
|
+
expected,
|
|
64
|
+
owner: lineage.owner,
|
|
65
|
+
guard,
|
|
66
|
+
record,
|
|
67
|
+
retained,
|
|
68
|
+
preflight,
|
|
69
|
+
entry,
|
|
70
|
+
covers,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=configureWriteFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configureWriteFactory.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/producer/configureWriteFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAU,CAAC;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AAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAClE,CACF,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,KAAK;QAChB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ;QACR,QAAQ;KACT,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,KAAK;QACL,QAAQ;QACR,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK;QACL,MAAM;QACN,QAAQ;QACR,SAAS;QACT,KAAK;QACL,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -2641,14 +2641,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2641
2641
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2642
2642
|
requestKey: string;
|
|
2643
2643
|
result?: {
|
|
2644
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2645
|
-
retryable: false;
|
|
2646
|
-
status: "conflict";
|
|
2647
|
-
} | {
|
|
2648
|
-
reason: "policy_invalid";
|
|
2649
|
-
retryable: false;
|
|
2650
|
-
status: "rejected";
|
|
2651
|
-
} | {
|
|
2652
2644
|
operation: {
|
|
2653
2645
|
accountId: string;
|
|
2654
2646
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2659,6 +2651,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2659
2651
|
} | {
|
|
2660
2652
|
enabled: boolean;
|
|
2661
2653
|
status: "unchanged";
|
|
2654
|
+
} | {
|
|
2655
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2656
|
+
retryable: false;
|
|
2657
|
+
status: "conflict";
|
|
2658
|
+
} | {
|
|
2659
|
+
reason: "policy_invalid";
|
|
2660
|
+
retryable: false;
|
|
2661
|
+
status: "rejected";
|
|
2662
2662
|
} | {
|
|
2663
2663
|
reason: "provider_pending";
|
|
2664
2664
|
retryable: true;
|
|
@@ -2669,14 +2669,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2669
2669
|
payload: import("convex/values").VString<string, "required">;
|
|
2670
2670
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2671
2671
|
result: import("convex/values").VUnion<{
|
|
2672
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2673
|
-
retryable: false;
|
|
2674
|
-
status: "conflict";
|
|
2675
|
-
} | {
|
|
2676
|
-
reason: "policy_invalid";
|
|
2677
|
-
retryable: false;
|
|
2678
|
-
status: "rejected";
|
|
2679
|
-
} | {
|
|
2680
2672
|
operation: {
|
|
2681
2673
|
accountId: string;
|
|
2682
2674
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2687,6 +2679,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
2687
2679
|
} | {
|
|
2688
2680
|
enabled: boolean;
|
|
2689
2681
|
status: "unchanged";
|
|
2682
|
+
} | {
|
|
2683
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2684
|
+
retryable: false;
|
|
2685
|
+
status: "conflict";
|
|
2686
|
+
} | {
|
|
2687
|
+
reason: "policy_invalid";
|
|
2688
|
+
retryable: false;
|
|
2689
|
+
status: "rejected";
|
|
2690
2690
|
} | {
|
|
2691
2691
|
reason: "provider_pending";
|
|
2692
2692
|
retryable: true;
|
|
@@ -7777,14 +7777,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7777
7777
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
7778
7778
|
requestKey: string;
|
|
7779
7779
|
result?: {
|
|
7780
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7781
|
-
retryable: false;
|
|
7782
|
-
status: "conflict";
|
|
7783
|
-
} | {
|
|
7784
|
-
reason: "policy_invalid";
|
|
7785
|
-
retryable: false;
|
|
7786
|
-
status: "rejected";
|
|
7787
|
-
} | {
|
|
7788
7780
|
operation: {
|
|
7789
7781
|
accountId: string;
|
|
7790
7782
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7795,6 +7787,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7795
7787
|
} | {
|
|
7796
7788
|
enabled: boolean;
|
|
7797
7789
|
status: "unchanged";
|
|
7790
|
+
} | {
|
|
7791
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7792
|
+
retryable: false;
|
|
7793
|
+
status: "conflict";
|
|
7794
|
+
} | {
|
|
7795
|
+
reason: "policy_invalid";
|
|
7796
|
+
retryable: false;
|
|
7797
|
+
status: "rejected";
|
|
7798
7798
|
} | {
|
|
7799
7799
|
reason: "provider_pending";
|
|
7800
7800
|
retryable: true;
|
|
@@ -7805,14 +7805,6 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7805
7805
|
payload: import("convex/values").VString<string, "required">;
|
|
7806
7806
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
7807
7807
|
result: import("convex/values").VUnion<{
|
|
7808
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7809
|
-
retryable: false;
|
|
7810
|
-
status: "conflict";
|
|
7811
|
-
} | {
|
|
7812
|
-
reason: "policy_invalid";
|
|
7813
|
-
retryable: false;
|
|
7814
|
-
status: "rejected";
|
|
7815
|
-
} | {
|
|
7816
7808
|
operation: {
|
|
7817
7809
|
accountId: string;
|
|
7818
7810
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7823,6 +7815,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
7823
7815
|
} | {
|
|
7824
7816
|
enabled: boolean;
|
|
7825
7817
|
status: "unchanged";
|
|
7818
|
+
} | {
|
|
7819
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7820
|
+
retryable: false;
|
|
7821
|
+
status: "conflict";
|
|
7822
|
+
} | {
|
|
7823
|
+
reason: "policy_invalid";
|
|
7824
|
+
retryable: false;
|
|
7825
|
+
status: "rejected";
|
|
7826
7826
|
} | {
|
|
7827
7827
|
reason: "provider_pending";
|
|
7828
7828
|
retryable: true;
|
|
@@ -2632,6 +2632,14 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2632
2632
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
2633
2633
|
requestKey: string;
|
|
2634
2634
|
result?: {
|
|
2635
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2636
|
+
retryable: false;
|
|
2637
|
+
status: "conflict";
|
|
2638
|
+
} | {
|
|
2639
|
+
reason: "policy_invalid";
|
|
2640
|
+
retryable: false;
|
|
2641
|
+
status: "rejected";
|
|
2642
|
+
} | {
|
|
2635
2643
|
operation: {
|
|
2636
2644
|
accountId: string;
|
|
2637
2645
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2642,14 +2650,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2642
2650
|
} | {
|
|
2643
2651
|
enabled: boolean;
|
|
2644
2652
|
status: "unchanged";
|
|
2645
|
-
} | {
|
|
2646
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2647
|
-
retryable: false;
|
|
2648
|
-
status: "conflict";
|
|
2649
|
-
} | {
|
|
2650
|
-
reason: "policy_invalid";
|
|
2651
|
-
retryable: false;
|
|
2652
|
-
status: "rejected";
|
|
2653
2653
|
} | {
|
|
2654
2654
|
reason: "provider_pending";
|
|
2655
2655
|
retryable: true;
|
|
@@ -2660,6 +2660,14 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2660
2660
|
payload: import("convex/values").VString<string, "required">;
|
|
2661
2661
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
2662
2662
|
result: import("convex/values").VUnion<{
|
|
2663
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2664
|
+
retryable: false;
|
|
2665
|
+
status: "conflict";
|
|
2666
|
+
} | {
|
|
2667
|
+
reason: "policy_invalid";
|
|
2668
|
+
retryable: false;
|
|
2669
|
+
status: "rejected";
|
|
2670
|
+
} | {
|
|
2663
2671
|
operation: {
|
|
2664
2672
|
accountId: string;
|
|
2665
2673
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -2670,14 +2678,6 @@ export declare function large(count?: number, amount?: number): Promise<{
|
|
|
2670
2678
|
} | {
|
|
2671
2679
|
enabled: boolean;
|
|
2672
2680
|
status: "unchanged";
|
|
2673
|
-
} | {
|
|
2674
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
2675
|
-
retryable: false;
|
|
2676
|
-
status: "conflict";
|
|
2677
|
-
} | {
|
|
2678
|
-
reason: "policy_invalid";
|
|
2679
|
-
retryable: false;
|
|
2680
|
-
status: "rejected";
|
|
2681
2681
|
} | {
|
|
2682
2682
|
reason: "provider_pending";
|
|
2683
2683
|
retryable: true;
|
|
@@ -7769,6 +7769,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7769
7769
|
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
7770
7770
|
requestKey: string;
|
|
7771
7771
|
result?: {
|
|
7772
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7773
|
+
retryable: false;
|
|
7774
|
+
status: "conflict";
|
|
7775
|
+
} | {
|
|
7776
|
+
reason: "policy_invalid";
|
|
7777
|
+
retryable: false;
|
|
7778
|
+
status: "rejected";
|
|
7779
|
+
} | {
|
|
7772
7780
|
operation: {
|
|
7773
7781
|
accountId: string;
|
|
7774
7782
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7779,14 +7787,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7779
7787
|
} | {
|
|
7780
7788
|
enabled: boolean;
|
|
7781
7789
|
status: "unchanged";
|
|
7782
|
-
} | {
|
|
7783
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7784
|
-
retryable: false;
|
|
7785
|
-
status: "conflict";
|
|
7786
|
-
} | {
|
|
7787
|
-
reason: "policy_invalid";
|
|
7788
|
-
retryable: false;
|
|
7789
|
-
status: "rejected";
|
|
7790
7790
|
} | {
|
|
7791
7791
|
reason: "provider_pending";
|
|
7792
7792
|
retryable: true;
|
|
@@ -7797,6 +7797,14 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7797
7797
|
payload: import("convex/values").VString<string, "required">;
|
|
7798
7798
|
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
7799
7799
|
result: import("convex/values").VUnion<{
|
|
7800
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7801
|
+
retryable: false;
|
|
7802
|
+
status: "conflict";
|
|
7803
|
+
} | {
|
|
7804
|
+
reason: "policy_invalid";
|
|
7805
|
+
retryable: false;
|
|
7806
|
+
status: "rejected";
|
|
7807
|
+
} | {
|
|
7800
7808
|
operation: {
|
|
7801
7809
|
accountId: string;
|
|
7802
7810
|
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
@@ -7807,14 +7815,6 @@ export declare function withHistory(count?: number, amount?: number): Promise<{
|
|
|
7807
7815
|
} | {
|
|
7808
7816
|
enabled: boolean;
|
|
7809
7817
|
status: "unchanged";
|
|
7810
|
-
} | {
|
|
7811
|
-
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
7812
|
-
retryable: false;
|
|
7813
|
-
status: "conflict";
|
|
7814
|
-
} | {
|
|
7815
|
-
reason: "policy_invalid";
|
|
7816
|
-
retryable: false;
|
|
7817
|
-
status: "rejected";
|
|
7818
7818
|
} | {
|
|
7819
7819
|
reason: "provider_pending";
|
|
7820
7820
|
retryable: true;
|