@periskope/types 0.6.182 → 0.6.184

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.
@@ -755,6 +755,8 @@ exports.ActionNameMap = {
755
755
  'message.updated',
756
756
  'reaction.added',
757
757
  'message.flagged',
758
+ 'ticket.created',
759
+ 'ticket.updated',
758
760
  ],
759
761
  },
760
762
  delete_message: {
@@ -766,6 +768,8 @@ exports.ActionNameMap = {
766
768
  'message.updated',
767
769
  'reaction.added',
768
770
  'message.flagged',
771
+ 'ticket.created',
772
+ 'ticket.updated',
769
773
  ],
770
774
  },
771
775
  notify_http: {
@@ -779,7 +783,7 @@ exports.ActionNameMap = {
779
783
  placeholder: 'Enter URL',
780
784
  value: null,
781
785
  required: true,
782
- description: 'Enter the Webhook URL here. The endpoint added here should be a **POST HTTP / Endpoint** with no open auth.'
786
+ description: 'Enter the Webhook URL here. The endpoint added here should be a **POST HTTP / Endpoint** with no open auth.',
783
787
  },
784
788
  },
785
789
  validTriggers: [
@@ -883,6 +887,8 @@ exports.ActionNameMap = {
883
887
  'message.updated',
884
888
  'reaction.added',
885
889
  'message.flagged',
890
+ 'ticket.created',
891
+ 'ticket.updated'
886
892
  ],
887
893
  },
888
894
  assign_ticket: {
@@ -1980,20 +1980,6 @@ export type Database = {
1980
1980
  sent_message_id?: string | null;
1981
1981
  };
1982
1982
  Relationships: [
1983
- {
1984
- foreignKeyName: "tbl_scheduled_logs_scheduled_id_fkey";
1985
- columns: ["scheduled_id"];
1986
- isOneToOne: false;
1987
- referencedRelation: "tbl_recurring_messages";
1988
- referencedColumns: ["scheduled_id"];
1989
- },
1990
- {
1991
- foreignKeyName: "tbl_scheduled_logs_scheduled_id_fkey";
1992
- columns: ["scheduled_id"];
1993
- isOneToOne: false;
1994
- referencedRelation: "view_scheduled_logs";
1995
- referencedColumns: ["scheduled_id"];
1996
- },
1997
1983
  {
1998
1984
  foreignKeyName: "tbl_scheduled_message_logs_org_id_fkey";
1999
1985
  columns: ["org_id"];
@@ -2328,6 +2314,7 @@ export type Database = {
2328
2314
  name_input?: string;
2329
2315
  type_input?: Database["public"]["Enums"]["enum_integration_type"];
2330
2316
  org_id_input?: string;
2317
+ metadata_input?: Json;
2331
2318
  };
2332
2319
  Returns: Json;
2333
2320
  };
@@ -2391,6 +2378,9 @@ export type Database = {
2391
2378
  Args: {
2392
2379
  org_id_input: string;
2393
2380
  chat_id_input?: string[];
2381
+ chat_type_input?: string;
2382
+ start_date_input?: string;
2383
+ end_date_input?: string;
2394
2384
  };
2395
2385
  Returns: Json;
2396
2386
  };
@@ -2398,6 +2388,10 @@ export type Database = {
2398
2388
  Args: {
2399
2389
  org_id_input: string;
2400
2390
  ticket_id_input?: string[];
2391
+ start_date_input?: string;
2392
+ end_date_input?: string;
2393
+ status_input?: Database["public"]["Enums"]["enum_chat_tickets_status"];
2394
+ priority_input?: number;
2401
2395
  };
2402
2396
  Returns: Json;
2403
2397
  };
package/dist/types.d.ts CHANGED
@@ -21,6 +21,8 @@ export type OrgPlanEnterprise = {
21
21
  phone_limit: number;
22
22
  current_period_start: number;
23
23
  current_period_end: number | null;
24
+ additional_user_limit?: number;
25
+ additional_phone_limit?: number;
24
26
  };
25
27
  export type OrgPlanNonEnterprise = {
26
28
  subscription_id: string;
@@ -31,6 +33,8 @@ export type OrgPlanNonEnterprise = {
31
33
  phone_limit: number;
32
34
  current_period_end: number;
33
35
  current_period_start: number;
36
+ additional_user_limit?: number;
37
+ additional_phone_limit?: number;
34
38
  };
35
39
  export type OrgPlan<T extends AllPlans | Enterprise> = T extends Enterprise ? OrgPlanEnterprise : T extends AllPlans ? OrgPlanNonEnterprise : never;
36
40
  export type MicrosurveyData = {
@@ -607,7 +611,7 @@ export type TaskType = OverrideProperties<Tables<'tbl_org_tasks'>, {
607
611
  object: TicketType;
608
612
  } | null;
609
613
  status: 'open' | 'inprogress' | 'closed';
610
- priority: 0 | 1 | 2 | 3 | 4;
614
+ priority: 1 | 2 | 3;
611
615
  completed_metadata?: {
612
616
  completed_at: string;
613
617
  completed_by: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.182",
3
+ "version": "0.6.184",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/rules.types.ts CHANGED
@@ -1201,6 +1201,8 @@ export const ActionNameMap: Record<
1201
1201
  'message.updated',
1202
1202
  'reaction.added',
1203
1203
  'message.flagged',
1204
+ 'ticket.created',
1205
+ 'ticket.updated',
1204
1206
  ],
1205
1207
  },
1206
1208
  delete_message: {
@@ -1212,6 +1214,8 @@ export const ActionNameMap: Record<
1212
1214
  'message.updated',
1213
1215
  'reaction.added',
1214
1216
  'message.flagged',
1217
+ 'ticket.created',
1218
+ 'ticket.updated',
1215
1219
  ],
1216
1220
  },
1217
1221
  notify_http: {
@@ -1225,7 +1229,8 @@ export const ActionNameMap: Record<
1225
1229
  placeholder: 'Enter URL',
1226
1230
  value: null,
1227
1231
  required: true,
1228
- description: 'Enter the Webhook URL here. The endpoint added here should be a **POST HTTP / Endpoint** with no open auth.'
1232
+ description:
1233
+ 'Enter the Webhook URL here. The endpoint added here should be a **POST HTTP / Endpoint** with no open auth.',
1229
1234
  },
1230
1235
  },
1231
1236
  validTriggers: [
@@ -1329,6 +1334,8 @@ export const ActionNameMap: Record<
1329
1334
  'message.updated',
1330
1335
  'reaction.added',
1331
1336
  'message.flagged',
1337
+ 'ticket.created',
1338
+ 'ticket.updated'
1332
1339
  ],
1333
1340
  },
1334
1341
  assign_ticket: {
package/supabase.types.ts CHANGED
@@ -1989,20 +1989,6 @@ export type Database = {
1989
1989
  sent_message_id?: string | null
1990
1990
  }
1991
1991
  Relationships: [
1992
- {
1993
- foreignKeyName: "tbl_scheduled_logs_scheduled_id_fkey"
1994
- columns: ["scheduled_id"]
1995
- isOneToOne: false
1996
- referencedRelation: "tbl_recurring_messages"
1997
- referencedColumns: ["scheduled_id"]
1998
- },
1999
- {
2000
- foreignKeyName: "tbl_scheduled_logs_scheduled_id_fkey"
2001
- columns: ["scheduled_id"]
2002
- isOneToOne: false
2003
- referencedRelation: "view_scheduled_logs"
2004
- referencedColumns: ["scheduled_id"]
2005
- },
2006
1992
  {
2007
1993
  foreignKeyName: "tbl_scheduled_message_logs_org_id_fkey"
2008
1994
  columns: ["org_id"]
@@ -2339,6 +2325,7 @@ export type Database = {
2339
2325
  name_input?: string
2340
2326
  type_input?: Database["public"]["Enums"]["enum_integration_type"]
2341
2327
  org_id_input?: string
2328
+ metadata_input?: Json
2342
2329
  }
2343
2330
  Returns: Json
2344
2331
  }
@@ -2402,6 +2389,9 @@ export type Database = {
2402
2389
  Args: {
2403
2390
  org_id_input: string
2404
2391
  chat_id_input?: string[]
2392
+ chat_type_input?: string
2393
+ start_date_input?: string
2394
+ end_date_input?: string
2405
2395
  }
2406
2396
  Returns: Json
2407
2397
  }
@@ -2409,6 +2399,10 @@ export type Database = {
2409
2399
  Args: {
2410
2400
  org_id_input: string
2411
2401
  ticket_id_input?: string[]
2402
+ start_date_input?: string
2403
+ end_date_input?: string
2404
+ status_input?: Database["public"]["Enums"]["enum_chat_tickets_status"]
2405
+ priority_input?: number
2412
2406
  }
2413
2407
  Returns: Json
2414
2408
  }
package/types.ts CHANGED
@@ -33,6 +33,8 @@ export type OrgPlanEnterprise = {
33
33
  phone_limit: number;
34
34
  current_period_start: number;
35
35
  current_period_end: number | null;
36
+ additional_user_limit?: number;
37
+ additional_phone_limit?: number;
36
38
  };
37
39
 
38
40
  export type OrgPlanNonEnterprise = {
@@ -44,6 +46,8 @@ export type OrgPlanNonEnterprise = {
44
46
  phone_limit: number;
45
47
  current_period_end: number;
46
48
  current_period_start: number;
49
+ additional_user_limit?: number;
50
+ additional_phone_limit?: number;
47
51
  };
48
52
 
49
53
  export type OrgPlan<T extends AllPlans | Enterprise> = T extends Enterprise
@@ -325,7 +329,14 @@ export const enumChatColors = [
325
329
  '#DB2777',
326
330
  ] as const;
327
331
 
328
- export type RepeatDaysType = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
332
+ export type RepeatDaysType =
333
+ | 'monday'
334
+ | 'tuesday'
335
+ | 'wednesday'
336
+ | 'thursday'
337
+ | 'friday'
338
+ | 'saturday'
339
+ | 'sunday';
329
340
  export type RepeatIntervalType = 'day' | 'week' | 'month';
330
341
 
331
342
  /* -------------------------- SEND MESSAGE PAYLOAD -------------------------- */
@@ -367,7 +378,6 @@ export type QuickReplyContent = Omit<
367
378
  'broadcast_id' | 'variables'
368
379
  >;
369
380
 
370
-
371
381
  export type ScheduleMessagePayload = {
372
382
  scheduled_id?: string;
373
383
  is_repeat?: boolean | null;
@@ -883,16 +893,16 @@ export type TaskType = OverrideProperties<
883
893
  Tables<'tbl_org_tasks'>,
884
894
  {
885
895
  reminder_setting: {
886
- remind_in:
887
- | `${number} ${'minutes' | 'hours' | 'days'} ${'before' | 'after'}`
888
- | string
889
- | null;
896
+ remind_in:
897
+ | `${number} ${'minutes' | 'hours' | 'days'} ${'before' | 'after'}`
898
+ | string
899
+ | null;
890
900
  repeat?: {
891
- frequency: number,
892
- interval: 'days' | 'weeks' | 'months' | 'years',
893
- end: 'never' | 'after' | 'on',
901
+ frequency: number;
902
+ interval: 'days' | 'weeks' | 'months' | 'years';
903
+ end: 'never' | 'after' | 'on';
894
904
  on?: string;
895
- }
905
+ };
896
906
  } | null;
897
907
  associated_object_metadata:
898
908
  | {
@@ -915,7 +925,7 @@ export type TaskType = OverrideProperties<
915
925
  }
916
926
  | null;
917
927
  status: 'open' | 'inprogress' | 'closed';
918
- priority: 0 | 1 | 2 | 3 | 4;
928
+ priority: 1 | 2 | 3;
919
929
  completed_metadata?: {
920
930
  completed_at: string;
921
931
  completed_by: string;