@fantastic.dev/better-stripe 0.24.0 → 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 +7 -0
- package/README.md +7 -1
- 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/payoutAdoptionTestHelpers.d.ts +464 -0
- 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 +232 -0
- 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/index.d.ts +4 -11
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +4 -9
- 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/component/_generated/component.d.ts +293 -0
- package/dist/component/_generated/component.d.ts.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 +418 -0
- 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.js +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 +232 -0
- package/dist/component/schema.js +10 -0
- package/dist/component/schema.js.map +1 -1
- package/docs/read-contracts.md +48 -0
- package/docs/settlement.md +128 -1
- package/package.json +1 -1
- 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/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/index.ts +10 -21
- package/src/client/payoutPolicy.ts +26 -1
- package/src/client/readContracts.ts +23 -0
- package/src/component/_generated/api.ts +16 -0
- package/src/component/_generated/component.ts +361 -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-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 +1 -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 +18 -0
|
@@ -0,0 +1,1805 @@
|
|
|
1
|
+
import type { Component, RunCtx } from "../helpers.js";
|
|
2
|
+
export declare const component: Component;
|
|
3
|
+
export declare const scope: {
|
|
4
|
+
accountId: string;
|
|
5
|
+
ownerKey: string;
|
|
6
|
+
operationKey: string;
|
|
7
|
+
currency: string;
|
|
8
|
+
independentLiabilities: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function setup(amounts?: number[]): Promise<{
|
|
11
|
+
t: import("convex-test").TestConvex<import("convex/server").SchemaDefinition<{
|
|
12
|
+
payoutWorkerJobs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
13
|
+
accountId: string;
|
|
14
|
+
cadenceMs: number;
|
|
15
|
+
completedGeneration?: number | undefined;
|
|
16
|
+
completedOperationKey?: string | undefined;
|
|
17
|
+
currency: string;
|
|
18
|
+
generation: number;
|
|
19
|
+
hasOperation: boolean;
|
|
20
|
+
lastAttemptAt?: number | undefined;
|
|
21
|
+
lastReason?: string | undefined;
|
|
22
|
+
leaseUntil?: number | undefined;
|
|
23
|
+
nextAttemptAt: number;
|
|
24
|
+
operationKey?: string | undefined;
|
|
25
|
+
ownerKey: string;
|
|
26
|
+
sequence: number;
|
|
27
|
+
}, {
|
|
28
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
29
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
30
|
+
currency: import("convex/values").VString<string, "required">;
|
|
31
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
32
|
+
sequence: import("convex/values").VFloat64<number, "required">;
|
|
33
|
+
cadenceMs: import("convex/values").VFloat64<number, "required">;
|
|
34
|
+
nextAttemptAt: import("convex/values").VFloat64<number, "required">;
|
|
35
|
+
leaseUntil: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
36
|
+
operationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
37
|
+
hasOperation: import("convex/values").VBoolean<boolean, "required">;
|
|
38
|
+
lastReason: import("convex/values").VString<string | undefined, "optional">;
|
|
39
|
+
lastAttemptAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
40
|
+
completedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
41
|
+
completedOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
42
|
+
}, "required", "accountId" | "cadenceMs" | "completedGeneration" | "completedOperationKey" | "currency" | "generation" | "hasOperation" | "lastAttemptAt" | "lastReason" | "leaseUntil" | "nextAttemptAt" | "operationKey" | "ownerKey" | "sequence">, {
|
|
43
|
+
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
44
|
+
by_operation_pending: ["hasOperation", "nextAttemptAt", "_creationTime"];
|
|
45
|
+
}, {}, {}>;
|
|
46
|
+
payoutFinancialRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
47
|
+
accountId: string;
|
|
48
|
+
revision: number;
|
|
49
|
+
riskRevision: number;
|
|
50
|
+
}, {
|
|
51
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
52
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
53
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
54
|
+
}, "required", "accountId" | "revision" | "riskRevision">, {
|
|
55
|
+
by_account: ["accountId", "_creationTime"];
|
|
56
|
+
}, {}, {}>;
|
|
57
|
+
payoutRiskEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
58
|
+
accountId: string;
|
|
59
|
+
key: string;
|
|
60
|
+
kind: "allocation" | "claim" | "fee" | "provider_payout" | "transfer";
|
|
61
|
+
removed?: boolean | undefined;
|
|
62
|
+
riskRevision: number;
|
|
63
|
+
}, {
|
|
64
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
65
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
66
|
+
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>;
|
|
67
|
+
key: import("convex/values").VString<string, "required">;
|
|
68
|
+
removed: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
69
|
+
}, "required", "accountId" | "key" | "kind" | "removed" | "riskRevision">, {
|
|
70
|
+
by_account_revision: ["accountId", "riskRevision", "_creationTime"];
|
|
71
|
+
}, {}, {}>;
|
|
72
|
+
payoutRiskRevisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
73
|
+
accountId: string;
|
|
74
|
+
riskRevision: number;
|
|
75
|
+
}, {
|
|
76
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
77
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
78
|
+
}, "required", "accountId" | "riskRevision">, {
|
|
79
|
+
by_account: ["accountId", "_creationTime"];
|
|
80
|
+
}, {}, {}>;
|
|
81
|
+
payoutSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
82
|
+
accountId: string;
|
|
83
|
+
allocationCount: number;
|
|
84
|
+
allocationCursor?: string | undefined;
|
|
85
|
+
claimCount: number;
|
|
86
|
+
claimCursor?: string | undefined;
|
|
87
|
+
deferredPositiveChanges: boolean;
|
|
88
|
+
expectedRevision: number;
|
|
89
|
+
expiresAt: number;
|
|
90
|
+
feeCount: number;
|
|
91
|
+
feeCursor?: string | undefined;
|
|
92
|
+
initialRevision: number;
|
|
93
|
+
initialRiskRevision: number;
|
|
94
|
+
observedRevision: number;
|
|
95
|
+
operationKey: string;
|
|
96
|
+
ownerKey: string;
|
|
97
|
+
phase: "allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources";
|
|
98
|
+
policyMode?: string | undefined;
|
|
99
|
+
policyOperationKey?: string | undefined;
|
|
100
|
+
providerChanged: boolean;
|
|
101
|
+
readOnly: boolean;
|
|
102
|
+
reason?: string | undefined;
|
|
103
|
+
riskRevision: number;
|
|
104
|
+
sourceCount: number;
|
|
105
|
+
sourceCursor?: string | undefined;
|
|
106
|
+
sourceFence: number;
|
|
107
|
+
step: number;
|
|
108
|
+
}, {
|
|
109
|
+
readOnly: import("convex/values").VBoolean<boolean, "required">;
|
|
110
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
111
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
112
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
113
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
114
|
+
policyMode: import("convex/values").VString<string | undefined, "optional">;
|
|
115
|
+
policyOperationKey: import("convex/values").VString<string | undefined, "optional">;
|
|
116
|
+
phase: import("convex/values").VUnion<"allocations" | "check" | "claims" | "discarding" | "fees" | "invalidated" | "local_ready" | "repair" | "sources", [import("convex/values").VLiteral<"sources", "required">, import("convex/values").VLiteral<"allocations", "required">, import("convex/values").VLiteral<"fees", "required">, import("convex/values").VLiteral<"claims", "required">, import("convex/values").VLiteral<"repair", "required">, import("convex/values").VLiteral<"check", "required">, import("convex/values").VLiteral<"local_ready", "required">, import("convex/values").VLiteral<"invalidated", "required">, import("convex/values").VLiteral<"discarding", "required">], "required", never>;
|
|
117
|
+
step: import("convex/values").VFloat64<number, "required">;
|
|
118
|
+
sourceFence: import("convex/values").VFloat64<number, "required">;
|
|
119
|
+
sourceCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
120
|
+
allocationCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
121
|
+
feeCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
122
|
+
claimCursor: import("convex/values").VString<string | undefined, "optional">;
|
|
123
|
+
initialRevision: import("convex/values").VFloat64<number, "required">;
|
|
124
|
+
initialRiskRevision: import("convex/values").VFloat64<number, "required">;
|
|
125
|
+
riskRevision: import("convex/values").VFloat64<number, "required">;
|
|
126
|
+
observedRevision: import("convex/values").VFloat64<number, "required">;
|
|
127
|
+
sourceCount: import("convex/values").VFloat64<number, "required">;
|
|
128
|
+
allocationCount: import("convex/values").VFloat64<number, "required">;
|
|
129
|
+
claimCount: import("convex/values").VFloat64<number, "required">;
|
|
130
|
+
feeCount: import("convex/values").VFloat64<number, "required">;
|
|
131
|
+
deferredPositiveChanges: import("convex/values").VBoolean<boolean, "required">;
|
|
132
|
+
providerChanged: import("convex/values").VBoolean<boolean, "required">;
|
|
133
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
134
|
+
reason: import("convex/values").VString<string | undefined, "optional">;
|
|
135
|
+
}, "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">, {
|
|
136
|
+
by_account_phase: ["accountId", "phase", "_creationTime"];
|
|
137
|
+
by_operation: ["operationKey", "_creationTime"];
|
|
138
|
+
by_read_only: ["readOnly", "_creationTime"];
|
|
139
|
+
}, {}, {}>;
|
|
140
|
+
payoutSnapshotSources: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
141
|
+
allocationCurrency?: string | undefined;
|
|
142
|
+
allocationPresent: boolean;
|
|
143
|
+
amount: number;
|
|
144
|
+
currency: string;
|
|
145
|
+
expectedPaid: number;
|
|
146
|
+
expectedReserved: number;
|
|
147
|
+
ledgerFingerprint: string;
|
|
148
|
+
needsCheck: boolean;
|
|
149
|
+
paidAmount: number;
|
|
150
|
+
reinstatement: boolean;
|
|
151
|
+
reservedAmount: number;
|
|
152
|
+
reversalClaimedAmount: number;
|
|
153
|
+
reversedAmount: number;
|
|
154
|
+
role?: string | undefined;
|
|
155
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
156
|
+
sourceChargeId?: string | undefined;
|
|
157
|
+
sourceCreatedAt: number;
|
|
158
|
+
status: string;
|
|
159
|
+
stripeTransferId: string;
|
|
160
|
+
}, {
|
|
161
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
162
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
163
|
+
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
164
|
+
sourceCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
165
|
+
currency: import("convex/values").VString<string, "required">;
|
|
166
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
167
|
+
status: import("convex/values").VString<string, "required">;
|
|
168
|
+
role: import("convex/values").VString<string | undefined, "optional">;
|
|
169
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
170
|
+
reversedAmount: import("convex/values").VFloat64<number, "required">;
|
|
171
|
+
reversalClaimedAmount: import("convex/values").VFloat64<number, "required">;
|
|
172
|
+
reinstatement: import("convex/values").VBoolean<boolean, "required">;
|
|
173
|
+
allocationPresent: import("convex/values").VBoolean<boolean, "required">;
|
|
174
|
+
allocationCurrency: import("convex/values").VString<string | undefined, "optional">;
|
|
175
|
+
paidAmount: import("convex/values").VFloat64<number, "required">;
|
|
176
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
177
|
+
expectedPaid: import("convex/values").VFloat64<number, "required">;
|
|
178
|
+
expectedReserved: import("convex/values").VFloat64<number, "required">;
|
|
179
|
+
needsCheck: import("convex/values").VBoolean<boolean, "required">;
|
|
180
|
+
}, "required", "allocationCurrency" | "allocationPresent" | "amount" | "currency" | "expectedPaid" | "expectedReserved" | "ledgerFingerprint" | "needsCheck" | "paidAmount" | "reinstatement" | "reservedAmount" | "reversalClaimedAmount" | "reversedAmount" | "role" | "snapshotId" | "sourceChargeId" | "sourceCreatedAt" | "status" | "stripeTransferId">, {
|
|
181
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
182
|
+
by_snapshot_check: ["snapshotId", "needsCheck", "_creationTime"];
|
|
183
|
+
by_snapshot_transfer: ["snapshotId", "stripeTransferId", "_creationTime"];
|
|
184
|
+
}, {}, {}>;
|
|
185
|
+
payoutSnapshotClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
186
|
+
allocations: {
|
|
187
|
+
amount: number;
|
|
188
|
+
role?: string | undefined;
|
|
189
|
+
stripeTransferId: string;
|
|
190
|
+
}[];
|
|
191
|
+
amount: number;
|
|
192
|
+
currency: string;
|
|
193
|
+
fingerprint: string;
|
|
194
|
+
historical?: boolean | undefined;
|
|
195
|
+
operationKey: string;
|
|
196
|
+
providerFee?: number | undefined;
|
|
197
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
198
|
+
status: string;
|
|
199
|
+
stripePayoutId?: string | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
202
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
203
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
204
|
+
currency: import("convex/values").VString<string, "required">;
|
|
205
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
206
|
+
status: import("convex/values").VString<string, "required">;
|
|
207
|
+
stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
208
|
+
historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
209
|
+
providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
210
|
+
allocations: import("convex/values").VArray<{
|
|
211
|
+
amount: number;
|
|
212
|
+
role?: string | undefined;
|
|
213
|
+
stripeTransferId: string;
|
|
214
|
+
}[], import("convex/values").VObject<{
|
|
215
|
+
amount: number;
|
|
216
|
+
role?: string | undefined;
|
|
217
|
+
stripeTransferId: string;
|
|
218
|
+
}, {
|
|
219
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
220
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
221
|
+
role: import("convex/values").VString<string | undefined, "optional">;
|
|
222
|
+
}, "required", "amount" | "role" | "stripeTransferId">, "required">;
|
|
223
|
+
}, "required", "allocations" | "amount" | "currency" | "fingerprint" | "historical" | "operationKey" | "providerFee" | "snapshotId" | "status" | "stripePayoutId">, {
|
|
224
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
225
|
+
by_snapshot_operation: ["snapshotId", "operationKey", "_creationTime"];
|
|
226
|
+
}, {}, {}>;
|
|
227
|
+
payoutSnapshotFees: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
228
|
+
amount: number;
|
|
229
|
+
currency: string;
|
|
230
|
+
revision: number;
|
|
231
|
+
snapshotId: import("convex/values").GenericId<"payoutSnapshots">;
|
|
232
|
+
}, {
|
|
233
|
+
snapshotId: import("convex/values").VId<import("convex/values").GenericId<"payoutSnapshots">, "required">;
|
|
234
|
+
currency: import("convex/values").VString<string, "required">;
|
|
235
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
236
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
237
|
+
}, "required", "amount" | "currency" | "revision" | "snapshotId">, {
|
|
238
|
+
by_snapshot: ["snapshotId", "_creationTime"];
|
|
239
|
+
by_snapshot_currency: ["snapshotId", "currency", "_creationTime"];
|
|
240
|
+
}, {}, {}>;
|
|
241
|
+
affiliateObligations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
242
|
+
accounted?: boolean | undefined;
|
|
243
|
+
activeOperationId?: import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined;
|
|
244
|
+
affiliateAccountId: string;
|
|
245
|
+
chargeAmount: number;
|
|
246
|
+
creditAmount?: number | undefined;
|
|
247
|
+
currency: string;
|
|
248
|
+
debtAmount?: number | undefined;
|
|
249
|
+
debtStatus?: "open" | "settled" | undefined;
|
|
250
|
+
disputeId?: string | undefined;
|
|
251
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
252
|
+
disputedPrincipal: number;
|
|
253
|
+
earningId?: import("convex/values").GenericId<"affiliateEarnings"> | undefined;
|
|
254
|
+
finalizedAmount: number;
|
|
255
|
+
lastError?: string | undefined;
|
|
256
|
+
lastRefundId?: string | undefined;
|
|
257
|
+
lastState?: string | undefined;
|
|
258
|
+
legacyReceiptIds?: string[] | undefined;
|
|
259
|
+
legacyRestorationIds?: string[] | undefined;
|
|
260
|
+
lostPrincipal: number;
|
|
261
|
+
needsReconciliation: boolean;
|
|
262
|
+
offsetAmount?: number | undefined;
|
|
263
|
+
operationSequence?: number | undefined;
|
|
264
|
+
operatorNote?: string | undefined;
|
|
265
|
+
originalCommission: number;
|
|
266
|
+
paymentId?: string | undefined;
|
|
267
|
+
paymentIntentId?: string | undefined;
|
|
268
|
+
provisionalAmount: number;
|
|
269
|
+
recoveredAmount: number;
|
|
270
|
+
refundedPrincipal: number;
|
|
271
|
+
releasedCommission?: number | undefined;
|
|
272
|
+
reservedRecovery?: number | undefined;
|
|
273
|
+
reservedRestoration?: number | undefined;
|
|
274
|
+
restoredAmount?: number | undefined;
|
|
275
|
+
sourceChargeId: string;
|
|
276
|
+
sourceInvoiceId?: string | undefined;
|
|
277
|
+
storeAccountId?: string | undefined;
|
|
278
|
+
stripeTransferId?: string | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
|
|
281
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
282
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
283
|
+
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
284
|
+
paymentId: import("convex/values").VString<string | undefined, "optional">;
|
|
285
|
+
storeAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
286
|
+
lastRefundId: import("convex/values").VString<string | undefined, "optional">;
|
|
287
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
288
|
+
currency: import("convex/values").VString<string, "required">;
|
|
289
|
+
chargeAmount: import("convex/values").VFloat64<number, "required">;
|
|
290
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
291
|
+
refundedPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
292
|
+
disputedPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
293
|
+
lostPrincipal: import("convex/values").VFloat64<number, "required">;
|
|
294
|
+
finalizedAmount: import("convex/values").VFloat64<number, "required">;
|
|
295
|
+
provisionalAmount: import("convex/values").VFloat64<number, "required">;
|
|
296
|
+
recoveredAmount: import("convex/values").VFloat64<number, "required">;
|
|
297
|
+
needsReconciliation: import("convex/values").VBoolean<boolean, "required">;
|
|
298
|
+
accounted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
299
|
+
legacyReceiptIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
300
|
+
legacyRestorationIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
301
|
+
operatorNote: import("convex/values").VString<string | undefined, "optional">;
|
|
302
|
+
earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings"> | undefined, "optional">;
|
|
303
|
+
releasedCommission: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
304
|
+
offsetAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
305
|
+
restoredAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
306
|
+
reservedRecovery: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
307
|
+
reservedRestoration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
308
|
+
debtAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
309
|
+
creditAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
310
|
+
debtStatus: import("convex/values").VUnion<"open" | "settled" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"settled", "required">], "optional", never>;
|
|
311
|
+
disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
|
|
312
|
+
disputeId: import("convex/values").VString<string | undefined, "optional">;
|
|
313
|
+
activeOperationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateRecoveryOperations"> | undefined, "optional">;
|
|
314
|
+
lastState: import("convex/values").VString<string | undefined, "optional">;
|
|
315
|
+
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
316
|
+
operationSequence: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
317
|
+
}, "required", "accounted" | "activeOperationId" | "affiliateAccountId" | "chargeAmount" | "creditAmount" | "currency" | "debtAmount" | "debtStatus" | "disputeId" | "disputeState" | "disputedPrincipal" | "earningId" | "finalizedAmount" | "lastError" | "lastRefundId" | "lastState" | "legacyReceiptIds" | "legacyRestorationIds" | "lostPrincipal" | "needsReconciliation" | "offsetAmount" | "operationSequence" | "operatorNote" | "originalCommission" | "paymentId" | "paymentIntentId" | "provisionalAmount" | "recoveredAmount" | "refundedPrincipal" | "releasedCommission" | "reservedRecovery" | "reservedRestoration" | "restoredAmount" | "sourceChargeId" | "sourceInvoiceId" | "storeAccountId" | "stripeTransferId">, {
|
|
318
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
319
|
+
by_affiliate_currency_debt: ["affiliateAccountId", "currency", "debtStatus", "_creationTime"];
|
|
320
|
+
by_charge: ["sourceChargeId", "_creationTime"];
|
|
321
|
+
by_transfer: ["stripeTransferId", "_creationTime"];
|
|
322
|
+
}, {}, {}>;
|
|
323
|
+
affiliateRecoveryOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
324
|
+
amount: number;
|
|
325
|
+
attempted: boolean;
|
|
326
|
+
createdAt: number;
|
|
327
|
+
error?: string | undefined;
|
|
328
|
+
kind: "recovery" | "restoration";
|
|
329
|
+
obligationId: import("convex/values").GenericId<"affiliateObligations">;
|
|
330
|
+
providerBaseline?: number | undefined;
|
|
331
|
+
receiptId?: string | undefined;
|
|
332
|
+
sourceEventId?: string | undefined;
|
|
333
|
+
state: "canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported";
|
|
334
|
+
}, {
|
|
335
|
+
obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
|
|
336
|
+
sourceEventId: import("convex/values").VString<string | undefined, "optional">;
|
|
337
|
+
kind: import("convex/values").VUnion<"recovery" | "restoration", [import("convex/values").VLiteral<"recovery", "required">, import("convex/values").VLiteral<"restoration", "required">], "required", never>;
|
|
338
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
339
|
+
state: import("convex/values").VUnion<"canceled" | "failed" | "insufficient_balance" | "pending" | "succeeded" | "unknown" | "unsupported", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"insufficient_balance", "required">, import("convex/values").VLiteral<"unsupported", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
340
|
+
receiptId: import("convex/values").VString<string | undefined, "optional">;
|
|
341
|
+
error: import("convex/values").VString<string | undefined, "optional">;
|
|
342
|
+
attempted: import("convex/values").VBoolean<boolean, "required">;
|
|
343
|
+
providerBaseline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
344
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
345
|
+
}, "required", "amount" | "attempted" | "createdAt" | "error" | "kind" | "obligationId" | "providerBaseline" | "receiptId" | "sourceEventId" | "state">, {
|
|
346
|
+
by_obligation: ["obligationId", "_creationTime"];
|
|
347
|
+
by_state: ["state", "_creationTime"];
|
|
348
|
+
}, {}, {}>;
|
|
349
|
+
affiliatePayoutReleases: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
350
|
+
affiliateAccountId: string;
|
|
351
|
+
amount: number;
|
|
352
|
+
createdAt: number;
|
|
353
|
+
currency: string;
|
|
354
|
+
minimumAmount: number;
|
|
355
|
+
operationKey: string;
|
|
356
|
+
state: "failed" | "pending" | "submitted" | "unknown";
|
|
357
|
+
stripePayoutId?: string | undefined;
|
|
358
|
+
}, {
|
|
359
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
360
|
+
currency: import("convex/values").VString<string, "required">;
|
|
361
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
362
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
363
|
+
minimumAmount: import("convex/values").VFloat64<number, "required">;
|
|
364
|
+
state: import("convex/values").VUnion<"failed" | "pending" | "submitted" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"unknown", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
365
|
+
stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
366
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
367
|
+
}, "required", "affiliateAccountId" | "amount" | "createdAt" | "currency" | "minimumAmount" | "operationKey" | "state" | "stripePayoutId">, {
|
|
368
|
+
by_key: ["operationKey", "_creationTime"];
|
|
369
|
+
by_state: ["state", "_creationTime"];
|
|
370
|
+
}, {}, {}>;
|
|
371
|
+
affiliateEarnings: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
372
|
+
affiliateAccountId: string;
|
|
373
|
+
currency: string;
|
|
374
|
+
originalCommission: number;
|
|
375
|
+
paymentIntentId?: string | undefined;
|
|
376
|
+
releaseAmount: number;
|
|
377
|
+
sourceChargeId: string;
|
|
378
|
+
sourceInvoiceId?: string | undefined;
|
|
379
|
+
status: "paid" | "reserved";
|
|
380
|
+
stripeTransferId?: string | undefined;
|
|
381
|
+
withheldAmount: number;
|
|
382
|
+
}, {
|
|
383
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
384
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
385
|
+
currency: import("convex/values").VString<string, "required">;
|
|
386
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
387
|
+
withheldAmount: import("convex/values").VFloat64<number, "required">;
|
|
388
|
+
releaseAmount: import("convex/values").VFloat64<number, "required">;
|
|
389
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
390
|
+
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
391
|
+
stripeTransferId: import("convex/values").VString<string | undefined, "optional">;
|
|
392
|
+
status: import("convex/values").VUnion<"paid" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"paid", "required">], "required", never>;
|
|
393
|
+
}, "required", "affiliateAccountId" | "currency" | "originalCommission" | "paymentIntentId" | "releaseAmount" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "withheldAmount">, {
|
|
394
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
395
|
+
by_charge_affiliate: ["sourceChargeId", "affiliateAccountId", "_creationTime"];
|
|
396
|
+
}, {}, {}>;
|
|
397
|
+
affiliateOffsets: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
398
|
+
amount: number;
|
|
399
|
+
earningId: import("convex/values").GenericId<"affiliateEarnings">;
|
|
400
|
+
obligationId: import("convex/values").GenericId<"affiliateObligations">;
|
|
401
|
+
}, {
|
|
402
|
+
earningId: import("convex/values").VId<import("convex/values").GenericId<"affiliateEarnings">, "required">;
|
|
403
|
+
obligationId: import("convex/values").VId<import("convex/values").GenericId<"affiliateObligations">, "required">;
|
|
404
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
405
|
+
}, "required", "amount" | "earningId" | "obligationId">, {
|
|
406
|
+
by_earning: ["earningId", "_creationTime"];
|
|
407
|
+
by_obligation: ["obligationId", "_creationTime"];
|
|
408
|
+
}, {}, {}>;
|
|
409
|
+
affiliateRecoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
410
|
+
activePayoutKey?: string | undefined;
|
|
411
|
+
affiliateAccountId: string;
|
|
412
|
+
currency: string;
|
|
413
|
+
netPayable: number;
|
|
414
|
+
offsetAmount: number;
|
|
415
|
+
originalCommission: number;
|
|
416
|
+
outstandingDebt: number;
|
|
417
|
+
pendingPayoutAmount?: number | undefined;
|
|
418
|
+
recoveredAmount: number;
|
|
419
|
+
reservedRecovery: number;
|
|
420
|
+
reservedRestoration: number;
|
|
421
|
+
restorationDue: number;
|
|
422
|
+
restoredAmount: number;
|
|
423
|
+
withheldAmount: number;
|
|
424
|
+
}, {
|
|
425
|
+
activePayoutKey: import("convex/values").VString<string | undefined, "optional">;
|
|
426
|
+
pendingPayoutAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
427
|
+
affiliateAccountId: import("convex/values").VString<string, "required">;
|
|
428
|
+
currency: import("convex/values").VString<string, "required">;
|
|
429
|
+
originalCommission: import("convex/values").VFloat64<number, "required">;
|
|
430
|
+
recoveredAmount: import("convex/values").VFloat64<number, "required">;
|
|
431
|
+
offsetAmount: import("convex/values").VFloat64<number, "required">;
|
|
432
|
+
restoredAmount: import("convex/values").VFloat64<number, "required">;
|
|
433
|
+
outstandingDebt: import("convex/values").VFloat64<number, "required">;
|
|
434
|
+
reservedRecovery: import("convex/values").VFloat64<number, "required">;
|
|
435
|
+
reservedRestoration: import("convex/values").VFloat64<number, "required">;
|
|
436
|
+
restorationDue: import("convex/values").VFloat64<number, "required">;
|
|
437
|
+
withheldAmount: import("convex/values").VFloat64<number, "required">;
|
|
438
|
+
netPayable: import("convex/values").VFloat64<number, "required">;
|
|
439
|
+
}, "required", "activePayoutKey" | "affiliateAccountId" | "currency" | "netPayable" | "offsetAmount" | "originalCommission" | "outstandingDebt" | "pendingPayoutAmount" | "recoveredAmount" | "reservedRecovery" | "reservedRestoration" | "restorationDue" | "restoredAmount" | "withheldAmount">, {
|
|
440
|
+
by_affiliate_currency: ["affiliateAccountId", "currency", "_creationTime"];
|
|
441
|
+
}, {}, {}>;
|
|
442
|
+
affiliateReversalReceipts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
443
|
+
amount: number;
|
|
444
|
+
operationId: string;
|
|
445
|
+
stripeReversalId: string;
|
|
446
|
+
stripeTransferId: string;
|
|
447
|
+
}, {
|
|
448
|
+
stripeReversalId: import("convex/values").VString<string, "required">;
|
|
449
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
450
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
451
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
452
|
+
}, "required", "amount" | "operationId" | "stripeReversalId" | "stripeTransferId">, {
|
|
453
|
+
by_receipt: ["stripeReversalId", "_creationTime"];
|
|
454
|
+
by_transfer: ["stripeTransferId", "_creationTime"];
|
|
455
|
+
by_transfer_operation: ["stripeTransferId", "operationId", "_creationTime"];
|
|
456
|
+
}, {}, {}>;
|
|
457
|
+
payoutSyncClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
458
|
+
acceptedAt?: number | undefined;
|
|
459
|
+
acceptedFingerprint?: string | undefined;
|
|
460
|
+
acceptedGeneration?: number | undefined;
|
|
461
|
+
accountId: string;
|
|
462
|
+
generation: number;
|
|
463
|
+
startedAt: number;
|
|
464
|
+
status: "accepted" | "pending" | "unknown";
|
|
465
|
+
stripePayoutId: string;
|
|
466
|
+
}, {
|
|
467
|
+
stripePayoutId: import("convex/values").VString<string, "required">;
|
|
468
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
469
|
+
generation: import("convex/values").VFloat64<number, "required">;
|
|
470
|
+
status: import("convex/values").VUnion<"accepted" | "pending" | "unknown", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"accepted", "required">, import("convex/values").VLiteral<"unknown", "required">], "required", never>;
|
|
471
|
+
startedAt: import("convex/values").VFloat64<number, "required">;
|
|
472
|
+
acceptedGeneration: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
473
|
+
acceptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
474
|
+
acceptedFingerprint: import("convex/values").VString<string | undefined, "optional">;
|
|
475
|
+
}, "required", "acceptedAt" | "acceptedFingerprint" | "acceptedGeneration" | "accountId" | "generation" | "startedAt" | "status" | "stripePayoutId">, {
|
|
476
|
+
by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
|
|
477
|
+
}, {}, {}>;
|
|
478
|
+
payoutFeeBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
479
|
+
accountId: string;
|
|
480
|
+
amount: number;
|
|
481
|
+
currency: string;
|
|
482
|
+
ownerKey: string;
|
|
483
|
+
revision: number;
|
|
484
|
+
}, {
|
|
485
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
486
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
487
|
+
currency: import("convex/values").VString<string, "required">;
|
|
488
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
489
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
490
|
+
}, "required", "accountId" | "amount" | "currency" | "ownerKey" | "revision">, {
|
|
491
|
+
by_account_currency: ["accountId", "currency", "_creationTime"];
|
|
492
|
+
}, {}, {}>;
|
|
493
|
+
payoutReleaseClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
494
|
+
accountId: string;
|
|
495
|
+
allocations: {
|
|
496
|
+
amount: number;
|
|
497
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
498
|
+
stripeTransferId: string;
|
|
499
|
+
}[];
|
|
500
|
+
amount: number;
|
|
501
|
+
attemptedAt?: number | undefined;
|
|
502
|
+
currency: string;
|
|
503
|
+
debitFee?: number | undefined;
|
|
504
|
+
debitTransactionId?: string | undefined;
|
|
505
|
+
destinationId?: string | undefined;
|
|
506
|
+
expectedRevision: number;
|
|
507
|
+
feeRevision?: number | undefined;
|
|
508
|
+
historical?: boolean | undefined;
|
|
509
|
+
observations: {
|
|
510
|
+
currency: string;
|
|
511
|
+
ledgerFingerprint: string;
|
|
512
|
+
matureNet: number;
|
|
513
|
+
observedAt: number;
|
|
514
|
+
pendingCredits: number;
|
|
515
|
+
stripeTransferId: string;
|
|
516
|
+
transactionIds: string[];
|
|
517
|
+
}[];
|
|
518
|
+
operationKey: string;
|
|
519
|
+
ownerKey: string;
|
|
520
|
+
providerFee?: number | undefined;
|
|
521
|
+
rejection?: {
|
|
522
|
+
code: "amount_too_small" | "balance_insufficient";
|
|
523
|
+
requestId: string;
|
|
524
|
+
} | undefined;
|
|
525
|
+
returnTransactionId?: string | undefined;
|
|
526
|
+
status: "canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted";
|
|
527
|
+
stripePayoutId?: string | undefined;
|
|
528
|
+
}, {
|
|
529
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
530
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
531
|
+
historical: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
532
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
533
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
534
|
+
currency: import("convex/values").VString<string, "required">;
|
|
535
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
536
|
+
destinationId: import("convex/values").VString<string | undefined, "optional">;
|
|
537
|
+
allocations: import("convex/values").VArray<{
|
|
538
|
+
amount: number;
|
|
539
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
540
|
+
stripeTransferId: string;
|
|
541
|
+
}[], import("convex/values").VObject<{
|
|
542
|
+
amount: number;
|
|
543
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
544
|
+
stripeTransferId: string;
|
|
545
|
+
}, {
|
|
546
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
547
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
548
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
|
|
549
|
+
}, "required", "amount" | "role" | "stripeTransferId">, "required">;
|
|
550
|
+
observations: import("convex/values").VArray<{
|
|
551
|
+
currency: string;
|
|
552
|
+
ledgerFingerprint: string;
|
|
553
|
+
matureNet: number;
|
|
554
|
+
observedAt: number;
|
|
555
|
+
pendingCredits: number;
|
|
556
|
+
stripeTransferId: string;
|
|
557
|
+
transactionIds: string[];
|
|
558
|
+
}[], import("convex/values").VObject<{
|
|
559
|
+
currency: string;
|
|
560
|
+
ledgerFingerprint: string;
|
|
561
|
+
matureNet: number;
|
|
562
|
+
observedAt: number;
|
|
563
|
+
pendingCredits: number;
|
|
564
|
+
stripeTransferId: string;
|
|
565
|
+
transactionIds: string[];
|
|
566
|
+
}, {
|
|
567
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
568
|
+
currency: import("convex/values").VString<string, "required">;
|
|
569
|
+
matureNet: import("convex/values").VFloat64<number, "required">;
|
|
570
|
+
pendingCredits: import("convex/values").VFloat64<number, "required">;
|
|
571
|
+
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
572
|
+
observedAt: import("convex/values").VFloat64<number, "required">;
|
|
573
|
+
transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
574
|
+
}, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
|
|
575
|
+
status: import("convex/values").VUnion<"canceled" | "paid" | "rejected" | "reserved" | "returned" | "submitted", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"submitted", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"returned", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"rejected", "required">], "required", never>;
|
|
576
|
+
attemptedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
577
|
+
stripePayoutId: import("convex/values").VString<string | undefined, "optional">;
|
|
578
|
+
returnTransactionId: import("convex/values").VString<string | undefined, "optional">;
|
|
579
|
+
feeRevision: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
580
|
+
debitTransactionId: import("convex/values").VString<string | undefined, "optional">;
|
|
581
|
+
debitFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
582
|
+
providerFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
583
|
+
rejection: import("convex/values").VObject<{
|
|
584
|
+
code: "amount_too_small" | "balance_insufficient";
|
|
585
|
+
requestId: string;
|
|
586
|
+
} | undefined, {
|
|
587
|
+
requestId: import("convex/values").VString<string, "required">;
|
|
588
|
+
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>;
|
|
589
|
+
}, "optional", "code" | "requestId">;
|
|
590
|
+
}, "required", "accountId" | "allocations" | "amount" | "attemptedAt" | "currency" | "debitFee" | "debitTransactionId" | "destinationId" | "expectedRevision" | "feeRevision" | "historical" | "observations" | "operationKey" | "ownerKey" | "providerFee" | "rejection" | "rejection.code" | "rejection.requestId" | "returnTransactionId" | "status" | "stripePayoutId">, {
|
|
591
|
+
by_account_status: ["accountId", "status", "_creationTime"];
|
|
592
|
+
by_debit_receipt: ["debitTransactionId", "_creationTime"];
|
|
593
|
+
by_operation: ["operationKey", "_creationTime"];
|
|
594
|
+
by_provider_payout: ["stripePayoutId", "_creationTime"];
|
|
595
|
+
by_rejection_request: ["rejection.requestId", "_creationTime"];
|
|
596
|
+
by_return_receipt: ["returnTransactionId", "_creationTime"];
|
|
597
|
+
by_status: ["status", "_creationTime"];
|
|
598
|
+
}, {}, {}>;
|
|
599
|
+
payoutSourceAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
600
|
+
accountId: string;
|
|
601
|
+
currency: string;
|
|
602
|
+
ownerKey: string;
|
|
603
|
+
paidAmount: number;
|
|
604
|
+
reservedAmount: number;
|
|
605
|
+
stripeTransferId: string;
|
|
606
|
+
}, {
|
|
607
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
608
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
609
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
610
|
+
currency: import("convex/values").VString<string, "required">;
|
|
611
|
+
paidAmount: import("convex/values").VFloat64<number, "required">;
|
|
612
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
613
|
+
}, "required", "accountId" | "currency" | "ownerKey" | "paidAmount" | "reservedAmount" | "stripeTransferId">, {
|
|
614
|
+
by_account: ["accountId", "_creationTime"];
|
|
615
|
+
by_transfer: ["stripeTransferId", "_creationTime"];
|
|
616
|
+
}, {}, {}>;
|
|
617
|
+
payoutPolicies: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
618
|
+
accountId: string;
|
|
619
|
+
country: string;
|
|
620
|
+
holdDeadline?: number | undefined;
|
|
621
|
+
mode: "custom" | "stripe_managed";
|
|
622
|
+
operationKey: string;
|
|
623
|
+
ownerKey: string;
|
|
624
|
+
previousSchedule?: {
|
|
625
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
626
|
+
monthlyDays?: number[] | undefined;
|
|
627
|
+
weeklyDays?: string[] | undefined;
|
|
628
|
+
} | undefined;
|
|
629
|
+
revision: number;
|
|
630
|
+
status: "changing" | "ready";
|
|
631
|
+
thresholds: {
|
|
632
|
+
amount: number;
|
|
633
|
+
currency: string;
|
|
634
|
+
}[];
|
|
635
|
+
}, {
|
|
636
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
637
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
638
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
639
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
640
|
+
thresholds: import("convex/values").VArray<{
|
|
641
|
+
amount: number;
|
|
642
|
+
currency: string;
|
|
643
|
+
}[], import("convex/values").VObject<{
|
|
644
|
+
amount: number;
|
|
645
|
+
currency: string;
|
|
646
|
+
}, {
|
|
647
|
+
currency: import("convex/values").VString<string, "required">;
|
|
648
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
649
|
+
}, "required", "amount" | "currency">, "required">;
|
|
650
|
+
status: import("convex/values").VUnion<"changing" | "ready", [import("convex/values").VLiteral<"changing", "required">, import("convex/values").VLiteral<"ready", "required">], "required", never>;
|
|
651
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
652
|
+
country: import("convex/values").VString<string, "required">;
|
|
653
|
+
previousSchedule: import("convex/values").VObject<{
|
|
654
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
655
|
+
monthlyDays?: number[] | undefined;
|
|
656
|
+
weeklyDays?: string[] | undefined;
|
|
657
|
+
} | undefined, {
|
|
658
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
659
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
660
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
661
|
+
}, "optional", "interval" | "monthlyDays" | "weeklyDays">;
|
|
662
|
+
holdDeadline: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
663
|
+
}, "required", "accountId" | "country" | "holdDeadline" | "mode" | "operationKey" | "ownerKey" | "previousSchedule" | "previousSchedule.interval" | "previousSchedule.monthlyDays" | "previousSchedule.weeklyDays" | "revision" | "status" | "thresholds">, {
|
|
664
|
+
by_account: ["accountId", "_creationTime"];
|
|
665
|
+
by_deadline: ["holdDeadline", "_creationTime"];
|
|
666
|
+
by_mode_status: ["mode", "status", "_creationTime"];
|
|
667
|
+
by_status: ["status", "_creationTime"];
|
|
668
|
+
}, {}, {}>;
|
|
669
|
+
payoutPolicyOperations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
670
|
+
accountId: string;
|
|
671
|
+
adoption?: {
|
|
672
|
+
claims: {
|
|
673
|
+
fingerprint: string;
|
|
674
|
+
operationKey: string;
|
|
675
|
+
}[];
|
|
676
|
+
observations: {
|
|
677
|
+
currency: string;
|
|
678
|
+
ledgerFingerprint: string;
|
|
679
|
+
matureNet: number;
|
|
680
|
+
observedAt: number;
|
|
681
|
+
pendingCredits: number;
|
|
682
|
+
stripeTransferId: string;
|
|
683
|
+
transactionIds: string[];
|
|
684
|
+
}[];
|
|
685
|
+
oldestHeldAt?: number | undefined;
|
|
686
|
+
} | undefined;
|
|
687
|
+
attempted?: boolean | undefined;
|
|
688
|
+
country: string;
|
|
689
|
+
expectedRevision: number;
|
|
690
|
+
mode: "custom" | "stripe_managed";
|
|
691
|
+
observedAt?: number | undefined;
|
|
692
|
+
observedSchedule: {
|
|
693
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
694
|
+
monthlyDays?: number[] | undefined;
|
|
695
|
+
weeklyDays?: string[] | undefined;
|
|
696
|
+
};
|
|
697
|
+
operationKey: string;
|
|
698
|
+
ownerKey: string;
|
|
699
|
+
previousSchedule: {
|
|
700
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
701
|
+
monthlyDays?: number[] | undefined;
|
|
702
|
+
weeklyDays?: string[] | undefined;
|
|
703
|
+
};
|
|
704
|
+
revision: number;
|
|
705
|
+
status: "canceled" | "complete" | "pending";
|
|
706
|
+
targetSchedule: {
|
|
707
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
708
|
+
monthlyDays?: number[] | undefined;
|
|
709
|
+
weeklyDays?: string[] | undefined;
|
|
710
|
+
};
|
|
711
|
+
thresholds: {
|
|
712
|
+
amount: number;
|
|
713
|
+
currency: string;
|
|
714
|
+
}[];
|
|
715
|
+
}, {
|
|
716
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
717
|
+
ownerKey: import("convex/values").VString<string, "required">;
|
|
718
|
+
adoption: import("convex/values").VObject<{
|
|
719
|
+
claims: {
|
|
720
|
+
fingerprint: string;
|
|
721
|
+
operationKey: string;
|
|
722
|
+
}[];
|
|
723
|
+
observations: {
|
|
724
|
+
currency: string;
|
|
725
|
+
ledgerFingerprint: string;
|
|
726
|
+
matureNet: number;
|
|
727
|
+
observedAt: number;
|
|
728
|
+
pendingCredits: number;
|
|
729
|
+
stripeTransferId: string;
|
|
730
|
+
transactionIds: string[];
|
|
731
|
+
}[];
|
|
732
|
+
oldestHeldAt?: number | undefined;
|
|
733
|
+
} | undefined, {
|
|
734
|
+
observations: import("convex/values").VArray<{
|
|
735
|
+
currency: string;
|
|
736
|
+
ledgerFingerprint: string;
|
|
737
|
+
matureNet: number;
|
|
738
|
+
observedAt: number;
|
|
739
|
+
pendingCredits: number;
|
|
740
|
+
stripeTransferId: string;
|
|
741
|
+
transactionIds: string[];
|
|
742
|
+
}[], import("convex/values").VObject<{
|
|
743
|
+
currency: string;
|
|
744
|
+
ledgerFingerprint: string;
|
|
745
|
+
matureNet: number;
|
|
746
|
+
observedAt: number;
|
|
747
|
+
pendingCredits: number;
|
|
748
|
+
stripeTransferId: string;
|
|
749
|
+
transactionIds: string[];
|
|
750
|
+
}, {
|
|
751
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
752
|
+
currency: import("convex/values").VString<string, "required">;
|
|
753
|
+
matureNet: import("convex/values").VFloat64<number, "required">;
|
|
754
|
+
pendingCredits: import("convex/values").VFloat64<number, "required">;
|
|
755
|
+
ledgerFingerprint: import("convex/values").VString<string, "required">;
|
|
756
|
+
observedAt: import("convex/values").VFloat64<number, "required">;
|
|
757
|
+
transactionIds: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
758
|
+
}, "required", "currency" | "ledgerFingerprint" | "matureNet" | "observedAt" | "pendingCredits" | "stripeTransferId" | "transactionIds">, "required">;
|
|
759
|
+
claims: import("convex/values").VArray<{
|
|
760
|
+
fingerprint: string;
|
|
761
|
+
operationKey: string;
|
|
762
|
+
}[], import("convex/values").VObject<{
|
|
763
|
+
fingerprint: string;
|
|
764
|
+
operationKey: string;
|
|
765
|
+
}, {
|
|
766
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
767
|
+
fingerprint: import("convex/values").VString<string, "required">;
|
|
768
|
+
}, "required", "fingerprint" | "operationKey">, "required">;
|
|
769
|
+
oldestHeldAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
770
|
+
}, "optional", "claims" | "observations" | "oldestHeldAt">;
|
|
771
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
772
|
+
expectedRevision: import("convex/values").VFloat64<number, "required">;
|
|
773
|
+
mode: import("convex/values").VUnion<"custom" | "stripe_managed", [import("convex/values").VLiteral<"stripe_managed", "required">, import("convex/values").VLiteral<"custom", "required">], "required", never>;
|
|
774
|
+
thresholds: import("convex/values").VArray<{
|
|
775
|
+
amount: number;
|
|
776
|
+
currency: string;
|
|
777
|
+
}[], import("convex/values").VObject<{
|
|
778
|
+
amount: number;
|
|
779
|
+
currency: string;
|
|
780
|
+
}, {
|
|
781
|
+
currency: import("convex/values").VString<string, "required">;
|
|
782
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
783
|
+
}, "required", "amount" | "currency">, "required">;
|
|
784
|
+
country: import("convex/values").VString<string, "required">;
|
|
785
|
+
observedSchedule: import("convex/values").VObject<{
|
|
786
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
787
|
+
monthlyDays?: number[] | undefined;
|
|
788
|
+
weeklyDays?: string[] | undefined;
|
|
789
|
+
}, {
|
|
790
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
791
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
792
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
793
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
794
|
+
observedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
795
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
796
|
+
previousSchedule: import("convex/values").VObject<{
|
|
797
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
798
|
+
monthlyDays?: number[] | undefined;
|
|
799
|
+
weeklyDays?: string[] | undefined;
|
|
800
|
+
}, {
|
|
801
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
802
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
803
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
804
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
805
|
+
targetSchedule: import("convex/values").VObject<{
|
|
806
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
807
|
+
monthlyDays?: number[] | undefined;
|
|
808
|
+
weeklyDays?: string[] | undefined;
|
|
809
|
+
}, {
|
|
810
|
+
interval: import("convex/values").VUnion<"daily" | "manual" | "monthly" | "weekly", [import("convex/values").VLiteral<"daily", "required">, import("convex/values").VLiteral<"weekly", "required">, import("convex/values").VLiteral<"monthly", "required">, import("convex/values").VLiteral<"manual", "required">], "required", never>;
|
|
811
|
+
weeklyDays: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
812
|
+
monthlyDays: import("convex/values").VArray<number[] | undefined, import("convex/values").VFloat64<number, "required">, "optional">;
|
|
813
|
+
}, "required", "interval" | "monthlyDays" | "weeklyDays">;
|
|
814
|
+
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>;
|
|
815
|
+
attempted: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
816
|
+
}, "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">, {
|
|
817
|
+
by_operation: ["operationKey", "_creationTime"];
|
|
818
|
+
}, {}, {}>;
|
|
819
|
+
currencyTotals: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
820
|
+
accountId: string;
|
|
821
|
+
count: number;
|
|
822
|
+
currency: string;
|
|
823
|
+
gross: number;
|
|
824
|
+
kind: "earnings" | "payouts";
|
|
825
|
+
paidOut: number;
|
|
826
|
+
reversed: number;
|
|
827
|
+
}, {
|
|
828
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
829
|
+
currency: import("convex/values").VString<string, "required">;
|
|
830
|
+
kind: import("convex/values").VUnion<"earnings" | "payouts", [import("convex/values").VLiteral<"earnings", "required">, import("convex/values").VLiteral<"payouts", "required">], "required", never>;
|
|
831
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
832
|
+
reversed: import("convex/values").VFloat64<number, "required">;
|
|
833
|
+
paidOut: import("convex/values").VFloat64<number, "required">;
|
|
834
|
+
count: import("convex/values").VFloat64<number, "required">;
|
|
835
|
+
}, "required", "accountId" | "count" | "currency" | "gross" | "kind" | "paidOut" | "reversed">, {
|
|
836
|
+
by_account_kind_currency: ["accountId", "kind", "currency", "_creationTime"];
|
|
837
|
+
}, {}, {}>;
|
|
838
|
+
recoveryClaims: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
839
|
+
accountId: string;
|
|
840
|
+
amountDue: number;
|
|
841
|
+
claimKey: string;
|
|
842
|
+
collectedAmount: number;
|
|
843
|
+
currency: string;
|
|
844
|
+
openingCollection?: {
|
|
845
|
+
amountDue: number;
|
|
846
|
+
collectedAmount: number;
|
|
847
|
+
operationKey: string;
|
|
848
|
+
revision: number;
|
|
849
|
+
} | undefined;
|
|
850
|
+
outstanding: number;
|
|
851
|
+
reservedAmount: number;
|
|
852
|
+
revision: number;
|
|
853
|
+
scopeKey: string;
|
|
854
|
+
sign: "negative" | "positive" | "zero";
|
|
855
|
+
sourceChargeId: string;
|
|
856
|
+
sourceGross: number;
|
|
857
|
+
sourceProcessingFee: number;
|
|
858
|
+
}, {
|
|
859
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
860
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
861
|
+
currency: import("convex/values").VString<string, "required">;
|
|
862
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
863
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
864
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
865
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
866
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
867
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
868
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
869
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
870
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
871
|
+
sign: import("convex/values").VUnion<"negative" | "positive" | "zero", [import("convex/values").VLiteral<"positive", "required">, import("convex/values").VLiteral<"negative", "required">, import("convex/values").VLiteral<"zero", "required">], "required", never>;
|
|
872
|
+
openingCollection: import("convex/values").VObject<{
|
|
873
|
+
amountDue: number;
|
|
874
|
+
collectedAmount: number;
|
|
875
|
+
operationKey: string;
|
|
876
|
+
revision: number;
|
|
877
|
+
} | undefined, {
|
|
878
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
879
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
880
|
+
revision: import("convex/values").VFloat64<number, "required">;
|
|
881
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
882
|
+
}, "optional", "amountDue" | "collectedAmount" | "operationKey" | "revision">;
|
|
883
|
+
}, "required", "accountId" | "amountDue" | "claimKey" | "collectedAmount" | "currency" | "openingCollection" | "openingCollection.amountDue" | "openingCollection.collectedAmount" | "openingCollection.operationKey" | "openingCollection.revision" | "outstanding" | "reservedAmount" | "revision" | "scopeKey" | "sign" | "sourceChargeId" | "sourceGross" | "sourceProcessingFee">, {
|
|
884
|
+
by_import: ["openingCollection.operationKey", "_creationTime"];
|
|
885
|
+
by_key: ["claimKey", "_creationTime"];
|
|
886
|
+
by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
|
|
887
|
+
by_sign: ["accountId", "scopeKey", "currency", "sign", "_creationTime"];
|
|
888
|
+
}, {}, {}>;
|
|
889
|
+
recoveryBalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
890
|
+
accountId: string;
|
|
891
|
+
activeGroupKey?: string | undefined;
|
|
892
|
+
amountDue: number;
|
|
893
|
+
collectedAmount: number;
|
|
894
|
+
currency: string;
|
|
895
|
+
outstanding: number;
|
|
896
|
+
reservedAmount: number;
|
|
897
|
+
scopeKey: string;
|
|
898
|
+
}, {
|
|
899
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
900
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
901
|
+
currency: import("convex/values").VString<string, "required">;
|
|
902
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
903
|
+
collectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
904
|
+
reservedAmount: import("convex/values").VFloat64<number, "required">;
|
|
905
|
+
outstanding: import("convex/values").VFloat64<number, "required">;
|
|
906
|
+
activeGroupKey: import("convex/values").VString<string | undefined, "optional">;
|
|
907
|
+
}, "required", "accountId" | "activeGroupKey" | "amountDue" | "collectedAmount" | "currency" | "outstanding" | "reservedAmount" | "scopeKey">, {
|
|
908
|
+
by_scope: ["accountId", "scopeKey", "currency", "_creationTime"];
|
|
909
|
+
}, {}, {}>;
|
|
910
|
+
recoveryGroups: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
911
|
+
accountId: string;
|
|
912
|
+
amount: number;
|
|
913
|
+
currency: string;
|
|
914
|
+
groupKey: string;
|
|
915
|
+
invoiceFunding?: {
|
|
916
|
+
sourceChargeId: string;
|
|
917
|
+
sourceGross: number;
|
|
918
|
+
sourceProcessingFee: number;
|
|
919
|
+
} | undefined;
|
|
920
|
+
invoiceItemId?: string | undefined;
|
|
921
|
+
maxCredit: number;
|
|
922
|
+
maxDebit: number;
|
|
923
|
+
pendingOperations: number;
|
|
924
|
+
scopeKey: string;
|
|
925
|
+
sourceGross?: number | undefined;
|
|
926
|
+
sourceId: string;
|
|
927
|
+
sourceKind: "invoice" | "settlement";
|
|
928
|
+
sourceProcessingFee?: number | undefined;
|
|
929
|
+
status: "collected" | "collecting" | "open" | "released" | "releasing" | "sealed";
|
|
930
|
+
}, {
|
|
931
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
932
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
933
|
+
currency: import("convex/values").VString<string, "required">;
|
|
934
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
935
|
+
sourceKind: import("convex/values").VUnion<"invoice" | "settlement", [import("convex/values").VLiteral<"settlement", "required">, import("convex/values").VLiteral<"invoice", "required">], "required", never>;
|
|
936
|
+
sourceId: import("convex/values").VString<string, "required">;
|
|
937
|
+
sourceGross: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
938
|
+
sourceProcessingFee: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
939
|
+
maxDebit: import("convex/values").VFloat64<number, "required">;
|
|
940
|
+
maxCredit: import("convex/values").VFloat64<number, "required">;
|
|
941
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
942
|
+
pendingOperations: import("convex/values").VFloat64<number, "required">;
|
|
943
|
+
invoiceItemId: import("convex/values").VString<string | undefined, "optional">;
|
|
944
|
+
invoiceFunding: import("convex/values").VObject<{
|
|
945
|
+
sourceChargeId: string;
|
|
946
|
+
sourceGross: number;
|
|
947
|
+
sourceProcessingFee: number;
|
|
948
|
+
} | undefined, {
|
|
949
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
950
|
+
sourceGross: import("convex/values").VFloat64<number, "required">;
|
|
951
|
+
sourceProcessingFee: import("convex/values").VFloat64<number, "required">;
|
|
952
|
+
}, "optional", "sourceChargeId" | "sourceGross" | "sourceProcessingFee">;
|
|
953
|
+
status: import("convex/values").VUnion<"collected" | "collecting" | "open" | "released" | "releasing" | "sealed", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"sealed", "required">, import("convex/values").VLiteral<"collecting", "required">, import("convex/values").VLiteral<"releasing", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">], "required", never>;
|
|
954
|
+
}, "required", "accountId" | "amount" | "currency" | "groupKey" | "invoiceFunding" | "invoiceFunding.sourceChargeId" | "invoiceFunding.sourceGross" | "invoiceFunding.sourceProcessingFee" | "invoiceItemId" | "maxCredit" | "maxDebit" | "pendingOperations" | "scopeKey" | "sourceGross" | "sourceId" | "sourceKind" | "sourceProcessingFee" | "status">, {
|
|
955
|
+
by_key: ["groupKey", "_creationTime"];
|
|
956
|
+
}, {}, {}>;
|
|
957
|
+
recoveryReservations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
958
|
+
allocations: {
|
|
959
|
+
amount: number;
|
|
960
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
961
|
+
claimKey: string;
|
|
962
|
+
}[];
|
|
963
|
+
amount: number;
|
|
964
|
+
groupKey: string;
|
|
965
|
+
limit: number;
|
|
966
|
+
operationKey: string;
|
|
967
|
+
status: "collected" | "empty" | "released" | "reserved";
|
|
968
|
+
}, {
|
|
969
|
+
operationKey: import("convex/values").VString<string, "required">;
|
|
970
|
+
groupKey: import("convex/values").VString<string, "required">;
|
|
971
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
972
|
+
limit: import("convex/values").VFloat64<number, "required">;
|
|
973
|
+
allocations: import("convex/values").VArray<{
|
|
974
|
+
amount: number;
|
|
975
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
976
|
+
claimKey: string;
|
|
977
|
+
}[], import("convex/values").VObject<{
|
|
978
|
+
amount: number;
|
|
979
|
+
claimId: import("convex/values").GenericId<"recoveryClaims">;
|
|
980
|
+
claimKey: string;
|
|
981
|
+
}, {
|
|
982
|
+
claimId: import("convex/values").VId<import("convex/values").GenericId<"recoveryClaims">, "required">;
|
|
983
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
984
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
985
|
+
}, "required", "amount" | "claimId" | "claimKey">, "required">;
|
|
986
|
+
status: import("convex/values").VUnion<"collected" | "empty" | "released" | "reserved", [import("convex/values").VLiteral<"reserved", "required">, import("convex/values").VLiteral<"collected", "required">, import("convex/values").VLiteral<"released", "required">, import("convex/values").VLiteral<"empty", "required">], "required", never>;
|
|
987
|
+
}, "required", "allocations" | "amount" | "groupKey" | "limit" | "operationKey" | "status">, {
|
|
988
|
+
by_group_status: ["groupKey", "status", "_creationTime"];
|
|
989
|
+
by_key: ["operationKey", "_creationTime"];
|
|
990
|
+
}, {}, {}>;
|
|
991
|
+
settlementAllocations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
992
|
+
adjustmentAmount?: number | undefined;
|
|
993
|
+
currency: string;
|
|
994
|
+
gross: number;
|
|
995
|
+
paymentId?: string | undefined;
|
|
996
|
+
paymentIntentId?: string | undefined;
|
|
997
|
+
platformNet: number;
|
|
998
|
+
processingFee: number;
|
|
999
|
+
sourceChargeId: string;
|
|
1000
|
+
sourceInvoiceId?: string | undefined;
|
|
1001
|
+
transfers: {
|
|
1002
|
+
amount: number;
|
|
1003
|
+
destinationAccountId: string;
|
|
1004
|
+
role: "affiliate" | "other" | "store";
|
|
1005
|
+
}[];
|
|
1006
|
+
}, {
|
|
1007
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
1008
|
+
paymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1009
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1010
|
+
gross: import("convex/values").VFloat64<number, "required">;
|
|
1011
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1012
|
+
processingFee: import("convex/values").VFloat64<number, "required">;
|
|
1013
|
+
platformNet: import("convex/values").VFloat64<number, "required">;
|
|
1014
|
+
adjustmentAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1015
|
+
paymentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1016
|
+
transfers: import("convex/values").VArray<{
|
|
1017
|
+
amount: number;
|
|
1018
|
+
destinationAccountId: string;
|
|
1019
|
+
role: "affiliate" | "other" | "store";
|
|
1020
|
+
}[], import("convex/values").VObject<{
|
|
1021
|
+
amount: number;
|
|
1022
|
+
destinationAccountId: string;
|
|
1023
|
+
role: "affiliate" | "other" | "store";
|
|
1024
|
+
}, {
|
|
1025
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1026
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1027
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1028
|
+
}, "required", "amount" | "destinationAccountId" | "role">, "required">;
|
|
1029
|
+
}, "required", "adjustmentAmount" | "currency" | "gross" | "paymentId" | "paymentIntentId" | "platformNet" | "processingFee" | "sourceChargeId" | "sourceInvoiceId" | "transfers">, {
|
|
1030
|
+
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
1031
|
+
}, {}, {}>;
|
|
1032
|
+
commissionTerms: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1033
|
+
affiliateAccountId?: string | undefined;
|
|
1034
|
+
firstPaidInvoiceId: string;
|
|
1035
|
+
subscriptionId: string;
|
|
1036
|
+
term: "forever" | "one_time";
|
|
1037
|
+
}, {
|
|
1038
|
+
subscriptionId: import("convex/values").VString<string, "required">;
|
|
1039
|
+
term: import("convex/values").VUnion<"forever" | "one_time", [import("convex/values").VLiteral<"forever", "required">, import("convex/values").VLiteral<"one_time", "required">], "required", never>;
|
|
1040
|
+
affiliateAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1041
|
+
firstPaidInvoiceId: import("convex/values").VString<string, "required">;
|
|
1042
|
+
}, "required", "affiliateAccountId" | "firstPaidInvoiceId" | "subscriptionId" | "term">, {
|
|
1043
|
+
by_subscription: ["subscriptionId", "_creationTime"];
|
|
1044
|
+
}, {}, {}>;
|
|
1045
|
+
commissionDecisions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1046
|
+
claimKey: string;
|
|
1047
|
+
eligible: boolean;
|
|
1048
|
+
invoiceId: string;
|
|
1049
|
+
subscriptionId: string;
|
|
1050
|
+
}, {
|
|
1051
|
+
subscriptionId: import("convex/values").VString<string, "required">;
|
|
1052
|
+
invoiceId: import("convex/values").VString<string, "required">;
|
|
1053
|
+
eligible: import("convex/values").VBoolean<boolean, "required">;
|
|
1054
|
+
claimKey: import("convex/values").VString<string, "required">;
|
|
1055
|
+
}, "required", "claimKey" | "eligible" | "invoiceId" | "subscriptionId">, {
|
|
1056
|
+
by_subscription_invoice: ["subscriptionId", "invoiceId", "_creationTime"];
|
|
1057
|
+
}, {}, {}>;
|
|
1058
|
+
accounts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1059
|
+
appliedConfigurations?: ("customer" | "merchant" | "recipient")[] | undefined;
|
|
1060
|
+
capabilities?: any;
|
|
1061
|
+
configuration?: any;
|
|
1062
|
+
country?: string | undefined;
|
|
1063
|
+
email?: string | undefined;
|
|
1064
|
+
metadata?: any;
|
|
1065
|
+
missingRequirements?: string[] | undefined;
|
|
1066
|
+
name?: string | undefined;
|
|
1067
|
+
onboardingStatus: "complete" | "in_progress" | "pending" | "restricted";
|
|
1068
|
+
orgId?: string | undefined;
|
|
1069
|
+
requirements?: any;
|
|
1070
|
+
statementDescriptor?: string | undefined;
|
|
1071
|
+
stripeAccountId: string;
|
|
1072
|
+
userId: string;
|
|
1073
|
+
}, {
|
|
1074
|
+
stripeAccountId: import("convex/values").VString<string, "required">;
|
|
1075
|
+
userId: import("convex/values").VString<string, "required">;
|
|
1076
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
1077
|
+
email: import("convex/values").VString<string | undefined, "optional">;
|
|
1078
|
+
name: import("convex/values").VString<string | undefined, "optional">;
|
|
1079
|
+
country: import("convex/values").VString<string | undefined, "optional">;
|
|
1080
|
+
capabilities: import("convex/values").VAny<any, "optional", string>;
|
|
1081
|
+
requirements: import("convex/values").VAny<any, "optional", string>;
|
|
1082
|
+
configuration: import("convex/values").VAny<any, "optional", string>;
|
|
1083
|
+
appliedConfigurations: import("convex/values").VArray<("customer" | "merchant" | "recipient")[] | undefined, import("convex/values").VUnion<"customer" | "merchant" | "recipient", [import("convex/values").VLiteral<"customer", "required">, import("convex/values").VLiteral<"merchant", "required">, import("convex/values").VLiteral<"recipient", "required">], "required", never>, "optional">;
|
|
1084
|
+
onboardingStatus: import("convex/values").VUnion<"complete" | "in_progress" | "pending" | "restricted", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"restricted", "required">], "required", never>;
|
|
1085
|
+
missingRequirements: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
1086
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1087
|
+
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
1088
|
+
}, "required", "appliedConfigurations" | "capabilities" | "configuration" | "country" | "email" | "metadata" | "missingRequirements" | "name" | "onboardingStatus" | "orgId" | "requirements" | "statementDescriptor" | "stripeAccountId" | "userId" | `capabilities.${string}` | `configuration.${string}` | `metadata.${string}` | `requirements.${string}`>, {
|
|
1089
|
+
by_onboarding_status: ["onboardingStatus", "_creationTime"];
|
|
1090
|
+
by_org_id: ["orgId", "_creationTime"];
|
|
1091
|
+
by_stripe_account_id: ["stripeAccountId", "_creationTime"];
|
|
1092
|
+
by_user_id: ["userId", "_creationTime"];
|
|
1093
|
+
}, {}, {}>;
|
|
1094
|
+
products: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1095
|
+
accountId?: string | undefined;
|
|
1096
|
+
active: boolean;
|
|
1097
|
+
description?: string | undefined;
|
|
1098
|
+
metadata?: any;
|
|
1099
|
+
name: string;
|
|
1100
|
+
stripeProductId: string;
|
|
1101
|
+
}, {
|
|
1102
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
1103
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1104
|
+
name: import("convex/values").VString<string, "required">;
|
|
1105
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
1106
|
+
active: import("convex/values").VBoolean<boolean, "required">;
|
|
1107
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1108
|
+
}, "required", "accountId" | "active" | "description" | "metadata" | "name" | "stripeProductId" | `metadata.${string}`>, {
|
|
1109
|
+
by_account_active: ["accountId", "active", "_creationTime"];
|
|
1110
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1111
|
+
by_active: ["active", "_creationTime"];
|
|
1112
|
+
by_stripe_product_id: ["stripeProductId", "_creationTime"];
|
|
1113
|
+
}, {}, {}>;
|
|
1114
|
+
prices: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1115
|
+
active: boolean;
|
|
1116
|
+
currency: string;
|
|
1117
|
+
interval?: "day" | "month" | "week" | "year" | undefined;
|
|
1118
|
+
intervalCount?: number | undefined;
|
|
1119
|
+
metadata?: any;
|
|
1120
|
+
nickname?: string | undefined;
|
|
1121
|
+
productId: string;
|
|
1122
|
+
stripePriceId: string;
|
|
1123
|
+
stripeProductId: string;
|
|
1124
|
+
type: "one_time" | "recurring";
|
|
1125
|
+
unitAmount: number;
|
|
1126
|
+
}, {
|
|
1127
|
+
stripePriceId: import("convex/values").VString<string, "required">;
|
|
1128
|
+
productId: import("convex/values").VString<string, "required">;
|
|
1129
|
+
stripeProductId: import("convex/values").VString<string, "required">;
|
|
1130
|
+
nickname: import("convex/values").VString<string | undefined, "optional">;
|
|
1131
|
+
unitAmount: import("convex/values").VFloat64<number, "required">;
|
|
1132
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1133
|
+
active: import("convex/values").VBoolean<boolean, "required">;
|
|
1134
|
+
type: import("convex/values").VUnion<"one_time" | "recurring", [import("convex/values").VLiteral<"one_time", "required">, import("convex/values").VLiteral<"recurring", "required">], "required", never>;
|
|
1135
|
+
interval: import("convex/values").VUnion<"day" | "month" | "week" | "year" | undefined, [import("convex/values").VLiteral<"day", "required">, import("convex/values").VLiteral<"week", "required">, import("convex/values").VLiteral<"month", "required">, import("convex/values").VLiteral<"year", "required">], "optional", never>;
|
|
1136
|
+
intervalCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1137
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1138
|
+
}, "required", "active" | "currency" | "interval" | "intervalCount" | "metadata" | "nickname" | "productId" | "stripePriceId" | "stripeProductId" | "type" | "unitAmount" | `metadata.${string}`>, {
|
|
1139
|
+
by_active: ["active", "_creationTime"];
|
|
1140
|
+
by_product_active: ["productId", "active", "_creationTime"];
|
|
1141
|
+
by_product_id: ["productId", "_creationTime"];
|
|
1142
|
+
by_stripe_price_id: ["stripePriceId", "_creationTime"];
|
|
1143
|
+
by_stripe_product_id: ["stripeProductId", "_creationTime"];
|
|
1144
|
+
}, {}, {}>;
|
|
1145
|
+
subscriptions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1146
|
+
accountId?: string | undefined;
|
|
1147
|
+
applicationFeeAmount?: number | undefined;
|
|
1148
|
+
applicationFeePercent?: number | undefined;
|
|
1149
|
+
cancelAtPeriodEnd: boolean;
|
|
1150
|
+
canceledAt?: string | undefined;
|
|
1151
|
+
chargeType?: "destination" | "separate" | undefined;
|
|
1152
|
+
currency?: string | undefined;
|
|
1153
|
+
currentPeriodEnd?: string | undefined;
|
|
1154
|
+
currentPeriodStart?: string | undefined;
|
|
1155
|
+
destinationAccountId?: string | undefined;
|
|
1156
|
+
feeCollectedAmount?: number | undefined;
|
|
1157
|
+
feeRefundedAmount?: number | undefined;
|
|
1158
|
+
isCollectionPaused?: boolean | undefined;
|
|
1159
|
+
isTrialing: boolean;
|
|
1160
|
+
metadata?: any;
|
|
1161
|
+
orgId?: string | undefined;
|
|
1162
|
+
priceId?: string | undefined;
|
|
1163
|
+
quantity?: number | undefined;
|
|
1164
|
+
splitRecipients?: {
|
|
1165
|
+
amount?: number | undefined;
|
|
1166
|
+
destinationAccountId: string;
|
|
1167
|
+
percent?: number | undefined;
|
|
1168
|
+
role: "affiliate" | "other" | "store";
|
|
1169
|
+
}[] | undefined;
|
|
1170
|
+
status: "active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
|
|
1171
|
+
stripeSubscriptionId: string;
|
|
1172
|
+
trialEnd?: string | undefined;
|
|
1173
|
+
trialStart?: string | undefined;
|
|
1174
|
+
userId: string;
|
|
1175
|
+
}, {
|
|
1176
|
+
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1177
|
+
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1178
|
+
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1179
|
+
feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1180
|
+
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1181
|
+
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
1182
|
+
splitRecipients: import("convex/values").VArray<{
|
|
1183
|
+
amount?: number | undefined;
|
|
1184
|
+
destinationAccountId: string;
|
|
1185
|
+
percent?: number | undefined;
|
|
1186
|
+
role: "affiliate" | "other" | "store";
|
|
1187
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1188
|
+
amount?: number | undefined;
|
|
1189
|
+
destinationAccountId: string;
|
|
1190
|
+
percent?: number | undefined;
|
|
1191
|
+
role: "affiliate" | "other" | "store";
|
|
1192
|
+
}, {
|
|
1193
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1194
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1195
|
+
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1196
|
+
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1197
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
1198
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
1199
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1200
|
+
userId: import("convex/values").VString<string, "required">;
|
|
1201
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
1202
|
+
status: import("convex/values").VUnion<"active" | "canceled" | "incomplete" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"trialing", "required">, import("convex/values").VLiteral<"past_due", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"incomplete", "required">, import("convex/values").VLiteral<"incomplete_expired", "required">, import("convex/values").VLiteral<"unpaid", "required">, import("convex/values").VLiteral<"paused", "required">], "required", never>;
|
|
1203
|
+
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1204
|
+
quantity: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1205
|
+
currentPeriodStart: import("convex/values").VString<string | undefined, "optional">;
|
|
1206
|
+
currentPeriodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
1207
|
+
cancelAtPeriodEnd: import("convex/values").VBoolean<boolean, "required">;
|
|
1208
|
+
isCollectionPaused: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1209
|
+
canceledAt: import("convex/values").VString<string | undefined, "optional">;
|
|
1210
|
+
isTrialing: import("convex/values").VBoolean<boolean, "required">;
|
|
1211
|
+
trialStart: import("convex/values").VString<string | undefined, "optional">;
|
|
1212
|
+
trialEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
1213
|
+
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
1214
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1215
|
+
}, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "cancelAtPeriodEnd" | "canceledAt" | "chargeType" | "currency" | "currentPeriodEnd" | "currentPeriodStart" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "isCollectionPaused" | "isTrialing" | "metadata" | "orgId" | "priceId" | "quantity" | "splitRecipients" | "status" | "stripeSubscriptionId" | "trialEnd" | "trialStart" | "userId" | `metadata.${string}`>, {
|
|
1216
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1217
|
+
by_account_status: ["accountId", "status", "_creationTime"];
|
|
1218
|
+
by_org_id: ["orgId", "_creationTime"];
|
|
1219
|
+
by_price_id: ["priceId", "_creationTime"];
|
|
1220
|
+
by_status: ["status", "_creationTime"];
|
|
1221
|
+
by_stripe_subscription_id: ["stripeSubscriptionId", "_creationTime"];
|
|
1222
|
+
by_user_id: ["userId", "_creationTime"];
|
|
1223
|
+
}, {}, {}>;
|
|
1224
|
+
checkoutSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1225
|
+
accountId?: string | undefined;
|
|
1226
|
+
applicationFeeAmount?: number | undefined;
|
|
1227
|
+
applicationFeePercent?: number | undefined;
|
|
1228
|
+
chargeType?: "destination" | "separate" | undefined;
|
|
1229
|
+
clientSecret?: string | undefined;
|
|
1230
|
+
currency?: string | undefined;
|
|
1231
|
+
destinationAccountId?: string | undefined;
|
|
1232
|
+
feeCollectedAmount?: number | undefined;
|
|
1233
|
+
feeRefundedAmount?: number | undefined;
|
|
1234
|
+
metadata?: any;
|
|
1235
|
+
mode: "payment" | "setup" | "subscription";
|
|
1236
|
+
orgId?: string | undefined;
|
|
1237
|
+
priceId?: string | undefined;
|
|
1238
|
+
splitRecipients?: {
|
|
1239
|
+
amount?: number | undefined;
|
|
1240
|
+
destinationAccountId: string;
|
|
1241
|
+
percent?: number | undefined;
|
|
1242
|
+
role: "affiliate" | "other" | "store";
|
|
1243
|
+
}[] | undefined;
|
|
1244
|
+
status: "complete" | "expired" | "open";
|
|
1245
|
+
stripeSessionId: string;
|
|
1246
|
+
url?: string | undefined;
|
|
1247
|
+
userId: string;
|
|
1248
|
+
}, {
|
|
1249
|
+
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1250
|
+
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1251
|
+
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1252
|
+
feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1253
|
+
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1254
|
+
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
1255
|
+
splitRecipients: import("convex/values").VArray<{
|
|
1256
|
+
amount?: number | undefined;
|
|
1257
|
+
destinationAccountId: string;
|
|
1258
|
+
percent?: number | undefined;
|
|
1259
|
+
role: "affiliate" | "other" | "store";
|
|
1260
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1261
|
+
amount?: number | undefined;
|
|
1262
|
+
destinationAccountId: string;
|
|
1263
|
+
percent?: number | undefined;
|
|
1264
|
+
role: "affiliate" | "other" | "store";
|
|
1265
|
+
}, {
|
|
1266
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1267
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1268
|
+
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1269
|
+
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1270
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
1271
|
+
stripeSessionId: import("convex/values").VString<string, "required">;
|
|
1272
|
+
userId: import("convex/values").VString<string, "required">;
|
|
1273
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
1274
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1275
|
+
mode: import("convex/values").VUnion<"payment" | "setup" | "subscription", [import("convex/values").VLiteral<"payment", "required">, import("convex/values").VLiteral<"subscription", "required">, import("convex/values").VLiteral<"setup", "required">], "required", never>;
|
|
1276
|
+
status: import("convex/values").VUnion<"complete" | "expired" | "open", [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"complete", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
|
|
1277
|
+
clientSecret: import("convex/values").VString<string | undefined, "optional">;
|
|
1278
|
+
url: import("convex/values").VString<string | undefined, "optional">;
|
|
1279
|
+
priceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1280
|
+
currency: import("convex/values").VString<string | undefined, "optional">;
|
|
1281
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1282
|
+
}, "required", "accountId" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "clientSecret" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "mode" | "orgId" | "priceId" | "splitRecipients" | "status" | "stripeSessionId" | "url" | "userId" | `metadata.${string}`>, {
|
|
1283
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1284
|
+
by_stripe_session_id: ["stripeSessionId", "_creationTime"];
|
|
1285
|
+
by_user_id: ["userId", "_creationTime"];
|
|
1286
|
+
by_user_status: ["userId", "status", "_creationTime"];
|
|
1287
|
+
}, {}, {}>;
|
|
1288
|
+
invoices: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1289
|
+
accountId?: string | undefined;
|
|
1290
|
+
amountDue: number;
|
|
1291
|
+
amountPaid: number;
|
|
1292
|
+
applicationFeeAmount?: number | undefined;
|
|
1293
|
+
applicationFeePercent?: number | undefined;
|
|
1294
|
+
attemptCount?: number | undefined;
|
|
1295
|
+
chargeType?: "destination" | "separate" | undefined;
|
|
1296
|
+
currency: string;
|
|
1297
|
+
destinationAccountId?: string | undefined;
|
|
1298
|
+
feeCollectedAmount?: number | undefined;
|
|
1299
|
+
feeRefundedAmount?: number | undefined;
|
|
1300
|
+
hostedInvoiceUrl?: string | undefined;
|
|
1301
|
+
invoicePdf?: string | undefined;
|
|
1302
|
+
metadata?: any;
|
|
1303
|
+
nextPaymentAttempt?: string | undefined;
|
|
1304
|
+
orgId?: string | undefined;
|
|
1305
|
+
periodEnd?: string | undefined;
|
|
1306
|
+
periodStart?: string | undefined;
|
|
1307
|
+
splitRecipients?: {
|
|
1308
|
+
amount?: number | undefined;
|
|
1309
|
+
destinationAccountId: string;
|
|
1310
|
+
percent?: number | undefined;
|
|
1311
|
+
role: "affiliate" | "other" | "store";
|
|
1312
|
+
}[] | undefined;
|
|
1313
|
+
status: "draft" | "open" | "paid" | "uncollectible" | "void";
|
|
1314
|
+
stripeInvoiceId: string;
|
|
1315
|
+
subscriptionId?: string | undefined;
|
|
1316
|
+
userId: string;
|
|
1317
|
+
}, {
|
|
1318
|
+
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1319
|
+
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1320
|
+
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1321
|
+
feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1322
|
+
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1323
|
+
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
1324
|
+
splitRecipients: import("convex/values").VArray<{
|
|
1325
|
+
amount?: number | undefined;
|
|
1326
|
+
destinationAccountId: string;
|
|
1327
|
+
percent?: number | undefined;
|
|
1328
|
+
role: "affiliate" | "other" | "store";
|
|
1329
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1330
|
+
amount?: number | undefined;
|
|
1331
|
+
destinationAccountId: string;
|
|
1332
|
+
percent?: number | undefined;
|
|
1333
|
+
role: "affiliate" | "other" | "store";
|
|
1334
|
+
}, {
|
|
1335
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1336
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1337
|
+
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1338
|
+
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1339
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
1340
|
+
stripeInvoiceId: import("convex/values").VString<string, "required">;
|
|
1341
|
+
userId: import("convex/values").VString<string, "required">;
|
|
1342
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
1343
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1344
|
+
subscriptionId: import("convex/values").VString<string | undefined, "optional">;
|
|
1345
|
+
status: import("convex/values").VUnion<"draft" | "open" | "paid" | "uncollectible" | "void", [import("convex/values").VLiteral<"draft", "required">, import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"uncollectible", "required">, import("convex/values").VLiteral<"void", "required">], "required", never>;
|
|
1346
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1347
|
+
amountDue: import("convex/values").VFloat64<number, "required">;
|
|
1348
|
+
amountPaid: import("convex/values").VFloat64<number, "required">;
|
|
1349
|
+
hostedInvoiceUrl: import("convex/values").VString<string | undefined, "optional">;
|
|
1350
|
+
invoicePdf: import("convex/values").VString<string | undefined, "optional">;
|
|
1351
|
+
periodStart: import("convex/values").VString<string | undefined, "optional">;
|
|
1352
|
+
periodEnd: import("convex/values").VString<string | undefined, "optional">;
|
|
1353
|
+
nextPaymentAttempt: import("convex/values").VString<string | undefined, "optional">;
|
|
1354
|
+
attemptCount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1355
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1356
|
+
}, "required", "accountId" | "amountDue" | "amountPaid" | "applicationFeeAmount" | "applicationFeePercent" | "attemptCount" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "hostedInvoiceUrl" | "invoicePdf" | "metadata" | "nextPaymentAttempt" | "orgId" | "periodEnd" | "periodStart" | "splitRecipients" | "status" | "stripeInvoiceId" | "subscriptionId" | "userId" | `metadata.${string}`>, {
|
|
1357
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1358
|
+
by_account_status: ["accountId", "status", "_creationTime"];
|
|
1359
|
+
by_status: ["status", "_creationTime"];
|
|
1360
|
+
by_stripe_invoice_id: ["stripeInvoiceId", "_creationTime"];
|
|
1361
|
+
by_subscription_id: ["subscriptionId", "_creationTime"];
|
|
1362
|
+
by_subscription_status: ["subscriptionId", "status", "_creationTime"];
|
|
1363
|
+
by_user_id: ["userId", "_creationTime"];
|
|
1364
|
+
by_user_status: ["userId", "status", "_creationTime"];
|
|
1365
|
+
}, {}, {}>;
|
|
1366
|
+
payments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1367
|
+
accountId?: string | undefined;
|
|
1368
|
+
amount: number;
|
|
1369
|
+
applicationFeeAmount?: number | undefined;
|
|
1370
|
+
applicationFeePercent?: number | undefined;
|
|
1371
|
+
chargeType?: "destination" | "separate" | undefined;
|
|
1372
|
+
currency: string;
|
|
1373
|
+
destinationAccountId?: string | undefined;
|
|
1374
|
+
feeCollectedAmount?: number | undefined;
|
|
1375
|
+
feeRefundedAmount?: number | undefined;
|
|
1376
|
+
metadata?: any;
|
|
1377
|
+
orgId?: string | undefined;
|
|
1378
|
+
refundStatus?: "fully_refunded" | "partially_refunded" | undefined;
|
|
1379
|
+
refundedAmount?: number | undefined;
|
|
1380
|
+
splitRecipients?: {
|
|
1381
|
+
amount?: number | undefined;
|
|
1382
|
+
destinationAccountId: string;
|
|
1383
|
+
percent?: number | undefined;
|
|
1384
|
+
role: "affiliate" | "other" | "store";
|
|
1385
|
+
}[] | undefined;
|
|
1386
|
+
status: "canceled" | "failed" | "processing" | "requires_action" | "succeeded";
|
|
1387
|
+
stripePaymentIntentId: string;
|
|
1388
|
+
userId: string;
|
|
1389
|
+
}, {
|
|
1390
|
+
destinationAccountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1391
|
+
applicationFeeAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1392
|
+
applicationFeePercent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1393
|
+
feeCollectedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1394
|
+
feeRefundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1395
|
+
chargeType: import("convex/values").VUnion<"destination" | "separate" | undefined, [import("convex/values").VLiteral<"destination", "required">, import("convex/values").VLiteral<"separate", "required">], "optional", never>;
|
|
1396
|
+
splitRecipients: import("convex/values").VArray<{
|
|
1397
|
+
amount?: number | undefined;
|
|
1398
|
+
destinationAccountId: string;
|
|
1399
|
+
percent?: number | undefined;
|
|
1400
|
+
role: "affiliate" | "other" | "store";
|
|
1401
|
+
}[] | undefined, import("convex/values").VObject<{
|
|
1402
|
+
amount?: number | undefined;
|
|
1403
|
+
destinationAccountId: string;
|
|
1404
|
+
percent?: number | undefined;
|
|
1405
|
+
role: "affiliate" | "other" | "store";
|
|
1406
|
+
}, {
|
|
1407
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1408
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store", [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "required", never>;
|
|
1409
|
+
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1410
|
+
percent: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1411
|
+
}, "required", "amount" | "destinationAccountId" | "percent" | "role">, "optional">;
|
|
1412
|
+
stripePaymentIntentId: import("convex/values").VString<string, "required">;
|
|
1413
|
+
userId: import("convex/values").VString<string, "required">;
|
|
1414
|
+
orgId: import("convex/values").VString<string | undefined, "optional">;
|
|
1415
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1416
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1417
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1418
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "processing" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"requires_action", "required">], "required", never>;
|
|
1419
|
+
refundedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1420
|
+
refundStatus: import("convex/values").VUnion<"fully_refunded" | "partially_refunded" | undefined, [import("convex/values").VLiteral<"partially_refunded", "required">, import("convex/values").VLiteral<"fully_refunded", "required">], "optional", never>;
|
|
1421
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1422
|
+
}, "required", "accountId" | "amount" | "applicationFeeAmount" | "applicationFeePercent" | "chargeType" | "currency" | "destinationAccountId" | "feeCollectedAmount" | "feeRefundedAmount" | "metadata" | "orgId" | "refundStatus" | "refundedAmount" | "splitRecipients" | "status" | "stripePaymentIntentId" | "userId" | `metadata.${string}`>, {
|
|
1423
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1424
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1425
|
+
by_user_id: ["userId", "_creationTime"];
|
|
1426
|
+
}, {}, {}>;
|
|
1427
|
+
payouts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1428
|
+
accountId: string;
|
|
1429
|
+
amount: number;
|
|
1430
|
+
arrivalDate?: string | undefined;
|
|
1431
|
+
currency: string;
|
|
1432
|
+
failureCode?: string | undefined;
|
|
1433
|
+
failureMessage?: string | undefined;
|
|
1434
|
+
metadata?: any;
|
|
1435
|
+
method?: string | undefined;
|
|
1436
|
+
status: "canceled" | "failed" | "in_transit" | "paid" | "pending";
|
|
1437
|
+
stripePayoutId: string;
|
|
1438
|
+
totalsRecorded?: true | undefined;
|
|
1439
|
+
}, {
|
|
1440
|
+
stripePayoutId: import("convex/values").VString<string, "required">;
|
|
1441
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
1442
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1443
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1444
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "in_transit" | "paid" | "pending", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">, import("convex/values").VLiteral<"in_transit", "required">], "required", never>;
|
|
1445
|
+
arrivalDate: import("convex/values").VString<string | undefined, "optional">;
|
|
1446
|
+
method: import("convex/values").VString<string | undefined, "optional">;
|
|
1447
|
+
failureCode: import("convex/values").VString<string | undefined, "optional">;
|
|
1448
|
+
failureMessage: import("convex/values").VString<string | undefined, "optional">;
|
|
1449
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1450
|
+
totalsRecorded: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
1451
|
+
}, "required", "accountId" | "amount" | "arrivalDate" | "currency" | "failureCode" | "failureMessage" | "metadata" | "method" | "status" | "stripePayoutId" | "totalsRecorded" | `metadata.${string}`>, {
|
|
1452
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1453
|
+
by_account_status: ["accountId", "status", "_creationTime"];
|
|
1454
|
+
by_account_totals_recorded: ["accountId", "totalsRecorded", "_creationTime"];
|
|
1455
|
+
by_status: ["status", "_creationTime"];
|
|
1456
|
+
by_stripe_payout_id: ["stripePayoutId", "_creationTime"];
|
|
1457
|
+
}, {}, {}>;
|
|
1458
|
+
pendingFeeRefunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1459
|
+
feeCollectedAmount: number;
|
|
1460
|
+
feeRefundedAmount: number;
|
|
1461
|
+
stripePaymentIntentId: string;
|
|
1462
|
+
}, {
|
|
1463
|
+
stripePaymentIntentId: import("convex/values").VString<string, "required">;
|
|
1464
|
+
feeCollectedAmount: import("convex/values").VFloat64<number, "required">;
|
|
1465
|
+
feeRefundedAmount: import("convex/values").VFloat64<number, "required">;
|
|
1466
|
+
}, "required", "feeCollectedAmount" | "feeRefundedAmount" | "stripePaymentIntentId">, {
|
|
1467
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1468
|
+
}, {}, {}>;
|
|
1469
|
+
refunds: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1470
|
+
accountId?: string | undefined;
|
|
1471
|
+
amount: number;
|
|
1472
|
+
currency: string;
|
|
1473
|
+
failureReason?: string | undefined;
|
|
1474
|
+
metadata?: any;
|
|
1475
|
+
reason?: "duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined;
|
|
1476
|
+
status: "canceled" | "failed" | "pending" | "requires_action" | "succeeded";
|
|
1477
|
+
stripeChargeId?: string | undefined;
|
|
1478
|
+
stripePaymentIntentId?: string | undefined;
|
|
1479
|
+
stripeRefundId: string;
|
|
1480
|
+
}, {
|
|
1481
|
+
stripeRefundId: import("convex/values").VString<string, "required">;
|
|
1482
|
+
stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1483
|
+
stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
1484
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1485
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1486
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1487
|
+
status: import("convex/values").VUnion<"canceled" | "failed" | "pending" | "requires_action" | "succeeded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"requires_action", "required">, import("convex/values").VLiteral<"succeeded", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"canceled", "required">], "required", never>;
|
|
1488
|
+
reason: import("convex/values").VUnion<"duplicate" | "expired_uncaptured_charge" | "fraudulent" | "requested_by_customer" | undefined, [import("convex/values").VLiteral<"duplicate", "required">, import("convex/values").VLiteral<"fraudulent", "required">, import("convex/values").VLiteral<"requested_by_customer", "required">, import("convex/values").VLiteral<"expired_uncaptured_charge", "required">], "optional", never>;
|
|
1489
|
+
failureReason: import("convex/values").VString<string | undefined, "optional">;
|
|
1490
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1491
|
+
}, "required", "accountId" | "amount" | "currency" | "failureReason" | "metadata" | "reason" | "status" | "stripeChargeId" | "stripePaymentIntentId" | "stripeRefundId" | `metadata.${string}`>, {
|
|
1492
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1493
|
+
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
1494
|
+
by_account_id_and_stripe_payment_intent_id: ["accountId", "stripePaymentIntentId", "_creationTime"];
|
|
1495
|
+
by_account_id_and_stripe_payment_intent_id_and_status: ["accountId", "stripePaymentIntentId", "status", "_creationTime"];
|
|
1496
|
+
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
1497
|
+
by_status: ["status", "_creationTime"];
|
|
1498
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1499
|
+
by_stripe_refund_id: ["stripeRefundId", "_creationTime"];
|
|
1500
|
+
}, {}, {}>;
|
|
1501
|
+
disputes: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1502
|
+
accountId?: string | undefined;
|
|
1503
|
+
amount: number;
|
|
1504
|
+
currency: string;
|
|
1505
|
+
evidence?: any;
|
|
1506
|
+
evidenceDueBy?: string | undefined;
|
|
1507
|
+
isChargeRefundable: boolean;
|
|
1508
|
+
lastEvent?: string | undefined;
|
|
1509
|
+
linkedTransferIds?: string[] | undefined;
|
|
1510
|
+
metadata?: any;
|
|
1511
|
+
reason: string;
|
|
1512
|
+
statementDescriptor?: string | undefined;
|
|
1513
|
+
status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
|
|
1514
|
+
stripeChargeId?: string | undefined;
|
|
1515
|
+
stripeDisputeId: string;
|
|
1516
|
+
stripePaymentIntentId?: string | undefined;
|
|
1517
|
+
}, {
|
|
1518
|
+
stripeDisputeId: import("convex/values").VString<string, "required">;
|
|
1519
|
+
stripePaymentIntentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1520
|
+
stripeChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
1521
|
+
accountId: import("convex/values").VString<string | undefined, "optional">;
|
|
1522
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1523
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1524
|
+
status: import("convex/values").VUnion<"lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won", [import("convex/values").VLiteral<"warning_needs_response", "required">, import("convex/values").VLiteral<"warning_under_review", "required">, import("convex/values").VLiteral<"warning_closed", "required">, import("convex/values").VLiteral<"needs_response", "required">, import("convex/values").VLiteral<"under_review", "required">, import("convex/values").VLiteral<"won", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"prevented", "required">], "required", never>;
|
|
1525
|
+
reason: import("convex/values").VString<string, "required">;
|
|
1526
|
+
isChargeRefundable: import("convex/values").VBoolean<boolean, "required">;
|
|
1527
|
+
lastEvent: import("convex/values").VString<string | undefined, "optional">;
|
|
1528
|
+
evidenceDueBy: import("convex/values").VString<string | undefined, "optional">;
|
|
1529
|
+
evidence: import("convex/values").VAny<any, "optional", string>;
|
|
1530
|
+
statementDescriptor: import("convex/values").VString<string | undefined, "optional">;
|
|
1531
|
+
linkedTransferIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
|
|
1532
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1533
|
+
}, "required", "accountId" | "amount" | "currency" | "evidence" | "evidenceDueBy" | "isChargeRefundable" | "lastEvent" | "linkedTransferIds" | "metadata" | "reason" | "statementDescriptor" | "status" | "stripeChargeId" | "stripeDisputeId" | "stripePaymentIntentId" | `evidence.${string}` | `metadata.${string}`>, {
|
|
1534
|
+
by_account_id: ["accountId", "_creationTime"];
|
|
1535
|
+
by_account_id_and_status: ["accountId", "status", "_creationTime"];
|
|
1536
|
+
by_payment_intent_id_and_status: ["stripePaymentIntentId", "status", "_creationTime"];
|
|
1537
|
+
by_status: ["status", "_creationTime"];
|
|
1538
|
+
by_stripe_dispute_id: ["stripeDisputeId", "_creationTime"];
|
|
1539
|
+
by_stripe_payment_intent_id: ["stripePaymentIntentId", "_creationTime"];
|
|
1540
|
+
}, {}, {}>;
|
|
1541
|
+
transfers: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1542
|
+
amount: number;
|
|
1543
|
+
currency: string;
|
|
1544
|
+
destinationAccountId: string;
|
|
1545
|
+
metadata?: any;
|
|
1546
|
+
paymentId?: string | undefined;
|
|
1547
|
+
reinstatement?: boolean | undefined;
|
|
1548
|
+
reversalClaimedAmount?: number | undefined;
|
|
1549
|
+
reversalStatus?: "fully_reversed" | "partially_reversed" | undefined;
|
|
1550
|
+
reversedAmount?: number | undefined;
|
|
1551
|
+
role?: "affiliate" | "other" | "store" | undefined;
|
|
1552
|
+
sourceChargeId?: string | undefined;
|
|
1553
|
+
sourceInvoiceId?: string | undefined;
|
|
1554
|
+
status: "failed" | "paid" | "pending" | "reversed";
|
|
1555
|
+
stripeTransferId: string;
|
|
1556
|
+
totalsRecorded?: true | undefined;
|
|
1557
|
+
}, {
|
|
1558
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
1559
|
+
sourceChargeId: import("convex/values").VString<string | undefined, "optional">;
|
|
1560
|
+
sourceInvoiceId: import("convex/values").VString<string | undefined, "optional">;
|
|
1561
|
+
destinationAccountId: import("convex/values").VString<string, "required">;
|
|
1562
|
+
amount: import("convex/values").VFloat64<number, "required">;
|
|
1563
|
+
currency: import("convex/values").VString<string, "required">;
|
|
1564
|
+
role: import("convex/values").VUnion<"affiliate" | "other" | "store" | undefined, [import("convex/values").VLiteral<"store", "required">, import("convex/values").VLiteral<"affiliate", "required">, import("convex/values").VLiteral<"other", "required">], "optional", never>;
|
|
1565
|
+
status: import("convex/values").VUnion<"failed" | "paid" | "pending" | "reversed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"reversed", "required">], "required", never>;
|
|
1566
|
+
reversedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1567
|
+
reversalStatus: import("convex/values").VUnion<"fully_reversed" | "partially_reversed" | undefined, [import("convex/values").VLiteral<"partially_reversed", "required">, import("convex/values").VLiteral<"fully_reversed", "required">], "optional", never>;
|
|
1568
|
+
paymentId: import("convex/values").VString<string | undefined, "optional">;
|
|
1569
|
+
reinstatement: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1570
|
+
metadata: import("convex/values").VAny<any, "optional", string>;
|
|
1571
|
+
totalsRecorded: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
1572
|
+
reversalClaimedAmount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1573
|
+
}, "required", "amount" | "currency" | "destinationAccountId" | "metadata" | "paymentId" | "reinstatement" | "reversalClaimedAmount" | "reversalStatus" | "reversedAmount" | "role" | "sourceChargeId" | "sourceInvoiceId" | "status" | "stripeTransferId" | "totalsRecorded" | `metadata.${string}`>, {
|
|
1574
|
+
by_account_totals_recorded: ["destinationAccountId", "totalsRecorded", "_creationTime"];
|
|
1575
|
+
by_destination_account_id: ["destinationAccountId", "_creationTime"];
|
|
1576
|
+
by_source_charge_id: ["sourceChargeId", "_creationTime"];
|
|
1577
|
+
by_stripe_transfer_id: ["stripeTransferId", "_creationTime"];
|
|
1578
|
+
}, {}, {}>;
|
|
1579
|
+
transferReversalOps: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1580
|
+
commissionExposure?: {
|
|
1581
|
+
chargeAmount: number;
|
|
1582
|
+
disputeId?: string | undefined;
|
|
1583
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
1584
|
+
finalized: boolean;
|
|
1585
|
+
kind: "dispute" | "refund";
|
|
1586
|
+
principal: number;
|
|
1587
|
+
refundId?: string | undefined;
|
|
1588
|
+
refundedPrincipal?: number | undefined;
|
|
1589
|
+
} | undefined;
|
|
1590
|
+
operationId: string;
|
|
1591
|
+
slices: {
|
|
1592
|
+
from: number;
|
|
1593
|
+
stripeTransferId: string;
|
|
1594
|
+
to: number;
|
|
1595
|
+
}[];
|
|
1596
|
+
sourceChargeId: string;
|
|
1597
|
+
}, {
|
|
1598
|
+
operationId: import("convex/values").VString<string, "required">;
|
|
1599
|
+
sourceChargeId: import("convex/values").VString<string, "required">;
|
|
1600
|
+
slices: import("convex/values").VArray<{
|
|
1601
|
+
from: number;
|
|
1602
|
+
stripeTransferId: string;
|
|
1603
|
+
to: number;
|
|
1604
|
+
}[], import("convex/values").VObject<{
|
|
1605
|
+
from: number;
|
|
1606
|
+
stripeTransferId: string;
|
|
1607
|
+
to: number;
|
|
1608
|
+
}, {
|
|
1609
|
+
stripeTransferId: import("convex/values").VString<string, "required">;
|
|
1610
|
+
from: import("convex/values").VFloat64<number, "required">;
|
|
1611
|
+
to: import("convex/values").VFloat64<number, "required">;
|
|
1612
|
+
}, "required", "from" | "stripeTransferId" | "to">, "required">;
|
|
1613
|
+
commissionExposure: import("convex/values").VObject<{
|
|
1614
|
+
chargeAmount: number;
|
|
1615
|
+
disputeId?: string | undefined;
|
|
1616
|
+
disputeState?: "lost" | "open" | "won" | undefined;
|
|
1617
|
+
finalized: boolean;
|
|
1618
|
+
kind: "dispute" | "refund";
|
|
1619
|
+
principal: number;
|
|
1620
|
+
refundId?: string | undefined;
|
|
1621
|
+
refundedPrincipal?: number | undefined;
|
|
1622
|
+
} | undefined, {
|
|
1623
|
+
kind: import("convex/values").VUnion<"dispute" | "refund", [import("convex/values").VLiteral<"refund", "required">, import("convex/values").VLiteral<"dispute", "required">], "required", never>;
|
|
1624
|
+
chargeAmount: import("convex/values").VFloat64<number, "required">;
|
|
1625
|
+
principal: import("convex/values").VFloat64<number, "required">;
|
|
1626
|
+
finalized: import("convex/values").VBoolean<boolean, "required">;
|
|
1627
|
+
disputeState: import("convex/values").VUnion<"lost" | "open" | "won" | undefined, [import("convex/values").VLiteral<"open", "required">, import("convex/values").VLiteral<"lost", "required">, import("convex/values").VLiteral<"won", "required">], "optional", never>;
|
|
1628
|
+
disputeId: import("convex/values").VString<string | undefined, "optional">;
|
|
1629
|
+
refundedPrincipal: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1630
|
+
refundId: import("convex/values").VString<string | undefined, "optional">;
|
|
1631
|
+
}, "optional", "chargeAmount" | "disputeId" | "disputeState" | "finalized" | "kind" | "principal" | "refundId" | "refundedPrincipal">;
|
|
1632
|
+
}, "required", "commissionExposure" | "commissionExposure.chargeAmount" | "commissionExposure.disputeId" | "commissionExposure.disputeState" | "commissionExposure.finalized" | "commissionExposure.kind" | "commissionExposure.principal" | "commissionExposure.refundId" | "commissionExposure.refundedPrincipal" | "operationId" | "slices" | "sourceChargeId">, {
|
|
1633
|
+
by_operation_id: ["operationId", "_creationTime"];
|
|
1634
|
+
by_source_charge: ["sourceChargeId", "_creationTime"];
|
|
1635
|
+
}, {}, {}>;
|
|
1636
|
+
webhookEvents: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
1637
|
+
eventType: string;
|
|
1638
|
+
lastError?: string | undefined;
|
|
1639
|
+
livemode?: boolean | undefined;
|
|
1640
|
+
processedAt: number;
|
|
1641
|
+
status: "failed" | "ignored" | "processed" | "processing";
|
|
1642
|
+
stripeEventId: string;
|
|
1643
|
+
}, {
|
|
1644
|
+
stripeEventId: import("convex/values").VString<string, "required">;
|
|
1645
|
+
eventType: import("convex/values").VString<string, "required">;
|
|
1646
|
+
livemode: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
1647
|
+
processedAt: import("convex/values").VFloat64<number, "required">;
|
|
1648
|
+
status: import("convex/values").VUnion<"failed" | "ignored" | "processed" | "processing", [import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"processed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"ignored", "required">], "required", never>;
|
|
1649
|
+
lastError: import("convex/values").VString<string | undefined, "optional">;
|
|
1650
|
+
}, "required", "eventType" | "lastError" | "livemode" | "processedAt" | "status" | "stripeEventId">, {
|
|
1651
|
+
by_status: ["status", "_creationTime"];
|
|
1652
|
+
by_stripeEventId: ["stripeEventId", "_creationTime"];
|
|
1653
|
+
}, {}, {}>;
|
|
1654
|
+
}, boolean>>;
|
|
1655
|
+
ctx: RunCtx;
|
|
1656
|
+
provider: {
|
|
1657
|
+
accounts: {
|
|
1658
|
+
listExternalAccounts: import("vitest").Mock<() => Promise<{
|
|
1659
|
+
data: {
|
|
1660
|
+
id: string;
|
|
1661
|
+
object: string;
|
|
1662
|
+
currency: string;
|
|
1663
|
+
default_for_currency: boolean;
|
|
1664
|
+
}[];
|
|
1665
|
+
has_more: boolean;
|
|
1666
|
+
}>>;
|
|
1667
|
+
};
|
|
1668
|
+
transfers: {
|
|
1669
|
+
retrieve: import("vitest").Mock<(id: string) => Promise<{
|
|
1670
|
+
id: string;
|
|
1671
|
+
destination: string;
|
|
1672
|
+
destination_payment: string;
|
|
1673
|
+
source_transaction: string;
|
|
1674
|
+
amount: number;
|
|
1675
|
+
currency: string;
|
|
1676
|
+
amount_reversed: number;
|
|
1677
|
+
}>>;
|
|
1678
|
+
listReversals: import("vitest").Mock<() => Promise<{
|
|
1679
|
+
data: never[];
|
|
1680
|
+
has_more: boolean;
|
|
1681
|
+
}>>;
|
|
1682
|
+
};
|
|
1683
|
+
charges: {
|
|
1684
|
+
retrieve: import("vitest").Mock<(id: string) => Promise<{
|
|
1685
|
+
id: string;
|
|
1686
|
+
source_transfer: string;
|
|
1687
|
+
amount: number;
|
|
1688
|
+
currency: string;
|
|
1689
|
+
paid: boolean;
|
|
1690
|
+
status: string;
|
|
1691
|
+
balance_transaction: string;
|
|
1692
|
+
}>>;
|
|
1693
|
+
};
|
|
1694
|
+
balanceTransactions: {
|
|
1695
|
+
list: import("vitest").Mock<(params: {
|
|
1696
|
+
source?: string;
|
|
1697
|
+
limit?: number;
|
|
1698
|
+
}) => Promise<{
|
|
1699
|
+
data: {
|
|
1700
|
+
id: string;
|
|
1701
|
+
source: string;
|
|
1702
|
+
amount: number;
|
|
1703
|
+
fee: number;
|
|
1704
|
+
net: number;
|
|
1705
|
+
currency: string;
|
|
1706
|
+
created: number;
|
|
1707
|
+
available_on: number;
|
|
1708
|
+
status: string;
|
|
1709
|
+
type: string;
|
|
1710
|
+
exchange_rate: null;
|
|
1711
|
+
}[];
|
|
1712
|
+
has_more: boolean;
|
|
1713
|
+
}>>;
|
|
1714
|
+
retrieve: import("vitest").Mock<(id: string) => Promise<{
|
|
1715
|
+
id: string;
|
|
1716
|
+
source: string;
|
|
1717
|
+
amount: number;
|
|
1718
|
+
fee: number;
|
|
1719
|
+
net: number;
|
|
1720
|
+
currency: string;
|
|
1721
|
+
created: number;
|
|
1722
|
+
available_on: number;
|
|
1723
|
+
status: string;
|
|
1724
|
+
type: string;
|
|
1725
|
+
exchange_rate: null;
|
|
1726
|
+
} | undefined>>;
|
|
1727
|
+
};
|
|
1728
|
+
balance: {
|
|
1729
|
+
retrieve: import("vitest").Mock<() => Promise<{
|
|
1730
|
+
available: {
|
|
1731
|
+
currency: string;
|
|
1732
|
+
amount: number;
|
|
1733
|
+
source_types: {
|
|
1734
|
+
card: number;
|
|
1735
|
+
};
|
|
1736
|
+
}[];
|
|
1737
|
+
pending: never[];
|
|
1738
|
+
}>>;
|
|
1739
|
+
};
|
|
1740
|
+
payouts: {
|
|
1741
|
+
list: import("vitest").Mock<() => Promise<{
|
|
1742
|
+
data: Record<string, unknown>[];
|
|
1743
|
+
has_more: boolean;
|
|
1744
|
+
}>>;
|
|
1745
|
+
retrieve: import("vitest").Mock<() => Promise<Record<string, unknown> | undefined>>;
|
|
1746
|
+
create: import("vitest").Mock<(params: {
|
|
1747
|
+
amount: number;
|
|
1748
|
+
currency: string;
|
|
1749
|
+
metadata: object;
|
|
1750
|
+
}) => Promise<Record<string, unknown>>>;
|
|
1751
|
+
};
|
|
1752
|
+
};
|
|
1753
|
+
verify: import("vitest").Mock<() => Promise<{
|
|
1754
|
+
status: "verified";
|
|
1755
|
+
policy: {
|
|
1756
|
+
_creationTime: number;
|
|
1757
|
+
_id: import("convex/values").GenericId<"payoutPolicies">;
|
|
1758
|
+
accountId: string;
|
|
1759
|
+
country: string;
|
|
1760
|
+
holdDeadline?: number | undefined;
|
|
1761
|
+
mode: "custom" | "stripe_managed";
|
|
1762
|
+
operationKey: string;
|
|
1763
|
+
ownerKey: string;
|
|
1764
|
+
previousSchedule?: {
|
|
1765
|
+
interval: "daily" | "manual" | "monthly" | "weekly";
|
|
1766
|
+
monthlyDays?: number[] | undefined;
|
|
1767
|
+
weeklyDays?: string[] | undefined;
|
|
1768
|
+
} | undefined;
|
|
1769
|
+
revision: number;
|
|
1770
|
+
status: "changing" | "ready";
|
|
1771
|
+
thresholds: {
|
|
1772
|
+
amount: number;
|
|
1773
|
+
currency: string;
|
|
1774
|
+
}[];
|
|
1775
|
+
};
|
|
1776
|
+
}>>;
|
|
1777
|
+
run: (extra?: {}) => Promise<import("./payoutExecution.js").PayoutReleaseResult>;
|
|
1778
|
+
setTransactions: (rows: {
|
|
1779
|
+
id: string;
|
|
1780
|
+
source: string;
|
|
1781
|
+
amount: number;
|
|
1782
|
+
fee: number;
|
|
1783
|
+
net: number;
|
|
1784
|
+
currency: string;
|
|
1785
|
+
created: number;
|
|
1786
|
+
available_on: number;
|
|
1787
|
+
status: string;
|
|
1788
|
+
type: string;
|
|
1789
|
+
exchange_rate: null;
|
|
1790
|
+
}[]) => void;
|
|
1791
|
+
transactions: () => {
|
|
1792
|
+
id: string;
|
|
1793
|
+
source: string;
|
|
1794
|
+
amount: number;
|
|
1795
|
+
fee: number;
|
|
1796
|
+
net: number;
|
|
1797
|
+
currency: string;
|
|
1798
|
+
created: number;
|
|
1799
|
+
available_on: number;
|
|
1800
|
+
status: string;
|
|
1801
|
+
type: string;
|
|
1802
|
+
exchange_rate: null;
|
|
1803
|
+
}[];
|
|
1804
|
+
}>;
|
|
1805
|
+
//# sourceMappingURL=payoutExecutionTestHelpers.d.ts.map
|