@periskope/types 0.6.156 → 0.6.157
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/rules.types.d.ts +7 -1
- package/dist/rules.types.js +15 -1
- package/dist/supabase.types.d.ts +4 -0
- package/package.json +1 -1
- package/rules.types.ts +24 -2
- package/supabase.types.ts +2659 -2655
package/dist/rules.types.d.ts
CHANGED
|
@@ -243,7 +243,13 @@ export type UpdateCustomPropertyAction = {
|
|
|
243
243
|
value: string;
|
|
244
244
|
};
|
|
245
245
|
};
|
|
246
|
-
export type
|
|
246
|
+
export type DeleteMessageAction = {
|
|
247
|
+
id: string;
|
|
248
|
+
type: 'delete_message';
|
|
249
|
+
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
250
|
+
metadata: {};
|
|
251
|
+
};
|
|
252
|
+
export type Action = SendMessageAction | NotifyHttpAction | CreateTicketAction | FlagMessageAction | AssignTicketAction | CloseTicketAction | AddChatLabelAction | AddTicketLabelAction | AssignChatAction | ForwardMessageAction | SendEmailAction | ReplyToMessageAction | UpdateCustomPropertyAction | DeleteMessageAction;
|
|
247
253
|
export declare const isSendMessageOrReplyToMessageAction: (action: Action) => action is SendMessageAction | ReplyToMessageAction;
|
|
248
254
|
export type Rule = OverrideProperties<Tables<'tbl_automation_rules'>, {
|
|
249
255
|
actions: Action[];
|
package/dist/rules.types.js
CHANGED
|
@@ -765,6 +765,17 @@ exports.ActionNameMap = {
|
|
|
765
765
|
'message.flagged',
|
|
766
766
|
],
|
|
767
767
|
},
|
|
768
|
+
delete_message: {
|
|
769
|
+
title: 'Delete Message',
|
|
770
|
+
description: 'Delete a message',
|
|
771
|
+
inputs: {},
|
|
772
|
+
validTriggers: [
|
|
773
|
+
'message.created',
|
|
774
|
+
'message.updated',
|
|
775
|
+
'reaction.added',
|
|
776
|
+
'message.flagged',
|
|
777
|
+
],
|
|
778
|
+
},
|
|
768
779
|
notify_http: {
|
|
769
780
|
title: 'Notify HTTP',
|
|
770
781
|
description: 'Notify an HTTP endpoint',
|
|
@@ -847,7 +858,7 @@ exports.ActionNameMap = {
|
|
|
847
858
|
required: true,
|
|
848
859
|
},
|
|
849
860
|
},
|
|
850
|
-
validTriggers: ['message.created', 'message.updated', 'reaction.added'],
|
|
861
|
+
validTriggers: ['message.created', 'message.updated', 'reaction.added', 'message.flagged'],
|
|
851
862
|
},
|
|
852
863
|
assign_ticket: {
|
|
853
864
|
title: 'Assign Ticket',
|
|
@@ -913,6 +924,7 @@ exports.ActionNameMap = {
|
|
|
913
924
|
'ticket.created',
|
|
914
925
|
'reaction.added',
|
|
915
926
|
'chat.label.updated',
|
|
927
|
+
'message.flagged'
|
|
916
928
|
],
|
|
917
929
|
},
|
|
918
930
|
add_ticket_label: {
|
|
@@ -941,6 +953,7 @@ exports.ActionNameMap = {
|
|
|
941
953
|
'ticket.created',
|
|
942
954
|
'reaction.added',
|
|
943
955
|
'message.flagged',
|
|
956
|
+
'chat.label.updated'
|
|
944
957
|
],
|
|
945
958
|
inputs: {
|
|
946
959
|
property_id: {
|
|
@@ -994,6 +1007,7 @@ exports.ActionNameMap = {
|
|
|
994
1007
|
'ticket.created',
|
|
995
1008
|
'reaction.added',
|
|
996
1009
|
'chat.label.updated',
|
|
1010
|
+
'message.flagged',
|
|
997
1011
|
],
|
|
998
1012
|
},
|
|
999
1013
|
forward_message: {
|
package/dist/supabase.types.d.ts
CHANGED
|
@@ -939,6 +939,7 @@ export type Database = {
|
|
|
939
939
|
chat_name: string | null;
|
|
940
940
|
chat_type: string | null;
|
|
941
941
|
created_at: string;
|
|
942
|
+
created_by: string | null;
|
|
942
943
|
group_metadata: Json | null;
|
|
943
944
|
id: Json | null;
|
|
944
945
|
invite_link: string | null;
|
|
@@ -964,6 +965,7 @@ export type Database = {
|
|
|
964
965
|
chat_name?: string | null;
|
|
965
966
|
chat_type?: string | null;
|
|
966
967
|
created_at?: string;
|
|
968
|
+
created_by?: string | null;
|
|
967
969
|
group_metadata?: Json | null;
|
|
968
970
|
id?: Json | null;
|
|
969
971
|
invite_link?: string | null;
|
|
@@ -989,6 +991,7 @@ export type Database = {
|
|
|
989
991
|
chat_name?: string | null;
|
|
990
992
|
chat_type?: string | null;
|
|
991
993
|
created_at?: string;
|
|
994
|
+
created_by?: string | null;
|
|
992
995
|
group_metadata?: Json | null;
|
|
993
996
|
id?: Json | null;
|
|
994
997
|
invite_link?: string | null;
|
|
@@ -1820,6 +1823,7 @@ export type Database = {
|
|
|
1820
1823
|
chat_name: string | null;
|
|
1821
1824
|
chat_org_phones: string[] | null;
|
|
1822
1825
|
chat_type: string | null;
|
|
1826
|
+
closed_at: number | null;
|
|
1823
1827
|
created_at: string | null;
|
|
1824
1828
|
custom_properties: Json | null;
|
|
1825
1829
|
flag_count_map: Json | null;
|
package/package.json
CHANGED
package/rules.types.ts
CHANGED
|
@@ -949,6 +949,13 @@ export type UpdateCustomPropertyAction = {
|
|
|
949
949
|
};
|
|
950
950
|
};
|
|
951
951
|
|
|
952
|
+
export type DeleteMessageAction = {
|
|
953
|
+
id: string
|
|
954
|
+
type: 'delete_message';
|
|
955
|
+
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
956
|
+
metadata: {}
|
|
957
|
+
}
|
|
958
|
+
|
|
952
959
|
export type Action =
|
|
953
960
|
| SendMessageAction
|
|
954
961
|
| NotifyHttpAction
|
|
@@ -962,7 +969,8 @@ export type Action =
|
|
|
962
969
|
| ForwardMessageAction
|
|
963
970
|
| SendEmailAction
|
|
964
971
|
| ReplyToMessageAction
|
|
965
|
-
| UpdateCustomPropertyAction
|
|
972
|
+
| UpdateCustomPropertyAction
|
|
973
|
+
| DeleteMessageAction;
|
|
966
974
|
|
|
967
975
|
export const isSendMessageOrReplyToMessageAction = (
|
|
968
976
|
action: Action
|
|
@@ -1176,6 +1184,17 @@ export const ActionNameMap: Record<
|
|
|
1176
1184
|
'message.flagged',
|
|
1177
1185
|
],
|
|
1178
1186
|
},
|
|
1187
|
+
delete_message: {
|
|
1188
|
+
title: 'Delete Message',
|
|
1189
|
+
description: 'Delete a message',
|
|
1190
|
+
inputs: {},
|
|
1191
|
+
validTriggers: [
|
|
1192
|
+
'message.created',
|
|
1193
|
+
'message.updated',
|
|
1194
|
+
'reaction.added',
|
|
1195
|
+
'message.flagged',
|
|
1196
|
+
],
|
|
1197
|
+
},
|
|
1179
1198
|
notify_http: {
|
|
1180
1199
|
title: 'Notify HTTP',
|
|
1181
1200
|
description: 'Notify an HTTP endpoint',
|
|
@@ -1258,7 +1277,7 @@ export const ActionNameMap: Record<
|
|
|
1258
1277
|
required: true,
|
|
1259
1278
|
},
|
|
1260
1279
|
},
|
|
1261
|
-
validTriggers: ['message.created', 'message.updated', 'reaction.added'],
|
|
1280
|
+
validTriggers: ['message.created', 'message.updated', 'reaction.added', 'message.flagged'],
|
|
1262
1281
|
},
|
|
1263
1282
|
assign_ticket: {
|
|
1264
1283
|
title: 'Assign Ticket',
|
|
@@ -1324,6 +1343,7 @@ export const ActionNameMap: Record<
|
|
|
1324
1343
|
'ticket.created',
|
|
1325
1344
|
'reaction.added',
|
|
1326
1345
|
'chat.label.updated',
|
|
1346
|
+
'message.flagged'
|
|
1327
1347
|
],
|
|
1328
1348
|
},
|
|
1329
1349
|
add_ticket_label: {
|
|
@@ -1352,6 +1372,7 @@ export const ActionNameMap: Record<
|
|
|
1352
1372
|
'ticket.created',
|
|
1353
1373
|
'reaction.added',
|
|
1354
1374
|
'message.flagged',
|
|
1375
|
+
'chat.label.updated'
|
|
1355
1376
|
],
|
|
1356
1377
|
inputs: {
|
|
1357
1378
|
property_id: {
|
|
@@ -1405,6 +1426,7 @@ export const ActionNameMap: Record<
|
|
|
1405
1426
|
'ticket.created',
|
|
1406
1427
|
'reaction.added',
|
|
1407
1428
|
'chat.label.updated',
|
|
1429
|
+
'message.flagged',
|
|
1408
1430
|
],
|
|
1409
1431
|
},
|
|
1410
1432
|
forward_message: {
|