@fantastic.dev/better-stripe 0.38.0 → 0.39.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 +20 -0
- package/MIGRATION.md +9 -0
- package/README.md +21 -1
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts +506 -2
- package/dist/client/connect/payoutAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts +253 -1
- package/dist/client/connect/payoutExecutionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts +506 -2
- package/dist/client/connect/payoutLargeAdoptionTestHelpers.d.ts.map +1 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts +253 -1
- package/dist/client/connect/payoutSyncTestHelpers.d.ts.map +1 -1
- package/dist/client/costRecovery.d.ts +18 -0
- package/dist/client/costRecovery.d.ts.map +1 -1
- package/dist/client/costRecovery.js +4 -0
- package/dist/client/costRecovery.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/processingCostDeficit/index.d.ts +27 -0
- package/dist/client/processingCostDeficit/index.d.ts.map +1 -0
- package/dist/client/processingCostDeficit/index.js +54 -0
- package/dist/client/processingCostDeficit/index.js.map +1 -0
- package/dist/component/_generated/api.d.ts +284 -0
- package/dist/component/_generated/api.d.ts.map +1 -0
- package/dist/component/_generated/api.js +31 -0
- package/dist/component/_generated/api.js.map +1 -0
- package/dist/component/_generated/component.d.ts +527 -0
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/balanceFunding/helpers.d.ts +86 -0
- package/dist/component/balanceFunding/helpers.d.ts.map +1 -0
- package/dist/component/balanceFunding/helpers.js +68 -0
- package/dist/component/balanceFunding/helpers.js.map +1 -0
- package/dist/component/balanceFunding/importHandler.d.ts +13 -0
- package/dist/component/balanceFunding/importHandler.d.ts.map +1 -0
- package/dist/component/balanceFunding/importHandler.js +130 -0
- package/dist/component/balanceFunding/importHandler.js.map +1 -0
- package/dist/component/balanceFunding/lifecycleHandlers.d.ts +85 -0
- package/dist/component/balanceFunding/lifecycleHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/lifecycleHandlers.js +60 -0
- package/dist/component/balanceFunding/lifecycleHandlers.js.map +1 -0
- package/dist/component/balanceFunding/mutationValidators.d.ts +238 -0
- package/dist/component/balanceFunding/mutationValidators.d.ts.map +1 -0
- package/dist/component/balanceFunding/mutationValidators.js +55 -0
- package/dist/component/balanceFunding/mutationValidators.js.map +1 -0
- package/dist/component/balanceFunding/mutations.d.ts +335 -0
- package/dist/component/balanceFunding/mutations.d.ts.map +1 -0
- package/dist/component/balanceFunding/mutations.js +106 -0
- package/dist/component/balanceFunding/mutations.js.map +1 -0
- package/dist/component/balanceFunding/preparationHandlers.d.ts +55 -0
- package/dist/component/balanceFunding/preparationHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/preparationHandlers.js +165 -0
- package/dist/component/balanceFunding/preparationHandlers.js.map +1 -0
- package/dist/component/balanceFunding/queries.d.ts +151 -0
- package/dist/component/balanceFunding/queries.d.ts.map +1 -0
- package/dist/component/balanceFunding/queries.js +180 -0
- package/dist/component/balanceFunding/queries.js.map +1 -0
- package/dist/component/balanceFunding/schema.d.ts +748 -0
- package/dist/component/balanceFunding/schema.d.ts.map +1 -0
- package/dist/component/balanceFunding/schema.js +124 -0
- package/dist/component/balanceFunding/schema.js.map +1 -0
- package/dist/component/balanceFunding/stateHandlers.d.ts +58 -0
- package/dist/component/balanceFunding/stateHandlers.d.ts.map +1 -0
- package/dist/component/balanceFunding/stateHandlers.js +160 -0
- package/dist/component/balanceFunding/stateHandlers.js.map +1 -0
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +2 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/costRecovery/completion.d.ts +1 -0
- package/dist/component/costRecovery/completion.d.ts.map +1 -1
- package/dist/component/costRecovery/helpers.d.ts +1 -0
- package/dist/component/costRecovery/helpers.d.ts.map +1 -1
- package/dist/component/costRecovery/mutations.d.ts +5 -0
- package/dist/component/costRecovery/mutations.d.ts.map +1 -1
- package/dist/component/costRecovery/preparation.d.ts +50 -0
- package/dist/component/costRecovery/preparation.d.ts.map +1 -0
- package/dist/component/costRecovery/preparation.js +108 -0
- package/dist/component/costRecovery/preparation.js.map +1 -0
- package/dist/component/costRecovery/queries.d.ts +1 -0
- package/dist/component/costRecovery/queries.d.ts.map +1 -1
- package/dist/component/costRecovery/reservations.d.ts +2 -0
- package/dist/component/costRecovery/reservations.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.d.ts +7 -2
- package/dist/component/costRecovery/schema.d.ts.map +1 -1
- package/dist/component/costRecovery/schema.js +1 -0
- package/dist/component/costRecovery/schema.js.map +1 -1
- package/dist/component/durableExecution/runtime.d.ts +3 -0
- package/dist/component/durableExecution/runtime.d.ts.map +1 -0
- package/dist/component/durableExecution/runtime.js +12 -0
- package/dist/component/durableExecution/runtime.js.map +1 -0
- package/dist/component/earnings/triggers.d.ts +242 -2
- package/dist/component/earnings/triggers.d.ts.map +1 -1
- package/dist/component/schema.d.ts +253 -1
- package/dist/component/schema.js +4 -0
- package/dist/component/schema.js.map +1 -1
- package/package.json +4 -2
- package/src/client/costRecovery.test.ts +34 -0
- package/src/client/costRecovery.ts +21 -0
- package/src/client/index.ts +1 -0
- package/src/client/processingCostDeficit/README.md +35 -0
- package/src/client/processingCostDeficit/calculator.test.ts +176 -0
- package/src/client/processingCostDeficit/index.ts +91 -0
- package/src/component/_generated/api.ts +23 -1
- package/src/component/_generated/component.ts +693 -0
- package/src/component/balanceFunding/failure.test.ts +116 -0
- package/src/component/balanceFunding/helpers.ts +102 -0
- package/src/component/balanceFunding/import.test.ts +221 -0
- package/src/component/balanceFunding/importHandler.ts +146 -0
- package/src/component/balanceFunding/lifecycleHandlers.ts +90 -0
- package/src/component/balanceFunding/lookup.test.ts +113 -0
- package/src/component/balanceFunding/mutationValidators.ts +63 -0
- package/src/component/balanceFunding/mutations.ts +136 -0
- package/src/component/balanceFunding/preparation.test.ts +146 -0
- package/src/component/balanceFunding/preparationHandlers.ts +204 -0
- package/src/component/balanceFunding/queries.ts +221 -0
- package/src/component/balanceFunding/requestLookup.test.ts +160 -0
- package/src/component/balanceFunding/schema.ts +169 -0
- package/src/component/balanceFunding/state.test.ts +352 -0
- package/src/component/balanceFunding/stateHandlers.ts +198 -0
- package/src/component/balanceFunding/validation.test.ts +100 -0
- package/src/component/convex.config.ts +2 -0
- package/src/component/costRecovery/preparation.test.ts +355 -0
- package/src/component/costRecovery/preparation.ts +124 -0
- package/src/component/costRecovery/schema.ts +1 -0
- package/src/component/durableExecution/composition.test.ts +568 -0
- package/src/component/durableExecution/runtime.ts +12 -0
- package/src/component/schema.ts +8 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
export declare const savePreparationArgs: import("convex/values").VObject<{
|
|
2
|
+
accountId: string;
|
|
3
|
+
consentAt: number;
|
|
4
|
+
consentReference: string;
|
|
5
|
+
preparation: {
|
|
6
|
+
customerAccount: string;
|
|
7
|
+
paymentMethodId: string;
|
|
8
|
+
previousPaymentMethodId: string | null;
|
|
9
|
+
previousPaymentMethodTypes: string[] | null;
|
|
10
|
+
stripeSubscriptionId: string;
|
|
11
|
+
};
|
|
12
|
+
providerApiVersion: string;
|
|
13
|
+
scopeKey: string;
|
|
14
|
+
}, {
|
|
15
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
16
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
17
|
+
preparation: import("convex/values").VObject<{
|
|
18
|
+
customerAccount: string;
|
|
19
|
+
paymentMethodId: string;
|
|
20
|
+
previousPaymentMethodId: string | null;
|
|
21
|
+
previousPaymentMethodTypes: string[] | null;
|
|
22
|
+
stripeSubscriptionId: string;
|
|
23
|
+
}, {
|
|
24
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
25
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
26
|
+
previousPaymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
27
|
+
previousPaymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
28
|
+
paymentMethodId: import("convex/values").VString<string, "required">;
|
|
29
|
+
}, "required", "customerAccount" | "paymentMethodId" | "previousPaymentMethodId" | "previousPaymentMethodTypes" | "stripeSubscriptionId">;
|
|
30
|
+
consentAt: import("convex/values").VFloat64<number, "required">;
|
|
31
|
+
consentReference: import("convex/values").VString<string, "required">;
|
|
32
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
33
|
+
}, "required", "accountId" | "consentAt" | "consentReference" | "preparation" | "preparation.customerAccount" | "preparation.paymentMethodId" | "preparation.previousPaymentMethodId" | "preparation.previousPaymentMethodTypes" | "preparation.stripeSubscriptionId" | "providerApiVersion" | "scopeKey">;
|
|
34
|
+
export declare const beginArgs: import("convex/values").VObject<{
|
|
35
|
+
accountId: string;
|
|
36
|
+
consent?: true | undefined;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
39
|
+
requestKey: string;
|
|
40
|
+
scopeKey: string;
|
|
41
|
+
}, {
|
|
42
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
43
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
44
|
+
preparationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingPreparations">, "required">;
|
|
45
|
+
enabled: import("convex/values").VBoolean<boolean, "required">;
|
|
46
|
+
consent: import("convex/values").VLiteral<true | undefined, "optional">;
|
|
47
|
+
requestKey: import("convex/values").VString<string, "required">;
|
|
48
|
+
}, "required", "accountId" | "consent" | "enabled" | "preparationId" | "requestKey" | "scopeKey">;
|
|
49
|
+
export declare const finishArgs: import("convex/values").VObject<{
|
|
50
|
+
accountId: string;
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
53
|
+
receipt: {
|
|
54
|
+
customerAccount: string;
|
|
55
|
+
paymentMethodId: string | null;
|
|
56
|
+
paymentMethodTypes: string[] | null;
|
|
57
|
+
providerApiVersion: string;
|
|
58
|
+
stripeSubscriptionId: string;
|
|
59
|
+
};
|
|
60
|
+
scopeKey: string;
|
|
61
|
+
version: number;
|
|
62
|
+
}, {
|
|
63
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
64
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
65
|
+
operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
|
|
66
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
67
|
+
enabled: import("convex/values").VBoolean<boolean, "required">;
|
|
68
|
+
receipt: import("convex/values").VObject<{
|
|
69
|
+
customerAccount: string;
|
|
70
|
+
paymentMethodId: string | null;
|
|
71
|
+
paymentMethodTypes: string[] | null;
|
|
72
|
+
providerApiVersion: string;
|
|
73
|
+
stripeSubscriptionId: string;
|
|
74
|
+
}, {
|
|
75
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
76
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
77
|
+
paymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
78
|
+
paymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
79
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
80
|
+
}, "required", "customerAccount" | "paymentMethodId" | "paymentMethodTypes" | "providerApiVersion" | "stripeSubscriptionId">;
|
|
81
|
+
}, "required", "accountId" | "enabled" | "operationId" | "receipt" | "receipt.customerAccount" | "receipt.paymentMethodId" | "receipt.paymentMethodTypes" | "receipt.providerApiVersion" | "receipt.stripeSubscriptionId" | "scopeKey" | "version">;
|
|
82
|
+
export declare const startArgs: import("convex/values").VObject<{
|
|
83
|
+
accountId: string;
|
|
84
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
85
|
+
scopeKey: string;
|
|
86
|
+
version: number;
|
|
87
|
+
}, {
|
|
88
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
89
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
90
|
+
operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
|
|
91
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
92
|
+
}, "required", "accountId" | "operationId" | "scopeKey" | "version">;
|
|
93
|
+
export declare const requestCancelArgs: import("convex/values").VObject<{
|
|
94
|
+
accountId: string;
|
|
95
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
96
|
+
scopeKey: string;
|
|
97
|
+
version: number;
|
|
98
|
+
}, {
|
|
99
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
100
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
101
|
+
operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
|
|
102
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
103
|
+
}, "required", "accountId" | "operationId" | "scopeKey" | "version">;
|
|
104
|
+
export declare const markUnknownArgs: import("convex/values").VObject<{
|
|
105
|
+
accountId: string;
|
|
106
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
107
|
+
scopeKey: string;
|
|
108
|
+
version: number;
|
|
109
|
+
}, {
|
|
110
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
111
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
112
|
+
operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
|
|
113
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
114
|
+
}, "required", "accountId" | "operationId" | "scopeKey" | "version">;
|
|
115
|
+
export declare const importPreparationArgs: import("convex/values").VObject<{
|
|
116
|
+
accountId: string;
|
|
117
|
+
consentAt: number;
|
|
118
|
+
consentReference: string;
|
|
119
|
+
enabled: boolean;
|
|
120
|
+
operationVersion: number;
|
|
121
|
+
pending?: {
|
|
122
|
+
enabled: boolean;
|
|
123
|
+
kind?: "apply" | "prepare" | undefined;
|
|
124
|
+
providerKey: string;
|
|
125
|
+
requestKey: string;
|
|
126
|
+
} | undefined;
|
|
127
|
+
preparation: {
|
|
128
|
+
customerAccount: string;
|
|
129
|
+
paymentMethodId?: string | undefined;
|
|
130
|
+
previousPaymentMethodId: string | null;
|
|
131
|
+
previousPaymentMethodTypes: string[] | null;
|
|
132
|
+
stripeSubscriptionId: string;
|
|
133
|
+
};
|
|
134
|
+
providerApiVersion: string;
|
|
135
|
+
scopeKey: string;
|
|
136
|
+
sourceKey: string;
|
|
137
|
+
}, {
|
|
138
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
139
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
140
|
+
sourceKey: import("convex/values").VString<string, "required">;
|
|
141
|
+
preparation: import("convex/values").VObject<{
|
|
142
|
+
customerAccount: string;
|
|
143
|
+
paymentMethodId?: string | undefined;
|
|
144
|
+
previousPaymentMethodId: string | null;
|
|
145
|
+
previousPaymentMethodTypes: string[] | null;
|
|
146
|
+
stripeSubscriptionId: string;
|
|
147
|
+
}, {
|
|
148
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
149
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
150
|
+
previousPaymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
151
|
+
previousPaymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
152
|
+
paymentMethodId: import("convex/values").VString<string | undefined, "optional">;
|
|
153
|
+
}, "required", "customerAccount" | "paymentMethodId" | "previousPaymentMethodId" | "previousPaymentMethodTypes" | "stripeSubscriptionId">;
|
|
154
|
+
consentAt: import("convex/values").VFloat64<number, "required">;
|
|
155
|
+
consentReference: import("convex/values").VString<string, "required">;
|
|
156
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
157
|
+
enabled: import("convex/values").VBoolean<boolean, "required">;
|
|
158
|
+
operationVersion: import("convex/values").VFloat64<number, "required">;
|
|
159
|
+
pending: import("convex/values").VObject<{
|
|
160
|
+
enabled: boolean;
|
|
161
|
+
kind?: "apply" | "prepare" | undefined;
|
|
162
|
+
providerKey: string;
|
|
163
|
+
requestKey: string;
|
|
164
|
+
} | undefined, {
|
|
165
|
+
enabled: import("convex/values").VBoolean<boolean, "required">;
|
|
166
|
+
kind: import("convex/values").VUnion<"apply" | "prepare" | undefined, [import("convex/values").VLiteral<"prepare", "required">, import("convex/values").VLiteral<"apply", "required">], "optional", never>;
|
|
167
|
+
providerKey: import("convex/values").VString<string, "required">;
|
|
168
|
+
requestKey: import("convex/values").VString<string, "required">;
|
|
169
|
+
}, "optional", "enabled" | "kind" | "providerKey" | "requestKey">;
|
|
170
|
+
}, "required", "accountId" | "consentAt" | "consentReference" | "enabled" | "operationVersion" | "pending" | "pending.enabled" | "pending.kind" | "pending.providerKey" | "pending.requestKey" | "preparation" | "preparation.customerAccount" | "preparation.paymentMethodId" | "preparation.previousPaymentMethodId" | "preparation.previousPaymentMethodTypes" | "preparation.stripeSubscriptionId" | "providerApiVersion" | "scopeKey" | "sourceKey">;
|
|
171
|
+
export declare const prepareArgs: import("convex/values").VObject<{
|
|
172
|
+
accountId: string;
|
|
173
|
+
consent: true;
|
|
174
|
+
consentAt: number;
|
|
175
|
+
consentReference: string;
|
|
176
|
+
preparation: {
|
|
177
|
+
customerAccount: string;
|
|
178
|
+
previousPaymentMethodId: string | null;
|
|
179
|
+
previousPaymentMethodTypes: string[] | null;
|
|
180
|
+
stripeSubscriptionId: string;
|
|
181
|
+
};
|
|
182
|
+
providerApiVersion: string;
|
|
183
|
+
requestKey: string;
|
|
184
|
+
scopeKey: string;
|
|
185
|
+
}, {
|
|
186
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
187
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
188
|
+
preparation: import("convex/values").VObject<{
|
|
189
|
+
customerAccount: string;
|
|
190
|
+
previousPaymentMethodId: string | null;
|
|
191
|
+
previousPaymentMethodTypes: string[] | null;
|
|
192
|
+
stripeSubscriptionId: string;
|
|
193
|
+
}, {
|
|
194
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
195
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
196
|
+
previousPaymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
197
|
+
previousPaymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
198
|
+
}, "required", "customerAccount" | "previousPaymentMethodId" | "previousPaymentMethodTypes" | "stripeSubscriptionId">;
|
|
199
|
+
consent: import("convex/values").VLiteral<true, "required">;
|
|
200
|
+
consentAt: import("convex/values").VFloat64<number, "required">;
|
|
201
|
+
consentReference: import("convex/values").VString<string, "required">;
|
|
202
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
203
|
+
requestKey: import("convex/values").VString<string, "required">;
|
|
204
|
+
}, "required", "accountId" | "consent" | "consentAt" | "consentReference" | "preparation" | "preparation.customerAccount" | "preparation.previousPaymentMethodId" | "preparation.previousPaymentMethodTypes" | "preparation.stripeSubscriptionId" | "providerApiVersion" | "requestKey" | "scopeKey">;
|
|
205
|
+
export declare const finishPreparationArgs: import("convex/values").VObject<{
|
|
206
|
+
accountId: string;
|
|
207
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
208
|
+
preparation: {
|
|
209
|
+
customerAccount: string;
|
|
210
|
+
paymentMethodId: string;
|
|
211
|
+
previousPaymentMethodId: string | null;
|
|
212
|
+
previousPaymentMethodTypes: string[] | null;
|
|
213
|
+
stripeSubscriptionId: string;
|
|
214
|
+
};
|
|
215
|
+
providerApiVersion: string;
|
|
216
|
+
scopeKey: string;
|
|
217
|
+
version: number;
|
|
218
|
+
}, {
|
|
219
|
+
accountId: import("convex/values").VString<string, "required">;
|
|
220
|
+
scopeKey: import("convex/values").VString<string, "required">;
|
|
221
|
+
operationId: import("convex/values").VId<import("convex/values").GenericId<"balanceFundingOperations">, "required">;
|
|
222
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
223
|
+
preparation: import("convex/values").VObject<{
|
|
224
|
+
customerAccount: string;
|
|
225
|
+
paymentMethodId: string;
|
|
226
|
+
previousPaymentMethodId: string | null;
|
|
227
|
+
previousPaymentMethodTypes: string[] | null;
|
|
228
|
+
stripeSubscriptionId: string;
|
|
229
|
+
}, {
|
|
230
|
+
customerAccount: import("convex/values").VString<string, "required">;
|
|
231
|
+
stripeSubscriptionId: import("convex/values").VString<string, "required">;
|
|
232
|
+
previousPaymentMethodId: import("convex/values").VUnion<string | null, [import("convex/values").VString<string, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
233
|
+
previousPaymentMethodTypes: import("convex/values").VUnion<string[] | null, [import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">, import("convex/values").VNull<null, "required">], "required", never>;
|
|
234
|
+
paymentMethodId: import("convex/values").VString<string, "required">;
|
|
235
|
+
}, "required", "customerAccount" | "paymentMethodId" | "previousPaymentMethodId" | "previousPaymentMethodTypes" | "stripeSubscriptionId">;
|
|
236
|
+
providerApiVersion: import("convex/values").VString<string, "required">;
|
|
237
|
+
}, "required", "accountId" | "operationId" | "preparation" | "preparation.customerAccount" | "preparation.paymentMethodId" | "preparation.previousPaymentMethodId" | "preparation.previousPaymentMethodTypes" | "preparation.stripeSubscriptionId" | "providerApiVersion" | "scopeKey" | "version">;
|
|
238
|
+
//# sourceMappingURL=mutationValidators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutationValidators.d.ts","sourceRoot":"","sources":["../../../src/component/balanceFunding/mutationValidators.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0SAM9B,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;iGAMpB,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mPAIrB,CAAC;AACH,eAAO,MAAM,SAAS;;;;;;;;;;oEAA+B,CAAC;AACtD,eAAO,MAAM,iBAAiB;;;;;;;;;;oEAA+B,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;oEAA+B,CAAC;AAC5D,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ybAiBhC,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qSAQtB,CAAC;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mSAIhC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { v } from "convex/values";
|
|
2
|
+
import { scopeFields, preparationValue, operationRefFields, originalValue, capturedValue, receiptValue, } from "./schema.js";
|
|
3
|
+
export const savePreparationArgs = v.object({
|
|
4
|
+
...scopeFields,
|
|
5
|
+
preparation: preparationValue,
|
|
6
|
+
consentAt: v.number(),
|
|
7
|
+
consentReference: v.string(),
|
|
8
|
+
providerApiVersion: v.string(),
|
|
9
|
+
});
|
|
10
|
+
export const beginArgs = v.object({
|
|
11
|
+
...scopeFields,
|
|
12
|
+
preparationId: v.id("balanceFundingPreparations"),
|
|
13
|
+
enabled: v.boolean(),
|
|
14
|
+
consent: v.optional(v.literal(true)),
|
|
15
|
+
requestKey: v.string(),
|
|
16
|
+
});
|
|
17
|
+
export const finishArgs = v.object({
|
|
18
|
+
...operationRefFields,
|
|
19
|
+
enabled: v.boolean(),
|
|
20
|
+
receipt: receiptValue,
|
|
21
|
+
});
|
|
22
|
+
export const startArgs = v.object(operationRefFields);
|
|
23
|
+
export const requestCancelArgs = v.object(operationRefFields);
|
|
24
|
+
export const markUnknownArgs = v.object(operationRefFields);
|
|
25
|
+
export const importPreparationArgs = v.object({
|
|
26
|
+
...scopeFields,
|
|
27
|
+
sourceKey: v.string(),
|
|
28
|
+
preparation: capturedValue,
|
|
29
|
+
consentAt: v.number(),
|
|
30
|
+
consentReference: v.string(),
|
|
31
|
+
providerApiVersion: v.string(),
|
|
32
|
+
enabled: v.boolean(),
|
|
33
|
+
operationVersion: v.number(),
|
|
34
|
+
pending: v.optional(v.object({
|
|
35
|
+
enabled: v.boolean(),
|
|
36
|
+
kind: v.optional(v.union(v.literal("prepare"), v.literal("apply"))),
|
|
37
|
+
providerKey: v.string(),
|
|
38
|
+
requestKey: v.string(),
|
|
39
|
+
})),
|
|
40
|
+
});
|
|
41
|
+
export const prepareArgs = v.object({
|
|
42
|
+
...scopeFields,
|
|
43
|
+
preparation: originalValue,
|
|
44
|
+
consent: v.literal(true),
|
|
45
|
+
consentAt: v.number(),
|
|
46
|
+
consentReference: v.string(),
|
|
47
|
+
providerApiVersion: v.string(),
|
|
48
|
+
requestKey: v.string(),
|
|
49
|
+
});
|
|
50
|
+
export const finishPreparationArgs = v.object({
|
|
51
|
+
...operationRefFields,
|
|
52
|
+
preparation: preparationValue,
|
|
53
|
+
providerApiVersion: v.string(),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=mutationValidators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutationValidators.js","sourceRoot":"","sources":["../../../src/component/balanceFunding/mutationValidators.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
export declare const savePreparation: import("convex/server").RegisteredMutation<"public", {
|
|
2
|
+
accountId: string;
|
|
3
|
+
consentAt: number;
|
|
4
|
+
consentReference: string;
|
|
5
|
+
preparation: {
|
|
6
|
+
customerAccount: string;
|
|
7
|
+
paymentMethodId: string;
|
|
8
|
+
previousPaymentMethodId: string | null;
|
|
9
|
+
previousPaymentMethodTypes: string[] | null;
|
|
10
|
+
stripeSubscriptionId: string;
|
|
11
|
+
};
|
|
12
|
+
providerApiVersion: string;
|
|
13
|
+
scopeKey: string;
|
|
14
|
+
}, Promise<{
|
|
15
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
16
|
+
}>>;
|
|
17
|
+
export declare const begin: import("convex/server").RegisteredMutation<"public", {
|
|
18
|
+
accountId: string;
|
|
19
|
+
consent?: true | undefined;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
22
|
+
requestKey: string;
|
|
23
|
+
scopeKey: string;
|
|
24
|
+
}, Promise<{
|
|
25
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
26
|
+
retryable: false;
|
|
27
|
+
status: "conflict";
|
|
28
|
+
} | {
|
|
29
|
+
reason: "policy_invalid";
|
|
30
|
+
retryable: false;
|
|
31
|
+
status: "rejected";
|
|
32
|
+
} | {
|
|
33
|
+
operation: {
|
|
34
|
+
accountId: string;
|
|
35
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
36
|
+
scopeKey: string;
|
|
37
|
+
version: number;
|
|
38
|
+
};
|
|
39
|
+
status: "accepted";
|
|
40
|
+
} | {
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
status: "unchanged";
|
|
43
|
+
} | {
|
|
44
|
+
reason: "provider_pending";
|
|
45
|
+
retryable: true;
|
|
46
|
+
status: "not_ready";
|
|
47
|
+
}>>;
|
|
48
|
+
export declare const finish: import("convex/server").RegisteredMutation<"public", {
|
|
49
|
+
accountId: string;
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
52
|
+
receipt: {
|
|
53
|
+
customerAccount: string;
|
|
54
|
+
paymentMethodId: string | null;
|
|
55
|
+
paymentMethodTypes: string[] | null;
|
|
56
|
+
providerApiVersion: string;
|
|
57
|
+
stripeSubscriptionId: string;
|
|
58
|
+
};
|
|
59
|
+
scopeKey: string;
|
|
60
|
+
version: number;
|
|
61
|
+
}, Promise<{
|
|
62
|
+
_creationTime: number;
|
|
63
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
64
|
+
accountId: string;
|
|
65
|
+
cancelRequested: boolean;
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
68
|
+
kind: "apply" | "prepare";
|
|
69
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
70
|
+
providerKey: string;
|
|
71
|
+
providerKeys: {
|
|
72
|
+
attach?: string | undefined;
|
|
73
|
+
create?: string | undefined;
|
|
74
|
+
disable: string;
|
|
75
|
+
enable: string;
|
|
76
|
+
};
|
|
77
|
+
receipt?: {
|
|
78
|
+
customerAccount: string;
|
|
79
|
+
paymentMethodId: string | null;
|
|
80
|
+
paymentMethodTypes: string[] | null;
|
|
81
|
+
providerApiVersion: string;
|
|
82
|
+
stripeSubscriptionId: string;
|
|
83
|
+
} | undefined;
|
|
84
|
+
scopeKey: string;
|
|
85
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
86
|
+
version: number;
|
|
87
|
+
}>>;
|
|
88
|
+
export declare const start: import("convex/server").RegisteredMutation<"public", {
|
|
89
|
+
accountId: string;
|
|
90
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
91
|
+
scopeKey: string;
|
|
92
|
+
version: number;
|
|
93
|
+
}, Promise<{
|
|
94
|
+
_creationTime: number;
|
|
95
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
96
|
+
accountId: string;
|
|
97
|
+
cancelRequested: boolean;
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
100
|
+
kind: "apply" | "prepare";
|
|
101
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
102
|
+
providerKey: string;
|
|
103
|
+
providerKeys: {
|
|
104
|
+
attach?: string | undefined;
|
|
105
|
+
create?: string | undefined;
|
|
106
|
+
disable: string;
|
|
107
|
+
enable: string;
|
|
108
|
+
};
|
|
109
|
+
receipt?: {
|
|
110
|
+
customerAccount: string;
|
|
111
|
+
paymentMethodId: string | null;
|
|
112
|
+
paymentMethodTypes: string[] | null;
|
|
113
|
+
providerApiVersion: string;
|
|
114
|
+
stripeSubscriptionId: string;
|
|
115
|
+
} | undefined;
|
|
116
|
+
scopeKey: string;
|
|
117
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
118
|
+
version: number;
|
|
119
|
+
}>>;
|
|
120
|
+
export declare const requestCancel: import("convex/server").RegisteredMutation<"public", {
|
|
121
|
+
accountId: string;
|
|
122
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
123
|
+
scopeKey: string;
|
|
124
|
+
version: number;
|
|
125
|
+
}, Promise<{
|
|
126
|
+
_creationTime: number;
|
|
127
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
128
|
+
accountId: string;
|
|
129
|
+
cancelRequested: boolean;
|
|
130
|
+
enabled: boolean;
|
|
131
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
132
|
+
kind: "apply" | "prepare";
|
|
133
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
134
|
+
providerKey: string;
|
|
135
|
+
providerKeys: {
|
|
136
|
+
attach?: string | undefined;
|
|
137
|
+
create?: string | undefined;
|
|
138
|
+
disable: string;
|
|
139
|
+
enable: string;
|
|
140
|
+
};
|
|
141
|
+
receipt?: {
|
|
142
|
+
customerAccount: string;
|
|
143
|
+
paymentMethodId: string | null;
|
|
144
|
+
paymentMethodTypes: string[] | null;
|
|
145
|
+
providerApiVersion: string;
|
|
146
|
+
stripeSubscriptionId: string;
|
|
147
|
+
} | undefined;
|
|
148
|
+
scopeKey: string;
|
|
149
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
150
|
+
version: number;
|
|
151
|
+
}>>;
|
|
152
|
+
export declare const markUnknown: import("convex/server").RegisteredMutation<"public", {
|
|
153
|
+
accountId: string;
|
|
154
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
155
|
+
scopeKey: string;
|
|
156
|
+
version: number;
|
|
157
|
+
}, Promise<{
|
|
158
|
+
_creationTime: number;
|
|
159
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
160
|
+
accountId: string;
|
|
161
|
+
cancelRequested: boolean;
|
|
162
|
+
enabled: boolean;
|
|
163
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
164
|
+
kind: "apply" | "prepare";
|
|
165
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
166
|
+
providerKey: string;
|
|
167
|
+
providerKeys: {
|
|
168
|
+
attach?: string | undefined;
|
|
169
|
+
create?: string | undefined;
|
|
170
|
+
disable: string;
|
|
171
|
+
enable: string;
|
|
172
|
+
};
|
|
173
|
+
receipt?: {
|
|
174
|
+
customerAccount: string;
|
|
175
|
+
paymentMethodId: string | null;
|
|
176
|
+
paymentMethodTypes: string[] | null;
|
|
177
|
+
providerApiVersion: string;
|
|
178
|
+
stripeSubscriptionId: string;
|
|
179
|
+
} | undefined;
|
|
180
|
+
scopeKey: string;
|
|
181
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
182
|
+
version: number;
|
|
183
|
+
}>>;
|
|
184
|
+
export declare const importPreparation: import("convex/server").RegisteredMutation<"public", {
|
|
185
|
+
accountId: string;
|
|
186
|
+
consentAt: number;
|
|
187
|
+
consentReference: string;
|
|
188
|
+
enabled: boolean;
|
|
189
|
+
operationVersion: number;
|
|
190
|
+
pending?: {
|
|
191
|
+
enabled: boolean;
|
|
192
|
+
kind?: "apply" | "prepare" | undefined;
|
|
193
|
+
providerKey: string;
|
|
194
|
+
requestKey: string;
|
|
195
|
+
} | undefined;
|
|
196
|
+
preparation: {
|
|
197
|
+
customerAccount: string;
|
|
198
|
+
paymentMethodId?: string | undefined;
|
|
199
|
+
previousPaymentMethodId: string | null;
|
|
200
|
+
previousPaymentMethodTypes: string[] | null;
|
|
201
|
+
stripeSubscriptionId: string;
|
|
202
|
+
};
|
|
203
|
+
providerApiVersion: string;
|
|
204
|
+
scopeKey: string;
|
|
205
|
+
sourceKey: string;
|
|
206
|
+
}, Promise<{
|
|
207
|
+
operation?: {
|
|
208
|
+
accountId: string;
|
|
209
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
210
|
+
scopeKey: string;
|
|
211
|
+
version: number;
|
|
212
|
+
} | undefined;
|
|
213
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
214
|
+
}>>;
|
|
215
|
+
export declare const prepare: import("convex/server").RegisteredMutation<"public", {
|
|
216
|
+
accountId: string;
|
|
217
|
+
consent: true;
|
|
218
|
+
consentAt: number;
|
|
219
|
+
consentReference: string;
|
|
220
|
+
preparation: {
|
|
221
|
+
customerAccount: string;
|
|
222
|
+
previousPaymentMethodId: string | null;
|
|
223
|
+
previousPaymentMethodTypes: string[] | null;
|
|
224
|
+
stripeSubscriptionId: string;
|
|
225
|
+
};
|
|
226
|
+
providerApiVersion: string;
|
|
227
|
+
requestKey: string;
|
|
228
|
+
scopeKey: string;
|
|
229
|
+
}, Promise<{
|
|
230
|
+
reason: "identity_changed" | "revision_changed" | "scope_busy";
|
|
231
|
+
retryable: false;
|
|
232
|
+
status: "conflict";
|
|
233
|
+
} | {
|
|
234
|
+
reason: "policy_invalid";
|
|
235
|
+
retryable: false;
|
|
236
|
+
status: "rejected";
|
|
237
|
+
} | {
|
|
238
|
+
operation: {
|
|
239
|
+
accountId: string;
|
|
240
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
241
|
+
scopeKey: string;
|
|
242
|
+
version: number;
|
|
243
|
+
};
|
|
244
|
+
status: "accepted";
|
|
245
|
+
} | {
|
|
246
|
+
enabled: boolean;
|
|
247
|
+
status: "unchanged";
|
|
248
|
+
} | {
|
|
249
|
+
reason: "provider_pending";
|
|
250
|
+
retryable: true;
|
|
251
|
+
status: "not_ready";
|
|
252
|
+
}>>;
|
|
253
|
+
export declare const finishPreparation: import("convex/server").RegisteredMutation<"public", {
|
|
254
|
+
accountId: string;
|
|
255
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
256
|
+
preparation: {
|
|
257
|
+
customerAccount: string;
|
|
258
|
+
paymentMethodId: string;
|
|
259
|
+
previousPaymentMethodId: string | null;
|
|
260
|
+
previousPaymentMethodTypes: string[] | null;
|
|
261
|
+
stripeSubscriptionId: string;
|
|
262
|
+
};
|
|
263
|
+
providerApiVersion: string;
|
|
264
|
+
scopeKey: string;
|
|
265
|
+
version: number;
|
|
266
|
+
}, Promise<{
|
|
267
|
+
_creationTime: number;
|
|
268
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
269
|
+
accountId: string;
|
|
270
|
+
cancelRequested: boolean;
|
|
271
|
+
enabled: boolean;
|
|
272
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
273
|
+
kind: "apply" | "prepare";
|
|
274
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
275
|
+
providerKey: string;
|
|
276
|
+
providerKeys: {
|
|
277
|
+
attach?: string | undefined;
|
|
278
|
+
create?: string | undefined;
|
|
279
|
+
disable: string;
|
|
280
|
+
enable: string;
|
|
281
|
+
};
|
|
282
|
+
receipt?: {
|
|
283
|
+
customerAccount: string;
|
|
284
|
+
paymentMethodId: string | null;
|
|
285
|
+
paymentMethodTypes: string[] | null;
|
|
286
|
+
providerApiVersion: string;
|
|
287
|
+
stripeSubscriptionId: string;
|
|
288
|
+
} | undefined;
|
|
289
|
+
scopeKey: string;
|
|
290
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
291
|
+
version: number;
|
|
292
|
+
}>>;
|
|
293
|
+
/** Migration control: pause new starts while keeping receipt finish/reconciliation available. */
|
|
294
|
+
export declare const setStartsPaused: import("convex/server").RegisteredMutation<"public", {
|
|
295
|
+
accountId: string;
|
|
296
|
+
paused: boolean;
|
|
297
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
298
|
+
scopeKey: string;
|
|
299
|
+
stripeSubscriptionId: string;
|
|
300
|
+
}, Promise<null>>;
|
|
301
|
+
/** Only a pending intent can prove that no provider execution has started. */
|
|
302
|
+
export declare const failBeforeStart: import("convex/server").RegisteredMutation<"public", {
|
|
303
|
+
accountId: string;
|
|
304
|
+
failureCode: "invalid_scope" | "policy_invalid" | "unsupported_source";
|
|
305
|
+
operationId: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
306
|
+
scopeKey: string;
|
|
307
|
+
version: number;
|
|
308
|
+
}, Promise<{
|
|
309
|
+
_creationTime: number;
|
|
310
|
+
_id: import("convex/values").GenericId<"balanceFundingOperations">;
|
|
311
|
+
accountId: string;
|
|
312
|
+
cancelRequested: boolean;
|
|
313
|
+
enabled: boolean;
|
|
314
|
+
failureCode?: "invalid_scope" | "policy_invalid" | "unsupported_source" | undefined;
|
|
315
|
+
kind: "apply" | "prepare";
|
|
316
|
+
preparationId: import("convex/values").GenericId<"balanceFundingPreparations">;
|
|
317
|
+
providerKey: string;
|
|
318
|
+
providerKeys: {
|
|
319
|
+
attach?: string | undefined;
|
|
320
|
+
create?: string | undefined;
|
|
321
|
+
disable: string;
|
|
322
|
+
enable: string;
|
|
323
|
+
};
|
|
324
|
+
receipt?: {
|
|
325
|
+
customerAccount: string;
|
|
326
|
+
paymentMethodId: string | null;
|
|
327
|
+
paymentMethodTypes: string[] | null;
|
|
328
|
+
providerApiVersion: string;
|
|
329
|
+
stripeSubscriptionId: string;
|
|
330
|
+
} | undefined;
|
|
331
|
+
scopeKey: string;
|
|
332
|
+
state: "canceled" | "failed" | "pending" | "running" | "succeeded" | "unknown";
|
|
333
|
+
version: number;
|
|
334
|
+
}>>;
|
|
335
|
+
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/component/balanceFunding/mutations.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;GAI1B,CAAC;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIhB,CAAC;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIjB,CAAC;AAMH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIhB,CAAC;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIxB,CAAC;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAItB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI5B,CAAC;AAKH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIlB,CAAC;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI5B,CAAC;AAaH,iGAAiG;AACjG,eAAO,MAAM,eAAe;;;;;;iBAoB1B,CAAC;AAEH,8EAA8E;AAC9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiC1B,CAAC"}
|