@raideno/convex-stripe 0.1.13 → 0.1.14

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 (3) hide show
  1. package/dist/index.d.ts +268 -458
  2. package/dist/server.js +128 -145
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ import { GenericActionCtx } from 'convex/server';
4
4
  import { GenericDataModel } from 'convex/server';
5
5
  import { GenericId } from 'convex/values';
6
6
  import { HttpRouter } from 'convex/server';
7
- import { Infer } from 'convex/values';
8
7
  import { RegisteredAction } from 'convex/server';
9
8
  import { RegisteredMutation } from 'convex/server';
10
9
  import { RoutableMethod } from 'convex/server';
@@ -50,11 +49,9 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
50
49
  };
51
50
  };
52
51
  addHttpRoutes: (http: HttpRouter, config?: InputConfiguration) => void;
53
- portal: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof PortalImplementation.args>) => Promise<default_2.Response<default_2.BillingPortal.Session>>;
54
- subscribe: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof SubscribeImplementation.args>) => Promise<{
55
- url: string | null;
56
- }>;
57
- pay: (context: GenericActionCtx<StripeDataModel>, args: Infer<typeof PayImplementation.args>) => Promise<default_2.Response<default_2.Checkout.Session>>;
52
+ portal: (context: GenericActionCtx<StripeDataModel>, args: Parameters<(typeof PortalImplementation)["handler"]>[1]) => Promise<default_2.Response<default_2.BillingPortal.Session>>;
53
+ subscribe: (context: GenericActionCtx<StripeDataModel>, args: Parameters<(typeof SubscribeImplementation)["handler"]>[1]) => Promise<default_2.Response<default_2.Checkout.Session>>;
54
+ pay: (context: GenericActionCtx<StripeDataModel>, args: Parameters<(typeof PayImplementation)["handler"]>[1]) => Promise<default_2.Response<default_2.Checkout.Session>>;
58
55
  };
59
56
  store: RegisteredMutation<"internal", {
60
57
  id?: any;
@@ -66,7 +63,7 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
66
63
  operation: string;
67
64
  table: string;
68
65
  }, Promise<{
69
- id: GenericId<"stripeProducts" | "stripePrices" | "stripeCustomers" | "stripeSubscriptions" | "stripeCoupons" | "stripePromotionCodes" | "stripePayouts" | "stripeRefunds" | "stripePaymentIntents" | "stripeCheckoutSessions" | "stripeInvoices" | "stripeReviews" | "stripePlans" | "stripeDisputes" | "stripeEarlyFraudWarnings" | "stripeTaxIds" | "stripeSetupIntents" | "stripeCreditNotes" | "stripeCharges" | "stripePaymentMethods" | "stripeSubscriptionSchedules">;
66
+ id: GenericId<"stripeProducts" | "stripePrices" | "stripeCustomers" | "stripeSubscriptions" | "stripeCoupons" | "stripePromotionCodes" | "stripePayouts" | "stripeRefunds" | "stripePaymentIntents" | "stripeCheckoutSessions" | "stripeInvoices" | "stripeReviews" | "stripePlans" | "stripeDisputes" | "stripeEarlyFraudWarnings" | "stripeTaxIds" | "stripeSetupIntents" | "stripeCreditNotes" | "stripeCharges" | "stripePaymentMethods" | "stripeSubscriptionSchedules" | "stripeMandates">;
70
67
  deleted?: undefined;
71
68
  doc?: undefined;
72
69
  docs?: undefined;
@@ -280,8 +277,8 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
280
277
  times_redeemed: number;
281
278
  valid: boolean;
282
279
  };
283
- code: string;
284
280
  active: boolean;
281
+ code: string;
285
282
  restrictions: {
286
283
  currency_options?: Record<string, {
287
284
  minimum_amount?: number | null | undefined;
@@ -725,6 +722,7 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
725
722
  id: string;
726
723
  } | null | undefined;
727
724
  payment_method_options?: any;
725
+ mandate?: string | null | undefined;
728
726
  automatic_payment_methods?: {
729
727
  enabled?: boolean | null | undefined;
730
728
  allow_redirects?: "always" | "never" | null | undefined;
@@ -734,7 +732,6 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
734
732
  last_setup_error?: any;
735
733
  attach_to_self?: boolean | null | undefined;
736
734
  latest_attempt?: string | null | undefined;
737
- mandate?: string | null | undefined;
738
735
  single_use_mandate?: string | null | undefined;
739
736
  object: string;
740
737
  id: string;
@@ -981,7 +978,7 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
981
978
  object: string;
982
979
  id: string;
983
980
  customer: string;
984
- status: "canceled" | "completed" | "active" | "not_started" | "released";
981
+ status: "active" | "canceled" | "completed" | "not_started" | "released";
985
982
  created: number;
986
983
  livemode: boolean;
987
984
  billing_mode: {
@@ -992,6 +989,35 @@ export declare const internalConvexStripe: (configuration_: InputConfiguration)
992
989
  };
993
990
  lastSyncedAt: number;
994
991
  subscriptionScheduleId: string;
992
+ } | {
993
+ _id: GenericId<"stripeMandates">;
994
+ _creationTime: number;
995
+ stripe: {
996
+ payment_method_details?: any;
997
+ on_behalf_of?: string | null | undefined;
998
+ multi_use?: any;
999
+ single_use?: {
1000
+ amount: number;
1001
+ currency: string;
1002
+ } | null | undefined;
1003
+ object: string;
1004
+ type: "multi_use" | "single_use";
1005
+ id: string;
1006
+ status: "pending" | "active" | "inactive";
1007
+ livemode: boolean;
1008
+ payment_method: string;
1009
+ customer_acceptance: {
1010
+ accepted_at?: number | null | undefined;
1011
+ offline?: any;
1012
+ online?: {
1013
+ ip_address?: string | null | undefined;
1014
+ user_agent?: string | null | undefined;
1015
+ } | null | undefined;
1016
+ type: "offline" | "online";
1017
+ };
1018
+ };
1019
+ lastSyncedAt: number;
1020
+ mandateId: string;
995
1021
  })[];
996
1022
  id?: undefined;
997
1023
  deleted?: undefined;
@@ -1017,407 +1043,24 @@ export declare class Logger {
1017
1043
  }
1018
1044
 
1019
1045
  declare const PayImplementation: {
1020
- args: VObject< {
1021
- metadata?: Record<string, string | number | null> | null | undefined;
1022
- createStripeCustomerIfMissing?: boolean | undefined;
1023
- line_items: ({
1024
- adjustable_quantity?: {
1025
- maximum?: number | undefined;
1026
- minimum?: number | undefined;
1027
- enabled: boolean;
1028
- } | undefined;
1029
- quantity?: number | undefined;
1030
- tax_rates?: string[] | undefined;
1031
- dynamic_tax_rates?: string[] | undefined;
1032
- price: string;
1033
- } | {
1034
- adjustable_quantity?: {
1035
- maximum?: number | undefined;
1036
- minimum?: number | undefined;
1037
- enabled: boolean;
1038
- } | undefined;
1039
- quantity?: number | undefined;
1040
- tax_rates?: string[] | undefined;
1041
- dynamic_tax_rates?: string[] | undefined;
1042
- price_data: {
1043
- recurring?: {
1044
- interval_count?: number | undefined;
1045
- interval: "day" | "week" | "month" | "year";
1046
- } | undefined;
1047
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1048
- currency: string;
1049
- productId: string;
1050
- unit_amount: number;
1051
- } | {
1052
- recurring?: {
1053
- interval_count?: number | undefined;
1054
- interval: "day" | "week" | "month" | "year";
1055
- } | undefined;
1056
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1057
- currency: string;
1058
- unit_amount: number;
1059
- product_data: {
1060
- description?: string | undefined;
1061
- images?: string[] | undefined;
1062
- tax_code?: string | undefined;
1063
- name: string;
1064
- metadata: Record<string, string | number | null>;
1065
- };
1066
- };
1067
- })[];
1068
- cancel: {
1069
- url: string;
1070
- };
1071
- entityId: string;
1072
- referenceId: string;
1073
- success: {
1074
- url: string;
1075
- };
1076
- }, {
1077
- createStripeCustomerIfMissing: VBoolean<boolean | undefined, "optional">;
1078
- entityId: VString<string, "required">;
1079
- metadata: VUnion<Record<string, string | number | null> | null | undefined, [VRecord<Record<string, string | number | null>, VString<string, "required">, VUnion<string | number | null, [VString<string, "required">, VFloat64<number, "required">, VNull<null, "required">], "required", never>, "required", string>, VNull<null, "required">], "optional", string>;
1080
- referenceId: VString<string, "required">;
1081
- line_items: VArray<({
1082
- adjustable_quantity?: {
1083
- maximum?: number | undefined;
1084
- minimum?: number | undefined;
1085
- enabled: boolean;
1086
- } | undefined;
1087
- quantity?: number | undefined;
1088
- tax_rates?: string[] | undefined;
1089
- dynamic_tax_rates?: string[] | undefined;
1090
- price: string;
1091
- } | {
1092
- adjustable_quantity?: {
1093
- maximum?: number | undefined;
1094
- minimum?: number | undefined;
1095
- enabled: boolean;
1096
- } | undefined;
1097
- quantity?: number | undefined;
1098
- tax_rates?: string[] | undefined;
1099
- dynamic_tax_rates?: string[] | undefined;
1100
- price_data: {
1101
- recurring?: {
1102
- interval_count?: number | undefined;
1103
- interval: "day" | "week" | "month" | "year";
1104
- } | undefined;
1105
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1106
- currency: string;
1107
- productId: string;
1108
- unit_amount: number;
1109
- } | {
1110
- recurring?: {
1111
- interval_count?: number | undefined;
1112
- interval: "day" | "week" | "month" | "year";
1113
- } | undefined;
1114
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1115
- currency: string;
1116
- unit_amount: number;
1117
- product_data: {
1118
- description?: string | undefined;
1119
- images?: string[] | undefined;
1120
- tax_code?: string | undefined;
1121
- name: string;
1122
- metadata: Record<string, string | number | null>;
1123
- };
1124
- };
1125
- })[], VUnion< {
1126
- adjustable_quantity?: {
1127
- maximum?: number | undefined;
1128
- minimum?: number | undefined;
1129
- enabled: boolean;
1130
- } | undefined;
1131
- quantity?: number | undefined;
1132
- tax_rates?: string[] | undefined;
1133
- dynamic_tax_rates?: string[] | undefined;
1134
- price: string;
1135
- } | {
1136
- adjustable_quantity?: {
1137
- maximum?: number | undefined;
1138
- minimum?: number | undefined;
1139
- enabled: boolean;
1140
- } | undefined;
1141
- quantity?: number | undefined;
1142
- tax_rates?: string[] | undefined;
1143
- dynamic_tax_rates?: string[] | undefined;
1144
- price_data: {
1145
- recurring?: {
1146
- interval_count?: number | undefined;
1147
- interval: "day" | "week" | "month" | "year";
1148
- } | undefined;
1149
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1150
- currency: string;
1151
- productId: string;
1152
- unit_amount: number;
1153
- } | {
1154
- recurring?: {
1155
- interval_count?: number | undefined;
1156
- interval: "day" | "week" | "month" | "year";
1157
- } | undefined;
1158
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1159
- currency: string;
1160
- unit_amount: number;
1161
- product_data: {
1162
- description?: string | undefined;
1163
- images?: string[] | undefined;
1164
- tax_code?: string | undefined;
1165
- name: string;
1166
- metadata: Record<string, string | number | null>;
1167
- };
1168
- };
1169
- }, [VObject< {
1170
- adjustable_quantity?: {
1171
- maximum?: number | undefined;
1172
- minimum?: number | undefined;
1173
- enabled: boolean;
1174
- } | undefined;
1175
- quantity?: number | undefined;
1176
- tax_rates?: string[] | undefined;
1177
- dynamic_tax_rates?: string[] | undefined;
1178
- price: string;
1179
- }, {
1180
- adjustable_quantity: VObject< {
1181
- maximum?: number | undefined;
1182
- minimum?: number | undefined;
1183
- enabled: boolean;
1184
- } | undefined, {
1185
- enabled: VBoolean<boolean, "required">;
1186
- maximum: VFloat64<number | undefined, "optional">;
1187
- minimum: VFloat64<number | undefined, "optional">;
1188
- }, "optional", "enabled" | "maximum" | "minimum">;
1189
- price: VString<string, "required">;
1190
- quantity: VFloat64<number | undefined, "optional">;
1191
- tax_rates: VArray<string[] | undefined, VString<string, "required">, "optional">;
1192
- dynamic_tax_rates: VArray<string[] | undefined, VString<string, "required">, "optional">;
1193
- }, "required", "price" | "adjustable_quantity" | "quantity" | "tax_rates" | "dynamic_tax_rates" | "adjustable_quantity.enabled" | "adjustable_quantity.maximum" | "adjustable_quantity.minimum">, VObject< {
1194
- adjustable_quantity?: {
1195
- maximum?: number | undefined;
1196
- minimum?: number | undefined;
1197
- enabled: boolean;
1198
- } | undefined;
1199
- quantity?: number | undefined;
1200
- tax_rates?: string[] | undefined;
1201
- dynamic_tax_rates?: string[] | undefined;
1202
- price_data: {
1203
- recurring?: {
1204
- interval_count?: number | undefined;
1205
- interval: "day" | "week" | "month" | "year";
1206
- } | undefined;
1207
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1208
- currency: string;
1209
- productId: string;
1210
- unit_amount: number;
1211
- } | {
1212
- recurring?: {
1213
- interval_count?: number | undefined;
1214
- interval: "day" | "week" | "month" | "year";
1215
- } | undefined;
1216
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1217
- currency: string;
1218
- unit_amount: number;
1219
- product_data: {
1220
- description?: string | undefined;
1221
- images?: string[] | undefined;
1222
- tax_code?: string | undefined;
1223
- name: string;
1224
- metadata: Record<string, string | number | null>;
1225
- };
1226
- };
1227
- }, {
1228
- adjustable_quantity: VObject< {
1229
- maximum?: number | undefined;
1230
- minimum?: number | undefined;
1231
- enabled: boolean;
1232
- } | undefined, {
1233
- enabled: VBoolean<boolean, "required">;
1234
- maximum: VFloat64<number | undefined, "optional">;
1235
- minimum: VFloat64<number | undefined, "optional">;
1236
- }, "optional", "enabled" | "maximum" | "minimum">;
1237
- price_data: VUnion< {
1238
- recurring?: {
1239
- interval_count?: number | undefined;
1240
- interval: "day" | "week" | "month" | "year";
1241
- } | undefined;
1242
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1243
- currency: string;
1244
- productId: string;
1245
- unit_amount: number;
1246
- } | {
1247
- recurring?: {
1248
- interval_count?: number | undefined;
1249
- interval: "day" | "week" | "month" | "year";
1250
- } | undefined;
1251
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1252
- currency: string;
1253
- unit_amount: number;
1254
- product_data: {
1255
- description?: string | undefined;
1256
- images?: string[] | undefined;
1257
- tax_code?: string | undefined;
1258
- name: string;
1259
- metadata: Record<string, string | number | null>;
1260
- };
1261
- }, [VObject< {
1262
- recurring?: {
1263
- interval_count?: number | undefined;
1264
- interval: "day" | "week" | "month" | "year";
1265
- } | undefined;
1266
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1267
- currency: string;
1268
- productId: string;
1269
- unit_amount: number;
1270
- }, {
1271
- currency: VString<string, "required">;
1272
- productId: VString<string, "required">;
1273
- recurring: VObject< {
1274
- interval_count?: number | undefined;
1275
- interval: "day" | "week" | "month" | "year";
1276
- } | undefined, {
1277
- interval: VUnion<"day" | "week" | "month" | "year", [VLiteral<"day", "required">, VLiteral<"week", "required">, VLiteral<"month", "required">, VLiteral<"year", "required">], "required", never>;
1278
- interval_count: VFloat64<number | undefined, "optional">;
1279
- }, "optional", "interval" | "interval_count">;
1280
- tax_behavior: VUnion<"unspecified" | "exclusive" | "inclusive" | undefined, [VLiteral<"exclusive", "required">, VLiteral<"inclusive", "required">, VLiteral<"unspecified", "required">], "optional", never>;
1281
- unit_amount: VFloat64<number, "required">;
1282
- }, "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior">, VObject< {
1283
- recurring?: {
1284
- interval_count?: number | undefined;
1285
- interval: "day" | "week" | "month" | "year";
1286
- } | undefined;
1287
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1288
- currency: string;
1289
- unit_amount: number;
1290
- product_data: {
1291
- description?: string | undefined;
1292
- images?: string[] | undefined;
1293
- tax_code?: string | undefined;
1294
- name: string;
1295
- metadata: Record<string, string | number | null>;
1296
- };
1297
- }, {
1298
- currency: VString<string, "required">;
1299
- product_data: VObject< {
1300
- description?: string | undefined;
1301
- images?: string[] | undefined;
1302
- tax_code?: string | undefined;
1303
- name: string;
1304
- metadata: Record<string, string | number | null>;
1305
- }, {
1306
- description: VString<string | undefined, "optional">;
1307
- images: VArray<string[] | undefined, VString<string, "required">, "optional">;
1308
- metadata: VRecord<Record<string, string | number | null>, VString<string, "required">, VUnion<string | number | null, [VString<string, "required">, VFloat64<number, "required">, VNull<null, "required">], "required", never>, "required", string>;
1309
- name: VString<string, "required">;
1310
- tax_code: VString<string | undefined, "optional">;
1311
- }, "required", "name" | "description" | "metadata" | `metadata.${string}` | "images" | "tax_code">;
1312
- recurring: VObject< {
1313
- interval_count?: number | undefined;
1314
- interval: "day" | "week" | "month" | "year";
1315
- } | undefined, {
1316
- interval: VUnion<"day" | "week" | "month" | "year", [VLiteral<"day", "required">, VLiteral<"week", "required">, VLiteral<"month", "required">, VLiteral<"year", "required">], "required", never>;
1317
- interval_count: VFloat64<number | undefined, "optional">;
1318
- }, "optional", "interval" | "interval_count">;
1319
- tax_behavior: VUnion<"unspecified" | "exclusive" | "inclusive" | undefined, [VLiteral<"exclusive", "required">, VLiteral<"inclusive", "required">, VLiteral<"unspecified", "required">], "optional", never>;
1320
- unit_amount: VFloat64<number, "required">;
1321
- }, "required", "currency" | "recurring" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.name" | "product_data.description" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.images" | "product_data.tax_code">], "required", "currency" | "recurring" | "productId" | "unit_amount" | "recurring.interval" | "recurring.interval_count" | "tax_behavior" | "product_data" | "product_data.name" | "product_data.description" | "product_data.metadata" | `product_data.metadata.${string}` | "product_data.images" | "product_data.tax_code">;
1322
- quantity: VFloat64<number | undefined, "optional">;
1323
- tax_rates: VArray<string[] | undefined, VString<string, "required">, "optional">;
1324
- dynamic_tax_rates: VArray<string[] | undefined, VString<string, "required">, "optional">;
1325
- }, "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.name" | "price_data.product_data.description" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "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.name" | "price_data.product_data.description" | "price_data.product_data.metadata" | `price_data.product_data.metadata.${string}` | "price_data.product_data.images" | "price_data.product_data.tax_code">, "required">;
1326
- success: VObject< {
1327
- url: string;
1328
- }, {
1329
- url: VString<string, "required">;
1330
- }, "required", "url">;
1331
- cancel: VObject< {
1332
- url: string;
1333
- }, {
1334
- url: VString<string, "required">;
1335
- }, "required", "url">;
1336
- }, "required", "metadata" | `metadata.${string}` | "line_items" | "cancel" | "entityId" | "referenceId" | "createStripeCustomerIfMissing" | "success" | "cancel.url" | "success.url">;
1337
1046
  name: string;
1338
1047
  handler: (context: GenericActionCtx<StripeDataModel>, args: {
1339
- metadata?: Record<string, string | number | null> | null | undefined;
1340
- createStripeCustomerIfMissing?: boolean | undefined;
1341
- line_items: ({
1342
- adjustable_quantity?: {
1343
- maximum?: number | undefined;
1344
- minimum?: number | undefined;
1345
- enabled: boolean;
1346
- } | undefined;
1347
- quantity?: number | undefined;
1348
- tax_rates?: string[] | undefined;
1349
- dynamic_tax_rates?: string[] | undefined;
1350
- price: string;
1351
- } | {
1352
- adjustable_quantity?: {
1353
- maximum?: number | undefined;
1354
- minimum?: number | undefined;
1355
- enabled: boolean;
1356
- } | undefined;
1357
- quantity?: number | undefined;
1358
- tax_rates?: string[] | undefined;
1359
- dynamic_tax_rates?: string[] | undefined;
1360
- price_data: {
1361
- recurring?: {
1362
- interval_count?: number | undefined;
1363
- interval: "day" | "week" | "month" | "year";
1364
- } | undefined;
1365
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1366
- currency: string;
1367
- productId: string;
1368
- unit_amount: number;
1369
- } | {
1370
- recurring?: {
1371
- interval_count?: number | undefined;
1372
- interval: "day" | "week" | "month" | "year";
1373
- } | undefined;
1374
- tax_behavior?: "unspecified" | "exclusive" | "inclusive" | undefined;
1375
- currency: string;
1376
- unit_amount: number;
1377
- product_data: {
1378
- description?: string | undefined;
1379
- images?: string[] | undefined;
1380
- tax_code?: string | undefined;
1381
- name: string;
1382
- metadata: Record<string, string | number | null>;
1383
- };
1384
- };
1385
- })[];
1386
- cancel: {
1387
- url: string;
1388
- };
1048
+ createStripeCustomerIfMissing?: boolean;
1389
1049
  entityId: string;
1050
+ cancel_url: string;
1051
+ success_url: string;
1390
1052
  referenceId: string;
1391
- success: {
1392
- url: string;
1393
- };
1394
- }, configuration: InternalConfiguration) => Promise<default_2.Response<default_2.Checkout.Session>>;
1053
+ mode: "payment";
1054
+ } & Omit<default_2.Checkout.SessionCreateParams, "customer" | "client_reference_id" | "mode" | "success_url" | "ui_mode" | "cancel_url">, configuration: InternalConfiguration) => Promise<default_2.Response<default_2.Checkout.Session>>;
1395
1055
  };
1396
1056
 
1397
1057
  declare const PortalImplementation: {
1398
- args: VObject< {
1399
- createStripeCustomerIfMissing?: boolean | undefined;
1400
- entityId: string;
1401
- return: {
1402
- url: string;
1403
- };
1404
- }, {
1405
- createStripeCustomerIfMissing: VBoolean<boolean | undefined, "optional">;
1406
- entityId: VString<string, "required">;
1407
- return: VObject< {
1408
- url: string;
1409
- }, {
1410
- url: VString<string, "required">;
1411
- }, "required", "url">;
1412
- }, "required", "entityId" | "createStripeCustomerIfMissing" | "return" | "return.url">;
1413
1058
  name: string;
1414
1059
  handler: (context: GenericActionCtx<StripeDataModel>, args: {
1415
- createStripeCustomerIfMissing?: boolean | undefined;
1060
+ createStripeCustomerIfMissing?: boolean;
1416
1061
  entityId: string;
1417
- return: {
1418
- url: string;
1419
- };
1420
- }, configuration: InternalConfiguration) => Promise<default_2.Response<default_2.BillingPortal.Session>>;
1062
+ return_url: string;
1063
+ } & Omit<default_2.BillingPortal.SessionCreateParams, "customer" | "return_url">, configuration: InternalConfiguration) => Promise<default_2.Response<default_2.BillingPortal.Session>>;
1421
1064
  };
1422
1065
 
1423
1066
  declare type StripeDataModel = DataModelFromSchemaDefinition<typeof stripeSchema>;
@@ -2020,8 +1663,8 @@ duration: "forever" | "once" | "repeating";
2020
1663
  times_redeemed: number;
2021
1664
  valid: boolean;
2022
1665
  };
2023
- code: string;
2024
1666
  active: boolean;
1667
+ code: string;
2025
1668
  restrictions: {
2026
1669
  currency_options?: Record<string, {
2027
1670
  minimum_amount?: number | null | undefined;
@@ -2068,8 +1711,8 @@ duration: "forever" | "once" | "repeating";
2068
1711
  times_redeemed: number;
2069
1712
  valid: boolean;
2070
1713
  };
2071
- code: string;
2072
1714
  active: boolean;
1715
+ code: string;
2073
1716
  restrictions: {
2074
1717
  currency_options?: Record<string, {
2075
1718
  minimum_amount?: number | null | undefined;
@@ -2166,7 +1809,7 @@ minimum_amount: VUnion<number | null | undefined, [VFloat64<number, "required">,
2166
1809
  minimum_amount_currency: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
2167
1810
  }, "required", "currency_options" | `currency_options.${string}` | "minimum_amount" | "first_time_transaction" | "minimum_amount_currency">;
2168
1811
  times_redeemed: VFloat64<number, "required">;
2169
- }, "required", "object" | "id" | "customer" | "metadata" | "created" | "livemode" | `metadata.${string}` | "expires_at" | "max_redemptions" | "times_redeemed" | "coupon" | "code" | "active" | "restrictions" | "coupon.object" | "coupon.id" | "coupon.name" | "coupon.currency" | "coupon.metadata" | "coupon.created" | "coupon.livemode" | `coupon.metadata.${string}` | "coupon.amount_off" | "coupon.duration" | "coupon.percent_off" | "coupon.applies_to" | "coupon.currency_options" | "coupon.duration_in_months" | "coupon.max_redemptions" | "coupon.redeem_by" | "coupon.times_redeemed" | "coupon.valid" | "coupon.applies_to.products" | `coupon.currency_options.${string}` | "restrictions.currency_options" | `restrictions.currency_options.${string}` | "restrictions.minimum_amount" | "restrictions.first_time_transaction" | "restrictions.minimum_amount_currency">;
1812
+ }, "required", "object" | "id" | "customer" | "metadata" | "created" | "livemode" | `metadata.${string}` | "expires_at" | "max_redemptions" | "times_redeemed" | "coupon" | "active" | "code" | "restrictions" | "coupon.object" | "coupon.id" | "coupon.name" | "coupon.currency" | "coupon.metadata" | "coupon.created" | "coupon.livemode" | `coupon.metadata.${string}` | "coupon.amount_off" | "coupon.duration" | "coupon.percent_off" | "coupon.applies_to" | "coupon.currency_options" | "coupon.duration_in_months" | "coupon.max_redemptions" | "coupon.redeem_by" | "coupon.times_redeemed" | "coupon.valid" | "coupon.applies_to.products" | `coupon.currency_options.${string}` | "restrictions.currency_options" | `restrictions.currency_options.${string}` | "restrictions.minimum_amount" | "restrictions.first_time_transaction" | "restrictions.minimum_amount_currency">;
2170
1813
  lastSyncedAt: VFloat64<number, "required">;
2171
1814
  }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.active" | "stripe.max_redemptions" | "stripe.times_redeemed" | "promotionCodeId" | "stripe.customer" | "stripe.expires_at" | "stripe.coupon" | "stripe.code" | "stripe.restrictions" | "stripe.coupon.object" | "stripe.coupon.id" | "stripe.coupon.name" | "stripe.coupon.currency" | "stripe.coupon.metadata" | "stripe.coupon.created" | "stripe.coupon.livemode" | `stripe.coupon.metadata.${string}` | "stripe.coupon.amount_off" | "stripe.coupon.duration" | "stripe.coupon.percent_off" | "stripe.coupon.applies_to" | "stripe.coupon.currency_options" | "stripe.coupon.duration_in_months" | "stripe.coupon.max_redemptions" | "stripe.coupon.redeem_by" | "stripe.coupon.times_redeemed" | "stripe.coupon.valid" | "stripe.coupon.applies_to.products" | `stripe.coupon.currency_options.${string}` | "stripe.restrictions.currency_options" | `stripe.restrictions.currency_options.${string}` | "stripe.restrictions.minimum_amount" | "stripe.restrictions.first_time_transaction" | "stripe.restrictions.minimum_amount_currency">, {
2172
1815
  byPromotionCodeId: ["promotionCodeId", "_creationTime"];
@@ -3469,6 +3112,7 @@ parent?: string | null | undefined;
3469
3112
  id: string;
3470
3113
  } | null | undefined;
3471
3114
  payment_method_options?: any;
3115
+ mandate?: string | null | undefined;
3472
3116
  automatic_payment_methods?: {
3473
3117
  enabled?: boolean | null | undefined;
3474
3118
  allow_redirects?: "always" | "never" | null | undefined;
@@ -3478,7 +3122,6 @@ cancellation_reason?: "duplicate" | "abandoned" | "requested_by_customer" | null
3478
3122
  last_setup_error?: any;
3479
3123
  attach_to_self?: boolean | null | undefined;
3480
3124
  latest_attempt?: string | null | undefined;
3481
- mandate?: string | null | undefined;
3482
3125
  single_use_mandate?: string | null | undefined;
3483
3126
  object: string;
3484
3127
  id: string;
@@ -3506,6 +3149,7 @@ parent?: string | null | undefined;
3506
3149
  id: string;
3507
3150
  } | null | undefined;
3508
3151
  payment_method_options?: any;
3152
+ mandate?: string | null | undefined;
3509
3153
  automatic_payment_methods?: {
3510
3154
  enabled?: boolean | null | undefined;
3511
3155
  allow_redirects?: "always" | "never" | null | undefined;
@@ -3515,7 +3159,6 @@ cancellation_reason?: "duplicate" | "abandoned" | "requested_by_customer" | null
3515
3159
  last_setup_error?: any;
3516
3160
  attach_to_self?: boolean | null | undefined;
3517
3161
  latest_attempt?: string | null | undefined;
3518
- mandate?: string | null | undefined;
3519
3162
  single_use_mandate?: string | null | undefined;
3520
3163
  object: string;
3521
3164
  id: string;
@@ -3569,9 +3212,9 @@ parent: VUnion<string | null | undefined, [VString<string, "required">, VNull<nu
3569
3212
  payment_method_options: VAny<any, "optional", string>;
3570
3213
  payment_method_types: VArray<string[], VString<string, "required">, "required">;
3571
3214
  single_use_mandate: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
3572
- }, "required", "object" | "id" | "customer" | "description" | "metadata" | "status" | "application" | "created" | "livemode" | "on_behalf_of" | "payment_method" | `metadata.${string}` | "client_secret" | "payment_method_configuration_details" | "payment_method_options" | "payment_method_types" | `payment_method_options.${string}` | "automatic_payment_methods" | "next_action" | "cancellation_reason" | "payment_method_configuration_details.id" | "payment_method_configuration_details.parent" | "automatic_payment_methods.enabled" | "automatic_payment_methods.allow_redirects" | `next_action.${string}` | "last_setup_error" | "usage" | "attach_to_self" | "flow_directions" | "latest_attempt" | "mandate" | "single_use_mandate" | `last_setup_error.${string}`>;
3215
+ }, "required", "object" | "id" | "customer" | "description" | "metadata" | "status" | "application" | "created" | "livemode" | "on_behalf_of" | "payment_method" | `metadata.${string}` | "client_secret" | "payment_method_configuration_details" | "payment_method_options" | "payment_method_types" | `payment_method_options.${string}` | "mandate" | "automatic_payment_methods" | "next_action" | "cancellation_reason" | "payment_method_configuration_details.id" | "payment_method_configuration_details.parent" | "automatic_payment_methods.enabled" | "automatic_payment_methods.allow_redirects" | `next_action.${string}` | "last_setup_error" | "usage" | "attach_to_self" | "flow_directions" | "latest_attempt" | "single_use_mandate" | `last_setup_error.${string}`>;
3573
3216
  lastSyncedAt: VFloat64<number, "required">;
3574
- }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.description" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.customer" | "stripe.status" | "stripe.next_action" | `stripe.next_action.${string}` | "stripe.application" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.client_secret" | "stripe.payment_method_configuration_details" | "stripe.payment_method_options" | "stripe.payment_method_types" | `stripe.payment_method_options.${string}` | "stripe.automatic_payment_methods" | "stripe.cancellation_reason" | "stripe.payment_method_configuration_details.id" | "stripe.payment_method_configuration_details.parent" | "stripe.automatic_payment_methods.enabled" | "stripe.automatic_payment_methods.allow_redirects" | "setupIntentId" | "stripe.last_setup_error" | "stripe.usage" | "stripe.attach_to_self" | "stripe.flow_directions" | "stripe.latest_attempt" | "stripe.mandate" | "stripe.single_use_mandate" | `stripe.last_setup_error.${string}`>, {
3217
+ }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.description" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.customer" | "stripe.status" | "stripe.next_action" | `stripe.next_action.${string}` | "stripe.application" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.client_secret" | "stripe.payment_method_configuration_details" | "stripe.payment_method_options" | "stripe.payment_method_types" | `stripe.payment_method_options.${string}` | "stripe.automatic_payment_methods" | "stripe.cancellation_reason" | "stripe.payment_method_configuration_details.id" | "stripe.payment_method_configuration_details.parent" | "stripe.automatic_payment_methods.enabled" | "stripe.automatic_payment_methods.allow_redirects" | "setupIntentId" | "stripe.mandate" | "stripe.last_setup_error" | "stripe.usage" | "stripe.attach_to_self" | "stripe.flow_directions" | "stripe.latest_attempt" | "stripe.single_use_mandate" | `stripe.last_setup_error.${string}`>, {
3575
3218
  bySetupIntentId: ["setupIntentId", "_creationTime"];
3576
3219
  }, {}, {}>;
3577
3220
  stripeCreditNotes: TableDefinition<VObject< {
@@ -4200,7 +3843,7 @@ released_subscription?: string | null | undefined;
4200
3843
  object: string;
4201
3844
  id: string;
4202
3845
  customer: string;
4203
- status: "canceled" | "completed" | "active" | "not_started" | "released";
3846
+ status: "active" | "canceled" | "completed" | "not_started" | "released";
4204
3847
  created: number;
4205
3848
  livemode: boolean;
4206
3849
  billing_mode: {
@@ -4261,7 +3904,7 @@ released_subscription?: string | null | undefined;
4261
3904
  object: string;
4262
3905
  id: string;
4263
3906
  customer: string;
4264
- status: "canceled" | "completed" | "active" | "not_started" | "released";
3907
+ status: "active" | "canceled" | "completed" | "not_started" | "released";
4265
3908
  created: number;
4266
3909
  livemode: boolean;
4267
3910
  billing_mode: {
@@ -4284,7 +3927,7 @@ start_date: VFloat64<number, "required">;
4284
3927
  customer: VString<string, "required">;
4285
3928
  metadata: VUnion<Record<string, string | number | null> | null | undefined, [VRecord<Record<string, string | number | null>, VString<string, "required">, VUnion<string | number | null, [VString<string, "required">, VFloat64<number, "required">, VNull<null, "required">], "required", never>, "required", string>, VNull<null, "required">], "optional", string>;
4286
3929
  phases: VAny<any, "optional", string>;
4287
- status: VUnion<"canceled" | "completed" | "active" | "not_started" | "released", [VLiteral<"active", "required">, VLiteral<"canceled", "required">, VLiteral<"completed", "required">, VLiteral<"not_started", "required">, VLiteral<"released", "required">], "required", never>;
3930
+ status: VUnion<"active" | "canceled" | "completed" | "not_started" | "released", [VLiteral<"active", "required">, VLiteral<"canceled", "required">, VLiteral<"completed", "required">, VLiteral<"not_started", "required">, VLiteral<"released", "required">], "required", never>;
4288
3931
  object: VString<string, "required">;
4289
3932
  application: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
4290
3933
  billing_mode: VObject< {
@@ -4450,6 +4093,106 @@ lastSyncedAt: VFloat64<number, "required">;
4450
4093
  }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.test_clock" | "stripe.customer" | "stripe.status" | "stripe.application" | "stripe.canceled_at" | "subscriptionScheduleId" | "stripe.current_phase" | "stripe.phases" | "stripe.billing_mode" | "stripe.completed_at" | "stripe.default_settings" | "stripe.end_behavior" | "stripe.released_at" | "stripe.released_subscription" | "stripe.current_phase.end_date" | "stripe.current_phase.start_date" | `stripe.phases.${string}` | "stripe.billing_mode.type" | "stripe.billing_mode.updated_at" | "stripe.default_settings.description" | "stripe.default_settings.on_behalf_of" | "stripe.default_settings.transfer_data" | "stripe.default_settings.automatic_tax" | "stripe.default_settings.invoice_settings" | "stripe.default_settings.collection_method" | "stripe.default_settings.default_payment_method" | "stripe.default_settings.application_fee_percent" | "stripe.default_settings.billing_cycle_anchor" | "stripe.default_settings.billing_thresholds" | "stripe.default_settings.transfer_data.destination" | "stripe.default_settings.transfer_data.amount_percent" | "stripe.default_settings.automatic_tax.enabled" | "stripe.default_settings.automatic_tax.disabled_reason" | "stripe.default_settings.automatic_tax.liability" | "stripe.default_settings.automatic_tax.liability.type" | "stripe.default_settings.automatic_tax.liability.account" | "stripe.default_settings.invoice_settings.account_tax_ids" | "stripe.default_settings.invoice_settings.issuer" | "stripe.default_settings.invoice_settings.days_until_due" | "stripe.default_settings.invoice_settings.issuer.type" | "stripe.default_settings.invoice_settings.issuer.account" | "stripe.default_settings.billing_thresholds.amount_gte" | "stripe.default_settings.billing_thresholds.reset_billing_cycle_anchor">, {
4451
4094
  bySubscriptionScheduleId: ["subscriptionScheduleId", "_creationTime"];
4452
4095
  }, {}, {}>;
4096
+ stripeMandates: TableDefinition<VObject< {
4097
+ stripe: {
4098
+ payment_method_details?: any;
4099
+ on_behalf_of?: string | null | undefined;
4100
+ multi_use?: any;
4101
+ single_use?: {
4102
+ amount: number;
4103
+ currency: string;
4104
+ } | null | undefined;
4105
+ object: string;
4106
+ type: "multi_use" | "single_use";
4107
+ id: string;
4108
+ status: "pending" | "active" | "inactive";
4109
+ livemode: boolean;
4110
+ payment_method: string;
4111
+ customer_acceptance: {
4112
+ accepted_at?: number | null | undefined;
4113
+ offline?: any;
4114
+ online?: {
4115
+ ip_address?: string | null | undefined;
4116
+ user_agent?: string | null | undefined;
4117
+ } | null | undefined;
4118
+ type: "offline" | "online";
4119
+ };
4120
+ };
4121
+ lastSyncedAt: number;
4122
+ mandateId: string;
4123
+ }, {
4124
+ mandateId: VString<string, "required">;
4125
+ stripe: VObject< {
4126
+ payment_method_details?: any;
4127
+ on_behalf_of?: string | null | undefined;
4128
+ multi_use?: any;
4129
+ single_use?: {
4130
+ amount: number;
4131
+ currency: string;
4132
+ } | null | undefined;
4133
+ object: string;
4134
+ type: "multi_use" | "single_use";
4135
+ id: string;
4136
+ status: "pending" | "active" | "inactive";
4137
+ livemode: boolean;
4138
+ payment_method: string;
4139
+ customer_acceptance: {
4140
+ accepted_at?: number | null | undefined;
4141
+ offline?: any;
4142
+ online?: {
4143
+ ip_address?: string | null | undefined;
4144
+ user_agent?: string | null | undefined;
4145
+ } | null | undefined;
4146
+ type: "offline" | "online";
4147
+ };
4148
+ }, {
4149
+ id: VString<string, "required">;
4150
+ customer_acceptance: VObject< {
4151
+ accepted_at?: number | null | undefined;
4152
+ offline?: any;
4153
+ online?: {
4154
+ ip_address?: string | null | undefined;
4155
+ user_agent?: string | null | undefined;
4156
+ } | null | undefined;
4157
+ type: "offline" | "online";
4158
+ }, {
4159
+ accepted_at: VUnion<number | null | undefined, [VFloat64<number, "required">, VNull<null, "required">], "optional", never>;
4160
+ offline: VAny<any, "optional", string>;
4161
+ online: VUnion< {
4162
+ ip_address?: string | null | undefined;
4163
+ user_agent?: string | null | undefined;
4164
+ } | null | undefined, [VObject< {
4165
+ ip_address?: string | null | undefined;
4166
+ user_agent?: string | null | undefined;
4167
+ }, {
4168
+ ip_address: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
4169
+ user_agent: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
4170
+ }, "required", "ip_address" | "user_agent">, VNull<null, "required">], "optional", "ip_address" | "user_agent">;
4171
+ type: VUnion<"offline" | "online", [VLiteral<"offline", "required">, VLiteral<"online", "required">], "required", never>;
4172
+ }, "required", "type" | "accepted_at" | "offline" | "online" | `offline.${string}` | "online.ip_address" | "online.user_agent">;
4173
+ payment_method: VString<string, "required">;
4174
+ payment_method_details: VAny<any, "optional", string>;
4175
+ status: VUnion<"pending" | "active" | "inactive", [VLiteral<"active", "required">, VLiteral<"inactive", "required">, VLiteral<"pending", "required">], "required", never>;
4176
+ type: VUnion<"multi_use" | "single_use", [VLiteral<"multi_use", "required">, VLiteral<"single_use", "required">], "required", never>;
4177
+ object: VString<string, "required">;
4178
+ livemode: VBoolean<boolean, "required">;
4179
+ multi_use: VAny<any, "optional", string>;
4180
+ on_behalf_of: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
4181
+ single_use: VUnion< {
4182
+ amount: number;
4183
+ currency: string;
4184
+ } | null | undefined, [VObject< {
4185
+ amount: number;
4186
+ currency: string;
4187
+ }, {
4188
+ amount: VFloat64<number, "required">;
4189
+ currency: VString<string, "required">;
4190
+ }, "required", "amount" | "currency">, VNull<null, "required">], "optional", "amount" | "currency">;
4191
+ }, "required", "object" | "type" | "id" | "payment_method_details" | "status" | "livemode" | "on_behalf_of" | "payment_method" | `payment_method_details.${string}` | "multi_use" | "single_use" | "customer_acceptance" | `multi_use.${string}` | "single_use.amount" | "single_use.currency" | "customer_acceptance.type" | "customer_acceptance.accepted_at" | "customer_acceptance.offline" | "customer_acceptance.online" | `customer_acceptance.offline.${string}` | "customer_acceptance.online.ip_address" | "customer_acceptance.online.user_agent">;
4192
+ lastSyncedAt: VFloat64<number, "required">;
4193
+ }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.livemode" | "stripe.type" | "stripe.status" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.payment_method_details" | `stripe.payment_method_details.${string}` | "mandateId" | "stripe.multi_use" | "stripe.single_use" | "stripe.customer_acceptance" | `stripe.multi_use.${string}` | "stripe.single_use.amount" | "stripe.single_use.currency" | "stripe.customer_acceptance.type" | "stripe.customer_acceptance.accepted_at" | "stripe.customer_acceptance.offline" | "stripe.customer_acceptance.online" | `stripe.customer_acceptance.offline.${string}` | "stripe.customer_acceptance.online.ip_address" | "stripe.customer_acceptance.online.user_agent">, {
4194
+ byMandateId: ["mandateId", "_creationTime"];
4195
+ }, {}, {}>;
4453
4196
  }, true>;
4454
4197
 
4455
4198
  export declare const stripeTables: {
@@ -5050,8 +4793,8 @@ export declare const stripeTables: {
5050
4793
  times_redeemed: number;
5051
4794
  valid: boolean;
5052
4795
  };
5053
- code: string;
5054
4796
  active: boolean;
4797
+ code: string;
5055
4798
  restrictions: {
5056
4799
  currency_options?: Record<string, {
5057
4800
  minimum_amount?: number | null | undefined;
@@ -5098,8 +4841,8 @@ export declare const stripeTables: {
5098
4841
  times_redeemed: number;
5099
4842
  valid: boolean;
5100
4843
  };
5101
- code: string;
5102
4844
  active: boolean;
4845
+ code: string;
5103
4846
  restrictions: {
5104
4847
  currency_options?: Record<string, {
5105
4848
  minimum_amount?: number | null | undefined;
@@ -5196,7 +4939,7 @@ export declare const stripeTables: {
5196
4939
  minimum_amount_currency: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
5197
4940
  }, "required", "currency_options" | `currency_options.${string}` | "minimum_amount" | "first_time_transaction" | "minimum_amount_currency">;
5198
4941
  times_redeemed: VFloat64<number, "required">;
5199
- }, "required", "object" | "id" | "customer" | "metadata" | "created" | "livemode" | `metadata.${string}` | "expires_at" | "max_redemptions" | "times_redeemed" | "coupon" | "code" | "active" | "restrictions" | "coupon.object" | "coupon.id" | "coupon.name" | "coupon.currency" | "coupon.metadata" | "coupon.created" | "coupon.livemode" | `coupon.metadata.${string}` | "coupon.amount_off" | "coupon.duration" | "coupon.percent_off" | "coupon.applies_to" | "coupon.currency_options" | "coupon.duration_in_months" | "coupon.max_redemptions" | "coupon.redeem_by" | "coupon.times_redeemed" | "coupon.valid" | "coupon.applies_to.products" | `coupon.currency_options.${string}` | "restrictions.currency_options" | `restrictions.currency_options.${string}` | "restrictions.minimum_amount" | "restrictions.first_time_transaction" | "restrictions.minimum_amount_currency">;
4942
+ }, "required", "object" | "id" | "customer" | "metadata" | "created" | "livemode" | `metadata.${string}` | "expires_at" | "max_redemptions" | "times_redeemed" | "coupon" | "active" | "code" | "restrictions" | "coupon.object" | "coupon.id" | "coupon.name" | "coupon.currency" | "coupon.metadata" | "coupon.created" | "coupon.livemode" | `coupon.metadata.${string}` | "coupon.amount_off" | "coupon.duration" | "coupon.percent_off" | "coupon.applies_to" | "coupon.currency_options" | "coupon.duration_in_months" | "coupon.max_redemptions" | "coupon.redeem_by" | "coupon.times_redeemed" | "coupon.valid" | "coupon.applies_to.products" | `coupon.currency_options.${string}` | "restrictions.currency_options" | `restrictions.currency_options.${string}` | "restrictions.minimum_amount" | "restrictions.first_time_transaction" | "restrictions.minimum_amount_currency">;
5200
4943
  lastSyncedAt: VFloat64<number, "required">;
5201
4944
  }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.active" | "stripe.max_redemptions" | "stripe.times_redeemed" | "promotionCodeId" | "stripe.customer" | "stripe.expires_at" | "stripe.coupon" | "stripe.code" | "stripe.restrictions" | "stripe.coupon.object" | "stripe.coupon.id" | "stripe.coupon.name" | "stripe.coupon.currency" | "stripe.coupon.metadata" | "stripe.coupon.created" | "stripe.coupon.livemode" | `stripe.coupon.metadata.${string}` | "stripe.coupon.amount_off" | "stripe.coupon.duration" | "stripe.coupon.percent_off" | "stripe.coupon.applies_to" | "stripe.coupon.currency_options" | "stripe.coupon.duration_in_months" | "stripe.coupon.max_redemptions" | "stripe.coupon.redeem_by" | "stripe.coupon.times_redeemed" | "stripe.coupon.valid" | "stripe.coupon.applies_to.products" | `stripe.coupon.currency_options.${string}` | "stripe.restrictions.currency_options" | `stripe.restrictions.currency_options.${string}` | "stripe.restrictions.minimum_amount" | "stripe.restrictions.first_time_transaction" | "stripe.restrictions.minimum_amount_currency">, {
5202
4945
  byPromotionCodeId: ["promotionCodeId", "_creationTime"];
@@ -6499,6 +6242,7 @@ export declare const stripeTables: {
6499
6242
  id: string;
6500
6243
  } | null | undefined;
6501
6244
  payment_method_options?: any;
6245
+ mandate?: string | null | undefined;
6502
6246
  automatic_payment_methods?: {
6503
6247
  enabled?: boolean | null | undefined;
6504
6248
  allow_redirects?: "always" | "never" | null | undefined;
@@ -6508,7 +6252,6 @@ export declare const stripeTables: {
6508
6252
  last_setup_error?: any;
6509
6253
  attach_to_self?: boolean | null | undefined;
6510
6254
  latest_attempt?: string | null | undefined;
6511
- mandate?: string | null | undefined;
6512
6255
  single_use_mandate?: string | null | undefined;
6513
6256
  object: string;
6514
6257
  id: string;
@@ -6536,6 +6279,7 @@ export declare const stripeTables: {
6536
6279
  id: string;
6537
6280
  } | null | undefined;
6538
6281
  payment_method_options?: any;
6282
+ mandate?: string | null | undefined;
6539
6283
  automatic_payment_methods?: {
6540
6284
  enabled?: boolean | null | undefined;
6541
6285
  allow_redirects?: "always" | "never" | null | undefined;
@@ -6545,7 +6289,6 @@ export declare const stripeTables: {
6545
6289
  last_setup_error?: any;
6546
6290
  attach_to_self?: boolean | null | undefined;
6547
6291
  latest_attempt?: string | null | undefined;
6548
- mandate?: string | null | undefined;
6549
6292
  single_use_mandate?: string | null | undefined;
6550
6293
  object: string;
6551
6294
  id: string;
@@ -6599,9 +6342,9 @@ export declare const stripeTables: {
6599
6342
  payment_method_options: VAny<any, "optional", string>;
6600
6343
  payment_method_types: VArray<string[], VString<string, "required">, "required">;
6601
6344
  single_use_mandate: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
6602
- }, "required", "object" | "id" | "customer" | "description" | "metadata" | "status" | "application" | "created" | "livemode" | "on_behalf_of" | "payment_method" | `metadata.${string}` | "client_secret" | "payment_method_configuration_details" | "payment_method_options" | "payment_method_types" | `payment_method_options.${string}` | "automatic_payment_methods" | "next_action" | "cancellation_reason" | "payment_method_configuration_details.id" | "payment_method_configuration_details.parent" | "automatic_payment_methods.enabled" | "automatic_payment_methods.allow_redirects" | `next_action.${string}` | "last_setup_error" | "usage" | "attach_to_self" | "flow_directions" | "latest_attempt" | "mandate" | "single_use_mandate" | `last_setup_error.${string}`>;
6345
+ }, "required", "object" | "id" | "customer" | "description" | "metadata" | "status" | "application" | "created" | "livemode" | "on_behalf_of" | "payment_method" | `metadata.${string}` | "client_secret" | "payment_method_configuration_details" | "payment_method_options" | "payment_method_types" | `payment_method_options.${string}` | "mandate" | "automatic_payment_methods" | "next_action" | "cancellation_reason" | "payment_method_configuration_details.id" | "payment_method_configuration_details.parent" | "automatic_payment_methods.enabled" | "automatic_payment_methods.allow_redirects" | `next_action.${string}` | "last_setup_error" | "usage" | "attach_to_self" | "flow_directions" | "latest_attempt" | "single_use_mandate" | `last_setup_error.${string}`>;
6603
6346
  lastSyncedAt: VFloat64<number, "required">;
6604
- }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.description" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.customer" | "stripe.status" | "stripe.next_action" | `stripe.next_action.${string}` | "stripe.application" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.client_secret" | "stripe.payment_method_configuration_details" | "stripe.payment_method_options" | "stripe.payment_method_types" | `stripe.payment_method_options.${string}` | "stripe.automatic_payment_methods" | "stripe.cancellation_reason" | "stripe.payment_method_configuration_details.id" | "stripe.payment_method_configuration_details.parent" | "stripe.automatic_payment_methods.enabled" | "stripe.automatic_payment_methods.allow_redirects" | "setupIntentId" | "stripe.last_setup_error" | "stripe.usage" | "stripe.attach_to_self" | "stripe.flow_directions" | "stripe.latest_attempt" | "stripe.mandate" | "stripe.single_use_mandate" | `stripe.last_setup_error.${string}`>, {
6347
+ }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.description" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.customer" | "stripe.status" | "stripe.next_action" | `stripe.next_action.${string}` | "stripe.application" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.client_secret" | "stripe.payment_method_configuration_details" | "stripe.payment_method_options" | "stripe.payment_method_types" | `stripe.payment_method_options.${string}` | "stripe.automatic_payment_methods" | "stripe.cancellation_reason" | "stripe.payment_method_configuration_details.id" | "stripe.payment_method_configuration_details.parent" | "stripe.automatic_payment_methods.enabled" | "stripe.automatic_payment_methods.allow_redirects" | "setupIntentId" | "stripe.mandate" | "stripe.last_setup_error" | "stripe.usage" | "stripe.attach_to_self" | "stripe.flow_directions" | "stripe.latest_attempt" | "stripe.single_use_mandate" | `stripe.last_setup_error.${string}`>, {
6605
6348
  bySetupIntentId: ["setupIntentId", "_creationTime"];
6606
6349
  }, {}, {}>;
6607
6350
  stripeCreditNotes: TableDefinition<VObject< {
@@ -7230,7 +6973,7 @@ export declare const stripeTables: {
7230
6973
  object: string;
7231
6974
  id: string;
7232
6975
  customer: string;
7233
- status: "canceled" | "completed" | "active" | "not_started" | "released";
6976
+ status: "active" | "canceled" | "completed" | "not_started" | "released";
7234
6977
  created: number;
7235
6978
  livemode: boolean;
7236
6979
  billing_mode: {
@@ -7291,7 +7034,7 @@ export declare const stripeTables: {
7291
7034
  object: string;
7292
7035
  id: string;
7293
7036
  customer: string;
7294
- status: "canceled" | "completed" | "active" | "not_started" | "released";
7037
+ status: "active" | "canceled" | "completed" | "not_started" | "released";
7295
7038
  created: number;
7296
7039
  livemode: boolean;
7297
7040
  billing_mode: {
@@ -7314,7 +7057,7 @@ export declare const stripeTables: {
7314
7057
  customer: VString<string, "required">;
7315
7058
  metadata: VUnion<Record<string, string | number | null> | null | undefined, [VRecord<Record<string, string | number | null>, VString<string, "required">, VUnion<string | number | null, [VString<string, "required">, VFloat64<number, "required">, VNull<null, "required">], "required", never>, "required", string>, VNull<null, "required">], "optional", string>;
7316
7059
  phases: VAny<any, "optional", string>;
7317
- status: VUnion<"canceled" | "completed" | "active" | "not_started" | "released", [VLiteral<"active", "required">, VLiteral<"canceled", "required">, VLiteral<"completed", "required">, VLiteral<"not_started", "required">, VLiteral<"released", "required">], "required", never>;
7060
+ status: VUnion<"active" | "canceled" | "completed" | "not_started" | "released", [VLiteral<"active", "required">, VLiteral<"canceled", "required">, VLiteral<"completed", "required">, VLiteral<"not_started", "required">, VLiteral<"released", "required">], "required", never>;
7318
7061
  object: VString<string, "required">;
7319
7062
  application: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
7320
7063
  billing_mode: VObject< {
@@ -7480,51 +7223,118 @@ export declare const stripeTables: {
7480
7223
  }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.metadata" | "stripe.created" | "stripe.livemode" | `stripe.metadata.${string}` | "stripe.test_clock" | "stripe.customer" | "stripe.status" | "stripe.application" | "stripe.canceled_at" | "subscriptionScheduleId" | "stripe.current_phase" | "stripe.phases" | "stripe.billing_mode" | "stripe.completed_at" | "stripe.default_settings" | "stripe.end_behavior" | "stripe.released_at" | "stripe.released_subscription" | "stripe.current_phase.end_date" | "stripe.current_phase.start_date" | `stripe.phases.${string}` | "stripe.billing_mode.type" | "stripe.billing_mode.updated_at" | "stripe.default_settings.description" | "stripe.default_settings.on_behalf_of" | "stripe.default_settings.transfer_data" | "stripe.default_settings.automatic_tax" | "stripe.default_settings.invoice_settings" | "stripe.default_settings.collection_method" | "stripe.default_settings.default_payment_method" | "stripe.default_settings.application_fee_percent" | "stripe.default_settings.billing_cycle_anchor" | "stripe.default_settings.billing_thresholds" | "stripe.default_settings.transfer_data.destination" | "stripe.default_settings.transfer_data.amount_percent" | "stripe.default_settings.automatic_tax.enabled" | "stripe.default_settings.automatic_tax.disabled_reason" | "stripe.default_settings.automatic_tax.liability" | "stripe.default_settings.automatic_tax.liability.type" | "stripe.default_settings.automatic_tax.liability.account" | "stripe.default_settings.invoice_settings.account_tax_ids" | "stripe.default_settings.invoice_settings.issuer" | "stripe.default_settings.invoice_settings.days_until_due" | "stripe.default_settings.invoice_settings.issuer.type" | "stripe.default_settings.invoice_settings.issuer.account" | "stripe.default_settings.billing_thresholds.amount_gte" | "stripe.default_settings.billing_thresholds.reset_billing_cycle_anchor">, {
7481
7224
  bySubscriptionScheduleId: ["subscriptionScheduleId", "_creationTime"];
7482
7225
  }, {}, {}>;
7483
- };
7484
-
7485
- declare const SubscribeImplementation: {
7486
- args: VObject< {
7487
- metadata?: Record<string, string | number | null> | null | undefined;
7488
- createStripeCustomerIfMissing?: boolean | undefined;
7489
- cancel: {
7490
- url: string;
7226
+ stripeMandates: TableDefinition<VObject< {
7227
+ stripe: {
7228
+ payment_method_details?: any;
7229
+ on_behalf_of?: string | null | undefined;
7230
+ multi_use?: any;
7231
+ single_use?: {
7232
+ amount: number;
7233
+ currency: string;
7234
+ } | null | undefined;
7235
+ object: string;
7236
+ type: "multi_use" | "single_use";
7237
+ id: string;
7238
+ status: "pending" | "active" | "inactive";
7239
+ livemode: boolean;
7240
+ payment_method: string;
7241
+ customer_acceptance: {
7242
+ accepted_at?: number | null | undefined;
7243
+ offline?: any;
7244
+ online?: {
7245
+ ip_address?: string | null | undefined;
7246
+ user_agent?: string | null | undefined;
7247
+ } | null | undefined;
7248
+ type: "offline" | "online";
7491
7249
  };
7492
- priceId: string;
7493
- entityId: string;
7494
- success: {
7495
- url: string;
7496
7250
  };
7251
+ lastSyncedAt: number;
7252
+ mandateId: string;
7497
7253
  }, {
7498
- createStripeCustomerIfMissing: VBoolean<boolean | undefined, "optional">;
7499
- entityId: VString<string, "required">;
7500
- priceId: VString<string, "required">;
7501
- metadata: VUnion<Record<string, string | number | null> | null | undefined, [VRecord<Record<string, string | number | null>, VString<string, "required">, VUnion<string | number | null, [VString<string, "required">, VFloat64<number, "required">, VNull<null, "required">], "required", never>, "required", string>, VNull<null, "required">], "optional", string>;
7502
- success: VObject< {
7503
- url: string;
7254
+ mandateId: VString<string, "required">;
7255
+ stripe: VObject< {
7256
+ payment_method_details?: any;
7257
+ on_behalf_of?: string | null | undefined;
7258
+ multi_use?: any;
7259
+ single_use?: {
7260
+ amount: number;
7261
+ currency: string;
7262
+ } | null | undefined;
7263
+ object: string;
7264
+ type: "multi_use" | "single_use";
7265
+ id: string;
7266
+ status: "pending" | "active" | "inactive";
7267
+ livemode: boolean;
7268
+ payment_method: string;
7269
+ customer_acceptance: {
7270
+ accepted_at?: number | null | undefined;
7271
+ offline?: any;
7272
+ online?: {
7273
+ ip_address?: string | null | undefined;
7274
+ user_agent?: string | null | undefined;
7275
+ } | null | undefined;
7276
+ type: "offline" | "online";
7277
+ };
7278
+ }, {
7279
+ id: VString<string, "required">;
7280
+ customer_acceptance: VObject< {
7281
+ accepted_at?: number | null | undefined;
7282
+ offline?: any;
7283
+ online?: {
7284
+ ip_address?: string | null | undefined;
7285
+ user_agent?: string | null | undefined;
7286
+ } | null | undefined;
7287
+ type: "offline" | "online";
7504
7288
  }, {
7505
- url: VString<string, "required">;
7506
- }, "required", "url">;
7507
- cancel: VObject< {
7508
- url: string;
7289
+ accepted_at: VUnion<number | null | undefined, [VFloat64<number, "required">, VNull<null, "required">], "optional", never>;
7290
+ offline: VAny<any, "optional", string>;
7291
+ online: VUnion< {
7292
+ ip_address?: string | null | undefined;
7293
+ user_agent?: string | null | undefined;
7294
+ } | null | undefined, [VObject< {
7295
+ ip_address?: string | null | undefined;
7296
+ user_agent?: string | null | undefined;
7297
+ }, {
7298
+ ip_address: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
7299
+ user_agent: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
7300
+ }, "required", "ip_address" | "user_agent">, VNull<null, "required">], "optional", "ip_address" | "user_agent">;
7301
+ type: VUnion<"offline" | "online", [VLiteral<"offline", "required">, VLiteral<"online", "required">], "required", never>;
7302
+ }, "required", "type" | "accepted_at" | "offline" | "online" | `offline.${string}` | "online.ip_address" | "online.user_agent">;
7303
+ payment_method: VString<string, "required">;
7304
+ payment_method_details: VAny<any, "optional", string>;
7305
+ status: VUnion<"pending" | "active" | "inactive", [VLiteral<"active", "required">, VLiteral<"inactive", "required">, VLiteral<"pending", "required">], "required", never>;
7306
+ type: VUnion<"multi_use" | "single_use", [VLiteral<"multi_use", "required">, VLiteral<"single_use", "required">], "required", never>;
7307
+ object: VString<string, "required">;
7308
+ livemode: VBoolean<boolean, "required">;
7309
+ multi_use: VAny<any, "optional", string>;
7310
+ on_behalf_of: VUnion<string | null | undefined, [VString<string, "required">, VNull<null, "required">], "optional", never>;
7311
+ single_use: VUnion< {
7312
+ amount: number;
7313
+ currency: string;
7314
+ } | null | undefined, [VObject< {
7315
+ amount: number;
7316
+ currency: string;
7509
7317
  }, {
7510
- url: VString<string, "required">;
7511
- }, "required", "url">;
7512
- }, "required", "metadata" | `metadata.${string}` | "cancel" | "priceId" | "entityId" | "createStripeCustomerIfMissing" | "success" | "cancel.url" | "success.url">;
7318
+ amount: VFloat64<number, "required">;
7319
+ currency: VString<string, "required">;
7320
+ }, "required", "amount" | "currency">, VNull<null, "required">], "optional", "amount" | "currency">;
7321
+ }, "required", "object" | "type" | "id" | "payment_method_details" | "status" | "livemode" | "on_behalf_of" | "payment_method" | `payment_method_details.${string}` | "multi_use" | "single_use" | "customer_acceptance" | `multi_use.${string}` | "single_use.amount" | "single_use.currency" | "customer_acceptance.type" | "customer_acceptance.accepted_at" | "customer_acceptance.offline" | "customer_acceptance.online" | `customer_acceptance.offline.${string}` | "customer_acceptance.online.ip_address" | "customer_acceptance.online.user_agent">;
7322
+ lastSyncedAt: VFloat64<number, "required">;
7323
+ }, "required", "stripe" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.livemode" | "stripe.type" | "stripe.status" | "stripe.on_behalf_of" | "stripe.payment_method" | "stripe.payment_method_details" | `stripe.payment_method_details.${string}` | "mandateId" | "stripe.multi_use" | "stripe.single_use" | "stripe.customer_acceptance" | `stripe.multi_use.${string}` | "stripe.single_use.amount" | "stripe.single_use.currency" | "stripe.customer_acceptance.type" | "stripe.customer_acceptance.accepted_at" | "stripe.customer_acceptance.offline" | "stripe.customer_acceptance.online" | `stripe.customer_acceptance.offline.${string}` | "stripe.customer_acceptance.online.ip_address" | "stripe.customer_acceptance.online.user_agent">, {
7324
+ byMandateId: ["mandateId", "_creationTime"];
7325
+ }, {}, {}>;
7326
+ };
7327
+
7328
+ declare const SubscribeImplementation: {
7513
7329
  name: string;
7514
7330
  handler: (context: GenericActionCtx<StripeDataModel>, args: {
7515
- metadata?: Record<string, string | number | null> | null | undefined;
7516
- createStripeCustomerIfMissing?: boolean | undefined;
7517
- cancel: {
7518
- url: string;
7519
- };
7520
- priceId: string;
7331
+ createStripeCustomerIfMissing?: boolean;
7521
7332
  entityId: string;
7522
- success: {
7523
- url: string;
7524
- };
7525
- }, configuration: InternalConfiguration) => Promise<{
7526
- url: string | null;
7527
- }>;
7333
+ priceId: string;
7334
+ cancel_url: string;
7335
+ success_url: string;
7336
+ mode: "subscription";
7337
+ } & Omit<default_2.Checkout.SessionCreateParams, "customer" | "client_reference_id" | "line_items" | "mode" | "success_url" | "ui_mode" | "cancel_url">, configuration: InternalConfiguration) => Promise<default_2.Response<default_2.Checkout.Session>>;
7528
7338
  };
7529
7339
 
7530
7340
  declare type WithOptional<T, K extends keyof T = never> = Omit<T, K> & Partial<Pick<T, K>>;