@@ -30,6 +30,27 @@ export type Database = {
3030 }
3131 Relationships : [ ]
3232 }
33+ customers : {
34+ Row : {
35+ created_at : string
36+ customer_id : string
37+ email : string
38+ updated_at : string
39+ }
40+ Insert : {
41+ created_at ?: string
42+ customer_id : string
43+ email : string
44+ updated_at ?: string
45+ }
46+ Update : {
47+ created_at ?: string
48+ customer_id ?: string
49+ email ?: string
50+ updated_at ?: string
51+ }
52+ Relationships : [ ]
53+ }
3354 endpoints : {
3455 Row : {
3556 cache_enabled : boolean
@@ -314,23 +335,70 @@ export type Database = {
314335 }
315336 Relationships : [ ]
316337 }
338+ subscriptions : {
339+ Row : {
340+ created_at : string
341+ customer_id : string
342+ next_billed_at : string
343+ price_id : string | null
344+ product_id : string | null
345+ scheduled_change : string | null
346+ subscription_id : string
347+ subscription_status : string
348+ updated_at : string
349+ }
350+ Insert : {
351+ created_at ?: string
352+ customer_id : string
353+ next_billed_at : string
354+ price_id ?: string | null
355+ product_id ?: string | null
356+ scheduled_change ?: string | null
357+ subscription_id : string
358+ subscription_status : string
359+ updated_at ?: string
360+ }
361+ Update : {
362+ created_at ?: string
363+ customer_id ?: string
364+ next_billed_at ?: string
365+ price_id ?: string | null
366+ product_id ?: string | null
367+ scheduled_change ?: string | null
368+ subscription_id ?: string
369+ subscription_status ?: string
370+ updated_at ?: string
371+ }
372+ Relationships : [
373+ {
374+ foreignKeyName : "subscriptions_customer_id_fkey"
375+ columns : [ "customer_id" ]
376+ isOneToOne : false
377+ referencedRelation : "customers"
378+ referencedColumns : [ "customer_id" ]
379+ } ,
380+ ]
381+ }
317382 usages : {
318383 Row : {
319384 billing_started_at : string
320385 calls_count : number
321386 id : number
387+ updated_at : string | null
322388 user_id : string
323389 }
324390 Insert : {
325391 billing_started_at ?: string
326392 calls_count ?: number
327393 id ?: number
394+ updated_at ?: string | null
328395 user_id : string
329396 }
330397 Update : {
331398 billing_started_at ?: string
332399 calls_count ?: number
333400 id ?: number
401+ updated_at ?: string | null
334402 user_id ?: string
335403 }
336404 Relationships : [ ]
@@ -340,6 +408,10 @@ export type Database = {
340408 [ _ in never ] : never
341409 }
342410 Functions : {
411+ check_subscription : {
412+ Args : { p_user_id : string }
413+ Returns : boolean
414+ }
343415 get_route_data : {
344416 Args : {
345417 p_service_name : string
0 commit comments