@periskope/types 0.6.179 → 0.6.181

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.
@@ -294,12 +294,14 @@ export declare const ActionNameMap: Record<Action['type'], {
294
294
  placeholder: string;
295
295
  info?: string;
296
296
  required: boolean;
297
+ description?: string;
297
298
  }>;
298
299
  validTriggers: Rule['trigger'][];
299
300
  }>;
301
+ type editorVariablesList = 'chat.assigned_to' | 'chat.chat_id' | 'chat.chat_name' | 'chat.chat_type' | 'chat.org_phone' | 'chat.org_id' | 'chat.group_description' | 'ticket.assignee' | 'ticket.due_date' | 'ticket.priority' | 'ticket.status' | 'ticket.subject' | 'ticket.ticket_id' | 'ticket.raised_by' | 'ticket.created_at' | 'sender.is_internal' | 'sender.is_admin' | 'sender.contact_name' | 'sender.contact_id' | 'reaction.sender_id' | 'reaction.reaction' | 'message.message_id' | 'message.timestamp' | 'message.sender_phone' | 'message.message_type' | 'message.media' | 'message.body';
300
302
  export declare const editorVariables: Array<{
301
303
  label: string;
302
- value: keyof typeof MessageVariableNameMap | keyof typeof SenderVariableNameMap | keyof typeof ChatVariableNameMap | keyof typeof TicketVariableNameMap | keyof typeof ReactionVariableNameMap;
304
+ value: editorVariablesList;
303
305
  validTriggers: Rule['trigger'][];
304
306
  }>;
305
307
  export declare const variablesExclusionList: Record<Rule['trigger'], Array<keyof AppendTypes<{
@@ -779,6 +779,7 @@ exports.ActionNameMap = {
779
779
  placeholder: 'Enter URL',
780
780
  value: null,
781
781
  required: true,
782
+ description: 'Enter the Webhook URL here. The endpoint added here should be a **POST HTTP / Endpoint** with no open auth.'
782
783
  },
783
784
  },
784
785
  validTriggers: [
@@ -812,7 +813,7 @@ exports.ActionNameMap = {
812
813
  id: 'priority',
813
814
  type: 'dropdown',
814
815
  value: [
815
- { id: '0', value: '0', label: 'No Prioriy' },
816
+ { id: '0', value: '0', label: 'No Priority' },
816
817
  { id: '1', value: '1', label: 'Low' },
817
818
  { id: '2', value: '2', label: 'Medium' },
818
819
  { id: '3', value: '3', label: 'High' },
@@ -1097,8 +1098,8 @@ exports.ActionNameMap = {
1097
1098
  ],
1098
1099
  },
1099
1100
  send_slack_notification: {
1100
- title: 'Send Slack Notification',
1101
- description: 'Send a slack notification to a channel',
1101
+ title: 'Send Slack Webhook Notification',
1102
+ description: 'Send a slack webhook notification to a channel',
1102
1103
  validTriggers: [
1103
1104
  'message.created',
1104
1105
  'message.updated',
@@ -1117,6 +1118,7 @@ exports.ActionNameMap = {
1117
1118
  placeholder: 'Enter webhook URL',
1118
1119
  value: null,
1119
1120
  required: true,
1121
+ description: 'Enter the webhook URL to send the notification, to create a slack incoming webhook to start receiving notification check [here](https://api.slack.com/messaging/webhooks)',
1120
1122
  },
1121
1123
  slack_payload: {
1122
1124
  type: 'json_editor',
@@ -1125,11 +1127,42 @@ exports.ActionNameMap = {
1125
1127
  placeholder: 'Enter payload',
1126
1128
  value: null,
1127
1129
  required: true,
1130
+ description: 'You can send slack blocks as notifications to the provided hook URL.\n\nIn order to **build a slack notification block**, you can visit [here](https://api.slack.com/block-kit/building)',
1128
1131
  },
1129
1132
  },
1130
1133
  },
1131
1134
  };
1132
1135
  exports.editorVariables = [
1136
+ {
1137
+ label: 'Ticket ID',
1138
+ value: 'ticket.ticket_id',
1139
+ validTriggers: ['ticket.updated', 'ticket.created'],
1140
+ },
1141
+ {
1142
+ value: 'ticket.assignee',
1143
+ label: 'Ticket Assignee',
1144
+ validTriggers: ['ticket.updated', 'ticket.created'],
1145
+ },
1146
+ {
1147
+ value: 'ticket.due_date',
1148
+ label: 'Ticket Due Date',
1149
+ validTriggers: ['ticket.updated', 'ticket.created'],
1150
+ },
1151
+ {
1152
+ value: 'ticket.priority',
1153
+ label: 'Ticket Priority',
1154
+ validTriggers: ['ticket.updated', 'ticket.created'],
1155
+ },
1156
+ {
1157
+ value: 'ticket.status',
1158
+ label: 'Ticket Status',
1159
+ validTriggers: ['ticket.updated', 'ticket.created'],
1160
+ },
1161
+ {
1162
+ value: 'ticket.subject',
1163
+ label: 'Ticket Subject',
1164
+ validTriggers: ['ticket.updated', 'ticket.created'],
1165
+ },
1133
1166
  {
1134
1167
  label: 'Message Body',
1135
1168
  value: 'message.body',
@@ -1142,6 +1175,66 @@ exports.editorVariables = [
1142
1175
  'ticket.updated',
1143
1176
  ],
1144
1177
  },
1178
+ {
1179
+ value: 'message.media',
1180
+ label: 'Message Media',
1181
+ validTriggers: [
1182
+ 'message.created',
1183
+ 'message.updated',
1184
+ 'reaction.added',
1185
+ 'message.flagged',
1186
+ 'ticket.created',
1187
+ 'ticket.updated',
1188
+ ],
1189
+ },
1190
+ {
1191
+ value: 'message.message_id',
1192
+ label: 'Message ID',
1193
+ validTriggers: [
1194
+ 'message.created',
1195
+ 'message.updated',
1196
+ 'reaction.added',
1197
+ 'message.flagged',
1198
+ 'ticket.created',
1199
+ 'ticket.updated',
1200
+ ],
1201
+ },
1202
+ {
1203
+ value: 'message.message_type',
1204
+ label: 'Message Type',
1205
+ validTriggers: [
1206
+ 'message.created',
1207
+ 'message.updated',
1208
+ 'reaction.added',
1209
+ 'message.flagged',
1210
+ 'ticket.created',
1211
+ 'ticket.updated',
1212
+ ],
1213
+ },
1214
+ {
1215
+ value: 'message.sender_phone',
1216
+ label: 'Sender Phone',
1217
+ validTriggers: [
1218
+ 'message.created',
1219
+ 'message.updated',
1220
+ 'reaction.added',
1221
+ 'message.flagged',
1222
+ 'ticket.created',
1223
+ 'ticket.updated',
1224
+ ],
1225
+ },
1226
+ {
1227
+ value: 'message.timestamp',
1228
+ label: 'Message Timestamp',
1229
+ validTriggers: [
1230
+ 'message.created',
1231
+ 'message.updated',
1232
+ 'reaction.added',
1233
+ 'message.flagged',
1234
+ 'ticket.created',
1235
+ 'ticket.updated',
1236
+ ],
1237
+ },
1145
1238
  {
1146
1239
  label: 'Sender Name',
1147
1240
  value: 'sender.contact_name',
@@ -1154,6 +1247,40 @@ exports.editorVariables = [
1154
1247
  'ticket.updated',
1155
1248
  ],
1156
1249
  },
1250
+ {
1251
+ value: 'sender.is_admin',
1252
+ label: 'Sender Is Admin',
1253
+ validTriggers: [
1254
+ 'message.created',
1255
+ 'message.updated',
1256
+ 'reaction.added',
1257
+ 'message.flagged',
1258
+ 'ticket.created',
1259
+ 'ticket.updated',
1260
+ ],
1261
+ },
1262
+ {
1263
+ value: 'sender.is_internal',
1264
+ label: 'Sender Is Internal',
1265
+ validTriggers: [
1266
+ 'message.created',
1267
+ 'message.updated',
1268
+ 'reaction.added',
1269
+ 'message.flagged',
1270
+ 'ticket.created',
1271
+ 'ticket.updated',
1272
+ ],
1273
+ },
1274
+ {
1275
+ label: 'Reaction',
1276
+ value: 'reaction.reaction',
1277
+ validTriggers: ['reaction.added'],
1278
+ },
1279
+ {
1280
+ value: 'reaction.sender_id',
1281
+ label: 'Reaction Sender Phone',
1282
+ validTriggers: ['reaction.added'],
1283
+ },
1157
1284
  {
1158
1285
  label: 'Chat Name',
1159
1286
  value: 'chat.chat_name',
@@ -1169,13 +1296,22 @@ exports.editorVariables = [
1169
1296
  ],
1170
1297
  },
1171
1298
  {
1172
- label: 'Ticket ID',
1173
- value: 'ticket.ticket_id',
1174
- validTriggers: ['ticket.updated', 'ticket.created'],
1299
+ value: 'chat.assigned_to',
1300
+ label: 'Chat Assigned To',
1301
+ validTriggers: [
1302
+ 'message.created',
1303
+ 'message.updated',
1304
+ 'reaction.added',
1305
+ 'message.flagged',
1306
+ 'chat.created',
1307
+ 'chat.label.updated',
1308
+ 'ticket.created',
1309
+ 'ticket.updated',
1310
+ ],
1175
1311
  },
1176
1312
  {
1177
- label: 'Chat ID',
1178
1313
  value: 'chat.chat_id',
1314
+ label: 'Chat ID',
1179
1315
  validTriggers: [
1180
1316
  'message.created',
1181
1317
  'message.updated',
@@ -1188,13 +1324,36 @@ exports.editorVariables = [
1188
1324
  ],
1189
1325
  },
1190
1326
  {
1191
- label: 'Reaction',
1192
- value: 'reaction.reaction',
1193
- validTriggers: ['reaction.added'],
1327
+ value: 'chat.chat_type',
1328
+ label: 'Chat Type',
1329
+ validTriggers: [
1330
+ 'message.created',
1331
+ 'message.updated',
1332
+ 'reaction.added',
1333
+ 'message.flagged',
1334
+ 'chat.created',
1335
+ 'chat.label.updated',
1336
+ 'ticket.created',
1337
+ 'ticket.updated',
1338
+ ],
1194
1339
  },
1195
1340
  {
1196
- value: 'chat.assigned_to',
1197
- label: 'Chat Assigned To',
1341
+ value: 'chat.org_id',
1342
+ label: 'Chat Org ID',
1343
+ validTriggers: [
1344
+ 'message.created',
1345
+ 'message.updated',
1346
+ 'reaction.added',
1347
+ 'message.flagged',
1348
+ 'chat.created',
1349
+ 'chat.label.updated',
1350
+ 'ticket.created',
1351
+ 'ticket.updated',
1352
+ ],
1353
+ },
1354
+ {
1355
+ value: 'chat.org_phone',
1356
+ label: 'Chat Org Phone',
1198
1357
  validTriggers: [
1199
1358
  'message.created',
1200
1359
  'message.updated',
@@ -0,0 +1,19 @@
1
+ export declare const TableColumns: {
2
+ readonly tbl_broadcast_messages: readonly ["broadcast_id", "created_at", "chat_ids", "scheduled_at", "org_id", "message_payload", "completed_at", "performed_by"];
3
+ readonly tbl_broadcast_templates: readonly ["template_id", "created_at", "template_name", "org_id", "updated_at", "message_payload"];
4
+ readonly tbl_chat_access: readonly ["org_id", "email", "chat_id", "has_access", "last_read_timestamp", "active_phone"];
5
+ readonly tbl_chat_messages: readonly ["message_id", "org_id", "ack", "author", "body", "broadcast", "device_type", "duration", "forwarding_score", "from", "from_me", "has_media", "has_quoted_msg", "has_reaction", "id", "invite_v4", "is_ephemeral", "is_forwarded", "is_gif", "is_starred", "is_status", "links", "location", "media_key", "mentioned_ids", "order_id", "raw_data", "to", "token", "message_type", "vcards", "chat_id", "timestamp", "org_phone", "broadcast_id", "is_deleted", "media", "performed_by", "prev_body", "quoted_message_id", "sent_message_id", "delivery_info", "updated_at", "message_ticket_id"];
6
+ readonly tbl_chat_notifications: readonly ["org_id", "notification_id", "chat_id", "author", "body", "id", "recipientids", "type", "timestamp", "org_phone"];
7
+ readonly tbl_chat_participants: readonly ["org_id", "chat_id", "contact_id", "id", "is_admin", "is_super_admin", "org_phone"];
8
+ readonly tbl_chat_reactions: readonly ["org_id", "message_id", "ack", "id", "orphan", "reaction", "read", "reaction_id", "timestamp", "msg_id", "orphan_reason", "sender_id", "org_phone"];
9
+ readonly tbl_chat_tickets: readonly ["created_at", "ticket_id", "subject", "status", "assignee", "assigned_by", "chat_id", "due_date", "org_id", "label_ids", "quoted_message_id", "raised_by", "priority", "last_updated_at", "is_deleted"];
10
+ readonly tbl_chats: readonly ["org_id", "chat_id", "archived", "id", "is_group", "is_muted", "is_read_only", "mute_expiration", "name", "pinned", "unread_count", "group_metadata", "chat_image", "timestamp", "invite_link", "org_phone", "label_ids", "updated_at"];
11
+ readonly tbl_contacts: readonly ["org_id", "contact_id", "id", "number", "is_business", "is_enterprise", "name", "pushname", "short_name", "contact_type", "is_me", "is_user", "is_group", "is_wa_contact", "is_my_contact", "is_blocked", "contact_image", "contact_color", "business_profile", "verified_name", "is_internal", "label_ids", "verified_level", "updated_at"];
12
+ readonly tbl_org: readonly ["org_id", "created_at", "org_image", "org_name", "support_link", "org_metadata", "org_plan", "stripe_customer_details", "stripe_customer_id", "stripe_subscription_details"];
13
+ readonly tbl_org_labels: readonly ["label_id", "created_at", "org_id", "name", "color", "type"];
14
+ readonly tbl_org_members: readonly ["created_at", "email", "user_id", "invited_at", "invited_by", "org_id", "role", "member_image", "member_name", "is_active", "member_color"];
15
+ readonly tbl_org_phones: readonly ["org_id", "org_phone", "created_at", "updated_at", "wa_state", "phone_id", "qr_code", "phone_image", "phone_name", "server_ip"];
16
+ readonly view_broadcast_logs: readonly ["broadcast_id", "org_id", "message_payload", "created_at", "total_chats", "sent_chats", "failed_chats", "total_member_count", "delivered_member_count", "read_member_count", "completed_at", "scheduled_at", "performed_by", "delivery_percentage", "read_percentage"];
17
+ readonly view_chat_messages: readonly ["message_id", "org_id", "ack", "author", "body", "from_me", "invite_v4", "links", "location", "mentioned_ids", "message_type", "vcards", "chat_id", "timestamp", "org_phone", "broadcast_id", "is_deleted", "media", "performed_by", "prev_body", "quoted_message_id", "sender_phone", "sent_message_id", "delivery_info", "updated_at", "message_ticket_id", "unique_id", "is_gif", "is_forwarded", "is_starred"];
18
+ readonly view_chats: readonly ["org_id", "chat_id", "org_phone", "chat_image", "invite_link", "label_ids", "updated_at", "chat_name", "latest_message", "message_unread_count", "member_count", "chat_type", "chat_access", "has_access", "last_read_timestamp", "chat_org_phones", "active_phone", "group_description"];
19
+ };
@@ -0,0 +1,290 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TableColumns = void 0;
4
+ exports.TableColumns = {
5
+ "tbl_broadcast_messages": [
6
+ "broadcast_id",
7
+ "created_at",
8
+ "chat_ids",
9
+ "scheduled_at",
10
+ "org_id",
11
+ "message_payload",
12
+ "completed_at",
13
+ "performed_by"
14
+ ],
15
+ "tbl_broadcast_templates": [
16
+ "template_id",
17
+ "created_at",
18
+ "template_name",
19
+ "org_id",
20
+ "updated_at",
21
+ "message_payload"
22
+ ],
23
+ "tbl_chat_access": [
24
+ "org_id",
25
+ "email",
26
+ "chat_id",
27
+ "has_access",
28
+ "last_read_timestamp",
29
+ "active_phone"
30
+ ],
31
+ "tbl_chat_messages": [
32
+ "message_id",
33
+ "org_id",
34
+ "ack",
35
+ "author",
36
+ "body",
37
+ "broadcast",
38
+ "device_type",
39
+ "duration",
40
+ "forwarding_score",
41
+ "from",
42
+ "from_me",
43
+ "has_media",
44
+ "has_quoted_msg",
45
+ "has_reaction",
46
+ "id",
47
+ "invite_v4",
48
+ "is_ephemeral",
49
+ "is_forwarded",
50
+ "is_gif",
51
+ "is_starred",
52
+ "is_status",
53
+ "links",
54
+ "location",
55
+ "media_key",
56
+ "mentioned_ids",
57
+ "order_id",
58
+ "raw_data",
59
+ "to",
60
+ "token",
61
+ "message_type",
62
+ "vcards",
63
+ "chat_id",
64
+ "timestamp",
65
+ "org_phone",
66
+ "broadcast_id",
67
+ "is_deleted",
68
+ "media",
69
+ "performed_by",
70
+ "prev_body",
71
+ "quoted_message_id",
72
+ "sent_message_id",
73
+ "delivery_info",
74
+ "updated_at",
75
+ "message_ticket_id"
76
+ ],
77
+ "tbl_chat_notifications": [
78
+ "org_id",
79
+ "notification_id",
80
+ "chat_id",
81
+ "author",
82
+ "body",
83
+ "id",
84
+ "recipientids",
85
+ "type",
86
+ "timestamp",
87
+ "org_phone"
88
+ ],
89
+ "tbl_chat_participants": [
90
+ "org_id",
91
+ "chat_id",
92
+ "contact_id",
93
+ "id",
94
+ "is_admin",
95
+ "is_super_admin",
96
+ "org_phone"
97
+ ],
98
+ "tbl_chat_reactions": [
99
+ "org_id",
100
+ "message_id",
101
+ "ack",
102
+ "id",
103
+ "orphan",
104
+ "reaction",
105
+ "read",
106
+ "reaction_id",
107
+ "timestamp",
108
+ "msg_id",
109
+ "orphan_reason",
110
+ "sender_id",
111
+ "org_phone"
112
+ ],
113
+ "tbl_chat_tickets": [
114
+ "created_at",
115
+ "ticket_id",
116
+ "subject",
117
+ "status",
118
+ "assignee",
119
+ "assigned_by",
120
+ "chat_id",
121
+ "due_date",
122
+ "org_id",
123
+ "label_ids",
124
+ "quoted_message_id",
125
+ "raised_by",
126
+ "priority",
127
+ "last_updated_at",
128
+ "is_deleted"
129
+ ],
130
+ "tbl_chats": [
131
+ "org_id",
132
+ "chat_id",
133
+ "archived",
134
+ "id",
135
+ "is_group",
136
+ "is_muted",
137
+ "is_read_only",
138
+ "mute_expiration",
139
+ "name",
140
+ "pinned",
141
+ "unread_count",
142
+ "group_metadata",
143
+ "chat_image",
144
+ "timestamp",
145
+ "invite_link",
146
+ "org_phone",
147
+ "label_ids",
148
+ "updated_at"
149
+ ],
150
+ "tbl_contacts": [
151
+ "org_id",
152
+ "contact_id",
153
+ "id",
154
+ "number",
155
+ "is_business",
156
+ "is_enterprise",
157
+ "name",
158
+ "pushname",
159
+ "short_name",
160
+ "contact_type",
161
+ "is_me",
162
+ "is_user",
163
+ "is_group",
164
+ "is_wa_contact",
165
+ "is_my_contact",
166
+ "is_blocked",
167
+ "contact_image",
168
+ "contact_color",
169
+ "business_profile",
170
+ "verified_name",
171
+ "is_internal",
172
+ "label_ids",
173
+ "verified_level",
174
+ "updated_at"
175
+ ],
176
+ "tbl_org": [
177
+ "org_id",
178
+ "created_at",
179
+ "org_image",
180
+ "org_name",
181
+ "support_link",
182
+ "org_metadata",
183
+ "org_plan",
184
+ "stripe_customer_details",
185
+ "stripe_customer_id",
186
+ "stripe_subscription_details"
187
+ ],
188
+ "tbl_org_labels": [
189
+ "label_id",
190
+ "created_at",
191
+ "org_id",
192
+ "name",
193
+ "color",
194
+ "type"
195
+ ],
196
+ "tbl_org_members": [
197
+ "created_at",
198
+ "email",
199
+ "user_id",
200
+ "invited_at",
201
+ "invited_by",
202
+ "org_id",
203
+ "role",
204
+ "member_image",
205
+ "member_name",
206
+ "is_active",
207
+ "member_color"
208
+ ],
209
+ "tbl_org_phones": [
210
+ "org_id",
211
+ "org_phone",
212
+ "created_at",
213
+ "updated_at",
214
+ "wa_state",
215
+ "phone_id",
216
+ "qr_code",
217
+ "phone_image",
218
+ "phone_name",
219
+ "server_ip"
220
+ ],
221
+ "view_broadcast_logs": [
222
+ "broadcast_id",
223
+ "org_id",
224
+ "message_payload",
225
+ "created_at",
226
+ "total_chats",
227
+ "sent_chats",
228
+ "failed_chats",
229
+ "total_member_count",
230
+ "delivered_member_count",
231
+ "read_member_count",
232
+ "completed_at",
233
+ "scheduled_at",
234
+ "performed_by",
235
+ "delivery_percentage",
236
+ "read_percentage"
237
+ ],
238
+ "view_chat_messages": [
239
+ "message_id",
240
+ "org_id",
241
+ "ack",
242
+ "author",
243
+ "body",
244
+ "from_me",
245
+ "invite_v4",
246
+ "links",
247
+ "location",
248
+ "mentioned_ids",
249
+ "message_type",
250
+ "vcards",
251
+ "chat_id",
252
+ "timestamp",
253
+ "org_phone",
254
+ "broadcast_id",
255
+ "is_deleted",
256
+ "media",
257
+ "performed_by",
258
+ "prev_body",
259
+ "quoted_message_id",
260
+ "sender_phone",
261
+ "sent_message_id",
262
+ "delivery_info",
263
+ "updated_at",
264
+ "message_ticket_id",
265
+ "unique_id",
266
+ "is_gif",
267
+ "is_forwarded",
268
+ "is_starred"
269
+ ],
270
+ "view_chats": [
271
+ "org_id",
272
+ "chat_id",
273
+ "org_phone",
274
+ "chat_image",
275
+ "invite_link",
276
+ "label_ids",
277
+ "updated_at",
278
+ "chat_name",
279
+ "latest_message",
280
+ "message_unread_count",
281
+ "member_count",
282
+ "chat_type",
283
+ "chat_access",
284
+ "has_access",
285
+ "last_read_timestamp",
286
+ "chat_org_phones",
287
+ "active_phone",
288
+ "group_description"
289
+ ]
290
+ };