@periskope/types 0.6.155 → 0.6.157
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/rules.types.d.ts +300 -0
- package/dist/rules.types.js +1135 -0
- package/dist/supabase.types.d.ts +4 -10
- package/dist/types.d.ts +39 -0
- package/index.ts +1 -1
- package/package.json +1 -1
- package/rules.types.ts +1569 -0
- package/supabase.types.ts +5 -11
- package/types.ts +771 -621
package/dist/supabase.types.d.ts
CHANGED
|
@@ -939,6 +939,7 @@ export type Database = {
|
|
|
939
939
|
chat_name: string | null;
|
|
940
940
|
chat_type: string | null;
|
|
941
941
|
created_at: string;
|
|
942
|
+
created_by: string | null;
|
|
942
943
|
group_metadata: Json | null;
|
|
943
944
|
id: Json | null;
|
|
944
945
|
invite_link: string | null;
|
|
@@ -964,6 +965,7 @@ export type Database = {
|
|
|
964
965
|
chat_name?: string | null;
|
|
965
966
|
chat_type?: string | null;
|
|
966
967
|
created_at?: string;
|
|
968
|
+
created_by?: string | null;
|
|
967
969
|
group_metadata?: Json | null;
|
|
968
970
|
id?: Json | null;
|
|
969
971
|
invite_link?: string | null;
|
|
@@ -989,6 +991,7 @@ export type Database = {
|
|
|
989
991
|
chat_name?: string | null;
|
|
990
992
|
chat_type?: string | null;
|
|
991
993
|
created_at?: string;
|
|
994
|
+
created_by?: string | null;
|
|
992
995
|
group_metadata?: Json | null;
|
|
993
996
|
id?: Json | null;
|
|
994
997
|
invite_link?: string | null;
|
|
@@ -1820,6 +1823,7 @@ export type Database = {
|
|
|
1820
1823
|
chat_name: string | null;
|
|
1821
1824
|
chat_org_phones: string[] | null;
|
|
1822
1825
|
chat_type: string | null;
|
|
1826
|
+
closed_at: number | null;
|
|
1823
1827
|
created_at: string | null;
|
|
1824
1828
|
custom_properties: Json | null;
|
|
1825
1829
|
flag_count_map: Json | null;
|
|
@@ -2275,7 +2279,6 @@ export type Database = {
|
|
|
2275
2279
|
owner_id: string | null;
|
|
2276
2280
|
path_tokens: string[] | null;
|
|
2277
2281
|
updated_at: string | null;
|
|
2278
|
-
user_metadata: Json | null;
|
|
2279
2282
|
version: string | null;
|
|
2280
2283
|
};
|
|
2281
2284
|
Insert: {
|
|
@@ -2289,7 +2292,6 @@ export type Database = {
|
|
|
2289
2292
|
owner_id?: string | null;
|
|
2290
2293
|
path_tokens?: string[] | null;
|
|
2291
2294
|
updated_at?: string | null;
|
|
2292
|
-
user_metadata?: Json | null;
|
|
2293
2295
|
version?: string | null;
|
|
2294
2296
|
};
|
|
2295
2297
|
Update: {
|
|
@@ -2303,7 +2305,6 @@ export type Database = {
|
|
|
2303
2305
|
owner_id?: string | null;
|
|
2304
2306
|
path_tokens?: string[] | null;
|
|
2305
2307
|
updated_at?: string | null;
|
|
2306
|
-
user_metadata?: Json | null;
|
|
2307
2308
|
version?: string | null;
|
|
2308
2309
|
};
|
|
2309
2310
|
Relationships: [
|
|
@@ -2325,7 +2326,6 @@ export type Database = {
|
|
|
2325
2326
|
key: string;
|
|
2326
2327
|
owner_id: string | null;
|
|
2327
2328
|
upload_signature: string;
|
|
2328
|
-
user_metadata: Json | null;
|
|
2329
2329
|
version: string;
|
|
2330
2330
|
};
|
|
2331
2331
|
Insert: {
|
|
@@ -2336,7 +2336,6 @@ export type Database = {
|
|
|
2336
2336
|
key: string;
|
|
2337
2337
|
owner_id?: string | null;
|
|
2338
2338
|
upload_signature: string;
|
|
2339
|
-
user_metadata?: Json | null;
|
|
2340
2339
|
version: string;
|
|
2341
2340
|
};
|
|
2342
2341
|
Update: {
|
|
@@ -2347,7 +2346,6 @@ export type Database = {
|
|
|
2347
2346
|
key?: string;
|
|
2348
2347
|
owner_id?: string | null;
|
|
2349
2348
|
upload_signature?: string;
|
|
2350
|
-
user_metadata?: Json | null;
|
|
2351
2349
|
version?: string;
|
|
2352
2350
|
};
|
|
2353
2351
|
Relationships: [
|
|
@@ -2484,10 +2482,6 @@ export type Database = {
|
|
|
2484
2482
|
updated_at: string;
|
|
2485
2483
|
}[];
|
|
2486
2484
|
};
|
|
2487
|
-
operation: {
|
|
2488
|
-
Args: Record<PropertyKey, never>;
|
|
2489
|
-
Returns: string;
|
|
2490
|
-
};
|
|
2491
2485
|
search: {
|
|
2492
2486
|
Args: {
|
|
2493
2487
|
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",
|
|
@@ -98,6 +99,7 @@ export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
|
|
|
98
99
|
is_freshdesk_connected: boolean;
|
|
99
100
|
is_zohodesk_connected: boolean;
|
|
100
101
|
access_scopes: AccessScopes;
|
|
102
|
+
rules: Rule[];
|
|
101
103
|
}>, {
|
|
102
104
|
org_plan: OrgPlan<AllPlans | Enterprise>;
|
|
103
105
|
stripe_customer_details: _Stripe.Customer | null;
|
|
@@ -450,4 +452,41 @@ export type OrgCreditsType = {
|
|
|
450
452
|
total_credits_used: number;
|
|
451
453
|
next_renewal_date: string;
|
|
452
454
|
};
|
|
455
|
+
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'>, {
|
|
456
|
+
has_flagged_messages: boolean;
|
|
457
|
+
labels: string[];
|
|
458
|
+
members: string[];
|
|
459
|
+
custom_properties: {
|
|
460
|
+
[key: string]: string;
|
|
461
|
+
} | null;
|
|
462
|
+
}>;
|
|
463
|
+
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'>, {
|
|
464
|
+
is_internal: boolean;
|
|
465
|
+
labels: string[] | null;
|
|
466
|
+
}>;
|
|
467
|
+
export type MessageRuleInfoType = {
|
|
468
|
+
chat: ChatRuleInfoType;
|
|
469
|
+
sender: SenderRuleInfoType;
|
|
470
|
+
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'>, {
|
|
471
|
+
media: MediaType | null;
|
|
472
|
+
}>;
|
|
473
|
+
};
|
|
474
|
+
export type ReactionRuleInfoType = {
|
|
475
|
+
chat: ChatRuleInfoType;
|
|
476
|
+
sender: SenderRuleInfoType;
|
|
477
|
+
message: MessageRuleInfoType['message'];
|
|
478
|
+
reaction: Pick<Tables<'tbl_chat_reactions'>, 'reaction' | 'sender_id' | 'message_id' | 'chat_id' | 'reaction_id'>;
|
|
479
|
+
};
|
|
480
|
+
export type TicketRuleInfoType = {
|
|
481
|
+
chat: ChatRuleInfoType;
|
|
482
|
+
sender: SenderRuleInfoType;
|
|
483
|
+
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'>, {
|
|
484
|
+
labels: string[] | null;
|
|
485
|
+
custom_properties: {
|
|
486
|
+
[key: string]: string;
|
|
487
|
+
} | null;
|
|
488
|
+
}>;
|
|
489
|
+
message: MessageRuleInfoType['message'];
|
|
490
|
+
};
|
|
491
|
+
export type FeatureFlagReturnType = Record<string, boolean>;
|
|
453
492
|
export {};
|
package/index.ts
CHANGED