@kl1/contracts 1.1.20-uat → 1.1.21-uat

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/index.mjs CHANGED
@@ -4161,7 +4161,8 @@ var MailRoomSchema = z58.object({
4161
4161
  messages: z58.array(MessageSchema2),
4162
4162
  messagesAndLogs: MessagesAndLogsSchema,
4163
4163
  mail: MailAccountSchema,
4164
- unReadMessageCount: z58.number()
4164
+ unReadMessageCount: z58.number(),
4165
+ cxlog: CxLogSchema
4165
4166
  });
4166
4167
  var AttachmentSchema2 = z58.object({
4167
4168
  fileName: z58.string(),
@@ -4264,19 +4265,37 @@ var roomContract = initContract18().router(
4264
4265
  },
4265
4266
  summary: "Get mail rooms"
4266
4267
  },
4267
- getById: {
4268
+ //added 'all' after because it has some conflict with getById route.
4269
+ getRoomCounts: {
4268
4270
  method: "GET",
4269
- path: "/:id",
4270
- pathParams: z60.object({
4271
- id: z60.string().uuid()
4272
- }),
4271
+ path: "/count_rooms/all",
4273
4272
  responses: {
4274
4273
  200: DefaultSuccessResponseSchema.extend({
4275
- data: MailRoomSchema
4274
+ data: z60.object({
4275
+ general: z60.array(
4276
+ z60.object({
4277
+ name: z60.string(),
4278
+ count: z60.number(),
4279
+ unReadMessagesCount: z60.number()
4280
+ })
4281
+ ),
4282
+ channels: z60.array(
4283
+ z60.object({
4284
+ channel: MailAccountSchema,
4285
+ count: z60.number()
4286
+ })
4287
+ ),
4288
+ contactLabels: z60.array(
4289
+ z60.object({
4290
+ label: TagSchema,
4291
+ count: z60.number()
4292
+ })
4293
+ )
4294
+ })
4276
4295
  }),
4277
4296
  ...DefaultResponses
4278
4297
  },
4279
- summary: "Get a mail room by id"
4298
+ summary: 'Get unread message counts for filter like "open", "close", "inbox" and etc...'
4280
4299
  },
4281
4300
  getAttachments: {
4282
4301
  method: "GET",
@@ -4323,18 +4342,31 @@ var roomContract = initContract18().router(
4323
4342
  },
4324
4343
  markAsRead: {
4325
4344
  method: "POST",
4345
+ path: "/mark_as_read",
4346
+ body: z60.object({
4347
+ id: z60.string()
4348
+ }),
4349
+ responses: {
4350
+ 200: DefaultSuccessResponseSchema.extend({
4351
+ message: z60.string()
4352
+ }),
4353
+ ...DefaultResponses
4354
+ },
4355
+ summary: "Mark all the unread messages of a room as read"
4356
+ },
4357
+ getById: {
4358
+ method: "GET",
4326
4359
  path: "/:id",
4327
4360
  pathParams: z60.object({
4328
4361
  id: z60.string().uuid()
4329
4362
  }),
4330
- body: null,
4331
4363
  responses: {
4332
4364
  200: DefaultSuccessResponseSchema.extend({
4333
- message: z60.string()
4365
+ data: MailRoomSchema
4334
4366
  }),
4335
4367
  ...DefaultResponses
4336
4368
  },
4337
- summary: "Mark all the un read messages as read"
4369
+ summary: "Get a mail room by id"
4338
4370
  }
4339
4371
  },
4340
4372
  {
@@ -4684,36 +4716,6 @@ var messageContract = initContract21().router(
4684
4716
  summary: "Submit a message such as compose, reply or forward"
4685
4717
  },
4686
4718
  //#region get room counts for filter like 'open', 'close', 'inbox' and etc...
4687
- getRoomCounts: {
4688
- method: "GET",
4689
- path: "/room_counts",
4690
- responses: {
4691
- 200: DefaultSuccessResponseSchema.extend({
4692
- data: z66.object({
4693
- general: z66.array(
4694
- z66.object({
4695
- name: z66.string(),
4696
- count: z66.number()
4697
- })
4698
- ),
4699
- channels: z66.array(
4700
- z66.object({
4701
- channel: MailAccountSchema,
4702
- count: z66.number()
4703
- })
4704
- ),
4705
- contactLabels: z66.array(
4706
- z66.object({
4707
- label: TagSchema,
4708
- count: z66.number()
4709
- })
4710
- )
4711
- })
4712
- }),
4713
- ...DefaultResponses
4714
- },
4715
- summary: 'Get unread message counts for filter like "open", "close", "inbox" and etc...'
4716
- },
4717
4719
  //#endregion get unread message counts for filter like 'open', 'close', 'inbox' and etc...
4718
4720
  //#region get total unread messages counts
4719
4721
  getTotalUnreadMessageCount: {