@periskope/types 0.6.157 → 0.6.158
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.js +18 -38
- package/dist/supabase.types.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
- package/rules.types.ts +21 -41
- package/supabase.types.ts +1 -0
- package/types.ts +2 -1
package/dist/rules.types.js
CHANGED
|
@@ -177,18 +177,6 @@ exports.MessageVariableNameMap = {
|
|
|
177
177
|
},
|
|
178
178
|
};
|
|
179
179
|
exports.SenderVariableNameMap = {
|
|
180
|
-
'sender.is_business': {
|
|
181
|
-
text: 'Sender is business',
|
|
182
|
-
type: 'boolean',
|
|
183
|
-
filters: ['IS'],
|
|
184
|
-
variable_type: 'boolean',
|
|
185
|
-
},
|
|
186
|
-
'sender.is_enterprise': {
|
|
187
|
-
text: 'Sender is enterprise',
|
|
188
|
-
type: 'boolean',
|
|
189
|
-
filters: ['IS'],
|
|
190
|
-
variable_type: 'boolean',
|
|
191
|
-
},
|
|
192
180
|
'sender.is_internal': {
|
|
193
181
|
text: 'Sender is internal',
|
|
194
182
|
type: 'boolean',
|
|
@@ -345,24 +333,6 @@ exports.ChatVariableNameMap = {
|
|
|
345
333
|
],
|
|
346
334
|
variable_type: 'boolean',
|
|
347
335
|
},
|
|
348
|
-
'chat.is_muted': {
|
|
349
|
-
text: 'Chat is muted',
|
|
350
|
-
type: 'boolean',
|
|
351
|
-
filters: ['EQ', 'NEQ'],
|
|
352
|
-
value: [
|
|
353
|
-
{
|
|
354
|
-
id: 'true',
|
|
355
|
-
value: 'true',
|
|
356
|
-
label: 'True',
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
id: 'false',
|
|
360
|
-
value: 'false',
|
|
361
|
-
label: 'False',
|
|
362
|
-
},
|
|
363
|
-
],
|
|
364
|
-
variable_type: 'boolean',
|
|
365
|
-
},
|
|
366
336
|
'chat.info_admins_only': {
|
|
367
337
|
text: 'Chat Info Admins Only',
|
|
368
338
|
type: 'boolean',
|
|
@@ -858,7 +828,12 @@ exports.ActionNameMap = {
|
|
|
858
828
|
required: true,
|
|
859
829
|
},
|
|
860
830
|
},
|
|
861
|
-
validTriggers: [
|
|
831
|
+
validTriggers: [
|
|
832
|
+
'message.created',
|
|
833
|
+
'message.updated',
|
|
834
|
+
'reaction.added',
|
|
835
|
+
'message.flagged',
|
|
836
|
+
],
|
|
862
837
|
},
|
|
863
838
|
assign_ticket: {
|
|
864
839
|
title: 'Assign Ticket',
|
|
@@ -924,7 +899,7 @@ exports.ActionNameMap = {
|
|
|
924
899
|
'ticket.created',
|
|
925
900
|
'reaction.added',
|
|
926
901
|
'chat.label.updated',
|
|
927
|
-
'message.flagged'
|
|
902
|
+
'message.flagged',
|
|
928
903
|
],
|
|
929
904
|
},
|
|
930
905
|
add_ticket_label: {
|
|
@@ -953,7 +928,7 @@ exports.ActionNameMap = {
|
|
|
953
928
|
'ticket.created',
|
|
954
929
|
'reaction.added',
|
|
955
930
|
'message.flagged',
|
|
956
|
-
'chat.label.updated'
|
|
931
|
+
'chat.label.updated',
|
|
957
932
|
],
|
|
958
933
|
inputs: {
|
|
959
934
|
property_id: {
|
|
@@ -1083,7 +1058,7 @@ exports.editorVariables = [
|
|
|
1083
1058
|
'reaction.added',
|
|
1084
1059
|
'message.flagged',
|
|
1085
1060
|
'ticket.created',
|
|
1086
|
-
'ticket.updated'
|
|
1061
|
+
'ticket.updated',
|
|
1087
1062
|
],
|
|
1088
1063
|
},
|
|
1089
1064
|
{
|
|
@@ -1095,7 +1070,7 @@ exports.editorVariables = [
|
|
|
1095
1070
|
'reaction.added',
|
|
1096
1071
|
'message.flagged',
|
|
1097
1072
|
'ticket.created',
|
|
1098
|
-
'ticket.updated'
|
|
1073
|
+
'ticket.updated',
|
|
1099
1074
|
],
|
|
1100
1075
|
},
|
|
1101
1076
|
{
|
|
@@ -1109,7 +1084,7 @@ exports.editorVariables = [
|
|
|
1109
1084
|
'chat.created',
|
|
1110
1085
|
'chat.label.updated',
|
|
1111
1086
|
'ticket.created',
|
|
1112
|
-
'ticket.updated'
|
|
1087
|
+
'ticket.updated',
|
|
1113
1088
|
],
|
|
1114
1089
|
},
|
|
1115
1090
|
{
|
|
@@ -1120,14 +1095,19 @@ exports.editorVariables = [
|
|
|
1120
1095
|
];
|
|
1121
1096
|
exports.variablesExclusionList = {
|
|
1122
1097
|
'ticket.created': ['ticket.is_deleted'],
|
|
1123
|
-
'chat.created': [
|
|
1098
|
+
'chat.created': [
|
|
1099
|
+
'chat.chat_id',
|
|
1100
|
+
'chat.labels',
|
|
1101
|
+
'chat.has_flagged_messages',
|
|
1102
|
+
'chat.assigned_to',
|
|
1103
|
+
],
|
|
1124
1104
|
'message.created': [
|
|
1125
1105
|
'message.author',
|
|
1126
1106
|
'message.performed_by',
|
|
1127
1107
|
'message.flag_status',
|
|
1128
1108
|
'sender.is_internal',
|
|
1129
1109
|
],
|
|
1130
|
-
'ticket.updated': [],
|
|
1110
|
+
'ticket.updated': ['ticket.is_deleted'],
|
|
1131
1111
|
'reaction.added': [],
|
|
1132
1112
|
'message.updated': [],
|
|
1133
1113
|
'message.flagged': [],
|
package/dist/supabase.types.d.ts
CHANGED
|
@@ -2197,7 +2197,7 @@ export type Database = {
|
|
|
2197
2197
|
enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
|
|
2198
2198
|
enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
|
|
2199
2199
|
enum_credit_transaction_type: "credit" | "debit";
|
|
2200
|
-
enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged" | "chat.label.updated" | "reaction.added";
|
|
2200
|
+
enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged" | "chat.label.updated" | "reaction.added" | "message.ticket.attached";
|
|
2201
2201
|
enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce" | "zohodesk" | "gsheets";
|
|
2202
2202
|
enum_member_role: "admin" | "member";
|
|
2203
2203
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -452,7 +452,7 @@ export type OrgCreditsType = {
|
|
|
452
452
|
total_credits_used: number;
|
|
453
453
|
next_renewal_date: string;
|
|
454
454
|
};
|
|
455
|
-
export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_id' | 'chat_name' | 'chat_type' | 'created_at' | 'group_description' | 'info_admins_only' | '
|
|
455
|
+
export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_id' | 'chat_name' | 'chat_type' | 'created_at' | 'group_description' | 'info_admins_only' | 'org_id' | 'org_phone' | 'chat_org_phones' | 'messages_admins_only' | 'custom_properties'>, {
|
|
456
456
|
has_flagged_messages: boolean;
|
|
457
457
|
labels: string[];
|
|
458
458
|
members: string[];
|
|
@@ -460,7 +460,7 @@ export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' |
|
|
|
460
460
|
[key: string]: string;
|
|
461
461
|
} | null;
|
|
462
462
|
}>;
|
|
463
|
-
export type SenderRuleInfoType = Merge<Omit<Merge<Tables<'tbl_contacts'>, Tables<'tbl_chat_participants'>>, 'verified_name' | 'verified_level' | 'updated_at' | 'short_name' | 'pushname' | 'periskope_name' | 'org_phone' | 'number' | 'name' | 'label_ids' | 'is_wa_contact' | 'is_user' | 'is_my_contact' | 'is_me' | 'is_imported' | 'is_group' | 'is_blocked' | 'contact_color' | 'business_profile' | 'id' | 'contact_image' | 'contact_type' | 'chat_id'>, {
|
|
463
|
+
export type SenderRuleInfoType = Merge<Omit<Merge<Tables<'tbl_contacts'>, Tables<'tbl_chat_participants'>>, 'verified_name' | 'verified_level' | 'updated_at' | 'short_name' | 'pushname' | 'periskope_name' | 'org_phone' | 'number' | 'name' | 'label_ids' | 'is_wa_contact' | 'is_user' | 'is_my_contact' | 'is_me' | 'is_imported' | 'is_group' | 'is_blocked' | 'contact_color' | 'business_profile' | 'id' | 'contact_image' | 'contact_type' | 'chat_id' | 'is_business' | 'is_enterprise'>, {
|
|
464
464
|
is_internal: boolean;
|
|
465
465
|
labels: string[] | null;
|
|
466
466
|
}>;
|
package/package.json
CHANGED
package/rules.types.ts
CHANGED
|
@@ -343,18 +343,6 @@ export const SenderVariableNameMap: Record<
|
|
|
343
343
|
keyof AppendTypes<{ sender: SenderVariablesType }, '.'>,
|
|
344
344
|
VariableNameValueType
|
|
345
345
|
> = {
|
|
346
|
-
'sender.is_business': {
|
|
347
|
-
text: 'Sender is business',
|
|
348
|
-
type: 'boolean',
|
|
349
|
-
filters: ['IS'],
|
|
350
|
-
variable_type: 'boolean',
|
|
351
|
-
},
|
|
352
|
-
'sender.is_enterprise': {
|
|
353
|
-
text: 'Sender is enterprise',
|
|
354
|
-
type: 'boolean',
|
|
355
|
-
filters: ['IS'],
|
|
356
|
-
variable_type: 'boolean',
|
|
357
|
-
},
|
|
358
346
|
'sender.is_internal': {
|
|
359
347
|
text: 'Sender is internal',
|
|
360
348
|
type: 'boolean',
|
|
@@ -515,24 +503,6 @@ export const ChatVariableNameMap: Record<
|
|
|
515
503
|
],
|
|
516
504
|
variable_type: 'boolean',
|
|
517
505
|
},
|
|
518
|
-
'chat.is_muted': {
|
|
519
|
-
text: 'Chat is muted',
|
|
520
|
-
type: 'boolean',
|
|
521
|
-
filters: ['EQ', 'NEQ'],
|
|
522
|
-
value: [
|
|
523
|
-
{
|
|
524
|
-
id: 'true',
|
|
525
|
-
value: 'true',
|
|
526
|
-
label: 'True',
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
id: 'false',
|
|
530
|
-
value: 'false',
|
|
531
|
-
label: 'False',
|
|
532
|
-
},
|
|
533
|
-
],
|
|
534
|
-
variable_type: 'boolean',
|
|
535
|
-
},
|
|
536
506
|
'chat.info_admins_only': {
|
|
537
507
|
text: 'Chat Info Admins Only',
|
|
538
508
|
type: 'boolean',
|
|
@@ -950,11 +920,11 @@ export type UpdateCustomPropertyAction = {
|
|
|
950
920
|
};
|
|
951
921
|
|
|
952
922
|
export type DeleteMessageAction = {
|
|
953
|
-
id: string
|
|
923
|
+
id: string;
|
|
954
924
|
type: 'delete_message';
|
|
955
925
|
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
956
|
-
metadata: {}
|
|
957
|
-
}
|
|
926
|
+
metadata: {};
|
|
927
|
+
};
|
|
958
928
|
|
|
959
929
|
export type Action =
|
|
960
930
|
| SendMessageAction
|
|
@@ -1277,7 +1247,12 @@ export const ActionNameMap: Record<
|
|
|
1277
1247
|
required: true,
|
|
1278
1248
|
},
|
|
1279
1249
|
},
|
|
1280
|
-
validTriggers: [
|
|
1250
|
+
validTriggers: [
|
|
1251
|
+
'message.created',
|
|
1252
|
+
'message.updated',
|
|
1253
|
+
'reaction.added',
|
|
1254
|
+
'message.flagged',
|
|
1255
|
+
],
|
|
1281
1256
|
},
|
|
1282
1257
|
assign_ticket: {
|
|
1283
1258
|
title: 'Assign Ticket',
|
|
@@ -1343,7 +1318,7 @@ export const ActionNameMap: Record<
|
|
|
1343
1318
|
'ticket.created',
|
|
1344
1319
|
'reaction.added',
|
|
1345
1320
|
'chat.label.updated',
|
|
1346
|
-
'message.flagged'
|
|
1321
|
+
'message.flagged',
|
|
1347
1322
|
],
|
|
1348
1323
|
},
|
|
1349
1324
|
add_ticket_label: {
|
|
@@ -1372,7 +1347,7 @@ export const ActionNameMap: Record<
|
|
|
1372
1347
|
'ticket.created',
|
|
1373
1348
|
'reaction.added',
|
|
1374
1349
|
'message.flagged',
|
|
1375
|
-
'chat.label.updated'
|
|
1350
|
+
'chat.label.updated',
|
|
1376
1351
|
],
|
|
1377
1352
|
inputs: {
|
|
1378
1353
|
property_id: {
|
|
@@ -1507,7 +1482,7 @@ export const editorVariables: Array<{
|
|
|
1507
1482
|
'reaction.added',
|
|
1508
1483
|
'message.flagged',
|
|
1509
1484
|
'ticket.created',
|
|
1510
|
-
'ticket.updated'
|
|
1485
|
+
'ticket.updated',
|
|
1511
1486
|
],
|
|
1512
1487
|
},
|
|
1513
1488
|
{
|
|
@@ -1519,7 +1494,7 @@ export const editorVariables: Array<{
|
|
|
1519
1494
|
'reaction.added',
|
|
1520
1495
|
'message.flagged',
|
|
1521
1496
|
'ticket.created',
|
|
1522
|
-
'ticket.updated'
|
|
1497
|
+
'ticket.updated',
|
|
1523
1498
|
],
|
|
1524
1499
|
},
|
|
1525
1500
|
{
|
|
@@ -1533,7 +1508,7 @@ export const editorVariables: Array<{
|
|
|
1533
1508
|
'chat.created',
|
|
1534
1509
|
'chat.label.updated',
|
|
1535
1510
|
'ticket.created',
|
|
1536
|
-
'ticket.updated'
|
|
1511
|
+
'ticket.updated',
|
|
1537
1512
|
],
|
|
1538
1513
|
},
|
|
1539
1514
|
{
|
|
@@ -1554,14 +1529,19 @@ export const variablesExclusionList: Record<
|
|
|
1554
1529
|
>
|
|
1555
1530
|
> = {
|
|
1556
1531
|
'ticket.created': ['ticket.is_deleted'],
|
|
1557
|
-
'chat.created': [
|
|
1532
|
+
'chat.created': [
|
|
1533
|
+
'chat.chat_id',
|
|
1534
|
+
'chat.labels',
|
|
1535
|
+
'chat.has_flagged_messages',
|
|
1536
|
+
'chat.assigned_to',
|
|
1537
|
+
],
|
|
1558
1538
|
'message.created': [
|
|
1559
1539
|
'message.author',
|
|
1560
1540
|
'message.performed_by',
|
|
1561
1541
|
'message.flag_status',
|
|
1562
1542
|
'sender.is_internal',
|
|
1563
1543
|
],
|
|
1564
|
-
'ticket.updated': [],
|
|
1544
|
+
'ticket.updated': ['ticket.is_deleted'],
|
|
1565
1545
|
'reaction.added': [],
|
|
1566
1546
|
'message.updated': [],
|
|
1567
1547
|
'message.flagged': [],
|
package/supabase.types.ts
CHANGED
package/types.ts
CHANGED
|
@@ -633,7 +633,6 @@ export type ChatRuleInfoType = Merge<
|
|
|
633
633
|
| 'created_at'
|
|
634
634
|
| 'group_description'
|
|
635
635
|
| 'info_admins_only'
|
|
636
|
-
| 'is_muted'
|
|
637
636
|
| 'org_id'
|
|
638
637
|
| 'org_phone'
|
|
639
638
|
| 'chat_org_phones'
|
|
@@ -674,6 +673,8 @@ export type SenderRuleInfoType = Merge<
|
|
|
674
673
|
| 'contact_image'
|
|
675
674
|
| 'contact_type'
|
|
676
675
|
| 'chat_id'
|
|
676
|
+
| 'is_business'
|
|
677
|
+
| 'is_enterprise'
|
|
677
678
|
>,
|
|
678
679
|
{
|
|
679
680
|
is_internal: boolean;
|