@periskope/types 0.6.241 → 0.6.243

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.
@@ -819,10 +819,6 @@ export type CreateTicketAction = {
819
819
  append_to_latest_ticket?: 'true' | 'false';
820
820
  round_robin?: 'true' | 'false';
821
821
  assignee?: string;
822
- rr_check_for?:
823
- | 'shift_time'
824
- | 'user_status'
825
- | 'shift_time user_status'
826
822
  };
827
823
  };
828
824
 
@@ -842,10 +838,6 @@ export type AssignTicketAction = {
842
838
  metadata: {
843
839
  assignee: string;
844
840
  round_robin: 'true' | 'false';
845
- rr_check_for?:
846
- | 'shift_time'
847
- | 'user_status'
848
- | 'shift_time user_status'
849
841
  };
850
842
  };
851
843
 
@@ -883,10 +875,6 @@ export type AssignChatAction = {
883
875
  metadata: {
884
876
  assignee: string;
885
877
  round_robin: 'true' | 'false';
886
- rr_check_for?:
887
- | 'shift_time'
888
- | 'user_status'
889
- | 'shift_time user_status'
890
878
  };
891
879
  };
892
880
 
@@ -1387,31 +1375,6 @@ export const ActionNameMap: Record<
1387
1375
  info: 'If enabled, the ticket will be assigned to the next available agent in the list',
1388
1376
  required: false,
1389
1377
  },
1390
- rr_check_for: {
1391
- id: 'rr_check_for',
1392
- type: 'dropdown',
1393
- value: [
1394
- {
1395
- id: 'shift_time',
1396
- value: 'shift_time',
1397
- label: 'Consider shift timings',
1398
- },
1399
- {
1400
- id: 'user_status',
1401
- value: 'user_status',
1402
- label: 'Consider user online/offline status',
1403
- },
1404
- {
1405
- id: 'shift_time user_status',
1406
- value: 'shift_time user_status',
1407
- label: 'Consider both shift timings and user status',
1408
- },
1409
- ],
1410
- label: 'Check Assignee status for (Round Robin)',
1411
- placeholder: 'Select...',
1412
- info: 'Criteria for assigning the next available agent',
1413
- required: false,
1414
- },
1415
1378
  assignee: {
1416
1379
  id: 'assignee',
1417
1380
  type: 'dynamic',
@@ -1470,31 +1433,6 @@ export const ActionNameMap: Record<
1470
1433
  info: 'If enabled, the ticket will be assigned to the next available agent in the list',
1471
1434
  required: false,
1472
1435
  },
1473
- rr_check_for: {
1474
- id: 'rr_check_for',
1475
- type: 'dropdown',
1476
- value: [
1477
- {
1478
- id: 'shift_time',
1479
- value: 'shift_time',
1480
- label: 'Consider shift timings',
1481
- },
1482
- {
1483
- id: 'user_status',
1484
- value: 'user_status',
1485
- label: 'Consider user online/offline status',
1486
- },
1487
- {
1488
- id: 'shift_time user_status',
1489
- value: 'shift_time user_status',
1490
- label: 'Consider both shift timings and user status',
1491
- },
1492
- ],
1493
- label: 'Check Assignee status for (Round Robin)',
1494
- placeholder: 'Select...',
1495
- info: 'Criteria for assigning the next available agent',
1496
- required: false,
1497
- },
1498
1436
  assignee: {
1499
1437
  id: 'assignee',
1500
1438
  type: 'dynamic',
@@ -1610,31 +1548,6 @@ export const ActionNameMap: Record<
1610
1548
  info: 'If enabled, the chat will be assigned to the next available agent in the list',
1611
1549
  required: false,
1612
1550
  },
1613
- rr_check_for: {
1614
- id: 'rr_check_for',
1615
- type: 'dropdown',
1616
- value: [
1617
- {
1618
- id: 'shift_time',
1619
- value: 'shift_time',
1620
- label: 'Consider shift timings',
1621
- },
1622
- {
1623
- id: 'user_status',
1624
- value: 'user_status',
1625
- label: 'Consider user online/offline status',
1626
- },
1627
- {
1628
- id: 'shift_time user_status',
1629
- value: 'shift_time user_status',
1630
- label: 'Consider both shift timings and user status',
1631
- },
1632
- ],
1633
- label: 'Check Assignee status for (Round Robin)',
1634
- placeholder: 'Select...',
1635
- info: 'Criteria for assigning the next available agent',
1636
- required: false,
1637
- },
1638
1551
  assignee: {
1639
1552
  id: 'assignee',
1640
1553
  type: 'dynamic',
@@ -1592,12 +1592,10 @@ export type Database = {
1592
1592
  invited_at: string | null
1593
1593
  invited_by: string | null
1594
1594
  is_active: boolean
1595
- is_online: boolean
1596
1595
  is_owner: boolean | null
1597
1596
  label_ids: string[] | null
1598
1597
  member_color: Database["public"]["Enums"]["enum_chat_colors"]
1599
1598
  member_image: string | null
1600
- member_metadata: Json | null
1601
1599
  member_name: string | null
1602
1600
  org_id: string
1603
1601
  org_phones: string[] | null
@@ -1611,12 +1609,10 @@ export type Database = {
1611
1609
  invited_at?: string | null
1612
1610
  invited_by?: string | null
1613
1611
  is_active?: boolean
1614
- is_online?: boolean
1615
1612
  is_owner?: boolean | null
1616
1613
  label_ids?: string[] | null
1617
1614
  member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1618
1615
  member_image?: string | null
1619
- member_metadata?: Json | null
1620
1616
  member_name?: string | null
1621
1617
  org_id: string
1622
1618
  org_phones?: string[] | null
@@ -1630,12 +1626,10 @@ export type Database = {
1630
1626
  invited_at?: string | null
1631
1627
  invited_by?: string | null
1632
1628
  is_active?: boolean
1633
- is_online?: boolean
1634
1629
  is_owner?: boolean | null
1635
1630
  label_ids?: string[] | null
1636
1631
  member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1637
1632
  member_image?: string | null
1638
- member_metadata?: Json | null
1639
1633
  member_name?: string | null
1640
1634
  org_id?: string
1641
1635
  org_phones?: string[] | null
package/src/types.ts CHANGED
@@ -230,32 +230,12 @@ type AccessScopes = {
230
230
  exports: boolean;
231
231
  };
232
232
 
233
- export type OrgMembersType = OverrideProperties<
234
- Tables<'tbl_org_members'>,
235
- {
236
- member_metadata: {
237
- shift_times: {
238
- [day in
239
- | 'monday'
240
- | 'tuesday'
241
- | 'wednesday'
242
- | 'thursday'
243
- | 'friday'
244
- | 'saturday'
245
- | 'sunday']?: [[string, string]];
246
- };
247
- override_status: boolean;
248
- [key: string]: any
249
- };
250
- }
251
- >;
252
-
253
233
  export type OrgType = OverrideProperties<
254
234
  Merge<
255
235
  Tables<'tbl_org'>,
256
236
  {
257
- user: OrgMembersType;
258
- members: OrgMembersType[];
237
+ user: Tables<'tbl_org_members'>;
238
+ members: Tables<'tbl_org_members'>[];
259
239
  phones: Tables<'tbl_org_phones'>[];
260
240
  labels: Tables<'tbl_org_labels'>[];
261
241
  quick_replies: Tables<'tbl_quick_replies'>[];
@@ -370,6 +350,17 @@ export type MessageFlagType = {
370
350
  response_id?: string;
371
351
  response_timestamp?: string;
372
352
  response_email?: string;
353
+ flagged_by?: string;
354
+ flagged_at?: string;
355
+ };
356
+
357
+ export type MessageSendType = {
358
+ queue_id: string;
359
+ queue_position: string;
360
+ };
361
+
362
+ export type MessageBroadcastType = {
363
+ broadcast_id: string;
373
364
  };
374
365
 
375
366
  /* -------------------------------------------------------------------------- */
@@ -419,6 +410,22 @@ export type ChatAccessType = Merge<
419
410
  }
420
411
  >;
421
412
 
413
+ export type QueueJobTypes = {
414
+ addedTimestamp: number;
415
+ attemptsMade: number;
416
+ attemptsStarted: number;
417
+ data: {
418
+ body: string;
419
+ chat_id: string;
420
+ };
421
+ finishedTimestamp: number;
422
+ id: string;
423
+ message_id: string;
424
+ processedTimestamp: number;
425
+ stacktrace: string[];
426
+ status: string;
427
+ };
428
+
422
429
  export type PhoneQueueStatusType = {
423
430
  active: number;
424
431
  failed: number;
@@ -474,6 +481,49 @@ export type RepeatDaysType =
474
481
  | 'sunday';
475
482
  export type RepeatIntervalType = 'day' | 'week' | 'month';
476
483
 
484
+ /* -------------------------- LISTING ENDPOINT -------------------------- */
485
+
486
+ type ListingType = {
487
+ from?: number;
488
+ to?: number;
489
+ count?: number;
490
+ };
491
+
492
+ export type ListNotificationsType = Merge<
493
+ ListingType,
494
+ {
495
+ notifictions?: NotificationType[];
496
+ }
497
+ >;
498
+
499
+ export type ListChatMessagesType = Merge<
500
+ ListingType,
501
+ {
502
+ messages?: MessageType[];
503
+ }
504
+ >;
505
+
506
+ export type ListContactsType = Merge<
507
+ ListingType,
508
+ {
509
+ contacts?: ContactType[];
510
+ }
511
+ >;
512
+
513
+ export type ListTicketsType = Merge<
514
+ ListingType,
515
+ {
516
+ tickets?: TicketType[];
517
+ }
518
+ >;
519
+
520
+ export type ListChatsType = Merge<
521
+ ListingType,
522
+ {
523
+ chats?: ChatType[];
524
+ }
525
+ >;
526
+
477
527
  /* -------------------------- SEND MESSAGE PAYLOAD -------------------------- */
478
528
 
479
529
  export const SUPPORTED_TYPES = [