@periskope/types 0.6.150 → 0.6.152
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/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/rules.types.d.ts +14 -1
- package/dist/rules.types.js +75 -72
- package/dist/supabase.types.d.ts +10 -0
- package/dist/types.d.ts +4 -38
- package/index.ts +1 -1
- package/package.json +1 -1
- package/supabase.types.ts +2659 -2649
- package/types.ts +4 -149
- package/rules.types.ts +0 -1495
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,6 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./rules.types"), exports);
|
|
18
17
|
__exportStar(require("./supabase.types"), exports);
|
|
19
18
|
__exportStar(require("./types"), exports);
|
package/dist/rules.types.d.ts
CHANGED
|
@@ -105,7 +105,8 @@ export declare enum FilterConditionMap {
|
|
|
105
105
|
'KNOWN' = "is known",
|
|
106
106
|
'NKNOWN' = "is not known",
|
|
107
107
|
'IS' = "=",
|
|
108
|
-
'NIS' = "<>"
|
|
108
|
+
'NIS' = "<>",
|
|
109
|
+
'ON' = "on"
|
|
109
110
|
}
|
|
110
111
|
interface FilterGroup {
|
|
111
112
|
filters: Filter[];
|
|
@@ -270,6 +271,7 @@ export declare const ActionNameMap: Record<Action['type'], {
|
|
|
270
271
|
label: string;
|
|
271
272
|
placeholder: string;
|
|
272
273
|
info?: string;
|
|
274
|
+
required: boolean;
|
|
273
275
|
}>;
|
|
274
276
|
validTriggers: Rule['trigger'][];
|
|
275
277
|
}>;
|
|
@@ -278,4 +280,15 @@ export declare const editorVariables: Array<{
|
|
|
278
280
|
value: string;
|
|
279
281
|
validTriggers: Rule['trigger'][];
|
|
280
282
|
}>;
|
|
283
|
+
export declare const variablesExclusionList: Record<Rule['trigger'], Array<keyof AppendTypes<{
|
|
284
|
+
message: MessageVariablesType;
|
|
285
|
+
}, '.'> | keyof AppendTypes<{
|
|
286
|
+
sender: SenderVariablesType;
|
|
287
|
+
}, '.'> | keyof AppendTypes<{
|
|
288
|
+
chat: ChatVariablesType;
|
|
289
|
+
}, '.'> | keyof AppendTypes<{
|
|
290
|
+
ticket: TicketVariablesType;
|
|
291
|
+
}, '.'> | keyof AppendTypes<{
|
|
292
|
+
reaction: ReactionVariablesType;
|
|
293
|
+
}, '.'>>>;
|
|
281
294
|
export {};
|
package/dist/rules.types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.editorVariables = exports.ActionNameMap = exports.RuleNameMap = exports.isSendMessageAction = exports.FilterConditionMap = exports.ReactionVariableNameMap = exports.TicketVariableNameMap = exports.ChatVariableNameMap = exports.SenderVariableNameMap = exports.MessageVariableNameMap = exports.FilterNameMap = exports.isFilter = void 0;
|
|
3
|
+
exports.variablesExclusionList = exports.editorVariables = exports.ActionNameMap = exports.RuleNameMap = exports.isSendMessageAction = exports.FilterConditionMap = exports.ReactionVariableNameMap = exports.TicketVariableNameMap = exports.ChatVariableNameMap = exports.SenderVariableNameMap = exports.MessageVariableNameMap = exports.FilterNameMap = exports.isFilter = void 0;
|
|
4
4
|
const isFilter = (filter) => {
|
|
5
5
|
return (typeof filter === 'object' &&
|
|
6
6
|
'id' in filter &&
|
|
@@ -10,14 +10,6 @@ const isFilter = (filter) => {
|
|
|
10
10
|
};
|
|
11
11
|
exports.isFilter = isFilter;
|
|
12
12
|
exports.FilterNameMap = {
|
|
13
|
-
CONTAINS: {
|
|
14
|
-
name: 'contains',
|
|
15
|
-
input: true,
|
|
16
|
-
},
|
|
17
|
-
NCONTAINS: {
|
|
18
|
-
name: 'does not contain',
|
|
19
|
-
input: true,
|
|
20
|
-
},
|
|
21
13
|
EQ: {
|
|
22
14
|
name: 'equals to',
|
|
23
15
|
input: true,
|
|
@@ -26,6 +18,14 @@ exports.FilterNameMap = {
|
|
|
26
18
|
name: 'not equals to',
|
|
27
19
|
input: true,
|
|
28
20
|
},
|
|
21
|
+
CONTAINS: {
|
|
22
|
+
name: 'contains',
|
|
23
|
+
input: true,
|
|
24
|
+
},
|
|
25
|
+
NCONTAINS: {
|
|
26
|
+
name: 'does not contain',
|
|
27
|
+
input: true,
|
|
28
|
+
},
|
|
29
29
|
LT: {
|
|
30
30
|
name: 'less than',
|
|
31
31
|
input: true,
|
|
@@ -158,10 +158,11 @@ exports.MessageVariableNameMap = {
|
|
|
158
158
|
text: 'Message Type',
|
|
159
159
|
type: 'dropdown',
|
|
160
160
|
value: [
|
|
161
|
-
{ id: 'text', value: '
|
|
161
|
+
{ id: 'text', value: 'chat', label: 'Text' },
|
|
162
162
|
{ id: 'image', value: 'image', label: 'Image' },
|
|
163
163
|
{ id: 'video', value: 'video', label: 'Video' },
|
|
164
164
|
{ id: 'audio', value: 'audio', label: 'Audio' },
|
|
165
|
+
{ id: 'audio', value: 'ptt', label: 'PTT (Audio voice message)' },
|
|
165
166
|
{ id: 'document', value: 'document', label: 'Document' },
|
|
166
167
|
],
|
|
167
168
|
filters: ['EQ', 'NEQ'],
|
|
@@ -174,18 +175,6 @@ exports.MessageVariableNameMap = {
|
|
|
174
175
|
hidden: true,
|
|
175
176
|
variable_type: 'string',
|
|
176
177
|
},
|
|
177
|
-
'message.ack': {
|
|
178
|
-
text: 'Message acknowledment status',
|
|
179
|
-
type: 'dropdown',
|
|
180
|
-
value: [
|
|
181
|
-
{ id: '0', value: 0, label: '0' },
|
|
182
|
-
{ id: '1', value: 1, label: '1' },
|
|
183
|
-
{ id: '2', value: 2, label: '2' },
|
|
184
|
-
{ id: '3', value: 3, label: '3' },
|
|
185
|
-
],
|
|
186
|
-
filters: ['EQ'],
|
|
187
|
-
variable_type: 'number',
|
|
188
|
-
},
|
|
189
178
|
};
|
|
190
179
|
exports.SenderVariableNameMap = {
|
|
191
180
|
'sender.is_business': {
|
|
@@ -224,7 +213,7 @@ exports.SenderVariableNameMap = {
|
|
|
224
213
|
text: 'Sender Labels',
|
|
225
214
|
type: 'dropdown',
|
|
226
215
|
value: 'org.labels',
|
|
227
|
-
filters: ['
|
|
216
|
+
filters: ['CONTAINS', 'NCONTAINS'],
|
|
228
217
|
variable_type: 'string',
|
|
229
218
|
},
|
|
230
219
|
'sender.org_id': {
|
|
@@ -241,12 +230,12 @@ exports.SenderVariableNameMap = {
|
|
|
241
230
|
value: [
|
|
242
231
|
{
|
|
243
232
|
id: 'true',
|
|
244
|
-
value: true,
|
|
233
|
+
value: 'true',
|
|
245
234
|
label: 'True',
|
|
246
235
|
},
|
|
247
236
|
{
|
|
248
237
|
id: 'false',
|
|
249
|
-
value: false,
|
|
238
|
+
value: 'false',
|
|
250
239
|
label: 'False',
|
|
251
240
|
},
|
|
252
241
|
],
|
|
@@ -259,12 +248,12 @@ exports.SenderVariableNameMap = {
|
|
|
259
248
|
value: [
|
|
260
249
|
{
|
|
261
250
|
id: 'true',
|
|
262
|
-
value: true,
|
|
251
|
+
value: 'true',
|
|
263
252
|
label: 'True',
|
|
264
253
|
},
|
|
265
254
|
{
|
|
266
255
|
id: 'false',
|
|
267
|
-
value: false,
|
|
256
|
+
value: 'false',
|
|
268
257
|
label: 'False',
|
|
269
258
|
},
|
|
270
259
|
],
|
|
@@ -345,12 +334,12 @@ exports.ChatVariableNameMap = {
|
|
|
345
334
|
value: [
|
|
346
335
|
{
|
|
347
336
|
id: 'true',
|
|
348
|
-
value: true,
|
|
337
|
+
value: 'true',
|
|
349
338
|
label: 'True',
|
|
350
339
|
},
|
|
351
340
|
{
|
|
352
341
|
id: 'false',
|
|
353
|
-
value: false,
|
|
342
|
+
value: 'false',
|
|
354
343
|
label: 'False',
|
|
355
344
|
},
|
|
356
345
|
],
|
|
@@ -363,30 +352,12 @@ exports.ChatVariableNameMap = {
|
|
|
363
352
|
value: [
|
|
364
353
|
{
|
|
365
354
|
id: 'true',
|
|
366
|
-
value: true,
|
|
355
|
+
value: 'true',
|
|
367
356
|
label: 'True',
|
|
368
357
|
},
|
|
369
358
|
{
|
|
370
359
|
id: 'false',
|
|
371
|
-
value: false,
|
|
372
|
-
label: 'False',
|
|
373
|
-
},
|
|
374
|
-
],
|
|
375
|
-
variable_type: 'boolean',
|
|
376
|
-
},
|
|
377
|
-
'chat.is_exited': {
|
|
378
|
-
text: 'Chat is exited',
|
|
379
|
-
type: 'boolean',
|
|
380
|
-
filters: ['EQ', 'NEQ'],
|
|
381
|
-
value: [
|
|
382
|
-
{
|
|
383
|
-
id: 'true',
|
|
384
|
-
value: true,
|
|
385
|
-
label: 'True',
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
id: 'false',
|
|
389
|
-
value: false,
|
|
360
|
+
value: 'false',
|
|
390
361
|
label: 'False',
|
|
391
362
|
},
|
|
392
363
|
],
|
|
@@ -399,12 +370,12 @@ exports.ChatVariableNameMap = {
|
|
|
399
370
|
value: [
|
|
400
371
|
{
|
|
401
372
|
id: 'true',
|
|
402
|
-
value: true,
|
|
373
|
+
value: 'true',
|
|
403
374
|
label: 'True',
|
|
404
375
|
},
|
|
405
376
|
{
|
|
406
377
|
id: 'false',
|
|
407
|
-
value: false,
|
|
378
|
+
value: 'false',
|
|
408
379
|
label: 'False',
|
|
409
380
|
},
|
|
410
381
|
],
|
|
@@ -417,12 +388,12 @@ exports.ChatVariableNameMap = {
|
|
|
417
388
|
value: [
|
|
418
389
|
{
|
|
419
390
|
id: 'true',
|
|
420
|
-
value: true,
|
|
391
|
+
value: 'true',
|
|
421
392
|
label: 'True',
|
|
422
393
|
},
|
|
423
394
|
{
|
|
424
395
|
id: 'false',
|
|
425
|
-
value: false,
|
|
396
|
+
value: 'false',
|
|
426
397
|
label: 'False',
|
|
427
398
|
},
|
|
428
399
|
],
|
|
@@ -473,14 +444,14 @@ exports.TicketVariableNameMap = {
|
|
|
473
444
|
text: 'Ticket Priority',
|
|
474
445
|
type: 'dropdown',
|
|
475
446
|
value: [
|
|
476
|
-
{ id: '0', value: 0, label: 'No Prioriy' },
|
|
477
|
-
{ id: '1', value: 1, label: 'Low' },
|
|
478
|
-
{ id: '2', value: 2, label: 'Medium' },
|
|
479
|
-
{ id: '3', value: 3, label: 'High' },
|
|
480
|
-
{ id: '4', value: 4, label: 'Urgent' },
|
|
447
|
+
{ id: '0', value: '0', label: 'No Prioriy' },
|
|
448
|
+
{ id: '1', value: '1', label: 'Low' },
|
|
449
|
+
{ id: '2', value: '2', label: 'Medium' },
|
|
450
|
+
{ id: '3', value: '3', label: 'High' },
|
|
451
|
+
{ id: '4', value: '4', label: 'Urgent' },
|
|
481
452
|
],
|
|
482
453
|
filters: ['EQ', 'NEQ'],
|
|
483
|
-
variable_type: '
|
|
454
|
+
variable_type: 'string',
|
|
484
455
|
},
|
|
485
456
|
'ticket.assignee': {
|
|
486
457
|
text: 'Ticket Assignee',
|
|
@@ -493,7 +464,7 @@ exports.TicketVariableNameMap = {
|
|
|
493
464
|
text: 'Ticket Labels',
|
|
494
465
|
type: 'dropdown',
|
|
495
466
|
value: 'org.labels',
|
|
496
|
-
filters: ['
|
|
467
|
+
filters: ['CONTAINS', 'NCONTAINS'],
|
|
497
468
|
variable_type: 'string',
|
|
498
469
|
},
|
|
499
470
|
'ticket.is_deleted': {
|
|
@@ -502,12 +473,12 @@ exports.TicketVariableNameMap = {
|
|
|
502
473
|
value: [
|
|
503
474
|
{
|
|
504
475
|
id: 'true',
|
|
505
|
-
value: true,
|
|
476
|
+
value: 'true',
|
|
506
477
|
label: 'True',
|
|
507
478
|
},
|
|
508
479
|
{
|
|
509
480
|
id: 'false',
|
|
510
|
-
value: false,
|
|
481
|
+
value: 'false',
|
|
511
482
|
label: 'False',
|
|
512
483
|
},
|
|
513
484
|
],
|
|
@@ -615,6 +586,7 @@ var FilterConditionMap;
|
|
|
615
586
|
FilterConditionMap["NKNOWN"] = "is not known";
|
|
616
587
|
FilterConditionMap["IS"] = "=";
|
|
617
588
|
FilterConditionMap["NIS"] = "<>";
|
|
589
|
+
FilterConditionMap["ON"] = "on";
|
|
618
590
|
})(FilterConditionMap || (exports.FilterConditionMap = FilterConditionMap = {}));
|
|
619
591
|
const isSendMessageAction = (action) => {
|
|
620
592
|
return action.type === 'send_message';
|
|
@@ -623,7 +595,7 @@ exports.isSendMessageAction = isSendMessageAction;
|
|
|
623
595
|
exports.RuleNameMap = {
|
|
624
596
|
'message.created': {
|
|
625
597
|
title: 'New Message Received',
|
|
626
|
-
description: 'When a new message is
|
|
598
|
+
description: 'When a new message is received from an external contact',
|
|
627
599
|
base_conditions: {
|
|
628
600
|
org_phone: true,
|
|
629
601
|
},
|
|
@@ -689,6 +661,7 @@ exports.ActionNameMap = {
|
|
|
689
661
|
label: 'Message',
|
|
690
662
|
placeholder: 'Enter message',
|
|
691
663
|
value: null,
|
|
664
|
+
required: true,
|
|
692
665
|
},
|
|
693
666
|
media: {
|
|
694
667
|
id: 'media',
|
|
@@ -696,6 +669,7 @@ exports.ActionNameMap = {
|
|
|
696
669
|
label: 'Media',
|
|
697
670
|
placeholder: 'Upload media',
|
|
698
671
|
value: null,
|
|
672
|
+
required: false,
|
|
699
673
|
},
|
|
700
674
|
maintain_flag_status: {
|
|
701
675
|
id: 'maintain_flag_status',
|
|
@@ -706,6 +680,7 @@ exports.ActionNameMap = {
|
|
|
706
680
|
{ id: 'true', value: 'true', label: 'True' },
|
|
707
681
|
{ id: 'false', value: 'false', label: 'False' },
|
|
708
682
|
],
|
|
683
|
+
required: true,
|
|
709
684
|
},
|
|
710
685
|
},
|
|
711
686
|
validTriggers: [
|
|
@@ -729,6 +704,7 @@ exports.ActionNameMap = {
|
|
|
729
704
|
label: 'Message',
|
|
730
705
|
placeholder: 'Enter message',
|
|
731
706
|
value: null,
|
|
707
|
+
required: true,
|
|
732
708
|
},
|
|
733
709
|
media: {
|
|
734
710
|
id: 'media',
|
|
@@ -736,6 +712,7 @@ exports.ActionNameMap = {
|
|
|
736
712
|
label: 'Media',
|
|
737
713
|
placeholder: 'Upload media',
|
|
738
714
|
value: null,
|
|
715
|
+
required: false,
|
|
739
716
|
},
|
|
740
717
|
maintain_flag_status: {
|
|
741
718
|
id: 'maintain_flag_status',
|
|
@@ -746,6 +723,7 @@ exports.ActionNameMap = {
|
|
|
746
723
|
{ id: 'true', value: 'true', label: 'True' },
|
|
747
724
|
{ id: 'false', value: 'false', label: 'False' },
|
|
748
725
|
],
|
|
726
|
+
required: true,
|
|
749
727
|
},
|
|
750
728
|
},
|
|
751
729
|
validTriggers: [
|
|
@@ -765,6 +743,7 @@ exports.ActionNameMap = {
|
|
|
765
743
|
label: 'URL',
|
|
766
744
|
placeholder: 'Enter URL',
|
|
767
745
|
value: null,
|
|
746
|
+
required: true,
|
|
768
747
|
},
|
|
769
748
|
},
|
|
770
749
|
validTriggers: [
|
|
@@ -788,6 +767,7 @@ exports.ActionNameMap = {
|
|
|
788
767
|
value: 'org.members',
|
|
789
768
|
label: 'Assignee',
|
|
790
769
|
placeholder: 'Select assignee',
|
|
770
|
+
required: false,
|
|
791
771
|
},
|
|
792
772
|
priority: {
|
|
793
773
|
id: 'priority',
|
|
@@ -801,6 +781,7 @@ exports.ActionNameMap = {
|
|
|
801
781
|
],
|
|
802
782
|
label: 'Priority',
|
|
803
783
|
placeholder: 'Select priority',
|
|
784
|
+
required: false,
|
|
804
785
|
},
|
|
805
786
|
label: {
|
|
806
787
|
id: 'label',
|
|
@@ -808,6 +789,7 @@ exports.ActionNameMap = {
|
|
|
808
789
|
value: 'ticket.labels',
|
|
809
790
|
label: 'Label',
|
|
810
791
|
placeholder: 'Select label',
|
|
792
|
+
required: false,
|
|
811
793
|
},
|
|
812
794
|
},
|
|
813
795
|
validTriggers: [
|
|
@@ -830,6 +812,7 @@ exports.ActionNameMap = {
|
|
|
830
812
|
],
|
|
831
813
|
label: 'Flag status',
|
|
832
814
|
placeholder: 'Select flag',
|
|
815
|
+
required: true,
|
|
833
816
|
},
|
|
834
817
|
},
|
|
835
818
|
validTriggers: ['message.created', 'message.updated', 'reaction.added'],
|
|
@@ -848,14 +831,16 @@ exports.ActionNameMap = {
|
|
|
848
831
|
label: 'Enable Round Robin',
|
|
849
832
|
placeholder: 'Select...',
|
|
850
833
|
info: 'If enabled, the ticket will be assigned to the next available agent in the list',
|
|
834
|
+
required: false,
|
|
851
835
|
},
|
|
852
836
|
assignee: {
|
|
853
|
-
id: '
|
|
837
|
+
id: 'assignee',
|
|
854
838
|
type: 'dynamic',
|
|
855
839
|
value: 'org.members',
|
|
856
840
|
label: 'Assignee',
|
|
857
841
|
placeholder: 'Select assignee',
|
|
858
842
|
info: "If round robin is enabled, the ticket will be assigned to the next available agent in the list else it'll be assigned to the selected agent",
|
|
843
|
+
required: true,
|
|
859
844
|
},
|
|
860
845
|
},
|
|
861
846
|
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
@@ -870,6 +855,7 @@ exports.ActionNameMap = {
|
|
|
870
855
|
label: 'Closing Note',
|
|
871
856
|
placeholder: 'Enter closing note',
|
|
872
857
|
value: null,
|
|
858
|
+
required: false,
|
|
873
859
|
},
|
|
874
860
|
},
|
|
875
861
|
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
@@ -884,6 +870,7 @@ exports.ActionNameMap = {
|
|
|
884
870
|
value: 'chat.labels',
|
|
885
871
|
label: 'Label',
|
|
886
872
|
placeholder: 'Select label',
|
|
873
|
+
required: true,
|
|
887
874
|
},
|
|
888
875
|
},
|
|
889
876
|
validTriggers: [
|
|
@@ -906,6 +893,7 @@ exports.ActionNameMap = {
|
|
|
906
893
|
value: 'ticket.labels',
|
|
907
894
|
label: 'Label',
|
|
908
895
|
placeholder: 'Select label',
|
|
896
|
+
required: true,
|
|
909
897
|
},
|
|
910
898
|
},
|
|
911
899
|
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
@@ -929,6 +917,7 @@ exports.ActionNameMap = {
|
|
|
929
917
|
value: 'org.custom_properties',
|
|
930
918
|
label: 'Property',
|
|
931
919
|
placeholder: 'Select property',
|
|
920
|
+
required: true,
|
|
932
921
|
},
|
|
933
922
|
value: {
|
|
934
923
|
id: 'property_id',
|
|
@@ -936,6 +925,7 @@ exports.ActionNameMap = {
|
|
|
936
925
|
label: 'Value',
|
|
937
926
|
placeholder: 'Enter value',
|
|
938
927
|
value: 'custom_property_values',
|
|
928
|
+
required: true,
|
|
939
929
|
},
|
|
940
930
|
},
|
|
941
931
|
},
|
|
@@ -953,6 +943,7 @@ exports.ActionNameMap = {
|
|
|
953
943
|
label: 'Enable Round Robin',
|
|
954
944
|
placeholder: 'Select...',
|
|
955
945
|
info: 'If enabled, the chat will be assigned to the next available agent in the list',
|
|
946
|
+
required: false,
|
|
956
947
|
},
|
|
957
948
|
assignee: {
|
|
958
949
|
id: 'assignee',
|
|
@@ -960,6 +951,7 @@ exports.ActionNameMap = {
|
|
|
960
951
|
value: 'org.members',
|
|
961
952
|
label: 'Assignee',
|
|
962
953
|
placeholder: 'Select assignee',
|
|
954
|
+
required: true,
|
|
963
955
|
},
|
|
964
956
|
},
|
|
965
957
|
validTriggers: [
|
|
@@ -982,19 +974,12 @@ exports.ActionNameMap = {
|
|
|
982
974
|
value: 'org.chats',
|
|
983
975
|
label: 'Chat',
|
|
984
976
|
placeholder: 'Select chat',
|
|
977
|
+
required: true,
|
|
985
978
|
},
|
|
986
|
-
// prefix: {
|
|
987
|
-
// id: 'prefix',
|
|
988
|
-
// type: 'editor',
|
|
989
|
-
// label: 'Prefix',
|
|
990
|
-
// placeholder: 'Enter prefix',
|
|
991
|
-
// value: null,
|
|
992
|
-
// },
|
|
993
979
|
},
|
|
994
980
|
validTriggers: [
|
|
995
981
|
'message.created',
|
|
996
982
|
'message.updated',
|
|
997
|
-
'chat.created',
|
|
998
983
|
'ticket.updated',
|
|
999
984
|
'ticket.created',
|
|
1000
985
|
'reaction.added',
|
|
@@ -1011,6 +996,7 @@ exports.ActionNameMap = {
|
|
|
1011
996
|
label: 'Email',
|
|
1012
997
|
placeholder: 'Enter email',
|
|
1013
998
|
value: null,
|
|
999
|
+
required: true,
|
|
1014
1000
|
},
|
|
1015
1001
|
subject: {
|
|
1016
1002
|
id: 'subject',
|
|
@@ -1018,6 +1004,7 @@ exports.ActionNameMap = {
|
|
|
1018
1004
|
label: 'Subject',
|
|
1019
1005
|
placeholder: 'Enter subject',
|
|
1020
1006
|
value: null,
|
|
1007
|
+
required: true,
|
|
1021
1008
|
},
|
|
1022
1009
|
body: {
|
|
1023
1010
|
id: 'body',
|
|
@@ -1025,6 +1012,7 @@ exports.ActionNameMap = {
|
|
|
1025
1012
|
label: 'Body',
|
|
1026
1013
|
placeholder: 'Enter body',
|
|
1027
1014
|
value: null,
|
|
1015
|
+
required: true,
|
|
1028
1016
|
},
|
|
1029
1017
|
},
|
|
1030
1018
|
validTriggers: [
|
|
@@ -1078,3 +1066,18 @@ exports.editorVariables = [
|
|
|
1078
1066
|
validTriggers: ['ticket.updated', 'ticket.created'],
|
|
1079
1067
|
},
|
|
1080
1068
|
];
|
|
1069
|
+
exports.variablesExclusionList = {
|
|
1070
|
+
'ticket.created': ['ticket.is_deleted'],
|
|
1071
|
+
'chat.created': ['chat.chat_id'],
|
|
1072
|
+
'message.created': [
|
|
1073
|
+
'message.author',
|
|
1074
|
+
'message.performed_by',
|
|
1075
|
+
'message.flag_status',
|
|
1076
|
+
'sender.is_internal',
|
|
1077
|
+
],
|
|
1078
|
+
'ticket.updated': [],
|
|
1079
|
+
'reaction.added': [],
|
|
1080
|
+
'message.updated': [],
|
|
1081
|
+
'message.flagged': [],
|
|
1082
|
+
'chat.label.updated': [],
|
|
1083
|
+
};
|
package/dist/supabase.types.d.ts
CHANGED
|
@@ -2272,6 +2272,7 @@ export type Database = {
|
|
|
2272
2272
|
owner_id: string | null;
|
|
2273
2273
|
path_tokens: string[] | null;
|
|
2274
2274
|
updated_at: string | null;
|
|
2275
|
+
user_metadata: Json | null;
|
|
2275
2276
|
version: string | null;
|
|
2276
2277
|
};
|
|
2277
2278
|
Insert: {
|
|
@@ -2285,6 +2286,7 @@ export type Database = {
|
|
|
2285
2286
|
owner_id?: string | null;
|
|
2286
2287
|
path_tokens?: string[] | null;
|
|
2287
2288
|
updated_at?: string | null;
|
|
2289
|
+
user_metadata?: Json | null;
|
|
2288
2290
|
version?: string | null;
|
|
2289
2291
|
};
|
|
2290
2292
|
Update: {
|
|
@@ -2298,6 +2300,7 @@ export type Database = {
|
|
|
2298
2300
|
owner_id?: string | null;
|
|
2299
2301
|
path_tokens?: string[] | null;
|
|
2300
2302
|
updated_at?: string | null;
|
|
2303
|
+
user_metadata?: Json | null;
|
|
2301
2304
|
version?: string | null;
|
|
2302
2305
|
};
|
|
2303
2306
|
Relationships: [
|
|
@@ -2319,6 +2322,7 @@ export type Database = {
|
|
|
2319
2322
|
key: string;
|
|
2320
2323
|
owner_id: string | null;
|
|
2321
2324
|
upload_signature: string;
|
|
2325
|
+
user_metadata: Json | null;
|
|
2322
2326
|
version: string;
|
|
2323
2327
|
};
|
|
2324
2328
|
Insert: {
|
|
@@ -2329,6 +2333,7 @@ export type Database = {
|
|
|
2329
2333
|
key: string;
|
|
2330
2334
|
owner_id?: string | null;
|
|
2331
2335
|
upload_signature: string;
|
|
2336
|
+
user_metadata?: Json | null;
|
|
2332
2337
|
version: string;
|
|
2333
2338
|
};
|
|
2334
2339
|
Update: {
|
|
@@ -2339,6 +2344,7 @@ export type Database = {
|
|
|
2339
2344
|
key?: string;
|
|
2340
2345
|
owner_id?: string | null;
|
|
2341
2346
|
upload_signature?: string;
|
|
2347
|
+
user_metadata?: Json | null;
|
|
2342
2348
|
version?: string;
|
|
2343
2349
|
};
|
|
2344
2350
|
Relationships: [
|
|
@@ -2475,6 +2481,10 @@ export type Database = {
|
|
|
2475
2481
|
updated_at: string;
|
|
2476
2482
|
}[];
|
|
2477
2483
|
};
|
|
2484
|
+
operation: {
|
|
2485
|
+
Args: Record<PropertyKey, never>;
|
|
2486
|
+
Returns: string;
|
|
2487
|
+
};
|
|
2478
2488
|
search: {
|
|
2479
2489
|
Args: {
|
|
2480
2490
|
prefix: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export type OrgPreferences = {
|
|
|
43
43
|
sync_phone_contacts?: boolean;
|
|
44
44
|
mask_phone_numbers?: boolean;
|
|
45
45
|
show_sender_names?: boolean;
|
|
46
|
+
closed_chats?: Record<string, number>;
|
|
46
47
|
};
|
|
47
48
|
type OrgPreferenceKey = keyof OrgPreferences;
|
|
48
49
|
export type OrgPreferencesValue = {
|
|
@@ -136,6 +137,7 @@ export type ChatType = Merge<Tables<'view_chats'>, {
|
|
|
136
137
|
is_archived?: boolean;
|
|
137
138
|
is_pinned?: boolean;
|
|
138
139
|
closed_at?: number;
|
|
140
|
+
common_chats?: string[];
|
|
139
141
|
}>;
|
|
140
142
|
export type MediaType = {
|
|
141
143
|
path: string;
|
|
@@ -163,7 +165,7 @@ export type MessageType = Merge<OverrideProperties<Tables<'tbl_chat_messages'>,
|
|
|
163
165
|
}>, {
|
|
164
166
|
reactions?: ReactionType[];
|
|
165
167
|
message_payload?: SingleMessagePayload;
|
|
166
|
-
show_unread?:
|
|
168
|
+
show_unread?: number;
|
|
167
169
|
highlight?: number;
|
|
168
170
|
}>;
|
|
169
171
|
export type MessageFlagType = {
|
|
@@ -244,6 +246,7 @@ export type BroadcastMessagePayload = SendMessageContent & {
|
|
|
244
246
|
export type SingleMessagePayload = SendMessageContent & {
|
|
245
247
|
chat_id: string;
|
|
246
248
|
job_id?: string;
|
|
249
|
+
priority?: number;
|
|
247
250
|
};
|
|
248
251
|
export type MessageAttachmentFileTypes = 'image' | 'audio' | 'document' | 'video';
|
|
249
252
|
export type AttachmentFileType = {
|
|
@@ -444,41 +447,4 @@ export type OrgCreditsType = {
|
|
|
444
447
|
total_credits_used: number;
|
|
445
448
|
next_renewal_date: string;
|
|
446
449
|
};
|
|
447
|
-
export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_id' | 'chat_name' | 'chat_type' | 'created_at' | 'group_description' | 'info_admins_only' | 'is_exited' | 'is_muted' | 'org_id' | 'org_phone' | 'chat_org_phones' | 'messages_admins_only' | 'custom_properties'>, {
|
|
448
|
-
has_flagged_messages: boolean;
|
|
449
|
-
labels: string[];
|
|
450
|
-
members: string[];
|
|
451
|
-
custom_properties: {
|
|
452
|
-
[key: string]: string;
|
|
453
|
-
} | null;
|
|
454
|
-
}>;
|
|
455
|
-
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'>, {
|
|
456
|
-
is_internal: boolean;
|
|
457
|
-
labels: string[] | null;
|
|
458
|
-
}>;
|
|
459
|
-
export type MessageRuleInfoType = {
|
|
460
|
-
chat: ChatRuleInfoType;
|
|
461
|
-
sender: SenderRuleInfoType;
|
|
462
|
-
message: OverrideProperties<Omit<Tables<'tbl_chat_messages'>, 'vcards' | 'updated_at' | 'unique_id' | 'token' | 'to' | 'sent_message_id' | 'raw_data' | 'delivery_info' | 'poll_results' | 'poll_info' | 'order_id' | 'mentioned_ids' | 'media_key' | 'location' | 'links' | 'is_status' | 'is_starred' | 'is_gif' | 'is_forwarded' | 'is_ephemeral' | 'is_deleted' | 'fts' | 'quoted_message_id' | 'invite_v4' | 'id' | 'has_reaction' | 'has_media' | 'duration' | 'broadcast' | 'broadcast_id' | 'device_type' | 'forwarding_score' | 'from' | 'from_me' | 'message_ticket_id' | 'prev_body' | 'flag_response_time' | 'flag_metadata'>, {
|
|
463
|
-
media: MediaType | null;
|
|
464
|
-
}>;
|
|
465
|
-
};
|
|
466
|
-
export type ReactionRuleInfoType = {
|
|
467
|
-
chat: ChatRuleInfoType;
|
|
468
|
-
sender: SenderRuleInfoType;
|
|
469
|
-
message: MessageRuleInfoType['message'];
|
|
470
|
-
reaction: Pick<Tables<'tbl_chat_reactions'>, 'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'>;
|
|
471
|
-
};
|
|
472
|
-
export type TicketRuleInfoType = {
|
|
473
|
-
chat: ChatRuleInfoType;
|
|
474
|
-
sender: SenderRuleInfoType;
|
|
475
|
-
ticket: Merge<Pick<Tables<'tbl_chat_tickets'>, 'org_id' | 'status' | 'chat_id' | 'subject' | 'assignee' | 'due_date' | 'priority' | 'raised_by' | 'ticket_id' | 'created_at' | 'is_deleted'>, {
|
|
476
|
-
labels: string[] | null;
|
|
477
|
-
custom_properties: {
|
|
478
|
-
[key: string]: string;
|
|
479
|
-
} | null;
|
|
480
|
-
}>;
|
|
481
|
-
message: MessageRuleInfoType['message'];
|
|
482
|
-
};
|
|
483
|
-
export type FeatureFlagReturnType = Record<string, boolean>;
|
|
484
450
|
export {};
|
package/index.ts
CHANGED