@periskope/types 0.6.26 → 0.6.28

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/types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Merge, OverrideProperties } from 'type-fest';
2
- import { Chat, Location, MessageTypes } from 'whatsapp-web.js';
2
+ import { Chat, Location, MessageInfo, MessageTypes } from 'whatsapp-web.js';
3
3
  import { Tables } from './supabase.types';
4
4
 
5
5
  /* ----------------------------- TYPE SHORTHANDS ---------------------------- */
@@ -53,7 +53,9 @@ export type MessageType = OverrideProperties<
53
53
  media: MediaType | null;
54
54
  }
55
55
  >;
56
-
56
+ export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
57
+ label_ids: Record<string, boolean>;
58
+ }>
57
59
  export type ContactType = Merge<
58
60
  Tables<'tbl_contacts'>,
59
61
  {
@@ -120,6 +122,7 @@ export type SendMessageContent = {
120
122
  quoted_message_id?: string;
121
123
  quoted_message_type?: 'reply' | 'forward' | 'reply_private';
122
124
  broadcast_id?: string;
125
+ performed_by?: string;
123
126
  variables?: Record<string, VariableType>;
124
127
  };
125
128
 
@@ -134,3 +137,16 @@ export type SingleMessagePayload = SendMessageContent & {
134
137
  chat_id: string;
135
138
  job_id?: string;
136
139
  };
140
+
141
+ /* -------------------------------- BROADCAST ------------------------------- */
142
+
143
+ export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
144
+ logs: {
145
+ chat_id: string,
146
+ message_id: string | null,
147
+ read_count: number | null,
148
+ total_count: number | null,
149
+ delivery_info: MessageInfo | null,
150
+ delivered_count: number | null
151
+ },
152
+ }