@periskope/types 0.6.64 → 0.6.66
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/dist/supabase.types.d.ts +61 -19
- package/dist/types.d.ts +12 -0
- package/dist/types.js +5 -1
- package/package.json +1 -1
- package/supabase.types.ts +103 -61
- package/types.ts +21 -0
package/dist/supabase.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Json = {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
} | any;
|
|
4
|
-
export
|
|
4
|
+
export type Database = {
|
|
5
5
|
graphql_public: {
|
|
6
6
|
Tables: {
|
|
7
7
|
[_ in never]: never;
|
|
@@ -160,7 +160,6 @@ export interface Database {
|
|
|
160
160
|
forwarding_score: number | null;
|
|
161
161
|
from: string | null;
|
|
162
162
|
from_me: boolean | null;
|
|
163
|
-
frt_timestamp: string | null;
|
|
164
163
|
has_media: boolean | null;
|
|
165
164
|
has_quoted_msg: boolean | null;
|
|
166
165
|
has_reaction: boolean | null;
|
|
@@ -168,7 +167,6 @@ export interface Database {
|
|
|
168
167
|
invite_v4: Json | null;
|
|
169
168
|
is_deleted: boolean | null;
|
|
170
169
|
is_ephemeral: boolean | null;
|
|
171
|
-
is_flagged: boolean | null;
|
|
172
170
|
is_forwarded: boolean | null;
|
|
173
171
|
is_gif: boolean | null;
|
|
174
172
|
is_starred: boolean | null;
|
|
@@ -210,7 +208,6 @@ export interface Database {
|
|
|
210
208
|
forwarding_score?: number | null;
|
|
211
209
|
from?: string | null;
|
|
212
210
|
from_me?: boolean | null;
|
|
213
|
-
frt_timestamp?: string | null;
|
|
214
211
|
has_media?: boolean | null;
|
|
215
212
|
has_quoted_msg?: boolean | null;
|
|
216
213
|
has_reaction?: boolean | null;
|
|
@@ -218,7 +215,6 @@ export interface Database {
|
|
|
218
215
|
invite_v4?: Json | null;
|
|
219
216
|
is_deleted?: boolean | null;
|
|
220
217
|
is_ephemeral?: boolean | null;
|
|
221
|
-
is_flagged?: boolean | null;
|
|
222
218
|
is_forwarded?: boolean | null;
|
|
223
219
|
is_gif?: boolean | null;
|
|
224
220
|
is_starred?: boolean | null;
|
|
@@ -260,7 +256,6 @@ export interface Database {
|
|
|
260
256
|
forwarding_score?: number | null;
|
|
261
257
|
from?: string | null;
|
|
262
258
|
from_me?: boolean | null;
|
|
263
|
-
frt_timestamp?: string | null;
|
|
264
259
|
has_media?: boolean | null;
|
|
265
260
|
has_quoted_msg?: boolean | null;
|
|
266
261
|
has_reaction?: boolean | null;
|
|
@@ -268,7 +263,6 @@ export interface Database {
|
|
|
268
263
|
invite_v4?: Json | null;
|
|
269
264
|
is_deleted?: boolean | null;
|
|
270
265
|
is_ephemeral?: boolean | null;
|
|
271
|
-
is_flagged?: boolean | null;
|
|
272
266
|
is_forwarded?: boolean | null;
|
|
273
267
|
is_gif?: boolean | null;
|
|
274
268
|
is_starred?: boolean | null;
|
|
@@ -739,6 +733,38 @@ export interface Database {
|
|
|
739
733
|
}
|
|
740
734
|
];
|
|
741
735
|
};
|
|
736
|
+
tbl_flagged_messages: {
|
|
737
|
+
Row: {
|
|
738
|
+
org_id: string;
|
|
739
|
+
response_id: string | null;
|
|
740
|
+
response_timestamp: string | null;
|
|
741
|
+
response_type: string | null;
|
|
742
|
+
unique_id: string;
|
|
743
|
+
};
|
|
744
|
+
Insert: {
|
|
745
|
+
org_id: string;
|
|
746
|
+
response_id?: string | null;
|
|
747
|
+
response_timestamp?: string | null;
|
|
748
|
+
response_type?: string | null;
|
|
749
|
+
unique_id: string;
|
|
750
|
+
};
|
|
751
|
+
Update: {
|
|
752
|
+
org_id?: string;
|
|
753
|
+
response_id?: string | null;
|
|
754
|
+
response_timestamp?: string | null;
|
|
755
|
+
response_type?: string | null;
|
|
756
|
+
unique_id?: string;
|
|
757
|
+
};
|
|
758
|
+
Relationships: [
|
|
759
|
+
{
|
|
760
|
+
foreignKeyName: "tbl_flagged_messages_org_id_fkey";
|
|
761
|
+
columns: ["org_id"];
|
|
762
|
+
isOneToOne: false;
|
|
763
|
+
referencedRelation: "tbl_org";
|
|
764
|
+
referencedColumns: ["org_id"];
|
|
765
|
+
}
|
|
766
|
+
];
|
|
767
|
+
};
|
|
742
768
|
tbl_integration_hooks: {
|
|
743
769
|
Row: {
|
|
744
770
|
hook_url: string;
|
|
@@ -874,6 +900,7 @@ export interface Database {
|
|
|
874
900
|
tbl_org: {
|
|
875
901
|
Row: {
|
|
876
902
|
created_at: string;
|
|
903
|
+
is_subscription_active: boolean | null;
|
|
877
904
|
org_id: string;
|
|
878
905
|
org_image: string | null;
|
|
879
906
|
org_metadata: Json | null;
|
|
@@ -882,10 +909,12 @@ export interface Database {
|
|
|
882
909
|
stripe_customer_details: Json | null;
|
|
883
910
|
stripe_customer_id: string | null;
|
|
884
911
|
stripe_subscription_details: Json | null;
|
|
912
|
+
subscription_status: string | null;
|
|
885
913
|
support_link: string | null;
|
|
886
914
|
};
|
|
887
915
|
Insert: {
|
|
888
916
|
created_at?: string;
|
|
917
|
+
is_subscription_active?: boolean | null;
|
|
889
918
|
org_id?: string;
|
|
890
919
|
org_image?: string | null;
|
|
891
920
|
org_metadata?: Json | null;
|
|
@@ -894,10 +923,12 @@ export interface Database {
|
|
|
894
923
|
stripe_customer_details?: Json | null;
|
|
895
924
|
stripe_customer_id?: string | null;
|
|
896
925
|
stripe_subscription_details?: Json | null;
|
|
926
|
+
subscription_status?: string | null;
|
|
897
927
|
support_link?: string | null;
|
|
898
928
|
};
|
|
899
929
|
Update: {
|
|
900
930
|
created_at?: string;
|
|
931
|
+
is_subscription_active?: boolean | null;
|
|
901
932
|
org_id?: string;
|
|
902
933
|
org_image?: string | null;
|
|
903
934
|
org_metadata?: Json | null;
|
|
@@ -906,6 +937,7 @@ export interface Database {
|
|
|
906
937
|
stripe_customer_details?: Json | null;
|
|
907
938
|
stripe_customer_id?: string | null;
|
|
908
939
|
stripe_subscription_details?: Json | null;
|
|
940
|
+
subscription_status?: string | null;
|
|
909
941
|
support_link?: string | null;
|
|
910
942
|
};
|
|
911
943
|
Relationships: [];
|
|
@@ -1125,6 +1157,7 @@ export interface Database {
|
|
|
1125
1157
|
chat_name: string | null;
|
|
1126
1158
|
chat_org_phones: string[] | null;
|
|
1127
1159
|
chat_type: string | null;
|
|
1160
|
+
created_at: string | null;
|
|
1128
1161
|
custom_properties: Json | null;
|
|
1129
1162
|
group_description: string | null;
|
|
1130
1163
|
has_access: boolean | null;
|
|
@@ -1186,7 +1219,7 @@ export interface Database {
|
|
|
1186
1219
|
org_id_input: string;
|
|
1187
1220
|
chat_ids_input?: string[];
|
|
1188
1221
|
};
|
|
1189
|
-
Returns:
|
|
1222
|
+
Returns: Json[];
|
|
1190
1223
|
};
|
|
1191
1224
|
get_chats: {
|
|
1192
1225
|
Args: {
|
|
@@ -1236,6 +1269,13 @@ export interface Database {
|
|
|
1236
1269
|
};
|
|
1237
1270
|
Returns: Json;
|
|
1238
1271
|
};
|
|
1272
|
+
get_org_phones: {
|
|
1273
|
+
Args: {
|
|
1274
|
+
org_id_input?: string;
|
|
1275
|
+
phone_id_input?: string;
|
|
1276
|
+
};
|
|
1277
|
+
Returns: Json;
|
|
1278
|
+
};
|
|
1239
1279
|
get_ticket_info: {
|
|
1240
1280
|
Args: {
|
|
1241
1281
|
ticket_id_input?: string;
|
|
@@ -1247,7 +1287,7 @@ export interface Database {
|
|
|
1247
1287
|
};
|
|
1248
1288
|
list_org_from_user: {
|
|
1249
1289
|
Args: Record<PropertyKey, never>;
|
|
1250
|
-
Returns:
|
|
1290
|
+
Returns: string[];
|
|
1251
1291
|
};
|
|
1252
1292
|
list_role_from_user: {
|
|
1253
1293
|
Args: Record<PropertyKey, never>;
|
|
@@ -1416,7 +1456,7 @@ export interface Database {
|
|
|
1416
1456
|
Args: {
|
|
1417
1457
|
name: string;
|
|
1418
1458
|
};
|
|
1419
|
-
Returns:
|
|
1459
|
+
Returns: string[];
|
|
1420
1460
|
};
|
|
1421
1461
|
get_size_by_bucket: {
|
|
1422
1462
|
Args: Record<PropertyKey, never>;
|
|
@@ -1453,8 +1493,9 @@ export interface Database {
|
|
|
1453
1493
|
[_ in never]: never;
|
|
1454
1494
|
};
|
|
1455
1495
|
};
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1496
|
+
};
|
|
1497
|
+
type PublicSchema = Database[Extract<keyof Database, "public">];
|
|
1498
|
+
export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
|
|
1458
1499
|
schema: keyof Database;
|
|
1459
1500
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
1460
1501
|
schema: keyof Database;
|
|
@@ -1462,10 +1503,10 @@ export type Tables<PublicTableNameOrOptions extends keyof (Database["public"]["T
|
|
|
1462
1503
|
schema: keyof Database;
|
|
1463
1504
|
} ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
1464
1505
|
Row: infer R;
|
|
1465
|
-
} ? R : never : PublicTableNameOrOptions extends keyof (
|
|
1506
|
+
} ? R : never : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) ? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
1466
1507
|
Row: infer R;
|
|
1467
1508
|
} ? R : never : never;
|
|
1468
|
-
export type TablesInsert<PublicTableNameOrOptions extends keyof
|
|
1509
|
+
export type TablesInsert<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
1469
1510
|
schema: keyof Database;
|
|
1470
1511
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
1471
1512
|
schema: keyof Database;
|
|
@@ -1473,10 +1514,10 @@ export type TablesInsert<PublicTableNameOrOptions extends keyof Database["public
|
|
|
1473
1514
|
schema: keyof Database;
|
|
1474
1515
|
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
1475
1516
|
Insert: infer I;
|
|
1476
|
-
} ? I : never : PublicTableNameOrOptions extends keyof
|
|
1517
|
+
} ? I : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
1477
1518
|
Insert: infer I;
|
|
1478
1519
|
} ? I : never : never;
|
|
1479
|
-
export type TablesUpdate<PublicTableNameOrOptions extends keyof
|
|
1520
|
+
export type TablesUpdate<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
1480
1521
|
schema: keyof Database;
|
|
1481
1522
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
1482
1523
|
schema: keyof Database;
|
|
@@ -1484,13 +1525,14 @@ export type TablesUpdate<PublicTableNameOrOptions extends keyof Database["public
|
|
|
1484
1525
|
schema: keyof Database;
|
|
1485
1526
|
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
1486
1527
|
Update: infer U;
|
|
1487
|
-
} ? U : never : PublicTableNameOrOptions extends keyof
|
|
1528
|
+
} ? U : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
1488
1529
|
Update: infer U;
|
|
1489
1530
|
} ? U : never : never;
|
|
1490
|
-
export type Enums<PublicEnumNameOrOptions extends keyof
|
|
1531
|
+
export type Enums<PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | {
|
|
1491
1532
|
schema: keyof Database;
|
|
1492
1533
|
}, EnumName extends PublicEnumNameOrOptions extends {
|
|
1493
1534
|
schema: keyof Database;
|
|
1494
1535
|
} ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] : never = never> = PublicEnumNameOrOptions extends {
|
|
1495
1536
|
schema: keyof Database;
|
|
1496
|
-
} ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof
|
|
1537
|
+
} ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never;
|
|
1538
|
+
export {};
|
package/dist/types.d.ts
CHANGED
|
@@ -154,3 +154,15 @@ export type PhoneRealtimeChannel = {
|
|
|
154
154
|
error?: string;
|
|
155
155
|
presence_ref?: string;
|
|
156
156
|
};
|
|
157
|
+
export type TicketLogType = OverrideProperties<Tables<'tbl_integration_logs'>, {
|
|
158
|
+
integration_name: IntegrationLogType.NEW_TICKET;
|
|
159
|
+
metadata: {
|
|
160
|
+
ticket_id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
}>;
|
|
164
|
+
export type IntegrationLogDetailsType = TicketLogType;
|
|
165
|
+
export declare enum IntegrationLogType {
|
|
166
|
+
NEW_TICKET = "new_ticket"
|
|
167
|
+
}
|
|
168
|
+
export type LogTypeMap<T extends IntegrationLogType> = T extends IntegrationLogType.NEW_TICKET ? TicketLogType : Tables<'tbl_integration_logs'>;
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SUPPORTED_TYPES = exports.enumChatColors = exports.labelColors = exports.AllPlans = void 0;
|
|
3
|
+
exports.IntegrationLogType = exports.SUPPORTED_TYPES = exports.enumChatColors = exports.labelColors = exports.AllPlans = void 0;
|
|
4
4
|
/* ------------------------------ PERISKOPE TYPES ------------------------------ */
|
|
5
5
|
var AllPlans;
|
|
6
6
|
(function (AllPlans) {
|
|
@@ -49,3 +49,7 @@ exports.SUPPORTED_TYPES = [
|
|
|
49
49
|
'ptt',
|
|
50
50
|
'poll_creation',
|
|
51
51
|
];
|
|
52
|
+
var IntegrationLogType;
|
|
53
|
+
(function (IntegrationLogType) {
|
|
54
|
+
IntegrationLogType["NEW_TICKET"] = "new_ticket";
|
|
55
|
+
})(IntegrationLogType || (exports.IntegrationLogType = IntegrationLogType = {}));
|
package/package.json
CHANGED
package/supabase.types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type Json = { [key: string]: any } | any
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type Database = {
|
|
4
4
|
graphql_public: {
|
|
5
5
|
Tables: {
|
|
6
6
|
[_ in never]: never
|
|
@@ -66,7 +66,7 @@ export interface Database {
|
|
|
66
66
|
isOneToOne: false
|
|
67
67
|
referencedRelation: "tbl_org"
|
|
68
68
|
referencedColumns: ["org_id"]
|
|
69
|
-
}
|
|
69
|
+
},
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
72
|
tbl_broadcast_templates: {
|
|
@@ -101,7 +101,7 @@ export interface Database {
|
|
|
101
101
|
isOneToOne: false
|
|
102
102
|
referencedRelation: "tbl_org"
|
|
103
103
|
referencedColumns: ["org_id"]
|
|
104
|
-
}
|
|
104
|
+
},
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
tbl_chat_access: {
|
|
@@ -142,7 +142,7 @@ export interface Database {
|
|
|
142
142
|
isOneToOne: false
|
|
143
143
|
referencedRelation: "tbl_org_members"
|
|
144
144
|
referencedColumns: ["org_id", "email"]
|
|
145
|
-
}
|
|
145
|
+
},
|
|
146
146
|
]
|
|
147
147
|
}
|
|
148
148
|
tbl_chat_messages: {
|
|
@@ -159,7 +159,6 @@ export interface Database {
|
|
|
159
159
|
forwarding_score: number | null
|
|
160
160
|
from: string | null
|
|
161
161
|
from_me: boolean | null
|
|
162
|
-
frt_timestamp: string | null
|
|
163
162
|
has_media: boolean | null
|
|
164
163
|
has_quoted_msg: boolean | null
|
|
165
164
|
has_reaction: boolean | null
|
|
@@ -167,7 +166,6 @@ export interface Database {
|
|
|
167
166
|
invite_v4: Json | null
|
|
168
167
|
is_deleted: boolean | null
|
|
169
168
|
is_ephemeral: boolean | null
|
|
170
|
-
is_flagged: boolean | null
|
|
171
169
|
is_forwarded: boolean | null
|
|
172
170
|
is_gif: boolean | null
|
|
173
171
|
is_starred: boolean | null
|
|
@@ -209,7 +207,6 @@ export interface Database {
|
|
|
209
207
|
forwarding_score?: number | null
|
|
210
208
|
from?: string | null
|
|
211
209
|
from_me?: boolean | null
|
|
212
|
-
frt_timestamp?: string | null
|
|
213
210
|
has_media?: boolean | null
|
|
214
211
|
has_quoted_msg?: boolean | null
|
|
215
212
|
has_reaction?: boolean | null
|
|
@@ -217,7 +214,6 @@ export interface Database {
|
|
|
217
214
|
invite_v4?: Json | null
|
|
218
215
|
is_deleted?: boolean | null
|
|
219
216
|
is_ephemeral?: boolean | null
|
|
220
|
-
is_flagged?: boolean | null
|
|
221
217
|
is_forwarded?: boolean | null
|
|
222
218
|
is_gif?: boolean | null
|
|
223
219
|
is_starred?: boolean | null
|
|
@@ -259,7 +255,6 @@ export interface Database {
|
|
|
259
255
|
forwarding_score?: number | null
|
|
260
256
|
from?: string | null
|
|
261
257
|
from_me?: boolean | null
|
|
262
|
-
frt_timestamp?: string | null
|
|
263
258
|
has_media?: boolean | null
|
|
264
259
|
has_quoted_msg?: boolean | null
|
|
265
260
|
has_reaction?: boolean | null
|
|
@@ -267,7 +262,6 @@ export interface Database {
|
|
|
267
262
|
invite_v4?: Json | null
|
|
268
263
|
is_deleted?: boolean | null
|
|
269
264
|
is_ephemeral?: boolean | null
|
|
270
|
-
is_flagged?: boolean | null
|
|
271
265
|
is_forwarded?: boolean | null
|
|
272
266
|
is_gif?: boolean | null
|
|
273
267
|
is_starred?: boolean | null
|
|
@@ -303,7 +297,7 @@ export interface Database {
|
|
|
303
297
|
isOneToOne: false
|
|
304
298
|
referencedRelation: "tbl_org_phones"
|
|
305
299
|
referencedColumns: ["org_phone", "org_id"]
|
|
306
|
-
}
|
|
300
|
+
},
|
|
307
301
|
]
|
|
308
302
|
}
|
|
309
303
|
tbl_chat_notifications: {
|
|
@@ -353,7 +347,7 @@ export interface Database {
|
|
|
353
347
|
isOneToOne: false
|
|
354
348
|
referencedRelation: "tbl_org_phones"
|
|
355
349
|
referencedColumns: ["org_id", "org_phone"]
|
|
356
|
-
}
|
|
350
|
+
},
|
|
357
351
|
]
|
|
358
352
|
}
|
|
359
353
|
tbl_chat_participants: {
|
|
@@ -398,7 +392,7 @@ export interface Database {
|
|
|
398
392
|
isOneToOne: false
|
|
399
393
|
referencedRelation: "view_chats"
|
|
400
394
|
referencedColumns: ["org_id", "org_phone", "chat_id"]
|
|
401
|
-
}
|
|
395
|
+
},
|
|
402
396
|
]
|
|
403
397
|
}
|
|
404
398
|
tbl_chat_reactions: {
|
|
@@ -460,7 +454,7 @@ export interface Database {
|
|
|
460
454
|
isOneToOne: false
|
|
461
455
|
referencedRelation: "tbl_org_phones"
|
|
462
456
|
referencedColumns: ["org_id", "org_phone"]
|
|
463
|
-
}
|
|
457
|
+
},
|
|
464
458
|
]
|
|
465
459
|
}
|
|
466
460
|
tbl_chat_tickets: {
|
|
@@ -526,7 +520,7 @@ export interface Database {
|
|
|
526
520
|
isOneToOne: false
|
|
527
521
|
referencedRelation: "tbl_org"
|
|
528
522
|
referencedColumns: ["org_id"]
|
|
529
|
-
}
|
|
523
|
+
},
|
|
530
524
|
]
|
|
531
525
|
}
|
|
532
526
|
tbl_chats: {
|
|
@@ -606,7 +600,7 @@ export interface Database {
|
|
|
606
600
|
isOneToOne: false
|
|
607
601
|
referencedRelation: "tbl_org_phones"
|
|
608
602
|
referencedColumns: ["org_phone", "org_id"]
|
|
609
|
-
}
|
|
603
|
+
},
|
|
610
604
|
]
|
|
611
605
|
}
|
|
612
606
|
tbl_contacts: {
|
|
@@ -698,7 +692,7 @@ export interface Database {
|
|
|
698
692
|
isOneToOne: false
|
|
699
693
|
referencedRelation: "tbl_org"
|
|
700
694
|
referencedColumns: ["org_id"]
|
|
701
|
-
}
|
|
695
|
+
},
|
|
702
696
|
]
|
|
703
697
|
}
|
|
704
698
|
tbl_custom_properties: {
|
|
@@ -739,7 +733,39 @@ export interface Database {
|
|
|
739
733
|
isOneToOne: false
|
|
740
734
|
referencedRelation: "tbl_org"
|
|
741
735
|
referencedColumns: ["org_id"]
|
|
742
|
-
}
|
|
736
|
+
},
|
|
737
|
+
]
|
|
738
|
+
}
|
|
739
|
+
tbl_flagged_messages: {
|
|
740
|
+
Row: {
|
|
741
|
+
org_id: string
|
|
742
|
+
response_id: string | null
|
|
743
|
+
response_timestamp: string | null
|
|
744
|
+
response_type: string | null
|
|
745
|
+
unique_id: string
|
|
746
|
+
}
|
|
747
|
+
Insert: {
|
|
748
|
+
org_id: string
|
|
749
|
+
response_id?: string | null
|
|
750
|
+
response_timestamp?: string | null
|
|
751
|
+
response_type?: string | null
|
|
752
|
+
unique_id: string
|
|
753
|
+
}
|
|
754
|
+
Update: {
|
|
755
|
+
org_id?: string
|
|
756
|
+
response_id?: string | null
|
|
757
|
+
response_timestamp?: string | null
|
|
758
|
+
response_type?: string | null
|
|
759
|
+
unique_id?: string
|
|
760
|
+
}
|
|
761
|
+
Relationships: [
|
|
762
|
+
{
|
|
763
|
+
foreignKeyName: "tbl_flagged_messages_org_id_fkey"
|
|
764
|
+
columns: ["org_id"]
|
|
765
|
+
isOneToOne: false
|
|
766
|
+
referencedRelation: "tbl_org"
|
|
767
|
+
referencedColumns: ["org_id"]
|
|
768
|
+
},
|
|
743
769
|
]
|
|
744
770
|
}
|
|
745
771
|
tbl_integration_hooks: {
|
|
@@ -786,7 +812,7 @@ export interface Database {
|
|
|
786
812
|
isOneToOne: false
|
|
787
813
|
referencedRelation: "tbl_org"
|
|
788
814
|
referencedColumns: ["org_id"]
|
|
789
|
-
}
|
|
815
|
+
},
|
|
790
816
|
]
|
|
791
817
|
}
|
|
792
818
|
tbl_integration_logs: {
|
|
@@ -827,7 +853,7 @@ export interface Database {
|
|
|
827
853
|
isOneToOne: false
|
|
828
854
|
referencedRelation: "tbl_org"
|
|
829
855
|
referencedColumns: ["org_id"]
|
|
830
|
-
}
|
|
856
|
+
},
|
|
831
857
|
]
|
|
832
858
|
}
|
|
833
859
|
tbl_integration_tokens: {
|
|
@@ -871,12 +897,13 @@ export interface Database {
|
|
|
871
897
|
isOneToOne: false
|
|
872
898
|
referencedRelation: "tbl_org"
|
|
873
899
|
referencedColumns: ["org_id"]
|
|
874
|
-
}
|
|
900
|
+
},
|
|
875
901
|
]
|
|
876
902
|
}
|
|
877
903
|
tbl_org: {
|
|
878
904
|
Row: {
|
|
879
905
|
created_at: string
|
|
906
|
+
is_subscription_active: boolean | null
|
|
880
907
|
org_id: string
|
|
881
908
|
org_image: string | null
|
|
882
909
|
org_metadata: Json | null
|
|
@@ -885,10 +912,12 @@ export interface Database {
|
|
|
885
912
|
stripe_customer_details: Json | null
|
|
886
913
|
stripe_customer_id: string | null
|
|
887
914
|
stripe_subscription_details: Json | null
|
|
915
|
+
subscription_status: string | null
|
|
888
916
|
support_link: string | null
|
|
889
917
|
}
|
|
890
918
|
Insert: {
|
|
891
919
|
created_at?: string
|
|
920
|
+
is_subscription_active?: boolean | null
|
|
892
921
|
org_id?: string
|
|
893
922
|
org_image?: string | null
|
|
894
923
|
org_metadata?: Json | null
|
|
@@ -897,10 +926,12 @@ export interface Database {
|
|
|
897
926
|
stripe_customer_details?: Json | null
|
|
898
927
|
stripe_customer_id?: string | null
|
|
899
928
|
stripe_subscription_details?: Json | null
|
|
929
|
+
subscription_status?: string | null
|
|
900
930
|
support_link?: string | null
|
|
901
931
|
}
|
|
902
932
|
Update: {
|
|
903
933
|
created_at?: string
|
|
934
|
+
is_subscription_active?: boolean | null
|
|
904
935
|
org_id?: string
|
|
905
936
|
org_image?: string | null
|
|
906
937
|
org_metadata?: Json | null
|
|
@@ -909,6 +940,7 @@ export interface Database {
|
|
|
909
940
|
stripe_customer_details?: Json | null
|
|
910
941
|
stripe_customer_id?: string | null
|
|
911
942
|
stripe_subscription_details?: Json | null
|
|
943
|
+
subscription_status?: string | null
|
|
912
944
|
support_link?: string | null
|
|
913
945
|
}
|
|
914
946
|
Relationships: []
|
|
@@ -945,7 +977,7 @@ export interface Database {
|
|
|
945
977
|
isOneToOne: false
|
|
946
978
|
referencedRelation: "tbl_org"
|
|
947
979
|
referencedColumns: ["org_id"]
|
|
948
|
-
}
|
|
980
|
+
},
|
|
949
981
|
]
|
|
950
982
|
}
|
|
951
983
|
tbl_org_members: {
|
|
@@ -1002,7 +1034,7 @@ export interface Database {
|
|
|
1002
1034
|
isOneToOne: false
|
|
1003
1035
|
referencedRelation: "tbl_org"
|
|
1004
1036
|
referencedColumns: ["org_id"]
|
|
1005
|
-
}
|
|
1037
|
+
},
|
|
1006
1038
|
]
|
|
1007
1039
|
}
|
|
1008
1040
|
tbl_org_phones: {
|
|
@@ -1062,7 +1094,7 @@ export interface Database {
|
|
|
1062
1094
|
isOneToOne: false
|
|
1063
1095
|
referencedRelation: "tbl_org"
|
|
1064
1096
|
referencedColumns: ["org_id"]
|
|
1065
|
-
}
|
|
1097
|
+
},
|
|
1066
1098
|
]
|
|
1067
1099
|
}
|
|
1068
1100
|
tbl_tools_whatsapp_links: {
|
|
@@ -1116,7 +1148,7 @@ export interface Database {
|
|
|
1116
1148
|
isOneToOne: false
|
|
1117
1149
|
referencedRelation: "tbl_org"
|
|
1118
1150
|
referencedColumns: ["org_id"]
|
|
1119
|
-
}
|
|
1151
|
+
},
|
|
1120
1152
|
]
|
|
1121
1153
|
}
|
|
1122
1154
|
view_chats: {
|
|
@@ -1128,6 +1160,7 @@ export interface Database {
|
|
|
1128
1160
|
chat_name: string | null
|
|
1129
1161
|
chat_org_phones: string[] | null
|
|
1130
1162
|
chat_type: string | null
|
|
1163
|
+
created_at: string | null
|
|
1131
1164
|
custom_properties: Json | null
|
|
1132
1165
|
group_description: string | null
|
|
1133
1166
|
has_access: boolean | null
|
|
@@ -1150,7 +1183,7 @@ export interface Database {
|
|
|
1150
1183
|
isOneToOne: false
|
|
1151
1184
|
referencedRelation: "tbl_org_phones"
|
|
1152
1185
|
referencedColumns: ["org_phone", "org_id"]
|
|
1153
|
-
}
|
|
1186
|
+
},
|
|
1154
1187
|
]
|
|
1155
1188
|
}
|
|
1156
1189
|
}
|
|
@@ -1189,7 +1222,7 @@ export interface Database {
|
|
|
1189
1222
|
org_id_input: string
|
|
1190
1223
|
chat_ids_input?: string[]
|
|
1191
1224
|
}
|
|
1192
|
-
Returns:
|
|
1225
|
+
Returns: Json[]
|
|
1193
1226
|
}
|
|
1194
1227
|
get_chats: {
|
|
1195
1228
|
Args: {
|
|
@@ -1239,6 +1272,13 @@ export interface Database {
|
|
|
1239
1272
|
}
|
|
1240
1273
|
Returns: Json
|
|
1241
1274
|
}
|
|
1275
|
+
get_org_phones: {
|
|
1276
|
+
Args: {
|
|
1277
|
+
org_id_input?: string
|
|
1278
|
+
phone_id_input?: string
|
|
1279
|
+
}
|
|
1280
|
+
Returns: Json
|
|
1281
|
+
}
|
|
1242
1282
|
get_ticket_info: {
|
|
1243
1283
|
Args: {
|
|
1244
1284
|
ticket_id_input?: string
|
|
@@ -1250,7 +1290,7 @@ export interface Database {
|
|
|
1250
1290
|
}
|
|
1251
1291
|
list_org_from_user: {
|
|
1252
1292
|
Args: Record<PropertyKey, never>
|
|
1253
|
-
Returns:
|
|
1293
|
+
Returns: string[]
|
|
1254
1294
|
}
|
|
1255
1295
|
list_role_from_user: {
|
|
1256
1296
|
Args: Record<PropertyKey, never>
|
|
@@ -1401,7 +1441,7 @@ export interface Database {
|
|
|
1401
1441
|
isOneToOne: false
|
|
1402
1442
|
referencedRelation: "buckets"
|
|
1403
1443
|
referencedColumns: ["id"]
|
|
1404
|
-
}
|
|
1444
|
+
},
|
|
1405
1445
|
]
|
|
1406
1446
|
}
|
|
1407
1447
|
}
|
|
@@ -1434,7 +1474,7 @@ export interface Database {
|
|
|
1434
1474
|
Args: {
|
|
1435
1475
|
name: string
|
|
1436
1476
|
}
|
|
1437
|
-
Returns:
|
|
1477
|
+
Returns: string[]
|
|
1438
1478
|
}
|
|
1439
1479
|
get_size_by_bucket: {
|
|
1440
1480
|
Args: Record<PropertyKey, never>
|
|
@@ -1473,14 +1513,16 @@ export interface Database {
|
|
|
1473
1513
|
}
|
|
1474
1514
|
}
|
|
1475
1515
|
|
|
1516
|
+
type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
1517
|
+
|
|
1476
1518
|
export type Tables<
|
|
1477
1519
|
PublicTableNameOrOptions extends
|
|
1478
|
-
| keyof (
|
|
1520
|
+
| keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
1479
1521
|
| { schema: keyof Database },
|
|
1480
1522
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1481
1523
|
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
1482
1524
|
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
1483
|
-
: never = never
|
|
1525
|
+
: never = never,
|
|
1484
1526
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1485
1527
|
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
1486
1528
|
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
@@ -1488,69 +1530,69 @@ export type Tables<
|
|
|
1488
1530
|
}
|
|
1489
1531
|
? R
|
|
1490
1532
|
: never
|
|
1491
|
-
: PublicTableNameOrOptions extends keyof (
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1533
|
+
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
1534
|
+
PublicSchema["Views"])
|
|
1535
|
+
? (PublicSchema["Tables"] &
|
|
1536
|
+
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
1537
|
+
Row: infer R
|
|
1538
|
+
}
|
|
1539
|
+
? R
|
|
1540
|
+
: never
|
|
1498
1541
|
: never
|
|
1499
|
-
: never
|
|
1500
1542
|
|
|
1501
1543
|
export type TablesInsert<
|
|
1502
1544
|
PublicTableNameOrOptions extends
|
|
1503
|
-
| keyof
|
|
1545
|
+
| keyof PublicSchema["Tables"]
|
|
1504
1546
|
| { schema: keyof Database },
|
|
1505
1547
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1506
1548
|
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
1507
|
-
: never = never
|
|
1549
|
+
: never = never,
|
|
1508
1550
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1509
1551
|
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
1510
1552
|
Insert: infer I
|
|
1511
1553
|
}
|
|
1512
1554
|
? I
|
|
1513
1555
|
: never
|
|
1514
|
-
: PublicTableNameOrOptions extends keyof
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1556
|
+
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
1557
|
+
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
1558
|
+
Insert: infer I
|
|
1559
|
+
}
|
|
1560
|
+
? I
|
|
1561
|
+
: never
|
|
1519
1562
|
: never
|
|
1520
|
-
: never
|
|
1521
1563
|
|
|
1522
1564
|
export type TablesUpdate<
|
|
1523
1565
|
PublicTableNameOrOptions extends
|
|
1524
|
-
| keyof
|
|
1566
|
+
| keyof PublicSchema["Tables"]
|
|
1525
1567
|
| { schema: keyof Database },
|
|
1526
1568
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1527
1569
|
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
1528
|
-
: never = never
|
|
1570
|
+
: never = never,
|
|
1529
1571
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
1530
1572
|
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
1531
1573
|
Update: infer U
|
|
1532
1574
|
}
|
|
1533
1575
|
? U
|
|
1534
1576
|
: never
|
|
1535
|
-
: PublicTableNameOrOptions extends keyof
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1577
|
+
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
1578
|
+
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
1579
|
+
Update: infer U
|
|
1580
|
+
}
|
|
1581
|
+
? U
|
|
1582
|
+
: never
|
|
1540
1583
|
: never
|
|
1541
|
-
: never
|
|
1542
1584
|
|
|
1543
1585
|
export type Enums<
|
|
1544
1586
|
PublicEnumNameOrOptions extends
|
|
1545
|
-
| keyof
|
|
1587
|
+
| keyof PublicSchema["Enums"]
|
|
1546
1588
|
| { schema: keyof Database },
|
|
1547
1589
|
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
1548
1590
|
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
1549
|
-
: never = never
|
|
1591
|
+
: never = never,
|
|
1550
1592
|
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
1551
1593
|
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
1552
|
-
: PublicEnumNameOrOptions extends keyof
|
|
1553
|
-
|
|
1554
|
-
|
|
1594
|
+
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
1595
|
+
? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
1596
|
+
: never
|
|
1555
1597
|
|
|
1556
1598
|
|
package/types.ts
CHANGED
|
@@ -254,3 +254,24 @@ export type PhoneRealtimeChannel = {
|
|
|
254
254
|
error?: string;
|
|
255
255
|
presence_ref?: string;
|
|
256
256
|
};
|
|
257
|
+
|
|
258
|
+
/* ------------------------------- INTEGRATIONS ----------------------------- */
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
export type TicketLogType = OverrideProperties<Tables<'tbl_integration_logs'>, {
|
|
262
|
+
integration_name: IntegrationLogType.NEW_TICKET;
|
|
263
|
+
metadata: {
|
|
264
|
+
ticket_id: string;
|
|
265
|
+
name: string;
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
268
|
+
|
|
269
|
+
export type IntegrationLogDetailsType = TicketLogType;
|
|
270
|
+
|
|
271
|
+
export enum IntegrationLogType {
|
|
272
|
+
NEW_TICKET = 'new_ticket',
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export type LogTypeMap<T extends IntegrationLogType> = T extends IntegrationLogType.NEW_TICKET
|
|
276
|
+
? TicketLogType
|
|
277
|
+
: Tables<'tbl_integration_logs'>;
|