@periskope/types 0.6.127 → 0.6.129

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.
@@ -336,7 +336,8 @@ export type Database = {
336
336
  org_id: string;
337
337
  org_phone: string;
338
338
  performed_by: string | null;
339
- poll_vote_info: Json | null;
339
+ poll_info: Json | null;
340
+ poll_results: Json | null;
340
341
  prev_body: string | null;
341
342
  quoted_message_id: string | null;
342
343
  raw_data: Json | null;
@@ -389,7 +390,8 @@ export type Database = {
389
390
  org_id: string;
390
391
  org_phone: string;
391
392
  performed_by?: string | null;
392
- poll_vote_info?: Json | null;
393
+ poll_info?: Json | null;
394
+ poll_results?: Json | null;
393
395
  prev_body?: string | null;
394
396
  quoted_message_id?: string | null;
395
397
  raw_data?: Json | null;
@@ -442,7 +444,8 @@ export type Database = {
442
444
  org_id?: string;
443
445
  org_phone?: string;
444
446
  performed_by?: string | null;
445
- poll_vote_info?: Json | null;
447
+ poll_info?: Json | null;
448
+ poll_results?: Json | null;
446
449
  prev_body?: string | null;
447
450
  quoted_message_id?: string | null;
448
451
  raw_data?: Json | null;
package/dist/types.d.ts CHANGED
@@ -144,7 +144,8 @@ export type MessageType = OverrideProperties<Tables<'tbl_chat_messages'>, {
144
144
  message_type: (typeof SUPPORTED_TYPES)[number];
145
145
  media: MediaType | null;
146
146
  flag_metadata: MessageFlagType | null;
147
- poll_vote_info?: PollVoteInfoType | null;
147
+ poll_info?: PollSendType | null;
148
+ poll_results?: PollResultType | null;
148
149
  }>;
149
150
  export type MessageFlagType = {
150
151
  status: boolean;
@@ -202,15 +203,7 @@ export type SendMessageContent = {
202
203
  url?: string;
203
204
  };
204
205
  };
205
- poll?: {
206
- pollName: string;
207
- pollOptions: string[];
208
- options?: {
209
- allowMultipleAnswers?: boolean;
210
- messageSecret?: number[] | null;
211
- pollId?: string;
212
- };
213
- };
206
+ poll?: PollSendType;
214
207
  quoted_message_id?: string;
215
208
  quoted_message_type?: 'reply' | 'forward' | 'reply_private';
216
209
  broadcast_id?: string;
@@ -386,17 +379,16 @@ export type UserPreferences = {
386
379
  right_sidepanel_open: boolean;
387
380
  sync_wa_unread_count: boolean;
388
381
  };
389
- export type PollVoteInfoType = {
382
+ export type PollSendType = {
383
+ pollName: string;
384
+ pollOptions: string[];
390
385
  options?: {
391
386
  allowMultipleAnswers?: boolean;
392
387
  messageSecret?: number[] | null;
393
388
  pollId?: string;
394
389
  };
395
- poll_options: string[];
396
- poll_results?: {
397
- id: number;
398
- name: string;
399
- votes: Record<string, string>;
400
- }[];
390
+ };
391
+ export type PollResultType = {
392
+ [name: string]: Record<string, string>;
401
393
  };
402
394
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.127",
3
+ "version": "0.6.129",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -341,7 +341,8 @@ export type Database = {
341
341
  org_id: string
342
342
  org_phone: string
343
343
  performed_by: string | null
344
- poll_vote_info: Json | null
344
+ poll_info: Json | null
345
+ poll_results: Json | null
345
346
  prev_body: string | null
346
347
  quoted_message_id: string | null
347
348
  raw_data: Json | null
@@ -394,7 +395,8 @@ export type Database = {
394
395
  org_id: string
395
396
  org_phone: string
396
397
  performed_by?: string | null
397
- poll_vote_info?: Json | null
398
+ poll_info?: Json | null
399
+ poll_results?: Json | null
398
400
  prev_body?: string | null
399
401
  quoted_message_id?: string | null
400
402
  raw_data?: Json | null
@@ -447,7 +449,8 @@ export type Database = {
447
449
  org_id?: string
448
450
  org_phone?: string
449
451
  performed_by?: string | null
450
- poll_vote_info?: Json | null
452
+ poll_info?: Json | null
453
+ poll_results?: Json | null
451
454
  prev_body?: string | null
452
455
  quoted_message_id?: string | null
453
456
  raw_data?: Json | null
@@ -2285,4 +2288,4 @@ export type Enums<
2285
2288
  ? PublicSchema["Enums"][PublicEnumNameOrOptions]
2286
2289
  : never
2287
2290
 
2288
-
2291
+
package/types.ts CHANGED
@@ -171,7 +171,8 @@ export type MessageType = OverrideProperties<
171
171
  message_type: (typeof SUPPORTED_TYPES)[number];
172
172
  media: MediaType | null;
173
173
  flag_metadata: MessageFlagType | null;
174
- poll_vote_info?: PollVoteInfoType | null;
174
+ poll_info?: PollSendType | null;
175
+ poll_results?: PollResultType | null;
175
176
  }
176
177
  >;
177
178
 
@@ -285,15 +286,7 @@ export type SendMessageContent = {
285
286
  longitude: string;
286
287
  options?: { name?: string; address?: string; url?: string };
287
288
  };
288
- poll?: {
289
- pollName: string;
290
- pollOptions: string[];
291
- options?: {
292
- allowMultipleAnswers?: boolean;
293
- messageSecret?: number[] | null;
294
- pollId?: string;
295
- };
296
- };
289
+ poll?: PollSendType;
297
290
  quoted_message_id?: string;
298
291
  quoted_message_type?: 'reply' | 'forward' | 'reply_private';
299
292
  broadcast_id?: string;
@@ -536,16 +529,16 @@ export type UserPreferences = {
536
529
 
537
530
  /* ----------------------------- POLL VOTE INFO ----------------------------- */
538
531
 
539
- export type PollVoteInfoType = {
532
+ export type PollSendType = {
533
+ pollName: string;
534
+ pollOptions: string[];
540
535
  options?: {
541
536
  allowMultipleAnswers?: boolean;
542
537
  messageSecret?: number[] | null;
543
538
  pollId?: string;
544
539
  };
545
- poll_options: string[];
546
- poll_results?: {
547
- id: number;
548
- name: string;
549
- votes: Record<string, string>;
550
- }[];
540
+ };
541
+
542
+ export type PollResultType = {
543
+ [name: string]: Record<string, string>;
551
544
  };