@periskope/types 0.6.152 → 0.6.153
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 -1
- 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 +1 -0
- package/types.ts +150 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./rules.types"), exports);
|
|
17
18
|
__exportStar(require("./supabase.types"), exports);
|
|
18
19
|
__exportStar(require("./types"), exports);
|
package/dist/supabase.types.d.ts
CHANGED
|
@@ -2190,7 +2190,7 @@ export type Database = {
|
|
|
2190
2190
|
enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
|
|
2191
2191
|
enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
|
|
2192
2192
|
enum_credit_transaction_type: "credit" | "debit";
|
|
2193
|
-
enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged";
|
|
2193
|
+
enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged" | "chat.label.updated";
|
|
2194
2194
|
enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce" | "zohodesk" | "gsheets";
|
|
2195
2195
|
enum_member_role: "admin" | "member";
|
|
2196
2196
|
};
|
package/dist/types.d.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
|
export declare enum AllPlans {
|
|
5
6
|
FREE_TRIAL = "free-trial",
|
|
@@ -95,6 +96,7 @@ export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
|
|
|
95
96
|
is_freshdesk_connected: boolean;
|
|
96
97
|
is_zohodesk_connected: boolean;
|
|
97
98
|
access_scopes: AccessScopes;
|
|
99
|
+
rules: Rule[];
|
|
98
100
|
}>, {
|
|
99
101
|
org_plan: OrgPlan<AllPlans | Enterprise>;
|
|
100
102
|
stripe_customer_details: _Stripe.Customer | null;
|
|
@@ -447,4 +449,41 @@ export type OrgCreditsType = {
|
|
|
447
449
|
total_credits_used: number;
|
|
448
450
|
next_renewal_date: string;
|
|
449
451
|
};
|
|
452
|
+
export type ChatRuleInfoType = Merge<Pick<Tables<'view_chats'>, 'assigned_to' | 'chat_id' | 'chat_name' | 'chat_type' | 'created_at' | 'group_description' | 'info_admins_only' | 'is_muted' | 'org_id' | 'org_phone' | 'chat_org_phones' | 'messages_admins_only' | 'custom_properties'>, {
|
|
453
|
+
has_flagged_messages: boolean;
|
|
454
|
+
labels: string[];
|
|
455
|
+
members: string[];
|
|
456
|
+
custom_properties: {
|
|
457
|
+
[key: string]: string;
|
|
458
|
+
} | null;
|
|
459
|
+
}>;
|
|
460
|
+
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'>, {
|
|
461
|
+
is_internal: boolean;
|
|
462
|
+
labels: string[] | null;
|
|
463
|
+
}>;
|
|
464
|
+
export type MessageRuleInfoType = {
|
|
465
|
+
chat: ChatRuleInfoType;
|
|
466
|
+
sender: SenderRuleInfoType;
|
|
467
|
+
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' | 'ack'>, {
|
|
468
|
+
media: MediaType | null;
|
|
469
|
+
}>;
|
|
470
|
+
};
|
|
471
|
+
export type ReactionRuleInfoType = {
|
|
472
|
+
chat: ChatRuleInfoType;
|
|
473
|
+
sender: SenderRuleInfoType;
|
|
474
|
+
message: MessageRuleInfoType['message'];
|
|
475
|
+
reaction: Pick<Tables<'tbl_chat_reactions'>, 'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'>;
|
|
476
|
+
};
|
|
477
|
+
export type TicketRuleInfoType = {
|
|
478
|
+
chat: ChatRuleInfoType;
|
|
479
|
+
sender: SenderRuleInfoType;
|
|
480
|
+
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'>, {
|
|
481
|
+
labels: string[] | null;
|
|
482
|
+
custom_properties: {
|
|
483
|
+
[key: string]: string;
|
|
484
|
+
} | null;
|
|
485
|
+
}>;
|
|
486
|
+
message: MessageRuleInfoType['message'];
|
|
487
|
+
};
|
|
488
|
+
export type FeatureFlagReturnType = Record<string, boolean>;
|
|
450
489
|
export {};
|
package/index.ts
CHANGED