@periskope/types 0.6.8 → 0.6.10

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.
@@ -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
+ prev_body: string | null;
97
193
  quoted_message_id: string | null;
98
194
  raw_data: Json | null;
99
195
  sender_phone: string | null;
@@ -134,6 +230,7 @@ export interface Database {
134
230
  org_id: string;
135
231
  org_phone: string;
136
232
  performed_by?: string | null;
233
+ prev_body?: string | null;
137
234
  quoted_message_id?: string | null;
138
235
  raw_data?: Json | null;
139
236
  sender_phone?: string | null;
@@ -174,6 +271,7 @@ export interface Database {
174
271
  org_id?: string;
175
272
  org_phone?: string;
176
273
  performed_by?: string | null;
274
+ prev_body?: string | null;
177
275
  quoted_message_id?: string | null;
178
276
  raw_data?: Json | null;
179
277
  sender_phone?: string | null;
@@ -197,8 +295,8 @@ export interface Database {
197
295
  author: string | null;
198
296
  body: string | null;
199
297
  chat_id: string | null;
200
- group_notification_id: string;
201
298
  id: Json | null;
299
+ notification_id: string;
202
300
  org_id: string;
203
301
  org_phone: string;
204
302
  recipientids: string[] | null;
@@ -209,8 +307,8 @@ export interface Database {
209
307
  author?: string | null;
210
308
  body?: string | null;
211
309
  chat_id?: string | null;
212
- group_notification_id: string;
213
310
  id?: Json | null;
311
+ notification_id: string;
214
312
  org_id: string;
215
313
  org_phone: string;
216
314
  recipientids?: string[] | null;
@@ -221,8 +319,8 @@ export interface Database {
221
319
  author?: string | null;
222
320
  body?: string | null;
223
321
  chat_id?: string | null;
224
- group_notification_id?: string;
225
322
  id?: Json | null;
323
+ notification_id?: string;
226
324
  org_id?: string;
227
325
  org_phone?: string;
228
326
  recipientids?: string[] | null;
@@ -652,7 +750,6 @@ export interface Database {
652
750
  mute_expiration: number | null;
653
751
  name: string | null;
654
752
  org_id: string | null;
655
- org_participants: Json | null;
656
753
  org_phone: string | null;
657
754
  pinned: boolean | null;
658
755
  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?: boolean;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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
+ prev_body: string | null
96
192
  quoted_message_id: string | null
97
193
  raw_data: Json | null
98
194
  sender_phone: 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
+ prev_body?: string | null
136
233
  quoted_message_id?: string | null
137
234
  raw_data?: Json | null
138
235
  sender_phone?: string | null
@@ -173,6 +270,7 @@ export interface Database {
173
270
  org_id?: string
174
271
  org_phone?: string
175
272
  performed_by?: string | null
273
+ prev_body?: string | null
176
274
  quoted_message_id?: string | null
177
275
  raw_data?: Json | null
178
276
  sender_phone?: string | null
@@ -196,8 +294,8 @@ export interface Database {
196
294
  author: string | null
197
295
  body: string | null
198
296
  chat_id: string | null
199
- group_notification_id: string
200
297
  id: Json | null
298
+ notification_id: string
201
299
  org_id: string
202
300
  org_phone: string
203
301
  recipientids: string[] | null
@@ -208,8 +306,8 @@ export interface Database {
208
306
  author?: string | null
209
307
  body?: string | null
210
308
  chat_id?: string | null
211
- group_notification_id: string
212
309
  id?: Json | null
310
+ notification_id: string
213
311
  org_id: string
214
312
  org_phone: string
215
313
  recipientids?: string[] | null
@@ -220,8 +318,8 @@ export interface Database {
220
318
  author?: string | null
221
319
  body?: string | null
222
320
  chat_id?: string | null
223
- group_notification_id?: string
224
321
  id?: Json | null
322
+ notification_id?: string
225
323
  org_id?: string
226
324
  org_phone?: string
227
325
  recipientids?: string[] | null
@@ -651,7 +749,6 @@ export interface Database {
651
749
  mute_expiration: number | null
652
750
  name: string | null
653
751
  org_id: string | null
654
- org_participants: Json | null
655
752
  org_phone: string | null
656
753
  pinned: boolean | null
657
754
  timestamp: string | null
package/types.ts CHANGED
@@ -21,46 +21,58 @@ export type OrgType = Tables<'tbl_org'> & {
21
21
  labels: Tables<'tbl_org_labels'>[];
22
22
  };
23
23
 
24
- export type ChatMemberType = Merge<Tables<'tbl_chat_participants'>,
25
- Tables<'tbl_contacts'>>;
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?: boolean;
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<Tables<'tbl_chat_messages'>, {
48
- message_type: MessageTypes;
49
- media: MediaType | null;
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
- { chats: ChatType[] | null; chat_count: number | null; chat_ids: string[] | null }
59
+ {
60
+ chats: ChatType[] | null;
61
+ chat_count: number | null;
62
+ chat_ids: string[] | null;
63
+ }
55
64
  >;
56
65
 
57
- export type ChatAccessType = Merge<Partial<Tables<'tbl_chat_access'>>,Tables<'tbl_org_members'>>;
66
+ export type ChatAccessType = Merge<
67
+ Partial<Tables<'tbl_chat_access'>>,
68
+ Tables<'tbl_org_members'>
69
+ >;
58
70
 
59
71
  export type ServerStateType = {
60
72
  loading: boolean;
61
73
  percent: number | null;
62
74
  ready: boolean;
63
- }
75
+ };
64
76
 
65
77
  /* -------------------------------- CONSTANTS ------------------------------- */
66
78