@periskope/types 0.6.95 → 0.6.96

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
@@ -9,16 +9,18 @@ export type WhatsappChat = Chat & {
9
9
  };
10
10
  export declare enum AllPlans {
11
11
  FREE_TRIAL = "free-trial",
12
- MONTHLY_STARTER = "monthly-starter",
13
- YEARLY_STARTER = "yearly-starter",
14
- MONTHLY_PRO = "monthly-pro",
15
- YEARLY_PRO = "yearly-pro",
16
- ENTERPRISE = "enterprise"
12
+ ENTERPRISE = "enterprise",
13
+ MONTHLY_STARTER_SINGLE = "monthly-starter-single",
14
+ YEARLY_STARTER_SINGLE = "yearly-starter-single",
15
+ MONTHLY_PRO_SINGLE = "monthly-pro-single",
16
+ YEARLY_PRO_SINGLE = "yearly-pro-single"
17
17
  }
18
18
  export type Frequency = 'yearly' | 'monthly' | 'weekly' | 'custom';
19
19
  export type Enterprise = `${string}-enterprise`;
20
20
  export type OrgPlanEnterprise = {
21
+ subscription_id: string;
21
22
  plan_id: Enterprise;
23
+ interval: number;
22
24
  frequency: Frequency;
23
25
  user_limit: number;
24
26
  phone_limit: number;
@@ -26,12 +28,14 @@ export type OrgPlanEnterprise = {
26
28
  current_period_end: number | null;
27
29
  };
28
30
  export type OrgPlanNonEnterprise = {
31
+ subscription_id: string;
29
32
  plan_id: AllPlans;
30
33
  interval: number;
31
34
  frequency: Frequency;
32
35
  user_limit: number;
33
36
  phone_limit: number;
34
- percent_off: number | null;
37
+ current_period_end: number;
38
+ current_period_start: number;
35
39
  };
36
40
  export type OrgPlan<T extends AllPlans | Enterprise> = T extends Enterprise ? OrgPlanEnterprise : T extends AllPlans ? OrgPlanNonEnterprise : never;
37
41
  export type MicrosurveyData = {
@@ -41,8 +45,9 @@ export type MicrosurveyData = {
41
45
  }[];
42
46
  export type OrgPreferences = {
43
47
  disable_ai_flagging?: boolean;
44
- allow_exports?: boolean;
48
+ disable_allow_exports?: boolean;
45
49
  sync_phone_contacts?: boolean;
50
+ mask_phone_numbers?: boolean;
46
51
  };
47
52
  type OrgPreferenceKey = keyof OrgPreferences;
48
53
  export type OrgPreferencesValue = {
@@ -109,6 +114,8 @@ export type ChatType = Merge<Tables<'view_chats'>, {
109
114
  hubId: string;
110
115
  object_data: HubspotObjectDataType;
111
116
  } | null;
117
+ info_admins_only: boolean;
118
+ messages_admins_only: boolean;
112
119
  }>;
113
120
  export type MediaType = {
114
121
  path: string;
@@ -152,6 +159,12 @@ export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
152
159
  };
153
160
  object_data?: HubspotObjectDataType;
154
161
  } | null;
162
+ close_ticket_metadata?: {
163
+ closed_by: string;
164
+ closed_at: string;
165
+ closed_message?: string | null;
166
+ send_reply_message_id?: string | null;
167
+ } | null;
155
168
  }>;
156
169
  export type ContactType = Merge<Tables<'tbl_contacts'>, {
157
170
  chats: ChatType[] | null;
@@ -208,12 +221,15 @@ export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
208
221
  } & {
209
222
  chats: ChatType[];
210
223
  };
211
- export type ChatParticipantOperation = {
212
- participant_ids: string[];
213
- operation_type: 'ADD' | 'REMOVE' | 'PROMOTE' | 'DEMOTE';
224
+ export type ChatLogType = {
225
+ log: Tables<'view_chat_logs'>;
226
+ operations: Tables<'tbl_chat_logs'>[];
214
227
  };
215
- export type ChatParticipantOperationPayload = ChatParticipantOperation & {
228
+ export type ChatOperationsType = 'ADD' | 'REMOVE' | 'PROMOTE' | 'DEMOTE';
229
+ export type ChatParticipantOperationPayload = {
230
+ participant_ids: string[];
216
231
  chat_ids: string[];
232
+ performed_by: string;
217
233
  };
218
234
  export type ChatOperationReturn = {
219
235
  [participant_id: string]: {
@@ -227,6 +243,9 @@ export type StripeSubscription = _Stripe.Subscription;
227
243
  export type StripeCustomer = _Stripe.Customer;
228
244
  export type StripeCoupon = _Stripe.Coupon;
229
245
  export type StripePrice = _Stripe.Price;
246
+ export type Stripe = _Stripe;
247
+ export type StripeUpcomingInvoice = _Stripe.UpcomingInvoice;
248
+ export type StripeLineItem = _Stripe.Checkout.SessionCreateParams.LineItem;
230
249
  export type PhoneStateType = {
231
250
  loading: boolean;
232
251
  state: string;
package/dist/types.js CHANGED
@@ -5,11 +5,15 @@ exports.IntegrationLogType = exports.SUPPORTED_TYPES = exports.enumChatColors =
5
5
  var AllPlans;
6
6
  (function (AllPlans) {
7
7
  AllPlans["FREE_TRIAL"] = "free-trial";
8
- AllPlans["MONTHLY_STARTER"] = "monthly-starter";
9
- AllPlans["YEARLY_STARTER"] = "yearly-starter";
10
- AllPlans["MONTHLY_PRO"] = "monthly-pro";
11
- AllPlans["YEARLY_PRO"] = "yearly-pro";
8
+ // MONTHLY_STARTER = 'monthly-starter',
9
+ // YEARLY_STARTER = 'yearly-starter',
10
+ // MONTHLY_PRO = 'monthly-pro',
11
+ // YEARLY_PRO = 'yearly-pro',
12
12
  AllPlans["ENTERPRISE"] = "enterprise";
13
+ AllPlans["MONTHLY_STARTER_SINGLE"] = "monthly-starter-single";
14
+ AllPlans["YEARLY_STARTER_SINGLE"] = "yearly-starter-single";
15
+ AllPlans["MONTHLY_PRO_SINGLE"] = "monthly-pro-single";
16
+ AllPlans["YEARLY_PRO_SINGLE"] = "yearly-pro-single";
13
17
  })(AllPlans || (exports.AllPlans = AllPlans = {}));
14
18
  /* -------------------------------- CONSTANTS ------------------------------- */
15
19
  exports.labelColors = [
@@ -0,0 +1,23 @@
1
+ #!/bin/bash
2
+
3
+ # Define the path to the TypeScript file
4
+ filePath="./supabase.types.ts"
5
+
6
+ # Read the content of the file as a single string
7
+ fileContent=$(cat "$filePath")
8
+
9
+ # Define the current and new type definitions using Perl-style regular expressions
10
+ oldTypeDefinition='export type Json =\s*\| string\s*\| number\s*\| boolean\s*\| null\s*\| \{ \[key: string\]: Json \| undefined \}\s*\| Json\[\]'
11
+ newTypeDefinition='export type Json = { [key: string]: any } | any'
12
+
13
+ # Replace the old type definition with the new one
14
+ updatedContent=$(echo "$fileContent" | perl -0777 -pe "s/$oldTypeDefinition/$newTypeDefinition/g")
15
+
16
+ # Update interface to type
17
+ oldText='export interface Database '
18
+ newText='export type Database = '
19
+
20
+ updatedContent=$(echo "$updatedContent" | sed "s/$oldText/$newText/g")
21
+
22
+ # Write the updated content back to the file
23
+ echo "$updatedContent" > "$filePath"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.95",
3
+ "version": "0.6.96",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",