@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
|
@@ -19,6 +19,398 @@ import type { FunctionReference } from "convex/server";
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
export type ComponentApi<Name extends string | undefined = string | undefined> = {
|
|
22
|
+
affiliateEarnings: {
|
|
23
|
+
mutations: {
|
|
24
|
+
confirmEarning: FunctionReference<"mutation", "internal", {
|
|
25
|
+
earningId: string;
|
|
26
|
+
stripeTransferId?: string;
|
|
27
|
+
}, null, Name>;
|
|
28
|
+
reserveEarning: FunctionReference<"mutation", "internal", {
|
|
29
|
+
affiliateAccountId: string;
|
|
30
|
+
sourceChargeId: string;
|
|
31
|
+
}, {
|
|
32
|
+
_creationTime: number;
|
|
33
|
+
_id: string;
|
|
34
|
+
affiliateAccountId: string;
|
|
35
|
+
currency: string;
|
|
36
|
+
originalCommission: number;
|
|
37
|
+
paymentIntentId?: string;
|
|
38
|
+
releaseAmount: number;
|
|
39
|
+
sourceChargeId: string;
|
|
40
|
+
sourceInvoiceId?: string;
|
|
41
|
+
status: "reserved" | "paid";
|
|
42
|
+
stripeTransferId?: string;
|
|
43
|
+
withheldAmount: number;
|
|
44
|
+
}, Name>;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
affiliatePayouts: {
|
|
48
|
+
mutations: {
|
|
49
|
+
finishPayout: FunctionReference<"mutation", "internal", {
|
|
50
|
+
operationKey: string;
|
|
51
|
+
state: "unknown" | "submitted" | "failed";
|
|
52
|
+
stripePayoutId?: string;
|
|
53
|
+
}, null, Name>;
|
|
54
|
+
reservePayout: FunctionReference<"mutation", "internal", {
|
|
55
|
+
affiliateAccountId: string;
|
|
56
|
+
amount: number;
|
|
57
|
+
currency: string;
|
|
58
|
+
minimumAmount: number;
|
|
59
|
+
now: number;
|
|
60
|
+
operationKey?: string;
|
|
61
|
+
}, {
|
|
62
|
+
_creationTime: number;
|
|
63
|
+
_id: string;
|
|
64
|
+
affiliateAccountId: string;
|
|
65
|
+
amount: number;
|
|
66
|
+
createdAt: number;
|
|
67
|
+
currency: string;
|
|
68
|
+
minimumAmount: number;
|
|
69
|
+
operationKey: string;
|
|
70
|
+
state: "pending" | "unknown" | "submitted" | "failed";
|
|
71
|
+
stripePayoutId?: string;
|
|
72
|
+
} | null, Name>;
|
|
73
|
+
};
|
|
74
|
+
queries: {
|
|
75
|
+
pendingPayouts: FunctionReference<"query", "internal", {
|
|
76
|
+
paginationOpts: {
|
|
77
|
+
cursor: string | null;
|
|
78
|
+
endCursor?: string | null;
|
|
79
|
+
id?: number;
|
|
80
|
+
maximumBytesRead?: number;
|
|
81
|
+
maximumRowsRead?: number;
|
|
82
|
+
numItems: number;
|
|
83
|
+
};
|
|
84
|
+
state: "pending" | "unknown";
|
|
85
|
+
}, {
|
|
86
|
+
continueCursor: string;
|
|
87
|
+
isDone: boolean;
|
|
88
|
+
page: Array<{
|
|
89
|
+
_creationTime: number;
|
|
90
|
+
_id: string;
|
|
91
|
+
affiliateAccountId: string;
|
|
92
|
+
amount: number;
|
|
93
|
+
createdAt: number;
|
|
94
|
+
currency: string;
|
|
95
|
+
minimumAmount: number;
|
|
96
|
+
operationKey: string;
|
|
97
|
+
state: "pending" | "unknown" | "submitted" | "failed";
|
|
98
|
+
stripePayoutId?: string;
|
|
99
|
+
}>;
|
|
100
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
101
|
+
splitCursor?: string | null;
|
|
102
|
+
}, Name>;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
affiliateRecovery: {
|
|
106
|
+
mutations: {
|
|
107
|
+
beginOperation: FunctionReference<"mutation", "internal", {
|
|
108
|
+
operationId: string;
|
|
109
|
+
}, {
|
|
110
|
+
_creationTime: number;
|
|
111
|
+
_id: string;
|
|
112
|
+
amount: number;
|
|
113
|
+
attempted: boolean;
|
|
114
|
+
createdAt: number;
|
|
115
|
+
error?: string;
|
|
116
|
+
kind: "recovery" | "restoration";
|
|
117
|
+
obligationId: string;
|
|
118
|
+
providerBaseline?: number;
|
|
119
|
+
receiptId?: string;
|
|
120
|
+
sourceEventId?: string;
|
|
121
|
+
state: "pending" | "unknown" | "insufficient_balance" | "unsupported" | "failed" | "succeeded" | "canceled";
|
|
122
|
+
}, Name>;
|
|
123
|
+
completeOperation: FunctionReference<"mutation", "internal", {
|
|
124
|
+
confirmedTransferReversed?: number;
|
|
125
|
+
error?: string;
|
|
126
|
+
operationId: string;
|
|
127
|
+
receiptId?: string;
|
|
128
|
+
state: "pending" | "unknown" | "insufficient_balance" | "unsupported" | "failed" | "succeeded" | "canceled";
|
|
129
|
+
}, null, Name>;
|
|
130
|
+
reserveOperation: FunctionReference<"mutation", "internal", {
|
|
131
|
+
kind: "recovery" | "restoration";
|
|
132
|
+
now: number;
|
|
133
|
+
obligationId: string;
|
|
134
|
+
}, {
|
|
135
|
+
_creationTime: number;
|
|
136
|
+
_id: string;
|
|
137
|
+
amount: number;
|
|
138
|
+
attempted: boolean;
|
|
139
|
+
createdAt: number;
|
|
140
|
+
error?: string;
|
|
141
|
+
kind: "recovery" | "restoration";
|
|
142
|
+
obligationId: string;
|
|
143
|
+
providerBaseline?: number;
|
|
144
|
+
receiptId?: string;
|
|
145
|
+
sourceEventId?: string;
|
|
146
|
+
state: "pending" | "unknown" | "insufficient_balance" | "unsupported" | "failed" | "succeeded" | "canceled";
|
|
147
|
+
} | null, Name>;
|
|
148
|
+
reviewLegacy: FunctionReference<"mutation", "internal", {
|
|
149
|
+
exposure: {
|
|
150
|
+
chargeAmount: number;
|
|
151
|
+
disputeId?: string;
|
|
152
|
+
disputeState?: "open" | "lost" | "won";
|
|
153
|
+
finalized: boolean;
|
|
154
|
+
kind: "refund" | "dispute";
|
|
155
|
+
principal: number;
|
|
156
|
+
refundId?: string;
|
|
157
|
+
refundedPrincipal?: number;
|
|
158
|
+
};
|
|
159
|
+
note: string;
|
|
160
|
+
obligationId: string;
|
|
161
|
+
receipts: Array<{
|
|
162
|
+
amount: number;
|
|
163
|
+
id: string;
|
|
164
|
+
}>;
|
|
165
|
+
recoveredAmount: number;
|
|
166
|
+
restorationIds: Array<string>;
|
|
167
|
+
restoredAmount: number;
|
|
168
|
+
}, null, Name>;
|
|
169
|
+
};
|
|
170
|
+
queries: {
|
|
171
|
+
chargeObligations: FunctionReference<"query", "internal", {
|
|
172
|
+
sourceChargeId: string;
|
|
173
|
+
}, Array<{
|
|
174
|
+
_creationTime: number;
|
|
175
|
+
_id: string;
|
|
176
|
+
accounted?: boolean;
|
|
177
|
+
activeOperationId?: string;
|
|
178
|
+
affiliateAccountId: string;
|
|
179
|
+
chargeAmount: number;
|
|
180
|
+
creditAmount?: number;
|
|
181
|
+
currency: string;
|
|
182
|
+
debtAmount?: number;
|
|
183
|
+
debtStatus?: "open" | "settled";
|
|
184
|
+
disputeId?: string;
|
|
185
|
+
disputeState?: "open" | "lost" | "won";
|
|
186
|
+
disputedPrincipal: number;
|
|
187
|
+
earningId?: string;
|
|
188
|
+
finalizedAmount: number;
|
|
189
|
+
lastError?: string;
|
|
190
|
+
lastRefundId?: string;
|
|
191
|
+
lastState?: string;
|
|
192
|
+
legacyReceiptIds?: Array<string>;
|
|
193
|
+
legacyRestorationIds?: Array<string>;
|
|
194
|
+
lostPrincipal: number;
|
|
195
|
+
needsReconciliation: boolean;
|
|
196
|
+
offsetAmount?: number;
|
|
197
|
+
operationSequence?: number;
|
|
198
|
+
operatorNote?: string;
|
|
199
|
+
originalCommission: number;
|
|
200
|
+
paymentId?: string;
|
|
201
|
+
paymentIntentId?: string;
|
|
202
|
+
provisionalAmount: number;
|
|
203
|
+
recoveredAmount: number;
|
|
204
|
+
refundedPrincipal: number;
|
|
205
|
+
releasedCommission?: number;
|
|
206
|
+
reservedRecovery?: number;
|
|
207
|
+
reservedRestoration?: number;
|
|
208
|
+
restoredAmount?: number;
|
|
209
|
+
sourceChargeId: string;
|
|
210
|
+
sourceInvoiceId?: string;
|
|
211
|
+
storeAccountId?: string;
|
|
212
|
+
stripeTransferId?: string;
|
|
213
|
+
}>, Name>;
|
|
214
|
+
getEarning: FunctionReference<"query", "internal", {
|
|
215
|
+
affiliateAccountId: string;
|
|
216
|
+
sourceChargeId: string;
|
|
217
|
+
}, {
|
|
218
|
+
_creationTime: number;
|
|
219
|
+
_id: string;
|
|
220
|
+
affiliateAccountId: string;
|
|
221
|
+
currency: string;
|
|
222
|
+
originalCommission: number;
|
|
223
|
+
paymentIntentId?: string;
|
|
224
|
+
releaseAmount: number;
|
|
225
|
+
sourceChargeId: string;
|
|
226
|
+
sourceInvoiceId?: string;
|
|
227
|
+
status: "reserved" | "paid";
|
|
228
|
+
stripeTransferId?: string;
|
|
229
|
+
withheldAmount: number;
|
|
230
|
+
} | null, Name>;
|
|
231
|
+
getObligation: FunctionReference<"query", "internal", {
|
|
232
|
+
obligationId: string;
|
|
233
|
+
}, {
|
|
234
|
+
_creationTime: number;
|
|
235
|
+
_id: string;
|
|
236
|
+
accounted?: boolean;
|
|
237
|
+
activeOperationId?: string;
|
|
238
|
+
affiliateAccountId: string;
|
|
239
|
+
chargeAmount: number;
|
|
240
|
+
creditAmount?: number;
|
|
241
|
+
currency: string;
|
|
242
|
+
debtAmount?: number;
|
|
243
|
+
debtStatus?: "open" | "settled";
|
|
244
|
+
disputeId?: string;
|
|
245
|
+
disputeState?: "open" | "lost" | "won";
|
|
246
|
+
disputedPrincipal: number;
|
|
247
|
+
earningId?: string;
|
|
248
|
+
finalizedAmount: number;
|
|
249
|
+
lastError?: string;
|
|
250
|
+
lastRefundId?: string;
|
|
251
|
+
lastState?: string;
|
|
252
|
+
legacyReceiptIds?: Array<string>;
|
|
253
|
+
legacyRestorationIds?: Array<string>;
|
|
254
|
+
lostPrincipal: number;
|
|
255
|
+
needsReconciliation: boolean;
|
|
256
|
+
offsetAmount?: number;
|
|
257
|
+
operationSequence?: number;
|
|
258
|
+
operatorNote?: string;
|
|
259
|
+
originalCommission: number;
|
|
260
|
+
paymentId?: string;
|
|
261
|
+
paymentIntentId?: string;
|
|
262
|
+
provisionalAmount: number;
|
|
263
|
+
recoveredAmount: number;
|
|
264
|
+
refundedPrincipal: number;
|
|
265
|
+
releasedCommission?: number;
|
|
266
|
+
reservedRecovery?: number;
|
|
267
|
+
reservedRestoration?: number;
|
|
268
|
+
restoredAmount?: number;
|
|
269
|
+
sourceChargeId: string;
|
|
270
|
+
sourceInvoiceId?: string;
|
|
271
|
+
storeAccountId?: string;
|
|
272
|
+
stripeTransferId?: string;
|
|
273
|
+
} | null, Name>;
|
|
274
|
+
operationHistory: FunctionReference<"query", "internal", {
|
|
275
|
+
obligationId: string;
|
|
276
|
+
paginationOpts: {
|
|
277
|
+
cursor: string | null;
|
|
278
|
+
endCursor?: string | null;
|
|
279
|
+
id?: number;
|
|
280
|
+
maximumBytesRead?: number;
|
|
281
|
+
maximumRowsRead?: number;
|
|
282
|
+
numItems: number;
|
|
283
|
+
};
|
|
284
|
+
}, {
|
|
285
|
+
continueCursor: string;
|
|
286
|
+
isDone: boolean;
|
|
287
|
+
page: Array<{
|
|
288
|
+
_creationTime: number;
|
|
289
|
+
_id: string;
|
|
290
|
+
amount: number;
|
|
291
|
+
attempted: boolean;
|
|
292
|
+
createdAt: number;
|
|
293
|
+
error?: string;
|
|
294
|
+
kind: "recovery" | "restoration";
|
|
295
|
+
obligationId: string;
|
|
296
|
+
providerBaseline?: number;
|
|
297
|
+
receiptId?: string;
|
|
298
|
+
sourceEventId?: string;
|
|
299
|
+
state: "pending" | "unknown" | "insufficient_balance" | "unsupported" | "failed" | "succeeded" | "canceled";
|
|
300
|
+
}>;
|
|
301
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
302
|
+
splitCursor?: string | null;
|
|
303
|
+
}, Name>;
|
|
304
|
+
pendingOperations: FunctionReference<"query", "internal", {
|
|
305
|
+
paginationOpts: {
|
|
306
|
+
cursor: string | null;
|
|
307
|
+
endCursor?: string | null;
|
|
308
|
+
id?: number;
|
|
309
|
+
maximumBytesRead?: number;
|
|
310
|
+
maximumRowsRead?: number;
|
|
311
|
+
numItems: number;
|
|
312
|
+
};
|
|
313
|
+
state: "pending" | "unknown";
|
|
314
|
+
}, {
|
|
315
|
+
continueCursor: string;
|
|
316
|
+
isDone: boolean;
|
|
317
|
+
page: Array<{
|
|
318
|
+
_creationTime: number;
|
|
319
|
+
_id: string;
|
|
320
|
+
amount: number;
|
|
321
|
+
attempted: boolean;
|
|
322
|
+
createdAt: number;
|
|
323
|
+
error?: string;
|
|
324
|
+
kind: "recovery" | "restoration";
|
|
325
|
+
obligationId: string;
|
|
326
|
+
providerBaseline?: number;
|
|
327
|
+
receiptId?: string;
|
|
328
|
+
sourceEventId?: string;
|
|
329
|
+
state: "pending" | "unknown" | "insufficient_balance" | "unsupported" | "failed" | "succeeded" | "canceled";
|
|
330
|
+
}>;
|
|
331
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
332
|
+
splitCursor?: string | null;
|
|
333
|
+
}, Name>;
|
|
334
|
+
recoverySnapshot: FunctionReference<"query", "internal", {
|
|
335
|
+
affiliateAccountId: string;
|
|
336
|
+
currency: string;
|
|
337
|
+
paginationOpts: {
|
|
338
|
+
cursor: string | null;
|
|
339
|
+
endCursor?: string | null;
|
|
340
|
+
id?: number;
|
|
341
|
+
maximumBytesRead?: number;
|
|
342
|
+
maximumRowsRead?: number;
|
|
343
|
+
numItems: number;
|
|
344
|
+
};
|
|
345
|
+
}, {
|
|
346
|
+
balance: {
|
|
347
|
+
_creationTime: number;
|
|
348
|
+
_id: string;
|
|
349
|
+
activePayoutKey?: string;
|
|
350
|
+
affiliateAccountId: string;
|
|
351
|
+
currency: string;
|
|
352
|
+
netPayable: number;
|
|
353
|
+
offsetAmount: number;
|
|
354
|
+
originalCommission: number;
|
|
355
|
+
outstandingDebt: number;
|
|
356
|
+
pendingPayoutAmount?: number;
|
|
357
|
+
recoveredAmount: number;
|
|
358
|
+
reservedRecovery: number;
|
|
359
|
+
reservedRestoration: number;
|
|
360
|
+
restorationDue: number;
|
|
361
|
+
restoredAmount: number;
|
|
362
|
+
withheldAmount: number;
|
|
363
|
+
} | null;
|
|
364
|
+
obligations: {
|
|
365
|
+
continueCursor: string;
|
|
366
|
+
isDone: boolean;
|
|
367
|
+
page: Array<{
|
|
368
|
+
_creationTime: number;
|
|
369
|
+
_id: string;
|
|
370
|
+
accounted?: boolean;
|
|
371
|
+
activeOperationId?: string;
|
|
372
|
+
affiliateAccountId: string;
|
|
373
|
+
chargeAmount: number;
|
|
374
|
+
creditAmount?: number;
|
|
375
|
+
currency: string;
|
|
376
|
+
debtAmount?: number;
|
|
377
|
+
debtStatus?: "open" | "settled";
|
|
378
|
+
disputeId?: string;
|
|
379
|
+
disputeState?: "open" | "lost" | "won";
|
|
380
|
+
disputedPrincipal: number;
|
|
381
|
+
earningId?: string;
|
|
382
|
+
finalizedAmount: number;
|
|
383
|
+
lastError?: string;
|
|
384
|
+
lastRefundId?: string;
|
|
385
|
+
lastState?: string;
|
|
386
|
+
legacyReceiptIds?: Array<string>;
|
|
387
|
+
legacyRestorationIds?: Array<string>;
|
|
388
|
+
lostPrincipal: number;
|
|
389
|
+
needsReconciliation: boolean;
|
|
390
|
+
offsetAmount?: number;
|
|
391
|
+
operationSequence?: number;
|
|
392
|
+
operatorNote?: string;
|
|
393
|
+
originalCommission: number;
|
|
394
|
+
paymentId?: string;
|
|
395
|
+
paymentIntentId?: string;
|
|
396
|
+
provisionalAmount: number;
|
|
397
|
+
recoveredAmount: number;
|
|
398
|
+
refundedPrincipal: number;
|
|
399
|
+
releasedCommission?: number;
|
|
400
|
+
reservedRecovery?: number;
|
|
401
|
+
reservedRestoration?: number;
|
|
402
|
+
restoredAmount?: number;
|
|
403
|
+
sourceChargeId: string;
|
|
404
|
+
sourceInvoiceId?: string;
|
|
405
|
+
storeAccountId?: string;
|
|
406
|
+
stripeTransferId?: string;
|
|
407
|
+
}>;
|
|
408
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
409
|
+
splitCursor?: string | null;
|
|
410
|
+
};
|
|
411
|
+
}, Name>;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
22
414
|
billing: {
|
|
23
415
|
mutations: {
|
|
24
416
|
upsertCheckoutSession: FunctionReference<"mutation", "internal", {
|
|
@@ -572,6 +964,16 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
572
964
|
connect: {
|
|
573
965
|
mutations: {
|
|
574
966
|
claimReversalSlices: FunctionReference<"mutation", "internal", {
|
|
967
|
+
commissionExposure?: {
|
|
968
|
+
chargeAmount: number;
|
|
969
|
+
disputeId?: string;
|
|
970
|
+
disputeState?: "open" | "lost" | "won";
|
|
971
|
+
finalized: boolean;
|
|
972
|
+
kind: "refund" | "dispute";
|
|
973
|
+
principal: number;
|
|
974
|
+
refundId?: string;
|
|
975
|
+
refundedPrincipal?: number;
|
|
976
|
+
};
|
|
575
977
|
mode: {
|
|
576
978
|
kind: "full";
|
|
577
979
|
} | {
|
|
@@ -590,6 +992,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
590
992
|
}, {
|
|
591
993
|
replay: boolean;
|
|
592
994
|
slices: Array<{
|
|
995
|
+
commissionTracked?: boolean;
|
|
593
996
|
confirmed: number;
|
|
594
997
|
from: number;
|
|
595
998
|
stripeTransferId: string;
|
|
@@ -602,6 +1005,11 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
602
1005
|
stripePaymentIntentId: string;
|
|
603
1006
|
}, null, Name>;
|
|
604
1007
|
recordTransferReversal: FunctionReference<"mutation", "internal", {
|
|
1008
|
+
receipt?: {
|
|
1009
|
+
amount: number;
|
|
1010
|
+
operationId: string;
|
|
1011
|
+
stripeReversalId: string;
|
|
1012
|
+
};
|
|
605
1013
|
reversedAmount: number;
|
|
606
1014
|
stripeTransferId: string;
|
|
607
1015
|
}, null, Name>;
|
|
@@ -907,6 +1315,16 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
907
1315
|
}, {
|
|
908
1316
|
_creationTime: number;
|
|
909
1317
|
_id: string;
|
|
1318
|
+
commissionExposure?: {
|
|
1319
|
+
chargeAmount: number;
|
|
1320
|
+
disputeId?: string;
|
|
1321
|
+
disputeState?: "open" | "lost" | "won";
|
|
1322
|
+
finalized: boolean;
|
|
1323
|
+
kind: "refund" | "dispute";
|
|
1324
|
+
principal: number;
|
|
1325
|
+
refundId?: string;
|
|
1326
|
+
refundedPrincipal?: number;
|
|
1327
|
+
};
|
|
910
1328
|
operationId: string;
|
|
911
1329
|
slices: Array<{
|
|
912
1330
|
from: number;
|
|
@@ -2530,6 +2948,116 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2530
2948
|
}, Name>;
|
|
2531
2949
|
};
|
|
2532
2950
|
};
|
|
2951
|
+
payoutSnapshots: {
|
|
2952
|
+
mutations: {
|
|
2953
|
+
advance: FunctionReference<"mutation", "internal", {
|
|
2954
|
+
accountId: string;
|
|
2955
|
+
batchSize?: number;
|
|
2956
|
+
expectedStep: number;
|
|
2957
|
+
operationKey: string;
|
|
2958
|
+
ownerKey: string;
|
|
2959
|
+
}, {
|
|
2960
|
+
_creationTime: number;
|
|
2961
|
+
_id: string;
|
|
2962
|
+
accountId: string;
|
|
2963
|
+
allocationCount: number;
|
|
2964
|
+
allocationCursor?: string;
|
|
2965
|
+
claimCount: number;
|
|
2966
|
+
claimCursor?: string;
|
|
2967
|
+
deferredPositiveChanges: boolean;
|
|
2968
|
+
expectedRevision: number;
|
|
2969
|
+
expiresAt: number;
|
|
2970
|
+
feeCount: number;
|
|
2971
|
+
feeCursor?: string;
|
|
2972
|
+
initialRevision: number;
|
|
2973
|
+
initialRiskRevision: number;
|
|
2974
|
+
observedRevision: number;
|
|
2975
|
+
operationKey: string;
|
|
2976
|
+
ownerKey: string;
|
|
2977
|
+
phase: "sources" | "allocations" | "fees" | "claims" | "repair" | "check" | "local_ready" | "invalidated" | "discarding";
|
|
2978
|
+
policyMode?: string;
|
|
2979
|
+
policyOperationKey?: string;
|
|
2980
|
+
providerChanged: boolean;
|
|
2981
|
+
readOnly: boolean;
|
|
2982
|
+
reason?: string;
|
|
2983
|
+
riskRevision: number;
|
|
2984
|
+
sourceCount: number;
|
|
2985
|
+
sourceCursor?: string;
|
|
2986
|
+
sourceFence: number;
|
|
2987
|
+
step: number;
|
|
2988
|
+
}, Name>;
|
|
2989
|
+
begin: FunctionReference<"mutation", "internal", {
|
|
2990
|
+
accountId: string;
|
|
2991
|
+
expectedRevision: number;
|
|
2992
|
+
operationKey: string;
|
|
2993
|
+
ownerKey: string;
|
|
2994
|
+
}, {
|
|
2995
|
+
_creationTime: number;
|
|
2996
|
+
_id: string;
|
|
2997
|
+
accountId: string;
|
|
2998
|
+
allocationCount: number;
|
|
2999
|
+
allocationCursor?: string;
|
|
3000
|
+
claimCount: number;
|
|
3001
|
+
claimCursor?: string;
|
|
3002
|
+
deferredPositiveChanges: boolean;
|
|
3003
|
+
expectedRevision: number;
|
|
3004
|
+
expiresAt: number;
|
|
3005
|
+
feeCount: number;
|
|
3006
|
+
feeCursor?: string;
|
|
3007
|
+
initialRevision: number;
|
|
3008
|
+
initialRiskRevision: number;
|
|
3009
|
+
observedRevision: number;
|
|
3010
|
+
operationKey: string;
|
|
3011
|
+
ownerKey: string;
|
|
3012
|
+
phase: "sources" | "allocations" | "fees" | "claims" | "repair" | "check" | "local_ready" | "invalidated" | "discarding";
|
|
3013
|
+
policyMode?: string;
|
|
3014
|
+
policyOperationKey?: string;
|
|
3015
|
+
providerChanged: boolean;
|
|
3016
|
+
readOnly: boolean;
|
|
3017
|
+
reason?: string;
|
|
3018
|
+
riskRevision: number;
|
|
3019
|
+
sourceCount: number;
|
|
3020
|
+
sourceCursor?: string;
|
|
3021
|
+
sourceFence: number;
|
|
3022
|
+
step: number;
|
|
3023
|
+
}, Name>;
|
|
3024
|
+
discard: FunctionReference<"mutation", "internal", {
|
|
3025
|
+
accountId: string;
|
|
3026
|
+
batchSize?: number;
|
|
3027
|
+
operationKey: string;
|
|
3028
|
+
ownerKey: string;
|
|
3029
|
+
}, {
|
|
3030
|
+
_creationTime: number;
|
|
3031
|
+
_id: string;
|
|
3032
|
+
accountId: string;
|
|
3033
|
+
allocationCount: number;
|
|
3034
|
+
allocationCursor?: string;
|
|
3035
|
+
claimCount: number;
|
|
3036
|
+
claimCursor?: string;
|
|
3037
|
+
deferredPositiveChanges: boolean;
|
|
3038
|
+
expectedRevision: number;
|
|
3039
|
+
expiresAt: number;
|
|
3040
|
+
feeCount: number;
|
|
3041
|
+
feeCursor?: string;
|
|
3042
|
+
initialRevision: number;
|
|
3043
|
+
initialRiskRevision: number;
|
|
3044
|
+
observedRevision: number;
|
|
3045
|
+
operationKey: string;
|
|
3046
|
+
ownerKey: string;
|
|
3047
|
+
phase: "sources" | "allocations" | "fees" | "claims" | "repair" | "check" | "local_ready" | "invalidated" | "discarding";
|
|
3048
|
+
policyMode?: string;
|
|
3049
|
+
policyOperationKey?: string;
|
|
3050
|
+
providerChanged: boolean;
|
|
3051
|
+
readOnly: boolean;
|
|
3052
|
+
reason?: string;
|
|
3053
|
+
riskRevision: number;
|
|
3054
|
+
sourceCount: number;
|
|
3055
|
+
sourceCursor?: string;
|
|
3056
|
+
sourceFence: number;
|
|
3057
|
+
step: number;
|
|
3058
|
+
} | null, Name>;
|
|
3059
|
+
};
|
|
3060
|
+
};
|
|
2533
3061
|
payoutSync: {
|
|
2534
3062
|
mutations: {
|
|
2535
3063
|
begin: FunctionReference<"mutation", "internal", {
|
|
@@ -2599,6 +3127,189 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2599
3127
|
} | null, Name>;
|
|
2600
3128
|
};
|
|
2601
3129
|
};
|
|
3130
|
+
payoutWorker: {
|
|
3131
|
+
mutations: {
|
|
3132
|
+
begin: FunctionReference<"mutation", "internal", {
|
|
3133
|
+
accountId: string;
|
|
3134
|
+
cadenceMs: number;
|
|
3135
|
+
currency: string;
|
|
3136
|
+
ownerKey: string;
|
|
3137
|
+
}, {
|
|
3138
|
+
nextAttemptAt?: number;
|
|
3139
|
+
reason: string;
|
|
3140
|
+
status: "held";
|
|
3141
|
+
} | {
|
|
3142
|
+
job: {
|
|
3143
|
+
_creationTime: number;
|
|
3144
|
+
_id: string;
|
|
3145
|
+
accountId: string;
|
|
3146
|
+
cadenceMs: number;
|
|
3147
|
+
completedGeneration?: number;
|
|
3148
|
+
completedOperationKey?: string;
|
|
3149
|
+
currency: string;
|
|
3150
|
+
generation: number;
|
|
3151
|
+
hasOperation: boolean;
|
|
3152
|
+
lastAttemptAt?: number;
|
|
3153
|
+
lastReason?: string;
|
|
3154
|
+
leaseUntil?: number;
|
|
3155
|
+
nextAttemptAt: number;
|
|
3156
|
+
operationKey?: string;
|
|
3157
|
+
ownerKey: string;
|
|
3158
|
+
sequence: number;
|
|
3159
|
+
};
|
|
3160
|
+
reconcileOnly: boolean;
|
|
3161
|
+
status: "run";
|
|
3162
|
+
}, Name>;
|
|
3163
|
+
finish: FunctionReference<"mutation", "internal", {
|
|
3164
|
+
accountId: string;
|
|
3165
|
+
currency: string;
|
|
3166
|
+
generation: number;
|
|
3167
|
+
operationKey: string;
|
|
3168
|
+
ownerKey: string;
|
|
3169
|
+
reason: string;
|
|
3170
|
+
}, {
|
|
3171
|
+
_creationTime: number;
|
|
3172
|
+
_id: string;
|
|
3173
|
+
accountId: string;
|
|
3174
|
+
cadenceMs: number;
|
|
3175
|
+
completedGeneration?: number;
|
|
3176
|
+
completedOperationKey?: string;
|
|
3177
|
+
currency: string;
|
|
3178
|
+
generation: number;
|
|
3179
|
+
hasOperation: boolean;
|
|
3180
|
+
lastAttemptAt?: number;
|
|
3181
|
+
lastReason?: string;
|
|
3182
|
+
leaseUntil?: number;
|
|
3183
|
+
nextAttemptAt: number;
|
|
3184
|
+
operationKey?: string;
|
|
3185
|
+
ownerKey: string;
|
|
3186
|
+
sequence: number;
|
|
3187
|
+
}, Name>;
|
|
3188
|
+
};
|
|
3189
|
+
queries: {
|
|
3190
|
+
changing: FunctionReference<"query", "internal", {
|
|
3191
|
+
paginationOpts: {
|
|
3192
|
+
cursor: string | null;
|
|
3193
|
+
endCursor?: string | null;
|
|
3194
|
+
id?: number;
|
|
3195
|
+
maximumBytesRead?: number;
|
|
3196
|
+
maximumRowsRead?: number;
|
|
3197
|
+
numItems: number;
|
|
3198
|
+
};
|
|
3199
|
+
}, {
|
|
3200
|
+
continueCursor: string;
|
|
3201
|
+
isDone: boolean;
|
|
3202
|
+
page: Array<{
|
|
3203
|
+
_creationTime: number;
|
|
3204
|
+
_id: string;
|
|
3205
|
+
accountId: string;
|
|
3206
|
+
country: string;
|
|
3207
|
+
holdDeadline?: number;
|
|
3208
|
+
mode: "stripe_managed" | "custom";
|
|
3209
|
+
operationKey: string;
|
|
3210
|
+
ownerKey: string;
|
|
3211
|
+
previousSchedule?: {
|
|
3212
|
+
interval: "daily" | "weekly" | "monthly" | "manual";
|
|
3213
|
+
monthlyDays?: Array<number>;
|
|
3214
|
+
weeklyDays?: Array<string>;
|
|
3215
|
+
};
|
|
3216
|
+
revision: number;
|
|
3217
|
+
status: "changing" | "ready";
|
|
3218
|
+
thresholds: Array<{
|
|
3219
|
+
amount: number;
|
|
3220
|
+
currency: string;
|
|
3221
|
+
}>;
|
|
3222
|
+
}>;
|
|
3223
|
+
}, Name>;
|
|
3224
|
+
get: FunctionReference<"query", "internal", {
|
|
3225
|
+
accountId: string;
|
|
3226
|
+
currency: string;
|
|
3227
|
+
ownerKey: string;
|
|
3228
|
+
}, {
|
|
3229
|
+
_creationTime: number;
|
|
3230
|
+
_id: string;
|
|
3231
|
+
accountId: string;
|
|
3232
|
+
cadenceMs: number;
|
|
3233
|
+
completedGeneration?: number;
|
|
3234
|
+
completedOperationKey?: string;
|
|
3235
|
+
currency: string;
|
|
3236
|
+
generation: number;
|
|
3237
|
+
hasOperation: boolean;
|
|
3238
|
+
lastAttemptAt?: number;
|
|
3239
|
+
lastReason?: string;
|
|
3240
|
+
leaseUntil?: number;
|
|
3241
|
+
nextAttemptAt: number;
|
|
3242
|
+
operationKey?: string;
|
|
3243
|
+
ownerKey: string;
|
|
3244
|
+
sequence: number;
|
|
3245
|
+
} | null, Name>;
|
|
3246
|
+
policies: FunctionReference<"query", "internal", {
|
|
3247
|
+
paginationOpts: {
|
|
3248
|
+
cursor: string | null;
|
|
3249
|
+
endCursor?: string | null;
|
|
3250
|
+
id?: number;
|
|
3251
|
+
maximumBytesRead?: number;
|
|
3252
|
+
maximumRowsRead?: number;
|
|
3253
|
+
numItems: number;
|
|
3254
|
+
};
|
|
3255
|
+
}, {
|
|
3256
|
+
continueCursor: string;
|
|
3257
|
+
isDone: boolean;
|
|
3258
|
+
page: Array<{
|
|
3259
|
+
_creationTime: number;
|
|
3260
|
+
_id: string;
|
|
3261
|
+
accountId: string;
|
|
3262
|
+
country: string;
|
|
3263
|
+
holdDeadline?: number;
|
|
3264
|
+
mode: "stripe_managed" | "custom";
|
|
3265
|
+
operationKey: string;
|
|
3266
|
+
ownerKey: string;
|
|
3267
|
+
previousSchedule?: {
|
|
3268
|
+
interval: "daily" | "weekly" | "monthly" | "manual";
|
|
3269
|
+
monthlyDays?: Array<number>;
|
|
3270
|
+
weeklyDays?: Array<string>;
|
|
3271
|
+
};
|
|
3272
|
+
revision: number;
|
|
3273
|
+
status: "changing" | "ready";
|
|
3274
|
+
thresholds: Array<{
|
|
3275
|
+
amount: number;
|
|
3276
|
+
currency: string;
|
|
3277
|
+
}>;
|
|
3278
|
+
}>;
|
|
3279
|
+
}, Name>;
|
|
3280
|
+
recovering: FunctionReference<"query", "internal", {
|
|
3281
|
+
paginationOpts: {
|
|
3282
|
+
cursor: string | null;
|
|
3283
|
+
endCursor?: string | null;
|
|
3284
|
+
id?: number;
|
|
3285
|
+
maximumBytesRead?: number;
|
|
3286
|
+
maximumRowsRead?: number;
|
|
3287
|
+
numItems: number;
|
|
3288
|
+
};
|
|
3289
|
+
}, {
|
|
3290
|
+
continueCursor: string;
|
|
3291
|
+
isDone: boolean;
|
|
3292
|
+
page: Array<{
|
|
3293
|
+
_creationTime: number;
|
|
3294
|
+
_id: string;
|
|
3295
|
+
accountId: string;
|
|
3296
|
+
cadenceMs: number;
|
|
3297
|
+
completedGeneration?: number;
|
|
3298
|
+
completedOperationKey?: string;
|
|
3299
|
+
currency: string;
|
|
3300
|
+
generation: number;
|
|
3301
|
+
hasOperation: boolean;
|
|
3302
|
+
lastAttemptAt?: number;
|
|
3303
|
+
lastReason?: string;
|
|
3304
|
+
leaseUntil?: number;
|
|
3305
|
+
nextAttemptAt: number;
|
|
3306
|
+
operationKey?: string;
|
|
3307
|
+
ownerKey: string;
|
|
3308
|
+
sequence: number;
|
|
3309
|
+
}>;
|
|
3310
|
+
}, Name>;
|
|
3311
|
+
};
|
|
3312
|
+
};
|
|
2602
3313
|
products: {
|
|
2603
3314
|
mutations: {
|
|
2604
3315
|
upsertPrice: FunctionReference<"mutation", "internal", {
|
|
@@ -2844,6 +3555,21 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2844
3555
|
replay: boolean;
|
|
2845
3556
|
term: "forever" | "one_time";
|
|
2846
3557
|
}, Name>;
|
|
3558
|
+
migrateAffiliateObligations: FunctionReference<"mutation", "internal", {
|
|
3559
|
+
paginationOpts: {
|
|
3560
|
+
cursor: string | null;
|
|
3561
|
+
endCursor?: string | null;
|
|
3562
|
+
id?: number;
|
|
3563
|
+
maximumBytesRead?: number;
|
|
3564
|
+
maximumRowsRead?: number;
|
|
3565
|
+
numItems: number;
|
|
3566
|
+
};
|
|
3567
|
+
}, {
|
|
3568
|
+
continueCursor: string;
|
|
3569
|
+
isDone: boolean;
|
|
3570
|
+
migrated: number;
|
|
3571
|
+
skipped: number;
|
|
3572
|
+
}, Name>;
|
|
2847
3573
|
reserveSettlementAllocation: FunctionReference<"mutation", "internal", {
|
|
2848
3574
|
adjustmentAmount?: number;
|
|
2849
3575
|
currency: string;
|
|
@@ -2907,6 +3633,64 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2907
3633
|
role: "store" | "affiliate" | "other";
|
|
2908
3634
|
}>;
|
|
2909
3635
|
} | null, Name>;
|
|
3636
|
+
listAffiliateObligations: FunctionReference<"query", "internal", {
|
|
3637
|
+
affiliateAccountId: string;
|
|
3638
|
+
currency: string;
|
|
3639
|
+
paginationOpts: {
|
|
3640
|
+
cursor: string | null;
|
|
3641
|
+
endCursor?: string | null;
|
|
3642
|
+
id?: number;
|
|
3643
|
+
maximumBytesRead?: number;
|
|
3644
|
+
maximumRowsRead?: number;
|
|
3645
|
+
numItems: number;
|
|
3646
|
+
};
|
|
3647
|
+
}, {
|
|
3648
|
+
continueCursor: string;
|
|
3649
|
+
isDone: boolean;
|
|
3650
|
+
page: Array<{
|
|
3651
|
+
_creationTime: number;
|
|
3652
|
+
_id: string;
|
|
3653
|
+
accounted?: boolean;
|
|
3654
|
+
activeOperationId?: string;
|
|
3655
|
+
affiliateAccountId: string;
|
|
3656
|
+
chargeAmount: number;
|
|
3657
|
+
creditAmount?: number;
|
|
3658
|
+
currency: string;
|
|
3659
|
+
debtAmount?: number;
|
|
3660
|
+
debtStatus?: "open" | "settled";
|
|
3661
|
+
disputeId?: string;
|
|
3662
|
+
disputeState?: "open" | "lost" | "won";
|
|
3663
|
+
disputedPrincipal: number;
|
|
3664
|
+
earningId?: string;
|
|
3665
|
+
finalizedAmount: number;
|
|
3666
|
+
lastError?: string;
|
|
3667
|
+
lastRefundId?: string;
|
|
3668
|
+
lastState?: string;
|
|
3669
|
+
legacyReceiptIds?: Array<string>;
|
|
3670
|
+
legacyRestorationIds?: Array<string>;
|
|
3671
|
+
lostPrincipal: number;
|
|
3672
|
+
needsReconciliation: boolean;
|
|
3673
|
+
offsetAmount?: number;
|
|
3674
|
+
operationSequence?: number;
|
|
3675
|
+
operatorNote?: string;
|
|
3676
|
+
originalCommission: number;
|
|
3677
|
+
paymentId?: string;
|
|
3678
|
+
paymentIntentId?: string;
|
|
3679
|
+
provisionalAmount: number;
|
|
3680
|
+
recoveredAmount: number;
|
|
3681
|
+
refundedPrincipal: number;
|
|
3682
|
+
releasedCommission?: number;
|
|
3683
|
+
reservedRecovery?: number;
|
|
3684
|
+
reservedRestoration?: number;
|
|
3685
|
+
restoredAmount?: number;
|
|
3686
|
+
sourceChargeId: string;
|
|
3687
|
+
sourceInvoiceId?: string;
|
|
3688
|
+
storeAccountId?: string;
|
|
3689
|
+
stripeTransferId?: string;
|
|
3690
|
+
}>;
|
|
3691
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
3692
|
+
splitCursor?: string | null;
|
|
3693
|
+
}, Name>;
|
|
2910
3694
|
};
|
|
2911
3695
|
};
|
|
2912
3696
|
webhooks: {
|