@periskope/types 0.6.147 → 0.6.149

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.
@@ -110,6 +110,42 @@ export type Database = {
110
110
  };
111
111
  Relationships: [];
112
112
  };
113
+ tbl_feature_flags: {
114
+ Row: {
115
+ created_at: string | null;
116
+ enabled: boolean | null;
117
+ excluded_orgs: string[] | null;
118
+ exclusive_to_orgs: string[] | null;
119
+ feature: string;
120
+ included_orgs: string[] | null;
121
+ percentage: number | null;
122
+ plans: string[] | null;
123
+ start_date: string | null;
124
+ };
125
+ Insert: {
126
+ created_at?: string | null;
127
+ enabled?: boolean | null;
128
+ excluded_orgs?: string[] | null;
129
+ exclusive_to_orgs?: string[] | null;
130
+ feature: string;
131
+ included_orgs?: string[] | null;
132
+ percentage?: number | null;
133
+ plans?: string[] | null;
134
+ start_date?: string | null;
135
+ };
136
+ Update: {
137
+ created_at?: string | null;
138
+ enabled?: boolean | null;
139
+ excluded_orgs?: string[] | null;
140
+ exclusive_to_orgs?: string[] | null;
141
+ feature?: string;
142
+ included_orgs?: string[] | null;
143
+ percentage?: number | null;
144
+ plans?: string[] | null;
145
+ start_date?: string | null;
146
+ };
147
+ Relationships: [];
148
+ };
113
149
  tbl_trigger_logs: {
114
150
  Row: {
115
151
  created_at: string;
@@ -718,39 +754,54 @@ export type Database = {
718
754
  assigned_to: string | null;
719
755
  chat_access: Json | null;
720
756
  chat_id: string;
757
+ chat_image: string | null;
758
+ chat_name: string | null;
721
759
  chat_org_phones: string[];
760
+ chat_type: string | null;
722
761
  custom_properties: Json | null;
723
762
  flag_count_map: Json | null;
724
763
  hubspot_metadata: Json | null;
725
764
  label_ids: Json | null;
765
+ latest_message_timestamp: string | null;
726
766
  org_id: string;
727
767
  unread_count: Json | null;
768
+ unread_count_map: Json | null;
728
769
  updated_at: string | null;
729
770
  };
730
771
  Insert: {
731
772
  assigned_to?: string | null;
732
773
  chat_access?: Json | null;
733
774
  chat_id: string;
775
+ chat_image?: string | null;
776
+ chat_name?: string | null;
734
777
  chat_org_phones?: string[];
778
+ chat_type?: string | null;
735
779
  custom_properties?: Json | null;
736
780
  flag_count_map?: Json | null;
737
781
  hubspot_metadata?: Json | null;
738
782
  label_ids?: Json | null;
783
+ latest_message_timestamp?: string | null;
739
784
  org_id: string;
740
785
  unread_count?: Json | null;
786
+ unread_count_map?: Json | null;
741
787
  updated_at?: string | null;
742
788
  };
743
789
  Update: {
744
790
  assigned_to?: string | null;
745
791
  chat_access?: Json | null;
746
792
  chat_id?: string;
793
+ chat_image?: string | null;
794
+ chat_name?: string | null;
747
795
  chat_org_phones?: string[];
796
+ chat_type?: string | null;
748
797
  custom_properties?: Json | null;
749
798
  flag_count_map?: Json | null;
750
799
  hubspot_metadata?: Json | null;
751
800
  label_ids?: Json | null;
801
+ latest_message_timestamp?: string | null;
752
802
  org_id?: string;
753
803
  unread_count?: Json | null;
804
+ unread_count_map?: Json | null;
754
805
  updated_at?: string | null;
755
806
  };
756
807
  Relationships: [];
@@ -1798,7 +1849,6 @@ export type Database = {
1798
1849
  is_exited: boolean | null;
1799
1850
  is_muted: boolean | null;
1800
1851
  label_ids: Json | null;
1801
- last_read_timestamp: string | null;
1802
1852
  latest_message: Json | null;
1803
1853
  member_add_mode: string | null;
1804
1854
  member_count: number | null;
@@ -1884,6 +1934,13 @@ export type Database = {
1884
1934
  };
1885
1935
  };
1886
1936
  Functions: {
1937
+ check_feature_flag_access: {
1938
+ Args: {
1939
+ org_id_input: string;
1940
+ feature_input: string;
1941
+ };
1942
+ Returns: boolean;
1943
+ };
1887
1944
  create_partition: {
1888
1945
  Args: {
1889
1946
  org_id_input: string;
@@ -2003,6 +2060,15 @@ export type Database = {
2003
2060
  };
2004
2061
  Returns: Json;
2005
2062
  };
2063
+ get_feature_flags: {
2064
+ Args: {
2065
+ org_id_input: string;
2066
+ };
2067
+ Returns: {
2068
+ feature: string;
2069
+ enabled: boolean;
2070
+ }[];
2071
+ };
2006
2072
  get_integration_data: {
2007
2073
  Args: {
2008
2074
  org_id_input?: string;
@@ -2146,7 +2212,7 @@ export type Database = {
2146
2212
  enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
2147
2213
  enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
2148
2214
  enum_credit_transaction_type: "credit" | "debit";
2149
- enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated";
2215
+ enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged";
2150
2216
  enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce" | "zohodesk" | "gsheets";
2151
2217
  enum_member_role: "admin" | "member";
2152
2218
  };
package/dist/types.d.ts CHANGED
@@ -76,6 +76,7 @@ export type OrgMetadata = {
76
76
  };
77
77
  };
78
78
  type AccessScopes = {
79
+ feature_flags: Record<string, boolean>;
79
80
  integrations: boolean;
80
81
  exports: boolean;
81
82
  };
@@ -134,6 +135,7 @@ export type ChatType = Merge<Tables<'view_chats'>, {
134
135
  };
135
136
  is_archived?: boolean;
136
137
  is_pinned?: boolean;
138
+ closed_at?: number;
137
139
  }>;
138
140
  export type MediaType = {
139
141
  path: string;
@@ -350,9 +352,11 @@ export declare enum IntegrationLogType {
350
352
  REACTION_UPDATED = "reaction.updated",
351
353
  NEW_TICKET = "ticket.created",
352
354
  TICKET_UPDATED = "ticket.updated",
353
- TICKET_DELETED = "ticket.deleted"
355
+ TICKET_DELETED = "ticket.deleted",
356
+ MESSAGE_FLAGGED = "message.flagged",
357
+ MESSAGE_UNFLAGGED = "message.unflagged"
354
358
  }
355
- export type IntegrationLogMetadataType<T extends IntegrationLogType> = T extends IntegrationLogType.NEW_TICKET | IntegrationLogType.TICKET_UPDATED ? TicketInfoType : T extends IntegrationLogType.NEW_CHAT ? Tables<'tbl_chats'> : T extends IntegrationLogType.NEW_MESSAGE | IntegrationLogType.MESSAGE_UPDATED | IntegrationLogType.MESSAGE_DELETED | IntegrationLogType.MESSAGE_ACK_UPDATED ? Tables<'tbl_chat_messages'> : T extends IntegrationLogType.REACTION_CREATED | IntegrationLogType.REACTION_UPDATED ? Tables<'tbl_chat_reactions'> : {
359
+ export type IntegrationLogMetadataType<T extends IntegrationLogType> = T extends IntegrationLogType.NEW_TICKET | IntegrationLogType.TICKET_UPDATED ? TicketInfoType : T extends IntegrationLogType.NEW_CHAT ? Tables<'tbl_chats'> : T extends IntegrationLogType.NEW_MESSAGE | IntegrationLogType.MESSAGE_UPDATED | IntegrationLogType.MESSAGE_DELETED | IntegrationLogType.MESSAGE_ACK_UPDATED | IntegrationLogType.MESSAGE_FLAGGED | IntegrationLogType.MESSAGE_UNFLAGGED ? Tables<'tbl_chat_messages'> : T extends IntegrationLogType.REACTION_CREATED | IntegrationLogType.REACTION_UPDATED ? Tables<'tbl_chat_reactions'> : {
356
360
  [key: string]: unknown;
357
361
  };
358
362
  export type IntegrationLogDetailsType<T extends IntegrationLogType> = OverrideProperties<Tables<'tbl_integration_logs'>, {
@@ -400,6 +404,9 @@ export type UserPreferences = {
400
404
  right_sidepanel_open: boolean;
401
405
  sync_wa_unread_count: boolean;
402
406
  pinned_chats: string[];
407
+ archived_chats: string[];
408
+ closed_chats: Record<string, number>;
409
+ periskope_chat_limit: number;
403
410
  };
404
411
  export type PollSendType = {
405
412
  pollName: string;
@@ -472,4 +479,5 @@ export type TicketRuleInfoType = {
472
479
  }>;
473
480
  message: MessageRuleInfoType['message'];
474
481
  };
482
+ export type FeatureFlagReturnType = Record<string, boolean>;
475
483
  export {};
package/dist/types.js CHANGED
@@ -69,4 +69,6 @@ var IntegrationLogType;
69
69
  IntegrationLogType["NEW_TICKET"] = "ticket.created";
70
70
  IntegrationLogType["TICKET_UPDATED"] = "ticket.updated";
71
71
  IntegrationLogType["TICKET_DELETED"] = "ticket.deleted";
72
+ IntegrationLogType["MESSAGE_FLAGGED"] = "message.flagged";
73
+ IntegrationLogType["MESSAGE_UNFLAGGED"] = "message.unflagged";
72
74
  })(IntegrationLogType || (exports.IntegrationLogType = IntegrationLogType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.147",
3
+ "version": "0.6.149",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",