@periskope/types 0.6.94 → 0.6.96

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/types.d.ts CHANGED
@@ -45,8 +45,9 @@ export type MicrosurveyData = {
45
45
  }[];
46
46
  export type OrgPreferences = {
47
47
  disable_ai_flagging?: boolean;
48
- allow_exports?: boolean;
48
+ disable_allow_exports?: boolean;
49
49
  sync_phone_contacts?: boolean;
50
+ mask_phone_numbers?: boolean;
50
51
  };
51
52
  type OrgPreferenceKey = keyof OrgPreferences;
52
53
  export type OrgPreferencesValue = {
@@ -113,6 +114,8 @@ export type ChatType = Merge<Tables<'view_chats'>, {
113
114
  hubId: string;
114
115
  object_data: HubspotObjectDataType;
115
116
  } | null;
117
+ info_admins_only: boolean;
118
+ messages_admins_only: boolean;
116
119
  }>;
117
120
  export type MediaType = {
118
121
  path: string;
@@ -156,6 +159,12 @@ export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
156
159
  };
157
160
  object_data?: HubspotObjectDataType;
158
161
  } | null;
162
+ close_ticket_metadata?: {
163
+ closed_by: string;
164
+ closed_at: string;
165
+ closed_message?: string | null;
166
+ send_reply_message_id?: string | null;
167
+ } | null;
159
168
  }>;
160
169
  export type ContactType = Merge<Tables<'tbl_contacts'>, {
161
170
  chats: ChatType[] | null;
@@ -212,12 +221,15 @@ export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
212
221
  } & {
213
222
  chats: ChatType[];
214
223
  };
215
- export type ChatParticipantOperation = {
216
- participant_ids: string[];
217
- operation_type: 'ADD' | 'REMOVE' | 'PROMOTE' | 'DEMOTE';
224
+ export type ChatLogType = {
225
+ log: Tables<'view_chat_logs'>;
226
+ operations: Tables<'tbl_chat_logs'>[];
218
227
  };
219
- export type ChatParticipantOperationPayload = ChatParticipantOperation & {
228
+ export type ChatOperationsType = 'ADD' | 'REMOVE' | 'PROMOTE' | 'DEMOTE';
229
+ export type ChatParticipantOperationPayload = {
230
+ participant_ids: string[];
220
231
  chat_ids: string[];
232
+ performed_by: string;
221
233
  };
222
234
  export type ChatOperationReturn = {
223
235
  [participant_id: string]: {
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ # Define the path to the TypeScript file
4
+ filePath="./supabase.types.ts"
5
+
6
+ # Read the content of the file as a single string
7
+ fileContent=$(cat "$filePath")
8
+
9
+ # Define the current and new type definitions using Perl-style regular expressions
10
+ oldTypeDefinition='export type Json =\s*\| string\s*\| number\s*\| boolean\s*\| null\s*\| \{ \[key: string\]: Json \| undefined \}\s*\| Json\[\]'
11
+ newTypeDefinition='export type Json = { [key: string]: any } | any'
12
+
13
+ # Replace the old type definition with the new one
14
+ updatedContent=$(echo "$fileContent" | perl -0777 -pe "s/$oldTypeDefinition/$newTypeDefinition/g")
15
+
16
+ # Update interface to type
17
+ oldText='export interface Database '
18
+ newText='export type Database = '
19
+
20
+ updatedContent=$(echo "$updatedContent" | sed "s/$oldText/$newText/g")
21
+
22
+ # Write the updated content back to the file
23
+ echo "$updatedContent" > "$filePath"
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "name": "@periskope/types",
3
- "version": "0.6.94",
4
- "private": false,
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "dependencies": {
8
- "@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.8",
9
- "@types/pg": "8.11.2",
10
- "pg": "^8.11.3",
11
- "stripe": "^14.19.0",
12
- "ts-node": "^10.9.2",
13
- "type-fest": "^4.8.3"
14
- },
15
- "scripts": {
16
- "update-package": "tsc && npm publish --access public"
17
- }
2
+ "name": "@periskope/types",
3
+ "version": "0.6.96",
4
+ "private": false,
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "dependencies": {
8
+ "@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.8",
9
+ "@types/pg": "8.11.2",
10
+ "pg": "^8.11.3",
11
+ "stripe": "^14.19.0",
12
+ "ts-node": "^10.9.2",
13
+ "type-fest": "^4.8.3"
14
+ },
15
+ "scripts": {
16
+ "update-package": "tsc \u0026\u0026 npm publish --access public"
17
+ }
18
18
  }