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