@fantastic.dev/better-stripe 0.23.1 → 0.24.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 +26 -2
- package/README.md +40 -5
- package/dist/client/affiliateRecovery/disputes.d.ts +18 -0
- package/dist/client/affiliateRecovery/disputes.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/disputes.js +33 -0
- package/dist/client/affiliateRecovery/disputes.js.map +1 -0
- package/dist/client/affiliateRecovery/engine.d.ts +29 -0
- package/dist/client/affiliateRecovery/engine.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/engine.js +116 -0
- package/dist/client/affiliateRecovery/engine.js.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts +24 -0
- package/dist/client/affiliateRecovery/payoutGate.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/payoutGate.js +30 -0
- package/dist/client/affiliateRecovery/payoutGate.js.map +1 -0
- package/dist/client/affiliateRecovery/provider.d.ts +14 -0
- package/dist/client/affiliateRecovery/provider.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/provider.js +96 -0
- package/dist/client/affiliateRecovery/provider.js.map +1 -0
- package/dist/client/affiliateRecovery/review.d.ts +28 -0
- package/dist/client/affiliateRecovery/review.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/review.js +86 -0
- package/dist/client/affiliateRecovery/review.js.map +1 -0
- package/dist/client/affiliateRecovery/validators.d.ts +402 -0
- package/dist/client/affiliateRecovery/validators.d.ts.map +1 -0
- package/dist/client/affiliateRecovery/validators.js +27 -0
- package/dist/client/affiliateRecovery/validators.js.map +1 -0
- package/dist/client/affiliateRecovery.d.ts +131 -0
- package/dist/client/affiliateRecovery.d.ts.map +1 -0
- package/dist/client/affiliateRecovery.js +69 -0
- package/dist/client/affiliateRecovery.js.map +1 -0
- package/dist/client/connect/commissionReceipts.d.ts +4 -0
- package/dist/client/connect/commissionReceipts.d.ts.map +1 -0
- package/dist/client/connect/commissionReceipts.js +17 -0
- package/dist/client/connect/commissionReceipts.js.map +1 -0
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +536 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSync.d.ts +32 -0
- package/dist/client/connect/payoutSync.d.ts.map +1 -0
- package/dist/client/connect/payoutSync.js +48 -0
- package/dist/client/connect/payoutSync.js.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +1509 -0
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -0
- package/dist/client/connect/payoutSyncTestHelpers.js +62 -0
- package/dist/client/connect/payoutSyncTestHelpers.js.map +1 -0
- package/dist/client/connect/payoutSyncValidation.d.ts +16 -0
- package/dist/client/connect/payoutSyncValidation.d.ts.map +1 -0
- package/dist/client/connect/payoutSyncValidation.js +54 -0
- package/dist/client/connect/payoutSyncValidation.js.map +1 -0
- package/dist/client/connect/payouts.d.ts +3 -1
- package/dist/client/connect/payouts.d.ts.map +1 -1
- package/dist/client/connect/payouts.js +45 -12
- package/dist/client/connect/payouts.js.map +1 -1
- package/dist/client/connect/refundPrincipal.d.ts +4 -0
- package/dist/client/connect/refundPrincipal.d.ts.map +1 -0
- package/dist/client/connect/refundPrincipal.js +21 -0
- package/dist/client/connect/refundPrincipal.js.map +1 -0
- package/dist/client/connect/reversalExecution.d.ts +47 -0
- package/dist/client/connect/reversalExecution.d.ts.map +1 -0
- package/dist/client/connect/reversalExecution.js +84 -0
- package/dist/client/connect/reversalExecution.js.map +1 -0
- package/dist/client/connect/transfers.d.ts +8 -4
- package/dist/client/connect/transfers.d.ts.map +1 -1
- package/dist/client/connect/transfers.js +52 -57
- package/dist/client/connect/transfers.js.map +1 -1
- package/dist/client/index.d.ts +29 -9
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +9 -6
- package/dist/client/index.js.map +1 -1
- package/dist/client/readContracts.d.ts +8 -0
- package/dist/client/readContracts.d.ts.map +1 -1
- package/dist/client/readContracts.js +7 -0
- package/dist/client/readContracts.js.map +1 -1
- package/dist/client/settlement/execution.d.ts.map +1 -1
- package/dist/client/settlement/execution.js +30 -3
- package/dist/client/settlement/execution.js.map +1 -1
- package/dist/client/settlement/reconciliation.d.ts.map +1 -1
- package/dist/client/settlement/reconciliation.js +16 -2
- package/dist/client/settlement/reconciliation.js.map +1 -1
- package/dist/client/webhooks/disputeRecovery.d.ts +4 -0
- package/dist/client/webhooks/disputeRecovery.d.ts.map +1 -0
- package/dist/client/webhooks/disputeRecovery.js +40 -0
- package/dist/client/webhooks/disputeRecovery.js.map +1 -0
- package/dist/client/webhooks/processors.d.ts.map +1 -1
- package/dist/client/webhooks/processors.js +14 -29
- package/dist/client/webhooks/processors.js.map +1 -1
- package/dist/component/_generated/component.d.ts +560 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/affiliateEarnings/mutations.d.ts +22 -0
- package/dist/component/affiliateEarnings/mutations.d.ts.map +1 -0
- package/dist/component/affiliateEarnings/mutations.js +160 -0
- package/dist/component/affiliateEarnings/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/mutations.d.ts +25 -0
- package/dist/component/affiliatePayouts/mutations.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/mutations.js +104 -0
- package/dist/component/affiliatePayouts/mutations.js.map +1 -0
- package/dist/component/affiliatePayouts/queries.d.ts +23 -0
- package/dist/component/affiliatePayouts/queries.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/queries.js +23 -0
- package/dist/component/affiliatePayouts/queries.js.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts +12 -0
- package/dist/component/affiliatePayouts/recipientGuard.d.ts.map +1 -0
- package/dist/component/affiliatePayouts/recipientGuard.js +26 -0
- package/dist/component/affiliatePayouts/recipientGuard.js.map +1 -0
- package/dist/component/affiliateRecovery/accounting.d.ts +28 -0
- package/dist/component/affiliateRecovery/accounting.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/accounting.js +71 -0
- package/dist/component/affiliateRecovery/accounting.js.map +1 -0
- package/dist/component/affiliateRecovery/mutations.d.ts +65 -0
- package/dist/component/affiliateRecovery/mutations.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/mutations.js +250 -0
- package/dist/component/affiliateRecovery/mutations.js.map +1 -0
- package/dist/component/affiliateRecovery/queries.d.ts +305 -0
- package/dist/component/affiliateRecovery/queries.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/queries.js +113 -0
- package/dist/component/affiliateRecovery/queries.js.map +1 -0
- package/dist/component/affiliateRecovery/schema.d.ts +171 -0
- package/dist/component/affiliateRecovery/schema.d.ts.map +1 -0
- package/dist/component/affiliateRecovery/schema.js +71 -0
- package/dist/component/affiliateRecovery/schema.js.map +1 -0
- package/dist/component/connect/mutations.d.ts +36 -23
- package/dist/component/connect/mutations.d.ts.map +1 -1
- package/dist/component/connect/mutations.js +11 -151
- package/dist/component/connect/mutations.js.map +1 -1
- package/dist/component/connect/payoutWrites.d.ts +21 -0
- package/dist/component/connect/payoutWrites.d.ts.map +1 -0
- package/dist/component/connect/payoutWrites.js +19 -0
- package/dist/component/connect/payoutWrites.js.map +1 -0
- package/dist/component/connect/queries.d.ts +10 -0
- package/dist/component/connect/queries.d.ts.map +1 -1
- package/dist/component/connect/queries.js +3 -40
- package/dist/component/connect/queries.js.map +1 -1
- package/dist/component/connect/reversalClaims.d.ts +169 -0
- package/dist/component/connect/reversalClaims.d.ts.map +1 -0
- package/dist/component/connect/reversalClaims.js +176 -0
- package/dist/component/connect/reversalClaims.js.map +1 -0
- package/dist/component/connect/reversalDiagnostics.d.ts +59 -0
- package/dist/component/connect/reversalDiagnostics.d.ts.map +1 -0
- package/dist/component/connect/reversalDiagnostics.js +50 -0
- package/dist/component/connect/reversalDiagnostics.js.map +1 -0
- package/dist/component/connect/reversalReceipts.d.ts +27 -0
- package/dist/component/connect/reversalReceipts.d.ts.map +1 -0
- package/dist/component/connect/reversalReceipts.js +85 -0
- package/dist/component/connect/reversalReceipts.js.map +1 -0
- package/dist/component/connect/schema.d.ts +31 -1
- package/dist/component/connect/schema.d.ts.map +1 -1
- package/dist/component/connect/schema.js +3 -1
- package/dist/component/connect/schema.js.map +1 -1
- package/dist/component/connect/validators.d.ts +49 -1
- package/dist/component/connect/validators.d.ts.map +1 -1
- package/dist/component/connect/validators.js +2 -0
- package/dist/component/connect/validators.js.map +1 -1
- package/dist/component/earnings/triggers.d.ts +454 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.d.ts.map +1 -1
- package/dist/component/payoutRelease/mutations.js +6 -0
- package/dist/component/payoutRelease/mutations.js.map +1 -1
- package/dist/component/payoutRelease/queries.d.ts.map +1 -1
- package/dist/component/payoutRelease/queries.js +3 -1
- package/dist/component/payoutRelease/queries.js.map +1 -1
- package/dist/component/payoutSync/helpers.d.ts +44 -0
- package/dist/component/payoutSync/helpers.d.ts.map +1 -0
- package/dist/component/payoutSync/helpers.js +60 -0
- package/dist/component/payoutSync/helpers.js.map +1 -0
- package/dist/component/payoutSync/mutations.d.ts +51 -0
- package/dist/component/payoutSync/mutations.d.ts.map +1 -0
- package/dist/component/payoutSync/mutations.js +88 -0
- package/dist/component/payoutSync/mutations.js.map +1 -0
- package/dist/component/payoutSync/queries.d.ts +16 -0
- package/dist/component/payoutSync/queries.d.ts.map +1 -0
- package/dist/component/payoutSync/queries.js +11 -0
- package/dist/component/payoutSync/queries.js.map +1 -0
- package/dist/component/payoutSync/schema.d.ts +46 -0
- package/dist/component/payoutSync/schema.d.ts.map +1 -0
- package/dist/component/payoutSync/schema.js +22 -0
- package/dist/component/payoutSync/schema.js.map +1 -0
- package/dist/component/payoutSync/validators.d.ts +137 -0
- package/dist/component/payoutSync/validators.d.ts.map +1 -0
- package/dist/component/payoutSync/validators.js +19 -0
- package/dist/component/payoutSync/validators.js.map +1 -0
- package/dist/component/schema.d.ts +268 -1
- package/dist/component/schema.js +11 -0
- package/dist/component/schema.js.map +1 -1
- package/dist/component/settlement/clawbackSchema.d.ts +161 -0
- package/dist/component/settlement/clawbackSchema.d.ts.map +1 -0
- package/dist/component/settlement/clawbackSchema.js +73 -0
- package/dist/component/settlement/clawbackSchema.js.map +1 -0
- package/dist/component/settlement/clawbacks.d.ts +55 -0
- package/dist/component/settlement/clawbacks.d.ts.map +1 -0
- package/dist/component/settlement/clawbacks.js +146 -0
- package/dist/component/settlement/clawbacks.js.map +1 -0
- package/dist/component/settlement/mutations.d.ts +16 -0
- package/dist/component/settlement/mutations.d.ts.map +1 -1
- package/dist/component/settlement/mutations.js +48 -0
- package/dist/component/settlement/mutations.js.map +1 -1
- package/dist/component/settlement/queries.d.ts +53 -0
- package/dist/component/settlement/queries.d.ts.map +1 -1
- package/dist/component/settlement/queries.js +26 -0
- package/dist/component/settlement/queries.js.map +1 -1
- package/dist/react/workflows/AffiliateRecovery.d.ts +46 -0
- package/dist/react/workflows/AffiliateRecovery.d.ts.map +1 -0
- package/dist/react/workflows/AffiliateRecovery.js +84 -0
- package/dist/react/workflows/AffiliateRecovery.js.map +1 -0
- package/dist/react/workflows/index.d.ts +2 -0
- package/dist/react/workflows/index.d.ts.map +1 -1
- package/dist/react/workflows/index.js +1 -0
- package/dist/react/workflows/index.js.map +1 -1
- package/dist/testing/affiliate-recovery.d.ts +10 -0
- package/dist/testing/affiliate-recovery.d.ts.map +1 -0
- package/dist/testing/affiliate-recovery.js +126 -0
- package/dist/testing/affiliate-recovery.js.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1 -0
- package/dist/testing/index.js.map +1 -1
- package/docs/affiliate-clawbacks.md +306 -0
- package/docs/read-contracts.md +40 -5
- package/docs/settlement.md +17 -0
- package/package.json +2 -1
- package/src/client/affiliateRecovery/disputes.ts +62 -0
- package/src/client/affiliateRecovery/engine.ts +196 -0
- package/src/client/affiliateRecovery/payoutGate.ts +65 -0
- package/src/client/affiliateRecovery/provider.ts +127 -0
- package/src/client/affiliateRecovery/review.ts +117 -0
- package/src/client/affiliateRecovery/validators.ts +38 -0
- package/src/client/affiliateRecovery.ts +173 -0
- package/src/client/connect/commissionReceipts.test.ts +157 -0
- package/src/client/connect/commissionReceipts.ts +23 -0
- package/src/client/connect/payoutSync.test.ts +313 -0
- package/src/client/connect/payoutSync.ts +93 -0
- package/src/client/connect/payoutSyncTestHelpers.ts +82 -0
- package/src/client/connect/payoutSyncValidation.ts +74 -0
- package/src/client/connect/payouts.ts +75 -15
- package/src/client/connect/refundPrincipal.test.ts +46 -0
- package/src/client/connect/refundPrincipal.ts +26 -0
- package/src/client/connect/reversalExecution.ts +130 -0
- package/src/client/connect/transfers.test.ts +3 -3
- package/src/client/connect/transfers.ts +93 -92
- package/src/client/index.ts +20 -18
- package/src/client/readContracts.ts +12 -0
- package/src/client/settlement/execution.test.ts +5 -0
- package/src/client/settlement/execution.ts +50 -3
- package/src/client/settlement/reconciliation.ts +20 -2
- package/src/client/webhooks/disputeRecovery.ts +74 -0
- package/src/client/webhooks/processors.test.ts +36 -53
- package/src/client/webhooks/processors.ts +18 -31
- package/src/component/_generated/api.ts +34 -0
- package/src/component/_generated/component.ts +696 -1
- package/src/component/affiliate-clawbacks.test.ts +370 -0
- package/src/component/affiliate-component-pagination.test.ts +83 -0
- package/src/component/affiliate-direct-payout.test.ts +160 -0
- package/src/component/affiliate-recovery-lifecycle.test.ts +587 -0
- package/src/component/affiliateEarnings/mutations.ts +196 -0
- package/src/component/affiliatePayouts/mutations.ts +121 -0
- package/src/component/affiliatePayouts/queries.ts +28 -0
- package/src/component/affiliatePayouts/recipientGuard.ts +42 -0
- package/src/component/affiliateRecovery/accounting.ts +111 -0
- package/src/component/affiliateRecovery/mutations.ts +275 -0
- package/src/component/affiliateRecovery/queries.ts +138 -0
- package/src/component/affiliateRecovery/schema.ts +86 -0
- package/src/component/connect/mutations.ts +13 -190
- package/src/component/connect/payoutWrites.ts +25 -0
- package/src/component/connect/queries.ts +4 -47
- package/src/component/connect/reversalClaims.ts +232 -0
- package/src/component/connect/reversalDiagnostics.ts +61 -0
- package/src/component/connect/reversalReceipts.ts +147 -0
- package/src/component/connect/schema.ts +3 -3
- package/src/component/connect/validators.ts +2 -0
- package/src/component/payout-recovery-integration.test.ts +172 -0
- package/src/component/payout-sync.test.ts +117 -0
- package/src/component/payoutRelease/mutations.ts +9 -0
- package/src/component/payoutRelease/queries.ts +3 -1
- package/src/component/payoutSync/helpers.ts +86 -0
- package/src/component/payoutSync/mutations.ts +102 -0
- package/src/component/payoutSync/queries.ts +10 -0
- package/src/component/payoutSync/schema.ts +25 -0
- package/src/component/payoutSync/validators.ts +21 -0
- package/src/component/schema.ts +20 -0
- package/src/component/settlement/clawbackSchema.ts +78 -0
- package/src/component/settlement/clawbacks.ts +233 -0
- package/src/component/settlement/mutations.ts +54 -0
- package/src/component/settlement/queries.ts +35 -0
- package/src/component/summary-arithmetic.test.ts +9 -4
- package/src/react/workflows/AffiliateRecovery.test.tsx +106 -0
- package/src/react/workflows/AffiliateRecovery.tsx +273 -0
- package/src/react/workflows/index.ts +9 -0
- package/src/testing/affiliate-recovery.ts +137 -0
- package/src/testing/index.ts +2 -0
|
@@ -23,6 +23,505 @@ import type { FunctionReference } from "convex/server";
|
|
|
23
23
|
*/
|
|
24
24
|
export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
25
25
|
{
|
|
26
|
+
affiliateEarnings: {
|
|
27
|
+
mutations: {
|
|
28
|
+
confirmEarning: FunctionReference<
|
|
29
|
+
"mutation",
|
|
30
|
+
"internal",
|
|
31
|
+
{ earningId: string; stripeTransferId?: string },
|
|
32
|
+
null,
|
|
33
|
+
Name
|
|
34
|
+
>;
|
|
35
|
+
reserveEarning: FunctionReference<
|
|
36
|
+
"mutation",
|
|
37
|
+
"internal",
|
|
38
|
+
{ affiliateAccountId: string; sourceChargeId: string },
|
|
39
|
+
{
|
|
40
|
+
_creationTime: number;
|
|
41
|
+
_id: string;
|
|
42
|
+
affiliateAccountId: string;
|
|
43
|
+
currency: string;
|
|
44
|
+
originalCommission: number;
|
|
45
|
+
paymentIntentId?: string;
|
|
46
|
+
releaseAmount: number;
|
|
47
|
+
sourceChargeId: string;
|
|
48
|
+
sourceInvoiceId?: string;
|
|
49
|
+
status: "reserved" | "paid";
|
|
50
|
+
stripeTransferId?: string;
|
|
51
|
+
withheldAmount: number;
|
|
52
|
+
},
|
|
53
|
+
Name
|
|
54
|
+
>;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
affiliatePayouts: {
|
|
58
|
+
mutations: {
|
|
59
|
+
finishPayout: FunctionReference<
|
|
60
|
+
"mutation",
|
|
61
|
+
"internal",
|
|
62
|
+
{
|
|
63
|
+
operationKey: string;
|
|
64
|
+
state: "unknown" | "submitted" | "failed";
|
|
65
|
+
stripePayoutId?: string;
|
|
66
|
+
},
|
|
67
|
+
null,
|
|
68
|
+
Name
|
|
69
|
+
>;
|
|
70
|
+
reservePayout: FunctionReference<
|
|
71
|
+
"mutation",
|
|
72
|
+
"internal",
|
|
73
|
+
{
|
|
74
|
+
affiliateAccountId: string;
|
|
75
|
+
amount: number;
|
|
76
|
+
currency: string;
|
|
77
|
+
minimumAmount: number;
|
|
78
|
+
now: number;
|
|
79
|
+
operationKey?: string;
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
_creationTime: number;
|
|
83
|
+
_id: string;
|
|
84
|
+
affiliateAccountId: string;
|
|
85
|
+
amount: number;
|
|
86
|
+
createdAt: number;
|
|
87
|
+
currency: string;
|
|
88
|
+
minimumAmount: number;
|
|
89
|
+
operationKey: string;
|
|
90
|
+
state: "pending" | "unknown" | "submitted" | "failed";
|
|
91
|
+
stripePayoutId?: string;
|
|
92
|
+
} | null,
|
|
93
|
+
Name
|
|
94
|
+
>;
|
|
95
|
+
};
|
|
96
|
+
queries: {
|
|
97
|
+
pendingPayouts: FunctionReference<
|
|
98
|
+
"query",
|
|
99
|
+
"internal",
|
|
100
|
+
{
|
|
101
|
+
paginationOpts: {
|
|
102
|
+
cursor: string | null;
|
|
103
|
+
endCursor?: string | null;
|
|
104
|
+
id?: number;
|
|
105
|
+
maximumBytesRead?: number;
|
|
106
|
+
maximumRowsRead?: number;
|
|
107
|
+
numItems: number;
|
|
108
|
+
};
|
|
109
|
+
state: "pending" | "unknown";
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
continueCursor: string;
|
|
113
|
+
isDone: boolean;
|
|
114
|
+
page: Array<{
|
|
115
|
+
_creationTime: number;
|
|
116
|
+
_id: string;
|
|
117
|
+
affiliateAccountId: string;
|
|
118
|
+
amount: number;
|
|
119
|
+
createdAt: number;
|
|
120
|
+
currency: string;
|
|
121
|
+
minimumAmount: number;
|
|
122
|
+
operationKey: string;
|
|
123
|
+
state: "pending" | "unknown" | "submitted" | "failed";
|
|
124
|
+
stripePayoutId?: string;
|
|
125
|
+
}>;
|
|
126
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
127
|
+
splitCursor?: string | null;
|
|
128
|
+
},
|
|
129
|
+
Name
|
|
130
|
+
>;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
affiliateRecovery: {
|
|
134
|
+
mutations: {
|
|
135
|
+
beginOperation: FunctionReference<
|
|
136
|
+
"mutation",
|
|
137
|
+
"internal",
|
|
138
|
+
{ operationId: string },
|
|
139
|
+
{
|
|
140
|
+
_creationTime: number;
|
|
141
|
+
_id: string;
|
|
142
|
+
amount: number;
|
|
143
|
+
attempted: boolean;
|
|
144
|
+
createdAt: number;
|
|
145
|
+
error?: string;
|
|
146
|
+
kind: "recovery" | "restoration";
|
|
147
|
+
obligationId: string;
|
|
148
|
+
providerBaseline?: number;
|
|
149
|
+
receiptId?: string;
|
|
150
|
+
sourceEventId?: string;
|
|
151
|
+
state:
|
|
152
|
+
| "pending"
|
|
153
|
+
| "unknown"
|
|
154
|
+
| "insufficient_balance"
|
|
155
|
+
| "unsupported"
|
|
156
|
+
| "failed"
|
|
157
|
+
| "succeeded"
|
|
158
|
+
| "canceled";
|
|
159
|
+
},
|
|
160
|
+
Name
|
|
161
|
+
>;
|
|
162
|
+
completeOperation: FunctionReference<
|
|
163
|
+
"mutation",
|
|
164
|
+
"internal",
|
|
165
|
+
{
|
|
166
|
+
confirmedTransferReversed?: number;
|
|
167
|
+
error?: string;
|
|
168
|
+
operationId: string;
|
|
169
|
+
receiptId?: string;
|
|
170
|
+
state:
|
|
171
|
+
| "pending"
|
|
172
|
+
| "unknown"
|
|
173
|
+
| "insufficient_balance"
|
|
174
|
+
| "unsupported"
|
|
175
|
+
| "failed"
|
|
176
|
+
| "succeeded"
|
|
177
|
+
| "canceled";
|
|
178
|
+
},
|
|
179
|
+
null,
|
|
180
|
+
Name
|
|
181
|
+
>;
|
|
182
|
+
reserveOperation: FunctionReference<
|
|
183
|
+
"mutation",
|
|
184
|
+
"internal",
|
|
185
|
+
{
|
|
186
|
+
kind: "recovery" | "restoration";
|
|
187
|
+
now: number;
|
|
188
|
+
obligationId: string;
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
_creationTime: number;
|
|
192
|
+
_id: string;
|
|
193
|
+
amount: number;
|
|
194
|
+
attempted: boolean;
|
|
195
|
+
createdAt: number;
|
|
196
|
+
error?: string;
|
|
197
|
+
kind: "recovery" | "restoration";
|
|
198
|
+
obligationId: string;
|
|
199
|
+
providerBaseline?: number;
|
|
200
|
+
receiptId?: string;
|
|
201
|
+
sourceEventId?: string;
|
|
202
|
+
state:
|
|
203
|
+
| "pending"
|
|
204
|
+
| "unknown"
|
|
205
|
+
| "insufficient_balance"
|
|
206
|
+
| "unsupported"
|
|
207
|
+
| "failed"
|
|
208
|
+
| "succeeded"
|
|
209
|
+
| "canceled";
|
|
210
|
+
} | null,
|
|
211
|
+
Name
|
|
212
|
+
>;
|
|
213
|
+
reviewLegacy: FunctionReference<
|
|
214
|
+
"mutation",
|
|
215
|
+
"internal",
|
|
216
|
+
{
|
|
217
|
+
exposure: {
|
|
218
|
+
chargeAmount: number;
|
|
219
|
+
disputeId?: string;
|
|
220
|
+
disputeState?: "open" | "lost" | "won";
|
|
221
|
+
finalized: boolean;
|
|
222
|
+
kind: "refund" | "dispute";
|
|
223
|
+
principal: number;
|
|
224
|
+
refundId?: string;
|
|
225
|
+
refundedPrincipal?: number;
|
|
226
|
+
};
|
|
227
|
+
note: string;
|
|
228
|
+
obligationId: string;
|
|
229
|
+
receipts: Array<{ amount: number; id: string }>;
|
|
230
|
+
recoveredAmount: number;
|
|
231
|
+
restorationIds: Array<string>;
|
|
232
|
+
restoredAmount: number;
|
|
233
|
+
},
|
|
234
|
+
null,
|
|
235
|
+
Name
|
|
236
|
+
>;
|
|
237
|
+
};
|
|
238
|
+
queries: {
|
|
239
|
+
chargeObligations: FunctionReference<
|
|
240
|
+
"query",
|
|
241
|
+
"internal",
|
|
242
|
+
{ sourceChargeId: string },
|
|
243
|
+
Array<{
|
|
244
|
+
_creationTime: number;
|
|
245
|
+
_id: string;
|
|
246
|
+
accounted?: boolean;
|
|
247
|
+
activeOperationId?: string;
|
|
248
|
+
affiliateAccountId: string;
|
|
249
|
+
chargeAmount: number;
|
|
250
|
+
creditAmount?: number;
|
|
251
|
+
currency: string;
|
|
252
|
+
debtAmount?: number;
|
|
253
|
+
debtStatus?: "open" | "settled";
|
|
254
|
+
disputeId?: string;
|
|
255
|
+
disputeState?: "open" | "lost" | "won";
|
|
256
|
+
disputedPrincipal: number;
|
|
257
|
+
earningId?: string;
|
|
258
|
+
finalizedAmount: number;
|
|
259
|
+
lastError?: string;
|
|
260
|
+
lastRefundId?: string;
|
|
261
|
+
lastState?: string;
|
|
262
|
+
legacyReceiptIds?: Array<string>;
|
|
263
|
+
legacyRestorationIds?: Array<string>;
|
|
264
|
+
lostPrincipal: number;
|
|
265
|
+
needsReconciliation: boolean;
|
|
266
|
+
offsetAmount?: number;
|
|
267
|
+
operationSequence?: number;
|
|
268
|
+
operatorNote?: string;
|
|
269
|
+
originalCommission: number;
|
|
270
|
+
paymentId?: string;
|
|
271
|
+
paymentIntentId?: string;
|
|
272
|
+
provisionalAmount: number;
|
|
273
|
+
recoveredAmount: number;
|
|
274
|
+
refundedPrincipal: number;
|
|
275
|
+
releasedCommission?: number;
|
|
276
|
+
reservedRecovery?: number;
|
|
277
|
+
reservedRestoration?: number;
|
|
278
|
+
restoredAmount?: number;
|
|
279
|
+
sourceChargeId: string;
|
|
280
|
+
sourceInvoiceId?: string;
|
|
281
|
+
storeAccountId?: string;
|
|
282
|
+
stripeTransferId?: string;
|
|
283
|
+
}>,
|
|
284
|
+
Name
|
|
285
|
+
>;
|
|
286
|
+
getEarning: FunctionReference<
|
|
287
|
+
"query",
|
|
288
|
+
"internal",
|
|
289
|
+
{ affiliateAccountId: string; sourceChargeId: string },
|
|
290
|
+
{
|
|
291
|
+
_creationTime: number;
|
|
292
|
+
_id: string;
|
|
293
|
+
affiliateAccountId: string;
|
|
294
|
+
currency: string;
|
|
295
|
+
originalCommission: number;
|
|
296
|
+
paymentIntentId?: string;
|
|
297
|
+
releaseAmount: number;
|
|
298
|
+
sourceChargeId: string;
|
|
299
|
+
sourceInvoiceId?: string;
|
|
300
|
+
status: "reserved" | "paid";
|
|
301
|
+
stripeTransferId?: string;
|
|
302
|
+
withheldAmount: number;
|
|
303
|
+
} | null,
|
|
304
|
+
Name
|
|
305
|
+
>;
|
|
306
|
+
getObligation: FunctionReference<
|
|
307
|
+
"query",
|
|
308
|
+
"internal",
|
|
309
|
+
{ obligationId: string },
|
|
310
|
+
{
|
|
311
|
+
_creationTime: number;
|
|
312
|
+
_id: string;
|
|
313
|
+
accounted?: boolean;
|
|
314
|
+
activeOperationId?: string;
|
|
315
|
+
affiliateAccountId: string;
|
|
316
|
+
chargeAmount: number;
|
|
317
|
+
creditAmount?: number;
|
|
318
|
+
currency: string;
|
|
319
|
+
debtAmount?: number;
|
|
320
|
+
debtStatus?: "open" | "settled";
|
|
321
|
+
disputeId?: string;
|
|
322
|
+
disputeState?: "open" | "lost" | "won";
|
|
323
|
+
disputedPrincipal: number;
|
|
324
|
+
earningId?: string;
|
|
325
|
+
finalizedAmount: number;
|
|
326
|
+
lastError?: string;
|
|
327
|
+
lastRefundId?: string;
|
|
328
|
+
lastState?: string;
|
|
329
|
+
legacyReceiptIds?: Array<string>;
|
|
330
|
+
legacyRestorationIds?: Array<string>;
|
|
331
|
+
lostPrincipal: number;
|
|
332
|
+
needsReconciliation: boolean;
|
|
333
|
+
offsetAmount?: number;
|
|
334
|
+
operationSequence?: number;
|
|
335
|
+
operatorNote?: string;
|
|
336
|
+
originalCommission: number;
|
|
337
|
+
paymentId?: string;
|
|
338
|
+
paymentIntentId?: string;
|
|
339
|
+
provisionalAmount: number;
|
|
340
|
+
recoveredAmount: number;
|
|
341
|
+
refundedPrincipal: number;
|
|
342
|
+
releasedCommission?: number;
|
|
343
|
+
reservedRecovery?: number;
|
|
344
|
+
reservedRestoration?: number;
|
|
345
|
+
restoredAmount?: number;
|
|
346
|
+
sourceChargeId: string;
|
|
347
|
+
sourceInvoiceId?: string;
|
|
348
|
+
storeAccountId?: string;
|
|
349
|
+
stripeTransferId?: string;
|
|
350
|
+
} | null,
|
|
351
|
+
Name
|
|
352
|
+
>;
|
|
353
|
+
operationHistory: FunctionReference<
|
|
354
|
+
"query",
|
|
355
|
+
"internal",
|
|
356
|
+
{
|
|
357
|
+
obligationId: string;
|
|
358
|
+
paginationOpts: {
|
|
359
|
+
cursor: string | null;
|
|
360
|
+
endCursor?: string | null;
|
|
361
|
+
id?: number;
|
|
362
|
+
maximumBytesRead?: number;
|
|
363
|
+
maximumRowsRead?: number;
|
|
364
|
+
numItems: number;
|
|
365
|
+
};
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
continueCursor: string;
|
|
369
|
+
isDone: boolean;
|
|
370
|
+
page: Array<{
|
|
371
|
+
_creationTime: number;
|
|
372
|
+
_id: string;
|
|
373
|
+
amount: number;
|
|
374
|
+
attempted: boolean;
|
|
375
|
+
createdAt: number;
|
|
376
|
+
error?: string;
|
|
377
|
+
kind: "recovery" | "restoration";
|
|
378
|
+
obligationId: string;
|
|
379
|
+
providerBaseline?: number;
|
|
380
|
+
receiptId?: string;
|
|
381
|
+
sourceEventId?: string;
|
|
382
|
+
state:
|
|
383
|
+
| "pending"
|
|
384
|
+
| "unknown"
|
|
385
|
+
| "insufficient_balance"
|
|
386
|
+
| "unsupported"
|
|
387
|
+
| "failed"
|
|
388
|
+
| "succeeded"
|
|
389
|
+
| "canceled";
|
|
390
|
+
}>;
|
|
391
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
392
|
+
splitCursor?: string | null;
|
|
393
|
+
},
|
|
394
|
+
Name
|
|
395
|
+
>;
|
|
396
|
+
pendingOperations: FunctionReference<
|
|
397
|
+
"query",
|
|
398
|
+
"internal",
|
|
399
|
+
{
|
|
400
|
+
paginationOpts: {
|
|
401
|
+
cursor: string | null;
|
|
402
|
+
endCursor?: string | null;
|
|
403
|
+
id?: number;
|
|
404
|
+
maximumBytesRead?: number;
|
|
405
|
+
maximumRowsRead?: number;
|
|
406
|
+
numItems: number;
|
|
407
|
+
};
|
|
408
|
+
state: "pending" | "unknown";
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
continueCursor: string;
|
|
412
|
+
isDone: boolean;
|
|
413
|
+
page: Array<{
|
|
414
|
+
_creationTime: number;
|
|
415
|
+
_id: string;
|
|
416
|
+
amount: number;
|
|
417
|
+
attempted: boolean;
|
|
418
|
+
createdAt: number;
|
|
419
|
+
error?: string;
|
|
420
|
+
kind: "recovery" | "restoration";
|
|
421
|
+
obligationId: string;
|
|
422
|
+
providerBaseline?: number;
|
|
423
|
+
receiptId?: string;
|
|
424
|
+
sourceEventId?: string;
|
|
425
|
+
state:
|
|
426
|
+
| "pending"
|
|
427
|
+
| "unknown"
|
|
428
|
+
| "insufficient_balance"
|
|
429
|
+
| "unsupported"
|
|
430
|
+
| "failed"
|
|
431
|
+
| "succeeded"
|
|
432
|
+
| "canceled";
|
|
433
|
+
}>;
|
|
434
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
435
|
+
splitCursor?: string | null;
|
|
436
|
+
},
|
|
437
|
+
Name
|
|
438
|
+
>;
|
|
439
|
+
recoverySnapshot: FunctionReference<
|
|
440
|
+
"query",
|
|
441
|
+
"internal",
|
|
442
|
+
{
|
|
443
|
+
affiliateAccountId: string;
|
|
444
|
+
currency: string;
|
|
445
|
+
paginationOpts: {
|
|
446
|
+
cursor: string | null;
|
|
447
|
+
endCursor?: string | null;
|
|
448
|
+
id?: number;
|
|
449
|
+
maximumBytesRead?: number;
|
|
450
|
+
maximumRowsRead?: number;
|
|
451
|
+
numItems: number;
|
|
452
|
+
};
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
balance: {
|
|
456
|
+
_creationTime: number;
|
|
457
|
+
_id: string;
|
|
458
|
+
activePayoutKey?: string;
|
|
459
|
+
affiliateAccountId: string;
|
|
460
|
+
currency: string;
|
|
461
|
+
netPayable: number;
|
|
462
|
+
offsetAmount: number;
|
|
463
|
+
originalCommission: number;
|
|
464
|
+
outstandingDebt: number;
|
|
465
|
+
pendingPayoutAmount?: number;
|
|
466
|
+
recoveredAmount: number;
|
|
467
|
+
reservedRecovery: number;
|
|
468
|
+
reservedRestoration: number;
|
|
469
|
+
restorationDue: number;
|
|
470
|
+
restoredAmount: number;
|
|
471
|
+
withheldAmount: number;
|
|
472
|
+
} | null;
|
|
473
|
+
obligations: {
|
|
474
|
+
continueCursor: string;
|
|
475
|
+
isDone: boolean;
|
|
476
|
+
page: Array<{
|
|
477
|
+
_creationTime: number;
|
|
478
|
+
_id: string;
|
|
479
|
+
accounted?: boolean;
|
|
480
|
+
activeOperationId?: string;
|
|
481
|
+
affiliateAccountId: string;
|
|
482
|
+
chargeAmount: number;
|
|
483
|
+
creditAmount?: number;
|
|
484
|
+
currency: string;
|
|
485
|
+
debtAmount?: number;
|
|
486
|
+
debtStatus?: "open" | "settled";
|
|
487
|
+
disputeId?: string;
|
|
488
|
+
disputeState?: "open" | "lost" | "won";
|
|
489
|
+
disputedPrincipal: number;
|
|
490
|
+
earningId?: string;
|
|
491
|
+
finalizedAmount: number;
|
|
492
|
+
lastError?: string;
|
|
493
|
+
lastRefundId?: string;
|
|
494
|
+
lastState?: string;
|
|
495
|
+
legacyReceiptIds?: Array<string>;
|
|
496
|
+
legacyRestorationIds?: Array<string>;
|
|
497
|
+
lostPrincipal: number;
|
|
498
|
+
needsReconciliation: boolean;
|
|
499
|
+
offsetAmount?: number;
|
|
500
|
+
operationSequence?: number;
|
|
501
|
+
operatorNote?: string;
|
|
502
|
+
originalCommission: number;
|
|
503
|
+
paymentId?: string;
|
|
504
|
+
paymentIntentId?: string;
|
|
505
|
+
provisionalAmount: number;
|
|
506
|
+
recoveredAmount: number;
|
|
507
|
+
refundedPrincipal: number;
|
|
508
|
+
releasedCommission?: number;
|
|
509
|
+
reservedRecovery?: number;
|
|
510
|
+
reservedRestoration?: number;
|
|
511
|
+
restoredAmount?: number;
|
|
512
|
+
sourceChargeId: string;
|
|
513
|
+
sourceInvoiceId?: string;
|
|
514
|
+
storeAccountId?: string;
|
|
515
|
+
stripeTransferId?: string;
|
|
516
|
+
}>;
|
|
517
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
518
|
+
splitCursor?: string | null;
|
|
519
|
+
};
|
|
520
|
+
},
|
|
521
|
+
Name
|
|
522
|
+
>;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
26
525
|
billing: {
|
|
27
526
|
mutations: {
|
|
28
527
|
upsertCheckoutSession: FunctionReference<
|
|
@@ -753,6 +1252,16 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
753
1252
|
"mutation",
|
|
754
1253
|
"internal",
|
|
755
1254
|
{
|
|
1255
|
+
commissionExposure?: {
|
|
1256
|
+
chargeAmount: number;
|
|
1257
|
+
disputeId?: string;
|
|
1258
|
+
disputeState?: "open" | "lost" | "won";
|
|
1259
|
+
finalized: boolean;
|
|
1260
|
+
kind: "refund" | "dispute";
|
|
1261
|
+
principal: number;
|
|
1262
|
+
refundId?: string;
|
|
1263
|
+
refundedPrincipal?: number;
|
|
1264
|
+
};
|
|
756
1265
|
mode:
|
|
757
1266
|
| { kind: "full" }
|
|
758
1267
|
| { kind: "percent"; percent: number }
|
|
@@ -768,6 +1277,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
768
1277
|
{
|
|
769
1278
|
replay: boolean;
|
|
770
1279
|
slices: Array<{
|
|
1280
|
+
commissionTracked?: boolean;
|
|
771
1281
|
confirmed: number;
|
|
772
1282
|
from: number;
|
|
773
1283
|
stripeTransferId: string;
|
|
@@ -790,7 +1300,15 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
790
1300
|
recordTransferReversal: FunctionReference<
|
|
791
1301
|
"mutation",
|
|
792
1302
|
"internal",
|
|
793
|
-
{
|
|
1303
|
+
{
|
|
1304
|
+
receipt?: {
|
|
1305
|
+
amount: number;
|
|
1306
|
+
operationId: string;
|
|
1307
|
+
stripeReversalId: string;
|
|
1308
|
+
};
|
|
1309
|
+
reversedAmount: number;
|
|
1310
|
+
stripeTransferId: string;
|
|
1311
|
+
},
|
|
794
1312
|
null,
|
|
795
1313
|
Name
|
|
796
1314
|
>;
|
|
@@ -1207,6 +1725,16 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1207
1725
|
{
|
|
1208
1726
|
_creationTime: number;
|
|
1209
1727
|
_id: string;
|
|
1728
|
+
commissionExposure?: {
|
|
1729
|
+
chargeAmount: number;
|
|
1730
|
+
disputeId?: string;
|
|
1731
|
+
disputeState?: "open" | "lost" | "won";
|
|
1732
|
+
finalized: boolean;
|
|
1733
|
+
kind: "refund" | "dispute";
|
|
1734
|
+
principal: number;
|
|
1735
|
+
refundId?: string;
|
|
1736
|
+
refundedPrincipal?: number;
|
|
1737
|
+
};
|
|
1210
1738
|
operationId: string;
|
|
1211
1739
|
slices: Array<{
|
|
1212
1740
|
from: number;
|
|
@@ -3155,6 +3683,88 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3155
3683
|
>;
|
|
3156
3684
|
};
|
|
3157
3685
|
};
|
|
3686
|
+
payoutSync: {
|
|
3687
|
+
mutations: {
|
|
3688
|
+
begin: FunctionReference<
|
|
3689
|
+
"mutation",
|
|
3690
|
+
"internal",
|
|
3691
|
+
{ accountId: string; stripePayoutId: string },
|
|
3692
|
+
number,
|
|
3693
|
+
Name
|
|
3694
|
+
>;
|
|
3695
|
+
finish: FunctionReference<
|
|
3696
|
+
"mutation",
|
|
3697
|
+
"internal",
|
|
3698
|
+
{
|
|
3699
|
+
accountId: string;
|
|
3700
|
+
generation: number;
|
|
3701
|
+
payout: {
|
|
3702
|
+
accountId: string;
|
|
3703
|
+
amount: number;
|
|
3704
|
+
arrivalDate?: string;
|
|
3705
|
+
currency: string;
|
|
3706
|
+
failureCode?: string;
|
|
3707
|
+
failureMessage?: string;
|
|
3708
|
+
metadata?: Record<string, string>;
|
|
3709
|
+
method?: string;
|
|
3710
|
+
status: "pending" | "paid" | "failed" | "canceled" | "in_transit";
|
|
3711
|
+
stripePayoutId: string;
|
|
3712
|
+
};
|
|
3713
|
+
stripePayoutId: string;
|
|
3714
|
+
},
|
|
3715
|
+
| {
|
|
3716
|
+
changed: boolean;
|
|
3717
|
+
generation: number;
|
|
3718
|
+
payout: {
|
|
3719
|
+
_creationTime: number;
|
|
3720
|
+
_id: string;
|
|
3721
|
+
accountId: string;
|
|
3722
|
+
amount: number;
|
|
3723
|
+
arrivalDate?: string;
|
|
3724
|
+
currency: string;
|
|
3725
|
+
failureCode?: string;
|
|
3726
|
+
failureMessage?: string;
|
|
3727
|
+
metadata?: any;
|
|
3728
|
+
method?: string;
|
|
3729
|
+
status:
|
|
3730
|
+
"pending" | "paid" | "failed" | "canceled" | "in_transit";
|
|
3731
|
+
stripePayoutId: string;
|
|
3732
|
+
totalsRecorded?: true;
|
|
3733
|
+
};
|
|
3734
|
+
status: "accepted";
|
|
3735
|
+
}
|
|
3736
|
+
| { generation: number; status: "superseded" },
|
|
3737
|
+
Name
|
|
3738
|
+
>;
|
|
3739
|
+
markUnknown: FunctionReference<
|
|
3740
|
+
"mutation",
|
|
3741
|
+
"internal",
|
|
3742
|
+
{ accountId: string; generation: number; stripePayoutId: string },
|
|
3743
|
+
null,
|
|
3744
|
+
Name
|
|
3745
|
+
>;
|
|
3746
|
+
};
|
|
3747
|
+
queries: {
|
|
3748
|
+
get: FunctionReference<
|
|
3749
|
+
"query",
|
|
3750
|
+
"internal",
|
|
3751
|
+
{ accountId: string; stripePayoutId: string },
|
|
3752
|
+
{
|
|
3753
|
+
_creationTime: number;
|
|
3754
|
+
_id: string;
|
|
3755
|
+
acceptedAt?: number;
|
|
3756
|
+
acceptedFingerprint?: string;
|
|
3757
|
+
acceptedGeneration?: number;
|
|
3758
|
+
accountId: string;
|
|
3759
|
+
generation: number;
|
|
3760
|
+
startedAt: number;
|
|
3761
|
+
status: "pending" | "accepted" | "unknown";
|
|
3762
|
+
stripePayoutId: string;
|
|
3763
|
+
} | null,
|
|
3764
|
+
Name
|
|
3765
|
+
>;
|
|
3766
|
+
};
|
|
3767
|
+
};
|
|
3158
3768
|
products: {
|
|
3159
3769
|
mutations: {
|
|
3160
3770
|
upsertPrice: FunctionReference<
|
|
@@ -3474,6 +4084,27 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3474
4084
|
},
|
|
3475
4085
|
Name
|
|
3476
4086
|
>;
|
|
4087
|
+
migrateAffiliateObligations: FunctionReference<
|
|
4088
|
+
"mutation",
|
|
4089
|
+
"internal",
|
|
4090
|
+
{
|
|
4091
|
+
paginationOpts: {
|
|
4092
|
+
cursor: string | null;
|
|
4093
|
+
endCursor?: string | null;
|
|
4094
|
+
id?: number;
|
|
4095
|
+
maximumBytesRead?: number;
|
|
4096
|
+
maximumRowsRead?: number;
|
|
4097
|
+
numItems: number;
|
|
4098
|
+
};
|
|
4099
|
+
},
|
|
4100
|
+
{
|
|
4101
|
+
continueCursor: string;
|
|
4102
|
+
isDone: boolean;
|
|
4103
|
+
migrated: number;
|
|
4104
|
+
skipped: number;
|
|
4105
|
+
},
|
|
4106
|
+
Name
|
|
4107
|
+
>;
|
|
3477
4108
|
reserveSettlementAllocation: FunctionReference<
|
|
3478
4109
|
"mutation",
|
|
3479
4110
|
"internal",
|
|
@@ -3551,6 +4182,70 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
3551
4182
|
} | null,
|
|
3552
4183
|
Name
|
|
3553
4184
|
>;
|
|
4185
|
+
listAffiliateObligations: FunctionReference<
|
|
4186
|
+
"query",
|
|
4187
|
+
"internal",
|
|
4188
|
+
{
|
|
4189
|
+
affiliateAccountId: string;
|
|
4190
|
+
currency: string;
|
|
4191
|
+
paginationOpts: {
|
|
4192
|
+
cursor: string | null;
|
|
4193
|
+
endCursor?: string | null;
|
|
4194
|
+
id?: number;
|
|
4195
|
+
maximumBytesRead?: number;
|
|
4196
|
+
maximumRowsRead?: number;
|
|
4197
|
+
numItems: number;
|
|
4198
|
+
};
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
continueCursor: string;
|
|
4202
|
+
isDone: boolean;
|
|
4203
|
+
page: Array<{
|
|
4204
|
+
_creationTime: number;
|
|
4205
|
+
_id: string;
|
|
4206
|
+
accounted?: boolean;
|
|
4207
|
+
activeOperationId?: string;
|
|
4208
|
+
affiliateAccountId: string;
|
|
4209
|
+
chargeAmount: number;
|
|
4210
|
+
creditAmount?: number;
|
|
4211
|
+
currency: string;
|
|
4212
|
+
debtAmount?: number;
|
|
4213
|
+
debtStatus?: "open" | "settled";
|
|
4214
|
+
disputeId?: string;
|
|
4215
|
+
disputeState?: "open" | "lost" | "won";
|
|
4216
|
+
disputedPrincipal: number;
|
|
4217
|
+
earningId?: string;
|
|
4218
|
+
finalizedAmount: number;
|
|
4219
|
+
lastError?: string;
|
|
4220
|
+
lastRefundId?: string;
|
|
4221
|
+
lastState?: string;
|
|
4222
|
+
legacyReceiptIds?: Array<string>;
|
|
4223
|
+
legacyRestorationIds?: Array<string>;
|
|
4224
|
+
lostPrincipal: number;
|
|
4225
|
+
needsReconciliation: boolean;
|
|
4226
|
+
offsetAmount?: number;
|
|
4227
|
+
operationSequence?: number;
|
|
4228
|
+
operatorNote?: string;
|
|
4229
|
+
originalCommission: number;
|
|
4230
|
+
paymentId?: string;
|
|
4231
|
+
paymentIntentId?: string;
|
|
4232
|
+
provisionalAmount: number;
|
|
4233
|
+
recoveredAmount: number;
|
|
4234
|
+
refundedPrincipal: number;
|
|
4235
|
+
releasedCommission?: number;
|
|
4236
|
+
reservedRecovery?: number;
|
|
4237
|
+
reservedRestoration?: number;
|
|
4238
|
+
restoredAmount?: number;
|
|
4239
|
+
sourceChargeId: string;
|
|
4240
|
+
sourceInvoiceId?: string;
|
|
4241
|
+
storeAccountId?: string;
|
|
4242
|
+
stripeTransferId?: string;
|
|
4243
|
+
}>;
|
|
4244
|
+
pageStatus?: "SplitRecommended" | "SplitRequired" | null;
|
|
4245
|
+
splitCursor?: string | null;
|
|
4246
|
+
},
|
|
4247
|
+
Name
|
|
4248
|
+
>;
|
|
3554
4249
|
};
|
|
3555
4250
|
};
|
|
3556
4251
|
webhooks: {
|