@periskope/types 0.6.26 → 0.6.27

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.
@@ -762,15 +762,17 @@ export interface Database {
762
762
  view_broadcast_logs: {
763
763
  Row: {
764
764
  broadcast_id: string | null;
765
- delivered: number | null;
765
+ completed_at: string | null;
766
+ delivered_member_count: number | null;
766
767
  failed_chats: number | null;
767
768
  message_payload: Json | null;
768
769
  org_id: string | null;
769
- read: number | null;
770
+ read_member_count: number | null;
771
+ scheduled_at: string | null;
770
772
  sent_chats: number | null;
771
- timestamp: string | null;
772
- total: number | null;
773
+ status: string | null;
773
774
  total_chats: number | null;
775
+ total_member_count: number | null;
774
776
  };
775
777
  Relationships: [
776
778
  {
@@ -831,6 +833,13 @@ export interface Database {
831
833
  };
832
834
  Returns: string;
833
835
  };
836
+ get_broadcast_id: {
837
+ Args: {
838
+ broadcast_id_input: string;
839
+ chat_id_input?: string;
840
+ };
841
+ Returns: Json;
842
+ };
834
843
  get_chats: {
835
844
  Args: {
836
845
  chat_id_input?: string[];
package/dist/types.d.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
  export type WhatsappChat = Chat & {
5
5
  groupMetadata?: any;
@@ -64,3 +64,13 @@ export type SingleMessagePayload = SendMessageContent & {
64
64
  chat_id: string;
65
65
  job_id?: string;
66
66
  };
67
+ export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
68
+ logs: {
69
+ chat_id: string;
70
+ message_id: string | null;
71
+ read_count: number | null;
72
+ total_count: number | null;
73
+ delivery_info: MessageInfo | null;
74
+ delivered_count: number | null;
75
+ };
76
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.26",
3
+ "version": "0.6.27",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -761,15 +761,17 @@ export interface Database {
761
761
  view_broadcast_logs: {
762
762
  Row: {
763
763
  broadcast_id: string | null
764
- delivered: number | null
764
+ completed_at: string | null
765
+ delivered_member_count: number | null
765
766
  failed_chats: number | null
766
767
  message_payload: Json | null
767
768
  org_id: string | null
768
- read: number | null
769
+ read_member_count: number | null
770
+ scheduled_at: string | null
769
771
  sent_chats: number | null
770
- timestamp: string | null
771
- total: number | null
772
+ status: string | null
772
773
  total_chats: number | null
774
+ total_member_count: number | null
773
775
  }
774
776
  Relationships: [
775
777
  {
@@ -830,6 +832,13 @@ export interface Database {
830
832
  }
831
833
  Returns: string
832
834
  }
835
+ get_broadcast_id: {
836
+ Args: {
837
+ broadcast_id_input: string
838
+ chat_id_input?: string
839
+ }
840
+ Returns: Json
841
+ }
833
842
  get_chats: {
834
843
  Args: {
835
844
  chat_id_input?: string[]
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 ---------------------------- */
@@ -134,3 +134,16 @@ export type SingleMessagePayload = SendMessageContent & {
134
134
  chat_id: string;
135
135
  job_id?: string;
136
136
  };
137
+
138
+ /* -------------------------------- BROADCAST ------------------------------- */
139
+
140
+ export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
141
+ logs: {
142
+ chat_id: string,
143
+ message_id: string | null,
144
+ read_count: number | null,
145
+ total_count: number | null,
146
+ delivery_info: MessageInfo | null,
147
+ delivered_count: number | null
148
+ },
149
+ }