@fantastic.dev/better-stripe 0.60.0 → 0.60.1

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 (131) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -1
  3. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +26 -6
  4. package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
  5. package/dist/client/connect/payoutExecutionTestHelpers.d.ts +13 -3
  6. package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
  7. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +26 -6
  8. package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
  9. package/dist/client/connect/payoutSyncTestHelpers.d.ts +13 -3
  10. package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
  11. package/dist/client/usage/creditCapacity.d.ts.map +1 -1
  12. package/dist/client/usage/creditCapacity.js +7 -1
  13. package/dist/client/usage/creditCapacity.js.map +1 -1
  14. package/dist/client/usage/creditClient.d.ts +3 -0
  15. package/dist/client/usage/creditClient.d.ts.map +1 -1
  16. package/dist/client/usage/creditDelivery.d.ts.map +1 -1
  17. package/dist/client/usage/creditDelivery.js +4 -1
  18. package/dist/client/usage/creditDelivery.js.map +1 -1
  19. package/dist/client/usage/creditLifecycle.d.ts.map +1 -1
  20. package/dist/client/usage/creditLifecycle.js +2 -1
  21. package/dist/client/usage/creditLifecycle.js.map +1 -1
  22. package/dist/client/usage/creditNative.d.ts +3 -0
  23. package/dist/client/usage/creditNative.d.ts.map +1 -1
  24. package/dist/client/usage/creditNative.js +3 -0
  25. package/dist/client/usage/creditNative.js.map +1 -1
  26. package/dist/client/usage/creditProvider.d.ts.map +1 -1
  27. package/dist/client/usage/creditProvider.js +2 -1
  28. package/dist/client/usage/creditProvider.js.map +1 -1
  29. package/dist/client/usage/creditRead.d.ts +1 -0
  30. package/dist/client/usage/creditRead.d.ts.map +1 -1
  31. package/dist/client/usage/creditReconciliation.d.ts.map +1 -1
  32. package/dist/client/usage/creditReconciliation.js +11 -3
  33. package/dist/client/usage/creditReconciliation.js.map +1 -1
  34. package/dist/client/usage/creditSettlement.fixtures.d.ts +1 -0
  35. package/dist/client/usage/creditSettlement.fixtures.d.ts.map +1 -1
  36. package/dist/client/usage/creditTransport.fixtures.d.ts +1 -0
  37. package/dist/client/usage/creditTransport.fixtures.d.ts.map +1 -1
  38. package/dist/client/usage/creditTransport.fixtures.js +2 -1
  39. package/dist/client/usage/creditTransport.fixtures.js.map +1 -1
  40. package/dist/client/usage/subscriptionCancellation.d.ts.map +1 -1
  41. package/dist/client/usage/subscriptionCancellation.js +3 -2
  42. package/dist/client/usage/subscriptionCancellation.js.map +1 -1
  43. package/dist/client/usage/subscriptionCheckout.d.ts.map +1 -1
  44. package/dist/client/usage/subscriptionCheckout.js +3 -2
  45. package/dist/client/usage/subscriptionCheckout.js.map +1 -1
  46. package/dist/client/usage/subscriptionLifecycle.d.ts +1 -0
  47. package/dist/client/usage/subscriptionLifecycle.d.ts.map +1 -1
  48. package/dist/client/usage/subscriptionLifecycle.js +3 -2
  49. package/dist/client/usage/subscriptionLifecycle.js.map +1 -1
  50. package/dist/client/usage/subscriptionProvider.d.ts +2 -0
  51. package/dist/client/usage/subscriptionProvider.d.ts.map +1 -1
  52. package/dist/client/usage/subscriptionProvider.js +9 -2
  53. package/dist/client/usage/subscriptionProvider.js.map +1 -1
  54. package/dist/component/_generated/component.d.ts +21 -0
  55. package/dist/component/_generated/component.d.ts.map +1 -1
  56. package/dist/component/earnings/triggers.d.ts +16 -6
  57. package/dist/component/earnings/triggers.d.ts.map +1 -1
  58. package/dist/component/schema.d.ts +13 -3
  59. package/dist/component/usage/allowance.fixtures.d.ts +4212 -0
  60. package/dist/component/usage/allowance.fixtures.d.ts.map +1 -0
  61. package/dist/component/usage/allowance.fixtures.js +67 -0
  62. package/dist/component/usage/allowance.fixtures.js.map +1 -0
  63. package/dist/component/usageCredits/accounting.fixtures.d.ts +4235 -0
  64. package/dist/component/usageCredits/accounting.fixtures.d.ts.map +1 -0
  65. package/dist/component/usageCredits/accounting.fixtures.js +89 -0
  66. package/dist/component/usageCredits/accounting.fixtures.js.map +1 -0
  67. package/dist/component/usageCredits/helpers.d.ts +7 -0
  68. package/dist/component/usageCredits/helpers.d.ts.map +1 -1
  69. package/dist/component/usageCredits/helpers.js +5 -0
  70. package/dist/component/usageCredits/helpers.js.map +1 -1
  71. package/dist/component/usageCredits/mutations.d.ts +6 -0
  72. package/dist/component/usageCredits/mutations.d.ts.map +1 -1
  73. package/dist/component/usageCredits/mutations.js +70 -7
  74. package/dist/component/usageCredits/mutations.js.map +1 -1
  75. package/dist/component/usageCredits/purchase.d.ts +1 -0
  76. package/dist/component/usageCredits/purchase.d.ts.map +1 -1
  77. package/dist/component/usageCredits/queries.d.ts +10 -0
  78. package/dist/component/usageCredits/queries.d.ts.map +1 -1
  79. package/dist/component/usageCredits/schema.d.ts +24 -4
  80. package/dist/component/usageCredits/schema.d.ts.map +1 -1
  81. package/dist/component/usageCredits/schema.js +4 -0
  82. package/dist/component/usageCredits/schema.js.map +1 -1
  83. package/dist/component/usageSubscriptions/history.d.ts.map +1 -1
  84. package/dist/component/usageSubscriptions/history.js +3 -1
  85. package/dist/component/usageSubscriptions/history.js.map +1 -1
  86. package/dist/component/usageSubscriptions/mutations.d.ts +5 -0
  87. package/dist/component/usageSubscriptions/mutations.d.ts.map +1 -1
  88. package/dist/component/usageSubscriptions/mutations.js +19 -0
  89. package/dist/component/usageSubscriptions/mutations.js.map +1 -1
  90. package/dist/component/usageSubscriptions/queries.d.ts +2 -0
  91. package/dist/component/usageSubscriptions/queries.d.ts.map +1 -1
  92. package/dist/component/usageSubscriptions/schema.d.ts +7 -2
  93. package/dist/component/usageSubscriptions/schema.d.ts.map +1 -1
  94. package/dist/component/usageSubscriptions/schema.js +1 -0
  95. package/dist/component/usageSubscriptions/schema.js.map +1 -1
  96. package/docs/README.md +2 -0
  97. package/docs/usage-credits.md +6 -1
  98. package/docs/usage-security.md +130 -0
  99. package/package.json +2 -1
  100. package/src/client/usage/creditBackingIsolation.test.ts +110 -0
  101. package/src/client/usage/creditCapacity.test.ts +80 -1
  102. package/src/client/usage/creditCapacity.ts +10 -1
  103. package/src/client/usage/creditDelivery.ts +4 -0
  104. package/src/client/usage/creditLifecycle.ts +2 -0
  105. package/src/client/usage/creditNative.ts +5 -0
  106. package/src/client/usage/creditProofBounds.test.ts +187 -0
  107. package/src/client/usage/creditProvider.test.ts +74 -0
  108. package/src/client/usage/creditProvider.ts +2 -0
  109. package/src/client/usage/creditReconciliation.ts +18 -3
  110. package/src/client/usage/creditTransport.fixtures.ts +2 -1
  111. package/src/client/usage/subscriptionCancellation.ts +3 -2
  112. package/src/client/usage/subscriptionCheckout.ts +7 -2
  113. package/src/client/usage/subscriptionClient.test.ts +60 -1
  114. package/src/client/usage/subscriptionLifecycle.ts +3 -2
  115. package/src/client/usage/subscriptionProvider.ts +27 -3
  116. package/src/component/_generated/component.ts +40 -1
  117. package/src/component/usage/allowance.fixtures.ts +77 -0
  118. package/src/component/usage/allowance.test.ts +3 -66
  119. package/src/component/usage/allowanceBounds.test.ts +79 -0
  120. package/src/component/usage/historyIsolation.test.ts +124 -0
  121. package/src/component/usageCredits/accounting.fixtures.ts +96 -0
  122. package/src/component/usageCredits/accounting.test.ts +176 -82
  123. package/src/component/usageCredits/freshness.test.ts +33 -0
  124. package/src/component/usageCredits/helpers.ts +8 -0
  125. package/src/component/usageCredits/mutations.ts +83 -5
  126. package/src/component/usageCredits/quotas.test.ts +63 -0
  127. package/src/component/usageCredits/schema.ts +10 -0
  128. package/src/component/usageSubscriptions/history.test.ts +57 -0
  129. package/src/component/usageSubscriptions/history.ts +3 -1
  130. package/src/component/usageSubscriptions/mutations.ts +23 -0
  131. package/src/component/usageSubscriptions/schema.ts +1 -0
@@ -0,0 +1,4212 @@
1
+ export declare function setupAllowance(): Promise<{
2
+ t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
3
+ usageCorrectionClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
4
+ key: string;
5
+ operationKey: string;
6
+ proofJson: string;
7
+ }, {
8
+ key: import("convex/values").VString<string, "required">;
9
+ operationKey: import("convex/values").VString<string, "required">;
10
+ proofJson: import("convex/values").VString<string, "required">;
11
+ }, "required", "key" | "operationKey" | "proofJson">, {
12
+ by_key: ["key", "_creationTime"];
13
+ }, {}, {}>;
14
+ usageCorrections: import("convex/server").TableDefinition<import("convex/values").VObject<{
15
+ adjustmentJson?: string | undefined;
16
+ attempt: number;
17
+ attemptedAt?: number | undefined;
18
+ cashConsequence: "none" | "operator_resolution_required" | "verified_external_adjustment";
19
+ correctionId: string;
20
+ creditNoteId?: string | undefined;
21
+ customerAccount?: string | undefined;
22
+ eventId: import("convex/values").GenericId<"usageEvents">;
23
+ firstAttemptAt: number;
24
+ historyCount: number;
25
+ inputJson: string;
26
+ invoiceId?: string | undefined;
27
+ key: string;
28
+ leaseUntil?: number | undefined;
29
+ nativeAdjustmentId?: string | undefined;
30
+ nativeCreditNoteStatus?: "issued" | "void" | undefined;
31
+ nativeStatus?: "complete" | "pending" | undefined;
32
+ observedAt?: number | undefined;
33
+ quantity: string;
34
+ reason: string;
35
+ recordJson: string;
36
+ refundId?: string | undefined;
37
+ resolution?: "event_cancellation" | "invoice_credit" | undefined;
38
+ restoredQuantity: string;
39
+ scaledQuantity: string;
40
+ scopeKey: string;
41
+ state: "confirmed" | "held" | "invoice_adjustment_required" | "provider_accepted" | "requested" | "unsupported";
42
+ stripeAccountId?: string | undefined;
43
+ subscriptionJson: string;
44
+ }, {
45
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
46
+ customerAccount: import("convex/values").VString<string | undefined, "optional">;
47
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
48
+ nativeCreditNoteStatus: import("convex/values").VUnion<"issued" | "void" | undefined, [import("convex/values").VLiteral<"issued", "required">, import("convex/values").VLiteral<"void", "required">], "optional", never>;
49
+ resolution: import("convex/values").VUnion<"event_cancellation" | "invoice_credit" | undefined, [import("convex/values").VLiteral<"event_cancellation", "required">, import("convex/values").VLiteral<"invoice_credit", "required">], "optional", never>;
50
+ adjustmentJson: import("convex/values").VString<string | undefined, "optional">;
51
+ key: import("convex/values").VString<string, "required">;
52
+ scopeKey: import("convex/values").VString<string, "required">;
53
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
54
+ correctionId: import("convex/values").VString<string, "required">;
55
+ inputJson: import("convex/values").VString<string, "required">;
56
+ recordJson: import("convex/values").VString<string, "required">;
57
+ subscriptionJson: import("convex/values").VString<string, "required">;
58
+ quantity: import("convex/values").VString<string, "required">;
59
+ scaledQuantity: import("convex/values").VString<string, "required">;
60
+ state: import("convex/values").VUnion<"confirmed" | "held" | "invoice_adjustment_required" | "provider_accepted" | "requested" | "unsupported", [import("convex/values").VLiteral<"requested", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"confirmed", "required">, import("convex/values").VLiteral<"held", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"invoice_adjustment_required", "required">], "required", never>;
61
+ reason: import("convex/values").VString<string, "required">;
62
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
63
+ attemptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
64
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
65
+ attempt: import("convex/values").VFloat64<number, "required">;
66
+ nativeAdjustmentId: import("convex/values").VString<string | undefined, "optional">;
67
+ nativeStatus: import("convex/values").VUnion<"complete" | "pending" | undefined, [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "optional", never>;
68
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
69
+ creditNoteId: import("convex/values").VString<string | undefined, "optional">;
70
+ refundId: import("convex/values").VString<string | undefined, "optional">;
71
+ cashConsequence: import("convex/values").VUnion<"none" | "operator_resolution_required" | "verified_external_adjustment", [import("convex/values").VLiteral<"none", "required">, import("convex/values").VLiteral<"operator_resolution_required", "required">, import("convex/values").VLiteral<"verified_external_adjustment", "required">], "required", never>;
72
+ restoredQuantity: import("convex/values").VString<string, "required">;
73
+ historyCount: import("convex/values").VFloat64<number, "required">;
74
+ }, "required", "adjustmentJson" | "attempt" | "attemptedAt" | "cashConsequence" | "correctionId" | "creditNoteId" | "customerAccount" | "eventId" | "firstAttemptAt" | "historyCount" | "inputJson" | "invoiceId" | "key" | "leaseUntil" | "nativeAdjustmentId" | "nativeCreditNoteStatus" | "nativeStatus" | "observedAt" | "quantity" | "reason" | "recordJson" | "refundId" | "resolution" | "restoredQuantity" | "scaledQuantity" | "scopeKey" | "state" | "stripeAccountId" | "subscriptionJson">, {
75
+ by_event: ["eventId", "_creationTime"];
76
+ by_key: ["key", "_creationTime"];
77
+ by_payer_state: ["customerAccount", "state", "_creationTime"];
78
+ by_realm_state: ["stripeAccountId", "state", "_creationTime"];
79
+ by_scope: ["scopeKey", "_creationTime"];
80
+ by_scope_state: ["scopeKey", "state", "_creationTime"];
81
+ }, {}, {}>;
82
+ usageCorrectionHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
83
+ at: number;
84
+ eventId: import("convex/values").GenericId<"usageEvents">;
85
+ evidenceJson: string;
86
+ key: string;
87
+ occurredAt?: number | undefined;
88
+ reason: string;
89
+ recordJson: string;
90
+ scopeKey: string;
91
+ sequence: number;
92
+ state: "confirmed" | "held" | "invoice_adjustment_required" | "provider_accepted" | "requested" | "unsupported";
93
+ subscriptionJson: string;
94
+ }, {
95
+ key: import("convex/values").VString<string, "required">;
96
+ scopeKey: import("convex/values").VString<string, "required">;
97
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
98
+ sequence: import("convex/values").VFloat64<number, "required">;
99
+ state: import("convex/values").VUnion<"confirmed" | "held" | "invoice_adjustment_required" | "provider_accepted" | "requested" | "unsupported", [import("convex/values").VLiteral<"requested", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"confirmed", "required">, import("convex/values").VLiteral<"held", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"invoice_adjustment_required", "required">], "required", never>;
100
+ reason: import("convex/values").VString<string, "required">;
101
+ recordJson: import("convex/values").VString<string, "required">;
102
+ subscriptionJson: import("convex/values").VString<string, "required">;
103
+ evidenceJson: import("convex/values").VString<string, "required">;
104
+ occurredAt: import("convex/values").VFloat64<number | undefined, "optional">;
105
+ at: import("convex/values").VFloat64<number, "required">;
106
+ }, "required", "at" | "eventId" | "evidenceJson" | "key" | "occurredAt" | "reason" | "recordJson" | "scopeKey" | "sequence" | "state" | "subscriptionJson">, {
107
+ by_event: ["eventId", "_creationTime"];
108
+ by_scope_occurrence: ["scopeKey", "occurredAt", "_creationTime"];
109
+ by_scope_time: ["scopeKey", "at", "_creationTime"];
110
+ }, {}, {}>;
111
+ usageAllowancePolicies: import("convex/server").TableDefinition<import("convex/values").VObject<{
112
+ bindingJson: string;
113
+ consumed: string;
114
+ end: number;
115
+ historyCount: number;
116
+ key: string;
117
+ nativeKey: string;
118
+ policyJson: string;
119
+ reserved: string;
120
+ revision: number;
121
+ scopeKey: string;
122
+ start: number;
123
+ }, {
124
+ key: import("convex/values").VString<string, "required">;
125
+ nativeKey: import("convex/values").VString<string, "required">;
126
+ scopeKey: import("convex/values").VString<string, "required">;
127
+ bindingJson: import("convex/values").VString<string, "required">;
128
+ start: import("convex/values").VFloat64<number, "required">;
129
+ end: import("convex/values").VFloat64<number, "required">;
130
+ policyJson: import("convex/values").VString<string, "required">;
131
+ revision: import("convex/values").VFloat64<number, "required">;
132
+ consumed: import("convex/values").VString<string, "required">;
133
+ reserved: import("convex/values").VString<string, "required">;
134
+ historyCount: import("convex/values").VFloat64<number, "required">;
135
+ }, "required", "bindingJson" | "consumed" | "end" | "historyCount" | "key" | "nativeKey" | "policyJson" | "reserved" | "revision" | "scopeKey" | "start">, {
136
+ by_key: ["key", "_creationTime"];
137
+ by_native_start: ["nativeKey", "start", "_creationTime"];
138
+ by_scope_start: ["scopeKey", "start", "_creationTime"];
139
+ }, {}, {}>;
140
+ usageAllowanceHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
141
+ at: number;
142
+ evidenceJson: string;
143
+ key: string;
144
+ kind: "commit" | "correction" | "policy" | "release" | "reservation";
145
+ }, {
146
+ key: import("convex/values").VString<string, "required">;
147
+ kind: import("convex/values").VUnion<"commit" | "correction" | "policy" | "release" | "reservation", [import("convex/values").VLiteral<"policy", "required">, import("convex/values").VLiteral<"reservation", "required">, import("convex/values").VLiteral<"commit", "required">, import("convex/values").VLiteral<"release", "required">, import("convex/values").VLiteral<"correction", "required">], "required", never>;
148
+ evidenceJson: import("convex/values").VString<string, "required">;
149
+ at: import("convex/values").VFloat64<number, "required">;
150
+ }, "required", "at" | "evidenceJson" | "key" | "kind">, {
151
+ by_key: ["key", "_creationTime"];
152
+ }, {}, {}>;
153
+ usageSubscriptionControls: import("convex/server").TableDefinition<import("convex/values").VObject<{
154
+ cancelAtPeriodEnd: boolean;
155
+ firstAttemptAt: number;
156
+ intentKey: string;
157
+ key: string;
158
+ operationId: string;
159
+ resultJson?: string | undefined;
160
+ }, {
161
+ key: import("convex/values").VString<string, "required">;
162
+ intentKey: import("convex/values").VString<string, "required">;
163
+ operationId: import("convex/values").VString<string, "required">;
164
+ cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
165
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
166
+ resultJson: import("convex/values").VString<string | undefined, "optional">;
167
+ }, "required", "cancelAtPeriodEnd" | "firstAttemptAt" | "intentKey" | "key" | "operationId" | "resultJson">, {
168
+ by_key: ["key", "_creationTime"];
169
+ }, {}, {}>;
170
+ usageSubscriptionIntents: import("convex/server").TableDefinition<import("convex/values").VObject<{
171
+ abandonedId?: string | undefined;
172
+ checkoutId?: string | undefined;
173
+ controlKey?: string | undefined;
174
+ firstAttemptAt: number;
175
+ historyCount?: number | undefined;
176
+ key: string;
177
+ method: "checkout" | "direct";
178
+ observationStartedAt?: number | undefined;
179
+ providerId?: string | undefined;
180
+ retiredAt?: number | undefined;
181
+ retirementInvoiceId?: string | undefined;
182
+ scopeKey: string;
183
+ startedAt?: number | undefined;
184
+ termsJson: string;
185
+ viewJson?: string | undefined;
186
+ }, {
187
+ key: import("convex/values").VString<string, "required">;
188
+ scopeKey: import("convex/values").VString<string, "required">;
189
+ termsJson: import("convex/values").VString<string, "required">;
190
+ method: import("convex/values").VUnion<"checkout" | "direct", [import("convex/values").VLiteral<"direct", "required">, import("convex/values").VLiteral<"checkout", "required">], "required", never>;
191
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
192
+ providerId: import("convex/values").VString<string | undefined, "optional">;
193
+ checkoutId: import("convex/values").VString<string | undefined, "optional">;
194
+ viewJson: import("convex/values").VString<string | undefined, "optional">;
195
+ startedAt: import("convex/values").VFloat64<number | undefined, "optional">;
196
+ observationStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
197
+ controlKey: import("convex/values").VString<string | undefined, "optional">;
198
+ historyCount: import("convex/values").VFloat64<number | undefined, "optional">;
199
+ retiredAt: import("convex/values").VFloat64<number | undefined, "optional">;
200
+ abandonedId: import("convex/values").VString<string | undefined, "optional">;
201
+ retirementInvoiceId: import("convex/values").VString<string | undefined, "optional">;
202
+ }, "required", "abandonedId" | "checkoutId" | "controlKey" | "firstAttemptAt" | "historyCount" | "key" | "method" | "observationStartedAt" | "providerId" | "retiredAt" | "retirementInvoiceId" | "scopeKey" | "startedAt" | "termsJson" | "viewJson">, {
203
+ by_key: ["key", "_creationTime"];
204
+ by_provider: ["providerId", "_creationTime"];
205
+ }, {}, {}>;
206
+ usageSubscriptionLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
207
+ customerAccount: string;
208
+ intentKey: string;
209
+ key: string;
210
+ stripeAccountId: string;
211
+ }, {
212
+ key: import("convex/values").VString<string, "required">;
213
+ intentKey: import("convex/values").VString<string, "required">;
214
+ stripeAccountId: import("convex/values").VString<string, "required">;
215
+ customerAccount: import("convex/values").VString<string, "required">;
216
+ }, "required", "customerAccount" | "intentKey" | "key" | "stripeAccountId">, {
217
+ by_key: ["key", "_creationTime"];
218
+ by_payer: ["customerAccount", "_creationTime"];
219
+ by_realm: ["stripeAccountId", "_creationTime"];
220
+ }, {}, {}>;
221
+ usageSubscriptionHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
222
+ fingerprint: string;
223
+ intentKey: string;
224
+ kind: "invoice" | "retirement" | "subscription";
225
+ observationJson: string;
226
+ resourceId: string;
227
+ startedAt: number;
228
+ }, {
229
+ intentKey: import("convex/values").VString<string, "required">;
230
+ kind: import("convex/values").VUnion<"invoice" | "retirement" | "subscription", [import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"invoice", "required">, import("convex/values").VLiteral<"retirement", "required">], "required", never>;
231
+ resourceId: import("convex/values").VString<string, "required">;
232
+ fingerprint: import("convex/values").VString<string, "required">;
233
+ observationJson: import("convex/values").VString<string, "required">;
234
+ startedAt: import("convex/values").VFloat64<number, "required">;
235
+ }, "required", "fingerprint" | "intentKey" | "kind" | "observationJson" | "resourceId" | "startedAt">, {
236
+ by_fingerprint: ["fingerprint", "_creationTime"];
237
+ by_intent_kind: ["intentKey", "kind", "_creationTime"];
238
+ }, {}, {}>;
239
+ usageProviderObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
240
+ key: string;
241
+ observationJson: string;
242
+ scopeKey: string;
243
+ sourceJson: string;
244
+ startedAt: number;
245
+ }, {
246
+ key: import("convex/values").VString<string, "required">;
247
+ scopeKey: import("convex/values").VString<string, "required">;
248
+ sourceJson: import("convex/values").VString<string, "required">;
249
+ observationJson: import("convex/values").VString<string, "required">;
250
+ startedAt: import("convex/values").VFloat64<number, "required">;
251
+ }, "required", "key" | "observationJson" | "scopeKey" | "sourceJson" | "startedAt">, {
252
+ by_key: ["key", "_creationTime"];
253
+ }, {}, {}>;
254
+ usageDeliveryHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
255
+ attempt: number;
256
+ created?: number | undefined;
257
+ eventId: import("convex/values").GenericId<"usageEvents">;
258
+ identity: string;
259
+ phase: "accepted" | "held" | "rate_limited" | "rejected" | "resumed" | "retry_exhausted" | "started" | "unavailable" | "unknown" | "window_expired";
260
+ recordedAt: number;
261
+ scopeKey: string;
262
+ sequence: number;
263
+ }, {
264
+ scopeKey: import("convex/values").VString<string, "required">;
265
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
266
+ sequence: import("convex/values").VFloat64<number, "required">;
267
+ attempt: import("convex/values").VFloat64<number, "required">;
268
+ phase: import("convex/values").VUnion<"accepted" | "held" | "rate_limited" | "rejected" | "resumed" | "retry_exhausted" | "started" | "unavailable" | "unknown" | "window_expired", [import("convex/values").VLiteral<"started", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"unavailable", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"held", "required">, import("convex/values").VLiteral<"resumed", "required">, import("convex/values").VLiteral<"window_expired", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">], "required", never>;
269
+ identity: import("convex/values").VString<string, "required">;
270
+ recordedAt: import("convex/values").VFloat64<number, "required">;
271
+ created: import("convex/values").VFloat64<number | undefined, "optional">;
272
+ }, "required", "attempt" | "created" | "eventId" | "identity" | "phase" | "recordedAt" | "scopeKey" | "sequence">, {
273
+ by_event_identity: ["eventId", "identity", "_creationTime"];
274
+ by_event_sequence: ["eventId", "sequence", "_creationTime"];
275
+ }, {}, {}>;
276
+ usageDeliveryLocks: import("convex/server").TableDefinition<import("convex/values").VObject<{
277
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
278
+ key: string;
279
+ leaseUntil: number;
280
+ nextAttemptAt: number;
281
+ }, {
282
+ key: import("convex/values").VString<string, "required">;
283
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
284
+ leaseUntil: import("convex/values").VFloat64<number, "required">;
285
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
286
+ }, "required", "eventId" | "key" | "leaseUntil" | "nextAttemptAt">, {
287
+ by_key: ["key", "_creationTime"];
288
+ }, {}, {}>;
289
+ usageDeliveryErrors: import("convex/server").TableDefinition<import("convex/values").VObject<{
290
+ code: "archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past";
291
+ dedupe: string;
292
+ eventId: import("convex/values").GenericId<"usageEvents">;
293
+ observedAt: number;
294
+ providerEventId: string;
295
+ scopeKey: string;
296
+ }, {
297
+ scopeKey: import("convex/values").VString<string, "required">;
298
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
299
+ providerEventId: import("convex/values").VString<string, "required">;
300
+ code: import("convex/values").VUnion<"archived_meter" | "meter_event_customer_not_found" | "meter_event_dimension_count_too_high" | "meter_event_invalid_value" | "meter_event_no_customer_defined" | "meter_event_value_not_found" | "no_meter" | "timestamp_in_future" | "timestamp_too_far_in_past", [import("convex/values").VLiteral<"meter_event_customer_not_found", "required">, import("convex/values").VLiteral<"meter_event_no_customer_defined", "required">, import("convex/values").VLiteral<"meter_event_dimension_count_too_high", "required">, import("convex/values").VLiteral<"archived_meter", "required">, import("convex/values").VLiteral<"timestamp_too_far_in_past", "required">, import("convex/values").VLiteral<"timestamp_in_future", "required">, import("convex/values").VLiteral<"meter_event_value_not_found", "required">, import("convex/values").VLiteral<"meter_event_invalid_value", "required">, import("convex/values").VLiteral<"no_meter", "required">], "required", never>;
301
+ observedAt: import("convex/values").VFloat64<number, "required">;
302
+ dedupe: import("convex/values").VString<string, "required">;
303
+ }, "required", "code" | "dedupe" | "eventId" | "observedAt" | "providerEventId" | "scopeKey">, {
304
+ by_dedupe: ["dedupe", "_creationTime"];
305
+ by_event: ["eventId", "_creationTime"];
306
+ by_scope: ["scopeKey", "_creationTime"];
307
+ }, {}, {}>;
308
+ usageCatalog: import("convex/server").TableDefinition<import("convex/values").VObject<{
309
+ firstAttemptAt: number;
310
+ key: string;
311
+ kind: "meter" | "price";
312
+ observationJson?: string | undefined;
313
+ observedAt?: number | undefined;
314
+ providerId?: string | undefined;
315
+ scopeKey: string;
316
+ termsJson: string;
317
+ }, {
318
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
319
+ scopeKey: import("convex/values").VString<string, "required">;
320
+ kind: import("convex/values").VUnion<"meter" | "price", [import("convex/values").VLiteral<"meter", "required">, import("convex/values").VLiteral<"price", "required">], "required", never>;
321
+ key: import("convex/values").VString<string, "required">;
322
+ termsJson: import("convex/values").VString<string, "required">;
323
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
324
+ providerId: import("convex/values").VString<string | undefined, "optional">;
325
+ observationJson: import("convex/values").VString<string | undefined, "optional">;
326
+ }, "required", "firstAttemptAt" | "key" | "kind" | "observationJson" | "observedAt" | "providerId" | "scopeKey" | "termsJson">, {
327
+ by_scope_kind_key: ["scopeKey", "kind", "key", "_creationTime"];
328
+ by_scope_kind_provider: ["scopeKey", "kind", "providerId", "_creationTime"];
329
+ }, {}, {}>;
330
+ usageEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
331
+ acceptedAt: number;
332
+ identity: string;
333
+ occurredAt: number;
334
+ recordJson: string;
335
+ reservationId?: import("convex/values").GenericId<"usageReservations"> | undefined;
336
+ scopeKey: string;
337
+ subscriptionId?: string | undefined;
338
+ subscriptionJson: string;
339
+ }, {
340
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
341
+ reservationId: import("convex/values").VId<import("convex/values").GenericId<"usageReservations"> | undefined, "optional">;
342
+ scopeKey: import("convex/values").VString<string, "required">;
343
+ identity: import("convex/values").VString<string, "required">;
344
+ recordJson: import("convex/values").VString<string, "required">;
345
+ subscriptionJson: import("convex/values").VString<string, "required">;
346
+ occurredAt: import("convex/values").VFloat64<number, "required">;
347
+ acceptedAt: import("convex/values").VFloat64<number, "required">;
348
+ }, "required", "acceptedAt" | "identity" | "occurredAt" | "recordJson" | "reservationId" | "scopeKey" | "subscriptionId" | "subscriptionJson">, {
349
+ by_identity: ["identity", "_creationTime"];
350
+ by_scope_subscription: ["scopeKey", "subscriptionId", "_creationTime"];
351
+ by_scope_subscription_time: ["scopeKey", "subscriptionId", "occurredAt", "_creationTime"];
352
+ by_scope_time: ["scopeKey", "occurredAt", "_creationTime"];
353
+ }, {}, {}>;
354
+ usageOutbox: import("convex/server").TableDefinition<import("convex/values").VObject<{
355
+ attempts: number;
356
+ correctionKey?: string | undefined;
357
+ definitionVersion?: 1 | undefined;
358
+ dispatch?: string | undefined;
359
+ eventId: import("convex/values").GenericId<"usageEvents">;
360
+ firstSendAt?: number | undefined;
361
+ held?: boolean | undefined;
362
+ historySequence?: number | undefined;
363
+ leaseUntil?: number | undefined;
364
+ nextAttemptAt: number;
365
+ provider?: string | undefined;
366
+ providerIdentifier: string;
367
+ reason?: "administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined;
368
+ receipt?: {
369
+ created: number;
370
+ identifier: string;
371
+ } | undefined;
372
+ scopeKey: string;
373
+ state: "canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown";
374
+ workflowId?: string | undefined;
375
+ }, {
376
+ historySequence: import("convex/values").VFloat64<number | undefined, "optional">;
377
+ provider: import("convex/values").VString<string | undefined, "optional">;
378
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
379
+ definitionVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
380
+ firstSendAt: import("convex/values").VFloat64<number | undefined, "optional">;
381
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
382
+ held: import("convex/values").VBoolean<boolean | undefined, "optional">;
383
+ reason: import("convex/values").VUnion<"administrative_hold" | "billing_period_closed" | "delivery_window_expired" | "provider_outcome_unknown" | "provider_rejected" | "provider_unavailable" | "rate_limited" | "retry_exhausted" | "scope_busy" | "usage_canceled" | undefined, [import("convex/values").VLiteral<"usage_canceled", "required">, import("convex/values").VLiteral<"billing_period_closed", "required">, import("convex/values").VLiteral<"rate_limited", "required">, import("convex/values").VLiteral<"provider_unavailable", "required">, import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"provider_rejected", "required">, import("convex/values").VLiteral<"retry_exhausted", "required">, import("convex/values").VLiteral<"delivery_window_expired", "required">, import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"administrative_hold", "required">], "optional", never>;
384
+ receipt: import("convex/values").VObject<{
385
+ created: number;
386
+ identifier: string;
387
+ } | undefined, {
388
+ identifier: import("convex/values").VString<string, "required">;
389
+ created: import("convex/values").VFloat64<number, "required">;
390
+ }, "optional", "created" | "identifier">;
391
+ correctionKey: import("convex/values").VString<string | undefined, "optional">;
392
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents">, "required">;
393
+ scopeKey: import("convex/values").VString<string, "required">;
394
+ state: import("convex/values").VUnion<"canceled" | "held" | "provider_accepted" | "queued" | "rejected" | "sending" | "unknown", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"sending", "required">, import("convex/values").VLiteral<"provider_accepted", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
395
+ attempts: import("convex/values").VFloat64<number, "required">;
396
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
397
+ providerIdentifier: import("convex/values").VString<string, "required">;
398
+ dispatch: import("convex/values").VString<string | undefined, "optional">;
399
+ }, "required", "attempts" | "correctionKey" | "definitionVersion" | "dispatch" | "eventId" | "firstSendAt" | "held" | "historySequence" | "leaseUntil" | "nextAttemptAt" | "provider" | "providerIdentifier" | "reason" | "receipt" | "receipt.created" | "receipt.identifier" | "scopeKey" | "state" | "workflowId">, {
400
+ by_event: ["eventId", "_creationTime"];
401
+ by_provider_identifier: ["providerIdentifier", "_creationTime"];
402
+ by_scope_state: ["scopeKey", "state", "_creationTime"];
403
+ by_state_next: ["state", "nextAttemptAt", "_creationTime"];
404
+ }, {}, {}>;
405
+ usageScopeCounters: import("convex/server").TableDefinition<import("convex/values").VObject<{
406
+ count: number;
407
+ scopeKey: string;
408
+ }, {
409
+ scopeKey: import("convex/values").VString<string, "required">;
410
+ count: import("convex/values").VFloat64<number, "required">;
411
+ }, "required", "count" | "scopeKey">, {
412
+ by_scope: ["scopeKey", "_creationTime"];
413
+ }, {}, {}>;
414
+ usageReservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
415
+ accountKey?: string | undefined;
416
+ accountingKind?: "allowance" | "prepaid" | undefined;
417
+ allocationsJson?: string | undefined;
418
+ eventId?: import("convex/values").GenericId<"usageEvents"> | undefined;
419
+ inputJson?: string | undefined;
420
+ planJson: string;
421
+ releaseReason?: string | undefined;
422
+ scaledQuantity: string;
423
+ scopeKey: string;
424
+ sourceEventId: string;
425
+ state: "committed" | "released" | "reserved";
426
+ subscriptionJson?: string | undefined;
427
+ }, {
428
+ scopeKey: import("convex/values").VString<string, "required">;
429
+ sourceEventId: import("convex/values").VString<string, "required">;
430
+ planJson: import("convex/values").VString<string, "required">;
431
+ scaledQuantity: import("convex/values").VString<string, "required">;
432
+ state: import("convex/values").VUnion<"committed" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"committed", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
433
+ eventId: import("convex/values").VId<import("convex/values").GenericId<"usageEvents"> | undefined, "optional">;
434
+ accountingKind: import("convex/values").VUnion<"allowance" | "prepaid" | undefined, [import("convex/values").VLiteral<"prepaid", "required">, import("convex/values").VLiteral<"allowance", "required">], "optional", never>;
435
+ accountKey: import("convex/values").VString<string | undefined, "optional">;
436
+ inputJson: import("convex/values").VString<string | undefined, "optional">;
437
+ subscriptionJson: import("convex/values").VString<string | undefined, "optional">;
438
+ allocationsJson: import("convex/values").VString<string | undefined, "optional">;
439
+ releaseReason: import("convex/values").VString<string | undefined, "optional">;
440
+ }, "required", "accountKey" | "accountingKind" | "allocationsJson" | "eventId" | "inputJson" | "planJson" | "releaseReason" | "scaledQuantity" | "scopeKey" | "sourceEventId" | "state" | "subscriptionJson">, {
441
+ by_account_state: ["accountKey", "state", "_creationTime"];
442
+ by_scope_source: ["scopeKey", "sourceEventId", "_creationTime"];
443
+ by_scope_state: ["scopeKey", "state", "_creationTime"];
444
+ }, {}, {}>;
445
+ usageCreditAccounts: import("convex/server").TableDefinition<import("convex/values").VObject<{
446
+ bindingJson: string;
447
+ closed: boolean;
448
+ customerAccount: string;
449
+ frozenReason?: string | undefined;
450
+ historyCount: number;
451
+ key: string;
452
+ purchaseCount: number;
453
+ scopeKey: string;
454
+ stripeAccountId: string;
455
+ }, {
456
+ key: import("convex/values").VString<string, "required">;
457
+ scopeKey: import("convex/values").VString<string, "required">;
458
+ bindingJson: import("convex/values").VString<string, "required">;
459
+ stripeAccountId: import("convex/values").VString<string, "required">;
460
+ customerAccount: import("convex/values").VString<string, "required">;
461
+ closed: import("convex/values").VBoolean<boolean, "required">;
462
+ purchaseCount: import("convex/values").VFloat64<number, "required">;
463
+ historyCount: import("convex/values").VFloat64<number, "required">;
464
+ frozenReason: import("convex/values").VString<string | undefined, "optional">;
465
+ }, "required", "bindingJson" | "closed" | "customerAccount" | "frozenReason" | "historyCount" | "key" | "purchaseCount" | "scopeKey" | "stripeAccountId">, {
466
+ by_key: ["key", "_creationTime"];
467
+ by_payer_closed: ["customerAccount", "closed", "_creationTime"];
468
+ by_realm_closed: ["stripeAccountId", "closed", "_creationTime"];
469
+ }, {}, {}>;
470
+ usageCreditPurchases: import("convex/server").TableDefinition<import("convex/values").VObject<{
471
+ accountKey: string;
472
+ capacityReserved: boolean;
473
+ creditGrantId?: string | undefined;
474
+ firstAttemptAt: number;
475
+ grantFirstAttemptAt?: number | undefined;
476
+ key: string;
477
+ nativeCustomerKey: string;
478
+ paymentAttemptedAt?: number | undefined;
479
+ paymentIntentId?: string | undefined;
480
+ paymentKey?: string | undefined;
481
+ paymentProofJson?: string | undefined;
482
+ recoveryReason?: "native_state_changed" | "payment_disputed" | "payment_refunded" | undefined;
483
+ refundedAmount?: number | undefined;
484
+ state: "canceled" | "frozen" | "pending" | "ready";
485
+ termsJson: string;
486
+ }, {
487
+ key: import("convex/values").VString<string, "required">;
488
+ accountKey: import("convex/values").VString<string, "required">;
489
+ nativeCustomerKey: import("convex/values").VString<string, "required">;
490
+ capacityReserved: import("convex/values").VBoolean<boolean, "required">;
491
+ paymentAttemptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
492
+ termsJson: import("convex/values").VString<string, "required">;
493
+ firstAttemptAt: import("convex/values").VFloat64<number, "required">;
494
+ state: import("convex/values").VUnion<"canceled" | "frozen" | "pending" | "ready", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"frozen", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
495
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
496
+ paymentKey: import("convex/values").VString<string | undefined, "optional">;
497
+ paymentProofJson: import("convex/values").VString<string | undefined, "optional">;
498
+ refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
499
+ recoveryReason: import("convex/values").VUnion<"native_state_changed" | "payment_disputed" | "payment_refunded" | undefined, [import("convex/values").VLiteral<"payment_refunded", "required">, import("convex/values").VLiteral<"payment_disputed", "required">, import("convex/values").VLiteral<"native_state_changed", "required">], "optional", never>;
500
+ grantFirstAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
501
+ creditGrantId: import("convex/values").VString<string | undefined, "optional">;
502
+ }, "required", "accountKey" | "capacityReserved" | "creditGrantId" | "firstAttemptAt" | "grantFirstAttemptAt" | "key" | "nativeCustomerKey" | "paymentAttemptedAt" | "paymentIntentId" | "paymentKey" | "paymentProofJson" | "recoveryReason" | "refundedAmount" | "state" | "termsJson">, {
503
+ by_account: ["accountKey", "_creationTime"];
504
+ by_customer_capacity: ["nativeCustomerKey", "capacityReserved", "_creationTime"];
505
+ by_key: ["key", "_creationTime"];
506
+ by_payment: ["paymentKey", "_creationTime"];
507
+ }, {}, {}>;
508
+ usageCreditGrants: import("convex/server").TableDefinition<import("convex/values").VObject<{
509
+ accountKey: string;
510
+ available: string;
511
+ chargeId: string;
512
+ consumed: string;
513
+ creditGrantId: string;
514
+ effectiveAt: number;
515
+ expiresAt: number | null;
516
+ frozen: boolean;
517
+ nativeCreated: number;
518
+ nativeCustomerKey: string;
519
+ nativeExpired?: boolean | undefined;
520
+ nativeObservationJson?: string | undefined;
521
+ nativeUnused: boolean;
522
+ observationConflictAt?: number | undefined;
523
+ observationStartedAt?: number | undefined;
524
+ observedAt?: number | undefined;
525
+ paymentIntentId: string;
526
+ proofJson: string;
527
+ proofStartedAt?: number | undefined;
528
+ purchaseKey: string;
529
+ reserved: string;
530
+ }, {
531
+ purchaseKey: import("convex/values").VString<string, "required">;
532
+ accountKey: import("convex/values").VString<string, "required">;
533
+ creditGrantId: import("convex/values").VString<string, "required">;
534
+ nativeCustomerKey: import("convex/values").VString<string, "required">;
535
+ nativeUnused: import("convex/values").VBoolean<boolean, "required">;
536
+ nativeCreated: import("convex/values").VFloat64<number, "required">;
537
+ paymentIntentId: import("convex/values").VString<string, "required">;
538
+ chargeId: import("convex/values").VString<string, "required">;
539
+ proofJson: import("convex/values").VString<string, "required">;
540
+ available: import("convex/values").VString<string, "required">;
541
+ reserved: import("convex/values").VString<string, "required">;
542
+ consumed: import("convex/values").VString<string, "required">;
543
+ effectiveAt: import("convex/values").VFloat64<number, "required">;
544
+ expiresAt: import("convex/values").VUnion<number | null, [import("convex/values").VFloat64<number, "required">, import("convex/values").VNull<null, "required">], "required", never>;
545
+ frozen: import("convex/values").VBoolean<boolean, "required">;
546
+ nativeExpired: import("convex/values").VBoolean<boolean | undefined, "optional">;
547
+ nativeObservationJson: import("convex/values").VString<string | undefined, "optional">;
548
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
549
+ proofStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
550
+ observationStartedAt: import("convex/values").VFloat64<number | undefined, "optional">;
551
+ observationConflictAt: import("convex/values").VFloat64<number | undefined, "optional">;
552
+ }, "required", "accountKey" | "available" | "chargeId" | "consumed" | "creditGrantId" | "effectiveAt" | "expiresAt" | "frozen" | "nativeCreated" | "nativeCustomerKey" | "nativeExpired" | "nativeObservationJson" | "nativeUnused" | "observationConflictAt" | "observationStartedAt" | "observedAt" | "paymentIntentId" | "proofJson" | "proofStartedAt" | "purchaseKey" | "reserved">, {
553
+ by_account: ["accountKey", "_creationTime"];
554
+ by_customer_unused: ["nativeCustomerKey", "nativeUnused", "_creationTime"];
555
+ by_native: ["creditGrantId", "_creationTime"];
556
+ by_purchase: ["purchaseKey", "_creationTime"];
557
+ }, {}, {}>;
558
+ usageCreditHistory: import("convex/server").TableDefinition<import("convex/values").VObject<{
559
+ accountKey: string;
560
+ at: number;
561
+ evidenceJson: string;
562
+ fingerprint: string;
563
+ kind: "closure" | "commit" | "correction" | "grant" | "observation" | "payment" | "purchase" | "recovery" | "release" | "reservation";
564
+ purchaseKey?: string | undefined;
565
+ sourceKey: string;
566
+ }, {
567
+ accountKey: import("convex/values").VString<string, "required">;
568
+ purchaseKey: import("convex/values").VString<string | undefined, "optional">;
569
+ kind: import("convex/values").VUnion<"closure" | "commit" | "correction" | "grant" | "observation" | "payment" | "purchase" | "recovery" | "release" | "reservation", [import("convex/values").VLiteral<"purchase", "required">, import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"grant", "required">, import("convex/values").VLiteral<"reservation", "required">, import("convex/values").VLiteral<"commit", "required">, import("convex/values").VLiteral<"release", "required">, import("convex/values").VLiteral<"observation", "required">, import("convex/values").VLiteral<"recovery", "required">, import("convex/values").VLiteral<"closure", "required">, import("convex/values").VLiteral<"correction", "required">], "required", never>;
570
+ sourceKey: import("convex/values").VString<string, "required">;
571
+ fingerprint: import("convex/values").VString<string, "required">;
572
+ evidenceJson: import("convex/values").VString<string, "required">;
573
+ at: import("convex/values").VFloat64<number, "required">;
574
+ }, "required", "accountKey" | "at" | "evidenceJson" | "fingerprint" | "kind" | "purchaseKey" | "sourceKey">, {
575
+ by_account: ["accountKey", "_creationTime"];
576
+ by_fingerprint: ["fingerprint", "_creationTime"];
577
+ by_purchase: ["accountKey", "purchaseKey", "_creationTime"];
578
+ }, {}, {}>;
579
+ refundSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
580
+ acceptedAt?: number | undefined;
581
+ acceptedContext?: string | undefined;
582
+ acceptedFingerprint?: string | undefined;
583
+ acceptedGeneration?: number | undefined;
584
+ generation: number;
585
+ requestedContext: string;
586
+ startedAt: number;
587
+ status: "accepted" | "pending" | "unknown";
588
+ stripeRefundId: string;
589
+ }, {
590
+ stripeRefundId: import("convex/values").VString<string, "required">;
591
+ requestedContext: import("convex/values").VString<string, "required">;
592
+ generation: import("convex/values").VFloat64<number, "required">;
593
+ status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
594
+ startedAt: import("convex/values").VFloat64<number, "required">;
595
+ acceptedContext: import("convex/values").VString<string | undefined, "optional">;
596
+ acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
597
+ acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
598
+ acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
599
+ }, "required", "acceptedAt" | "acceptedContext" | "acceptedFingerprint" | "acceptedGeneration" | "generation" | "requestedContext" | "startedAt" | "status" | "stripeRefundId">, {
600
+ by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
601
+ }, {}, {}>;
602
+ processingCostReconciliationOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
603
+ accountId: string;
604
+ claimKey: string;
605
+ currency: string;
606
+ definitionVersion: number;
607
+ expectedRevision: number;
608
+ failure?: {
609
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
610
+ retryable: true;
611
+ status: "not_ready";
612
+ } | {
613
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
614
+ retryable: false;
615
+ status: "conflict";
616
+ } | {
617
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
618
+ retryable: false;
619
+ status: "rejected";
620
+ } | {
621
+ reason: "history_incomplete" | "provider_outcome_unknown";
622
+ retryable: false;
623
+ status: "unknown";
624
+ } | undefined;
625
+ importHook?: string | undefined;
626
+ maxAttempts: number;
627
+ policy: {
628
+ liability: {
629
+ disputeCosts: "all" | "none";
630
+ processingCosts: "all" | "none" | "uncovered";
631
+ };
632
+ rounding: "ceil" | "floor" | "nearest";
633
+ sellingFee: number;
634
+ };
635
+ projection?: string | undefined;
636
+ provider: string;
637
+ providerApiVersion: string;
638
+ requestKey: string;
639
+ result?: {
640
+ claim: {
641
+ _creationTime: number;
642
+ _id: import("convex/values").GenericId<"recoveryClaims">;
643
+ accountId: string;
644
+ amountDue: number;
645
+ claimKey: string;
646
+ collectedAmount: number;
647
+ currency: string;
648
+ openingCollection?: {
649
+ amountDue: number;
650
+ collectedAmount: number;
651
+ operationKey: string;
652
+ revision: number;
653
+ } | undefined;
654
+ outstanding: number;
655
+ reservedAmount: number;
656
+ revision: number;
657
+ scopeKey: string;
658
+ sign: "negative" | "positive" | "zero";
659
+ sourceChargeId: string;
660
+ sourceGross: number;
661
+ sourceProcessingFee: number;
662
+ };
663
+ deficit: {
664
+ amountDue: number;
665
+ currency: string;
666
+ disputeLiability: number;
667
+ processingLiability: number;
668
+ retainedFee: number;
669
+ };
670
+ observation: {
671
+ currency: string;
672
+ disputeFees: number;
673
+ gross: number;
674
+ originalProcessingFee: number;
675
+ paymentIntentId: string;
676
+ principalReturned: number;
677
+ processingFee: number;
678
+ provenance: {
679
+ customerAccountId: string;
680
+ invoiceId: string;
681
+ invoicePaymentId: string;
682
+ recoveryInvoiceItemId?: string | undefined;
683
+ stripePriceId?: string | undefined;
684
+ stripeProductId?: string | undefined;
685
+ subscriptionId?: string | undefined;
686
+ };
687
+ sourceChargeId: string;
688
+ };
689
+ rollbackClaim?: {
690
+ _creationTime: number;
691
+ _id: import("convex/values").GenericId<"recoveryClaims">;
692
+ accountId: string;
693
+ amountDue: number;
694
+ claimKey: string;
695
+ collectedAmount: number;
696
+ currency: string;
697
+ openingCollection?: {
698
+ amountDue: number;
699
+ collectedAmount: number;
700
+ operationKey: string;
701
+ revision: number;
702
+ } | undefined;
703
+ outstanding: number;
704
+ reservedAmount: number;
705
+ revision: number;
706
+ scopeKey: string;
707
+ sign: "negative" | "positive" | "zero";
708
+ sourceChargeId: string;
709
+ sourceGross: number;
710
+ sourceProcessingFee: number;
711
+ } | undefined;
712
+ } | undefined;
713
+ retryDelayMs: number;
714
+ rollback?: {
715
+ expectedRevision: number;
716
+ groupKey: string;
717
+ } | undefined;
718
+ scopeKey: string;
719
+ source: {
720
+ customerAccountId: string;
721
+ gross: number;
722
+ invoiceId?: string | undefined;
723
+ kind: "sale";
724
+ paymentIntentId: string;
725
+ stripeAccountId?: string | undefined;
726
+ stripePriceId?: string | undefined;
727
+ stripeProductId?: string | undefined;
728
+ subscriptionId?: string | undefined;
729
+ } | {
730
+ gross: number;
731
+ groupKey: string;
732
+ kind: "invoice_recovery";
733
+ paymentIntentId: string;
734
+ };
735
+ status: "completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting";
736
+ version: number;
737
+ workflowId?: string | undefined;
738
+ }, {
739
+ accountId: import("convex/values").VString<string, "required">;
740
+ scopeKey: import("convex/values").VString<string, "required">;
741
+ currency: import("convex/values").VString<string, "required">;
742
+ claimKey: import("convex/values").VString<string, "required">;
743
+ source: import("convex/values").VUnion<{
744
+ customerAccountId: string;
745
+ gross: number;
746
+ invoiceId?: string | undefined;
747
+ kind: "sale";
748
+ paymentIntentId: string;
749
+ stripeAccountId?: string | undefined;
750
+ stripePriceId?: string | undefined;
751
+ stripeProductId?: string | undefined;
752
+ subscriptionId?: string | undefined;
753
+ } | {
754
+ gross: number;
755
+ groupKey: string;
756
+ kind: "invoice_recovery";
757
+ paymentIntentId: string;
758
+ }, [import("convex/values").VObject<{
759
+ customerAccountId: string;
760
+ gross: number;
761
+ invoiceId?: string | undefined;
762
+ kind: "sale";
763
+ paymentIntentId: string;
764
+ stripeAccountId?: string | undefined;
765
+ stripePriceId?: string | undefined;
766
+ stripeProductId?: string | undefined;
767
+ subscriptionId?: string | undefined;
768
+ }, {
769
+ kind: import("convex/values").VLiteral<"sale", "required">;
770
+ paymentIntentId: import("convex/values").VString<string, "required">;
771
+ gross: import("convex/values").VFloat64<number, "required">;
772
+ customerAccountId: import("convex/values").VString<string, "required">;
773
+ invoiceId: import("convex/values").VString<string | undefined, "optional">;
774
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
775
+ stripeAccountId: import("convex/values").VString<string | undefined, "optional">;
776
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
777
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
778
+ }, "required", "customerAccountId" | "gross" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">, import("convex/values").VObject<{
779
+ gross: number;
780
+ groupKey: string;
781
+ kind: "invoice_recovery";
782
+ paymentIntentId: string;
783
+ }, {
784
+ kind: import("convex/values").VLiteral<"invoice_recovery", "required">;
785
+ paymentIntentId: import("convex/values").VString<string, "required">;
786
+ gross: import("convex/values").VFloat64<number, "required">;
787
+ groupKey: import("convex/values").VString<string, "required">;
788
+ }, "required", "gross" | "groupKey" | "kind" | "paymentIntentId">], "required", "customerAccountId" | "gross" | "groupKey" | "invoiceId" | "kind" | "paymentIntentId" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
789
+ policy: import("convex/values").VObject<{
790
+ liability: {
791
+ disputeCosts: "all" | "none";
792
+ processingCosts: "all" | "none" | "uncovered";
793
+ };
794
+ rounding: "ceil" | "floor" | "nearest";
795
+ sellingFee: number;
796
+ }, {
797
+ sellingFee: import("convex/values").VFloat64<number, "required">;
798
+ liability: import("convex/values").VObject<{
799
+ disputeCosts: "all" | "none";
800
+ processingCosts: "all" | "none" | "uncovered";
801
+ }, {
802
+ processingCosts: import("convex/values").VUnion<"all" | "none" | "uncovered", [import("convex/values").VLiteral<"uncovered", "required">, import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
803
+ disputeCosts: import("convex/values").VUnion<"all" | "none", [import("convex/values").VLiteral<"all", "required">, import("convex/values").VLiteral<"none", "required">], "required", never>;
804
+ }, "required", "disputeCosts" | "processingCosts">;
805
+ rounding: import("convex/values").VUnion<"ceil" | "floor" | "nearest", [import("convex/values").VLiteral<"nearest", "required">, import("convex/values").VLiteral<"floor", "required">, import("convex/values").VLiteral<"ceil", "required">], "required", never>;
806
+ }, "required", "liability" | "liability.disputeCosts" | "liability.processingCosts" | "rounding" | "sellingFee">;
807
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
808
+ rollback: import("convex/values").VObject<{
809
+ expectedRevision: number;
810
+ groupKey: string;
811
+ } | undefined, {
812
+ groupKey: import("convex/values").VString<string, "required">;
813
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
814
+ }, "optional", "expectedRevision" | "groupKey">;
815
+ provider: import("convex/values").VString<string, "required">;
816
+ projection: import("convex/values").VString<string | undefined, "optional">;
817
+ importHook: import("convex/values").VString<string | undefined, "optional">;
818
+ providerApiVersion: import("convex/values").VString<string, "required">;
819
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
820
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
821
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
822
+ requestKey: import("convex/values").VString<string, "required">;
823
+ version: import("convex/values").VFloat64<number, "required">;
824
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
825
+ status: import("convex/values").VUnion<"completed" | "conflict" | "queued" | "rejected" | "running" | "unknown" | "waiting", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"conflict", "required">, import("convex/values").VLiteral<"rejected", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
826
+ failure: import("convex/values").VUnion<{
827
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
828
+ retryable: true;
829
+ status: "not_ready";
830
+ } | {
831
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
832
+ retryable: false;
833
+ status: "conflict";
834
+ } | {
835
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
836
+ retryable: false;
837
+ status: "rejected";
838
+ } | {
839
+ reason: "history_incomplete" | "provider_outcome_unknown";
840
+ retryable: false;
841
+ status: "unknown";
842
+ } | undefined, [import("convex/values").VObject<{
843
+ reason: "fee_pending" | "history_incomplete" | "provider_pending";
844
+ retryable: true;
845
+ status: "not_ready";
846
+ }, {
847
+ status: import("convex/values").VLiteral<"not_ready", "required">;
848
+ reason: import("convex/values").VUnion<"fee_pending" | "history_incomplete" | "provider_pending", [import("convex/values").VLiteral<"provider_pending", "required">, import("convex/values").VLiteral<"fee_pending", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
849
+ retryable: import("convex/values").VLiteral<true, "required">;
850
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
851
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
852
+ retryable: false;
853
+ status: "conflict";
854
+ }, {
855
+ status: import("convex/values").VLiteral<"conflict", "required">;
856
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"revision_changed", "required">, import("convex/values").VLiteral<"identity_changed", "required">], "required", never>;
857
+ retryable: import("convex/values").VLiteral<false, "required">;
858
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
859
+ reason: "currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source";
860
+ retryable: false;
861
+ status: "rejected";
862
+ }, {
863
+ status: import("convex/values").VLiteral<"rejected", "required">;
864
+ reason: import("convex/values").VUnion<"currency_mismatch" | "invalid_scope" | "payment_not_payable" | "policy_invalid" | "unsupported_source", [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">, import("convex/values").VLiteral<"payment_not_payable", "required">, import("convex/values").VLiteral<"currency_mismatch", "required">], "required", never>;
865
+ retryable: import("convex/values").VLiteral<false, "required">;
866
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
867
+ reason: "history_incomplete" | "provider_outcome_unknown";
868
+ retryable: false;
869
+ status: "unknown";
870
+ }, {
871
+ status: import("convex/values").VLiteral<"unknown", "required">;
872
+ reason: import("convex/values").VUnion<"history_incomplete" | "provider_outcome_unknown", [import("convex/values").VLiteral<"provider_outcome_unknown", "required">, import("convex/values").VLiteral<"history_incomplete", "required">], "required", never>;
873
+ retryable: import("convex/values").VLiteral<false, "required">;
874
+ }, "required", "reason" | "retryable" | "status">], "optional", "reason" | "retryable" | "status">;
875
+ result: import("convex/values").VObject<{
876
+ claim: {
877
+ _creationTime: number;
878
+ _id: import("convex/values").GenericId<"recoveryClaims">;
879
+ accountId: string;
880
+ amountDue: number;
881
+ claimKey: string;
882
+ collectedAmount: number;
883
+ currency: string;
884
+ openingCollection?: {
885
+ amountDue: number;
886
+ collectedAmount: number;
887
+ operationKey: string;
888
+ revision: number;
889
+ } | undefined;
890
+ outstanding: number;
891
+ reservedAmount: number;
892
+ revision: number;
893
+ scopeKey: string;
894
+ sign: "negative" | "positive" | "zero";
895
+ sourceChargeId: string;
896
+ sourceGross: number;
897
+ sourceProcessingFee: number;
898
+ };
899
+ deficit: {
900
+ amountDue: number;
901
+ currency: string;
902
+ disputeLiability: number;
903
+ processingLiability: number;
904
+ retainedFee: number;
905
+ };
906
+ observation: {
907
+ currency: string;
908
+ disputeFees: number;
909
+ gross: number;
910
+ originalProcessingFee: number;
911
+ paymentIntentId: string;
912
+ principalReturned: number;
913
+ processingFee: number;
914
+ provenance: {
915
+ customerAccountId: string;
916
+ invoiceId: string;
917
+ invoicePaymentId: string;
918
+ recoveryInvoiceItemId?: string | undefined;
919
+ stripePriceId?: string | undefined;
920
+ stripeProductId?: string | undefined;
921
+ subscriptionId?: string | undefined;
922
+ };
923
+ sourceChargeId: string;
924
+ };
925
+ rollbackClaim?: {
926
+ _creationTime: number;
927
+ _id: import("convex/values").GenericId<"recoveryClaims">;
928
+ accountId: string;
929
+ amountDue: number;
930
+ claimKey: string;
931
+ collectedAmount: number;
932
+ currency: string;
933
+ openingCollection?: {
934
+ amountDue: number;
935
+ collectedAmount: number;
936
+ operationKey: string;
937
+ revision: number;
938
+ } | undefined;
939
+ outstanding: number;
940
+ reservedAmount: number;
941
+ revision: number;
942
+ scopeKey: string;
943
+ sign: "negative" | "positive" | "zero";
944
+ sourceChargeId: string;
945
+ sourceGross: number;
946
+ sourceProcessingFee: number;
947
+ } | undefined;
948
+ } | undefined, {
949
+ claim: import("convex/values").VObject<{
950
+ _creationTime: number;
951
+ _id: import("convex/values").GenericId<"recoveryClaims">;
952
+ accountId: string;
953
+ amountDue: number;
954
+ claimKey: string;
955
+ collectedAmount: number;
956
+ currency: string;
957
+ openingCollection?: {
958
+ amountDue: number;
959
+ collectedAmount: number;
960
+ operationKey: string;
961
+ revision: number;
962
+ } | undefined;
963
+ outstanding: number;
964
+ reservedAmount: number;
965
+ revision: number;
966
+ scopeKey: string;
967
+ sign: "negative" | "positive" | "zero";
968
+ sourceChargeId: string;
969
+ sourceGross: number;
970
+ sourceProcessingFee: number;
971
+ }, {
972
+ accountId: import("convex/values").VString<string, "required">;
973
+ scopeKey: import("convex/values").VString<string, "required">;
974
+ currency: import("convex/values").VString<string, "required">;
975
+ claimKey: import("convex/values").VString<string, "required">;
976
+ sourceChargeId: import("convex/values").VString<string, "required">;
977
+ sourceGross: import("convex/values").VFloat64<number, "required">;
978
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
979
+ amountDue: import("convex/values").VFloat64<number, "required">;
980
+ revision: import("convex/values").VFloat64<number, "required">;
981
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
982
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
983
+ outstanding: import("convex/values").VFloat64<number, "required">;
984
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
985
+ openingCollection: import("convex/values").VObject<{
986
+ amountDue: number;
987
+ collectedAmount: number;
988
+ operationKey: string;
989
+ revision: number;
990
+ } | undefined, {
991
+ operationKey: import("convex/values").VString<string, "required">;
992
+ amountDue: import("convex/values").VFloat64<number, "required">;
993
+ revision: import("convex/values").VFloat64<number, "required">;
994
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
995
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
996
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
997
+ _creationTime: import("convex/values").VFloat64<number, "required">;
998
+ }, "required", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
999
+ rollbackClaim: import("convex/values").VObject<{
1000
+ _creationTime: number;
1001
+ _id: import("convex/values").GenericId<"recoveryClaims">;
1002
+ accountId: string;
1003
+ amountDue: number;
1004
+ claimKey: string;
1005
+ collectedAmount: number;
1006
+ currency: string;
1007
+ openingCollection?: {
1008
+ amountDue: number;
1009
+ collectedAmount: number;
1010
+ operationKey: string;
1011
+ revision: number;
1012
+ } | undefined;
1013
+ outstanding: number;
1014
+ reservedAmount: number;
1015
+ revision: number;
1016
+ scopeKey: string;
1017
+ sign: "negative" | "positive" | "zero";
1018
+ sourceChargeId: string;
1019
+ sourceGross: number;
1020
+ sourceProcessingFee: number;
1021
+ } | undefined, {
1022
+ accountId: import("convex/values").VString<string, "required">;
1023
+ scopeKey: import("convex/values").VString<string, "required">;
1024
+ currency: import("convex/values").VString<string, "required">;
1025
+ claimKey: import("convex/values").VString<string, "required">;
1026
+ sourceChargeId: import("convex/values").VString<string, "required">;
1027
+ sourceGross: import("convex/values").VFloat64<number, "required">;
1028
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
1029
+ amountDue: import("convex/values").VFloat64<number, "required">;
1030
+ revision: import("convex/values").VFloat64<number, "required">;
1031
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1032
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
1033
+ outstanding: import("convex/values").VFloat64<number, "required">;
1034
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
1035
+ openingCollection: import("convex/values").VObject<{
1036
+ amountDue: number;
1037
+ collectedAmount: number;
1038
+ operationKey: string;
1039
+ revision: number;
1040
+ } | undefined, {
1041
+ operationKey: import("convex/values").VString<string, "required">;
1042
+ amountDue: import("convex/values").VFloat64<number, "required">;
1043
+ revision: import("convex/values").VFloat64<number, "required">;
1044
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
1045
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
1046
+ _id: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
1047
+ _creationTime: import("convex/values").VFloat64<number, "required">;
1048
+ }, "optional", "_creationTime" | "_id" | "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
1049
+ deficit: import("convex/values").VObject<{
1050
+ amountDue: number;
1051
+ currency: string;
1052
+ disputeLiability: number;
1053
+ processingLiability: number;
1054
+ retainedFee: number;
1055
+ }, {
1056
+ currency: import("convex/values").VString<string, "required">;
1057
+ retainedFee: import("convex/values").VFloat64<number, "required">;
1058
+ processingLiability: import("convex/values").VFloat64<number, "required">;
1059
+ disputeLiability: import("convex/values").VFloat64<number, "required">;
1060
+ amountDue: import("convex/values").VFloat64<number, "required">;
1061
+ }, "required", "amountDue" | "currency" | "disputeLiability" | "processingLiability" | "retainedFee">;
1062
+ observation: import("convex/values").VObject<{
1063
+ currency: string;
1064
+ disputeFees: number;
1065
+ gross: number;
1066
+ originalProcessingFee: number;
1067
+ paymentIntentId: string;
1068
+ principalReturned: number;
1069
+ processingFee: number;
1070
+ provenance: {
1071
+ customerAccountId: string;
1072
+ invoiceId: string;
1073
+ invoicePaymentId: string;
1074
+ recoveryInvoiceItemId?: string | undefined;
1075
+ stripePriceId?: string | undefined;
1076
+ stripeProductId?: string | undefined;
1077
+ subscriptionId?: string | undefined;
1078
+ };
1079
+ sourceChargeId: string;
1080
+ }, {
1081
+ paymentIntentId: import("convex/values").VString<string, "required">;
1082
+ sourceChargeId: import("convex/values").VString<string, "required">;
1083
+ currency: import("convex/values").VString<string, "required">;
1084
+ gross: import("convex/values").VFloat64<number, "required">;
1085
+ originalProcessingFee: import("convex/values").VFloat64<number, "required">;
1086
+ processingFee: import("convex/values").VFloat64<number, "required">;
1087
+ disputeFees: import("convex/values").VFloat64<number, "required">;
1088
+ principalReturned: import("convex/values").VFloat64<number, "required">;
1089
+ provenance: import("convex/values").VObject<{
1090
+ customerAccountId: string;
1091
+ invoiceId: string;
1092
+ invoicePaymentId: string;
1093
+ recoveryInvoiceItemId?: string | undefined;
1094
+ stripePriceId?: string | undefined;
1095
+ stripeProductId?: string | undefined;
1096
+ subscriptionId?: string | undefined;
1097
+ }, {
1098
+ invoiceId: import("convex/values").VString<string, "required">;
1099
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1100
+ recoveryInvoiceItemId: import("convex/values").VString<string | undefined, "optional">;
1101
+ customerAccountId: import("convex/values").VString<string, "required">;
1102
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
1103
+ stripePriceId: import("convex/values").VString<string | undefined, "optional">;
1104
+ stripeProductId: import("convex/values").VString<string | undefined, "optional">;
1105
+ }, "required", "customerAccountId" | "invoiceId" | "invoicePaymentId" | "recoveryInvoiceItemId" | "stripePriceId" | "stripeProductId" | "subscriptionId">;
1106
+ }, "required", "currency" | "disputeFees" | "gross" | "originalProcessingFee" | "paymentIntentId" | "principalReturned" | "processingFee" | "provenance" | "provenance.customerAccountId" | "provenance.invoiceId" | "provenance.invoicePaymentId" | "provenance.recoveryInvoiceItemId" | "provenance.stripePriceId" | "provenance.stripeProductId" | "provenance.subscriptionId" | "sourceChargeId">;
1107
+ }, "optional", "claim" | "claim._creationTime" | "claim._id" | "claim.accountId" | "claim.amountDue" | "claim.claimKey" | "claim.collectedAmount" | "claim.currency" | "claim.openingCollection" | "claim.openingCollection.amountDue" | "claim.openingCollection.collectedAmount" | "claim.openingCollection.operationKey" | "claim.openingCollection.revision" | "claim.outstanding" | "claim.reservedAmount" | "claim.revision" | "claim.scopeKey" | "claim.sign" | "claim.sourceChargeId" | "claim.sourceGross" | "claim.sourceProcessingFee" | "deficit" | "deficit.amountDue" | "deficit.currency" | "deficit.disputeLiability" | "deficit.processingLiability" | "deficit.retainedFee" | "observation" | "observation.currency" | "observation.disputeFees" | "observation.gross" | "observation.originalProcessingFee" | "observation.paymentIntentId" | "observation.principalReturned" | "observation.processingFee" | "observation.provenance" | "observation.provenance.customerAccountId" | "observation.provenance.invoiceId" | "observation.provenance.invoicePaymentId" | "observation.provenance.recoveryInvoiceItemId" | "observation.provenance.stripePriceId" | "observation.provenance.stripeProductId" | "observation.provenance.subscriptionId" | "observation.sourceChargeId" | "rollbackClaim" | "rollbackClaim._creationTime" | "rollbackClaim._id" | "rollbackClaim.accountId" | "rollbackClaim.amountDue" | "rollbackClaim.claimKey" | "rollbackClaim.collectedAmount" | "rollbackClaim.currency" | "rollbackClaim.openingCollection" | "rollbackClaim.openingCollection.amountDue" | "rollbackClaim.openingCollection.collectedAmount" | "rollbackClaim.openingCollection.operationKey" | "rollbackClaim.openingCollection.revision" | "rollbackClaim.outstanding" | "rollbackClaim.reservedAmount" | "rollbackClaim.revision" | "rollbackClaim.scopeKey" | "rollbackClaim.sign" | "rollbackClaim.sourceChargeId" | "rollbackClaim.sourceGross" | "rollbackClaim.sourceProcessingFee">;
1108
+ }, "required", "accountId" | "claimKey" | "currency" | "definitionVersion" | "expectedRevision" | "failure" | "failure.reason" | "failure.retryable" | "failure.status" | "importHook" | "maxAttempts" | "policy" | "policy.liability" | "policy.liability.disputeCosts" | "policy.liability.processingCosts" | "policy.rounding" | "policy.sellingFee" | "projection" | "provider" | "providerApiVersion" | "requestKey" | "result" | "result.claim" | "result.claim._creationTime" | "result.claim._id" | "result.claim.accountId" | "result.claim.amountDue" | "result.claim.claimKey" | "result.claim.collectedAmount" | "result.claim.currency" | "result.claim.openingCollection" | "result.claim.openingCollection.amountDue" | "result.claim.openingCollection.collectedAmount" | "result.claim.openingCollection.operationKey" | "result.claim.openingCollection.revision" | "result.claim.outstanding" | "result.claim.reservedAmount" | "result.claim.revision" | "result.claim.scopeKey" | "result.claim.sign" | "result.claim.sourceChargeId" | "result.claim.sourceGross" | "result.claim.sourceProcessingFee" | "result.deficit" | "result.deficit.amountDue" | "result.deficit.currency" | "result.deficit.disputeLiability" | "result.deficit.processingLiability" | "result.deficit.retainedFee" | "result.observation" | "result.observation.currency" | "result.observation.disputeFees" | "result.observation.gross" | "result.observation.originalProcessingFee" | "result.observation.paymentIntentId" | "result.observation.principalReturned" | "result.observation.processingFee" | "result.observation.provenance" | "result.observation.provenance.customerAccountId" | "result.observation.provenance.invoiceId" | "result.observation.provenance.invoicePaymentId" | "result.observation.provenance.recoveryInvoiceItemId" | "result.observation.provenance.stripePriceId" | "result.observation.provenance.stripeProductId" | "result.observation.provenance.subscriptionId" | "result.observation.sourceChargeId" | "result.rollbackClaim" | "result.rollbackClaim._creationTime" | "result.rollbackClaim._id" | "result.rollbackClaim.accountId" | "result.rollbackClaim.amountDue" | "result.rollbackClaim.claimKey" | "result.rollbackClaim.collectedAmount" | "result.rollbackClaim.currency" | "result.rollbackClaim.openingCollection" | "result.rollbackClaim.openingCollection.amountDue" | "result.rollbackClaim.openingCollection.collectedAmount" | "result.rollbackClaim.openingCollection.operationKey" | "result.rollbackClaim.openingCollection.revision" | "result.rollbackClaim.outstanding" | "result.rollbackClaim.reservedAmount" | "result.rollbackClaim.revision" | "result.rollbackClaim.scopeKey" | "result.rollbackClaim.sign" | "result.rollbackClaim.sourceChargeId" | "result.rollbackClaim.sourceGross" | "result.rollbackClaim.sourceProcessingFee" | "retryDelayMs" | "rollback" | "rollback.expectedRevision" | "rollback.groupKey" | "scopeKey" | "source" | "source.customerAccountId" | "source.gross" | "source.groupKey" | "source.invoiceId" | "source.kind" | "source.paymentIntentId" | "source.stripeAccountId" | "source.stripePriceId" | "source.stripeProductId" | "source.subscriptionId" | "status" | "version" | "workflowId">, {
1109
+ by_claim_status: ["claimKey", "status", "_creationTime"];
1110
+ by_payment_scope: ["accountId", "scopeKey", "currency", "source.paymentIntentId", "_creationTime"];
1111
+ by_request: ["requestKey", "_creationTime"];
1112
+ }, {}, {}>;
1113
+ recoveryWorkflowOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
1114
+ accountId: string;
1115
+ activePhase?: "execute" | "reconcile" | undefined;
1116
+ allocation?: {
1117
+ adjustmentAmount?: number | undefined;
1118
+ creditSource?: {
1119
+ creditGrantId: string;
1120
+ customerAccount: string;
1121
+ livemode: boolean;
1122
+ purchaseId: string;
1123
+ stripeAccountId: string;
1124
+ stripePriceId: string;
1125
+ stripeProductId: string;
1126
+ } | undefined;
1127
+ currency: string;
1128
+ gross: number;
1129
+ paymentId?: string | undefined;
1130
+ paymentIntentId?: string | undefined;
1131
+ platformNet: number;
1132
+ processingFee: number;
1133
+ sourceChargeId: string;
1134
+ sourceInvoiceId?: string | undefined;
1135
+ transfers: {
1136
+ amount: number;
1137
+ destinationAccountId: string;
1138
+ role: "affiliate" | "other" | "store";
1139
+ }[];
1140
+ usageSource?: {
1141
+ customerAccount: string;
1142
+ invoicePaymentId: string;
1143
+ livemode: boolean;
1144
+ meterId: string;
1145
+ model: "included_overage" | "pay_as_you_go";
1146
+ period: {
1147
+ end: number;
1148
+ start: number;
1149
+ };
1150
+ stripeAccountId: string;
1151
+ stripePriceId: string;
1152
+ stripeProductId: string;
1153
+ subscriptionId: string;
1154
+ subscriptionItemId: string;
1155
+ } | undefined;
1156
+ } | undefined;
1157
+ cancelRequested: boolean;
1158
+ completion?: string | undefined;
1159
+ currency: string;
1160
+ definitionVersion: number;
1161
+ groupKey: string;
1162
+ maxAttempts: number;
1163
+ outcome?: "collect" | "release" | undefined;
1164
+ provider: string;
1165
+ providerApiVersion: string;
1166
+ providerStarted: boolean;
1167
+ releaseUncollectible: boolean;
1168
+ resumeQueued: boolean;
1169
+ retryDelayMs: number;
1170
+ scopeKey: string;
1171
+ sourceId: string;
1172
+ sourceKind: "invoice" | "settlement";
1173
+ status: "canceled" | "completed" | "queued" | "running" | "unknown" | "waiting";
1174
+ version: number;
1175
+ workflowId?: string | undefined;
1176
+ }, {
1177
+ accountId: import("convex/values").VString<string, "required">;
1178
+ scopeKey: import("convex/values").VString<string, "required">;
1179
+ currency: import("convex/values").VString<string, "required">;
1180
+ groupKey: import("convex/values").VString<string, "required">;
1181
+ provider: import("convex/values").VString<string, "required">;
1182
+ completion: import("convex/values").VString<string | undefined, "optional">;
1183
+ providerApiVersion: import("convex/values").VString<string, "required">;
1184
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
1185
+ releaseUncollectible: import("convex/values").VBoolean<boolean, "required">;
1186
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
1187
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
1188
+ allocation: import("convex/values").VObject<{
1189
+ adjustmentAmount?: number | undefined;
1190
+ creditSource?: {
1191
+ creditGrantId: string;
1192
+ customerAccount: string;
1193
+ livemode: boolean;
1194
+ purchaseId: string;
1195
+ stripeAccountId: string;
1196
+ stripePriceId: string;
1197
+ stripeProductId: string;
1198
+ } | undefined;
1199
+ currency: string;
1200
+ gross: number;
1201
+ paymentId?: string | undefined;
1202
+ paymentIntentId?: string | undefined;
1203
+ platformNet: number;
1204
+ processingFee: number;
1205
+ sourceChargeId: string;
1206
+ sourceInvoiceId?: string | undefined;
1207
+ transfers: {
1208
+ amount: number;
1209
+ destinationAccountId: string;
1210
+ role: "affiliate" | "other" | "store";
1211
+ }[];
1212
+ usageSource?: {
1213
+ customerAccount: string;
1214
+ invoicePaymentId: string;
1215
+ livemode: boolean;
1216
+ meterId: string;
1217
+ model: "included_overage" | "pay_as_you_go";
1218
+ period: {
1219
+ end: number;
1220
+ start: number;
1221
+ };
1222
+ stripeAccountId: string;
1223
+ stripePriceId: string;
1224
+ stripeProductId: string;
1225
+ subscriptionId: string;
1226
+ subscriptionItemId: string;
1227
+ } | undefined;
1228
+ } | undefined, {
1229
+ sourceChargeId: import("convex/values").VString<string, "required">;
1230
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
1231
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
1232
+ usageSource: import("convex/values").VObject<{
1233
+ customerAccount: string;
1234
+ invoicePaymentId: string;
1235
+ livemode: boolean;
1236
+ meterId: string;
1237
+ model: "included_overage" | "pay_as_you_go";
1238
+ period: {
1239
+ end: number;
1240
+ start: number;
1241
+ };
1242
+ stripeAccountId: string;
1243
+ stripePriceId: string;
1244
+ stripeProductId: string;
1245
+ subscriptionId: string;
1246
+ subscriptionItemId: string;
1247
+ } | undefined, {
1248
+ stripeAccountId: import("convex/values").VString<string, "required">;
1249
+ customerAccount: import("convex/values").VString<string, "required">;
1250
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1251
+ meterId: import("convex/values").VString<string, "required">;
1252
+ stripePriceId: import("convex/values").VString<string, "required">;
1253
+ stripeProductId: import("convex/values").VString<string, "required">;
1254
+ subscriptionId: import("convex/values").VString<string, "required">;
1255
+ subscriptionItemId: import("convex/values").VString<string, "required">;
1256
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1257
+ period: import("convex/values").VObject<{
1258
+ end: number;
1259
+ start: number;
1260
+ }, {
1261
+ start: import("convex/values").VFloat64<number, "required">;
1262
+ end: import("convex/values").VFloat64<number, "required">;
1263
+ }, "required", "end" | "start">;
1264
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
1265
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
1266
+ creditSource: import("convex/values").VObject<{
1267
+ creditGrantId: string;
1268
+ customerAccount: string;
1269
+ livemode: boolean;
1270
+ purchaseId: string;
1271
+ stripeAccountId: string;
1272
+ stripePriceId: string;
1273
+ stripeProductId: string;
1274
+ } | undefined, {
1275
+ stripeAccountId: import("convex/values").VString<string, "required">;
1276
+ customerAccount: import("convex/values").VString<string, "required">;
1277
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1278
+ purchaseId: import("convex/values").VString<string, "required">;
1279
+ creditGrantId: import("convex/values").VString<string, "required">;
1280
+ stripePriceId: import("convex/values").VString<string, "required">;
1281
+ stripeProductId: import("convex/values").VString<string, "required">;
1282
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
1283
+ gross: import("convex/values").VFloat64<number, "required">;
1284
+ currency: import("convex/values").VString<string, "required">;
1285
+ processingFee: import("convex/values").VFloat64<number, "required">;
1286
+ platformNet: import("convex/values").VFloat64<number, "required">;
1287
+ adjustmentAmount: import("convex/values").VFloat64<number | undefined, "optional">;
1288
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
1289
+ transfers: import("convex/values").VArray<{
1290
+ amount: number;
1291
+ destinationAccountId: string;
1292
+ role: "affiliate" | "other" | "store";
1293
+ }[], import("convex/values").VObject<{
1294
+ amount: number;
1295
+ destinationAccountId: string;
1296
+ role: "affiliate" | "other" | "store";
1297
+ }, {
1298
+ destinationAccountId: import("convex/values").VString<string, "required">;
1299
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
1300
+ amount: import("convex/values").VFloat64<number, "required">;
1301
+ }, "required", "amount" | "destinationAccountId" | "role">, "required">;
1302
+ }, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">;
1303
+ version: import("convex/values").VFloat64<number, "required">;
1304
+ sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
1305
+ sourceId: import("convex/values").VString<string, "required">;
1306
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
1307
+ status: import("convex/values").VUnion<"canceled" | "completed" | "queued" | "running" | "unknown" | "waiting", [import("convex/values").VLiteral<"queued", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
1308
+ cancelRequested: import("convex/values").VBoolean<boolean, "required">;
1309
+ providerStarted: import("convex/values").VBoolean<boolean, "required">;
1310
+ activePhase: import("convex/values").VUnion<"execute" | "reconcile" | undefined, [import("convex/values").VLiteral<"execute", "required">, import("convex/values").VLiteral<"reconcile", "required">], "optional", never>;
1311
+ resumeQueued: import("convex/values").VBoolean<boolean, "required">;
1312
+ outcome: import("convex/values").VUnion<"collect" | "release" | undefined, [import("convex/values").VLiteral<"collect", "required">, import("convex/values").VLiteral<"release", "required">], "optional", never>;
1313
+ }, "required", "accountId" | "activePhase" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "cancelRequested" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "outcome" | "provider" | "providerApiVersion" | "providerStarted" | "releaseUncollectible" | "resumeQueued" | "retryDelayMs" | "scopeKey" | "sourceId" | "sourceKind" | "status" | "version" | "workflowId">, {
1314
+ by_group: ["groupKey", "_creationTime"];
1315
+ by_source: ["sourceKind", "sourceId", "_creationTime"];
1316
+ }, {}, {}>;
1317
+ recoveryWorkflowRequests: import("convex/server").TableDefinition<import("convex/values").VObject<{
1318
+ binding: {
1319
+ accountId: string;
1320
+ allocation?: {
1321
+ adjustmentAmount?: number | undefined;
1322
+ creditSource?: {
1323
+ creditGrantId: string;
1324
+ customerAccount: string;
1325
+ livemode: boolean;
1326
+ purchaseId: string;
1327
+ stripeAccountId: string;
1328
+ stripePriceId: string;
1329
+ stripeProductId: string;
1330
+ } | undefined;
1331
+ currency: string;
1332
+ gross: number;
1333
+ paymentId?: string | undefined;
1334
+ paymentIntentId?: string | undefined;
1335
+ platformNet: number;
1336
+ processingFee: number;
1337
+ sourceChargeId: string;
1338
+ sourceInvoiceId?: string | undefined;
1339
+ transfers: {
1340
+ amount: number;
1341
+ destinationAccountId: string;
1342
+ role: "affiliate" | "other" | "store";
1343
+ }[];
1344
+ usageSource?: {
1345
+ customerAccount: string;
1346
+ invoicePaymentId: string;
1347
+ livemode: boolean;
1348
+ meterId: string;
1349
+ model: "included_overage" | "pay_as_you_go";
1350
+ period: {
1351
+ end: number;
1352
+ start: number;
1353
+ };
1354
+ stripeAccountId: string;
1355
+ stripePriceId: string;
1356
+ stripeProductId: string;
1357
+ subscriptionId: string;
1358
+ subscriptionItemId: string;
1359
+ } | undefined;
1360
+ } | undefined;
1361
+ completion?: string | undefined;
1362
+ currency: string;
1363
+ definitionVersion: number;
1364
+ groupKey: string;
1365
+ maxAttempts: number;
1366
+ provider: string;
1367
+ providerApiVersion: string;
1368
+ releaseUncollectible: boolean;
1369
+ retryDelayMs: number;
1370
+ scopeKey: string;
1371
+ };
1372
+ operationId: import("convex/values").GenericId<"recoveryWorkflowOperations">;
1373
+ requestKey: string;
1374
+ }, {
1375
+ requestKey: import("convex/values").VString<string, "required">;
1376
+ binding: import("convex/values").VObject<{
1377
+ accountId: string;
1378
+ allocation?: {
1379
+ adjustmentAmount?: number | undefined;
1380
+ creditSource?: {
1381
+ creditGrantId: string;
1382
+ customerAccount: string;
1383
+ livemode: boolean;
1384
+ purchaseId: string;
1385
+ stripeAccountId: string;
1386
+ stripePriceId: string;
1387
+ stripeProductId: string;
1388
+ } | undefined;
1389
+ currency: string;
1390
+ gross: number;
1391
+ paymentId?: string | undefined;
1392
+ paymentIntentId?: string | undefined;
1393
+ platformNet: number;
1394
+ processingFee: number;
1395
+ sourceChargeId: string;
1396
+ sourceInvoiceId?: string | undefined;
1397
+ transfers: {
1398
+ amount: number;
1399
+ destinationAccountId: string;
1400
+ role: "affiliate" | "other" | "store";
1401
+ }[];
1402
+ usageSource?: {
1403
+ customerAccount: string;
1404
+ invoicePaymentId: string;
1405
+ livemode: boolean;
1406
+ meterId: string;
1407
+ model: "included_overage" | "pay_as_you_go";
1408
+ period: {
1409
+ end: number;
1410
+ start: number;
1411
+ };
1412
+ stripeAccountId: string;
1413
+ stripePriceId: string;
1414
+ stripeProductId: string;
1415
+ subscriptionId: string;
1416
+ subscriptionItemId: string;
1417
+ } | undefined;
1418
+ } | undefined;
1419
+ completion?: string | undefined;
1420
+ currency: string;
1421
+ definitionVersion: number;
1422
+ groupKey: string;
1423
+ maxAttempts: number;
1424
+ provider: string;
1425
+ providerApiVersion: string;
1426
+ releaseUncollectible: boolean;
1427
+ retryDelayMs: number;
1428
+ scopeKey: string;
1429
+ }, {
1430
+ accountId: import("convex/values").VString<string, "required">;
1431
+ scopeKey: import("convex/values").VString<string, "required">;
1432
+ currency: import("convex/values").VString<string, "required">;
1433
+ groupKey: import("convex/values").VString<string, "required">;
1434
+ provider: import("convex/values").VString<string, "required">;
1435
+ completion: import("convex/values").VString<string | undefined, "optional">;
1436
+ providerApiVersion: import("convex/values").VString<string, "required">;
1437
+ definitionVersion: import("convex/values").VFloat64<number, "required">;
1438
+ releaseUncollectible: import("convex/values").VBoolean<boolean, "required">;
1439
+ maxAttempts: import("convex/values").VFloat64<number, "required">;
1440
+ retryDelayMs: import("convex/values").VFloat64<number, "required">;
1441
+ allocation: import("convex/values").VObject<{
1442
+ adjustmentAmount?: number | undefined;
1443
+ creditSource?: {
1444
+ creditGrantId: string;
1445
+ customerAccount: string;
1446
+ livemode: boolean;
1447
+ purchaseId: string;
1448
+ stripeAccountId: string;
1449
+ stripePriceId: string;
1450
+ stripeProductId: string;
1451
+ } | undefined;
1452
+ currency: string;
1453
+ gross: number;
1454
+ paymentId?: string | undefined;
1455
+ paymentIntentId?: string | undefined;
1456
+ platformNet: number;
1457
+ processingFee: number;
1458
+ sourceChargeId: string;
1459
+ sourceInvoiceId?: string | undefined;
1460
+ transfers: {
1461
+ amount: number;
1462
+ destinationAccountId: string;
1463
+ role: "affiliate" | "other" | "store";
1464
+ }[];
1465
+ usageSource?: {
1466
+ customerAccount: string;
1467
+ invoicePaymentId: string;
1468
+ livemode: boolean;
1469
+ meterId: string;
1470
+ model: "included_overage" | "pay_as_you_go";
1471
+ period: {
1472
+ end: number;
1473
+ start: number;
1474
+ };
1475
+ stripeAccountId: string;
1476
+ stripePriceId: string;
1477
+ stripeProductId: string;
1478
+ subscriptionId: string;
1479
+ subscriptionItemId: string;
1480
+ } | undefined;
1481
+ } | undefined, {
1482
+ sourceChargeId: import("convex/values").VString<string, "required">;
1483
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
1484
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
1485
+ usageSource: import("convex/values").VObject<{
1486
+ customerAccount: string;
1487
+ invoicePaymentId: string;
1488
+ livemode: boolean;
1489
+ meterId: string;
1490
+ model: "included_overage" | "pay_as_you_go";
1491
+ period: {
1492
+ end: number;
1493
+ start: number;
1494
+ };
1495
+ stripeAccountId: string;
1496
+ stripePriceId: string;
1497
+ stripeProductId: string;
1498
+ subscriptionId: string;
1499
+ subscriptionItemId: string;
1500
+ } | undefined, {
1501
+ stripeAccountId: import("convex/values").VString<string, "required">;
1502
+ customerAccount: import("convex/values").VString<string, "required">;
1503
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1504
+ meterId: import("convex/values").VString<string, "required">;
1505
+ stripePriceId: import("convex/values").VString<string, "required">;
1506
+ stripeProductId: import("convex/values").VString<string, "required">;
1507
+ subscriptionId: import("convex/values").VString<string, "required">;
1508
+ subscriptionItemId: import("convex/values").VString<string, "required">;
1509
+ invoicePaymentId: import("convex/values").VString<string, "required">;
1510
+ period: import("convex/values").VObject<{
1511
+ end: number;
1512
+ start: number;
1513
+ }, {
1514
+ start: import("convex/values").VFloat64<number, "required">;
1515
+ end: import("convex/values").VFloat64<number, "required">;
1516
+ }, "required", "end" | "start">;
1517
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
1518
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
1519
+ creditSource: import("convex/values").VObject<{
1520
+ creditGrantId: string;
1521
+ customerAccount: string;
1522
+ livemode: boolean;
1523
+ purchaseId: string;
1524
+ stripeAccountId: string;
1525
+ stripePriceId: string;
1526
+ stripeProductId: string;
1527
+ } | undefined, {
1528
+ stripeAccountId: import("convex/values").VString<string, "required">;
1529
+ customerAccount: import("convex/values").VString<string, "required">;
1530
+ livemode: import("convex/values").VBoolean<boolean, "required">;
1531
+ purchaseId: import("convex/values").VString<string, "required">;
1532
+ creditGrantId: import("convex/values").VString<string, "required">;
1533
+ stripePriceId: import("convex/values").VString<string, "required">;
1534
+ stripeProductId: import("convex/values").VString<string, "required">;
1535
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
1536
+ gross: import("convex/values").VFloat64<number, "required">;
1537
+ currency: import("convex/values").VString<string, "required">;
1538
+ processingFee: import("convex/values").VFloat64<number, "required">;
1539
+ platformNet: import("convex/values").VFloat64<number, "required">;
1540
+ adjustmentAmount: import("convex/values").VFloat64<number | undefined, "optional">;
1541
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
1542
+ transfers: import("convex/values").VArray<{
1543
+ amount: number;
1544
+ destinationAccountId: string;
1545
+ role: "affiliate" | "other" | "store";
1546
+ }[], import("convex/values").VObject<{
1547
+ amount: number;
1548
+ destinationAccountId: string;
1549
+ role: "affiliate" | "other" | "store";
1550
+ }, {
1551
+ destinationAccountId: import("convex/values").VString<string, "required">;
1552
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
1553
+ amount: import("convex/values").VFloat64<number, "required">;
1554
+ }, "required", "amount" | "destinationAccountId" | "role">, "required">;
1555
+ }, "optional", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">;
1556
+ }, "required", "accountId" | "allocation" | "allocation.adjustmentAmount" | "allocation.creditSource" | "allocation.creditSource.creditGrantId" | "allocation.creditSource.customerAccount" | "allocation.creditSource.livemode" | "allocation.creditSource.purchaseId" | "allocation.creditSource.stripeAccountId" | "allocation.creditSource.stripePriceId" | "allocation.creditSource.stripeProductId" | "allocation.currency" | "allocation.gross" | "allocation.paymentId" | "allocation.paymentIntentId" | "allocation.platformNet" | "allocation.processingFee" | "allocation.sourceChargeId" | "allocation.sourceInvoiceId" | "allocation.transfers" | "allocation.usageSource" | "allocation.usageSource.customerAccount" | "allocation.usageSource.invoicePaymentId" | "allocation.usageSource.livemode" | "allocation.usageSource.meterId" | "allocation.usageSource.model" | "allocation.usageSource.period" | "allocation.usageSource.period.end" | "allocation.usageSource.period.start" | "allocation.usageSource.stripeAccountId" | "allocation.usageSource.stripePriceId" | "allocation.usageSource.stripeProductId" | "allocation.usageSource.subscriptionId" | "allocation.usageSource.subscriptionItemId" | "completion" | "currency" | "definitionVersion" | "groupKey" | "maxAttempts" | "provider" | "providerApiVersion" | "releaseUncollectible" | "retryDelayMs" | "scopeKey">;
1557
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"recoveryWorkflowOperations">, "required">;
1558
+ }, "required", "binding" | "binding.accountId" | "binding.allocation" | "binding.allocation.adjustmentAmount" | "binding.allocation.creditSource" | "binding.allocation.creditSource.creditGrantId" | "binding.allocation.creditSource.customerAccount" | "binding.allocation.creditSource.livemode" | "binding.allocation.creditSource.purchaseId" | "binding.allocation.creditSource.stripeAccountId" | "binding.allocation.creditSource.stripePriceId" | "binding.allocation.creditSource.stripeProductId" | "binding.allocation.currency" | "binding.allocation.gross" | "binding.allocation.paymentId" | "binding.allocation.paymentIntentId" | "binding.allocation.platformNet" | "binding.allocation.processingFee" | "binding.allocation.sourceChargeId" | "binding.allocation.sourceInvoiceId" | "binding.allocation.transfers" | "binding.allocation.usageSource" | "binding.allocation.usageSource.customerAccount" | "binding.allocation.usageSource.invoicePaymentId" | "binding.allocation.usageSource.livemode" | "binding.allocation.usageSource.meterId" | "binding.allocation.usageSource.model" | "binding.allocation.usageSource.period" | "binding.allocation.usageSource.period.end" | "binding.allocation.usageSource.period.start" | "binding.allocation.usageSource.stripeAccountId" | "binding.allocation.usageSource.stripePriceId" | "binding.allocation.usageSource.stripeProductId" | "binding.allocation.usageSource.subscriptionId" | "binding.allocation.usageSource.subscriptionItemId" | "binding.completion" | "binding.currency" | "binding.definitionVersion" | "binding.groupKey" | "binding.maxAttempts" | "binding.provider" | "binding.providerApiVersion" | "binding.releaseUncollectible" | "binding.retryDelayMs" | "binding.scopeKey" | "operationId" | "requestKey">, {
1559
+ by_key: ["requestKey", "_creationTime"];
1560
+ }, {}, {}>;
1561
+ balanceFundingPreparations: import("convex/server").TableDefinition<import("convex/values").VObject<{
1562
+ accountId: string;
1563
+ activeOperationId?: import("convex/values").GenericId<"balanceFundingOperations"> | undefined;
1564
+ consentAt: number;
1565
+ consentReference: string;
1566
+ enabled: boolean;
1567
+ operationVersion: number;
1568
+ preparation: {
1569
+ customerAccount: string;
1570
+ paymentMethodId?: string | undefined;
1571
+ previousPaymentMethodId: string | null;
1572
+ previousPaymentMethodTypes: string[] | null;
1573
+ stripeSubscriptionId: string;
1574
+ };
1575
+ preparationOperationId?: import("convex/values").GenericId<"balanceFundingOperations"> | undefined;
1576
+ providerApiVersion: string;
1577
+ scopeKey: string;
1578
+ startsPaused: boolean;
1579
+ verified: boolean;
1580
+ }, {
1581
+ accountId: import("convex/values").VString<string, "required">;
1582
+ scopeKey: import("convex/values").VString<string, "required">;
1583
+ preparation: import("convex/values").VObject<{
1584
+ customerAccount: string;
1585
+ paymentMethodId?: string | undefined;
1586
+ previousPaymentMethodId: string | null;
1587
+ previousPaymentMethodTypes: string[] | null;
1588
+ stripeSubscriptionId: string;
1589
+ }, {
1590
+ customerAccount: import("convex/values").VString<string, "required">;
1591
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
1592
+ previousPaymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1593
+ previousPaymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1594
+ paymentMethodId: import("convex/values").VString<string | undefined, "optional">;
1595
+ }, "required", "customerAccount" | "paymentMethodId" | "previousPaymentMethodId" | "previousPaymentMethodTypes" | "stripeSubscriptionId">;
1596
+ consentAt: import("convex/values").VFloat64<number, "required">;
1597
+ consentReference: import("convex/values").VString<string, "required">;
1598
+ providerApiVersion: import("convex/values").VString<string, "required">;
1599
+ enabled: import("convex/values").VBoolean<boolean, "required">;
1600
+ startsPaused: import("convex/values").VBoolean<boolean, "required">;
1601
+ verified: import("convex/values").VBoolean<boolean, "required">;
1602
+ preparationOperationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations"> | undefined, "optional">;
1603
+ operationVersion: import("convex/values").VFloat64<number, "required">;
1604
+ activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations"> | undefined, "optional">;
1605
+ }, "required", "accountId" | "activeOperationId" | "consentAt" | "consentReference" | "enabled" | "operationVersion" | "preparation" | "preparation.customerAccount" | "preparation.paymentMethodId" | "preparation.previousPaymentMethodId" | "preparation.previousPaymentMethodTypes" | "preparation.stripeSubscriptionId" | "preparationOperationId" | "providerApiVersion" | "scopeKey" | "startsPaused" | "verified">, {
1606
+ by_account_subscription: ["accountId", "preparation.stripeSubscriptionId", "_creationTime"];
1607
+ }, {}, {}>;
1608
+ balanceFundingOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
1609
+ accountId: string;
1610
+ cancelRequested: boolean;
1611
+ enabled: boolean;
1612
+ execution?: {
1613
+ apply?: {
1614
+ receipt?: {
1615
+ customerAccount: string;
1616
+ enabled?: boolean | undefined;
1617
+ paymentMethodId: string | null;
1618
+ paymentMethodTypes?: string[] | null | undefined;
1619
+ phase: "apply" | "attach" | "create";
1620
+ providerApiVersion: string;
1621
+ stripeSubscriptionId: string;
1622
+ } | undefined;
1623
+ state: "running" | "succeeded" | "unknown";
1624
+ } | undefined;
1625
+ attach?: {
1626
+ receipt?: {
1627
+ customerAccount: string;
1628
+ enabled?: boolean | undefined;
1629
+ paymentMethodId: string | null;
1630
+ paymentMethodTypes?: string[] | null | undefined;
1631
+ phase: "apply" | "attach" | "create";
1632
+ providerApiVersion: string;
1633
+ stripeSubscriptionId: string;
1634
+ } | undefined;
1635
+ state: "running" | "succeeded" | "unknown";
1636
+ } | undefined;
1637
+ create?: {
1638
+ receipt?: {
1639
+ customerAccount: string;
1640
+ enabled?: boolean | undefined;
1641
+ paymentMethodId: string | null;
1642
+ paymentMethodTypes?: string[] | null | undefined;
1643
+ phase: "apply" | "attach" | "create";
1644
+ providerApiVersion: string;
1645
+ stripeSubscriptionId: string;
1646
+ } | undefined;
1647
+ state: "running" | "succeeded" | "unknown";
1648
+ } | undefined;
1649
+ definitionVersion: string;
1650
+ providerAction: string;
1651
+ providerApiVersion: string;
1652
+ workflowId?: string | undefined;
1653
+ } | undefined;
1654
+ failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
1655
+ kind: "apply" | "prepare";
1656
+ preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
1657
+ providerKey: string;
1658
+ providerKeys: {
1659
+ attach?: string | undefined;
1660
+ create?: string | undefined;
1661
+ disable: string;
1662
+ enable: string;
1663
+ };
1664
+ receipt?: {
1665
+ customerAccount: string;
1666
+ paymentMethodId: string | null;
1667
+ paymentMethodTypes: string[] | null;
1668
+ providerApiVersion: string;
1669
+ stripeSubscriptionId: string;
1670
+ } | undefined;
1671
+ scopeKey: string;
1672
+ state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
1673
+ version: number;
1674
+ }, {
1675
+ accountId: import("convex/values").VString<string, "required">;
1676
+ scopeKey: import("convex/values").VString<string, "required">;
1677
+ preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
1678
+ version: import("convex/values").VFloat64<number, "required">;
1679
+ enabled: import("convex/values").VBoolean<boolean, "required">;
1680
+ kind: import("convex/values").VUnion<"apply" | "prepare", [import("convex/values").VLiteral<"prepare", "required">, import("convex/values").VLiteral<"apply", "required">], "required", never>;
1681
+ providerKey: import("convex/values").VString<string, "required">;
1682
+ state: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
1683
+ cancelRequested: import("convex/values").VBoolean<boolean, "required">;
1684
+ failureCode: import("convex/values").VUnion<"invalid_scope" | "policy_invalid" | "unsupported_source" | undefined, [import("convex/values").VLiteral<"invalid_scope", "required">, import("convex/values").VLiteral<"unsupported_source", "required">, import("convex/values").VLiteral<"policy_invalid", "required">], "optional", never>;
1685
+ providerKeys: import("convex/values").VObject<{
1686
+ attach?: string | undefined;
1687
+ create?: string | undefined;
1688
+ disable: string;
1689
+ enable: string;
1690
+ }, {
1691
+ enable: import("convex/values").VString<string, "required">;
1692
+ disable: import("convex/values").VString<string, "required">;
1693
+ create: import("convex/values").VString<string | undefined, "optional">;
1694
+ attach: import("convex/values").VString<string | undefined, "optional">;
1695
+ }, "required", "attach" | "create" | "disable" | "enable">;
1696
+ receipt: import("convex/values").VObject<{
1697
+ customerAccount: string;
1698
+ paymentMethodId: string | null;
1699
+ paymentMethodTypes: string[] | null;
1700
+ providerApiVersion: string;
1701
+ stripeSubscriptionId: string;
1702
+ } | undefined, {
1703
+ customerAccount: import("convex/values").VString<string, "required">;
1704
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
1705
+ paymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1706
+ paymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1707
+ providerApiVersion: import("convex/values").VString<string, "required">;
1708
+ }, "optional", "customerAccount" | "paymentMethodId" | "paymentMethodTypes" | "providerApiVersion" | "stripeSubscriptionId">;
1709
+ execution: import("convex/values").VObject<{
1710
+ apply?: {
1711
+ receipt?: {
1712
+ customerAccount: string;
1713
+ enabled?: boolean | undefined;
1714
+ paymentMethodId: string | null;
1715
+ paymentMethodTypes?: string[] | null | undefined;
1716
+ phase: "apply" | "attach" | "create";
1717
+ providerApiVersion: string;
1718
+ stripeSubscriptionId: string;
1719
+ } | undefined;
1720
+ state: "running" | "succeeded" | "unknown";
1721
+ } | undefined;
1722
+ attach?: {
1723
+ receipt?: {
1724
+ customerAccount: string;
1725
+ enabled?: boolean | undefined;
1726
+ paymentMethodId: string | null;
1727
+ paymentMethodTypes?: string[] | null | undefined;
1728
+ phase: "apply" | "attach" | "create";
1729
+ providerApiVersion: string;
1730
+ stripeSubscriptionId: string;
1731
+ } | undefined;
1732
+ state: "running" | "succeeded" | "unknown";
1733
+ } | undefined;
1734
+ create?: {
1735
+ receipt?: {
1736
+ customerAccount: string;
1737
+ enabled?: boolean | undefined;
1738
+ paymentMethodId: string | null;
1739
+ paymentMethodTypes?: string[] | null | undefined;
1740
+ phase: "apply" | "attach" | "create";
1741
+ providerApiVersion: string;
1742
+ stripeSubscriptionId: string;
1743
+ } | undefined;
1744
+ state: "running" | "succeeded" | "unknown";
1745
+ } | undefined;
1746
+ definitionVersion: string;
1747
+ providerAction: string;
1748
+ providerApiVersion: string;
1749
+ workflowId?: string | undefined;
1750
+ } | undefined, {
1751
+ workflowId: import("convex/values").VString<string | undefined, "optional">;
1752
+ definitionVersion: import("convex/values").VString<string, "required">;
1753
+ providerApiVersion: import("convex/values").VString<string, "required">;
1754
+ providerAction: import("convex/values").VString<string, "required">;
1755
+ create: import("convex/values").VObject<{
1756
+ receipt?: {
1757
+ customerAccount: string;
1758
+ enabled?: boolean | undefined;
1759
+ paymentMethodId: string | null;
1760
+ paymentMethodTypes?: string[] | null | undefined;
1761
+ phase: "apply" | "attach" | "create";
1762
+ providerApiVersion: string;
1763
+ stripeSubscriptionId: string;
1764
+ } | undefined;
1765
+ state: "running" | "succeeded" | "unknown";
1766
+ } | undefined, {
1767
+ state: import("convex/values").VUnion<"running" | "succeeded" | "unknown", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"succeeded", "required">], "required", never>;
1768
+ receipt: import("convex/values").VObject<{
1769
+ customerAccount: string;
1770
+ enabled?: boolean | undefined;
1771
+ paymentMethodId: string | null;
1772
+ paymentMethodTypes?: string[] | null | undefined;
1773
+ phase: "apply" | "attach" | "create";
1774
+ providerApiVersion: string;
1775
+ stripeSubscriptionId: string;
1776
+ } | undefined, {
1777
+ phase: import("convex/values").VUnion<"apply" | "attach" | "create", [import("convex/values").VLiteral<"create", "required">, import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"apply", "required">], "required", never>;
1778
+ customerAccount: import("convex/values").VString<string, "required">;
1779
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
1780
+ paymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1781
+ paymentMethodTypes: import("convex/values").VUnion<string[] | null | undefined, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
1782
+ enabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
1783
+ providerApiVersion: import("convex/values").VString<string, "required">;
1784
+ }, "optional", "customerAccount" | "enabled" | "paymentMethodId" | "paymentMethodTypes" | "phase" | "providerApiVersion" | "stripeSubscriptionId">;
1785
+ }, "optional", "receipt" | "receipt.customerAccount" | "receipt.enabled" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.phase" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "state">;
1786
+ attach: import("convex/values").VObject<{
1787
+ receipt?: {
1788
+ customerAccount: string;
1789
+ enabled?: boolean | undefined;
1790
+ paymentMethodId: string | null;
1791
+ paymentMethodTypes?: string[] | null | undefined;
1792
+ phase: "apply" | "attach" | "create";
1793
+ providerApiVersion: string;
1794
+ stripeSubscriptionId: string;
1795
+ } | undefined;
1796
+ state: "running" | "succeeded" | "unknown";
1797
+ } | undefined, {
1798
+ state: import("convex/values").VUnion<"running" | "succeeded" | "unknown", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"succeeded", "required">], "required", never>;
1799
+ receipt: import("convex/values").VObject<{
1800
+ customerAccount: string;
1801
+ enabled?: boolean | undefined;
1802
+ paymentMethodId: string | null;
1803
+ paymentMethodTypes?: string[] | null | undefined;
1804
+ phase: "apply" | "attach" | "create";
1805
+ providerApiVersion: string;
1806
+ stripeSubscriptionId: string;
1807
+ } | undefined, {
1808
+ phase: import("convex/values").VUnion<"apply" | "attach" | "create", [import("convex/values").VLiteral<"create", "required">, import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"apply", "required">], "required", never>;
1809
+ customerAccount: import("convex/values").VString<string, "required">;
1810
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
1811
+ paymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1812
+ paymentMethodTypes: import("convex/values").VUnion<string[] | null | undefined, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
1813
+ enabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
1814
+ providerApiVersion: import("convex/values").VString<string, "required">;
1815
+ }, "optional", "customerAccount" | "enabled" | "paymentMethodId" | "paymentMethodTypes" | "phase" | "providerApiVersion" | "stripeSubscriptionId">;
1816
+ }, "optional", "receipt" | "receipt.customerAccount" | "receipt.enabled" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.phase" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "state">;
1817
+ apply: import("convex/values").VObject<{
1818
+ receipt?: {
1819
+ customerAccount: string;
1820
+ enabled?: boolean | undefined;
1821
+ paymentMethodId: string | null;
1822
+ paymentMethodTypes?: string[] | null | undefined;
1823
+ phase: "apply" | "attach" | "create";
1824
+ providerApiVersion: string;
1825
+ stripeSubscriptionId: string;
1826
+ } | undefined;
1827
+ state: "running" | "succeeded" | "unknown";
1828
+ } | undefined, {
1829
+ state: import("convex/values").VUnion<"running" | "succeeded" | "unknown", [import("convex/values").VLiteral<"running", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"succeeded", "required">], "required", never>;
1830
+ receipt: import("convex/values").VObject<{
1831
+ customerAccount: string;
1832
+ enabled?: boolean | undefined;
1833
+ paymentMethodId: string | null;
1834
+ paymentMethodTypes?: string[] | null | undefined;
1835
+ phase: "apply" | "attach" | "create";
1836
+ providerApiVersion: string;
1837
+ stripeSubscriptionId: string;
1838
+ } | undefined, {
1839
+ phase: import("convex/values").VUnion<"apply" | "attach" | "create", [import("convex/values").VLiteral<"create", "required">, import("convex/values").VLiteral<"attach", "required">, import("convex/values").VLiteral<"apply", "required">], "required", never>;
1840
+ customerAccount: import("convex/values").VString<string, "required">;
1841
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
1842
+ paymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
1843
+ paymentMethodTypes: import("convex/values").VUnion<string[] | null | undefined, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "optional", never>;
1844
+ enabled: import("convex/values").VBoolean<boolean | undefined, "optional">;
1845
+ providerApiVersion: import("convex/values").VString<string, "required">;
1846
+ }, "optional", "customerAccount" | "enabled" | "paymentMethodId" | "paymentMethodTypes" | "phase" | "providerApiVersion" | "stripeSubscriptionId">;
1847
+ }, "optional", "receipt" | "receipt.customerAccount" | "receipt.enabled" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.phase" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "state">;
1848
+ }, "optional", "apply" | "apply.receipt" | "apply.receipt.customerAccount" | "apply.receipt.enabled" | "apply.receipt.paymentMethodId" | "apply.receipt.paymentMethodTypes" | "apply.receipt.phase" | "apply.receipt.providerApiVersion" | "apply.receipt.stripeSubscriptionId" | "apply.state" | "attach" | "attach.receipt" | "attach.receipt.customerAccount" | "attach.receipt.enabled" | "attach.receipt.paymentMethodId" | "attach.receipt.paymentMethodTypes" | "attach.receipt.phase" | "attach.receipt.providerApiVersion" | "attach.receipt.stripeSubscriptionId" | "attach.state" | "create" | "create.receipt" | "create.receipt.customerAccount" | "create.receipt.enabled" | "create.receipt.paymentMethodId" | "create.receipt.paymentMethodTypes" | "create.receipt.phase" | "create.receipt.providerApiVersion" | "create.receipt.stripeSubscriptionId" | "create.state" | "definitionVersion" | "providerAction" | "providerApiVersion" | "workflowId">;
1849
+ }, "required", "accountId" | "cancelRequested" | "enabled" | "execution" | "execution.apply" | "execution.apply.receipt" | "execution.apply.receipt.customerAccount" | "execution.apply.receipt.enabled" | "execution.apply.receipt.paymentMethodId" | "execution.apply.receipt.paymentMethodTypes" | "execution.apply.receipt.phase" | "execution.apply.receipt.providerApiVersion" | "execution.apply.receipt.stripeSubscriptionId" | "execution.apply.state" | "execution.attach" | "execution.attach.receipt" | "execution.attach.receipt.customerAccount" | "execution.attach.receipt.enabled" | "execution.attach.receipt.paymentMethodId" | "execution.attach.receipt.paymentMethodTypes" | "execution.attach.receipt.phase" | "execution.attach.receipt.providerApiVersion" | "execution.attach.receipt.stripeSubscriptionId" | "execution.attach.state" | "execution.create" | "execution.create.receipt" | "execution.create.receipt.customerAccount" | "execution.create.receipt.enabled" | "execution.create.receipt.paymentMethodId" | "execution.create.receipt.paymentMethodTypes" | "execution.create.receipt.phase" | "execution.create.receipt.providerApiVersion" | "execution.create.receipt.stripeSubscriptionId" | "execution.create.state" | "execution.definitionVersion" | "execution.providerAction" | "execution.providerApiVersion" | "execution.workflowId" | "failureCode" | "kind" | "preparationId" | "providerKey" | "providerKeys" | "providerKeys.attach" | "providerKeys.create" | "providerKeys.disable" | "providerKeys.enable" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "state" | "version">, {
1850
+ by_preparation_version: ["preparationId", "version", "_creationTime"];
1851
+ }, {}, {}>;
1852
+ balanceFundingRequests: import("convex/server").TableDefinition<import("convex/values").VObject<{
1853
+ imported?: {
1854
+ operation?: {
1855
+ accountId: string;
1856
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1857
+ scopeKey: string;
1858
+ version: number;
1859
+ } | undefined;
1860
+ preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
1861
+ } | undefined;
1862
+ payload: string;
1863
+ preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
1864
+ requestKey: string;
1865
+ result?: {
1866
+ operation: {
1867
+ accountId: string;
1868
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1869
+ scopeKey: string;
1870
+ version: number;
1871
+ };
1872
+ status: "accepted";
1873
+ } | {
1874
+ enabled: boolean;
1875
+ status: "unchanged";
1876
+ } | {
1877
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1878
+ retryable: false;
1879
+ status: "conflict";
1880
+ } | {
1881
+ reason: "policy_invalid";
1882
+ retryable: false;
1883
+ status: "rejected";
1884
+ } | {
1885
+ reason: "provider_pending";
1886
+ retryable: true;
1887
+ status: "not_ready";
1888
+ } | undefined;
1889
+ }, {
1890
+ requestKey: import("convex/values").VString<string, "required">;
1891
+ payload: import("convex/values").VString<string, "required">;
1892
+ preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
1893
+ result: import("convex/values").VUnion<{
1894
+ operation: {
1895
+ accountId: string;
1896
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1897
+ scopeKey: string;
1898
+ version: number;
1899
+ };
1900
+ status: "accepted";
1901
+ } | {
1902
+ enabled: boolean;
1903
+ status: "unchanged";
1904
+ } | {
1905
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1906
+ retryable: false;
1907
+ status: "conflict";
1908
+ } | {
1909
+ reason: "policy_invalid";
1910
+ retryable: false;
1911
+ status: "rejected";
1912
+ } | {
1913
+ reason: "provider_pending";
1914
+ retryable: true;
1915
+ status: "not_ready";
1916
+ } | undefined, [import("convex/values").VObject<{
1917
+ operation: {
1918
+ accountId: string;
1919
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1920
+ scopeKey: string;
1921
+ version: number;
1922
+ };
1923
+ status: "accepted";
1924
+ }, {
1925
+ status: import("convex/values").VLiteral<"accepted", "required">;
1926
+ operation: import("convex/values").VObject<{
1927
+ accountId: string;
1928
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1929
+ scopeKey: string;
1930
+ version: number;
1931
+ }, {
1932
+ accountId: import("convex/values").VString<string, "required">;
1933
+ scopeKey: import("convex/values").VString<string, "required">;
1934
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
1935
+ version: import("convex/values").VFloat64<number, "required">;
1936
+ }, "required", "accountId" | "operationId" | "scopeKey" | "version">;
1937
+ }, "required", "operation" | "operation.accountId" | "operation.operationId" | "operation.scopeKey" | "operation.version" | "status">, import("convex/values").VObject<{
1938
+ enabled: boolean;
1939
+ status: "unchanged";
1940
+ }, {
1941
+ status: import("convex/values").VLiteral<"unchanged", "required">;
1942
+ enabled: import("convex/values").VBoolean<boolean, "required">;
1943
+ }, "required", "enabled" | "status">, import("convex/values").VObject<{
1944
+ reason: "identity_changed" | "revision_changed" | "scope_busy";
1945
+ retryable: false;
1946
+ status: "conflict";
1947
+ }, {
1948
+ status: import("convex/values").VLiteral<"conflict", "required">;
1949
+ reason: import("convex/values").VUnion<"identity_changed" | "revision_changed" | "scope_busy", [import("convex/values").VLiteral<"scope_busy", "required">, import("convex/values").VLiteral<"identity_changed", "required">, import("convex/values").VLiteral<"revision_changed", "required">], "required", never>;
1950
+ retryable: import("convex/values").VLiteral<false, "required">;
1951
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1952
+ reason: "policy_invalid";
1953
+ retryable: false;
1954
+ status: "rejected";
1955
+ }, {
1956
+ status: import("convex/values").VLiteral<"rejected", "required">;
1957
+ reason: import("convex/values").VLiteral<"policy_invalid", "required">;
1958
+ retryable: import("convex/values").VLiteral<false, "required">;
1959
+ }, "required", "reason" | "retryable" | "status">, import("convex/values").VObject<{
1960
+ reason: "provider_pending";
1961
+ retryable: true;
1962
+ status: "not_ready";
1963
+ }, {
1964
+ status: import("convex/values").VLiteral<"not_ready", "required">;
1965
+ reason: import("convex/values").VLiteral<"provider_pending", "required">;
1966
+ retryable: import("convex/values").VLiteral<true, "required">;
1967
+ }, "required", "reason" | "retryable" | "status">], "optional", "enabled" | "operation" | "operation.accountId" | "operation.operationId" | "operation.scopeKey" | "operation.version" | "reason" | "retryable" | "status">;
1968
+ imported: import("convex/values").VObject<{
1969
+ operation?: {
1970
+ accountId: string;
1971
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1972
+ scopeKey: string;
1973
+ version: number;
1974
+ } | undefined;
1975
+ preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
1976
+ } | undefined, {
1977
+ preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
1978
+ operation: import("convex/values").VObject<{
1979
+ accountId: string;
1980
+ operationId: import("convex/values").GenericId<"balanceFundingOperations">;
1981
+ scopeKey: string;
1982
+ version: number;
1983
+ } | undefined, {
1984
+ accountId: import("convex/values").VString<string, "required">;
1985
+ scopeKey: import("convex/values").VString<string, "required">;
1986
+ operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
1987
+ version: import("convex/values").VFloat64<number, "required">;
1988
+ }, "optional", "accountId" | "operationId" | "scopeKey" | "version">;
1989
+ }, "optional", "operation" | "operation.accountId" | "operation.operationId" | "operation.scopeKey" | "operation.version" | "preparationId">;
1990
+ }, "required", "imported" | "imported.operation" | "imported.operation.accountId" | "imported.operation.operationId" | "imported.operation.scopeKey" | "imported.operation.version" | "imported.preparationId" | "payload" | "preparationId" | "requestKey" | "result" | "result.enabled" | "result.operation" | "result.operation.accountId" | "result.operation.operationId" | "result.operation.scopeKey" | "result.operation.version" | "result.reason" | "result.retryable" | "result.status">, {
1991
+ by_request: ["requestKey", "_creationTime"];
1992
+ }, {}, {}>;
1993
+ operationEvidencePayloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
1994
+ commissionExposure?: {
1995
+ chargeAmount: number;
1996
+ disputeId?: string | undefined;
1997
+ disputeState?: "lost" | "open" | "won" | undefined;
1998
+ finalized: boolean;
1999
+ kind: "dispute" | "refund";
2000
+ principal: number;
2001
+ refundId?: string | undefined;
2002
+ refundedPrincipal?: number | undefined;
2003
+ } | undefined;
2004
+ operationId: string;
2005
+ slices: {
2006
+ from: number;
2007
+ stripeTransferId: string;
2008
+ to: number;
2009
+ }[];
2010
+ sourceChargeId: string;
2011
+ }, {
2012
+ operationId: import("convex/values").VString<string, "required">;
2013
+ sourceChargeId: import("convex/values").VString<string, "required">;
2014
+ slices: import("convex/values").VArray<{
2015
+ from: number;
2016
+ stripeTransferId: string;
2017
+ to: number;
2018
+ }[], import("convex/values").VObject<{
2019
+ from: number;
2020
+ stripeTransferId: string;
2021
+ to: number;
2022
+ }, {
2023
+ stripeTransferId: import("convex/values").VString<string, "required">;
2024
+ from: import("convex/values").VFloat64<number, "required">;
2025
+ to: import("convex/values").VFloat64<number, "required">;
2026
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
2027
+ commissionExposure: import("convex/values").VObject<{
2028
+ chargeAmount: number;
2029
+ disputeId?: string | undefined;
2030
+ disputeState?: "lost" | "open" | "won" | undefined;
2031
+ finalized: boolean;
2032
+ kind: "dispute" | "refund";
2033
+ principal: number;
2034
+ refundId?: string | undefined;
2035
+ refundedPrincipal?: number | undefined;
2036
+ } | undefined, {
2037
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
2038
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
2039
+ principal: import("convex/values").VFloat64<number, "required">;
2040
+ finalized: import("convex/values").VBoolean<boolean, "required">;
2041
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
2042
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
2043
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
2044
+ refundId: import("convex/values").VString<string | undefined, "optional">;
2045
+ }, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
2046
+ }, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {}, {}, {}>;
2047
+ operationEvidenceHeaders: import("convex/server").TableDefinition<import("convex/values").VObject<{
2048
+ firstObservedAt: number;
2049
+ generation: number;
2050
+ isContradictory: boolean;
2051
+ latestFingerprint: string;
2052
+ latestPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
2053
+ operationDigest: string;
2054
+ originalFingerprint: string;
2055
+ originalIdentityFingerprint: string;
2056
+ originalPayloadId: import("convex/values").GenericId<"operationEvidencePayloads">;
2057
+ producer: "trusted_host_maintenance";
2058
+ producerVersion: 1;
2059
+ sourceChargeDigest: string;
2060
+ sourceCreatedAt: number;
2061
+ sourceId: import("convex/values").GenericId<"transferReversalOps">;
2062
+ }, {
2063
+ sourceId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
2064
+ originalPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
2065
+ latestPayloadId: import("convex/values").VId<import("convex/values").GenericId<"operationEvidencePayloads">, "required">;
2066
+ producer: import("convex/values").VLiteral<"trusted_host_maintenance", "required">;
2067
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2068
+ firstObservedAt: import("convex/values").VFloat64<number, "required">;
2069
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
2070
+ originalFingerprint: import("convex/values").VString<string, "required">;
2071
+ latestFingerprint: import("convex/values").VString<string, "required">;
2072
+ originalIdentityFingerprint: import("convex/values").VString<string, "required">;
2073
+ operationDigest: import("convex/values").VString<string, "required">;
2074
+ sourceChargeDigest: import("convex/values").VString<string, "required">;
2075
+ generation: import("convex/values").VFloat64<number, "required">;
2076
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2077
+ }, "required", "firstObservedAt" | "generation" | "isContradictory" | "latestFingerprint" | "latestPayloadId" | "operationDigest" | "originalFingerprint" | "originalIdentityFingerprint" | "originalPayloadId" | "producer" | "producerVersion" | "sourceChargeDigest" | "sourceCreatedAt" | "sourceId">, {
2078
+ by_operation_digest: ["operationDigest", "_creationTime"];
2079
+ by_source_charge_digest: ["sourceChargeDigest", "_creationTime"];
2080
+ by_source_id: ["sourceId", "_creationTime"];
2081
+ }, {}, {}>;
2082
+ financialTransferObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2083
+ bucketKey: string;
2084
+ fingerprint: string;
2085
+ generation: number;
2086
+ isContradictory: boolean;
2087
+ observedFingerprint: string;
2088
+ orgId?: string | undefined;
2089
+ ownershipFingerprint: string;
2090
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
2091
+ producer: "transfer_fact";
2092
+ producerVersion: 1;
2093
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
2094
+ role?: "affiliate" | "other" | "store" | undefined;
2095
+ sourceChargeId?: string | undefined;
2096
+ sourceInvoiceId?: string | undefined;
2097
+ stripeTransferId: string;
2098
+ transferId: import("convex/values").GenericId<"transfers">;
2099
+ userId?: string | undefined;
2100
+ }, {
2101
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
2102
+ stripeTransferId: import("convex/values").VString<string, "required">;
2103
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
2104
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
2105
+ bucketKey: import("convex/values").VString<string, "required">;
2106
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
2107
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
2108
+ userId: import("convex/values").VString<string | undefined, "optional">;
2109
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2110
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
2111
+ producer: import("convex/values").VLiteral<"transfer_fact", "required">;
2112
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2113
+ fingerprint: import("convex/values").VString<string, "required">;
2114
+ observedFingerprint: import("convex/values").VString<string, "required">;
2115
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2116
+ generation: import("convex/values").VFloat64<number, "required">;
2117
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2118
+ }, "required", "bucketKey" | "fingerprint" | "generation" | "isContradictory" | "observedFingerprint" | "orgId" | "ownershipFingerprint" | "ownershipStatus" | "producer" | "producerVersion" | "registrationId" | "role" | "sourceChargeId" | "sourceInvoiceId" | "stripeTransferId" | "transferId" | "userId">, {
2119
+ by_bucket_key: ["bucketKey", "_creationTime"];
2120
+ by_owner: ["userId", "orgId", "_creationTime"];
2121
+ by_transfer_id: ["transferId", "_creationTime"];
2122
+ }, {}, {}>;
2123
+ financialTransferBatches: import("convex/server").TableDefinition<import("convex/values").VObject<{
2124
+ continuation?: {
2125
+ nextReference: number;
2126
+ producerGeneration: number;
2127
+ sourceFingerprint: string;
2128
+ state: "complete" | "held" | "indexing" | "validating";
2129
+ validatedReferences: number;
2130
+ } | undefined;
2131
+ fingerprint: string;
2132
+ generation: number;
2133
+ isContradictory: boolean;
2134
+ isOverflow: true;
2135
+ observedFingerprint: string;
2136
+ operationId: string;
2137
+ originalOperationId: import("convex/values").GenericId<"transferReversalOps">;
2138
+ producer: "transfer_frontier_claim" | "transfer_frontier_release";
2139
+ producerVersion: 1;
2140
+ referenceCount: number;
2141
+ sourceChargeId: string;
2142
+ state: "complete" | "pending";
2143
+ transferIds: import("convex/values").GenericId<"transfers">[];
2144
+ }, {
2145
+ originalOperationId: import("convex/values").VId<import("convex/values").GenericId<"transferReversalOps">, "required">;
2146
+ operationId: import("convex/values").VString<string, "required">;
2147
+ sourceChargeId: import("convex/values").VString<string, "required">;
2148
+ producer: import("convex/values").VUnion<"transfer_frontier_claim" | "transfer_frontier_release", [import("convex/values").VLiteral<"transfer_frontier_release", "required">, import("convex/values").VLiteral<"transfer_frontier_claim", "required">], "required", never>;
2149
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2150
+ fingerprint: import("convex/values").VString<string, "required">;
2151
+ generation: import("convex/values").VFloat64<number, "required">;
2152
+ observedFingerprint: import("convex/values").VString<string, "required">;
2153
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2154
+ referenceCount: import("convex/values").VFloat64<number, "required">;
2155
+ transferIds: import("convex/values").VArray<import("convex/values").GenericId<"transfers">[], import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">, "required">;
2156
+ isOverflow: import("convex/values").VLiteral<true, "required">;
2157
+ state: import("convex/values").VUnion<"complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">], "required", never>;
2158
+ continuation: import("convex/values").VObject<{
2159
+ nextReference: number;
2160
+ producerGeneration: number;
2161
+ sourceFingerprint: string;
2162
+ state: "complete" | "held" | "indexing" | "validating";
2163
+ validatedReferences: number;
2164
+ } | undefined, {
2165
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
2166
+ nextReference: import("convex/values").VFloat64<number, "required">;
2167
+ validatedReferences: import("convex/values").VFloat64<number, "required">;
2168
+ producerGeneration: import("convex/values").VFloat64<number, "required">;
2169
+ sourceFingerprint: import("convex/values").VString<string, "required">;
2170
+ }, "optional", "nextReference" | "producerGeneration" | "sourceFingerprint" | "state" | "validatedReferences">;
2171
+ }, "required", "continuation" | "continuation.nextReference" | "continuation.producerGeneration" | "continuation.sourceFingerprint" | "continuation.state" | "continuation.validatedReferences" | "fingerprint" | "generation" | "isContradictory" | "isOverflow" | "observedFingerprint" | "operationId" | "originalOperationId" | "producer" | "producerVersion" | "referenceCount" | "sourceChargeId" | "state" | "transferIds">, {
2172
+ by_operation_id: ["operationId", "_creationTime"];
2173
+ by_original_operation_id: ["originalOperationId", "_creationTime"];
2174
+ by_original_operation_producer: ["originalOperationId", "producer", "_creationTime"];
2175
+ by_state: ["state", "_creationTime"];
2176
+ }, {}, {}>;
2177
+ financialTransferBatchReferences: import("convex/server").TableDefinition<import("convex/values").VObject<{
2178
+ batchId: import("convex/values").GenericId<"financialTransferBatches">;
2179
+ observationGeneration: number;
2180
+ observationId: import("convex/values").GenericId<"financialTransferObservations">;
2181
+ observedFingerprint: string;
2182
+ ownershipFingerprint: string;
2183
+ position: number;
2184
+ sourceFingerprint: string;
2185
+ transferId: import("convex/values").GenericId<"transfers">;
2186
+ }, {
2187
+ batchId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferBatches">, "required">;
2188
+ position: import("convex/values").VFloat64<number, "required">;
2189
+ transferId: import("convex/values").VId<import("convex/values").GenericId<"transfers">, "required">;
2190
+ observationId: import("convex/values").VId<import("convex/values").GenericId<"financialTransferObservations">, "required">;
2191
+ observationGeneration: import("convex/values").VFloat64<number, "required">;
2192
+ sourceFingerprint: import("convex/values").VString<string, "required">;
2193
+ observedFingerprint: import("convex/values").VString<string, "required">;
2194
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2195
+ }, "required", "batchId" | "observationGeneration" | "observationId" | "observedFingerprint" | "ownershipFingerprint" | "position" | "sourceFingerprint" | "transferId">, {
2196
+ by_batch_position: ["batchId", "position", "_creationTime"];
2197
+ by_batch_transfer: ["batchId", "transferId", "_creationTime"];
2198
+ }, {}, {}>;
2199
+ financialSourceObservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2200
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
2201
+ continuation?: {
2202
+ nextLeg: number;
2203
+ state: "complete" | "held" | "indexing" | "validating";
2204
+ validatedLegs: number;
2205
+ } | undefined;
2206
+ fingerprint: string;
2207
+ generation: number;
2208
+ indexedLegCount: number;
2209
+ isContradictory: boolean;
2210
+ isOverflow: boolean;
2211
+ legCount: number;
2212
+ observedFingerprint: string;
2213
+ ownershipFingerprint: string;
2214
+ producer: "settlement_allocation";
2215
+ producerVersion: 1;
2216
+ sourceChargeId: string;
2217
+ }, {
2218
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
2219
+ sourceChargeId: import("convex/values").VString<string, "required">;
2220
+ producer: import("convex/values").VLiteral<"settlement_allocation", "required">;
2221
+ producerVersion: import("convex/values").VLiteral<1, "required">;
2222
+ fingerprint: import("convex/values").VString<string, "required">;
2223
+ observedFingerprint: import("convex/values").VString<string, "required">;
2224
+ ownershipFingerprint: import("convex/values").VString<string, "required">;
2225
+ generation: import("convex/values").VFloat64<number, "required">;
2226
+ legCount: import("convex/values").VFloat64<number, "required">;
2227
+ indexedLegCount: import("convex/values").VFloat64<number, "required">;
2228
+ isOverflow: import("convex/values").VBoolean<boolean, "required">;
2229
+ isContradictory: import("convex/values").VBoolean<boolean, "required">;
2230
+ continuation: import("convex/values").VObject<{
2231
+ nextLeg: number;
2232
+ state: "complete" | "held" | "indexing" | "validating";
2233
+ validatedLegs: number;
2234
+ } | undefined, {
2235
+ state: import("convex/values").VUnion<"complete" | "held" | "indexing" | "validating", [import("convex/values").VLiteral<"indexing", "required">, import("convex/values").VLiteral<"validating", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"held", "required">], "required", never>;
2236
+ nextLeg: import("convex/values").VFloat64<number, "required">;
2237
+ validatedLegs: import("convex/values").VFloat64<number, "required">;
2238
+ }, "optional", "nextLeg" | "state" | "validatedLegs">;
2239
+ }, "required", "allocationId" | "continuation" | "continuation.nextLeg" | "continuation.state" | "continuation.validatedLegs" | "fingerprint" | "generation" | "indexedLegCount" | "isContradictory" | "isOverflow" | "legCount" | "observedFingerprint" | "ownershipFingerprint" | "producer" | "producerVersion" | "sourceChargeId">, {
2240
+ by_allocation_id: ["allocationId", "_creationTime"];
2241
+ }, {}, {}>;
2242
+ financialSourceLegs: import("convex/server").TableDefinition<import("convex/values").VObject<{
2243
+ allocationId: import("convex/values").GenericId<"settlementAllocations">;
2244
+ bucketKey: string;
2245
+ legIndex: number;
2246
+ orgId?: string | undefined;
2247
+ ownershipStatus: "ambiguous" | "contradictory" | "registered" | "unknown";
2248
+ registrationId?: import("convex/values").GenericId<"financialOwnership"> | undefined;
2249
+ role: "affiliate" | "other" | "store";
2250
+ sourceChargeId: string;
2251
+ userId?: string | undefined;
2252
+ }, {
2253
+ allocationId: import("convex/values").VId<import("convex/values").GenericId<"settlementAllocations">, "required">;
2254
+ sourceChargeId: import("convex/values").VString<string, "required">;
2255
+ legIndex: import("convex/values").VFloat64<number, "required">;
2256
+ bucketKey: import("convex/values").VString<string, "required">;
2257
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
2258
+ registrationId: import("convex/values").VId<import("convex/values").GenericId<"financialOwnership"> | undefined, "optional">;
2259
+ userId: import("convex/values").VString<string | undefined, "optional">;
2260
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2261
+ ownershipStatus: import("convex/values").VUnion<"ambiguous" | "contradictory" | "registered" | "unknown", [import("convex/values").VLiteral<"registered", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"ambiguous", "required">, import("convex/values").VLiteral<"contradictory", "required">], "required", never>;
2262
+ }, "required", "allocationId" | "bucketKey" | "legIndex" | "orgId" | "ownershipStatus" | "registrationId" | "role" | "sourceChargeId" | "userId">, {
2263
+ by_allocation_id_and_leg_index: ["allocationId", "legIndex", "_creationTime"];
2264
+ by_bucket_key: ["bucketKey", "_creationTime"];
2265
+ by_owner: ["userId", "orgId", "_creationTime"];
2266
+ }, {}, {}>;
2267
+ financialObservationGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2268
+ generation: number;
2269
+ scopeKey: string;
2270
+ }, {
2271
+ scopeKey: import("convex/values").VString<string, "required">;
2272
+ generation: import("convex/values").VFloat64<number, "required">;
2273
+ }, "required", "generation" | "scopeKey">, {
2274
+ by_scope_key: ["scopeKey", "_creationTime"];
2275
+ }, {}, {}>;
2276
+ financialOwnership: import("convex/server").TableDefinition<import("convex/values").VObject<{
2277
+ bucketKey: string;
2278
+ generation: number;
2279
+ kind: "logical" | "stripe_account";
2280
+ orgId?: string | undefined;
2281
+ source: {
2282
+ integration: string;
2283
+ recordId: string;
2284
+ };
2285
+ userId: string;
2286
+ }, {
2287
+ userId: import("convex/values").VString<string, "required">;
2288
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2289
+ bucketKey: import("convex/values").VString<string, "required">;
2290
+ kind: import("convex/values").VUnion<"logical" | "stripe_account", [import("convex/values").VLiteral<"stripe_account", "required">, import("convex/values").VLiteral<"logical", "required">], "required", never>;
2291
+ source: import("convex/values").VObject<{
2292
+ integration: string;
2293
+ recordId: string;
2294
+ }, {
2295
+ integration: import("convex/values").VString<string, "required">;
2296
+ recordId: import("convex/values").VString<string, "required">;
2297
+ }, "required", "integration" | "recordId">;
2298
+ generation: import("convex/values").VFloat64<number, "required">;
2299
+ }, "required", "bucketKey" | "generation" | "kind" | "orgId" | "source" | "source.integration" | "source.recordId" | "userId">, {
2300
+ by_bucket_key: ["bucketKey", "_creationTime"];
2301
+ by_owner: ["userId", "orgId", "_creationTime"];
2302
+ }, {}, {}>;
2303
+ financialOwnershipGenerations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2304
+ generation: number;
2305
+ orgId?: string | undefined;
2306
+ userId: string;
2307
+ }, {
2308
+ userId: import("convex/values").VString<string, "required">;
2309
+ orgId: import("convex/values").VString<string | undefined, "optional">;
2310
+ generation: import("convex/values").VFloat64<number, "required">;
2311
+ }, "required", "generation" | "orgId" | "userId">, {
2312
+ by_owner: ["userId", "orgId", "_creationTime"];
2313
+ }, {}, {}>;
2314
+ payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
2315
+ accountId: string;
2316
+ cadenceMs: number;
2317
+ completedGeneration?: number | undefined;
2318
+ completedOperationKey?: string | undefined;
2319
+ currency: string;
2320
+ generation: number;
2321
+ hasOperation: boolean;
2322
+ lastAttemptAt?: number | undefined;
2323
+ lastReason?: string | undefined;
2324
+ lastResultAt?: number | undefined;
2325
+ leaseUntil?: number | undefined;
2326
+ nextAttemptAt: number;
2327
+ operationKey?: string | undefined;
2328
+ ownerKey: string;
2329
+ sequence: number;
2330
+ }, {
2331
+ accountId: import("convex/values").VString<string, "required">;
2332
+ ownerKey: import("convex/values").VString<string, "required">;
2333
+ currency: import("convex/values").VString<string, "required">;
2334
+ generation: import("convex/values").VFloat64<number, "required">;
2335
+ sequence: import("convex/values").VFloat64<number, "required">;
2336
+ cadenceMs: import("convex/values").VFloat64<number, "required">;
2337
+ nextAttemptAt: import("convex/values").VFloat64<number, "required">;
2338
+ leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
2339
+ operationKey: import("convex/values").VString<string | undefined, "optional">;
2340
+ hasOperation: import("convex/values").VBoolean<boolean, "required">;
2341
+ lastReason: import("convex/values").VString<string | undefined, "optional">;
2342
+ lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
2343
+ lastResultAt: import("convex/values").VFloat64<number | undefined, "optional">;
2344
+ completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
2345
+ completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
2346
+ }, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "lastResultAt" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
2347
+ by_account_currency: ["accountId", "currency", "_creationTime"];
2348
+ by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
2349
+ }, {}, {}>;
2350
+ payoutFinancialRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
2351
+ accountId: string;
2352
+ revision: number;
2353
+ riskRevision: number;
2354
+ }, {
2355
+ accountId: import("convex/values").VString<string, "required">;
2356
+ revision: import("convex/values").VFloat64<number, "required">;
2357
+ riskRevision: import("convex/values").VFloat64<number, "required">;
2358
+ }, "required", "accountId" | "revision" | "riskRevision">, {
2359
+ by_account: ["accountId", "_creationTime"];
2360
+ }, {}, {}>;
2361
+ payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
2362
+ accountId: string;
2363
+ key: string;
2364
+ kind: "allocation" | "claim" | "fee" | "liability" | "provider_payout" | "transfer";
2365
+ removed?: boolean | undefined;
2366
+ riskRevision: number;
2367
+ }, {
2368
+ accountId: import("convex/values").VString<string, "required">;
2369
+ riskRevision: import("convex/values").VFloat64<number, "required">;
2370
+ kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "liability" | "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">, import("convex/values").VLiteral<"liability", "required">], "required", never>;
2371
+ key: import("convex/values").VString<string, "required">;
2372
+ removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
2373
+ }, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
2374
+ by_account_revision: ["accountId", "riskRevision", "_creationTime"];
2375
+ }, {}, {}>;
2376
+ payoutRiskRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
2377
+ accountId: string;
2378
+ riskRevision: number;
2379
+ }, {
2380
+ accountId: import("convex/values").VString<string, "required">;
2381
+ riskRevision: import("convex/values").VFloat64<number, "required">;
2382
+ }, "required", "accountId" | "riskRevision">, {
2383
+ by_account: ["accountId", "_creationTime"];
2384
+ }, {}, {}>;
2385
+ payoutSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
2386
+ accountId: string;
2387
+ allocationCount: number;
2388
+ allocationCursor?: string | undefined;
2389
+ boundOperationKey?: string | undefined;
2390
+ boundRiskRevision?: number | undefined;
2391
+ claimCount: number;
2392
+ claimCursor?: string | undefined;
2393
+ deferredPositiveChanges: boolean;
2394
+ expectedRevision: number;
2395
+ expiresAt: number;
2396
+ feeCount: number;
2397
+ feeCursor?: string | undefined;
2398
+ initialRevision: number;
2399
+ initialRiskRevision: number;
2400
+ observedRevision: number;
2401
+ operationKey: string;
2402
+ ownerKey: string;
2403
+ phase: "allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources";
2404
+ policyMode?: string | undefined;
2405
+ policyOperationKey?: string | undefined;
2406
+ providerChanged: boolean;
2407
+ readOnly: boolean;
2408
+ reason?: string | undefined;
2409
+ riskRevision: number;
2410
+ sourceCount: number;
2411
+ sourceCursor?: string | undefined;
2412
+ sourceFence: number;
2413
+ step: number;
2414
+ }, {
2415
+ readOnly: import("convex/values").VBoolean<boolean, "required">;
2416
+ boundOperationKey: import("convex/values").VString<string | undefined, "optional">;
2417
+ boundRiskRevision: import("convex/values").VFloat64<number | undefined, "optional">;
2418
+ accountId: import("convex/values").VString<string, "required">;
2419
+ ownerKey: import("convex/values").VString<string, "required">;
2420
+ operationKey: import("convex/values").VString<string, "required">;
2421
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
2422
+ policyMode: import("convex/values").VString<string | undefined, "optional">;
2423
+ policyOperationKey: import("convex/values").VString<string | undefined, "optional">;
2424
+ 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>;
2425
+ step: import("convex/values").VFloat64<number, "required">;
2426
+ sourceFence: import("convex/values").VFloat64<number, "required">;
2427
+ sourceCursor: import("convex/values").VString<string | undefined, "optional">;
2428
+ allocationCursor: import("convex/values").VString<string | undefined, "optional">;
2429
+ feeCursor: import("convex/values").VString<string | undefined, "optional">;
2430
+ claimCursor: import("convex/values").VString<string | undefined, "optional">;
2431
+ initialRevision: import("convex/values").VFloat64<number, "required">;
2432
+ initialRiskRevision: import("convex/values").VFloat64<number, "required">;
2433
+ riskRevision: import("convex/values").VFloat64<number, "required">;
2434
+ observedRevision: import("convex/values").VFloat64<number, "required">;
2435
+ sourceCount: import("convex/values").VFloat64<number, "required">;
2436
+ allocationCount: import("convex/values").VFloat64<number, "required">;
2437
+ claimCount: import("convex/values").VFloat64<number, "required">;
2438
+ feeCount: import("convex/values").VFloat64<number, "required">;
2439
+ deferredPositiveChanges: import("convex/values").VBoolean<boolean, "required">;
2440
+ providerChanged: import("convex/values").VBoolean<boolean, "required">;
2441
+ expiresAt: import("convex/values").VFloat64<number, "required">;
2442
+ reason: import("convex/values").VString<string | undefined, "optional">;
2443
+ }, "required", "accountId" | "allocationCount" | "allocationCursor" | "boundOperationKey" | "boundRiskRevision" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
2444
+ by_account_phase: ["accountId", "phase", "_creationTime"];
2445
+ by_operation: ["operationKey", "_creationTime"];
2446
+ by_read_only: ["readOnly", "_creationTime"];
2447
+ }, {}, {}>;
2448
+ payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
2449
+ allocationCurrency?: string | undefined;
2450
+ allocationDocId?: import("convex/values").GenericId<"payoutSourceAllocations"> | undefined;
2451
+ allocationPresent: boolean;
2452
+ amount: number;
2453
+ currency: string;
2454
+ expectedPaid: number;
2455
+ expectedReserved: number;
2456
+ ledgerFingerprint: string;
2457
+ needsCheck: boolean;
2458
+ paidAmount: number;
2459
+ reinstatement: boolean;
2460
+ reservedAmount: number;
2461
+ reversalClaimedAmount: number;
2462
+ reversedAmount: number;
2463
+ role?: string | undefined;
2464
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
2465
+ sourceChargeId?: string | undefined;
2466
+ sourceCreatedAt: number;
2467
+ status: string;
2468
+ stripeTransferId: string;
2469
+ transferDocId?: import("convex/values").GenericId<"transfers"> | undefined;
2470
+ }, {
2471
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
2472
+ stripeTransferId: import("convex/values").VString<string, "required">;
2473
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
2474
+ transferDocId: import("convex/values").VId<import("convex/values").GenericId<"transfers"> | undefined, "optional">;
2475
+ allocationDocId: import("convex/values").VId<import("convex/values").GenericId<"payoutSourceAllocations"> | undefined, "optional">;
2476
+ sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
2477
+ currency: import("convex/values").VString<string, "required">;
2478
+ amount: import("convex/values").VFloat64<number, "required">;
2479
+ status: import("convex/values").VString<string, "required">;
2480
+ role: import("convex/values").VString<string | undefined, "optional">;
2481
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
2482
+ reversedAmount: import("convex/values").VFloat64<number, "required">;
2483
+ reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
2484
+ reinstatement: import("convex/values").VBoolean<boolean, "required">;
2485
+ allocationPresent: import("convex/values").VBoolean<boolean, "required">;
2486
+ allocationCurrency: import("convex/values").VString<string | undefined, "optional">;
2487
+ paidAmount: import("convex/values").VFloat64<number, "required">;
2488
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
2489
+ expectedPaid: import("convex/values").VFloat64<number, "required">;
2490
+ expectedReserved: import("convex/values").VFloat64<number, "required">;
2491
+ needsCheck: import("convex/values").VBoolean<boolean, "required">;
2492
+ }, "required", "allocationCurrency" | "allocationDocId" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId" | "transferDocId">, {
2493
+ by_snapshot: ["snapshotId", "_creationTime"];
2494
+ by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
2495
+ by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
2496
+ }, {}, {}>;
2497
+ payoutSnapshotClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
2498
+ allocations: {
2499
+ amount: number;
2500
+ role?: string | undefined;
2501
+ stripeTransferId: string;
2502
+ }[];
2503
+ amount: number;
2504
+ currency: string;
2505
+ fingerprint: string;
2506
+ historical?: boolean | undefined;
2507
+ operationKey: string;
2508
+ providerFee?: number | undefined;
2509
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
2510
+ status: string;
2511
+ stripePayoutId?: string | undefined;
2512
+ }, {
2513
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
2514
+ operationKey: import("convex/values").VString<string, "required">;
2515
+ fingerprint: import("convex/values").VString<string, "required">;
2516
+ currency: import("convex/values").VString<string, "required">;
2517
+ amount: import("convex/values").VFloat64<number, "required">;
2518
+ status: import("convex/values").VString<string, "required">;
2519
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
2520
+ historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
2521
+ providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
2522
+ allocations: import("convex/values").VArray<{
2523
+ amount: number;
2524
+ role?: string | undefined;
2525
+ stripeTransferId: string;
2526
+ }[], import("convex/values").VObject<{
2527
+ amount: number;
2528
+ role?: string | undefined;
2529
+ stripeTransferId: string;
2530
+ }, {
2531
+ stripeTransferId: import("convex/values").VString<string, "required">;
2532
+ amount: import("convex/values").VFloat64<number, "required">;
2533
+ role: import("convex/values").VString<string | undefined, "optional">;
2534
+ }, "required", "amount" | "role" | "stripeTransferId">, "required">;
2535
+ }, "required", "allocations" | "amount" | "currency" | "fingerprint" | "historical" | "operationKey" | "providerFee" | "snapshotId" | "status" | "stripePayoutId">, {
2536
+ by_snapshot: ["snapshotId", "_creationTime"];
2537
+ by_snapshot_operation: ["snapshotId", "operationKey", "_creationTime"];
2538
+ }, {}, {}>;
2539
+ payoutSnapshotFees: import("convex/server").TableDefinition<import("convex/values").VObject<{
2540
+ amount: number;
2541
+ currency: string;
2542
+ revision: number;
2543
+ snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
2544
+ }, {
2545
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
2546
+ currency: import("convex/values").VString<string, "required">;
2547
+ amount: import("convex/values").VFloat64<number, "required">;
2548
+ revision: import("convex/values").VFloat64<number, "required">;
2549
+ }, "required", "amount" | "currency" | "revision" | "snapshotId">, {
2550
+ by_snapshot: ["snapshotId", "_creationTime"];
2551
+ by_snapshot_currency: ["snapshotId", "currency", "_creationTime"];
2552
+ }, {}, {}>;
2553
+ affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2554
+ accounted?: boolean | undefined;
2555
+ activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
2556
+ affiliateAccountId: string;
2557
+ chargeAmount: number;
2558
+ creditAmount?: number | undefined;
2559
+ currency: string;
2560
+ debtAmount?: number | undefined;
2561
+ debtStatus?: "open" | "settled" | undefined;
2562
+ disputeId?: string | undefined;
2563
+ disputeState?: "lost" | "open" | "won" | undefined;
2564
+ disputedPrincipal: number;
2565
+ earningId?: import("convex/values").GenericId<"affiliateEarnings"> | undefined;
2566
+ finalizedAmount: number;
2567
+ lastError?: string | undefined;
2568
+ lastRefundId?: string | undefined;
2569
+ lastState?: string | undefined;
2570
+ legacyReceiptIds?: string[] | undefined;
2571
+ legacyRestorationIds?: string[] | undefined;
2572
+ lostPrincipal: number;
2573
+ needsReconciliation: boolean;
2574
+ offsetAmount?: number | undefined;
2575
+ operationSequence?: number | undefined;
2576
+ operatorNote?: string | undefined;
2577
+ originalCommission: number;
2578
+ paymentId?: string | undefined;
2579
+ paymentIntentId?: string | undefined;
2580
+ provisionalAmount: number;
2581
+ recoveredAmount: number;
2582
+ refundedPrincipal: number;
2583
+ releasedCommission?: number | undefined;
2584
+ reservedRecovery?: number | undefined;
2585
+ reservedRestoration?: number | undefined;
2586
+ restoredAmount?: number | undefined;
2587
+ sourceChargeId: string;
2588
+ sourceInvoiceId?: string | undefined;
2589
+ storeAccountId?: string | undefined;
2590
+ stripeTransferId?: string | undefined;
2591
+ }, {
2592
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
2593
+ sourceChargeId: import("convex/values").VString<string, "required">;
2594
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
2595
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
2596
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
2597
+ storeAccountId: import("convex/values").VString<string | undefined, "optional">;
2598
+ lastRefundId: import("convex/values").VString<string | undefined, "optional">;
2599
+ affiliateAccountId: import("convex/values").VString<string, "required">;
2600
+ currency: import("convex/values").VString<string, "required">;
2601
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
2602
+ originalCommission: import("convex/values").VFloat64<number, "required">;
2603
+ refundedPrincipal: import("convex/values").VFloat64<number, "required">;
2604
+ disputedPrincipal: import("convex/values").VFloat64<number, "required">;
2605
+ lostPrincipal: import("convex/values").VFloat64<number, "required">;
2606
+ finalizedAmount: import("convex/values").VFloat64<number, "required">;
2607
+ provisionalAmount: import("convex/values").VFloat64<number, "required">;
2608
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
2609
+ needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
2610
+ accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
2611
+ legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2612
+ legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2613
+ operatorNote: import("convex/values").VString<string | undefined, "optional">;
2614
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
2615
+ releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
2616
+ offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
2617
+ restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
2618
+ reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
2619
+ reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
2620
+ debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
2621
+ creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
2622
+ debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
2623
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
2624
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
2625
+ activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
2626
+ lastState: import("convex/values").VString<string | undefined, "optional">;
2627
+ lastError: import("convex/values").VString<string | undefined, "optional">;
2628
+ operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
2629
+ }, "required", "accounted" | "activeOperationId" | "affiliateAccountId" | "chargeAmount" | "creditAmount" | "currency" | "debtAmount" | "debtStatus" | "disputeId" | "disputeState" | "disputedPrincipal" | "earningId" | "finalizedAmount" | "lastError" | "lastRefundId" | "lastState" | "legacyReceiptIds" | "legacyRestorationIds" | "lostPrincipal" | "needsReconciliation" | "offsetAmount" | "operationSequence" | "operatorNote" | "originalCommission" | "paymentId" | "paymentIntentId" | "provisionalAmount" | "recoveredAmount" | "refundedPrincipal" | "releasedCommission" | "reservedRecovery" | "reservedRestoration" | "restoredAmount" | "sourceChargeId" | "sourceInvoiceId" | "storeAccountId" | "stripeTransferId">, {
2630
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
2631
+ by_affiliate_currency_debt: ["affiliateAccountId", "currency", "debtStatus", "_creationTime"];
2632
+ by_charge: ["sourceChargeId", "_creationTime"];
2633
+ by_transfer: ["stripeTransferId", "_creationTime"];
2634
+ }, {}, {}>;
2635
+ affiliateRecoveryOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2636
+ amount: number;
2637
+ attempted: boolean;
2638
+ createdAt: number;
2639
+ error?: string | undefined;
2640
+ kind: "recovery" | "restoration";
2641
+ obligationId: import("convex/values").GenericId<"affiliateObligations">;
2642
+ providerBaseline?: number | undefined;
2643
+ receiptId?: string | undefined;
2644
+ sourceEventId?: string | undefined;
2645
+ state: "canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported";
2646
+ }, {
2647
+ obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
2648
+ sourceEventId: import("convex/values").VString<string | undefined, "optional">;
2649
+ kind: import("convex/values").VUnion<"recovery" | "restoration", [import("convex/values").VLiteral<"recovery", "required">, import("convex/values").VLiteral<"restoration", "required">], "required", never>;
2650
+ amount: import("convex/values").VFloat64<number, "required">;
2651
+ state: import("convex/values").VUnion<"canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"insufficient_balance", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
2652
+ receiptId: import("convex/values").VString<string | undefined, "optional">;
2653
+ error: import("convex/values").VString<string | undefined, "optional">;
2654
+ attempted: import("convex/values").VBoolean<boolean, "required">;
2655
+ providerBaseline: import("convex/values").VFloat64<number | undefined, "optional">;
2656
+ createdAt: import("convex/values").VFloat64<number, "required">;
2657
+ }, "required", "amount" | "attempted" | "createdAt" | "error" | "kind" | "obligationId" | "providerBaseline" | "receiptId" | "sourceEventId" | "state">, {
2658
+ by_obligation: ["obligationId", "_creationTime"];
2659
+ by_state: ["state", "_creationTime"];
2660
+ }, {}, {}>;
2661
+ affiliatePayoutReleases: import("convex/server").TableDefinition<import("convex/values").VObject<{
2662
+ affiliateAccountId: string;
2663
+ amount: number;
2664
+ createdAt: number;
2665
+ currency: string;
2666
+ minimumAmount: number;
2667
+ operationKey: string;
2668
+ state: "failed" | "pending" | "submitted" | "unknown";
2669
+ stripePayoutId?: string | undefined;
2670
+ }, {
2671
+ affiliateAccountId: import("convex/values").VString<string, "required">;
2672
+ currency: import("convex/values").VString<string, "required">;
2673
+ operationKey: import("convex/values").VString<string, "required">;
2674
+ amount: import("convex/values").VFloat64<number, "required">;
2675
+ minimumAmount: import("convex/values").VFloat64<number, "required">;
2676
+ state: import("convex/values").VUnion<"failed" | "pending" | "submitted" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
2677
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
2678
+ createdAt: import("convex/values").VFloat64<number, "required">;
2679
+ }, "required", "affiliateAccountId" | "amount" | "createdAt" | "currency" | "minimumAmount" | "operationKey" | "state" | "stripePayoutId">, {
2680
+ by_key: ["operationKey", "_creationTime"];
2681
+ by_state: ["state", "_creationTime"];
2682
+ }, {}, {}>;
2683
+ affiliateEarnings: import("convex/server").TableDefinition<import("convex/values").VObject<{
2684
+ affiliateAccountId: string;
2685
+ currency: string;
2686
+ originalCommission: number;
2687
+ paymentIntentId?: string | undefined;
2688
+ releaseAmount: number;
2689
+ sourceChargeId: string;
2690
+ sourceInvoiceId?: string | undefined;
2691
+ status: "paid" | "reserved";
2692
+ stripeTransferId?: string | undefined;
2693
+ withheldAmount: number;
2694
+ }, {
2695
+ sourceChargeId: import("convex/values").VString<string, "required">;
2696
+ affiliateAccountId: import("convex/values").VString<string, "required">;
2697
+ currency: import("convex/values").VString<string, "required">;
2698
+ originalCommission: import("convex/values").VFloat64<number, "required">;
2699
+ withheldAmount: import("convex/values").VFloat64<number, "required">;
2700
+ releaseAmount: import("convex/values").VFloat64<number, "required">;
2701
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
2702
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
2703
+ stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
2704
+ status: import("convex/values").VUnion<"paid" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"paid", "required">], "required", never>;
2705
+ }, "required", "affiliateAccountId" | "currency" | "originalCommission" | "paymentIntentId" | "releaseAmount" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "withheldAmount">, {
2706
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
2707
+ by_charge_affiliate: ["sourceChargeId", "affiliateAccountId", "_creationTime"];
2708
+ }, {}, {}>;
2709
+ affiliateOffsets: import("convex/server").TableDefinition<import("convex/values").VObject<{
2710
+ amount: number;
2711
+ earningId: import("convex/values").GenericId<"affiliateEarnings">;
2712
+ obligationId: import("convex/values").GenericId<"affiliateObligations">;
2713
+ }, {
2714
+ earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings">, "required">;
2715
+ obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
2716
+ amount: import("convex/values").VFloat64<number, "required">;
2717
+ }, "required", "amount" | "earningId" | "obligationId">, {
2718
+ by_earning: ["earningId", "_creationTime"];
2719
+ by_obligation: ["obligationId", "_creationTime"];
2720
+ }, {}, {}>;
2721
+ affiliateRecoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
2722
+ activePayoutKey?: string | undefined;
2723
+ affiliateAccountId: string;
2724
+ currency: string;
2725
+ netPayable: number;
2726
+ offsetAmount: number;
2727
+ originalCommission: number;
2728
+ outstandingDebt: number;
2729
+ pendingPayoutAmount?: number | undefined;
2730
+ recoveredAmount: number;
2731
+ reservedRecovery: number;
2732
+ reservedRestoration: number;
2733
+ restorationDue: number;
2734
+ restoredAmount: number;
2735
+ withheldAmount: number;
2736
+ }, {
2737
+ activePayoutKey: import("convex/values").VString<string | undefined, "optional">;
2738
+ pendingPayoutAmount: import("convex/values").VFloat64<number | undefined, "optional">;
2739
+ affiliateAccountId: import("convex/values").VString<string, "required">;
2740
+ currency: import("convex/values").VString<string, "required">;
2741
+ originalCommission: import("convex/values").VFloat64<number, "required">;
2742
+ recoveredAmount: import("convex/values").VFloat64<number, "required">;
2743
+ offsetAmount: import("convex/values").VFloat64<number, "required">;
2744
+ restoredAmount: import("convex/values").VFloat64<number, "required">;
2745
+ outstandingDebt: import("convex/values").VFloat64<number, "required">;
2746
+ reservedRecovery: import("convex/values").VFloat64<number, "required">;
2747
+ reservedRestoration: import("convex/values").VFloat64<number, "required">;
2748
+ restorationDue: import("convex/values").VFloat64<number, "required">;
2749
+ withheldAmount: import("convex/values").VFloat64<number, "required">;
2750
+ netPayable: import("convex/values").VFloat64<number, "required">;
2751
+ }, "required", "activePayoutKey" | "affiliateAccountId" | "currency" | "netPayable" | "offsetAmount" | "originalCommission" | "outstandingDebt" | "pendingPayoutAmount" | "recoveredAmount" | "reservedRecovery" | "reservedRestoration" | "restorationDue" | "restoredAmount" | "withheldAmount">, {
2752
+ by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
2753
+ }, {}, {}>;
2754
+ affiliateReversalReceipts: import("convex/server").TableDefinition<import("convex/values").VObject<{
2755
+ amount: number;
2756
+ operationId: string;
2757
+ stripeReversalId: string;
2758
+ stripeTransferId: string;
2759
+ }, {
2760
+ stripeReversalId: import("convex/values").VString<string, "required">;
2761
+ stripeTransferId: import("convex/values").VString<string, "required">;
2762
+ operationId: import("convex/values").VString<string, "required">;
2763
+ amount: import("convex/values").VFloat64<number, "required">;
2764
+ }, "required", "amount" | "operationId" | "stripeReversalId" | "stripeTransferId">, {
2765
+ by_receipt: ["stripeReversalId", "_creationTime"];
2766
+ by_transfer: ["stripeTransferId", "_creationTime"];
2767
+ by_transfer_operation: ["stripeTransferId", "operationId", "_creationTime"];
2768
+ }, {}, {}>;
2769
+ payoutSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
2770
+ acceptedAt?: number | undefined;
2771
+ acceptedFingerprint?: string | undefined;
2772
+ acceptedGeneration?: number | undefined;
2773
+ accountId: string;
2774
+ generation: number;
2775
+ startedAt: number;
2776
+ status: "accepted" | "pending" | "unknown";
2777
+ stripePayoutId: string;
2778
+ }, {
2779
+ stripePayoutId: import("convex/values").VString<string, "required">;
2780
+ accountId: import("convex/values").VString<string, "required">;
2781
+ generation: import("convex/values").VFloat64<number, "required">;
2782
+ status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
2783
+ startedAt: import("convex/values").VFloat64<number, "required">;
2784
+ acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
2785
+ acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
2786
+ acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
2787
+ }, "required", "acceptedAt" | "acceptedFingerprint" | "acceptedGeneration" | "accountId" | "generation" | "startedAt" | "status" | "stripePayoutId">, {
2788
+ by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
2789
+ }, {}, {}>;
2790
+ payoutFeeBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
2791
+ accountId: string;
2792
+ amount: number;
2793
+ currency: string;
2794
+ ownerKey: string;
2795
+ revision: number;
2796
+ }, {
2797
+ accountId: import("convex/values").VString<string, "required">;
2798
+ ownerKey: import("convex/values").VString<string, "required">;
2799
+ currency: import("convex/values").VString<string, "required">;
2800
+ amount: import("convex/values").VFloat64<number, "required">;
2801
+ revision: import("convex/values").VFloat64<number, "required">;
2802
+ }, "required", "accountId" | "amount" | "currency" | "ownerKey" | "revision">, {
2803
+ by_account_currency: ["accountId", "currency", "_creationTime"];
2804
+ }, {}, {}>;
2805
+ payoutReleaseClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
2806
+ accountId: string;
2807
+ allocations: {
2808
+ amount: number;
2809
+ role?: "affiliate" | "other" | "store" | undefined;
2810
+ stripeTransferId: string;
2811
+ }[];
2812
+ amount: number;
2813
+ attemptedAt?: number | undefined;
2814
+ currency: string;
2815
+ debitFee?: number | undefined;
2816
+ debitTransactionId?: string | undefined;
2817
+ destinationId?: string | undefined;
2818
+ expectedRevision: number;
2819
+ feeRevision?: number | undefined;
2820
+ historical?: boolean | undefined;
2821
+ independentLiabilities?: number | undefined;
2822
+ liabilityRevision?: number | undefined;
2823
+ observations: {
2824
+ currency: string;
2825
+ ledgerFingerprint: string;
2826
+ matureNet: number;
2827
+ observedAt: number;
2828
+ pendingCredits: number;
2829
+ stripeTransferId: string;
2830
+ transactionIds: string[];
2831
+ }[];
2832
+ operationKey: string;
2833
+ ownerKey: string;
2834
+ providerFee?: number | undefined;
2835
+ rejection?: {
2836
+ code: "amount_too_small" | "balance_insufficient";
2837
+ requestId: string;
2838
+ } | undefined;
2839
+ returnTransactionId?: string | undefined;
2840
+ snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
2841
+ status: "canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted";
2842
+ stripePayoutId?: string | undefined;
2843
+ }, {
2844
+ accountId: import("convex/values").VString<string, "required">;
2845
+ ownerKey: import("convex/values").VString<string, "required">;
2846
+ historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
2847
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
2848
+ liabilityRevision: import("convex/values").VFloat64<number | undefined, "optional">;
2849
+ independentLiabilities: import("convex/values").VFloat64<number | undefined, "optional">;
2850
+ operationKey: import("convex/values").VString<string, "required">;
2851
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
2852
+ currency: import("convex/values").VString<string, "required">;
2853
+ amount: import("convex/values").VFloat64<number, "required">;
2854
+ destinationId: import("convex/values").VString<string | undefined, "optional">;
2855
+ allocations: import("convex/values").VArray<{
2856
+ amount: number;
2857
+ role?: "affiliate" | "other" | "store" | undefined;
2858
+ stripeTransferId: string;
2859
+ }[], import("convex/values").VObject<{
2860
+ amount: number;
2861
+ role?: "affiliate" | "other" | "store" | undefined;
2862
+ stripeTransferId: string;
2863
+ }, {
2864
+ stripeTransferId: import("convex/values").VString<string, "required">;
2865
+ amount: import("convex/values").VFloat64<number, "required">;
2866
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
2867
+ }, "required", "amount" | "role" | "stripeTransferId">, "required">;
2868
+ observations: import("convex/values").VArray<{
2869
+ currency: string;
2870
+ ledgerFingerprint: string;
2871
+ matureNet: number;
2872
+ observedAt: number;
2873
+ pendingCredits: number;
2874
+ stripeTransferId: string;
2875
+ transactionIds: string[];
2876
+ }[], import("convex/values").VObject<{
2877
+ currency: string;
2878
+ ledgerFingerprint: string;
2879
+ matureNet: number;
2880
+ observedAt: number;
2881
+ pendingCredits: number;
2882
+ stripeTransferId: string;
2883
+ transactionIds: string[];
2884
+ }, {
2885
+ stripeTransferId: import("convex/values").VString<string, "required">;
2886
+ currency: import("convex/values").VString<string, "required">;
2887
+ matureNet: import("convex/values").VFloat64<number, "required">;
2888
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
2889
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
2890
+ observedAt: import("convex/values").VFloat64<number, "required">;
2891
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
2892
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
2893
+ status: import("convex/values").VUnion<"canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"returned", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"rejected", "required">], "required", never>;
2894
+ attemptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
2895
+ stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
2896
+ returnTransactionId: import("convex/values").VString<string | undefined, "optional">;
2897
+ feeRevision: import("convex/values").VFloat64<number | undefined, "optional">;
2898
+ debitTransactionId: import("convex/values").VString<string | undefined, "optional">;
2899
+ debitFee: import("convex/values").VFloat64<number | undefined, "optional">;
2900
+ providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
2901
+ rejection: import("convex/values").VObject<{
2902
+ code: "amount_too_small" | "balance_insufficient";
2903
+ requestId: string;
2904
+ } | undefined, {
2905
+ requestId: import("convex/values").VString<string, "required">;
2906
+ code: import("convex/values").VUnion<"amount_too_small" | "balance_insufficient", [import("convex/values").VLiteral<"balance_insufficient", "required">, import("convex/values").VLiteral<"amount_too_small", "required">], "required", never>;
2907
+ }, "optional", "code" | "requestId">;
2908
+ }, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "independentLiabilities" | "liabilityRevision" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "snapshotId" | "status" | "stripePayoutId">, {
2909
+ by_account_status: ["accountId", "status", "_creationTime"];
2910
+ by_debit_receipt: ["debitTransactionId", "_creationTime"];
2911
+ by_operation: ["operationKey", "_creationTime"];
2912
+ by_provider_payout: ["stripePayoutId", "_creationTime"];
2913
+ by_rejection_request: ["rejection.requestId", "_creationTime"];
2914
+ by_return_receipt: ["returnTransactionId", "_creationTime"];
2915
+ by_status: ["status", "_creationTime"];
2916
+ }, {}, {}>;
2917
+ payoutSourceAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
2918
+ accountId: string;
2919
+ currency: string;
2920
+ ownerKey: string;
2921
+ paidAmount: number;
2922
+ reservedAmount: number;
2923
+ stripeTransferId: string;
2924
+ }, {
2925
+ accountId: import("convex/values").VString<string, "required">;
2926
+ ownerKey: import("convex/values").VString<string, "required">;
2927
+ stripeTransferId: import("convex/values").VString<string, "required">;
2928
+ currency: import("convex/values").VString<string, "required">;
2929
+ paidAmount: import("convex/values").VFloat64<number, "required">;
2930
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
2931
+ }, "required", "accountId" | "currency" | "ownerKey" | "paidAmount" | "reservedAmount" | "stripeTransferId">, {
2932
+ by_account: ["accountId", "_creationTime"];
2933
+ by_transfer: ["stripeTransferId", "_creationTime"];
2934
+ }, {}, {}>;
2935
+ payoutPolicies: import("convex/server").TableDefinition<import("convex/values").VObject<{
2936
+ accountId: string;
2937
+ country: string;
2938
+ holdDeadline?: number | undefined;
2939
+ holdingExpiry?: {
2940
+ balances?: {
2941
+ available: number;
2942
+ currency: string;
2943
+ pending: number;
2944
+ }[] | undefined;
2945
+ deadline: number;
2946
+ observedAt?: number | undefined;
2947
+ status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
2948
+ } | undefined;
2949
+ mode: "custom" | "stripe_managed";
2950
+ operationKey: string;
2951
+ ownerKey: string;
2952
+ previousSchedule?: {
2953
+ interval: "daily" | "manual" | "monthly" | "weekly";
2954
+ monthlyDays?: number[] | undefined;
2955
+ weeklyDays?: string[] | undefined;
2956
+ } | undefined;
2957
+ revision: number;
2958
+ status: "changing" | "ready";
2959
+ thresholds: {
2960
+ amount: number;
2961
+ currency: string;
2962
+ }[];
2963
+ }, {
2964
+ accountId: import("convex/values").VString<string, "required">;
2965
+ ownerKey: import("convex/values").VString<string, "required">;
2966
+ revision: import("convex/values").VFloat64<number, "required">;
2967
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
2968
+ thresholds: import("convex/values").VArray<{
2969
+ amount: number;
2970
+ currency: string;
2971
+ }[], import("convex/values").VObject<{
2972
+ amount: number;
2973
+ currency: string;
2974
+ }, {
2975
+ currency: import("convex/values").VString<string, "required">;
2976
+ amount: import("convex/values").VFloat64<number, "required">;
2977
+ }, "required", "amount" | "currency">, "required">;
2978
+ status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
2979
+ operationKey: import("convex/values").VString<string, "required">;
2980
+ country: import("convex/values").VString<string, "required">;
2981
+ previousSchedule: import("convex/values").VObject<{
2982
+ interval: "daily" | "manual" | "monthly" | "weekly";
2983
+ monthlyDays?: number[] | undefined;
2984
+ weeklyDays?: string[] | undefined;
2985
+ } | undefined, {
2986
+ interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
2987
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2988
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
2989
+ }, "optional", "interval" | "monthlyDays" | "weeklyDays">;
2990
+ holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
2991
+ holdingExpiry: import("convex/values").VObject<{
2992
+ balances?: {
2993
+ available: number;
2994
+ currency: string;
2995
+ pending: number;
2996
+ }[] | undefined;
2997
+ deadline: number;
2998
+ observedAt?: number | undefined;
2999
+ status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
3000
+ } | undefined, {
3001
+ deadline: import("convex/values").VFloat64<number, "required">;
3002
+ status: import("convex/values").VUnion<"balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified", [import("convex/values").VLiteral<"unverified", "required">, import("convex/values").VLiteral<"balance_remaining", "required">, import("convex/values").VLiteral<"claims_unresolved", "required">, import("convex/values").VLiteral<"no_held_balance", "required">], "required", never>;
3003
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
3004
+ balances: import("convex/values").VArray<{
3005
+ available: number;
3006
+ currency: string;
3007
+ pending: number;
3008
+ }[] | undefined, import("convex/values").VObject<{
3009
+ available: number;
3010
+ currency: string;
3011
+ pending: number;
3012
+ }, {
3013
+ currency: import("convex/values").VString<string, "required">;
3014
+ available: import("convex/values").VFloat64<number, "required">;
3015
+ pending: import("convex/values").VFloat64<number, "required">;
3016
+ }, "required", "available" | "currency" | "pending">, "optional">;
3017
+ }, "optional", "balances" | "deadline" | "observedAt" | "status">;
3018
+ }, "required", "accountId" | "country" | "holdDeadline" | "holdingExpiry" | "holdingExpiry.balances" | "holdingExpiry.deadline" | "holdingExpiry.observedAt" | "holdingExpiry.status" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
3019
+ by_account: ["accountId", "_creationTime"];
3020
+ by_deadline: ["holdDeadline", "_creationTime"];
3021
+ by_mode_status: ["mode", "status", "_creationTime"];
3022
+ by_status: ["status", "_creationTime"];
3023
+ }, {}, {}>;
3024
+ payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3025
+ accountId: string;
3026
+ adoption?: {
3027
+ claims: {
3028
+ fingerprint: string;
3029
+ operationKey: string;
3030
+ }[];
3031
+ collectionKey?: string | undefined;
3032
+ observations: {
3033
+ currency: string;
3034
+ ledgerFingerprint: string;
3035
+ matureNet: number;
3036
+ observedAt: number;
3037
+ pendingCredits: number;
3038
+ stripeTransferId: string;
3039
+ transactionIds: string[];
3040
+ }[];
3041
+ oldestHeldAt?: number | undefined;
3042
+ snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
3043
+ } | undefined;
3044
+ attempted?: boolean | undefined;
3045
+ country: string;
3046
+ expectedRevision: number;
3047
+ mode: "custom" | "stripe_managed";
3048
+ observedAt?: number | undefined;
3049
+ observedSchedule: {
3050
+ interval: "daily" | "manual" | "monthly" | "weekly";
3051
+ monthlyDays?: number[] | undefined;
3052
+ weeklyDays?: string[] | undefined;
3053
+ };
3054
+ operationKey: string;
3055
+ ownerKey: string;
3056
+ previousSchedule: {
3057
+ interval: "daily" | "manual" | "monthly" | "weekly";
3058
+ monthlyDays?: number[] | undefined;
3059
+ weeklyDays?: string[] | undefined;
3060
+ };
3061
+ revision: number;
3062
+ status: "canceled" | "complete" | "pending";
3063
+ targetSchedule: {
3064
+ interval: "daily" | "manual" | "monthly" | "weekly";
3065
+ monthlyDays?: number[] | undefined;
3066
+ weeklyDays?: string[] | undefined;
3067
+ };
3068
+ thresholds: {
3069
+ amount: number;
3070
+ currency: string;
3071
+ }[];
3072
+ }, {
3073
+ accountId: import("convex/values").VString<string, "required">;
3074
+ ownerKey: import("convex/values").VString<string, "required">;
3075
+ adoption: import("convex/values").VObject<{
3076
+ claims: {
3077
+ fingerprint: string;
3078
+ operationKey: string;
3079
+ }[];
3080
+ collectionKey?: string | undefined;
3081
+ observations: {
3082
+ currency: string;
3083
+ ledgerFingerprint: string;
3084
+ matureNet: number;
3085
+ observedAt: number;
3086
+ pendingCredits: number;
3087
+ stripeTransferId: string;
3088
+ transactionIds: string[];
3089
+ }[];
3090
+ oldestHeldAt?: number | undefined;
3091
+ snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
3092
+ } | undefined, {
3093
+ snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
3094
+ collectionKey: import("convex/values").VString<string | undefined, "optional">;
3095
+ observations: import("convex/values").VArray<{
3096
+ currency: string;
3097
+ ledgerFingerprint: string;
3098
+ matureNet: number;
3099
+ observedAt: number;
3100
+ pendingCredits: number;
3101
+ stripeTransferId: string;
3102
+ transactionIds: string[];
3103
+ }[], import("convex/values").VObject<{
3104
+ currency: string;
3105
+ ledgerFingerprint: string;
3106
+ matureNet: number;
3107
+ observedAt: number;
3108
+ pendingCredits: number;
3109
+ stripeTransferId: string;
3110
+ transactionIds: string[];
3111
+ }, {
3112
+ stripeTransferId: import("convex/values").VString<string, "required">;
3113
+ currency: import("convex/values").VString<string, "required">;
3114
+ matureNet: import("convex/values").VFloat64<number, "required">;
3115
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
3116
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
3117
+ observedAt: import("convex/values").VFloat64<number, "required">;
3118
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
3119
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
3120
+ claims: import("convex/values").VArray<{
3121
+ fingerprint: string;
3122
+ operationKey: string;
3123
+ }[], import("convex/values").VObject<{
3124
+ fingerprint: string;
3125
+ operationKey: string;
3126
+ }, {
3127
+ operationKey: import("convex/values").VString<string, "required">;
3128
+ fingerprint: import("convex/values").VString<string, "required">;
3129
+ }, "required", "fingerprint" | "operationKey">, "required">;
3130
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
3131
+ }, "optional", "claims" | "collectionKey" | "observations" | "oldestHeldAt" | "snapshotId">;
3132
+ operationKey: import("convex/values").VString<string, "required">;
3133
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
3134
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
3135
+ thresholds: import("convex/values").VArray<{
3136
+ amount: number;
3137
+ currency: string;
3138
+ }[], import("convex/values").VObject<{
3139
+ amount: number;
3140
+ currency: string;
3141
+ }, {
3142
+ currency: import("convex/values").VString<string, "required">;
3143
+ amount: import("convex/values").VFloat64<number, "required">;
3144
+ }, "required", "amount" | "currency">, "required">;
3145
+ country: import("convex/values").VString<string, "required">;
3146
+ observedSchedule: import("convex/values").VObject<{
3147
+ interval: "daily" | "manual" | "monthly" | "weekly";
3148
+ monthlyDays?: number[] | undefined;
3149
+ weeklyDays?: string[] | undefined;
3150
+ }, {
3151
+ interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
3152
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3153
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
3154
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
3155
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
3156
+ revision: import("convex/values").VFloat64<number, "required">;
3157
+ previousSchedule: import("convex/values").VObject<{
3158
+ interval: "daily" | "manual" | "monthly" | "weekly";
3159
+ monthlyDays?: number[] | undefined;
3160
+ weeklyDays?: string[] | undefined;
3161
+ }, {
3162
+ interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
3163
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3164
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
3165
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
3166
+ targetSchedule: import("convex/values").VObject<{
3167
+ interval: "daily" | "manual" | "monthly" | "weekly";
3168
+ monthlyDays?: number[] | undefined;
3169
+ weeklyDays?: string[] | undefined;
3170
+ }, {
3171
+ interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
3172
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3173
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
3174
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
3175
+ status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
3176
+ attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3177
+ }, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.collectionKey" | "adoption.observations" | "adoption.oldestHeldAt" | "adoption.snapshotId" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
3178
+ by_operation: ["operationKey", "_creationTime"];
3179
+ }, {}, {}>;
3180
+ currencyTotals: import("convex/server").TableDefinition<import("convex/values").VObject<{
3181
+ accountId: string;
3182
+ count: number;
3183
+ currency: string;
3184
+ gross: number;
3185
+ kind: "earnings" | "payouts";
3186
+ paidOut: number;
3187
+ reversed: number;
3188
+ }, {
3189
+ accountId: import("convex/values").VString<string, "required">;
3190
+ currency: import("convex/values").VString<string, "required">;
3191
+ kind: import("convex/values").VUnion<"earnings" | "payouts", [import("convex/values").VLiteral<"earnings", "required">, import("convex/values").VLiteral<"payouts", "required">], "required", never>;
3192
+ gross: import("convex/values").VFloat64<number, "required">;
3193
+ reversed: import("convex/values").VFloat64<number, "required">;
3194
+ paidOut: import("convex/values").VFloat64<number, "required">;
3195
+ count: import("convex/values").VFloat64<number, "required">;
3196
+ }, "required", "accountId" | "count" | "currency" | "gross" | "kind" | "paidOut" | "reversed">, {
3197
+ by_account_kind_currency: ["accountId", "kind", "currency", "_creationTime"];
3198
+ }, {}, {}>;
3199
+ recoveryClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
3200
+ accountId: string;
3201
+ amountDue: number;
3202
+ claimKey: string;
3203
+ collectedAmount: number;
3204
+ currency: string;
3205
+ openingCollection?: {
3206
+ amountDue: number;
3207
+ collectedAmount: number;
3208
+ operationKey: string;
3209
+ revision: number;
3210
+ } | undefined;
3211
+ outstanding: number;
3212
+ reservedAmount: number;
3213
+ revision: number;
3214
+ scopeKey: string;
3215
+ sign: "negative" | "positive" | "zero";
3216
+ sourceChargeId: string;
3217
+ sourceGross: number;
3218
+ sourceProcessingFee: number;
3219
+ }, {
3220
+ accountId: import("convex/values").VString<string, "required">;
3221
+ scopeKey: import("convex/values").VString<string, "required">;
3222
+ currency: import("convex/values").VString<string, "required">;
3223
+ claimKey: import("convex/values").VString<string, "required">;
3224
+ sourceChargeId: import("convex/values").VString<string, "required">;
3225
+ sourceGross: import("convex/values").VFloat64<number, "required">;
3226
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
3227
+ amountDue: import("convex/values").VFloat64<number, "required">;
3228
+ revision: import("convex/values").VFloat64<number, "required">;
3229
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
3230
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
3231
+ outstanding: import("convex/values").VFloat64<number, "required">;
3232
+ sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
3233
+ openingCollection: import("convex/values").VObject<{
3234
+ amountDue: number;
3235
+ collectedAmount: number;
3236
+ operationKey: string;
3237
+ revision: number;
3238
+ } | undefined, {
3239
+ operationKey: import("convex/values").VString<string, "required">;
3240
+ amountDue: import("convex/values").VFloat64<number, "required">;
3241
+ revision: import("convex/values").VFloat64<number, "required">;
3242
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
3243
+ }, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
3244
+ }, "required", "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">, {
3245
+ by_import: ["openingCollection.operationKey", "_creationTime"];
3246
+ by_key: ["claimKey", "_creationTime"];
3247
+ by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
3248
+ by_sign: ["accountId", "scopeKey", "currency", "sign", "_creationTime"];
3249
+ }, {}, {}>;
3250
+ recoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
3251
+ accountId: string;
3252
+ activeGroupKey?: string | undefined;
3253
+ amountDue: number;
3254
+ collectedAmount: number;
3255
+ currency: string;
3256
+ outstanding: number;
3257
+ reservedAmount: number;
3258
+ scopeKey: string;
3259
+ }, {
3260
+ accountId: import("convex/values").VString<string, "required">;
3261
+ scopeKey: import("convex/values").VString<string, "required">;
3262
+ currency: import("convex/values").VString<string, "required">;
3263
+ amountDue: import("convex/values").VFloat64<number, "required">;
3264
+ collectedAmount: import("convex/values").VFloat64<number, "required">;
3265
+ reservedAmount: import("convex/values").VFloat64<number, "required">;
3266
+ outstanding: import("convex/values").VFloat64<number, "required">;
3267
+ activeGroupKey: import("convex/values").VString<string | undefined, "optional">;
3268
+ }, "required", "accountId" | "activeGroupKey" | "amountDue" | "collectedAmount" | "currency" | "outstanding" | "reservedAmount" | "scopeKey">, {
3269
+ by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
3270
+ }, {}, {}>;
3271
+ recoveryGroups: import("convex/server").TableDefinition<import("convex/values").VObject<{
3272
+ accountId: string;
3273
+ amount: number;
3274
+ currency: string;
3275
+ groupKey: string;
3276
+ invoiceFunding?: {
3277
+ sourceChargeId: string;
3278
+ sourceGross: number;
3279
+ sourceProcessingFee: number;
3280
+ } | undefined;
3281
+ invoiceItemId?: string | undefined;
3282
+ maxCredit: number;
3283
+ maxDebit: number;
3284
+ pendingOperations: number;
3285
+ preparationSequence?: number | undefined;
3286
+ scopeKey: string;
3287
+ sourceGross?: number | undefined;
3288
+ sourceId: string;
3289
+ sourceKind: "invoice" | "settlement";
3290
+ sourceProcessingFee?: number | undefined;
3291
+ status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
3292
+ }, {
3293
+ accountId: import("convex/values").VString<string, "required">;
3294
+ scopeKey: import("convex/values").VString<string, "required">;
3295
+ currency: import("convex/values").VString<string, "required">;
3296
+ groupKey: import("convex/values").VString<string, "required">;
3297
+ sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
3298
+ sourceId: import("convex/values").VString<string, "required">;
3299
+ sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
3300
+ sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
3301
+ maxDebit: import("convex/values").VFloat64<number, "required">;
3302
+ maxCredit: import("convex/values").VFloat64<number, "required">;
3303
+ amount: import("convex/values").VFloat64<number, "required">;
3304
+ pendingOperations: import("convex/values").VFloat64<number, "required">;
3305
+ preparationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
3306
+ invoiceItemId: import("convex/values").VString<string | undefined, "optional">;
3307
+ invoiceFunding: import("convex/values").VObject<{
3308
+ sourceChargeId: string;
3309
+ sourceGross: number;
3310
+ sourceProcessingFee: number;
3311
+ } | undefined, {
3312
+ sourceChargeId: import("convex/values").VString<string, "required">;
3313
+ sourceGross: import("convex/values").VFloat64<number, "required">;
3314
+ sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
3315
+ }, "optional", "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
3316
+ status: import("convex/values").VUnion<"collected" | "collecting" | "open" | "released" | "releasing" | "sealed", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"sealed", "required">, import("convex/values").VLiteral<"collecting", "required">, import("convex/values").VLiteral<"releasing", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
3317
+ }, "required", "accountId" | "amount" | "currency" | "groupKey" | "invoiceFunding" | "invoiceFunding.sourceChargeId" | "invoiceFunding.sourceGross" | "invoiceFunding.sourceProcessingFee" | "invoiceItemId" | "maxCredit" | "maxDebit" | "pendingOperations" | "preparationSequence" | "scopeKey" | "sourceGross" | "sourceId" | "sourceKind" | "sourceProcessingFee" | "status">, {
3318
+ by_key: ["groupKey", "_creationTime"];
3319
+ }, {}, {}>;
3320
+ recoveryReservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3321
+ allocations: {
3322
+ amount: number;
3323
+ claimId: import("convex/values").GenericId<"recoveryClaims">;
3324
+ claimKey: string;
3325
+ }[];
3326
+ amount: number;
3327
+ groupKey: string;
3328
+ limit: number;
3329
+ operationKey: string;
3330
+ status: "collected" | "empty" | "released" | "reserved";
3331
+ }, {
3332
+ operationKey: import("convex/values").VString<string, "required">;
3333
+ groupKey: import("convex/values").VString<string, "required">;
3334
+ amount: import("convex/values").VFloat64<number, "required">;
3335
+ limit: import("convex/values").VFloat64<number, "required">;
3336
+ allocations: import("convex/values").VArray<{
3337
+ amount: number;
3338
+ claimId: import("convex/values").GenericId<"recoveryClaims">;
3339
+ claimKey: string;
3340
+ }[], import("convex/values").VObject<{
3341
+ amount: number;
3342
+ claimId: import("convex/values").GenericId<"recoveryClaims">;
3343
+ claimKey: string;
3344
+ }, {
3345
+ claimId: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
3346
+ claimKey: import("convex/values").VString<string, "required">;
3347
+ amount: import("convex/values").VFloat64<number, "required">;
3348
+ }, "required", "amount" | "claimId" | "claimKey">, "required">;
3349
+ status: import("convex/values").VUnion<"collected" | "empty" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">, import("convex/values").VLiteral<"empty", "required">], "required", never>;
3350
+ }, "required", "allocations" | "amount" | "groupKey" | "limit" | "operationKey" | "status">, {
3351
+ by_group_status: ["groupKey", "status", "_creationTime"];
3352
+ by_key: ["operationKey", "_creationTime"];
3353
+ }, {}, {}>;
3354
+ settlementAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
3355
+ adjustmentAmount?: number | undefined;
3356
+ creditSource?: {
3357
+ creditGrantId: string;
3358
+ customerAccount: string;
3359
+ livemode: boolean;
3360
+ purchaseId: string;
3361
+ stripeAccountId: string;
3362
+ stripePriceId: string;
3363
+ stripeProductId: string;
3364
+ } | undefined;
3365
+ currency: string;
3366
+ gross: number;
3367
+ paymentId?: string | undefined;
3368
+ paymentIntentId?: string | undefined;
3369
+ platformNet: number;
3370
+ processingFee: number;
3371
+ sourceChargeId: string;
3372
+ sourceInvoiceId?: string | undefined;
3373
+ transfers: {
3374
+ amount: number;
3375
+ destinationAccountId: string;
3376
+ role: "affiliate" | "other" | "store";
3377
+ }[];
3378
+ usageSource?: {
3379
+ customerAccount: string;
3380
+ invoicePaymentId: string;
3381
+ livemode: boolean;
3382
+ meterId: string;
3383
+ model: "included_overage" | "pay_as_you_go";
3384
+ period: {
3385
+ end: number;
3386
+ start: number;
3387
+ };
3388
+ stripeAccountId: string;
3389
+ stripePriceId: string;
3390
+ stripeProductId: string;
3391
+ subscriptionId: string;
3392
+ subscriptionItemId: string;
3393
+ } | undefined;
3394
+ }, {
3395
+ sourceChargeId: import("convex/values").VString<string, "required">;
3396
+ paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
3397
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
3398
+ usageSource: import("convex/values").VObject<{
3399
+ customerAccount: string;
3400
+ invoicePaymentId: string;
3401
+ livemode: boolean;
3402
+ meterId: string;
3403
+ model: "included_overage" | "pay_as_you_go";
3404
+ period: {
3405
+ end: number;
3406
+ start: number;
3407
+ };
3408
+ stripeAccountId: string;
3409
+ stripePriceId: string;
3410
+ stripeProductId: string;
3411
+ subscriptionId: string;
3412
+ subscriptionItemId: string;
3413
+ } | undefined, {
3414
+ stripeAccountId: import("convex/values").VString<string, "required">;
3415
+ customerAccount: import("convex/values").VString<string, "required">;
3416
+ livemode: import("convex/values").VBoolean<boolean, "required">;
3417
+ meterId: import("convex/values").VString<string, "required">;
3418
+ stripePriceId: import("convex/values").VString<string, "required">;
3419
+ stripeProductId: import("convex/values").VString<string, "required">;
3420
+ subscriptionId: import("convex/values").VString<string, "required">;
3421
+ subscriptionItemId: import("convex/values").VString<string, "required">;
3422
+ invoicePaymentId: import("convex/values").VString<string, "required">;
3423
+ period: import("convex/values").VObject<{
3424
+ end: number;
3425
+ start: number;
3426
+ }, {
3427
+ start: import("convex/values").VFloat64<number, "required">;
3428
+ end: import("convex/values").VFloat64<number, "required">;
3429
+ }, "required", "end" | "start">;
3430
+ model: import("convex/values").VUnion<"included_overage" | "pay_as_you_go", [import("convex/values").VLiteral<"pay_as_you_go", "required">, import("convex/values").VLiteral<"included_overage", "required">], "required", never>;
3431
+ }, "optional", "customerAccount" | "invoicePaymentId" | "livemode" | "meterId" | "model" | "period" | "period.end" | "period.start" | "stripeAccountId" | "stripePriceId" | "stripeProductId" | "subscriptionId" | "subscriptionItemId">;
3432
+ creditSource: import("convex/values").VObject<{
3433
+ creditGrantId: string;
3434
+ customerAccount: string;
3435
+ livemode: boolean;
3436
+ purchaseId: string;
3437
+ stripeAccountId: string;
3438
+ stripePriceId: string;
3439
+ stripeProductId: string;
3440
+ } | undefined, {
3441
+ stripeAccountId: import("convex/values").VString<string, "required">;
3442
+ customerAccount: import("convex/values").VString<string, "required">;
3443
+ livemode: import("convex/values").VBoolean<boolean, "required">;
3444
+ purchaseId: import("convex/values").VString<string, "required">;
3445
+ creditGrantId: import("convex/values").VString<string, "required">;
3446
+ stripePriceId: import("convex/values").VString<string, "required">;
3447
+ stripeProductId: import("convex/values").VString<string, "required">;
3448
+ }, "optional", "creditGrantId" | "customerAccount" | "livemode" | "purchaseId" | "stripeAccountId" | "stripePriceId" | "stripeProductId">;
3449
+ gross: import("convex/values").VFloat64<number, "required">;
3450
+ currency: import("convex/values").VString<string, "required">;
3451
+ processingFee: import("convex/values").VFloat64<number, "required">;
3452
+ platformNet: import("convex/values").VFloat64<number, "required">;
3453
+ adjustmentAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3454
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
3455
+ transfers: import("convex/values").VArray<{
3456
+ amount: number;
3457
+ destinationAccountId: string;
3458
+ role: "affiliate" | "other" | "store";
3459
+ }[], import("convex/values").VObject<{
3460
+ amount: number;
3461
+ destinationAccountId: string;
3462
+ role: "affiliate" | "other" | "store";
3463
+ }, {
3464
+ destinationAccountId: import("convex/values").VString<string, "required">;
3465
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3466
+ amount: import("convex/values").VFloat64<number, "required">;
3467
+ }, "required", "amount" | "destinationAccountId" | "role">, "required">;
3468
+ }, "required", "adjustmentAmount" | "creditSource" | "creditSource.creditGrantId" | "creditSource.customerAccount" | "creditSource.livemode" | "creditSource.purchaseId" | "creditSource.stripeAccountId" | "creditSource.stripePriceId" | "creditSource.stripeProductId" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers" | "usageSource" | "usageSource.customerAccount" | "usageSource.invoicePaymentId" | "usageSource.livemode" | "usageSource.meterId" | "usageSource.model" | "usageSource.period" | "usageSource.period.end" | "usageSource.period.start" | "usageSource.stripeAccountId" | "usageSource.stripePriceId" | "usageSource.stripeProductId" | "usageSource.subscriptionId" | "usageSource.subscriptionItemId">, {
3469
+ by_source_charge: ["sourceChargeId", "_creationTime"];
3470
+ }, {}, {}>;
3471
+ commissionTerms: import("convex/server").TableDefinition<import("convex/values").VObject<{
3472
+ affiliateAccountId?: string | undefined;
3473
+ firstPaidInvoiceId: string;
3474
+ subscriptionId: string;
3475
+ term: "forever" | "one_time";
3476
+ }, {
3477
+ subscriptionId: import("convex/values").VString<string, "required">;
3478
+ term: import("convex/values").VUnion<"forever" | "one_time", [import("convex/values").VLiteral<"forever", "required">, import("convex/values").VLiteral<"one_time", "required">], "required", never>;
3479
+ affiliateAccountId: import("convex/values").VString<string | undefined, "optional">;
3480
+ firstPaidInvoiceId: import("convex/values").VString<string, "required">;
3481
+ }, "required", "affiliateAccountId" | "firstPaidInvoiceId" | "subscriptionId" | "term">, {
3482
+ by_subscription: ["subscriptionId", "_creationTime"];
3483
+ }, {}, {}>;
3484
+ commissionDecisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
3485
+ claimKey: string;
3486
+ eligible: boolean;
3487
+ invoiceId: string;
3488
+ subscriptionId: string;
3489
+ }, {
3490
+ subscriptionId: import("convex/values").VString<string, "required">;
3491
+ invoiceId: import("convex/values").VString<string, "required">;
3492
+ eligible: import("convex/values").VBoolean<boolean, "required">;
3493
+ claimKey: import("convex/values").VString<string, "required">;
3494
+ }, "required", "claimKey" | "eligible" | "invoiceId" | "subscriptionId">, {
3495
+ by_subscription_invoice: ["subscriptionId", "invoiceId", "_creationTime"];
3496
+ }, {}, {}>;
3497
+ accounts: import("convex/server").TableDefinition<import("convex/values").VObject<{
3498
+ appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
3499
+ capabilities?: any;
3500
+ configuration?: any;
3501
+ country?: string | undefined;
3502
+ email?: string | undefined;
3503
+ metadata?: any;
3504
+ missingRequirements?: string[] | undefined;
3505
+ name?: string | undefined;
3506
+ onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
3507
+ orgId?: string | undefined;
3508
+ requirements?: any;
3509
+ statementDescriptor?: string | undefined;
3510
+ stripeAccountId: string;
3511
+ userId: string;
3512
+ }, {
3513
+ stripeAccountId: import("convex/values").VString<string, "required">;
3514
+ userId: import("convex/values").VString<string, "required">;
3515
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3516
+ email: import("convex/values").VString<string | undefined, "optional">;
3517
+ name: import("convex/values").VString<string | undefined, "optional">;
3518
+ country: import("convex/values").VString<string | undefined, "optional">;
3519
+ capabilities: import("convex/values").VAny<any, "optional", string>;
3520
+ requirements: import("convex/values").VAny<any, "optional", string>;
3521
+ configuration: import("convex/values").VAny<any, "optional", string>;
3522
+ appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
3523
+ onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
3524
+ missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3525
+ metadata: import("convex/values").VAny<any, "optional", string>;
3526
+ statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
3527
+ }, "required", "appliedConfigurations" | "capabilities" | "configuration" | "country" | "email" | "metadata" | "missingRequirements" | "name" | "onboardingStatus" | "orgId" | "requirements" | "statementDescriptor" | "stripeAccountId" | "userId" | `capabilities.${string}` | `configuration.${string}` | `metadata.${string}` | `requirements.${string}`>, {
3528
+ by_onboarding_status: ["onboardingStatus", "_creationTime"];
3529
+ by_org_id: ["orgId", "_creationTime"];
3530
+ by_stripe_account_id: ["stripeAccountId", "_creationTime"];
3531
+ by_user_id: ["userId", "_creationTime"];
3532
+ }, {}, {}>;
3533
+ accountClosures: import("convex/server").TableDefinition<import("convex/values").VObject<{
3534
+ appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
3535
+ closedAt?: number | undefined;
3536
+ orgId?: string | undefined;
3537
+ state: "closed" | "pending";
3538
+ stripeAccountId: string;
3539
+ userId?: string | undefined;
3540
+ }, {
3541
+ stripeAccountId: import("convex/values").VString<string, "required">;
3542
+ userId: import("convex/values").VString<string | undefined, "optional">;
3543
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3544
+ appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
3545
+ state: import("convex/values").VUnion<"closed" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"closed", "required">], "required", never>;
3546
+ closedAt: import("convex/values").VFloat64<number | undefined, "optional">;
3547
+ }, "required", "appliedConfigurations" | "closedAt" | "orgId" | "state" | "stripeAccountId" | "userId">, {
3548
+ by_stripe_account_id: ["stripeAccountId", "_creationTime"];
3549
+ by_user_state: ["userId", "orgId", "state", "_creationTime"];
3550
+ }, {}, {}>;
3551
+ products: import("convex/server").TableDefinition<import("convex/values").VObject<{
3552
+ accountId?: string | undefined;
3553
+ active: boolean;
3554
+ description?: string | undefined;
3555
+ metadata?: any;
3556
+ name: string;
3557
+ stripeProductId: string;
3558
+ }, {
3559
+ stripeProductId: import("convex/values").VString<string, "required">;
3560
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3561
+ name: import("convex/values").VString<string, "required">;
3562
+ description: import("convex/values").VString<string | undefined, "optional">;
3563
+ active: import("convex/values").VBoolean<boolean, "required">;
3564
+ metadata: import("convex/values").VAny<any, "optional", string>;
3565
+ }, "required", "accountId" | "active" | "description" | "metadata" | "name" | "stripeProductId" | `metadata.${string}`>, {
3566
+ by_account_active: ["accountId", "active", "_creationTime"];
3567
+ by_account_id: ["accountId", "_creationTime"];
3568
+ by_active: ["active", "_creationTime"];
3569
+ by_stripe_product_id: ["stripeProductId", "_creationTime"];
3570
+ }, {}, {}>;
3571
+ prices: import("convex/server").TableDefinition<import("convex/values").VObject<{
3572
+ active: boolean;
3573
+ currency: string;
3574
+ interval?: "day" | "month" | "week" | "year" | undefined;
3575
+ intervalCount?: number | undefined;
3576
+ metadata?: any;
3577
+ nickname?: string | undefined;
3578
+ productId: string;
3579
+ stripePriceId: string;
3580
+ stripeProductId: string;
3581
+ type: "one_time" | "recurring";
3582
+ unitAmount: number;
3583
+ }, {
3584
+ stripePriceId: import("convex/values").VString<string, "required">;
3585
+ productId: import("convex/values").VString<string, "required">;
3586
+ stripeProductId: import("convex/values").VString<string, "required">;
3587
+ nickname: import("convex/values").VString<string | undefined, "optional">;
3588
+ unitAmount: import("convex/values").VFloat64<number, "required">;
3589
+ currency: import("convex/values").VString<string, "required">;
3590
+ active: import("convex/values").VBoolean<boolean, "required">;
3591
+ type: import("convex/values").VUnion<"one_time" | "recurring", [import("convex/values").VLiteral<"one_time", "required">, import("convex/values").VLiteral<"recurring", "required">], "required", never>;
3592
+ interval: import("convex/values").VUnion<"day" | "month" | "week" | "year" | undefined, [import("convex/values").VLiteral<"day", "required">, import("convex/values").VLiteral<"week", "required">, import("convex/values").VLiteral<"month", "required">, import("convex/values").VLiteral<"year", "required">], "optional", never>;
3593
+ intervalCount: import("convex/values").VFloat64<number | undefined, "optional">;
3594
+ metadata: import("convex/values").VAny<any, "optional", string>;
3595
+ }, "required", "active" | "currency" | "interval" | "intervalCount" | "metadata" | "nickname" | "productId" | "stripePriceId" | "stripeProductId" | "type" | "unitAmount" | `metadata.${string}`>, {
3596
+ by_active: ["active", "_creationTime"];
3597
+ by_product_active: ["productId", "active", "_creationTime"];
3598
+ by_product_id: ["productId", "_creationTime"];
3599
+ by_stripe_price_id: ["stripePriceId", "_creationTime"];
3600
+ by_stripe_product_id: ["stripeProductId", "_creationTime"];
3601
+ }, {}, {}>;
3602
+ subscriptions: import("convex/server").TableDefinition<import("convex/values").VObject<{
3603
+ accountId?: string | undefined;
3604
+ applicationFeeAmount?: number | undefined;
3605
+ applicationFeePercent?: number | undefined;
3606
+ cancelAtPeriodEnd: boolean;
3607
+ canceledAt?: string | undefined;
3608
+ chargeType?: "destination" | "separate" | undefined;
3609
+ currency?: string | undefined;
3610
+ currentPeriodEnd?: string | undefined;
3611
+ currentPeriodStart?: string | undefined;
3612
+ destinationAccountId?: string | undefined;
3613
+ feeCollectedAmount?: number | undefined;
3614
+ feeRefundedAmount?: number | undefined;
3615
+ isCollectionPaused?: boolean | undefined;
3616
+ isTrialing: boolean;
3617
+ metadata?: any;
3618
+ orgId?: string | undefined;
3619
+ priceId?: string | undefined;
3620
+ quantity?: number | undefined;
3621
+ splitRecipients?: {
3622
+ amount?: number | undefined;
3623
+ destinationAccountId: string;
3624
+ percent?: number | undefined;
3625
+ role: "affiliate" | "other" | "store";
3626
+ }[] | undefined;
3627
+ status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
3628
+ stripeSubscriptionId: string;
3629
+ trialEnd?: string | undefined;
3630
+ trialStart?: string | undefined;
3631
+ userId: string;
3632
+ }, {
3633
+ destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
3634
+ applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3635
+ applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
3636
+ feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3637
+ feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3638
+ chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
3639
+ splitRecipients: import("convex/values").VArray<{
3640
+ amount?: number | undefined;
3641
+ destinationAccountId: string;
3642
+ percent?: number | undefined;
3643
+ role: "affiliate" | "other" | "store";
3644
+ }[] | undefined, import("convex/values").VObject<{
3645
+ amount?: number | undefined;
3646
+ destinationAccountId: string;
3647
+ percent?: number | undefined;
3648
+ role: "affiliate" | "other" | "store";
3649
+ }, {
3650
+ destinationAccountId: import("convex/values").VString<string, "required">;
3651
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3652
+ amount: import("convex/values").VFloat64<number | undefined, "optional">;
3653
+ percent: import("convex/values").VFloat64<number | undefined, "optional">;
3654
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
3655
+ stripeSubscriptionId: import("convex/values").VString<string, "required">;
3656
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3657
+ userId: import("convex/values").VString<string, "required">;
3658
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3659
+ status: import("convex/values").VUnion<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"trialing", "required">, import("convex/values").VLiteral<"past_due", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"incomplete", "required">, import("convex/values").VLiteral<"incomplete_expired", "required">, import("convex/values").VLiteral<"unpaid", "required">, import("convex/values").VLiteral<"paused", "required">], "required", never>;
3660
+ priceId: import("convex/values").VString<string | undefined, "optional">;
3661
+ quantity: import("convex/values").VFloat64<number | undefined, "optional">;
3662
+ currentPeriodStart: import("convex/values").VString<string | undefined, "optional">;
3663
+ currentPeriodEnd: import("convex/values").VString<string | undefined, "optional">;
3664
+ cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
3665
+ isCollectionPaused: import("convex/values").VBoolean<boolean | undefined, "optional">;
3666
+ canceledAt: import("convex/values").VString<string | undefined, "optional">;
3667
+ isTrialing: import("convex/values").VBoolean<boolean, "required">;
3668
+ trialStart: import("convex/values").VString<string | undefined, "optional">;
3669
+ trialEnd: import("convex/values").VString<string | undefined, "optional">;
3670
+ currency: import("convex/values").VString<string | undefined, "optional">;
3671
+ metadata: import("convex/values").VAny<any, "optional", string>;
3672
+ }, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "cancelAtPeriodEnd" | "canceledAt" | "chargeType" | "currency" | "currentPeriodEnd" | "currentPeriodStart" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "isCollectionPaused" | "isTrialing" | "metadata" | "orgId" | "priceId" | "quantity" | "splitRecipients" | "status" | "stripeSubscriptionId" | "trialEnd" | "trialStart" | "userId" | `metadata.${string}`>, {
3673
+ by_account_id: ["accountId", "_creationTime"];
3674
+ by_account_status: ["accountId", "status", "_creationTime"];
3675
+ by_org_id: ["orgId", "_creationTime"];
3676
+ by_price_id: ["priceId", "_creationTime"];
3677
+ by_status: ["status", "_creationTime"];
3678
+ by_stripe_subscription_id: ["stripeSubscriptionId", "_creationTime"];
3679
+ by_userId_and_accountId: ["userId", "accountId", "_creationTime"];
3680
+ by_userId_and_accountId_and_status: ["userId", "accountId", "status", "_creationTime"];
3681
+ by_userId_and_status: ["userId", "status", "_creationTime"];
3682
+ by_user_id: ["userId", "_creationTime"];
3683
+ }, {}, {}>;
3684
+ checkoutSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
3685
+ accountId?: string | undefined;
3686
+ applicationFeeAmount?: number | undefined;
3687
+ applicationFeePercent?: number | undefined;
3688
+ chargeType?: "destination" | "separate" | undefined;
3689
+ clientSecret?: string | undefined;
3690
+ currency?: string | undefined;
3691
+ destinationAccountId?: string | undefined;
3692
+ feeCollectedAmount?: number | undefined;
3693
+ feeRefundedAmount?: number | undefined;
3694
+ metadata?: any;
3695
+ mode: "payment" | "setup" | "subscription";
3696
+ orgId?: string | undefined;
3697
+ priceId?: string | undefined;
3698
+ splitRecipients?: {
3699
+ amount?: number | undefined;
3700
+ destinationAccountId: string;
3701
+ percent?: number | undefined;
3702
+ role: "affiliate" | "other" | "store";
3703
+ }[] | undefined;
3704
+ status: "complete" | "expired" | "open";
3705
+ stripeSessionId: string;
3706
+ url?: string | undefined;
3707
+ userId: string;
3708
+ }, {
3709
+ destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
3710
+ applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3711
+ applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
3712
+ feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3713
+ feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3714
+ chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
3715
+ splitRecipients: import("convex/values").VArray<{
3716
+ amount?: number | undefined;
3717
+ destinationAccountId: string;
3718
+ percent?: number | undefined;
3719
+ role: "affiliate" | "other" | "store";
3720
+ }[] | undefined, import("convex/values").VObject<{
3721
+ amount?: number | undefined;
3722
+ destinationAccountId: string;
3723
+ percent?: number | undefined;
3724
+ role: "affiliate" | "other" | "store";
3725
+ }, {
3726
+ destinationAccountId: import("convex/values").VString<string, "required">;
3727
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3728
+ amount: import("convex/values").VFloat64<number | undefined, "optional">;
3729
+ percent: import("convex/values").VFloat64<number | undefined, "optional">;
3730
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
3731
+ stripeSessionId: import("convex/values").VString<string, "required">;
3732
+ userId: import("convex/values").VString<string, "required">;
3733
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3734
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3735
+ mode: import("convex/values").VUnion<"payment" | "setup" | "subscription", [import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"setup", "required">], "required", never>;
3736
+ status: import("convex/values").VUnion<"complete" | "expired" | "open", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
3737
+ clientSecret: import("convex/values").VString<string | undefined, "optional">;
3738
+ url: import("convex/values").VString<string | undefined, "optional">;
3739
+ priceId: import("convex/values").VString<string | undefined, "optional">;
3740
+ currency: import("convex/values").VString<string | undefined, "optional">;
3741
+ metadata: import("convex/values").VAny<any, "optional", string>;
3742
+ }, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "clientSecret" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "mode" | "orgId" | "priceId" | "splitRecipients" | "status" | "stripeSessionId" | "url" | "userId" | `metadata.${string}`>, {
3743
+ by_account_id: ["accountId", "_creationTime"];
3744
+ by_stripe_session_id: ["stripeSessionId", "_creationTime"];
3745
+ by_userId_and_accountId: ["userId", "accountId", "_creationTime"];
3746
+ by_userId_and_accountId_and_status: ["userId", "accountId", "status", "_creationTime"];
3747
+ by_user_id: ["userId", "_creationTime"];
3748
+ by_user_status: ["userId", "status", "_creationTime"];
3749
+ }, {}, {}>;
3750
+ invoices: import("convex/server").TableDefinition<import("convex/values").VObject<{
3751
+ accountId?: string | undefined;
3752
+ amountDue: number;
3753
+ amountPaid: number;
3754
+ applicationFeeAmount?: number | undefined;
3755
+ applicationFeePercent?: number | undefined;
3756
+ attemptCount?: number | undefined;
3757
+ chargeType?: "destination" | "separate" | undefined;
3758
+ currency: string;
3759
+ destinationAccountId?: string | undefined;
3760
+ feeCollectedAmount?: number | undefined;
3761
+ feeRefundedAmount?: number | undefined;
3762
+ hostedInvoiceUrl?: string | undefined;
3763
+ invoicePdf?: string | undefined;
3764
+ metadata?: any;
3765
+ nextPaymentAttempt?: string | undefined;
3766
+ orgId?: string | undefined;
3767
+ periodEnd?: string | undefined;
3768
+ periodStart?: string | undefined;
3769
+ splitRecipients?: {
3770
+ amount?: number | undefined;
3771
+ destinationAccountId: string;
3772
+ percent?: number | undefined;
3773
+ role: "affiliate" | "other" | "store";
3774
+ }[] | undefined;
3775
+ status: "draft" | "open" | "paid" | "uncollectible" | "void";
3776
+ stripeInvoiceId: string;
3777
+ subscriptionId?: string | undefined;
3778
+ userId: string;
3779
+ }, {
3780
+ destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
3781
+ applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3782
+ applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
3783
+ feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3784
+ feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3785
+ chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
3786
+ splitRecipients: import("convex/values").VArray<{
3787
+ amount?: number | undefined;
3788
+ destinationAccountId: string;
3789
+ percent?: number | undefined;
3790
+ role: "affiliate" | "other" | "store";
3791
+ }[] | undefined, import("convex/values").VObject<{
3792
+ amount?: number | undefined;
3793
+ destinationAccountId: string;
3794
+ percent?: number | undefined;
3795
+ role: "affiliate" | "other" | "store";
3796
+ }, {
3797
+ destinationAccountId: import("convex/values").VString<string, "required">;
3798
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3799
+ amount: import("convex/values").VFloat64<number | undefined, "optional">;
3800
+ percent: import("convex/values").VFloat64<number | undefined, "optional">;
3801
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
3802
+ stripeInvoiceId: import("convex/values").VString<string, "required">;
3803
+ userId: import("convex/values").VString<string, "required">;
3804
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3805
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3806
+ subscriptionId: import("convex/values").VString<string | undefined, "optional">;
3807
+ status: import("convex/values").VUnion<"draft" | "open" | "paid" | "uncollectible" | "void", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"uncollectible", "required">, import("convex/values").VLiteral<"void", "required">], "required", never>;
3808
+ currency: import("convex/values").VString<string, "required">;
3809
+ amountDue: import("convex/values").VFloat64<number, "required">;
3810
+ amountPaid: import("convex/values").VFloat64<number, "required">;
3811
+ hostedInvoiceUrl: import("convex/values").VString<string | undefined, "optional">;
3812
+ invoicePdf: import("convex/values").VString<string | undefined, "optional">;
3813
+ periodStart: import("convex/values").VString<string | undefined, "optional">;
3814
+ periodEnd: import("convex/values").VString<string | undefined, "optional">;
3815
+ nextPaymentAttempt: import("convex/values").VString<string | undefined, "optional">;
3816
+ attemptCount: import("convex/values").VFloat64<number | undefined, "optional">;
3817
+ metadata: import("convex/values").VAny<any, "optional", string>;
3818
+ }, "required", "accountId" | "amountDue" | "amountPaid" | "applicationFeeAmount" | "applicationFeePercent" | "attemptCount" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "hostedInvoiceUrl" | "invoicePdf" | "metadata" | "nextPaymentAttempt" | "orgId" | "periodEnd" | "periodStart" | "splitRecipients" | "status" | "stripeInvoiceId" | "subscriptionId" | "userId" | `metadata.${string}`>, {
3819
+ by_account_id: ["accountId", "_creationTime"];
3820
+ by_account_status: ["accountId", "status", "_creationTime"];
3821
+ by_status: ["status", "_creationTime"];
3822
+ by_stripe_invoice_id: ["stripeInvoiceId", "_creationTime"];
3823
+ by_subscription_id: ["subscriptionId", "_creationTime"];
3824
+ by_subscription_status: ["subscriptionId", "status", "_creationTime"];
3825
+ by_user_id: ["userId", "_creationTime"];
3826
+ by_user_status: ["userId", "status", "_creationTime"];
3827
+ }, {}, {}>;
3828
+ payments: import("convex/server").TableDefinition<import("convex/values").VObject<{
3829
+ accountId?: string | undefined;
3830
+ amount: number;
3831
+ applicationFeeAmount?: number | undefined;
3832
+ applicationFeePercent?: number | undefined;
3833
+ chargeType?: "destination" | "separate" | undefined;
3834
+ currency: string;
3835
+ destinationAccountId?: string | undefined;
3836
+ feeCollectedAmount?: number | undefined;
3837
+ feeRefundedAmount?: number | undefined;
3838
+ metadata?: any;
3839
+ orgId?: string | undefined;
3840
+ refundStatus?: "fully_refunded" | "partially_refunded" | undefined;
3841
+ refundedAmount?: number | undefined;
3842
+ splitRecipients?: {
3843
+ amount?: number | undefined;
3844
+ destinationAccountId: string;
3845
+ percent?: number | undefined;
3846
+ role: "affiliate" | "other" | "store";
3847
+ }[] | undefined;
3848
+ status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
3849
+ stripePaymentIntentId: string;
3850
+ userId: string;
3851
+ }, {
3852
+ destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
3853
+ applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3854
+ applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
3855
+ feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3856
+ feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3857
+ chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
3858
+ splitRecipients: import("convex/values").VArray<{
3859
+ amount?: number | undefined;
3860
+ destinationAccountId: string;
3861
+ percent?: number | undefined;
3862
+ role: "affiliate" | "other" | "store";
3863
+ }[] | undefined, import("convex/values").VObject<{
3864
+ amount?: number | undefined;
3865
+ destinationAccountId: string;
3866
+ percent?: number | undefined;
3867
+ role: "affiliate" | "other" | "store";
3868
+ }, {
3869
+ destinationAccountId: import("convex/values").VString<string, "required">;
3870
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
3871
+ amount: import("convex/values").VFloat64<number | undefined, "optional">;
3872
+ percent: import("convex/values").VFloat64<number | undefined, "optional">;
3873
+ }, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
3874
+ stripePaymentIntentId: import("convex/values").VString<string, "required">;
3875
+ userId: import("convex/values").VString<string, "required">;
3876
+ orgId: import("convex/values").VString<string | undefined, "optional">;
3877
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3878
+ amount: import("convex/values").VFloat64<number, "required">;
3879
+ currency: import("convex/values").VString<string, "required">;
3880
+ status: import("convex/values").VUnion<"canceled" | "failed" | "processing" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"requires_action", "required">], "required", never>;
3881
+ refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
3882
+ refundStatus: import("convex/values").VUnion<"fully_refunded" | "partially_refunded" | undefined, [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "optional", never>;
3883
+ metadata: import("convex/values").VAny<any, "optional", string>;
3884
+ }, "required", "accountId" | "amount" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "orgId" | "refundStatus" | "refundedAmount" | "splitRecipients" | "status" | "stripePaymentIntentId" | "userId" | `metadata.${string}`>, {
3885
+ by_account_id: ["accountId", "_creationTime"];
3886
+ by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
3887
+ by_user_id: ["userId", "_creationTime"];
3888
+ }, {}, {}>;
3889
+ payouts: import("convex/server").TableDefinition<import("convex/values").VObject<{
3890
+ accountId: string;
3891
+ amount: number;
3892
+ arrivalDate?: string | undefined;
3893
+ currency: string;
3894
+ failureCode?: string | undefined;
3895
+ failureMessage?: string | undefined;
3896
+ metadata?: any;
3897
+ method?: string | undefined;
3898
+ status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
3899
+ stripePayoutId: string;
3900
+ totalsRecorded?: true | undefined;
3901
+ }, {
3902
+ stripePayoutId: import("convex/values").VString<string, "required">;
3903
+ accountId: import("convex/values").VString<string, "required">;
3904
+ amount: import("convex/values").VFloat64<number, "required">;
3905
+ currency: import("convex/values").VString<string, "required">;
3906
+ status: import("convex/values").VUnion<"canceled" | "failed" | "in_transit" | "paid" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"in_transit", "required">], "required", never>;
3907
+ arrivalDate: import("convex/values").VString<string | undefined, "optional">;
3908
+ method: import("convex/values").VString<string | undefined, "optional">;
3909
+ failureCode: import("convex/values").VString<string | undefined, "optional">;
3910
+ failureMessage: import("convex/values").VString<string | undefined, "optional">;
3911
+ metadata: import("convex/values").VAny<any, "optional", string>;
3912
+ totalsRecorded: import("convex/values").VLiteral<true | undefined, "optional">;
3913
+ }, "required", "accountId" | "amount" | "arrivalDate" | "currency" | "failureCode" | "failureMessage" | "metadata" | "method" | "status" | "stripePayoutId" | "totalsRecorded" | `metadata.${string}`>, {
3914
+ by_account_id: ["accountId", "_creationTime"];
3915
+ by_account_status: ["accountId", "status", "_creationTime"];
3916
+ by_account_totals_recorded: ["accountId", "totalsRecorded", "_creationTime"];
3917
+ by_status: ["status", "_creationTime"];
3918
+ by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
3919
+ }, {}, {}>;
3920
+ pendingFeeRefunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
3921
+ feeCollectedAmount: number;
3922
+ feeRefundedAmount: number;
3923
+ stripePaymentIntentId: string;
3924
+ }, {
3925
+ stripePaymentIntentId: import("convex/values").VString<string, "required">;
3926
+ feeCollectedAmount: import("convex/values").VFloat64<number, "required">;
3927
+ feeRefundedAmount: import("convex/values").VFloat64<number, "required">;
3928
+ }, "required", "feeCollectedAmount" | "feeRefundedAmount" | "stripePaymentIntentId">, {
3929
+ by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
3930
+ }, {}, {}>;
3931
+ refunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
3932
+ accountId?: string | undefined;
3933
+ amount: number;
3934
+ currency: string;
3935
+ failureReason?: string | undefined;
3936
+ metadata?: any;
3937
+ reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
3938
+ refundCommandConflict?: boolean | undefined;
3939
+ refundCommandKey?: string | undefined;
3940
+ refundCommandNormalizationVersion?: 1 | undefined;
3941
+ refundCommandObservedAt?: number | undefined;
3942
+ status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
3943
+ stripeChargeId?: string | undefined;
3944
+ stripePaymentIntentId?: string | undefined;
3945
+ stripeRefundId: string;
3946
+ }, {
3947
+ refundCommandNormalizationVersion: import("convex/values").VLiteral<1 | undefined, "optional">;
3948
+ refundCommandKey: import("convex/values").VString<string | undefined, "optional">;
3949
+ refundCommandConflict: import("convex/values").VBoolean<boolean | undefined, "optional">;
3950
+ refundCommandObservedAt: import("convex/values").VFloat64<number | undefined, "optional">;
3951
+ stripeRefundId: import("convex/values").VString<string, "required">;
3952
+ stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
3953
+ stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
3954
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3955
+ amount: import("convex/values").VFloat64<number, "required">;
3956
+ currency: import("convex/values").VString<string, "required">;
3957
+ status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
3958
+ reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
3959
+ failureReason: import("convex/values").VString<string | undefined, "optional">;
3960
+ metadata: import("convex/values").VAny<any, "optional", string>;
3961
+ }, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "refundCommandConflict" | "refundCommandKey" | "refundCommandNormalizationVersion" | "refundCommandObservedAt" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
3962
+ by_account_id: ["accountId", "_creationTime"];
3963
+ by_account_id_and_status: ["accountId", "status", "_creationTime"];
3964
+ by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
3965
+ by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
3966
+ by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
3967
+ by_refund_command_key: ["refundCommandKey", "_creationTime"];
3968
+ by_refund_command_normalization_version: ["refundCommandNormalizationVersion", "_creationTime"];
3969
+ by_status: ["status", "_creationTime"];
3970
+ by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
3971
+ by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
3972
+ }, {}, {}>;
3973
+ disputes: import("convex/server").TableDefinition<import("convex/values").VObject<{
3974
+ accountId?: string | undefined;
3975
+ amount: number;
3976
+ currency: string;
3977
+ evidence?: any;
3978
+ evidenceDueBy?: string | undefined;
3979
+ isChargeRefundable: boolean;
3980
+ lastEvent?: string | undefined;
3981
+ linkedTransferIds?: string[] | undefined;
3982
+ metadata?: any;
3983
+ reason: string;
3984
+ statementDescriptor?: string | undefined;
3985
+ status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
3986
+ stripeChargeId?: string | undefined;
3987
+ stripeDisputeId: string;
3988
+ stripePaymentIntentId?: string | undefined;
3989
+ }, {
3990
+ stripeDisputeId: import("convex/values").VString<string, "required">;
3991
+ stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
3992
+ stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
3993
+ accountId: import("convex/values").VString<string | undefined, "optional">;
3994
+ amount: import("convex/values").VFloat64<number, "required">;
3995
+ currency: import("convex/values").VString<string, "required">;
3996
+ status: import("convex/values").VUnion<"lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won", [import("convex/values").VLiteral<"warning_needs_response", "required">, import("convex/values").VLiteral<"warning_under_review", "required">, import("convex/values").VLiteral<"warning_closed", "required">, import("convex/values").VLiteral<"needs_response", "required">, import("convex/values").VLiteral<"under_review", "required">, import("convex/values").VLiteral<"won", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"prevented", "required">], "required", never>;
3997
+ reason: import("convex/values").VString<string, "required">;
3998
+ isChargeRefundable: import("convex/values").VBoolean<boolean, "required">;
3999
+ lastEvent: import("convex/values").VString<string | undefined, "optional">;
4000
+ evidenceDueBy: import("convex/values").VString<string | undefined, "optional">;
4001
+ evidence: import("convex/values").VAny<any, "optional", string>;
4002
+ statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
4003
+ linkedTransferIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
4004
+ metadata: import("convex/values").VAny<any, "optional", string>;
4005
+ }, "required", "accountId" | "amount" | "currency" | "evidence" | "evidenceDueBy" | "isChargeRefundable" | "lastEvent" | "linkedTransferIds" | "metadata" | "reason" | "statementDescriptor" | "status" | "stripeChargeId" | "stripeDisputeId" | "stripePaymentIntentId" | `evidence.${string}` | `metadata.${string}`>, {
4006
+ by_account_id: ["accountId", "_creationTime"];
4007
+ by_account_id_and_status: ["accountId", "status", "_creationTime"];
4008
+ by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
4009
+ by_status: ["status", "_creationTime"];
4010
+ by_stripe_dispute_id: ["stripeDisputeId", "_creationTime"];
4011
+ by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
4012
+ }, {}, {}>;
4013
+ transfers: import("convex/server").TableDefinition<import("convex/values").VObject<{
4014
+ amount: number;
4015
+ currency: string;
4016
+ destinationAccountId: string;
4017
+ metadata?: any;
4018
+ paymentId?: string | undefined;
4019
+ reinstatement?: boolean | undefined;
4020
+ reversalClaimedAmount?: number | undefined;
4021
+ reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
4022
+ reversedAmount?: number | undefined;
4023
+ role?: "affiliate" | "other" | "store" | undefined;
4024
+ sourceChargeId?: string | undefined;
4025
+ sourceInvoiceId?: string | undefined;
4026
+ status: "failed" | "paid" | "pending" | "reversed";
4027
+ stripeTransferId: string;
4028
+ totalsRecorded?: true | undefined;
4029
+ }, {
4030
+ stripeTransferId: import("convex/values").VString<string, "required">;
4031
+ sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
4032
+ sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
4033
+ destinationAccountId: import("convex/values").VString<string, "required">;
4034
+ amount: import("convex/values").VFloat64<number, "required">;
4035
+ currency: import("convex/values").VString<string, "required">;
4036
+ role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
4037
+ status: import("convex/values").VUnion<"failed" | "paid" | "pending" | "reversed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"reversed", "required">], "required", never>;
4038
+ reversedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
4039
+ reversalStatus: import("convex/values").VUnion<"fully_reversed" | "partially_reversed" | undefined, [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "optional", never>;
4040
+ paymentId: import("convex/values").VString<string | undefined, "optional">;
4041
+ reinstatement: import("convex/values").VBoolean<boolean | undefined, "optional">;
4042
+ metadata: import("convex/values").VAny<any, "optional", string>;
4043
+ totalsRecorded: import("convex/values").VLiteral<true | undefined, "optional">;
4044
+ reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
4045
+ }, "required", "amount" | "currency" | "destinationAccountId" | "metadata" | "paymentId" | "reinstatement" | "reversalClaimedAmount" | "reversalStatus" | "reversedAmount" | "role" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "totalsRecorded" | `metadata.${string}`>, {
4046
+ by_account_totals_recorded: ["destinationAccountId", "totalsRecorded", "_creationTime"];
4047
+ by_destination_account_id: ["destinationAccountId", "_creationTime"];
4048
+ by_source_charge_id: ["sourceChargeId", "_creationTime"];
4049
+ by_stripe_transfer_id: ["stripeTransferId", "_creationTime"];
4050
+ }, {}, {}>;
4051
+ transferReversalOps: import("convex/server").TableDefinition<import("convex/values").VObject<{
4052
+ commissionExposure?: {
4053
+ chargeAmount: number;
4054
+ disputeId?: string | undefined;
4055
+ disputeState?: "lost" | "open" | "won" | undefined;
4056
+ finalized: boolean;
4057
+ kind: "dispute" | "refund";
4058
+ principal: number;
4059
+ refundId?: string | undefined;
4060
+ refundedPrincipal?: number | undefined;
4061
+ } | undefined;
4062
+ operationId: string;
4063
+ slices: {
4064
+ from: number;
4065
+ stripeTransferId: string;
4066
+ to: number;
4067
+ }[];
4068
+ sourceChargeId: string;
4069
+ }, {
4070
+ operationId: import("convex/values").VString<string, "required">;
4071
+ sourceChargeId: import("convex/values").VString<string, "required">;
4072
+ slices: import("convex/values").VArray<{
4073
+ from: number;
4074
+ stripeTransferId: string;
4075
+ to: number;
4076
+ }[], import("convex/values").VObject<{
4077
+ from: number;
4078
+ stripeTransferId: string;
4079
+ to: number;
4080
+ }, {
4081
+ stripeTransferId: import("convex/values").VString<string, "required">;
4082
+ from: import("convex/values").VFloat64<number, "required">;
4083
+ to: import("convex/values").VFloat64<number, "required">;
4084
+ }, "required", "from" | "stripeTransferId" | "to">, "required">;
4085
+ commissionExposure: import("convex/values").VObject<{
4086
+ chargeAmount: number;
4087
+ disputeId?: string | undefined;
4088
+ disputeState?: "lost" | "open" | "won" | undefined;
4089
+ finalized: boolean;
4090
+ kind: "dispute" | "refund";
4091
+ principal: number;
4092
+ refundId?: string | undefined;
4093
+ refundedPrincipal?: number | undefined;
4094
+ } | undefined, {
4095
+ kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
4096
+ chargeAmount: import("convex/values").VFloat64<number, "required">;
4097
+ principal: import("convex/values").VFloat64<number, "required">;
4098
+ finalized: import("convex/values").VBoolean<boolean, "required">;
4099
+ disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
4100
+ disputeId: import("convex/values").VString<string | undefined, "optional">;
4101
+ refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
4102
+ refundId: import("convex/values").VString<string | undefined, "optional">;
4103
+ }, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
4104
+ }, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {
4105
+ by_operation_id: ["operationId", "_creationTime"];
4106
+ by_source_charge: ["sourceChargeId", "_creationTime"];
4107
+ }, {}, {}>;
4108
+ webhookEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
4109
+ eventType: string;
4110
+ lastError?: string | undefined;
4111
+ livemode?: boolean | undefined;
4112
+ processedAt: number;
4113
+ status: "failed" | "ignored" | "processed" | "processing";
4114
+ stripeEventId: string;
4115
+ }, {
4116
+ stripeEventId: import("convex/values").VString<string, "required">;
4117
+ eventType: import("convex/values").VString<string, "required">;
4118
+ livemode: import("convex/values").VBoolean<boolean | undefined, "optional">;
4119
+ processedAt: import("convex/values").VFloat64<number, "required">;
4120
+ status: import("convex/values").VUnion<"failed" | "ignored" | "processed" | "processing", [import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"processed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"ignored", "required">], "required", never>;
4121
+ lastError: import("convex/values").VString<string | undefined, "optional">;
4122
+ }, "required", "eventType" | "lastError" | "livemode" | "processedAt" | "status" | "stripeEventId">, {
4123
+ by_status: ["status", "_creationTime"];
4124
+ by_stripeEventId: ["stripeEventId", "_creationTime"];
4125
+ }, {}, {}>;
4126
+ }, boolean>>;
4127
+ meter: {
4128
+ scope: {
4129
+ stripeAccountId: string;
4130
+ customerAccount: string;
4131
+ meterId: string;
4132
+ livemode: boolean;
4133
+ };
4134
+ binding: {
4135
+ stripeCustomerId: string;
4136
+ stripePriceId: string;
4137
+ eventName: string;
4138
+ plan: {
4139
+ key: string;
4140
+ version: string;
4141
+ model: string;
4142
+ unit: {
4143
+ name: string;
4144
+ precision: number;
4145
+ };
4146
+ rate: {
4147
+ currency: string;
4148
+ unitAmountDecimal: string;
4149
+ };
4150
+ includedQuantity: string;
4151
+ reset: string;
4152
+ };
4153
+ };
4154
+ };
4155
+ event: {
4156
+ scope: {
4157
+ stripeAccountId: string;
4158
+ customerAccount: string;
4159
+ meterId: string;
4160
+ livemode: boolean;
4161
+ };
4162
+ binding: {
4163
+ stripeCustomerId: string;
4164
+ stripePriceId: string;
4165
+ eventName: string;
4166
+ plan: {
4167
+ key: string;
4168
+ version: string;
4169
+ model: string;
4170
+ unit: {
4171
+ name: string;
4172
+ precision: number;
4173
+ };
4174
+ rate: {
4175
+ currency: string;
4176
+ unitAmountDecimal: string;
4177
+ };
4178
+ includedQuantity: string;
4179
+ reset: string;
4180
+ };
4181
+ };
4182
+ sourceEventId: string;
4183
+ quantity: string;
4184
+ occurredAt: number;
4185
+ };
4186
+ subscription: {
4187
+ subscriptionId: string;
4188
+ subscriptionItemId: string;
4189
+ stripePriceId: string;
4190
+ period: {
4191
+ start: number;
4192
+ end: number;
4193
+ };
4194
+ interval: string;
4195
+ };
4196
+ bindingJson: string;
4197
+ args: {
4198
+ inputJson: string;
4199
+ subscriptionJson: string;
4200
+ };
4201
+ configure: (value?: {
4202
+ reset: string;
4203
+ rollover: string;
4204
+ entitled: boolean;
4205
+ overage: string;
4206
+ limit: {
4207
+ mode: string;
4208
+ quantity: string;
4209
+ };
4210
+ }, expectedRevision?: number) => Promise<any>;
4211
+ }>;
4212
+ //# sourceMappingURL=allowance.fixtures.d.ts.map