@periskope/types 0.6.84 → 0.6.85

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.
@@ -1,7 +1,7 @@
1
1
  export type Json = {
2
2
  [key: string]: any;
3
3
  } | any;
4
- export type Database = {
4
+ export interface Database {
5
5
  graphql_public: {
6
6
  Tables: {
7
7
  [_ in never]: never;
@@ -236,6 +236,7 @@ export type Database = {
236
236
  delivery_info: Json | null;
237
237
  device_type: string | null;
238
238
  duration: string | null;
239
+ flag_metadata: Json | null;
239
240
  forwarding_score: number | null;
240
241
  from: string | null;
241
242
  from_me: boolean | null;
@@ -284,6 +285,7 @@ export type Database = {
284
285
  delivery_info?: Json | null;
285
286
  device_type?: string | null;
286
287
  duration?: string | null;
288
+ flag_metadata?: Json | null;
287
289
  forwarding_score?: number | null;
288
290
  from?: string | null;
289
291
  from_me?: boolean | null;
@@ -332,6 +334,7 @@ export type Database = {
332
334
  delivery_info?: Json | null;
333
335
  device_type?: string | null;
334
336
  duration?: string | null;
337
+ flag_metadata?: Json | null;
335
338
  forwarding_score?: number | null;
336
339
  from?: string | null;
337
340
  from_me?: boolean | null;
@@ -839,52 +842,6 @@ export type Database = {
839
842
  }
840
843
  ];
841
844
  };
842
- tbl_flagged_messages: {
843
- Row: {
844
- chat_id: string | null;
845
- message_timestamp: string | null;
846
- org_id: string;
847
- responder_email: string | null;
848
- response_id: string | null;
849
- response_timestamp: string | null;
850
- response_type: string | null;
851
- unique_id: string;
852
- };
853
- Insert: {
854
- chat_id?: string | null;
855
- message_timestamp?: string | null;
856
- org_id: string;
857
- responder_email?: string | null;
858
- response_id?: string | null;
859
- response_timestamp?: string | null;
860
- response_type?: string | null;
861
- unique_id: string;
862
- };
863
- Update: {
864
- chat_id?: string | null;
865
- message_timestamp?: string | null;
866
- org_id?: string;
867
- responder_email?: string | null;
868
- response_id?: string | null;
869
- response_timestamp?: string | null;
870
- response_type?: string | null;
871
- unique_id?: string;
872
- };
873
- Relationships: [
874
- {
875
- foreignKeyName: "tbl_flagged_messages_org_id_fkey";
876
- columns: ["org_id"];
877
- referencedRelation: "tbl_org";
878
- referencedColumns: ["org_id"];
879
- },
880
- {
881
- foreignKeyName: "tbl_flagged_messages_org_id_fkey";
882
- columns: ["org_id"];
883
- referencedRelation: "view_org";
884
- referencedColumns: ["org_id"];
885
- }
886
- ];
887
- };
888
845
  tbl_integration_hooks: {
889
846
  Row: {
890
847
  hook_url: string;
@@ -1489,7 +1446,7 @@ export type Database = {
1489
1446
  org_id_input: string;
1490
1447
  chat_ids_input?: string[];
1491
1448
  };
1492
- Returns: Json[];
1449
+ Returns: unknown;
1493
1450
  };
1494
1451
  get_chat_members: {
1495
1452
  Args: {
@@ -1536,6 +1493,12 @@ export type Database = {
1536
1493
  };
1537
1494
  Returns: Json;
1538
1495
  };
1496
+ get_integration_data: {
1497
+ Args: {
1498
+ org_id_input?: string;
1499
+ };
1500
+ Returns: Json;
1501
+ };
1539
1502
  get_messages_notifications_reactions: {
1540
1503
  Args: {
1541
1504
  org_id_input: string;
@@ -1559,6 +1522,14 @@ export type Database = {
1559
1522
  };
1560
1523
  Returns: Json;
1561
1524
  };
1525
+ get_team_metrics: {
1526
+ Args: {
1527
+ org_id_input: string;
1528
+ chat_id_input?: string[];
1529
+ interval_input?: unknown;
1530
+ };
1531
+ Returns: Json;
1532
+ };
1562
1533
  get_ticket_info: {
1563
1534
  Args: {
1564
1535
  ticket_id_input?: string;
@@ -1578,7 +1549,7 @@ export type Database = {
1578
1549
  };
1579
1550
  list_org_from_user: {
1580
1551
  Args: Record<PropertyKey, never>;
1581
- Returns: string[];
1552
+ Returns: unknown;
1582
1553
  };
1583
1554
  list_role_from_user: {
1584
1555
  Args: Record<PropertyKey, never>;
@@ -1785,7 +1756,7 @@ export type Database = {
1785
1756
  [_ in never]: never;
1786
1757
  };
1787
1758
  };
1788
- };
1759
+ }
1789
1760
  type PublicSchema = Database[Extract<keyof Database, "public">];
1790
1761
  export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
1791
1762
  schema: keyof Database;
package/dist/types.d.ts CHANGED
@@ -100,7 +100,14 @@ export type MessageType = OverrideProperties<Tables<'tbl_chat_messages'>, {
100
100
  chat_id: string;
101
101
  message_type: (typeof SUPPORTED_TYPES)[number];
102
102
  media: MediaType | null;
103
+ flag_metadata: MessageFlagType | null;
103
104
  }>;
105
+ export type MessageFlagType = {
106
+ status: boolean;
107
+ response_type?: 'message' | 'reaction' | 'ticket';
108
+ response_id?: string;
109
+ response_timestamp?: string;
110
+ };
104
111
  export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
105
112
  label_ids: {
106
113
  [key: string]: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.84",
3
+ "version": "0.6.85",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",