@raideno/convex-stripe 0.1.1 → 0.1.3

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.
Files changed (95) hide show
  1. package/dist/index.d.ts +0 -2
  2. package/dist/index.js +1 -0
  3. package/dist/server/actions/index.d.ts +4 -0
  4. package/dist/server/actions/pay.d.ts +579 -0
  5. package/dist/server/actions/portal.d.ts +26 -0
  6. package/dist/server/actions/setup.d.ts +19 -0
  7. package/dist/server/actions/subscribe.d.ts +44 -0
  8. package/dist/server/helpers.d.ts +28 -0
  9. package/dist/server/index.d.ts +967 -0
  10. package/dist/server/logger.d.ts +8 -0
  11. package/dist/server/redirects/index.d.ts +47 -0
  12. package/dist/server/redirects/pay.d.ts +5 -0
  13. package/dist/server/redirects/portal.d.ts +3 -0
  14. package/dist/server/redirects/subscribe.d.ts +3 -0
  15. package/dist/server/redirects/types.d.ts +9 -0
  16. package/dist/server/schema/charge.d.ts +294 -0
  17. package/dist/server/schema/checkout-session.d.ts +256 -0
  18. package/dist/server/schema/coupon.d.ts +112 -0
  19. package/dist/server/schema/credit-note.d.ts +228 -0
  20. package/dist/server/schema/customer.d.ts +366 -0
  21. package/dist/server/schema/dispute.d.ts +76 -0
  22. package/dist/server/schema/early-fraud-warning.d.ts +40 -0
  23. package/dist/server/schema/index.d.ts +6063 -0
  24. package/dist/server/schema/invoice.d.ts +314 -0
  25. package/dist/server/schema/payment-intent.d.ts +311 -0
  26. package/dist/server/schema/payment-method.d.ts +248 -0
  27. package/dist/server/schema/payout.d.ts +140 -0
  28. package/dist/server/schema/plan.d.ts +112 -0
  29. package/dist/server/schema/price.d.ts +148 -0
  30. package/dist/server/schema/product.d.ts +132 -0
  31. package/dist/server/schema/promotion-code.d.ts +266 -0
  32. package/dist/server/schema/refund.d.ts +92 -0
  33. package/dist/server/schema/review.d.ts +152 -0
  34. package/dist/server/schema/setup-intent.d.ts +156 -0
  35. package/dist/server/schema/subscription-schedule.d.ts +468 -0
  36. package/dist/server/schema/subscription.d.ts +4 -0
  37. package/dist/server/schema/tax-id.d.ts +120 -0
  38. package/dist/server/store/index.d.ts +960 -0
  39. package/dist/server/store/operations/delete-by-id.d.ts +3 -0
  40. package/dist/server/store/operations/index.d.ts +5 -0
  41. package/dist/server/store/operations/select-all.d.ts +3 -0
  42. package/dist/server/store/operations/select-by-id.d.ts +4 -0
  43. package/dist/server/store/operations/select-one.d.ts +3 -0
  44. package/dist/server/store/operations/upsert.d.ts +4 -0
  45. package/dist/server/store/types.d.ts +70 -0
  46. package/dist/server/sync/all.d.ts +5 -0
  47. package/dist/server/sync/charges.handler.d.ts +5 -0
  48. package/dist/server/sync/checkout-sessions.handler.d.ts +5 -0
  49. package/dist/server/sync/coupons.handler.d.ts +5 -0
  50. package/dist/server/sync/credit-notes.handler.d.ts +5 -0
  51. package/dist/server/sync/customers.handler.d.ts +5 -0
  52. package/dist/server/sync/disputes.handler.d.ts +5 -0
  53. package/dist/server/sync/early-fraud-warnings.handler.d.ts +5 -0
  54. package/dist/server/sync/invoices.handler.d.ts +5 -0
  55. package/dist/server/sync/payment-intents.handler.d.ts +5 -0
  56. package/dist/server/sync/payment-methods.handler.d.ts +5 -0
  57. package/dist/server/sync/payouts.handler.d.ts +5 -0
  58. package/dist/server/sync/plans.handler.d.ts +5 -0
  59. package/dist/server/sync/prices.handler.d.ts +5 -0
  60. package/dist/server/sync/products.handler.d.ts +5 -0
  61. package/dist/server/sync/promotion-codes.handler.d.ts +5 -0
  62. package/dist/server/sync/refunds.handler.d.ts +5 -0
  63. package/dist/server/sync/reviews.handler.d.ts +5 -0
  64. package/dist/server/sync/setup-intents.handler.d.ts +5 -0
  65. package/dist/server/sync/subscription-schedules.handler.d.ts +5 -0
  66. package/dist/server/sync/subscription.d.ts +12 -0
  67. package/dist/server/sync/subscriptions.handler.d.ts +5 -0
  68. package/dist/server/sync/tax-id.handler.d.ts +5 -0
  69. package/dist/server/types.d.ts +29 -0
  70. package/dist/server/webhooks/charges.handler.d.ts +2 -0
  71. package/dist/server/webhooks/checkout-sessions.handler.d.ts +2 -0
  72. package/dist/server/webhooks/coupons.handler.d.ts +2 -0
  73. package/dist/server/webhooks/credit-notes.handler.d.ts +2 -0
  74. package/dist/server/webhooks/customers.handler.d.ts +2 -0
  75. package/dist/server/webhooks/disputes.handler.d.ts +2 -0
  76. package/dist/server/webhooks/early-fraud-warnings.handler.d.ts +2 -0
  77. package/dist/server/webhooks/index.d.ts +2 -0
  78. package/dist/server/webhooks/invoices.handler.d.ts +2 -0
  79. package/dist/server/webhooks/payment-intents.handler.d.ts +2 -0
  80. package/dist/server/webhooks/payment-methods.handler.d.ts +2 -0
  81. package/dist/server/webhooks/payouts.handler.d.ts +2 -0
  82. package/dist/server/webhooks/plans.handler.d.ts +2 -0
  83. package/dist/server/webhooks/prices.handler.d.ts +2 -0
  84. package/dist/server/webhooks/products.handler.d.ts +2 -0
  85. package/dist/server/webhooks/promotion-codes.handler.d.ts +2 -0
  86. package/dist/server/webhooks/refunds.handler.d.ts +2 -0
  87. package/dist/server/webhooks/reviews.handler.d.ts +2 -0
  88. package/dist/server/webhooks/setup-intent.handler.d.ts +2 -0
  89. package/dist/server/webhooks/subscription-schedules.handler.d.ts +2 -0
  90. package/dist/server/webhooks/subscription.handler.d.ts +2 -0
  91. package/dist/server/webhooks/tax-id.handler.d.ts +2 -0
  92. package/dist/server/webhooks/types.d.ts +11 -0
  93. package/dist/server.d.ts +2 -3790
  94. package/dist/server.js +6072 -1564
  95. package/package.json +9 -10
@@ -0,0 +1,967 @@
1
+ import { GenericActionCtx, HttpRouter } from 'convex/server';
2
+ import { Infer } from 'convex/values';
3
+ import { PayImplementation, PortalImplementation, SubscribeImplementation } from './actions';
4
+ import { StripeDataModel } from './schema';
5
+ import { InputConfiguration } from './types';
6
+ export { stripeTables } from './schema';
7
+ export { Logger } from './logger';
8
+ export { InputConfiguration };
9
+ export declare const internalConvexStripe: (configuration_: InputConfiguration) => {
10
+ stripe: {
11
+ addHttpRoutes: (http: HttpRouter) => void;
12
+ portal: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof PortalImplementation.args>) => Promise<import("stripe").Stripe.Response<import("stripe").Stripe.BillingPortal.Session>>;
13
+ subscribe: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof SubscribeImplementation.args>) => Promise<{
14
+ url: string | null;
15
+ }>;
16
+ pay: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof PayImplementation.args>) => Promise<import("stripe").Stripe.Response<import("stripe").Stripe.Checkout.Session>>;
17
+ };
18
+ store: import('convex/server').RegisteredMutation<"internal", {
19
+ id?: any;
20
+ value?: any;
21
+ idField?: string | undefined;
22
+ data?: any;
23
+ idValue?: any;
24
+ field?: string | undefined;
25
+ operation: string;
26
+ table: string;
27
+ }, Promise<{
28
+ id: import('convex/values').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" | "stripe_plans" | "stripe_disputes" | "stripe_early_fraud_warnings" | "stripe_tax_ids" | "stripe_setup_intents" | "stripe_credit_notes" | "stripe_charges" | "stripe_payment_methods" | "stripe_subscription_schedules">;
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: import('convex/values').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
+ name: string;
54
+ description: string | null;
55
+ created: number;
56
+ livemode: boolean;
57
+ url: 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: import('convex/values').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
+ active: boolean;
86
+ nickname: string | null;
87
+ billing_scheme: "per_unit" | "tiered";
88
+ tiers_mode: "graduated" | "volume" | null;
89
+ recurring: {
90
+ interval: "day" | "week" | "month" | "year";
91
+ interval_count: number;
92
+ meter: string | null;
93
+ trial_period_days: number | null;
94
+ usage_type: "licensed" | "metered";
95
+ } | null;
96
+ productId: string;
97
+ unit_amount: number | null;
98
+ lookup_key: string | 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: import('convex/values').GenericId<"stripe_customers">;
109
+ _creationTime: number;
110
+ stripe: {
111
+ address?: {
112
+ city?: string | null | undefined;
113
+ country?: string | null | undefined;
114
+ line1?: string | null | undefined;
115
+ line2?: string | null | undefined;
116
+ postal_code?: string | null | undefined;
117
+ state?: string | null | undefined;
118
+ } | null | undefined;
119
+ email?: string | null | undefined;
120
+ name?: string | null | undefined;
121
+ phone?: string | null | undefined;
122
+ currency?: string | null | undefined;
123
+ description?: string | null | undefined;
124
+ metadata?: Record<string, string | number | null> | null | undefined;
125
+ shipping?: {
126
+ address?: {
127
+ city?: string | null | undefined;
128
+ country?: string | null | undefined;
129
+ line1?: string | null | undefined;
130
+ line2?: string | null | undefined;
131
+ postal_code?: string | null | undefined;
132
+ state?: string | null | undefined;
133
+ } | undefined;
134
+ name?: string | undefined;
135
+ phone?: string | null | undefined;
136
+ carrier?: string | null | undefined;
137
+ tracking_number?: string | null | undefined;
138
+ } | null | undefined;
139
+ discount?: any;
140
+ tax?: {
141
+ ip_address?: string | null | undefined;
142
+ automatic_tax: "failed" | "not_collecting" | "supported" | "unrecognized_location";
143
+ location: {
144
+ state?: string | null | undefined;
145
+ country: string;
146
+ source: string;
147
+ } | null;
148
+ } | undefined;
149
+ cash_balance?: any;
150
+ default_source?: string | null | undefined;
151
+ delinquent?: boolean | null | undefined;
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: import('convex/values').GenericId<"stripe_subscriptions">;
173
+ _creationTime: number;
174
+ stripe: any;
175
+ last_synced_at: number;
176
+ customerId: string;
177
+ subscriptionId: string | null;
178
+ } | {
179
+ _id: import('convex/values').GenericId<"stripe_coupons">;
180
+ _creationTime: number;
181
+ stripe: {
182
+ name?: string | null | undefined;
183
+ currency?: string | null | undefined;
184
+ metadata?: Record<string, string | number | null> | null | undefined;
185
+ amount_off?: number | 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: import('convex/values').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
+ name?: string | null | undefined;
221
+ currency?: string | null | undefined;
222
+ metadata?: Record<string, string | number | null> | null | undefined;
223
+ amount_off?: number | 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: import('convex/values').GenericId<"stripe_payouts">;
257
+ _creationTime: number;
258
+ stripe: {
259
+ balance_transaction?: string | null | undefined;
260
+ currency?: string | null | undefined;
261
+ description?: string | null | undefined;
262
+ metadata?: Record<string, string | number | null> | null | undefined;
263
+ statement_descriptor?: string | null | undefined;
264
+ application_fee_amount?: number | null | undefined;
265
+ failure_balance_transaction?: string | null | undefined;
266
+ failure_code?: string | null | undefined;
267
+ failure_message?: string | null | undefined;
268
+ application_only?: string | null | undefined;
269
+ destination?: 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
+ amount: number;
282
+ status: string;
283
+ created: number;
284
+ livemode: boolean;
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: import('convex/values').GenericId<"stripe_refunds">;
294
+ _creationTime: number;
295
+ stripe: {
296
+ balance_transaction?: string | null | undefined;
297
+ description?: string | null | undefined;
298
+ metadata?: Record<string, string | number | null> | null | undefined;
299
+ payment_intent?: string | null | undefined;
300
+ status?: string | null | undefined;
301
+ failure_balance_transaction?: string | null | undefined;
302
+ receipt_number?: string | null | undefined;
303
+ charge?: string | null | undefined;
304
+ reason?: string | null | undefined;
305
+ next_action?: any;
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
+ amount: number;
315
+ currency: string;
316
+ created: number;
317
+ };
318
+ last_synced_at: number;
319
+ refundId: string;
320
+ } | {
321
+ _id: import('convex/values').GenericId<"stripe_payment_intents">;
322
+ _creationTime: number;
323
+ stripe: {
324
+ customer?: string | null | undefined;
325
+ description?: string | null | undefined;
326
+ metadata?: Record<string, string | number | null> | null | undefined;
327
+ receipt_email?: string | null | undefined;
328
+ shipping?: any;
329
+ statement_descriptor?: string | null | undefined;
330
+ statement_descriptor_suffix?: string | null | undefined;
331
+ application?: string | null | undefined;
332
+ application_fee_amount?: number | null | undefined;
333
+ on_behalf_of?: string | null | undefined;
334
+ payment_method?: string | null | undefined;
335
+ presentment_details?: any;
336
+ review?: string | null | undefined;
337
+ transfer_data?: any;
338
+ transfer_group?: string | null | undefined;
339
+ client_secret?: string | null | undefined;
340
+ payment_method_configuration_details?: {
341
+ parent?: string | null | undefined;
342
+ id: string;
343
+ } | null | undefined;
344
+ payment_method_options?: any;
345
+ last_payment_error?: {
346
+ payment_method?: any;
347
+ charge?: string | null | undefined;
348
+ advice_code?: string | null | undefined;
349
+ code?: string | null | undefined;
350
+ decline_code?: string | null | undefined;
351
+ doc_url?: string | null | undefined;
352
+ message?: string | null | undefined;
353
+ network_advice_code?: string | null | undefined;
354
+ network_decline_code?: string | null | undefined;
355
+ param?: string | null | undefined;
356
+ payment_method_type?: string | null | undefined;
357
+ last_payment_error?: any;
358
+ latest_charge?: string | null | undefined;
359
+ type: "api_error" | "card_error" | "idempotency_error" | "invalid_request_error";
360
+ } | null | undefined;
361
+ latest_charge?: string | null | undefined;
362
+ processing?: any;
363
+ automatic_payment_methods?: {
364
+ allow_redirects?: "always" | "never" | null | undefined;
365
+ enabled: boolean;
366
+ } | null | undefined;
367
+ next_action?: any;
368
+ amount_details?: {
369
+ tip?: {
370
+ amount?: number | null | undefined;
371
+ } | null | undefined;
372
+ } | null | undefined;
373
+ canceled_at?: number | null | undefined;
374
+ cancellation_reason?: "expired" | "duplicate" | "fraudulent" | "abandoned" | "automatic" | "failed_invoice" | "requested_by_customer" | "void_invoice" | null | undefined;
375
+ object: string;
376
+ id: string;
377
+ amount: number;
378
+ currency: string | null;
379
+ status: "succeeded" | "canceled" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method";
380
+ created: number;
381
+ livemode: boolean;
382
+ payment_method_types: string[];
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: import('convex/values').GenericId<"stripe_checkout_sessions">;
394
+ _creationTime: number;
395
+ stripe: {
396
+ currency?: string | null | undefined;
397
+ customer?: string | null | undefined;
398
+ metadata?: Record<string, string | number | null> | null | undefined;
399
+ payment_intent?: string | null | undefined;
400
+ presentment_details?: any;
401
+ subscription?: string | null | undefined;
402
+ client_reference_id?: string | null | undefined;
403
+ customer_email?: string | null | undefined;
404
+ line_items?: any[] | null | undefined;
405
+ return_url?: string | null | undefined;
406
+ success_url?: string | null | undefined;
407
+ ui_mode?: "custom" | "embedded" | "hosted" | null | undefined;
408
+ url?: string | null | undefined;
409
+ adaptive_pricing?: any;
410
+ after_expiration?: any;
411
+ allow_promotion_codes?: boolean | null | undefined;
412
+ amount_subtotal?: number | null | undefined;
413
+ amount_total?: number | null | undefined;
414
+ billing_address_collection?: "required" | "auto" | null | undefined;
415
+ cancel_url?: string | null | undefined;
416
+ client_secret?: string | null | undefined;
417
+ collected_information?: any;
418
+ consent?: any;
419
+ consent_collection?: any;
420
+ currency_conversion?: any;
421
+ customer_creation?: "always" | "if_required" | null | undefined;
422
+ customer_details?: any;
423
+ discounts?: any[] | null | undefined;
424
+ invoice?: string | null | undefined;
425
+ invoice_creation?: any;
426
+ locale?: string | null | undefined;
427
+ optional_items?: any[] | null | undefined;
428
+ origin_context?: "mobile_app" | "web" | null | undefined;
429
+ payment_link?: string | null | undefined;
430
+ payment_method_collection?: "always" | "if_required" | null | undefined;
431
+ payment_method_configuration_details?: any;
432
+ payment_method_options?: any;
433
+ permissions?: any;
434
+ phone_number_collection?: 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
+ status: "complete" | "expired" | "open" | null;
448
+ created: number;
449
+ livemode: boolean;
450
+ automatic_tax: any;
451
+ mode: "payment" | "setup" | "subscription";
452
+ payment_status: "paid" | "no_payment_required" | "unpaid";
453
+ custom_fields: any[];
454
+ custom_text: any;
455
+ expires_at: number;
456
+ payment_method_types: string[];
457
+ shipping_options: any[];
458
+ };
459
+ last_synced_at: number;
460
+ checkoutSessionId: string;
461
+ } | {
462
+ _id: import('convex/values').GenericId<"stripe_invoices">;
463
+ _creationTime: number;
464
+ stripe: {
465
+ number?: string | null | undefined;
466
+ description?: string | null | undefined;
467
+ metadata?: Record<string, string | number | null> | null | undefined;
468
+ statement_descriptor?: string | null | undefined;
469
+ application?: string | null | undefined;
470
+ on_behalf_of?: string | null | undefined;
471
+ receipt_number?: string | null | undefined;
472
+ automatic_tax?: any;
473
+ customer_email?: string | null | undefined;
474
+ custom_fields?: any[] | null | undefined;
475
+ shipping_cost?: any;
476
+ lines?: any;
477
+ effective_at?: number | null | undefined;
478
+ subtotal_excluding_tax?: number | null | undefined;
479
+ total_excluding_tax?: number | null | undefined;
480
+ total_taxes?: any[] | null | undefined;
481
+ default_source?: string | null | undefined;
482
+ test_clock?: string | null | undefined;
483
+ auto_advance?: boolean | undefined;
484
+ confirmation_secret?: any;
485
+ hosted_invoice_url?: string | null | undefined;
486
+ parent?: any;
487
+ account_country?: string | null | undefined;
488
+ account_name?: string | null | undefined;
489
+ account_tax_ids?: string[] | null | undefined;
490
+ automatically_finalizes_at?: number | null | undefined;
491
+ customer_address?: any;
492
+ customer_name?: string | null | undefined;
493
+ customer_phone?: string | null | undefined;
494
+ customer_shipping?: any;
495
+ customer_tax_ids?: any[] | null | undefined;
496
+ default_payment_method?: string | null | undefined;
497
+ due_date?: number | null | undefined;
498
+ ending_balance?: number | null | undefined;
499
+ footer?: string | null | undefined;
500
+ from_invoice?: any;
501
+ invoice_pdf?: string | null | undefined;
502
+ issuer?: any;
503
+ last_finalization_error?: any;
504
+ latest_revision?: string | null | undefined;
505
+ next_payment_attempt?: number | null | undefined;
506
+ payment_settings?: any;
507
+ payments?: any;
508
+ rendering?: any;
509
+ shipping_details?: any;
510
+ status_transitions?: any;
511
+ threshold_reason?: any;
512
+ total_discount_amounts?: any[] | null | undefined;
513
+ total_pretax_credit_amounts?: 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" | "void" | "draft" | "uncollectible";
520
+ created: number;
521
+ livemode: boolean;
522
+ discounts: string[];
523
+ subtotal: number;
524
+ total: number;
525
+ amount_shipping: number;
526
+ collection_method: "charge_automatically" | "send_invoice";
527
+ period_end: number;
528
+ period_start: number;
529
+ amount_due: number;
530
+ amount_overpaid: number;
531
+ amount_paid: number;
532
+ amount_remaining: number;
533
+ attempt_count: number;
534
+ attempted: boolean;
535
+ billing_reason: "subscription" | "automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "subscription_update" | "upcoming" | null;
536
+ customer_tax_exempt: "reverse" | "exempt" | "none" | null;
537
+ default_tax_rates: any[];
538
+ post_payment_credit_notes_amount: number;
539
+ pre_payment_credit_notes_amount: number;
540
+ starting_balance: number;
541
+ };
542
+ last_synced_at: number;
543
+ invoiceId: string;
544
+ } | {
545
+ _id: import('convex/values').GenericId<"stripe_reviews">;
546
+ _creationTime: number;
547
+ stripe: {
548
+ payment_intent?: string | null | undefined;
549
+ charge?: string | null | undefined;
550
+ ip_address?: string | null | undefined;
551
+ billing_zip?: string | null | undefined;
552
+ closed_reason?: "disputed" | "refunded" | "canceled" | "approved" | "refunded_as_fraud" | "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
+ created: number;
569
+ livemode: boolean;
570
+ open: boolean;
571
+ reason: string;
572
+ opened_reason: "manual" | "rule";
573
+ };
574
+ last_synced_at: number;
575
+ reviewId: string;
576
+ } | {
577
+ _id: import('convex/values').GenericId<"stripe_plans">;
578
+ _creationTime: number;
579
+ stripe: {
580
+ amount?: number | null | undefined;
581
+ metadata?: Record<string, string | number | null> | null | undefined;
582
+ nickname?: string | null | undefined;
583
+ product?: string | null | undefined;
584
+ amount_decimal?: string | null | undefined;
585
+ meter?: string | null | undefined;
586
+ tiers?: any[] | null | undefined;
587
+ tiers_mode?: "graduated" | "volume" | null | undefined;
588
+ transform_usage?: {
589
+ divide_by: number;
590
+ round: "up" | "down";
591
+ } | null | undefined;
592
+ trial_period_days?: number | null | undefined;
593
+ object: string;
594
+ id: string;
595
+ currency: string;
596
+ created: number;
597
+ livemode: boolean;
598
+ active: boolean;
599
+ interval: "day" | "week" | "month" | "year";
600
+ billing_scheme: "per_unit" | "tiered";
601
+ interval_count: number;
602
+ usage_type: string;
603
+ };
604
+ last_synced_at: number;
605
+ planId: string;
606
+ } | {
607
+ _id: import('convex/values').GenericId<"stripe_disputes">;
608
+ _creationTime: number;
609
+ stripe: {
610
+ metadata?: Record<string, string | number | null> | null | undefined;
611
+ payment_intent?: string | null | undefined;
612
+ object: string;
613
+ id: string;
614
+ amount: number;
615
+ currency: string;
616
+ payment_method_details: any;
617
+ status: "lost" | "needs_response" | "prevented" | "under_review" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
618
+ created: number;
619
+ livemode: boolean;
620
+ charge: string;
621
+ reason: string;
622
+ evidence: any;
623
+ balance_transactions: any[];
624
+ enhanced_eligibility_types: ("visa_compelling_evidence_3" | "visa_compliance")[];
625
+ evidence_details: any;
626
+ is_charge_refundable: boolean;
627
+ };
628
+ last_synced_at: number;
629
+ disputeId: string;
630
+ } | {
631
+ _id: import('convex/values').GenericId<"stripe_early_fraud_warnings">;
632
+ _creationTime: number;
633
+ stripe: {
634
+ payment_intent?: string | null | undefined;
635
+ object: string;
636
+ id: string;
637
+ created: number;
638
+ livemode: boolean;
639
+ charge: string;
640
+ actionable: boolean;
641
+ fraud_type: string;
642
+ };
643
+ last_synced_at: number;
644
+ earlyFraudWarningId: string;
645
+ } | {
646
+ _id: import('convex/values').GenericId<"stripe_tax_ids">;
647
+ _creationTime: number;
648
+ stripe: {
649
+ country?: string | null | undefined;
650
+ customer?: string | null | undefined;
651
+ owner?: {
652
+ customer?: string | null | undefined;
653
+ application?: string | null | undefined;
654
+ account?: string | null | undefined;
655
+ type: "customer" | "application" | "account" | "self";
656
+ } | null | undefined;
657
+ verification?: {
658
+ verified_address?: string | null | undefined;
659
+ verified_name?: string | null | undefined;
660
+ status: "pending" | "unavailable" | "unverified" | "verified";
661
+ } | null | undefined;
662
+ object: string;
663
+ type: string;
664
+ id: string;
665
+ created: number;
666
+ livemode: boolean;
667
+ value: string;
668
+ };
669
+ last_synced_at: number;
670
+ taxIdId: string;
671
+ } | {
672
+ _id: import('convex/values').GenericId<"stripe_setup_intents">;
673
+ _creationTime: number;
674
+ stripe: {
675
+ customer?: string | null | undefined;
676
+ description?: string | null | undefined;
677
+ metadata?: Record<string, string | number | null> | null | undefined;
678
+ application?: string | null | undefined;
679
+ on_behalf_of?: string | null | undefined;
680
+ payment_method?: string | null | undefined;
681
+ client_secret?: string | null | undefined;
682
+ payment_method_configuration_details?: {
683
+ parent?: string | null | undefined;
684
+ id: string;
685
+ } | null | undefined;
686
+ automatic_payment_methods?: {
687
+ allow_redirects?: "always" | "never" | null | undefined;
688
+ enabled?: boolean | null | undefined;
689
+ } | null | undefined;
690
+ cancellation_reason?: "duplicate" | "abandoned" | "requested_by_customer" | null | undefined;
691
+ attach_to_self?: boolean | null | undefined;
692
+ latest_attempt?: string | null | undefined;
693
+ mandate?: string | null | undefined;
694
+ single_use_mandate?: string | null | undefined;
695
+ object: string;
696
+ id: string;
697
+ status: "succeeded" | "canceled" | "processing" | "requires_action" | "requires_confirmation" | "requires_payment_method";
698
+ created: number;
699
+ livemode: boolean;
700
+ payment_method_options: any;
701
+ payment_method_types: string[];
702
+ next_action: any;
703
+ last_setup_error: any;
704
+ usage: string;
705
+ flow_directions: ("inbound" | "outbound")[] | null;
706
+ };
707
+ last_synced_at: number;
708
+ setupIntentId: string;
709
+ } | {
710
+ _id: import('convex/values').GenericId<"stripe_credit_notes">;
711
+ _creationTime: number;
712
+ stripe: {
713
+ customer?: string | null | undefined;
714
+ metadata?: Record<string, string | number | null> | null | undefined;
715
+ invoice?: string | null | undefined;
716
+ memo?: string | null | undefined;
717
+ customer_balance_transaction?: string | null | undefined;
718
+ effective_at?: number | null | undefined;
719
+ out_of_band_amount?: number | null | undefined;
720
+ subtotal_excluding_tax?: number | null | undefined;
721
+ total_excluding_tax?: number | null | undefined;
722
+ voided_at?: number | null | undefined;
723
+ number: string;
724
+ object: string;
725
+ type: "mixed" | "post_payment" | "pre_payment";
726
+ id: string;
727
+ amount: number;
728
+ currency: string;
729
+ status: "issued" | "void";
730
+ created: number;
731
+ livemode: boolean;
732
+ refunds: {
733
+ amount_refunded: number;
734
+ refund: string;
735
+ }[];
736
+ shipping_cost: any;
737
+ lines: any;
738
+ reason: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory" | null;
739
+ subtotal: number;
740
+ total: number;
741
+ amount_shipping: number;
742
+ discount_amount: number;
743
+ discount_amounts: {
744
+ amount: number;
745
+ discount: string;
746
+ }[];
747
+ pdf: string;
748
+ post_payment_amount: number;
749
+ pre_payment_amount: number;
750
+ pretax_credit_amounts: {
751
+ discount?: string | null | undefined;
752
+ credit_balance_transaction?: string | null | undefined;
753
+ type: "discount" | "credit_balance_transaction";
754
+ amount: number;
755
+ }[];
756
+ total_taxes: any;
757
+ };
758
+ last_synced_at: number;
759
+ creditNoteId: string;
760
+ } | {
761
+ _id: import('convex/values').GenericId<"stripe_charges">;
762
+ _creationTime: number;
763
+ stripe: {
764
+ balance_transaction?: string | null | undefined;
765
+ customer?: string | null | undefined;
766
+ description?: string | null | undefined;
767
+ metadata?: Record<string, string | number | null> | null | undefined;
768
+ payment_intent?: string | null | undefined;
769
+ receipt_email?: string | null | undefined;
770
+ statement_descriptor?: string | null | undefined;
771
+ statement_descriptor_suffix?: string | null | undefined;
772
+ application?: string | null | undefined;
773
+ application_fee?: string | null | undefined;
774
+ application_fee_amount?: number | null | undefined;
775
+ calculated_statement_descriptor?: string | null | undefined;
776
+ failure_balance_transaction?: string | null | undefined;
777
+ failure_code?: string | null | undefined;
778
+ failure_message?: string | null | undefined;
779
+ on_behalf_of?: string | null | undefined;
780
+ payment_method?: string | null | undefined;
781
+ receipt_number?: string | null | undefined;
782
+ receipt_url?: string | null | undefined;
783
+ review?: string | null | undefined;
784
+ source_transfer?: string | null | undefined;
785
+ transfer?: string | null | undefined;
786
+ object: string;
787
+ id: string;
788
+ amount: number;
789
+ billing_details: {
790
+ address?: {
791
+ city?: string | null | undefined;
792
+ country?: string | null | undefined;
793
+ line1?: string | null | undefined;
794
+ line2?: string | null | undefined;
795
+ postal_code?: string | null | undefined;
796
+ state?: string | null | undefined;
797
+ } | null | undefined;
798
+ email?: string | null | undefined;
799
+ name?: string | null | undefined;
800
+ phone?: string | null | undefined;
801
+ tax_id?: string | null | undefined;
802
+ };
803
+ currency: string;
804
+ disputed: boolean;
805
+ payment_method_details: any;
806
+ refunded: boolean;
807
+ shipping: any;
808
+ status: "succeeded" | "failed" | "pending";
809
+ amount_captured: number;
810
+ amount_refunded: number;
811
+ captured: boolean;
812
+ created: number;
813
+ fraud_details: any;
814
+ livemode: boolean;
815
+ outcome: any;
816
+ paid: boolean;
817
+ presentment_details: any;
818
+ radar_options: any;
819
+ refunds: any;
820
+ transfer_data: any;
821
+ transfer_group: any;
822
+ };
823
+ last_synced_at: number;
824
+ chargeId: string;
825
+ } | {
826
+ _id: import('convex/values').GenericId<"stripe_payment_methods">;
827
+ _creationTime: number;
828
+ stripe: {
829
+ customer?: string | null | undefined;
830
+ metadata?: Record<string, string | number | null> | null | undefined;
831
+ object: string;
832
+ type: string;
833
+ id: string;
834
+ link: any;
835
+ billing_details: any;
836
+ created: number;
837
+ livemode: boolean;
838
+ radar_options: any;
839
+ acss_debit: any;
840
+ affirm: any;
841
+ afterpay_clearpay: any;
842
+ alipay: any;
843
+ alma: any;
844
+ amazon_pay: any;
845
+ au_becs_debit: any;
846
+ bacs_debit: any;
847
+ bancontact: any;
848
+ billie: any;
849
+ blik: any;
850
+ boleto: any;
851
+ card: any;
852
+ cashapp: any;
853
+ crypto: any;
854
+ customer_balance: any;
855
+ eps: any;
856
+ fpx: any;
857
+ giropay: any;
858
+ grabpay: any;
859
+ ideal: any;
860
+ kakao_pay: any;
861
+ klarna: any;
862
+ konbini: any;
863
+ kr_card: any;
864
+ mobilepay: any;
865
+ multibanco: any;
866
+ naver_pay: any;
867
+ nz_bank_account: any;
868
+ oxxo: any;
869
+ p24: any;
870
+ pay_by_bank: any;
871
+ payco: any;
872
+ paynow: any;
873
+ paypal: any;
874
+ pix: any;
875
+ promptpay: any;
876
+ revolut_pay: any;
877
+ samsung_pay: any;
878
+ satispay: any;
879
+ sepa_debit: any;
880
+ sofort: any;
881
+ swish: any;
882
+ twint: any;
883
+ us_bank_account: any;
884
+ wechat_pay: any;
885
+ zip: any;
886
+ allow_redisplay: "always" | "limited" | "unspecified" | null;
887
+ card_present: any;
888
+ interac_present: any;
889
+ };
890
+ last_synced_at: number;
891
+ paymentMethodId: string;
892
+ } | {
893
+ _id: import('convex/values').GenericId<"stripe_subscription_schedules">;
894
+ _creationTime: number;
895
+ stripe: {
896
+ metadata?: Record<string, string | number | null> | null | undefined;
897
+ application?: string | null | undefined;
898
+ test_clock?: string | null | undefined;
899
+ canceled_at?: number | null | undefined;
900
+ current_phase?: {
901
+ end_date: number;
902
+ start_date: number;
903
+ } | null | undefined;
904
+ completed_at?: number | null | undefined;
905
+ default_settings?: {
906
+ description?: string | null | undefined;
907
+ on_behalf_of?: string | null | undefined;
908
+ transfer_data?: {
909
+ amount_percent?: number | null | undefined;
910
+ destination: string;
911
+ } | null | undefined;
912
+ automatic_tax?: {
913
+ enabled?: boolean | null | undefined;
914
+ disabled_reason?: "requires_location_inputs" | null | undefined;
915
+ liability?: {
916
+ account?: string | null | undefined;
917
+ type: "account" | "self";
918
+ } | null | undefined;
919
+ } | null | undefined;
920
+ invoice_settings?: {
921
+ account_tax_ids?: string[] | null | undefined;
922
+ days_until_due?: number | null | undefined;
923
+ issuer: {
924
+ account?: string | null | undefined;
925
+ type: "account" | "self";
926
+ };
927
+ } | null | undefined;
928
+ collection_method?: "charge_automatically" | "send_invoice" | null | undefined;
929
+ default_payment_method?: string | null | undefined;
930
+ application_fee_percent?: number | null | undefined;
931
+ billing_thresholds?: {
932
+ amount_gte?: number | null | undefined;
933
+ reset_billing_cycle_anchor?: boolean | null | undefined;
934
+ } | null | undefined;
935
+ billing_cycle_anchor: "automatic" | "phase_start";
936
+ } | null | undefined;
937
+ released_at?: number | null | undefined;
938
+ released_subscription?: string | null | undefined;
939
+ object: string;
940
+ id: string;
941
+ customer: string;
942
+ status: "canceled" | "completed" | "active" | "not_started" | "released";
943
+ created: number;
944
+ livemode: boolean;
945
+ phases: any;
946
+ billing_mode: {
947
+ updated_at?: number | null | undefined;
948
+ type: "classic" | "flexible";
949
+ };
950
+ end_behavior: "none" | "cancel" | "release" | "renew";
951
+ };
952
+ last_synced_at: number;
953
+ subscriptionScheduleId: string;
954
+ })[];
955
+ id?: undefined;
956
+ deleted?: undefined;
957
+ doc?: undefined;
958
+ } | undefined>>;
959
+ sync: import('convex/server').RegisteredAction<"internal", {}, Promise<void>>;
960
+ setup: import('convex/server').RegisteredAction<"internal", {
961
+ email?: string | undefined;
962
+ metadata?: Record<string, any> | undefined;
963
+ entityId: string;
964
+ }, Promise<{
965
+ customerId: string;
966
+ }>>;
967
+ };