@periskope/types 0.6.7 → 0.6.9
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 +101 -4
- package/dist/types.d.ts +7 -2
- package/package.json +1 -1
- package/supabase.types.ts +101 -4
- package/types.ts +31 -13
package/dist/supabase.types.d.ts
CHANGED
|
@@ -29,6 +29,101 @@ export interface Database {
|
|
|
29
29
|
};
|
|
30
30
|
public: {
|
|
31
31
|
Tables: {
|
|
32
|
+
tbl_broadcast_scheduled_messages: {
|
|
33
|
+
Row: {
|
|
34
|
+
added_by: string | null;
|
|
35
|
+
chat_ids: Json | null;
|
|
36
|
+
created_at: string;
|
|
37
|
+
message_payload: Json | null;
|
|
38
|
+
org_id: string | null;
|
|
39
|
+
scheduled_at: string | null;
|
|
40
|
+
scheduled_message_id: string;
|
|
41
|
+
status: string | null;
|
|
42
|
+
template_id: string | null;
|
|
43
|
+
};
|
|
44
|
+
Insert: {
|
|
45
|
+
added_by?: string | null;
|
|
46
|
+
chat_ids?: Json | null;
|
|
47
|
+
created_at?: string;
|
|
48
|
+
message_payload?: Json | null;
|
|
49
|
+
org_id?: string | null;
|
|
50
|
+
scheduled_at?: string | null;
|
|
51
|
+
scheduled_message_id?: string;
|
|
52
|
+
status?: string | null;
|
|
53
|
+
template_id?: string | null;
|
|
54
|
+
};
|
|
55
|
+
Update: {
|
|
56
|
+
added_by?: string | null;
|
|
57
|
+
chat_ids?: Json | null;
|
|
58
|
+
created_at?: string;
|
|
59
|
+
message_payload?: Json | null;
|
|
60
|
+
org_id?: string | null;
|
|
61
|
+
scheduled_at?: string | null;
|
|
62
|
+
scheduled_message_id?: string;
|
|
63
|
+
status?: string | null;
|
|
64
|
+
template_id?: string | null;
|
|
65
|
+
};
|
|
66
|
+
Relationships: [
|
|
67
|
+
{
|
|
68
|
+
foreignKeyName: "tbl_broadcast_scheduled_messages_org_id_fkey";
|
|
69
|
+
columns: ["org_id"];
|
|
70
|
+
isOneToOne: false;
|
|
71
|
+
referencedRelation: "tbl_org";
|
|
72
|
+
referencedColumns: ["org_id"];
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
foreignKeyName: "tbl_broadcast_scheduled_messages_template_id_fkey";
|
|
76
|
+
columns: ["template_id"];
|
|
77
|
+
isOneToOne: false;
|
|
78
|
+
referencedRelation: "tbl_broadcast_templates";
|
|
79
|
+
referencedColumns: ["template_id"];
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
};
|
|
83
|
+
tbl_broadcast_templates: {
|
|
84
|
+
Row: {
|
|
85
|
+
body: string | null;
|
|
86
|
+
created_at: string;
|
|
87
|
+
filename: string | null;
|
|
88
|
+
mimetype: string | null;
|
|
89
|
+
org_id: string;
|
|
90
|
+
template_id: string;
|
|
91
|
+
template_name: string | null;
|
|
92
|
+
updated_at: string | null;
|
|
93
|
+
url: string | null;
|
|
94
|
+
};
|
|
95
|
+
Insert: {
|
|
96
|
+
body?: string | null;
|
|
97
|
+
created_at?: string;
|
|
98
|
+
filename?: string | null;
|
|
99
|
+
mimetype?: string | null;
|
|
100
|
+
org_id?: string;
|
|
101
|
+
template_id?: string;
|
|
102
|
+
template_name?: string | null;
|
|
103
|
+
updated_at?: string | null;
|
|
104
|
+
url?: string | null;
|
|
105
|
+
};
|
|
106
|
+
Update: {
|
|
107
|
+
body?: string | null;
|
|
108
|
+
created_at?: string;
|
|
109
|
+
filename?: string | null;
|
|
110
|
+
mimetype?: string | null;
|
|
111
|
+
org_id?: string;
|
|
112
|
+
template_id?: string;
|
|
113
|
+
template_name?: string | null;
|
|
114
|
+
updated_at?: string | null;
|
|
115
|
+
url?: string | null;
|
|
116
|
+
};
|
|
117
|
+
Relationships: [
|
|
118
|
+
{
|
|
119
|
+
foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
|
|
120
|
+
columns: ["org_id"];
|
|
121
|
+
isOneToOne: false;
|
|
122
|
+
referencedRelation: "tbl_org";
|
|
123
|
+
referencedColumns: ["org_id"];
|
|
124
|
+
}
|
|
125
|
+
];
|
|
126
|
+
};
|
|
32
127
|
tbl_chat_access: {
|
|
33
128
|
Row: {
|
|
34
129
|
chat_id: string;
|
|
@@ -94,6 +189,7 @@ export interface Database {
|
|
|
94
189
|
org_id: string;
|
|
95
190
|
org_phone: string;
|
|
96
191
|
performed_by: string | null;
|
|
192
|
+
quoted_message_id: string | null;
|
|
97
193
|
raw_data: Json | null;
|
|
98
194
|
sender_phone: string | null;
|
|
99
195
|
timestamp: string | null;
|
|
@@ -133,6 +229,7 @@ export interface Database {
|
|
|
133
229
|
org_id: string;
|
|
134
230
|
org_phone: string;
|
|
135
231
|
performed_by?: string | null;
|
|
232
|
+
quoted_message_id?: string | null;
|
|
136
233
|
raw_data?: Json | null;
|
|
137
234
|
sender_phone?: string | null;
|
|
138
235
|
timestamp?: string | null;
|
|
@@ -172,6 +269,7 @@ export interface Database {
|
|
|
172
269
|
org_id?: string;
|
|
173
270
|
org_phone?: string;
|
|
174
271
|
performed_by?: string | null;
|
|
272
|
+
quoted_message_id?: string | null;
|
|
175
273
|
raw_data?: Json | null;
|
|
176
274
|
sender_phone?: string | null;
|
|
177
275
|
timestamp?: string | null;
|
|
@@ -194,8 +292,8 @@ export interface Database {
|
|
|
194
292
|
author: string | null;
|
|
195
293
|
body: string | null;
|
|
196
294
|
chat_id: string | null;
|
|
197
|
-
group_notification_id: string;
|
|
198
295
|
id: Json | null;
|
|
296
|
+
notification_id: string;
|
|
199
297
|
org_id: string;
|
|
200
298
|
org_phone: string;
|
|
201
299
|
recipientids: string[] | null;
|
|
@@ -206,8 +304,8 @@ export interface Database {
|
|
|
206
304
|
author?: string | null;
|
|
207
305
|
body?: string | null;
|
|
208
306
|
chat_id?: string | null;
|
|
209
|
-
group_notification_id: string;
|
|
210
307
|
id?: Json | null;
|
|
308
|
+
notification_id: string;
|
|
211
309
|
org_id: string;
|
|
212
310
|
org_phone: string;
|
|
213
311
|
recipientids?: string[] | null;
|
|
@@ -218,8 +316,8 @@ export interface Database {
|
|
|
218
316
|
author?: string | null;
|
|
219
317
|
body?: string | null;
|
|
220
318
|
chat_id?: string | null;
|
|
221
|
-
group_notification_id?: string;
|
|
222
319
|
id?: Json | null;
|
|
320
|
+
notification_id?: string;
|
|
223
321
|
org_id?: string;
|
|
224
322
|
org_phone?: string;
|
|
225
323
|
recipientids?: string[] | null;
|
|
@@ -649,7 +747,6 @@ export interface Database {
|
|
|
649
747
|
mute_expiration: number | null;
|
|
650
748
|
name: string | null;
|
|
651
749
|
org_id: string | null;
|
|
652
|
-
org_participants: Json | null;
|
|
653
750
|
org_phone: string | null;
|
|
654
751
|
pinned: boolean | null;
|
|
655
752
|
timestamp: string | null;
|
package/dist/types.d.ts
CHANGED
|
@@ -18,10 +18,10 @@ export type ChatType = Merge<Tables<'view_chats'>, {
|
|
|
18
18
|
latest_message: MessageType | null;
|
|
19
19
|
members: Record<string, ChatMemberType> | null;
|
|
20
20
|
chat_type: 'user' | 'group' | 'business';
|
|
21
|
-
active_phone?:
|
|
22
|
-
org_participants?: Tables<'tbl_chat_participants'>[];
|
|
21
|
+
active_phone?: string;
|
|
23
22
|
chat_access: Record<string, boolean>;
|
|
24
23
|
label_ids: Record<string, boolean>;
|
|
24
|
+
chat_org_phones?: string[];
|
|
25
25
|
}>;
|
|
26
26
|
export type MediaType = {
|
|
27
27
|
path: string;
|
|
@@ -38,5 +38,10 @@ export type ContactType = Merge<Tables<'tbl_contacts'>, {
|
|
|
38
38
|
chat_ids: string[] | null;
|
|
39
39
|
}>;
|
|
40
40
|
export type ChatAccessType = Merge<Partial<Tables<'tbl_chat_access'>>, Tables<'tbl_org_members'>>;
|
|
41
|
+
export type ServerStateType = {
|
|
42
|
+
loading: boolean;
|
|
43
|
+
percent: number | null;
|
|
44
|
+
ready: boolean;
|
|
45
|
+
};
|
|
41
46
|
export declare const labelColors: string[];
|
|
42
47
|
export declare const enumChatColors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
|
package/package.json
CHANGED
package/supabase.types.ts
CHANGED
|
@@ -28,6 +28,101 @@ export interface Database {
|
|
|
28
28
|
}
|
|
29
29
|
public: {
|
|
30
30
|
Tables: {
|
|
31
|
+
tbl_broadcast_scheduled_messages: {
|
|
32
|
+
Row: {
|
|
33
|
+
added_by: string | null
|
|
34
|
+
chat_ids: Json | null
|
|
35
|
+
created_at: string
|
|
36
|
+
message_payload: Json | null
|
|
37
|
+
org_id: string | null
|
|
38
|
+
scheduled_at: string | null
|
|
39
|
+
scheduled_message_id: string
|
|
40
|
+
status: string | null
|
|
41
|
+
template_id: string | null
|
|
42
|
+
}
|
|
43
|
+
Insert: {
|
|
44
|
+
added_by?: string | null
|
|
45
|
+
chat_ids?: Json | null
|
|
46
|
+
created_at?: string
|
|
47
|
+
message_payload?: Json | null
|
|
48
|
+
org_id?: string | null
|
|
49
|
+
scheduled_at?: string | null
|
|
50
|
+
scheduled_message_id?: string
|
|
51
|
+
status?: string | null
|
|
52
|
+
template_id?: string | null
|
|
53
|
+
}
|
|
54
|
+
Update: {
|
|
55
|
+
added_by?: string | null
|
|
56
|
+
chat_ids?: Json | null
|
|
57
|
+
created_at?: string
|
|
58
|
+
message_payload?: Json | null
|
|
59
|
+
org_id?: string | null
|
|
60
|
+
scheduled_at?: string | null
|
|
61
|
+
scheduled_message_id?: string
|
|
62
|
+
status?: string | null
|
|
63
|
+
template_id?: string | null
|
|
64
|
+
}
|
|
65
|
+
Relationships: [
|
|
66
|
+
{
|
|
67
|
+
foreignKeyName: "tbl_broadcast_scheduled_messages_org_id_fkey"
|
|
68
|
+
columns: ["org_id"]
|
|
69
|
+
isOneToOne: false
|
|
70
|
+
referencedRelation: "tbl_org"
|
|
71
|
+
referencedColumns: ["org_id"]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
foreignKeyName: "tbl_broadcast_scheduled_messages_template_id_fkey"
|
|
75
|
+
columns: ["template_id"]
|
|
76
|
+
isOneToOne: false
|
|
77
|
+
referencedRelation: "tbl_broadcast_templates"
|
|
78
|
+
referencedColumns: ["template_id"]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
tbl_broadcast_templates: {
|
|
83
|
+
Row: {
|
|
84
|
+
body: string | null
|
|
85
|
+
created_at: string
|
|
86
|
+
filename: string | null
|
|
87
|
+
mimetype: string | null
|
|
88
|
+
org_id: string
|
|
89
|
+
template_id: string
|
|
90
|
+
template_name: string | null
|
|
91
|
+
updated_at: string | null
|
|
92
|
+
url: string | null
|
|
93
|
+
}
|
|
94
|
+
Insert: {
|
|
95
|
+
body?: string | null
|
|
96
|
+
created_at?: string
|
|
97
|
+
filename?: string | null
|
|
98
|
+
mimetype?: string | null
|
|
99
|
+
org_id?: string
|
|
100
|
+
template_id?: string
|
|
101
|
+
template_name?: string | null
|
|
102
|
+
updated_at?: string | null
|
|
103
|
+
url?: string | null
|
|
104
|
+
}
|
|
105
|
+
Update: {
|
|
106
|
+
body?: string | null
|
|
107
|
+
created_at?: string
|
|
108
|
+
filename?: string | null
|
|
109
|
+
mimetype?: string | null
|
|
110
|
+
org_id?: string
|
|
111
|
+
template_id?: string
|
|
112
|
+
template_name?: string | null
|
|
113
|
+
updated_at?: string | null
|
|
114
|
+
url?: string | null
|
|
115
|
+
}
|
|
116
|
+
Relationships: [
|
|
117
|
+
{
|
|
118
|
+
foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
|
|
119
|
+
columns: ["org_id"]
|
|
120
|
+
isOneToOne: false
|
|
121
|
+
referencedRelation: "tbl_org"
|
|
122
|
+
referencedColumns: ["org_id"]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
31
126
|
tbl_chat_access: {
|
|
32
127
|
Row: {
|
|
33
128
|
chat_id: string
|
|
@@ -93,6 +188,7 @@ export interface Database {
|
|
|
93
188
|
org_id: string
|
|
94
189
|
org_phone: string
|
|
95
190
|
performed_by: string | null
|
|
191
|
+
quoted_message_id: string | null
|
|
96
192
|
raw_data: Json | null
|
|
97
193
|
sender_phone: string | null
|
|
98
194
|
timestamp: string | null
|
|
@@ -132,6 +228,7 @@ export interface Database {
|
|
|
132
228
|
org_id: string
|
|
133
229
|
org_phone: string
|
|
134
230
|
performed_by?: string | null
|
|
231
|
+
quoted_message_id?: string | null
|
|
135
232
|
raw_data?: Json | null
|
|
136
233
|
sender_phone?: string | null
|
|
137
234
|
timestamp?: string | null
|
|
@@ -171,6 +268,7 @@ export interface Database {
|
|
|
171
268
|
org_id?: string
|
|
172
269
|
org_phone?: string
|
|
173
270
|
performed_by?: string | null
|
|
271
|
+
quoted_message_id?: string | null
|
|
174
272
|
raw_data?: Json | null
|
|
175
273
|
sender_phone?: string | null
|
|
176
274
|
timestamp?: string | null
|
|
@@ -193,8 +291,8 @@ export interface Database {
|
|
|
193
291
|
author: string | null
|
|
194
292
|
body: string | null
|
|
195
293
|
chat_id: string | null
|
|
196
|
-
group_notification_id: string
|
|
197
294
|
id: Json | null
|
|
295
|
+
notification_id: string
|
|
198
296
|
org_id: string
|
|
199
297
|
org_phone: string
|
|
200
298
|
recipientids: string[] | null
|
|
@@ -205,8 +303,8 @@ export interface Database {
|
|
|
205
303
|
author?: string | null
|
|
206
304
|
body?: string | null
|
|
207
305
|
chat_id?: string | null
|
|
208
|
-
group_notification_id: string
|
|
209
306
|
id?: Json | null
|
|
307
|
+
notification_id: string
|
|
210
308
|
org_id: string
|
|
211
309
|
org_phone: string
|
|
212
310
|
recipientids?: string[] | null
|
|
@@ -217,8 +315,8 @@ export interface Database {
|
|
|
217
315
|
author?: string | null
|
|
218
316
|
body?: string | null
|
|
219
317
|
chat_id?: string | null
|
|
220
|
-
group_notification_id?: string
|
|
221
318
|
id?: Json | null
|
|
319
|
+
notification_id?: string
|
|
222
320
|
org_id?: string
|
|
223
321
|
org_phone?: string
|
|
224
322
|
recipientids?: string[] | null
|
|
@@ -648,7 +746,6 @@ export interface Database {
|
|
|
648
746
|
mute_expiration: number | null
|
|
649
747
|
name: string | null
|
|
650
748
|
org_id: string | null
|
|
651
|
-
org_participants: Json | null
|
|
652
749
|
org_phone: string | null
|
|
653
750
|
pinned: boolean | null
|
|
654
751
|
timestamp: string | null
|
package/types.ts
CHANGED
|
@@ -21,40 +21,58 @@ export type OrgType = Tables<'tbl_org'> & {
|
|
|
21
21
|
labels: Tables<'tbl_org_labels'>[];
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type ChatMemberType = Merge<
|
|
25
|
-
|
|
24
|
+
export type ChatMemberType = Merge<
|
|
25
|
+
Tables<'tbl_chat_participants'>,
|
|
26
|
+
Tables<'tbl_contacts'>
|
|
27
|
+
>;
|
|
26
28
|
|
|
27
29
|
export type ChatType = Merge<
|
|
28
30
|
Tables<'view_chats'>,
|
|
29
31
|
{
|
|
30
32
|
chat_id: string;
|
|
31
33
|
latest_message: MessageType | null;
|
|
32
|
-
members: Record<string,ChatMemberType> | null;
|
|
34
|
+
members: Record<string, ChatMemberType> | null;
|
|
33
35
|
chat_type: 'user' | 'group' | 'business';
|
|
34
|
-
active_phone?:
|
|
35
|
-
org_participants?: Tables<'tbl_chat_participants'>[];
|
|
36
|
+
active_phone?: string;
|
|
36
37
|
chat_access: Record<string, boolean>;
|
|
37
38
|
label_ids: Record<string, boolean>;
|
|
38
|
-
|
|
39
|
+
chat_org_phones?: string[];
|
|
40
|
+
}
|
|
39
41
|
>;
|
|
40
42
|
|
|
41
43
|
export type MediaType = {
|
|
42
44
|
path: string;
|
|
43
45
|
mimetype: string | null;
|
|
44
46
|
filename: string | null;
|
|
45
|
-
}
|
|
47
|
+
};
|
|
46
48
|
|
|
47
|
-
export type MessageType = OverrideProperties<
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
export type MessageType = OverrideProperties<
|
|
50
|
+
Tables<'tbl_chat_messages'>,
|
|
51
|
+
{
|
|
52
|
+
message_type: MessageTypes;
|
|
53
|
+
media: MediaType | null;
|
|
54
|
+
}
|
|
55
|
+
>;
|
|
51
56
|
|
|
52
57
|
export type ContactType = Merge<
|
|
53
58
|
Tables<'tbl_contacts'>,
|
|
54
|
-
{
|
|
59
|
+
{
|
|
60
|
+
chats: ChatType[] | null;
|
|
61
|
+
chat_count: number | null;
|
|
62
|
+
chat_ids: string[] | null;
|
|
63
|
+
}
|
|
64
|
+
>;
|
|
65
|
+
|
|
66
|
+
export type ChatAccessType = Merge<
|
|
67
|
+
Partial<Tables<'tbl_chat_access'>>,
|
|
68
|
+
Tables<'tbl_org_members'>
|
|
55
69
|
>;
|
|
56
70
|
|
|
57
|
-
export type
|
|
71
|
+
export type ServerStateType = {
|
|
72
|
+
loading: boolean;
|
|
73
|
+
percent: number | null;
|
|
74
|
+
ready: boolean;
|
|
75
|
+
};
|
|
58
76
|
|
|
59
77
|
/* -------------------------------- CONSTANTS ------------------------------- */
|
|
60
78
|
|