@fantastic.dev/better-stripe 0.28.3 → 0.28.5
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.
- package/CHANGELOG.md +12 -0
- package/README.md +5 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +102 -4
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +51 -2
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExpiry.d.ts +42 -0
- package/dist/client/connect/payoutExpiry.d.ts.map +1 -0
- package/dist/client/connect/payoutExpiry.js +93 -0
- package/dist/client/connect/payoutExpiry.js.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +41 -2
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.d.ts +4 -1
- package/dist/client/connect/payoutWorker.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.js +35 -1
- package/dist/client/connect/payoutWorker.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +20 -2
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/client/payoutPolicy.js +5 -25
- package/dist/client/payoutPolicy.js.map +1 -1
- package/dist/component/_generated/component.d.ts +120 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/core/resetSafety.d.ts.map +1 -1
- package/dist/component/core/resetSafety.js +7 -1
- package/dist/component/core/resetSafety.js.map +1 -1
- package/dist/component/earnings/triggers.d.ts +26 -4
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/expiry.d.ts +78 -0
- package/dist/component/payoutPolicy/expiry.d.ts.map +1 -0
- package/dist/component/payoutPolicy/expiry.js +57 -0
- package/dist/component/payoutPolicy/expiry.js.map +1 -0
- package/dist/component/payoutPolicy/helpers.d.ts +10 -0
- package/dist/component/payoutPolicy/helpers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/mutations.d.ts +77 -0
- package/dist/component/payoutPolicy/mutations.d.ts.map +1 -1
- package/dist/component/payoutPolicy/mutations.js +36 -3
- package/dist/component/payoutPolicy/mutations.js.map +1 -1
- package/dist/component/payoutPolicy/queries.d.ts +20 -0
- package/dist/component/payoutPolicy/queries.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.d.ts +139 -2
- package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.js +12 -0
- package/dist/component/payoutPolicy/schema.js.map +1 -1
- package/dist/component/payoutRelease/helpers.d.ts +10 -0
- package/dist/component/payoutRelease/helpers.d.ts.map +1 -1
- package/dist/component/payoutWorker/helpers.d.ts +1 -0
- package/dist/component/payoutWorker/helpers.d.ts.map +1 -1
- package/dist/component/payoutWorker/mutations.d.ts +2 -0
- package/dist/component/payoutWorker/mutations.d.ts.map +1 -1
- package/dist/component/payoutWorker/mutations.js +3 -0
- package/dist/component/payoutWorker/mutations.js.map +1 -1
- package/dist/component/payoutWorker/queries.d.ts +22 -0
- package/dist/component/payoutWorker/queries.d.ts.map +1 -1
- package/dist/component/payoutWorker/schema.d.ts +18 -2
- package/dist/component/payoutWorker/schema.d.ts.map +1 -1
- package/dist/component/payoutWorker/schema.js +7 -0
- package/dist/component/payoutWorker/schema.js.map +1 -1
- package/dist/component/schema.d.ts +41 -2
- package/dist/react/workflows/PayoutAttemptStatus.d.ts +14 -0
- package/dist/react/workflows/PayoutAttemptStatus.d.ts.map +1 -0
- package/dist/react/workflows/PayoutAttemptStatus.js +13 -0
- package/dist/react/workflows/PayoutAttemptStatus.js.map +1 -0
- package/dist/react/workflows/PayoutProgress.d.ts.map +1 -1
- package/dist/react/workflows/PayoutProgress.js +3 -2
- package/dist/react/workflows/PayoutProgress.js.map +1 -1
- package/dist/react/workflows/index.d.ts +2 -0
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +1 -0
- package/dist/react/workflows/index.js.map +1 -1
- package/dist/react/workflows/payout-attempt-state.d.ts +9 -0
- package/dist/react/workflows/payout-attempt-state.d.ts.map +1 -0
- package/dist/react/workflows/payout-attempt-state.js +47 -0
- package/dist/react/workflows/payout-attempt-state.js.map +1 -0
- package/dist/react/workflows/payout-progress-state.d.ts +16 -2
- package/dist/react/workflows/payout-progress-state.d.ts.map +1 -1
- package/dist/react/workflows/payout-progress-state.js +37 -2
- package/dist/react/workflows/payout-progress-state.js.map +1 -1
- package/docs/react-workflows.md +30 -0
- package/docs/settlement.md +47 -3
- package/package.json +1 -1
- package/src/client/connect/payoutDeadline.test.ts +70 -0
- package/src/client/connect/payoutExpiry.ts +132 -0
- package/src/client/connect/payoutWorker.test.ts +57 -1
- package/src/client/connect/payoutWorker.ts +46 -2
- package/src/client/payoutPolicy.test.ts +196 -0
- package/src/client/payoutPolicy.ts +11 -23
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +147 -0
- package/src/component/core/resetSafety.ts +49 -33
- package/src/component/payout-reset-safety.test.ts +28 -0
- package/src/component/payoutPolicy/expiry.ts +80 -0
- package/src/component/payoutPolicy/mutations.ts +47 -2
- package/src/component/payoutPolicy/schema.ts +17 -0
- package/src/component/payoutWorker/mutations.ts +3 -0
- package/src/component/payoutWorker/schema.ts +15 -0
- package/src/react/workflows/PayoutAttemptStatus.tsx +44 -0
- package/src/react/workflows/PayoutProgress.test.tsx +90 -0
- package/src/react/workflows/PayoutProgress.tsx +31 -1
- package/src/react/workflows/index.ts +6 -0
- package/src/react/workflows/payout-attempt-state.ts +70 -0
- package/src/react/workflows/payout-progress-state.ts +62 -2
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,18 @@
|
|
|
26
26
|
- Remove internal tracker references from public documentation and add a
|
|
27
27
|
regression check that prevents their reintroduction.
|
|
28
28
|
|
|
29
|
+
## [0.28.5](https://github.com/FantasticDevHQ/better-stripe/compare/v0.28.4...v0.28.5) (2026-10-15)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- **payouts:** expose verified automatic payout attempt results ([#218](https://github.com/FantasticDevHQ/better-stripe/issues/218)) ([826f8fa](https://github.com/FantasticDevHQ/better-stripe/commit/826f8fafdf4a703b5b0662b28bd9ae7505c9d225))
|
|
34
|
+
|
|
35
|
+
## [0.28.4](https://github.com/FantasticDevHQ/better-stripe/compare/v0.28.3...v0.28.4) (2026-10-15)
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
- **payouts:** retain unresolved recovery after holding expiry ([#216](https://github.com/FantasticDevHQ/better-stripe/issues/216)) ([3ccb39a](https://github.com/FantasticDevHQ/better-stripe/commit/3ccb39adef0f4352cf2992ab73f20a93c84db75d))
|
|
40
|
+
|
|
29
41
|
## [0.28.3](https://github.com/FantasticDevHQ/better-stripe/compare/v0.28.2...v0.28.3) (2026-10-15)
|
|
30
42
|
|
|
31
43
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ claim execution are completed.
|
|
|
70
70
|
|
|
71
71
|
## Status
|
|
72
72
|
|
|
73
|
-
**Version**: `0.28.
|
|
73
|
+
**Version**: `0.28.5` <!-- x-release-please-version --> (pre-1.0). API may change between minor versions until 1.0.
|
|
74
74
|
|
|
75
75
|
Used in production by its authors. Webhook pipeline is covered by unit tests and a live E2E harness (`npm run e2e:webhooks`) that fires real Stripe-signed events and asserts the ledger.
|
|
76
76
|
|
|
@@ -1736,3 +1736,7 @@ cursors, exact currency summaries, legacy backfill, payout failure details, and
|
|
|
1736
1736
|
published-version adoption requirements.
|
|
1737
1737
|
|
|
1738
1738
|
Custom recipient payout minimums are waived during the final day before the verified holding deadline. Provider limits and all financial checks still apply. See [settlement and deadline handling](docs/settlement.md) for worker cadence, retries and expiry limitations.
|
|
1739
|
+
|
|
1740
|
+
Holding-expiry recovery remains visible and retryable after schedule restoration. The package preserves unresolved provider balances and payout claims, and prevents reset or custom reactivation from erasing them. See [expiry recovery](docs/settlement.md) for operator handling.
|
|
1741
|
+
|
|
1742
|
+
Automatic payout status is reusable through `payoutAttemptStatus`, `payoutAttemptValidator`, and the React `PayoutAttemptStatus` workflow. Rejection reasons and retry times remain separate from eligibility previews and bank arrival dates. See [React workflow guidance](docs/react-workflows.md).
|
|
@@ -19,6 +19,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
19
19
|
hasOperation: boolean;
|
|
20
20
|
lastAttemptAt?: number | undefined;
|
|
21
21
|
lastReason?: string | undefined;
|
|
22
|
+
lastResultAt?: number | undefined;
|
|
22
23
|
leaseUntil?: number | undefined;
|
|
23
24
|
nextAttemptAt: number;
|
|
24
25
|
operationKey?: string | undefined;
|
|
@@ -37,9 +38,10 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
37
38
|
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
38
39
|
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
39
40
|
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
|
+
lastResultAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
40
42
|
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
43
|
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
42
|
-
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
44
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "lastResultAt" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
43
45
|
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
44
46
|
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
45
47
|
}, {}, {}>;
|
|
@@ -618,6 +620,16 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
618
620
|
accountId: string;
|
|
619
621
|
country: string;
|
|
620
622
|
holdDeadline?: number | undefined;
|
|
623
|
+
holdingExpiry?: {
|
|
624
|
+
balances?: {
|
|
625
|
+
available: number;
|
|
626
|
+
currency: string;
|
|
627
|
+
pending: number;
|
|
628
|
+
}[] | undefined;
|
|
629
|
+
deadline: number;
|
|
630
|
+
observedAt?: number | undefined;
|
|
631
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
632
|
+
} | undefined;
|
|
621
633
|
mode: "custom" | "stripe_managed";
|
|
622
634
|
operationKey: string;
|
|
623
635
|
ownerKey: string;
|
|
@@ -660,7 +672,34 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
660
672
|
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
661
673
|
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
662
674
|
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
663
|
-
|
|
675
|
+
holdingExpiry: import("convex/values").VObject<{
|
|
676
|
+
balances?: {
|
|
677
|
+
available: number;
|
|
678
|
+
currency: string;
|
|
679
|
+
pending: number;
|
|
680
|
+
}[] | undefined;
|
|
681
|
+
deadline: number;
|
|
682
|
+
observedAt?: number | undefined;
|
|
683
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
684
|
+
} | undefined, {
|
|
685
|
+
deadline: import("convex/values").VFloat64<number, "required">;
|
|
686
|
+
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>;
|
|
687
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
688
|
+
balances: import("convex/values").VArray<{
|
|
689
|
+
available: number;
|
|
690
|
+
currency: string;
|
|
691
|
+
pending: number;
|
|
692
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
693
|
+
available: number;
|
|
694
|
+
currency: string;
|
|
695
|
+
pending: number;
|
|
696
|
+
}, {
|
|
697
|
+
currency: import("convex/values").VString<string, "required">;
|
|
698
|
+
available: import("convex/values").VFloat64<number, "required">;
|
|
699
|
+
pending: import("convex/values").VFloat64<number, "required">;
|
|
700
|
+
}, "required", "available" | "currency" | "pending">, "optional">;
|
|
701
|
+
}, "optional", "balances" | "deadline" | "observedAt" | "status">;
|
|
702
|
+
}, "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">, {
|
|
664
703
|
by_account: ["accountId", "_creationTime"];
|
|
665
704
|
by_deadline: ["holdDeadline", "_creationTime"];
|
|
666
705
|
by_mode_status: ["mode", "status", "_creationTime"];
|
|
@@ -1758,6 +1797,16 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
1758
1797
|
accountId: string;
|
|
1759
1798
|
country: string;
|
|
1760
1799
|
holdDeadline?: number | undefined;
|
|
1800
|
+
holdingExpiry?: {
|
|
1801
|
+
balances?: {
|
|
1802
|
+
available: number;
|
|
1803
|
+
currency: string;
|
|
1804
|
+
pending: number;
|
|
1805
|
+
}[] | undefined;
|
|
1806
|
+
deadline: number;
|
|
1807
|
+
observedAt?: number | undefined;
|
|
1808
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
1809
|
+
} | undefined;
|
|
1761
1810
|
mode: "custom" | "stripe_managed";
|
|
1762
1811
|
operationKey: string;
|
|
1763
1812
|
ownerKey: string;
|
|
@@ -1814,6 +1863,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1814
1863
|
hasOperation: boolean;
|
|
1815
1864
|
lastAttemptAt?: number | undefined;
|
|
1816
1865
|
lastReason?: string | undefined;
|
|
1866
|
+
lastResultAt?: number | undefined;
|
|
1817
1867
|
leaseUntil?: number | undefined;
|
|
1818
1868
|
nextAttemptAt: number;
|
|
1819
1869
|
operationKey?: string | undefined;
|
|
@@ -1832,9 +1882,10 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1832
1882
|
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
1833
1883
|
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
1834
1884
|
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1885
|
+
lastResultAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1835
1886
|
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1836
1887
|
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
1837
|
-
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
1888
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "lastResultAt" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
1838
1889
|
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
1839
1890
|
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
1840
1891
|
}, {}, {}>;
|
|
@@ -2413,6 +2464,16 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2413
2464
|
accountId: string;
|
|
2414
2465
|
country: string;
|
|
2415
2466
|
holdDeadline?: number | undefined;
|
|
2467
|
+
holdingExpiry?: {
|
|
2468
|
+
balances?: {
|
|
2469
|
+
available: number;
|
|
2470
|
+
currency: string;
|
|
2471
|
+
pending: number;
|
|
2472
|
+
}[] | undefined;
|
|
2473
|
+
deadline: number;
|
|
2474
|
+
observedAt?: number | undefined;
|
|
2475
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
2476
|
+
} | undefined;
|
|
2416
2477
|
mode: "custom" | "stripe_managed";
|
|
2417
2478
|
operationKey: string;
|
|
2418
2479
|
ownerKey: string;
|
|
@@ -2455,7 +2516,34 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2455
2516
|
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
2456
2517
|
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
2457
2518
|
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
2458
|
-
|
|
2519
|
+
holdingExpiry: import("convex/values").VObject<{
|
|
2520
|
+
balances?: {
|
|
2521
|
+
available: number;
|
|
2522
|
+
currency: string;
|
|
2523
|
+
pending: number;
|
|
2524
|
+
}[] | undefined;
|
|
2525
|
+
deadline: number;
|
|
2526
|
+
observedAt?: number | undefined;
|
|
2527
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
2528
|
+
} | undefined, {
|
|
2529
|
+
deadline: import("convex/values").VFloat64<number, "required">;
|
|
2530
|
+
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>;
|
|
2531
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
2532
|
+
balances: import("convex/values").VArray<{
|
|
2533
|
+
available: number;
|
|
2534
|
+
currency: string;
|
|
2535
|
+
pending: number;
|
|
2536
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
2537
|
+
available: number;
|
|
2538
|
+
currency: string;
|
|
2539
|
+
pending: number;
|
|
2540
|
+
}, {
|
|
2541
|
+
currency: import("convex/values").VString<string, "required">;
|
|
2542
|
+
available: import("convex/values").VFloat64<number, "required">;
|
|
2543
|
+
pending: import("convex/values").VFloat64<number, "required">;
|
|
2544
|
+
}, "required", "available" | "currency" | "pending">, "optional">;
|
|
2545
|
+
}, "optional", "balances" | "deadline" | "observedAt" | "status">;
|
|
2546
|
+
}, "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">, {
|
|
2459
2547
|
by_account: ["accountId", "_creationTime"];
|
|
2460
2548
|
by_deadline: ["holdDeadline", "_creationTime"];
|
|
2461
2549
|
by_mode_status: ["mode", "status", "_creationTime"];
|
|
@@ -3553,6 +3641,16 @@ export declare function historical(currency?: string): Promise<{
|
|
|
3553
3641
|
accountId: string;
|
|
3554
3642
|
country: string;
|
|
3555
3643
|
holdDeadline?: number | undefined;
|
|
3644
|
+
holdingExpiry?: {
|
|
3645
|
+
balances?: {
|
|
3646
|
+
available: number;
|
|
3647
|
+
currency: string;
|
|
3648
|
+
pending: number;
|
|
3649
|
+
}[] | undefined;
|
|
3650
|
+
deadline: number;
|
|
3651
|
+
observedAt?: number | undefined;
|
|
3652
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
3653
|
+
} | undefined;
|
|
3556
3654
|
mode: "custom" | "stripe_managed";
|
|
3557
3655
|
operationKey: string;
|
|
3558
3656
|
ownerKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutAdoptionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutAdoptionTestHelpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB,CAAC;AACF,wBAAsB,KAAK,CAAC,OAAO,WAAa,EAAE,QAAQ,SAAQ
|
|
1
|
+
{"version":3,"file":"payoutAdoptionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutAdoptionTestHelpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB,CAAC;AACF,wBAAsB,KAAK,CAAC,OAAO,WAAa,EAAE,QAAQ,SAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YArJ3C,oBAAoB;;;;;;;;;;;YAapB,QAAQ,6BAAmB,MAAM;;;;;;;;;YAYjC,aAAa;;;;;;YAGb,QAAQ,6BAAmB,MAAM;;;;;;;;;;;YAcjC,IAAI,iCAAuB;gBAAE,MAAM,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;;;;;YAM9D,QAAQ,6BAAmB,MAAM;;;;;;;;;;;;;;;YAKjC,QAAQ;;;;;wBAQA,IAAI;;;;;;;YAUZ,IAAI;;;;YAIJ,QAAQ,8BAAoB,MAAM;YAGlC,MAAM,iCACW;gBACb,MAAM,EAAE,MAAM,CAAC;gBACf,QAAQ,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,CAAC;aAClB;;;;gBA2CG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDrB"}
|
|
@@ -20,6 +20,7 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
20
20
|
hasOperation: boolean;
|
|
21
21
|
lastAttemptAt?: number | undefined;
|
|
22
22
|
lastReason?: string | undefined;
|
|
23
|
+
lastResultAt?: number | undefined;
|
|
23
24
|
leaseUntil?: number | undefined;
|
|
24
25
|
nextAttemptAt: number;
|
|
25
26
|
operationKey?: string | undefined;
|
|
@@ -38,9 +39,10 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
38
39
|
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
39
40
|
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
40
41
|
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
42
|
+
lastResultAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
43
|
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
42
44
|
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
43
|
-
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
45
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "lastResultAt" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
44
46
|
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
45
47
|
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
46
48
|
}, {}, {}>;
|
|
@@ -619,6 +621,16 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
619
621
|
accountId: string;
|
|
620
622
|
country: string;
|
|
621
623
|
holdDeadline?: number | undefined;
|
|
624
|
+
holdingExpiry?: {
|
|
625
|
+
balances?: {
|
|
626
|
+
available: number;
|
|
627
|
+
currency: string;
|
|
628
|
+
pending: number;
|
|
629
|
+
}[] | undefined;
|
|
630
|
+
deadline: number;
|
|
631
|
+
observedAt?: number | undefined;
|
|
632
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
633
|
+
} | undefined;
|
|
622
634
|
mode: "custom" | "stripe_managed";
|
|
623
635
|
operationKey: string;
|
|
624
636
|
ownerKey: string;
|
|
@@ -661,7 +673,34 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
661
673
|
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
662
674
|
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
663
675
|
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
664
|
-
|
|
676
|
+
holdingExpiry: import("convex/values").VObject<{
|
|
677
|
+
balances?: {
|
|
678
|
+
available: number;
|
|
679
|
+
currency: string;
|
|
680
|
+
pending: number;
|
|
681
|
+
}[] | undefined;
|
|
682
|
+
deadline: number;
|
|
683
|
+
observedAt?: number | undefined;
|
|
684
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
685
|
+
} | undefined, {
|
|
686
|
+
deadline: import("convex/values").VFloat64<number, "required">;
|
|
687
|
+
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>;
|
|
688
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
689
|
+
balances: import("convex/values").VArray<{
|
|
690
|
+
available: number;
|
|
691
|
+
currency: string;
|
|
692
|
+
pending: number;
|
|
693
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
694
|
+
available: number;
|
|
695
|
+
currency: string;
|
|
696
|
+
pending: number;
|
|
697
|
+
}, {
|
|
698
|
+
currency: import("convex/values").VString<string, "required">;
|
|
699
|
+
available: import("convex/values").VFloat64<number, "required">;
|
|
700
|
+
pending: import("convex/values").VFloat64<number, "required">;
|
|
701
|
+
}, "required", "available" | "currency" | "pending">, "optional">;
|
|
702
|
+
}, "optional", "balances" | "deadline" | "observedAt" | "status">;
|
|
703
|
+
}, "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">, {
|
|
665
704
|
by_account: ["accountId", "_creationTime"];
|
|
666
705
|
by_deadline: ["holdDeadline", "_creationTime"];
|
|
667
706
|
by_mode_status: ["mode", "status", "_creationTime"];
|
|
@@ -1750,6 +1789,16 @@ export declare function setup(amounts?: number[]): Promise<{
|
|
|
1750
1789
|
accountId: string;
|
|
1751
1790
|
country: string;
|
|
1752
1791
|
holdDeadline?: number | undefined;
|
|
1792
|
+
holdingExpiry?: {
|
|
1793
|
+
balances?: {
|
|
1794
|
+
available: number;
|
|
1795
|
+
currency: string;
|
|
1796
|
+
pending: number;
|
|
1797
|
+
}[] | undefined;
|
|
1798
|
+
deadline: number;
|
|
1799
|
+
observedAt?: number | undefined;
|
|
1800
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
1801
|
+
} | undefined;
|
|
1753
1802
|
mode: "custom" | "stripe_managed";
|
|
1754
1803
|
operationKey: string;
|
|
1755
1804
|
ownerKey: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutExecutionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExecutionTestHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB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;;;;;;;YAiD1C,oBAAoB;;;;;;;;;;;YAapB,QAAQ,6BAAmB,MAAM;;;;;;;;;YAYjC,aAAa;;;;;;YAGb,QAAQ,6BAAmB,MAAM;;;;;;;;;;;YAcjC,IAAI,iCAAuB;gBAAE,MAAM,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;;;;;YAM9D,QAAQ,6BAAmB,MAAM;;;;;;;;;;;;;;;YAKjC,QAAQ,8BACI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC,CAAC;;;YAmBlE,IAAI;;;;YAIJ,QAAQ;YACR,MAAM,iCACW;gBACb,MAAM,EAAE,MAAM,CAAC;gBACf,QAAQ,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,CAAC;aAClB;;;;gBAsCG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsBrB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type Stripe from "stripe";
|
|
2
|
+
import type { Infer } from "convex/values";
|
|
3
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
4
|
+
import type { policyDoc } from "../../component/payoutPolicy/schema.js";
|
|
5
|
+
type Scope = {
|
|
6
|
+
accountId: string;
|
|
7
|
+
ownerKey: string;
|
|
8
|
+
};
|
|
9
|
+
type Policy = Infer<typeof policyDoc>;
|
|
10
|
+
/** Restore controls, then separately verify remaining balances and durable claims. Never creates a payout. */
|
|
11
|
+
export declare function expirePayoutPolicy<R extends {
|
|
12
|
+
status: string;
|
|
13
|
+
}, P extends {
|
|
14
|
+
status: string;
|
|
15
|
+
}>(stripe: Stripe, component: Component, ctx: RunCtx, scope: Scope, client: {
|
|
16
|
+
get(ctx: RunCtx, scope: Scope): Promise<Policy | null>;
|
|
17
|
+
apply(ctx: RunCtx, args: Scope & {
|
|
18
|
+
operationKey: string;
|
|
19
|
+
}): Promise<R>;
|
|
20
|
+
prepare(ctx: RunCtx, args: Scope & {
|
|
21
|
+
operationKey: string;
|
|
22
|
+
expectedRevision: number;
|
|
23
|
+
mode: "stripe_managed";
|
|
24
|
+
thresholds: [];
|
|
25
|
+
}): Promise<P>;
|
|
26
|
+
}): Promise<P | R | {
|
|
27
|
+
status: "not_due";
|
|
28
|
+
} | {
|
|
29
|
+
status: "expiry_unresolved";
|
|
30
|
+
holdingExpiry: {
|
|
31
|
+
balances?: {
|
|
32
|
+
available: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
pending: number;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
deadline: number;
|
|
37
|
+
observedAt?: number | undefined;
|
|
38
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=payoutExpiry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payoutExpiry.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExpiry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,KAAK,KAAK,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AACrD,KAAK,MAAM,GAAG,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AA6BtC,8GAA8G;AAC9G,wBAAsB,kBAAkB,CACtC,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAC5B,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAE5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE;IACN,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACvD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACvE,OAAO,CACL,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,KAAK,GAAG;QACZ,YAAY,EAAE,MAAM,CAAC;QACrB,gBAAgB,EAAE,MAAM,CAAC;QACzB,IAAI,EAAE,gBAAgB,CAAC;QACvB,UAAU,EAAE,EAAE,CAAC;KAChB,GACA,OAAO,CAAC,CAAC,CAAC,CAAC;CACf;YAKkB,SAAS;;YAqClB,mBAAmB;;;;;;;;;;;GAgC9B"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { runMutationOrThrow } from "../helpers.js";
|
|
2
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
3
|
+
function expiryBalances(balance) {
|
|
4
|
+
const values = new Map();
|
|
5
|
+
for (const type of ["available", "pending"]) {
|
|
6
|
+
const seen = new Set();
|
|
7
|
+
for (const row of balance[type]) {
|
|
8
|
+
if (!/^[a-z]{3}$/.test(row.currency) ||
|
|
9
|
+
!Number.isSafeInteger(row.amount) ||
|
|
10
|
+
seen.has(row.currency))
|
|
11
|
+
throw new Error("Invalid expiry balance.");
|
|
12
|
+
seen.add(row.currency);
|
|
13
|
+
const value = values.get(row.currency) ?? {
|
|
14
|
+
currency: row.currency,
|
|
15
|
+
available: 0,
|
|
16
|
+
pending: 0,
|
|
17
|
+
};
|
|
18
|
+
value[type] = row.amount;
|
|
19
|
+
values.set(row.currency, value);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return [...values.values()].sort((a, b) => a.currency.localeCompare(b.currency));
|
|
23
|
+
}
|
|
24
|
+
/** Restore controls, then separately verify remaining balances and durable claims. Never creates a payout. */
|
|
25
|
+
export async function expirePayoutPolicy(stripe, component, ctx, scope, client) {
|
|
26
|
+
scope = { accountId: scope.accountId, ownerKey: scope.ownerKey };
|
|
27
|
+
let policy = await client.get(ctx, scope);
|
|
28
|
+
if (!policy?.holdDeadline || policy.holdDeadline > Date.now())
|
|
29
|
+
return { status: "not_due" };
|
|
30
|
+
if (policy.mode === "custom")
|
|
31
|
+
policy = (await runMutationOrThrow(ctx, componentRef(component, "payoutPolicy/mutations/beginHoldingExpiry"), scope));
|
|
32
|
+
if (policy.status === "changing") {
|
|
33
|
+
const result = await client.apply(ctx, {
|
|
34
|
+
...scope,
|
|
35
|
+
operationKey: policy.operationKey,
|
|
36
|
+
});
|
|
37
|
+
if (result.status !== "ready")
|
|
38
|
+
return result;
|
|
39
|
+
policy = await client.get(ctx, scope);
|
|
40
|
+
}
|
|
41
|
+
if (!policy)
|
|
42
|
+
return { status: "not_due" };
|
|
43
|
+
if (policy.mode === "custom") {
|
|
44
|
+
const operationKey = `bs:payout-expiry:${scope.accountId}:${policy.revision}`;
|
|
45
|
+
const prepared = await client.prepare(ctx, {
|
|
46
|
+
...scope,
|
|
47
|
+
operationKey,
|
|
48
|
+
expectedRevision: policy.revision,
|
|
49
|
+
mode: "stripe_managed",
|
|
50
|
+
thresholds: [],
|
|
51
|
+
});
|
|
52
|
+
if (prepared.status !== "prepared")
|
|
53
|
+
return prepared;
|
|
54
|
+
const applied = await client.apply(ctx, { ...scope, operationKey });
|
|
55
|
+
if (applied.status !== "ready")
|
|
56
|
+
return applied;
|
|
57
|
+
policy = await client.get(ctx, scope);
|
|
58
|
+
}
|
|
59
|
+
if (!policy?.holdingExpiry ||
|
|
60
|
+
policy.mode !== "stripe_managed" ||
|
|
61
|
+
policy.status !== "ready")
|
|
62
|
+
return { status: "not_due" };
|
|
63
|
+
const unresolved = {
|
|
64
|
+
status: "expiry_unresolved",
|
|
65
|
+
holdingExpiry: policy.holdingExpiry,
|
|
66
|
+
};
|
|
67
|
+
let balances;
|
|
68
|
+
const observedAt = Date.now();
|
|
69
|
+
try {
|
|
70
|
+
balances = expiryBalances(await stripe.balance.retrieve(undefined, {
|
|
71
|
+
stripeAccount: scope.accountId,
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
catch {
|
|
75
|
+
return unresolved;
|
|
76
|
+
}
|
|
77
|
+
if (Date.now() - observedAt > 30000)
|
|
78
|
+
return unresolved;
|
|
79
|
+
const observed = (await runMutationOrThrow(ctx, componentRef(component, "payoutPolicy/mutations/observeHoldingExpiry"), {
|
|
80
|
+
...scope,
|
|
81
|
+
expectedRevision: policy.revision,
|
|
82
|
+
deadline: policy.holdingExpiry.deadline,
|
|
83
|
+
observedAt,
|
|
84
|
+
balances,
|
|
85
|
+
}));
|
|
86
|
+
if (observed.holdingExpiry.status !== "no_held_balance")
|
|
87
|
+
return {
|
|
88
|
+
status: "expiry_unresolved",
|
|
89
|
+
holdingExpiry: observed.holdingExpiry,
|
|
90
|
+
};
|
|
91
|
+
return client.apply(ctx, { ...scope, operationKey: policy.operationKey });
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=payoutExpiry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payoutExpiry.js","sourceRoot":"","sources":["../../../src/client/connect/payoutExpiry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,SAAS,cAAc,CAAC,OAAuB;IAC7C,MAAM,MAAM,GAAG,IAAI,GAAG,EAGnB,CAAC;IACJ,KAAK,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,SAAS,CAAU,EAAE,CAAC;QACrD,MAAM,IA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AAC;IACJ,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -24,6 +24,7 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
24
24
|
hasOperation: boolean;
|
|
25
25
|
lastAttemptAt?: number | undefined;
|
|
26
26
|
lastReason?: string | undefined;
|
|
27
|
+
lastResultAt?: number | undefined;
|
|
27
28
|
leaseUntil?: number | undefined;
|
|
28
29
|
nextAttemptAt: number;
|
|
29
30
|
operationKey?: string | undefined;
|
|
@@ -42,9 +43,10 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
42
43
|
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
43
44
|
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
44
45
|
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
46
|
+
lastResultAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
45
47
|
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
46
48
|
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
47
|
-
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
49
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "lastResultAt" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
48
50
|
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
49
51
|
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
50
52
|
}, {}, {}>;
|
|
@@ -623,6 +625,16 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
623
625
|
accountId: string;
|
|
624
626
|
country: string;
|
|
625
627
|
holdDeadline?: number | undefined;
|
|
628
|
+
holdingExpiry?: {
|
|
629
|
+
balances?: {
|
|
630
|
+
available: number;
|
|
631
|
+
currency: string;
|
|
632
|
+
pending: number;
|
|
633
|
+
}[] | undefined;
|
|
634
|
+
deadline: number;
|
|
635
|
+
observedAt?: number | undefined;
|
|
636
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
637
|
+
} | undefined;
|
|
626
638
|
mode: "custom" | "stripe_managed";
|
|
627
639
|
operationKey: string;
|
|
628
640
|
ownerKey: string;
|
|
@@ -665,7 +677,34 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
665
677
|
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
666
678
|
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
667
679
|
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
668
|
-
|
|
680
|
+
holdingExpiry: import("convex/values").VObject<{
|
|
681
|
+
balances?: {
|
|
682
|
+
available: number;
|
|
683
|
+
currency: string;
|
|
684
|
+
pending: number;
|
|
685
|
+
}[] | undefined;
|
|
686
|
+
deadline: number;
|
|
687
|
+
observedAt?: number | undefined;
|
|
688
|
+
status: "balance_remaining" | "claims_unresolved" | "no_held_balance" | "unverified";
|
|
689
|
+
} | undefined, {
|
|
690
|
+
deadline: import("convex/values").VFloat64<number, "required">;
|
|
691
|
+
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>;
|
|
692
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
693
|
+
balances: import("convex/values").VArray<{
|
|
694
|
+
available: number;
|
|
695
|
+
currency: string;
|
|
696
|
+
pending: number;
|
|
697
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
698
|
+
available: number;
|
|
699
|
+
currency: string;
|
|
700
|
+
pending: number;
|
|
701
|
+
}, {
|
|
702
|
+
currency: import("convex/values").VString<string, "required">;
|
|
703
|
+
available: import("convex/values").VFloat64<number, "required">;
|
|
704
|
+
pending: import("convex/values").VFloat64<number, "required">;
|
|
705
|
+
}, "required", "available" | "currency" | "pending">, "optional">;
|
|
706
|
+
}, "optional", "balances" | "deadline" | "observedAt" | "status">;
|
|
707
|
+
}, "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">, {
|
|
669
708
|
by_account: ["accountId", "_creationTime"];
|
|
670
709
|
by_deadline: ["holdDeadline", "_creationTime"];
|
|
671
710
|
by_mode_status: ["mode", "status", "_creationTime"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutSyncTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutSyncTestHelpers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,MAAM,MAAM,KAAK,GACf;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC;AAClE,KAAK,IAAI,GAAG,CACV,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,cAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCzC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Infer } from "convex/values";
|
|
2
|
-
import type { jobDoc } from "../../component/payoutWorker/schema.js";
|
|
2
|
+
import type { jobDoc, attemptStatus } from "../../component/payoutWorker/schema.js";
|
|
3
3
|
import type { policyDoc } from "../../component/payoutPolicy/schema.js";
|
|
4
4
|
import type { Component, RunCtx } from "../helpers.js";
|
|
5
5
|
import type { PayoutReleaseOptions, PayoutReleaseResult } from "./payoutExecution.js";
|
|
@@ -44,5 +44,8 @@ export declare class PayoutWorkerClient {
|
|
|
44
44
|
changing(ctx: RunCtx, paginationOpts: PageOptions): Promise<Page<Infer<typeof policyDoc>>>;
|
|
45
45
|
run(ctx: RunCtx, opts: PayoutWorkerOptions): Promise<PayoutWorkerResult>;
|
|
46
46
|
}
|
|
47
|
+
export type PayoutAttempt = Infer<typeof attemptStatus>;
|
|
48
|
+
/** Current lease and generation take precedence over a prior result. Legacy timestamps remain unknown. */
|
|
49
|
+
export declare function payoutAttemptStatus(job: PayoutWorkerJob | null, now?: number): PayoutAttempt | null;
|
|
47
50
|
export {};
|
|
48
51
|
//# sourceMappingURL=payoutWorker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutWorker.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutWorker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"payoutWorker.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutWorker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EACV,MAAM,EACN,aAAa,EACd,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,2BAA2B,CAAC;AACnC,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AACnD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,oBAAoB,EAAE,cAAc,CAAC,GAAG;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,KAAK,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAC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