@periskope/types 0.6.84 → 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.
- package/dist/supabase.types.d.ts +46 -48
- package/dist/types.d.ts +36 -0
- package/mod_json_type.ps1 +15 -15
- package/package.json +17 -17
- package/supabase.types.ts +46 -50
- package/tsconfig.json +105 -105
- package/types.ts +50 -0
- package/update_package.ps1 +21 -21
package/dist/supabase.types.d.ts
CHANGED
|
@@ -236,6 +236,8 @@ 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;
|
|
240
|
+
flag_response_time: number | null;
|
|
239
241
|
forwarding_score: number | null;
|
|
240
242
|
from: string | null;
|
|
241
243
|
from_me: boolean | null;
|
|
@@ -284,6 +286,8 @@ export type Database = {
|
|
|
284
286
|
delivery_info?: Json | null;
|
|
285
287
|
device_type?: string | null;
|
|
286
288
|
duration?: string | null;
|
|
289
|
+
flag_metadata?: Json | null;
|
|
290
|
+
flag_response_time?: number | null;
|
|
287
291
|
forwarding_score?: number | null;
|
|
288
292
|
from?: string | null;
|
|
289
293
|
from_me?: boolean | null;
|
|
@@ -332,6 +336,8 @@ export type Database = {
|
|
|
332
336
|
delivery_info?: Json | null;
|
|
333
337
|
device_type?: string | null;
|
|
334
338
|
duration?: string | null;
|
|
339
|
+
flag_metadata?: Json | null;
|
|
340
|
+
flag_response_time?: number | null;
|
|
335
341
|
forwarding_score?: number | null;
|
|
336
342
|
from?: string | null;
|
|
337
343
|
from_me?: boolean | null;
|
|
@@ -469,18 +475,24 @@ export type Database = {
|
|
|
469
475
|
Row: {
|
|
470
476
|
chat_id: string;
|
|
471
477
|
custom_properties: Json | null;
|
|
478
|
+
flag_count: number;
|
|
479
|
+
hubspot_metadata: Json | null;
|
|
472
480
|
label_ids: Json | null;
|
|
473
481
|
org_id: string;
|
|
474
482
|
};
|
|
475
483
|
Insert: {
|
|
476
484
|
chat_id: string;
|
|
477
485
|
custom_properties?: Json | null;
|
|
486
|
+
flag_count?: number;
|
|
487
|
+
hubspot_metadata?: Json | null;
|
|
478
488
|
label_ids?: Json | null;
|
|
479
489
|
org_id: string;
|
|
480
490
|
};
|
|
481
491
|
Update: {
|
|
482
492
|
chat_id?: string;
|
|
483
493
|
custom_properties?: Json | null;
|
|
494
|
+
flag_count?: number;
|
|
495
|
+
hubspot_metadata?: Json | null;
|
|
484
496
|
label_ids?: Json | null;
|
|
485
497
|
org_id?: string;
|
|
486
498
|
};
|
|
@@ -554,6 +566,7 @@ export type Database = {
|
|
|
554
566
|
chat_id: string;
|
|
555
567
|
created_at: string;
|
|
556
568
|
due_date: string | null;
|
|
569
|
+
hubspot_metadata: Json | null;
|
|
557
570
|
is_deleted: boolean;
|
|
558
571
|
label_ids: Json | null;
|
|
559
572
|
last_updated_at: string;
|
|
@@ -571,6 +584,7 @@ export type Database = {
|
|
|
571
584
|
chat_id: string;
|
|
572
585
|
created_at?: string;
|
|
573
586
|
due_date?: string | null;
|
|
587
|
+
hubspot_metadata?: Json | null;
|
|
574
588
|
is_deleted?: boolean;
|
|
575
589
|
label_ids?: Json | null;
|
|
576
590
|
last_updated_at?: string;
|
|
@@ -588,6 +602,7 @@ export type Database = {
|
|
|
588
602
|
chat_id?: string;
|
|
589
603
|
created_at?: string;
|
|
590
604
|
due_date?: string | null;
|
|
605
|
+
hubspot_metadata?: Json | null;
|
|
591
606
|
is_deleted?: boolean;
|
|
592
607
|
label_ids?: Json | null;
|
|
593
608
|
last_updated_at?: string;
|
|
@@ -839,52 +854,6 @@ export type Database = {
|
|
|
839
854
|
}
|
|
840
855
|
];
|
|
841
856
|
};
|
|
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
857
|
tbl_integration_hooks: {
|
|
889
858
|
Row: {
|
|
890
859
|
hook_url: string;
|
|
@@ -996,6 +965,7 @@ export type Database = {
|
|
|
996
965
|
org_id: string;
|
|
997
966
|
role: string;
|
|
998
967
|
token: string;
|
|
968
|
+
token_metadata: Json | null;
|
|
999
969
|
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
1000
970
|
};
|
|
1001
971
|
Insert: {
|
|
@@ -1007,6 +977,7 @@ export type Database = {
|
|
|
1007
977
|
org_id: string;
|
|
1008
978
|
role: string;
|
|
1009
979
|
token: string;
|
|
980
|
+
token_metadata?: Json | null;
|
|
1010
981
|
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
1011
982
|
};
|
|
1012
983
|
Update: {
|
|
@@ -1018,6 +989,7 @@ export type Database = {
|
|
|
1018
989
|
org_id?: string;
|
|
1019
990
|
role?: string;
|
|
1020
991
|
token?: string;
|
|
992
|
+
token_metadata?: Json | null;
|
|
1021
993
|
type?: Database["public"]["Enums"]["enum_integration_type"];
|
|
1022
994
|
};
|
|
1023
995
|
Relationships: [
|
|
@@ -1376,7 +1348,9 @@ export type Database = {
|
|
|
1376
1348
|
chat_type: string | null;
|
|
1377
1349
|
created_at: string | null;
|
|
1378
1350
|
custom_properties: Json | null;
|
|
1351
|
+
flag_count: number | null;
|
|
1379
1352
|
group_description: string | null;
|
|
1353
|
+
hubspot_metadata: Json | null;
|
|
1380
1354
|
invite_link: string | null;
|
|
1381
1355
|
is_archived: boolean | null;
|
|
1382
1356
|
is_muted: boolean | null;
|
|
@@ -1396,6 +1370,7 @@ export type Database = {
|
|
|
1396
1370
|
created_at: string | null;
|
|
1397
1371
|
is_enterprise: boolean | null;
|
|
1398
1372
|
is_free_trial: boolean | null;
|
|
1373
|
+
is_hubspot_connected: boolean | null;
|
|
1399
1374
|
org_id: string | null;
|
|
1400
1375
|
org_image: string | null;
|
|
1401
1376
|
org_metadata: Json | null;
|
|
@@ -1415,6 +1390,7 @@ export type Database = {
|
|
|
1415
1390
|
created_at?: string | null;
|
|
1416
1391
|
is_enterprise?: never;
|
|
1417
1392
|
is_free_trial?: never;
|
|
1393
|
+
is_hubspot_connected?: never;
|
|
1418
1394
|
org_id?: string | null;
|
|
1419
1395
|
org_image?: string | null;
|
|
1420
1396
|
org_metadata?: Json | null;
|
|
@@ -1434,6 +1410,7 @@ export type Database = {
|
|
|
1434
1410
|
created_at?: string | null;
|
|
1435
1411
|
is_enterprise?: never;
|
|
1436
1412
|
is_free_trial?: never;
|
|
1413
|
+
is_hubspot_connected?: never;
|
|
1437
1414
|
org_id?: string | null;
|
|
1438
1415
|
org_image?: string | null;
|
|
1439
1416
|
org_metadata?: Json | null;
|
|
@@ -1453,6 +1430,13 @@ export type Database = {
|
|
|
1453
1430
|
};
|
|
1454
1431
|
};
|
|
1455
1432
|
Functions: {
|
|
1433
|
+
calculate_response_time: {
|
|
1434
|
+
Args: {
|
|
1435
|
+
flag_metadata: Json;
|
|
1436
|
+
message_timestamp: string;
|
|
1437
|
+
};
|
|
1438
|
+
Returns: number;
|
|
1439
|
+
};
|
|
1456
1440
|
gen_id: {
|
|
1457
1441
|
Args: {
|
|
1458
1442
|
prefix: string;
|
|
@@ -1524,8 +1508,8 @@ export type Database = {
|
|
|
1524
1508
|
get_dashboard_statistics: {
|
|
1525
1509
|
Args: {
|
|
1526
1510
|
org_id_input: string;
|
|
1527
|
-
type_input?: string;
|
|
1528
1511
|
interval_input?: unknown;
|
|
1512
|
+
chat_id_input?: string[];
|
|
1529
1513
|
};
|
|
1530
1514
|
Returns: Json;
|
|
1531
1515
|
};
|
|
@@ -1536,6 +1520,12 @@ export type Database = {
|
|
|
1536
1520
|
};
|
|
1537
1521
|
Returns: Json;
|
|
1538
1522
|
};
|
|
1523
|
+
get_integration_data: {
|
|
1524
|
+
Args: {
|
|
1525
|
+
org_id_input?: string;
|
|
1526
|
+
};
|
|
1527
|
+
Returns: Json;
|
|
1528
|
+
};
|
|
1539
1529
|
get_messages_notifications_reactions: {
|
|
1540
1530
|
Args: {
|
|
1541
1531
|
org_id_input: string;
|
|
@@ -1559,6 +1549,14 @@ export type Database = {
|
|
|
1559
1549
|
};
|
|
1560
1550
|
Returns: Json;
|
|
1561
1551
|
};
|
|
1552
|
+
get_team_metrics: {
|
|
1553
|
+
Args: {
|
|
1554
|
+
org_id_input: string;
|
|
1555
|
+
chat_id_input?: string[];
|
|
1556
|
+
interval_input?: unknown;
|
|
1557
|
+
};
|
|
1558
|
+
Returns: Json;
|
|
1559
|
+
};
|
|
1562
1560
|
get_ticket_info: {
|
|
1563
1561
|
Args: {
|
|
1564
1562
|
ticket_id_input?: string;
|
|
@@ -1748,7 +1746,7 @@ export type Database = {
|
|
|
1748
1746
|
Args: {
|
|
1749
1747
|
name: string;
|
|
1750
1748
|
};
|
|
1751
|
-
Returns:
|
|
1749
|
+
Returns: string[];
|
|
1752
1750
|
};
|
|
1753
1751
|
get_size_by_bucket: {
|
|
1754
1752
|
Args: Record<PropertyKey, never>;
|
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;
|
|
@@ -100,11 +107,25 @@ export type MessageType = OverrideProperties<Tables<'tbl_chat_messages'>, {
|
|
|
100
107
|
chat_id: string;
|
|
101
108
|
message_type: (typeof SUPPORTED_TYPES)[number];
|
|
102
109
|
media: MediaType | null;
|
|
110
|
+
flag_metadata: MessageFlagType | null;
|
|
103
111
|
}>;
|
|
112
|
+
export type MessageFlagType = {
|
|
113
|
+
status: boolean;
|
|
114
|
+
response_type?: 'message' | 'reaction' | 'ticket';
|
|
115
|
+
response_id?: string;
|
|
116
|
+
response_timestamp?: string;
|
|
117
|
+
response_email?: string;
|
|
118
|
+
};
|
|
104
119
|
export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
|
|
105
120
|
label_ids: {
|
|
106
121
|
[key: string]: boolean;
|
|
107
122
|
};
|
|
123
|
+
hubspot_metadata: {
|
|
124
|
+
id: string;
|
|
125
|
+
type: string;
|
|
126
|
+
hubId: string;
|
|
127
|
+
object_data: HubspotObjectDataType;
|
|
128
|
+
} | null;
|
|
108
129
|
}>;
|
|
109
130
|
export type ContactType = Merge<Tables<'tbl_contacts'>, {
|
|
110
131
|
chats: ChatType[] | null;
|
|
@@ -254,6 +275,21 @@ export type APIAuthDetails = {
|
|
|
254
275
|
export type WebhookDataType = OverrideProperties<Tables<'tbl_integration_hooks'>, {
|
|
255
276
|
integration_name: string[];
|
|
256
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
|
+
};
|
|
257
293
|
export type UserPreferences = {
|
|
258
294
|
theme: 'light' | 'dark';
|
|
259
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":
|
|
3
|
-
"version":
|
|
4
|
-
"private":
|
|
5
|
-
"main":
|
|
6
|
-
"types":
|
|
7
|
-
"dependencies":
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"scripts":
|
|
16
|
-
|
|
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
|
+
}
|
package/supabase.types.ts
CHANGED
|
@@ -235,6 +235,8 @@ export type Database = {
|
|
|
235
235
|
delivery_info: Json | null
|
|
236
236
|
device_type: string | null
|
|
237
237
|
duration: string | null
|
|
238
|
+
flag_metadata: Json | null
|
|
239
|
+
flag_response_time: number | null
|
|
238
240
|
forwarding_score: number | null
|
|
239
241
|
from: string | null
|
|
240
242
|
from_me: boolean | null
|
|
@@ -283,6 +285,8 @@ export type Database = {
|
|
|
283
285
|
delivery_info?: Json | null
|
|
284
286
|
device_type?: string | null
|
|
285
287
|
duration?: string | null
|
|
288
|
+
flag_metadata?: Json | null
|
|
289
|
+
flag_response_time?: number | null
|
|
286
290
|
forwarding_score?: number | null
|
|
287
291
|
from?: string | null
|
|
288
292
|
from_me?: boolean | null
|
|
@@ -331,6 +335,8 @@ export type Database = {
|
|
|
331
335
|
delivery_info?: Json | null
|
|
332
336
|
device_type?: string | null
|
|
333
337
|
duration?: string | null
|
|
338
|
+
flag_metadata?: Json | null
|
|
339
|
+
flag_response_time?: number | null
|
|
334
340
|
forwarding_score?: number | null
|
|
335
341
|
from?: string | null
|
|
336
342
|
from_me?: boolean | null
|
|
@@ -468,18 +474,24 @@ export type Database = {
|
|
|
468
474
|
Row: {
|
|
469
475
|
chat_id: string
|
|
470
476
|
custom_properties: Json | null
|
|
477
|
+
flag_count: number
|
|
478
|
+
hubspot_metadata: Json | null
|
|
471
479
|
label_ids: Json | null
|
|
472
480
|
org_id: string
|
|
473
481
|
}
|
|
474
482
|
Insert: {
|
|
475
483
|
chat_id: string
|
|
476
484
|
custom_properties?: Json | null
|
|
485
|
+
flag_count?: number
|
|
486
|
+
hubspot_metadata?: Json | null
|
|
477
487
|
label_ids?: Json | null
|
|
478
488
|
org_id: string
|
|
479
489
|
}
|
|
480
490
|
Update: {
|
|
481
491
|
chat_id?: string
|
|
482
492
|
custom_properties?: Json | null
|
|
493
|
+
flag_count?: number
|
|
494
|
+
hubspot_metadata?: Json | null
|
|
483
495
|
label_ids?: Json | null
|
|
484
496
|
org_id?: string
|
|
485
497
|
}
|
|
@@ -553,6 +565,7 @@ export type Database = {
|
|
|
553
565
|
chat_id: string
|
|
554
566
|
created_at: string
|
|
555
567
|
due_date: string | null
|
|
568
|
+
hubspot_metadata: Json | null
|
|
556
569
|
is_deleted: boolean
|
|
557
570
|
label_ids: Json | null
|
|
558
571
|
last_updated_at: string
|
|
@@ -570,6 +583,7 @@ export type Database = {
|
|
|
570
583
|
chat_id: string
|
|
571
584
|
created_at?: string
|
|
572
585
|
due_date?: string | null
|
|
586
|
+
hubspot_metadata?: Json | null
|
|
573
587
|
is_deleted?: boolean
|
|
574
588
|
label_ids?: Json | null
|
|
575
589
|
last_updated_at?: string
|
|
@@ -589,6 +603,7 @@ export type Database = {
|
|
|
589
603
|
chat_id?: string
|
|
590
604
|
created_at?: string
|
|
591
605
|
due_date?: string | null
|
|
606
|
+
hubspot_metadata?: Json | null
|
|
592
607
|
is_deleted?: boolean
|
|
593
608
|
label_ids?: Json | null
|
|
594
609
|
last_updated_at?: string
|
|
@@ -842,52 +857,6 @@ export type Database = {
|
|
|
842
857
|
}
|
|
843
858
|
]
|
|
844
859
|
}
|
|
845
|
-
tbl_flagged_messages: {
|
|
846
|
-
Row: {
|
|
847
|
-
chat_id: string | null
|
|
848
|
-
message_timestamp: string | null
|
|
849
|
-
org_id: string
|
|
850
|
-
responder_email: string | null
|
|
851
|
-
response_id: string | null
|
|
852
|
-
response_timestamp: string | null
|
|
853
|
-
response_type: string | null
|
|
854
|
-
unique_id: string
|
|
855
|
-
}
|
|
856
|
-
Insert: {
|
|
857
|
-
chat_id?: string | null
|
|
858
|
-
message_timestamp?: string | null
|
|
859
|
-
org_id: string
|
|
860
|
-
responder_email?: string | null
|
|
861
|
-
response_id?: string | null
|
|
862
|
-
response_timestamp?: string | null
|
|
863
|
-
response_type?: string | null
|
|
864
|
-
unique_id: string
|
|
865
|
-
}
|
|
866
|
-
Update: {
|
|
867
|
-
chat_id?: string | null
|
|
868
|
-
message_timestamp?: string | null
|
|
869
|
-
org_id?: string
|
|
870
|
-
responder_email?: string | null
|
|
871
|
-
response_id?: string | null
|
|
872
|
-
response_timestamp?: string | null
|
|
873
|
-
response_type?: string | null
|
|
874
|
-
unique_id?: string
|
|
875
|
-
}
|
|
876
|
-
Relationships: [
|
|
877
|
-
{
|
|
878
|
-
foreignKeyName: "tbl_flagged_messages_org_id_fkey"
|
|
879
|
-
columns: ["org_id"]
|
|
880
|
-
referencedRelation: "tbl_org"
|
|
881
|
-
referencedColumns: ["org_id"]
|
|
882
|
-
},
|
|
883
|
-
{
|
|
884
|
-
foreignKeyName: "tbl_flagged_messages_org_id_fkey"
|
|
885
|
-
columns: ["org_id"]
|
|
886
|
-
referencedRelation: "view_org"
|
|
887
|
-
referencedColumns: ["org_id"]
|
|
888
|
-
}
|
|
889
|
-
]
|
|
890
|
-
}
|
|
891
860
|
tbl_integration_hooks: {
|
|
892
861
|
Row: {
|
|
893
862
|
hook_url: string
|
|
@@ -999,6 +968,7 @@ export type Database = {
|
|
|
999
968
|
org_id: string
|
|
1000
969
|
role: string
|
|
1001
970
|
token: string
|
|
971
|
+
token_metadata: Json | null
|
|
1002
972
|
type: Database["public"]["Enums"]["enum_integration_type"]
|
|
1003
973
|
}
|
|
1004
974
|
Insert: {
|
|
@@ -1010,6 +980,7 @@ export type Database = {
|
|
|
1010
980
|
org_id: string
|
|
1011
981
|
role: string
|
|
1012
982
|
token: string
|
|
983
|
+
token_metadata?: Json | null
|
|
1013
984
|
type: Database["public"]["Enums"]["enum_integration_type"]
|
|
1014
985
|
}
|
|
1015
986
|
Update: {
|
|
@@ -1021,6 +992,7 @@ export type Database = {
|
|
|
1021
992
|
org_id?: string
|
|
1022
993
|
role?: string
|
|
1023
994
|
token?: string
|
|
995
|
+
token_metadata?: Json | null
|
|
1024
996
|
type?: Database["public"]["Enums"]["enum_integration_type"]
|
|
1025
997
|
}
|
|
1026
998
|
Relationships: [
|
|
@@ -1379,7 +1351,9 @@ export type Database = {
|
|
|
1379
1351
|
chat_type: string | null
|
|
1380
1352
|
created_at: string | null
|
|
1381
1353
|
custom_properties: Json | null
|
|
1354
|
+
flag_count: number | null
|
|
1382
1355
|
group_description: string | null
|
|
1356
|
+
hubspot_metadata: Json | null
|
|
1383
1357
|
invite_link: string | null
|
|
1384
1358
|
is_archived: boolean | null
|
|
1385
1359
|
is_muted: boolean | null
|
|
@@ -1399,6 +1373,7 @@ export type Database = {
|
|
|
1399
1373
|
created_at: string | null
|
|
1400
1374
|
is_enterprise: boolean | null
|
|
1401
1375
|
is_free_trial: boolean | null
|
|
1376
|
+
is_hubspot_connected: boolean | null
|
|
1402
1377
|
org_id: string | null
|
|
1403
1378
|
org_image: string | null
|
|
1404
1379
|
org_metadata: Json | null
|
|
@@ -1418,6 +1393,7 @@ export type Database = {
|
|
|
1418
1393
|
created_at?: string | null
|
|
1419
1394
|
is_enterprise?: never
|
|
1420
1395
|
is_free_trial?: never
|
|
1396
|
+
is_hubspot_connected?: never
|
|
1421
1397
|
org_id?: string | null
|
|
1422
1398
|
org_image?: string | null
|
|
1423
1399
|
org_metadata?: Json | null
|
|
@@ -1437,6 +1413,7 @@ export type Database = {
|
|
|
1437
1413
|
created_at?: string | null
|
|
1438
1414
|
is_enterprise?: never
|
|
1439
1415
|
is_free_trial?: never
|
|
1416
|
+
is_hubspot_connected?: never
|
|
1440
1417
|
org_id?: string | null
|
|
1441
1418
|
org_image?: string | null
|
|
1442
1419
|
org_metadata?: Json | null
|
|
@@ -1456,6 +1433,13 @@ export type Database = {
|
|
|
1456
1433
|
}
|
|
1457
1434
|
}
|
|
1458
1435
|
Functions: {
|
|
1436
|
+
calculate_response_time: {
|
|
1437
|
+
Args: {
|
|
1438
|
+
flag_metadata: Json
|
|
1439
|
+
message_timestamp: string
|
|
1440
|
+
}
|
|
1441
|
+
Returns: number
|
|
1442
|
+
}
|
|
1459
1443
|
gen_id: {
|
|
1460
1444
|
Args: {
|
|
1461
1445
|
prefix: string
|
|
@@ -1527,8 +1511,8 @@ export type Database = {
|
|
|
1527
1511
|
get_dashboard_statistics: {
|
|
1528
1512
|
Args: {
|
|
1529
1513
|
org_id_input: string
|
|
1530
|
-
type_input?: string
|
|
1531
1514
|
interval_input?: unknown
|
|
1515
|
+
chat_id_input?: string[]
|
|
1532
1516
|
}
|
|
1533
1517
|
Returns: Json
|
|
1534
1518
|
}
|
|
@@ -1539,6 +1523,12 @@ export type Database = {
|
|
|
1539
1523
|
}
|
|
1540
1524
|
Returns: Json
|
|
1541
1525
|
}
|
|
1526
|
+
get_integration_data: {
|
|
1527
|
+
Args: {
|
|
1528
|
+
org_id_input?: string
|
|
1529
|
+
}
|
|
1530
|
+
Returns: Json
|
|
1531
|
+
}
|
|
1542
1532
|
get_messages_notifications_reactions: {
|
|
1543
1533
|
Args: {
|
|
1544
1534
|
org_id_input: string
|
|
@@ -1562,6 +1552,14 @@ export type Database = {
|
|
|
1562
1552
|
}
|
|
1563
1553
|
Returns: Json
|
|
1564
1554
|
}
|
|
1555
|
+
get_team_metrics: {
|
|
1556
|
+
Args: {
|
|
1557
|
+
org_id_input: string
|
|
1558
|
+
chat_id_input?: string[]
|
|
1559
|
+
interval_input?: unknown
|
|
1560
|
+
}
|
|
1561
|
+
Returns: Json
|
|
1562
|
+
}
|
|
1565
1563
|
get_ticket_info: {
|
|
1566
1564
|
Args: {
|
|
1567
1565
|
ticket_id_input?: string
|
|
@@ -1794,7 +1792,7 @@ export type Database = {
|
|
|
1794
1792
|
Args: {
|
|
1795
1793
|
name: string
|
|
1796
1794
|
}
|
|
1797
|
-
Returns:
|
|
1795
|
+
Returns: string[]
|
|
1798
1796
|
}
|
|
1799
1797
|
get_size_by_bucket: {
|
|
1800
1798
|
Args: Record<PropertyKey, never>
|
|
@@ -1914,5 +1912,3 @@ export type Enums<
|
|
|
1914
1912
|
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
1915
1913
|
? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
1916
1914
|
: never
|
|
1917
|
-
|
|
1918
|
-
|
package/tsconfig.json
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
-
/* Projects */
|
|
5
|
-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
6
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
7
|
-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
8
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
9
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
10
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
11
|
-
/* Language and Environment */
|
|
12
|
-
"target": "ES2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
13
|
-
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
14
|
-
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
15
|
-
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
16
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
17
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
18
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
19
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
20
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
21
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
22
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
23
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
24
|
-
/* Modules */
|
|
25
|
-
"module": "CommonJS", /* Specify what module code is generated. */
|
|
26
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
27
|
-
// "moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
28
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
29
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
30
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
31
|
-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
32
|
-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
33
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
34
|
-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
35
|
-
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
36
|
-
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
37
|
-
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
38
|
-
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
39
|
-
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
40
|
-
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
41
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
42
|
-
/* JavaScript Support */
|
|
43
|
-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
44
|
-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
45
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
46
|
-
/* Emit */
|
|
47
|
-
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
48
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
49
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
50
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
51
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
52
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
53
|
-
"outDir": "dist/", /* Specify an output folder for all emitted files. */
|
|
54
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
55
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
56
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
57
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
58
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
59
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
60
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
62
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
63
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
64
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
65
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
66
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
67
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
68
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
69
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
70
|
-
/* Interop Constraints */
|
|
71
|
-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
72
|
-
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
73
|
-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
74
|
-
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
75
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
76
|
-
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
77
|
-
/* Type Checking */
|
|
78
|
-
"strict": true, /* Enable all strict type-checking options. */
|
|
79
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
80
|
-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
81
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
82
|
-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
83
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
84
|
-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
85
|
-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
86
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
87
|
-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
88
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
89
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
90
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
91
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
92
|
-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
93
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
94
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
95
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
96
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
97
|
-
/* Completeness */
|
|
98
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
99
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
100
|
-
},
|
|
101
|
-
"exclude": [
|
|
102
|
-
"node_modules",
|
|
103
|
-
"dist",
|
|
104
|
-
"scripts"
|
|
105
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
/* Projects */
|
|
5
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
6
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
7
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
8
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
9
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
10
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
11
|
+
/* Language and Environment */
|
|
12
|
+
"target": "ES2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
13
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
14
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
15
|
+
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
16
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
17
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
18
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
19
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
20
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
21
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
22
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
23
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
24
|
+
/* Modules */
|
|
25
|
+
"module": "CommonJS", /* Specify what module code is generated. */
|
|
26
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
27
|
+
// "moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
28
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
29
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
30
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
31
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
32
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
33
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
34
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
35
|
+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
36
|
+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
37
|
+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
38
|
+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
39
|
+
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
40
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
41
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
42
|
+
/* JavaScript Support */
|
|
43
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
44
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
45
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
46
|
+
/* Emit */
|
|
47
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
48
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
49
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
50
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
51
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
52
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
53
|
+
"outDir": "dist/", /* Specify an output folder for all emitted files. */
|
|
54
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
55
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
56
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
57
|
+
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
|
|
58
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
59
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
60
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
61
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
62
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
63
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
64
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
65
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
66
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
67
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
68
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
69
|
+
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
70
|
+
/* Interop Constraints */
|
|
71
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
72
|
+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
73
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
74
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
75
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
76
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
77
|
+
/* Type Checking */
|
|
78
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
79
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
80
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
81
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
82
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
83
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
84
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
85
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
86
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
87
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
88
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
89
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
90
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
91
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
92
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
93
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
94
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
95
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
96
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
97
|
+
/* Completeness */
|
|
98
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
99
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
100
|
+
},
|
|
101
|
+
"exclude": [
|
|
102
|
+
"node_modules",
|
|
103
|
+
"dist",
|
|
104
|
+
"scripts"
|
|
105
|
+
]
|
|
106
106
|
}
|
package/types.ts
CHANGED
|
@@ -80,6 +80,7 @@ export type OrgType = OverrideProperties<
|
|
|
80
80
|
subscription_status: 'active' | 'inactive' | 'unpaid';
|
|
81
81
|
is_enterprise: boolean;
|
|
82
82
|
is_free_trial: boolean;
|
|
83
|
+
is_hubspot_connected: boolean;
|
|
83
84
|
}
|
|
84
85
|
>,
|
|
85
86
|
{
|
|
@@ -107,10 +108,20 @@ export type ChatType = Merge<
|
|
|
107
108
|
label_ids: { [key: string]: boolean };
|
|
108
109
|
chat_org_phones?: string[];
|
|
109
110
|
message_unread_count: number | null;
|
|
111
|
+
hubspot_metadata: {
|
|
112
|
+
id: string;
|
|
113
|
+
type: string;
|
|
114
|
+
hubId: string;
|
|
115
|
+
object_data: HubspotObjectDataType;
|
|
116
|
+
} | null;
|
|
110
117
|
// is_open?: boolean;
|
|
111
118
|
}
|
|
112
119
|
>;
|
|
113
120
|
|
|
121
|
+
/* -------------------------------------------------------------------------- */
|
|
122
|
+
/* MESSAGE */
|
|
123
|
+
/* -------------------------------------------------------------------------- */
|
|
124
|
+
|
|
114
125
|
export type MediaType = {
|
|
115
126
|
path: string;
|
|
116
127
|
mimetype?: string;
|
|
@@ -129,12 +140,31 @@ export type MessageType = OverrideProperties<
|
|
|
129
140
|
chat_id: string;
|
|
130
141
|
message_type: (typeof SUPPORTED_TYPES)[number];
|
|
131
142
|
media: MediaType | null;
|
|
143
|
+
flag_metadata: MessageFlagType | null;
|
|
132
144
|
}
|
|
133
145
|
>;
|
|
146
|
+
|
|
147
|
+
export type MessageFlagType = {
|
|
148
|
+
status: boolean;
|
|
149
|
+
response_type?: 'message' | 'reaction' | 'ticket';
|
|
150
|
+
response_id?: string;
|
|
151
|
+
response_timestamp?: string;
|
|
152
|
+
response_email?: string;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
/* -------------------------------------------------------------------------- */
|
|
157
|
+
|
|
134
158
|
export type TicketType = OverrideProperties<
|
|
135
159
|
Tables<'tbl_chat_tickets'>,
|
|
136
160
|
{
|
|
137
161
|
label_ids: { [key: string]: boolean };
|
|
162
|
+
hubspot_metadata: {
|
|
163
|
+
id: string;
|
|
164
|
+
type: string;
|
|
165
|
+
hubId: string;
|
|
166
|
+
object_data: HubspotObjectDataType;
|
|
167
|
+
} | null;
|
|
138
168
|
}
|
|
139
169
|
>;
|
|
140
170
|
export type ContactType = Merge<
|
|
@@ -390,6 +420,25 @@ export type WebhookDataType = OverrideProperties<
|
|
|
390
420
|
}
|
|
391
421
|
>;
|
|
392
422
|
|
|
423
|
+
export type HubspotObjectDataType = {
|
|
424
|
+
createdAt: string;
|
|
425
|
+
archived: boolean;
|
|
426
|
+
id: string;
|
|
427
|
+
type: 'contacts' | 'tickets' | 'companies';
|
|
428
|
+
properties: Record<
|
|
429
|
+
string,
|
|
430
|
+
{
|
|
431
|
+
groupLabel: string;
|
|
432
|
+
groupName: string;
|
|
433
|
+
propertyKeyName: string;
|
|
434
|
+
propertyKey: string;
|
|
435
|
+
propertyInternalValue: string;
|
|
436
|
+
propertyValue: string;
|
|
437
|
+
propertyType: string;
|
|
438
|
+
}[]
|
|
439
|
+
>;
|
|
440
|
+
};
|
|
441
|
+
|
|
393
442
|
/* ---------------------------- USER PREFERENCES ---------------------------- */
|
|
394
443
|
|
|
395
444
|
export type UserPreferences = {
|
|
@@ -399,3 +448,4 @@ export type UserPreferences = {
|
|
|
399
448
|
right_sidepanel_open: boolean;
|
|
400
449
|
sync_wa_unread_count: boolean;
|
|
401
450
|
};
|
|
451
|
+
|
package/update_package.ps1
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# Define the path to your package.json file
|
|
2
|
-
$packageJsonPath = "./package.json"
|
|
3
|
-
|
|
4
|
-
# Read the package.json file
|
|
5
|
-
$packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json
|
|
6
|
-
|
|
7
|
-
# Increment the patch version
|
|
8
|
-
$versionParts = $packageJson.version -split '\.'
|
|
9
|
-
$versionParts[2] = [int]$versionParts[2] + 1
|
|
10
|
-
$newVersion = $versionParts -join '.'
|
|
11
|
-
|
|
12
|
-
Write-Host "Updating package version to $newVersion"
|
|
13
|
-
|
|
14
|
-
# Update the version in the object
|
|
15
|
-
$packageJson.version = $newVersion
|
|
16
|
-
|
|
17
|
-
# Convert the object back to JSON and save
|
|
18
|
-
$packageJson | ConvertTo-Json -Depth 100 | Set-Content $packageJsonPath
|
|
19
|
-
|
|
20
|
-
# Run npm command
|
|
21
|
-
npm run update-package
|
|
1
|
+
# Define the path to your package.json file
|
|
2
|
+
$packageJsonPath = "./package.json"
|
|
3
|
+
|
|
4
|
+
# Read the package.json file
|
|
5
|
+
$packageJson = Get-Content $packageJsonPath -Raw | ConvertFrom-Json
|
|
6
|
+
|
|
7
|
+
# Increment the patch version
|
|
8
|
+
$versionParts = $packageJson.version -split '\.'
|
|
9
|
+
$versionParts[2] = [int]$versionParts[2] + 1
|
|
10
|
+
$newVersion = $versionParts -join '.'
|
|
11
|
+
|
|
12
|
+
Write-Host "Updating package version to $newVersion"
|
|
13
|
+
|
|
14
|
+
# Update the version in the object
|
|
15
|
+
$packageJson.version = $newVersion
|
|
16
|
+
|
|
17
|
+
# Convert the object back to JSON and save
|
|
18
|
+
$packageJson | ConvertTo-Json -Depth 100 | Set-Content $packageJsonPath
|
|
19
|
+
|
|
20
|
+
# Run npm command
|
|
21
|
+
npm run update-package
|