@raideno/convex-stripe 0.1.1 → 0.1.2
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/dist/index.d.ts +0 -2
- package/dist/index.js +1 -0
- package/dist/server/actions/index.d.ts +4 -0
- package/dist/server/actions/pay.d.ts +579 -0
- package/dist/server/actions/portal.d.ts +26 -0
- package/dist/server/actions/setup.d.ts +19 -0
- package/dist/server/actions/subscribe.d.ts +44 -0
- package/dist/server/helpers.d.ts +28 -0
- package/dist/server/index.d.ts +589 -0
- package/dist/server/logger.d.ts +8 -0
- package/dist/server/redirects/index.d.ts +47 -0
- package/dist/server/redirects/pay.d.ts +5 -0
- package/dist/server/redirects/portal.d.ts +3 -0
- package/dist/server/redirects/subscribe.d.ts +3 -0
- package/dist/server/redirects/types.d.ts +9 -0
- package/dist/server/schema/checkout-session.d.ts +256 -0
- package/dist/server/schema/coupon.d.ts +112 -0
- package/dist/server/schema/customer.d.ts +366 -0
- package/dist/server/schema/index.d.ts +3511 -0
- package/dist/server/schema/invoice.d.ts +314 -0
- package/dist/server/schema/payment-intent.d.ts +311 -0
- package/dist/server/schema/payout.d.ts +140 -0
- package/dist/server/schema/price.d.ts +148 -0
- package/dist/server/schema/product.d.ts +132 -0
- package/dist/server/schema/promotion-code.d.ts +266 -0
- package/dist/server/schema/refund.d.ts +92 -0
- package/dist/server/schema/review.d.ts +152 -0
- package/dist/server/schema/subscription.d.ts +4 -0
- package/dist/server/store/index.d.ts +582 -0
- package/dist/server/store/operations/delete-by-id.d.ts +3 -0
- package/dist/server/store/operations/index.d.ts +5 -0
- package/dist/server/store/operations/select-all.d.ts +3 -0
- package/dist/server/store/operations/select-by-id.d.ts +4 -0
- package/dist/server/store/operations/select-one.d.ts +3 -0
- package/dist/server/store/operations/upsert.d.ts +4 -0
- package/dist/server/store/types.d.ts +70 -0
- package/dist/server/sync/all.d.ts +5 -0
- package/dist/server/sync/checkouts-session.handler.d.ts +5 -0
- package/dist/server/sync/coupons.handler.d.ts +5 -0
- package/dist/server/sync/customers.handler.d.ts +5 -0
- package/dist/server/sync/invoices.handler.d.ts +5 -0
- package/dist/server/sync/payment-intent.handler.d.ts +5 -0
- package/dist/server/sync/payouts.handler.d.ts +5 -0
- package/dist/server/sync/prices.handler.d.ts +5 -0
- package/dist/server/sync/products.handler.d.ts +5 -0
- package/dist/server/sync/promotion-codes.handler.d.ts +5 -0
- package/dist/server/sync/refunds.handler.d.ts +5 -0
- package/dist/server/sync/reviews.handler.d.ts +5 -0
- package/dist/server/sync/subscription.d.ts +12 -0
- package/dist/server/sync/subscriptions.handler.d.ts +5 -0
- package/dist/server/types.d.ts +29 -0
- package/dist/server/webhooks/checkouts-session.handler.d.ts +2 -0
- package/dist/server/webhooks/coupons.handler.d.ts +2 -0
- package/dist/server/webhooks/customers.handler.d.ts +2 -0
- package/dist/server/webhooks/index.d.ts +2 -0
- package/dist/server/webhooks/invoices.handler.d.ts +2 -0
- package/dist/server/webhooks/payment-intents.handler.d.ts +2 -0
- package/dist/server/webhooks/payouts.handler.d.ts +2 -0
- package/dist/server/webhooks/prices.handler.d.ts +2 -0
- package/dist/server/webhooks/products.handler.d.ts +2 -0
- package/dist/server/webhooks/promotion-codes.handler.d.ts +2 -0
- package/dist/server/webhooks/refunds.handler.d.ts +2 -0
- package/dist/server/webhooks/reviews.handler.d.ts +2 -0
- package/dist/server/webhooks/subscription.handler.d.ts +2 -0
- package/dist/server/webhooks/types.d.ts +11 -0
- package/dist/server.d.ts +2 -3790
- package/dist/server.js +3811 -1236
- package/package.json +9 -8
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
import { GenericActionCtx } from 'convex/server';
|
|
2
|
+
import { GenericId } from 'convex/values';
|
|
3
|
+
import { StripeDataModel } from '../schema';
|
|
4
|
+
import { InternalConfiguration } from '../types';
|
|
5
|
+
import { StoreDispatchArgs, StoreResultFor } from './types';
|
|
6
|
+
export declare const StoreImplementation: {
|
|
7
|
+
args: {
|
|
8
|
+
operation: import('convex/values').VString<string, "required">;
|
|
9
|
+
table: import('convex/values').VString<string, "required">;
|
|
10
|
+
idField: import('convex/values').VString<string | undefined, "optional">;
|
|
11
|
+
data: import('convex/values').VAny<any, "optional", string>;
|
|
12
|
+
idValue: import('convex/values').VAny<any, "optional", string>;
|
|
13
|
+
field: import('convex/values').VString<string | undefined, "optional">;
|
|
14
|
+
value: import('convex/values').VAny<any, "optional", string>;
|
|
15
|
+
id: import('convex/values').VAny<any, "optional", string>;
|
|
16
|
+
};
|
|
17
|
+
name: string;
|
|
18
|
+
handler: (context: import('convex/server').GenericMutationCtx<StripeDataModel>, args: import('../types').InferArgs<{
|
|
19
|
+
operation: import('convex/values').VString<string, "required">;
|
|
20
|
+
table: import('convex/values').VString<string, "required">;
|
|
21
|
+
idField: import('convex/values').VString<string | undefined, "optional">;
|
|
22
|
+
data: import('convex/values').VAny<any, "optional", string>;
|
|
23
|
+
idValue: import('convex/values').VAny<any, "optional", string>;
|
|
24
|
+
field: import('convex/values').VString<string | undefined, "optional">;
|
|
25
|
+
value: import('convex/values').VAny<any, "optional", string>;
|
|
26
|
+
id: import('convex/values').VAny<any, "optional", string>;
|
|
27
|
+
}>, configuration: InternalConfiguration) => Promise<{
|
|
28
|
+
id: GenericId<"stripe_products" | "stripe_prices" | "stripe_customers" | "stripe_subscriptions" | "stripe_coupons" | "stripe_promotion_codes" | "stripe_payouts" | "stripe_refunds" | "stripe_payment_intents" | "stripe_checkout_sessions" | "stripe_invoices" | "stripe_reviews">;
|
|
29
|
+
deleted?: undefined;
|
|
30
|
+
doc?: undefined;
|
|
31
|
+
docs?: undefined;
|
|
32
|
+
} | {
|
|
33
|
+
deleted: boolean;
|
|
34
|
+
id?: undefined;
|
|
35
|
+
doc?: undefined;
|
|
36
|
+
docs?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
doc: any;
|
|
39
|
+
id?: undefined;
|
|
40
|
+
deleted?: undefined;
|
|
41
|
+
docs?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
docs: ({
|
|
44
|
+
_id: GenericId<"stripe_products">;
|
|
45
|
+
_creationTime: number;
|
|
46
|
+
productId: string;
|
|
47
|
+
stripe: {
|
|
48
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
49
|
+
statement_descriptor?: string | null | undefined;
|
|
50
|
+
unit_label?: string | null | undefined;
|
|
51
|
+
object: string;
|
|
52
|
+
id: string;
|
|
53
|
+
url: string | null;
|
|
54
|
+
created: number;
|
|
55
|
+
livemode: boolean;
|
|
56
|
+
name: string;
|
|
57
|
+
description: string | null;
|
|
58
|
+
active: boolean;
|
|
59
|
+
images: string[];
|
|
60
|
+
package_dimensions: {
|
|
61
|
+
length: number;
|
|
62
|
+
height: number;
|
|
63
|
+
weight: number;
|
|
64
|
+
width: number;
|
|
65
|
+
} | null;
|
|
66
|
+
shippable: boolean | null;
|
|
67
|
+
updated: number;
|
|
68
|
+
marketing_features: {
|
|
69
|
+
name?: string | null | undefined;
|
|
70
|
+
}[];
|
|
71
|
+
default_price: string | null;
|
|
72
|
+
};
|
|
73
|
+
last_synced_at: number;
|
|
74
|
+
} | {
|
|
75
|
+
_id: GenericId<"stripe_prices">;
|
|
76
|
+
_creationTime: number;
|
|
77
|
+
stripe: {
|
|
78
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
79
|
+
object: string;
|
|
80
|
+
type: "one_time" | "recurring";
|
|
81
|
+
id: string;
|
|
82
|
+
currency: string;
|
|
83
|
+
created: number;
|
|
84
|
+
livemode: boolean;
|
|
85
|
+
recurring: {
|
|
86
|
+
interval: "day" | "week" | "month" | "year";
|
|
87
|
+
interval_count: number;
|
|
88
|
+
trial_period_days: number | null;
|
|
89
|
+
meter: string | null;
|
|
90
|
+
usage_type: "licensed" | "metered";
|
|
91
|
+
} | null;
|
|
92
|
+
active: boolean;
|
|
93
|
+
nickname: string | null;
|
|
94
|
+
productId: string;
|
|
95
|
+
unit_amount: number | null;
|
|
96
|
+
billing_scheme: "per_unit" | "tiered";
|
|
97
|
+
lookup_key: string | null;
|
|
98
|
+
tiers_mode: "graduated" | "volume" | null;
|
|
99
|
+
transform_quantity: {
|
|
100
|
+
divide_by: number;
|
|
101
|
+
round: "up" | "down";
|
|
102
|
+
} | null;
|
|
103
|
+
unit_amount_decimal: string | null;
|
|
104
|
+
};
|
|
105
|
+
last_synced_at: number;
|
|
106
|
+
priceId: string;
|
|
107
|
+
} | {
|
|
108
|
+
_id: GenericId<"stripe_customers">;
|
|
109
|
+
_creationTime: number;
|
|
110
|
+
stripe: {
|
|
111
|
+
currency?: string | null | undefined;
|
|
112
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
113
|
+
name?: string | null | undefined;
|
|
114
|
+
address?: {
|
|
115
|
+
city?: string | null | undefined;
|
|
116
|
+
country?: string | null | undefined;
|
|
117
|
+
line1?: string | null | undefined;
|
|
118
|
+
line2?: string | null | undefined;
|
|
119
|
+
postal_code?: string | null | undefined;
|
|
120
|
+
state?: string | null | undefined;
|
|
121
|
+
} | null | undefined;
|
|
122
|
+
phone?: string | null | undefined;
|
|
123
|
+
description?: string | null | undefined;
|
|
124
|
+
email?: string | null | undefined;
|
|
125
|
+
shipping?: {
|
|
126
|
+
name?: string | undefined;
|
|
127
|
+
address?: {
|
|
128
|
+
city?: string | null | undefined;
|
|
129
|
+
country?: string | null | undefined;
|
|
130
|
+
line1?: string | null | undefined;
|
|
131
|
+
line2?: string | null | undefined;
|
|
132
|
+
postal_code?: string | null | undefined;
|
|
133
|
+
state?: string | null | undefined;
|
|
134
|
+
} | undefined;
|
|
135
|
+
phone?: string | null | undefined;
|
|
136
|
+
carrier?: string | null | undefined;
|
|
137
|
+
tracking_number?: string | null | undefined;
|
|
138
|
+
} | null | undefined;
|
|
139
|
+
tax?: {
|
|
140
|
+
ip_address?: string | null | undefined;
|
|
141
|
+
automatic_tax: "failed" | "not_collecting" | "supported" | "unrecognized_location";
|
|
142
|
+
location: {
|
|
143
|
+
state?: string | null | undefined;
|
|
144
|
+
country: string;
|
|
145
|
+
source: string;
|
|
146
|
+
} | null;
|
|
147
|
+
} | undefined;
|
|
148
|
+
cash_balance?: any;
|
|
149
|
+
default_source?: string | null | undefined;
|
|
150
|
+
delinquent?: boolean | null | undefined;
|
|
151
|
+
discount?: any;
|
|
152
|
+
invoice_credit_balance?: any;
|
|
153
|
+
invoice_prefix?: string | null | undefined;
|
|
154
|
+
invoice_settings?: any;
|
|
155
|
+
next_invoice_sequence?: number | null | undefined;
|
|
156
|
+
preferred_locales?: string[] | null | undefined;
|
|
157
|
+
sources?: any;
|
|
158
|
+
subscriptions?: any;
|
|
159
|
+
tax_exempt?: "reverse" | "exempt" | "none" | null | undefined;
|
|
160
|
+
tax_ids?: any;
|
|
161
|
+
test_clock?: string | null | undefined;
|
|
162
|
+
object: string;
|
|
163
|
+
id: string;
|
|
164
|
+
created: number;
|
|
165
|
+
livemode: boolean;
|
|
166
|
+
balance: number;
|
|
167
|
+
};
|
|
168
|
+
last_synced_at: number;
|
|
169
|
+
customerId: string;
|
|
170
|
+
entityId: string;
|
|
171
|
+
} | {
|
|
172
|
+
_id: GenericId<"stripe_subscriptions">;
|
|
173
|
+
_creationTime: number;
|
|
174
|
+
stripe: any;
|
|
175
|
+
last_synced_at: number;
|
|
176
|
+
customerId: string;
|
|
177
|
+
subscriptionId: string | null;
|
|
178
|
+
} | {
|
|
179
|
+
_id: GenericId<"stripe_coupons">;
|
|
180
|
+
_creationTime: number;
|
|
181
|
+
stripe: {
|
|
182
|
+
currency?: string | null | undefined;
|
|
183
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
184
|
+
amount_off?: number | null | undefined;
|
|
185
|
+
name?: string | null | undefined;
|
|
186
|
+
percent_off?: number | null | undefined;
|
|
187
|
+
applies_to?: {
|
|
188
|
+
products: string[];
|
|
189
|
+
} | null | undefined;
|
|
190
|
+
currency_options?: Record<string, {
|
|
191
|
+
amount_off: number;
|
|
192
|
+
}> | null | undefined;
|
|
193
|
+
duration_in_months?: number | null | undefined;
|
|
194
|
+
max_redemptions?: number | null | undefined;
|
|
195
|
+
redeem_by?: number | null | undefined;
|
|
196
|
+
object: string;
|
|
197
|
+
id: string;
|
|
198
|
+
created: number;
|
|
199
|
+
livemode: boolean;
|
|
200
|
+
duration: "forever" | "once" | "repeating";
|
|
201
|
+
times_redeemed: number;
|
|
202
|
+
valid: boolean;
|
|
203
|
+
};
|
|
204
|
+
last_synced_at: number;
|
|
205
|
+
couponId: string;
|
|
206
|
+
} | {
|
|
207
|
+
_id: GenericId<"stripe_promotion_codes">;
|
|
208
|
+
_creationTime: number;
|
|
209
|
+
stripe: {
|
|
210
|
+
customer?: string | null | undefined;
|
|
211
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
212
|
+
expires_at?: number | null | undefined;
|
|
213
|
+
max_redemptions?: number | null | undefined;
|
|
214
|
+
object: string;
|
|
215
|
+
id: string;
|
|
216
|
+
created: number;
|
|
217
|
+
livemode: boolean;
|
|
218
|
+
times_redeemed: number;
|
|
219
|
+
coupon: {
|
|
220
|
+
currency?: string | null | undefined;
|
|
221
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
222
|
+
amount_off?: number | null | undefined;
|
|
223
|
+
name?: string | null | undefined;
|
|
224
|
+
percent_off?: number | null | undefined;
|
|
225
|
+
applies_to?: {
|
|
226
|
+
products: string[];
|
|
227
|
+
} | null | undefined;
|
|
228
|
+
currency_options?: Record<string, {
|
|
229
|
+
amount_off: number;
|
|
230
|
+
}> | null | undefined;
|
|
231
|
+
duration_in_months?: number | null | undefined;
|
|
232
|
+
max_redemptions?: number | null | undefined;
|
|
233
|
+
redeem_by?: number | null | undefined;
|
|
234
|
+
object: string;
|
|
235
|
+
id: string;
|
|
236
|
+
created: number;
|
|
237
|
+
livemode: boolean;
|
|
238
|
+
duration: "forever" | "once" | "repeating";
|
|
239
|
+
times_redeemed: number;
|
|
240
|
+
valid: boolean;
|
|
241
|
+
};
|
|
242
|
+
code: string;
|
|
243
|
+
active: boolean;
|
|
244
|
+
restrictions: {
|
|
245
|
+
currency_options?: Record<string, {
|
|
246
|
+
minimum_amount?: number | null | undefined;
|
|
247
|
+
}> | null | undefined;
|
|
248
|
+
minimum_amount?: number | null | undefined;
|
|
249
|
+
first_time_transaction?: boolean | undefined;
|
|
250
|
+
minimum_amount_currency?: string | null | undefined;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
last_synced_at: number;
|
|
254
|
+
promotionCodeId: string;
|
|
255
|
+
} | {
|
|
256
|
+
_id: GenericId<"stripe_payouts">;
|
|
257
|
+
_creationTime: number;
|
|
258
|
+
stripe: {
|
|
259
|
+
currency?: string | null | undefined;
|
|
260
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
261
|
+
description?: string | null | undefined;
|
|
262
|
+
statement_descriptor?: string | null | undefined;
|
|
263
|
+
application_fee_amount?: number | null | undefined;
|
|
264
|
+
application_only?: string | null | undefined;
|
|
265
|
+
balance_transaction?: string | null | undefined;
|
|
266
|
+
destination?: string | null | undefined;
|
|
267
|
+
failure_balance_transaction?: string | null | undefined;
|
|
268
|
+
failure_code?: string | null | undefined;
|
|
269
|
+
failure_message?: string | null | undefined;
|
|
270
|
+
original_payout?: string | null | undefined;
|
|
271
|
+
payout_method?: string | null | undefined;
|
|
272
|
+
reconciliation_status?: "completed" | "in_progress" | "not_applicable" | undefined;
|
|
273
|
+
reversed_by?: string | null | undefined;
|
|
274
|
+
trace_id?: {
|
|
275
|
+
value?: string | null | undefined;
|
|
276
|
+
status: string;
|
|
277
|
+
} | null | undefined;
|
|
278
|
+
object: string;
|
|
279
|
+
type: "card" | "bank_account";
|
|
280
|
+
id: string;
|
|
281
|
+
status: string;
|
|
282
|
+
created: number;
|
|
283
|
+
livemode: boolean;
|
|
284
|
+
amount: number;
|
|
285
|
+
automatic: boolean;
|
|
286
|
+
arrival_date: number;
|
|
287
|
+
method: string;
|
|
288
|
+
source_type: string;
|
|
289
|
+
};
|
|
290
|
+
last_synced_at: number;
|
|
291
|
+
payoutId: string;
|
|
292
|
+
} | {
|
|
293
|
+
_id: GenericId<"stripe_refunds">;
|
|
294
|
+
_creationTime: number;
|
|
295
|
+
stripe: {
|
|
296
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
297
|
+
payment_intent?: string | null | undefined;
|
|
298
|
+
status?: string | null | undefined;
|
|
299
|
+
description?: string | null | undefined;
|
|
300
|
+
receipt_number?: string | null | undefined;
|
|
301
|
+
charge?: string | null | undefined;
|
|
302
|
+
next_action?: any;
|
|
303
|
+
balance_transaction?: string | null | undefined;
|
|
304
|
+
failure_balance_transaction?: string | null | undefined;
|
|
305
|
+
reason?: string | null | undefined;
|
|
306
|
+
destination_details?: any;
|
|
307
|
+
failure_reason?: string | null | undefined;
|
|
308
|
+
instructions_email?: string | null | undefined;
|
|
309
|
+
pending_reason?: string | null | undefined;
|
|
310
|
+
source_transfer_reversal?: string | null | undefined;
|
|
311
|
+
transfer_reversal?: string | null | undefined;
|
|
312
|
+
object: string;
|
|
313
|
+
id: string;
|
|
314
|
+
currency: string;
|
|
315
|
+
created: number;
|
|
316
|
+
amount: number;
|
|
317
|
+
};
|
|
318
|
+
last_synced_at: number;
|
|
319
|
+
refundId: string;
|
|
320
|
+
} | {
|
|
321
|
+
_id: GenericId<"stripe_payment_intents">;
|
|
322
|
+
_creationTime: number;
|
|
323
|
+
stripe: {
|
|
324
|
+
customer?: string | null | undefined;
|
|
325
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
326
|
+
client_secret?: string | null | undefined;
|
|
327
|
+
payment_method_configuration_details?: {
|
|
328
|
+
parent?: string | null | undefined;
|
|
329
|
+
id: string;
|
|
330
|
+
} | null | undefined;
|
|
331
|
+
payment_method_options?: any;
|
|
332
|
+
presentment_details?: any;
|
|
333
|
+
description?: string | null | undefined;
|
|
334
|
+
shipping?: any;
|
|
335
|
+
payment_method?: string | null | undefined;
|
|
336
|
+
application?: string | null | undefined;
|
|
337
|
+
on_behalf_of?: string | null | undefined;
|
|
338
|
+
statement_descriptor?: string | null | undefined;
|
|
339
|
+
last_payment_error?: {
|
|
340
|
+
payment_method?: any;
|
|
341
|
+
advice_code?: string | null | undefined;
|
|
342
|
+
charge?: string | null | undefined;
|
|
343
|
+
code?: string | null | undefined;
|
|
344
|
+
decline_code?: string | null | undefined;
|
|
345
|
+
doc_url?: string | null | undefined;
|
|
346
|
+
message?: string | null | undefined;
|
|
347
|
+
network_advice_code?: string | null | undefined;
|
|
348
|
+
network_decline_code?: string | null | undefined;
|
|
349
|
+
param?: string | null | undefined;
|
|
350
|
+
payment_method_type?: string | null | undefined;
|
|
351
|
+
last_payment_error?: any;
|
|
352
|
+
latest_charge?: string | null | undefined;
|
|
353
|
+
type: "api_error" | "card_error" | "idempotency_error" | "invalid_request_error";
|
|
354
|
+
} | null | undefined;
|
|
355
|
+
latest_charge?: string | null | undefined;
|
|
356
|
+
processing?: any;
|
|
357
|
+
automatic_payment_methods?: {
|
|
358
|
+
allow_redirects?: "always" | "never" | null | undefined;
|
|
359
|
+
enabled: boolean;
|
|
360
|
+
} | null | undefined;
|
|
361
|
+
next_action?: any;
|
|
362
|
+
receipt_email?: string | null | undefined;
|
|
363
|
+
statement_descriptor_suffix?: string | null | undefined;
|
|
364
|
+
amount_details?: {
|
|
365
|
+
tip?: {
|
|
366
|
+
amount?: number | null | undefined;
|
|
367
|
+
} | null | undefined;
|
|
368
|
+
} | null | undefined;
|
|
369
|
+
application_fee_amount?: number | null | undefined;
|
|
370
|
+
canceled_at?: number | null | undefined;
|
|
371
|
+
cancellation_reason?: "expired" | "abandoned" | "automatic" | "duplicate" | "failed_invoice" | "fraudulent" | "requested_by_customer" | "void_invoice" | null | undefined;
|
|
372
|
+
review?: string | null | undefined;
|
|
373
|
+
transfer_data?: any;
|
|
374
|
+
transfer_group?: string | null | undefined;
|
|
375
|
+
object: string;
|
|
376
|
+
id: string;
|
|
377
|
+
currency: string | null;
|
|
378
|
+
status: "canceled" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method" | "succeeded";
|
|
379
|
+
created: number;
|
|
380
|
+
livemode: boolean;
|
|
381
|
+
payment_method_types: string[];
|
|
382
|
+
amount: number;
|
|
383
|
+
setup_future_usage: "off_session" | "on_session" | null;
|
|
384
|
+
amount_capturable: number;
|
|
385
|
+
amount_received: number;
|
|
386
|
+
capture_method: "manual" | "automatic" | "automatic_sync" | "automatic_async";
|
|
387
|
+
confirmation_method: "manual" | "automatic";
|
|
388
|
+
excluded_payment_method_types: string[] | null;
|
|
389
|
+
};
|
|
390
|
+
last_synced_at: number;
|
|
391
|
+
paymentIntentId: string;
|
|
392
|
+
} | {
|
|
393
|
+
_id: GenericId<"stripe_checkout_sessions">;
|
|
394
|
+
_creationTime: number;
|
|
395
|
+
stripe: {
|
|
396
|
+
subscription?: string | null | undefined;
|
|
397
|
+
client_reference_id?: string | null | undefined;
|
|
398
|
+
currency?: string | null | undefined;
|
|
399
|
+
customer?: string | null | undefined;
|
|
400
|
+
customer_email?: string | null | undefined;
|
|
401
|
+
line_items?: any[] | null | undefined;
|
|
402
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
403
|
+
payment_intent?: string | null | undefined;
|
|
404
|
+
return_url?: string | null | undefined;
|
|
405
|
+
success_url?: string | null | undefined;
|
|
406
|
+
ui_mode?: "custom" | "embedded" | "hosted" | null | undefined;
|
|
407
|
+
url?: string | null | undefined;
|
|
408
|
+
adaptive_pricing?: any;
|
|
409
|
+
after_expiration?: any;
|
|
410
|
+
allow_promotion_codes?: boolean | null | undefined;
|
|
411
|
+
amount_subtotal?: number | null | undefined;
|
|
412
|
+
amount_total?: number | null | undefined;
|
|
413
|
+
billing_address_collection?: "required" | "auto" | null | undefined;
|
|
414
|
+
cancel_url?: string | null | undefined;
|
|
415
|
+
client_secret?: string | null | undefined;
|
|
416
|
+
collected_information?: any;
|
|
417
|
+
consent?: any;
|
|
418
|
+
consent_collection?: any;
|
|
419
|
+
currency_conversion?: any;
|
|
420
|
+
customer_creation?: "always" | "if_required" | null | undefined;
|
|
421
|
+
customer_details?: any;
|
|
422
|
+
discounts?: any[] | null | undefined;
|
|
423
|
+
invoice?: string | null | undefined;
|
|
424
|
+
invoice_creation?: any;
|
|
425
|
+
locale?: string | null | undefined;
|
|
426
|
+
optional_items?: any[] | null | undefined;
|
|
427
|
+
origin_context?: "mobile_app" | "web" | null | undefined;
|
|
428
|
+
payment_link?: string | null | undefined;
|
|
429
|
+
payment_method_collection?: "always" | "if_required" | null | undefined;
|
|
430
|
+
payment_method_configuration_details?: any;
|
|
431
|
+
payment_method_options?: any;
|
|
432
|
+
permissions?: any;
|
|
433
|
+
phone_number_collection?: any;
|
|
434
|
+
presentment_details?: any;
|
|
435
|
+
recovered_from?: string | null | undefined;
|
|
436
|
+
redirect_on_completion?: "always" | "if_required" | "never" | null | undefined;
|
|
437
|
+
saved_payment_method_options?: any;
|
|
438
|
+
setup_intent?: string | null | undefined;
|
|
439
|
+
shipping_address_collection?: any;
|
|
440
|
+
shipping_cost?: any;
|
|
441
|
+
submit_type?: "auto" | "book" | "donate" | "pay" | "subscribe" | null | undefined;
|
|
442
|
+
tax_id_collection?: any;
|
|
443
|
+
total_details?: any;
|
|
444
|
+
wallet_options?: any;
|
|
445
|
+
object: string;
|
|
446
|
+
id: string;
|
|
447
|
+
automatic_tax: any;
|
|
448
|
+
mode: "payment" | "setup" | "subscription";
|
|
449
|
+
payment_status: "no_payment_required" | "paid" | "unpaid";
|
|
450
|
+
status: "complete" | "expired" | "open" | null;
|
|
451
|
+
created: number;
|
|
452
|
+
custom_fields: any[];
|
|
453
|
+
custom_text: any;
|
|
454
|
+
expires_at: number;
|
|
455
|
+
livemode: boolean;
|
|
456
|
+
payment_method_types: string[];
|
|
457
|
+
shipping_options: any[];
|
|
458
|
+
};
|
|
459
|
+
last_synced_at: number;
|
|
460
|
+
checkoutSessionId: string;
|
|
461
|
+
} | {
|
|
462
|
+
_id: GenericId<"stripe_invoices">;
|
|
463
|
+
_creationTime: number;
|
|
464
|
+
stripe: {
|
|
465
|
+
number?: string | null | undefined;
|
|
466
|
+
automatic_tax?: any;
|
|
467
|
+
customer_email?: string | null | undefined;
|
|
468
|
+
metadata?: Record<string, string | number | null> | null | undefined;
|
|
469
|
+
custom_fields?: any[] | null | undefined;
|
|
470
|
+
shipping_cost?: any;
|
|
471
|
+
description?: string | null | undefined;
|
|
472
|
+
default_source?: string | null | undefined;
|
|
473
|
+
test_clock?: string | null | undefined;
|
|
474
|
+
auto_advance?: boolean | undefined;
|
|
475
|
+
confirmation_secret?: any;
|
|
476
|
+
hosted_invoice_url?: string | null | undefined;
|
|
477
|
+
lines?: any;
|
|
478
|
+
parent?: any;
|
|
479
|
+
account_country?: string | null | undefined;
|
|
480
|
+
account_name?: string | null | undefined;
|
|
481
|
+
account_tax_ids?: string[] | null | undefined;
|
|
482
|
+
application?: string | null | undefined;
|
|
483
|
+
automatically_finalizes_at?: number | null | undefined;
|
|
484
|
+
customer_address?: any;
|
|
485
|
+
customer_name?: string | null | undefined;
|
|
486
|
+
customer_phone?: string | null | undefined;
|
|
487
|
+
customer_shipping?: any;
|
|
488
|
+
customer_tax_ids?: any[] | null | undefined;
|
|
489
|
+
default_payment_method?: string | null | undefined;
|
|
490
|
+
due_date?: number | null | undefined;
|
|
491
|
+
effective_at?: number | null | undefined;
|
|
492
|
+
ending_balance?: number | null | undefined;
|
|
493
|
+
footer?: string | null | undefined;
|
|
494
|
+
from_invoice?: any;
|
|
495
|
+
invoice_pdf?: string | null | undefined;
|
|
496
|
+
issuer?: any;
|
|
497
|
+
last_finalization_error?: any;
|
|
498
|
+
latest_revision?: string | null | undefined;
|
|
499
|
+
next_payment_attempt?: number | null | undefined;
|
|
500
|
+
on_behalf_of?: string | null | undefined;
|
|
501
|
+
payment_settings?: any;
|
|
502
|
+
payments?: any;
|
|
503
|
+
receipt_number?: string | null | undefined;
|
|
504
|
+
rendering?: any;
|
|
505
|
+
shipping_details?: any;
|
|
506
|
+
statement_descriptor?: string | null | undefined;
|
|
507
|
+
status_transitions?: any;
|
|
508
|
+
subtotal_excluding_tax?: number | null | undefined;
|
|
509
|
+
threshold_reason?: any;
|
|
510
|
+
total_discount_amounts?: any[] | null | undefined;
|
|
511
|
+
total_excluding_tax?: number | null | undefined;
|
|
512
|
+
total_pretax_credit_amounts?: any[] | null | undefined;
|
|
513
|
+
total_taxes?: any[] | null | undefined;
|
|
514
|
+
webhooks_delivered_at?: number | null | undefined;
|
|
515
|
+
object: string;
|
|
516
|
+
id: string;
|
|
517
|
+
currency: string;
|
|
518
|
+
customer: string;
|
|
519
|
+
status: "paid" | "open" | "draft" | "uncollectible" | "void";
|
|
520
|
+
created: number;
|
|
521
|
+
discounts: string[];
|
|
522
|
+
livemode: boolean;
|
|
523
|
+
collection_method: "charge_automatically" | "send_invoice";
|
|
524
|
+
period_end: number;
|
|
525
|
+
period_start: number;
|
|
526
|
+
total: number;
|
|
527
|
+
amount_due: number;
|
|
528
|
+
amount_overpaid: number;
|
|
529
|
+
amount_paid: number;
|
|
530
|
+
amount_remaining: number;
|
|
531
|
+
amount_shipping: number;
|
|
532
|
+
attempt_count: number;
|
|
533
|
+
attempted: boolean;
|
|
534
|
+
billing_reason: "subscription" | "automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "subscription_update" | "upcoming" | null;
|
|
535
|
+
customer_tax_exempt: "reverse" | "exempt" | "none" | null;
|
|
536
|
+
default_tax_rates: any[];
|
|
537
|
+
post_payment_credit_notes_amount: number;
|
|
538
|
+
pre_payment_credit_notes_amount: number;
|
|
539
|
+
starting_balance: number;
|
|
540
|
+
subtotal: number;
|
|
541
|
+
};
|
|
542
|
+
last_synced_at: number;
|
|
543
|
+
invoiceId: string;
|
|
544
|
+
} | {
|
|
545
|
+
_id: GenericId<"stripe_reviews">;
|
|
546
|
+
_creationTime: number;
|
|
547
|
+
stripe: {
|
|
548
|
+
payment_intent?: string | null | undefined;
|
|
549
|
+
ip_address?: string | null | undefined;
|
|
550
|
+
charge?: string | null | undefined;
|
|
551
|
+
billing_zip?: string | null | undefined;
|
|
552
|
+
closed_reason?: "canceled" | "approved" | "refunded" | "refunded_as_fraud" | "disputed" | "redacted" | "payment_never_settled" | "acknowledged" | null | undefined;
|
|
553
|
+
ip_address_location?: {
|
|
554
|
+
city?: string | null | undefined;
|
|
555
|
+
country?: string | null | undefined;
|
|
556
|
+
latitude?: number | null | undefined;
|
|
557
|
+
longitude?: number | null | undefined;
|
|
558
|
+
region?: string | null | undefined;
|
|
559
|
+
} | null | undefined;
|
|
560
|
+
session?: {
|
|
561
|
+
browser?: string | null | undefined;
|
|
562
|
+
device?: string | null | undefined;
|
|
563
|
+
platform?: string | null | undefined;
|
|
564
|
+
version?: string | null | undefined;
|
|
565
|
+
} | null | undefined;
|
|
566
|
+
object: string;
|
|
567
|
+
id: string;
|
|
568
|
+
open: boolean;
|
|
569
|
+
created: number;
|
|
570
|
+
livemode: boolean;
|
|
571
|
+
reason: string;
|
|
572
|
+
opened_reason: "manual" | "rule";
|
|
573
|
+
};
|
|
574
|
+
last_synced_at: number;
|
|
575
|
+
reviewId: string;
|
|
576
|
+
})[];
|
|
577
|
+
id?: undefined;
|
|
578
|
+
deleted?: undefined;
|
|
579
|
+
doc?: undefined;
|
|
580
|
+
} | undefined>;
|
|
581
|
+
};
|
|
582
|
+
export declare function storeDispatchTyped<A extends StoreDispatchArgs<StripeDataModel>>(args: A, context: GenericActionCtx<StripeDataModel>, configuration: InternalConfiguration): Promise<StoreResultFor<StripeDataModel, A>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GenericMutationCtx } from 'convex/server';
|
|
2
|
+
import { StripeDataModel } from '../../schema';
|
|
3
|
+
export declare function deleteById<TableName extends keyof StripeDataModel, Schema extends StripeDataModel[TableName]["document"]>(context: GenericMutationCtx<StripeDataModel>, table: TableName, idField: keyof Schema & string, idValue: Schema[typeof idField]): Promise<boolean>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GenericMutationCtx } from 'convex/server';
|
|
2
|
+
import { StripeDataModel } from '../../schema';
|
|
3
|
+
export declare function selectAll<TableName extends keyof StripeDataModel>(context: GenericMutationCtx<StripeDataModel>, table: TableName): Promise<StripeDataModel[TableName]["document"][]>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GenericMutationCtx } from 'convex/server';
|
|
2
|
+
import { GenericId } from 'convex/values';
|
|
3
|
+
import { StripeDataModel } from '../../schema';
|
|
4
|
+
export declare function selectById<TableName extends keyof StripeDataModel>(context: GenericMutationCtx<StripeDataModel>, table: TableName, id: GenericId<TableName>): Promise<StripeDataModel[TableName]["document"] | null>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { GenericMutationCtx } from 'convex/server';
|
|
2
|
+
import { StripeDataModel } from '../../schema';
|
|
3
|
+
export declare function selectOne<TableName extends keyof StripeDataModel, Schema extends StripeDataModel[TableName]["document"], Field extends keyof Schema & string>(context: GenericMutationCtx<StripeDataModel>, table: TableName, field: Field, value: Schema[Field]): Promise<Schema | null>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { GenericMutationCtx, WithoutSystemFields } from 'convex/server';
|
|
2
|
+
import { GenericId } from 'convex/values';
|
|
3
|
+
import { StripeDataModel } from '../../schema';
|
|
4
|
+
export declare function upsert<TableName extends keyof StripeDataModel>(context: GenericMutationCtx<StripeDataModel>, table: TableName, idField: keyof StripeDataModel[TableName]["document"] & string, data: WithoutSystemFields<StripeDataModel[TableName]["document"]>): Promise<GenericId<TableName>>;
|