@periskope/types 0.6.87 → 0.6.89

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.
@@ -76,24 +76,28 @@ export type Database = {
76
76
  {
77
77
  foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
78
78
  columns: ["broadcast_id"];
79
+ isOneToOne: false;
79
80
  referencedRelation: "tbl_broadcast_messages";
80
81
  referencedColumns: ["broadcast_id"];
81
82
  },
82
83
  {
83
84
  foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
84
85
  columns: ["broadcast_id"];
86
+ isOneToOne: false;
85
87
  referencedRelation: "view_broadcast_logs";
86
88
  referencedColumns: ["broadcast_id"];
87
89
  },
88
90
  {
89
91
  foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
90
92
  columns: ["org_id"];
93
+ isOneToOne: false;
91
94
  referencedRelation: "tbl_org";
92
95
  referencedColumns: ["org_id"];
93
96
  },
94
97
  {
95
98
  foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
96
99
  columns: ["org_id"];
100
+ isOneToOne: false;
97
101
  referencedRelation: "view_org";
98
102
  referencedColumns: ["org_id"];
99
103
  }
@@ -107,6 +111,7 @@ export type Database = {
107
111
  created_at: string;
108
112
  message_payload: Json | null;
109
113
  org_id: string;
114
+ org_phone: string | null;
110
115
  performed_at: string | null;
111
116
  performed_by: string | null;
112
117
  scheduled_at: string | null;
@@ -118,6 +123,7 @@ export type Database = {
118
123
  created_at?: string;
119
124
  message_payload?: Json | null;
120
125
  org_id: string;
126
+ org_phone?: string | null;
121
127
  performed_at?: string | null;
122
128
  performed_by?: string | null;
123
129
  scheduled_at?: string | null;
@@ -129,6 +135,7 @@ export type Database = {
129
135
  created_at?: string;
130
136
  message_payload?: Json | null;
131
137
  org_id?: string;
138
+ org_phone?: string | null;
132
139
  performed_at?: string | null;
133
140
  performed_by?: string | null;
134
141
  scheduled_at?: string | null;
@@ -137,12 +144,14 @@ export type Database = {
137
144
  {
138
145
  foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
139
146
  columns: ["org_id"];
147
+ isOneToOne: false;
140
148
  referencedRelation: "tbl_org";
141
149
  referencedColumns: ["org_id"];
142
150
  },
143
151
  {
144
152
  foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
145
153
  columns: ["org_id"];
154
+ isOneToOne: false;
146
155
  referencedRelation: "view_org";
147
156
  referencedColumns: ["org_id"];
148
157
  }
@@ -177,12 +186,14 @@ export type Database = {
177
186
  {
178
187
  foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
179
188
  columns: ["org_id"];
189
+ isOneToOne: false;
180
190
  referencedRelation: "tbl_org";
181
191
  referencedColumns: ["org_id"];
182
192
  },
183
193
  {
184
194
  foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
185
195
  columns: ["org_id"];
196
+ isOneToOne: false;
186
197
  referencedRelation: "view_org";
187
198
  referencedColumns: ["org_id"];
188
199
  }
@@ -220,6 +231,7 @@ export type Database = {
220
231
  {
221
232
  foreignKeyName: "tbl_chat_access_org_id_email_fkey";
222
233
  columns: ["org_id", "email"];
234
+ isOneToOne: false;
223
235
  referencedRelation: "tbl_org_members";
224
236
  referencedColumns: ["org_id", "email"];
225
237
  }
@@ -380,6 +392,7 @@ export type Database = {
380
392
  {
381
393
  foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones";
382
394
  columns: ["org_phone", "org_id"];
395
+ isOneToOne: false;
383
396
  referencedRelation: "tbl_org_phones";
384
397
  referencedColumns: ["org_phone", "org_id"];
385
398
  }
@@ -429,6 +442,7 @@ export type Database = {
429
442
  {
430
443
  foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones";
431
444
  columns: ["org_id", "org_phone"];
445
+ isOneToOne: false;
432
446
  referencedRelation: "tbl_org_phones";
433
447
  referencedColumns: ["org_id", "org_phone"];
434
448
  }
@@ -466,6 +480,7 @@ export type Database = {
466
480
  {
467
481
  foreignKeyName: "tbl_chat_participants_fkey_tbl_chats";
468
482
  columns: ["org_id", "org_phone", "chat_id"];
483
+ isOneToOne: false;
469
484
  referencedRelation: "tbl_chats";
470
485
  referencedColumns: ["org_id", "org_phone", "chat_id"];
471
486
  }
@@ -554,6 +569,7 @@ export type Database = {
554
569
  {
555
570
  foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones";
556
571
  columns: ["org_id", "org_phone"];
572
+ isOneToOne: false;
557
573
  referencedRelation: "tbl_org_phones";
558
574
  referencedColumns: ["org_id", "org_phone"];
559
575
  }
@@ -618,12 +634,14 @@ export type Database = {
618
634
  {
619
635
  foreignKeyName: "tbl_chat_tickets_org_id_fkey";
620
636
  columns: ["org_id"];
637
+ isOneToOne: false;
621
638
  referencedRelation: "tbl_org";
622
639
  referencedColumns: ["org_id"];
623
640
  },
624
641
  {
625
642
  foreignKeyName: "tbl_chat_tickets_org_id_fkey";
626
643
  columns: ["org_id"];
644
+ isOneToOne: false;
627
645
  referencedRelation: "view_org";
628
646
  referencedColumns: ["org_id"];
629
647
  }
@@ -706,6 +724,7 @@ export type Database = {
706
724
  {
707
725
  foreignKeyName: "tbl_chats_fkey_tbl_org_phones";
708
726
  columns: ["org_phone", "org_id"];
727
+ isOneToOne: false;
709
728
  referencedRelation: "tbl_org_phones";
710
729
  referencedColumns: ["org_phone", "org_id"];
711
730
  }
@@ -797,12 +816,14 @@ export type Database = {
797
816
  {
798
817
  foreignKeyName: "tbl_contacts_org_id_fkey";
799
818
  columns: ["org_id"];
819
+ isOneToOne: false;
800
820
  referencedRelation: "tbl_org";
801
821
  referencedColumns: ["org_id"];
802
822
  },
803
823
  {
804
824
  foreignKeyName: "tbl_contacts_org_id_fkey";
805
825
  columns: ["org_id"];
826
+ isOneToOne: false;
806
827
  referencedRelation: "view_org";
807
828
  referencedColumns: ["org_id"];
808
829
  }
@@ -843,12 +864,14 @@ export type Database = {
843
864
  {
844
865
  foreignKeyName: "tbl_custom_properties_org_id_fkey";
845
866
  columns: ["org_id"];
867
+ isOneToOne: false;
846
868
  referencedRelation: "tbl_org";
847
869
  referencedColumns: ["org_id"];
848
870
  },
849
871
  {
850
872
  foreignKeyName: "tbl_custom_properties_org_id_fkey";
851
873
  columns: ["org_id"];
874
+ isOneToOne: false;
852
875
  referencedRelation: "view_org";
853
876
  referencedColumns: ["org_id"];
854
877
  }
@@ -895,12 +918,14 @@ export type Database = {
895
918
  {
896
919
  foreignKeyName: "tbl_integration_hooks_org_id_fkey";
897
920
  columns: ["org_id"];
921
+ isOneToOne: false;
898
922
  referencedRelation: "tbl_org";
899
923
  referencedColumns: ["org_id"];
900
924
  },
901
925
  {
902
926
  foreignKeyName: "tbl_integration_hooks_org_id_fkey";
903
927
  columns: ["org_id"];
928
+ isOneToOne: false;
904
929
  referencedRelation: "view_org";
905
930
  referencedColumns: ["org_id"];
906
931
  }
@@ -944,12 +969,14 @@ export type Database = {
944
969
  {
945
970
  foreignKeyName: "tbl_integration_logs_org_id_fkey";
946
971
  columns: ["org_id"];
972
+ isOneToOne: false;
947
973
  referencedRelation: "tbl_org";
948
974
  referencedColumns: ["org_id"];
949
975
  },
950
976
  {
951
977
  foreignKeyName: "tbl_integration_logs_org_id_fkey";
952
978
  columns: ["org_id"];
979
+ isOneToOne: false;
953
980
  referencedRelation: "view_org";
954
981
  referencedColumns: ["org_id"];
955
982
  }
@@ -996,12 +1023,14 @@ export type Database = {
996
1023
  {
997
1024
  foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
998
1025
  columns: ["org_id"];
1026
+ isOneToOne: false;
999
1027
  referencedRelation: "tbl_org";
1000
1028
  referencedColumns: ["org_id"];
1001
1029
  },
1002
1030
  {
1003
1031
  foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
1004
1032
  columns: ["org_id"];
1033
+ isOneToOne: false;
1005
1034
  referencedRelation: "view_org";
1006
1035
  referencedColumns: ["org_id"];
1007
1036
  }
@@ -1075,12 +1104,14 @@ export type Database = {
1075
1104
  {
1076
1105
  foreignKeyName: "tbl_org_labels_org_id_fkey";
1077
1106
  columns: ["org_id"];
1107
+ isOneToOne: false;
1078
1108
  referencedRelation: "tbl_org";
1079
1109
  referencedColumns: ["org_id"];
1080
1110
  },
1081
1111
  {
1082
1112
  foreignKeyName: "tbl_org_labels_org_id_fkey";
1083
1113
  columns: ["org_id"];
1114
+ isOneToOne: false;
1084
1115
  referencedRelation: "view_org";
1085
1116
  referencedColumns: ["org_id"];
1086
1117
  }
@@ -1142,18 +1173,21 @@ export type Database = {
1142
1173
  {
1143
1174
  foreignKeyName: "tbl_org_members_fkey_auth_users";
1144
1175
  columns: ["user_id"];
1176
+ isOneToOne: false;
1145
1177
  referencedRelation: "users";
1146
1178
  referencedColumns: ["id"];
1147
1179
  },
1148
1180
  {
1149
1181
  foreignKeyName: "tbl_org_members_fkey_tbl_org";
1150
1182
  columns: ["org_id"];
1183
+ isOneToOne: false;
1151
1184
  referencedRelation: "tbl_org";
1152
1185
  referencedColumns: ["org_id"];
1153
1186
  },
1154
1187
  {
1155
1188
  foreignKeyName: "tbl_org_members_fkey_tbl_org";
1156
1189
  columns: ["org_id"];
1190
+ isOneToOne: false;
1157
1191
  referencedRelation: "view_org";
1158
1192
  referencedColumns: ["org_id"];
1159
1193
  }
@@ -1218,24 +1252,28 @@ export type Database = {
1218
1252
  {
1219
1253
  foreignKeyName: "tbl_org_phones_fkey_tbl_org";
1220
1254
  columns: ["org_id"];
1255
+ isOneToOne: false;
1221
1256
  referencedRelation: "tbl_org";
1222
1257
  referencedColumns: ["org_id"];
1223
1258
  },
1224
1259
  {
1225
1260
  foreignKeyName: "tbl_org_phones_fkey_tbl_org";
1226
1261
  columns: ["org_id"];
1262
+ isOneToOne: false;
1227
1263
  referencedRelation: "view_org";
1228
1264
  referencedColumns: ["org_id"];
1229
1265
  },
1230
1266
  {
1231
1267
  foreignKeyName: "tbl_org_phones_org_id_fkey";
1232
1268
  columns: ["org_id"];
1269
+ isOneToOne: false;
1233
1270
  referencedRelation: "tbl_org";
1234
1271
  referencedColumns: ["org_id"];
1235
1272
  },
1236
1273
  {
1237
1274
  foreignKeyName: "tbl_org_phones_org_id_fkey";
1238
1275
  columns: ["org_id"];
1276
+ isOneToOne: false;
1239
1277
  referencedRelation: "view_org";
1240
1278
  referencedColumns: ["org_id"];
1241
1279
  }
@@ -1267,12 +1305,14 @@ export type Database = {
1267
1305
  {
1268
1306
  foreignKeyName: "tbl_quick_replies_org_id_fkey";
1269
1307
  columns: ["org_id"];
1308
+ isOneToOne: false;
1270
1309
  referencedRelation: "tbl_org";
1271
1310
  referencedColumns: ["org_id"];
1272
1311
  },
1273
1312
  {
1274
1313
  foreignKeyName: "tbl_quick_replies_org_id_fkey";
1275
1314
  columns: ["org_id"];
1315
+ isOneToOne: false;
1276
1316
  referencedRelation: "view_org";
1277
1317
  referencedColumns: ["org_id"];
1278
1318
  }
@@ -1327,12 +1367,14 @@ export type Database = {
1327
1367
  {
1328
1368
  foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
1329
1369
  columns: ["org_id"];
1370
+ isOneToOne: false;
1330
1371
  referencedRelation: "tbl_org";
1331
1372
  referencedColumns: ["org_id"];
1332
1373
  },
1333
1374
  {
1334
1375
  foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
1335
1376
  columns: ["org_id"];
1377
+ isOneToOne: false;
1336
1378
  referencedRelation: "view_org";
1337
1379
  referencedColumns: ["org_id"];
1338
1380
  }
@@ -1430,13 +1472,6 @@ export type Database = {
1430
1472
  };
1431
1473
  };
1432
1474
  Functions: {
1433
- calculate_response_time: {
1434
- Args: {
1435
- flag_metadata: Json;
1436
- message_timestamp: string;
1437
- };
1438
- Returns: number;
1439
- };
1440
1475
  gen_id: {
1441
1476
  Args: {
1442
1477
  prefix: string;
@@ -1501,7 +1536,8 @@ export type Database = {
1501
1536
  Args: {
1502
1537
  org_id_input: string;
1503
1538
  contact_ids_input?: string[];
1504
- last_updated_at_input?: string;
1539
+ with_chats?: boolean;
1540
+ with_name?: boolean;
1505
1541
  };
1506
1542
  Returns: Json;
1507
1543
  };
@@ -1615,6 +1651,7 @@ export type Database = {
1615
1651
  id: string;
1616
1652
  name: string;
1617
1653
  owner: string | null;
1654
+ owner_id: string | null;
1618
1655
  public: boolean | null;
1619
1656
  updated_at: string | null;
1620
1657
  };
@@ -1626,6 +1663,7 @@ export type Database = {
1626
1663
  id: string;
1627
1664
  name: string;
1628
1665
  owner?: string | null;
1666
+ owner_id?: string | null;
1629
1667
  public?: boolean | null;
1630
1668
  updated_at?: string | null;
1631
1669
  };
@@ -1637,17 +1675,11 @@ export type Database = {
1637
1675
  id?: string;
1638
1676
  name?: string;
1639
1677
  owner?: string | null;
1678
+ owner_id?: string | null;
1640
1679
  public?: boolean | null;
1641
1680
  updated_at?: string | null;
1642
1681
  };
1643
- Relationships: [
1644
- {
1645
- foreignKeyName: "buckets_owner_fkey";
1646
- columns: ["owner"];
1647
- referencedRelation: "users";
1648
- referencedColumns: ["id"];
1649
- }
1650
- ];
1682
+ Relationships: [];
1651
1683
  };
1652
1684
  migrations: {
1653
1685
  Row: {
@@ -1679,6 +1711,7 @@ export type Database = {
1679
1711
  metadata: Json | null;
1680
1712
  name: string | null;
1681
1713
  owner: string | null;
1714
+ owner_id: string | null;
1682
1715
  path_tokens: string[] | null;
1683
1716
  updated_at: string | null;
1684
1717
  version: string | null;
@@ -1691,6 +1724,7 @@ export type Database = {
1691
1724
  metadata?: Json | null;
1692
1725
  name?: string | null;
1693
1726
  owner?: string | null;
1727
+ owner_id?: string | null;
1694
1728
  path_tokens?: string[] | null;
1695
1729
  updated_at?: string | null;
1696
1730
  version?: string | null;
@@ -1703,6 +1737,7 @@ export type Database = {
1703
1737
  metadata?: Json | null;
1704
1738
  name?: string | null;
1705
1739
  owner?: string | null;
1740
+ owner_id?: string | null;
1706
1741
  path_tokens?: string[] | null;
1707
1742
  updated_at?: string | null;
1708
1743
  version?: string | null;
@@ -1711,8 +1746,104 @@ export type Database = {
1711
1746
  {
1712
1747
  foreignKeyName: "objects_bucketId_fkey";
1713
1748
  columns: ["bucket_id"];
1749
+ isOneToOne: false;
1750
+ referencedRelation: "buckets";
1751
+ referencedColumns: ["id"];
1752
+ }
1753
+ ];
1754
+ };
1755
+ s3_multipart_uploads: {
1756
+ Row: {
1757
+ bucket_id: string;
1758
+ created_at: string;
1759
+ id: string;
1760
+ in_progress_size: number;
1761
+ key: string;
1762
+ owner_id: string | null;
1763
+ upload_signature: string;
1764
+ version: string;
1765
+ };
1766
+ Insert: {
1767
+ bucket_id: string;
1768
+ created_at?: string;
1769
+ id: string;
1770
+ in_progress_size?: number;
1771
+ key: string;
1772
+ owner_id?: string | null;
1773
+ upload_signature: string;
1774
+ version: string;
1775
+ };
1776
+ Update: {
1777
+ bucket_id?: string;
1778
+ created_at?: string;
1779
+ id?: string;
1780
+ in_progress_size?: number;
1781
+ key?: string;
1782
+ owner_id?: string | null;
1783
+ upload_signature?: string;
1784
+ version?: string;
1785
+ };
1786
+ Relationships: [
1787
+ {
1788
+ foreignKeyName: "s3_multipart_uploads_bucket_id_fkey";
1789
+ columns: ["bucket_id"];
1790
+ isOneToOne: false;
1791
+ referencedRelation: "buckets";
1792
+ referencedColumns: ["id"];
1793
+ }
1794
+ ];
1795
+ };
1796
+ s3_multipart_uploads_parts: {
1797
+ Row: {
1798
+ bucket_id: string;
1799
+ created_at: string;
1800
+ etag: string;
1801
+ id: string;
1802
+ key: string;
1803
+ owner_id: string | null;
1804
+ part_number: number;
1805
+ size: number;
1806
+ upload_id: string;
1807
+ version: string;
1808
+ };
1809
+ Insert: {
1810
+ bucket_id: string;
1811
+ created_at?: string;
1812
+ etag: string;
1813
+ id?: string;
1814
+ key: string;
1815
+ owner_id?: string | null;
1816
+ part_number: number;
1817
+ size?: number;
1818
+ upload_id: string;
1819
+ version: string;
1820
+ };
1821
+ Update: {
1822
+ bucket_id?: string;
1823
+ created_at?: string;
1824
+ etag?: string;
1825
+ id?: string;
1826
+ key?: string;
1827
+ owner_id?: string | null;
1828
+ part_number?: number;
1829
+ size?: number;
1830
+ upload_id?: string;
1831
+ version?: string;
1832
+ };
1833
+ Relationships: [
1834
+ {
1835
+ foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey";
1836
+ columns: ["bucket_id"];
1837
+ isOneToOne: false;
1714
1838
  referencedRelation: "buckets";
1715
1839
  referencedColumns: ["id"];
1840
+ },
1841
+ {
1842
+ foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey";
1843
+ columns: ["upload_id"];
1844
+ isOneToOne: false;
1845
+ referencedRelation: "s3_multipart_uploads";
1846
+ referencedColumns: ["id"];
1716
1847
  }
1717
1848
  ];
1718
1849
  };
@@ -1755,6 +1886,37 @@ export type Database = {
1755
1886
  bucket_id: string;
1756
1887
  }[];
1757
1888
  };
1889
+ list_multipart_uploads_with_delimiter: {
1890
+ Args: {
1891
+ bucket_id: string;
1892
+ prefix_param: string;
1893
+ delimiter_param: string;
1894
+ max_keys?: number;
1895
+ next_key_token?: string;
1896
+ next_upload_token?: string;
1897
+ };
1898
+ Returns: {
1899
+ key: string;
1900
+ id: string;
1901
+ created_at: string;
1902
+ }[];
1903
+ };
1904
+ list_objects_with_delimiter: {
1905
+ Args: {
1906
+ bucket_id: string;
1907
+ prefix_param: string;
1908
+ delimiter_param: string;
1909
+ max_keys?: number;
1910
+ start_after?: string;
1911
+ next_token?: string;
1912
+ };
1913
+ Returns: {
1914
+ name: string;
1915
+ id: string;
1916
+ metadata: Json;
1917
+ updated_at: string;
1918
+ }[];
1919
+ };
1758
1920
  search: {
1759
1921
  Args: {
1760
1922
  prefix: string;
package/dist/types.d.ts CHANGED
@@ -39,6 +39,11 @@ export type MicrosurveyData = {
39
39
  text: string;
40
40
  checked: boolean;
41
41
  }[];
42
+ export type OrgPreferences = {
43
+ disable_ai_flagging?: boolean;
44
+ allow_exports?: boolean;
45
+ sync_phone_contacts?: boolean;
46
+ };
42
47
  export type OrgMetadata = {
43
48
  phone_number: string;
44
49
  ticket_prefix: string;
@@ -46,6 +51,15 @@ export type OrgMetadata = {
46
51
  surveyData?: MicrosurveyData;
47
52
  onboarding: Record<string, boolean>;
48
53
  onboarding_completed_at: Date | null;
54
+ preferences?: OrgPreferences;
55
+ hubspot_pipelines?: {
56
+ id: string;
57
+ label: string;
58
+ default_stage: {
59
+ id: string;
60
+ label: string;
61
+ };
62
+ }[];
49
63
  };
50
64
  export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
51
65
  user: Tables<'tbl_org_members'>;
@@ -121,14 +135,19 @@ export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
121
135
  [key: string]: boolean;
122
136
  };
123
137
  hubspot_metadata: {
124
- id: string;
125
- type: string;
126
- hubId: string;
127
- object_data: HubspotObjectDataType;
138
+ id?: string;
139
+ type?: string;
140
+ hubId?: string;
141
+ pipeline: {
142
+ id: string;
143
+ label: string;
144
+ };
145
+ object_data?: HubspotObjectDataType;
128
146
  } | null;
129
147
  }>;
130
148
  export type ContactType = Merge<Tables<'tbl_contacts'>, {
131
149
  chats: ChatType[] | null;
150
+ chat_ids?: string[];
132
151
  }>;
133
152
  export type ReactionType = Tables<'tbl_chat_reactions'>;
134
153
  export type NotificationType = Tables<'tbl_chat_notifications'>;
package/mod_json_type.ps1 CHANGED
@@ -11,5 +11,99 @@ $newTypeDefinition = 'export type Json = { [key: string]: any } | any'
11
11
  # Replace the old type definition with the new one
12
12
  $updatedContent = $fileContent -replace $oldTypeDefinition, $newTypeDefinition
13
13
 
14
+ # Update interface to type
15
+ $oldText = 'export interface Database '
16
+ $newText = 'export type Database = '
17
+
18
+ $updatedContent = $updatedContent -replace $oldText, $newText
19
+
20
+ # Append the new type definition if it doesn't exist
21
+ $addContent = @"
22
+ type PublicSchema = Database[Extract<keyof Database, "public">]
23
+
24
+ export type Tables<
25
+ PublicTableNameOrOptions extends
26
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
27
+ | { schema: keyof Database },
28
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
29
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
30
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
31
+ : never = never,
32
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
33
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
34
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
35
+ Row: infer R
36
+ }
37
+ ? R
38
+ : never
39
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
40
+ PublicSchema["Views"])
41
+ ? (PublicSchema["Tables"] &
42
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
43
+ Row: infer R
44
+ }
45
+ ? R
46
+ : never
47
+ : never
48
+
49
+ export type TablesInsert<
50
+ PublicTableNameOrOptions extends
51
+ | keyof PublicSchema["Tables"]
52
+ | { schema: keyof Database },
53
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
54
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
55
+ : never = never,
56
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
57
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
58
+ Insert: infer I
59
+ }
60
+ ? I
61
+ : never
62
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
63
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
64
+ Insert: infer I
65
+ }
66
+ ? I
67
+ : never
68
+ : never
69
+
70
+ export type TablesUpdate<
71
+ PublicTableNameOrOptions extends
72
+ | keyof PublicSchema["Tables"]
73
+ | { schema: keyof Database },
74
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
75
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
76
+ : never = never,
77
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
78
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
79
+ Update: infer U
80
+ }
81
+ ? U
82
+ : never
83
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
84
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
85
+ Update: infer U
86
+ }
87
+ ? U
88
+ : never
89
+ : never
90
+
91
+ export type Enums<
92
+ PublicEnumNameOrOptions extends
93
+ | keyof PublicSchema["Enums"]
94
+ | { schema: keyof Database },
95
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
96
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
97
+ : never = never,
98
+ > = PublicEnumNameOrOptions extends { schema: keyof Database }
99
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
100
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
101
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
102
+ : never
103
+ "@
104
+
105
+ # Append the new content to the updated content
106
+ $updatedContent += $addContent
107
+
14
108
  # Write the updated content back to the file
15
- $updatedContent | Set-Content $filePath
109
+ $updatedContent | Set-Content $filePath