@raideno/convex-stripe 0.3.8 → 0.3.10

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 +22 -1122
  2. package/dist/server.js +174 -177
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -33,7 +33,7 @@ declare type ActionOperation = "createCustomer";
33
33
 
34
34
  declare type AllRedirectHandlers = (typeof REDIRECT_HANDLERS)[number];
35
35
 
36
- export declare const allStripeTablesExcept: (tables: Array<keyof typeof stripeTables>) => typeof stripeTables;
36
+ export declare const allStripeTablesExcept: <const T extends Array<keyof typeof stripeTables>>(tables: T) => Omit<typeof stripeTables, T[number]>;
37
37
 
38
38
  declare type ArgSchema = Record<string, Validator<any, "optional" | "required", any>>;
39
39
 
@@ -62,14 +62,14 @@ export declare function buildSignedReturnUrl<O extends ReturnOrigin>({ configura
62
62
  data: ReturnDataMap[O];
63
63
  }): Promise<string>;
64
64
 
65
- export declare type CallbackAfterChange<Schema extends SchemaDefinition<GenericSchema, boolean> = SchemaDefinition<GenericSchema, boolean>> = (context: GenericMutationCtx<DataModelFromSchemaDefinition<Schema>>, operation: "upsert" | "delete" | "insert", event: CallbackEvent) => Promise<void>;
65
+ export declare type CallbackAfterChange<Schema extends SchemaDefinition<GenericSchema, boolean> = SchemaDefinition<GenericSchema, boolean>> = (context: GenericMutationCtx<DataModelFromSchemaDefinition<Schema>>, operation: "upsert" | "delete" | "insert", event: CallbackEvent<Schema>) => Promise<void>;
66
66
 
67
- export declare type CallbackEvent = {
68
- [K in keyof StripeDataModel]: {
67
+ export declare type CallbackEvent<Schema extends SchemaDefinition<GenericSchema, boolean> = SchemaDefinition<GenericSchema, boolean>> = {
68
+ [K in SchemaStripeTableKeys<Schema>]: {
69
69
  table: K;
70
70
  _id: StripeDataModel[K]["document"]["_id"];
71
71
  };
72
- }[keyof StripeDataModel];
72
+ }[SchemaStripeTableKeys<Schema>];
73
73
 
74
74
  declare const CreateAccountImplementation: {
75
75
  name: string;
@@ -227,7 +227,8 @@ declare type InferArgs<S extends ArgSchema> = {
227
227
  };
228
228
 
229
229
  export declare interface InputConfiguration<Schema extends SchemaDefinition<GenericSchema, boolean> = SchemaDefinition<GenericSchema, boolean>> {
230
- schema: Schema;
230
+ /** The Convex schema for your app. Must include at least one stripe table (e.g. from `stripeTables`). */
231
+ schema: SchemaWithStripeTables<Schema>;
231
232
  stripe: {
232
233
  /** Stripe API version to pin against (recommended for stability). */
233
234
  version?: default_2.StripeConfig["apiVersion"];
@@ -811,1125 +812,12 @@ export declare const internalConvexStripe: <Schema extends SchemaDefinition<Gene
811
812
  */
812
813
  store: RegisteredMutation<"internal", {
813
814
  id?: any;
814
- value?: any;
815
815
  data?: any;
816
816
  indexName?: string | undefined;
817
- idField?: string | undefined;
818
- idValue?: any;
819
- field?: string | undefined;
817
+ indexValues?: any;
820
818
  table: string;
821
819
  operation: string;
822
- }, Promise<{
823
- _id: GenericId<"stripeAccounts" | "stripeProducts" | "stripePrices" | "stripeCustomers" | "stripeSubscriptions" | "stripeCoupons" | "stripePromotionCodes" | "stripePayouts" | "stripeRefunds" | "stripePaymentIntents" | "stripeCheckoutSessions" | "stripeInvoices" | "stripeReviews" | "stripePlans" | "stripeDisputes" | "stripeEarlyFraudWarnings" | "stripeTaxIds" | "stripeSetupIntents" | "stripeCreditNotes" | "stripeCharges" | "stripePaymentMethods" | "stripeSubscriptionSchedules" | "stripeMandates" | "stripeBillingPortalConfigurations" | "stripeTransfers" | "stripeCapabilities"> | null;
824
- doc?: undefined;
825
- docs?: undefined;
826
- } | {
827
- doc: any;
828
- _id?: undefined;
829
- docs?: undefined;
830
- } | {
831
- docs: ({
832
- _id: GenericId<"stripeAccounts">;
833
- _creationTime: number;
834
- entityId?: string | undefined;
835
- stripe: {
836
- company?: any;
837
- individual?: any;
838
- business_type?: "company" | "government_entity" | "individual" | "non_profit" | null | undefined;
839
- capabilities?: any;
840
- country?: string | undefined;
841
- email?: string | null | undefined;
842
- metadata?: Record<string, string | number | null> | null | undefined;
843
- requirements?: any;
844
- business_profile?: any;
845
- controller?: any;
846
- created?: number | undefined;
847
- default_currency?: string | undefined;
848
- external_accounts?: any;
849
- future_requirements?: any;
850
- groups?: any;
851
- settings?: any;
852
- object: string;
853
- type: "custom" | "express" | "none" | "standard";
854
- id: string;
855
- tos_acceptance: any;
856
- charges_enabled: boolean;
857
- details_submitted: boolean;
858
- payouts_enabled: boolean;
859
- };
860
- accountId: string;
861
- lastSyncedAt: number;
862
- } | {
863
- _id: GenericId<"stripeProducts">;
864
- _creationTime: number;
865
- accountId?: string | undefined;
866
- stripe: {
867
- metadata?: Record<string, string | number | null> | null | undefined;
868
- statement_descriptor?: string | null | undefined;
869
- unit_label?: string | null | undefined;
870
- object: string;
871
- id: string;
872
- created: number;
873
- active: boolean;
874
- name: string;
875
- url: string | null;
876
- livemode: boolean;
877
- updated: number;
878
- description: string | null;
879
- images: string[];
880
- package_dimensions: {
881
- length: number;
882
- height: number;
883
- weight: number;
884
- width: number;
885
- } | null;
886
- shippable: boolean | null;
887
- marketing_features: {
888
- name?: string | null | undefined;
889
- }[];
890
- default_price: string | null;
891
- };
892
- productId: string;
893
- lastSyncedAt: number;
894
- } | {
895
- _id: GenericId<"stripePrices">;
896
- _creationTime: number;
897
- accountId?: string | undefined;
898
- stripe: {
899
- metadata?: Record<string, string | number | null> | null | undefined;
900
- object: string;
901
- type: "one_time" | "recurring";
902
- id: string;
903
- created: number;
904
- active: boolean;
905
- livemode: boolean;
906
- currency: string;
907
- nickname: string | null;
908
- billing_scheme: "per_unit" | "tiered";
909
- tiers_mode: "graduated" | "volume" | null;
910
- recurring: {
911
- interval: "day" | "week" | "month" | "year";
912
- interval_count: number;
913
- meter: string | null;
914
- trial_period_days: number | null;
915
- usage_type: "licensed" | "metered";
916
- } | null;
917
- productId: string;
918
- unit_amount: number | null;
919
- lookup_key: string | null;
920
- transform_quantity: {
921
- divide_by: number;
922
- round: "up" | "down";
923
- } | null;
924
- unit_amount_decimal: string | null;
925
- };
926
- lastSyncedAt: number;
927
- priceId: string;
928
- } | {
929
- _id: GenericId<"stripeCustomers">;
930
- _creationTime: number;
931
- accountId?: string | undefined;
932
- entityId?: string | undefined;
933
- stripe: {
934
- email?: string | null | undefined;
935
- metadata?: Record<string, string | number | null> | null | undefined;
936
- address?: {
937
- country?: string | null | undefined;
938
- city?: string | null | undefined;
939
- line1?: string | null | undefined;
940
- line2?: string | null | undefined;
941
- postal_code?: string | null | undefined;
942
- state?: string | null | undefined;
943
- } | null | undefined;
944
- name?: string | null | undefined;
945
- phone?: string | null | undefined;
946
- shipping?: {
947
- address?: {
948
- country?: string | null | undefined;
949
- city?: string | null | undefined;
950
- line1?: string | null | undefined;
951
- line2?: string | null | undefined;
952
- postal_code?: string | null | undefined;
953
- state?: string | null | undefined;
954
- } | undefined;
955
- name?: string | undefined;
956
- phone?: string | null | undefined;
957
- carrier?: string | null | undefined;
958
- tracking_number?: string | null | undefined;
959
- } | null | undefined;
960
- currency?: string | null | undefined;
961
- description?: string | null | undefined;
962
- discount?: any;
963
- tax?: {
964
- ip_address?: string | null | undefined;
965
- automatic_tax: "failed" | "not_collecting" | "supported" | "unrecognized_location";
966
- location: {
967
- state?: string | null | undefined;
968
- country: string;
969
- source: string;
970
- } | null;
971
- } | undefined;
972
- cash_balance?: any;
973
- default_source?: string | null | undefined;
974
- delinquent?: boolean | null | undefined;
975
- invoice_credit_balance?: any;
976
- invoice_prefix?: string | null | undefined;
977
- invoice_settings?: any;
978
- next_invoice_sequence?: number | null | undefined;
979
- preferred_locales?: string[] | null | undefined;
980
- sources?: any;
981
- subscriptions?: any;
982
- tax_exempt?: "none" | "reverse" | "exempt" | null | undefined;
983
- tax_ids?: any;
984
- test_clock?: string | null | undefined;
985
- object: string;
986
- id: string;
987
- created: number;
988
- livemode: boolean;
989
- balance: number;
990
- };
991
- lastSyncedAt: number;
992
- customerId: string;
993
- } | {
994
- _id: GenericId<"stripeSubscriptions">;
995
- _creationTime: number;
996
- accountId?: string | undefined;
997
- stripe: any;
998
- lastSyncedAt: number;
999
- customerId: string;
1000
- subscriptionId: string | null;
1001
- } | {
1002
- _id: GenericId<"stripeCoupons">;
1003
- _creationTime: number;
1004
- accountId?: string | undefined;
1005
- stripe: {
1006
- metadata?: Record<string, string | number | null> | null | undefined;
1007
- name?: string | null | undefined;
1008
- currency?: string | null | undefined;
1009
- amount_off?: number | null | undefined;
1010
- percent_off?: number | null | undefined;
1011
- applies_to?: {
1012
- products: string[];
1013
- } | null | undefined;
1014
- currency_options?: Record<string, {
1015
- amount_off: number;
1016
- }> | null | undefined;
1017
- duration_in_months?: number | null | undefined;
1018
- max_redemptions?: number | null | undefined;
1019
- redeem_by?: number | null | undefined;
1020
- object: string;
1021
- id: string;
1022
- created: number;
1023
- livemode: boolean;
1024
- duration: "forever" | "once" | "repeating";
1025
- times_redeemed: number;
1026
- valid: boolean;
1027
- };
1028
- lastSyncedAt: number;
1029
- couponId: string;
1030
- } | {
1031
- _id: GenericId<"stripePromotionCodes">;
1032
- _creationTime: number;
1033
- accountId?: string | undefined;
1034
- stripe: {
1035
- metadata?: Record<string, string | number | null> | null | undefined;
1036
- customer?: string | null | undefined;
1037
- expires_at?: number | null | undefined;
1038
- max_redemptions?: number | null | undefined;
1039
- object: string;
1040
- id: string;
1041
- created: number;
1042
- active: boolean;
1043
- livemode: boolean;
1044
- times_redeemed: number;
1045
- coupon: {
1046
- metadata?: Record<string, string | number | null> | null | undefined;
1047
- name?: string | null | undefined;
1048
- currency?: string | null | undefined;
1049
- amount_off?: number | null | undefined;
1050
- percent_off?: number | null | undefined;
1051
- applies_to?: {
1052
- products: string[];
1053
- } | null | undefined;
1054
- currency_options?: Record<string, {
1055
- amount_off: number;
1056
- }> | null | undefined;
1057
- duration_in_months?: number | null | undefined;
1058
- max_redemptions?: number | null | undefined;
1059
- redeem_by?: number | null | undefined;
1060
- object: string;
1061
- id: string;
1062
- created: number;
1063
- livemode: boolean;
1064
- duration: "forever" | "once" | "repeating";
1065
- times_redeemed: number;
1066
- valid: boolean;
1067
- };
1068
- code: string;
1069
- restrictions: {
1070
- currency_options?: Record<string, {
1071
- minimum_amount?: number | null | undefined;
1072
- }> | null | undefined;
1073
- minimum_amount?: number | null | undefined;
1074
- first_time_transaction?: boolean | undefined;
1075
- minimum_amount_currency?: string | null | undefined;
1076
- };
1077
- };
1078
- lastSyncedAt: number;
1079
- promotionCodeId: string;
1080
- } | {
1081
- _id: GenericId<"stripePayouts">;
1082
- _creationTime: number;
1083
- accountId?: string | undefined;
1084
- stripe: {
1085
- metadata?: Record<string, string | number | null> | null | undefined;
1086
- balance_transaction?: string | null | undefined;
1087
- currency?: string | null | undefined;
1088
- description?: string | null | undefined;
1089
- statement_descriptor?: string | null | undefined;
1090
- application_fee?: string | null | undefined;
1091
- application_fee_amount?: number | null | undefined;
1092
- failure_balance_transaction?: string | null | undefined;
1093
- failure_code?: string | null | undefined;
1094
- failure_message?: string | null | undefined;
1095
- destination?: string | null | undefined;
1096
- original_payout?: string | null | undefined;
1097
- payout_method?: string | null | undefined;
1098
- reconciliation_status?: "completed" | "in_progress" | "not_applicable" | null | undefined;
1099
- reversed_by?: string | null | undefined;
1100
- trace_id?: {
1101
- value?: string | null | undefined;
1102
- status: string;
1103
- } | null | undefined;
1104
- object: string;
1105
- type: "card" | "bank_account";
1106
- id: string;
1107
- created: number;
1108
- livemode: boolean;
1109
- status: string;
1110
- amount: number;
1111
- automatic: boolean;
1112
- arrival_date: number;
1113
- method: string;
1114
- source_type: string;
1115
- };
1116
- lastSyncedAt: number;
1117
- payoutId: string;
1118
- } | {
1119
- _id: GenericId<"stripeRefunds">;
1120
- _creationTime: number;
1121
- accountId?: string | undefined;
1122
- stripe: {
1123
- metadata?: Record<string, string | number | null> | null | undefined;
1124
- status?: string | null | undefined;
1125
- balance_transaction?: string | null | undefined;
1126
- description?: string | null | undefined;
1127
- payment_intent?: string | null | undefined;
1128
- failure_balance_transaction?: string | null | undefined;
1129
- receipt_number?: string | null | undefined;
1130
- charge?: string | null | undefined;
1131
- reason?: string | null | undefined;
1132
- next_action?: any;
1133
- destination_details?: any;
1134
- failure_reason?: string | null | undefined;
1135
- instructions_email?: string | null | undefined;
1136
- pending_reason?: string | null | undefined;
1137
- source_transfer_reversal?: string | null | undefined;
1138
- transfer_reversal?: string | null | undefined;
1139
- object: string;
1140
- id: string;
1141
- created: number;
1142
- amount: number;
1143
- currency: string;
1144
- };
1145
- lastSyncedAt: number;
1146
- refundId: string;
1147
- } | {
1148
- _id: GenericId<"stripePaymentIntents">;
1149
- _creationTime: number;
1150
- accountId?: string | undefined;
1151
- stripe: {
1152
- metadata?: Record<string, string | number | null> | null | undefined;
1153
- application?: string | null | undefined;
1154
- shipping?: any;
1155
- cancellation_reason?: "expired" | "duplicate" | "fraudulent" | "abandoned" | "automatic" | "failed_invoice" | "requested_by_customer" | "void_invoice" | null | undefined;
1156
- customer?: string | null | undefined;
1157
- description?: string | null | undefined;
1158
- receipt_email?: string | null | undefined;
1159
- statement_descriptor?: string | null | undefined;
1160
- statement_descriptor_suffix?: string | null | undefined;
1161
- application_fee_amount?: number | null | undefined;
1162
- on_behalf_of?: string | null | undefined;
1163
- payment_method?: string | null | undefined;
1164
- presentment_details?: any;
1165
- review?: string | null | undefined;
1166
- transfer_data?: any;
1167
- transfer_group?: string | null | undefined;
1168
- client_secret?: string | null | undefined;
1169
- payment_method_configuration_details?: {
1170
- parent?: string | null | undefined;
1171
- id: string;
1172
- } | null | undefined;
1173
- payment_method_options?: any;
1174
- last_payment_error?: {
1175
- payment_method?: any;
1176
- charge?: string | null | undefined;
1177
- advice_code?: string | null | undefined;
1178
- code?: string | null | undefined;
1179
- decline_code?: string | null | undefined;
1180
- doc_url?: string | null | undefined;
1181
- message?: string | null | undefined;
1182
- network_advice_code?: string | null | undefined;
1183
- network_decline_code?: string | null | undefined;
1184
- param?: string | null | undefined;
1185
- payment_method_type?: string | null | undefined;
1186
- last_payment_error?: any;
1187
- latest_charge?: string | null | undefined;
1188
- type: "api_error" | "card_error" | "idempotency_error" | "invalid_request_error";
1189
- } | null | undefined;
1190
- latest_charge?: string | null | undefined;
1191
- processing?: any;
1192
- automatic_payment_methods?: {
1193
- allow_redirects?: "always" | "never" | null | undefined;
1194
- enabled: boolean;
1195
- } | null | undefined;
1196
- next_action?: any;
1197
- amount_details?: any;
1198
- canceled_at?: number | null | undefined;
1199
- object: string;
1200
- id: string;
1201
- created: number;
1202
- livemode: boolean;
1203
- status: "succeeded" | "canceled" | "processing" | "requires_action" | "requires_capture" | "requires_confirmation" | "requires_payment_method";
1204
- amount: number;
1205
- currency: string | null;
1206
- payment_method_types: string[];
1207
- setup_future_usage: "off_session" | "on_session" | null;
1208
- amount_capturable: number;
1209
- amount_received: number;
1210
- capture_method: "manual" | "automatic" | "automatic_sync" | "automatic_async";
1211
- confirmation_method: "manual" | "automatic";
1212
- excluded_payment_method_types: string[] | null;
1213
- };
1214
- lastSyncedAt: number;
1215
- paymentIntentId: string;
1216
- } | {
1217
- _id: GenericId<"stripeCheckoutSessions">;
1218
- _creationTime: number;
1219
- accountId?: string | undefined;
1220
- stripe: {
1221
- metadata?: Record<string, string | number | null> | null | undefined;
1222
- url?: string | null | undefined;
1223
- currency?: string | null | undefined;
1224
- customer?: string | null | undefined;
1225
- payment_intent?: string | null | undefined;
1226
- presentment_details?: any;
1227
- subscription?: string | null | undefined;
1228
- client_reference_id?: string | null | undefined;
1229
- customer_email?: string | null | undefined;
1230
- line_items?: any[] | null | undefined;
1231
- return_url?: string | null | undefined;
1232
- success_url?: string | null | undefined;
1233
- ui_mode?: "custom" | "embedded" | "hosted" | null | undefined;
1234
- adaptive_pricing?: any;
1235
- after_expiration?: any;
1236
- allow_promotion_codes?: boolean | null | undefined;
1237
- amount_subtotal?: number | null | undefined;
1238
- amount_total?: number | null | undefined;
1239
- billing_address_collection?: "required" | "auto" | null | undefined;
1240
- cancel_url?: string | null | undefined;
1241
- client_secret?: string | null | undefined;
1242
- collected_information?: any;
1243
- consent?: any;
1244
- consent_collection?: any;
1245
- currency_conversion?: any;
1246
- customer_creation?: "always" | "if_required" | null | undefined;
1247
- customer_details?: any;
1248
- discounts?: any[] | null | undefined;
1249
- invoice?: string | null | undefined;
1250
- invoice_creation?: any;
1251
- locale?: string | null | undefined;
1252
- optional_items?: any[] | null | undefined;
1253
- origin_context?: "mobile_app" | "web" | null | undefined;
1254
- payment_link?: string | null | undefined;
1255
- payment_method_collection?: "always" | "if_required" | null | undefined;
1256
- payment_method_configuration_details?: any;
1257
- payment_method_options?: any;
1258
- permissions?: any;
1259
- phone_number_collection?: any;
1260
- recovered_from?: string | null | undefined;
1261
- redirect_on_completion?: "always" | "if_required" | "never" | null | undefined;
1262
- saved_payment_method_options?: any;
1263
- setup_intent?: string | null | undefined;
1264
- shipping_address_collection?: any;
1265
- shipping_cost?: any;
1266
- submit_type?: "auto" | "book" | "donate" | "pay" | "subscribe" | null | undefined;
1267
- tax_id_collection?: any;
1268
- total_details?: any;
1269
- wallet_options?: any;
1270
- object: string;
1271
- id: string;
1272
- created: number;
1273
- mode: "payment" | "setup" | "subscription";
1274
- livemode: boolean;
1275
- status: "complete" | "expired" | "open" | null;
1276
- automatic_tax: any;
1277
- payment_status: "paid" | "no_payment_required" | "unpaid";
1278
- custom_fields: any[];
1279
- custom_text: any;
1280
- expires_at: number;
1281
- payment_method_types: string[];
1282
- shipping_options: any[];
1283
- };
1284
- lastSyncedAt: number;
1285
- checkoutSessionId: string;
1286
- } | {
1287
- _id: GenericId<"stripeInvoices">;
1288
- _creationTime: number;
1289
- accountId?: string | undefined;
1290
- stripe: {
1291
- number?: string | null | undefined;
1292
- metadata?: Record<string, string | number | null> | null | undefined;
1293
- application?: string | null | undefined;
1294
- description?: string | null | undefined;
1295
- statement_descriptor?: string | null | undefined;
1296
- on_behalf_of?: string | null | undefined;
1297
- receipt_number?: string | null | undefined;
1298
- automatic_tax?: any;
1299
- customer_email?: string | null | undefined;
1300
- custom_fields?: any[] | null | undefined;
1301
- shipping_cost?: any;
1302
- lines?: any;
1303
- effective_at?: number | null | undefined;
1304
- subtotal_excluding_tax?: number | null | undefined;
1305
- total_excluding_tax?: number | null | undefined;
1306
- total_taxes?: any[] | null | undefined;
1307
- default_source?: string | null | undefined;
1308
- test_clock?: string | null | undefined;
1309
- auto_advance?: boolean | undefined;
1310
- confirmation_secret?: any;
1311
- hosted_invoice_url?: string | null | undefined;
1312
- parent?: any;
1313
- account_country?: string | null | undefined;
1314
- account_name?: string | null | undefined;
1315
- account_tax_ids?: string[] | null | undefined;
1316
- automatically_finalizes_at?: number | null | undefined;
1317
- customer_address?: any;
1318
- customer_name?: string | null | undefined;
1319
- customer_phone?: string | null | undefined;
1320
- customer_shipping?: any;
1321
- customer_tax_ids?: any[] | null | undefined;
1322
- default_payment_method?: string | null | undefined;
1323
- due_date?: number | null | undefined;
1324
- ending_balance?: number | null | undefined;
1325
- footer?: string | null | undefined;
1326
- from_invoice?: any;
1327
- invoice_pdf?: string | null | undefined;
1328
- issuer?: any;
1329
- last_finalization_error?: any;
1330
- latest_revision?: string | null | undefined;
1331
- next_payment_attempt?: number | null | undefined;
1332
- payment_settings?: any;
1333
- payments?: any;
1334
- rendering?: any;
1335
- shipping_details?: any;
1336
- status_transitions?: any;
1337
- threshold_reason?: any;
1338
- total_discount_amounts?: any[] | null | undefined;
1339
- total_pretax_credit_amounts?: any[] | null | undefined;
1340
- webhooks_delivered_at?: number | null | undefined;
1341
- object: string;
1342
- id: string;
1343
- created: number;
1344
- livemode: boolean;
1345
- status: "paid" | "open" | "void" | "draft" | "uncollectible";
1346
- currency: string;
1347
- customer: string;
1348
- discounts: string[];
1349
- subtotal: number;
1350
- total: number;
1351
- amount_shipping: number;
1352
- collection_method: "charge_automatically" | "send_invoice";
1353
- period_end: number;
1354
- period_start: number;
1355
- amount_due: number;
1356
- amount_overpaid: number;
1357
- amount_paid: number;
1358
- amount_remaining: number;
1359
- attempt_count: number;
1360
- attempted: boolean;
1361
- billing_reason: "subscription_update" | "subscription" | "automatic_pending_invoice_item_invoice" | "manual" | "quote_accept" | "subscription_create" | "subscription_cycle" | "subscription_threshold" | "upcoming" | null;
1362
- customer_tax_exempt: "none" | "reverse" | "exempt" | null;
1363
- default_tax_rates: any[];
1364
- post_payment_credit_notes_amount: number;
1365
- pre_payment_credit_notes_amount: number;
1366
- starting_balance: number;
1367
- };
1368
- lastSyncedAt: number;
1369
- invoiceId: string;
1370
- } | {
1371
- _id: GenericId<"stripeReviews">;
1372
- _creationTime: number;
1373
- accountId?: string | undefined;
1374
- stripe: {
1375
- payment_intent?: string | null | undefined;
1376
- charge?: string | null | undefined;
1377
- ip_address?: string | null | undefined;
1378
- billing_zip?: string | null | undefined;
1379
- closed_reason?: "disputed" | "refunded" | "canceled" | "approved" | "refunded_as_fraud" | "redacted" | "payment_never_settled" | "acknowledged" | null | undefined;
1380
- ip_address_location?: {
1381
- country?: string | null | undefined;
1382
- city?: string | null | undefined;
1383
- latitude?: number | null | undefined;
1384
- longitude?: number | null | undefined;
1385
- region?: string | null | undefined;
1386
- } | null | undefined;
1387
- session?: {
1388
- browser?: string | null | undefined;
1389
- device?: string | null | undefined;
1390
- platform?: string | null | undefined;
1391
- version?: string | null | undefined;
1392
- } | null | undefined;
1393
- object: string;
1394
- id: string;
1395
- created: number;
1396
- livemode: boolean;
1397
- open: boolean;
1398
- reason: string;
1399
- opened_reason: "manual" | "rule";
1400
- };
1401
- lastSyncedAt: number;
1402
- reviewId: string;
1403
- } | {
1404
- _id: GenericId<"stripePlans">;
1405
- _creationTime: number;
1406
- accountId?: string | undefined;
1407
- stripe: {
1408
- metadata?: Record<string, string | number | null> | null | undefined;
1409
- product?: string | null | undefined;
1410
- amount?: number | null | undefined;
1411
- nickname?: string | null | undefined;
1412
- amount_decimal?: string | null | undefined;
1413
- meter?: string | null | undefined;
1414
- tiers?: any[] | null | undefined;
1415
- tiers_mode?: "graduated" | "volume" | null | undefined;
1416
- transform_usage?: {
1417
- divide_by: number;
1418
- round: "up" | "down";
1419
- } | null | undefined;
1420
- trial_period_days?: number | null | undefined;
1421
- object: string;
1422
- id: string;
1423
- created: number;
1424
- active: boolean;
1425
- livemode: boolean;
1426
- currency: string;
1427
- interval: "day" | "week" | "month" | "year";
1428
- billing_scheme: "per_unit" | "tiered";
1429
- interval_count: number;
1430
- usage_type: string;
1431
- };
1432
- lastSyncedAt: number;
1433
- planId: string;
1434
- } | {
1435
- _id: GenericId<"stripeDisputes">;
1436
- _creationTime: number;
1437
- accountId?: string | undefined;
1438
- stripe: {
1439
- metadata?: Record<string, string | number | null> | null | undefined;
1440
- payment_intent?: string | null | undefined;
1441
- payment_method_details?: any;
1442
- object: string;
1443
- id: string;
1444
- created: number;
1445
- livemode: boolean;
1446
- status: "under_review" | "lost" | "needs_response" | "prevented" | "warning_closed" | "warning_needs_response" | "warning_under_review" | "won";
1447
- amount: number;
1448
- currency: string;
1449
- charge: string;
1450
- reason: string;
1451
- evidence: any;
1452
- balance_transactions: any[];
1453
- enhanced_eligibility_types: ("visa_compelling_evidence_3" | "visa_compliance")[];
1454
- evidence_details: any;
1455
- is_charge_refundable: boolean;
1456
- };
1457
- lastSyncedAt: number;
1458
- disputeId: string;
1459
- } | {
1460
- _id: GenericId<"stripeEarlyFraudWarnings">;
1461
- _creationTime: number;
1462
- accountId?: string | undefined;
1463
- stripe: {
1464
- payment_intent?: string | null | undefined;
1465
- object: string;
1466
- id: string;
1467
- created: number;
1468
- livemode: boolean;
1469
- charge: string;
1470
- actionable: boolean;
1471
- fraud_type: string;
1472
- };
1473
- lastSyncedAt: number;
1474
- earlyFraudWarningId: string;
1475
- } | {
1476
- _id: GenericId<"stripeTaxIds">;
1477
- _creationTime: number;
1478
- accountId?: string | undefined;
1479
- stripe: {
1480
- country?: string | null | undefined;
1481
- customer?: string | null | undefined;
1482
- owner?: {
1483
- account?: string | null | undefined;
1484
- application?: string | null | undefined;
1485
- customer?: string | null | undefined;
1486
- type: "account" | "application" | "customer" | "self";
1487
- } | null | undefined;
1488
- verification?: {
1489
- verified_address?: string | null | undefined;
1490
- verified_name?: string | null | undefined;
1491
- status: "pending" | "unavailable" | "unverified" | "verified";
1492
- } | null | undefined;
1493
- object: string;
1494
- type: string;
1495
- id: string;
1496
- value: string;
1497
- created: number;
1498
- livemode: boolean;
1499
- };
1500
- lastSyncedAt: number;
1501
- taxIdId: string;
1502
- } | {
1503
- _id: GenericId<"stripeSetupIntents">;
1504
- _creationTime: number;
1505
- accountId?: string | undefined;
1506
- stripe: {
1507
- metadata?: Record<string, string | number | null> | null | undefined;
1508
- application?: string | null | undefined;
1509
- cancellation_reason?: "duplicate" | "abandoned" | "requested_by_customer" | null | undefined;
1510
- customer?: string | null | undefined;
1511
- description?: string | null | undefined;
1512
- on_behalf_of?: string | null | undefined;
1513
- payment_method?: string | null | undefined;
1514
- client_secret?: string | null | undefined;
1515
- payment_method_configuration_details?: {
1516
- parent?: string | null | undefined;
1517
- id: string;
1518
- } | null | undefined;
1519
- payment_method_options?: any;
1520
- mandate?: string | null | undefined;
1521
- automatic_payment_methods?: {
1522
- enabled?: boolean | null | undefined;
1523
- allow_redirects?: "always" | "never" | null | undefined;
1524
- } | null | undefined;
1525
- next_action?: any;
1526
- last_setup_error?: any;
1527
- attach_to_self?: boolean | null | undefined;
1528
- latest_attempt?: string | null | undefined;
1529
- single_use_mandate?: string | null | undefined;
1530
- object: string;
1531
- id: string;
1532
- created: number;
1533
- livemode: boolean;
1534
- status: "succeeded" | "canceled" | "processing" | "requires_action" | "requires_confirmation" | "requires_payment_method";
1535
- payment_method_types: string[];
1536
- usage: string;
1537
- flow_directions: ("inbound" | "outbound")[] | null;
1538
- };
1539
- lastSyncedAt: number;
1540
- setupIntentId: string;
1541
- } | {
1542
- _id: GenericId<"stripeCreditNotes">;
1543
- _creationTime: number;
1544
- accountId?: string | undefined;
1545
- stripe: {
1546
- metadata?: Record<string, string | number | null> | null | undefined;
1547
- customer?: string | null | undefined;
1548
- invoice?: string | null | undefined;
1549
- shipping_cost?: any;
1550
- memo?: string | null | undefined;
1551
- customer_balance_transaction?: string | null | undefined;
1552
- effective_at?: number | null | undefined;
1553
- out_of_band_amount?: number | null | undefined;
1554
- subtotal_excluding_tax?: number | null | undefined;
1555
- total_excluding_tax?: number | null | undefined;
1556
- total_taxes?: any;
1557
- voided_at?: number | null | undefined;
1558
- number: string;
1559
- object: string;
1560
- type: "mixed" | "post_payment" | "pre_payment";
1561
- id: string;
1562
- created: number;
1563
- livemode: boolean;
1564
- status: "issued" | "void";
1565
- amount: number;
1566
- currency: string;
1567
- refunds: {
1568
- amount_refunded: number;
1569
- refund: string;
1570
- }[];
1571
- lines: any;
1572
- reason: "duplicate" | "fraudulent" | "order_change" | "product_unsatisfactory" | null;
1573
- subtotal: number;
1574
- total: number;
1575
- amount_shipping: number;
1576
- discount_amount: number;
1577
- discount_amounts: {
1578
- amount: number;
1579
- discount: string;
1580
- }[];
1581
- pdf: string;
1582
- post_payment_amount: number;
1583
- pre_payment_amount: number;
1584
- pretax_credit_amounts: {
1585
- discount?: string | null | undefined;
1586
- credit_balance_transaction?: string | null | undefined;
1587
- type: "discount" | "credit_balance_transaction";
1588
- amount: number;
1589
- }[];
1590
- };
1591
- lastSyncedAt: number;
1592
- creditNoteId: string;
1593
- } | {
1594
- _id: GenericId<"stripeCharges">;
1595
- _creationTime: number;
1596
- accountId?: string | undefined;
1597
- stripe: {
1598
- metadata?: Record<string, string | number | null> | null | undefined;
1599
- application?: string | null | undefined;
1600
- shipping?: any;
1601
- balance_transaction?: string | null | undefined;
1602
- customer?: string | null | undefined;
1603
- description?: string | null | undefined;
1604
- payment_intent?: string | null | undefined;
1605
- payment_method_details?: any;
1606
- receipt_email?: string | null | undefined;
1607
- statement_descriptor?: string | null | undefined;
1608
- statement_descriptor_suffix?: string | null | undefined;
1609
- application_fee?: string | null | undefined;
1610
- application_fee_amount?: number | null | undefined;
1611
- calculated_statement_descriptor?: string | null | undefined;
1612
- failure_balance_transaction?: string | null | undefined;
1613
- failure_code?: string | null | undefined;
1614
- failure_message?: string | null | undefined;
1615
- fraud_details?: any;
1616
- on_behalf_of?: string | null | undefined;
1617
- outcome?: any;
1618
- payment_method?: string | null | undefined;
1619
- presentment_details?: any;
1620
- radar_options?: any;
1621
- receipt_number?: string | null | undefined;
1622
- receipt_url?: string | null | undefined;
1623
- refunds?: any;
1624
- review?: string | null | undefined;
1625
- source_transfer?: string | null | undefined;
1626
- transfer?: string | null | undefined;
1627
- transfer_data?: any;
1628
- transfer_group?: any;
1629
- object: string;
1630
- id: string;
1631
- created: number;
1632
- livemode: boolean;
1633
- status: "pending" | "succeeded" | "failed";
1634
- amount: number;
1635
- billing_details: {
1636
- email?: string | null | undefined;
1637
- address?: {
1638
- country?: string | null | undefined;
1639
- city?: string | null | undefined;
1640
- line1?: string | null | undefined;
1641
- line2?: string | null | undefined;
1642
- postal_code?: string | null | undefined;
1643
- state?: string | null | undefined;
1644
- } | null | undefined;
1645
- name?: string | null | undefined;
1646
- phone?: string | null | undefined;
1647
- tax_id?: string | null | undefined;
1648
- };
1649
- currency: string;
1650
- disputed: boolean;
1651
- refunded: boolean;
1652
- amount_captured: number;
1653
- amount_refunded: number;
1654
- captured: boolean;
1655
- paid: boolean;
1656
- };
1657
- lastSyncedAt: number;
1658
- chargeId: string;
1659
- } | {
1660
- _id: GenericId<"stripePaymentMethods">;
1661
- _creationTime: number;
1662
- accountId?: string | undefined;
1663
- stripe: {
1664
- link?: any;
1665
- metadata?: Record<string, string | number | null> | null | undefined;
1666
- billing_details?: any;
1667
- customer?: string | null | undefined;
1668
- radar_options?: any;
1669
- acss_debit?: any;
1670
- affirm?: any;
1671
- afterpay_clearpay?: any;
1672
- alipay?: any;
1673
- alma?: any;
1674
- amazon_pay?: any;
1675
- au_becs_debit?: any;
1676
- bacs_debit?: any;
1677
- bancontact?: any;
1678
- billie?: any;
1679
- blik?: any;
1680
- boleto?: any;
1681
- card?: any;
1682
- cashapp?: any;
1683
- crypto?: any;
1684
- customer_balance?: any;
1685
- eps?: any;
1686
- fpx?: any;
1687
- giropay?: any;
1688
- grabpay?: any;
1689
- ideal?: any;
1690
- kakao_pay?: any;
1691
- klarna?: any;
1692
- konbini?: any;
1693
- kr_card?: any;
1694
- mobilepay?: any;
1695
- multibanco?: any;
1696
- naver_pay?: any;
1697
- nz_bank_account?: any;
1698
- oxxo?: any;
1699
- p24?: any;
1700
- pay_by_bank?: any;
1701
- payco?: any;
1702
- paynow?: any;
1703
- paypal?: any;
1704
- pix?: any;
1705
- promptpay?: any;
1706
- revolut_pay?: any;
1707
- samsung_pay?: any;
1708
- satispay?: any;
1709
- sepa_debit?: any;
1710
- sofort?: any;
1711
- swish?: any;
1712
- twint?: any;
1713
- us_bank_account?: any;
1714
- wechat_pay?: any;
1715
- zip?: any;
1716
- card_present?: any;
1717
- interac_present?: any;
1718
- object: string;
1719
- type: string;
1720
- id: string;
1721
- created: number;
1722
- livemode: boolean;
1723
- allow_redisplay: "always" | "limited" | "unspecified" | null;
1724
- };
1725
- lastSyncedAt: number;
1726
- paymentMethodId: string;
1727
- } | {
1728
- _id: GenericId<"stripeSubscriptionSchedules">;
1729
- _creationTime: number;
1730
- accountId?: string | undefined;
1731
- stripe: {
1732
- metadata?: Record<string, string | number | null> | null | undefined;
1733
- application?: string | null | undefined;
1734
- test_clock?: string | null | undefined;
1735
- canceled_at?: number | null | undefined;
1736
- current_phase?: {
1737
- end_date: number;
1738
- start_date: number;
1739
- } | null | undefined;
1740
- phases?: any;
1741
- completed_at?: number | null | undefined;
1742
- default_settings?: {
1743
- description?: string | null | undefined;
1744
- on_behalf_of?: string | null | undefined;
1745
- transfer_data?: {
1746
- amount_percent?: number | null | undefined;
1747
- destination: string;
1748
- } | null | undefined;
1749
- automatic_tax?: {
1750
- enabled?: boolean | null | undefined;
1751
- disabled_reason?: "requires_location_inputs" | null | undefined;
1752
- liability?: {
1753
- account?: string | null | undefined;
1754
- type: "account" | "self";
1755
- } | null | undefined;
1756
- } | null | undefined;
1757
- invoice_settings?: {
1758
- account_tax_ids?: string[] | null | undefined;
1759
- days_until_due?: number | null | undefined;
1760
- issuer: {
1761
- account?: string | null | undefined;
1762
- type: "account" | "self";
1763
- };
1764
- } | null | undefined;
1765
- collection_method?: "charge_automatically" | "send_invoice" | null | undefined;
1766
- default_payment_method?: string | null | undefined;
1767
- application_fee_percent?: number | null | undefined;
1768
- billing_thresholds?: {
1769
- amount_gte?: number | null | undefined;
1770
- reset_billing_cycle_anchor?: boolean | null | undefined;
1771
- } | null | undefined;
1772
- billing_cycle_anchor: "automatic" | "phase_start";
1773
- } | null | undefined;
1774
- released_at?: number | null | undefined;
1775
- released_subscription?: string | null | undefined;
1776
- object: string;
1777
- id: string;
1778
- created: number;
1779
- livemode: boolean;
1780
- status: "active" | "canceled" | "completed" | "not_started" | "released";
1781
- customer: string;
1782
- billing_mode: {
1783
- updated_at?: number | null | undefined;
1784
- type: "classic" | "flexible";
1785
- };
1786
- end_behavior: "none" | "cancel" | "release" | "renew";
1787
- };
1788
- lastSyncedAt: number;
1789
- subscriptionScheduleId: string;
1790
- } | {
1791
- _id: GenericId<"stripeMandates">;
1792
- _creationTime: number;
1793
- accountId?: string | undefined;
1794
- stripe: {
1795
- payment_method_details?: any;
1796
- on_behalf_of?: string | null | undefined;
1797
- multi_use?: any;
1798
- single_use?: {
1799
- amount: number;
1800
- currency: string;
1801
- } | null | undefined;
1802
- object: string;
1803
- type: "multi_use" | "single_use";
1804
- id: string;
1805
- livemode: boolean;
1806
- status: "active" | "inactive" | "pending";
1807
- payment_method: string;
1808
- customer_acceptance: {
1809
- accepted_at?: number | null | undefined;
1810
- offline?: any;
1811
- online?: {
1812
- ip_address?: string | null | undefined;
1813
- user_agent?: string | null | undefined;
1814
- } | null | undefined;
1815
- type: "offline" | "online";
1816
- };
1817
- };
1818
- lastSyncedAt: number;
1819
- mandateId: string;
1820
- } | {
1821
- _id: GenericId<"stripeBillingPortalConfigurations">;
1822
- _creationTime: number;
1823
- accountId?: string | undefined;
1824
- stripe: {
1825
- object: string;
1826
- id: string;
1827
- metadata: Record<string, string | number | null> | null;
1828
- business_profile: {
1829
- headline: string | null;
1830
- privacy_policy_url: string | null;
1831
- terms_of_service_url: string | null;
1832
- };
1833
- created: number;
1834
- active: boolean;
1835
- application: string | null;
1836
- name: string | null;
1837
- default_return_url: string | null;
1838
- features: {
1839
- customer_update: {
1840
- allowed_updated: ("email" | "address" | "name" | "phone" | "shipping" | "tax_id")[];
1841
- enabled: boolean;
1842
- };
1843
- invoice_history: {
1844
- enabled: boolean;
1845
- };
1846
- payment_method_update: {
1847
- enabled: boolean;
1848
- };
1849
- subscription_cancel: {
1850
- enabled: boolean;
1851
- cancellation_reason: {
1852
- enabled: boolean;
1853
- options: ("other" | "customer_service" | "low_quality" | "missing_features" | "switched_service" | "too_complex" | "too_expensive" | "unused")[];
1854
- };
1855
- mode: "at_period_end" | "immediately";
1856
- proration_behavior: "none" | "always_invoice" | "create_prorations";
1857
- };
1858
- subscription_update: {
1859
- products?: {
1860
- adjustable_quantity: {
1861
- enabled: boolean;
1862
- maximum: number | null;
1863
- minimum: number | null;
1864
- };
1865
- prices: string[];
1866
- product: string;
1867
- }[] | null | undefined;
1868
- enabled: boolean;
1869
- proration_behavior: "none" | "always_invoice" | "create_prorations";
1870
- default_allowed_updates: ("price" | "promotion_code" | "quantity")[];
1871
- schedule_at_period_end: {
1872
- conditions: {
1873
- type: "decreasing_item_amount" | "shortening_interval";
1874
- }[];
1875
- };
1876
- };
1877
- };
1878
- is_default: boolean;
1879
- livemode: boolean;
1880
- login_page: {
1881
- enabled: boolean;
1882
- url: string | null;
1883
- };
1884
- updated: number;
1885
- };
1886
- lastSyncedAt: number;
1887
- billingPortalConfigurationId: string;
1888
- } | {
1889
- _id: GenericId<"stripeTransfers">;
1890
- _creationTime: number;
1891
- accountId?: string | undefined;
1892
- stripe: {
1893
- metadata?: Record<string, string | number | null> | null | undefined;
1894
- balance_transaction?: string | null | undefined;
1895
- description?: string | null | undefined;
1896
- transfer_group?: string | null | undefined;
1897
- destination?: string | null | undefined;
1898
- source_type?: string | null | undefined;
1899
- destination_payment?: string | null | undefined;
1900
- source_transaction?: string | null | undefined;
1901
- object: string;
1902
- id: string;
1903
- created: number;
1904
- livemode: boolean;
1905
- amount: number;
1906
- currency: string;
1907
- amount_reversed: number;
1908
- reversals: any[];
1909
- reversed: boolean;
1910
- };
1911
- lastSyncedAt: number;
1912
- transferId: string;
1913
- } | {
1914
- _id: GenericId<"stripeCapabilities">;
1915
- _creationTime: number;
1916
- accountId?: string | undefined;
1917
- stripe: {
1918
- requested_at?: number | null | undefined;
1919
- object: string;
1920
- id: string;
1921
- requirements: any;
1922
- future_requirements: any;
1923
- account: string;
1924
- requested: boolean;
1925
- status: "active" | "inactive" | "pending" | "unrequested";
1926
- };
1927
- lastSyncedAt: number;
1928
- capabilityId: string;
1929
- })[];
1930
- _id?: undefined;
1931
- doc?: undefined;
1932
- } | undefined>>;
820
+ }, Promise<any>>;
1933
821
  /**
1934
822
  * Internal Convex action that syncs Stripe catalog data (products, prices,
1935
823
  * webhooks, portal config) into Stripe based on your `sync` configuration.
@@ -1964,7 +852,7 @@ export declare class Logger {
1964
852
  debug(message: string): void;
1965
853
  }
1966
854
 
1967
- export declare const onlyStripeTables: (tables: Array<keyof typeof stripeTables>) => typeof stripeTables;
855
+ export declare const onlyStripeTables: <const T extends Array<keyof typeof stripeTables>>(tables: T) => Pick<typeof stripeTables, T[number]>;
1968
856
 
1969
857
  declare const PayImplementation: {
1970
858
  name: string;
@@ -2027,6 +915,16 @@ declare type ReturnDataMap = {
2027
915
 
2028
916
  declare type ReturnOrigin = (typeof RETURN_ORIGINS)[number];
2029
917
 
918
+ /** The stripe table keys that are present in the user's schema. */
919
+ declare type SchemaStripeTableKeys<Schema extends SchemaDefinition<GenericSchema, boolean>> = Extract<keyof StripeDataModel, keyof Schema["tables"]>;
920
+
921
+ /**
922
+ * Constrains a schema to one that contains at least one stripe table.
923
+ * Resolves to `Schema` when valid, or `never` (triggering a type error) when
924
+ * the provided schema has no stripe table keys at all.
925
+ */
926
+ declare type SchemaWithStripeTables<Schema extends SchemaDefinition<GenericSchema, boolean>> = SchemaStripeTableKeys<Schema> extends never ? never : Schema;
927
+
2030
928
  declare type StripeDataModel = DataModelFromSchemaDefinition<typeof stripeSchema>;
2031
929
 
2032
930
  /**
@@ -2591,6 +1489,7 @@ accountId: VString<string | undefined, "optional">;
2591
1489
  }, "required", "stripe" | "accountId" | "entityId" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.email" | "stripe.metadata" | "stripe.created" | `stripe.metadata.${string}` | "stripe.name" | "stripe.livemode" | "stripe.description" | "stripe.currency" | "customerId" | "stripe.address" | "stripe.phone" | "stripe.shipping" | "stripe.address.country" | "stripe.address.city" | "stripe.address.line1" | "stripe.address.line2" | "stripe.address.postal_code" | "stripe.address.state" | "stripe.discount" | "stripe.tax" | "stripe.balance" | "stripe.cash_balance" | "stripe.default_source" | "stripe.delinquent" | "stripe.invoice_credit_balance" | "stripe.invoice_prefix" | "stripe.invoice_settings" | "stripe.next_invoice_sequence" | "stripe.preferred_locales" | "stripe.sources" | "stripe.subscriptions" | "stripe.tax_exempt" | "stripe.tax_ids" | "stripe.test_clock" | "stripe.shipping.address" | "stripe.shipping.name" | "stripe.shipping.phone" | "stripe.shipping.address.country" | "stripe.shipping.address.city" | "stripe.shipping.address.line1" | "stripe.shipping.address.line2" | "stripe.shipping.address.postal_code" | "stripe.shipping.address.state" | "stripe.shipping.carrier" | "stripe.shipping.tracking_number" | `stripe.discount.${string}` | "stripe.tax.automatic_tax" | "stripe.tax.ip_address" | "stripe.tax.location" | "stripe.tax.location.country" | "stripe.tax.location.state" | "stripe.tax.location.source" | `stripe.cash_balance.${string}` | `stripe.invoice_credit_balance.${string}` | `stripe.invoice_settings.${string}` | `stripe.sources.${string}` | `stripe.subscriptions.${string}` | `stripe.tax_ids.${string}`>, {
2592
1490
  byEntityId: ["entityId", "_creationTime"];
2593
1491
  byAccountId: ["accountId", "_creationTime"];
1492
+ byAccountIdAndEntityid: ["accountId", "entityId", "_creationTime"];
2594
1493
  byStripeId: ["customerId", "_creationTime"];
2595
1494
  }, {}, {}>;
2596
1495
  stripeSubscriptions: TableDefinition<VObject< {
@@ -6269,6 +5168,7 @@ export declare const stripeTables: {
6269
5168
  }, "required", "stripe" | "accountId" | "entityId" | "lastSyncedAt" | "stripe.object" | "stripe.id" | "stripe.email" | "stripe.metadata" | "stripe.created" | `stripe.metadata.${string}` | "stripe.name" | "stripe.livemode" | "stripe.description" | "stripe.currency" | "customerId" | "stripe.address" | "stripe.phone" | "stripe.shipping" | "stripe.address.country" | "stripe.address.city" | "stripe.address.line1" | "stripe.address.line2" | "stripe.address.postal_code" | "stripe.address.state" | "stripe.discount" | "stripe.tax" | "stripe.balance" | "stripe.cash_balance" | "stripe.default_source" | "stripe.delinquent" | "stripe.invoice_credit_balance" | "stripe.invoice_prefix" | "stripe.invoice_settings" | "stripe.next_invoice_sequence" | "stripe.preferred_locales" | "stripe.sources" | "stripe.subscriptions" | "stripe.tax_exempt" | "stripe.tax_ids" | "stripe.test_clock" | "stripe.shipping.address" | "stripe.shipping.name" | "stripe.shipping.phone" | "stripe.shipping.address.country" | "stripe.shipping.address.city" | "stripe.shipping.address.line1" | "stripe.shipping.address.line2" | "stripe.shipping.address.postal_code" | "stripe.shipping.address.state" | "stripe.shipping.carrier" | "stripe.shipping.tracking_number" | `stripe.discount.${string}` | "stripe.tax.automatic_tax" | "stripe.tax.ip_address" | "stripe.tax.location" | "stripe.tax.location.country" | "stripe.tax.location.state" | "stripe.tax.location.source" | `stripe.cash_balance.${string}` | `stripe.invoice_credit_balance.${string}` | `stripe.invoice_settings.${string}` | `stripe.sources.${string}` | `stripe.subscriptions.${string}` | `stripe.tax_ids.${string}`>, {
6270
5169
  byEntityId: ["entityId", "_creationTime"];
6271
5170
  byAccountId: ["accountId", "_creationTime"];
5171
+ byAccountIdAndEntityid: ["accountId", "entityId", "_creationTime"];
6272
5172
  byStripeId: ["customerId", "_creationTime"];
6273
5173
  }, {}, {}>;
6274
5174
  stripeSubscriptions: TableDefinition<VObject< {