@fantastic.dev/better-stripe 0.24.0 → 0.25.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 (147) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +7 -1
  3. package/dist/client/billing/checkout.d.ts +3 -43
  4. package/dist/client/billing/checkout.d.ts.map +1 -1
  5. package/dist/client/billing/checkout.js +5 -260
  6. package/dist/client/billing/checkout.js.map +1 -1
  7. package/dist/client/billing/checkoutRequest.d.ts +129 -0
  8. package/dist/client/billing/checkoutRequest.d.ts.map +1 -0
  9. package/dist/client/billing/checkoutRequest.js +263 -0
  10. package/dist/client/billing/checkoutRequest.js.map +1 -0
  11. package/dist/client/billing/preparedCheckout.d.ts +22 -0
  12. package/dist/client/billing/preparedCheckout.d.ts.map +1 -0
  13. package/dist/client/billing/preparedCheckout.js +86 -0
  14. package/dist/client/billing/preparedCheckout.js.map +1 -0
  15. package/dist/client/checkoutRequests.d.ts +80 -0
  16. package/dist/client/checkoutRequests.d.ts.map +1 -0
  17. package/dist/client/checkoutRequests.js +28 -0
  18. package/dist/client/checkoutRequests.js.map +1 -0
  19. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +464 -0
  20. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  21. package/dist/client/connect/payoutCollection.d.ts +21 -0
  22. package/dist/client/connect/payoutCollection.d.ts.map +1 -0
  23. package/dist/client/connect/payoutCollection.js +47 -0
  24. package/dist/client/connect/payoutCollection.js.map +1 -0
  25. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +1805 -0
  26. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -0
  27. package/dist/client/connect/payoutExecutionTestHelpers.js +194 -0
  28. package/dist/client/connect/payoutExecutionTestHelpers.js.map +1 -0
  29. package/dist/client/connect/payoutSyncTestHelpers.d.ts +232 -0
  30. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  31. package/dist/client/connect/payoutWorker.d.ts +48 -0
  32. package/dist/client/connect/payoutWorker.d.ts.map +1 -0
  33. package/dist/client/connect/payoutWorker.js +78 -0
  34. package/dist/client/connect/payoutWorker.js.map +1 -0
  35. package/dist/client/index.d.ts +4 -11
  36. package/dist/client/index.d.ts.map +1 -1
  37. package/dist/client/index.js +4 -9
  38. package/dist/client/index.js.map +1 -1
  39. package/dist/client/payoutPolicy.d.ts +67 -0
  40. package/dist/client/payoutPolicy.d.ts.map +1 -1
  41. package/dist/client/payoutPolicy.js +10 -0
  42. package/dist/client/payoutPolicy.js.map +1 -1
  43. package/dist/client/readContracts.d.ts +11 -1
  44. package/dist/client/readContracts.d.ts.map +1 -1
  45. package/dist/client/readContracts.js +10 -0
  46. package/dist/client/readContracts.js.map +1 -1
  47. package/dist/component/_generated/component.d.ts +293 -0
  48. package/dist/component/_generated/component.d.ts.map +1 -1
  49. package/dist/component/core/mutations.d.ts.map +1 -1
  50. package/dist/component/core/mutations.js +2 -0
  51. package/dist/component/core/mutations.js.map +1 -1
  52. package/dist/component/core/resetSafety.d.ts +4 -0
  53. package/dist/component/core/resetSafety.d.ts.map +1 -0
  54. package/dist/component/core/resetSafety.js +54 -0
  55. package/dist/component/core/resetSafety.js.map +1 -0
  56. package/dist/component/earnings/triggers.d.ts +418 -0
  57. package/dist/component/earnings/triggers.d.ts.map +1 -1
  58. package/dist/component/earnings/triggers.js +2 -0
  59. package/dist/component/earnings/triggers.js.map +1 -1
  60. package/dist/component/payoutPolicy/schema.d.ts +2 -0
  61. package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
  62. package/dist/component/payoutPolicy/schema.js +3 -1
  63. package/dist/component/payoutPolicy/schema.js.map +1 -1
  64. package/dist/component/payoutRelease/mutations.js +1 -1
  65. package/dist/component/payoutRelease/schema.d.ts +1 -0
  66. package/dist/component/payoutRelease/schema.d.ts.map +1 -1
  67. package/dist/component/payoutRelease/schema.js +1 -0
  68. package/dist/component/payoutRelease/schema.js.map +1 -1
  69. package/dist/component/payoutSnapshots/localState.d.ts +89 -0
  70. package/dist/component/payoutSnapshots/localState.d.ts.map +1 -0
  71. package/dist/component/payoutSnapshots/localState.js +186 -0
  72. package/dist/component/payoutSnapshots/localState.js.map +1 -0
  73. package/dist/component/payoutSnapshots/mutations.d.ts +108 -0
  74. package/dist/component/payoutSnapshots/mutations.d.ts.map +1 -0
  75. package/dist/component/payoutSnapshots/mutations.js +263 -0
  76. package/dist/component/payoutSnapshots/mutations.js.map +1 -0
  77. package/dist/component/payoutSnapshots/revisions.d.ts +12 -0
  78. package/dist/component/payoutSnapshots/revisions.d.ts.map +1 -0
  79. package/dist/component/payoutSnapshots/revisions.js +173 -0
  80. package/dist/component/payoutSnapshots/revisions.js.map +1 -0
  81. package/dist/component/payoutSnapshots/schema.d.ts +285 -0
  82. package/dist/component/payoutSnapshots/schema.d.ts.map +1 -0
  83. package/dist/component/payoutSnapshots/schema.js +108 -0
  84. package/dist/component/payoutSnapshots/schema.js.map +1 -0
  85. package/dist/component/payoutSnapshots/scope.d.ts +7 -0
  86. package/dist/component/payoutSnapshots/scope.d.ts.map +1 -0
  87. package/dist/component/payoutSnapshots/scope.js +8 -0
  88. package/dist/component/payoutSnapshots/scope.js.map +1 -0
  89. package/dist/component/payoutWorker/helpers.d.ts +30 -0
  90. package/dist/component/payoutWorker/helpers.d.ts.map +1 -0
  91. package/dist/component/payoutWorker/helpers.js +21 -0
  92. package/dist/component/payoutWorker/helpers.js.map +1 -0
  93. package/dist/component/payoutWorker/mutations.d.ts +68 -0
  94. package/dist/component/payoutWorker/mutations.d.ts.map +1 -0
  95. package/dist/component/payoutWorker/mutations.js +161 -0
  96. package/dist/component/payoutWorker/mutations.js.map +1 -0
  97. package/dist/component/payoutWorker/queries.d.ts +123 -0
  98. package/dist/component/payoutWorker/queries.d.ts.map +1 -0
  99. package/dist/component/payoutWorker/queries.js +61 -0
  100. package/dist/component/payoutWorker/queries.js.map +1 -0
  101. package/dist/component/payoutWorker/schema.d.ts +91 -0
  102. package/dist/component/payoutWorker/schema.d.ts.map +1 -0
  103. package/dist/component/payoutWorker/schema.js +27 -0
  104. package/dist/component/payoutWorker/schema.js.map +1 -0
  105. package/dist/component/schema.d.ts +232 -0
  106. package/dist/component/schema.js +10 -0
  107. package/dist/component/schema.js.map +1 -1
  108. package/docs/read-contracts.md +48 -0
  109. package/docs/settlement.md +128 -1
  110. package/package.json +1 -1
  111. package/src/client/billing/checkout.ts +11 -359
  112. package/src/client/billing/checkoutRequest.ts +362 -0
  113. package/src/client/billing/prepared-checkout.test.ts +430 -0
  114. package/src/client/billing/preparedCheckout.ts +143 -0
  115. package/src/client/checkoutRequests.ts +40 -0
  116. package/src/client/connect/payoutCollection.test.ts +74 -0
  117. package/src/client/connect/payoutCollection.ts +82 -0
  118. package/src/client/connect/payoutExecution.test.ts +1 -211
  119. package/src/client/connect/payoutExecutionTestHelpers.ts +213 -0
  120. package/src/client/connect/payoutWorker.test.ts +145 -0
  121. package/src/client/connect/payoutWorker.ts +144 -0
  122. package/src/client/index.ts +10 -21
  123. package/src/client/payoutPolicy.ts +26 -1
  124. package/src/client/readContracts.ts +23 -0
  125. package/src/component/_generated/api.ts +16 -0
  126. package/src/component/_generated/component.ts +361 -0
  127. package/src/component/core/mutations.ts +2 -0
  128. package/src/component/core/resetSafety.ts +67 -0
  129. package/src/component/earnings/triggers.ts +2 -0
  130. package/src/component/payout-reset-safety.test.ts +148 -0
  131. package/src/component/payout-revisions.test.ts +125 -0
  132. package/src/component/payout-snapshots.test.ts +395 -0
  133. package/src/component/payout-worker.test.ts +165 -0
  134. package/src/component/payoutPolicy/schema.ts +3 -1
  135. package/src/component/payoutRelease/mutations.ts +1 -1
  136. package/src/component/payoutRelease/schema.ts +1 -0
  137. package/src/component/payoutSnapshots/localState.ts +238 -0
  138. package/src/component/payoutSnapshots/mutations.ts +275 -0
  139. package/src/component/payoutSnapshots/revisions.ts +247 -0
  140. package/src/component/payoutSnapshots/schema.ts +125 -0
  141. package/src/component/payoutSnapshots/scope.ts +7 -0
  142. package/src/component/payoutWorker/helpers.ts +30 -0
  143. package/src/component/payoutWorker/mutations.ts +181 -0
  144. package/src/component/payoutWorker/queries.ts +64 -0
  145. package/src/component/payoutWorker/schema.ts +26 -0
  146. package/src/component/public.test.ts +2 -2
  147. package/src/component/schema.ts +18 -0
@@ -9,6 +9,235 @@ 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
+ payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
13
+ accountId: string;
14
+ cadenceMs: number;
15
+ completedGeneration?: number | undefined;
16
+ completedOperationKey?: string | undefined;
17
+ currency: string;
18
+ generation: number;
19
+ hasOperation: boolean;
20
+ lastAttemptAt?: number | undefined;
21
+ lastReason?: string | undefined;
22
+ leaseUntil?: number | undefined;
23
+ nextAttemptAt: number;
24
+ operationKey?: string | undefined;
25
+ ownerKey: string;
26
+ sequence: number;
27
+ }, {
28
+ accountId: import("convex/values").VString<string, "required">;
29
+ ownerKey: import("convex/values").VString<string, "required">;
30
+ currency: import("convex/values").VString<string, "required">;
31
+ generation: import("convex/values").VFloat64<number, "required">;
32
+ sequence: import("convex/values").VFloat64<number, "required">;
33
+ cadenceMs: import("convex/values").VFloat64<number, "required">;
34
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
35
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
36
+ operationKey: import("convex/values").VString<string | undefined, "optional">;
37
+ hasOperation: import("convex/values").VBoolean<boolean, "required">;
38
+ lastReason: import("convex/values").VString<string | undefined, "optional">;
39
+ lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
40
+ completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
41
+ completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
42
+ }, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
43
+ by_account_currency: ["accountId", "currency", "_creationTime"];
44
+ by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
45
+ }, {}, {}>;
46
+ payoutFinancialRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
47
+ accountId: string;
48
+ revision: number;
49
+ riskRevision: number;
50
+ }, {
51
+ accountId: import("convex/values").VString<string, "required">;
52
+ revision: import("convex/values").VFloat64<number, "required">;
53
+ riskRevision: import("convex/values").VFloat64<number, "required">;
54
+ }, "required", "accountId" | "revision" | "riskRevision">, {
55
+ by_account: ["accountId", "_creationTime"];
56
+ }, {}, {}>;
57
+ payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
58
+ accountId: string;
59
+ key: string;
60
+ kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
61
+ removed?: boolean | undefined;
62
+ riskRevision: number;
63
+ }, {
64
+ accountId: import("convex/values").VString<string, "required">;
65
+ riskRevision: import("convex/values").VFloat64<number, "required">;
66
+ kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "provider_payout" | "transfer", [import("convex/values").VLiteral<"transfer", "required">, import("convex/values").VLiteral<"provider_payout", "required">, import("convex/values").VLiteral<"allocation", "required">, import("convex/values").VLiteral<"claim", "required">, import("convex/values").VLiteral<"fee", "required">], "required", never>;
67
+ key: import("convex/values").VString<string, "required">;
68
+ removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
69
+ }, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
70
+ by_account_revision: ["accountId", "riskRevision", "_creationTime"];
71
+ }, {}, {}>;
72
+ payoutRiskRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
73
+ accountId: string;
74
+ riskRevision: number;
75
+ }, {
76
+ accountId: import("convex/values").VString<string, "required">;
77
+ riskRevision: import("convex/values").VFloat64<number, "required">;
78
+ }, "required", "accountId" | "riskRevision">, {
79
+ by_account: ["accountId", "_creationTime"];
80
+ }, {}, {}>;
81
+ payoutSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
82
+ accountId: string;
83
+ allocationCount: number;
84
+ allocationCursor?: string | undefined;
85
+ claimCount: number;
86
+ claimCursor?: string | undefined;
87
+ deferredPositiveChanges: boolean;
88
+ expectedRevision: number;
89
+ expiresAt: number;
90
+ feeCount: number;
91
+ feeCursor?: string | undefined;
92
+ initialRevision: number;
93
+ initialRiskRevision: number;
94
+ observedRevision: number;
95
+ operationKey: string;
96
+ ownerKey: string;
97
+ phase: "allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources";
98
+ policyMode?: string | undefined;
99
+ policyOperationKey?: string | undefined;
100
+ providerChanged: boolean;
101
+ readOnly: boolean;
102
+ reason?: string | undefined;
103
+ riskRevision: number;
104
+ sourceCount: number;
105
+ sourceCursor?: string | undefined;
106
+ sourceFence: number;
107
+ step: number;
108
+ }, {
109
+ readOnly: import("convex/values").VBoolean<boolean, "required">;
110
+ accountId: import("convex/values").VString<string, "required">;
111
+ ownerKey: import("convex/values").VString<string, "required">;
112
+ operationKey: import("convex/values").VString<string, "required">;
113
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
114
+ policyMode: import("convex/values").VString<string | undefined, "optional">;
115
+ policyOperationKey: import("convex/values").VString<string | undefined, "optional">;
116
+ phase: import("convex/values").VUnion<"allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources", [import("convex/values").VLiteral<"sources", "required">, import("convex/values").VLiteral<"allocations", "required">, import("convex/values").VLiteral<"fees", "required">, import("convex/values").VLiteral<"claims", "required">, import("convex/values").VLiteral<"repair", "required">, import("convex/values").VLiteral<"check", "required">, import("convex/values").VLiteral<"local_ready", "required">, import("convex/values").VLiteral<"invalidated", "required">, import("convex/values").VLiteral<"discarding", "required">], "required", never>;
117
+ step: import("convex/values").VFloat64<number, "required">;
118
+ sourceFence: import("convex/values").VFloat64<number, "required">;
119
+ sourceCursor: import("convex/values").VString<string | undefined, "optional">;
120
+ allocationCursor: import("convex/values").VString<string | undefined, "optional">;
121
+ feeCursor: import("convex/values").VString<string | undefined, "optional">;
122
+ claimCursor: import("convex/values").VString<string | undefined, "optional">;
123
+ initialRevision: import("convex/values").VFloat64<number, "required">;
124
+ initialRiskRevision: import("convex/values").VFloat64<number, "required">;
125
+ riskRevision: import("convex/values").VFloat64<number, "required">;
126
+ observedRevision: import("convex/values").VFloat64<number, "required">;
127
+ sourceCount: import("convex/values").VFloat64<number, "required">;
128
+ allocationCount: import("convex/values").VFloat64<number, "required">;
129
+ claimCount: import("convex/values").VFloat64<number, "required">;
130
+ feeCount: import("convex/values").VFloat64<number, "required">;
131
+ deferredPositiveChanges: import("convex/values").VBoolean<boolean, "required">;
132
+ providerChanged: import("convex/values").VBoolean<boolean, "required">;
133
+ expiresAt: import("convex/values").VFloat64<number, "required">;
134
+ reason: import("convex/values").VString<string | undefined, "optional">;
135
+ }, "required", "accountId" | "allocationCount" | "allocationCursor" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
136
+ by_account_phase: ["accountId", "phase", "_creationTime"];
137
+ by_operation: ["operationKey", "_creationTime"];
138
+ by_read_only: ["readOnly", "_creationTime"];
139
+ }, {}, {}>;
140
+ payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
141
+ allocationCurrency?: string | undefined;
142
+ allocationPresent: boolean;
143
+ amount: number;
144
+ currency: string;
145
+ expectedPaid: number;
146
+ expectedReserved: number;
147
+ ledgerFingerprint: string;
148
+ needsCheck: boolean;
149
+ paidAmount: number;
150
+ reinstatement: boolean;
151
+ reservedAmount: number;
152
+ reversalClaimedAmount: number;
153
+ reversedAmount: number;
154
+ role?: string | undefined;
155
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
156
+ sourceChargeId?: string | undefined;
157
+ sourceCreatedAt: number;
158
+ status: string;
159
+ stripeTransferId: string;
160
+ }, {
161
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
162
+ stripeTransferId: import("convex/values").VString<string, "required">;
163
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
164
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
165
+ currency: import("convex/values").VString<string, "required">;
166
+ amount: import("convex/values").VFloat64<number, "required">;
167
+ status: import("convex/values").VString<string, "required">;
168
+ role: import("convex/values").VString<string | undefined, "optional">;
169
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
170
+ reversedAmount: import("convex/values").VFloat64<number, "required">;
171
+ reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
172
+ reinstatement: import("convex/values").VBoolean<boolean, "required">;
173
+ allocationPresent: import("convex/values").VBoolean<boolean, "required">;
174
+ allocationCurrency: import("convex/values").VString<string | undefined, "optional">;
175
+ paidAmount: import("convex/values").VFloat64<number, "required">;
176
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
177
+ expectedPaid: import("convex/values").VFloat64<number, "required">;
178
+ expectedReserved: import("convex/values").VFloat64<number, "required">;
179
+ needsCheck: import("convex/values").VBoolean<boolean, "required">;
180
+ }, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
181
+ by_snapshot: ["snapshotId", "_creationTime"];
182
+ by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
183
+ by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
184
+ }, {}, {}>;
185
+ payoutSnapshotClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
186
+ allocations: {
187
+ amount: number;
188
+ role?: string | undefined;
189
+ stripeTransferId: string;
190
+ }[];
191
+ amount: number;
192
+ currency: string;
193
+ fingerprint: string;
194
+ historical?: boolean | undefined;
195
+ operationKey: string;
196
+ providerFee?: number | undefined;
197
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
198
+ status: string;
199
+ stripePayoutId?: string | undefined;
200
+ }, {
201
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
202
+ operationKey: import("convex/values").VString<string, "required">;
203
+ fingerprint: import("convex/values").VString<string, "required">;
204
+ currency: import("convex/values").VString<string, "required">;
205
+ amount: import("convex/values").VFloat64<number, "required">;
206
+ status: import("convex/values").VString<string, "required">;
207
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
208
+ historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
209
+ providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
210
+ allocations: import("convex/values").VArray<{
211
+ amount: number;
212
+ role?: string | undefined;
213
+ stripeTransferId: string;
214
+ }[], import("convex/values").VObject<{
215
+ amount: number;
216
+ role?: string | undefined;
217
+ stripeTransferId: string;
218
+ }, {
219
+ stripeTransferId: import("convex/values").VString<string, "required">;
220
+ amount: import("convex/values").VFloat64<number, "required">;
221
+ role: import("convex/values").VString<string | undefined, "optional">;
222
+ }, "required", "amount" | "role" | "stripeTransferId">, "required">;
223
+ }, "required", "allocations" | "amount" | "currency" | "fingerprint" | "historical" | "operationKey" | "providerFee" | "snapshotId" | "status" | "stripePayoutId">, {
224
+ by_snapshot: ["snapshotId", "_creationTime"];
225
+ by_snapshot_operation: ["snapshotId", "operationKey", "_creationTime"];
226
+ }, {}, {}>;
227
+ payoutSnapshotFees: import("convex/server").TableDefinition<import("convex/values").VObject<{
228
+ amount: number;
229
+ currency: string;
230
+ revision: number;
231
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
232
+ }, {
233
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
234
+ currency: import("convex/values").VString<string, "required">;
235
+ amount: import("convex/values").VFloat64<number, "required">;
236
+ revision: import("convex/values").VFloat64<number, "required">;
237
+ }, "required", "amount" | "currency" | "revision" | "snapshotId">, {
238
+ by_snapshot: ["snapshotId", "_creationTime"];
239
+ by_snapshot_currency: ["snapshotId", "currency", "_creationTime"];
240
+ }, {}, {}>;
12
241
  affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
13
242
  accounted?: boolean | undefined;
14
243
  activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
@@ -365,6 +594,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
365
594
  by_provider_payout: ["stripePayoutId", "_creationTime"];
366
595
  by_rejection_request: ["rejection.requestId", "_creationTime"];
367
596
  by_return_receipt: ["returnTransactionId", "_creationTime"];
597
+ by_status: ["status", "_creationTime"];
368
598
  }, {}, {}>;
369
599
  payoutSourceAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
370
600
  accountId: string;
@@ -433,6 +663,8 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
433
663
  }, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
434
664
  by_account: ["accountId", "_creationTime"];
435
665
  by_deadline: ["holdDeadline", "_creationTime"];
666
+ by_mode_status: ["mode", "status", "_creationTime"];
667
+ by_status: ["status", "_creationTime"];
436
668
  }, {}, {}>;
437
669
  payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
438
670
  accountId: string;
@@ -1572,6 +1804,235 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
1572
1804
  }>;
1573
1805
  export declare function historical(currency?: string): Promise<{
1574
1806
  t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
1807
+ payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
1808
+ accountId: string;
1809
+ cadenceMs: number;
1810
+ completedGeneration?: number | undefined;
1811
+ completedOperationKey?: string | undefined;
1812
+ currency: string;
1813
+ generation: number;
1814
+ hasOperation: boolean;
1815
+ lastAttemptAt?: number | undefined;
1816
+ lastReason?: string | undefined;
1817
+ leaseUntil?: number | undefined;
1818
+ nextAttemptAt: number;
1819
+ operationKey?: string | undefined;
1820
+ ownerKey: string;
1821
+ sequence: number;
1822
+ }, {
1823
+ accountId: import("convex/values").VString<string, "required">;
1824
+ ownerKey: import("convex/values").VString<string, "required">;
1825
+ currency: import("convex/values").VString<string, "required">;
1826
+ generation: import("convex/values").VFloat64<number, "required">;
1827
+ sequence: import("convex/values").VFloat64<number, "required">;
1828
+ cadenceMs: import("convex/values").VFloat64<number, "required">;
1829
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
1830
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
1831
+ operationKey: import("convex/values").VString<string | undefined, "optional">;
1832
+ hasOperation: import("convex/values").VBoolean<boolean, "required">;
1833
+ lastReason: import("convex/values").VString<string | undefined, "optional">;
1834
+ lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
1835
+ completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
1836
+ completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
1837
+ }, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
1838
+ by_account_currency: ["accountId", "currency", "_creationTime"];
1839
+ by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
1840
+ }, {}, {}>;
1841
+ payoutFinancialRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
1842
+ accountId: string;
1843
+ revision: number;
1844
+ riskRevision: number;
1845
+ }, {
1846
+ accountId: import("convex/values").VString<string, "required">;
1847
+ revision: import("convex/values").VFloat64<number, "required">;
1848
+ riskRevision: import("convex/values").VFloat64<number, "required">;
1849
+ }, "required", "accountId" | "revision" | "riskRevision">, {
1850
+ by_account: ["accountId", "_creationTime"];
1851
+ }, {}, {}>;
1852
+ payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
1853
+ accountId: string;
1854
+ key: string;
1855
+ kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
1856
+ removed?: boolean | undefined;
1857
+ riskRevision: number;
1858
+ }, {
1859
+ accountId: import("convex/values").VString<string, "required">;
1860
+ riskRevision: import("convex/values").VFloat64<number, "required">;
1861
+ kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "provider_payout" | "transfer", [import("convex/values").VLiteral<"transfer", "required">, import("convex/values").VLiteral<"provider_payout", "required">, import("convex/values").VLiteral<"allocation", "required">, import("convex/values").VLiteral<"claim", "required">, import("convex/values").VLiteral<"fee", "required">], "required", never>;
1862
+ key: import("convex/values").VString<string, "required">;
1863
+ removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
1864
+ }, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
1865
+ by_account_revision: ["accountId", "riskRevision", "_creationTime"];
1866
+ }, {}, {}>;
1867
+ payoutRiskRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
1868
+ accountId: string;
1869
+ riskRevision: number;
1870
+ }, {
1871
+ accountId: import("convex/values").VString<string, "required">;
1872
+ riskRevision: import("convex/values").VFloat64<number, "required">;
1873
+ }, "required", "accountId" | "riskRevision">, {
1874
+ by_account: ["accountId", "_creationTime"];
1875
+ }, {}, {}>;
1876
+ payoutSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
1877
+ accountId: string;
1878
+ allocationCount: number;
1879
+ allocationCursor?: string | undefined;
1880
+ claimCount: number;
1881
+ claimCursor?: string | undefined;
1882
+ deferredPositiveChanges: boolean;
1883
+ expectedRevision: number;
1884
+ expiresAt: number;
1885
+ feeCount: number;
1886
+ feeCursor?: string | undefined;
1887
+ initialRevision: number;
1888
+ initialRiskRevision: number;
1889
+ observedRevision: number;
1890
+ operationKey: string;
1891
+ ownerKey: string;
1892
+ phase: "allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources";
1893
+ policyMode?: string | undefined;
1894
+ policyOperationKey?: string | undefined;
1895
+ providerChanged: boolean;
1896
+ readOnly: boolean;
1897
+ reason?: string | undefined;
1898
+ riskRevision: number;
1899
+ sourceCount: number;
1900
+ sourceCursor?: string | undefined;
1901
+ sourceFence: number;
1902
+ step: number;
1903
+ }, {
1904
+ readOnly: import("convex/values").VBoolean<boolean, "required">;
1905
+ accountId: import("convex/values").VString<string, "required">;
1906
+ ownerKey: import("convex/values").VString<string, "required">;
1907
+ operationKey: import("convex/values").VString<string, "required">;
1908
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
1909
+ policyMode: import("convex/values").VString<string | undefined, "optional">;
1910
+ policyOperationKey: import("convex/values").VString<string | undefined, "optional">;
1911
+ phase: import("convex/values").VUnion<"allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources", [import("convex/values").VLiteral<"sources", "required">, import("convex/values").VLiteral<"allocations", "required">, import("convex/values").VLiteral<"fees", "required">, import("convex/values").VLiteral<"claims", "required">, import("convex/values").VLiteral<"repair", "required">, import("convex/values").VLiteral<"check", "required">, import("convex/values").VLiteral<"local_ready", "required">, import("convex/values").VLiteral<"invalidated", "required">, import("convex/values").VLiteral<"discarding", "required">], "required", never>;
1912
+ step: import("convex/values").VFloat64<number, "required">;
1913
+ sourceFence: import("convex/values").VFloat64<number, "required">;
1914
+ sourceCursor: import("convex/values").VString<string | undefined, "optional">;
1915
+ allocationCursor: import("convex/values").VString<string | undefined, "optional">;
1916
+ feeCursor: import("convex/values").VString<string | undefined, "optional">;
1917
+ claimCursor: import("convex/values").VString<string | undefined, "optional">;
1918
+ initialRevision: import("convex/values").VFloat64<number, "required">;
1919
+ initialRiskRevision: import("convex/values").VFloat64<number, "required">;
1920
+ riskRevision: import("convex/values").VFloat64<number, "required">;
1921
+ observedRevision: import("convex/values").VFloat64<number, "required">;
1922
+ sourceCount: import("convex/values").VFloat64<number, "required">;
1923
+ allocationCount: import("convex/values").VFloat64<number, "required">;
1924
+ claimCount: import("convex/values").VFloat64<number, "required">;
1925
+ feeCount: import("convex/values").VFloat64<number, "required">;
1926
+ deferredPositiveChanges: import("convex/values").VBoolean<boolean, "required">;
1927
+ providerChanged: import("convex/values").VBoolean<boolean, "required">;
1928
+ expiresAt: import("convex/values").VFloat64<number, "required">;
1929
+ reason: import("convex/values").VString<string | undefined, "optional">;
1930
+ }, "required", "accountId" | "allocationCount" | "allocationCursor" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
1931
+ by_account_phase: ["accountId", "phase", "_creationTime"];
1932
+ by_operation: ["operationKey", "_creationTime"];
1933
+ by_read_only: ["readOnly", "_creationTime"];
1934
+ }, {}, {}>;
1935
+ payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
1936
+ allocationCurrency?: string | undefined;
1937
+ allocationPresent: boolean;
1938
+ amount: number;
1939
+ currency: string;
1940
+ expectedPaid: number;
1941
+ expectedReserved: number;
1942
+ ledgerFingerprint: string;
1943
+ needsCheck: boolean;
1944
+ paidAmount: number;
1945
+ reinstatement: boolean;
1946
+ reservedAmount: number;
1947
+ reversalClaimedAmount: number;
1948
+ reversedAmount: number;
1949
+ role?: string | undefined;
1950
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
1951
+ sourceChargeId?: string | undefined;
1952
+ sourceCreatedAt: number;
1953
+ status: string;
1954
+ stripeTransferId: string;
1955
+ }, {
1956
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
1957
+ stripeTransferId: import("convex/values").VString<string, "required">;
1958
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
1959
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
1960
+ currency: import("convex/values").VString<string, "required">;
1961
+ amount: import("convex/values").VFloat64<number, "required">;
1962
+ status: import("convex/values").VString<string, "required">;
1963
+ role: import("convex/values").VString<string | undefined, "optional">;
1964
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
1965
+ reversedAmount: import("convex/values").VFloat64<number, "required">;
1966
+ reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
1967
+ reinstatement: import("convex/values").VBoolean<boolean, "required">;
1968
+ allocationPresent: import("convex/values").VBoolean<boolean, "required">;
1969
+ allocationCurrency: import("convex/values").VString<string | undefined, "optional">;
1970
+ paidAmount: import("convex/values").VFloat64<number, "required">;
1971
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1972
+ expectedPaid: import("convex/values").VFloat64<number, "required">;
1973
+ expectedReserved: import("convex/values").VFloat64<number, "required">;
1974
+ needsCheck: import("convex/values").VBoolean<boolean, "required">;
1975
+ }, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
1976
+ by_snapshot: ["snapshotId", "_creationTime"];
1977
+ by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
1978
+ by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
1979
+ }, {}, {}>;
1980
+ payoutSnapshotClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
1981
+ allocations: {
1982
+ amount: number;
1983
+ role?: string | undefined;
1984
+ stripeTransferId: string;
1985
+ }[];
1986
+ amount: number;
1987
+ currency: string;
1988
+ fingerprint: string;
1989
+ historical?: boolean | undefined;
1990
+ operationKey: string;
1991
+ providerFee?: number | undefined;
1992
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
1993
+ status: string;
1994
+ stripePayoutId?: string | undefined;
1995
+ }, {
1996
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
1997
+ operationKey: import("convex/values").VString<string, "required">;
1998
+ fingerprint: import("convex/values").VString<string, "required">;
1999
+ currency: import("convex/values").VString<string, "required">;
2000
+ amount: import("convex/values").VFloat64<number, "required">;
2001
+ status: import("convex/values").VString<string, "required">;
2002
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
2003
+ historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
2004
+ providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
2005
+ allocations: import("convex/values").VArray<{
2006
+ amount: number;
2007
+ role?: string | undefined;
2008
+ stripeTransferId: string;
2009
+ }[], import("convex/values").VObject<{
2010
+ amount: number;
2011
+ role?: string | undefined;
2012
+ stripeTransferId: string;
2013
+ }, {
2014
+ stripeTransferId: import("convex/values").VString<string, "required">;
2015
+ amount: import("convex/values").VFloat64<number, "required">;
2016
+ role: import("convex/values").VString<string | undefined, "optional">;
2017
+ }, "required", "amount" | "role" | "stripeTransferId">, "required">;
2018
+ }, "required", "allocations" | "amount" | "currency" | "fingerprint" | "historical" | "operationKey" | "providerFee" | "snapshotId" | "status" | "stripePayoutId">, {
2019
+ by_snapshot: ["snapshotId", "_creationTime"];
2020
+ by_snapshot_operation: ["snapshotId", "operationKey", "_creationTime"];
2021
+ }, {}, {}>;
2022
+ payoutSnapshotFees: import("convex/server").TableDefinition<import("convex/values").VObject<{
2023
+ amount: number;
2024
+ currency: string;
2025
+ revision: number;
2026
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
2027
+ }, {
2028
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
2029
+ currency: import("convex/values").VString<string, "required">;
2030
+ amount: import("convex/values").VFloat64<number, "required">;
2031
+ revision: import("convex/values").VFloat64<number, "required">;
2032
+ }, "required", "amount" | "currency" | "revision" | "snapshotId">, {
2033
+ by_snapshot: ["snapshotId", "_creationTime"];
2034
+ by_snapshot_currency: ["snapshotId", "currency", "_creationTime"];
2035
+ }, {}, {}>;
1575
2036
  affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
1576
2037
  accounted?: boolean | undefined;
1577
2038
  activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
@@ -1928,6 +2389,7 @@ export declare function historical(currency?: string): Promise<{
1928
2389
  by_provider_payout: ["stripePayoutId", "_creationTime"];
1929
2390
  by_rejection_request: ["rejection.requestId", "_creationTime"];
1930
2391
  by_return_receipt: ["returnTransactionId", "_creationTime"];
2392
+ by_status: ["status", "_creationTime"];
1931
2393
  }, {}, {}>;
1932
2394
  payoutSourceAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
1933
2395
  accountId: string;
@@ -1996,6 +2458,8 @@ export declare function historical(currency?: string): Promise<{
1996
2458
  }, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
1997
2459
  by_account: ["accountId", "_creationTime"];
1998
2460
  by_deadline: ["holdDeadline", "_creationTime"];
2461
+ by_mode_status: ["mode", "status", "_creationTime"];
2462
+ by_status: ["status", "_creationTime"];
1999
2463
  }, {}, {}>;
2000
2464
  payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2001
2465
  accountId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"payoutAdoptionTestHelpers.d.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YArJ3C,oBAAoB;;;;;;;;;;;YAapB,QAAQ,6BAAmB,MAAM;;;;;;;;;YAYjC,aAAa;;;;;;YAGb,QAAQ,6BAAmB,MAAM;;;;;;;;;;;YAcjC,IAAI,iCAAuB;gBAAE,MAAM,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;;;;;YAM9D,QAAQ,6BAAmB,MAAM;;;;;;;;;;;;;;;YAKjC,QAAQ;;;;;wBAQA,IAAI;;;;;;;YAUZ,IAAI;;;;YAIJ,QAAQ,8BAAoB,MAAM;YAGlC,MAAM,iCACW;gBACb,MAAM,EAAE,MAAM,CAAC;gBACf,QAAQ,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,CAAC;aAClB;;;;gBA2CG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDrB"}
@@ -0,0 +1,21 @@
1
+ import type { Infer } from "convex/values";
2
+ import type { snapshotDoc } from "../../component/payoutSnapshots/schema.js";
3
+ import type { Component, RunCtx } from "../helpers.js";
4
+ export type PayoutCollectionState = Infer<typeof snapshotDoc>;
5
+ export type PayoutCollectionScope = {
6
+ accountId: string;
7
+ ownerKey: string;
8
+ operationKey: string;
9
+ };
10
+ export type PayoutCollectionOptions = PayoutCollectionScope & {
11
+ expectedRevision: number;
12
+ expectedStep?: number;
13
+ batchSize?: number;
14
+ };
15
+ /** Resume one bounded local-ledger step. local_ready does not authorize a payout. */
16
+ export declare function collectPayoutSnapshot(component: Component, ctx: RunCtx, opts: PayoutCollectionOptions): Promise<PayoutCollectionState>;
17
+ /** Delete only read-only cache state in bounded batches; never financial records. */
18
+ export declare function discardPayoutSnapshot(component: Component, ctx: RunCtx, opts: PayoutCollectionScope & {
19
+ batchSize?: number;
20
+ }): Promise<PayoutCollectionState | null>;
21
+ //# sourceMappingURL=payoutCollection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payoutCollection.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvD,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,GAAG;IAC5D,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,qFAAqF;AACrF,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,qBAAqB,CAAC,CAkChC;AACD,qFAAqF;AACrF,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,qBAAqB,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACnD,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAmBvC"}
@@ -0,0 +1,47 @@
1
+ import { runMutationOrThrow } from "../helpers.js";
2
+ import { componentRef } from "../webhooks/helpers.js";
3
+ import { validateIdentity } from "../../component/payoutRelease/helpers.js";
4
+ /** Resume one bounded local-ledger step. local_ready does not authorize a payout. */
5
+ export async function collectPayoutSnapshot(component, ctx, opts) {
6
+ validateIdentity(opts);
7
+ if (!Number.isSafeInteger(opts.expectedRevision) ||
8
+ opts.expectedRevision < -1 ||
9
+ (opts.expectedStep !== undefined &&
10
+ (!Number.isSafeInteger(opts.expectedStep) || opts.expectedStep < 0)) ||
11
+ (opts.batchSize !== undefined &&
12
+ (!Number.isInteger(opts.batchSize) ||
13
+ opts.batchSize < 1 ||
14
+ opts.batchSize > 25)))
15
+ throw new Error("Invalid local collection revision, step or batch.");
16
+ const scope = {
17
+ accountId: opts.accountId,
18
+ ownerKey: opts.ownerKey,
19
+ operationKey: opts.operationKey,
20
+ };
21
+ const state = (await runMutationOrThrow(ctx, componentRef(component, "payoutSnapshots/mutations/begin"), { ...scope, expectedRevision: opts.expectedRevision }));
22
+ if (!state.readOnly)
23
+ throw new Error("Collection is financially bound.");
24
+ if (opts.expectedStep === undefined)
25
+ return state;
26
+ return (await runMutationOrThrow(ctx, componentRef(component, "payoutSnapshots/mutations/advance"), {
27
+ ...scope,
28
+ expectedStep: opts.expectedStep,
29
+ ...(opts.batchSize !== undefined ? { batchSize: opts.batchSize } : {}),
30
+ }));
31
+ }
32
+ /** Delete only read-only cache state in bounded batches; never financial records. */
33
+ export async function discardPayoutSnapshot(component, ctx, opts) {
34
+ validateIdentity(opts);
35
+ if (opts.batchSize !== undefined &&
36
+ (!Number.isInteger(opts.batchSize) ||
37
+ opts.batchSize < 1 ||
38
+ opts.batchSize > 100))
39
+ throw new Error("Invalid collection cleanup batch.");
40
+ return (await runMutationOrThrow(ctx, componentRef(component, "payoutSnapshots/mutations/discard"), {
41
+ accountId: opts.accountId,
42
+ ownerKey: opts.ownerKey,
43
+ operationKey: opts.operationKey,
44
+ ...(opts.batchSize !== undefined ? { batchSize: opts.batchSize } : {}),
45
+ }));
46
+ }
47
+ //# sourceMappingURL=payoutCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payoutCollection.js","sourceRoot":"","sources":["../../../src/client/connect/pay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