@periskope/types 0.6.13-7.4 → 0.6.13-7.5
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 -3
- package/dist/rules.types.js +24 -0
- package/package.json +1 -1
- package/rules.types.ts +29 -1
package/dist/rules.types.d.ts
CHANGED
|
@@ -3,15 +3,15 @@ import { Tables } from './supabase.types';
|
|
|
3
3
|
export type AppendTypes<T extends object, O extends string> = {
|
|
4
4
|
[K in keyof T & string as `${K}${O}${keyof T[K] & string}`]: T[K][keyof T[K]];
|
|
5
5
|
};
|
|
6
|
-
export type TicketVariablesType = Merge<Pick<Tables<'tbl_chat_tickets'>, 'assigned_by' | 'assignee' | 'status' | 'subject' | 'is_deleted' | 'priority' | 'raised_by' | 'due_date'>, {
|
|
6
|
+
export type TicketVariablesType = Merge<Pick<Tables<'tbl_chat_tickets'>, 'assigned_by' | 'assignee' | 'status' | 'subject' | 'is_deleted' | 'priority' | 'raised_by' | 'due_date' | 'ticket_id'>, {
|
|
7
7
|
labels: string[];
|
|
8
8
|
}>;
|
|
9
|
-
export type MessageVariablesType = Pick<Tables<'tbl_chat_messages'>, 'body' | 'sender_phone' | 'timestamp' | 'flag_status' | 'has_quoted_msg' | 'media' | 'performed_by'>;
|
|
9
|
+
export type MessageVariablesType = Pick<Tables<'tbl_chat_messages'>, 'body' | 'sender_phone' | 'timestamp' | 'flag_status' | 'has_quoted_msg' | 'media' | 'performed_by' | 'message_id' | 'chat_id'>;
|
|
10
10
|
export type SenderVariablesType = Merge<Pick<Tables<'tbl_contacts'>, 'is_business' | 'is_enterprise' | 'is_internal' | 'contact_name' | 'contact_id'>, {
|
|
11
11
|
labels: string[];
|
|
12
12
|
}>;
|
|
13
13
|
export type ReactionVariablesType = Pick<Tables<'tbl_chat_reactions'>, 'reaction' | 'sender_id'>;
|
|
14
|
-
export type ChatVariablesType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_name' | 'org_phone' | 'chat_type'>, {
|
|
14
|
+
export type ChatVariablesType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_name' | 'org_phone' | 'chat_type' | 'chat_id'>, {
|
|
15
15
|
members: string[];
|
|
16
16
|
labels: string[];
|
|
17
17
|
}>;
|
|
@@ -82,6 +82,7 @@ export type VariableNameValueType = {
|
|
|
82
82
|
label: string;
|
|
83
83
|
}[] | null;
|
|
84
84
|
filters: Filter['condition'][];
|
|
85
|
+
hidden?: boolean;
|
|
85
86
|
};
|
|
86
87
|
export declare const MessageVariableNameMap: Record<keyof AppendTypes<{
|
|
87
88
|
message: MessageVariablesType;
|
package/dist/rules.types.js
CHANGED
|
@@ -100,6 +100,18 @@ exports.MessageVariableNameMap = {
|
|
|
100
100
|
value: 'org.members',
|
|
101
101
|
filters: ['EQ', 'NEQ'],
|
|
102
102
|
},
|
|
103
|
+
"message.chat_id": {
|
|
104
|
+
text: 'Chat ID',
|
|
105
|
+
type: 'string',
|
|
106
|
+
filters: ['EQ', 'NEQ'],
|
|
107
|
+
hidden: true
|
|
108
|
+
},
|
|
109
|
+
"message.message_id": {
|
|
110
|
+
text: 'Message ID',
|
|
111
|
+
type: 'string',
|
|
112
|
+
filters: ['EQ', 'NEQ'],
|
|
113
|
+
hidden: true
|
|
114
|
+
}
|
|
103
115
|
};
|
|
104
116
|
exports.SenderVariableNameMap = {
|
|
105
117
|
'sender.is_business': {
|
|
@@ -173,6 +185,12 @@ exports.ChatVariableNameMap = {
|
|
|
173
185
|
value: 'org.labels',
|
|
174
186
|
filters: ['CONTAINS', 'NCONTAINS'],
|
|
175
187
|
},
|
|
188
|
+
"chat.chat_id": {
|
|
189
|
+
text: 'Chat ID',
|
|
190
|
+
type: 'string',
|
|
191
|
+
filters: ['EQ', 'NEQ'],
|
|
192
|
+
hidden: true
|
|
193
|
+
}
|
|
176
194
|
};
|
|
177
195
|
exports.TicketVariableNameMap = {
|
|
178
196
|
'ticket.subject': {
|
|
@@ -236,6 +254,12 @@ exports.TicketVariableNameMap = {
|
|
|
236
254
|
value: 'org.members',
|
|
237
255
|
filters: ['EQ', 'NEQ'],
|
|
238
256
|
},
|
|
257
|
+
"ticket.ticket_id": {
|
|
258
|
+
text: 'Ticket ID',
|
|
259
|
+
type: 'string',
|
|
260
|
+
filters: ['EQ', 'NEQ'],
|
|
261
|
+
hidden: true
|
|
262
|
+
}
|
|
239
263
|
};
|
|
240
264
|
exports.ReactionVariableNameMap = {
|
|
241
265
|
'reaction.reaction': {
|
package/package.json
CHANGED
package/rules.types.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type TicketVariablesType = Merge<
|
|
|
16
16
|
| 'priority'
|
|
17
17
|
| 'raised_by'
|
|
18
18
|
| 'due_date'
|
|
19
|
+
| 'ticket_id'
|
|
19
20
|
>,
|
|
20
21
|
{
|
|
21
22
|
labels: string[];
|
|
@@ -31,6 +32,8 @@ export type MessageVariablesType = Pick<
|
|
|
31
32
|
| 'has_quoted_msg'
|
|
32
33
|
| 'media'
|
|
33
34
|
| 'performed_by'
|
|
35
|
+
| 'message_id'
|
|
36
|
+
| 'chat_id'
|
|
34
37
|
>;
|
|
35
38
|
|
|
36
39
|
export type SenderVariablesType = Merge<
|
|
@@ -55,7 +58,7 @@ export type ReactionVariablesType = Pick<
|
|
|
55
58
|
export type ChatVariablesType = Merge<
|
|
56
59
|
Pick<
|
|
57
60
|
Tables<'view_chats'>,
|
|
58
|
-
'assigned_to' | 'chat_name' | 'org_phone' | 'chat_type'
|
|
61
|
+
'assigned_to' | 'chat_name' | 'org_phone' | 'chat_type' | 'chat_id'
|
|
59
62
|
>,
|
|
60
63
|
{
|
|
61
64
|
members: string[];
|
|
@@ -246,6 +249,7 @@ export type VariableNameValueType = {
|
|
|
246
249
|
}[]
|
|
247
250
|
| null;
|
|
248
251
|
filters: Filter['condition'][];
|
|
252
|
+
hidden?: boolean;
|
|
249
253
|
};
|
|
250
254
|
|
|
251
255
|
export const MessageVariableNameMap: Record<
|
|
@@ -288,6 +292,18 @@ export const MessageVariableNameMap: Record<
|
|
|
288
292
|
value: 'org.members',
|
|
289
293
|
filters: ['EQ', 'NEQ'],
|
|
290
294
|
},
|
|
295
|
+
"message.chat_id":{
|
|
296
|
+
text: 'Chat ID',
|
|
297
|
+
type: 'string',
|
|
298
|
+
filters: ['EQ', 'NEQ'],
|
|
299
|
+
hidden: true
|
|
300
|
+
},
|
|
301
|
+
"message.message_id":{
|
|
302
|
+
text: 'Message ID',
|
|
303
|
+
type: 'string',
|
|
304
|
+
filters: ['EQ', 'NEQ'],
|
|
305
|
+
hidden: true
|
|
306
|
+
}
|
|
291
307
|
};
|
|
292
308
|
|
|
293
309
|
export const SenderVariableNameMap: Record<
|
|
@@ -369,6 +385,12 @@ export const ChatVariableNameMap: Record<
|
|
|
369
385
|
value: 'org.labels',
|
|
370
386
|
filters: ['CONTAINS', 'NCONTAINS'],
|
|
371
387
|
},
|
|
388
|
+
"chat.chat_id": {
|
|
389
|
+
text: 'Chat ID',
|
|
390
|
+
type: 'string',
|
|
391
|
+
filters: ['EQ', 'NEQ'],
|
|
392
|
+
hidden: true
|
|
393
|
+
}
|
|
372
394
|
};
|
|
373
395
|
|
|
374
396
|
export const TicketVariableNameMap: Record<
|
|
@@ -436,6 +458,12 @@ export const TicketVariableNameMap: Record<
|
|
|
436
458
|
value: 'org.members',
|
|
437
459
|
filters: ['EQ', 'NEQ'],
|
|
438
460
|
},
|
|
461
|
+
"ticket.ticket_id": {
|
|
462
|
+
text: 'Ticket ID',
|
|
463
|
+
type: 'string',
|
|
464
|
+
filters: ['EQ', 'NEQ'],
|
|
465
|
+
hidden: true
|
|
466
|
+
}
|
|
439
467
|
};
|
|
440
468
|
|
|
441
469
|
export const ReactionVariableNameMap: Record<
|