@periskope/types 0.6.361 → 0.6.362
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 +4 -6
- package/dist/rules.types.d.ts.map +1 -1
- package/dist/rules.types.js +32 -49
- package/dist/types.d.ts +1 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/rules.types.ts +36 -55
- package/src/types.ts +12 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/.turbo/daemon/2a480df21ee2b3e0-turbo.log.2025-07-29 +0 -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' | 'label.updated'
|
|
58
|
+
type: `ticket.${'created' | 'updated' | 'closed'}` | 'ticket.label.updated';
|
|
59
59
|
org_id: string;
|
|
60
60
|
rule: Tables<'tbl_automation_rules'>[];
|
|
61
61
|
}
|
|
@@ -1037,9 +1037,7 @@ export type SetTicketDueDateAction = {
|
|
|
1037
1037
|
type: 'set_ticket_due_date';
|
|
1038
1038
|
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
1039
1039
|
metadata: {
|
|
1040
|
-
|
|
1041
|
-
custom_duration?: number;
|
|
1042
|
-
custom_unit?: 'minutes' | 'hours' | 'days';
|
|
1040
|
+
due_date_option_time: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
1043
1041
|
};
|
|
1044
1042
|
};
|
|
1045
1043
|
|
|
@@ -1217,11 +1215,11 @@ export type Rule = OverrideProperties<
|
|
|
1217
1215
|
| 'ticket.created'
|
|
1218
1216
|
| 'reaction.added'
|
|
1219
1217
|
| 'chat.label.updated'
|
|
1220
|
-
| 'ticket.label.updated'
|
|
1221
1218
|
| 'message.flagged'
|
|
1222
1219
|
| 'message.unflagged'
|
|
1223
1220
|
| 'message.deleted'
|
|
1224
1221
|
| 'ticket.closed'
|
|
1222
|
+
| 'ticket.label.updated'
|
|
1225
1223
|
| 'task.created'
|
|
1226
1224
|
| 'task.assignee.updated';
|
|
1227
1225
|
}
|
|
@@ -1279,16 +1277,16 @@ export const RuleNameMap: Record<
|
|
|
1279
1277
|
org_phone: false,
|
|
1280
1278
|
},
|
|
1281
1279
|
},
|
|
1282
|
-
'
|
|
1283
|
-
title: '
|
|
1284
|
-
description: 'When labels on
|
|
1280
|
+
'ticket.label.updated': {
|
|
1281
|
+
title: 'Ticket Label Added/Removed',
|
|
1282
|
+
description: 'When labels on tickets are updated',
|
|
1285
1283
|
base_conditions: {
|
|
1286
1284
|
org_phone: false,
|
|
1287
1285
|
},
|
|
1288
1286
|
},
|
|
1289
|
-
'
|
|
1290
|
-
title: '
|
|
1291
|
-
description: 'When labels on
|
|
1287
|
+
'chat.label.updated': {
|
|
1288
|
+
title: 'Chat Label Added/Removed',
|
|
1289
|
+
description: 'When labels on chats are updated',
|
|
1292
1290
|
base_conditions: {
|
|
1293
1291
|
org_phone: false,
|
|
1294
1292
|
},
|
|
@@ -1375,7 +1373,7 @@ type ActionNameMapType = {
|
|
|
1375
1373
|
| null
|
|
1376
1374
|
| 'org.custom_properties'
|
|
1377
1375
|
| 'custom_property_values'
|
|
1378
|
-
| '
|
|
1376
|
+
| 'custom_duration';
|
|
1379
1377
|
label: string;
|
|
1380
1378
|
placeholder: string;
|
|
1381
1379
|
info?: string;
|
|
@@ -1440,7 +1438,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1440
1438
|
type: 'dynamic',
|
|
1441
1439
|
label: 'Cooldown Period',
|
|
1442
1440
|
placeholder: 'Enter time',
|
|
1443
|
-
value: '
|
|
1441
|
+
value: 'custom_duration',
|
|
1444
1442
|
required: false,
|
|
1445
1443
|
},
|
|
1446
1444
|
},
|
|
@@ -1458,6 +1456,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1458
1456
|
'ticket.closed',
|
|
1459
1457
|
'task.created',
|
|
1460
1458
|
'task.assignee.updated',
|
|
1459
|
+
'ticket.label.updated'
|
|
1461
1460
|
],
|
|
1462
1461
|
validate: () => true,
|
|
1463
1462
|
},
|
|
@@ -1509,7 +1508,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1509
1508
|
type: 'dynamic',
|
|
1510
1509
|
label: 'Cooldown Period',
|
|
1511
1510
|
placeholder: 'Enter time',
|
|
1512
|
-
value: '
|
|
1511
|
+
value: 'custom_duration',
|
|
1513
1512
|
required: false,
|
|
1514
1513
|
},
|
|
1515
1514
|
},
|
|
@@ -1524,6 +1523,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1524
1523
|
'message.unflagged',
|
|
1525
1524
|
'task.created',
|
|
1526
1525
|
'task.assignee.updated',
|
|
1526
|
+
'ticket.label.updated'
|
|
1527
1527
|
],
|
|
1528
1528
|
validate: () => true,
|
|
1529
1529
|
},
|
|
@@ -1540,6 +1540,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1540
1540
|
'ticket.updated',
|
|
1541
1541
|
'ticket.closed',
|
|
1542
1542
|
'message.unflagged',
|
|
1543
|
+
'ticket.label.updated'
|
|
1543
1544
|
],
|
|
1544
1545
|
validate: () => true,
|
|
1545
1546
|
},
|
|
@@ -1602,6 +1603,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1602
1603
|
'message.unflagged',
|
|
1603
1604
|
'task.created',
|
|
1604
1605
|
'task.assignee.updated',
|
|
1606
|
+
'ticket.label.updated'
|
|
1605
1607
|
],
|
|
1606
1608
|
validate: () => true,
|
|
1607
1609
|
},
|
|
@@ -1736,6 +1738,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1736
1738
|
'ticket.closed',
|
|
1737
1739
|
'task.created',
|
|
1738
1740
|
'task.assignee.updated',
|
|
1741
|
+
'ticket.label.updated'
|
|
1739
1742
|
],
|
|
1740
1743
|
validate: () => true,
|
|
1741
1744
|
},
|
|
@@ -1801,6 +1804,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1801
1804
|
'ticket.created',
|
|
1802
1805
|
'task.created',
|
|
1803
1806
|
'task.assignee.updated',
|
|
1807
|
+
'ticket.label.updated'
|
|
1804
1808
|
],
|
|
1805
1809
|
validate: () => true,
|
|
1806
1810
|
},
|
|
@@ -1824,6 +1828,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1824
1828
|
'reaction.added',
|
|
1825
1829
|
'message.unflagged',
|
|
1826
1830
|
'message.deleted',
|
|
1831
|
+
'ticket.label.updated',
|
|
1827
1832
|
],
|
|
1828
1833
|
validate: () => true,
|
|
1829
1834
|
},
|
|
@@ -1868,59 +1873,28 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1868
1873
|
required: true,
|
|
1869
1874
|
},
|
|
1870
1875
|
},
|
|
1871
|
-
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
1876
|
+
validTriggers: ['ticket.updated', 'ticket.created', 'ticket.label.updated'],
|
|
1872
1877
|
validate: () => true,
|
|
1873
1878
|
},
|
|
1874
1879
|
set_ticket_due_date: {
|
|
1875
1880
|
title: 'Set Ticket Due Date',
|
|
1876
1881
|
description: 'Set a due date for the ticket',
|
|
1882
|
+
info: 'This action will set a due date for the ticket. The due date will be set after the specified time from the current date and time of rule execution.',
|
|
1877
1883
|
inputs: {
|
|
1878
|
-
|
|
1879
|
-
id: '
|
|
1880
|
-
type: '
|
|
1881
|
-
label: 'Due
|
|
1882
|
-
placeholder: '
|
|
1883
|
-
value:
|
|
1884
|
-
{ id: 'today', value: 'today', label: 'Today' },
|
|
1885
|
-
{ id: 'tomorrow', value: 'tomorrow', label: 'Tomorrow' },
|
|
1886
|
-
{ id: 'custom', value: 'custom', label: 'Custom' },
|
|
1887
|
-
],
|
|
1884
|
+
due_date_option_time: {
|
|
1885
|
+
id: 'due_date_option_time',
|
|
1886
|
+
type: 'dynamic',
|
|
1887
|
+
label: 'Due After',
|
|
1888
|
+
placeholder: 'Enter time',
|
|
1889
|
+
value: 'custom_duration',
|
|
1888
1890
|
required: true,
|
|
1889
1891
|
},
|
|
1890
|
-
custom_duration: {
|
|
1891
|
-
id: 'custom_duration',
|
|
1892
|
-
type: 'text',
|
|
1893
|
-
label: 'Duration',
|
|
1894
|
-
placeholder: 'Enter number',
|
|
1895
|
-
value: null,
|
|
1896
|
-
required: false,
|
|
1897
|
-
},
|
|
1898
|
-
custom_unit: {
|
|
1899
|
-
id: 'custom_unit',
|
|
1900
|
-
type: 'dropdown',
|
|
1901
|
-
label: 'Unit',
|
|
1902
|
-
placeholder: 'Select unit',
|
|
1903
|
-
value: [
|
|
1904
|
-
{ id: 'minutes', value: 'minutes', label: 'Minutes' },
|
|
1905
|
-
{ id: 'hours', value: 'hours', label: 'Hours' },
|
|
1906
|
-
{ id: 'days', value: 'days', label: 'Days' },
|
|
1907
|
-
],
|
|
1908
|
-
required: false,
|
|
1909
|
-
},
|
|
1910
1892
|
},
|
|
1911
1893
|
validTriggers: [
|
|
1912
|
-
'message.created',
|
|
1913
|
-
'message.updated',
|
|
1914
|
-
'chat.created',
|
|
1915
1894
|
'ticket.created',
|
|
1916
1895
|
'reaction.added',
|
|
1917
|
-
'
|
|
1918
|
-
'message.flagged',
|
|
1919
|
-
'message.deleted',
|
|
1920
|
-
'message.unflagged',
|
|
1896
|
+
'ticket.label.updated',
|
|
1921
1897
|
'ticket.closed',
|
|
1922
|
-
'task.created',
|
|
1923
|
-
'task.assignee.updated',
|
|
1924
1898
|
],
|
|
1925
1899
|
validate: () => true,
|
|
1926
1900
|
},
|
|
@@ -1939,6 +1913,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
1939
1913
|
'message.deleted',
|
|
1940
1914
|
'message.unflagged',
|
|
1941
1915
|
'ticket.closed',
|
|
1916
|
+
'ticket.label.updated'
|
|
1942
1917
|
],
|
|
1943
1918
|
inputs: {
|
|
1944
1919
|
property_id: {
|
|
@@ -2030,6 +2005,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2030
2005
|
'ticket.closed',
|
|
2031
2006
|
'task.created',
|
|
2032
2007
|
'task.assignee.updated',
|
|
2008
|
+
'ticket.label.updated'
|
|
2033
2009
|
],
|
|
2034
2010
|
validate: () => true,
|
|
2035
2011
|
},
|
|
@@ -2049,6 +2025,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2049
2025
|
'message.unflagged',
|
|
2050
2026
|
'message.deleted',
|
|
2051
2027
|
'ticket.closed',
|
|
2028
|
+
'ticket.label.updated'
|
|
2052
2029
|
],
|
|
2053
2030
|
validate: () => true,
|
|
2054
2031
|
},
|
|
@@ -2075,6 +2052,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2075
2052
|
'message.unflagged',
|
|
2076
2053
|
'message.flagged',
|
|
2077
2054
|
'ticket.closed',
|
|
2055
|
+
'ticket.label.updated',
|
|
2078
2056
|
'task.created',
|
|
2079
2057
|
'task.assignee.updated',
|
|
2080
2058
|
],
|
|
@@ -2123,6 +2101,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2123
2101
|
'ticket.closed',
|
|
2124
2102
|
'task.created',
|
|
2125
2103
|
'task.assignee.updated',
|
|
2104
|
+
'ticket.label.updated',
|
|
2126
2105
|
],
|
|
2127
2106
|
validate: () => true,
|
|
2128
2107
|
},
|
|
@@ -2141,6 +2120,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2141
2120
|
'chat.label.updated',
|
|
2142
2121
|
'message.deleted',
|
|
2143
2122
|
'ticket.closed',
|
|
2123
|
+
'ticket.label.updated',
|
|
2144
2124
|
'task.created',
|
|
2145
2125
|
'task.assignee.updated',
|
|
2146
2126
|
],
|
|
@@ -2209,6 +2189,7 @@ export const ActionNameMap: ActionNameMapType = {
|
|
|
2209
2189
|
'chat.label.updated',
|
|
2210
2190
|
'message.deleted',
|
|
2211
2191
|
'ticket.closed',
|
|
2192
|
+
'ticket.label.updated',
|
|
2212
2193
|
'task.created',
|
|
2213
2194
|
'task.assignee.updated',
|
|
2214
2195
|
],
|
|
@@ -2631,6 +2612,7 @@ export const variablesExclusionList: Record<
|
|
|
2631
2612
|
'sender.is_internal',
|
|
2632
2613
|
],
|
|
2633
2614
|
'ticket.updated': ['ticket.is_deleted'],
|
|
2615
|
+
"ticket.label.updated": ['ticket.is_deleted'],
|
|
2634
2616
|
'reaction.added': [],
|
|
2635
2617
|
'message.updated': [],
|
|
2636
2618
|
'message.flagged': [],
|
|
@@ -2640,5 +2622,4 @@ export const variablesExclusionList: Record<
|
|
|
2640
2622
|
'chat.label.updated': [],
|
|
2641
2623
|
'task.created': [],
|
|
2642
2624
|
'task.assignee.updated': [],
|
|
2643
|
-
'ticket.label.updated': [],
|
|
2644
2625
|
};
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
Customer,
|
|
3
|
+
Estimate,
|
|
4
|
+
HostedPage,
|
|
5
|
+
ItemPrice,
|
|
6
|
+
Subscription,
|
|
7
|
+
} from 'chargebee';
|
|
2
8
|
|
|
3
9
|
import { Merge, OverrideProperties } from 'type-fest';
|
|
4
10
|
import { Filter, Rule } from './rules.types';
|
|
@@ -777,8 +783,10 @@ export type ChatOperationReturn = {
|
|
|
777
783
|
export type ChargebeeSubscription = Subscription;
|
|
778
784
|
export type ChargebeeCustomer = Customer;
|
|
779
785
|
export type ChargebeePrice = ItemPrice;
|
|
780
|
-
export type ChargebeeUpcomingInvoice =
|
|
781
|
-
|
|
786
|
+
export type ChargebeeUpcomingInvoice =
|
|
787
|
+
Estimate.RenewalEstimateResponse['estimate'];
|
|
788
|
+
export type ChargebeeLineItem =
|
|
789
|
+
HostedPage.CheckoutNewForItemsInputParam['subscription_items'];
|
|
782
790
|
|
|
783
791
|
/* -------------------------------- REALTIME -------------------------------- */
|
|
784
792
|
|
|
@@ -876,7 +884,7 @@ export enum IntegrationLogType {
|
|
|
876
884
|
PHONE_UPDATED = 'org.phone.updated',
|
|
877
885
|
PHONE_QR_UPDATED = 'org.phone.qr',
|
|
878
886
|
NOTE_CREATED = 'note.created',
|
|
879
|
-
CHAT_CUSTOM_PROPERTIES_UPDATED = 'chat.custom_properties.updated'
|
|
887
|
+
CHAT_CUSTOM_PROPERTIES_UPDATED = 'chat.custom_properties.updated',
|
|
880
888
|
}
|
|
881
889
|
|
|
882
890
|
export type IntegrationLogMetadataType<T extends IntegrationLogType> =
|
|
@@ -1604,4 +1612,3 @@ export type ZohodeskIntegrationTokenType = OverrideProperties<
|
|
|
1604
1612
|
};
|
|
1605
1613
|
}
|
|
1606
1614
|
>;
|
|
1607
|
-
|