@periskope/types 0.6.152 → 0.6.154
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 +1 -0
- package/dist/index.js +1 -0
- package/dist/supabase.types.d.ts +1 -11
- package/dist/types.d.ts +39 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/rules.types.ts +1509 -0
- package/supabase.types.ts +2651 -2659
- package/types.ts +150 -0
package/types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { default as _Stripe } from 'stripe';
|
|
2
2
|
import { Merge, OverrideProperties } from 'type-fest';
|
|
3
|
+
import { Rule } from "./rules.types";
|
|
3
4
|
import { Tables, TablesUpdate } from './supabase.types';
|
|
4
5
|
|
|
5
6
|
/* ----------------------------- TYPE SHORTHANDS ---------------------------- */
|
|
@@ -117,6 +118,7 @@ export type OrgType = OverrideProperties<
|
|
|
117
118
|
is_freshdesk_connected: boolean;
|
|
118
119
|
is_zohodesk_connected: boolean;
|
|
119
120
|
access_scopes: AccessScopes;
|
|
121
|
+
rules: Rule[];
|
|
120
122
|
}
|
|
121
123
|
>,
|
|
122
124
|
{
|
|
@@ -616,3 +618,151 @@ export type OrgCreditsType = {
|
|
|
616
618
|
next_renewal_date: string;
|
|
617
619
|
};
|
|
618
620
|
|
|
621
|
+
/* --------------------------------- RULE INFO TYPE -------------------------------- */
|
|
622
|
+
|
|
623
|
+
export type ChatRuleInfoType = Merge<
|
|
624
|
+
Pick<
|
|
625
|
+
Tables<'view_chats'>,
|
|
626
|
+
| 'assigned_to'
|
|
627
|
+
| 'chat_id'
|
|
628
|
+
| 'chat_name'
|
|
629
|
+
| 'chat_type'
|
|
630
|
+
| 'created_at'
|
|
631
|
+
| 'group_description'
|
|
632
|
+
| 'info_admins_only'
|
|
633
|
+
| 'is_muted'
|
|
634
|
+
| 'org_id'
|
|
635
|
+
| 'org_phone'
|
|
636
|
+
| 'chat_org_phones'
|
|
637
|
+
| 'messages_admins_only'
|
|
638
|
+
| 'custom_properties'
|
|
639
|
+
>,
|
|
640
|
+
{
|
|
641
|
+
has_flagged_messages: boolean;
|
|
642
|
+
labels: string[];
|
|
643
|
+
members: string[];
|
|
644
|
+
custom_properties: { [key: string]: string } | null;
|
|
645
|
+
}
|
|
646
|
+
>;
|
|
647
|
+
|
|
648
|
+
export type SenderRuleInfoType = Merge<
|
|
649
|
+
Omit<
|
|
650
|
+
Merge<Tables<'tbl_contacts'>, Tables<'tbl_chat_participants'>>,
|
|
651
|
+
| 'verified_name'
|
|
652
|
+
| 'verified_level'
|
|
653
|
+
| 'updated_at'
|
|
654
|
+
| 'short_name'
|
|
655
|
+
| 'pushname'
|
|
656
|
+
| 'periskope_name'
|
|
657
|
+
| 'org_phone'
|
|
658
|
+
| 'number'
|
|
659
|
+
| 'name'
|
|
660
|
+
| 'label_ids'
|
|
661
|
+
| 'is_wa_contact'
|
|
662
|
+
| 'is_user'
|
|
663
|
+
| 'is_my_contact'
|
|
664
|
+
| 'is_me'
|
|
665
|
+
| 'is_imported'
|
|
666
|
+
| 'is_group'
|
|
667
|
+
| 'is_blocked'
|
|
668
|
+
| 'contact_color'
|
|
669
|
+
| 'business_profile'
|
|
670
|
+
| 'id'
|
|
671
|
+
| 'contact_image'
|
|
672
|
+
| 'contact_type'
|
|
673
|
+
| 'chat_id'
|
|
674
|
+
>,
|
|
675
|
+
{
|
|
676
|
+
is_internal: boolean;
|
|
677
|
+
labels: string[] | null;
|
|
678
|
+
}
|
|
679
|
+
>;
|
|
680
|
+
|
|
681
|
+
export type MessageRuleInfoType = {
|
|
682
|
+
chat: ChatRuleInfoType;
|
|
683
|
+
sender: SenderRuleInfoType;
|
|
684
|
+
message: OverrideProperties<
|
|
685
|
+
Omit<
|
|
686
|
+
Tables<'tbl_chat_messages'>,
|
|
687
|
+
| 'vcards'
|
|
688
|
+
| 'updated_at'
|
|
689
|
+
| 'unique_id'
|
|
690
|
+
| 'token'
|
|
691
|
+
| 'to'
|
|
692
|
+
| 'sent_message_id'
|
|
693
|
+
| 'raw_data'
|
|
694
|
+
| 'delivery_info'
|
|
695
|
+
| 'poll_results'
|
|
696
|
+
| 'poll_info'
|
|
697
|
+
| 'order_id'
|
|
698
|
+
| 'mentioned_ids'
|
|
699
|
+
| 'media_key'
|
|
700
|
+
| 'location'
|
|
701
|
+
| 'links'
|
|
702
|
+
| 'is_status'
|
|
703
|
+
| 'is_starred'
|
|
704
|
+
| 'is_gif'
|
|
705
|
+
| 'is_forwarded'
|
|
706
|
+
| 'is_ephemeral'
|
|
707
|
+
| 'is_deleted'
|
|
708
|
+
| 'fts'
|
|
709
|
+
| 'quoted_message_id'
|
|
710
|
+
| 'invite_v4'
|
|
711
|
+
| 'id'
|
|
712
|
+
| 'has_reaction'
|
|
713
|
+
| 'has_media'
|
|
714
|
+
| 'duration'
|
|
715
|
+
| 'broadcast'
|
|
716
|
+
| 'broadcast_id'
|
|
717
|
+
| 'device_type'
|
|
718
|
+
| 'forwarding_score'
|
|
719
|
+
| 'from'
|
|
720
|
+
| 'from_me'
|
|
721
|
+
| 'message_ticket_id'
|
|
722
|
+
| 'prev_body'
|
|
723
|
+
| 'flag_response_time'
|
|
724
|
+
| 'flag_metadata'
|
|
725
|
+
| 'ack'
|
|
726
|
+
>,
|
|
727
|
+
{
|
|
728
|
+
media: MediaType | null;
|
|
729
|
+
}
|
|
730
|
+
>;
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
export type ReactionRuleInfoType = {
|
|
734
|
+
chat: ChatRuleInfoType;
|
|
735
|
+
sender: SenderRuleInfoType;
|
|
736
|
+
message: MessageRuleInfoType['message'];
|
|
737
|
+
reaction: Pick<
|
|
738
|
+
Tables<'tbl_chat_reactions'>,
|
|
739
|
+
'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'
|
|
740
|
+
>;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
export type TicketRuleInfoType = {
|
|
744
|
+
chat: ChatRuleInfoType;
|
|
745
|
+
sender: SenderRuleInfoType;
|
|
746
|
+
ticket: Merge<
|
|
747
|
+
Pick<
|
|
748
|
+
Tables<'tbl_chat_tickets'>,
|
|
749
|
+
| 'org_id'
|
|
750
|
+
| 'status'
|
|
751
|
+
| 'chat_id'
|
|
752
|
+
| 'subject'
|
|
753
|
+
| 'assignee'
|
|
754
|
+
| 'due_date'
|
|
755
|
+
| 'priority'
|
|
756
|
+
| 'raised_by'
|
|
757
|
+
| 'ticket_id'
|
|
758
|
+
| 'created_at'
|
|
759
|
+
| 'is_deleted'
|
|
760
|
+
>,
|
|
761
|
+
{
|
|
762
|
+
labels: string[] | null;
|
|
763
|
+
custom_properties: { [key: string]: string } | null;
|
|
764
|
+
}
|
|
765
|
+
>;
|
|
766
|
+
message: MessageRuleInfoType['message'];
|
|
767
|
+
};
|
|
768
|
+
export type FeatureFlagReturnType = Record<string, boolean>;
|