@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.js CHANGED
@@ -4227,7 +4227,8 @@ var MailRoomSchema = import_zod58.default.object({
4227
4227
  messages: import_zod58.default.array(MessageSchema2),
4228
4228
  messagesAndLogs: MessagesAndLogsSchema,
4229
4229
  mail: MailAccountSchema,
4230
- unReadMessageCount: import_zod58.default.number()
4230
+ unReadMessageCount: import_zod58.default.number(),
4231
+ cxlog: CxLogSchema
4231
4232
  });
4232
4233
  var AttachmentSchema2 = import_zod58.default.object({
4233
4234
  fileName: import_zod58.default.string(),
@@ -4330,19 +4331,37 @@ var roomContract = (0, import_core18.initContract)().router(
4330
4331
  },
4331
4332
  summary: "Get mail rooms"
4332
4333
  },
4333
- getById: {
4334
+ //added 'all' after because it has some conflict with getById route.
4335
+ getRoomCounts: {
4334
4336
  method: "GET",
4335
- path: "/:id",
4336
- pathParams: import_zod60.default.object({
4337
- id: import_zod60.default.string().uuid()
4338
- }),
4337
+ path: "/count_rooms/all",
4339
4338
  responses: {
4340
4339
  200: DefaultSuccessResponseSchema.extend({
4341
- data: MailRoomSchema
4340
+ data: import_zod60.default.object({
4341
+ general: import_zod60.default.array(
4342
+ import_zod60.default.object({
4343
+ name: import_zod60.default.string(),
4344
+ count: import_zod60.default.number(),
4345
+ unReadMessagesCount: import_zod60.default.number()
4346
+ })
4347
+ ),
4348
+ channels: import_zod60.default.array(
4349
+ import_zod60.default.object({
4350
+ channel: MailAccountSchema,
4351
+ count: import_zod60.default.number()
4352
+ })
4353
+ ),
4354
+ contactLabels: import_zod60.default.array(
4355
+ import_zod60.default.object({
4356
+ label: TagSchema,
4357
+ count: import_zod60.default.number()
4358
+ })
4359
+ )
4360
+ })
4342
4361
  }),
4343
4362
  ...DefaultResponses
4344
4363
  },
4345
- summary: "Get a mail room by id"
4364
+ summary: 'Get unread message counts for filter like "open", "close", "inbox" and etc...'
4346
4365
  },
4347
4366
  getAttachments: {
4348
4367
  method: "GET",
@@ -4389,18 +4408,31 @@ var roomContract = (0, import_core18.initContract)().router(
4389
4408
  },
4390
4409
  markAsRead: {
4391
4410
  method: "POST",
4411
+ path: "/mark_as_read",
4412
+ body: import_zod60.default.object({
4413
+ id: import_zod60.default.string()
4414
+ }),
4415
+ responses: {
4416
+ 200: DefaultSuccessResponseSchema.extend({
4417
+ message: import_zod60.default.string()
4418
+ }),
4419
+ ...DefaultResponses
4420
+ },
4421
+ summary: "Mark all the unread messages of a room as read"
4422
+ },
4423
+ getById: {
4424
+ method: "GET",
4392
4425
  path: "/:id",
4393
4426
  pathParams: import_zod60.default.object({
4394
4427
  id: import_zod60.default.string().uuid()
4395
4428
  }),
4396
- body: null,
4397
4429
  responses: {
4398
4430
  200: DefaultSuccessResponseSchema.extend({
4399
- message: import_zod60.default.string()
4431
+ data: MailRoomSchema
4400
4432
  }),
4401
4433
  ...DefaultResponses
4402
4434
  },
4403
- summary: "Mark all the un read messages as read"
4435
+ summary: "Get a mail room by id"
4404
4436
  }
4405
4437
  },
4406
4438
  {
@@ -4750,36 +4782,6 @@ var messageContract = (0, import_core21.initContract)().router(
4750
4782
  summary: "Submit a message such as compose, reply or forward"
4751
4783
  },
4752
4784
  //#region get room counts for filter like 'open', 'close', 'inbox' and etc...
4753
- getRoomCounts: {
4754
- method: "GET",
4755
- path: "/room_counts",
4756
- responses: {
4757
- 200: DefaultSuccessResponseSchema.extend({
4758
- data: import_zod66.default.object({
4759
- general: import_zod66.default.array(
4760
- import_zod66.default.object({
4761
- name: import_zod66.default.string(),
4762
- count: import_zod66.default.number()
4763
- })
4764
- ),
4765
- channels: import_zod66.default.array(
4766
- import_zod66.default.object({
4767
- channel: MailAccountSchema,
4768
- count: import_zod66.default.number()
4769
- })
4770
- ),
4771
- contactLabels: import_zod66.default.array(
4772
- import_zod66.default.object({
4773
- label: TagSchema,
4774
- count: import_zod66.default.number()
4775
- })
4776
- )
4777
- })
4778
- }),
4779
- ...DefaultResponses
4780
- },
4781
- summary: 'Get unread message counts for filter like "open", "close", "inbox" and etc...'
4782
- },
4783
4785
  //#endregion get unread message counts for filter like 'open', 'close', 'inbox' and etc...
4784
4786
  //#region get total unread messages counts
4785
4787
  getTotalUnreadMessageCount: {