@periskope/types 0.6.309 → 0.6.310
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/rules.types.d.ts +47 -19
- package/dist/rules.types.d.ts.map +1 -1
- package/dist/rules.types.js +51 -0
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/mod_json_type.ps1 +108 -108
- package/mod_json_type.sh +22 -22
- package/package.json +19 -19
- package/src/index.ts +4 -4
- package/src/object.types.ts +100 -100
- package/src/rules.types.ts +2304 -2210
- package/src/supabase.types.ts +3538 -3538
- package/src/types.ts +1511 -1510
- package/src/workflows.types.ts +955 -955
- package/tsconfig.json +37 -37
- package/tsconfig.tsbuildinfo +1 -1
- package/update_package.ps1 +21 -21
package/mod_json_type.ps1
CHANGED
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
# Define the path to the TypeScript file
|
|
2
|
-
$filePath = ".\src\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
|
-
# Update interface to type
|
|
15
|
-
$oldText = 'export interface Database '
|
|
16
|
-
$newText = 'export type Database = '
|
|
17
|
-
|
|
18
|
-
$updatedContent = $updatedContent -replace $oldText, $newText
|
|
19
|
-
|
|
20
|
-
# # Append the new type definition if it doesn't exist
|
|
21
|
-
# $addContent = @"
|
|
22
|
-
# type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
23
|
-
|
|
24
|
-
# export type Tables<
|
|
25
|
-
# PublicTableNameOrOptions extends
|
|
26
|
-
# | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
27
|
-
# | { schema: keyof Database },
|
|
28
|
-
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
29
|
-
# ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
30
|
-
# Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
31
|
-
# : never = never,
|
|
32
|
-
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
33
|
-
# ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
34
|
-
# Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
35
|
-
# Row: infer R
|
|
36
|
-
# }
|
|
37
|
-
# ? R
|
|
38
|
-
# : never
|
|
39
|
-
# : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
40
|
-
# PublicSchema["Views"])
|
|
41
|
-
# ? (PublicSchema["Tables"] &
|
|
42
|
-
# PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
43
|
-
# Row: infer R
|
|
44
|
-
# }
|
|
45
|
-
# ? R
|
|
46
|
-
# : never
|
|
47
|
-
# : never
|
|
48
|
-
|
|
49
|
-
# export type TablesInsert<
|
|
50
|
-
# PublicTableNameOrOptions extends
|
|
51
|
-
# | keyof PublicSchema["Tables"]
|
|
52
|
-
# | { schema: keyof Database },
|
|
53
|
-
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
54
|
-
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
55
|
-
# : never = never,
|
|
56
|
-
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
57
|
-
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
58
|
-
# Insert: infer I
|
|
59
|
-
# }
|
|
60
|
-
# ? I
|
|
61
|
-
# : never
|
|
62
|
-
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
63
|
-
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
64
|
-
# Insert: infer I
|
|
65
|
-
# }
|
|
66
|
-
# ? I
|
|
67
|
-
# : never
|
|
68
|
-
# : never
|
|
69
|
-
|
|
70
|
-
# export type TablesUpdate<
|
|
71
|
-
# PublicTableNameOrOptions extends
|
|
72
|
-
# | keyof PublicSchema["Tables"]
|
|
73
|
-
# | { schema: keyof Database },
|
|
74
|
-
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
75
|
-
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
76
|
-
# : never = never,
|
|
77
|
-
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
78
|
-
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
79
|
-
# Update: infer U
|
|
80
|
-
# }
|
|
81
|
-
# ? U
|
|
82
|
-
# : never
|
|
83
|
-
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
84
|
-
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
85
|
-
# Update: infer U
|
|
86
|
-
# }
|
|
87
|
-
# ? U
|
|
88
|
-
# : never
|
|
89
|
-
# : never
|
|
90
|
-
|
|
91
|
-
# export type Enums<
|
|
92
|
-
# PublicEnumNameOrOptions extends
|
|
93
|
-
# | keyof PublicSchema["Enums"]
|
|
94
|
-
# | { schema: keyof Database },
|
|
95
|
-
# EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
96
|
-
# ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
97
|
-
# : never = never,
|
|
98
|
-
# > = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
99
|
-
# ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
100
|
-
# : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
101
|
-
# ? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
102
|
-
# : never
|
|
103
|
-
# "@
|
|
104
|
-
|
|
105
|
-
# # Append the new content to the updated content
|
|
106
|
-
# $updatedContent += $addContent
|
|
107
|
-
|
|
108
|
-
# Write the updated content back to the file
|
|
1
|
+
# Define the path to the TypeScript file
|
|
2
|
+
$filePath = ".\src\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
|
+
# Update interface to type
|
|
15
|
+
$oldText = 'export interface Database '
|
|
16
|
+
$newText = 'export type Database = '
|
|
17
|
+
|
|
18
|
+
$updatedContent = $updatedContent -replace $oldText, $newText
|
|
19
|
+
|
|
20
|
+
# # Append the new type definition if it doesn't exist
|
|
21
|
+
# $addContent = @"
|
|
22
|
+
# type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
23
|
+
|
|
24
|
+
# export type Tables<
|
|
25
|
+
# PublicTableNameOrOptions extends
|
|
26
|
+
# | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
27
|
+
# | { schema: keyof Database },
|
|
28
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
29
|
+
# ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
30
|
+
# Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
31
|
+
# : never = never,
|
|
32
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
33
|
+
# ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
34
|
+
# Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
35
|
+
# Row: infer R
|
|
36
|
+
# }
|
|
37
|
+
# ? R
|
|
38
|
+
# : never
|
|
39
|
+
# : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
40
|
+
# PublicSchema["Views"])
|
|
41
|
+
# ? (PublicSchema["Tables"] &
|
|
42
|
+
# PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
43
|
+
# Row: infer R
|
|
44
|
+
# }
|
|
45
|
+
# ? R
|
|
46
|
+
# : never
|
|
47
|
+
# : never
|
|
48
|
+
|
|
49
|
+
# export type TablesInsert<
|
|
50
|
+
# PublicTableNameOrOptions extends
|
|
51
|
+
# | keyof PublicSchema["Tables"]
|
|
52
|
+
# | { schema: keyof Database },
|
|
53
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
54
|
+
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
55
|
+
# : never = never,
|
|
56
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
57
|
+
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
58
|
+
# Insert: infer I
|
|
59
|
+
# }
|
|
60
|
+
# ? I
|
|
61
|
+
# : never
|
|
62
|
+
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
63
|
+
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
64
|
+
# Insert: infer I
|
|
65
|
+
# }
|
|
66
|
+
# ? I
|
|
67
|
+
# : never
|
|
68
|
+
# : never
|
|
69
|
+
|
|
70
|
+
# export type TablesUpdate<
|
|
71
|
+
# PublicTableNameOrOptions extends
|
|
72
|
+
# | keyof PublicSchema["Tables"]
|
|
73
|
+
# | { schema: keyof Database },
|
|
74
|
+
# TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
75
|
+
# ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
76
|
+
# : never = never,
|
|
77
|
+
# > = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
78
|
+
# ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
79
|
+
# Update: infer U
|
|
80
|
+
# }
|
|
81
|
+
# ? U
|
|
82
|
+
# : never
|
|
83
|
+
# : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
84
|
+
# ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
85
|
+
# Update: infer U
|
|
86
|
+
# }
|
|
87
|
+
# ? U
|
|
88
|
+
# : never
|
|
89
|
+
# : never
|
|
90
|
+
|
|
91
|
+
# export type Enums<
|
|
92
|
+
# PublicEnumNameOrOptions extends
|
|
93
|
+
# | keyof PublicSchema["Enums"]
|
|
94
|
+
# | { schema: keyof Database },
|
|
95
|
+
# EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
96
|
+
# ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
97
|
+
# : never = never,
|
|
98
|
+
# > = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
99
|
+
# ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
100
|
+
# : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
101
|
+
# ? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
102
|
+
# : never
|
|
103
|
+
# "@
|
|
104
|
+
|
|
105
|
+
# # Append the new content to the updated content
|
|
106
|
+
# $updatedContent += $addContent
|
|
107
|
+
|
|
108
|
+
# Write the updated content back to the file
|
|
109
109
|
$updatedContent | Set-Content $filePath
|
package/mod_json_type.sh
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Define the path to the TypeScript file
|
|
4
|
-
filePath="./src/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
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Define the path to the TypeScript file
|
|
4
|
+
filePath="./src/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
23
|
echo "$updatedContent" > "$filePath"
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@periskope/types",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"private": false,
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"dependencies": {
|
|
8
|
-
"@types/pg": "8.11.2",
|
|
9
|
-
"pg": "^8.11.3",
|
|
10
|
-
"stripe": "17.6.0",
|
|
11
|
-
"ts-node": "^10.9.2",
|
|
12
|
-
"type-fest": "^4.8.3"
|
|
13
|
-
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"dev": "tsc --watch",
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"update-package": "tsc && npm publish --access public"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@periskope/types",
|
|
3
|
+
"version": "0.6.310",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@types/pg": "8.11.2",
|
|
9
|
+
"pg": "^8.11.3",
|
|
10
|
+
"stripe": "17.6.0",
|
|
11
|
+
"ts-node": "^10.9.2",
|
|
12
|
+
"type-fest": "^4.8.3"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "tsc --watch",
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"update-package": "tsc && npm publish --access public"
|
|
18
|
+
}
|
|
19
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './object.types';
|
|
2
|
-
export * from './rules.types';
|
|
3
|
-
export * from './supabase.types';
|
|
4
|
-
export * from './types';
|
|
1
|
+
export * from './object.types';
|
|
2
|
+
export * from './rules.types';
|
|
3
|
+
export * from './supabase.types';
|
|
4
|
+
export * from './types';
|
|
5
5
|
export * from './workflows.types';
|
package/src/object.types.ts
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { Merge, OverrideProperties } from 'type-fest';
|
|
2
|
-
import {
|
|
3
|
-
ChatType,
|
|
4
|
-
ContactType,
|
|
5
|
-
MessageType,
|
|
6
|
-
NotificationType,
|
|
7
|
-
PhoneType,
|
|
8
|
-
ReactionType,
|
|
9
|
-
} from './types';
|
|
10
|
-
|
|
11
|
-
export type ObjChatType = Merge<
|
|
12
|
-
ChatType,
|
|
13
|
-
{
|
|
14
|
-
labels: string[];
|
|
15
|
-
}
|
|
16
|
-
>;
|
|
17
|
-
|
|
18
|
-
export type ObjChatNotificationType = OverrideProperties<
|
|
19
|
-
NotificationType,
|
|
20
|
-
{
|
|
21
|
-
id: {
|
|
22
|
-
id: string;
|
|
23
|
-
fromMe: boolean;
|
|
24
|
-
remote: string;
|
|
25
|
-
serialized: string;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
>;
|
|
29
|
-
|
|
30
|
-
export type ObjMessageType = OverrideProperties<
|
|
31
|
-
MessageType,
|
|
32
|
-
{
|
|
33
|
-
id: {
|
|
34
|
-
id: string;
|
|
35
|
-
fromMe: boolean;
|
|
36
|
-
remote: string;
|
|
37
|
-
_serialized: string;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
>;
|
|
41
|
-
|
|
42
|
-
export type ObjReactionType = OverrideProperties<
|
|
43
|
-
ReactionType,
|
|
44
|
-
{
|
|
45
|
-
id: {
|
|
46
|
-
id: string;
|
|
47
|
-
fromMe: boolean;
|
|
48
|
-
remote: string;
|
|
49
|
-
_serialized: string;
|
|
50
|
-
};
|
|
51
|
-
msg_id: {
|
|
52
|
-
id: string;
|
|
53
|
-
fromMe: boolean;
|
|
54
|
-
remote: string;
|
|
55
|
-
_serialized: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
>;
|
|
59
|
-
|
|
60
|
-
export type ObjContactType = Merge<
|
|
61
|
-
Pick<
|
|
62
|
-
ContactType,
|
|
63
|
-
| 'chat_ids'
|
|
64
|
-
| 'contact_color'
|
|
65
|
-
| 'contact_id'
|
|
66
|
-
| 'contact_image'
|
|
67
|
-
| 'contact_name'
|
|
68
|
-
| 'contact_type'
|
|
69
|
-
| 'is_imported'
|
|
70
|
-
| 'is_internal'
|
|
71
|
-
| 'is_my_contact'
|
|
72
|
-
| 'is_wa_contact'
|
|
73
|
-
| 'org_id'
|
|
74
|
-
| 'updated_at'
|
|
75
|
-
>,
|
|
76
|
-
{
|
|
77
|
-
labels: string[];
|
|
78
|
-
}
|
|
79
|
-
>;
|
|
80
|
-
|
|
81
|
-
export type ObjPhoneType = Merge<
|
|
82
|
-
Pick<
|
|
83
|
-
PhoneType,
|
|
84
|
-
| 'org_id'
|
|
85
|
-
| 'org_phone'
|
|
86
|
-
| 'created_at'
|
|
87
|
-
| 'updated_at'
|
|
88
|
-
| 'wa_state'
|
|
89
|
-
| 'phone_id'
|
|
90
|
-
| 'qr_code'
|
|
91
|
-
| 'phone_image'
|
|
92
|
-
| 'phone_name'
|
|
93
|
-
| 'first_connected_at'
|
|
94
|
-
| 'is_ready'
|
|
95
|
-
| 'label_ids'
|
|
96
|
-
>,
|
|
97
|
-
{
|
|
98
|
-
labels: string[];
|
|
99
|
-
}
|
|
100
|
-
>;
|
|
1
|
+
import { Merge, OverrideProperties } from 'type-fest';
|
|
2
|
+
import {
|
|
3
|
+
ChatType,
|
|
4
|
+
ContactType,
|
|
5
|
+
MessageType,
|
|
6
|
+
NotificationType,
|
|
7
|
+
PhoneType,
|
|
8
|
+
ReactionType,
|
|
9
|
+
} from './types';
|
|
10
|
+
|
|
11
|
+
export type ObjChatType = Merge<
|
|
12
|
+
ChatType,
|
|
13
|
+
{
|
|
14
|
+
labels: string[];
|
|
15
|
+
}
|
|
16
|
+
>;
|
|
17
|
+
|
|
18
|
+
export type ObjChatNotificationType = OverrideProperties<
|
|
19
|
+
NotificationType,
|
|
20
|
+
{
|
|
21
|
+
id: {
|
|
22
|
+
id: string;
|
|
23
|
+
fromMe: boolean;
|
|
24
|
+
remote: string;
|
|
25
|
+
serialized: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export type ObjMessageType = OverrideProperties<
|
|
31
|
+
MessageType,
|
|
32
|
+
{
|
|
33
|
+
id: {
|
|
34
|
+
id: string;
|
|
35
|
+
fromMe: boolean;
|
|
36
|
+
remote: string;
|
|
37
|
+
_serialized: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
export type ObjReactionType = OverrideProperties<
|
|
43
|
+
ReactionType,
|
|
44
|
+
{
|
|
45
|
+
id: {
|
|
46
|
+
id: string;
|
|
47
|
+
fromMe: boolean;
|
|
48
|
+
remote: string;
|
|
49
|
+
_serialized: string;
|
|
50
|
+
};
|
|
51
|
+
msg_id: {
|
|
52
|
+
id: string;
|
|
53
|
+
fromMe: boolean;
|
|
54
|
+
remote: string;
|
|
55
|
+
_serialized: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
>;
|
|
59
|
+
|
|
60
|
+
export type ObjContactType = Merge<
|
|
61
|
+
Pick<
|
|
62
|
+
ContactType,
|
|
63
|
+
| 'chat_ids'
|
|
64
|
+
| 'contact_color'
|
|
65
|
+
| 'contact_id'
|
|
66
|
+
| 'contact_image'
|
|
67
|
+
| 'contact_name'
|
|
68
|
+
| 'contact_type'
|
|
69
|
+
| 'is_imported'
|
|
70
|
+
| 'is_internal'
|
|
71
|
+
| 'is_my_contact'
|
|
72
|
+
| 'is_wa_contact'
|
|
73
|
+
| 'org_id'
|
|
74
|
+
| 'updated_at'
|
|
75
|
+
>,
|
|
76
|
+
{
|
|
77
|
+
labels: string[];
|
|
78
|
+
}
|
|
79
|
+
>;
|
|
80
|
+
|
|
81
|
+
export type ObjPhoneType = Merge<
|
|
82
|
+
Pick<
|
|
83
|
+
PhoneType,
|
|
84
|
+
| 'org_id'
|
|
85
|
+
| 'org_phone'
|
|
86
|
+
| 'created_at'
|
|
87
|
+
| 'updated_at'
|
|
88
|
+
| 'wa_state'
|
|
89
|
+
| 'phone_id'
|
|
90
|
+
| 'qr_code'
|
|
91
|
+
| 'phone_image'
|
|
92
|
+
| 'phone_name'
|
|
93
|
+
| 'first_connected_at'
|
|
94
|
+
| 'is_ready'
|
|
95
|
+
| 'label_ids'
|
|
96
|
+
>,
|
|
97
|
+
{
|
|
98
|
+
labels: string[];
|
|
99
|
+
}
|
|
100
|
+
>;
|