@periskope/types 0.6.149 → 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 +5 -2
- package/dist/rules.types.js +25 -4
- package/dist/supabase.types.d.ts +3 -25
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/rules.types.ts +38 -6
- package/supabase.types.ts +2649 -2669
- package/types.ts +1 -0
package/dist/rules.types.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type ChatRulesInfoType = Merge<AppendTypes<{
|
|
|
52
52
|
export type RuleInfoType = MessageRulesInfoType | ChatRulesInfoType | TicketRulesInfoType | ReactionRulesInfoType;
|
|
53
53
|
export interface Filter {
|
|
54
54
|
id: string;
|
|
55
|
-
condition: 'CONTAINS' | 'NCONTAINS' | 'EQ' | 'NEQ' | 'LT' | 'LTE' | 'GT' | 'GTE' | 'KNOWN' | 'NKNOWN' | 'IS' | 'NIS';
|
|
55
|
+
condition: 'CONTAINS' | 'NCONTAINS' | 'EQ' | 'NEQ' | 'LT' | 'LTE' | 'GT' | 'GTE' | 'KNOWN' | 'NKNOWN' | 'IS' | 'NIS' | 'ON';
|
|
56
56
|
variable: string;
|
|
57
57
|
value: string | string[];
|
|
58
58
|
variable_type?: 'string' | 'number' | 'boolean' | 'day-time' | 'date' | 'day';
|
|
@@ -71,9 +71,12 @@ export type VariableNameValueType = {
|
|
|
71
71
|
value: string | number | boolean;
|
|
72
72
|
label: string;
|
|
73
73
|
}[] | null;
|
|
74
|
-
filters: Filter['condition']
|
|
74
|
+
filters: Partial<Record<Filter['condition'], {
|
|
75
|
+
info?: string;
|
|
76
|
+
}>> | Filter['condition'][];
|
|
75
77
|
hidden?: boolean;
|
|
76
78
|
placeholder?: string;
|
|
79
|
+
info?: string;
|
|
77
80
|
};
|
|
78
81
|
export declare const MessageVariableNameMap: Record<keyof AppendTypes<{
|
|
79
82
|
message: MessageVariablesType;
|
package/dist/rules.types.js
CHANGED
|
@@ -58,6 +58,10 @@ exports.FilterNameMap = {
|
|
|
58
58
|
name: 'is not',
|
|
59
59
|
input: true,
|
|
60
60
|
},
|
|
61
|
+
ON: {
|
|
62
|
+
name: 'on',
|
|
63
|
+
input: true,
|
|
64
|
+
},
|
|
61
65
|
};
|
|
62
66
|
exports.MessageVariableNameMap = {
|
|
63
67
|
'message.body': {
|
|
@@ -75,10 +79,27 @@ exports.MessageVariableNameMap = {
|
|
|
75
79
|
variable_type: 'string',
|
|
76
80
|
},
|
|
77
81
|
'message.timestamp': {
|
|
78
|
-
text: 'Message
|
|
82
|
+
text: 'Message receive timestamp',
|
|
79
83
|
type: 'day-time',
|
|
80
|
-
filters:
|
|
84
|
+
filters: {
|
|
85
|
+
LT: {
|
|
86
|
+
info: 'When message is received before mentioned time (UTC)',
|
|
87
|
+
},
|
|
88
|
+
LTE: {
|
|
89
|
+
info: 'When message is received before mentioned time (UTC)',
|
|
90
|
+
},
|
|
91
|
+
GT: {
|
|
92
|
+
info: 'When message is received after mentioned time (UTC)',
|
|
93
|
+
},
|
|
94
|
+
GTE: {
|
|
95
|
+
info: 'When message is received on or after mentioned time (UTC)',
|
|
96
|
+
},
|
|
97
|
+
ON: {
|
|
98
|
+
info: 'When message is received on mentioned days',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
81
101
|
variable_type: 'day-time',
|
|
102
|
+
info: 'The timestamp when the message was received',
|
|
82
103
|
},
|
|
83
104
|
'message.flag_status': {
|
|
84
105
|
text: 'Message Flag Status',
|
|
@@ -425,7 +446,7 @@ exports.ChatVariableNameMap = {
|
|
|
425
446
|
'chat.created_at': {
|
|
426
447
|
text: 'Chat Created At',
|
|
427
448
|
type: 'day-time',
|
|
428
|
-
filters: ['LT', 'LTE', 'GT', 'GTE', '
|
|
449
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
429
450
|
variable_type: 'day-time',
|
|
430
451
|
},
|
|
431
452
|
};
|
|
@@ -532,7 +553,7 @@ exports.TicketVariableNameMap = {
|
|
|
532
553
|
'ticket.created_at': {
|
|
533
554
|
text: 'Ticket Created At',
|
|
534
555
|
type: 'day-time',
|
|
535
|
-
filters: ['LT', 'LTE', 'GT', 'GTE'],
|
|
556
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
536
557
|
variable_type: 'day-time',
|
|
537
558
|
},
|
|
538
559
|
'ticket.chat_id': {
|
package/dist/supabase.types.d.ts
CHANGED
|
@@ -2,31 +2,6 @@ export type Json = {
|
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
} | any;
|
|
4
4
|
export type Database = {
|
|
5
|
-
graphql_public: {
|
|
6
|
-
Tables: {
|
|
7
|
-
[_ in never]: never;
|
|
8
|
-
};
|
|
9
|
-
Views: {
|
|
10
|
-
[_ in never]: never;
|
|
11
|
-
};
|
|
12
|
-
Functions: {
|
|
13
|
-
graphql: {
|
|
14
|
-
Args: {
|
|
15
|
-
operationName?: string;
|
|
16
|
-
query?: string;
|
|
17
|
-
variables?: Json;
|
|
18
|
-
extensions?: Json;
|
|
19
|
-
};
|
|
20
|
-
Returns: Json;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
Enums: {
|
|
24
|
-
[_ in never]: never;
|
|
25
|
-
};
|
|
26
|
-
CompositeTypes: {
|
|
27
|
-
[_ in never]: never;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
5
|
internal: {
|
|
31
6
|
Tables: {
|
|
32
7
|
config: {
|
|
@@ -359,6 +334,7 @@ export type Database = {
|
|
|
359
334
|
broadcast_status: Database["public"]["Enums"]["enum_broadcast_status"] | null;
|
|
360
335
|
chat_ids: string[] | null;
|
|
361
336
|
created_at: string;
|
|
337
|
+
delay: number | null;
|
|
362
338
|
message_payload: Json | null;
|
|
363
339
|
org_id: string;
|
|
364
340
|
org_phone: string | null;
|
|
@@ -372,6 +348,7 @@ export type Database = {
|
|
|
372
348
|
broadcast_status?: Database["public"]["Enums"]["enum_broadcast_status"] | null;
|
|
373
349
|
chat_ids?: string[] | null;
|
|
374
350
|
created_at?: string;
|
|
351
|
+
delay?: number | null;
|
|
375
352
|
message_payload?: Json | null;
|
|
376
353
|
org_id: string;
|
|
377
354
|
org_phone?: string | null;
|
|
@@ -385,6 +362,7 @@ export type Database = {
|
|
|
385
362
|
broadcast_status?: Database["public"]["Enums"]["enum_broadcast_status"] | null;
|
|
386
363
|
chat_ids?: string[] | null;
|
|
387
364
|
created_at?: string;
|
|
365
|
+
delay?: number | null;
|
|
388
366
|
message_payload?: Json | null;
|
|
389
367
|
org_id?: string;
|
|
390
368
|
org_phone?: string | null;
|
package/dist/types.d.ts
CHANGED
|
@@ -239,6 +239,7 @@ export type BroadcastMessagePayload = SendMessageContent & {
|
|
|
239
239
|
chat_ids: string[];
|
|
240
240
|
broadcast_id?: string;
|
|
241
241
|
variables?: BroadcastVariableType[];
|
|
242
|
+
delay?: number;
|
|
242
243
|
};
|
|
243
244
|
export type SingleMessagePayload = SendMessageContent & {
|
|
244
245
|
chat_id: string;
|
package/package.json
CHANGED
package/rules.types.ts
CHANGED
|
@@ -110,7 +110,8 @@ 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
117
|
variable_type?: 'string' | 'number' | 'boolean' | 'day-time' | 'date' | 'day'; // Optional, like 'Date'
|
|
@@ -181,6 +182,10 @@ 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 = {
|
|
@@ -202,9 +207,19 @@ export type VariableNameValueType = {
|
|
|
202
207
|
label: string;
|
|
203
208
|
}[]
|
|
204
209
|
| null;
|
|
205
|
-
filters:
|
|
210
|
+
filters:
|
|
211
|
+
| Partial<
|
|
212
|
+
Record<
|
|
213
|
+
Filter['condition'],
|
|
214
|
+
{
|
|
215
|
+
info?: string;
|
|
216
|
+
}
|
|
217
|
+
>
|
|
218
|
+
>
|
|
219
|
+
| Filter['condition'][];
|
|
206
220
|
hidden?: boolean;
|
|
207
221
|
placeholder?: string;
|
|
222
|
+
info?: string;
|
|
208
223
|
};
|
|
209
224
|
|
|
210
225
|
export const MessageVariableNameMap: Record<
|
|
@@ -226,10 +241,27 @@ export const MessageVariableNameMap: Record<
|
|
|
226
241
|
variable_type: 'string',
|
|
227
242
|
},
|
|
228
243
|
'message.timestamp': {
|
|
229
|
-
text: 'Message
|
|
244
|
+
text: 'Message receive timestamp',
|
|
230
245
|
type: 'day-time',
|
|
231
|
-
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
|
+
},
|
|
232
263
|
variable_type: 'day-time',
|
|
264
|
+
info: 'The timestamp when the message was received',
|
|
233
265
|
},
|
|
234
266
|
'message.flag_status': {
|
|
235
267
|
text: 'Message Flag Status',
|
|
@@ -584,7 +616,7 @@ export const ChatVariableNameMap: Record<
|
|
|
584
616
|
'chat.created_at': {
|
|
585
617
|
text: 'Chat Created At',
|
|
586
618
|
type: 'day-time',
|
|
587
|
-
filters: ['LT', 'LTE', 'GT', 'GTE', '
|
|
619
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
588
620
|
variable_type: 'day-time',
|
|
589
621
|
},
|
|
590
622
|
};
|
|
@@ -695,7 +727,7 @@ export const TicketVariableNameMap: Record<
|
|
|
695
727
|
'ticket.created_at': {
|
|
696
728
|
text: 'Ticket Created At',
|
|
697
729
|
type: 'day-time',
|
|
698
|
-
filters: ['LT', 'LTE', 'GT', 'GTE'],
|
|
730
|
+
filters: ['LT', 'LTE', 'GT', 'GTE', 'ON'],
|
|
699
731
|
variable_type: 'day-time',
|
|
700
732
|
},
|
|
701
733
|
'ticket.chat_id': {
|