@nextblock-cms/db 0.22.0 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/supabase/server.d.ts +151 -2
- package/lib/supabase/types.d.ts +160 -2
- package/package.json +1 -1
- package/supabase/functions/nextblock-migration-ingest/index.ts +64 -1
- package/supabase/migrations/02022_security_hardening_writer_boundary_and_aal.sql +504 -0
- package/supabase/migrations/02023_aal2_for_orders_profiles_site_settings.sql +171 -0
- package/supabase/migrations/02024_advisor_trigger_grants_and_pg_net_schema.sql +113 -0
package/lib/supabase/server.d.ts
CHANGED
|
@@ -118,6 +118,11 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
118
118
|
type: Database["public"]["Enums"]["interaction_type"];
|
|
119
119
|
updated_at: string;
|
|
120
120
|
user_id: string;
|
|
121
|
+
author: {
|
|
122
|
+
avatar_url: string | null;
|
|
123
|
+
full_name: string | null;
|
|
124
|
+
id: string | null;
|
|
125
|
+
} | null;
|
|
121
126
|
};
|
|
122
127
|
Insert: {
|
|
123
128
|
content: string;
|
|
@@ -165,6 +170,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
165
170
|
isOneToOne: false;
|
|
166
171
|
referencedRelation: "products";
|
|
167
172
|
referencedColumns: ["id"];
|
|
173
|
+
}, {
|
|
174
|
+
foreignKeyName: "cms_interactions_user_id_profiles_fkey";
|
|
175
|
+
columns: ["user_id"];
|
|
176
|
+
isOneToOne: false;
|
|
177
|
+
referencedRelation: "profile_cards";
|
|
178
|
+
referencedColumns: ["id"];
|
|
168
179
|
}, {
|
|
169
180
|
foreignKeyName: "cms_interactions_user_id_profiles_fkey";
|
|
170
181
|
columns: ["user_id"];
|
|
@@ -238,6 +249,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
238
249
|
updated_at?: string;
|
|
239
250
|
};
|
|
240
251
|
Relationships: [{
|
|
252
|
+
foreignKeyName: "content_drafts_author_id_fkey";
|
|
253
|
+
columns: ["author_id"];
|
|
254
|
+
isOneToOne: false;
|
|
255
|
+
referencedRelation: "profile_cards";
|
|
256
|
+
referencedColumns: ["id"];
|
|
257
|
+
}, {
|
|
241
258
|
foreignKeyName: "content_drafts_author_id_fkey";
|
|
242
259
|
columns: ["author_id"];
|
|
243
260
|
isOneToOne: false;
|
|
@@ -289,6 +306,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
289
306
|
tool_name?: string;
|
|
290
307
|
};
|
|
291
308
|
Relationships: [{
|
|
309
|
+
foreignKeyName: "cortex_ai_db_mutation_audit_actor_user_id_fkey";
|
|
310
|
+
columns: ["actor_user_id"];
|
|
311
|
+
isOneToOne: false;
|
|
312
|
+
referencedRelation: "profile_cards";
|
|
313
|
+
referencedColumns: ["id"];
|
|
314
|
+
}, {
|
|
292
315
|
foreignKeyName: "cortex_ai_db_mutation_audit_actor_user_id_fkey";
|
|
293
316
|
columns: ["actor_user_id"];
|
|
294
317
|
isOneToOne: false;
|
|
@@ -296,6 +319,27 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
296
319
|
referencedColumns: ["id"];
|
|
297
320
|
}];
|
|
298
321
|
};
|
|
322
|
+
cortex_request_log: {
|
|
323
|
+
Row: {
|
|
324
|
+
created_at: string;
|
|
325
|
+
id: string;
|
|
326
|
+
route: string;
|
|
327
|
+
user_id: string;
|
|
328
|
+
};
|
|
329
|
+
Insert: {
|
|
330
|
+
created_at?: string;
|
|
331
|
+
id?: string;
|
|
332
|
+
route: string;
|
|
333
|
+
user_id: string;
|
|
334
|
+
};
|
|
335
|
+
Update: {
|
|
336
|
+
created_at?: string;
|
|
337
|
+
id?: string;
|
|
338
|
+
route?: string;
|
|
339
|
+
user_id?: string;
|
|
340
|
+
};
|
|
341
|
+
Relationships: [];
|
|
342
|
+
};
|
|
299
343
|
coupon_freemius_mappings: {
|
|
300
344
|
Row: {
|
|
301
345
|
coupon_id: string;
|
|
@@ -577,6 +621,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
577
621
|
};
|
|
578
622
|
email_2fa_challenges: {
|
|
579
623
|
Row: {
|
|
624
|
+
attempts: number;
|
|
580
625
|
consumed_at: string | null;
|
|
581
626
|
created_at: string;
|
|
582
627
|
expires_at: string;
|
|
@@ -585,6 +630,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
585
630
|
user_id: string;
|
|
586
631
|
};
|
|
587
632
|
Insert: {
|
|
633
|
+
attempts?: number;
|
|
588
634
|
consumed_at?: string | null;
|
|
589
635
|
created_at?: string;
|
|
590
636
|
expires_at: string;
|
|
@@ -593,6 +639,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
593
639
|
user_id: string;
|
|
594
640
|
};
|
|
595
641
|
Update: {
|
|
642
|
+
attempts?: number;
|
|
596
643
|
consumed_at?: string | null;
|
|
597
644
|
created_at?: string;
|
|
598
645
|
expires_at?: string;
|
|
@@ -883,6 +930,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
883
930
|
width?: number | null;
|
|
884
931
|
};
|
|
885
932
|
Relationships: [{
|
|
933
|
+
foreignKeyName: "media_uploader_id_fkey";
|
|
934
|
+
columns: ["uploader_id"];
|
|
935
|
+
isOneToOne: false;
|
|
936
|
+
referencedRelation: "profile_cards";
|
|
937
|
+
referencedColumns: ["id"];
|
|
938
|
+
}, {
|
|
886
939
|
foreignKeyName: "media_uploader_id_fkey";
|
|
887
940
|
columns: ["uploader_id"];
|
|
888
941
|
isOneToOne: false;
|
|
@@ -1237,6 +1290,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1237
1290
|
version?: number;
|
|
1238
1291
|
};
|
|
1239
1292
|
Relationships: [{
|
|
1293
|
+
foreignKeyName: "page_revisions_author_id_fkey";
|
|
1294
|
+
columns: ["author_id"];
|
|
1295
|
+
isOneToOne: false;
|
|
1296
|
+
referencedRelation: "profile_cards";
|
|
1297
|
+
referencedColumns: ["id"];
|
|
1298
|
+
}, {
|
|
1240
1299
|
foreignKeyName: "page_revisions_author_id_fkey";
|
|
1241
1300
|
columns: ["author_id"];
|
|
1242
1301
|
isOneToOne: false;
|
|
@@ -1303,6 +1362,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1303
1362
|
version?: number;
|
|
1304
1363
|
};
|
|
1305
1364
|
Relationships: [{
|
|
1365
|
+
foreignKeyName: "pages_author_id_fkey";
|
|
1366
|
+
columns: ["author_id"];
|
|
1367
|
+
isOneToOne: false;
|
|
1368
|
+
referencedRelation: "profile_cards";
|
|
1369
|
+
referencedColumns: ["id"];
|
|
1370
|
+
}, {
|
|
1306
1371
|
foreignKeyName: "pages_author_id_fkey";
|
|
1307
1372
|
columns: ["author_id"];
|
|
1308
1373
|
isOneToOne: false;
|
|
@@ -1351,6 +1416,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1351
1416
|
version?: number;
|
|
1352
1417
|
};
|
|
1353
1418
|
Relationships: [{
|
|
1419
|
+
foreignKeyName: "post_revisions_author_id_fkey";
|
|
1420
|
+
columns: ["author_id"];
|
|
1421
|
+
isOneToOne: false;
|
|
1422
|
+
referencedRelation: "profile_cards";
|
|
1423
|
+
referencedColumns: ["id"];
|
|
1424
|
+
}, {
|
|
1354
1425
|
foreignKeyName: "post_revisions_author_id_fkey";
|
|
1355
1426
|
columns: ["author_id"];
|
|
1356
1427
|
isOneToOne: false;
|
|
@@ -1426,6 +1497,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1426
1497
|
version?: number;
|
|
1427
1498
|
};
|
|
1428
1499
|
Relationships: [{
|
|
1500
|
+
foreignKeyName: "posts_author_id_fkey";
|
|
1501
|
+
columns: ["author_id"];
|
|
1502
|
+
isOneToOne: false;
|
|
1503
|
+
referencedRelation: "profile_cards";
|
|
1504
|
+
referencedColumns: ["id"];
|
|
1505
|
+
}, {
|
|
1429
1506
|
foreignKeyName: "posts_author_id_fkey";
|
|
1430
1507
|
columns: ["author_id"];
|
|
1431
1508
|
isOneToOne: false;
|
|
@@ -1594,6 +1671,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1594
1671
|
updated_at?: string;
|
|
1595
1672
|
};
|
|
1596
1673
|
Relationships: [{
|
|
1674
|
+
foreignKeyName: "product_drafts_author_id_fkey";
|
|
1675
|
+
columns: ["author_id"];
|
|
1676
|
+
isOneToOne: false;
|
|
1677
|
+
referencedRelation: "profile_cards";
|
|
1678
|
+
referencedColumns: ["id"];
|
|
1679
|
+
}, {
|
|
1597
1680
|
foreignKeyName: "product_drafts_author_id_fkey";
|
|
1598
1681
|
columns: ["author_id"];
|
|
1599
1682
|
isOneToOne: false;
|
|
@@ -1777,6 +1860,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
1777
1860
|
version?: number;
|
|
1778
1861
|
};
|
|
1779
1862
|
Relationships: [{
|
|
1863
|
+
foreignKeyName: "product_revisions_author_id_fkey";
|
|
1864
|
+
columns: ["author_id"];
|
|
1865
|
+
isOneToOne: false;
|
|
1866
|
+
referencedRelation: "profile_cards";
|
|
1867
|
+
referencedColumns: ["id"];
|
|
1868
|
+
}, {
|
|
1780
1869
|
foreignKeyName: "product_revisions_author_id_fkey";
|
|
1781
1870
|
columns: ["author_id"];
|
|
1782
1871
|
isOneToOne: false;
|
|
@@ -2431,6 +2520,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2431
2520
|
};
|
|
2432
2521
|
ucp_cart_sessions: {
|
|
2433
2522
|
Row: {
|
|
2523
|
+
access_token_hash: string | null;
|
|
2434
2524
|
attribution: import('./types').Json;
|
|
2435
2525
|
buyer_identity: import('./types').Json;
|
|
2436
2526
|
checkout_url: string | null;
|
|
@@ -2448,6 +2538,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2448
2538
|
updated_at: string;
|
|
2449
2539
|
};
|
|
2450
2540
|
Insert: {
|
|
2541
|
+
access_token_hash?: string | null;
|
|
2451
2542
|
attribution?: import('./types').Json;
|
|
2452
2543
|
buyer_identity?: import('./types').Json;
|
|
2453
2544
|
checkout_url?: string | null;
|
|
@@ -2465,6 +2556,7 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2465
2556
|
updated_at?: string;
|
|
2466
2557
|
};
|
|
2467
2558
|
Update: {
|
|
2559
|
+
access_token_hash?: string | null;
|
|
2468
2560
|
attribution?: import('./types').Json;
|
|
2469
2561
|
buyer_identity?: import('./types').Json;
|
|
2470
2562
|
checkout_url?: string | null;
|
|
@@ -2533,6 +2625,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2533
2625
|
user_id?: string;
|
|
2534
2626
|
};
|
|
2535
2627
|
Relationships: [{
|
|
2628
|
+
foreignKeyName: "user_addresses_user_id_fkey";
|
|
2629
|
+
columns: ["user_id"];
|
|
2630
|
+
isOneToOne: false;
|
|
2631
|
+
referencedRelation: "profile_cards";
|
|
2632
|
+
referencedColumns: ["id"];
|
|
2633
|
+
}, {
|
|
2536
2634
|
foreignKeyName: "user_addresses_user_id_fkey";
|
|
2537
2635
|
columns: ["user_id"];
|
|
2538
2636
|
isOneToOne: false;
|
|
@@ -2616,7 +2714,26 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2616
2714
|
}];
|
|
2617
2715
|
};
|
|
2618
2716
|
};
|
|
2619
|
-
Views: {
|
|
2717
|
+
Views: {
|
|
2718
|
+
profile_cards: {
|
|
2719
|
+
Row: {
|
|
2720
|
+
avatar_url: string | null;
|
|
2721
|
+
full_name: string | null;
|
|
2722
|
+
id: string | null;
|
|
2723
|
+
};
|
|
2724
|
+
Insert: {
|
|
2725
|
+
avatar_url?: string | null;
|
|
2726
|
+
full_name?: string | null;
|
|
2727
|
+
id?: string | null;
|
|
2728
|
+
};
|
|
2729
|
+
Update: {
|
|
2730
|
+
avatar_url?: string | null;
|
|
2731
|
+
full_name?: string | null;
|
|
2732
|
+
id?: string | null;
|
|
2733
|
+
};
|
|
2734
|
+
Relationships: [];
|
|
2735
|
+
};
|
|
2736
|
+
};
|
|
2620
2737
|
Functions: {
|
|
2621
2738
|
apply_order_inventory_deduction: {
|
|
2622
2739
|
Args: {
|
|
@@ -2634,6 +2751,28 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2634
2751
|
paid_at: string;
|
|
2635
2752
|
}[];
|
|
2636
2753
|
};
|
|
2754
|
+
author: {
|
|
2755
|
+
Args: {
|
|
2756
|
+
"": Database["public"]["Tables"]["cms_interactions"]["Row"];
|
|
2757
|
+
};
|
|
2758
|
+
Returns: {
|
|
2759
|
+
avatar_url: string | null;
|
|
2760
|
+
full_name: string | null;
|
|
2761
|
+
id: string | null;
|
|
2762
|
+
};
|
|
2763
|
+
SetofOptions: {
|
|
2764
|
+
from: "cms_interactions";
|
|
2765
|
+
to: "profile_cards";
|
|
2766
|
+
isOneToOne: true;
|
|
2767
|
+
isSetofReturn: true;
|
|
2768
|
+
};
|
|
2769
|
+
};
|
|
2770
|
+
bump_email_2fa_attempts: {
|
|
2771
|
+
Args: {
|
|
2772
|
+
p_user_id: string;
|
|
2773
|
+
};
|
|
2774
|
+
Returns: number;
|
|
2775
|
+
};
|
|
2637
2776
|
clear_currency_price_overrides: {
|
|
2638
2777
|
Args: {
|
|
2639
2778
|
target_currency: string;
|
|
@@ -2692,6 +2831,10 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2692
2831
|
Args: never;
|
|
2693
2832
|
Returns: boolean;
|
|
2694
2833
|
};
|
|
2834
|
+
is_admin_mfa: {
|
|
2835
|
+
Args: never;
|
|
2836
|
+
Returns: boolean;
|
|
2837
|
+
};
|
|
2695
2838
|
is_valid_currency_amount_map: {
|
|
2696
2839
|
Args: {
|
|
2697
2840
|
amounts: import('./types').Json;
|
|
@@ -2723,6 +2866,12 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2723
2866
|
};
|
|
2724
2867
|
Returns: import('./types').Json;
|
|
2725
2868
|
};
|
|
2869
|
+
redeem_coupon_atomically: {
|
|
2870
|
+
Args: {
|
|
2871
|
+
p_coupon_id: string;
|
|
2872
|
+
};
|
|
2873
|
+
Returns: boolean;
|
|
2874
|
+
};
|
|
2726
2875
|
sync_inventory_cache_for_sku: {
|
|
2727
2876
|
Args: {
|
|
2728
2877
|
p_sku: string;
|
|
@@ -2752,6 +2901,6 @@ export declare const getServiceRoleSupabaseClient: () => import('@supabase/supab
|
|
|
2752
2901
|
};
|
|
2753
2902
|
CompositeTypes: { [_ in never]: never; };
|
|
2754
2903
|
}, {
|
|
2755
|
-
PostgrestVersion: "14.
|
|
2904
|
+
PostgrestVersion: "14.1";
|
|
2756
2905
|
}>;
|
|
2757
2906
|
export {};
|
package/lib/supabase/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type Json = string | number | boolean | null | {
|
|
|
3
3
|
} | Json[];
|
|
4
4
|
export type Database = {
|
|
5
5
|
__InternalSupabase: {
|
|
6
|
-
PostgrestVersion: "14.
|
|
6
|
+
PostgrestVersion: "14.1";
|
|
7
7
|
};
|
|
8
8
|
public: {
|
|
9
9
|
Tables: {
|
|
@@ -119,6 +119,11 @@ export type Database = {
|
|
|
119
119
|
type: Database["public"]["Enums"]["interaction_type"];
|
|
120
120
|
updated_at: string;
|
|
121
121
|
user_id: string;
|
|
122
|
+
author: {
|
|
123
|
+
avatar_url: string | null;
|
|
124
|
+
full_name: string | null;
|
|
125
|
+
id: string | null;
|
|
126
|
+
} | null;
|
|
122
127
|
};
|
|
123
128
|
Insert: {
|
|
124
129
|
content: string;
|
|
@@ -170,6 +175,13 @@ export type Database = {
|
|
|
170
175
|
referencedRelation: "products";
|
|
171
176
|
referencedColumns: ["id"];
|
|
172
177
|
},
|
|
178
|
+
{
|
|
179
|
+
foreignKeyName: "cms_interactions_user_id_profiles_fkey";
|
|
180
|
+
columns: ["user_id"];
|
|
181
|
+
isOneToOne: false;
|
|
182
|
+
referencedRelation: "profile_cards";
|
|
183
|
+
referencedColumns: ["id"];
|
|
184
|
+
},
|
|
173
185
|
{
|
|
174
186
|
foreignKeyName: "cms_interactions_user_id_profiles_fkey";
|
|
175
187
|
columns: ["user_id"];
|
|
@@ -244,6 +256,13 @@ export type Database = {
|
|
|
244
256
|
updated_at?: string;
|
|
245
257
|
};
|
|
246
258
|
Relationships: [
|
|
259
|
+
{
|
|
260
|
+
foreignKeyName: "content_drafts_author_id_fkey";
|
|
261
|
+
columns: ["author_id"];
|
|
262
|
+
isOneToOne: false;
|
|
263
|
+
referencedRelation: "profile_cards";
|
|
264
|
+
referencedColumns: ["id"];
|
|
265
|
+
},
|
|
247
266
|
{
|
|
248
267
|
foreignKeyName: "content_drafts_author_id_fkey";
|
|
249
268
|
columns: ["author_id"];
|
|
@@ -297,6 +316,13 @@ export type Database = {
|
|
|
297
316
|
tool_name?: string;
|
|
298
317
|
};
|
|
299
318
|
Relationships: [
|
|
319
|
+
{
|
|
320
|
+
foreignKeyName: "cortex_ai_db_mutation_audit_actor_user_id_fkey";
|
|
321
|
+
columns: ["actor_user_id"];
|
|
322
|
+
isOneToOne: false;
|
|
323
|
+
referencedRelation: "profile_cards";
|
|
324
|
+
referencedColumns: ["id"];
|
|
325
|
+
},
|
|
300
326
|
{
|
|
301
327
|
foreignKeyName: "cortex_ai_db_mutation_audit_actor_user_id_fkey";
|
|
302
328
|
columns: ["actor_user_id"];
|
|
@@ -306,6 +332,27 @@ export type Database = {
|
|
|
306
332
|
}
|
|
307
333
|
];
|
|
308
334
|
};
|
|
335
|
+
cortex_request_log: {
|
|
336
|
+
Row: {
|
|
337
|
+
created_at: string;
|
|
338
|
+
id: string;
|
|
339
|
+
route: string;
|
|
340
|
+
user_id: string;
|
|
341
|
+
};
|
|
342
|
+
Insert: {
|
|
343
|
+
created_at?: string;
|
|
344
|
+
id?: string;
|
|
345
|
+
route: string;
|
|
346
|
+
user_id: string;
|
|
347
|
+
};
|
|
348
|
+
Update: {
|
|
349
|
+
created_at?: string;
|
|
350
|
+
id?: string;
|
|
351
|
+
route?: string;
|
|
352
|
+
user_id?: string;
|
|
353
|
+
};
|
|
354
|
+
Relationships: [];
|
|
355
|
+
};
|
|
309
356
|
coupon_freemius_mappings: {
|
|
310
357
|
Row: {
|
|
311
358
|
coupon_id: string;
|
|
@@ -596,6 +643,7 @@ export type Database = {
|
|
|
596
643
|
};
|
|
597
644
|
email_2fa_challenges: {
|
|
598
645
|
Row: {
|
|
646
|
+
attempts: number;
|
|
599
647
|
consumed_at: string | null;
|
|
600
648
|
created_at: string;
|
|
601
649
|
expires_at: string;
|
|
@@ -604,6 +652,7 @@ export type Database = {
|
|
|
604
652
|
user_id: string;
|
|
605
653
|
};
|
|
606
654
|
Insert: {
|
|
655
|
+
attempts?: number;
|
|
607
656
|
consumed_at?: string | null;
|
|
608
657
|
created_at?: string;
|
|
609
658
|
expires_at: string;
|
|
@@ -612,6 +661,7 @@ export type Database = {
|
|
|
612
661
|
user_id: string;
|
|
613
662
|
};
|
|
614
663
|
Update: {
|
|
664
|
+
attempts?: number;
|
|
615
665
|
consumed_at?: string | null;
|
|
616
666
|
created_at?: string;
|
|
617
667
|
expires_at?: string;
|
|
@@ -908,6 +958,13 @@ export type Database = {
|
|
|
908
958
|
width?: number | null;
|
|
909
959
|
};
|
|
910
960
|
Relationships: [
|
|
961
|
+
{
|
|
962
|
+
foreignKeyName: "media_uploader_id_fkey";
|
|
963
|
+
columns: ["uploader_id"];
|
|
964
|
+
isOneToOne: false;
|
|
965
|
+
referencedRelation: "profile_cards";
|
|
966
|
+
referencedColumns: ["id"];
|
|
967
|
+
},
|
|
911
968
|
{
|
|
912
969
|
foreignKeyName: "media_uploader_id_fkey";
|
|
913
970
|
columns: ["uploader_id"];
|
|
@@ -1274,6 +1331,13 @@ export type Database = {
|
|
|
1274
1331
|
version?: number;
|
|
1275
1332
|
};
|
|
1276
1333
|
Relationships: [
|
|
1334
|
+
{
|
|
1335
|
+
foreignKeyName: "page_revisions_author_id_fkey";
|
|
1336
|
+
columns: ["author_id"];
|
|
1337
|
+
isOneToOne: false;
|
|
1338
|
+
referencedRelation: "profile_cards";
|
|
1339
|
+
referencedColumns: ["id"];
|
|
1340
|
+
},
|
|
1277
1341
|
{
|
|
1278
1342
|
foreignKeyName: "page_revisions_author_id_fkey";
|
|
1279
1343
|
columns: ["author_id"];
|
|
@@ -1343,6 +1407,13 @@ export type Database = {
|
|
|
1343
1407
|
version?: number;
|
|
1344
1408
|
};
|
|
1345
1409
|
Relationships: [
|
|
1410
|
+
{
|
|
1411
|
+
foreignKeyName: "pages_author_id_fkey";
|
|
1412
|
+
columns: ["author_id"];
|
|
1413
|
+
isOneToOne: false;
|
|
1414
|
+
referencedRelation: "profile_cards";
|
|
1415
|
+
referencedColumns: ["id"];
|
|
1416
|
+
},
|
|
1346
1417
|
{
|
|
1347
1418
|
foreignKeyName: "pages_author_id_fkey";
|
|
1348
1419
|
columns: ["author_id"];
|
|
@@ -1395,6 +1466,13 @@ export type Database = {
|
|
|
1395
1466
|
version?: number;
|
|
1396
1467
|
};
|
|
1397
1468
|
Relationships: [
|
|
1469
|
+
{
|
|
1470
|
+
foreignKeyName: "post_revisions_author_id_fkey";
|
|
1471
|
+
columns: ["author_id"];
|
|
1472
|
+
isOneToOne: false;
|
|
1473
|
+
referencedRelation: "profile_cards";
|
|
1474
|
+
referencedColumns: ["id"];
|
|
1475
|
+
},
|
|
1398
1476
|
{
|
|
1399
1477
|
foreignKeyName: "post_revisions_author_id_fkey";
|
|
1400
1478
|
columns: ["author_id"];
|
|
@@ -1473,6 +1551,13 @@ export type Database = {
|
|
|
1473
1551
|
version?: number;
|
|
1474
1552
|
};
|
|
1475
1553
|
Relationships: [
|
|
1554
|
+
{
|
|
1555
|
+
foreignKeyName: "posts_author_id_fkey";
|
|
1556
|
+
columns: ["author_id"];
|
|
1557
|
+
isOneToOne: false;
|
|
1558
|
+
referencedRelation: "profile_cards";
|
|
1559
|
+
referencedColumns: ["id"];
|
|
1560
|
+
},
|
|
1476
1561
|
{
|
|
1477
1562
|
foreignKeyName: "posts_author_id_fkey";
|
|
1478
1563
|
columns: ["author_id"];
|
|
@@ -1650,6 +1735,13 @@ export type Database = {
|
|
|
1650
1735
|
updated_at?: string;
|
|
1651
1736
|
};
|
|
1652
1737
|
Relationships: [
|
|
1738
|
+
{
|
|
1739
|
+
foreignKeyName: "product_drafts_author_id_fkey";
|
|
1740
|
+
columns: ["author_id"];
|
|
1741
|
+
isOneToOne: false;
|
|
1742
|
+
referencedRelation: "profile_cards";
|
|
1743
|
+
referencedColumns: ["id"];
|
|
1744
|
+
},
|
|
1653
1745
|
{
|
|
1654
1746
|
foreignKeyName: "product_drafts_author_id_fkey";
|
|
1655
1747
|
columns: ["author_id"];
|
|
@@ -1841,6 +1933,13 @@ export type Database = {
|
|
|
1841
1933
|
version?: number;
|
|
1842
1934
|
};
|
|
1843
1935
|
Relationships: [
|
|
1936
|
+
{
|
|
1937
|
+
foreignKeyName: "product_revisions_author_id_fkey";
|
|
1938
|
+
columns: ["author_id"];
|
|
1939
|
+
isOneToOne: false;
|
|
1940
|
+
referencedRelation: "profile_cards";
|
|
1941
|
+
referencedColumns: ["id"];
|
|
1942
|
+
},
|
|
1844
1943
|
{
|
|
1845
1944
|
foreignKeyName: "product_revisions_author_id_fkey";
|
|
1846
1945
|
columns: ["author_id"];
|
|
@@ -2509,6 +2608,7 @@ export type Database = {
|
|
|
2509
2608
|
};
|
|
2510
2609
|
ucp_cart_sessions: {
|
|
2511
2610
|
Row: {
|
|
2611
|
+
access_token_hash: string | null;
|
|
2512
2612
|
attribution: Json;
|
|
2513
2613
|
buyer_identity: Json;
|
|
2514
2614
|
checkout_url: string | null;
|
|
@@ -2526,6 +2626,7 @@ export type Database = {
|
|
|
2526
2626
|
updated_at: string;
|
|
2527
2627
|
};
|
|
2528
2628
|
Insert: {
|
|
2629
|
+
access_token_hash?: string | null;
|
|
2529
2630
|
attribution?: Json;
|
|
2530
2631
|
buyer_identity?: Json;
|
|
2531
2632
|
checkout_url?: string | null;
|
|
@@ -2543,6 +2644,7 @@ export type Database = {
|
|
|
2543
2644
|
updated_at?: string;
|
|
2544
2645
|
};
|
|
2545
2646
|
Update: {
|
|
2647
|
+
access_token_hash?: string | null;
|
|
2546
2648
|
attribution?: Json;
|
|
2547
2649
|
buyer_identity?: Json;
|
|
2548
2650
|
checkout_url?: string | null;
|
|
@@ -2611,6 +2713,13 @@ export type Database = {
|
|
|
2611
2713
|
user_id?: string;
|
|
2612
2714
|
};
|
|
2613
2715
|
Relationships: [
|
|
2716
|
+
{
|
|
2717
|
+
foreignKeyName: "user_addresses_user_id_fkey";
|
|
2718
|
+
columns: ["user_id"];
|
|
2719
|
+
isOneToOne: false;
|
|
2720
|
+
referencedRelation: "profile_cards";
|
|
2721
|
+
referencedColumns: ["id"];
|
|
2722
|
+
},
|
|
2614
2723
|
{
|
|
2615
2724
|
foreignKeyName: "user_addresses_user_id_fkey";
|
|
2616
2725
|
columns: ["user_id"];
|
|
@@ -2700,7 +2809,24 @@ export type Database = {
|
|
|
2700
2809
|
};
|
|
2701
2810
|
};
|
|
2702
2811
|
Views: {
|
|
2703
|
-
|
|
2812
|
+
profile_cards: {
|
|
2813
|
+
Row: {
|
|
2814
|
+
avatar_url: string | null;
|
|
2815
|
+
full_name: string | null;
|
|
2816
|
+
id: string | null;
|
|
2817
|
+
};
|
|
2818
|
+
Insert: {
|
|
2819
|
+
avatar_url?: string | null;
|
|
2820
|
+
full_name?: string | null;
|
|
2821
|
+
id?: string | null;
|
|
2822
|
+
};
|
|
2823
|
+
Update: {
|
|
2824
|
+
avatar_url?: string | null;
|
|
2825
|
+
full_name?: string | null;
|
|
2826
|
+
id?: string | null;
|
|
2827
|
+
};
|
|
2828
|
+
Relationships: [];
|
|
2829
|
+
};
|
|
2704
2830
|
};
|
|
2705
2831
|
Functions: {
|
|
2706
2832
|
apply_order_inventory_deduction: {
|
|
@@ -2719,6 +2845,28 @@ export type Database = {
|
|
|
2719
2845
|
paid_at: string;
|
|
2720
2846
|
}[];
|
|
2721
2847
|
};
|
|
2848
|
+
author: {
|
|
2849
|
+
Args: {
|
|
2850
|
+
"": Database["public"]["Tables"]["cms_interactions"]["Row"];
|
|
2851
|
+
};
|
|
2852
|
+
Returns: {
|
|
2853
|
+
avatar_url: string | null;
|
|
2854
|
+
full_name: string | null;
|
|
2855
|
+
id: string | null;
|
|
2856
|
+
};
|
|
2857
|
+
SetofOptions: {
|
|
2858
|
+
from: "cms_interactions";
|
|
2859
|
+
to: "profile_cards";
|
|
2860
|
+
isOneToOne: true;
|
|
2861
|
+
isSetofReturn: true;
|
|
2862
|
+
};
|
|
2863
|
+
};
|
|
2864
|
+
bump_email_2fa_attempts: {
|
|
2865
|
+
Args: {
|
|
2866
|
+
p_user_id: string;
|
|
2867
|
+
};
|
|
2868
|
+
Returns: number;
|
|
2869
|
+
};
|
|
2722
2870
|
clear_currency_price_overrides: {
|
|
2723
2871
|
Args: {
|
|
2724
2872
|
target_currency: string;
|
|
@@ -2777,6 +2925,10 @@ export type Database = {
|
|
|
2777
2925
|
Args: never;
|
|
2778
2926
|
Returns: boolean;
|
|
2779
2927
|
};
|
|
2928
|
+
is_admin_mfa: {
|
|
2929
|
+
Args: never;
|
|
2930
|
+
Returns: boolean;
|
|
2931
|
+
};
|
|
2780
2932
|
is_valid_currency_amount_map: {
|
|
2781
2933
|
Args: {
|
|
2782
2934
|
amounts: Json;
|
|
@@ -2808,6 +2960,12 @@ export type Database = {
|
|
|
2808
2960
|
};
|
|
2809
2961
|
Returns: Json;
|
|
2810
2962
|
};
|
|
2963
|
+
redeem_coupon_atomically: {
|
|
2964
|
+
Args: {
|
|
2965
|
+
p_coupon_id: string;
|
|
2966
|
+
};
|
|
2967
|
+
Returns: boolean;
|
|
2968
|
+
};
|
|
2811
2969
|
sync_inventory_cache_for_sku: {
|
|
2812
2970
|
Args: {
|
|
2813
2971
|
p_sku: string;
|