@periskope/types 0.6.85 → 0.6.86

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 interface Database {
4
+ export type Database = {
5
5
  graphql_public: {
6
6
  Tables: {
7
7
  [_ in never]: never;
@@ -237,6 +237,7 @@ export interface Database {
237
237
  device_type: string | null;
238
238
  duration: string | null;
239
239
  flag_metadata: Json | null;
240
+ flag_response_time: number | null;
240
241
  forwarding_score: number | null;
241
242
  from: string | null;
242
243
  from_me: boolean | null;
@@ -286,6 +287,7 @@ export interface Database {
286
287
  device_type?: string | null;
287
288
  duration?: string | null;
288
289
  flag_metadata?: Json | null;
290
+ flag_response_time?: number | null;
289
291
  forwarding_score?: number | null;
290
292
  from?: string | null;
291
293
  from_me?: boolean | null;
@@ -335,6 +337,7 @@ export interface Database {
335
337
  device_type?: string | null;
336
338
  duration?: string | null;
337
339
  flag_metadata?: Json | null;
340
+ flag_response_time?: number | null;
338
341
  forwarding_score?: number | null;
339
342
  from?: string | null;
340
343
  from_me?: boolean | null;
@@ -472,18 +475,24 @@ export interface Database {
472
475
  Row: {
473
476
  chat_id: string;
474
477
  custom_properties: Json | null;
478
+ flag_count: number;
479
+ hubspot_metadata: Json | null;
475
480
  label_ids: Json | null;
476
481
  org_id: string;
477
482
  };
478
483
  Insert: {
479
484
  chat_id: string;
480
485
  custom_properties?: Json | null;
486
+ flag_count?: number;
487
+ hubspot_metadata?: Json | null;
481
488
  label_ids?: Json | null;
482
489
  org_id: string;
483
490
  };
484
491
  Update: {
485
492
  chat_id?: string;
486
493
  custom_properties?: Json | null;
494
+ flag_count?: number;
495
+ hubspot_metadata?: Json | null;
487
496
  label_ids?: Json | null;
488
497
  org_id?: string;
489
498
  };
@@ -557,6 +566,7 @@ export interface Database {
557
566
  chat_id: string;
558
567
  created_at: string;
559
568
  due_date: string | null;
569
+ hubspot_metadata: Json | null;
560
570
  is_deleted: boolean;
561
571
  label_ids: Json | null;
562
572
  last_updated_at: string;
@@ -574,6 +584,7 @@ export interface Database {
574
584
  chat_id: string;
575
585
  created_at?: string;
576
586
  due_date?: string | null;
587
+ hubspot_metadata?: Json | null;
577
588
  is_deleted?: boolean;
578
589
  label_ids?: Json | null;
579
590
  last_updated_at?: string;
@@ -591,6 +602,7 @@ export interface Database {
591
602
  chat_id?: string;
592
603
  created_at?: string;
593
604
  due_date?: string | null;
605
+ hubspot_metadata?: Json | null;
594
606
  is_deleted?: boolean;
595
607
  label_ids?: Json | null;
596
608
  last_updated_at?: string;
@@ -953,6 +965,7 @@ export interface Database {
953
965
  org_id: string;
954
966
  role: string;
955
967
  token: string;
968
+ token_metadata: Json | null;
956
969
  type: Database["public"]["Enums"]["enum_integration_type"];
957
970
  };
958
971
  Insert: {
@@ -964,6 +977,7 @@ export interface Database {
964
977
  org_id: string;
965
978
  role: string;
966
979
  token: string;
980
+ token_metadata?: Json | null;
967
981
  type: Database["public"]["Enums"]["enum_integration_type"];
968
982
  };
969
983
  Update: {
@@ -975,6 +989,7 @@ export interface Database {
975
989
  org_id?: string;
976
990
  role?: string;
977
991
  token?: string;
992
+ token_metadata?: Json | null;
978
993
  type?: Database["public"]["Enums"]["enum_integration_type"];
979
994
  };
980
995
  Relationships: [
@@ -1333,7 +1348,9 @@ export interface Database {
1333
1348
  chat_type: string | null;
1334
1349
  created_at: string | null;
1335
1350
  custom_properties: Json | null;
1351
+ flag_count: number | null;
1336
1352
  group_description: string | null;
1353
+ hubspot_metadata: Json | null;
1337
1354
  invite_link: string | null;
1338
1355
  is_archived: boolean | null;
1339
1356
  is_muted: boolean | null;
@@ -1353,6 +1370,7 @@ export interface Database {
1353
1370
  created_at: string | null;
1354
1371
  is_enterprise: boolean | null;
1355
1372
  is_free_trial: boolean | null;
1373
+ is_hubspot_connected: boolean | null;
1356
1374
  org_id: string | null;
1357
1375
  org_image: string | null;
1358
1376
  org_metadata: Json | null;
@@ -1372,6 +1390,7 @@ export interface Database {
1372
1390
  created_at?: string | null;
1373
1391
  is_enterprise?: never;
1374
1392
  is_free_trial?: never;
1393
+ is_hubspot_connected?: never;
1375
1394
  org_id?: string | null;
1376
1395
  org_image?: string | null;
1377
1396
  org_metadata?: Json | null;
@@ -1391,6 +1410,7 @@ export interface Database {
1391
1410
  created_at?: string | null;
1392
1411
  is_enterprise?: never;
1393
1412
  is_free_trial?: never;
1413
+ is_hubspot_connected?: never;
1394
1414
  org_id?: string | null;
1395
1415
  org_image?: string | null;
1396
1416
  org_metadata?: Json | null;
@@ -1410,6 +1430,13 @@ export interface Database {
1410
1430
  };
1411
1431
  };
1412
1432
  Functions: {
1433
+ calculate_response_time: {
1434
+ Args: {
1435
+ flag_metadata: Json;
1436
+ message_timestamp: string;
1437
+ };
1438
+ Returns: number;
1439
+ };
1413
1440
  gen_id: {
1414
1441
  Args: {
1415
1442
  prefix: string;
@@ -1446,7 +1473,7 @@ export interface Database {
1446
1473
  org_id_input: string;
1447
1474
  chat_ids_input?: string[];
1448
1475
  };
1449
- Returns: unknown;
1476
+ Returns: Json[];
1450
1477
  };
1451
1478
  get_chat_members: {
1452
1479
  Args: {
@@ -1481,8 +1508,8 @@ export interface Database {
1481
1508
  get_dashboard_statistics: {
1482
1509
  Args: {
1483
1510
  org_id_input: string;
1484
- type_input?: string;
1485
1511
  interval_input?: unknown;
1512
+ chat_id_input?: string[];
1486
1513
  };
1487
1514
  Returns: Json;
1488
1515
  };
@@ -1549,7 +1576,7 @@ export interface Database {
1549
1576
  };
1550
1577
  list_org_from_user: {
1551
1578
  Args: Record<PropertyKey, never>;
1552
- Returns: unknown;
1579
+ Returns: string[];
1553
1580
  };
1554
1581
  list_role_from_user: {
1555
1582
  Args: Record<PropertyKey, never>;
@@ -1719,7 +1746,7 @@ export interface Database {
1719
1746
  Args: {
1720
1747
  name: string;
1721
1748
  };
1722
- Returns: unknown;
1749
+ Returns: string[];
1723
1750
  };
1724
1751
  get_size_by_bucket: {
1725
1752
  Args: Record<PropertyKey, never>;
@@ -1756,7 +1783,7 @@ export interface Database {
1756
1783
  [_ in never]: never;
1757
1784
  };
1758
1785
  };
1759
- }
1786
+ };
1760
1787
  type PublicSchema = Database[Extract<keyof Database, "public">];
1761
1788
  export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
1762
1789
  schema: keyof Database;
package/dist/types.d.ts CHANGED
@@ -57,6 +57,7 @@ export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
57
57
  subscription_status: 'active' | 'inactive' | 'unpaid';
58
58
  is_enterprise: boolean;
59
59
  is_free_trial: boolean;
60
+ is_hubspot_connected: boolean;
60
61
  }>, {
61
62
  org_plan: OrgPlan<AllPlans | Enterprise>;
62
63
  stripe_customer_details: _Stripe.Customer | null;
@@ -80,6 +81,12 @@ export type ChatType = Merge<Tables<'view_chats'>, {
80
81
  };
81
82
  chat_org_phones?: string[];
82
83
  message_unread_count: number | null;
84
+ hubspot_metadata: {
85
+ id: string;
86
+ type: string;
87
+ hubId: string;
88
+ object_data: HubspotObjectDataType;
89
+ } | null;
83
90
  }>;
84
91
  export type MediaType = {
85
92
  path: string;
@@ -107,11 +114,18 @@ export type MessageFlagType = {
107
114
  response_type?: 'message' | 'reaction' | 'ticket';
108
115
  response_id?: string;
109
116
  response_timestamp?: string;
117
+ response_email?: string;
110
118
  };
111
119
  export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
112
120
  label_ids: {
113
121
  [key: string]: boolean;
114
122
  };
123
+ hubspot_metadata: {
124
+ id: string;
125
+ type: string;
126
+ hubId: string;
127
+ object_data: HubspotObjectDataType;
128
+ } | null;
115
129
  }>;
116
130
  export type ContactType = Merge<Tables<'tbl_contacts'>, {
117
131
  chats: ChatType[] | null;
@@ -261,6 +275,21 @@ export type APIAuthDetails = {
261
275
  export type WebhookDataType = OverrideProperties<Tables<'tbl_integration_hooks'>, {
262
276
  integration_name: string[];
263
277
  }>;
278
+ export type HubspotObjectDataType = {
279
+ createdAt: string;
280
+ archived: boolean;
281
+ id: string;
282
+ type: 'contacts' | 'tickets' | 'companies';
283
+ properties: Record<string, {
284
+ groupLabel: string;
285
+ groupName: string;
286
+ propertyKeyName: string;
287
+ propertyKey: string;
288
+ propertyInternalValue: string;
289
+ propertyValue: string;
290
+ propertyType: string;
291
+ }[]>;
292
+ };
264
293
  export type UserPreferences = {
265
294
  theme: 'light' | 'dark';
266
295
  language: 'en' | 'es';
package/mod_json_type.ps1 CHANGED
@@ -1,15 +1,15 @@
1
- # Define the path to the TypeScript file
2
- $filePath = ".\supabase.types.ts"
3
-
4
- # Read the content of the file as a single string
5
- $fileContent = Get-Content $filePath -Raw
6
-
7
- # Define the current and new type definitions
8
- $oldTypeDefinition = 'export type Json =\s*\| string\s*\| number\s*\| boolean\s*\| null\s*\| \{ \[key: string\]: Json \| undefined \}\s*\| Json\[\]'
9
- $newTypeDefinition = 'export type Json = { [key: string]: any } | any'
10
-
11
- # Replace the old type definition with the new one
12
- $updatedContent = $fileContent -replace $oldTypeDefinition, $newTypeDefinition
13
-
14
- # Write the updated content back to the file
15
- $updatedContent | Set-Content $filePath
1
+ # Define the path to the TypeScript file
2
+ $filePath = ".\supabase.types.ts"
3
+
4
+ # Read the content of the file as a single string
5
+ $fileContent = Get-Content $filePath -Raw
6
+
7
+ # Define the current and new type definitions
8
+ $oldTypeDefinition = 'export type Json =\s*\| string\s*\| number\s*\| boolean\s*\| null\s*\| \{ \[key: string\]: Json \| undefined \}\s*\| Json\[\]'
9
+ $newTypeDefinition = 'export type Json = { [key: string]: any } | any'
10
+
11
+ # Replace the old type definition with the new one
12
+ $updatedContent = $fileContent -replace $oldTypeDefinition, $newTypeDefinition
13
+
14
+ # Write the updated content back to the file
15
+ $updatedContent | Set-Content $filePath
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "name": "@periskope/types",
3
- "version": "0.6.85",
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
- }
2
+ "name": "@periskope/types",
3
+ "version": "0.6.86",
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
+ }