@periskope/types 0.6.146 → 0.6.147

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/types.d.ts CHANGED
@@ -428,4 +428,48 @@ export type DeliveryInfoType = {
428
428
  read_count: number;
429
429
  delivered_count: number;
430
430
  };
431
+ export type OrgCreditsType = {
432
+ org_id: string;
433
+ recurring_allowance: number;
434
+ recurring_balance: number;
435
+ topup_balance: number;
436
+ total_credits_used: number;
437
+ next_renewal_date: string;
438
+ };
439
+ export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_id' | 'chat_name' | 'chat_type' | 'created_at' | 'group_description' | 'info_admins_only' | 'is_exited' | 'is_muted' | 'org_id' | 'org_phone' | 'chat_org_phones' | 'messages_admins_only' | 'custom_properties'>, {
440
+ has_flagged_messages: boolean;
441
+ labels: string[];
442
+ members: string[];
443
+ custom_properties: {
444
+ [key: string]: string;
445
+ } | null;
446
+ }>;
447
+ export type SenderRuleInfoType = Merge<Omit<Merge<Tables<'tbl_contacts'>, Tables<'tbl_chat_participants'>>, 'verified_name' | 'verified_level' | 'updated_at' | 'short_name' | 'pushname' | 'periskope_name' | 'org_phone' | 'number' | 'name' | 'label_ids' | 'is_wa_contact' | 'is_user' | 'is_my_contact' | 'is_me' | 'is_imported' | 'is_group' | 'is_blocked' | 'contact_color' | 'business_profile' | 'id' | 'contact_image' | 'contact_type' | 'chat_id'>, {
448
+ is_internal: boolean;
449
+ labels: string[] | null;
450
+ }>;
451
+ export type MessageRuleInfoType = {
452
+ chat: ChatRuleInfoType;
453
+ sender: SenderRuleInfoType;
454
+ message: OverrideProperties<Omit<Tables<'tbl_chat_messages'>, 'vcards' | 'updated_at' | 'unique_id' | 'token' | 'to' | 'sent_message_id' | 'raw_data' | 'delivery_info' | 'poll_results' | 'poll_info' | 'order_id' | 'mentioned_ids' | 'media_key' | 'location' | 'links' | 'is_status' | 'is_starred' | 'is_gif' | 'is_forwarded' | 'is_ephemeral' | 'is_deleted' | 'fts' | 'quoted_message_id' | 'invite_v4' | 'id' | 'has_reaction' | 'has_media' | 'duration' | 'broadcast' | 'broadcast_id' | 'device_type' | 'forwarding_score' | 'from' | 'from_me' | 'message_ticket_id' | 'prev_body' | 'flag_response_time' | 'flag_metadata'>, {
455
+ media: MediaType | null;
456
+ }>;
457
+ };
458
+ export type ReactionRuleInfoType = {
459
+ chat: ChatRuleInfoType;
460
+ sender: SenderRuleInfoType;
461
+ message: MessageRuleInfoType['message'];
462
+ reaction: Pick<Tables<'tbl_chat_reactions'>, 'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'>;
463
+ };
464
+ export type TicketRuleInfoType = {
465
+ chat: ChatRuleInfoType;
466
+ sender: SenderRuleInfoType;
467
+ ticket: Merge<Pick<Tables<'tbl_chat_tickets'>, 'org_id' | 'status' | 'chat_id' | 'subject' | 'assignee' | 'due_date' | 'priority' | 'raised_by' | 'ticket_id' | 'created_at' | 'is_deleted'>, {
468
+ labels: string[] | null;
469
+ custom_properties: {
470
+ [key: string]: string;
471
+ } | null;
472
+ }>;
473
+ message: MessageRuleInfoType['message'];
474
+ };
431
475
  export {};
package/index.ts CHANGED
@@ -1,3 +1,3 @@
1
+ export * from './rules.types';
1
2
  export * from './supabase.types';
2
3
  export * from './types';
3
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.146",
3
+ "version": "0.6.147",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",