@fantastic.dev/better-stripe 0.23.2 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -2
- package/README.md +46 -5
- package/dist/client/affiliateRecovery/disputes.d.ts +18 -0
- package/dist/client/affiliateRecovery/disputes.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/disputes.js +33 -0
- package/dist/client/affiliateRecovery/disputes.js.map +1 -0
- package/dist/client/affiliateRecovery/engine.d.ts +29 -0
- package/dist/client/affiliateRecovery/engine.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/engine.js +116 -0
- package/dist/client/affiliateRecovery/engine.js.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts +24 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.js +30 -0
- package/dist/client/affiliateRecovery/payoutGate.js.map +1 -0
- package/dist/client/affiliateRecovery/provider.d.ts +14 -0
- package/dist/client/affiliateRecovery/provider.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/provider.js +96 -0
- package/dist/client/affiliateRecovery/provider.js.map +1 -0
- package/dist/client/affiliateRecovery/review.d.ts +28 -0
- package/dist/client/affiliateRecovery/review.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/review.js +86 -0
- package/dist/client/affiliateRecovery/review.js.map +1 -0
- package/dist/client/affiliateRecovery/validators.d.ts +402 -0
- package/dist/client/affiliateRecovery/validators.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/validators.js +27 -0
- package/dist/client/affiliateRecovery/validators.js.map +1 -0
- package/dist/client/affiliateRecovery.d.ts +131 -0
- package/dist/client/affiliateRecovery.d.ts.map +1 -0
- package/dist/client/affiliateRecovery.js +69 -0
- package/dist/client/affiliateRecovery.js.map +1 -0
- package/dist/client/billing/checkout.d.ts +3 -43
- package/dist/client/billing/checkout.d.ts.map +1 -1
- package/dist/client/billing/checkout.js +5 -260
- package/dist/client/billing/checkout.js.map +1 -1
- package/dist/client/billing/checkoutRequest.d.ts +129 -0
- package/dist/client/billing/checkoutRequest.d.ts.map +1 -0
- package/dist/client/billing/checkoutRequest.js +263 -0
- package/dist/client/billing/checkoutRequest.js.map +1 -0
- package/dist/client/billing/preparedCheckout.d.ts +22 -0
- package/dist/client/billing/preparedCheckout.d.ts.map +1 -0
- package/dist/client/billing/preparedCheckout.js +86 -0
- package/dist/client/billing/preparedCheckout.js.map +1 -0
- package/dist/client/checkoutRequests.d.ts +80 -0
- package/dist/client/checkoutRequests.d.ts.map +1 -0
- package/dist/client/checkoutRequests.js +28 -0
- package/dist/client/checkoutRequests.js.map +1 -0
- package/dist/client/connect/commissionReceipts.d.ts +4 -0
- package/dist/client/connect/commissionReceipts.d.ts.map +1 -0
- package/dist/client/connect/commissionReceipts.js +17 -0
- package/dist/client/connect/commissionReceipts.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +958 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutCollection.d.ts +21 -0
- package/dist/client/connect/payoutCollection.d.ts.map +1 -0
- package/dist/client/connect/payoutCollection.js +47 -0
- package/dist/client/connect/payoutCollection.js.map +1 -0
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +1805 -0
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -0
- package/dist/client/connect/payoutExecutionTestHelpers.js +194 -0
- package/dist/client/connect/payoutExecutionTestHelpers.js.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +479 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.d.ts +48 -0
- package/dist/client/connect/payoutWorker.d.ts.map +1 -0
- package/dist/client/connect/payoutWorker.js +78 -0
- package/dist/client/connect/payoutWorker.js.map +1 -0
- package/dist/client/connect/payouts.d.ts +3 -1
- package/dist/client/connect/payouts.d.ts.map +1 -1
- package/dist/client/connect/payouts.js +45 -12
- package/dist/client/connect/payouts.js.map +1 -1
- package/dist/client/connect/refundPrincipal.d.ts +4 -0
- package/dist/client/connect/refundPrincipal.d.ts.map +1 -0
- package/dist/client/connect/refundPrincipal.js +21 -0
- package/dist/client/connect/refundPrincipal.js.map +1 -0
- package/dist/client/connect/reversalExecution.d.ts +47 -0
- package/dist/client/connect/reversalExecution.d.ts.map +1 -0
- package/dist/client/connect/reversalExecution.js +84 -0
- package/dist/client/connect/reversalExecution.js.map +1 -0
- package/dist/client/connect/transfers.d.ts +8 -4
- package/dist/client/connect/transfers.d.ts.map +1 -1
- package/dist/client/connect/transfers.js +52 -57
- package/dist/client/connect/transfers.js.map +1 -1
- package/dist/client/index.d.ts +7 -11
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +10 -10
- package/dist/client/index.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +67 -0
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/client/payoutPolicy.js +10 -0
- package/dist/client/payoutPolicy.js.map +1 -1
- package/dist/client/readContracts.d.ts +11 -1
- package/dist/client/readContracts.d.ts.map +1 -1
- package/dist/client/readContracts.js +10 -0
- package/dist/client/readContracts.js.map +1 -1
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js +30 -3
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/settlement/reconciliation.d.ts.map +1 -1
- package/dist/client/settlement/reconciliation.js +16 -2
- package/dist/client/settlement/reconciliation.js.map +1 -1
- package/dist/client/webhooks/disputeRecovery.d.ts +4 -0
- package/dist/client/webhooks/disputeRecovery.d.ts.map +1 -0
- package/dist/client/webhooks/disputeRecovery.js +40 -0
- package/dist/client/webhooks/disputeRecovery.js.map +1 -0
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +14 -29
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/component/_generated/component.d.ts +784 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/affiliateEarnings/mutations.d.ts +22 -0
- package/dist/component/affiliateEarnings/mutations.d.ts.map +1 -0
- package/dist/component/affiliateEarnings/mutations.js +160 -0
- package/dist/component/affiliateEarnings/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/mutations.d.ts +25 -0
- package/dist/component/affiliatePayouts/mutations.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/mutations.js +104 -0
- package/dist/component/affiliatePayouts/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/queries.d.ts +23 -0
- package/dist/component/affiliatePayouts/queries.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/queries.js +23 -0
- package/dist/component/affiliatePayouts/queries.js.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts +12 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.js +26 -0
- package/dist/component/affiliatePayouts/recipientGuard.js.map +1 -0
- package/dist/component/affiliateRecovery/accounting.d.ts +28 -0
- package/dist/component/affiliateRecovery/accounting.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/accounting.js +71 -0
- package/dist/component/affiliateRecovery/accounting.js.map +1 -0
- package/dist/component/affiliateRecovery/mutations.d.ts +65 -0
- package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/mutations.js +250 -0
- package/dist/component/affiliateRecovery/mutations.js.map +1 -0
- package/dist/component/affiliateRecovery/queries.d.ts +305 -0
- package/dist/component/affiliateRecovery/queries.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/queries.js +113 -0
- package/dist/component/affiliateRecovery/queries.js.map +1 -0
- package/dist/component/affiliateRecovery/schema.d.ts +171 -0
- package/dist/component/affiliateRecovery/schema.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/schema.js +71 -0
- package/dist/component/affiliateRecovery/schema.js.map +1 -0
- package/dist/component/connect/mutations.d.ts +36 -23
- package/dist/component/connect/mutations.d.ts.map +1 -1
- package/dist/component/connect/mutations.js +7 -124
- package/dist/component/connect/mutations.js.map +1 -1
- package/dist/component/connect/queries.d.ts +10 -0
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/queries.js +3 -40
- package/dist/component/connect/queries.js.map +1 -1
- package/dist/component/connect/reversalClaims.d.ts +169 -0
- package/dist/component/connect/reversalClaims.d.ts.map +1 -0
- package/dist/component/connect/reversalClaims.js +176 -0
- package/dist/component/connect/reversalClaims.js.map +1 -0
- package/dist/component/connect/reversalDiagnostics.d.ts +59 -0
- package/dist/component/connect/reversalDiagnostics.d.ts.map +1 -0
- package/dist/component/connect/reversalDiagnostics.js +50 -0
- package/dist/component/connect/reversalDiagnostics.js.map +1 -0
- package/dist/component/connect/reversalReceipts.d.ts +27 -0
- package/dist/component/connect/reversalReceipts.d.ts.map +1 -0
- package/dist/component/connect/reversalReceipts.js +85 -0
- package/dist/component/connect/reversalReceipts.js.map +1 -0
- package/dist/component/connect/schema.d.ts +31 -1
- package/dist/component/connect/schema.d.ts.map +1 -1
- package/dist/component/connect/schema.js +3 -1
- package/dist/component/connect/schema.js.map +1 -1
- package/dist/component/connect/validators.d.ts +49 -1
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/connect/validators.js +2 -0
- package/dist/component/connect/validators.js.map +1 -1
- package/dist/component/core/mutations.d.ts.map +1 -1
- package/dist/component/core/mutations.js +2 -0
- package/dist/component/core/mutations.js.map +1 -1
- package/dist/component/core/resetSafety.d.ts +4 -0
- package/dist/component/core/resetSafety.d.ts.map +1 -0
- package/dist/component/core/resetSafety.js +54 -0
- package/dist/component/core/resetSafety.js.map +1 -0
- package/dist/component/earnings/triggers.d.ts +828 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/earnings/triggers.js +2 -0
- package/dist/component/earnings/triggers.js.map +1 -1
- package/dist/component/payoutPolicy/schema.d.ts +2 -0
- package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.js +3 -1
- package/dist/component/payoutPolicy/schema.js.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +7 -1
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.js +3 -1
- package/dist/component/payoutRelease/queries.js.map +1 -1
- package/dist/component/payoutRelease/schema.d.ts +1 -0
- package/dist/component/payoutRelease/schema.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.js +1 -0
- package/dist/component/payoutRelease/schema.js.map +1 -1
- package/dist/component/payoutSnapshots/localState.d.ts +89 -0
- package/dist/component/payoutSnapshots/localState.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/localState.js +186 -0
- package/dist/component/payoutSnapshots/localState.js.map +1 -0
- package/dist/component/payoutSnapshots/mutations.d.ts +108 -0
- package/dist/component/payoutSnapshots/mutations.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/mutations.js +263 -0
- package/dist/component/payoutSnapshots/mutations.js.map +1 -0
- package/dist/component/payoutSnapshots/revisions.d.ts +12 -0
- package/dist/component/payoutSnapshots/revisions.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/revisions.js +173 -0
- package/dist/component/payoutSnapshots/revisions.js.map +1 -0
- package/dist/component/payoutSnapshots/schema.d.ts +285 -0
- package/dist/component/payoutSnapshots/schema.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/schema.js +108 -0
- package/dist/component/payoutSnapshots/schema.js.map +1 -0
- package/dist/component/payoutSnapshots/scope.d.ts +7 -0
- package/dist/component/payoutSnapshots/scope.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/scope.js +8 -0
- package/dist/component/payoutSnapshots/scope.js.map +1 -0
- package/dist/component/payoutWorker/helpers.d.ts +30 -0
- package/dist/component/payoutWorker/helpers.d.ts.map +1 -0
- package/dist/component/payoutWorker/helpers.js +21 -0
- package/dist/component/payoutWorker/helpers.js.map +1 -0
- package/dist/component/payoutWorker/mutations.d.ts +68 -0
- package/dist/component/payoutWorker/mutations.d.ts.map +1 -0
- package/dist/component/payoutWorker/mutations.js +161 -0
- package/dist/component/payoutWorker/mutations.js.map +1 -0
- package/dist/component/payoutWorker/queries.d.ts +123 -0
- package/dist/component/payoutWorker/queries.d.ts.map +1 -0
- package/dist/component/payoutWorker/queries.js +61 -0
- package/dist/component/payoutWorker/queries.js.map +1 -0
- package/dist/component/payoutWorker/schema.d.ts +91 -0
- package/dist/component/payoutWorker/schema.d.ts.map +1 -0
- package/dist/component/payoutWorker/schema.js +27 -0
- package/dist/component/payoutWorker/schema.js.map +1 -0
- package/dist/component/schema.d.ts +479 -1
- package/dist/component/schema.js +19 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/settlement/clawbackSchema.d.ts +161 -0
- package/dist/component/settlement/clawbackSchema.d.ts.map +1 -0
- package/dist/component/settlement/clawbackSchema.js +73 -0
- package/dist/component/settlement/clawbackSchema.js.map +1 -0
- package/dist/component/settlement/clawbacks.d.ts +55 -0
- package/dist/component/settlement/clawbacks.d.ts.map +1 -0
- package/dist/component/settlement/clawbacks.js +146 -0
- package/dist/component/settlement/clawbacks.js.map +1 -0
- package/dist/component/settlement/mutations.d.ts +16 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +48 -0
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +53 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/queries.js +26 -0
- package/dist/component/settlement/queries.js.map +1 -1
- package/dist/react/workflows/AffiliateRecovery.d.ts +46 -0
- package/dist/react/workflows/AffiliateRecovery.d.ts.map +1 -0
- package/dist/react/workflows/AffiliateRecovery.js +84 -0
- package/dist/react/workflows/AffiliateRecovery.js.map +1 -0
- 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/testing/affiliate-recovery.d.ts +10 -0
- package/dist/testing/affiliate-recovery.d.ts.map +1 -0
- package/dist/testing/affiliate-recovery.js +126 -0
- package/dist/testing/affiliate-recovery.js.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/testing/index.js.map +1 -1
- package/docs/affiliate-clawbacks.md +306 -0
- package/docs/read-contracts.md +48 -0
- package/docs/settlement.md +145 -1
- package/package.json +2 -1
- package/src/client/affiliateRecovery/disputes.ts +62 -0
- package/src/client/affiliateRecovery/engine.ts +196 -0
- package/src/client/affiliateRecovery/payoutGate.ts +65 -0
- package/src/client/affiliateRecovery/provider.ts +127 -0
- package/src/client/affiliateRecovery/review.ts +117 -0
- package/src/client/affiliateRecovery/validators.ts +38 -0
- package/src/client/affiliateRecovery.ts +173 -0
- package/src/client/billing/checkout.ts +11 -359
- package/src/client/billing/checkoutRequest.ts +362 -0
- package/src/client/billing/prepared-checkout.test.ts +430 -0
- package/src/client/billing/preparedCheckout.ts +143 -0
- package/src/client/checkoutRequests.ts +40 -0
- package/src/client/connect/commissionReceipts.test.ts +157 -0
- package/src/client/connect/commissionReceipts.ts +23 -0
- package/src/client/connect/payoutCollection.test.ts +74 -0
- package/src/client/connect/payoutCollection.ts +82 -0
- package/src/client/connect/payoutExecution.test.ts +1 -211
- package/src/client/connect/payoutExecutionTestHelpers.ts +213 -0
- package/src/client/connect/payoutWorker.test.ts +145 -0
- package/src/client/connect/payoutWorker.ts +144 -0
- package/src/client/connect/payouts.ts +75 -15
- package/src/client/connect/refundPrincipal.test.ts +46 -0
- package/src/client/connect/refundPrincipal.ts +26 -0
- package/src/client/connect/reversalExecution.ts +130 -0
- package/src/client/connect/transfers.test.ts +3 -3
- package/src/client/connect/transfers.ts +93 -92
- package/src/client/index.ts +16 -28
- package/src/client/payoutPolicy.ts +26 -1
- package/src/client/readContracts.ts +23 -0
- package/src/client/settlement/execution.test.ts +5 -0
- package/src/client/settlement/execution.ts +50 -3
- package/src/client/settlement/reconciliation.ts +20 -2
- package/src/client/webhooks/disputeRecovery.ts +74 -0
- package/src/client/webhooks/processors.test.ts +36 -53
- package/src/client/webhooks/processors.ts +18 -31
- package/src/component/_generated/api.ts +40 -0
- package/src/component/_generated/component.ts +975 -1
- package/src/component/affiliate-clawbacks.test.ts +370 -0
- package/src/component/affiliate-component-pagination.test.ts +83 -0
- package/src/component/affiliate-direct-payout.test.ts +160 -0
- package/src/component/affiliate-recovery-lifecycle.test.ts +587 -0
- package/src/component/affiliateEarnings/mutations.ts +196 -0
- package/src/component/affiliatePayouts/mutations.ts +121 -0
- package/src/component/affiliatePayouts/queries.ts +28 -0
- package/src/component/affiliatePayouts/recipientGuard.ts +42 -0
- package/src/component/affiliateRecovery/accounting.ts +111 -0
- package/src/component/affiliateRecovery/mutations.ts +275 -0
- package/src/component/affiliateRecovery/queries.ts +138 -0
- package/src/component/affiliateRecovery/schema.ts +86 -0
- package/src/component/connect/mutations.ts +9 -160
- package/src/component/connect/queries.ts +4 -47
- package/src/component/connect/reversalClaims.ts +232 -0
- package/src/component/connect/reversalDiagnostics.ts +61 -0
- package/src/component/connect/reversalReceipts.ts +147 -0
- package/src/component/connect/schema.ts +3 -3
- package/src/component/connect/validators.ts +2 -0
- package/src/component/core/mutations.ts +2 -0
- package/src/component/core/resetSafety.ts +67 -0
- package/src/component/earnings/triggers.ts +2 -0
- package/src/component/payout-recovery-integration.test.ts +172 -0
- package/src/component/payout-reset-safety.test.ts +148 -0
- package/src/component/payout-revisions.test.ts +125 -0
- package/src/component/payout-snapshots.test.ts +395 -0
- package/src/component/payout-worker.test.ts +165 -0
- package/src/component/payoutPolicy/schema.ts +3 -1
- package/src/component/payoutRelease/mutations.ts +10 -1
- package/src/component/payoutRelease/queries.ts +3 -1
- package/src/component/payoutRelease/schema.ts +1 -0
- package/src/component/payoutSnapshots/localState.ts +238 -0
- package/src/component/payoutSnapshots/mutations.ts +275 -0
- package/src/component/payoutSnapshots/revisions.ts +247 -0
- package/src/component/payoutSnapshots/schema.ts +125 -0
- package/src/component/payoutSnapshots/scope.ts +7 -0
- package/src/component/payoutWorker/helpers.ts +30 -0
- package/src/component/payoutWorker/mutations.ts +181 -0
- package/src/component/payoutWorker/queries.ts +64 -0
- package/src/component/payoutWorker/schema.ts +26 -0
- package/src/component/public.test.ts +2 -2
- package/src/component/schema.ts +36 -0
- package/src/component/settlement/clawbackSchema.ts +78 -0
- package/src/component/settlement/clawbacks.ts +233 -0
- package/src/component/settlement/mutations.ts +54 -0
- package/src/component/settlement/queries.ts +35 -0
- package/src/component/summary-arithmetic.test.ts +9 -4
- package/src/react/workflows/AffiliateRecovery.test.tsx +106 -0
- package/src/react/workflows/AffiliateRecovery.tsx +273 -0
- package/src/react/workflows/index.ts +9 -0
- package/src/testing/affiliate-recovery.ts +137 -0
- package/src/testing/index.ts +2 -0
|
@@ -14,6 +14,451 @@ type Sync = (stripe: Stripe, component: Component, ctx: RunCtx, opts: {
|
|
|
14
14
|
export declare function operation(): Promise<Sync>;
|
|
15
15
|
export declare function setup(scope?: Scope): Promise<{
|
|
16
16
|
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
17
|
+
payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
18
|
+
accountId: string;
|
|
19
|
+
cadenceMs: number;
|
|
20
|
+
completedGeneration?: number | undefined;
|
|
21
|
+
completedOperationKey?: string | undefined;
|
|
22
|
+
currency: string;
|
|
23
|
+
generation: number;
|
|
24
|
+
hasOperation: boolean;
|
|
25
|
+
lastAttemptAt?: number | undefined;
|
|
26
|
+
lastReason?: string | undefined;
|
|
27
|
+
leaseUntil?: number | undefined;
|
|
28
|
+
nextAttemptAt: number;
|
|
29
|
+
operationKey?: string | undefined;
|
|
30
|
+
ownerKey: string;
|
|
31
|
+
sequence: number;
|
|
32
|
+
}, {
|
|
33
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
34
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
35
|
+
currency: import("convex/values").VString<string, "required">;
|
|
36
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
37
|
+
sequence: import("convex/values").VFloat64<number, "required">;
|
|
38
|
+
cadenceMs: import("convex/values").VFloat64<number, "required">;
|
|
39
|
+
nextAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
40
|
+
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
|
+
operationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
42
|
+
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
43
|
+
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
44
|
+
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
45
|
+
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
46
|
+
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
47
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
48
|
+
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
49
|
+
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
50
|
+
}, {}, {}>;
|
|
51
|
+
payoutFinancialRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
52
|
+
accountId: string;
|
|
53
|
+
revision: number;
|
|
54
|
+
riskRevision: number;
|
|
55
|
+
}, {
|
|
56
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
57
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
58
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
59
|
+
}, "required", "accountId" | "revision" | "riskRevision">, {
|
|
60
|
+
by_account: ["accountId", "_creationTime"];
|
|
61
|
+
}, {}, {}>;
|
|
62
|
+
payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
63
|
+
accountId: string;
|
|
64
|
+
key: string;
|
|
65
|
+
kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
|
|
66
|
+
removed?: boolean | undefined;
|
|
67
|
+
riskRevision: number;
|
|
68
|
+
}, {
|
|
69
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
70
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
71
|
+
kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "provider_payout" | "transfer", [import("convex/values").VLiteral<"transfer", "required">, import("convex/values").VLiteral<"provider_payout", "required">, import("convex/values").VLiteral<"allocation", "required">, import("convex/values").VLiteral<"claim", "required">, import("convex/values").VLiteral<"fee", "required">], "required", never>;
|
|
72
|
+
key: import("convex/values").VString<string, "required">;
|
|
73
|
+
removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
74
|
+
}, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
|
|
75
|
+
by_account_revision: ["accountId", "riskRevision", "_creationTime"];
|
|
76
|
+
}, {}, {}>;
|
|
77
|
+
payoutRiskRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
78
|
+
accountId: string;
|
|
79
|
+
riskRevision: number;
|
|
80
|
+
}, {
|
|
81
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
82
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
83
|
+
}, "required", "accountId" | "riskRevision">, {
|
|
84
|
+
by_account: ["accountId", "_creationTime"];
|
|
85
|
+
}, {}, {}>;
|
|
86
|
+
payoutSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
87
|
+
accountId: string;
|
|
88
|
+
allocationCount: number;
|
|
89
|
+
allocationCursor?: string | undefined;
|
|
90
|
+
claimCount: number;
|
|
91
|
+
claimCursor?: string | undefined;
|
|
92
|
+
deferredPositiveChanges: boolean;
|
|
93
|
+
expectedRevision: number;
|
|
94
|
+
expiresAt: number;
|
|
95
|
+
feeCount: number;
|
|
96
|
+
feeCursor?: string | undefined;
|
|
97
|
+
initialRevision: number;
|
|
98
|
+
initialRiskRevision: number;
|
|
99
|
+
observedRevision: number;
|
|
100
|
+
operationKey: string;
|
|
101
|
+
ownerKey: string;
|
|
102
|
+
phase: "allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources";
|
|
103
|
+
policyMode?: string | undefined;
|
|
104
|
+
policyOperationKey?: string | undefined;
|
|
105
|
+
providerChanged: boolean;
|
|
106
|
+
readOnly: boolean;
|
|
107
|
+
reason?: string | undefined;
|
|
108
|
+
riskRevision: number;
|
|
109
|
+
sourceCount: number;
|
|
110
|
+
sourceCursor?: string | undefined;
|
|
111
|
+
sourceFence: number;
|
|
112
|
+
step: number;
|
|
113
|
+
}, {
|
|
114
|
+
readOnly: import("convex/values").VBoolean<boolean, "required">;
|
|
115
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
116
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
117
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
118
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
119
|
+
policyMode: import("convex/values").VString<string | undefined, "optional">;
|
|
120
|
+
policyOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
121
|
+
phase: import("convex/values").VUnion<"allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources", [import("convex/values").VLiteral<"sources", "required">, import("convex/values").VLiteral<"allocations", "required">, import("convex/values").VLiteral<"fees", "required">, import("convex/values").VLiteral<"claims", "required">, import("convex/values").VLiteral<"repair", "required">, import("convex/values").VLiteral<"check", "required">, import("convex/values").VLiteral<"local_ready", "required">, import("convex/values").VLiteral<"invalidated", "required">, import("convex/values").VLiteral<"discarding", "required">], "required", never>;
|
|
122
|
+
step: import("convex/values").VFloat64<number, "required">;
|
|
123
|
+
sourceFence: import("convex/values").VFloat64<number, "required">;
|
|
124
|
+
sourceCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
125
|
+
allocationCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
126
|
+
feeCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
127
|
+
claimCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
128
|
+
initialRevision: import("convex/values").VFloat64<number, "required">;
|
|
129
|
+
initialRiskRevision: import("convex/values").VFloat64<number, "required">;
|
|
130
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
131
|
+
observedRevision: import("convex/values").VFloat64<number, "required">;
|
|
132
|
+
sourceCount: import("convex/values").VFloat64<number, "required">;
|
|
133
|
+
allocationCount: import("convex/values").VFloat64<number, "required">;
|
|
134
|
+
claimCount: import("convex/values").VFloat64<number, "required">;
|
|
135
|
+
feeCount: import("convex/values").VFloat64<number, "required">;
|
|
136
|
+
deferredPositiveChanges: import("convex/values").VBoolean<boolean, "required">;
|
|
137
|
+
providerChanged: import("convex/values").VBoolean<boolean, "required">;
|
|
138
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
139
|
+
reason: import("convex/values").VString<string | undefined, "optional">;
|
|
140
|
+
}, "required", "accountId" | "allocationCount" | "allocationCursor" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
|
|
141
|
+
by_account_phase: ["accountId", "phase", "_creationTime"];
|
|
142
|
+
by_operation: ["operationKey", "_creationTime"];
|
|
143
|
+
by_read_only: ["readOnly", "_creationTime"];
|
|
144
|
+
}, {}, {}>;
|
|
145
|
+
payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
146
|
+
allocationCurrency?: string | undefined;
|
|
147
|
+
allocationPresent: boolean;
|
|
148
|
+
amount: number;
|
|
149
|
+
currency: string;
|
|
150
|
+
expectedPaid: number;
|
|
151
|
+
expectedReserved: number;
|
|
152
|
+
ledgerFingerprint: string;
|
|
153
|
+
needsCheck: boolean;
|
|
154
|
+
paidAmount: number;
|
|
155
|
+
reinstatement: boolean;
|
|
156
|
+
reservedAmount: number;
|
|
157
|
+
reversalClaimedAmount: number;
|
|
158
|
+
reversedAmount: number;
|
|
159
|
+
role?: string | undefined;
|
|
160
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
161
|
+
sourceChargeId?: string | undefined;
|
|
162
|
+
sourceCreatedAt: number;
|
|
163
|
+
status: string;
|
|
164
|
+
stripeTransferId: string;
|
|
165
|
+
}, {
|
|
166
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
167
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
168
|
+
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
169
|
+
sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
170
|
+
currency: import("convex/values").VString<string, "required">;
|
|
171
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
172
|
+
status: import("convex/values").VString<string, "required">;
|
|
173
|
+
role: import("convex/values").VString<string | undefined, "optional">;
|
|
174
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
175
|
+
reversedAmount: import("convex/values").VFloat64<number, "required">;
|
|
176
|
+
reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
|
|
177
|
+
reinstatement: import("convex/values").VBoolean<boolean, "required">;
|
|
178
|
+
allocationPresent: import("convex/values").VBoolean<boolean, "required">;
|
|
179
|
+
allocationCurrency: import("convex/values").VString<string | undefined, "optional">;
|
|
180
|
+
paidAmount: import("convex/values").VFloat64<number, "required">;
|
|
181
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
182
|
+
expectedPaid: import("convex/values").VFloat64<number, "required">;
|
|
183
|
+
expectedReserved: import("convex/values").VFloat64<number, "required">;
|
|
184
|
+
needsCheck: import("convex/values").VBoolean<boolean, "required">;
|
|
185
|
+
}, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
|
|
186
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
187
|
+
by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
|
|
188
|
+
by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
|
|
189
|
+
}, {}, {}>;
|
|
190
|
+
payoutSnapshotClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
191
|
+
allocations: {
|
|
192
|
+
amount: number;
|
|
193
|
+
role?: string | undefined;
|
|
194
|
+
stripeTransferId: string;
|
|
195
|
+
}[];
|
|
196
|
+
amount: number;
|
|
197
|
+
currency: string;
|
|
198
|
+
fingerprint: string;
|
|
199
|
+
historical?: boolean | undefined;
|
|
200
|
+
operationKey: string;
|
|
201
|
+
providerFee?: number | undefined;
|
|
202
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
203
|
+
status: string;
|
|
204
|
+
stripePayoutId?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
207
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
208
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
209
|
+
currency: import("convex/values").VString<string, "required">;
|
|
210
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
211
|
+
status: import("convex/values").VString<string, "required">;
|
|
212
|
+
stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
213
|
+
historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
214
|
+
providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
215
|
+
allocations: import("convex/values").VArray<{
|
|
216
|
+
amount: number;
|
|
217
|
+
role?: string | undefined;
|
|
218
|
+
stripeTransferId: string;
|
|
219
|
+
}[], import("convex/values").VObject<{
|
|
220
|
+
amount: number;
|
|
221
|
+
role?: string | undefined;
|
|
222
|
+
stripeTransferId: string;
|
|
223
|
+
}, {
|
|
224
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
225
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
226
|
+
role: import("convex/values").VString<string | undefined, "optional">;
|
|
227
|
+
}, "required", "amount" | "role" | "stripeTransferId">, "required">;
|
|
228
|
+
}, "required", "allocations" | "amount" | "currency" | "fingerprint" | "historical" | "operationKey" | "providerFee" | "snapshotId" | "status" | "stripePayoutId">, {
|
|
229
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
230
|
+
by_snapshot_operation: ["snapshotId", "operationKey", "_creationTime"];
|
|
231
|
+
}, {}, {}>;
|
|
232
|
+
payoutSnapshotFees: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
233
|
+
amount: number;
|
|
234
|
+
currency: string;
|
|
235
|
+
revision: number;
|
|
236
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
237
|
+
}, {
|
|
238
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
239
|
+
currency: import("convex/values").VString<string, "required">;
|
|
240
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
241
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
242
|
+
}, "required", "amount" | "currency" | "revision" | "snapshotId">, {
|
|
243
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
244
|
+
by_snapshot_currency: ["snapshotId", "currency", "_creationTime"];
|
|
245
|
+
}, {}, {}>;
|
|
246
|
+
affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
247
|
+
accounted?: boolean | undefined;
|
|
248
|
+
activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
|
|
249
|
+
affiliateAccountId: string;
|
|
250
|
+
chargeAmount: number;
|
|
251
|
+
creditAmount?: number | undefined;
|
|
252
|
+
currency: string;
|
|
253
|
+
debtAmount?: number | undefined;
|
|
254
|
+
debtStatus?: "open" | "settled" | undefined;
|
|
255
|
+
disputeId?: string | undefined;
|
|
256
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
257
|
+
disputedPrincipal: number;
|
|
258
|
+
earningId?: import("convex/values").GenericId<"affiliateEarnings"> | undefined;
|
|
259
|
+
finalizedAmount: number;
|
|
260
|
+
lastError?: string | undefined;
|
|
261
|
+
lastRefundId?: string | undefined;
|
|
262
|
+
lastState?: string | undefined;
|
|
263
|
+
legacyReceiptIds?: string[] | undefined;
|
|
264
|
+
legacyRestorationIds?: string[] | undefined;
|
|
265
|
+
lostPrincipal: number;
|
|
266
|
+
needsReconciliation: boolean;
|
|
267
|
+
offsetAmount?: number | undefined;
|
|
268
|
+
operationSequence?: number | undefined;
|
|
269
|
+
operatorNote?: string | undefined;
|
|
270
|
+
originalCommission: number;
|
|
271
|
+
paymentId?: string | undefined;
|
|
272
|
+
paymentIntentId?: string | undefined;
|
|
273
|
+
provisionalAmount: number;
|
|
274
|
+
recoveredAmount: number;
|
|
275
|
+
refundedPrincipal: number;
|
|
276
|
+
releasedCommission?: number | undefined;
|
|
277
|
+
reservedRecovery?: number | undefined;
|
|
278
|
+
reservedRestoration?: number | undefined;
|
|
279
|
+
restoredAmount?: number | undefined;
|
|
280
|
+
sourceChargeId: string;
|
|
281
|
+
sourceInvoiceId?: string | undefined;
|
|
282
|
+
storeAccountId?: string | undefined;
|
|
283
|
+
stripeTransferId?: string | undefined;
|
|
284
|
+
}, {
|
|
285
|
+
stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
|
|
286
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
287
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
288
|
+
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
289
|
+
paymentId: import("convex/values").VString<string | undefined, "optional">;
|
|
290
|
+
storeAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
291
|
+
lastRefundId: import("convex/values").VString<string | undefined, "optional">;
|
|
292
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
293
|
+
currency: import("convex/values").VString<string, "required">;
|
|
294
|
+
chargeAmount: import("convex/values").VFloat64<number, "required">;
|
|
295
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
296
|
+
refundedPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
297
|
+
disputedPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
298
|
+
lostPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
299
|
+
finalizedAmount: import("convex/values").VFloat64<number, "required">;
|
|
300
|
+
provisionalAmount: import("convex/values").VFloat64<number, "required">;
|
|
301
|
+
recoveredAmount: import("convex/values").VFloat64<number, "required">;
|
|
302
|
+
needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
|
|
303
|
+
accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
304
|
+
legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
305
|
+
legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
306
|
+
operatorNote: import("convex/values").VString<string | undefined, "optional">;
|
|
307
|
+
earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
|
|
308
|
+
releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
309
|
+
offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
310
|
+
restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
311
|
+
reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
312
|
+
reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
313
|
+
debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
314
|
+
creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
315
|
+
debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
|
|
316
|
+
disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
|
|
317
|
+
disputeId: import("convex/values").VString<string | undefined, "optional">;
|
|
318
|
+
activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
|
|
319
|
+
lastState: import("convex/values").VString<string | undefined, "optional">;
|
|
320
|
+
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
321
|
+
operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
322
|
+
}, "required", "accounted" | "activeOperationId" | "affiliateAccountId" | "chargeAmount" | "creditAmount" | "currency" | "debtAmount" | "debtStatus" | "disputeId" | "disputeState" | "disputedPrincipal" | "earningId" | "finalizedAmount" | "lastError" | "lastRefundId" | "lastState" | "legacyReceiptIds" | "legacyRestorationIds" | "lostPrincipal" | "needsReconciliation" | "offsetAmount" | "operationSequence" | "operatorNote" | "originalCommission" | "paymentId" | "paymentIntentId" | "provisionalAmount" | "recoveredAmount" | "refundedPrincipal" | "releasedCommission" | "reservedRecovery" | "reservedRestoration" | "restoredAmount" | "sourceChargeId" | "sourceInvoiceId" | "storeAccountId" | "stripeTransferId">, {
|
|
323
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
324
|
+
by_affiliate_currency_debt: ["affiliateAccountId", "currency", "debtStatus", "_creationTime"];
|
|
325
|
+
by_charge: ["sourceChargeId", "_creationTime"];
|
|
326
|
+
by_transfer: ["stripeTransferId", "_creationTime"];
|
|
327
|
+
}, {}, {}>;
|
|
328
|
+
affiliateRecoveryOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
329
|
+
amount: number;
|
|
330
|
+
attempted: boolean;
|
|
331
|
+
createdAt: number;
|
|
332
|
+
error?: string | undefined;
|
|
333
|
+
kind: "recovery" | "restoration";
|
|
334
|
+
obligationId: import("convex/values").GenericId<"affiliateObligations">;
|
|
335
|
+
providerBaseline?: number | undefined;
|
|
336
|
+
receiptId?: string | undefined;
|
|
337
|
+
sourceEventId?: string | undefined;
|
|
338
|
+
state: "canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported";
|
|
339
|
+
}, {
|
|
340
|
+
obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
|
|
341
|
+
sourceEventId: import("convex/values").VString<string | undefined, "optional">;
|
|
342
|
+
kind: import("convex/values").VUnion<"recovery" | "restoration", [import("convex/values").VLiteral<"recovery", "required">, import("convex/values").VLiteral<"restoration", "required">], "required", never>;
|
|
343
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
344
|
+
state: import("convex/values").VUnion<"canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"insufficient_balance", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
345
|
+
receiptId: import("convex/values").VString<string | undefined, "optional">;
|
|
346
|
+
error: import("convex/values").VString<string | undefined, "optional">;
|
|
347
|
+
attempted: import("convex/values").VBoolean<boolean, "required">;
|
|
348
|
+
providerBaseline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
349
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
350
|
+
}, "required", "amount" | "attempted" | "createdAt" | "error" | "kind" | "obligationId" | "providerBaseline" | "receiptId" | "sourceEventId" | "state">, {
|
|
351
|
+
by_obligation: ["obligationId", "_creationTime"];
|
|
352
|
+
by_state: ["state", "_creationTime"];
|
|
353
|
+
}, {}, {}>;
|
|
354
|
+
affiliatePayoutReleases: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
355
|
+
affiliateAccountId: string;
|
|
356
|
+
amount: number;
|
|
357
|
+
createdAt: number;
|
|
358
|
+
currency: string;
|
|
359
|
+
minimumAmount: number;
|
|
360
|
+
operationKey: string;
|
|
361
|
+
state: "failed" | "pending" | "submitted" | "unknown";
|
|
362
|
+
stripePayoutId?: string | undefined;
|
|
363
|
+
}, {
|
|
364
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
365
|
+
currency: import("convex/values").VString<string, "required">;
|
|
366
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
367
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
368
|
+
minimumAmount: import("convex/values").VFloat64<number, "required">;
|
|
369
|
+
state: import("convex/values").VUnion<"failed" | "pending" | "submitted" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
370
|
+
stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
371
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
372
|
+
}, "required", "affiliateAccountId" | "amount" | "createdAt" | "currency" | "minimumAmount" | "operationKey" | "state" | "stripePayoutId">, {
|
|
373
|
+
by_key: ["operationKey", "_creationTime"];
|
|
374
|
+
by_state: ["state", "_creationTime"];
|
|
375
|
+
}, {}, {}>;
|
|
376
|
+
affiliateEarnings: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
377
|
+
affiliateAccountId: string;
|
|
378
|
+
currency: string;
|
|
379
|
+
originalCommission: number;
|
|
380
|
+
paymentIntentId?: string | undefined;
|
|
381
|
+
releaseAmount: number;
|
|
382
|
+
sourceChargeId: string;
|
|
383
|
+
sourceInvoiceId?: string | undefined;
|
|
384
|
+
status: "paid" | "reserved";
|
|
385
|
+
stripeTransferId?: string | undefined;
|
|
386
|
+
withheldAmount: number;
|
|
387
|
+
}, {
|
|
388
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
389
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
390
|
+
currency: import("convex/values").VString<string, "required">;
|
|
391
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
392
|
+
withheldAmount: import("convex/values").VFloat64<number, "required">;
|
|
393
|
+
releaseAmount: import("convex/values").VFloat64<number, "required">;
|
|
394
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
395
|
+
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
396
|
+
stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
|
|
397
|
+
status: import("convex/values").VUnion<"paid" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"paid", "required">], "required", never>;
|
|
398
|
+
}, "required", "affiliateAccountId" | "currency" | "originalCommission" | "paymentIntentId" | "releaseAmount" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "withheldAmount">, {
|
|
399
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
400
|
+
by_charge_affiliate: ["sourceChargeId", "affiliateAccountId", "_creationTime"];
|
|
401
|
+
}, {}, {}>;
|
|
402
|
+
affiliateOffsets: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
403
|
+
amount: number;
|
|
404
|
+
earningId: import("convex/values").GenericId<"affiliateEarnings">;
|
|
405
|
+
obligationId: import("convex/values").GenericId<"affiliateObligations">;
|
|
406
|
+
}, {
|
|
407
|
+
earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings">, "required">;
|
|
408
|
+
obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
|
|
409
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
410
|
+
}, "required", "amount" | "earningId" | "obligationId">, {
|
|
411
|
+
by_earning: ["earningId", "_creationTime"];
|
|
412
|
+
by_obligation: ["obligationId", "_creationTime"];
|
|
413
|
+
}, {}, {}>;
|
|
414
|
+
affiliateRecoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
415
|
+
activePayoutKey?: string | undefined;
|
|
416
|
+
affiliateAccountId: string;
|
|
417
|
+
currency: string;
|
|
418
|
+
netPayable: number;
|
|
419
|
+
offsetAmount: number;
|
|
420
|
+
originalCommission: number;
|
|
421
|
+
outstandingDebt: number;
|
|
422
|
+
pendingPayoutAmount?: number | undefined;
|
|
423
|
+
recoveredAmount: number;
|
|
424
|
+
reservedRecovery: number;
|
|
425
|
+
reservedRestoration: number;
|
|
426
|
+
restorationDue: number;
|
|
427
|
+
restoredAmount: number;
|
|
428
|
+
withheldAmount: number;
|
|
429
|
+
}, {
|
|
430
|
+
activePayoutKey: import("convex/values").VString<string | undefined, "optional">;
|
|
431
|
+
pendingPayoutAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
432
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
433
|
+
currency: import("convex/values").VString<string, "required">;
|
|
434
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
435
|
+
recoveredAmount: import("convex/values").VFloat64<number, "required">;
|
|
436
|
+
offsetAmount: import("convex/values").VFloat64<number, "required">;
|
|
437
|
+
restoredAmount: import("convex/values").VFloat64<number, "required">;
|
|
438
|
+
outstandingDebt: import("convex/values").VFloat64<number, "required">;
|
|
439
|
+
reservedRecovery: import("convex/values").VFloat64<number, "required">;
|
|
440
|
+
reservedRestoration: import("convex/values").VFloat64<number, "required">;
|
|
441
|
+
restorationDue: import("convex/values").VFloat64<number, "required">;
|
|
442
|
+
withheldAmount: import("convex/values").VFloat64<number, "required">;
|
|
443
|
+
netPayable: import("convex/values").VFloat64<number, "required">;
|
|
444
|
+
}, "required", "activePayoutKey" | "affiliateAccountId" | "currency" | "netPayable" | "offsetAmount" | "originalCommission" | "outstandingDebt" | "pendingPayoutAmount" | "recoveredAmount" | "reservedRecovery" | "reservedRestoration" | "restorationDue" | "restoredAmount" | "withheldAmount">, {
|
|
445
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
446
|
+
}, {}, {}>;
|
|
447
|
+
affiliateReversalReceipts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
448
|
+
amount: number;
|
|
449
|
+
operationId: string;
|
|
450
|
+
stripeReversalId: string;
|
|
451
|
+
stripeTransferId: string;
|
|
452
|
+
}, {
|
|
453
|
+
stripeReversalId: import("convex/values").VString<string, "required">;
|
|
454
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
455
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
456
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
457
|
+
}, "required", "amount" | "operationId" | "stripeReversalId" | "stripeTransferId">, {
|
|
458
|
+
by_receipt: ["stripeReversalId", "_creationTime"];
|
|
459
|
+
by_transfer: ["stripeTransferId", "_creationTime"];
|
|
460
|
+
by_transfer_operation: ["stripeTransferId", "operationId", "_creationTime"];
|
|
461
|
+
}, {}, {}>;
|
|
17
462
|
payoutSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
18
463
|
acceptedAt?: number | undefined;
|
|
19
464
|
acceptedFingerprint?: string | undefined;
|
|
@@ -154,6 +599,7 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
154
599
|
by_provider_payout: ["stripePayoutId", "_creationTime"];
|
|
155
600
|
by_rejection_request: ["rejection.requestId", "_creationTime"];
|
|
156
601
|
by_return_receipt: ["returnTransactionId", "_creationTime"];
|
|
602
|
+
by_status: ["status", "_creationTime"];
|
|
157
603
|
}, {}, {}>;
|
|
158
604
|
payoutSourceAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
159
605
|
accountId: string;
|
|
@@ -222,6 +668,8 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
222
668
|
}, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
|
|
223
669
|
by_account: ["accountId", "_creationTime"];
|
|
224
670
|
by_deadline: ["holdDeadline", "_creationTime"];
|
|
671
|
+
by_mode_status: ["mode", "status", "_creationTime"];
|
|
672
|
+
by_status: ["status", "_creationTime"];
|
|
225
673
|
}, {}, {}>;
|
|
226
674
|
payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
227
675
|
accountId: string;
|
|
@@ -1134,6 +1582,16 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
1134
1582
|
by_stripe_transfer_id: ["stripeTransferId", "_creationTime"];
|
|
1135
1583
|
}, {}, {}>;
|
|
1136
1584
|
transferReversalOps: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1585
|
+
commissionExposure?: {
|
|
1586
|
+
chargeAmount: number;
|
|
1587
|
+
disputeId?: string | undefined;
|
|
1588
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
1589
|
+
finalized: boolean;
|
|
1590
|
+
kind: "dispute" | "refund";
|
|
1591
|
+
principal: number;
|
|
1592
|
+
refundId?: string | undefined;
|
|
1593
|
+
refundedPrincipal?: number | undefined;
|
|
1594
|
+
} | undefined;
|
|
1137
1595
|
operationId: string;
|
|
1138
1596
|
slices: {
|
|
1139
1597
|
from: number;
|
|
@@ -1157,8 +1615,28 @@ export declare function setup(scope?: Scope): Promise<{
|
|
|
1157
1615
|
from: import("convex/values").VFloat64<number, "required">;
|
|
1158
1616
|
to: import("convex/values").VFloat64<number, "required">;
|
|
1159
1617
|
}, "required", "from" | "stripeTransferId" | "to">, "required">;
|
|
1160
|
-
|
|
1618
|
+
commissionExposure: import("convex/values").VObject<{
|
|
1619
|
+
chargeAmount: number;
|
|
1620
|
+
disputeId?: string | undefined;
|
|
1621
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
1622
|
+
finalized: boolean;
|
|
1623
|
+
kind: "dispute" | "refund";
|
|
1624
|
+
principal: number;
|
|
1625
|
+
refundId?: string | undefined;
|
|
1626
|
+
refundedPrincipal?: number | undefined;
|
|
1627
|
+
} | undefined, {
|
|
1628
|
+
kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
|
|
1629
|
+
chargeAmount: import("convex/values").VFloat64<number, "required">;
|
|
1630
|
+
principal: import("convex/values").VFloat64<number, "required">;
|
|
1631
|
+
finalized: import("convex/values").VBoolean<boolean, "required">;
|
|
1632
|
+
disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
|
|
1633
|
+
disputeId: import("convex/values").VString<string | undefined, "optional">;
|
|
1634
|
+
refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1635
|
+
refundId: import("convex/values").VString<string | undefined, "optional">;
|
|
1636
|
+
}, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
|
|
1637
|
+
}, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {
|
|
1161
1638
|
by_operation_id: ["operationId", "_creationTime"];
|
|
1639
|
+
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
1162
1640
|
}, {}, {}>;
|
|
1163
1641
|
webhookEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1164
1642
|
eventType: string;
|
|
@@ -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,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,KAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACtB,wBAAsB,SAAS,kBAU9B;AACD,wBAAsB,KAAK,CACzB,KAAK,GAAE,KAAsD
|
|
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,cAAc,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,KAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;AACtB,wBAAsB,SAAS,kBAU9B;AACD,wBAAsB,KAAK,CACzB,KAAK,GAAE,KAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkCzC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQtC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { Infer } from "convex/values";
|
|
2
|
+
import type { jobDoc } from "../../component/payoutWorker/schema.js";
|
|
3
|
+
import type { policyDoc } from "../../component/payoutPolicy/schema.js";
|
|
4
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
5
|
+
import type { PayoutReleaseOptions, PayoutReleaseResult } from "./payoutExecution.js";
|
|
6
|
+
import type { PayoutReconciliationOptions, PayoutReconciliation } from "./payoutReconciliation.js";
|
|
7
|
+
export type PayoutWorkerJob = Infer<typeof jobDoc>;
|
|
8
|
+
export type PayoutWorkerScope = {
|
|
9
|
+
accountId: string;
|
|
10
|
+
ownerKey: string;
|
|
11
|
+
currency: string;
|
|
12
|
+
};
|
|
13
|
+
export type PayoutWorkerOptions = Omit<PayoutReleaseOptions, "operationKey"> & {
|
|
14
|
+
cadenceMs?: number;
|
|
15
|
+
};
|
|
16
|
+
type PageOptions = {
|
|
17
|
+
cursor: string | null;
|
|
18
|
+
numItems: number;
|
|
19
|
+
};
|
|
20
|
+
type Page<T> = {
|
|
21
|
+
page: T[];
|
|
22
|
+
continueCursor: string;
|
|
23
|
+
isDone: boolean;
|
|
24
|
+
};
|
|
25
|
+
type Held = {
|
|
26
|
+
status: "held";
|
|
27
|
+
reason: string;
|
|
28
|
+
nextAttemptAt?: number;
|
|
29
|
+
};
|
|
30
|
+
export type PayoutWorkerResult = Held | {
|
|
31
|
+
status: "completed";
|
|
32
|
+
job: PayoutWorkerJob;
|
|
33
|
+
payout: PayoutReleaseResult;
|
|
34
|
+
};
|
|
35
|
+
/** Host cron only. No method on this worker represents a customer withdrawal request. */
|
|
36
|
+
export declare class PayoutWorkerClient {
|
|
37
|
+
private readonly component;
|
|
38
|
+
private readonly release;
|
|
39
|
+
private readonly reconcile;
|
|
40
|
+
constructor(component: Component, release: (ctx: RunCtx, opts: PayoutReleaseOptions) => Promise<PayoutReleaseResult>, reconcile: (ctx: RunCtx, opts: PayoutReconciliationOptions) => Promise<PayoutReconciliation>);
|
|
41
|
+
get(ctx: RunCtx, scope: PayoutWorkerScope): Promise<PayoutWorkerJob | null>;
|
|
42
|
+
policies(ctx: RunCtx, paginationOpts: PageOptions): Promise<Page<Infer<typeof policyDoc>>>;
|
|
43
|
+
recovering(ctx: RunCtx, paginationOpts: PageOptions): Promise<Page<PayoutWorkerJob>>;
|
|
44
|
+
changing(ctx: RunCtx, paginationOpts: PageOptions): Promise<Page<Infer<typeof policyDoc>>>;
|
|
45
|
+
run(ctx: RunCtx, opts: PayoutWorkerOptions): Promise<PayoutWorkerResult>;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=payoutWorker.d.ts.map
|
|
@@ -0,0 +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,EAAE,MAAM,EAAE,MAAM,wCAAwC,CAAC;AACrE,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/D,KAAK,IAAI,CAAC,CAAC,IAAI;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AACtE,KAAK,IAAI,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvE,MAAM,MAAM,kBAAkB,GAC1B,IAAI,GACJ;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAC/E,yFAAyF;AACzF,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAIxB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAN5B,YACmB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,CACxB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,mBAAmB,CAAC,EAChB,SAAS,EAAE,CAC1B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,2BAA2B,KAC9B,OAAO,CAAC,oBAAoB,CAAC,EAChC;IACJ,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAS1E;IACD,QAAQ,CACN,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,GAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAKxC;IACD,UAAU,CACR,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,GAC1B,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAKhC;IACD,QAAQ,CACN,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,GAC1B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAKxC;IACK,GAAG,CACP,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,kBAAkB,CAAC,CA4D7B;CACF"}
|