@fantastic.dev/better-stripe 0.110.0 → 0.112.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/client/billing/renewalAttach/internal/observation/freshActor.d.ts +564 -0
  4. package/dist/client/billing/renewalAttach/internal/observation/freshActor.d.ts.map +1 -1
  5. package/dist/client/billing/renewalAttach/internal/observation/freshActor.js +103 -21
  6. package/dist/client/billing/renewalAttach/internal/observation/freshActor.js.map +1 -1
  7. package/dist/client/billing/renewalAttach/internal/observation/freshTransport.d.ts +18 -1
  8. package/dist/client/billing/renewalAttach/internal/observation/freshTransport.d.ts.map +1 -1
  9. package/dist/client/billing/renewalAttach/internal/observation/freshTransport.js +54 -1
  10. package/dist/client/billing/renewalAttach/internal/observation/freshTransport.js.map +1 -1
  11. package/dist/client/billing/renewalAttach/internal/observation/invocation.d.ts +4 -0
  12. package/dist/client/billing/renewalAttach/internal/observation/invocation.d.ts.map +1 -1
  13. package/dist/client/billing/renewalAttach/internal/observation/invocation.js +1 -0
  14. package/dist/client/billing/renewalAttach/internal/observation/invocation.js.map +1 -1
  15. package/dist/client/billing/renewalAttach/internal/observation/readerAuthorization.d.ts +4 -0
  16. package/dist/client/billing/renewalAttach/internal/observation/readerAuthorization.d.ts.map +1 -1
  17. package/dist/client/billing/renewalAttach/internal/observation/readerAuthorization.js +6 -1
  18. package/dist/client/billing/renewalAttach/internal/observation/readerAuthorization.js.map +1 -1
  19. package/dist/client/billing/renewalAttach/internal/observation/witnessAuthorization.d.ts +38 -0
  20. package/dist/client/billing/renewalAttach/internal/observation/witnessAuthorization.d.ts.map +1 -0
  21. package/dist/client/billing/renewalAttach/internal/observation/witnessAuthorization.js +172 -0
  22. package/dist/client/billing/renewalAttach/internal/observation/witnessAuthorization.js.map +1 -0
  23. package/dist/client/billing/renewalAttach/internal/observation/witnessData.d.ts +135 -0
  24. package/dist/client/billing/renewalAttach/internal/observation/witnessData.d.ts.map +1 -0
  25. package/dist/client/billing/renewalAttach/internal/observation/witnessData.js +143 -0
  26. package/dist/client/billing/renewalAttach/internal/observation/witnessData.js.map +1 -0
  27. package/dist/client/billing/renewalAttach/internal/observation/witnessOperation.d.ts +85 -0
  28. package/dist/client/billing/renewalAttach/internal/observation/witnessOperation.d.ts.map +1 -0
  29. package/dist/client/billing/renewalAttach/internal/observation/witnessOperation.js +121 -0
  30. package/dist/client/billing/renewalAttach/internal/observation/witnessOperation.js.map +1 -0
  31. package/dist/client/billing/renewalAttach/internal/operations/witnessProfiles.d.ts +44 -0
  32. package/dist/client/billing/renewalAttach/internal/operations/witnessProfiles.d.ts.map +1 -0
  33. package/dist/client/billing/renewalAttach/internal/operations/witnessProfiles.js +4 -0
  34. package/dist/client/billing/renewalAttach/internal/operations/witnessProfiles.js.map +1 -0
  35. package/dist/client/billing/renewalAttach/internal/producer/configureJournalWork.d.ts +1 -1
  36. package/dist/client/billing/renewalAttach/internal/producer/configureLineage.d.ts +21 -21
  37. package/dist/client/billing/renewalAttach/internal/producer/journalWorkFactory.d.ts +3 -3
  38. package/dist/client/billing/renewalAttach/internal/producer/operationFactory.d.ts +1 -1
  39. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +84 -32
  40. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  41. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +26 -0
  42. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  43. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +84 -32
  44. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  45. package/dist/client/connect/payoutSyncTestHelpers.d.ts +26 -0
  46. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  47. package/dist/component/_generated/api.d.ts +24 -0
  48. package/dist/component/_generated/api.d.ts.map +1 -1
  49. package/dist/component/_generated/api.js.map +1 -1
  50. package/dist/component/_generated/component.d.ts +94 -10
  51. package/dist/component/_generated/component.d.ts.map +1 -1
  52. package/dist/component/balanceFunding/internal/actions.d.ts +11 -11
  53. package/dist/component/balanceFunding/mutations.d.ts +16 -16
  54. package/dist/component/balanceFunding/preparationHandlers.d.ts +8 -8
  55. package/dist/component/balanceFunding/queries.d.ts +1 -1
  56. package/dist/component/balanceFunding/workflowValidators.d.ts +16 -16
  57. package/dist/component/earnings/triggers.d.ts +44 -0
  58. package/dist/component/earnings/triggers.d.ts.map +1 -1
  59. package/dist/component/financialObservations/settlementHelpers.d.ts +3 -3
  60. package/dist/component/renewalWitnesses/eligibility.d.ts +36 -0
  61. package/dist/component/renewalWitnesses/eligibility.d.ts.map +1 -0
  62. package/dist/component/renewalWitnesses/eligibility.js +60 -0
  63. package/dist/component/renewalWitnesses/eligibility.js.map +1 -0
  64. package/dist/component/renewalWitnesses/mutations.d.ts +45 -0
  65. package/dist/component/renewalWitnesses/mutations.d.ts.map +1 -0
  66. package/dist/component/renewalWitnesses/mutations.js +14 -0
  67. package/dist/component/renewalWitnesses/mutations.js.map +1 -0
  68. package/dist/component/renewalWitnesses/protocol.d.ts +75 -0
  69. package/dist/component/renewalWitnesses/protocol.d.ts.map +1 -0
  70. package/dist/component/renewalWitnesses/protocol.js +82 -0
  71. package/dist/component/renewalWitnesses/protocol.js.map +1 -0
  72. package/dist/component/renewalWitnesses/queries.d.ts +39 -0
  73. package/dist/component/renewalWitnesses/queries.d.ts.map +1 -0
  74. package/dist/component/renewalWitnesses/queries.js +11 -0
  75. package/dist/component/renewalWitnesses/queries.js.map +1 -0
  76. package/dist/component/renewalWitnesses/schema.d.ts +99 -0
  77. package/dist/component/renewalWitnesses/schema.d.ts.map +1 -0
  78. package/dist/component/renewalWitnesses/schema.js +36 -0
  79. package/dist/component/renewalWitnesses/schema.js.map +1 -0
  80. package/dist/component/renewalWitnesses/source.d.ts +22 -0
  81. package/dist/component/renewalWitnesses/source.d.ts.map +1 -0
  82. package/dist/component/renewalWitnesses/source.js +108 -0
  83. package/dist/component/renewalWitnesses/source.js.map +1 -0
  84. package/dist/component/schema.d.ts +42 -16
  85. package/dist/component/schema.js +2 -0
  86. package/dist/component/schema.js.map +1 -1
  87. package/dist/component/usage/allowance.fixtures.d.ts +42 -16
  88. package/dist/component/usage/allowance.fixtures.d.ts.map +1 -1
  89. package/dist/component/usageCredits/accounting.fixtures.d.ts +26 -0
  90. package/dist/component/usageCredits/accounting.fixtures.d.ts.map +1 -1
  91. package/dist/shared/renewalWitness.d.ts +51 -0
  92. package/dist/shared/renewalWitness.d.ts.map +1 -0
  93. package/dist/shared/renewalWitness.js +127 -0
  94. package/dist/shared/renewalWitness.js.map +1 -0
  95. package/docs/renewal-witness-protocol.md +139 -0
  96. package/package.json +1 -1
  97. package/src/client/billing/renewalAttach/internal/observation/freshActor.ts +142 -19
  98. package/src/client/billing/renewalAttach/internal/observation/freshTransport.ts +90 -1
  99. package/src/client/billing/renewalAttach/internal/observation/invocation.ts +2 -0
  100. package/src/client/billing/renewalAttach/internal/observation/readerAuthorization.ts +6 -1
  101. package/src/client/billing/renewalAttach/internal/observation/witnessAcquisition.integration.test.ts +348 -0
  102. package/src/client/billing/renewalAttach/internal/observation/witnessActor.integration.test.ts +204 -0
  103. package/src/client/billing/renewalAttach/internal/observation/witnessAuthorization.ts +239 -0
  104. package/src/client/billing/renewalAttach/internal/observation/witnessCapabilities.integration.test.ts +231 -0
  105. package/src/client/billing/renewalAttach/internal/observation/witnessData.ts +189 -0
  106. package/src/client/billing/renewalAttach/internal/observation/witnessHistorical.integration.test.ts +98 -0
  107. package/src/client/billing/renewalAttach/internal/observation/witnessImmutable.integration.test.ts +78 -0
  108. package/src/client/billing/renewalAttach/internal/observation/witnessInvoice.integration.test.ts +85 -0
  109. package/src/client/billing/renewalAttach/internal/observation/witnessLifecycle.integration.test.ts +264 -0
  110. package/src/client/billing/renewalAttach/internal/observation/witnessOperation.ts +205 -0
  111. package/src/client/billing/renewalAttach/internal/observation/witnessProfile.integration.test.ts +93 -0
  112. package/src/client/billing/renewalAttach/internal/observation/witnessRPCControls.integration.test.ts +256 -0
  113. package/src/client/billing/renewalAttach/internal/operations/witnessProfiles.ts +58 -0
  114. package/src/client/billing/renewalAttach/internal/test-fixtures/invoiceObservation.ts +3 -1
  115. package/src/client/billing/renewalAttach/internal/test-fixtures/producerConfigureAdmission.ts +8 -0
  116. package/src/client/billing/renewalAttach/internal/test-fixtures/producerInitialOperation.ts +18 -7
  117. package/src/client/billing/renewalAttach/internal/test-fixtures/witnessHistory.ts +70 -0
  118. package/src/client/billing/renewalAttach/internal/test-fixtures/witnessObservation.ts +353 -0
  119. package/src/component/_generated/api.ts +24 -0
  120. package/src/component/_generated/component.ts +98 -10
  121. package/src/component/renewalOperations/configureJournal.fixtures.ts +25 -3
  122. package/src/component/renewalWitnesses/bounds.test.ts +204 -0
  123. package/src/component/renewalWitnesses/codec.test.ts +84 -0
  124. package/src/component/renewalWitnesses/controls.test.ts +250 -0
  125. package/src/component/renewalWitnesses/eligibility.ts +78 -0
  126. package/src/component/renewalWitnesses/mutations.ts +17 -0
  127. package/src/component/renewalWitnesses/protocol.test.ts +63 -0
  128. package/src/component/renewalWitnesses/protocol.ts +103 -0
  129. package/src/component/renewalWitnesses/queries.ts +11 -0
  130. package/src/component/renewalWitnesses/routes.test.ts +154 -0
  131. package/src/component/renewalWitnesses/schema.ts +36 -0
  132. package/src/component/renewalWitnesses/source.ts +157 -0
  133. package/src/component/schema.ts +2 -0
  134. package/src/shared/renewalWitness.ts +179 -0
@@ -0,0 +1,121 @@
1
+ import { closed, freeze } from "../c10/ownData.js";
2
+ import { matchConfigureDATA } from "../producer/configureJournalData.js";
3
+ import { readCheckedJournalActionRPC } from "../producer/classOwnedActionRoot.js";
4
+ import { readObservationInvocation } from "./invocation.js";
5
+ import { readFreshObservationTransport, consumeFreshObservationAcquisition, } from "./freshTransport.js";
6
+ import { captureReaderQueryDATA, readerText as text, } from "./readerAuthorization.js";
7
+ import { createWitnessAuthorization, witnessRPC, witnessAddress, witnessProfileGuard, } from "./witnessAuthorization.js";
8
+ import { captureWitnessPayload, inspectWitnessPayload, checkedWitnessDescriptor, checkWitnessC7, } from "./witnessData.js";
9
+ import { inspectHistoricalMaterialEvidenceV1 } from "../../../renewalObservation/evidence-material.js";
10
+ import { witnessNeed as need, } from "../../../../../shared/renewalWitness.js";
11
+ /** Actor-private protocol. Caller DATA cannot register a token, grant or returned ACK. */
12
+ export function createWitnessOperation(token, profile, mode, identity) {
13
+ need(arguments.length === 4);
14
+ const state = readObservationInvocation(token), rpc = readCheckedJournalActionRPC(state.binding);
15
+ const transport = readFreshObservationTransport(token, profile.freshProfile, profile.invoiceProfile);
16
+ const refs = rpc.component.renewalWitnesses;
17
+ const retain = refs.mutations.retainAuthorizedWitness, read = refs.queries.readAuthorizedWitness;
18
+ const addresses = [witnessAddress(retain), witnessAddress(read)];
19
+ let authorization = null;
20
+ let stored = null;
21
+ let descriptor = null;
22
+ let used = false;
23
+ function guard() {
24
+ state.guard();
25
+ transport.guard();
26
+ witnessProfileGuard(profile, mode);
27
+ need(readCheckedJournalActionRPC(state.binding) === rpc &&
28
+ profile.freshProfile.historyEntry === state.historyEntry);
29
+ const current = rpc.component.renewalWitnesses;
30
+ need(witnessAddress(current.mutations.retainAuthorizedWitness) ===
31
+ addresses[0] &&
32
+ witnessAddress(current.queries.readAuthorizedWitness) === addresses[1]);
33
+ authorization?.guard();
34
+ }
35
+ async function fullRead() {
36
+ const raw = await witnessRPC(state, () => rpc.runQuery.call(rpc.receiver, read, { identity }), guard);
37
+ const reply = closed(captureReaderQueryDATA(raw), [
38
+ "descriptor",
39
+ "payloadJSON",
40
+ ]);
41
+ return {
42
+ descriptor: reply.descriptor,
43
+ payloadJSON: text(reply.payloadJSON, 500000),
44
+ };
45
+ }
46
+ return Object.freeze({
47
+ guard,
48
+ async retain() {
49
+ need(arguments.length === 0 && mode === "retain" && !used);
50
+ used = true;
51
+ guard();
52
+ const { reads, invoiceContext } = consumeFreshObservationAcquisition(token, profile.freshProfile, profile.invoiceProfile);
53
+ const payloadJSON = captureWitnessPayload(state, identity, reads, invoiceContext);
54
+ const admitted = await state.owned(() => inspectWitnessPayload(payloadJSON), guard);
55
+ checkWitnessC7(admitted.payload, state);
56
+ authorization = createWitnessAuthorization(state, profile, mode, identity, admitted.scope);
57
+ await authorization.authorize();
58
+ guard();
59
+ const raw = await witnessRPC(state, () => rpc.runMutation.call(rpc.receiver, retain, { identity, payloadJSON }), guard);
60
+ const reply = captureReaderQueryDATA(raw);
61
+ if (reply &&
62
+ typeof reply === "object" &&
63
+ Reflect.get(reply, "status") === "conflict") {
64
+ matchConfigureDATA(reply, {
65
+ status: "conflict",
66
+ reason: "identity_changed",
67
+ });
68
+ return freeze({
69
+ status: "conflict",
70
+ reason: "identity_changed",
71
+ });
72
+ }
73
+ const result = closed(reply, ["status", "descriptor"]);
74
+ need(result.status === "retained");
75
+ const retained = checkedWitnessDescriptor(result.descriptor, admitted);
76
+ const readback = await fullRead();
77
+ need(readback.payloadJSON === payloadJSON);
78
+ matchConfigureDATA(checkedWitnessDescriptor(readback.descriptor, admitted), retained);
79
+ guard();
80
+ return freeze({ status: "retained", descriptor: retained });
81
+ },
82
+ async load() {
83
+ need(mode === "read" && !used);
84
+ used = true;
85
+ guard();
86
+ authorization = createWitnessAuthorization(state, profile, mode, identity, null);
87
+ const grant = await authorization.authorize();
88
+ guard();
89
+ const reply = await fullRead();
90
+ const admitted = await state.owned(() => inspectWitnessPayload(reply.payloadJSON), guard);
91
+ matchConfigureDATA(admitted.payload.identity, identity);
92
+ checkWitnessC7(admitted.payload, state);
93
+ matchConfigureDATA(admitted.scope, grant.scope);
94
+ const checked = checkedWitnessDescriptor(reply.descriptor, admitted);
95
+ need(checked.witnessRowId === grant.witnessRowId &&
96
+ checked.payloadBinding === grant.payloadBinding);
97
+ stored = admitted;
98
+ descriptor = checked;
99
+ guard();
100
+ },
101
+ async historicalEvidence() {
102
+ need(mode === "read" && stored && descriptor);
103
+ guard();
104
+ const input = stored.historicalInput;
105
+ const material = await state.owned(() => inspectHistoricalMaterialEvidenceV1(input), guard);
106
+ return { identity: stored.identity, material };
107
+ },
108
+ descriptor() {
109
+ need(mode === "read" && descriptor);
110
+ guard();
111
+ return descriptor;
112
+ },
113
+ async finalize() {
114
+ need(authorization);
115
+ guard();
116
+ await authorization.authorize();
117
+ guard();
118
+ },
119
+ });
120
+ }
121
+ //# sourceMappingURL=witnessOperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witnessOperation.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/observation/witnessOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,GACnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,UAAU,IAAI,IAAI,GACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,0BAA0B,EAC1B,UAAU,EACV,cAAc,EACd,mBAAmB,GAGpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,cAAc,GAEf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mCAAmC,EAAE,MAAM,kDAAkD,CAAC;AACvG,OAAO,EACL,WAAW,IAAI,IAAI,GAEpB,MAAM,yCAAyC,CAAC;AAEjD,0FAA0F;AAC1F,MAAM,UAAU,sBAAsB,CACpC,KAAa,EACb,OAAuB,EACvB,IAAiB,EACjB,QAAyB;IAEzB,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK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,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,EAChD,KAAK,CACN,CAAC;YACF,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC;QACjD,CAAC;QACD,UAAU;YACR,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,UAAU,CAAC,CAAC;YACpC,KAAK,EAAE,CAAC;YACR,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,KAAK,CAAC,QAAQ;YACZ,IAAI,CAAC,aAAa,CAAC,CAAC;YACpB,KAAK,EAAE,CAAC;YACR,MAAM,aAAa,CAAC,SAAS,EAAE,CAAC;YAChC,KAAK,EAAE,CAAC;QACV,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { FunctionReference } from "convex/server";
2
+ import type { WitnessIdentity } from "../../../../../shared/renewalWitness.js";
3
+ import type { FreshObservationProfile, InvoiceObservationProfile } from "./sourceOperations.js";
4
+ export type WitnessScope = Readonly<{
5
+ identity: WitnessIdentity;
6
+ providerScope: Readonly<{
7
+ mode: "platform";
8
+ stripeAccount: null;
9
+ livemode: boolean;
10
+ customerAccountId: string;
11
+ customerId: string;
12
+ subscriptionId: string;
13
+ scheduleId: string;
14
+ }>;
15
+ configureRequestBinding: string;
16
+ observedItemId: string;
17
+ nativePeriod: Readonly<{
18
+ start: number;
19
+ end: number;
20
+ }>;
21
+ }>;
22
+ export type WitnessRetentionArgs = {
23
+ capability: "renewal_witness_retain_v1";
24
+ scope: WitnessScope;
25
+ };
26
+ export type WitnessReadArgs = {
27
+ capability: "renewal_witness_read_v1";
28
+ identity: WitnessIdentity;
29
+ };
30
+ type BaseProfile = Readonly<{
31
+ freshProfile: FreshObservationProfile;
32
+ invoiceProfile: InvoiceObservationProfile | null;
33
+ }>;
34
+ export type WitnessCaptureProfile = BaseProfile & Readonly<{
35
+ authorizationQuery: FunctionReference<"query", "public" | "internal", WitnessRetentionArgs, unknown>;
36
+ }>;
37
+ export type WitnessReadProfile = BaseProfile & Readonly<{
38
+ authorizationQuery: FunctionReference<"query", "public" | "internal", WitnessReadArgs, unknown>;
39
+ }>;
40
+ /** Fixed Source associations only. Returned DATA cannot populate these profiles. */
41
+ export declare const COMPILED_WITNESS_CAPTURE_ENTRIES: readonly WitnessCaptureProfile[];
42
+ export declare const COMPILED_WITNESS_READ_ENTRIES: readonly WitnessReadProfile[];
43
+ export {};
44
+ //# sourceMappingURL=witnessProfiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witnessProfiles.d.ts","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/witnessProfiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,eAAe,CAAC;IAC1B,aAAa,EAAE,QAAQ,CAAC;QACtB,IAAI,EAAE,UAAU,CAAC;QACjB,aAAa,EAAE,IAAI,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;QAClB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,QAAQ,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,2BAA2B,CAAC;IACxC,KAAK,EAAE,YAAY,CAAC;CACrB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,yBAAyB,CAAC;IACtC,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AACF,KAAK,WAAW,GAAG,QAAQ,CAAC;IAC1B,YAAY,EAAE,uBAAuB,CAAC;IACtC,cAAc,EAAE,yBAAyB,GAAG,IAAI,CAAC;CAClD,CAAC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAC7C,QAAQ,CAAC;IACP,kBAAkB,EAAE,iBAAiB,CACnC,OAAO,EACP,QAAQ,GAAG,UAAU,EACrB,oBAAoB,EACpB,OAAO,CACR,CAAC;CACH,CAAC,CAAC;AACL,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAC1C,QAAQ,CAAC;IACP,kBAAkB,EAAE,iBAAiB,CACnC,OAAO,EACP,QAAQ,GAAG,UAAU,EACrB,eAAe,EACf,OAAO,CACR,CAAC;CACH,CAAC,CAAC;AAEL,oFAAoF;AACpF,eAAO,MAAM,gCAAgC,EAAE,SAAS,qBAAqB,EAC1D,CAAC;AACpB,eAAO,MAAM,6BAA6B,EAAE,SAAS,kBAAkB,EACpD,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Fixed Source associations only. Returned DATA cannot populate these profiles. */
2
+ export const COMPILED_WITNESS_CAPTURE_ENTRIES = Object.freeze([]);
3
+ export const COMPILED_WITNESS_READ_ENTRIES = Object.freeze([]);
4
+ //# sourceMappingURL=witnessProfiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"witnessProfiles.js","sourceRoot":"","sources":["../../../../../../src/client/billing/renewalAttach/internal/operations/witnessProfiles.ts"],"names":[],"mappings":"AAqDA,oFAAoF;AACpF,MAAM,CAAC,MAAM,gCAAgC,GAC3C,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACpB,MAAM,CAAC,MAAM,6BAA6B,GACxC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
@@ -12,7 +12,7 @@ export declare function journalWorkForConfigureLineage(token: object): Readonly<
12
12
  responsePayloadId: string;
13
13
  schemaVersion: 1;
14
14
  sourcePayloadId: string;
15
- stage: "attach";
15
+ stage: "attach" | "configure";
16
16
  status: "retained";
17
17
  }>;
18
18
  idle(): boolean;
@@ -125,7 +125,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
125
125
  recordJSON: string;
126
126
  recordVersion: 2;
127
127
  requestBinding: string;
128
- stage: "attach";
128
+ stage: "attach" | "configure";
129
129
  timingPolicyJSON: string;
130
130
  }>;
131
131
  journal: Readonly<{
@@ -166,7 +166,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
166
166
  recordJSON: string;
167
167
  recordVersion: 2;
168
168
  requestBinding: string;
169
- stage: "attach";
169
+ stage: "attach" | "configure";
170
170
  timingPolicyJSON: string;
171
171
  }): (record: Readonly<import("../c10/ownData.js").EventRecord>, ack: (value: unknown) => void) => Promise<void>;
172
172
  loadAuthorizedOperation(): Promise<{
@@ -194,7 +194,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
194
194
  preparedRevision: 0;
195
195
  recordVersion: 2;
196
196
  requestBinding: string;
197
- stage: "attach";
197
+ stage: "attach" | "configure";
198
198
  timingPolicyJSON: string;
199
199
  };
200
200
  initialBasis: null | {
@@ -202,7 +202,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
202
202
  basisJSON: string;
203
203
  policyJSON: string;
204
204
  sourcePayloadId: string;
205
- stage: "attach";
205
+ stage: "attach" | "configure";
206
206
  version: 1;
207
207
  };
208
208
  operationId: string;
@@ -280,7 +280,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
280
280
  recordJSON: string;
281
281
  recordVersion: 2;
282
282
  requestBinding: string;
283
- stage: "attach";
283
+ stage: "attach" | "configure";
284
284
  timingPolicyJSON: string;
285
285
  };
286
286
  } | {
@@ -323,7 +323,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
323
323
  recordJSON: string;
324
324
  recordVersion: 2;
325
325
  requestBinding: string;
326
- stage: "attach";
326
+ stage: "attach" | "configure";
327
327
  timingPolicyJSON: string;
328
328
  };
329
329
  } | {
@@ -376,7 +376,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
376
376
  recordJSON: string;
377
377
  recordVersion: 2;
378
378
  requestBinding: string;
379
- stage: "attach";
379
+ stage: "attach" | "configure";
380
380
  timingPolicyJSON: string;
381
381
  };
382
382
  } | {
@@ -419,7 +419,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
419
419
  recordJSON: string;
420
420
  recordVersion: 2;
421
421
  requestBinding: string;
422
- stage: "attach";
422
+ stage: "attach" | "configure";
423
423
  timingPolicyJSON: string;
424
424
  };
425
425
  } | {
@@ -437,7 +437,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
437
437
  basisJSON: string;
438
438
  policyJSON: string;
439
439
  sourcePayloadId: string;
440
- stage: "attach";
440
+ stage: "attach" | "configure";
441
441
  version: 1;
442
442
  };
443
443
  operationId: string;
@@ -453,7 +453,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
453
453
  basisJSON: string;
454
454
  policyJSON: string;
455
455
  sourcePayloadId: string;
456
- stage: "attach";
456
+ stage: "attach" | "configure";
457
457
  version: 1;
458
458
  };
459
459
  operationId: string;
@@ -503,7 +503,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
503
503
  recordJSON: string;
504
504
  recordVersion: 2;
505
505
  requestBinding: string;
506
- stage: "attach";
506
+ stage: "attach" | "configure";
507
507
  timingPolicyJSON: string;
508
508
  };
509
509
  }, {
@@ -549,7 +549,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
549
549
  recordJSON: string;
550
550
  recordVersion: 2;
551
551
  requestBinding: string;
552
- stage: "attach";
552
+ stage: "attach" | "configure";
553
553
  timingPolicyJSON: string;
554
554
  };
555
555
  sequence: 1 | 2 | 3;
@@ -599,7 +599,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
599
599
  recordJSON: string;
600
600
  recordVersion: 2;
601
601
  requestBinding: string;
602
- stage: "attach";
602
+ stage: "attach" | "configure";
603
603
  timingPolicyJSON: string;
604
604
  };
605
605
  }, {
@@ -645,7 +645,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
645
645
  recordJSON: string;
646
646
  recordVersion: 2;
647
647
  requestBinding: string;
648
- stage: "attach";
648
+ stage: "attach" | "configure";
649
649
  timingPolicyJSON: string;
650
650
  };
651
651
  sequence: 1 | 2 | 3;
@@ -703,7 +703,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
703
703
  recordJSON: string;
704
704
  recordVersion: 2;
705
705
  requestBinding: string;
706
- stage: "attach";
706
+ stage: "attach" | "configure";
707
707
  timingPolicyJSON: string;
708
708
  };
709
709
  } | null, string | undefined>>, "operationId">): Promise<import("convex/server").FunctionReturnType<import("convex/server").FunctionReference<"query", "internal", {
@@ -757,7 +757,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
757
757
  recordJSON: string;
758
758
  recordVersion: 2;
759
759
  requestBinding: string;
760
- stage: "attach";
760
+ stage: "attach" | "configure";
761
761
  timingPolicyJSON: string;
762
762
  };
763
763
  } | null, string | undefined>>>;
@@ -806,7 +806,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
806
806
  responsePayloadId: string;
807
807
  schemaVersion: 1;
808
808
  sourcePayloadId: string;
809
- stage: "attach";
809
+ stage: "attach" | "configure";
810
810
  status: "retained";
811
811
  }, string | undefined>>, "operationId">): Promise<import("convex/server").FunctionReturnType<import("convex/server").FunctionReference<"mutation", "internal", {
812
812
  attemptId: string;
@@ -824,7 +824,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
824
824
  responsePayloadId: string;
825
825
  schemaVersion: 1;
826
826
  sourcePayloadId: string;
827
- stage: "attach";
827
+ stage: "attach" | "configure";
828
828
  status: "retained";
829
829
  }, string | undefined>>>;
830
830
  readProviderAcknowledgement(): Promise<import("convex/server").FunctionReturnType<import("convex/server").FunctionReference<"query", "internal", {
@@ -842,7 +842,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
842
842
  responsePayloadId: string;
843
843
  schemaVersion: 1;
844
844
  sourcePayloadId: string;
845
- stage: "attach";
845
+ stage: "attach" | "configure";
846
846
  status: "retained";
847
847
  };
848
848
  } | null, string | undefined>>>;
@@ -900,7 +900,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
900
900
  recordJSON: string;
901
901
  recordVersion: 2;
902
902
  requestBinding: string;
903
- stage: "attach";
903
+ stage: "attach" | "configure";
904
904
  timingPolicyJSON: string;
905
905
  };
906
906
  } | {
@@ -943,7 +943,7 @@ export declare function readConfigureLineage(token: object): Readonly<{
943
943
  recordJSON: string;
944
944
  recordVersion: 2;
945
945
  requestBinding: string;
946
- stage: "attach";
946
+ stage: "attach" | "configure";
947
947
  timingPolicyJSON: string;
948
948
  };
949
949
  } | {
@@ -17,7 +17,7 @@ export declare function journalWorkForInitialLineage(token: object): Readonly<{
17
17
  responsePayloadId: string;
18
18
  schemaVersion: 1;
19
19
  sourcePayloadId: string;
20
- stage: "attach";
20
+ stage: "attach" | "configure";
21
21
  status: "retained";
22
22
  }, string | undefined>>, "operationId">) => Promise<import("convex/server").FunctionReturnType<import("convex/server").FunctionReference<"mutation", "internal", {
23
23
  attemptId: string;
@@ -35,7 +35,7 @@ export declare function journalWorkForInitialLineage(token: object): Readonly<{
35
35
  responsePayloadId: string;
36
36
  schemaVersion: 1;
37
37
  sourcePayloadId: string;
38
- stage: "attach";
38
+ stage: "attach" | "configure";
39
39
  status: "retained";
40
40
  }, string | undefined>>>>[0]): Promise<{
41
41
  attemptId: string;
@@ -48,7 +48,7 @@ export declare function journalWorkForInitialLineage(token: object): Readonly<{
48
48
  responsePayloadId: string;
49
49
  schemaVersion: 1;
50
50
  sourcePayloadId: string;
51
- stage: "attach";
51
+ stage: "attach" | "configure";
52
52
  status: "retained";
53
53
  }>;
54
54
  idle(): boolean;
@@ -59,7 +59,7 @@ export declare function retainInitialReceiptForLineage(token: object, receipt: u
59
59
  responsePayloadId: string;
60
60
  schemaVersion: 1;
61
61
  sourcePayloadId: string;
62
- stage: "attach";
62
+ stage: "attach" | "configure";
63
63
  status: "retained";
64
64
  }>;
65
65
  //# sourceMappingURL=operationFactory.d.ts.map
@@ -9,6 +9,32 @@ export declare const scope: {
9
9
  };
10
10
  export declare function setup(amounts?: number[], currency?: string): Promise<{
11
11
  t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
12
+ renewalObservationWitnesses: import("convex/server").TableDefinition<import("convex/values").VObject<{
13
+ identity: {
14
+ componentScope: string;
15
+ operationId: import("convex/values").GenericId<"renewalOperations">;
16
+ parentOperationId: import("convex/values").GenericId<"renewalOperations">;
17
+ witnessId: string;
18
+ };
19
+ payloadBinding: string;
20
+ payloadJSON: string;
21
+ }, {
22
+ identity: import("convex/values").VObject<{
23
+ componentScope: string;
24
+ operationId: import("convex/values").GenericId<"renewalOperations">;
25
+ parentOperationId: import("convex/values").GenericId<"renewalOperations">;
26
+ witnessId: string;
27
+ }, {
28
+ componentScope: import("convex/values").VString<string, "required">;
29
+ witnessId: import("convex/values").VString<string, "required">;
30
+ parentOperationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
31
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
32
+ }, "required", "componentScope" | "operationId" | "parentOperationId" | "witnessId">;
33
+ payloadJSON: import("convex/values").VString<string, "required">;
34
+ payloadBinding: import("convex/values").VString<string, "required">;
35
+ }, "required", "identity" | "identity.componentScope" | "identity.operationId" | "identity.parentOperationId" | "identity.witnessId" | "payloadBinding" | "payloadJSON">, {
36
+ by_componentScope_and_witnessId: ["identity.componentScope", "identity.witnessId", "_creationTime"];
37
+ }, {}, {}>;
12
38
  renewalOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
13
39
  activeAttemptId?: import("convex/values").GenericId<"renewalOperationAttempts"> | undefined;
14
40
  authorizationId: string;
@@ -2641,6 +2667,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
2641
2667
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
2642
2668
  requestKey: string;
2643
2669
  result?: {
2670
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
2671
+ retryable: false;
2672
+ status: "conflict";
2673
+ } | {
2674
+ reason: "policy_invalid";
2675
+ retryable: false;
2676
+ status: "rejected";
2677
+ } | {
2644
2678
  operation: {
2645
2679
  accountId: string;
2646
2680
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2651,14 +2685,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
2651
2685
  } | {
2652
2686
  enabled: boolean;
2653
2687
  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
2688
  } | {
2663
2689
  reason: "provider_pending";
2664
2690
  retryable: true;
@@ -2669,6 +2695,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
2669
2695
  payload: import("convex/values").VString<string, "required">;
2670
2696
  preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
2671
2697
  result: import("convex/values").VUnion<{
2698
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
2699
+ retryable: false;
2700
+ status: "conflict";
2701
+ } | {
2702
+ reason: "policy_invalid";
2703
+ retryable: false;
2704
+ status: "rejected";
2705
+ } | {
2672
2706
  operation: {
2673
2707
  accountId: string;
2674
2708
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -2679,14 +2713,6 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
2679
2713
  } | {
2680
2714
  enabled: boolean;
2681
2715
  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
2716
  } | {
2691
2717
  reason: "provider_pending";
2692
2718
  retryable: true;
@@ -5145,6 +5171,32 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
5145
5171
  }>;
5146
5172
  export declare function historical(currency?: string): Promise<{
5147
5173
  t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
5174
+ renewalObservationWitnesses: import("convex/server").TableDefinition<import("convex/values").VObject<{
5175
+ identity: {
5176
+ componentScope: string;
5177
+ operationId: import("convex/values").GenericId<"renewalOperations">;
5178
+ parentOperationId: import("convex/values").GenericId<"renewalOperations">;
5179
+ witnessId: string;
5180
+ };
5181
+ payloadBinding: string;
5182
+ payloadJSON: string;
5183
+ }, {
5184
+ identity: import("convex/values").VObject<{
5185
+ componentScope: string;
5186
+ operationId: import("convex/values").GenericId<"renewalOperations">;
5187
+ parentOperationId: import("convex/values").GenericId<"renewalOperations">;
5188
+ witnessId: string;
5189
+ }, {
5190
+ componentScope: import("convex/values").VString<string, "required">;
5191
+ witnessId: import("convex/values").VString<string, "required">;
5192
+ parentOperationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
5193
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"renewalOperations">, "required">;
5194
+ }, "required", "componentScope" | "operationId" | "parentOperationId" | "witnessId">;
5195
+ payloadJSON: import("convex/values").VString<string, "required">;
5196
+ payloadBinding: import("convex/values").VString<string, "required">;
5197
+ }, "required", "identity" | "identity.componentScope" | "identity.operationId" | "identity.parentOperationId" | "identity.witnessId" | "payloadBinding" | "payloadJSON">, {
5198
+ by_componentScope_and_witnessId: ["identity.componentScope", "identity.witnessId", "_creationTime"];
5199
+ }, {}, {}>;
5148
5200
  renewalOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
5149
5201
  activeAttemptId?: import("convex/values").GenericId<"renewalOperationAttempts"> | undefined;
5150
5202
  authorizationId: string;
@@ -7777,6 +7829,14 @@ export declare function historical(currency?: string): Promise<{
7777
7829
  preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
7778
7830
  requestKey: string;
7779
7831
  result?: {
7832
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
7833
+ retryable: false;
7834
+ status: "conflict";
7835
+ } | {
7836
+ reason: "policy_invalid";
7837
+ retryable: false;
7838
+ status: "rejected";
7839
+ } | {
7780
7840
  operation: {
7781
7841
  accountId: string;
7782
7842
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -7787,14 +7847,6 @@ export declare function historical(currency?: string): Promise<{
7787
7847
  } | {
7788
7848
  enabled: boolean;
7789
7849
  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
7850
  } | {
7799
7851
  reason: "provider_pending";
7800
7852
  retryable: true;
@@ -7805,6 +7857,14 @@ export declare function historical(currency?: string): Promise<{
7805
7857
  payload: import("convex/values").VString<string, "required">;
7806
7858
  preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
7807
7859
  result: import("convex/values").VUnion<{
7860
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
7861
+ retryable: false;
7862
+ status: "conflict";
7863
+ } | {
7864
+ reason: "policy_invalid";
7865
+ retryable: false;
7866
+ status: "rejected";
7867
+ } | {
7808
7868
  operation: {
7809
7869
  accountId: string;
7810
7870
  operationId: import("convex/values").GenericId<"balanceFundingOperations">;
@@ -7815,14 +7875,6 @@ export declare function historical(currency?: string): Promise<{
7815
7875
  } | {
7816
7876
  enabled: boolean;
7817
7877
  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
7878
  } | {
7827
7879
  reason: "provider_pending";
7828
7880
  retryable: true;