@fantastic.dev/better-stripe 0.17.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +58 -9
  3. package/dist/client/connect/payouts.d.ts +3 -2
  4. package/dist/client/connect/payouts.d.ts.map +1 -1
  5. package/dist/client/connect/payouts.js.map +1 -1
  6. package/dist/client/index.d.ts +4 -8
  7. package/dist/client/index.d.ts.map +1 -1
  8. package/dist/client/index.js +5 -0
  9. package/dist/client/index.js.map +1 -1
  10. package/dist/client/payoutPolicy.d.ts +81 -0
  11. package/dist/client/payoutPolicy.d.ts.map +1 -0
  12. package/dist/client/payoutPolicy.js +262 -0
  13. package/dist/client/payoutPolicy.js.map +1 -0
  14. package/dist/component/_generated/component.d.ts +273 -0
  15. package/dist/component/_generated/component.d.ts.map +1 -1
  16. package/dist/component/connect/queries.d.ts.map +1 -1
  17. package/dist/component/connect/queries.js +2 -1
  18. package/dist/component/connect/queries.js.map +1 -1
  19. package/dist/component/earnings/arithmetic.d.ts +3 -0
  20. package/dist/component/earnings/arithmetic.d.ts.map +1 -0
  21. package/dist/component/earnings/arithmetic.js +11 -0
  22. package/dist/component/earnings/arithmetic.js.map +1 -0
  23. package/dist/component/earnings/reads.d.ts.map +1 -1
  24. package/dist/component/earnings/reads.js +6 -0
  25. package/dist/component/earnings/reads.js.map +1 -1
  26. package/dist/component/earnings/triggers.d.ts +150 -0
  27. package/dist/component/earnings/triggers.d.ts.map +1 -1
  28. package/dist/component/earnings/triggers.js +17 -12
  29. package/dist/component/earnings/triggers.js.map +1 -1
  30. package/dist/component/payoutPolicy/helpers.d.ts +51 -0
  31. package/dist/component/payoutPolicy/helpers.d.ts.map +1 -0
  32. package/dist/component/payoutPolicy/helpers.js +68 -0
  33. package/dist/component/payoutPolicy/helpers.js.map +1 -0
  34. package/dist/component/payoutPolicy/mutations.d.ts +172 -0
  35. package/dist/component/payoutPolicy/mutations.d.ts.map +1 -0
  36. package/dist/component/payoutPolicy/mutations.js +191 -0
  37. package/dist/component/payoutPolicy/mutations.js.map +1 -0
  38. package/dist/component/payoutPolicy/queries.d.ts +97 -0
  39. package/dist/component/payoutPolicy/queries.d.ts.map +1 -0
  40. package/dist/component/payoutPolicy/queries.js +51 -0
  41. package/dist/component/payoutPolicy/queries.js.map +1 -0
  42. package/dist/component/payoutPolicy/schema.d.ts +396 -0
  43. package/dist/component/payoutPolicy/schema.d.ts.map +1 -0
  44. package/dist/component/payoutPolicy/schema.js +54 -0
  45. package/dist/component/payoutPolicy/schema.js.map +1 -0
  46. package/dist/component/schema.d.ts +131 -0
  47. package/dist/component/schema.js +3 -0
  48. package/dist/component/schema.js.map +1 -1
  49. package/docs/react-workflows.md +5 -3
  50. package/docs/read-contracts.md +13 -0
  51. package/docs/settlement.md +62 -0
  52. package/package.json +1 -1
  53. package/src/client/connect/payouts.ts +10 -8
  54. package/src/client/index.ts +7 -11
  55. package/src/client/payoutPolicy.test.ts +320 -0
  56. package/src/client/payoutPolicy.ts +409 -0
  57. package/src/component/_generated/api.ts +8 -0
  58. package/src/component/_generated/component.ts +280 -0
  59. package/src/component/connect/queries.ts +2 -1
  60. package/src/component/earnings/arithmetic.ts +10 -0
  61. package/src/component/earnings/reads.ts +6 -0
  62. package/src/component/earnings/triggers.ts +18 -13
  63. package/src/component/payout-policy.test.ts +248 -0
  64. package/src/component/payoutPolicy/helpers.ts +88 -0
  65. package/src/component/payoutPolicy/mutations.ts +225 -0
  66. package/src/component/payoutPolicy/queries.ts +56 -0
  67. package/src/component/payoutPolicy/schema.ts +67 -0
  68. package/src/component/schema.ts +3 -0
  69. package/src/component/summary-arithmetic.test.ts +246 -0
@@ -0,0 +1,396 @@
1
+ export declare const scopeFields: {
2
+ accountId: import("convex/values").VString<string, "required">;
3
+ ownerKey: import("convex/values").VString<string, "required">;
4
+ };
5
+ export declare const schedule: import("convex/values").VObject<{
6
+ interval: "daily" | "manual" | "monthly" | "weekly";
7
+ monthlyDays?: number[] | undefined;
8
+ weeklyDays?: string[] | undefined;
9
+ }, {
10
+ 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>;
11
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
12
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
13
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
14
+ export declare const mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
15
+ export declare const thresholds: import("convex/values").VArray<{
16
+ amount: number;
17
+ currency: string;
18
+ }[], import("convex/values").VObject<{
19
+ amount: number;
20
+ currency: string;
21
+ }, {
22
+ currency: import("convex/values").VString<string, "required">;
23
+ amount: import("convex/values").VFloat64<number, "required">;
24
+ }, "required", "amount" | "currency">, "required">;
25
+ export declare const prepareFields: {
26
+ accountId: import("convex/values").VString<string, "required">;
27
+ ownerKey: import("convex/values").VString<string, "required">;
28
+ operationKey: import("convex/values").VString<string, "required">;
29
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
30
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
31
+ thresholds: import("convex/values").VArray<{
32
+ amount: number;
33
+ currency: string;
34
+ }[], import("convex/values").VObject<{
35
+ amount: number;
36
+ currency: string;
37
+ }, {
38
+ currency: import("convex/values").VString<string, "required">;
39
+ amount: import("convex/values").VFloat64<number, "required">;
40
+ }, "required", "amount" | "currency">, "required">;
41
+ country: import("convex/values").VString<string, "required">;
42
+ observedSchedule: import("convex/values").VObject<{
43
+ interval: "daily" | "manual" | "monthly" | "weekly";
44
+ monthlyDays?: number[] | undefined;
45
+ weeklyDays?: string[] | undefined;
46
+ }, {
47
+ 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>;
48
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
49
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
50
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
51
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
52
+ };
53
+ export declare const policyFields: {
54
+ accountId: import("convex/values").VString<string, "required">;
55
+ ownerKey: import("convex/values").VString<string, "required">;
56
+ revision: import("convex/values").VFloat64<number, "required">;
57
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
58
+ thresholds: import("convex/values").VArray<{
59
+ amount: number;
60
+ currency: string;
61
+ }[], import("convex/values").VObject<{
62
+ amount: number;
63
+ currency: string;
64
+ }, {
65
+ currency: import("convex/values").VString<string, "required">;
66
+ amount: import("convex/values").VFloat64<number, "required">;
67
+ }, "required", "amount" | "currency">, "required">;
68
+ status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
69
+ operationKey: import("convex/values").VString<string, "required">;
70
+ country: import("convex/values").VString<string, "required">;
71
+ previousSchedule: import("convex/values").VObject<{
72
+ interval: "daily" | "manual" | "monthly" | "weekly";
73
+ monthlyDays?: number[] | undefined;
74
+ weeklyDays?: string[] | undefined;
75
+ } | undefined, {
76
+ 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>;
77
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
78
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
79
+ }, "optional", "interval" | "monthlyDays" | "weeklyDays">;
80
+ holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
81
+ };
82
+ export declare const operationFields: {
83
+ accountId: import("convex/values").VString<string, "required">;
84
+ ownerKey: import("convex/values").VString<string, "required">;
85
+ operationKey: import("convex/values").VString<string, "required">;
86
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
87
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
88
+ thresholds: import("convex/values").VArray<{
89
+ amount: number;
90
+ currency: string;
91
+ }[], import("convex/values").VObject<{
92
+ amount: number;
93
+ currency: string;
94
+ }, {
95
+ currency: import("convex/values").VString<string, "required">;
96
+ amount: import("convex/values").VFloat64<number, "required">;
97
+ }, "required", "amount" | "currency">, "required">;
98
+ country: import("convex/values").VString<string, "required">;
99
+ observedSchedule: import("convex/values").VObject<{
100
+ interval: "daily" | "manual" | "monthly" | "weekly";
101
+ monthlyDays?: number[] | undefined;
102
+ weeklyDays?: string[] | undefined;
103
+ }, {
104
+ 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>;
105
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
106
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
107
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
108
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
109
+ revision: import("convex/values").VFloat64<number, "required">;
110
+ previousSchedule: import("convex/values").VObject<{
111
+ interval: "daily" | "manual" | "monthly" | "weekly";
112
+ monthlyDays?: number[] | undefined;
113
+ weeklyDays?: string[] | undefined;
114
+ }, {
115
+ 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>;
116
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
117
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
118
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
119
+ targetSchedule: import("convex/values").VObject<{
120
+ interval: "daily" | "manual" | "monthly" | "weekly";
121
+ monthlyDays?: number[] | undefined;
122
+ weeklyDays?: string[] | undefined;
123
+ }, {
124
+ 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>;
125
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
126
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
127
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
128
+ 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>;
129
+ attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
130
+ };
131
+ export declare const policyDoc: import("convex/values").VObject<{
132
+ _creationTime: number;
133
+ _id: import("convex/values").GenericId<"payoutPolicies">;
134
+ accountId: string;
135
+ country: string;
136
+ holdDeadline?: number | undefined;
137
+ mode: "custom" | "stripe_managed";
138
+ operationKey: string;
139
+ ownerKey: string;
140
+ previousSchedule?: {
141
+ interval: "daily" | "manual" | "monthly" | "weekly";
142
+ monthlyDays?: number[] | undefined;
143
+ weeklyDays?: string[] | undefined;
144
+ } | undefined;
145
+ revision: number;
146
+ status: "changing" | "ready";
147
+ thresholds: {
148
+ amount: number;
149
+ currency: string;
150
+ }[];
151
+ }, {
152
+ accountId: import("convex/values").VString<string, "required">;
153
+ ownerKey: import("convex/values").VString<string, "required">;
154
+ revision: import("convex/values").VFloat64<number, "required">;
155
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
156
+ thresholds: import("convex/values").VArray<{
157
+ amount: number;
158
+ currency: string;
159
+ }[], import("convex/values").VObject<{
160
+ amount: number;
161
+ currency: string;
162
+ }, {
163
+ currency: import("convex/values").VString<string, "required">;
164
+ amount: import("convex/values").VFloat64<number, "required">;
165
+ }, "required", "amount" | "currency">, "required">;
166
+ status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
167
+ operationKey: import("convex/values").VString<string, "required">;
168
+ country: import("convex/values").VString<string, "required">;
169
+ previousSchedule: import("convex/values").VObject<{
170
+ interval: "daily" | "manual" | "monthly" | "weekly";
171
+ monthlyDays?: number[] | undefined;
172
+ weeklyDays?: string[] | undefined;
173
+ } | undefined, {
174
+ 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>;
175
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
176
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
177
+ }, "optional", "interval" | "monthlyDays" | "weeklyDays">;
178
+ holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
179
+ _id: import("convex/values").VId<import("convex/values").GenericId<"payoutPolicies">, "required">;
180
+ _creationTime: import("convex/values").VFloat64<number, "required">;
181
+ }, "required", "_creationTime" | "_id" | "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">;
182
+ export declare const operationDoc: import("convex/values").VObject<{
183
+ _creationTime: number;
184
+ _id: import("convex/values").GenericId<"payoutPolicyOperations">;
185
+ accountId: string;
186
+ attempted?: boolean | undefined;
187
+ country: string;
188
+ expectedRevision: number;
189
+ mode: "custom" | "stripe_managed";
190
+ observedAt?: number | undefined;
191
+ observedSchedule: {
192
+ interval: "daily" | "manual" | "monthly" | "weekly";
193
+ monthlyDays?: number[] | undefined;
194
+ weeklyDays?: string[] | undefined;
195
+ };
196
+ operationKey: string;
197
+ ownerKey: string;
198
+ previousSchedule: {
199
+ interval: "daily" | "manual" | "monthly" | "weekly";
200
+ monthlyDays?: number[] | undefined;
201
+ weeklyDays?: string[] | undefined;
202
+ };
203
+ revision: number;
204
+ status: "canceled" | "complete" | "pending";
205
+ targetSchedule: {
206
+ interval: "daily" | "manual" | "monthly" | "weekly";
207
+ monthlyDays?: number[] | undefined;
208
+ weeklyDays?: string[] | undefined;
209
+ };
210
+ thresholds: {
211
+ amount: number;
212
+ currency: string;
213
+ }[];
214
+ }, {
215
+ accountId: import("convex/values").VString<string, "required">;
216
+ ownerKey: import("convex/values").VString<string, "required">;
217
+ operationKey: import("convex/values").VString<string, "required">;
218
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
219
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
220
+ thresholds: import("convex/values").VArray<{
221
+ amount: number;
222
+ currency: string;
223
+ }[], import("convex/values").VObject<{
224
+ amount: number;
225
+ currency: string;
226
+ }, {
227
+ currency: import("convex/values").VString<string, "required">;
228
+ amount: import("convex/values").VFloat64<number, "required">;
229
+ }, "required", "amount" | "currency">, "required">;
230
+ country: import("convex/values").VString<string, "required">;
231
+ observedSchedule: import("convex/values").VObject<{
232
+ interval: "daily" | "manual" | "monthly" | "weekly";
233
+ monthlyDays?: number[] | undefined;
234
+ weeklyDays?: string[] | undefined;
235
+ }, {
236
+ 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>;
237
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
238
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
239
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
240
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
241
+ revision: import("convex/values").VFloat64<number, "required">;
242
+ previousSchedule: import("convex/values").VObject<{
243
+ interval: "daily" | "manual" | "monthly" | "weekly";
244
+ monthlyDays?: number[] | undefined;
245
+ weeklyDays?: string[] | undefined;
246
+ }, {
247
+ 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>;
248
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
249
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
250
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
251
+ targetSchedule: import("convex/values").VObject<{
252
+ interval: "daily" | "manual" | "monthly" | "weekly";
253
+ monthlyDays?: number[] | undefined;
254
+ weeklyDays?: string[] | undefined;
255
+ }, {
256
+ 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>;
257
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
258
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
259
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
260
+ 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>;
261
+ attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
262
+ _id: import("convex/values").VId<import("convex/values").GenericId<"payoutPolicyOperations">, "required">;
263
+ _creationTime: import("convex/values").VFloat64<number, "required">;
264
+ }, "required", "_creationTime" | "_id" | "accountId" | "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">;
265
+ export declare const policiesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
266
+ accountId: string;
267
+ country: string;
268
+ holdDeadline?: number | undefined;
269
+ mode: "custom" | "stripe_managed";
270
+ operationKey: string;
271
+ ownerKey: string;
272
+ previousSchedule?: {
273
+ interval: "daily" | "manual" | "monthly" | "weekly";
274
+ monthlyDays?: number[] | undefined;
275
+ weeklyDays?: string[] | undefined;
276
+ } | undefined;
277
+ revision: number;
278
+ status: "changing" | "ready";
279
+ thresholds: {
280
+ amount: number;
281
+ currency: string;
282
+ }[];
283
+ }, {
284
+ accountId: import("convex/values").VString<string, "required">;
285
+ ownerKey: import("convex/values").VString<string, "required">;
286
+ revision: import("convex/values").VFloat64<number, "required">;
287
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
288
+ thresholds: import("convex/values").VArray<{
289
+ amount: number;
290
+ currency: string;
291
+ }[], import("convex/values").VObject<{
292
+ amount: number;
293
+ currency: string;
294
+ }, {
295
+ currency: import("convex/values").VString<string, "required">;
296
+ amount: import("convex/values").VFloat64<number, "required">;
297
+ }, "required", "amount" | "currency">, "required">;
298
+ status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
299
+ operationKey: import("convex/values").VString<string, "required">;
300
+ country: import("convex/values").VString<string, "required">;
301
+ previousSchedule: import("convex/values").VObject<{
302
+ interval: "daily" | "manual" | "monthly" | "weekly";
303
+ monthlyDays?: number[] | undefined;
304
+ weeklyDays?: string[] | undefined;
305
+ } | undefined, {
306
+ 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>;
307
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
308
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
309
+ }, "optional", "interval" | "monthlyDays" | "weeklyDays">;
310
+ holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
311
+ }, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
312
+ by_account: ["accountId", "_creationTime"];
313
+ by_deadline: ["holdDeadline", "_creationTime"];
314
+ }, {}, {}>;
315
+ export declare const operationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
316
+ accountId: string;
317
+ attempted?: boolean | undefined;
318
+ country: string;
319
+ expectedRevision: number;
320
+ mode: "custom" | "stripe_managed";
321
+ observedAt?: number | undefined;
322
+ observedSchedule: {
323
+ interval: "daily" | "manual" | "monthly" | "weekly";
324
+ monthlyDays?: number[] | undefined;
325
+ weeklyDays?: string[] | undefined;
326
+ };
327
+ operationKey: string;
328
+ ownerKey: string;
329
+ previousSchedule: {
330
+ interval: "daily" | "manual" | "monthly" | "weekly";
331
+ monthlyDays?: number[] | undefined;
332
+ weeklyDays?: string[] | undefined;
333
+ };
334
+ revision: number;
335
+ status: "canceled" | "complete" | "pending";
336
+ targetSchedule: {
337
+ interval: "daily" | "manual" | "monthly" | "weekly";
338
+ monthlyDays?: number[] | undefined;
339
+ weeklyDays?: string[] | undefined;
340
+ };
341
+ thresholds: {
342
+ amount: number;
343
+ currency: string;
344
+ }[];
345
+ }, {
346
+ accountId: import("convex/values").VString<string, "required">;
347
+ ownerKey: import("convex/values").VString<string, "required">;
348
+ operationKey: import("convex/values").VString<string, "required">;
349
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
350
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
351
+ thresholds: import("convex/values").VArray<{
352
+ amount: number;
353
+ currency: string;
354
+ }[], import("convex/values").VObject<{
355
+ amount: number;
356
+ currency: string;
357
+ }, {
358
+ currency: import("convex/values").VString<string, "required">;
359
+ amount: import("convex/values").VFloat64<number, "required">;
360
+ }, "required", "amount" | "currency">, "required">;
361
+ country: import("convex/values").VString<string, "required">;
362
+ observedSchedule: import("convex/values").VObject<{
363
+ interval: "daily" | "manual" | "monthly" | "weekly";
364
+ monthlyDays?: number[] | undefined;
365
+ weeklyDays?: string[] | undefined;
366
+ }, {
367
+ 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>;
368
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
369
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
370
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
371
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
372
+ revision: import("convex/values").VFloat64<number, "required">;
373
+ previousSchedule: import("convex/values").VObject<{
374
+ interval: "daily" | "manual" | "monthly" | "weekly";
375
+ monthlyDays?: number[] | undefined;
376
+ weeklyDays?: string[] | undefined;
377
+ }, {
378
+ 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>;
379
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
380
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
381
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
382
+ targetSchedule: import("convex/values").VObject<{
383
+ interval: "daily" | "manual" | "monthly" | "weekly";
384
+ monthlyDays?: number[] | undefined;
385
+ weeklyDays?: string[] | undefined;
386
+ }, {
387
+ 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>;
388
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
389
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
390
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
391
+ 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>;
392
+ attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
393
+ }, "required", "accountId" | "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">, {
394
+ by_operation: ["operationKey", "_creationTime"];
395
+ }, {}, {}>;
396
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/component/payoutPolicy/schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;IAAK,SAAS;IAAc,QAAQ;CAAc,CAAC;AAC3E,eAAO,MAAM,QAAQ;;;;;;;;yDASnB,CAAC;AACH,eAAO,MAAM,IAAI,0MAA4D,CAAC;AAC9E,eAAO,MAAM,UAAU;;;;;;;;;kDAEtB,CAAC;AACF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;CASzB,CAAC;AACF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW3B,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oRAIpB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qhBAIvB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEe,CAAC;AAC1C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAG3B,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { defineTable } from "convex/server";
2
+ import { v } from "convex/values";
3
+ export const scopeFields = { accountId: v.string(), ownerKey: v.string() };
4
+ export const schedule = v.object({
5
+ interval: v.union(v.literal("daily"), v.literal("weekly"), v.literal("monthly"), v.literal("manual")),
6
+ weeklyDays: v.optional(v.array(v.string())),
7
+ monthlyDays: v.optional(v.array(v.number())),
8
+ });
9
+ export const mode = v.union(v.literal("stripe_managed"), v.literal("custom"));
10
+ export const thresholds = v.array(v.object({ currency: v.string(), amount: v.number() }));
11
+ export const prepareFields = {
12
+ ...scopeFields,
13
+ operationKey: v.string(),
14
+ expectedRevision: v.number(),
15
+ mode,
16
+ thresholds,
17
+ country: v.string(),
18
+ observedSchedule: schedule,
19
+ observedAt: v.optional(v.number()),
20
+ };
21
+ export const policyFields = {
22
+ ...scopeFields,
23
+ revision: v.number(),
24
+ mode,
25
+ thresholds,
26
+ status: v.union(v.literal("changing"), v.literal("ready")),
27
+ operationKey: v.string(),
28
+ country: v.string(),
29
+ previousSchedule: v.optional(schedule),
30
+ holdDeadline: v.optional(v.number()),
31
+ };
32
+ export const operationFields = {
33
+ ...prepareFields,
34
+ revision: v.number(),
35
+ previousSchedule: schedule,
36
+ targetSchedule: schedule,
37
+ status: v.union(v.literal("pending"), v.literal("complete"), v.literal("canceled")),
38
+ attempted: v.optional(v.boolean()),
39
+ };
40
+ export const policyDoc = v.object({
41
+ ...policyFields,
42
+ _id: v.id("payoutPolicies"),
43
+ _creationTime: v.number(),
44
+ });
45
+ export const operationDoc = v.object({
46
+ ...operationFields,
47
+ _id: v.id("payoutPolicyOperations"),
48
+ _creationTime: v.number(),
49
+ });
50
+ export const policiesTable = defineTable(policyFields)
51
+ .index("by_account", ["accountId"])
52
+ .index("by_deadline", ["holdDeadline"]);
53
+ export const operationsTable = defineTable(operationFields).index("by_operation", ["operationKey"]);
54
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/component/payoutPolicy/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;AAC3E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,KAAK,CACf,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAClB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EACnB,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CACpB;IACD,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC7C,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAC/B,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvD,CAAC;AACF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,WAAW;IACd,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,IAAI;IACJ,UAAU;IACV,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gBAAgB,EAAE,QAAQ;IAC1B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,WAAW;IACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,IAAI;IACJ,UAAU;IACV,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,gBAAgB,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;IACtC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACrC,CAAC;AACF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,aAAa;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,gBAAgB,EAAE,QAAQ;IAC1B,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EACpB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EACrB,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CACtB;IACD,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;CACnC,CAAC;AACF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,GAAG,YAAY;IACf,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC;IAC3B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,GAAG,eAAe;IAClB,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,wBAAwB,CAAC;IACnC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC,YAAY,CAAC;KACnD,KAAK,CAAC,YAAY,EAAE,CAAC,WAAW,CAAC,CAAC;KAClC,KAAK,CAAC,aAAa,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAC,CAAC,KAAK,CAC/D,cAAc,EACd,CAAC,cAAc,CAAC,CACjB,CAAC"}
@@ -1,4 +1,135 @@
1
1
  declare const _default: import("convex/server").SchemaDefinition<{
2
+ payoutPolicies: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
+ accountId: string;
4
+ country: string;
5
+ holdDeadline?: number | undefined;
6
+ mode: "custom" | "stripe_managed";
7
+ operationKey: string;
8
+ ownerKey: string;
9
+ previousSchedule?: {
10
+ interval: "daily" | "manual" | "monthly" | "weekly";
11
+ monthlyDays?: number[] | undefined;
12
+ weeklyDays?: string[] | undefined;
13
+ } | undefined;
14
+ revision: number;
15
+ status: "changing" | "ready";
16
+ thresholds: {
17
+ amount: number;
18
+ currency: string;
19
+ }[];
20
+ }, {
21
+ accountId: import("convex/values").VString<string, "required">;
22
+ ownerKey: import("convex/values").VString<string, "required">;
23
+ revision: import("convex/values").VFloat64<number, "required">;
24
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
25
+ thresholds: import("convex/values").VArray<{
26
+ amount: number;
27
+ currency: string;
28
+ }[], import("convex/values").VObject<{
29
+ amount: number;
30
+ currency: string;
31
+ }, {
32
+ currency: import("convex/values").VString<string, "required">;
33
+ amount: import("convex/values").VFloat64<number, "required">;
34
+ }, "required", "amount" | "currency">, "required">;
35
+ status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
36
+ operationKey: import("convex/values").VString<string, "required">;
37
+ country: import("convex/values").VString<string, "required">;
38
+ previousSchedule: import("convex/values").VObject<{
39
+ interval: "daily" | "manual" | "monthly" | "weekly";
40
+ monthlyDays?: number[] | undefined;
41
+ weeklyDays?: string[] | undefined;
42
+ } | undefined, {
43
+ 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>;
44
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
45
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
46
+ }, "optional", "interval" | "monthlyDays" | "weeklyDays">;
47
+ holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
48
+ }, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
49
+ by_account: ["accountId", "_creationTime"];
50
+ by_deadline: ["holdDeadline", "_creationTime"];
51
+ }, {}, {}>;
52
+ payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
53
+ accountId: string;
54
+ attempted?: boolean | undefined;
55
+ country: string;
56
+ expectedRevision: number;
57
+ mode: "custom" | "stripe_managed";
58
+ observedAt?: number | undefined;
59
+ observedSchedule: {
60
+ interval: "daily" | "manual" | "monthly" | "weekly";
61
+ monthlyDays?: number[] | undefined;
62
+ weeklyDays?: string[] | undefined;
63
+ };
64
+ operationKey: string;
65
+ ownerKey: string;
66
+ previousSchedule: {
67
+ interval: "daily" | "manual" | "monthly" | "weekly";
68
+ monthlyDays?: number[] | undefined;
69
+ weeklyDays?: string[] | undefined;
70
+ };
71
+ revision: number;
72
+ status: "canceled" | "complete" | "pending";
73
+ targetSchedule: {
74
+ interval: "daily" | "manual" | "monthly" | "weekly";
75
+ monthlyDays?: number[] | undefined;
76
+ weeklyDays?: string[] | undefined;
77
+ };
78
+ thresholds: {
79
+ amount: number;
80
+ currency: string;
81
+ }[];
82
+ }, {
83
+ accountId: import("convex/values").VString<string, "required">;
84
+ ownerKey: import("convex/values").VString<string, "required">;
85
+ operationKey: import("convex/values").VString<string, "required">;
86
+ expectedRevision: import("convex/values").VFloat64<number, "required">;
87
+ mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
88
+ thresholds: import("convex/values").VArray<{
89
+ amount: number;
90
+ currency: string;
91
+ }[], import("convex/values").VObject<{
92
+ amount: number;
93
+ currency: string;
94
+ }, {
95
+ currency: import("convex/values").VString<string, "required">;
96
+ amount: import("convex/values").VFloat64<number, "required">;
97
+ }, "required", "amount" | "currency">, "required">;
98
+ country: import("convex/values").VString<string, "required">;
99
+ observedSchedule: import("convex/values").VObject<{
100
+ interval: "daily" | "manual" | "monthly" | "weekly";
101
+ monthlyDays?: number[] | undefined;
102
+ weeklyDays?: string[] | undefined;
103
+ }, {
104
+ 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>;
105
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
106
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
107
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
108
+ observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
109
+ revision: import("convex/values").VFloat64<number, "required">;
110
+ previousSchedule: import("convex/values").VObject<{
111
+ interval: "daily" | "manual" | "monthly" | "weekly";
112
+ monthlyDays?: number[] | undefined;
113
+ weeklyDays?: string[] | undefined;
114
+ }, {
115
+ 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>;
116
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
117
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
118
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
119
+ targetSchedule: import("convex/values").VObject<{
120
+ interval: "daily" | "manual" | "monthly" | "weekly";
121
+ monthlyDays?: number[] | undefined;
122
+ weeklyDays?: string[] | undefined;
123
+ }, {
124
+ 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>;
125
+ weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
126
+ monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
127
+ }, "required", "interval" | "monthlyDays" | "weeklyDays">;
128
+ 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>;
129
+ attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
130
+ }, "required", "accountId" | "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">, {
131
+ by_operation: ["operationKey", "_creationTime"];
132
+ }, {}, {}>;
2
133
  currencyTotals: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
134
  accountId: string;
4
135
  count: number;