@periskope/types 0.6.148 → 0.6.150
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 +15 -7
- package/dist/rules.types.js +149 -54
- package/dist/supabase.types.d.ts +13 -18
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/rules.types.ts +179 -61
- package/supabase.types.ts +2649 -2654
- package/types.ts +2 -0
package/rules.types.ts
CHANGED
|
@@ -110,10 +110,11 @@ export interface Filter {
|
|
|
110
110
|
| 'KNOWN'
|
|
111
111
|
| 'NKNOWN'
|
|
112
112
|
| 'IS'
|
|
113
|
-
| 'NIS'
|
|
113
|
+
| 'NIS'
|
|
114
|
+
| 'ON'; // Add other condition types as needed
|
|
114
115
|
variable: string;
|
|
115
116
|
value: string | string[];
|
|
116
|
-
variable_type?: 'string' | 'date'; // Optional, like 'Date'
|
|
117
|
+
variable_type?: 'string' | 'number' | 'boolean' | 'day-time' | 'date' | 'day'; // Optional, like 'Date'
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
export const isFilter = (filter: any): filter is Filter => {
|
|
@@ -181,22 +182,44 @@ export const FilterNameMap: Record<
|
|
|
181
182
|
name: 'is not',
|
|
182
183
|
input: true,
|
|
183
184
|
},
|
|
185
|
+
ON: {
|
|
186
|
+
name: 'on',
|
|
187
|
+
input: true,
|
|
188
|
+
},
|
|
184
189
|
};
|
|
185
190
|
|
|
186
191
|
export type VariableNameValueType = {
|
|
187
192
|
text: string;
|
|
188
|
-
type:
|
|
193
|
+
type:
|
|
194
|
+
| 'string'
|
|
195
|
+
| 'time'
|
|
196
|
+
| 'boolean'
|
|
197
|
+
| 'dropdown'
|
|
198
|
+
| 'day-time'
|
|
199
|
+
| 'number'
|
|
200
|
+
| 'date';
|
|
201
|
+
variable_type: 'string' | 'number' | 'boolean' | 'day-time' | 'date';
|
|
189
202
|
value?:
|
|
190
203
|
| string
|
|
191
204
|
| {
|
|
192
205
|
id: string;
|
|
193
|
-
value: string;
|
|
206
|
+
value: string | number | boolean;
|
|
194
207
|
label: string;
|
|
195
208
|
}[]
|
|
196
209
|
| null;
|
|
197
|
-
filters:
|
|
210
|
+
filters:
|
|
211
|
+
| Partial<
|
|
212
|
+
Record<
|
|
213
|
+
Filter['condition'],
|
|
214
|
+
{
|
|
215
|
+
info?: string;
|
|
216
|
+
}
|
|
217
|
+
>
|
|
218
|
+
>
|
|
219
|
+
| Filter['condition'][];
|
|
198
220
|
hidden?: boolean;
|
|
199
221
|
placeholder?: string;
|
|
222
|
+
info?: string;
|
|
200
223
|
};
|
|
201
224
|
|
|
202
225
|
export const MessageVariableNameMap: Record<
|
|
@@ -208,62 +231,90 @@ export const MessageVariableNameMap: Record<
|
|
|
208
231
|
type: 'string',
|
|
209
232
|
filters: ['CONTAINS', 'NCONTAINS', 'EQ', 'NEQ', 'KNOWN', 'NKNOWN'],
|
|
210
233
|
placeholder: 'e.g. Test message',
|
|
234
|
+
variable_type: 'string',
|
|
211
235
|
},
|
|
212
236
|
'message.sender_phone': {
|
|
213
237
|
text: 'Message Sender Phone',
|
|
214
238
|
type: 'string',
|
|
215
239
|
filters: ['EQ', 'NEQ'],
|
|
216
|
-
placeholder: 'e.g. 919876543210
|
|
240
|
+
placeholder: 'e.g. 919876543210',
|
|
241
|
+
variable_type: 'string',
|
|
217
242
|
},
|
|
218
243
|
'message.timestamp': {
|
|
219
|
-
text: 'Message
|
|
244
|
+
text: 'Message receive timestamp',
|
|
220
245
|
type: 'day-time',
|
|
221
|
-
filters:
|
|
246
|
+
filters: {
|
|
247
|
+
LT: {
|
|
248
|
+
info: 'When message is received before mentioned time (UTC)',
|
|
249
|
+
},
|
|
250
|
+
LTE: {
|
|
251
|
+
info: 'When message is received before mentioned time (UTC)',
|
|
252
|
+
},
|
|
253
|
+
GT: {
|
|
254
|
+
info: 'When message is received after mentioned time (UTC)',
|
|
255
|
+
},
|
|
256
|
+
GTE: {
|
|
257
|
+
info: 'When message is received on or after mentioned time (UTC)',
|
|
258
|
+
},
|
|
259
|
+
ON: {
|
|
260
|
+
info: 'When message is received on mentioned days',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
variable_type: 'day-time',
|
|
264
|
+
info: 'The timestamp when the message was received',
|
|
222
265
|
},
|
|
223
266
|
'message.flag_status': {
|
|
224
267
|
text: 'Message Flag Status',
|
|
225
268
|
filters: ['IS'],
|
|
226
269
|
type: 'boolean',
|
|
270
|
+
variable_type: 'boolean',
|
|
227
271
|
},
|
|
228
272
|
'message.has_quoted_msg': {
|
|
229
273
|
text: 'Quoted Message',
|
|
230
274
|
filters: ['IS'],
|
|
231
275
|
type: 'boolean',
|
|
276
|
+
variable_type: 'boolean',
|
|
232
277
|
},
|
|
233
278
|
'message.media': {
|
|
234
279
|
text: 'Message Media',
|
|
235
280
|
type: 'boolean',
|
|
236
281
|
filters: ['KNOWN', 'NKNOWN'],
|
|
282
|
+
variable_type: 'boolean',
|
|
237
283
|
},
|
|
238
284
|
'message.performed_by': {
|
|
239
285
|
text: 'Message Performed By',
|
|
240
286
|
type: 'dropdown',
|
|
241
287
|
value: 'org.members',
|
|
242
288
|
filters: ['EQ', 'NEQ'],
|
|
289
|
+
variable_type: 'string',
|
|
243
290
|
},
|
|
244
291
|
'message.chat_id': {
|
|
245
292
|
text: 'Chat ID',
|
|
246
293
|
type: 'string',
|
|
247
294
|
filters: ['EQ', 'NEQ'],
|
|
248
295
|
hidden: true,
|
|
296
|
+
variable_type: 'string',
|
|
249
297
|
},
|
|
250
298
|
'message.message_id': {
|
|
251
299
|
text: 'Message ID',
|
|
252
300
|
type: 'string',
|
|
253
301
|
filters: ['EQ', 'NEQ'],
|
|
254
302
|
hidden: true,
|
|
303
|
+
variable_type: 'string',
|
|
255
304
|
},
|
|
256
305
|
'message.org_phone': {
|
|
257
306
|
text: 'Org Phone',
|
|
258
307
|
type: 'string',
|
|
259
308
|
filters: ['EQ', 'NEQ'],
|
|
260
309
|
hidden: true,
|
|
310
|
+
variable_type: 'string',
|
|
261
311
|
},
|
|
262
312
|
'message.org_id': {
|
|
263
313
|
text: 'Org ID',
|
|
264
314
|
type: 'string',
|
|
265
315
|
filters: ['EQ', 'NEQ'],
|
|
266
316
|
hidden: true,
|
|
317
|
+
variable_type: 'string',
|
|
267
318
|
},
|
|
268
319
|
'message.message_type': {
|
|
269
320
|
text: 'Message Type',
|
|
@@ -276,23 +327,26 @@ export const MessageVariableNameMap: Record<
|
|
|
276
327
|
{ id: 'document', value: 'document', label: 'Document' },
|
|
277
328
|
],
|
|
278
329
|
filters: ['EQ', 'NEQ'],
|
|
330
|
+
variable_type: 'string',
|
|
279
331
|
},
|
|
280
332
|
'message.author': {
|
|
281
333
|
text: 'Message Author',
|
|
282
334
|
type: 'string',
|
|
283
335
|
filters: ['EQ', 'NEQ'],
|
|
284
336
|
hidden: true,
|
|
337
|
+
variable_type: 'string',
|
|
285
338
|
},
|
|
286
339
|
'message.ack': {
|
|
287
340
|
text: 'Message acknowledment status',
|
|
288
341
|
type: 'dropdown',
|
|
289
342
|
value: [
|
|
290
|
-
{ id: '0', value:
|
|
291
|
-
{ id: '1', value:
|
|
292
|
-
{ id: '2', value:
|
|
293
|
-
{ id: '3', value:
|
|
343
|
+
{ id: '0', value: 0, label: '0' },
|
|
344
|
+
{ id: '1', value: 1, label: '1' },
|
|
345
|
+
{ id: '2', value: 2, label: '2' },
|
|
346
|
+
{ id: '3', value: 3, label: '3' },
|
|
294
347
|
],
|
|
295
348
|
filters: ['EQ'],
|
|
349
|
+
variable_type: 'number',
|
|
296
350
|
},
|
|
297
351
|
};
|
|
298
352
|
|
|
@@ -304,40 +358,47 @@ export const SenderVariableNameMap: Record<
|
|
|
304
358
|
text: 'Sender is business',
|
|
305
359
|
type: 'boolean',
|
|
306
360
|
filters: ['IS'],
|
|
361
|
+
variable_type: 'boolean',
|
|
307
362
|
},
|
|
308
363
|
'sender.is_enterprise': {
|
|
309
364
|
text: 'Sender is enterprise',
|
|
310
365
|
type: 'boolean',
|
|
311
366
|
filters: ['IS'],
|
|
367
|
+
variable_type: 'boolean',
|
|
312
368
|
},
|
|
313
369
|
'sender.is_internal': {
|
|
314
370
|
text: 'Sender is internal',
|
|
315
371
|
type: 'boolean',
|
|
316
372
|
filters: ['IS'],
|
|
373
|
+
variable_type: 'boolean',
|
|
317
374
|
},
|
|
318
375
|
'sender.contact_name': {
|
|
319
376
|
text: 'Sender Name',
|
|
320
377
|
type: 'string',
|
|
321
378
|
filters: ['EQ', 'NEQ', 'KNOWN', 'NKNOWN'],
|
|
322
379
|
placeholder: 'e.g. John Doe',
|
|
380
|
+
variable_type: 'string',
|
|
323
381
|
},
|
|
324
382
|
'sender.contact_id': {
|
|
325
383
|
text: 'Sender Contact Phone',
|
|
326
384
|
type: 'string',
|
|
327
385
|
filters: ['EQ', 'NEQ'],
|
|
328
|
-
placeholder: 'e.g. 919876543210
|
|
386
|
+
placeholder: 'e.g. 919876543210',
|
|
387
|
+
variable_type: 'string',
|
|
329
388
|
},
|
|
330
389
|
'sender.labels': {
|
|
331
390
|
text: 'Sender Labels',
|
|
332
391
|
type: 'dropdown',
|
|
333
392
|
value: 'org.labels',
|
|
334
393
|
filters: ['EQ', 'NEQ'],
|
|
394
|
+
variable_type: 'string',
|
|
335
395
|
},
|
|
336
396
|
'sender.org_id': {
|
|
337
397
|
text: 'Org ID',
|
|
338
398
|
type: 'string',
|
|
339
399
|
filters: ['EQ', 'NEQ'],
|
|
340
400
|
hidden: true,
|
|
401
|
+
variable_type: 'string',
|
|
341
402
|
},
|
|
342
403
|
'sender.is_super_admin': {
|
|
343
404
|
text: 'Sender is super admin',
|
|
@@ -346,15 +407,16 @@ export const SenderVariableNameMap: Record<
|
|
|
346
407
|
value: [
|
|
347
408
|
{
|
|
348
409
|
id: 'true',
|
|
349
|
-
value:
|
|
410
|
+
value: true,
|
|
350
411
|
label: 'True',
|
|
351
412
|
},
|
|
352
413
|
{
|
|
353
414
|
id: 'false',
|
|
354
|
-
value:
|
|
415
|
+
value: false,
|
|
355
416
|
label: 'False',
|
|
356
417
|
},
|
|
357
418
|
],
|
|
419
|
+
variable_type: 'boolean',
|
|
358
420
|
},
|
|
359
421
|
'sender.is_admin': {
|
|
360
422
|
text: 'Sender is admin',
|
|
@@ -363,15 +425,16 @@ export const SenderVariableNameMap: Record<
|
|
|
363
425
|
value: [
|
|
364
426
|
{
|
|
365
427
|
id: 'true',
|
|
366
|
-
value:
|
|
428
|
+
value: true,
|
|
367
429
|
label: 'True',
|
|
368
430
|
},
|
|
369
431
|
{
|
|
370
432
|
id: 'false',
|
|
371
|
-
value:
|
|
433
|
+
value: false,
|
|
372
434
|
label: 'False',
|
|
373
435
|
},
|
|
374
436
|
],
|
|
437
|
+
variable_type: 'boolean',
|
|
375
438
|
},
|
|
376
439
|
};
|
|
377
440
|
|
|
@@ -384,18 +447,21 @@ export const ChatVariableNameMap: Record<
|
|
|
384
447
|
type: 'dropdown',
|
|
385
448
|
value: 'org.members',
|
|
386
449
|
filters: ['EQ', 'NEQ', 'KNOWN', 'NKNOWN'],
|
|
450
|
+
variable_type: 'string',
|
|
387
451
|
},
|
|
388
452
|
'chat.chat_name': {
|
|
389
453
|
text: 'Chat Name',
|
|
390
454
|
type: 'string',
|
|
391
455
|
filters: ['EQ', 'NEQ', 'CONTAINS', 'NCONTAINS'],
|
|
392
456
|
placeholder: 'e.g. Support Chat',
|
|
457
|
+
variable_type: 'string',
|
|
393
458
|
},
|
|
394
459
|
'chat.org_phone': {
|
|
395
460
|
text: 'Chat Org Phone',
|
|
396
461
|
type: 'dropdown',
|
|
397
462
|
value: 'org.org_phones',
|
|
398
463
|
filters: ['EQ', 'NEQ'],
|
|
464
|
+
variable_type: 'string',
|
|
399
465
|
},
|
|
400
466
|
'chat.chat_type': {
|
|
401
467
|
text: 'Chat Type',
|
|
@@ -405,36 +471,42 @@ export const ChatVariableNameMap: Record<
|
|
|
405
471
|
{ id: 'group', value: 'group', label: 'Group' },
|
|
406
472
|
],
|
|
407
473
|
filters: ['EQ', 'NEQ'],
|
|
474
|
+
variable_type: 'string',
|
|
408
475
|
},
|
|
409
476
|
'chat.members': {
|
|
410
477
|
text: 'Chat Members',
|
|
411
478
|
type: 'string',
|
|
412
479
|
filters: ['CONTAINS', 'NCONTAINS'],
|
|
413
480
|
placeholder: 'e.g. 919876543210',
|
|
481
|
+
variable_type: 'string',
|
|
414
482
|
},
|
|
415
483
|
'chat.labels': {
|
|
416
484
|
text: 'Chat Labels',
|
|
417
485
|
type: 'dropdown',
|
|
418
486
|
value: 'org.labels',
|
|
419
487
|
filters: ['CONTAINS', 'NCONTAINS'],
|
|
488
|
+
variable_type: 'string',
|
|
420
489
|
},
|
|
421
490
|
'chat.chat_id': {
|
|
422
491
|
text: 'Chat ID',
|
|
423
492
|
type: 'string',
|
|
424
493
|
filters: ['EQ', 'NEQ'],
|
|
425
494
|
placeholder: 'e.g. 12027747916749@c.us',
|
|
495
|
+
variable_type: 'string',
|
|
426
496
|
},
|
|
427
497
|
'chat.chat_org_phones': {
|
|
428
498
|
text: 'Chat Org Phones',
|
|
429
499
|
type: 'dropdown',
|
|
430
500
|
filters: ['CONTAINS', 'NCONTAINS'],
|
|
431
501
|
hidden: true,
|
|
502
|
+
variable_type: 'string',
|
|
432
503
|
},
|
|
433
504
|
'chat.org_id': {
|
|
434
505
|
text: 'Org ID',
|
|
435
506
|
type: 'string',
|
|
436
507
|
filters: [],
|
|
437
508
|
hidden: true,
|
|
509
|
+
variable_type: 'string',
|
|
438
510
|
},
|
|
439
511
|
'chat.messages_admins_only': {
|
|
440
512
|
text: 'Chat Messages Admins Only',
|
|
@@ -443,15 +515,16 @@ export const ChatVariableNameMap: Record<
|
|
|
443
515
|
value: [
|
|
444
516
|
{
|
|
445
517
|
id: 'true',
|
|
446
|
-
value:
|
|
518
|
+
value: true,
|
|
447
519
|
label: 'True',
|
|
448
520
|
},
|
|
449
521
|
{
|
|
450
522
|
id: 'false',
|
|
451
|
-
value:
|
|
523
|
+
value: false,
|
|
452
524
|
label: 'False',
|
|
453
525
|
},
|
|
454
526
|
],
|
|
527
|
+
variable_type: 'boolean',
|
|
455
528
|
},
|
|
456
529
|
'chat.is_muted': {
|
|
457
530
|
text: 'Chat is muted',
|
|
@@ -460,15 +533,16 @@ export const ChatVariableNameMap: Record<
|
|
|
460
533
|
value: [
|
|
461
534
|
{
|
|
462
535
|
id: 'true',
|
|
463
|
-
value:
|
|
536
|
+
value: true,
|
|
464
537
|
label: 'True',
|
|
465
538
|
},
|
|
466
539
|
{
|
|
467
540
|
id: 'false',
|
|
468
|
-
value:
|
|
541
|
+
value: false,
|
|
469
542
|
label: 'False',
|
|
470
543
|
},
|
|
471
544
|
],
|
|
545
|
+
variable_type: 'boolean',
|
|
472
546
|
},
|
|
473
547
|
'chat.is_exited': {
|
|
474
548
|
text: 'Chat is exited',
|
|
@@ -477,33 +551,17 @@ export const ChatVariableNameMap: Record<
|
|
|
477
551
|
value: [
|
|
478
552
|
{
|
|
479
553
|
id: 'true',
|
|
480
|
-
value:
|
|
554
|
+
value: true,
|
|
481
555
|
label: 'True',
|
|
482
556
|
},
|
|
483
557
|
{
|
|
484
558
|
id: 'false',
|
|
485
|
-
value:
|
|
559
|
+
value: false,
|
|
486
560
|
label: 'False',
|
|
487
561
|
},
|
|
488
562
|
],
|
|
563
|
+
variable_type: 'boolean',
|
|
489
564
|
},
|
|
490
|
-
// 'chat.is_archived': {
|
|
491
|
-
// text: 'Chat is archived',
|
|
492
|
-
// type: 'boolean',
|
|
493
|
-
// filters: ['EQ', 'NEQ'],
|
|
494
|
-
// value: [
|
|
495
|
-
// {
|
|
496
|
-
// id: 'true',
|
|
497
|
-
// value: 'true',
|
|
498
|
-
// label: 'True',
|
|
499
|
-
// },
|
|
500
|
-
// {
|
|
501
|
-
// id: 'false',
|
|
502
|
-
// value: 'false',
|
|
503
|
-
// label: 'False',
|
|
504
|
-
// },
|
|
505
|
-
// ],
|
|
506
|
-
// },
|
|
507
565
|
'chat.info_admins_only': {
|
|
508
566
|
text: 'Chat Info Admins Only',
|
|
509
567
|
type: 'boolean',
|
|
@@ -511,15 +569,16 @@ export const ChatVariableNameMap: Record<
|
|
|
511
569
|
value: [
|
|
512
570
|
{
|
|
513
571
|
id: 'true',
|
|
514
|
-
value:
|
|
572
|
+
value: true,
|
|
515
573
|
label: 'True',
|
|
516
574
|
},
|
|
517
575
|
{
|
|
518
576
|
id: 'false',
|
|
519
|
-
value:
|
|
577
|
+
value: false,
|
|
520
578
|
label: 'False',
|
|
521
579
|
},
|
|
522
580
|
],
|
|
581
|
+
variable_type: 'boolean',
|
|
523
582
|
},
|
|
524
583
|
'chat.has_flagged_messages': {
|
|
525
584
|
text: 'Chat has flagged messages',
|
|
@@ -528,21 +587,23 @@ export const ChatVariableNameMap: Record<
|
|
|
528
587
|
value: [
|
|
529
588
|
{
|
|
530
589
|
id: 'true',
|
|
531
|
-
value:
|
|
590
|
+
value: true,
|
|
532
591
|
label: 'True',
|
|
533
592
|
},
|
|
534
593
|
{
|
|
535
594
|
id: 'false',
|
|
536
|
-
value:
|
|
595
|
+
value: false,
|
|
537
596
|
label: 'False',
|
|
538
597
|
},
|
|
539
598
|
],
|
|
599
|
+
variable_type: 'boolean',
|
|
540
600
|
},
|
|
541
601
|
'chat.group_description': {
|
|
542
602
|
text: 'Group Description',
|
|
543
603
|
type: 'string',
|
|
544
604
|
filters: ['CONTAINS', 'NCONTAINS', 'EQ', 'NEQ'],
|
|
545
605
|
placeholder: 'e.g. Group description',
|
|
606
|
+
variable_type: 'string',
|
|
546
607
|
},
|
|
547
608
|
'chat.custom_properties': {
|
|
548
609
|
text: 'Chat Custom Properties',
|
|
@@ -550,11 +611,13 @@ export const ChatVariableNameMap: Record<
|
|
|
550
611
|
value: 'org.custom_properties',
|
|
551
612
|
filters: ['EQ', 'NEQ'],
|
|
552
613
|
hidden: true,
|
|
614
|
+
variable_type: 'string',
|
|
553
615
|
},
|
|
554
616
|
'chat.created_at': {
|
|
555
617
|
text: 'Chat Created At',
|
|
556
618
|
type: 'day-time',
|
|
557
|
-
filters: ['LT', 'LTE', 'GT', 'GTE', '
|
|
619
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
620
|
+
variable_type: 'day-time',
|
|
558
621
|
},
|
|
559
622
|
};
|
|
560
623
|
|
|
@@ -567,6 +630,7 @@ export const TicketVariableNameMap: Record<
|
|
|
567
630
|
type: 'string',
|
|
568
631
|
filters: ['CONTAINS', 'NCONTAINS', 'EQ', 'NEQ'],
|
|
569
632
|
placeholder: 'e.g. Test ticket',
|
|
633
|
+
variable_type: 'string',
|
|
570
634
|
},
|
|
571
635
|
'ticket.status': {
|
|
572
636
|
text: 'Ticket Status',
|
|
@@ -577,58 +641,80 @@ export const TicketVariableNameMap: Record<
|
|
|
577
641
|
{ id: 'inprogress', value: 'inprogress', label: 'In progress' },
|
|
578
642
|
],
|
|
579
643
|
filters: ['EQ', 'NEQ'],
|
|
644
|
+
variable_type: 'string',
|
|
580
645
|
},
|
|
581
646
|
'ticket.priority': {
|
|
582
647
|
text: 'Ticket Priority',
|
|
583
648
|
type: 'dropdown',
|
|
584
649
|
value: [
|
|
585
|
-
{ id: '0', value:
|
|
586
|
-
{ id: '1', value:
|
|
587
|
-
{ id: '2', value:
|
|
588
|
-
{ id: '3', value:
|
|
589
|
-
{ id: '4', value:
|
|
650
|
+
{ id: '0', value: 0, label: 'No Prioriy' },
|
|
651
|
+
{ id: '1', value: 1, label: 'Low' },
|
|
652
|
+
{ id: '2', value: 2, label: 'Medium' },
|
|
653
|
+
{ id: '3', value: 3, label: 'High' },
|
|
654
|
+
{ id: '4', value: 4, label: 'Urgent' },
|
|
590
655
|
],
|
|
591
656
|
filters: ['EQ', 'NEQ'],
|
|
657
|
+
variable_type: 'number',
|
|
592
658
|
},
|
|
593
659
|
'ticket.assignee': {
|
|
594
660
|
text: 'Ticket Assignee',
|
|
595
661
|
type: 'dropdown',
|
|
596
662
|
value: 'org.members',
|
|
597
663
|
filters: ['EQ', 'NEQ', 'KNOWN', 'NKNOWN'],
|
|
664
|
+
variable_type: 'string',
|
|
598
665
|
},
|
|
599
666
|
'ticket.labels': {
|
|
600
667
|
text: 'Ticket Labels',
|
|
601
668
|
type: 'dropdown',
|
|
602
669
|
value: 'org.labels',
|
|
603
670
|
filters: ['EQ', 'NEQ'],
|
|
671
|
+
variable_type: 'string',
|
|
604
672
|
},
|
|
605
673
|
'ticket.is_deleted': {
|
|
606
674
|
text: 'Ticket is deleted',
|
|
607
675
|
type: 'boolean',
|
|
676
|
+
value: [
|
|
677
|
+
{
|
|
678
|
+
id: 'true',
|
|
679
|
+
value: true,
|
|
680
|
+
label: 'True',
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
id: 'false',
|
|
684
|
+
value: false,
|
|
685
|
+
label: 'False',
|
|
686
|
+
},
|
|
687
|
+
],
|
|
608
688
|
filters: ['IS'],
|
|
689
|
+
variable_type: 'boolean',
|
|
609
690
|
},
|
|
610
691
|
'ticket.raised_by': {
|
|
611
692
|
text: 'Ticket Raised By',
|
|
612
693
|
type: 'dropdown',
|
|
613
694
|
value: 'org.members',
|
|
614
695
|
filters: ['EQ', 'NEQ'],
|
|
696
|
+
variable_type: 'string',
|
|
615
697
|
},
|
|
616
698
|
'ticket.due_date': {
|
|
617
699
|
text: 'Ticket Due Date',
|
|
618
|
-
type: '
|
|
700
|
+
type: 'date',
|
|
619
701
|
filters: ['KNOWN', 'NKNOWN'],
|
|
702
|
+
variable_type: 'date',
|
|
703
|
+
hidden: true,
|
|
620
704
|
},
|
|
621
705
|
'ticket.ticket_id': {
|
|
622
706
|
text: 'Ticket ID',
|
|
623
707
|
type: 'string',
|
|
624
708
|
filters: ['EQ', 'NEQ'],
|
|
625
709
|
hidden: true,
|
|
710
|
+
variable_type: 'string',
|
|
626
711
|
},
|
|
627
712
|
'ticket.org_id': {
|
|
628
713
|
text: 'Org ID',
|
|
629
714
|
type: 'string',
|
|
630
715
|
filters: ['EQ', 'NEQ'],
|
|
631
716
|
hidden: true,
|
|
717
|
+
variable_type: 'string',
|
|
632
718
|
},
|
|
633
719
|
'ticket.custom_properties': {
|
|
634
720
|
text: 'Ticket Custom Properties',
|
|
@@ -636,17 +722,20 @@ export const TicketVariableNameMap: Record<
|
|
|
636
722
|
value: 'org.custom_properties',
|
|
637
723
|
filters: ['EQ', 'NEQ'],
|
|
638
724
|
hidden: true,
|
|
725
|
+
variable_type: 'string',
|
|
639
726
|
},
|
|
640
727
|
'ticket.created_at': {
|
|
641
728
|
text: 'Ticket Created At',
|
|
642
729
|
type: 'day-time',
|
|
643
|
-
filters: ['LT', 'LTE', 'GT', 'GTE'],
|
|
730
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
731
|
+
variable_type: 'day-time',
|
|
644
732
|
},
|
|
645
733
|
'ticket.chat_id': {
|
|
646
734
|
text: 'Chat ID',
|
|
647
735
|
type: 'string',
|
|
648
736
|
filters: ['EQ', 'NEQ'],
|
|
649
737
|
hidden: true,
|
|
738
|
+
variable_type: 'string',
|
|
650
739
|
},
|
|
651
740
|
};
|
|
652
741
|
|
|
@@ -659,30 +748,35 @@ export const ReactionVariableNameMap: Record<
|
|
|
659
748
|
type: 'string',
|
|
660
749
|
filters: ['EQ', 'NEQ'],
|
|
661
750
|
placeholder: 'e.g. 👍',
|
|
751
|
+
variable_type: 'string',
|
|
662
752
|
},
|
|
663
753
|
'reaction.sender_id': {
|
|
664
754
|
text: 'Reaction Sender Phone',
|
|
665
755
|
type: 'string',
|
|
666
756
|
filters: ['EQ', 'NEQ'],
|
|
667
|
-
placeholder: 'e.g. 919876543210
|
|
757
|
+
placeholder: 'e.g. 919876543210',
|
|
758
|
+
variable_type: 'string',
|
|
668
759
|
},
|
|
669
760
|
'reaction.message_id': {
|
|
670
761
|
text: 'Reaction Message ID',
|
|
671
762
|
type: 'string',
|
|
672
763
|
filters: ['EQ', 'NEQ'],
|
|
673
764
|
hidden: true,
|
|
765
|
+
variable_type: 'string',
|
|
674
766
|
},
|
|
675
767
|
'reaction.chat_id': {
|
|
676
768
|
text: 'Chat ID',
|
|
677
769
|
type: 'string',
|
|
678
770
|
filters: ['EQ', 'NEQ'],
|
|
679
771
|
hidden: true,
|
|
772
|
+
variable_type: 'string',
|
|
680
773
|
},
|
|
681
774
|
'reaction.reaction_id': {
|
|
682
775
|
text: 'Reaction ID',
|
|
683
776
|
type: 'string',
|
|
684
777
|
filters: ['EQ', 'NEQ'],
|
|
685
778
|
hidden: true,
|
|
779
|
+
variable_type: 'string',
|
|
686
780
|
},
|
|
687
781
|
};
|
|
688
782
|
|
|
@@ -724,6 +818,7 @@ export type SendMessageAction = {
|
|
|
724
818
|
type: 'image' | 'video' | 'audio' | 'document';
|
|
725
819
|
name: string;
|
|
726
820
|
};
|
|
821
|
+
maintain_flag_status: 'true' | 'false';
|
|
727
822
|
};
|
|
728
823
|
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
729
824
|
};
|
|
@@ -743,7 +838,7 @@ export type CreateTicketAction = {
|
|
|
743
838
|
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
744
839
|
metadata: {
|
|
745
840
|
assignee?: string;
|
|
746
|
-
priority?: 0 | 1 | 2 | 3 | 4;
|
|
841
|
+
priority?: '0' | '1' | '2' | '3' | '4';
|
|
747
842
|
label?: string;
|
|
748
843
|
};
|
|
749
844
|
};
|
|
@@ -752,7 +847,9 @@ export type FlagMessageAction = {
|
|
|
752
847
|
id: string;
|
|
753
848
|
type: 'flag_message';
|
|
754
849
|
delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
|
|
755
|
-
metadata: {
|
|
850
|
+
metadata: {
|
|
851
|
+
flag: 'true' | 'false';
|
|
852
|
+
};
|
|
756
853
|
};
|
|
757
854
|
|
|
758
855
|
export type AssignTicketAction = {
|
|
@@ -834,6 +931,7 @@ export type ReplyToMessageAction = {
|
|
|
834
931
|
type: 'image' | 'video' | 'audio' | 'document';
|
|
835
932
|
name: string;
|
|
836
933
|
};
|
|
934
|
+
maintain_flag_status: boolean;
|
|
837
935
|
};
|
|
838
936
|
};
|
|
839
937
|
|
|
@@ -1009,6 +1107,16 @@ export const ActionNameMap: Record<
|
|
|
1009
1107
|
placeholder: 'Upload media',
|
|
1010
1108
|
value: null,
|
|
1011
1109
|
},
|
|
1110
|
+
maintain_flag_status: {
|
|
1111
|
+
id: 'maintain_flag_status',
|
|
1112
|
+
type: 'dropdown',
|
|
1113
|
+
label: 'Maintain Flag Status',
|
|
1114
|
+
placeholder: 'Select...',
|
|
1115
|
+
value: [
|
|
1116
|
+
{ id: 'true', value: 'true', label: 'True' },
|
|
1117
|
+
{ id: 'false', value: 'false', label: 'False' },
|
|
1118
|
+
],
|
|
1119
|
+
},
|
|
1012
1120
|
},
|
|
1013
1121
|
validTriggers: [
|
|
1014
1122
|
'message.created',
|
|
@@ -1039,6 +1147,16 @@ export const ActionNameMap: Record<
|
|
|
1039
1147
|
placeholder: 'Upload media',
|
|
1040
1148
|
value: null,
|
|
1041
1149
|
},
|
|
1150
|
+
maintain_flag_status: {
|
|
1151
|
+
id: 'maintain_flag_status',
|
|
1152
|
+
type: 'dropdown',
|
|
1153
|
+
label: 'Maintain Flag Status',
|
|
1154
|
+
placeholder: 'Select...',
|
|
1155
|
+
value: [
|
|
1156
|
+
{ id: 'true', value: 'true', label: 'True' },
|
|
1157
|
+
{ id: 'false', value: 'false', label: 'False' },
|
|
1158
|
+
],
|
|
1159
|
+
},
|
|
1042
1160
|
},
|
|
1043
1161
|
validTriggers: [
|
|
1044
1162
|
'message.created',
|
|
@@ -1085,11 +1203,11 @@ export const ActionNameMap: Record<
|
|
|
1085
1203
|
id: 'priority',
|
|
1086
1204
|
type: 'dropdown',
|
|
1087
1205
|
value: [
|
|
1088
|
-
{ id: '0', value: '0', label: '
|
|
1089
|
-
{ id: '1', value: '1', label: '
|
|
1090
|
-
{ id: '2', value: '2', label: '
|
|
1091
|
-
{ id: '3', value: '3', label: '
|
|
1092
|
-
{ id: '4', value: '4', label: '
|
|
1206
|
+
{ id: '0', value: '0', label: 'No Prioriy' },
|
|
1207
|
+
{ id: '1', value: '1', label: 'Low' },
|
|
1208
|
+
{ id: '2', value: '2', label: 'Medium' },
|
|
1209
|
+
{ id: '3', value: '3', label: 'High' },
|
|
1210
|
+
{ id: '4', value: '4', label: 'Urgent' },
|
|
1093
1211
|
],
|
|
1094
1212
|
label: 'Priority',
|
|
1095
1213
|
placeholder: 'Select priority',
|
|
@@ -1203,7 +1321,7 @@ export const ActionNameMap: Record<
|
|
|
1203
1321
|
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
1204
1322
|
},
|
|
1205
1323
|
update_custom_property: {
|
|
1206
|
-
description: 'Update a custom property',
|
|
1324
|
+
description: 'Update a chat custom property',
|
|
1207
1325
|
title: 'Update Chat Custom Property',
|
|
1208
1326
|
validTriggers: [
|
|
1209
1327
|
'message.created',
|