@periskope/types 0.6.150 → 0.6.152
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/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/rules.types.d.ts +14 -1
- package/dist/rules.types.js +75 -72
- package/dist/supabase.types.d.ts +10 -0
- package/dist/types.d.ts +4 -38
- package/index.ts +1 -1
- package/package.json +1 -1
- package/supabase.types.ts +2659 -2649
- package/types.ts +4 -149
- package/rules.types.ts +0 -1495
package/types.ts
CHANGED
|
@@ -63,6 +63,7 @@ export type OrgPreferences = {
|
|
|
63
63
|
sync_phone_contacts?: boolean;
|
|
64
64
|
mask_phone_numbers?: boolean;
|
|
65
65
|
show_sender_names?: boolean;
|
|
66
|
+
closed_chats?: Record<string, number>;
|
|
66
67
|
};
|
|
67
68
|
|
|
68
69
|
type OrgPreferenceKey = keyof OrgPreferences;
|
|
@@ -158,6 +159,7 @@ export type ChatType = Merge<
|
|
|
158
159
|
is_archived?: boolean;
|
|
159
160
|
is_pinned?: boolean;
|
|
160
161
|
closed_at?: number;
|
|
162
|
+
common_chats?: string[];
|
|
161
163
|
}
|
|
162
164
|
>;
|
|
163
165
|
|
|
@@ -193,7 +195,7 @@ export type MessageType = Merge<
|
|
|
193
195
|
{
|
|
194
196
|
reactions?: ReactionType[];
|
|
195
197
|
message_payload?: SingleMessagePayload;
|
|
196
|
-
show_unread?:
|
|
198
|
+
show_unread?: number;
|
|
197
199
|
highlight?: number;
|
|
198
200
|
}
|
|
199
201
|
>;
|
|
@@ -335,6 +337,7 @@ export type BroadcastMessagePayload = SendMessageContent & {
|
|
|
335
337
|
export type SingleMessagePayload = SendMessageContent & {
|
|
336
338
|
chat_id: string;
|
|
337
339
|
job_id?: string;
|
|
340
|
+
priority?: number;
|
|
338
341
|
};
|
|
339
342
|
|
|
340
343
|
export type MessageAttachmentFileTypes =
|
|
@@ -613,151 +616,3 @@ export type OrgCreditsType = {
|
|
|
613
616
|
next_renewal_date: string;
|
|
614
617
|
};
|
|
615
618
|
|
|
616
|
-
/* --------------------------------- RULE INFO TYPE -------------------------------- */
|
|
617
|
-
|
|
618
|
-
export type ChatRuleInfoType = Merge<
|
|
619
|
-
Pick<
|
|
620
|
-
Tables<'view_chats'>,
|
|
621
|
-
| 'assigned_to'
|
|
622
|
-
| 'chat_id'
|
|
623
|
-
| 'chat_name'
|
|
624
|
-
| 'chat_type'
|
|
625
|
-
| 'created_at'
|
|
626
|
-
| 'group_description'
|
|
627
|
-
| 'info_admins_only'
|
|
628
|
-
| 'is_exited'
|
|
629
|
-
| 'is_muted'
|
|
630
|
-
| 'org_id'
|
|
631
|
-
| 'org_phone'
|
|
632
|
-
| 'chat_org_phones'
|
|
633
|
-
| 'messages_admins_only'
|
|
634
|
-
| 'custom_properties'
|
|
635
|
-
>,
|
|
636
|
-
{
|
|
637
|
-
has_flagged_messages: boolean;
|
|
638
|
-
labels: string[];
|
|
639
|
-
members: string[];
|
|
640
|
-
custom_properties: { [key: string]: string } | null;
|
|
641
|
-
}
|
|
642
|
-
>;
|
|
643
|
-
|
|
644
|
-
export type SenderRuleInfoType = Merge<
|
|
645
|
-
Omit<
|
|
646
|
-
Merge<Tables<'tbl_contacts'>, Tables<'tbl_chat_participants'>>,
|
|
647
|
-
| 'verified_name'
|
|
648
|
-
| 'verified_level'
|
|
649
|
-
| 'updated_at'
|
|
650
|
-
| 'short_name'
|
|
651
|
-
| 'pushname'
|
|
652
|
-
| 'periskope_name'
|
|
653
|
-
| 'org_phone'
|
|
654
|
-
| 'number'
|
|
655
|
-
| 'name'
|
|
656
|
-
| 'label_ids'
|
|
657
|
-
| 'is_wa_contact'
|
|
658
|
-
| 'is_user'
|
|
659
|
-
| 'is_my_contact'
|
|
660
|
-
| 'is_me'
|
|
661
|
-
| 'is_imported'
|
|
662
|
-
| 'is_group'
|
|
663
|
-
| 'is_blocked'
|
|
664
|
-
| 'contact_color'
|
|
665
|
-
| 'business_profile'
|
|
666
|
-
| 'id'
|
|
667
|
-
| 'contact_image'
|
|
668
|
-
| 'contact_type'
|
|
669
|
-
| 'chat_id'
|
|
670
|
-
>,
|
|
671
|
-
{
|
|
672
|
-
is_internal: boolean;
|
|
673
|
-
labels: string[] | null;
|
|
674
|
-
}
|
|
675
|
-
>;
|
|
676
|
-
|
|
677
|
-
export type MessageRuleInfoType = {
|
|
678
|
-
chat: ChatRuleInfoType;
|
|
679
|
-
sender: SenderRuleInfoType;
|
|
680
|
-
message: OverrideProperties<
|
|
681
|
-
Omit<
|
|
682
|
-
Tables<'tbl_chat_messages'>,
|
|
683
|
-
| 'vcards'
|
|
684
|
-
| 'updated_at'
|
|
685
|
-
| 'unique_id'
|
|
686
|
-
| 'token'
|
|
687
|
-
| 'to'
|
|
688
|
-
| 'sent_message_id'
|
|
689
|
-
| 'raw_data'
|
|
690
|
-
| 'delivery_info'
|
|
691
|
-
| 'poll_results'
|
|
692
|
-
| 'poll_info'
|
|
693
|
-
| 'order_id'
|
|
694
|
-
| 'mentioned_ids'
|
|
695
|
-
| 'media_key'
|
|
696
|
-
| 'location'
|
|
697
|
-
| 'links'
|
|
698
|
-
| 'is_status'
|
|
699
|
-
| 'is_starred'
|
|
700
|
-
| 'is_gif'
|
|
701
|
-
| 'is_forwarded'
|
|
702
|
-
| 'is_ephemeral'
|
|
703
|
-
| 'is_deleted'
|
|
704
|
-
| 'fts'
|
|
705
|
-
| 'quoted_message_id'
|
|
706
|
-
| 'invite_v4'
|
|
707
|
-
| 'id'
|
|
708
|
-
| 'has_reaction'
|
|
709
|
-
| 'has_media'
|
|
710
|
-
| 'duration'
|
|
711
|
-
| 'broadcast'
|
|
712
|
-
| 'broadcast_id'
|
|
713
|
-
| 'device_type'
|
|
714
|
-
| 'forwarding_score'
|
|
715
|
-
| 'from'
|
|
716
|
-
| 'from_me'
|
|
717
|
-
| 'message_ticket_id'
|
|
718
|
-
| 'prev_body'
|
|
719
|
-
| 'flag_response_time'
|
|
720
|
-
| 'flag_metadata'
|
|
721
|
-
>,
|
|
722
|
-
{
|
|
723
|
-
media: MediaType | null;
|
|
724
|
-
}
|
|
725
|
-
>;
|
|
726
|
-
};
|
|
727
|
-
|
|
728
|
-
export type ReactionRuleInfoType = {
|
|
729
|
-
chat: ChatRuleInfoType;
|
|
730
|
-
sender: SenderRuleInfoType;
|
|
731
|
-
message: MessageRuleInfoType['message'];
|
|
732
|
-
reaction: Pick<
|
|
733
|
-
Tables<'tbl_chat_reactions'>,
|
|
734
|
-
'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'
|
|
735
|
-
>;
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
export type TicketRuleInfoType = {
|
|
739
|
-
chat: ChatRuleInfoType;
|
|
740
|
-
sender: SenderRuleInfoType;
|
|
741
|
-
ticket: Merge<
|
|
742
|
-
Pick<
|
|
743
|
-
Tables<'tbl_chat_tickets'>,
|
|
744
|
-
| 'org_id'
|
|
745
|
-
| 'status'
|
|
746
|
-
| 'chat_id'
|
|
747
|
-
| 'subject'
|
|
748
|
-
| 'assignee'
|
|
749
|
-
| 'due_date'
|
|
750
|
-
| 'priority'
|
|
751
|
-
| 'raised_by'
|
|
752
|
-
| 'ticket_id'
|
|
753
|
-
| 'created_at'
|
|
754
|
-
| 'is_deleted'
|
|
755
|
-
>,
|
|
756
|
-
{
|
|
757
|
-
labels: string[] | null;
|
|
758
|
-
custom_properties: { [key: string]: string } | null;
|
|
759
|
-
}
|
|
760
|
-
>;
|
|
761
|
-
message: MessageRuleInfoType['message'];
|
|
762
|
-
};
|
|
763
|
-
export type FeatureFlagReturnType = Record<string, boolean>;
|