@kl1/contracts 1.1.61-uat → 1.1.63-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
  },
@@ -6694,7 +6734,7 @@ var ProductPriceSchema = DefaultEntitySchema.extend({
6694
6734
  price: z94.number(),
6695
6735
  currency: z94.string().nullable()
6696
6736
  });
6697
- var ProductSchema = DefaultEntitySchema.extend({
6737
+ var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
6698
6738
  provider: z94.string(),
6699
6739
  productId: z94.string(),
6700
6740
  name: z94.string(),
@@ -6703,6 +6743,20 @@ var ProductSchema = DefaultEntitySchema.extend({
6703
6743
  usageType: z94.string().nullable(),
6704
6744
  productPrice: ProductPriceSchema
6705
6745
  });
6746
+ var RelatedProductSchema = DefaultEntitySchema.extend({
6747
+ includedQuantity: z94.number(),
6748
+ product: ProductWithoutRelatedSchema
6749
+ });
6750
+ var ProductSchema = DefaultEntitySchema.extend({
6751
+ provider: z94.string(),
6752
+ productId: z94.string(),
6753
+ name: z94.string(),
6754
+ type: z94.string(),
6755
+ omnichannel: z94.string(),
6756
+ usageType: z94.string().nullable(),
6757
+ productPrice: ProductPriceSchema,
6758
+ relatedProducts: z94.array(RelatedProductSchema)
6759
+ });
6706
6760
  var SubscriptionProuctSchema = DefaultEntitySchema.extend({
6707
6761
  limit: z94.number(),
6708
6762
  subscriptionItemId: z94.string(),
@@ -7055,9 +7109,9 @@ var facebookFeedContract = initContract36().router({
7055
7109
  deleteMessage: {
7056
7110
  method: "DELETE",
7057
7111
  path: "/message",
7058
- body: SendMessageToPlatformSchema,
7112
+ body: DeleteMessageToPlatformSchema,
7059
7113
  responses: {
7060
- 200: SendMessageResponseSchema,
7114
+ 200: DeleteMessageToPlatformSchema,
7061
7115
  400: DefaultErrorResponseSchema,
7062
7116
  500: DefaultErrorResponseSchema
7063
7117
  }
@@ -7791,7 +7845,7 @@ var AttachmentSchema = z108.object({
7791
7845
  extensionName: z108.string()
7792
7846
  })
7793
7847
  });
7794
- var MessageSchema2 = z108.object({
7848
+ var MessageSchema3 = z108.object({
7795
7849
  id: z108.string(),
7796
7850
  createdAt: z108.date(),
7797
7851
  updatedAt: z108.date(),
@@ -7882,7 +7936,7 @@ var ActivityLogModel = z109.object({
7882
7936
  actor: UserModel
7883
7937
  });
7884
7938
  var MessagesAndLogsSchema = z109.array(
7885
- z109.union([MessageSchema2, ActivityLogModel])
7939
+ z109.union([MessageSchema3, ActivityLogModel])
7886
7940
  );
7887
7941
  var MailRoomSchema = z109.object({
7888
7942
  id: z109.string(),
@@ -7901,11 +7955,11 @@ var MailRoomSchema = z109.object({
7901
7955
  to: z109.array(MailParticipant),
7902
7956
  cc: z109.array(MailParticipant),
7903
7957
  bcc: z109.array(MailParticipant),
7904
- firstMessage: MessageSchema2,
7905
- lastMessage: MessageSchema2,
7958
+ firstMessage: MessageSchema3,
7959
+ lastMessage: MessageSchema3,
7906
7960
  tags: z109.array(TagSchema2),
7907
7961
  assignee: UserModel,
7908
- messages: z109.array(MessageSchema2),
7962
+ messages: z109.array(MessageSchema3),
7909
7963
  messagesAndLogs: MessagesAndLogsSchema,
7910
7964
  mail: MailAccountSchema,
7911
7965
  unReadMessageCount: z109.number(),
@@ -8506,7 +8560,7 @@ var messageContract = initContract44().router(
8506
8560
  }),
8507
8561
  responses: {
8508
8562
  200: DefaultSuccessResponseSchema.extend({
8509
- data: MessageSchema2
8563
+ data: MessageSchema3
8510
8564
  }),
8511
8565
  ...DefaultResponses
8512
8566
  },
@@ -8522,12 +8576,12 @@ var messageContract = initContract44().router(
8522
8576
  }),
8523
8577
  responses: {
8524
8578
  200: DefaultSuccessResponseSchema.extend({
8525
- data: MessageSchema2
8579
+ data: MessageSchema3
8526
8580
  }),
8527
8581
  ...DefaultResponses
8528
8582
  },
8529
8583
  summary: "Update a message",
8530
- body: MessageSchema2.partial()
8584
+ body: MessageSchema3.partial()
8531
8585
  },
8532
8586
  //#endregion update a message
8533
8587
  //#region delete a message
@@ -8539,7 +8593,7 @@ var messageContract = initContract44().router(
8539
8593
  }),
8540
8594
  responses: {
8541
8595
  200: DefaultSuccessResponseSchema.extend({
8542
- data: MessageSchema2
8596
+ data: MessageSchema3
8543
8597
  }),
8544
8598
  ...DefaultResponses
8545
8599
  },
@@ -8556,7 +8610,7 @@ var messageContract = initContract44().router(
8556
8610
  }),
8557
8611
  responses: {
8558
8612
  200: DefaultSuccessResponseSchema.extend({
8559
- data: MessageSchema2
8613
+ data: MessageSchema3
8560
8614
  }),
8561
8615
  ...DefaultResponses
8562
8616
  },