@raideno/convex-stripe 0.1.0 → 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.
Files changed (68) 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 +589 -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/checkout-session.d.ts +256 -0
  17. package/dist/server/schema/coupon.d.ts +112 -0
  18. package/dist/server/schema/customer.d.ts +366 -0
  19. package/dist/server/schema/index.d.ts +3511 -0
  20. package/dist/server/schema/invoice.d.ts +314 -0
  21. package/dist/server/schema/payment-intent.d.ts +311 -0
  22. package/dist/server/schema/payout.d.ts +140 -0
  23. package/dist/server/schema/price.d.ts +148 -0
  24. package/dist/server/schema/product.d.ts +132 -0
  25. package/dist/server/schema/promotion-code.d.ts +266 -0
  26. package/dist/server/schema/refund.d.ts +92 -0
  27. package/dist/server/schema/review.d.ts +152 -0
  28. package/dist/server/schema/subscription.d.ts +4 -0
  29. package/dist/server/store/index.d.ts +582 -0
  30. package/dist/server/store/operations/delete-by-id.d.ts +3 -0
  31. package/dist/server/store/operations/index.d.ts +5 -0
  32. package/dist/server/store/operations/select-all.d.ts +3 -0
  33. package/dist/server/store/operations/select-by-id.d.ts +4 -0
  34. package/dist/server/store/operations/select-one.d.ts +3 -0
  35. package/dist/server/store/operations/upsert.d.ts +4 -0
  36. package/dist/server/store/types.d.ts +70 -0
  37. package/dist/server/sync/all.d.ts +5 -0
  38. package/dist/server/sync/checkouts-session.handler.d.ts +5 -0
  39. package/dist/server/sync/coupons.handler.d.ts +5 -0
  40. package/dist/server/sync/customers.handler.d.ts +5 -0
  41. package/dist/server/sync/invoices.handler.d.ts +5 -0
  42. package/dist/server/sync/payment-intent.handler.d.ts +5 -0
  43. package/dist/server/sync/payouts.handler.d.ts +5 -0
  44. package/dist/server/sync/prices.handler.d.ts +5 -0
  45. package/dist/server/sync/products.handler.d.ts +5 -0
  46. package/dist/server/sync/promotion-codes.handler.d.ts +5 -0
  47. package/dist/server/sync/refunds.handler.d.ts +5 -0
  48. package/dist/server/sync/reviews.handler.d.ts +5 -0
  49. package/dist/server/sync/subscription.d.ts +12 -0
  50. package/dist/server/sync/subscriptions.handler.d.ts +5 -0
  51. package/dist/server/types.d.ts +29 -0
  52. package/dist/server/webhooks/checkouts-session.handler.d.ts +2 -0
  53. package/dist/server/webhooks/coupons.handler.d.ts +2 -0
  54. package/dist/server/webhooks/customers.handler.d.ts +2 -0
  55. package/dist/server/webhooks/index.d.ts +2 -0
  56. package/dist/server/webhooks/invoices.handler.d.ts +2 -0
  57. package/dist/server/webhooks/payment-intents.handler.d.ts +2 -0
  58. package/dist/server/webhooks/payouts.handler.d.ts +2 -0
  59. package/dist/server/webhooks/prices.handler.d.ts +2 -0
  60. package/dist/server/webhooks/products.handler.d.ts +2 -0
  61. package/dist/server/webhooks/promotion-codes.handler.d.ts +2 -0
  62. package/dist/server/webhooks/refunds.handler.d.ts +2 -0
  63. package/dist/server/webhooks/reviews.handler.d.ts +2 -0
  64. package/dist/server/webhooks/subscription.handler.d.ts +2 -0
  65. package/dist/server/webhooks/types.d.ts +11 -0
  66. package/dist/server.d.ts +2 -3790
  67. package/dist/server.js +3812 -1239
  68. package/package.json +9 -8
package/dist/index.d.ts CHANGED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/index.js CHANGED
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ export { PayImplementation } from './pay';
2
+ export { PortalImplementation } from './portal';
3
+ export { SetupImplementation } from './setup';
4
+ export { SubscribeImplementation } from './subscribe';
@@ -0,0 +1,579 @@
1
+ import { default as Stripe } from 'stripe';
2
+ export declare const LineItemSchema: import('convex/values').VUnion<{
3
+ adjustable_quantity?: {
4
+ maximum?: number | undefined;
5
+ minimum?: number | undefined;
6
+ enabled: boolean;
7
+ } | undefined;
8
+ quantity?: number | undefined;
9
+ tax_rates?: string[] | undefined;
10
+ dynamic_tax_rates?: string[] | undefined;
11
+ price: string;
12
+ } | {
13
+ adjustable_quantity?: {
14
+ maximum?: number | undefined;
15
+ minimum?: number | undefined;
16
+ enabled: boolean;
17
+ } | undefined;
18
+ quantity?: number | undefined;
19
+ tax_rates?: string[] | undefined;
20
+ dynamic_tax_rates?: string[] | undefined;
21
+ price_data: {
22
+ recurring?: {
23
+ interval_count?: number | undefined;
24
+ interval: "day" | "week" | "month" | "year";
25
+ } | undefined;
26
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
27
+ currency: string;
28
+ productId: string;
29
+ unit_amount: number;
30
+ } | {
31
+ recurring?: {
32
+ interval_count?: number | undefined;
33
+ interval: "day" | "week" | "month" | "year";
34
+ } | undefined;
35
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
36
+ currency: string;
37
+ unit_amount: number;
38
+ product_data: {
39
+ description?: string | undefined;
40
+ images?: string[] | undefined;
41
+ tax_code?: string | undefined;
42
+ metadata: Record<string, string | number | null>;
43
+ name: string;
44
+ };
45
+ };
46
+ }, [import('convex/values').VObject<{
47
+ adjustable_quantity?: {
48
+ maximum?: number | undefined;
49
+ minimum?: number | undefined;
50
+ enabled: boolean;
51
+ } | undefined;
52
+ quantity?: number | undefined;
53
+ tax_rates?: string[] | undefined;
54
+ dynamic_tax_rates?: string[] | undefined;
55
+ price: string;
56
+ }, {
57
+ adjustable_quantity: import('convex/values').VObject<{
58
+ maximum?: number | undefined;
59
+ minimum?: number | undefined;
60
+ enabled: boolean;
61
+ } | undefined, {
62
+ enabled: import('convex/values').VBoolean<boolean, "required">;
63
+ maximum: import('convex/values').VFloat64<number | undefined, "optional">;
64
+ minimum: import('convex/values').VFloat64<number | undefined, "optional">;
65
+ }, "optional", "enabled" | "maximum" | "minimum">;
66
+ price: import('convex/values').VString<string, "required">;
67
+ quantity: import('convex/values').VFloat64<number | undefined, "optional">;
68
+ tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
69
+ dynamic_tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
70
+ }, "required", "price" | "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum">, import('convex/values').VObject<{
71
+ adjustable_quantity?: {
72
+ maximum?: number | undefined;
73
+ minimum?: number | undefined;
74
+ enabled: boolean;
75
+ } | undefined;
76
+ quantity?: number | undefined;
77
+ tax_rates?: string[] | undefined;
78
+ dynamic_tax_rates?: string[] | undefined;
79
+ price_data: {
80
+ recurring?: {
81
+ interval_count?: number | undefined;
82
+ interval: "day" | "week" | "month" | "year";
83
+ } | undefined;
84
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
85
+ currency: string;
86
+ productId: string;
87
+ unit_amount: number;
88
+ } | {
89
+ recurring?: {
90
+ interval_count?: number | undefined;
91
+ interval: "day" | "week" | "month" | "year";
92
+ } | undefined;
93
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
94
+ currency: string;
95
+ unit_amount: number;
96
+ product_data: {
97
+ description?: string | undefined;
98
+ images?: string[] | undefined;
99
+ tax_code?: string | undefined;
100
+ metadata: Record<string, string | number | null>;
101
+ name: string;
102
+ };
103
+ };
104
+ }, {
105
+ adjustable_quantity: import('convex/values').VObject<{
106
+ maximum?: number | undefined;
107
+ minimum?: number | undefined;
108
+ enabled: boolean;
109
+ } | undefined, {
110
+ enabled: import('convex/values').VBoolean<boolean, "required">;
111
+ maximum: import('convex/values').VFloat64<number | undefined, "optional">;
112
+ minimum: import('convex/values').VFloat64<number | undefined, "optional">;
113
+ }, "optional", "enabled" | "maximum" | "minimum">;
114
+ price_data: import('convex/values').VUnion<{
115
+ recurring?: {
116
+ interval_count?: number | undefined;
117
+ interval: "day" | "week" | "month" | "year";
118
+ } | undefined;
119
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
120
+ currency: string;
121
+ productId: string;
122
+ unit_amount: number;
123
+ } | {
124
+ recurring?: {
125
+ interval_count?: number | undefined;
126
+ interval: "day" | "week" | "month" | "year";
127
+ } | undefined;
128
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
129
+ currency: string;
130
+ unit_amount: number;
131
+ product_data: {
132
+ description?: string | undefined;
133
+ images?: string[] | undefined;
134
+ tax_code?: string | undefined;
135
+ metadata: Record<string, string | number | null>;
136
+ name: string;
137
+ };
138
+ }, [import('convex/values').VObject<{
139
+ recurring?: {
140
+ interval_count?: number | undefined;
141
+ interval: "day" | "week" | "month" | "year";
142
+ } | undefined;
143
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
144
+ currency: string;
145
+ productId: string;
146
+ unit_amount: number;
147
+ }, {
148
+ currency: import('convex/values').VString<string, "required">;
149
+ productId: import('convex/values').VString<string, "required">;
150
+ recurring: import('convex/values').VObject<{
151
+ interval_count?: number | undefined;
152
+ interval: "day" | "week" | "month" | "year";
153
+ } | undefined, {
154
+ interval: import('convex/values').VUnion<"day" | "week" | "month" | "year", [import('convex/values').VLiteral<"day", "required">, import('convex/values').VLiteral<"week", "required">, import('convex/values').VLiteral<"month", "required">, import('convex/values').VLiteral<"year", "required">], "required", never>;
155
+ interval_count: import('convex/values').VFloat64<number | undefined, "optional">;
156
+ }, "optional", "interval" | "interval_count">;
157
+ tax_behavior: import('convex/values').VUnion<"exclusive" | "inclusive" | "unspecified" | undefined, [import('convex/values').VLiteral<"exclusive", "required">, import('convex/values').VLiteral<"inclusive", "required">, import('convex/values').VLiteral<"unspecified", "required">], "optional", never>;
158
+ unit_amount: import('convex/values').VFloat64<number, "required">;
159
+ }, "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior">, import('convex/values').VObject<{
160
+ recurring?: {
161
+ interval_count?: number | undefined;
162
+ interval: "day" | "week" | "month" | "year";
163
+ } | undefined;
164
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
165
+ currency: string;
166
+ unit_amount: number;
167
+ product_data: {
168
+ description?: string | undefined;
169
+ images?: string[] | undefined;
170
+ tax_code?: string | undefined;
171
+ metadata: Record<string, string | number | null>;
172
+ name: string;
173
+ };
174
+ }, {
175
+ currency: import('convex/values').VString<string, "required">;
176
+ product_data: import('convex/values').VObject<{
177
+ description?: string | undefined;
178
+ images?: string[] | undefined;
179
+ tax_code?: string | undefined;
180
+ metadata: Record<string, string | number | null>;
181
+ name: string;
182
+ }, {
183
+ description: import('convex/values').VString<string | undefined, "optional">;
184
+ images: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
185
+ metadata: import('convex/values').VRecord<Record<string, string | number | null>, import('convex/values').VString<string, "required">, import('convex/values').VUnion<string | number | null, [import('convex/values').VString<string, "required">, import('convex/values').VFloat64<number, "required">, import('convex/values').VNull<null, "required">], "required", never>, "required", string>;
186
+ name: import('convex/values').VString<string, "required">;
187
+ tax_code: import('convex/values').VString<string | undefined, "optional">;
188
+ }, "required", "metadata" | `metadata.${string}` | "name" | "description" | "images" | "tax_code">;
189
+ recurring: import('convex/values').VObject<{
190
+ interval_count?: number | undefined;
191
+ interval: "day" | "week" | "month" | "year";
192
+ } | undefined, {
193
+ interval: import('convex/values').VUnion<"day" | "week" | "month" | "year", [import('convex/values').VLiteral<"day", "required">, import('convex/values').VLiteral<"week", "required">, import('convex/values').VLiteral<"month", "required">, import('convex/values').VLiteral<"year", "required">], "required", never>;
194
+ interval_count: import('convex/values').VFloat64<number | undefined, "optional">;
195
+ }, "optional", "interval" | "interval_count">;
196
+ tax_behavior: import('convex/values').VUnion<"exclusive" | "inclusive" | "unspecified" | undefined, [import('convex/values').VLiteral<"exclusive", "required">, import('convex/values').VLiteral<"inclusive", "required">, import('convex/values').VLiteral<"unspecified", "required">], "optional", never>;
197
+ unit_amount: import('convex/values').VFloat64<number, "required">;
198
+ }, "required", "currency" | "recurring" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.name" | "product_data.description" | "product_data.images" | "product_data.tax_code">], "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.name" | "product_data.description" | "product_data.images" | "product_data.tax_code">;
199
+ quantity: import('convex/values').VFloat64<number | undefined, "optional">;
200
+ tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
201
+ dynamic_tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
202
+ }, "required", "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum" | "price_data" | "price_data.currency" | "price_data.recurring" | "price_data.productId" | "price_data.unit_amount" | "price_data.recurring.interval" | "price_data.recurring.interval_count" | "price_data.tax_behavior" | "price_data.product_data" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "price_data.product_data.name" | "price_data.product_data.description" | "price_data.product_data.images" | "price_data.product_data.tax_code">], "required", "price" | "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum" | "price_data" | "price_data.currency" | "price_data.recurring" | "price_data.productId" | "price_data.unit_amount" | "price_data.recurring.interval" | "price_data.recurring.interval_count" | "price_data.tax_behavior" | "price_data.product_data" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "price_data.product_data.name" | "price_data.product_data.description" | "price_data.product_data.images" | "price_data.product_data.tax_code">;
203
+ export declare const PayImplementation: {
204
+ args: import('convex/values').VObject<{
205
+ metadata?: Record<string, string | number | null> | null | undefined;
206
+ createStripeCustomerIfMissing?: boolean | undefined;
207
+ line_items: ({
208
+ adjustable_quantity?: {
209
+ maximum?: number | undefined;
210
+ minimum?: number | undefined;
211
+ enabled: boolean;
212
+ } | undefined;
213
+ quantity?: number | undefined;
214
+ tax_rates?: string[] | undefined;
215
+ dynamic_tax_rates?: string[] | undefined;
216
+ price: string;
217
+ } | {
218
+ adjustable_quantity?: {
219
+ maximum?: number | undefined;
220
+ minimum?: number | undefined;
221
+ enabled: boolean;
222
+ } | undefined;
223
+ quantity?: number | undefined;
224
+ tax_rates?: string[] | undefined;
225
+ dynamic_tax_rates?: string[] | undefined;
226
+ price_data: {
227
+ recurring?: {
228
+ interval_count?: number | undefined;
229
+ interval: "day" | "week" | "month" | "year";
230
+ } | undefined;
231
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
232
+ currency: string;
233
+ productId: string;
234
+ unit_amount: number;
235
+ } | {
236
+ recurring?: {
237
+ interval_count?: number | undefined;
238
+ interval: "day" | "week" | "month" | "year";
239
+ } | undefined;
240
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
241
+ currency: string;
242
+ unit_amount: number;
243
+ product_data: {
244
+ description?: string | undefined;
245
+ images?: string[] | undefined;
246
+ tax_code?: string | undefined;
247
+ metadata: Record<string, string | number | null>;
248
+ name: string;
249
+ };
250
+ };
251
+ })[];
252
+ entityId: string;
253
+ referenceId: string;
254
+ success: {
255
+ url: string;
256
+ };
257
+ cancel: {
258
+ url: string;
259
+ };
260
+ }, {
261
+ createStripeCustomerIfMissing: import('convex/values').VBoolean<boolean | undefined, "optional">;
262
+ entityId: import('convex/values').VString<string, "required">;
263
+ metadata: import('convex/values').VUnion<Record<string, string | number | null> | null | undefined, [import('convex/values').VRecord<Record<string, string | number | null>, import('convex/values').VString<string, "required">, import('convex/values').VUnion<string | number | null, [import('convex/values').VString<string, "required">, import('convex/values').VFloat64<number, "required">, import('convex/values').VNull<null, "required">], "required", never>, "required", string>, import('convex/values').VNull<null, "required">], "optional", string>;
264
+ referenceId: import('convex/values').VString<string, "required">;
265
+ line_items: import('convex/values').VArray<({
266
+ adjustable_quantity?: {
267
+ maximum?: number | undefined;
268
+ minimum?: number | undefined;
269
+ enabled: boolean;
270
+ } | undefined;
271
+ quantity?: number | undefined;
272
+ tax_rates?: string[] | undefined;
273
+ dynamic_tax_rates?: string[] | undefined;
274
+ price: string;
275
+ } | {
276
+ adjustable_quantity?: {
277
+ maximum?: number | undefined;
278
+ minimum?: number | undefined;
279
+ enabled: boolean;
280
+ } | undefined;
281
+ quantity?: number | undefined;
282
+ tax_rates?: string[] | undefined;
283
+ dynamic_tax_rates?: string[] | undefined;
284
+ price_data: {
285
+ recurring?: {
286
+ interval_count?: number | undefined;
287
+ interval: "day" | "week" | "month" | "year";
288
+ } | undefined;
289
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
290
+ currency: string;
291
+ productId: string;
292
+ unit_amount: number;
293
+ } | {
294
+ recurring?: {
295
+ interval_count?: number | undefined;
296
+ interval: "day" | "week" | "month" | "year";
297
+ } | undefined;
298
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
299
+ currency: string;
300
+ unit_amount: number;
301
+ product_data: {
302
+ description?: string | undefined;
303
+ images?: string[] | undefined;
304
+ tax_code?: string | undefined;
305
+ metadata: Record<string, string | number | null>;
306
+ name: string;
307
+ };
308
+ };
309
+ })[], import('convex/values').VUnion<{
310
+ adjustable_quantity?: {
311
+ maximum?: number | undefined;
312
+ minimum?: number | undefined;
313
+ enabled: boolean;
314
+ } | undefined;
315
+ quantity?: number | undefined;
316
+ tax_rates?: string[] | undefined;
317
+ dynamic_tax_rates?: string[] | undefined;
318
+ price: string;
319
+ } | {
320
+ adjustable_quantity?: {
321
+ maximum?: number | undefined;
322
+ minimum?: number | undefined;
323
+ enabled: boolean;
324
+ } | undefined;
325
+ quantity?: number | undefined;
326
+ tax_rates?: string[] | undefined;
327
+ dynamic_tax_rates?: string[] | undefined;
328
+ price_data: {
329
+ recurring?: {
330
+ interval_count?: number | undefined;
331
+ interval: "day" | "week" | "month" | "year";
332
+ } | undefined;
333
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
334
+ currency: string;
335
+ productId: string;
336
+ unit_amount: number;
337
+ } | {
338
+ recurring?: {
339
+ interval_count?: number | undefined;
340
+ interval: "day" | "week" | "month" | "year";
341
+ } | undefined;
342
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
343
+ currency: string;
344
+ unit_amount: number;
345
+ product_data: {
346
+ description?: string | undefined;
347
+ images?: string[] | undefined;
348
+ tax_code?: string | undefined;
349
+ metadata: Record<string, string | number | null>;
350
+ name: string;
351
+ };
352
+ };
353
+ }, [import('convex/values').VObject<{
354
+ adjustable_quantity?: {
355
+ maximum?: number | undefined;
356
+ minimum?: number | undefined;
357
+ enabled: boolean;
358
+ } | undefined;
359
+ quantity?: number | undefined;
360
+ tax_rates?: string[] | undefined;
361
+ dynamic_tax_rates?: string[] | undefined;
362
+ price: string;
363
+ }, {
364
+ adjustable_quantity: import('convex/values').VObject<{
365
+ maximum?: number | undefined;
366
+ minimum?: number | undefined;
367
+ enabled: boolean;
368
+ } | undefined, {
369
+ enabled: import('convex/values').VBoolean<boolean, "required">;
370
+ maximum: import('convex/values').VFloat64<number | undefined, "optional">;
371
+ minimum: import('convex/values').VFloat64<number | undefined, "optional">;
372
+ }, "optional", "enabled" | "maximum" | "minimum">;
373
+ price: import('convex/values').VString<string, "required">;
374
+ quantity: import('convex/values').VFloat64<number | undefined, "optional">;
375
+ tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
376
+ dynamic_tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
377
+ }, "required", "price" | "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum">, import('convex/values').VObject<{
378
+ adjustable_quantity?: {
379
+ maximum?: number | undefined;
380
+ minimum?: number | undefined;
381
+ enabled: boolean;
382
+ } | undefined;
383
+ quantity?: number | undefined;
384
+ tax_rates?: string[] | undefined;
385
+ dynamic_tax_rates?: string[] | undefined;
386
+ price_data: {
387
+ recurring?: {
388
+ interval_count?: number | undefined;
389
+ interval: "day" | "week" | "month" | "year";
390
+ } | undefined;
391
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
392
+ currency: string;
393
+ productId: string;
394
+ unit_amount: number;
395
+ } | {
396
+ recurring?: {
397
+ interval_count?: number | undefined;
398
+ interval: "day" | "week" | "month" | "year";
399
+ } | undefined;
400
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
401
+ currency: string;
402
+ unit_amount: number;
403
+ product_data: {
404
+ description?: string | undefined;
405
+ images?: string[] | undefined;
406
+ tax_code?: string | undefined;
407
+ metadata: Record<string, string | number | null>;
408
+ name: string;
409
+ };
410
+ };
411
+ }, {
412
+ adjustable_quantity: import('convex/values').VObject<{
413
+ maximum?: number | undefined;
414
+ minimum?: number | undefined;
415
+ enabled: boolean;
416
+ } | undefined, {
417
+ enabled: import('convex/values').VBoolean<boolean, "required">;
418
+ maximum: import('convex/values').VFloat64<number | undefined, "optional">;
419
+ minimum: import('convex/values').VFloat64<number | undefined, "optional">;
420
+ }, "optional", "enabled" | "maximum" | "minimum">;
421
+ price_data: import('convex/values').VUnion<{
422
+ recurring?: {
423
+ interval_count?: number | undefined;
424
+ interval: "day" | "week" | "month" | "year";
425
+ } | undefined;
426
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
427
+ currency: string;
428
+ productId: string;
429
+ unit_amount: number;
430
+ } | {
431
+ recurring?: {
432
+ interval_count?: number | undefined;
433
+ interval: "day" | "week" | "month" | "year";
434
+ } | undefined;
435
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
436
+ currency: string;
437
+ unit_amount: number;
438
+ product_data: {
439
+ description?: string | undefined;
440
+ images?: string[] | undefined;
441
+ tax_code?: string | undefined;
442
+ metadata: Record<string, string | number | null>;
443
+ name: string;
444
+ };
445
+ }, [import('convex/values').VObject<{
446
+ recurring?: {
447
+ interval_count?: number | undefined;
448
+ interval: "day" | "week" | "month" | "year";
449
+ } | undefined;
450
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
451
+ currency: string;
452
+ productId: string;
453
+ unit_amount: number;
454
+ }, {
455
+ currency: import('convex/values').VString<string, "required">;
456
+ productId: import('convex/values').VString<string, "required">;
457
+ recurring: import('convex/values').VObject<{
458
+ interval_count?: number | undefined;
459
+ interval: "day" | "week" | "month" | "year";
460
+ } | undefined, {
461
+ interval: import('convex/values').VUnion<"day" | "week" | "month" | "year", [import('convex/values').VLiteral<"day", "required">, import('convex/values').VLiteral<"week", "required">, import('convex/values').VLiteral<"month", "required">, import('convex/values').VLiteral<"year", "required">], "required", never>;
462
+ interval_count: import('convex/values').VFloat64<number | undefined, "optional">;
463
+ }, "optional", "interval" | "interval_count">;
464
+ tax_behavior: import('convex/values').VUnion<"exclusive" | "inclusive" | "unspecified" | undefined, [import('convex/values').VLiteral<"exclusive", "required">, import('convex/values').VLiteral<"inclusive", "required">, import('convex/values').VLiteral<"unspecified", "required">], "optional", never>;
465
+ unit_amount: import('convex/values').VFloat64<number, "required">;
466
+ }, "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior">, import('convex/values').VObject<{
467
+ recurring?: {
468
+ interval_count?: number | undefined;
469
+ interval: "day" | "week" | "month" | "year";
470
+ } | undefined;
471
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
472
+ currency: string;
473
+ unit_amount: number;
474
+ product_data: {
475
+ description?: string | undefined;
476
+ images?: string[] | undefined;
477
+ tax_code?: string | undefined;
478
+ metadata: Record<string, string | number | null>;
479
+ name: string;
480
+ };
481
+ }, {
482
+ currency: import('convex/values').VString<string, "required">;
483
+ product_data: import('convex/values').VObject<{
484
+ description?: string | undefined;
485
+ images?: string[] | undefined;
486
+ tax_code?: string | undefined;
487
+ metadata: Record<string, string | number | null>;
488
+ name: string;
489
+ }, {
490
+ description: import('convex/values').VString<string | undefined, "optional">;
491
+ images: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
492
+ metadata: import('convex/values').VRecord<Record<string, string | number | null>, import('convex/values').VString<string, "required">, import('convex/values').VUnion<string | number | null, [import('convex/values').VString<string, "required">, import('convex/values').VFloat64<number, "required">, import('convex/values').VNull<null, "required">], "required", never>, "required", string>;
493
+ name: import('convex/values').VString<string, "required">;
494
+ tax_code: import('convex/values').VString<string | undefined, "optional">;
495
+ }, "required", "metadata" | `metadata.${string}` | "name" | "description" | "images" | "tax_code">;
496
+ recurring: import('convex/values').VObject<{
497
+ interval_count?: number | undefined;
498
+ interval: "day" | "week" | "month" | "year";
499
+ } | undefined, {
500
+ interval: import('convex/values').VUnion<"day" | "week" | "month" | "year", [import('convex/values').VLiteral<"day", "required">, import('convex/values').VLiteral<"week", "required">, import('convex/values').VLiteral<"month", "required">, import('convex/values').VLiteral<"year", "required">], "required", never>;
501
+ interval_count: import('convex/values').VFloat64<number | undefined, "optional">;
502
+ }, "optional", "interval" | "interval_count">;
503
+ tax_behavior: import('convex/values').VUnion<"exclusive" | "inclusive" | "unspecified" | undefined, [import('convex/values').VLiteral<"exclusive", "required">, import('convex/values').VLiteral<"inclusive", "required">, import('convex/values').VLiteral<"unspecified", "required">], "optional", never>;
504
+ unit_amount: import('convex/values').VFloat64<number, "required">;
505
+ }, "required", "currency" | "recurring" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.name" | "product_data.description" | "product_data.images" | "product_data.tax_code">], "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.name" | "product_data.description" | "product_data.images" | "product_data.tax_code">;
506
+ quantity: import('convex/values').VFloat64<number | undefined, "optional">;
507
+ tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
508
+ dynamic_tax_rates: import('convex/values').VArray<string[] | undefined, import('convex/values').VString<string, "required">, "optional">;
509
+ }, "required", "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum" | "price_data" | "price_data.currency" | "price_data.recurring" | "price_data.productId" | "price_data.unit_amount" | "price_data.recurring.interval" | "price_data.recurring.interval_count" | "price_data.tax_behavior" | "price_data.product_data" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "price_data.product_data.name" | "price_data.product_data.description" | "price_data.product_data.images" | "price_data.product_data.tax_code">], "required", "price" | "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum" | "price_data" | "price_data.currency" | "price_data.recurring" | "price_data.productId" | "price_data.unit_amount" | "price_data.recurring.interval" | "price_data.recurring.interval_count" | "price_data.tax_behavior" | "price_data.product_data" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "price_data.product_data.name" | "price_data.product_data.description" | "price_data.product_data.images" | "price_data.product_data.tax_code">, "required">;
510
+ success: import('convex/values').VObject<{
511
+ url: string;
512
+ }, {
513
+ url: import('convex/values').VString<string, "required">;
514
+ }, "required", "url">;
515
+ cancel: import('convex/values').VObject<{
516
+ url: string;
517
+ }, {
518
+ url: import('convex/values').VString<string, "required">;
519
+ }, "required", "url">;
520
+ }, "required", "line_items" | "metadata" | `metadata.${string}` | "entityId" | "referenceId" | "createStripeCustomerIfMissing" | "success" | "cancel" | "success.url" | "cancel.url">;
521
+ name: string;
522
+ handler: (context: import('convex/server').GenericActionCtx<import('../schema').StripeDataModel>, args: {
523
+ metadata?: Record<string, string | number | null> | null | undefined;
524
+ createStripeCustomerIfMissing?: boolean | undefined;
525
+ line_items: ({
526
+ adjustable_quantity?: {
527
+ maximum?: number | undefined;
528
+ minimum?: number | undefined;
529
+ enabled: boolean;
530
+ } | undefined;
531
+ quantity?: number | undefined;
532
+ tax_rates?: string[] | undefined;
533
+ dynamic_tax_rates?: string[] | undefined;
534
+ price: string;
535
+ } | {
536
+ adjustable_quantity?: {
537
+ maximum?: number | undefined;
538
+ minimum?: number | undefined;
539
+ enabled: boolean;
540
+ } | undefined;
541
+ quantity?: number | undefined;
542
+ tax_rates?: string[] | undefined;
543
+ dynamic_tax_rates?: string[] | undefined;
544
+ price_data: {
545
+ recurring?: {
546
+ interval_count?: number | undefined;
547
+ interval: "day" | "week" | "month" | "year";
548
+ } | undefined;
549
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
550
+ currency: string;
551
+ productId: string;
552
+ unit_amount: number;
553
+ } | {
554
+ recurring?: {
555
+ interval_count?: number | undefined;
556
+ interval: "day" | "week" | "month" | "year";
557
+ } | undefined;
558
+ tax_behavior?: "exclusive" | "inclusive" | "unspecified" | undefined;
559
+ currency: string;
560
+ unit_amount: number;
561
+ product_data: {
562
+ description?: string | undefined;
563
+ images?: string[] | undefined;
564
+ tax_code?: string | undefined;
565
+ metadata: Record<string, string | number | null>;
566
+ name: string;
567
+ };
568
+ };
569
+ })[];
570
+ entityId: string;
571
+ referenceId: string;
572
+ success: {
573
+ url: string;
574
+ };
575
+ cancel: {
576
+ url: string;
577
+ };
578
+ }, configuration: import('../types').InternalConfiguration) => Promise<Stripe.Response<Stripe.Checkout.Session>>;
579
+ };
@@ -0,0 +1,26 @@
1
+ import { default as Stripe } from 'stripe';
2
+ export declare const PortalImplementation: {
3
+ args: import('convex/values').VObject<{
4
+ createStripeCustomerIfMissing?: boolean | undefined;
5
+ entityId: string;
6
+ return: {
7
+ url: string;
8
+ };
9
+ }, {
10
+ createStripeCustomerIfMissing: import('convex/values').VBoolean<boolean | undefined, "optional">;
11
+ entityId: import('convex/values').VString<string, "required">;
12
+ return: import('convex/values').VObject<{
13
+ url: string;
14
+ }, {
15
+ url: import('convex/values').VString<string, "required">;
16
+ }, "required", "url">;
17
+ }, "required", "entityId" | "createStripeCustomerIfMissing" | "return" | "return.url">;
18
+ name: string;
19
+ handler: (context: import('convex/server').GenericActionCtx<import('../schema').StripeDataModel>, args: {
20
+ createStripeCustomerIfMissing?: boolean | undefined;
21
+ entityId: string;
22
+ return: {
23
+ url: string;
24
+ };
25
+ }, configuration: import('../types').InternalConfiguration) => Promise<Stripe.Response<Stripe.BillingPortal.Session>>;
26
+ };
@@ -0,0 +1,19 @@
1
+ export declare const SetupImplementation: {
2
+ args: import('convex/values').VObject<{
3
+ metadata?: Record<string, any> | undefined;
4
+ email?: string | undefined;
5
+ entityId: string;
6
+ }, {
7
+ entityId: import('convex/values').VString<string, "required">;
8
+ email: import('convex/values').VString<string | undefined, "optional">;
9
+ metadata: import('convex/values').VRecord<Record<string, any> | undefined, import('convex/values').VString<string, "required">, import('convex/values').VAny<any, "required", string>, "optional", string>;
10
+ }, "required", "metadata" | `metadata.${string}` | "email" | "entityId">;
11
+ name: string;
12
+ handler: (context: import('convex/server').GenericActionCtx<import('../schema').StripeDataModel>, args: {
13
+ metadata?: Record<string, any> | undefined;
14
+ email?: string | undefined;
15
+ entityId: string;
16
+ }, configuration: import('../types').InternalConfiguration) => Promise<{
17
+ customerId: string;
18
+ }>;
19
+ };