@periskope/types 0.6.350 → 0.6.352
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 +3 -13
- package/dist/rules.types.d.ts.map +1 -1
- package/dist/rules.types.js +1 -78
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/rules.types.ts +2 -92
- package/src/types.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
package/src/rules.types.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type TicketRulesInfoType = Merge<
|
|
|
55
55
|
>,
|
|
56
56
|
{
|
|
57
57
|
id: 'ticket.ticket_id';
|
|
58
|
-
type: `ticket.${'created' | 'updated' | 'closed'
|
|
58
|
+
type: `ticket.${'created' | 'updated' | 'closed'}`;
|
|
59
59
|
org_id: string;
|
|
60
60
|
rule: Tables<'tbl_automation_rules'>[];
|
|
61
61
|
}
|
|
@@ -1032,17 +1032,6 @@ export type AddTicketLabelAction = {
|
|
|
1032
1032
|
};
|
|
1033
1033
|
};
|
|
1034
1034
|
|
|
1035
|
-
export type SetTicketDueDateAction = {
|
|
1036
|
-
id: string;
|
|
1037
|
-
type: 'set_ticket_due_date';
|
|
1038
|
-
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
1039
|
-
metadata: {
|
|
1040
|
-
due_date_option: 'today' | 'tomorrow' | 'custom';
|
|
1041
|
-
custom_duration?: number;
|
|
1042
|
-
custom_unit?: 'minutes' | 'hours' | 'days';
|
|
1043
|
-
};
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
1035
|
export type AssignChatAction = {
|
|
1047
1036
|
id: string;
|
|
1048
1037
|
type: 'assign_chat';
|
|
@@ -1183,7 +1172,6 @@ export type Action =
|
|
|
1183
1172
|
| CloseTicketAction
|
|
1184
1173
|
| AddChatLabelAction
|
|
1185
1174
|
| AddTicketLabelAction
|
|
1186
|
-
| SetTicketDueDateAction
|
|
1187
1175
|
| AssignChatAction
|
|
1188
1176
|
| ForwardMessageAction
|
|
1189
1177
|
| SendEmailAction
|
|
@@ -1217,7 +1205,6 @@ export type Rule = OverrideProperties<
|
|
|
1217
1205
|
| 'ticket.created'
|
|
1218
1206
|
| 'reaction.added'
|
|
1219
1207
|
| 'chat.label.updated'
|
|
1220
|
-
| 'ticket.label.updated'
|
|
1221
1208
|
| 'message.flagged'
|
|
1222
1209
|
| 'message.unflagged'
|
|
1223
1210
|
| 'message.deleted'
|
|
@@ -1286,13 +1273,6 @@ export const RuleNameMap: Record<
|
|
|
1286
1273
|
org_phone: false,
|
|
1287
1274
|
},
|
|
1288
1275
|
},
|
|
1289
|
-
'ticket.label.updated': {
|
|
1290
|
-
title: 'Ticket Label Added/Removed',
|
|
1291
|
-
description: 'When labels on tickets are updated',
|
|
1292
|
-
base_conditions: {
|
|
1293
|
-
org_phone: false,
|
|
1294
|
-
},
|
|
1295
|
-
},
|
|
1296
1276
|
'message.flagged': {
|
|
1297
1277
|
title: 'Message Flagged',
|
|
1298
1278
|
description: 'When a message is flagged',
|
|
@@ -1456,7 +1436,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1456
1436
|
'chat.label.updated',
|
|
1457
1437
|
'message.deleted',
|
|
1458
1438
|
'ticket.closed',
|
|
1459
|
-
'ticket.label.updated',
|
|
1460
1439
|
'task.created',
|
|
1461
1440
|
'task.assignee.updated',
|
|
1462
1441
|
],
|
|
@@ -1522,7 +1501,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1522
1501
|
'ticket.created',
|
|
1523
1502
|
'ticket.updated',
|
|
1524
1503
|
'ticket.closed',
|
|
1525
|
-
'ticket.label.updated',
|
|
1526
1504
|
'message.unflagged',
|
|
1527
1505
|
'task.created',
|
|
1528
1506
|
'task.assignee.updated',
|
|
@@ -1541,7 +1519,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1541
1519
|
'ticket.created',
|
|
1542
1520
|
'ticket.updated',
|
|
1543
1521
|
'ticket.closed',
|
|
1544
|
-
'ticket.label.updated',
|
|
1545
1522
|
'message.unflagged',
|
|
1546
1523
|
],
|
|
1547
1524
|
validate: () => true,
|
|
@@ -1602,7 +1579,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1602
1579
|
'chat.label.updated',
|
|
1603
1580
|
'message.deleted',
|
|
1604
1581
|
'ticket.closed',
|
|
1605
|
-
'ticket.label.updated',
|
|
1606
1582
|
'message.unflagged',
|
|
1607
1583
|
'task.created',
|
|
1608
1584
|
'task.assignee.updated',
|
|
@@ -1803,7 +1779,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1803
1779
|
validTriggers: [
|
|
1804
1780
|
'ticket.updated',
|
|
1805
1781
|
'ticket.created',
|
|
1806
|
-
'ticket.label.updated',
|
|
1807
1782
|
'task.created',
|
|
1808
1783
|
'task.assignee.updated',
|
|
1809
1784
|
],
|
|
@@ -1826,7 +1801,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1826
1801
|
validTriggers: [
|
|
1827
1802
|
'ticket.updated',
|
|
1828
1803
|
'ticket.created',
|
|
1829
|
-
'ticket.label.updated',
|
|
1830
1804
|
'reaction.added',
|
|
1831
1805
|
'message.unflagged',
|
|
1832
1806
|
'message.deleted',
|
|
@@ -1858,7 +1832,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1858
1832
|
'message.deleted',
|
|
1859
1833
|
'message.unflagged',
|
|
1860
1834
|
'ticket.closed',
|
|
1861
|
-
'ticket.label.updated',
|
|
1862
1835
|
],
|
|
1863
1836
|
validate: () => true,
|
|
1864
1837
|
},
|
|
@@ -1875,62 +1848,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1875
1848
|
required: true,
|
|
1876
1849
|
},
|
|
1877
1850
|
},
|
|
1878
|
-
validTriggers: ['ticket.updated', 'ticket.created'
|
|
1879
|
-
validate: () => true,
|
|
1880
|
-
},
|
|
1881
|
-
set_ticket_due_date: {
|
|
1882
|
-
title: 'Set Ticket Due Date',
|
|
1883
|
-
description: 'Set a due date for the ticket',
|
|
1884
|
-
inputs: {
|
|
1885
|
-
due_date_option: {
|
|
1886
|
-
id: 'due_date_option',
|
|
1887
|
-
type: 'dropdown',
|
|
1888
|
-
label: 'Due Date Option',
|
|
1889
|
-
placeholder: 'Select option',
|
|
1890
|
-
value: [
|
|
1891
|
-
{ id: 'today', value: 'today', label: 'Today' },
|
|
1892
|
-
{ id: 'tomorrow', value: 'tomorrow', label: 'Tomorrow' },
|
|
1893
|
-
{ id: 'custom', value: 'custom', label: 'Custom' },
|
|
1894
|
-
],
|
|
1895
|
-
required: true,
|
|
1896
|
-
},
|
|
1897
|
-
custom_duration: {
|
|
1898
|
-
id: 'custom_duration',
|
|
1899
|
-
type: 'text',
|
|
1900
|
-
label: 'Duration',
|
|
1901
|
-
placeholder: 'Enter number',
|
|
1902
|
-
value: null,
|
|
1903
|
-
required: false,
|
|
1904
|
-
},
|
|
1905
|
-
custom_unit: {
|
|
1906
|
-
id: 'custom_unit',
|
|
1907
|
-
type: 'dropdown',
|
|
1908
|
-
label: 'Unit',
|
|
1909
|
-
placeholder: 'Select unit',
|
|
1910
|
-
value: [
|
|
1911
|
-
{ id: 'minutes', value: 'minutes', label: 'Minutes' },
|
|
1912
|
-
{ id: 'hours', value: 'hours', label: 'Hours' },
|
|
1913
|
-
{ id: 'days', value: 'days', label: 'Days' },
|
|
1914
|
-
],
|
|
1915
|
-
required: false,
|
|
1916
|
-
},
|
|
1917
|
-
},
|
|
1918
|
-
validTriggers: [
|
|
1919
|
-
'message.created',
|
|
1920
|
-
'message.updated',
|
|
1921
|
-
'chat.created',
|
|
1922
|
-
'ticket.updated',
|
|
1923
|
-
'ticket.created',
|
|
1924
|
-
'ticket.label.updated',
|
|
1925
|
-
'reaction.added',
|
|
1926
|
-
'chat.label.updated',
|
|
1927
|
-
'message.flagged',
|
|
1928
|
-
'message.deleted',
|
|
1929
|
-
'message.unflagged',
|
|
1930
|
-
'ticket.closed',
|
|
1931
|
-
'task.created',
|
|
1932
|
-
'task.assignee.updated',
|
|
1933
|
-
],
|
|
1851
|
+
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
1934
1852
|
validate: () => true,
|
|
1935
1853
|
},
|
|
1936
1854
|
update_custom_property: {
|
|
@@ -1948,7 +1866,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1948
1866
|
'message.deleted',
|
|
1949
1867
|
'message.unflagged',
|
|
1950
1868
|
'ticket.closed',
|
|
1951
|
-
'ticket.label.updated',
|
|
1952
1869
|
],
|
|
1953
1870
|
inputs: {
|
|
1954
1871
|
property_id: {
|
|
@@ -2038,7 +1955,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2038
1955
|
'message.deleted',
|
|
2039
1956
|
'message.unflagged',
|
|
2040
1957
|
'ticket.closed',
|
|
2041
|
-
'ticket.label.updated',
|
|
2042
1958
|
'task.created',
|
|
2043
1959
|
'task.assignee.updated',
|
|
2044
1960
|
],
|
|
@@ -2060,7 +1976,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2060
1976
|
'message.unflagged',
|
|
2061
1977
|
'message.deleted',
|
|
2062
1978
|
'ticket.closed',
|
|
2063
|
-
'ticket.label.updated',
|
|
2064
1979
|
],
|
|
2065
1980
|
validate: () => true,
|
|
2066
1981
|
},
|
|
@@ -2087,7 +2002,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2087
2002
|
'message.unflagged',
|
|
2088
2003
|
'message.flagged',
|
|
2089
2004
|
'ticket.closed',
|
|
2090
|
-
'ticket.label.updated',
|
|
2091
2005
|
'task.created',
|
|
2092
2006
|
'task.assignee.updated',
|
|
2093
2007
|
],
|
|
@@ -2134,7 +2048,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2134
2048
|
'chat.label.updated',
|
|
2135
2049
|
'message.deleted',
|
|
2136
2050
|
'ticket.closed',
|
|
2137
|
-
'ticket.label.updated',
|
|
2138
2051
|
'task.created',
|
|
2139
2052
|
'task.assignee.updated',
|
|
2140
2053
|
],
|
|
@@ -2155,7 +2068,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2155
2068
|
'chat.label.updated',
|
|
2156
2069
|
'message.deleted',
|
|
2157
2070
|
'ticket.closed',
|
|
2158
|
-
'ticket.label.updated',
|
|
2159
2071
|
'task.created',
|
|
2160
2072
|
'task.assignee.updated',
|
|
2161
2073
|
],
|
|
@@ -2224,7 +2136,6 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2224
2136
|
'chat.label.updated',
|
|
2225
2137
|
'message.deleted',
|
|
2226
2138
|
'ticket.closed',
|
|
2227
|
-
'ticket.label.updated',
|
|
2228
2139
|
'task.created',
|
|
2229
2140
|
'task.assignee.updated',
|
|
2230
2141
|
],
|
|
@@ -2656,5 +2567,4 @@ export const variablesExclusionList: Record<
|
|
|
2656
2567
|
'chat.label.updated': [],
|
|
2657
2568
|
'task.created': [],
|
|
2658
2569
|
'task.assignee.updated': [],
|
|
2659
|
-
'ticket.label.updated': [],
|
|
2660
2570
|
};
|
package/src/types.ts
CHANGED
|
@@ -84,6 +84,7 @@ export type OrgPreferences = {
|
|
|
84
84
|
auto_read_muted_chats?: boolean;
|
|
85
85
|
member_permissions?: Record<string, boolean>;
|
|
86
86
|
show_active_phone_only_messages_right?: boolean;
|
|
87
|
+
disable_auto_attach_message_to_ticket?: boolean;
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
type OrgPreferenceKey = keyof OrgPreferences;
|
|
@@ -713,6 +714,7 @@ export type SingleMessagePayload = SendMessageContent & {
|
|
|
713
714
|
chat_id: string;
|
|
714
715
|
job_id?: string;
|
|
715
716
|
priority?: number;
|
|
717
|
+
scheduled_id?: string;
|
|
716
718
|
};
|
|
717
719
|
|
|
718
720
|
export type MessageAttachmentFileTypes =
|