@fantastic.dev/better-stripe 0.28.6 → 0.30.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 +16 -0
- package/MIGRATION.md +14 -0
- package/README.md +7 -1
- package/dist/client/connect/payoutActivationProof.d.ts.map +1 -1
- package/dist/client/connect/payoutActivationProof.js +88 -42
- package/dist/client/connect/payoutActivationProof.js.map +1 -1
- package/dist/client/connect/payoutAdoption.d.ts +3 -0
- package/dist/client/connect/payoutAdoption.d.ts.map +1 -1
- package/dist/client/connect/payoutAdoption.js +218 -183
- package/dist/client/connect/payoutAdoption.js.map +1 -1
- package/dist/client/connect/payoutAdoptionCollection.d.ts +21 -0
- package/dist/client/connect/payoutAdoptionCollection.d.ts.map +1 -0
- package/dist/client/connect/payoutAdoptionCollection.js +44 -0
- package/dist/client/connect/payoutAdoptionCollection.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +54 -14
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutCollectedInput.d.ts +110 -0
- package/dist/client/connect/payoutCollectedInput.d.ts.map +1 -0
- package/dist/client/connect/payoutCollectedInput.js +70 -0
- package/dist/client/connect/payoutCollectedInput.js.map +1 -0
- package/dist/client/connect/payoutExecution.d.ts +1 -0
- package/dist/client/connect/payoutExecution.d.ts.map +1 -1
- package/dist/client/connect/payoutExecution.js +94 -67
- package/dist/client/connect/payoutExecution.js.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +29 -7
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.js +9 -6
- package/dist/client/connect/payoutExecutionTestHelpers.js.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +3745 -0
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -0
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.js +55 -0
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.js.map +1 -0
- package/dist/client/connect/payoutOutcomeBatches.d.ts +5 -0
- package/dist/client/connect/payoutOutcomeBatches.d.ts.map +1 -0
- package/dist/client/connect/payoutOutcomeBatches.js +21 -0
- package/dist/client/connect/payoutOutcomeBatches.js.map +1 -0
- package/dist/client/connect/payoutPolicyState.d.ts +14 -0
- package/dist/client/connect/payoutPolicyState.d.ts.map +1 -0
- package/dist/client/connect/payoutPolicyState.js +19 -0
- package/dist/client/connect/payoutPolicyState.js.map +1 -0
- package/dist/client/connect/payoutPreview.d.ts +1 -0
- package/dist/client/connect/payoutPreview.d.ts.map +1 -1
- package/dist/client/connect/payoutPreview.js +31 -19
- package/dist/client/connect/payoutPreview.js.map +1 -1
- package/dist/client/connect/payoutQualification.d.ts +7 -1
- package/dist/client/connect/payoutQualification.d.ts.map +1 -1
- package/dist/client/connect/payoutQualification.js +34 -19
- package/dist/client/connect/payoutQualification.js.map +1 -1
- package/dist/client/connect/payoutReconciliation.d.ts +11 -6
- package/dist/client/connect/payoutReconciliation.d.ts.map +1 -1
- package/dist/client/connect/payoutReconciliation.js +62 -16
- package/dist/client/connect/payoutReconciliation.js.map +1 -1
- package/dist/client/connect/payoutResumableProof.d.ts +17 -0
- package/dist/client/connect/payoutResumableProof.d.ts.map +1 -0
- package/dist/client/connect/payoutResumableProof.js +25 -0
- package/dist/client/connect/payoutResumableProof.js.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +27 -7
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.d.ts.map +1 -1
- package/dist/client/connect/payoutWorker.js +4 -1
- package/dist/client/connect/payoutWorker.js.map +1 -1
- package/dist/client/connect/transferReceipt.d.ts +6 -2
- package/dist/client/connect/transferReceipt.d.ts.map +1 -1
- package/dist/client/connect/transferReceipt.js +3 -3
- package/dist/client/connect/transferReceipt.js.map +1 -1
- package/dist/client/costRecovery.d.ts +5 -0
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +5 -0
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/payoutPolicy.d.ts +4 -0
- package/dist/client/payoutPolicy.d.ts.map +1 -1
- package/dist/client/payoutPolicy.js +24 -14
- package/dist/client/payoutPolicy.js.map +1 -1
- package/dist/component/_generated/component.d.ts +247 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/costRecovery/mutations.js +1 -1
- package/dist/component/costRecovery/queries.d.ts +9 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -1
- package/dist/component/costRecovery/queries.js +20 -0
- package/dist/component/costRecovery/queries.js.map +1 -1
- package/dist/component/earnings/triggers.d.ts +28 -10
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutPolicy/adoption.d.ts.map +1 -1
- package/dist/component/payoutPolicy/adoption.js +12 -7
- package/dist/component/payoutPolicy/adoption.js.map +1 -1
- package/dist/component/payoutPolicy/mutations.d.ts +12 -0
- package/dist/component/payoutPolicy/mutations.d.ts.map +1 -1
- package/dist/component/payoutPolicy/queries.d.ts +2 -0
- package/dist/component/payoutPolicy/queries.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.d.ts +31 -7
- package/dist/component/payoutPolicy/schema.d.ts.map +1 -1
- package/dist/component/payoutPolicy/schema.js +2 -0
- package/dist/component/payoutPolicy/schema.js.map +1 -1
- package/dist/component/payoutRelease/adoption.d.ts +9 -1
- package/dist/component/payoutRelease/adoption.d.ts.map +1 -1
- package/dist/component/payoutRelease/adoption.js +33 -16
- package/dist/component/payoutRelease/adoption.js.map +1 -1
- package/dist/component/payoutRelease/fees.d.ts.map +1 -1
- package/dist/component/payoutRelease/fees.js +7 -0
- package/dist/component/payoutRelease/fees.js.map +1 -1
- package/dist/component/payoutRelease/helpers.d.ts +4 -1
- package/dist/component/payoutRelease/helpers.d.ts.map +1 -1
- package/dist/component/payoutRelease/helpers.js +17 -10
- package/dist/component/payoutRelease/helpers.js.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts +79 -0
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +38 -81
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/outcome.d.ts +69 -0
- package/dist/component/payoutRelease/outcome.d.ts.map +1 -0
- package/dist/component/payoutRelease/outcome.js +94 -0
- package/dist/component/payoutRelease/outcome.js.map +1 -0
- package/dist/component/payoutRelease/planning.d.ts +4 -0
- package/dist/component/payoutRelease/planning.d.ts.map +1 -1
- package/dist/component/payoutRelease/planning.js +8 -3
- package/dist/component/payoutRelease/planning.js.map +1 -1
- package/dist/component/payoutRelease/preview.d.ts +2 -0
- package/dist/component/payoutRelease/preview.d.ts.map +1 -1
- package/dist/component/payoutRelease/preview.js +2 -0
- package/dist/component/payoutRelease/preview.js.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts +13 -2
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.js +2 -0
- package/dist/component/payoutRelease/queries.js.map +1 -1
- package/dist/component/payoutRelease/schema.d.ts +17 -2
- package/dist/component/payoutRelease/schema.d.ts.map +1 -1
- package/dist/component/payoutRelease/schema.js +3 -0
- package/dist/component/payoutRelease/schema.js.map +1 -1
- package/dist/component/payoutSnapshots/adoption.d.ts +88 -0
- package/dist/component/payoutSnapshots/adoption.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/adoption.js +49 -0
- package/dist/component/payoutSnapshots/adoption.js.map +1 -0
- package/dist/component/payoutSnapshots/financial.d.ts +47 -0
- package/dist/component/payoutSnapshots/financial.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/financial.js +103 -0
- package/dist/component/payoutSnapshots/financial.js.map +1 -0
- package/dist/component/payoutSnapshots/liabilities.d.ts +7 -0
- package/dist/component/payoutSnapshots/liabilities.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/liabilities.js +18 -0
- package/dist/component/payoutSnapshots/liabilities.js.map +1 -0
- package/dist/component/payoutSnapshots/localState.d.ts +22 -16
- package/dist/component/payoutSnapshots/localState.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/localState.js +19 -7
- package/dist/component/payoutSnapshots/localState.js.map +1 -1
- package/dist/component/payoutSnapshots/mutations.d.ts +6 -0
- package/dist/component/payoutSnapshots/mutations.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/mutations.js +3 -1
- package/dist/component/payoutSnapshots/mutations.js.map +1 -1
- package/dist/component/payoutSnapshots/queries.d.ts +133 -0
- package/dist/component/payoutSnapshots/queries.d.ts.map +1 -0
- package/dist/component/payoutSnapshots/queries.js +86 -0
- package/dist/component/payoutSnapshots/queries.js.map +1 -0
- package/dist/component/payoutSnapshots/revisions.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/revisions.js +19 -0
- package/dist/component/payoutSnapshots/revisions.js.map +1 -1
- package/dist/component/payoutSnapshots/schema.d.ts +20 -6
- package/dist/component/payoutSnapshots/schema.d.ts.map +1 -1
- package/dist/component/payoutSnapshots/schema.js +5 -1
- package/dist/component/payoutSnapshots/schema.js.map +1 -1
- package/dist/component/payoutWorker/mutations.d.ts.map +1 -1
- package/dist/component/payoutWorker/mutations.js +3 -1
- package/dist/component/payoutWorker/mutations.js.map +1 -1
- package/dist/component/schema.d.ts +27 -7
- package/dist/react/workflows/payout-attempt-state.d.ts.map +1 -1
- package/dist/react/workflows/payout-attempt-state.js +3 -0
- package/dist/react/workflows/payout-attempt-state.js.map +1 -1
- package/dist/react/workflows/payout-progress-state.d.ts.map +1 -1
- package/dist/react/workflows/payout-progress-state.js +3 -0
- package/dist/react/workflows/payout-progress-state.js.map +1 -1
- package/docs/settlement.md +136 -24
- package/package.json +1 -1
- package/src/client/connect/payoutActivationProof.ts +123 -53
- package/src/client/connect/payoutAdoption.ts +299 -215
- package/src/client/connect/payoutAdoptionCollection.ts +78 -0
- package/src/client/connect/payoutAdoptionConcurrency.test.ts +266 -0
- package/src/client/connect/payoutCacheIdentity.test.ts +93 -0
- package/src/client/connect/payoutCollectedInput.ts +120 -0
- package/src/client/connect/payoutExecution.ts +116 -84
- package/src/client/connect/payoutExecutionTestHelpers.ts +19 -6
- package/src/client/connect/payoutLargeAdoption.test.ts +541 -0
- package/src/client/connect/payoutLargeAdoptionTestHelpers.ts +74 -0
- package/src/client/connect/payoutLargeHistory.test.ts +222 -0
- package/src/client/connect/payoutLiabilityVersion.test.ts +221 -0
- package/src/client/connect/payoutOutcomeBatches.test.ts +40 -0
- package/src/client/connect/payoutOutcomeBatches.ts +24 -0
- package/src/client/connect/payoutPolicyState.ts +36 -0
- package/src/client/connect/payoutPreview.ts +42 -24
- package/src/client/connect/payoutQualification.ts +68 -21
- package/src/client/connect/payoutReconciliation.ts +86 -7
- package/src/client/connect/payoutResumableProof.ts +41 -0
- package/src/client/connect/payoutWorker.ts +4 -1
- package/src/client/connect/transferReceipt.ts +3 -2
- package/src/client/connect/transferReceiptBaseline.test.ts +55 -0
- package/src/client/costRecovery.ts +8 -0
- package/src/client/payoutPolicy.ts +37 -23
- package/src/component/_generated/api.ts +10 -0
- package/src/component/_generated/component.ts +288 -0
- package/src/component/costRecovery/mutations.ts +1 -1
- package/src/component/costRecovery/queries.ts +21 -0
- package/src/component/payout-snapshots.test.ts +45 -1
- package/src/component/payoutPolicy/adoption.ts +20 -7
- package/src/component/payoutPolicy/schema.ts +2 -0
- package/src/component/payoutRelease/adoption.ts +57 -27
- package/src/component/payoutRelease/fees.ts +9 -0
- package/src/component/payoutRelease/helpers.ts +19 -11
- package/src/component/payoutRelease/mutations.ts +43 -96
- package/src/component/payoutRelease/outcome.ts +119 -0
- package/src/component/payoutRelease/planning.ts +11 -2
- package/src/component/payoutRelease/preview.ts +2 -0
- package/src/component/payoutRelease/queries.ts +2 -0
- package/src/component/payoutRelease/schema.ts +3 -0
- package/src/component/payoutSnapshots/adoption.ts +73 -0
- package/src/component/payoutSnapshots/financial.ts +134 -0
- package/src/component/payoutSnapshots/liabilities.ts +25 -0
- package/src/component/payoutSnapshots/localState.ts +24 -6
- package/src/component/payoutSnapshots/mutations.ts +10 -1
- package/src/component/payoutSnapshots/queries.ts +104 -0
- package/src/component/payoutSnapshots/revisions.ts +26 -0
- package/src/component/payoutSnapshots/schema.ts +5 -0
- package/src/component/payoutWorker/mutations.ts +3 -1
- package/src/react/workflows/payout-attempt-state.ts +6 -0
- package/src/react/workflows/payout-progress-state.ts +6 -0
|
@@ -59,13 +59,13 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
59
59
|
payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
60
60
|
accountId: string;
|
|
61
61
|
key: string;
|
|
62
|
-
kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
|
|
62
|
+
kind: "allocation" | "claim" | "fee" | "liability" | "provider_payout" | "transfer";
|
|
63
63
|
removed?: boolean | undefined;
|
|
64
64
|
riskRevision: number;
|
|
65
65
|
}, {
|
|
66
66
|
accountId: import("convex/values").VString<string, "required">;
|
|
67
67
|
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
68
|
-
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>;
|
|
68
|
+
kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "liability" | "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">, import("convex/values").VLiteral<"liability", "required">], "required", never>;
|
|
69
69
|
key: import("convex/values").VString<string, "required">;
|
|
70
70
|
removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
71
71
|
}, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
|
|
@@ -84,6 +84,8 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
84
84
|
accountId: string;
|
|
85
85
|
allocationCount: number;
|
|
86
86
|
allocationCursor?: string | undefined;
|
|
87
|
+
boundOperationKey?: string | undefined;
|
|
88
|
+
boundRiskRevision?: number | undefined;
|
|
87
89
|
claimCount: number;
|
|
88
90
|
claimCursor?: string | undefined;
|
|
89
91
|
deferredPositiveChanges: boolean;
|
|
@@ -109,6 +111,8 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
109
111
|
step: number;
|
|
110
112
|
}, {
|
|
111
113
|
readOnly: import("convex/values").VBoolean<boolean, "required">;
|
|
114
|
+
boundOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
115
|
+
boundRiskRevision: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
112
116
|
accountId: import("convex/values").VString<string, "required">;
|
|
113
117
|
ownerKey: import("convex/values").VString<string, "required">;
|
|
114
118
|
operationKey: import("convex/values").VString<string, "required">;
|
|
@@ -134,13 +138,14 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
134
138
|
providerChanged: import("convex/values").VBoolean<boolean, "required">;
|
|
135
139
|
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
136
140
|
reason: import("convex/values").VString<string | undefined, "optional">;
|
|
137
|
-
}, "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
|
+
}, "required", "accountId" | "allocationCount" | "allocationCursor" | "boundOperationKey" | "boundRiskRevision" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
|
|
138
142
|
by_account_phase: ["accountId", "phase", "_creationTime"];
|
|
139
143
|
by_operation: ["operationKey", "_creationTime"];
|
|
140
144
|
by_read_only: ["readOnly", "_creationTime"];
|
|
141
145
|
}, {}, {}>;
|
|
142
146
|
payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
143
147
|
allocationCurrency?: string | undefined;
|
|
148
|
+
allocationDocId?: import("convex/values").GenericId<"payoutSourceAllocations"> | undefined;
|
|
144
149
|
allocationPresent: boolean;
|
|
145
150
|
amount: number;
|
|
146
151
|
currency: string;
|
|
@@ -159,10 +164,13 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
159
164
|
sourceCreatedAt: number;
|
|
160
165
|
status: string;
|
|
161
166
|
stripeTransferId: string;
|
|
167
|
+
transferDocId?: import("convex/values").GenericId<"transfers"> | undefined;
|
|
162
168
|
}, {
|
|
163
169
|
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
164
170
|
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
165
171
|
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
172
|
+
transferDocId: import("convex/values").VId<import("convex/values").GenericId<"transfers"> | undefined, "optional">;
|
|
173
|
+
allocationDocId: import("convex/values").VId<import("convex/values").GenericId<"payoutSourceAllocations"> | undefined, "optional">;
|
|
166
174
|
sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
167
175
|
currency: import("convex/values").VString<string, "required">;
|
|
168
176
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
@@ -179,7 +187,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
179
187
|
expectedPaid: import("convex/values").VFloat64<number, "required">;
|
|
180
188
|
expectedReserved: import("convex/values").VFloat64<number, "required">;
|
|
181
189
|
needsCheck: import("convex/values").VBoolean<boolean, "required">;
|
|
182
|
-
}, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
|
|
190
|
+
}, "required", "allocationCurrency" | "allocationDocId" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId" | "transferDocId">, {
|
|
183
191
|
by_snapshot: ["snapshotId", "_creationTime"];
|
|
184
192
|
by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
|
|
185
193
|
by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
|
|
@@ -508,6 +516,8 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
508
516
|
expectedRevision: number;
|
|
509
517
|
feeRevision?: number | undefined;
|
|
510
518
|
historical?: boolean | undefined;
|
|
519
|
+
independentLiabilities?: number | undefined;
|
|
520
|
+
liabilityRevision?: number | undefined;
|
|
511
521
|
observations: {
|
|
512
522
|
currency: string;
|
|
513
523
|
ledgerFingerprint: string;
|
|
@@ -525,12 +535,16 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
525
535
|
requestId: string;
|
|
526
536
|
} | undefined;
|
|
527
537
|
returnTransactionId?: string | undefined;
|
|
538
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
528
539
|
status: "canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted";
|
|
529
540
|
stripePayoutId?: string | undefined;
|
|
530
541
|
}, {
|
|
531
542
|
accountId: import("convex/values").VString<string, "required">;
|
|
532
543
|
ownerKey: import("convex/values").VString<string, "required">;
|
|
533
544
|
historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
545
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
|
|
546
|
+
liabilityRevision: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
547
|
+
independentLiabilities: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
534
548
|
operationKey: import("convex/values").VString<string, "required">;
|
|
535
549
|
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
536
550
|
currency: import("convex/values").VString<string, "required">;
|
|
@@ -589,7 +603,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
589
603
|
requestId: import("convex/values").VString<string, "required">;
|
|
590
604
|
code: import("convex/values").VUnion<"amount_too_small" | "balance_insufficient", [import("convex/values").VLiteral<"balance_insufficient", "required">, import("convex/values").VLiteral<"amount_too_small", "required">], "required", never>;
|
|
591
605
|
}, "optional", "code" | "requestId">;
|
|
592
|
-
}, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "status" | "stripePayoutId">, {
|
|
606
|
+
}, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "independentLiabilities" | "liabilityRevision" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "snapshotId" | "status" | "stripePayoutId">, {
|
|
593
607
|
by_account_status: ["accountId", "status", "_creationTime"];
|
|
594
608
|
by_debit_receipt: ["debitTransactionId", "_creationTime"];
|
|
595
609
|
by_operation: ["operationKey", "_creationTime"];
|
|
@@ -712,6 +726,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
712
726
|
fingerprint: string;
|
|
713
727
|
operationKey: string;
|
|
714
728
|
}[];
|
|
729
|
+
collectionKey?: string | undefined;
|
|
715
730
|
observations: {
|
|
716
731
|
currency: string;
|
|
717
732
|
ledgerFingerprint: string;
|
|
@@ -722,6 +737,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
722
737
|
transactionIds: string[];
|
|
723
738
|
}[];
|
|
724
739
|
oldestHeldAt?: number | undefined;
|
|
740
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
725
741
|
} | undefined;
|
|
726
742
|
attempted?: boolean | undefined;
|
|
727
743
|
country: string;
|
|
@@ -759,6 +775,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
759
775
|
fingerprint: string;
|
|
760
776
|
operationKey: string;
|
|
761
777
|
}[];
|
|
778
|
+
collectionKey?: string | undefined;
|
|
762
779
|
observations: {
|
|
763
780
|
currency: string;
|
|
764
781
|
ledgerFingerprint: string;
|
|
@@ -769,7 +786,10 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
769
786
|
transactionIds: string[];
|
|
770
787
|
}[];
|
|
771
788
|
oldestHeldAt?: number | undefined;
|
|
789
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
772
790
|
} | undefined, {
|
|
791
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
|
|
792
|
+
collectionKey: import("convex/values").VString<string | undefined, "optional">;
|
|
773
793
|
observations: import("convex/values").VArray<{
|
|
774
794
|
currency: string;
|
|
775
795
|
ledgerFingerprint: string;
|
|
@@ -806,7 +826,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
806
826
|
fingerprint: import("convex/values").VString<string, "required">;
|
|
807
827
|
}, "required", "fingerprint" | "operationKey">, "required">;
|
|
808
828
|
oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
809
|
-
}, "optional", "claims" | "observations" | "oldestHeldAt">;
|
|
829
|
+
}, "optional", "claims" | "collectionKey" | "observations" | "oldestHeldAt" | "snapshotId">;
|
|
810
830
|
operationKey: import("convex/values").VString<string, "required">;
|
|
811
831
|
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
812
832
|
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
@@ -852,7 +872,7 @@ export declare function setup(amounts?: number[], currency?: string): Promise<{
|
|
|
852
872
|
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
853
873
|
status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
854
874
|
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
855
|
-
}, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.observations" | "adoption.oldestHeldAt" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
|
|
875
|
+
}, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.collectionKey" | "adoption.observations" | "adoption.oldestHeldAt" | "adoption.snapshotId" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
|
|
856
876
|
by_operation: ["operationKey", "_creationTime"];
|
|
857
877
|
}, {}, {}>;
|
|
858
878
|
currencyTotals: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -1903,13 +1923,13 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1903
1923
|
payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1904
1924
|
accountId: string;
|
|
1905
1925
|
key: string;
|
|
1906
|
-
kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
|
|
1926
|
+
kind: "allocation" | "claim" | "fee" | "liability" | "provider_payout" | "transfer";
|
|
1907
1927
|
removed?: boolean | undefined;
|
|
1908
1928
|
riskRevision: number;
|
|
1909
1929
|
}, {
|
|
1910
1930
|
accountId: import("convex/values").VString<string, "required">;
|
|
1911
1931
|
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
1912
|
-
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>;
|
|
1932
|
+
kind: import("convex/values").VUnion<"allocation" | "claim" | "fee" | "liability" | "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">, import("convex/values").VLiteral<"liability", "required">], "required", never>;
|
|
1913
1933
|
key: import("convex/values").VString<string, "required">;
|
|
1914
1934
|
removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1915
1935
|
}, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
|
|
@@ -1928,6 +1948,8 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1928
1948
|
accountId: string;
|
|
1929
1949
|
allocationCount: number;
|
|
1930
1950
|
allocationCursor?: string | undefined;
|
|
1951
|
+
boundOperationKey?: string | undefined;
|
|
1952
|
+
boundRiskRevision?: number | undefined;
|
|
1931
1953
|
claimCount: number;
|
|
1932
1954
|
claimCursor?: string | undefined;
|
|
1933
1955
|
deferredPositiveChanges: boolean;
|
|
@@ -1953,6 +1975,8 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1953
1975
|
step: number;
|
|
1954
1976
|
}, {
|
|
1955
1977
|
readOnly: import("convex/values").VBoolean<boolean, "required">;
|
|
1978
|
+
boundOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
1979
|
+
boundRiskRevision: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1956
1980
|
accountId: import("convex/values").VString<string, "required">;
|
|
1957
1981
|
ownerKey: import("convex/values").VString<string, "required">;
|
|
1958
1982
|
operationKey: import("convex/values").VString<string, "required">;
|
|
@@ -1978,13 +2002,14 @@ export declare function historical(currency?: string): Promise<{
|
|
|
1978
2002
|
providerChanged: import("convex/values").VBoolean<boolean, "required">;
|
|
1979
2003
|
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
1980
2004
|
reason: import("convex/values").VString<string | undefined, "optional">;
|
|
1981
|
-
}, "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">, {
|
|
2005
|
+
}, "required", "accountId" | "allocationCount" | "allocationCursor" | "boundOperationKey" | "boundRiskRevision" | "claimCount" | "claimCursor" | "deferredPositiveChanges" | "expectedRevision" | "expiresAt" | "feeCount" | "feeCursor" | "initialRevision" | "initialRiskRevision" | "observedRevision" | "operationKey" | "ownerKey" | "phase" | "policyMode" | "policyOperationKey" | "providerChanged" | "readOnly" | "reason" | "riskRevision" | "sourceCount" | "sourceCursor" | "sourceFence" | "step">, {
|
|
1982
2006
|
by_account_phase: ["accountId", "phase", "_creationTime"];
|
|
1983
2007
|
by_operation: ["operationKey", "_creationTime"];
|
|
1984
2008
|
by_read_only: ["readOnly", "_creationTime"];
|
|
1985
2009
|
}, {}, {}>;
|
|
1986
2010
|
payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1987
2011
|
allocationCurrency?: string | undefined;
|
|
2012
|
+
allocationDocId?: import("convex/values").GenericId<"payoutSourceAllocations"> | undefined;
|
|
1988
2013
|
allocationPresent: boolean;
|
|
1989
2014
|
amount: number;
|
|
1990
2015
|
currency: string;
|
|
@@ -2003,10 +2028,13 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2003
2028
|
sourceCreatedAt: number;
|
|
2004
2029
|
status: string;
|
|
2005
2030
|
stripeTransferId: string;
|
|
2031
|
+
transferDocId?: import("convex/values").GenericId<"transfers"> | undefined;
|
|
2006
2032
|
}, {
|
|
2007
2033
|
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
2008
2034
|
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
2009
2035
|
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
2036
|
+
transferDocId: import("convex/values").VId<import("convex/values").GenericId<"transfers"> | undefined, "optional">;
|
|
2037
|
+
allocationDocId: import("convex/values").VId<import("convex/values").GenericId<"payoutSourceAllocations"> | undefined, "optional">;
|
|
2010
2038
|
sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
2011
2039
|
currency: import("convex/values").VString<string, "required">;
|
|
2012
2040
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
@@ -2023,7 +2051,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2023
2051
|
expectedPaid: import("convex/values").VFloat64<number, "required">;
|
|
2024
2052
|
expectedReserved: import("convex/values").VFloat64<number, "required">;
|
|
2025
2053
|
needsCheck: import("convex/values").VBoolean<boolean, "required">;
|
|
2026
|
-
}, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
|
|
2054
|
+
}, "required", "allocationCurrency" | "allocationDocId" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId" | "transferDocId">, {
|
|
2027
2055
|
by_snapshot: ["snapshotId", "_creationTime"];
|
|
2028
2056
|
by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
|
|
2029
2057
|
by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
|
|
@@ -2352,6 +2380,8 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2352
2380
|
expectedRevision: number;
|
|
2353
2381
|
feeRevision?: number | undefined;
|
|
2354
2382
|
historical?: boolean | undefined;
|
|
2383
|
+
independentLiabilities?: number | undefined;
|
|
2384
|
+
liabilityRevision?: number | undefined;
|
|
2355
2385
|
observations: {
|
|
2356
2386
|
currency: string;
|
|
2357
2387
|
ledgerFingerprint: string;
|
|
@@ -2369,12 +2399,16 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2369
2399
|
requestId: string;
|
|
2370
2400
|
} | undefined;
|
|
2371
2401
|
returnTransactionId?: string | undefined;
|
|
2402
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
2372
2403
|
status: "canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted";
|
|
2373
2404
|
stripePayoutId?: string | undefined;
|
|
2374
2405
|
}, {
|
|
2375
2406
|
accountId: import("convex/values").VString<string, "required">;
|
|
2376
2407
|
ownerKey: import("convex/values").VString<string, "required">;
|
|
2377
2408
|
historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
2409
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
|
|
2410
|
+
liabilityRevision: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
2411
|
+
independentLiabilities: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
2378
2412
|
operationKey: import("convex/values").VString<string, "required">;
|
|
2379
2413
|
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
2380
2414
|
currency: import("convex/values").VString<string, "required">;
|
|
@@ -2433,7 +2467,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2433
2467
|
requestId: import("convex/values").VString<string, "required">;
|
|
2434
2468
|
code: import("convex/values").VUnion<"amount_too_small" | "balance_insufficient", [import("convex/values").VLiteral<"balance_insufficient", "required">, import("convex/values").VLiteral<"amount_too_small", "required">], "required", never>;
|
|
2435
2469
|
}, "optional", "code" | "requestId">;
|
|
2436
|
-
}, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "status" | "stripePayoutId">, {
|
|
2470
|
+
}, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "independentLiabilities" | "liabilityRevision" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "snapshotId" | "status" | "stripePayoutId">, {
|
|
2437
2471
|
by_account_status: ["accountId", "status", "_creationTime"];
|
|
2438
2472
|
by_debit_receipt: ["debitTransactionId", "_creationTime"];
|
|
2439
2473
|
by_operation: ["operationKey", "_creationTime"];
|
|
@@ -2556,6 +2590,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2556
2590
|
fingerprint: string;
|
|
2557
2591
|
operationKey: string;
|
|
2558
2592
|
}[];
|
|
2593
|
+
collectionKey?: string | undefined;
|
|
2559
2594
|
observations: {
|
|
2560
2595
|
currency: string;
|
|
2561
2596
|
ledgerFingerprint: string;
|
|
@@ -2566,6 +2601,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2566
2601
|
transactionIds: string[];
|
|
2567
2602
|
}[];
|
|
2568
2603
|
oldestHeldAt?: number | undefined;
|
|
2604
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
2569
2605
|
} | undefined;
|
|
2570
2606
|
attempted?: boolean | undefined;
|
|
2571
2607
|
country: string;
|
|
@@ -2603,6 +2639,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2603
2639
|
fingerprint: string;
|
|
2604
2640
|
operationKey: string;
|
|
2605
2641
|
}[];
|
|
2642
|
+
collectionKey?: string | undefined;
|
|
2606
2643
|
observations: {
|
|
2607
2644
|
currency: string;
|
|
2608
2645
|
ledgerFingerprint: string;
|
|
@@ -2613,7 +2650,10 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2613
2650
|
transactionIds: string[];
|
|
2614
2651
|
}[];
|
|
2615
2652
|
oldestHeldAt?: number | undefined;
|
|
2653
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
2616
2654
|
} | undefined, {
|
|
2655
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots"> | undefined, "optional">;
|
|
2656
|
+
collectionKey: import("convex/values").VString<string | undefined, "optional">;
|
|
2617
2657
|
observations: import("convex/values").VArray<{
|
|
2618
2658
|
currency: string;
|
|
2619
2659
|
ledgerFingerprint: string;
|
|
@@ -2650,7 +2690,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2650
2690
|
fingerprint: import("convex/values").VString<string, "required">;
|
|
2651
2691
|
}, "required", "fingerprint" | "operationKey">, "required">;
|
|
2652
2692
|
oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
2653
|
-
}, "optional", "claims" | "observations" | "oldestHeldAt">;
|
|
2693
|
+
}, "optional", "claims" | "collectionKey" | "observations" | "oldestHeldAt" | "snapshotId">;
|
|
2654
2694
|
operationKey: import("convex/values").VString<string, "required">;
|
|
2655
2695
|
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
2656
2696
|
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
@@ -2696,7 +2736,7 @@ export declare function historical(currency?: string): Promise<{
|
|
|
2696
2736
|
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
2697
2737
|
status: import("convex/values").VUnion<"canceled" | "complete" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
2698
2738
|
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
2699
|
-
}, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.observations" | "adoption.oldestHeldAt" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
|
|
2739
|
+
}, "required", "accountId" | "adoption" | "adoption.claims" | "adoption.collectionKey" | "adoption.observations" | "adoption.oldestHeldAt" | "adoption.snapshotId" | "attempted" | "country" | "expectedRevision" | "mode" | "observedAt" | "observedSchedule" | "observedSchedule.interval" | "observedSchedule.monthlyDays" | "observedSchedule.weeklyDays" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "targetSchedule" | "targetSchedule.interval" | "targetSchedule.monthlyDays" | "targetSchedule.weeklyDays" | "thresholds">, {
|
|
2700
2740
|
by_operation: ["operationKey", "_creationTime"];
|
|
2701
2741
|
}, {}, {}>;
|
|
2702
2742
|
currencyTotals: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutAdoptionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutAdoptionTestHelpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB,CAAC;AACF,wBAAsB,KAAK,CAAC,OAAO,WAAa,EAAE,QAAQ,SAAQ
|
|
1
|
+
{"version":3,"file":"payoutAdoptionTestHelpers.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutAdoptionTestHelpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAKvD,eAAO,MAAM,SAAS,EAIN,SAAS,CAAC;AAC1B,eAAO,MAAM,KAAK;IAChB,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,QAAQ;IACR,sBAAsB;CACvB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YAcjC,IAAI,iCAAuB;gBAAE,MAAM,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE;;;;;;;;;;;;;;;;YAM9D,QAAQ,6BAAmB,MAAM;;;;;;;;;;;;;;;YAKjC,QAAQ;;;;;wBAQA,IAAI;;;;;;;YAUZ,IAAI;;;;YAIJ,QAAQ,8BAAoB,MAAM;YAGlC,MAAM,iCACW;gBACb,MAAM,EAAE,MAAM,CAAC;gBACf,QAAQ,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,CAAC;aAClB;;;;gBA2CG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDrB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Infer } from "convex/values";
|
|
2
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
3
|
+
import type { snapshotDoc } from "../../component/payoutSnapshots/schema.js";
|
|
4
|
+
import type { transferDocValidator } from "../../component/connect/validators.js";
|
|
5
|
+
import type { claimDoc } from "../../component/payoutRelease/schema.js";
|
|
6
|
+
export type CollectionRef = {
|
|
7
|
+
accountId: string;
|
|
8
|
+
ownerKey: string;
|
|
9
|
+
operationKey: string;
|
|
10
|
+
snapshotId: Infer<typeof snapshotDoc>["_id"];
|
|
11
|
+
};
|
|
12
|
+
export type PayoutInput = {
|
|
13
|
+
status: "ready";
|
|
14
|
+
transfers: Infer<typeof transferDocValidator>[];
|
|
15
|
+
claims: Infer<typeof claimDoc>[];
|
|
16
|
+
};
|
|
17
|
+
export declare function collectLargePayoutInput(component: Component, ctx: RunCtx, opts: {
|
|
18
|
+
accountId: string;
|
|
19
|
+
ownerKey: string;
|
|
20
|
+
operationKey?: string;
|
|
21
|
+
}, maxPages: number): Promise<{
|
|
22
|
+
status: "held";
|
|
23
|
+
reason: string;
|
|
24
|
+
transfers?: undefined;
|
|
25
|
+
claims?: undefined;
|
|
26
|
+
collection?: undefined;
|
|
27
|
+
} | {
|
|
28
|
+
status: "held";
|
|
29
|
+
reason: string;
|
|
30
|
+
collection: {
|
|
31
|
+
accountId: string;
|
|
32
|
+
ownerKey: string;
|
|
33
|
+
operationKey: string;
|
|
34
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
35
|
+
};
|
|
36
|
+
transfers?: undefined;
|
|
37
|
+
claims?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
reason?: undefined;
|
|
40
|
+
status: "ready";
|
|
41
|
+
transfers: {
|
|
42
|
+
_creationTime: number;
|
|
43
|
+
_id: import("convex/values").GenericId<"transfers">;
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: string;
|
|
46
|
+
destinationAccountId: string;
|
|
47
|
+
metadata?: any;
|
|
48
|
+
paymentId?: string | undefined;
|
|
49
|
+
reinstatement?: boolean | undefined;
|
|
50
|
+
reversalClaimedAmount?: number | undefined;
|
|
51
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
52
|
+
reversedAmount?: number | undefined;
|
|
53
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
54
|
+
sourceChargeId?: string | undefined;
|
|
55
|
+
sourceInvoiceId?: string | undefined;
|
|
56
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
57
|
+
stripeTransferId: string;
|
|
58
|
+
totalsRecorded?: true | undefined;
|
|
59
|
+
}[];
|
|
60
|
+
claims: {
|
|
61
|
+
_creationTime: number;
|
|
62
|
+
_id: import("convex/values").GenericId<"payoutReleaseClaims">;
|
|
63
|
+
accountId: string;
|
|
64
|
+
allocations: {
|
|
65
|
+
amount: number;
|
|
66
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
67
|
+
stripeTransferId: string;
|
|
68
|
+
}[];
|
|
69
|
+
amount: number;
|
|
70
|
+
attemptedAt?: number | undefined;
|
|
71
|
+
currency: string;
|
|
72
|
+
debitFee?: number | undefined;
|
|
73
|
+
debitTransactionId?: string | undefined;
|
|
74
|
+
destinationId?: string | undefined;
|
|
75
|
+
expectedRevision: number;
|
|
76
|
+
feeRevision?: number | undefined;
|
|
77
|
+
historical?: boolean | undefined;
|
|
78
|
+
independentLiabilities?: number | undefined;
|
|
79
|
+
liabilityRevision?: number | undefined;
|
|
80
|
+
observations: {
|
|
81
|
+
currency: string;
|
|
82
|
+
ledgerFingerprint: string;
|
|
83
|
+
matureNet: number;
|
|
84
|
+
observedAt: number;
|
|
85
|
+
pendingCredits: number;
|
|
86
|
+
stripeTransferId: string;
|
|
87
|
+
transactionIds: string[];
|
|
88
|
+
}[];
|
|
89
|
+
operationKey: string;
|
|
90
|
+
ownerKey: string;
|
|
91
|
+
providerFee?: number | undefined;
|
|
92
|
+
rejection?: {
|
|
93
|
+
code: "amount_too_small" | "balance_insufficient";
|
|
94
|
+
requestId: string;
|
|
95
|
+
} | undefined;
|
|
96
|
+
returnTransactionId?: string | undefined;
|
|
97
|
+
snapshotId?: import("convex/values").GenericId<"payoutSnapshots"> | undefined;
|
|
98
|
+
status: "canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted";
|
|
99
|
+
stripePayoutId?: string | undefined;
|
|
100
|
+
}[];
|
|
101
|
+
collection: {
|
|
102
|
+
accountId: string;
|
|
103
|
+
ownerKey: string;
|
|
104
|
+
operationKey: string;
|
|
105
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
/** Bound unattempted claims retain their cache. Attempted/terminal claims keep their own immutable financial proof. */
|
|
109
|
+
export declare function discardQualificationInput(component: Component, ctx: RunCtx, collection?: CollectionRef, keep?: boolean): Promise<void>;
|
|
110
|
+
//# sourceMappingURL=payoutCollectedInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payoutCollectedInput.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutCollectedInput.ts"],"names":[],"mappings":"AAAA,OA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
|
+
import { componentRef } from "../webhooks/helpers.js";
|
|
2
|
+
import { collectPayoutSnapshot, discardPayoutSnapshot, } from "./payoutCollection.js";
|
|
3
|
+
export async function collectLargePayoutInput(component, ctx, opts, maxPages) {
|
|
4
|
+
if (!ctx.runMutation)
|
|
5
|
+
return { status: "held", reason: "collection_requires_action" };
|
|
6
|
+
const policy = (await ctx.runQuery(componentRef(component, "payoutPolicy/queries/get"), { accountId: opts.accountId, ownerKey: opts.ownerKey }));
|
|
7
|
+
const scope = {
|
|
8
|
+
accountId: opts.accountId,
|
|
9
|
+
ownerKey: opts.ownerKey,
|
|
10
|
+
operationKey: opts.operationKey ?? crypto.randomUUID(),
|
|
11
|
+
};
|
|
12
|
+
let h = await collectPayoutSnapshot(component, ctx, {
|
|
13
|
+
...scope,
|
|
14
|
+
expectedRevision: policy?.revision ?? -1,
|
|
15
|
+
});
|
|
16
|
+
for (let i = 0; i < maxPages * 25 && h.phase !== "local_ready" && h.phase !== "invalidated"; i++)
|
|
17
|
+
h = await collectPayoutSnapshot(component, ctx, {
|
|
18
|
+
...scope,
|
|
19
|
+
expectedRevision: h.expectedRevision,
|
|
20
|
+
expectedStep: h.step,
|
|
21
|
+
});
|
|
22
|
+
const collection = { ...scope, snapshotId: h._id };
|
|
23
|
+
if (h.phase !== "local_ready")
|
|
24
|
+
return {
|
|
25
|
+
status: "held",
|
|
26
|
+
reason: h.phase === "invalidated"
|
|
27
|
+
? "collection_invalidated"
|
|
28
|
+
: "collection_pending",
|
|
29
|
+
collection,
|
|
30
|
+
};
|
|
31
|
+
async function pages(kind, count) {
|
|
32
|
+
const rows = [];
|
|
33
|
+
let cursor = null;
|
|
34
|
+
for (let i = 0; i <= Math.ceil(count / 25); i++) {
|
|
35
|
+
const page = (await ctx.runQuery(componentRef(component, `payoutSnapshots/queries/${kind}`), { ...scope, paginationOpts: { cursor, numItems: 25 } }));
|
|
36
|
+
rows.push(...page.page);
|
|
37
|
+
if (page.isDone) {
|
|
38
|
+
if (rows.length !== count)
|
|
39
|
+
throw new Error("Collected payout membership changed.");
|
|
40
|
+
return rows;
|
|
41
|
+
}
|
|
42
|
+
if (!page.continueCursor || page.continueCursor === cursor)
|
|
43
|
+
throw new Error("Collected payout cursor did not advance.");
|
|
44
|
+
cursor = page.continueCursor;
|
|
45
|
+
}
|
|
46
|
+
throw new Error("Collected payout page budget exhausted; preserve collection for retry.");
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
status: "ready",
|
|
50
|
+
transfers: await pages("sources", h.sourceCount),
|
|
51
|
+
claims: await pages("claims", h.claimCount),
|
|
52
|
+
collection,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** Bound unattempted claims retain their cache. Attempted/terminal claims keep their own immutable financial proof. */
|
|
56
|
+
export async function discardQualificationInput(component, ctx, collection, keep = false) {
|
|
57
|
+
if (!collection || keep || !ctx.runMutation)
|
|
58
|
+
return;
|
|
59
|
+
const { snapshotId: _, ...scope } = collection;
|
|
60
|
+
const h = (await ctx.runQuery(componentRef(component, "payoutSnapshots/queries/get"), scope));
|
|
61
|
+
if (!h?.readOnly)
|
|
62
|
+
return;
|
|
63
|
+
for (let i = 0; i < 1000; i++)
|
|
64
|
+
if (!(await discardPayoutSnapshot(component, ctx, {
|
|
65
|
+
...scope,
|
|
66
|
+
batchSize: 100,
|
|
67
|
+
})))
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=payoutCollectedInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payoutCollectedInput.js","sourceRoot":"","sources":["../../../src/client/connect/payoutCollectedInput.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAY/B,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,SAAoB,EACpB,GAAW,EACX,IAAoE,EACpE,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,CAAC;AACD,uHAAuH;AACvH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,SAAoB,EACpB,GAAW,EACX,UAA0B,EAC1B,IAAI,GAAG,KAAK;IAEZ,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW;QAAE,OAAO;IACpD,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,UAAU,CAAC;IAC/C,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,QAAQ,CAC3B,YAAY,CAAC,SAAS,EAAE,6BAA6B,CAAC,EACtD,KAAK,CACN,CAAqC,CAAC;IACvC,IAAI,CAAC,CAAC,EAAE,QAAQ;QAAE,OAAO;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;QAC3B,IACE,CAAC,CAAC,MAAM,qBAAqB,CAAC,SAAS,EAAE,GAAG,EAAE;YAC5C,GAAG,KAAK;YACR,SAAS,EAAE,GAAG;SACf,CAAC,CAAC;YAEH,OAAO;AACb,CAAC"}
|
|
@@ -11,6 +11,7 @@ export type PayoutReleaseOptions = {
|
|
|
11
11
|
currency: string;
|
|
12
12
|
/** Host supplies all authorized off-provider debts/reserves, without double counting provider receipt debits. */
|
|
13
13
|
independentLiabilities: number;
|
|
14
|
+
liabilityRevision?: number;
|
|
14
15
|
maxPages?: number;
|
|
15
16
|
};
|
|
16
17
|
type Held = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payoutExecution.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExecution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"payoutExecution.d.ts","sourceRoot":"","sources":["../../../src/client/connect/payoutExecution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3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