@periskope/types 0.6.162 → 0.6.164

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.
@@ -130,6 +130,8 @@ export type SendMessageAction = {
130
130
  name: string;
131
131
  };
132
132
  maintain_flag_status: 'true' | 'false';
133
+ debounce_messages: 'true' | 'false';
134
+ debounce_message_time: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}` | null | undefined;
133
135
  };
134
136
  delay: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}`;
135
137
  };
@@ -232,6 +234,8 @@ export type ReplyToMessageAction = {
232
234
  name: string;
233
235
  };
234
236
  maintain_flag_status: boolean;
237
+ debounce_messages: 'true' | 'false';
238
+ debounce_message_time: `${number} ${'seconds' | 'minutes' | 'hours' | 'days'}` | null | undefined;
235
239
  };
236
240
  };
237
241
  export type UpdateCustomPropertyAction = {
@@ -273,7 +277,7 @@ export declare const ActionNameMap: Record<Action['type'], {
273
277
  id: string;
274
278
  value: string;
275
279
  label: string;
276
- }[] | null | 'org.custom_properties' | 'custom_property_values';
280
+ }[] | null | 'org.custom_properties' | 'custom_property_values' | 'debounce_messages';
277
281
  label: string;
278
282
  placeholder: string;
279
283
  info?: string;
@@ -666,6 +666,25 @@ exports.ActionNameMap = {
666
666
  ],
667
667
  required: true,
668
668
  },
669
+ debounce_messages: {
670
+ id: 'debounce_messages',
671
+ type: 'dropdown',
672
+ label: 'Debounce Messages',
673
+ placeholder: 'Select...',
674
+ value: [
675
+ { id: 'true', value: 'true', label: 'True' },
676
+ { id: 'false', value: 'false', label: 'False' },
677
+ ],
678
+ required: false,
679
+ },
680
+ debounce_message_time: {
681
+ id: 'debounce_message_time',
682
+ type: 'dynamic',
683
+ label: 'Debounce Messages Time',
684
+ placeholder: 'Enter time',
685
+ value: 'debounce_messages',
686
+ required: false,
687
+ },
669
688
  },
670
689
  validTriggers: [
671
690
  'message.created',
@@ -709,6 +728,25 @@ exports.ActionNameMap = {
709
728
  ],
710
729
  required: true,
711
730
  },
731
+ debounce_messages: {
732
+ id: 'debounce_messages',
733
+ type: 'dropdown',
734
+ label: 'Debounce Messages',
735
+ placeholder: 'Select...',
736
+ value: [
737
+ { id: 'true', value: 'true', label: 'True' },
738
+ { id: 'false', value: 'false', label: 'False' },
739
+ ],
740
+ required: false,
741
+ },
742
+ debounce_message_time: {
743
+ id: 'debounce_message_time',
744
+ type: 'dynamic',
745
+ label: 'Debounce Messages Time',
746
+ placeholder: 'Enter time',
747
+ value: 'debounce_messages',
748
+ required: false,
749
+ },
712
750
  },
713
751
  validTriggers: [
714
752
  'message.created',
@@ -1003,7 +1041,7 @@ exports.ActionNameMap = {
1003
1041
  },
1004
1042
  subject: {
1005
1043
  id: 'subject',
1006
- type: 'text',
1044
+ type: 'editor',
1007
1045
  label: 'Subject',
1008
1046
  placeholder: 'Enter subject',
1009
1047
  value: null,
@@ -1074,6 +1112,25 @@ exports.editorVariables = [
1074
1112
  value: 'ticket.ticket_id',
1075
1113
  validTriggers: ['ticket.updated', 'ticket.created'],
1076
1114
  },
1115
+ {
1116
+ label: 'Chat ID',
1117
+ value: 'chat.chat_id',
1118
+ validTriggers: [
1119
+ 'message.created',
1120
+ 'message.updated',
1121
+ 'reaction.added',
1122
+ 'message.flagged',
1123
+ 'chat.created',
1124
+ 'chat.label.updated',
1125
+ 'ticket.created',
1126
+ 'ticket.updated',
1127
+ ],
1128
+ },
1129
+ {
1130
+ label: 'Reaction',
1131
+ value: 'reaction.reaction',
1132
+ validTriggers: ['reaction.added'],
1133
+ },
1077
1134
  ];
1078
1135
  exports.variablesExclusionList = {
1079
1136
  'ticket.created': ['ticket.is_deleted'],
@@ -2,6 +2,31 @@ 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
+ };
5
30
  internal: {
6
31
  Tables: {
7
32
  config: {
@@ -1663,6 +1688,64 @@ export type Database = {
1663
1688
  }
1664
1689
  ];
1665
1690
  };
1691
+ tbl_rules_logs: {
1692
+ Row: {
1693
+ actions_progress: Json | null;
1694
+ conditions_progress: Json | null;
1695
+ created_at: string;
1696
+ log_id: string;
1697
+ metadata: Json | null;
1698
+ org_id: string;
1699
+ rule_id: string;
1700
+ trace_id: string | null;
1701
+ trigger: string;
1702
+ };
1703
+ Insert: {
1704
+ actions_progress?: Json | null;
1705
+ conditions_progress?: Json | null;
1706
+ created_at?: string;
1707
+ log_id?: string;
1708
+ metadata?: Json | null;
1709
+ org_id: string;
1710
+ rule_id: string;
1711
+ trace_id?: string | null;
1712
+ trigger: string;
1713
+ };
1714
+ Update: {
1715
+ actions_progress?: Json | null;
1716
+ conditions_progress?: Json | null;
1717
+ created_at?: string;
1718
+ log_id?: string;
1719
+ metadata?: Json | null;
1720
+ org_id?: string;
1721
+ rule_id?: string;
1722
+ trace_id?: string | null;
1723
+ trigger?: string;
1724
+ };
1725
+ Relationships: [
1726
+ {
1727
+ foreignKeyName: "tbl_rules_logs_org_id_fkey";
1728
+ columns: ["org_id"];
1729
+ isOneToOne: false;
1730
+ referencedRelation: "tbl_org";
1731
+ referencedColumns: ["org_id"];
1732
+ },
1733
+ {
1734
+ foreignKeyName: "tbl_rules_logs_org_id_fkey";
1735
+ columns: ["org_id"];
1736
+ isOneToOne: false;
1737
+ referencedRelation: "view_org";
1738
+ referencedColumns: ["org_id"];
1739
+ },
1740
+ {
1741
+ foreignKeyName: "tbl_rules_logs_rule_id_fkey";
1742
+ columns: ["rule_id"];
1743
+ isOneToOne: false;
1744
+ referencedRelation: "tbl_automation_rules";
1745
+ referencedColumns: ["id"];
1746
+ }
1747
+ ];
1748
+ };
1666
1749
  tbl_scheduled_messages: {
1667
1750
  Row: {
1668
1751
  chat_id: string;
@@ -2165,7 +2248,7 @@ export type Database = {
2165
2248
  column_name: string;
2166
2249
  org_id_input: string;
2167
2250
  chat_id_input: string[];
2168
- column_value_input?: unknown;
2251
+ column_value_input?: string;
2169
2252
  key_input?: string;
2170
2253
  value_input?: Json;
2171
2254
  };
@@ -2276,7 +2359,6 @@ export type Database = {
2276
2359
  owner_id: string | null;
2277
2360
  path_tokens: string[] | null;
2278
2361
  updated_at: string | null;
2279
- user_metadata: Json | null;
2280
2362
  version: string | null;
2281
2363
  };
2282
2364
  Insert: {
@@ -2290,7 +2372,6 @@ export type Database = {
2290
2372
  owner_id?: string | null;
2291
2373
  path_tokens?: string[] | null;
2292
2374
  updated_at?: string | null;
2293
- user_metadata?: Json | null;
2294
2375
  version?: string | null;
2295
2376
  };
2296
2377
  Update: {
@@ -2304,7 +2385,6 @@ export type Database = {
2304
2385
  owner_id?: string | null;
2305
2386
  path_tokens?: string[] | null;
2306
2387
  updated_at?: string | null;
2307
- user_metadata?: Json | null;
2308
2388
  version?: string | null;
2309
2389
  };
2310
2390
  Relationships: [
@@ -2326,7 +2406,6 @@ export type Database = {
2326
2406
  key: string;
2327
2407
  owner_id: string | null;
2328
2408
  upload_signature: string;
2329
- user_metadata: Json | null;
2330
2409
  version: string;
2331
2410
  };
2332
2411
  Insert: {
@@ -2337,7 +2416,6 @@ export type Database = {
2337
2416
  key: string;
2338
2417
  owner_id?: string | null;
2339
2418
  upload_signature: string;
2340
- user_metadata?: Json | null;
2341
2419
  version: string;
2342
2420
  };
2343
2421
  Update: {
@@ -2348,7 +2426,6 @@ export type Database = {
2348
2426
  key?: string;
2349
2427
  owner_id?: string | null;
2350
2428
  upload_signature?: string;
2351
- user_metadata?: Json | null;
2352
2429
  version?: string;
2353
2430
  };
2354
2431
  Relationships: [
@@ -2485,10 +2562,6 @@ export type Database = {
2485
2562
  updated_at: string;
2486
2563
  }[];
2487
2564
  };
2488
- operation: {
2489
- Args: Record<PropertyKey, never>;
2490
- Returns: string;
2491
- };
2492
2565
  search: {
2493
2566
  Args: {
2494
2567
  prefix: string;
package/dist/types.d.ts CHANGED
@@ -80,6 +80,7 @@ export type OrgMetadata = {
80
80
  message_template?: string;
81
81
  };
82
82
  };
83
+ attribution?: Object;
83
84
  };
84
85
  type AccessScopes = {
85
86
  feature_flags: Record<string, boolean>;
@@ -489,4 +490,37 @@ export type TicketRuleInfoType = {
489
490
  message: MessageRuleInfoType['message'];
490
491
  };
491
492
  export type FeatureFlagReturnType = Record<string, boolean>;
493
+ export type RuleLogsType = OverrideProperties<Tables<'tbl_rules_logs'>, {
494
+ actions_progress: {
495
+ action_id: string;
496
+ action_type: Rule['actions'][number]['type'];
497
+ action_delay: Rule['actions'][number]['delay'];
498
+ ran_at: string | null;
499
+ action_status: 'success' | 'failed' | 'pending';
500
+ action_response: {
501
+ success: boolean;
502
+ data: Record<string, unknown> | null;
503
+ error: {
504
+ message: string;
505
+ name: string;
506
+ stack?: string;
507
+ _error?: Error | Record<string, unknown>;
508
+ } | null;
509
+ };
510
+ }[];
511
+ metadata: {
512
+ conditions: Rule['conditions'];
513
+ actions: Rule['actions'];
514
+ data: Record<string, unknown>;
515
+ };
516
+ conditions_progress: {
517
+ is_valid: boolean;
518
+ validation_progress: Record<string, {
519
+ res: boolean;
520
+ filter: Rule['conditions']['filters'][number];
521
+ value: unknown;
522
+ }>;
523
+ checked_at: string;
524
+ };
525
+ }>;
492
526
  export {};
package/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './rules.types';
2
- export * from './supabase.types';
3
- export * from './types';
1
+ export * from './rules.types';
2
+ export * from './supabase.types';
3
+ export * from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.162",
3
+ "version": "0.6.164",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",