@fantastic.dev/better-stripe 0.22.0 → 0.23.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 (91) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +5 -3
  3. package/dist/client/connect/payoutActivationProof.d.ts +16 -0
  4. package/dist/client/connect/payoutActivationProof.d.ts.map +1 -0
  5. package/dist/client/connect/payoutActivationProof.js +72 -0
  6. package/dist/client/connect/payoutActivationProof.js.map +1 -0
  7. package/dist/client/connect/payoutAdoption.d.ts +35 -0
  8. package/dist/client/connect/payoutAdoption.d.ts.map +1 -0
  9. package/dist/client/connect/payoutAdoption.js +230 -0
  10. package/dist/client/connect/payoutAdoption.js.map +1 -0
  11. package/dist/client/connect/payoutAdoptionAge.d.ts +19 -0
  12. package/dist/client/connect/payoutAdoptionAge.d.ts.map +1 -0
  13. package/dist/client/connect/payoutAdoptionAge.js +56 -0
  14. package/dist/client/connect/payoutAdoptionAge.js.map +1 -0
  15. package/dist/client/connect/payoutAdoptionAllocation.d.ts +24 -0
  16. package/dist/client/connect/payoutAdoptionAllocation.d.ts.map +1 -0
  17. package/dist/client/connect/payoutAdoptionAllocation.js +78 -0
  18. package/dist/client/connect/payoutAdoptionAllocation.js.map +1 -0
  19. package/dist/client/connect/payoutReconciliation.d.ts.map +1 -1
  20. package/dist/client/connect/payoutReconciliation.js +4 -2
  21. package/dist/client/connect/payoutReconciliation.js.map +1 -1
  22. package/dist/client/payoutPolicy.d.ts +7 -1
  23. package/dist/client/payoutPolicy.d.ts.map +1 -1
  24. package/dist/client/payoutPolicy.js +78 -7
  25. package/dist/client/payoutPolicy.js.map +1 -1
  26. package/dist/component/_generated/component.d.ts +196 -0
  27. package/dist/component/_generated/component.d.ts.map +1 -1
  28. package/dist/component/earnings/triggers.d.ts +38 -4
  29. package/dist/component/earnings/triggers.d.ts.map +1 -1
  30. package/dist/component/payoutPolicy/adoption.d.ts +9 -0
  31. package/dist/component/payoutPolicy/adoption.d.ts.map +1 -0
  32. package/dist/component/payoutPolicy/adoption.js +45 -0
  33. package/dist/component/payoutPolicy/adoption.js.map +1 -0
  34. package/dist/component/payoutPolicy/mutations.d.ts +96 -0
  35. package/dist/component/payoutPolicy/mutations.d.ts.map +1 -1
  36. package/dist/component/payoutPolicy/mutations.js +38 -5
  37. package/dist/component/payoutPolicy/mutations.js.map +1 -1
  38. package/dist/component/payoutPolicy/queries.d.ts +16 -0
  39. package/dist/component/payoutPolicy/queries.d.ts.map +1 -1
  40. package/dist/component/payoutPolicy/schema.d.ts +299 -2
  41. package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
  42. package/dist/component/payoutPolicy/schema.js +7 -0
  43. package/dist/component/payoutPolicy/schema.js.map +1 -1
  44. package/dist/component/payoutRelease/adoption.d.ts +269 -0
  45. package/dist/component/payoutRelease/adoption.d.ts.map +1 -0
  46. package/dist/component/payoutRelease/adoption.js +197 -0
  47. package/dist/component/payoutRelease/adoption.js.map +1 -0
  48. package/dist/component/payoutRelease/helpers.d.ts +3 -0
  49. package/dist/component/payoutRelease/helpers.d.ts.map +1 -1
  50. package/dist/component/payoutRelease/helpers.js +20 -0
  51. package/dist/component/payoutRelease/helpers.js.map +1 -1
  52. package/dist/component/payoutRelease/mutations.d.ts +81 -0
  53. package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
  54. package/dist/component/payoutRelease/mutations.js +6 -0
  55. package/dist/component/payoutRelease/mutations.js.map +1 -1
  56. package/dist/component/payoutRelease/observation.d.ts +18 -0
  57. package/dist/component/payoutRelease/observation.d.ts.map +1 -0
  58. package/dist/component/payoutRelease/observation.js +11 -0
  59. package/dist/component/payoutRelease/observation.js.map +1 -0
  60. package/dist/component/payoutRelease/queries.d.ts +3 -0
  61. package/dist/component/payoutRelease/queries.d.ts.map +1 -1
  62. package/dist/component/payoutRelease/schema.d.ts +8 -19
  63. package/dist/component/payoutRelease/schema.d.ts.map +1 -1
  64. package/dist/component/payoutRelease/schema.js +3 -9
  65. package/dist/component/payoutRelease/schema.js.map +1 -1
  66. package/dist/component/schema.d.ts +73 -2
  67. package/docs/settlement.md +121 -40
  68. package/package.json +1 -1
  69. package/src/client/connect/payoutActivationProof.ts +101 -0
  70. package/src/client/connect/payoutAdoption.test.ts +421 -0
  71. package/src/client/connect/payoutAdoption.ts +330 -0
  72. package/src/client/connect/payoutAdoptionAge.test.ts +89 -0
  73. package/src/client/connect/payoutAdoptionAge.ts +74 -0
  74. package/src/client/connect/payoutAdoptionAllocation.test.ts +132 -0
  75. package/src/client/connect/payoutAdoptionAllocation.ts +106 -0
  76. package/src/client/connect/payoutReconciliation.test.ts +16 -0
  77. package/src/client/connect/payoutReconciliation.ts +6 -2
  78. package/src/client/payoutPolicy.test.ts +16 -0
  79. package/src/client/payoutPolicy.ts +107 -5
  80. package/src/component/_generated/api.ts +6 -0
  81. package/src/component/_generated/component.ts +192 -1
  82. package/src/component/payout-adoption.test.ts +272 -0
  83. package/src/component/payout-policy-adoption.test.ts +131 -0
  84. package/src/component/payoutPolicy/adoption.ts +76 -0
  85. package/src/component/payoutPolicy/mutations.ts +46 -3
  86. package/src/component/payoutPolicy/schema.ts +9 -0
  87. package/src/component/payoutRelease/adoption.ts +262 -0
  88. package/src/component/payoutRelease/helpers.ts +21 -0
  89. package/src/component/payoutRelease/mutations.ts +10 -0
  90. package/src/component/payoutRelease/observation.ts +10 -0
  91. package/src/component/payoutRelease/schema.ts +3 -9
@@ -22,9 +22,115 @@ export declare const thresholds: import("convex/values").VArray<{
22
22
  currency: import("convex/values").VString<string, "required">;
23
23
  amount: import("convex/values").VFloat64<number, "required">;
24
24
  }, "required", "amount" | "currency">, "required">;
25
+ export declare const adoptionProof: import("convex/values").VObject<{
26
+ claims: {
27
+ fingerprint: string;
28
+ operationKey: string;
29
+ }[];
30
+ observations: {
31
+ currency: string;
32
+ ledgerFingerprint: string;
33
+ matureNet: number;
34
+ observedAt: number;
35
+ pendingCredits: number;
36
+ stripeTransferId: string;
37
+ transactionIds: string[];
38
+ }[];
39
+ oldestHeldAt?: number | undefined;
40
+ }, {
41
+ observations: import("convex/values").VArray<{
42
+ currency: string;
43
+ ledgerFingerprint: string;
44
+ matureNet: number;
45
+ observedAt: number;
46
+ pendingCredits: number;
47
+ stripeTransferId: string;
48
+ transactionIds: string[];
49
+ }[], import("convex/values").VObject<{
50
+ currency: string;
51
+ ledgerFingerprint: string;
52
+ matureNet: number;
53
+ observedAt: number;
54
+ pendingCredits: number;
55
+ stripeTransferId: string;
56
+ transactionIds: string[];
57
+ }, {
58
+ stripeTransferId: import("convex/values").VString<string, "required">;
59
+ currency: import("convex/values").VString<string, "required">;
60
+ matureNet: import("convex/values").VFloat64<number, "required">;
61
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
62
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
63
+ observedAt: import("convex/values").VFloat64<number, "required">;
64
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
65
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
66
+ claims: import("convex/values").VArray<{
67
+ fingerprint: string;
68
+ operationKey: string;
69
+ }[], import("convex/values").VObject<{
70
+ fingerprint: string;
71
+ operationKey: string;
72
+ }, {
73
+ operationKey: import("convex/values").VString<string, "required">;
74
+ fingerprint: import("convex/values").VString<string, "required">;
75
+ }, "required", "fingerprint" | "operationKey">, "required">;
76
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
77
+ }, "required", "claims" | "observations" | "oldestHeldAt">;
25
78
  export declare const prepareFields: {
26
79
  accountId: import("convex/values").VString<string, "required">;
27
80
  ownerKey: import("convex/values").VString<string, "required">;
81
+ adoption: import("convex/values").VObject<{
82
+ claims: {
83
+ fingerprint: string;
84
+ operationKey: string;
85
+ }[];
86
+ observations: {
87
+ currency: string;
88
+ ledgerFingerprint: string;
89
+ matureNet: number;
90
+ observedAt: number;
91
+ pendingCredits: number;
92
+ stripeTransferId: string;
93
+ transactionIds: string[];
94
+ }[];
95
+ oldestHeldAt?: number | undefined;
96
+ } | undefined, {
97
+ observations: import("convex/values").VArray<{
98
+ currency: string;
99
+ ledgerFingerprint: string;
100
+ matureNet: number;
101
+ observedAt: number;
102
+ pendingCredits: number;
103
+ stripeTransferId: string;
104
+ transactionIds: string[];
105
+ }[], import("convex/values").VObject<{
106
+ currency: string;
107
+ ledgerFingerprint: string;
108
+ matureNet: number;
109
+ observedAt: number;
110
+ pendingCredits: number;
111
+ stripeTransferId: string;
112
+ transactionIds: string[];
113
+ }, {
114
+ stripeTransferId: import("convex/values").VString<string, "required">;
115
+ currency: import("convex/values").VString<string, "required">;
116
+ matureNet: import("convex/values").VFloat64<number, "required">;
117
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
118
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
119
+ observedAt: import("convex/values").VFloat64<number, "required">;
120
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
121
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
122
+ claims: import("convex/values").VArray<{
123
+ fingerprint: string;
124
+ operationKey: string;
125
+ }[], import("convex/values").VObject<{
126
+ fingerprint: string;
127
+ operationKey: string;
128
+ }, {
129
+ operationKey: import("convex/values").VString<string, "required">;
130
+ fingerprint: import("convex/values").VString<string, "required">;
131
+ }, "required", "fingerprint" | "operationKey">, "required">;
132
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
133
+ }, "optional", "claims" | "observations" | "oldestHeldAt">;
28
134
  operationKey: import("convex/values").VString<string, "required">;
29
135
  expectedRevision: import("convex/values").VFloat64<number, "required">;
30
136
  mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
@@ -82,6 +188,59 @@ export declare const policyFields: {
82
188
  export declare const operationFields: {
83
189
  accountId: import("convex/values").VString<string, "required">;
84
190
  ownerKey: import("convex/values").VString<string, "required">;
191
+ adoption: import("convex/values").VObject<{
192
+ claims: {
193
+ fingerprint: string;
194
+ operationKey: string;
195
+ }[];
196
+ observations: {
197
+ currency: string;
198
+ ledgerFingerprint: string;
199
+ matureNet: number;
200
+ observedAt: number;
201
+ pendingCredits: number;
202
+ stripeTransferId: string;
203
+ transactionIds: string[];
204
+ }[];
205
+ oldestHeldAt?: number | undefined;
206
+ } | undefined, {
207
+ observations: import("convex/values").VArray<{
208
+ currency: string;
209
+ ledgerFingerprint: string;
210
+ matureNet: number;
211
+ observedAt: number;
212
+ pendingCredits: number;
213
+ stripeTransferId: string;
214
+ transactionIds: string[];
215
+ }[], import("convex/values").VObject<{
216
+ currency: string;
217
+ ledgerFingerprint: string;
218
+ matureNet: number;
219
+ observedAt: number;
220
+ pendingCredits: number;
221
+ stripeTransferId: string;
222
+ transactionIds: string[];
223
+ }, {
224
+ stripeTransferId: import("convex/values").VString<string, "required">;
225
+ currency: import("convex/values").VString<string, "required">;
226
+ matureNet: import("convex/values").VFloat64<number, "required">;
227
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
228
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
229
+ observedAt: import("convex/values").VFloat64<number, "required">;
230
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
231
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
232
+ claims: import("convex/values").VArray<{
233
+ fingerprint: string;
234
+ operationKey: string;
235
+ }[], import("convex/values").VObject<{
236
+ fingerprint: string;
237
+ operationKey: string;
238
+ }, {
239
+ operationKey: import("convex/values").VString<string, "required">;
240
+ fingerprint: import("convex/values").VString<string, "required">;
241
+ }, "required", "fingerprint" | "operationKey">, "required">;
242
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
243
+ }, "optional", "claims" | "observations" | "oldestHeldAt">;
85
244
  operationKey: import("convex/values").VString<string, "required">;
86
245
  expectedRevision: import("convex/values").VFloat64<number, "required">;
87
246
  mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
@@ -183,6 +342,22 @@ export declare const operationDoc: import("convex/values").VObject<{
183
342
  _creationTime: number;
184
343
  _id: import("convex/values").GenericId<"payoutPolicyOperations">;
185
344
  accountId: string;
345
+ adoption?: {
346
+ claims: {
347
+ fingerprint: string;
348
+ operationKey: string;
349
+ }[];
350
+ observations: {
351
+ currency: string;
352
+ ledgerFingerprint: string;
353
+ matureNet: number;
354
+ observedAt: number;
355
+ pendingCredits: number;
356
+ stripeTransferId: string;
357
+ transactionIds: string[];
358
+ }[];
359
+ oldestHeldAt?: number | undefined;
360
+ } | undefined;
186
361
  attempted?: boolean | undefined;
187
362
  country: string;
188
363
  expectedRevision: number;
@@ -214,6 +389,59 @@ export declare const operationDoc: import("convex/values").VObject<{
214
389
  }, {
215
390
  accountId: import("convex/values").VString<string, "required">;
216
391
  ownerKey: import("convex/values").VString<string, "required">;
392
+ adoption: import("convex/values").VObject<{
393
+ claims: {
394
+ fingerprint: string;
395
+ operationKey: string;
396
+ }[];
397
+ observations: {
398
+ currency: string;
399
+ ledgerFingerprint: string;
400
+ matureNet: number;
401
+ observedAt: number;
402
+ pendingCredits: number;
403
+ stripeTransferId: string;
404
+ transactionIds: string[];
405
+ }[];
406
+ oldestHeldAt?: number | undefined;
407
+ } | undefined, {
408
+ observations: import("convex/values").VArray<{
409
+ currency: string;
410
+ ledgerFingerprint: string;
411
+ matureNet: number;
412
+ observedAt: number;
413
+ pendingCredits: number;
414
+ stripeTransferId: string;
415
+ transactionIds: string[];
416
+ }[], import("convex/values").VObject<{
417
+ currency: string;
418
+ ledgerFingerprint: string;
419
+ matureNet: number;
420
+ observedAt: number;
421
+ pendingCredits: number;
422
+ stripeTransferId: string;
423
+ transactionIds: string[];
424
+ }, {
425
+ stripeTransferId: import("convex/values").VString<string, "required">;
426
+ currency: import("convex/values").VString<string, "required">;
427
+ matureNet: import("convex/values").VFloat64<number, "required">;
428
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
429
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
430
+ observedAt: import("convex/values").VFloat64<number, "required">;
431
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
432
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
433
+ claims: import("convex/values").VArray<{
434
+ fingerprint: string;
435
+ operationKey: string;
436
+ }[], import("convex/values").VObject<{
437
+ fingerprint: string;
438
+ operationKey: string;
439
+ }, {
440
+ operationKey: import("convex/values").VString<string, "required">;
441
+ fingerprint: import("convex/values").VString<string, "required">;
442
+ }, "required", "fingerprint" | "operationKey">, "required">;
443
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
444
+ }, "optional", "claims" | "observations" | "oldestHeldAt">;
217
445
  operationKey: import("convex/values").VString<string, "required">;
218
446
  expectedRevision: import("convex/values").VFloat64<number, "required">;
219
447
  mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
@@ -261,7 +489,7 @@ export declare const operationDoc: import("convex/values").VObject<{
261
489
  attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
262
490
  _id: import("convex/values").VId<import("convex/values").GenericId<"payoutPolicyOperations">, "required">;
263
491
  _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">;
492
+ }, "required", "_creationTime" | "_id" | "accountId" | "adoption" | "adoption.claims" | "adoption.observations" | "adoption.oldestHeldAt" | "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
493
  export declare const policiesTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
266
494
  accountId: string;
267
495
  country: string;
@@ -314,6 +542,22 @@ export declare const policiesTable: import("convex/server").TableDefinition<impo
314
542
  }, {}, {}>;
315
543
  export declare const operationsTable: import("convex/server").TableDefinition<import("convex/values").VObject<{
316
544
  accountId: string;
545
+ adoption?: {
546
+ claims: {
547
+ fingerprint: string;
548
+ operationKey: string;
549
+ }[];
550
+ observations: {
551
+ currency: string;
552
+ ledgerFingerprint: string;
553
+ matureNet: number;
554
+ observedAt: number;
555
+ pendingCredits: number;
556
+ stripeTransferId: string;
557
+ transactionIds: string[];
558
+ }[];
559
+ oldestHeldAt?: number | undefined;
560
+ } | undefined;
317
561
  attempted?: boolean | undefined;
318
562
  country: string;
319
563
  expectedRevision: number;
@@ -345,6 +589,59 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
345
589
  }, {
346
590
  accountId: import("convex/values").VString<string, "required">;
347
591
  ownerKey: import("convex/values").VString<string, "required">;
592
+ adoption: import("convex/values").VObject<{
593
+ claims: {
594
+ fingerprint: string;
595
+ operationKey: string;
596
+ }[];
597
+ observations: {
598
+ currency: string;
599
+ ledgerFingerprint: string;
600
+ matureNet: number;
601
+ observedAt: number;
602
+ pendingCredits: number;
603
+ stripeTransferId: string;
604
+ transactionIds: string[];
605
+ }[];
606
+ oldestHeldAt?: number | undefined;
607
+ } | undefined, {
608
+ observations: import("convex/values").VArray<{
609
+ currency: string;
610
+ ledgerFingerprint: string;
611
+ matureNet: number;
612
+ observedAt: number;
613
+ pendingCredits: number;
614
+ stripeTransferId: string;
615
+ transactionIds: string[];
616
+ }[], import("convex/values").VObject<{
617
+ currency: string;
618
+ ledgerFingerprint: string;
619
+ matureNet: number;
620
+ observedAt: number;
621
+ pendingCredits: number;
622
+ stripeTransferId: string;
623
+ transactionIds: string[];
624
+ }, {
625
+ stripeTransferId: import("convex/values").VString<string, "required">;
626
+ currency: import("convex/values").VString<string, "required">;
627
+ matureNet: import("convex/values").VFloat64<number, "required">;
628
+ pendingCredits: import("convex/values").VFloat64<number, "required">;
629
+ ledgerFingerprint: import("convex/values").VString<string, "required">;
630
+ observedAt: import("convex/values").VFloat64<number, "required">;
631
+ transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
632
+ }, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
633
+ claims: import("convex/values").VArray<{
634
+ fingerprint: string;
635
+ operationKey: string;
636
+ }[], import("convex/values").VObject<{
637
+ fingerprint: string;
638
+ operationKey: string;
639
+ }, {
640
+ operationKey: import("convex/values").VString<string, "required">;
641
+ fingerprint: import("convex/values").VString<string, "required">;
642
+ }, "required", "fingerprint" | "operationKey">, "required">;
643
+ oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
644
+ }, "optional", "claims" | "observations" | "oldestHeldAt">;
348
645
  operationKey: import("convex/values").VString<string, "required">;
349
646
  expectedRevision: import("convex/values").VFloat64<number, "required">;
350
647
  mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
@@ -390,7 +687,7 @@ export declare const operationsTable: import("convex/server").TableDefinition<im
390
687
  }, "required", "interval" | "monthlyDays" | "weeklyDays">;
391
688
  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
689
  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">, {
690
+ }, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.observations" | "adoption.oldestHeldAt" | "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
691
  by_operation: ["operationKey", "_creationTime"];
395
692
  }, {}, {}>;
396
693
  //# sourceMappingURL=schema.d.ts.map
@@ -1 +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;;;;;;;;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Y;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUxB,CAAC;AACF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW3B,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oRAIpB,CAAC;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0mBAIvB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAEe,CAAC;AAC1C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAG3B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { observation } from "../payoutRelease/observation.js";
1
2
  import { defineTable } from "convex/server";
2
3
  import { v } from "convex/values";
3
4
  export const scopeFields = { accountId: v.string(), ownerKey: v.string() };
@@ -8,7 +9,13 @@ export const schedule = v.object({
8
9
  });
9
10
  export const mode = v.union(v.literal("stripe_managed"), v.literal("custom"));
10
11
  export const thresholds = v.array(v.object({ currency: v.string(), amount: v.number() }));
12
+ export const adoptionProof = v.object({
13
+ observations: v.array(observation),
14
+ claims: v.array(v.object({ operationKey: v.string(), fingerprint: v.string() })),
15
+ oldestHeldAt: v.optional(v.number()),
16
+ });
11
17
  export const prepareFields = {
18
+ adoption: v.optional(adoptionProof),
12
19
  ...scopeFields,
13
20
  operationKey: v.string(),
14
21
  expectedRevision: v.number(),
@@ -1 +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,MA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