@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/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" | "reaction.added";
|
|
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
|
};
|
|
@@ -2272,7 +2272,6 @@ export type Database = {
|
|
|
2272
2272
|
owner_id: string | null;
|
|
2273
2273
|
path_tokens: string[] | null;
|
|
2274
2274
|
updated_at: string | null;
|
|
2275
|
-
user_metadata: Json | null;
|
|
2276
2275
|
version: string | null;
|
|
2277
2276
|
};
|
|
2278
2277
|
Insert: {
|
|
@@ -2286,7 +2285,6 @@ export type Database = {
|
|
|
2286
2285
|
owner_id?: string | null;
|
|
2287
2286
|
path_tokens?: string[] | null;
|
|
2288
2287
|
updated_at?: string | null;
|
|
2289
|
-
user_metadata?: Json | null;
|
|
2290
2288
|
version?: string | null;
|
|
2291
2289
|
};
|
|
2292
2290
|
Update: {
|
|
@@ -2300,7 +2298,6 @@ export type Database = {
|
|
|
2300
2298
|
owner_id?: string | null;
|
|
2301
2299
|
path_tokens?: string[] | null;
|
|
2302
2300
|
updated_at?: string | null;
|
|
2303
|
-
user_metadata?: Json | null;
|
|
2304
2301
|
version?: string | null;
|
|
2305
2302
|
};
|
|
2306
2303
|
Relationships: [
|
|
@@ -2322,7 +2319,6 @@ export type Database = {
|
|
|
2322
2319
|
key: string;
|
|
2323
2320
|
owner_id: string | null;
|
|
2324
2321
|
upload_signature: string;
|
|
2325
|
-
user_metadata: Json | null;
|
|
2326
2322
|
version: string;
|
|
2327
2323
|
};
|
|
2328
2324
|
Insert: {
|
|
@@ -2333,7 +2329,6 @@ export type Database = {
|
|
|
2333
2329
|
key: string;
|
|
2334
2330
|
owner_id?: string | null;
|
|
2335
2331
|
upload_signature: string;
|
|
2336
|
-
user_metadata?: Json | null;
|
|
2337
2332
|
version: string;
|
|
2338
2333
|
};
|
|
2339
2334
|
Update: {
|
|
@@ -2344,7 +2339,6 @@ export type Database = {
|
|
|
2344
2339
|
key?: string;
|
|
2345
2340
|
owner_id?: string | null;
|
|
2346
2341
|
upload_signature?: string;
|
|
2347
|
-
user_metadata?: Json | null;
|
|
2348
2342
|
version?: string;
|
|
2349
2343
|
};
|
|
2350
2344
|
Relationships: [
|
|
@@ -2481,10 +2475,6 @@ export type Database = {
|
|
|
2481
2475
|
updated_at: string;
|
|
2482
2476
|
}[];
|
|
2483
2477
|
};
|
|
2484
|
-
operation: {
|
|
2485
|
-
Args: Record<PropertyKey, never>;
|
|
2486
|
-
Returns: string;
|
|
2487
|
-
};
|
|
2488
2478
|
search: {
|
|
2489
2479
|
Args: {
|
|
2490
2480
|
prefix: string;
|
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