@periskope/types 0.6.8 → 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.
@@ -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;
@@ -197,8 +292,8 @@ export interface Database {
197
292
  author: string | null;
198
293
  body: string | null;
199
294
  chat_id: string | null;
200
- group_notification_id: string;
201
295
  id: Json | null;
296
+ notification_id: string;
202
297
  org_id: string;
203
298
  org_phone: string;
204
299
  recipientids: string[] | null;
@@ -209,8 +304,8 @@ export interface Database {
209
304
  author?: string | null;
210
305
  body?: string | null;
211
306
  chat_id?: string | null;
212
- group_notification_id: string;
213
307
  id?: Json | null;
308
+ notification_id: string;
214
309
  org_id: string;
215
310
  org_phone: string;
216
311
  recipientids?: string[] | null;
@@ -221,8 +316,8 @@ export interface Database {
221
316
  author?: string | null;
222
317
  body?: string | null;
223
318
  chat_id?: string | null;
224
- group_notification_id?: string;
225
319
  id?: Json | null;
320
+ notification_id?: string;
226
321
  org_id?: string;
227
322
  org_phone?: string;
228
323
  recipientids?: string[] | null;
@@ -652,7 +747,6 @@ export interface Database {
652
747
  mute_expiration: number | null;
653
748
  name: string | null;
654
749
  org_id: string | null;
655
- org_participants: Json | null;
656
750
  org_phone: string | null;
657
751
  pinned: boolean | null;
658
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?: 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.9",
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
@@ -196,8 +291,8 @@ export interface Database {
196
291
  author: string | null
197
292
  body: string | null
198
293
  chat_id: string | null
199
- group_notification_id: string
200
294
  id: Json | null
295
+ notification_id: string
201
296
  org_id: string
202
297
  org_phone: string
203
298
  recipientids: string[] | null
@@ -208,8 +303,8 @@ export interface Database {
208
303
  author?: string | null
209
304
  body?: string | null
210
305
  chat_id?: string | null
211
- group_notification_id: string
212
306
  id?: Json | null
307
+ notification_id: string
213
308
  org_id: string
214
309
  org_phone: string
215
310
  recipientids?: string[] | null
@@ -220,8 +315,8 @@ export interface Database {
220
315
  author?: string | null
221
316
  body?: string | null
222
317
  chat_id?: string | null
223
- group_notification_id?: string
224
318
  id?: Json | null
319
+ notification_id?: string
225
320
  org_id?: string
226
321
  org_phone?: string
227
322
  recipientids?: string[] | null
@@ -651,7 +746,6 @@ export interface Database {
651
746
  mute_expiration: number | null
652
747
  name: string | null
653
748
  org_id: string | null
654
- org_participants: Json | null
655
749
  org_phone: string | null
656
750
  pinned: boolean | null
657
751
  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