@kl1/contracts 1.1.61-uat → 1.1.62-uat

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -1137,7 +1137,9 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
1137
1137
  direction: MessageDirectionTypeSchema,
1138
1138
  platformContact: PlatformContactSchema,
1139
1139
  actor: UserSchema,
1140
- assignee: UserSchema,
1140
+ firstAssignee: UserSchema.nullable(),
1141
+ assignee: UserSchema.nullable(),
1142
+ closedAssignee: UserSchema.nullable(),
1141
1143
  channel: ChannelSchema
1142
1144
  }).nullable(),
1143
1145
  telephonyCdr: TelephonyCdrSchema.nullable(),
@@ -1626,6 +1628,44 @@ var ReloginChanelSchema = ChannelSchema2.extend({
1626
1628
  deletedAt: z33.string().nullable(),
1627
1629
  isReloginRequired: z33.boolean()
1628
1630
  });
1631
+ var DeleteMessageToPlatformSchema = z33.object({
1632
+ room: z33.object({
1633
+ id: z33.string().uuid(),
1634
+ channel: ChannelSchema2
1635
+ }),
1636
+ message: z33.object({
1637
+ id: z33.string().optional(),
1638
+ message: z33.string().nullable().optional(),
1639
+ direction: MessageDirectionTypeSchema,
1640
+ type: MessageTypeSchema,
1641
+ readAt: z33.union([z33.date(), z33.string()]).nullable().optional(),
1642
+ metadata: z33.any().optional(),
1643
+ platformId: z33.string().optional(),
1644
+ platformMessageId: z33.string().optional(),
1645
+ replyPlatformMessageId: z33.string().nullable().optional(),
1646
+ template: z33.any().optional(),
1647
+ locale: MessageLocaleTypeSchema.nullable().optional(),
1648
+ url: z33.string().nullable().optional(),
1649
+ previewUrl: z33.string().nullable().optional(),
1650
+ imageSetId: z33.string().nullable().optional(),
1651
+ upload: z33.object({
1652
+ bucketName: z33.string(),
1653
+ fileName: z33.string(),
1654
+ fileSize: z33.number(),
1655
+ fileKey: z33.string(),
1656
+ originalUrl: z33.string().optional()
1657
+ }).nullable().optional(),
1658
+ sender: z33.object({
1659
+ id: z33.string().uuid(),
1660
+ name: z33.string(),
1661
+ email: z33.string().email(),
1662
+ address: z33.string().nullable(),
1663
+ phone: z33.string().nullable()
1664
+ }).optional(),
1665
+ parentMessageId: z33.string().nullable().optional(),
1666
+ feedPostId: z33.string().uuid().nullable().optional()
1667
+ })
1668
+ });
1629
1669
  var SendMessageToPlatformSchema = z33.object({
1630
1670
  isBot: z33.boolean().nullable().default(false),
1631
1671
  room: z33.object({
@@ -2497,7 +2537,7 @@ var mainChatMessageContract = initContract7().router(
2497
2537
  body: ActionMessageSchema,
2498
2538
  responses: {
2499
2539
  200: DefaultSuccessResponseSchema.extend({
2500
- data: MessageSchema
2540
+ data: DeleteMessageToPlatformSchema
2501
2541
  }),
2502
2542
  404: DefaultErrorResponseSchema
2503
2543
  },
@@ -7055,9 +7095,9 @@ var facebookFeedContract = initContract36().router({
7055
7095
  deleteMessage: {
7056
7096
  method: "DELETE",
7057
7097
  path: "/message",
7058
- body: SendMessageToPlatformSchema,
7098
+ body: DeleteMessageToPlatformSchema,
7059
7099
  responses: {
7060
- 200: SendMessageResponseSchema,
7100
+ 200: DeleteMessageToPlatformSchema,
7061
7101
  400: DefaultErrorResponseSchema,
7062
7102
  500: DefaultErrorResponseSchema
7063
7103
  }
@@ -7791,7 +7831,7 @@ var AttachmentSchema = z108.object({
7791
7831
  extensionName: z108.string()
7792
7832
  })
7793
7833
  });
7794
- var MessageSchema2 = z108.object({
7834
+ var MessageSchema3 = z108.object({
7795
7835
  id: z108.string(),
7796
7836
  createdAt: z108.date(),
7797
7837
  updatedAt: z108.date(),
@@ -7882,7 +7922,7 @@ var ActivityLogModel = z109.object({
7882
7922
  actor: UserModel
7883
7923
  });
7884
7924
  var MessagesAndLogsSchema = z109.array(
7885
- z109.union([MessageSchema2, ActivityLogModel])
7925
+ z109.union([MessageSchema3, ActivityLogModel])
7886
7926
  );
7887
7927
  var MailRoomSchema = z109.object({
7888
7928
  id: z109.string(),
@@ -7901,11 +7941,11 @@ var MailRoomSchema = z109.object({
7901
7941
  to: z109.array(MailParticipant),
7902
7942
  cc: z109.array(MailParticipant),
7903
7943
  bcc: z109.array(MailParticipant),
7904
- firstMessage: MessageSchema2,
7905
- lastMessage: MessageSchema2,
7944
+ firstMessage: MessageSchema3,
7945
+ lastMessage: MessageSchema3,
7906
7946
  tags: z109.array(TagSchema2),
7907
7947
  assignee: UserModel,
7908
- messages: z109.array(MessageSchema2),
7948
+ messages: z109.array(MessageSchema3),
7909
7949
  messagesAndLogs: MessagesAndLogsSchema,
7910
7950
  mail: MailAccountSchema,
7911
7951
  unReadMessageCount: z109.number(),
@@ -8506,7 +8546,7 @@ var messageContract = initContract44().router(
8506
8546
  }),
8507
8547
  responses: {
8508
8548
  200: DefaultSuccessResponseSchema.extend({
8509
- data: MessageSchema2
8549
+ data: MessageSchema3
8510
8550
  }),
8511
8551
  ...DefaultResponses
8512
8552
  },
@@ -8522,12 +8562,12 @@ var messageContract = initContract44().router(
8522
8562
  }),
8523
8563
  responses: {
8524
8564
  200: DefaultSuccessResponseSchema.extend({
8525
- data: MessageSchema2
8565
+ data: MessageSchema3
8526
8566
  }),
8527
8567
  ...DefaultResponses
8528
8568
  },
8529
8569
  summary: "Update a message",
8530
- body: MessageSchema2.partial()
8570
+ body: MessageSchema3.partial()
8531
8571
  },
8532
8572
  //#endregion update a message
8533
8573
  //#region delete a message
@@ -8539,7 +8579,7 @@ var messageContract = initContract44().router(
8539
8579
  }),
8540
8580
  responses: {
8541
8581
  200: DefaultSuccessResponseSchema.extend({
8542
- data: MessageSchema2
8582
+ data: MessageSchema3
8543
8583
  }),
8544
8584
  ...DefaultResponses
8545
8585
  },
@@ -8556,7 +8596,7 @@ var messageContract = initContract44().router(
8556
8596
  }),
8557
8597
  responses: {
8558
8598
  200: DefaultSuccessResponseSchema.extend({
8559
- data: MessageSchema2
8599
+ data: MessageSchema3
8560
8600
  }),
8561
8601
  ...DefaultResponses
8562
8602
  },