@periskope/types 0.6.80 → 0.6.82

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.
@@ -102,6 +102,7 @@ export type Database = {
102
102
  tbl_broadcast_messages: {
103
103
  Row: {
104
104
  broadcast_id: string;
105
+ broadcast_status: string | null;
105
106
  chat_ids: string[] | null;
106
107
  created_at: string;
107
108
  message_payload: Json | null;
@@ -112,6 +113,7 @@ export type Database = {
112
113
  };
113
114
  Insert: {
114
115
  broadcast_id?: string;
116
+ broadcast_status?: string | null;
115
117
  chat_ids?: string[] | null;
116
118
  created_at?: string;
117
119
  message_payload?: Json | null;
@@ -122,6 +124,7 @@ export type Database = {
122
124
  };
123
125
  Update: {
124
126
  broadcast_id?: string;
127
+ broadcast_status?: string | null;
125
128
  chat_ids?: string[] | null;
126
129
  created_at?: string;
127
130
  message_payload?: Json | null;
@@ -839,7 +842,9 @@ export type Database = {
839
842
  tbl_flagged_messages: {
840
843
  Row: {
841
844
  chat_id: string | null;
845
+ message_timestamp: string | null;
842
846
  org_id: string;
847
+ responder_email: string | null;
843
848
  response_id: string | null;
844
849
  response_timestamp: string | null;
845
850
  response_type: string | null;
@@ -847,7 +852,9 @@ export type Database = {
847
852
  };
848
853
  Insert: {
849
854
  chat_id?: string | null;
855
+ message_timestamp?: string | null;
850
856
  org_id: string;
857
+ responder_email?: string | null;
851
858
  response_id?: string | null;
852
859
  response_timestamp?: string | null;
853
860
  response_type?: string | null;
@@ -855,7 +862,9 @@ export type Database = {
855
862
  };
856
863
  Update: {
857
864
  chat_id?: string | null;
865
+ message_timestamp?: string | null;
858
866
  org_id?: string;
867
+ responder_email?: string | null;
859
868
  response_id?: string | null;
860
869
  response_timestamp?: string | null;
861
870
  response_type?: string | null;
@@ -1480,7 +1489,7 @@ export type Database = {
1480
1489
  org_id_input: string;
1481
1490
  chat_ids_input?: string[];
1482
1491
  };
1483
- Returns: unknown;
1492
+ Returns: Json[];
1484
1493
  };
1485
1494
  get_chat_members: {
1486
1495
  Args: {
@@ -1496,6 +1505,14 @@ export type Database = {
1496
1505
  };
1497
1506
  Returns: Json;
1498
1507
  };
1508
+ get_chats_info: {
1509
+ Args: {
1510
+ chat_id_input: string;
1511
+ org_id_input: string;
1512
+ org_phone_input?: string;
1513
+ };
1514
+ Returns: Json;
1515
+ };
1499
1516
  get_contacts: {
1500
1517
  Args: {
1501
1518
  org_id_input: string;
@@ -1551,6 +1568,14 @@ export type Database = {
1551
1568
  };
1552
1569
  Returns: Json;
1553
1570
  };
1571
+ image_path: {
1572
+ Args: {
1573
+ path_input?: string;
1574
+ bucket_name?: string;
1575
+ req_base?: boolean;
1576
+ };
1577
+ Returns: string;
1578
+ };
1554
1579
  list_org_from_user: {
1555
1580
  Args: Record<PropertyKey, never>;
1556
1581
  Returns: string[];
package/dist/types.d.ts CHANGED
@@ -156,6 +156,8 @@ export type AttachmentTypeProps = {
156
156
  };
157
157
  export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
158
158
  logs: (Tables<'tbl_broadcast_logs'> & Partial<ChatType>)[];
159
+ } & {
160
+ chats: ChatType[];
159
161
  };
160
162
  export type ChatParticipantOperation = {
161
163
  participant_ids: string[];
@@ -176,22 +178,32 @@ export type PhoneStateType = {
176
178
  message?: string;
177
179
  error?: string;
178
180
  };
179
- export type TicketInfoType = {
180
- chat: {
181
- chat_id: string;
182
- chat_name: string;
183
- chat_image: string;
184
- chat_labels: string;
181
+ export type ChatInfoType = Merge<ChatType, {
182
+ members: {
183
+ [key: string]: Merge<ChatMemberType, {
184
+ contact_labels: string;
185
+ }>;
186
+ } | null;
187
+ chat_labels: string | null;
188
+ custom_properties: {
185
189
  [key: string]: string;
186
- };
190
+ } | null;
191
+ }>;
192
+ export type TicketInfoType = {
193
+ chat: ChatInfoType;
187
194
  message: {
188
- text: string;
195
+ body: string;
196
+ chat_id: string;
197
+ org_phone: string;
189
198
  timestamp: string;
199
+ media_path: string;
190
200
  message_id: string;
201
+ sender_name: string;
202
+ performed_by: string;
191
203
  sender_phone: string;
192
204
  };
193
205
  ticket: {
194
- ticket_labels: string;
206
+ org_id: string;
195
207
  status: string;
196
208
  subject: string;
197
209
  assignee: string;
@@ -200,6 +212,9 @@ export type TicketInfoType = {
200
212
  raised_by: string;
201
213
  ticket_id: string;
202
214
  created_at: string;
215
+ assigned_by: string;
216
+ ticket_labels: string;
217
+ quoted_message_id: string;
203
218
  };
204
219
  };
205
220
  export declare enum IntegrationLogType {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.80",
3
+ "version": "0.6.82",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "dependencies": {
8
- "@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.7",
8
+ "@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.8",
9
9
  "@types/pg": "8.11.2",
10
10
  "pg": "^8.11.3",
11
11
  "stripe": "^14.19.0",
package/supabase.types.ts CHANGED
@@ -101,6 +101,7 @@ export type Database = {
101
101
  tbl_broadcast_messages: {
102
102
  Row: {
103
103
  broadcast_id: string
104
+ broadcast_status: string | null
104
105
  chat_ids: string[] | null
105
106
  created_at: string
106
107
  message_payload: Json | null
@@ -111,6 +112,7 @@ export type Database = {
111
112
  }
112
113
  Insert: {
113
114
  broadcast_id?: string
115
+ broadcast_status?: string | null
114
116
  chat_ids?: string[] | null
115
117
  created_at?: string
116
118
  message_payload?: Json | null
@@ -121,6 +123,7 @@ export type Database = {
121
123
  }
122
124
  Update: {
123
125
  broadcast_id?: string
126
+ broadcast_status?: string | null
124
127
  chat_ids?: string[] | null
125
128
  created_at?: string
126
129
  message_payload?: Json | null
@@ -842,7 +845,9 @@ export type Database = {
842
845
  tbl_flagged_messages: {
843
846
  Row: {
844
847
  chat_id: string | null
848
+ message_timestamp: string | null
845
849
  org_id: string
850
+ responder_email: string | null
846
851
  response_id: string | null
847
852
  response_timestamp: string | null
848
853
  response_type: string | null
@@ -850,7 +855,9 @@ export type Database = {
850
855
  }
851
856
  Insert: {
852
857
  chat_id?: string | null
858
+ message_timestamp?: string | null
853
859
  org_id: string
860
+ responder_email?: string | null
854
861
  response_id?: string | null
855
862
  response_timestamp?: string | null
856
863
  response_type?: string | null
@@ -858,7 +865,9 @@ export type Database = {
858
865
  }
859
866
  Update: {
860
867
  chat_id?: string | null
868
+ message_timestamp?: string | null
861
869
  org_id?: string
870
+ responder_email?: string | null
862
871
  response_id?: string | null
863
872
  response_timestamp?: string | null
864
873
  response_type?: string | null
@@ -1483,7 +1492,7 @@ export type Database = {
1483
1492
  org_id_input: string
1484
1493
  chat_ids_input?: string[]
1485
1494
  }
1486
- Returns: unknown
1495
+ Returns: Json[]
1487
1496
  }
1488
1497
  get_chat_members: {
1489
1498
  Args: {
@@ -1499,6 +1508,14 @@ export type Database = {
1499
1508
  }
1500
1509
  Returns: Json
1501
1510
  }
1511
+ get_chats_info: {
1512
+ Args: {
1513
+ chat_id_input: string
1514
+ org_id_input: string
1515
+ org_phone_input?: string
1516
+ }
1517
+ Returns: Json
1518
+ }
1502
1519
  get_contacts: {
1503
1520
  Args: {
1504
1521
  org_id_input: string
@@ -1554,6 +1571,14 @@ export type Database = {
1554
1571
  }
1555
1572
  Returns: Json
1556
1573
  }
1574
+ image_path: {
1575
+ Args: {
1576
+ path_input?: string
1577
+ bucket_name?: string
1578
+ req_base?: boolean
1579
+ }
1580
+ Returns: string
1581
+ }
1557
1582
  list_org_from_user: {
1558
1583
  Args: Record<PropertyKey, never>
1559
1584
  Returns: string[]
@@ -1891,4 +1916,3 @@ export type Enums<
1891
1916
  : never
1892
1917
 
1893
1918
 
1894
-
package/types.ts CHANGED
@@ -251,6 +251,8 @@ export type AttachmentTypeProps =
251
251
 
252
252
  export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
253
253
  logs: (Tables<'tbl_broadcast_logs'> & Partial<ChatType>)[];
254
+ } & {
255
+ chats: ChatType[];
254
256
  };
255
257
 
256
258
  /* ----------------------- CHAT PARTICIPANT OPERATION ----------------------- */
@@ -283,22 +285,33 @@ export type PhoneStateType = {
283
285
  };
284
286
 
285
287
  /* ------------------------------- INTEGRATIONS ----------------------------- */
288
+
289
+ export type ChatInfoType = Merge<
290
+ ChatType,
291
+ {
292
+ members: {
293
+ [key: string]: Merge<ChatMemberType, { contact_labels: string }>;
294
+ } | null;
295
+ chat_labels: string | null;
296
+ custom_properties: { [key: string]: string } | null;
297
+ }
298
+ >;
299
+
286
300
  export type TicketInfoType = {
287
- chat: {
288
- chat_id: string;
289
- chat_name: string;
290
- chat_image: string;
291
- chat_labels: string;
292
- [key: string]: string;
293
- };
301
+ chat: ChatInfoType;
294
302
  message: {
295
- text: string;
303
+ body: string;
304
+ chat_id: string;
305
+ org_phone: string;
296
306
  timestamp: string;
307
+ media_path: string;
297
308
  message_id: string;
309
+ sender_name: string;
310
+ performed_by: string;
298
311
  sender_phone: string;
299
312
  };
300
313
  ticket: {
301
- ticket_labels: string;
314
+ org_id: string;
302
315
  status: string;
303
316
  subject: string;
304
317
  assignee: string;
@@ -307,6 +320,9 @@ export type TicketInfoType = {
307
320
  raised_by: string;
308
321
  ticket_id: string;
309
322
  created_at: string;
323
+ assigned_by: string;
324
+ ticket_labels: string;
325
+ quoted_message_id: string;
310
326
  };
311
327
  };
312
328