@kl1/contracts 1.0.99 → 1.1.0-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.
Files changed (42) hide show
  1. package/dist/index.js +895 -827
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +894 -827
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/chat/index.d.ts +111 -0
  6. package/dist/src/chat/index.d.ts.map +1 -1
  7. package/dist/src/chat/schema.d.ts +16 -0
  8. package/dist/src/chat/schema.d.ts.map +1 -1
  9. package/dist/src/chat/validation.d.ts +69 -0
  10. package/dist/src/chat/validation.d.ts.map +1 -1
  11. package/dist/src/contract.d.ts +1987 -1152
  12. package/dist/src/contract.d.ts.map +1 -1
  13. package/dist/src/index.d.ts +1 -0
  14. package/dist/src/index.d.ts.map +1 -1
  15. package/dist/src/instagram/index.d.ts +66 -0
  16. package/dist/src/instagram/index.d.ts.map +1 -1
  17. package/dist/src/line/index.d.ts +66 -0
  18. package/dist/src/line/index.d.ts.map +1 -1
  19. package/dist/src/mail/account-contract.d.ts +132 -132
  20. package/dist/src/mail/index.d.ts +10 -0
  21. package/dist/src/mail/index.d.ts.map +1 -1
  22. package/dist/src/mail/mail-contract.d.ts +1612 -1152
  23. package/dist/src/mail/mail-contract.d.ts.map +1 -1
  24. package/dist/src/mail/mail-server-contract.d.ts +477 -18
  25. package/dist/src/mail/mail-server-contract.d.ts.map +1 -1
  26. package/dist/src/mail/message-contract.d.ts +54 -54
  27. package/dist/src/mail/room-contract.d.ts +951 -948
  28. package/dist/src/mail/room-contract.d.ts.map +1 -1
  29. package/dist/src/mail/schemas/account-validation.schema.d.ts +140 -140
  30. package/dist/src/mail/schemas/account-validation.schema.d.ts.map +1 -1
  31. package/dist/src/mail/schemas/account.schema.d.ts +32 -32
  32. package/dist/src/mail/schemas/message.schema.d.ts +42 -42
  33. package/dist/src/mail/schemas/message.schema.d.ts.map +1 -1
  34. package/dist/src/mail/schemas/room-validation.schema.d.ts +319 -316
  35. package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
  36. package/dist/src/mail/schemas/room.schema.d.ts +683 -259
  37. package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
  38. package/dist/src/messenger/index.d.ts +66 -0
  39. package/dist/src/messenger/index.d.ts.map +1 -1
  40. package/dist/src/viber/index.d.ts +66 -0
  41. package/dist/src/viber/index.d.ts.map +1 -1
  42. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1102,6 +1102,8 @@ var RoomSchema = DefaultEntitySchema.extend({
1102
1102
  lastMessage: z26.string(),
1103
1103
  handleTime: z26.number(),
1104
1104
  closeAt: z26.date(),
1105
+ lastMessageAt: z26.date().nullable(),
1106
+ status: z26.number(),
1105
1107
  unreadCount: z26.number(),
1106
1108
  firstResponseAt: z26.date(),
1107
1109
  firstResponseTime: z26.number(),
@@ -1448,7 +1450,8 @@ var SendMessageSchema = z29.object({
1448
1450
  messageAttachments: MessageAttachmentSchema.optional(),
1449
1451
  user: UserSchema.optional(),
1450
1452
  sticker: StickerSchema.optional(),
1451
- file: z29.custom().optional()
1453
+ file: z29.custom().optional(),
1454
+ messengerTags: z29.union([z29.literal(1), z29.literal(2), z29.literal(3)]).optional()
1452
1455
  });
1453
1456
  var SolveRoomSchema = z29.object({
1454
1457
  roomId: z29.string(),
@@ -1497,6 +1500,7 @@ var SendMessageToPlatformSchema = z29.object({
1497
1500
  createdAt: z29.string(),
1498
1501
  updatedAt: z29.string(),
1499
1502
  platformContact: z29.object({
1503
+ id: z29.string().uuid(),
1500
1504
  channelId: z29.string().uuid(),
1501
1505
  socialPlatformId: z29.string().nullable(),
1502
1506
  type: ChannelTypeSchema,
@@ -1511,12 +1515,19 @@ var SendMessageToPlatformSchema = z29.object({
1511
1515
  })
1512
1516
  }),
1513
1517
  actor: z29.object({
1518
+ id: z29.string().uuid(),
1514
1519
  name: z29.string(),
1515
1520
  email: z29.string().email(),
1516
1521
  address: z29.string().nullable(),
1517
1522
  phone: z29.string().nullable()
1518
1523
  }).nullable(),
1519
- channel: ChannelSchema2
1524
+ assignee: z29.object({
1525
+ id: z29.string().uuid(),
1526
+ name: z29.string(),
1527
+ email: z29.string().email()
1528
+ }).nullable(),
1529
+ channel: ChannelSchema2,
1530
+ status: z29.number()
1520
1531
  }),
1521
1532
  message: z29.object({
1522
1533
  message: z29.string().optional(),
@@ -4010,7 +4021,7 @@ import { initContract as initContract22 } from "@ts-rest/core";
4010
4021
 
4011
4022
  // src/mail/room-contract.ts
4012
4023
  import { initContract as initContract18 } from "@ts-rest/core";
4013
- import z59 from "zod";
4024
+ import z60 from "zod";
4014
4025
 
4015
4026
  // src/mail/schemas/room.schema.ts
4016
4027
  import z58 from "zod";
@@ -4024,12 +4035,12 @@ var MailServerSchema = z56.object({
4024
4035
  deletedAt: z56.date().nullable(),
4025
4036
  name: z56.string(),
4026
4037
  smtpHost: z56.string(),
4027
- smtpPort: z56.string(),
4028
- smtpTlsPort: z56.string(),
4038
+ smtpPort: z56.number(),
4039
+ smtpTlsPort: z56.number(),
4029
4040
  useTlsForSmtp: z56.boolean(),
4030
4041
  imapHost: z56.string(),
4031
- imapPort: z56.string(),
4032
- imapTlsPort: z56.string(),
4042
+ imapPort: z56.number(),
4043
+ imapTlsPort: z56.number(),
4033
4044
  useTlsForImap: z56.boolean()
4034
4045
  });
4035
4046
  var MailAccountSchema = z56.object({
@@ -4072,12 +4083,12 @@ var AttachmentSchema = z57.object({
4072
4083
  createdAt: z57.date(),
4073
4084
  updatedAt: z57.date(),
4074
4085
  deletedAt: z57.nullable(z57.date()),
4075
- bucket_name: z57.string(),
4076
- file_name: z57.string(),
4077
- file_key: z57.string(),
4078
- file_size: z57.number(),
4079
- file_url: z57.string(),
4080
- extension_name: z57.string()
4086
+ bucketName: z57.string(),
4087
+ fileName: z57.string(),
4088
+ fileKey: z57.string(),
4089
+ fileSize: z57.number(),
4090
+ fileUrl: z57.string(),
4091
+ extensionName: z57.string()
4081
4092
  })
4082
4093
  });
4083
4094
  var MessageSchema2 = z57.object({
@@ -4131,7 +4142,7 @@ var UserModel = z58.object({
4131
4142
  email: z58.string(),
4132
4143
  address: z58.string().nullable(),
4133
4144
  phone: z58.string().nullable(),
4134
- notification_count: z58.number().nullable()
4145
+ notificationCount: z58.number().nullable()
4135
4146
  });
4136
4147
  var ActivityLogModel = z58.object({
4137
4148
  id: z58.string(),
@@ -4143,7 +4154,9 @@ var ActivityLogModel = z58.object({
4143
4154
  roomId: z58.string(),
4144
4155
  actor: UserModel
4145
4156
  });
4146
- var MessagesAndLogs = z58.array(z58.union([MessageSchema2, ActivityLogModel]));
4157
+ var MessagesAndLogsSchema = z58.array(
4158
+ z58.union([MessageSchema2, ActivityLogModel])
4159
+ );
4147
4160
  var MailRoomSchema = z58.object({
4148
4161
  id: z58.string(),
4149
4162
  createdAt: z58.date(),
@@ -4166,7 +4179,7 @@ var MailRoomSchema = z58.object({
4166
4179
  tags: z58.array(TagSchema2),
4167
4180
  assignee: UserModel,
4168
4181
  messages: z58.array(MessageSchema2),
4169
- messagesAndLogs: MessagesAndLogs,
4182
+ messagesAndLogs: MessagesAndLogsSchema,
4170
4183
  mail: MailAccountSchema,
4171
4184
  unReadMessageCount: z58.number()
4172
4185
  });
@@ -4180,6 +4193,42 @@ var AttachmentSchema2 = z58.object({
4180
4193
  upload: UploadSchema
4181
4194
  });
4182
4195
 
4196
+ // src/mail/schemas/room-validation.schema.ts
4197
+ import z59 from "zod";
4198
+ var RoomContractsValidationSchema = {
4199
+ getAll: {
4200
+ input: z59.object({
4201
+ page: z59.coerce.number().default(1),
4202
+ pageSize: z59.coerce.number().default(10),
4203
+ keyword: z59.string().optional(),
4204
+ assigneeId: z59.string().uuid().optional().nullable(),
4205
+ resolved: z59.boolean().or(z59.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
4206
+ }),
4207
+ output: z59.object({
4208
+ data: z59.array(MailRoomSchema),
4209
+ total: z59.number(),
4210
+ page: z59.number(),
4211
+ pageSize: z59.number()
4212
+ })
4213
+ },
4214
+ update: {
4215
+ input: z59.object({
4216
+ resolved: z59.boolean().or(
4217
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4218
+ ).optional().nullable(),
4219
+ assigneeId: z59.string().uuid().optional().nullable(),
4220
+ note: z59.string().optional(),
4221
+ tags: z59.array(z59.string().uuid()).optional(),
4222
+ handover: z59.boolean().or(
4223
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4224
+ ).optional().nullable(),
4225
+ selfAssign: z59.boolean().or(
4226
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4227
+ ).optional().nullable()
4228
+ })
4229
+ }
4230
+ };
4231
+
4183
4232
  // src/mail/room-contract.ts
4184
4233
  var roomContract = initContract18().router(
4185
4234
  {
@@ -4188,7 +4237,7 @@ var roomContract = initContract18().router(
4188
4237
  path: "/",
4189
4238
  responses: {
4190
4239
  200: DefaultSuccessResponseSchema.extend({
4191
- message: z59.string()
4240
+ message: z60.string()
4192
4241
  }),
4193
4242
  ...DefaultResponses
4194
4243
  },
@@ -4198,19 +4247,19 @@ var roomContract = initContract18().router(
4198
4247
  getAll: {
4199
4248
  method: "GET",
4200
4249
  path: "",
4201
- query: z59.object({
4202
- page: z59.coerce.number().default(1),
4203
- pageSize: z59.coerce.number().default(10),
4204
- keyword: z59.string().optional(),
4205
- assigneeId: z59.string().uuid().optional().nullable(),
4206
- resolved: z59.boolean().or(z59.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
4250
+ query: z60.object({
4251
+ page: z60.coerce.number().default(1),
4252
+ pageSize: z60.coerce.number().default(10),
4253
+ keyword: z60.string().optional(),
4254
+ assigneeId: z60.string().uuid().optional().nullable(),
4255
+ resolved: z60.boolean().or(z60.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
4207
4256
  }),
4208
4257
  responses: {
4209
4258
  200: DefaultSuccessResponseSchema.extend({
4210
- data: z59.array(MailRoomSchema),
4211
- total: z59.number(),
4212
- page: z59.number(),
4213
- pageSize: z59.number()
4259
+ data: z60.array(MailRoomSchema),
4260
+ total: z60.number(),
4261
+ page: z60.number(),
4262
+ pageSize: z60.number()
4214
4263
  }),
4215
4264
  ...DefaultResponses
4216
4265
  },
@@ -4219,8 +4268,8 @@ var roomContract = initContract18().router(
4219
4268
  getById: {
4220
4269
  method: "GET",
4221
4270
  path: "/:id",
4222
- pathParams: z59.object({
4223
- id: z59.string().uuid()
4271
+ pathParams: z60.object({
4272
+ id: z60.string().uuid()
4224
4273
  }),
4225
4274
  responses: {
4226
4275
  200: DefaultSuccessResponseSchema.extend({
@@ -4233,12 +4282,12 @@ var roomContract = initContract18().router(
4233
4282
  getAttachments: {
4234
4283
  method: "GET",
4235
4284
  path: "/:id/attachments",
4236
- pathParams: z59.object({
4237
- id: z59.string().uuid()
4285
+ pathParams: z60.object({
4286
+ id: z60.string().uuid()
4238
4287
  }),
4239
4288
  responses: {
4240
4289
  200: DefaultSuccessResponseSchema.extend({
4241
- data: z59.array(AttachmentSchema2)
4290
+ data: z60.array(AttachmentSchema2)
4242
4291
  }),
4243
4292
  ...DefaultResponses
4244
4293
  },
@@ -4247,12 +4296,12 @@ var roomContract = initContract18().router(
4247
4296
  getParticipants: {
4248
4297
  method: "GET",
4249
4298
  path: "/:id/participants",
4250
- pathParams: z59.object({
4251
- id: z59.string().uuid()
4299
+ pathParams: z60.object({
4300
+ id: z60.string().uuid()
4252
4301
  }),
4253
4302
  responses: {
4254
4303
  200: DefaultSuccessResponseSchema.extend({
4255
- data: z59.array(MailUserSchema)
4304
+ data: z60.array(MailUserSchema)
4256
4305
  }),
4257
4306
  ...DefaultResponses
4258
4307
  },
@@ -4261,8 +4310,8 @@ var roomContract = initContract18().router(
4261
4310
  update: {
4262
4311
  method: "PATCH",
4263
4312
  path: "/:id",
4264
- pathParams: z59.object({
4265
- id: z59.string()
4313
+ pathParams: z60.object({
4314
+ id: z60.string()
4266
4315
  }),
4267
4316
  responses: {
4268
4317
  200: DefaultSuccessResponseSchema.extend({
@@ -4270,28 +4319,18 @@ var roomContract = initContract18().router(
4270
4319
  }),
4271
4320
  ...DefaultResponses
4272
4321
  },
4273
- body: z59.object({
4274
- resolved: z59.boolean().or(
4275
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4276
- ).optional().nullable(),
4277
- assigneeId: z59.string().uuid().optional().nullable(),
4278
- note: z59.string().optional(),
4279
- tags: z59.array(z59.string().uuid()).optional(),
4280
- handover: z59.boolean().or(
4281
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4282
- ).optional().nullable()
4283
- }),
4322
+ body: RoomContractsValidationSchema.update.input,
4284
4323
  summary: "Update a mail room by id"
4285
4324
  },
4286
4325
  markAsRead: {
4287
4326
  method: "GET",
4288
4327
  path: "/:id",
4289
- pathParams: z59.object({
4290
- id: z59.string().uuid()
4328
+ pathParams: z60.object({
4329
+ id: z60.string().uuid()
4291
4330
  }),
4292
4331
  responses: {
4293
4332
  200: DefaultSuccessResponseSchema.extend({
4294
- message: z59.string()
4333
+ message: z60.string()
4295
4334
  }),
4296
4335
  ...DefaultResponses
4297
4336
  },
@@ -4305,47 +4344,47 @@ var roomContract = initContract18().router(
4305
4344
 
4306
4345
  // src/mail/account-contract.ts
4307
4346
  import { initContract as initContract19 } from "@ts-rest/core";
4308
- import z61 from "zod";
4347
+ import z62 from "zod";
4309
4348
 
4310
4349
  // src/mail/schemas/account-validation.schema.ts
4311
- import z60 from "zod";
4350
+ import z61 from "zod";
4312
4351
  var AccountContractsValidationSchemas = {
4313
4352
  create: {
4314
- input: z60.object({
4315
- address: z60.string().email("Email address must be valid email."),
4316
- name: z60.string().min(1, "Account name cannot be empty."),
4317
- password: z60.string().min(1, "Password cannot be empty."),
4318
- mailServerId: z60.string().uuid("Invalid mail_server_id")
4353
+ input: z61.object({
4354
+ address: z61.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
4355
+ name: z61.string().min(1, "Account name cannot be empty."),
4356
+ password: z61.string().min(1, "Password cannot be empty."),
4357
+ mailServerId: z61.string().uuid("Invalid mail_server_id")
4319
4358
  })
4320
4359
  },
4321
4360
  getById: {
4322
- input: z60.object({
4323
- id: z60.string().uuid()
4361
+ input: z61.object({
4362
+ id: z61.string().uuid()
4324
4363
  }),
4325
4364
  output: MailAccountSchema
4326
4365
  },
4327
4366
  getAll: {
4328
- output: z60.array(MailAccountSchema)
4367
+ output: z61.array(MailAccountSchema)
4329
4368
  },
4330
4369
  update: {
4331
4370
  input: MailAccountSchema,
4332
4371
  output: MailAccountSchema
4333
4372
  },
4334
4373
  disconnect: {
4335
- input: z60.object({
4336
- id: z60.string().uuid()
4374
+ input: z61.object({
4375
+ id: z61.string().uuid()
4337
4376
  }),
4338
4377
  output: MailAccountSchema
4339
4378
  },
4340
4379
  reconnect: {
4341
- input: z60.object({
4342
- id: z60.string()
4380
+ input: z61.object({
4381
+ id: z61.string()
4343
4382
  }),
4344
4383
  output: MailAccountSchema
4345
4384
  },
4346
4385
  delete: {
4347
- input: z60.object({
4348
- id: z60.string()
4386
+ input: z61.object({
4387
+ id: z61.string()
4349
4388
  }),
4350
4389
  output: MailAccountSchema
4351
4390
  }
@@ -4361,16 +4400,16 @@ var accountContract = initContract19().router(
4361
4400
  responses: {
4362
4401
  201: DefaultSuccessResponseSchema.extend({
4363
4402
  // data: AccountContractsValidationSchemas.create.output,
4364
- message: z61.string()
4403
+ message: z62.string()
4365
4404
  }),
4366
- 400: z61.object({
4367
- message: z61.string()
4405
+ 400: z62.object({
4406
+ message: z62.string()
4368
4407
  }),
4369
- 409: z61.object({
4370
- message: z61.string()
4408
+ 409: z62.object({
4409
+ message: z62.string()
4371
4410
  }),
4372
- 500: z61.object({
4373
- message: z61.string()
4411
+ 500: z62.object({
4412
+ message: z62.string()
4374
4413
  }),
4375
4414
  ...DefaultResponses
4376
4415
  },
@@ -4399,7 +4438,7 @@ var accountContract = initContract19().router(
4399
4438
  path: "",
4400
4439
  responses: {
4401
4440
  200: DefaultSuccessResponseSchema.extend({
4402
- data: z61.any()
4441
+ data: z62.any()
4403
4442
  // data: AccountContractsValidationSchemas.getAll.output,
4404
4443
  }),
4405
4444
  ...DefaultResponses
@@ -4411,8 +4450,8 @@ var accountContract = initContract19().router(
4411
4450
  update: {
4412
4451
  method: "PATCH",
4413
4452
  path: "/:id",
4414
- pathParams: z61.object({
4415
- id: z61.string().uuid()
4453
+ pathParams: z62.object({
4454
+ id: z62.string().uuid()
4416
4455
  }),
4417
4456
  responses: {
4418
4457
  201: DefaultSuccessResponseSchema.extend({
@@ -4461,7 +4500,7 @@ var accountContract = initContract19().router(
4461
4500
  pathParams: AccountContractsValidationSchemas.delete.input,
4462
4501
  responses: {
4463
4502
  200: DefaultSuccessResponseSchema.extend({
4464
- message: z61.string()
4503
+ message: z62.string()
4465
4504
  }),
4466
4505
  ...DefaultResponses
4467
4506
  },
@@ -4478,64 +4517,91 @@ var accountContract = initContract19().router(
4478
4517
 
4479
4518
  // src/mail/mail-server-contract.ts
4480
4519
  import { initContract as initContract20 } from "@ts-rest/core";
4481
- import z62 from "zod";
4520
+ import z64 from "zod";
4521
+
4522
+ // src/mail/schemas/servers-validation.schema.ts
4523
+ import z63 from "zod";
4524
+ var CreateMailServerSchema = z63.object({
4525
+ name: z63.string(),
4526
+ smtpHost: z63.string(),
4527
+ smtpPort: z63.number(),
4528
+ smtpTlsPort: z63.number(),
4529
+ useTlsForSmtp: z63.boolean(),
4530
+ imapHost: z63.string(),
4531
+ imapPort: z63.number(),
4532
+ imapTlsPort: z63.number(),
4533
+ useTlsForImap: z63.boolean()
4534
+ });
4535
+
4536
+ // src/mail/mail-server-contract.ts
4482
4537
  var serverContract = initContract20().router(
4483
4538
  {
4484
4539
  create: {
4485
4540
  method: "POST",
4486
4541
  path: "/",
4487
4542
  responses: {
4488
- 200: DefaultSuccessResponseSchema.extend({
4489
- message: z62.string()
4543
+ 201: DefaultSuccessResponseSchema.extend({
4544
+ data: MailServerSchema
4490
4545
  }),
4491
4546
  ...DefaultResponses
4492
4547
  },
4493
- body: null,
4548
+ body: CreateMailServerSchema,
4494
4549
  summary: "Register a new mail server"
4495
4550
  },
4496
- get: {
4551
+ getById: {
4497
4552
  method: "GET",
4498
4553
  path: "/:id",
4499
- pathParams: z62.object({
4500
- id: z62.string()
4554
+ pathParams: z64.object({
4555
+ id: z64.string().uuid()
4501
4556
  }),
4502
4557
  responses: {
4503
4558
  200: DefaultSuccessResponseSchema.extend({
4504
- message: z62.string()
4559
+ data: MailServerSchema
4505
4560
  }),
4506
4561
  ...DefaultResponses
4507
4562
  },
4508
4563
  summary: "Get a mail server by id"
4509
4564
  },
4565
+ getAll: {
4566
+ method: "GET",
4567
+ path: "/",
4568
+ responses: {
4569
+ 200: DefaultSuccessResponseSchema.extend({
4570
+ data: z64.array(MailServerSchema)
4571
+ }),
4572
+ ...DefaultResponses
4573
+ },
4574
+ summary: "Get all mail servers"
4575
+ },
4510
4576
  update: {
4511
4577
  method: "PATCH",
4512
4578
  path: "/:id",
4513
- pathParams: z62.object({
4514
- id: z62.string()
4579
+ pathParams: z64.object({
4580
+ id: z64.string().uuid()
4515
4581
  }),
4516
4582
  responses: {
4517
4583
  200: DefaultSuccessResponseSchema.extend({
4518
- message: z62.string()
4584
+ data: MailServerSchema
4519
4585
  }),
4520
4586
  ...DefaultResponses
4521
4587
  },
4522
- body: null,
4523
- summary: "Update a mail server by id"
4588
+ body: CreateMailServerSchema.partial(),
4589
+ summary: "Update a mail server"
4524
4590
  },
4525
4591
  delete: {
4526
- method: "PATCH",
4592
+ method: "DELETE",
4527
4593
  path: "/:id",
4528
- pathParams: z62.object({
4529
- id: z62.string()
4594
+ pathParams: z64.object({
4595
+ id: z64.string().uuid()
4530
4596
  }),
4531
4597
  responses: {
4532
4598
  200: DefaultSuccessResponseSchema.extend({
4533
- message: z62.string()
4599
+ data: MailServerSchema
4534
4600
  }),
4535
4601
  ...DefaultResponses
4536
4602
  },
4537
4603
  body: null,
4538
- summary: "Delete a mail server by id"
4604
+ summary: "Delete a mail server"
4539
4605
  }
4540
4606
  },
4541
4607
  {
@@ -4545,44 +4611,44 @@ var serverContract = initContract20().router(
4545
4611
 
4546
4612
  // src/mail/message-contract.ts
4547
4613
  import { initContract as initContract21 } from "@ts-rest/core";
4548
- import z64 from "zod";
4614
+ import z66 from "zod";
4549
4615
 
4550
4616
  // src/mail/schemas/message-validation.schema.ts
4551
- import z63 from "zod";
4552
- var MailParticipant = z63.object({
4553
- name: z63.string().optional(),
4554
- address: z63.string().email()
4617
+ import z65 from "zod";
4618
+ var MailParticipant = z65.object({
4619
+ name: z65.string().optional(),
4620
+ address: z65.string().email()
4555
4621
  });
4556
4622
  var MessageContractsValidationsSchema = {
4557
4623
  submit: {
4558
- input: z63.object({
4559
- subject: z63.string(),
4560
- text: z63.string(),
4561
- html: z63.string(),
4624
+ input: z65.object({
4625
+ subject: z65.string(),
4626
+ text: z65.string(),
4627
+ html: z65.string(),
4562
4628
  from: MailParticipant,
4563
- to: z63.array(MailParticipant),
4564
- cc: z63.array(MailParticipant).optional(),
4565
- bcc: z63.array(MailParticipant).optional(),
4566
- reference: z63.object({
4567
- messageId: z63.string(),
4568
- action: z63.union([z63.literal("reply"), z63.literal("forward")])
4629
+ to: z65.array(MailParticipant),
4630
+ cc: z65.array(MailParticipant).optional(),
4631
+ bcc: z65.array(MailParticipant).optional(),
4632
+ reference: z65.object({
4633
+ messageId: z65.string(),
4634
+ action: z65.union([z65.literal("reply"), z65.literal("forward")])
4569
4635
  }).optional(),
4570
- attachments: z63.array(
4571
- z63.object({
4572
- fileType: z63.string(),
4573
- fileName: z63.string(),
4574
- fileKey: z63.string(),
4575
- fileSize: z63.number(),
4576
- bucketName: z63.string(),
4577
- presignedUrl: z63.string()
4636
+ attachments: z65.array(
4637
+ z65.object({
4638
+ fileType: z65.string(),
4639
+ fileName: z65.string(),
4640
+ fileKey: z65.string(),
4641
+ fileSize: z65.number(),
4642
+ bucketName: z65.string(),
4643
+ presignedUrl: z65.string()
4578
4644
  })
4579
4645
  ).optional()
4580
4646
  }),
4581
- output: z63.object({
4582
- response: z63.string(),
4583
- messageId: z63.string(),
4584
- sendAt: z63.string(),
4585
- queueId: z63.string()
4647
+ output: z65.object({
4648
+ response: z65.string(),
4649
+ messageId: z65.string(),
4650
+ sendAt: z65.string(),
4651
+ queueId: z65.string()
4586
4652
  })
4587
4653
  }
4588
4654
  };
@@ -4607,8 +4673,8 @@ var messageContract = initContract21().router(
4607
4673
  getById: {
4608
4674
  method: "GET",
4609
4675
  path: "/:id",
4610
- pathParams: z64.object({
4611
- id: z64.string()
4676
+ pathParams: z66.object({
4677
+ id: z66.string()
4612
4678
  }),
4613
4679
  responses: {
4614
4680
  200: DefaultSuccessResponseSchema.extend({
@@ -4635,7 +4701,7 @@ var mailContract = initContract22().router({
4635
4701
 
4636
4702
  // src/messenger/index.ts
4637
4703
  import { initContract as initContract23 } from "@ts-rest/core";
4638
- import z65 from "zod";
4704
+ import z67 from "zod";
4639
4705
  var messengerContract = initContract23().router({
4640
4706
  sendMessage: {
4641
4707
  method: "POST",
@@ -4669,8 +4735,8 @@ var messengerContract = initContract23().router({
4669
4735
  reconnect: {
4670
4736
  method: "POST",
4671
4737
  path: "/reconnect/:channelId",
4672
- pathParams: z65.object({
4673
- channelId: z65.string().uuid()
4738
+ pathParams: z67.object({
4739
+ channelId: z67.string().uuid()
4674
4740
  }),
4675
4741
  body: null,
4676
4742
  responses: {
@@ -4682,8 +4748,8 @@ var messengerContract = initContract23().router({
4682
4748
  delete: {
4683
4749
  method: "DELETE",
4684
4750
  path: "/delete/:channelId",
4685
- pathParams: z65.object({
4686
- channelId: z65.string().uuid()
4751
+ pathParams: z67.object({
4752
+ channelId: z67.string().uuid()
4687
4753
  }),
4688
4754
  body: null,
4689
4755
  responses: {
@@ -4715,7 +4781,7 @@ var messengerContract = initContract23().router({
4715
4781
 
4716
4782
  // src/permission/index.ts
4717
4783
  import { initContract as initContract24 } from "@ts-rest/core";
4718
- import z66 from "zod";
4784
+ import z68 from "zod";
4719
4785
  var permissionContract = initContract24().router(
4720
4786
  {
4721
4787
  getPermissions: {
@@ -4723,9 +4789,9 @@ var permissionContract = initContract24().router(
4723
4789
  path: "",
4724
4790
  headers: DefaultHeaderSchema,
4725
4791
  responses: {
4726
- 200: z66.object({ permissions: PermissionSchema.array() }),
4727
- 400: z66.object({
4728
- message: z66.string()
4792
+ 200: z68.object({ permissions: PermissionSchema.array() }),
4793
+ 400: z68.object({
4794
+ message: z68.string()
4729
4795
  }),
4730
4796
  401: DefaultUnauthorizedSchema,
4731
4797
  500: DefaultErrorResponseSchema
@@ -4738,15 +4804,15 @@ var permissionContract = initContract24().router(
4738
4804
 
4739
4805
  // src/role/index.ts
4740
4806
  import { initContract as initContract25 } from "@ts-rest/core";
4741
- import z68 from "zod";
4807
+ import z70 from "zod";
4742
4808
 
4743
4809
  // src/role/validation.ts
4744
- import { z as z67 } from "zod";
4745
- var CreateRoleSchema = z67.object({
4746
- systemName: z67.string(),
4747
- displayName: z67.string(),
4748
- description: z67.string().nullable(),
4749
- permissions: z67.array(z67.string())
4810
+ import { z as z69 } from "zod";
4811
+ var CreateRoleSchema = z69.object({
4812
+ systemName: z69.string(),
4813
+ displayName: z69.string(),
4814
+ description: z69.string().nullable(),
4815
+ permissions: z69.array(z69.string())
4750
4816
  });
4751
4817
  var UpdateRoleSchema = CreateRoleSchema;
4752
4818
 
@@ -4762,8 +4828,8 @@ var roleContract = initContract25().router(
4762
4828
  201: DefaultSuccessResponseSchema.extend({
4763
4829
  role: RoleSchema
4764
4830
  }),
4765
- 400: z68.object({
4766
- message: z68.string()
4831
+ 400: z70.object({
4832
+ message: z70.string()
4767
4833
  }),
4768
4834
  401: DefaultUnauthorizedSchema,
4769
4835
  500: DefaultErrorResponseSchema
@@ -4773,15 +4839,15 @@ var roleContract = initContract25().router(
4773
4839
  getRoles: {
4774
4840
  method: "GET",
4775
4841
  path: "",
4776
- query: z68.object({
4777
- page: z68.coerce.number().default(1),
4778
- pageSize: z68.coerce.number().default(10)
4842
+ query: z70.object({
4843
+ page: z70.coerce.number().default(1),
4844
+ pageSize: z70.coerce.number().default(10)
4779
4845
  }).optional(),
4780
4846
  headers: DefaultHeaderSchema,
4781
4847
  responses: {
4782
4848
  200: WithPagination(RoleSchema),
4783
- 400: z68.object({
4784
- message: z68.string()
4849
+ 400: z70.object({
4850
+ message: z70.string()
4785
4851
  }),
4786
4852
  401: DefaultUnauthorizedSchema,
4787
4853
  500: DefaultErrorResponseSchema
@@ -4791,15 +4857,15 @@ var roleContract = initContract25().router(
4791
4857
  updateRole: {
4792
4858
  method: "PATCH",
4793
4859
  path: "/:id",
4794
- pathParams: z68.object({ id: z68.string() }),
4860
+ pathParams: z70.object({ id: z70.string() }),
4795
4861
  headers: DefaultHeaderSchema,
4796
4862
  body: UpdateRoleSchema,
4797
4863
  responses: {
4798
4864
  201: DefaultSuccessResponseSchema.extend({
4799
4865
  role: RoleSchema
4800
4866
  }),
4801
- 400: z68.object({
4802
- message: z68.string()
4867
+ 400: z70.object({
4868
+ message: z70.string()
4803
4869
  }),
4804
4870
  401: DefaultUnauthorizedSchema,
4805
4871
  500: DefaultErrorResponseSchema
@@ -4809,11 +4875,11 @@ var roleContract = initContract25().router(
4809
4875
  deleteRole: {
4810
4876
  method: "DELETE",
4811
4877
  path: "/:id",
4812
- pathParams: z68.object({ id: z68.string() }),
4878
+ pathParams: z70.object({ id: z70.string() }),
4813
4879
  headers: DefaultHeaderSchema,
4814
4880
  body: null,
4815
4881
  responses: {
4816
- 200: DefaultSuccessResponseSchema.extend({ message: z68.string() }),
4882
+ 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4817
4883
  500: DefaultErrorResponseSchema
4818
4884
  },
4819
4885
  summary: "Delete a role."
@@ -4824,19 +4890,19 @@ var roleContract = initContract25().router(
4824
4890
 
4825
4891
  // src/tag/index.ts
4826
4892
  import { initContract as initContract26 } from "@ts-rest/core";
4827
- import z70 from "zod";
4893
+ import z72 from "zod";
4828
4894
 
4829
4895
  // src/tag/validation.ts
4830
- import { z as z69 } from "zod";
4831
- var CreateTagSchema = z69.object({
4832
- name: z69.string(),
4896
+ import { z as z71 } from "zod";
4897
+ var CreateTagSchema = z71.object({
4898
+ name: z71.string(),
4833
4899
  group: TagGroupSchema
4834
4900
  });
4835
- var GetTagsSchema = z69.object({
4901
+ var GetTagsSchema = z71.object({
4836
4902
  group: TagGroupSchema.default("general"),
4837
- keyword: z69.string()
4903
+ keyword: z71.string()
4838
4904
  }).partial().optional();
4839
- var UpdateTagSchema = z69.object({ name: z69.string() });
4905
+ var UpdateTagSchema = z71.object({ name: z71.string() });
4840
4906
 
4841
4907
  // src/tag/index.ts
4842
4908
  var tagContract = initContract26().router(
@@ -4859,7 +4925,7 @@ var tagContract = initContract26().router(
4859
4925
  query: GetTagsSchema,
4860
4926
  responses: {
4861
4927
  200: DefaultSuccessResponseSchema.extend({
4862
- tags: z70.array(TagSchema)
4928
+ tags: z72.array(TagSchema)
4863
4929
  }),
4864
4930
  500: DefaultErrorResponseSchema
4865
4931
  },
@@ -4868,7 +4934,7 @@ var tagContract = initContract26().router(
4868
4934
  updateTag: {
4869
4935
  method: "PATCH",
4870
4936
  path: "/:id",
4871
- pathParams: z70.object({ id: z70.string() }),
4937
+ pathParams: z72.object({ id: z72.string() }),
4872
4938
  body: UpdateTagSchema,
4873
4939
  responses: {
4874
4940
  200: DefaultSuccessResponseSchema.extend({
@@ -4881,11 +4947,11 @@ var tagContract = initContract26().router(
4881
4947
  deleteTag: {
4882
4948
  method: "DELETE",
4883
4949
  path: "/:id",
4884
- pathParams: z70.object({ id: z70.string() }),
4885
- body: z70.any().optional(),
4950
+ pathParams: z72.object({ id: z72.string() }),
4951
+ body: z72.any().optional(),
4886
4952
  // We don't need the body.
4887
4953
  responses: {
4888
- 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4954
+ 200: DefaultSuccessResponseSchema.extend({ message: z72.string() }),
4889
4955
  500: DefaultErrorResponseSchema
4890
4956
  },
4891
4957
  headers: DefaultHeaderSchema
@@ -4898,27 +4964,27 @@ var tagContract = initContract26().router(
4898
4964
 
4899
4965
  // src/telephony-agent-presence-status/index.ts
4900
4966
  import { initContract as initContract27 } from "@ts-rest/core";
4901
- import z73 from "zod";
4967
+ import z75 from "zod";
4902
4968
 
4903
4969
  // src/telephony-agent-presence-status/schema.ts
4904
- import z71 from "zod";
4970
+ import z73 from "zod";
4905
4971
  var PresenceStatusSchema = DefaultEntitySchema.extend({
4906
- status: z71.string(),
4907
- description: z71.string()
4972
+ status: z73.string(),
4973
+ description: z73.string()
4908
4974
  });
4909
4975
  var UserPresenceStatusSchema = DefaultEntitySchema.extend({
4910
4976
  user: UserSchema,
4911
4977
  presenceStatus: PresenceStatusSchema,
4912
- customPresenceStatus: z71.string().nullable().optional()
4978
+ customPresenceStatus: z73.string().nullable().optional()
4913
4979
  });
4914
4980
 
4915
4981
  // src/telephony-agent-presence-status/validation.ts
4916
- import { z as z72 } from "zod";
4917
- var UpdateUserStatusSchema = z72.object({
4918
- userId: z72.string(),
4919
- presenceStatusId: z72.string().nullable().optional(),
4920
- customPreseneStatus: z72.string().nullable().optional(),
4921
- reason: z72.string()
4982
+ import { z as z74 } from "zod";
4983
+ var UpdateUserStatusSchema = z74.object({
4984
+ userId: z74.string(),
4985
+ presenceStatusId: z74.string().nullable().optional(),
4986
+ customPreseneStatus: z74.string().nullable().optional(),
4987
+ reason: z74.string()
4922
4988
  });
4923
4989
 
4924
4990
  // src/telephony-agent-presence-status/index.ts
@@ -4929,9 +4995,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4929
4995
  path: "/presence_status",
4930
4996
  headers: DefaultHeaderSchema,
4931
4997
  responses: {
4932
- 200: z73.array(PresenceStatusSchema),
4933
- 400: z73.object({
4934
- message: z73.string()
4998
+ 200: z75.array(PresenceStatusSchema),
4999
+ 400: z75.object({
5000
+ message: z75.string()
4935
5001
  }),
4936
5002
  401: DefaultUnauthorizedSchema,
4937
5003
  500: DefaultErrorResponseSchema
@@ -4943,9 +5009,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4943
5009
  path: "/agents/presence_status",
4944
5010
  headers: DefaultHeaderSchema,
4945
5011
  responses: {
4946
- 200: z73.array(UserPresenceStatusSchema),
4947
- 400: z73.object({
4948
- message: z73.string()
5012
+ 200: z75.array(UserPresenceStatusSchema),
5013
+ 400: z75.object({
5014
+ message: z75.string()
4949
5015
  }),
4950
5016
  401: DefaultUnauthorizedSchema,
4951
5017
  500: DefaultErrorResponseSchema
@@ -4955,12 +5021,12 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4955
5021
  getAgentStatus: {
4956
5022
  method: "GET",
4957
5023
  path: "/presence_status/check_update/:userId",
4958
- pathParams: z73.object({ userId: z73.string() }),
5024
+ pathParams: z75.object({ userId: z75.string() }),
4959
5025
  headers: DefaultHeaderSchema,
4960
5026
  responses: {
4961
5027
  200: UserPresenceStatusSchema,
4962
- 400: z73.object({
4963
- message: z73.string()
5028
+ 400: z75.object({
5029
+ message: z75.string()
4964
5030
  }),
4965
5031
  401: DefaultUnauthorizedSchema,
4966
5032
  500: DefaultErrorResponseSchema
@@ -4976,8 +5042,8 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4976
5042
  200: DefaultSuccessResponseSchema.extend({
4977
5043
  userPresenceStatu: UserPresenceStatusSchema
4978
5044
  }),
4979
- 400: z73.object({
4980
- message: z73.string()
5045
+ 400: z75.object({
5046
+ message: z75.string()
4981
5047
  }),
4982
5048
  401: DefaultUnauthorizedSchema,
4983
5049
  500: DefaultErrorResponseSchema
@@ -4989,62 +5055,62 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4989
5055
  );
4990
5056
 
4991
5057
  // src/telephony-cdr/index.ts
4992
- import z76 from "zod";
5058
+ import z78 from "zod";
4993
5059
 
4994
5060
  // src/telephony-cdr/validation.ts
4995
- import z74 from "zod";
4996
- var CreateTelephonyCdrSchema = z74.object({
4997
- uniqueCallId: z74.string({ required_error: "uniqueCallId is required" }),
4998
- timeStart: z74.string({ required_error: "timeStart is required" }),
4999
- callFrom: z74.string({ required_error: "callFrom is required" }),
5000
- callTo: z74.string({ required_error: "callTo is required" }),
5001
- callDuration: z74.number().nullable(),
5002
- talkDuration: z74.number().nullable(),
5003
- srcTrunkName: z74.string().nullable(),
5004
- dstTrunkName: z74.string().nullable(),
5005
- pinCode: z74.string().nullable(),
5006
- status: z74.string(),
5007
- type: z74.string(),
5008
- recording: z74.string().nullable(),
5009
- didNumber: z74.string().nullable(),
5010
- agentRingTime: z74.number().nullable()
5061
+ import z76 from "zod";
5062
+ var CreateTelephonyCdrSchema = z76.object({
5063
+ uniqueCallId: z76.string({ required_error: "uniqueCallId is required" }),
5064
+ timeStart: z76.string({ required_error: "timeStart is required" }),
5065
+ callFrom: z76.string({ required_error: "callFrom is required" }),
5066
+ callTo: z76.string({ required_error: "callTo is required" }),
5067
+ callDuration: z76.number().nullable(),
5068
+ talkDuration: z76.number().nullable(),
5069
+ srcTrunkName: z76.string().nullable(),
5070
+ dstTrunkName: z76.string().nullable(),
5071
+ pinCode: z76.string().nullable(),
5072
+ status: z76.string(),
5073
+ type: z76.string(),
5074
+ recording: z76.string().nullable(),
5075
+ didNumber: z76.string().nullable(),
5076
+ agentRingTime: z76.number().nullable()
5011
5077
  });
5012
5078
  var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5013
- selectedDate: z74.string().optional(),
5014
- type: z74.array(z74.string()).optional(),
5015
- status: z74.array(z74.string()).optional(),
5016
- callFrom: z74.string().optional(),
5017
- callTo: z74.string().optional(),
5018
- trunk: z74.array(z74.string()).optional(),
5019
- userId: z74.string().uuid().optional(),
5020
- queueStatus: z74.string().optional(),
5021
- agentIds: z74.array(z74.string().uuid()).optional(),
5022
- agentCallsOnly: z74.coerce.boolean().optional()
5079
+ selectedDate: z76.string().optional(),
5080
+ type: z76.array(z76.string()).optional(),
5081
+ status: z76.array(z76.string()).optional(),
5082
+ callFrom: z76.string().optional(),
5083
+ callTo: z76.string().optional(),
5084
+ trunk: z76.array(z76.string()).optional(),
5085
+ userId: z76.string().uuid().optional(),
5086
+ queueStatus: z76.string().optional(),
5087
+ agentIds: z76.array(z76.string().uuid()).optional(),
5088
+ agentCallsOnly: z76.coerce.boolean().optional()
5023
5089
  });
5024
5090
  var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5025
- type: z74.array(z74.string()).optional(),
5026
- status: z74.array(z74.string()).optional(),
5027
- callFrom: z74.string().optional(),
5028
- callTo: z74.string().optional(),
5029
- result: z74.array(z74.string()).optional(),
5030
- callTags: z74.array(z74.string()).optional(),
5031
- selectedDate: z74.string().optional(),
5032
- agentId: z74.string().optional(),
5033
- contact: z74.array(z74.string()).optional(),
5034
- callStatus: z74.array(z74.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5035
- queueIds: z74.array(z74.string()).optional(),
5036
- notes: z74.string().optional()
5091
+ type: z76.array(z76.string()).optional(),
5092
+ status: z76.array(z76.string()).optional(),
5093
+ callFrom: z76.string().optional(),
5094
+ callTo: z76.string().optional(),
5095
+ result: z76.array(z76.string()).optional(),
5096
+ callTags: z76.array(z76.string()).optional(),
5097
+ selectedDate: z76.string().optional(),
5098
+ agentId: z76.string().optional(),
5099
+ contact: z76.array(z76.string()).optional(),
5100
+ callStatus: z76.array(z76.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5101
+ queueIds: z76.array(z76.string()).optional(),
5102
+ notes: z76.string().optional()
5037
5103
  });
5038
5104
  var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
5039
- z74.object({
5040
- page: z74.coerce.number().positive().optional(),
5041
- pageSize: z74.coerce.number().positive().optional()
5105
+ z76.object({
5106
+ page: z76.coerce.number().positive().optional(),
5107
+ pageSize: z76.coerce.number().positive().optional()
5042
5108
  })
5043
5109
  );
5044
5110
  var NullEmptyStringUndefined = ["", null, void 0];
5045
5111
  var EmtptyArrayUndefined = [[], void 0];
5046
5112
  var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5047
- reportType: z74.enum([
5113
+ reportType: z76.enum([
5048
5114
  "extcallstatistics",
5049
5115
  "extcallactivity",
5050
5116
  "trunkactivity",
@@ -5054,52 +5120,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5054
5120
  "queueagentmisscalls",
5055
5121
  "queueagentinoutcalls"
5056
5122
  ]),
5057
- selectedDate: z74.string().optional(),
5058
- communicationType: z74.union([z74.literal("Inbound"), z74.literal("Outbound"), z74.literal("Internal")]).optional(),
5059
- time: z74.string().optional(),
5060
- queueList: z74.array(z74.string()).optional(),
5061
- queueId: z74.string().optional(),
5062
- trunkList: z74.array(z74.string()).optional(),
5063
- extensionList: z74.array(z74.string()).optional()
5123
+ selectedDate: z76.string().optional(),
5124
+ communicationType: z76.union([z76.literal("Inbound"), z76.literal("Outbound"), z76.literal("Internal")]).optional(),
5125
+ time: z76.string().optional(),
5126
+ queueList: z76.array(z76.string()).optional(),
5127
+ queueId: z76.string().optional(),
5128
+ trunkList: z76.array(z76.string()).optional(),
5129
+ extensionList: z76.array(z76.string()).optional()
5064
5130
  }).superRefine((input, ctx) => {
5065
5131
  if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
5066
5132
  ctx.addIssue({
5067
- code: z74.ZodIssueCode.custom,
5133
+ code: z76.ZodIssueCode.custom,
5068
5134
  path: ["selectedDate"],
5069
5135
  message: "selectedDate is required."
5070
5136
  });
5071
5137
  }
5072
5138
  if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
5073
5139
  ctx.addIssue({
5074
- code: z74.ZodIssueCode.custom,
5140
+ code: z76.ZodIssueCode.custom,
5075
5141
  path: ["time"],
5076
5142
  message: "time is required."
5077
5143
  });
5078
5144
  }
5079
5145
  if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
5080
5146
  ctx.addIssue({
5081
- code: z74.ZodIssueCode.custom,
5147
+ code: z76.ZodIssueCode.custom,
5082
5148
  path: ["queueList"],
5083
5149
  message: "queueList is required."
5084
5150
  });
5085
5151
  }
5086
5152
  if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
5087
5153
  ctx.addIssue({
5088
- code: z74.ZodIssueCode.custom,
5154
+ code: z76.ZodIssueCode.custom,
5089
5155
  path: ["queueId"],
5090
5156
  message: "queueId is required."
5091
5157
  });
5092
5158
  }
5093
5159
  if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
5094
5160
  ctx.addIssue({
5095
- code: z74.ZodIssueCode.custom,
5161
+ code: z76.ZodIssueCode.custom,
5096
5162
  path: ["trunkList"],
5097
5163
  message: "trunkList is required."
5098
5164
  });
5099
5165
  }
5100
5166
  if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
5101
5167
  ctx.addIssue({
5102
- code: z74.ZodIssueCode.custom,
5168
+ code: z76.ZodIssueCode.custom,
5103
5169
  path: ["extensionList"],
5104
5170
  message: "extensionList is required."
5105
5171
  });
@@ -5110,161 +5176,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5110
5176
  import { initContract as initContract28 } from "@ts-rest/core";
5111
5177
 
5112
5178
  // src/telephony-cdr/call-report.schema.ts
5113
- import z75 from "zod";
5114
- var ExtCallStatisticsListSchema = z75.object({
5179
+ import z77 from "zod";
5180
+ var ExtCallStatisticsListSchema = z77.object({
5115
5181
  /** @example "ext_num" */
5116
- ext_num: z75.string(),
5182
+ ext_num: z77.string(),
5117
5183
  /** @example "ext_name" */
5118
- ext_name: z75.string(),
5184
+ ext_name: z77.string(),
5119
5185
  /** @example 0 */
5120
- answered_calls: z75.number(),
5186
+ answered_calls: z77.number(),
5121
5187
  /** @example 0 */
5122
- no_answer_calls: z75.number(),
5188
+ no_answer_calls: z77.number(),
5123
5189
  /** @example 0 */
5124
- busy_calls: z75.number(),
5190
+ busy_calls: z77.number(),
5125
5191
  /** @example 0 */
5126
- failed_calls: z75.number(),
5192
+ failed_calls: z77.number(),
5127
5193
  /** @example 0 */
5128
- voicemail_calls: z75.number(),
5194
+ voicemail_calls: z77.number(),
5129
5195
  /** @example 0 */
5130
- total_holding_time: z75.number(),
5196
+ total_holding_time: z77.number(),
5131
5197
  /** @example 0 */
5132
- total_talking_time: z75.number(),
5198
+ total_talking_time: z77.number(),
5133
5199
  /** @example "src_name" */
5134
- src_name: z75.string(),
5200
+ src_name: z77.string(),
5135
5201
  /** @example 0 */
5136
- total_call_count: z75.number(),
5202
+ total_call_count: z77.number(),
5137
5203
  /** @example "mobile" */
5138
- mobile: z75.string()
5139
- });
5140
- var ExtStatisticSchema = z75.object({
5141
- ext_num: z75.string(),
5142
- ext_name: z75.string(),
5143
- answered_calls: z75.number(),
5144
- no_answer_calls: z75.number(),
5145
- busy_calls: z75.number(),
5146
- failed_calls: z75.number(),
5147
- voicemail_calls: z75.number(),
5148
- total_holding_time: z75.number(),
5149
- total_talking_time: z75.number(),
5150
- time: z75.number(),
5151
- mobile: z75.string()
5152
- });
5153
- var ExtCallActivityListSchema = z75.object({
5154
- time: z75.number(),
5155
- answered_calls: z75.number(),
5156
- no_answer_calls: z75.number(),
5157
- busy_calls: z75.number(),
5158
- failed_calls: z75.number(),
5159
- voicemail_calls: z75.number(),
5160
- total_holding_time: z75.number(),
5161
- total_talking_time: z75.number(),
5162
- ext_statistics: z75.array(ExtStatisticSchema)
5163
- });
5164
- var TrunkList = z75.object({
5165
- trunk_name: z75.string(),
5166
- total_calls: z75.number()
5167
- });
5168
- var TrunkActivityListSchema = z75.object({
5169
- time: z75.number(),
5170
- trunk_list: z75.array(TrunkList)
5171
- });
5172
- var QueueAvgWaitTalkTimeListSchema = z75.object({
5173
- time: z75.number(),
5174
- avg_wait_time: z75.number(),
5175
- avg_talk_time: z75.number()
5176
- });
5177
- var SatisfactionListSchema = z75.object({
5178
- press_key: z75.string(),
5179
- total: z75.number(),
5180
- key_point: z75.number().optional()
5181
- });
5182
- var agentListSchema = z75.object({
5183
- agent_name: z75.string(),
5184
- agent_num: z75.string(),
5185
- satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5186
- total_key: z75.number().optional(),
5187
- total_point: z75.number().optional(),
5188
- average_point: z75.number().optional()
5189
- });
5190
- var QueueSatisfactionSchema = z75.object({
5191
- queue_name: z75.string(),
5192
- queue_num: z75.string(),
5193
- satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5194
- agent_list: z75.array(agentListSchema).optional(),
5195
- total_key: z75.number().optional(),
5196
- total_point: z75.number().optional(),
5197
- average_point: z75.number().optional()
5198
- });
5199
- var QueuePerformanceListSchema = z75.object({
5200
- queue: z75.string(),
5201
- total_calls: z75.number(),
5202
- answered_calls: z75.number(),
5203
- missed_calls: z75.number(),
5204
- abandoned_calls: z75.number(),
5205
- average_waiting_time: z75.number(),
5206
- average_talking_time: z75.number(),
5207
- max_waiting_time: z75.number(),
5208
- answered_rate: z75.number(),
5209
- missed_rate: z75.number(),
5210
- abandoned_rate: z75.number(),
5211
- sla: z75.number()
5212
- });
5213
- var QueueAgentMissCallsListSchema = z75.object({
5214
- agent_name: z75.string(),
5215
- agent_num: z75.string(),
5216
- time: z75.string(),
5217
- total_wait_time: z75.number(),
5218
- src_name: z75.string(),
5219
- src_num: z75.string(),
5220
- queue_status: z75.string(),
5221
- polling_attempts: z75.number(),
5222
- missed_reason: z75.string()
5223
- });
5224
- var QueueAgentInOutCallsListSchema = z75.object({
5225
- agent_name: z75.string(),
5226
- agent_num: z75.string(),
5227
- inbound_calls: z75.number(),
5228
- inbound_duration: z75.number(),
5229
- outbound_calls: z75.number(),
5230
- outbound_duration: z75.number(),
5231
- total_calls: z75.number(),
5232
- total_duration: z75.number(),
5233
- average_talk_duration: z75.number()
5234
- });
5235
- var CallReportModel = z75.object({
5236
- errcode: z75.number(),
5237
- errmsg: z75.string(),
5238
- total_number: z75.number(),
5239
- is_12hour: z75.number().optional(),
5240
- ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5241
- ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5242
- trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5243
- queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5204
+ mobile: z77.string()
5205
+ });
5206
+ var ExtStatisticSchema = z77.object({
5207
+ ext_num: z77.string(),
5208
+ ext_name: z77.string(),
5209
+ answered_calls: z77.number(),
5210
+ no_answer_calls: z77.number(),
5211
+ busy_calls: z77.number(),
5212
+ failed_calls: z77.number(),
5213
+ voicemail_calls: z77.number(),
5214
+ total_holding_time: z77.number(),
5215
+ total_talking_time: z77.number(),
5216
+ time: z77.number(),
5217
+ mobile: z77.string()
5218
+ });
5219
+ var ExtCallActivityListSchema = z77.object({
5220
+ time: z77.number(),
5221
+ answered_calls: z77.number(),
5222
+ no_answer_calls: z77.number(),
5223
+ busy_calls: z77.number(),
5224
+ failed_calls: z77.number(),
5225
+ voicemail_calls: z77.number(),
5226
+ total_holding_time: z77.number(),
5227
+ total_talking_time: z77.number(),
5228
+ ext_statistics: z77.array(ExtStatisticSchema)
5229
+ });
5230
+ var TrunkList = z77.object({
5231
+ trunk_name: z77.string(),
5232
+ total_calls: z77.number()
5233
+ });
5234
+ var TrunkActivityListSchema = z77.object({
5235
+ time: z77.number(),
5236
+ trunk_list: z77.array(TrunkList)
5237
+ });
5238
+ var QueueAvgWaitTalkTimeListSchema = z77.object({
5239
+ time: z77.number(),
5240
+ avg_wait_time: z77.number(),
5241
+ avg_talk_time: z77.number()
5242
+ });
5243
+ var SatisfactionListSchema = z77.object({
5244
+ press_key: z77.string(),
5245
+ total: z77.number(),
5246
+ key_point: z77.number().optional()
5247
+ });
5248
+ var agentListSchema = z77.object({
5249
+ agent_name: z77.string(),
5250
+ agent_num: z77.string(),
5251
+ satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5252
+ total_key: z77.number().optional(),
5253
+ total_point: z77.number().optional(),
5254
+ average_point: z77.number().optional()
5255
+ });
5256
+ var QueueSatisfactionSchema = z77.object({
5257
+ queue_name: z77.string(),
5258
+ queue_num: z77.string(),
5259
+ satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5260
+ agent_list: z77.array(agentListSchema).optional(),
5261
+ total_key: z77.number().optional(),
5262
+ total_point: z77.number().optional(),
5263
+ average_point: z77.number().optional()
5264
+ });
5265
+ var QueuePerformanceListSchema = z77.object({
5266
+ queue: z77.string(),
5267
+ total_calls: z77.number(),
5268
+ answered_calls: z77.number(),
5269
+ missed_calls: z77.number(),
5270
+ abandoned_calls: z77.number(),
5271
+ average_waiting_time: z77.number(),
5272
+ average_talking_time: z77.number(),
5273
+ max_waiting_time: z77.number(),
5274
+ answered_rate: z77.number(),
5275
+ missed_rate: z77.number(),
5276
+ abandoned_rate: z77.number(),
5277
+ sla: z77.number()
5278
+ });
5279
+ var QueueAgentMissCallsListSchema = z77.object({
5280
+ agent_name: z77.string(),
5281
+ agent_num: z77.string(),
5282
+ time: z77.string(),
5283
+ total_wait_time: z77.number(),
5284
+ src_name: z77.string(),
5285
+ src_num: z77.string(),
5286
+ queue_status: z77.string(),
5287
+ polling_attempts: z77.number(),
5288
+ missed_reason: z77.string()
5289
+ });
5290
+ var QueueAgentInOutCallsListSchema = z77.object({
5291
+ agent_name: z77.string(),
5292
+ agent_num: z77.string(),
5293
+ inbound_calls: z77.number(),
5294
+ inbound_duration: z77.number(),
5295
+ outbound_calls: z77.number(),
5296
+ outbound_duration: z77.number(),
5297
+ total_calls: z77.number(),
5298
+ total_duration: z77.number(),
5299
+ average_talk_duration: z77.number()
5300
+ });
5301
+ var CallReportModel = z77.object({
5302
+ errcode: z77.number(),
5303
+ errmsg: z77.string(),
5304
+ total_number: z77.number(),
5305
+ is_12hour: z77.number().optional(),
5306
+ ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5307
+ ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5308
+ trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5309
+ queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5244
5310
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5245
- queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5246
- queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5247
- queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5248
- callback_result: z75.string(),
5249
- page: z75.number().optional(),
5250
- pageSize: z75.number().optional()
5251
- });
5252
- var CallReportSchema = z75.object({
5253
- errcode: z75.number(),
5254
- errmsg: z75.string(),
5255
- total_number: z75.number(),
5256
- is_12hour: z75.number().optional(),
5257
- ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5258
- ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5259
- trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5260
- queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5311
+ queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5312
+ queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5313
+ queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5314
+ callback_result: z77.string(),
5315
+ page: z77.number().optional(),
5316
+ pageSize: z77.number().optional()
5317
+ });
5318
+ var CallReportSchema = z77.object({
5319
+ errcode: z77.number(),
5320
+ errmsg: z77.string(),
5321
+ total_number: z77.number(),
5322
+ is_12hour: z77.number().optional(),
5323
+ ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5324
+ ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5325
+ trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5326
+ queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5261
5327
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5262
- queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5263
- queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5264
- queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5265
- callback_result: z75.string(),
5266
- page: z75.number().optional(),
5267
- pageSize: z75.number().optional()
5328
+ queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5329
+ queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5330
+ queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5331
+ callback_result: z77.string(),
5332
+ page: z77.number().optional(),
5333
+ pageSize: z77.number().optional()
5268
5334
  });
5269
5335
 
5270
5336
  // src/telephony-cdr/index.ts
@@ -5277,10 +5343,10 @@ var telephonyCdrContract = initContract28().router(
5277
5343
  query: GetAllTelephonyCdrSchema,
5278
5344
  responses: {
5279
5345
  200: DefaultSuccessResponseSchema.extend({
5280
- total: z76.number(),
5281
- page: z76.number(),
5282
- pageSize: z76.number(),
5283
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5346
+ total: z78.number(),
5347
+ page: z78.number(),
5348
+ pageSize: z78.number(),
5349
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5284
5350
  }),
5285
5351
  401: DefaultUnauthorizedSchema
5286
5352
  },
@@ -5293,10 +5359,10 @@ var telephonyCdrContract = initContract28().router(
5293
5359
  query: GetAllTelephonyCdrSchema,
5294
5360
  responses: {
5295
5361
  200: DefaultSuccessResponseSchema.extend({
5296
- total: z76.number(),
5297
- page: z76.number(),
5298
- pageSize: z76.number(),
5299
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5362
+ total: z78.number(),
5363
+ page: z78.number(),
5364
+ pageSize: z78.number(),
5365
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5300
5366
  }),
5301
5367
  401: DefaultUnauthorizedSchema
5302
5368
  },
@@ -5309,10 +5375,10 @@ var telephonyCdrContract = initContract28().router(
5309
5375
  query: GetRecentTelephonyCdrSchema,
5310
5376
  responses: {
5311
5377
  200: DefaultSuccessResponseSchema.extend({
5312
- total: z76.number(),
5313
- page: z76.number(),
5314
- pageSize: z76.number(),
5315
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5378
+ total: z78.number(),
5379
+ page: z78.number(),
5380
+ pageSize: z78.number(),
5381
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5316
5382
  }),
5317
5383
  401: DefaultUnauthorizedSchema
5318
5384
  },
@@ -5404,35 +5470,35 @@ var telephonyCdrContract = initContract28().router(
5404
5470
 
5405
5471
  // src/telephony-extension/index.ts
5406
5472
  import { initContract as initContract29 } from "@ts-rest/core";
5407
- import z78 from "zod";
5473
+ import z80 from "zod";
5408
5474
 
5409
5475
  // src/telephony-extension/schema.ts
5410
- import z77 from "zod";
5411
- var TelephonyExtensionSchema3 = z77.object({
5412
- errcode: z77.coerce.number(),
5413
- errmsg: z77.string(),
5414
- total_number: z77.coerce.number(),
5415
- data: z77.array(
5416
- z77.object({
5417
- id: z77.coerce.number(),
5418
- online_status: z77.object({
5419
- fx_phone: z77.object({ status: z77.coerce.number() }),
5420
- sip_phone: z77.object({
5421
- status: z77.coerce.number(),
5422
- ext_dev_type: z77.string().optional()
5423
- }),
5424
- linkus_desktop: z77.object({ status: z77.coerce.number() }),
5425
- linkus_mobile: z77.object({ status: z77.coerce.number() }),
5426
- linkus_web: z77.object({
5427
- status: z77.coerce.number(),
5428
- ext_dev_type: z77.string().optional()
5476
+ import z79 from "zod";
5477
+ var TelephonyExtensionSchema3 = z79.object({
5478
+ errcode: z79.coerce.number(),
5479
+ errmsg: z79.string(),
5480
+ total_number: z79.coerce.number(),
5481
+ data: z79.array(
5482
+ z79.object({
5483
+ id: z79.coerce.number(),
5484
+ online_status: z79.object({
5485
+ fx_phone: z79.object({ status: z79.coerce.number() }),
5486
+ sip_phone: z79.object({
5487
+ status: z79.coerce.number(),
5488
+ ext_dev_type: z79.string().optional()
5489
+ }),
5490
+ linkus_desktop: z79.object({ status: z79.coerce.number() }),
5491
+ linkus_mobile: z79.object({ status: z79.coerce.number() }),
5492
+ linkus_web: z79.object({
5493
+ status: z79.coerce.number(),
5494
+ ext_dev_type: z79.string().optional()
5429
5495
  })
5430
5496
  }).optional(),
5431
- presence_status: z77.string().optional(),
5432
- number: z77.string().optional(),
5433
- caller_id_name: z77.string().optional(),
5434
- role_name: z77.string().optional(),
5435
- email_addr: z77.string().optional()
5497
+ presence_status: z79.string().optional(),
5498
+ number: z79.string().optional(),
5499
+ caller_id_name: z79.string().optional(),
5500
+ role_name: z79.string().optional(),
5501
+ email_addr: z79.string().optional()
5436
5502
  })
5437
5503
  )
5438
5504
  });
@@ -5447,8 +5513,8 @@ var telephonyExtensionContract = initContract29().router(
5447
5513
  query: null,
5448
5514
  responses: {
5449
5515
  200: TelephonyExtensionSchema3,
5450
- 400: z78.object({
5451
- message: z78.string()
5516
+ 400: z80.object({
5517
+ message: z80.string()
5452
5518
  }),
5453
5519
  401: DefaultUnauthorizedSchema,
5454
5520
  500: DefaultErrorResponseSchema
@@ -5461,10 +5527,10 @@ var telephonyExtensionContract = initContract29().router(
5461
5527
 
5462
5528
  // src/ticket/index.ts
5463
5529
  import { initContract as initContract30 } from "@ts-rest/core";
5464
- import z80 from "zod";
5530
+ import z82 from "zod";
5465
5531
 
5466
5532
  // src/ticket/validation.ts
5467
- import z79 from "zod";
5533
+ import z81 from "zod";
5468
5534
  var addErrorMessage2 = (field) => {
5469
5535
  return field.refine(
5470
5536
  ({ isRequired, value }) => {
@@ -5482,106 +5548,106 @@ var addErrorMessage2 = (field) => {
5482
5548
  }
5483
5549
  );
5484
5550
  };
5485
- var BaseSchema3 = z79.object({
5486
- isRequired: z79.boolean(),
5487
- attributeId: z79.string()
5551
+ var BaseSchema3 = z81.object({
5552
+ isRequired: z81.boolean(),
5553
+ attributeId: z81.string()
5488
5554
  });
5489
5555
  var SingleValue2 = addErrorMessage2(
5490
5556
  BaseSchema3.extend({
5491
- value: z79.string()
5557
+ value: z81.string()
5492
5558
  })
5493
5559
  );
5494
- var CreateTicketValidationSchema = z79.object({
5560
+ var CreateTicketValidationSchema = z81.object({
5495
5561
  title: SingleValue2,
5496
5562
  description: SingleValue2,
5497
5563
  status: SingleValue2,
5498
5564
  type: SingleValue2,
5499
5565
  priority: SingleValue2,
5500
5566
  contact: SingleValue2,
5501
- assignee: z79.object({
5502
- isRequired: z79.boolean(),
5503
- attributeId: z79.string(),
5504
- value: z79.string()
5567
+ assignee: z81.object({
5568
+ isRequired: z81.boolean(),
5569
+ attributeId: z81.string(),
5570
+ value: z81.string()
5505
5571
  }),
5506
5572
  channel: SingleValue2,
5507
- tags: addErrorMessage2(BaseSchema3.extend({ value: z79.array(z79.string()) })),
5508
- categories: BaseSchema3.extend({ value: z79.array(z79.string()) }),
5509
- customFields: z79.array(
5573
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z81.array(z81.string()) })),
5574
+ categories: BaseSchema3.extend({ value: z81.array(z81.string()) }),
5575
+ customFields: z81.array(
5510
5576
  addErrorMessage2(
5511
5577
  BaseSchema3.extend({
5512
- value: z79.union([z79.string(), z79.array(z79.string())]),
5513
- type: z79.string(),
5514
- isDefaultAttribute: z79.boolean()
5578
+ value: z81.union([z81.string(), z81.array(z81.string())]),
5579
+ type: z81.string(),
5580
+ isDefaultAttribute: z81.boolean()
5515
5581
  })
5516
5582
  )
5517
5583
  ),
5518
- reasonToAssign: z79.object({ value: z79.string() }).optional()
5584
+ reasonToAssign: z81.object({ value: z81.string() }).optional()
5519
5585
  });
5520
5586
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5521
- var TicketAttachmentRecordSchema = z79.object({
5522
- bucketName: z79.string(),
5523
- fileKey: z79.string(),
5524
- fileName: z79.string(),
5525
- fileSize: z79.coerce.number(),
5526
- url: z79.string()
5527
- });
5528
- var CreateTicketAttachmentRecordsSchema = z79.object({
5529
- ticketId: z79.string(),
5530
- attributeId: z79.string(),
5531
- ticketAttachmentRecords: z79.array(TicketAttachmentRecordSchema)
5532
- });
5533
- var TicketParamsSchema = z79.object({
5534
- page: z79.coerce.number().default(1),
5535
- pageSize: z79.coerce.number().default(10)
5536
- });
5537
- var CustomFieldQuery = z79.object({
5538
- attributeId: z79.string(),
5539
- type: z79.string(),
5540
- value: z79.union([z79.string(), z79.array(z79.string())])
5541
- });
5542
- var GetAllTicketQuerySchema = z79.object({
5543
- page: z79.string().transform((value) => Number(value)),
5544
- pageSize: z79.string().transform((value) => Number(value)),
5545
- selectedDate: z79.string(),
5546
- keyword: z79.string(),
5547
- title: z79.string(),
5548
- description: z79.string(),
5549
- status: z79.array(z79.string()),
5550
- priority: z79.array(z79.string()),
5551
- channel: z79.array(z79.string()),
5552
- type: z79.array(z79.string()),
5553
- ticketType: z79.array(z79.string()),
5554
- contact: z79.array(z79.string()),
5555
- tags: z79.array(z79.string().uuid()),
5556
- categories: z79.array(z79.string().uuid()),
5557
- assignee: z79.array(z79.string().uuid()),
5558
- customFields: z79.array(
5559
- z79.object({
5560
- attributeId: z79.string().uuid(),
5561
- type: z79.string(),
5562
- value: z79.union([z79.string(), z79.array(z79.string())])
5587
+ var TicketAttachmentRecordSchema = z81.object({
5588
+ bucketName: z81.string(),
5589
+ fileKey: z81.string(),
5590
+ fileName: z81.string(),
5591
+ fileSize: z81.coerce.number(),
5592
+ url: z81.string()
5593
+ });
5594
+ var CreateTicketAttachmentRecordsSchema = z81.object({
5595
+ ticketId: z81.string(),
5596
+ attributeId: z81.string(),
5597
+ ticketAttachmentRecords: z81.array(TicketAttachmentRecordSchema)
5598
+ });
5599
+ var TicketParamsSchema = z81.object({
5600
+ page: z81.coerce.number().default(1),
5601
+ pageSize: z81.coerce.number().default(10)
5602
+ });
5603
+ var CustomFieldQuery = z81.object({
5604
+ attributeId: z81.string(),
5605
+ type: z81.string(),
5606
+ value: z81.union([z81.string(), z81.array(z81.string())])
5607
+ });
5608
+ var GetAllTicketQuerySchema = z81.object({
5609
+ page: z81.string().transform((value) => Number(value)),
5610
+ pageSize: z81.string().transform((value) => Number(value)),
5611
+ selectedDate: z81.string(),
5612
+ keyword: z81.string(),
5613
+ title: z81.string(),
5614
+ description: z81.string(),
5615
+ status: z81.array(z81.string()),
5616
+ priority: z81.array(z81.string()),
5617
+ channel: z81.array(z81.string()),
5618
+ type: z81.array(z81.string()),
5619
+ ticketType: z81.array(z81.string()),
5620
+ contact: z81.array(z81.string()),
5621
+ tags: z81.array(z81.string().uuid()),
5622
+ categories: z81.array(z81.string().uuid()),
5623
+ assignee: z81.array(z81.string().uuid()),
5624
+ customFields: z81.array(
5625
+ z81.object({
5626
+ attributeId: z81.string().uuid(),
5627
+ type: z81.string(),
5628
+ value: z81.union([z81.string(), z81.array(z81.string())])
5563
5629
  })
5564
5630
  )
5565
5631
  }).partial();
5566
- var ExportAllTicketQuerySchema = z79.object({
5567
- agent: z79.array(z79.string()),
5568
- selectedDate: z79.string(),
5569
- keyword: z79.string(),
5570
- title: z79.string(),
5571
- description: z79.string(),
5572
- status: z79.array(z79.string()),
5573
- priority: z79.array(z79.string()),
5574
- channel: z79.array(z79.string()),
5575
- type: z79.array(z79.string()),
5576
- ticketType: z79.array(z79.string()),
5577
- contact: z79.array(z79.string()),
5578
- tags: z79.array(z79.string()),
5579
- categories: z79.array(z79.string()),
5580
- customFields: z79.array(
5581
- z79.object({
5582
- attributeId: z79.string().uuid(),
5583
- type: z79.string(),
5584
- value: z79.union([z79.string(), z79.array(z79.string())])
5632
+ var ExportAllTicketQuerySchema = z81.object({
5633
+ agent: z81.array(z81.string()),
5634
+ selectedDate: z81.string(),
5635
+ keyword: z81.string(),
5636
+ title: z81.string(),
5637
+ description: z81.string(),
5638
+ status: z81.array(z81.string()),
5639
+ priority: z81.array(z81.string()),
5640
+ channel: z81.array(z81.string()),
5641
+ type: z81.array(z81.string()),
5642
+ ticketType: z81.array(z81.string()),
5643
+ contact: z81.array(z81.string()),
5644
+ tags: z81.array(z81.string()),
5645
+ categories: z81.array(z81.string()),
5646
+ customFields: z81.array(
5647
+ z81.object({
5648
+ attributeId: z81.string().uuid(),
5649
+ type: z81.string(),
5650
+ value: z81.union([z81.string(), z81.array(z81.string())])
5585
5651
  })
5586
5652
  )
5587
5653
  }).partial();
@@ -5597,14 +5663,14 @@ var ticketContract = initContract30().router(
5597
5663
  201: DefaultSuccessResponseSchema.extend({
5598
5664
  data: TicketSchema
5599
5665
  }),
5600
- 400: z80.object({
5601
- message: z80.string()
5666
+ 400: z82.object({
5667
+ message: z82.string()
5602
5668
  }),
5603
- 409: z80.object({
5604
- message: z80.string()
5669
+ 409: z82.object({
5670
+ message: z82.string()
5605
5671
  }),
5606
- 500: z80.object({
5607
- message: z80.string()
5672
+ 500: z82.object({
5673
+ message: z82.string()
5608
5674
  }),
5609
5675
  401: DefaultUnauthorizedSchema,
5610
5676
  404: DefaultNotFoundSchema,
@@ -5625,8 +5691,8 @@ var ticketContract = initContract30().router(
5625
5691
  TicketSchema
5626
5692
  )
5627
5693
  }),
5628
- 400: z80.object({
5629
- message: z80.string()
5694
+ 400: z82.object({
5695
+ message: z82.string()
5630
5696
  }),
5631
5697
  401: DefaultUnauthorizedSchema,
5632
5698
  500: DefaultErrorResponseSchema
@@ -5636,14 +5702,14 @@ var ticketContract = initContract30().router(
5636
5702
  getTicketById: {
5637
5703
  method: "GET",
5638
5704
  path: "/:id",
5639
- pathParams: z80.object({ id: z80.string() }),
5705
+ pathParams: z82.object({ id: z82.string() }),
5640
5706
  headers: DefaultHeaderSchema,
5641
5707
  responses: {
5642
5708
  200: DefaultSuccessResponseSchema.extend({
5643
5709
  data: TicketSchema
5644
5710
  }),
5645
- 400: z80.object({
5646
- message: z80.string()
5711
+ 400: z82.object({
5712
+ message: z82.string()
5647
5713
  }),
5648
5714
  401: DefaultUnauthorizedSchema,
5649
5715
  500: DefaultErrorResponseSchema
@@ -5653,15 +5719,15 @@ var ticketContract = initContract30().router(
5653
5719
  getTicketByContactId: {
5654
5720
  method: "GET",
5655
5721
  path: "/contact/:id",
5656
- pathParams: z80.object({ id: z80.string() }),
5722
+ pathParams: z82.object({ id: z82.string() }),
5657
5723
  query: TicketParamsSchema,
5658
5724
  headers: DefaultHeaderSchema,
5659
5725
  responses: {
5660
5726
  200: DefaultSuccessResponseSchema.extend({
5661
5727
  data: WithPagination(TicketSchema)
5662
5728
  }),
5663
- 400: z80.object({
5664
- message: z80.string()
5729
+ 400: z82.object({
5730
+ message: z82.string()
5665
5731
  }),
5666
5732
  401: DefaultUnauthorizedSchema,
5667
5733
  500: DefaultErrorResponseSchema
@@ -5671,21 +5737,21 @@ var ticketContract = initContract30().router(
5671
5737
  updateTicket: {
5672
5738
  method: "PATCH",
5673
5739
  path: "/:id",
5674
- pathParams: z80.object({ id: z80.string() }),
5740
+ pathParams: z82.object({ id: z82.string() }),
5675
5741
  body: UpdateTicketValidationSchema,
5676
5742
  headers: DefaultHeaderSchema,
5677
5743
  responses: {
5678
5744
  201: DefaultSuccessResponseSchema.extend({
5679
5745
  data: TicketSchema
5680
5746
  }),
5681
- 400: z80.object({
5682
- message: z80.string()
5747
+ 400: z82.object({
5748
+ message: z82.string()
5683
5749
  }),
5684
- 409: z80.object({
5685
- message: z80.string()
5750
+ 409: z82.object({
5751
+ message: z82.string()
5686
5752
  }),
5687
- 500: z80.object({
5688
- message: z80.string()
5753
+ 500: z82.object({
5754
+ message: z82.string()
5689
5755
  }),
5690
5756
  401: DefaultUnauthorizedSchema,
5691
5757
  404: DefaultNotFoundSchema,
@@ -5696,11 +5762,11 @@ var ticketContract = initContract30().router(
5696
5762
  deleteTicket: {
5697
5763
  method: "DELETE",
5698
5764
  path: "/:id",
5699
- pathParams: z80.object({ id: z80.string() }),
5765
+ pathParams: z82.object({ id: z82.string() }),
5700
5766
  headers: DefaultHeaderSchema,
5701
5767
  body: null,
5702
5768
  responses: {
5703
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5769
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5704
5770
  500: DefaultErrorResponseSchema
5705
5771
  },
5706
5772
  summary: "Delete a extension."
@@ -5708,19 +5774,19 @@ var ticketContract = initContract30().router(
5708
5774
  updateDescription: {
5709
5775
  method: "PATCH",
5710
5776
  path: "/description/update/:id",
5711
- pathParams: z80.object({ id: z80.string() }),
5712
- body: z80.object({ description: z80.string() }),
5777
+ pathParams: z82.object({ id: z82.string() }),
5778
+ body: z82.object({ description: z82.string() }),
5713
5779
  headers: DefaultHeaderSchema,
5714
5780
  responses: {
5715
- 201: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5716
- 400: z80.object({
5717
- message: z80.string()
5781
+ 201: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5782
+ 400: z82.object({
5783
+ message: z82.string()
5718
5784
  }),
5719
- 409: z80.object({
5720
- message: z80.string()
5785
+ 409: z82.object({
5786
+ message: z82.string()
5721
5787
  }),
5722
- 500: z80.object({
5723
- message: z80.string()
5788
+ 500: z82.object({
5789
+ message: z82.string()
5724
5790
  }),
5725
5791
  401: DefaultUnauthorizedSchema,
5726
5792
  404: DefaultNotFoundSchema,
@@ -5731,19 +5797,19 @@ var ticketContract = initContract30().router(
5731
5797
  updateTitle: {
5732
5798
  method: "PATCH",
5733
5799
  path: "/title/update/:id",
5734
- pathParams: z80.object({ id: z80.string() }),
5735
- body: z80.object({ title: z80.string() }),
5800
+ pathParams: z82.object({ id: z82.string() }),
5801
+ body: z82.object({ title: z82.string() }),
5736
5802
  headers: DefaultHeaderSchema,
5737
5803
  responses: {
5738
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5739
- 400: z80.object({
5740
- message: z80.string()
5804
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5805
+ 400: z82.object({
5806
+ message: z82.string()
5741
5807
  }),
5742
- 409: z80.object({
5743
- message: z80.string()
5808
+ 409: z82.object({
5809
+ message: z82.string()
5744
5810
  }),
5745
- 500: z80.object({
5746
- message: z80.string()
5811
+ 500: z82.object({
5812
+ message: z82.string()
5747
5813
  }),
5748
5814
  401: DefaultUnauthorizedSchema,
5749
5815
  404: DefaultNotFoundSchema,
@@ -5754,19 +5820,19 @@ var ticketContract = initContract30().router(
5754
5820
  updateType: {
5755
5821
  method: "PATCH",
5756
5822
  path: "/type/update/:id",
5757
- pathParams: z80.object({ id: z80.string() }),
5758
- body: z80.object({ type: z80.string() }),
5823
+ pathParams: z82.object({ id: z82.string() }),
5824
+ body: z82.object({ type: z82.string() }),
5759
5825
  headers: DefaultHeaderSchema,
5760
5826
  responses: {
5761
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5762
- 400: z80.object({
5763
- message: z80.string()
5827
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5828
+ 400: z82.object({
5829
+ message: z82.string()
5764
5830
  }),
5765
- 409: z80.object({
5766
- message: z80.string()
5831
+ 409: z82.object({
5832
+ message: z82.string()
5767
5833
  }),
5768
- 500: z80.object({
5769
- message: z80.string()
5834
+ 500: z82.object({
5835
+ message: z82.string()
5770
5836
  }),
5771
5837
  401: DefaultUnauthorizedSchema,
5772
5838
  404: DefaultNotFoundSchema,
@@ -5777,19 +5843,19 @@ var ticketContract = initContract30().router(
5777
5843
  updateStatus: {
5778
5844
  method: "PATCH",
5779
5845
  path: "/status/update/:id",
5780
- pathParams: z80.object({ id: z80.string() }),
5781
- body: z80.object({ status: z80.string() }),
5846
+ pathParams: z82.object({ id: z82.string() }),
5847
+ body: z82.object({ status: z82.string() }),
5782
5848
  headers: DefaultHeaderSchema,
5783
5849
  responses: {
5784
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5785
- 400: z80.object({
5786
- message: z80.string()
5850
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5851
+ 400: z82.object({
5852
+ message: z82.string()
5787
5853
  }),
5788
- 409: z80.object({
5789
- message: z80.string()
5854
+ 409: z82.object({
5855
+ message: z82.string()
5790
5856
  }),
5791
- 500: z80.object({
5792
- message: z80.string()
5857
+ 500: z82.object({
5858
+ message: z82.string()
5793
5859
  }),
5794
5860
  401: DefaultUnauthorizedSchema,
5795
5861
  404: DefaultNotFoundSchema,
@@ -5800,19 +5866,19 @@ var ticketContract = initContract30().router(
5800
5866
  updatePriority: {
5801
5867
  method: "PATCH",
5802
5868
  path: "/priority/update/:id",
5803
- pathParams: z80.object({ id: z80.string() }),
5804
- body: z80.object({ priority: z80.string() }),
5869
+ pathParams: z82.object({ id: z82.string() }),
5870
+ body: z82.object({ priority: z82.string() }),
5805
5871
  headers: DefaultHeaderSchema,
5806
5872
  responses: {
5807
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5808
- 400: z80.object({
5809
- message: z80.string()
5873
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5874
+ 400: z82.object({
5875
+ message: z82.string()
5810
5876
  }),
5811
- 409: z80.object({
5812
- message: z80.string()
5877
+ 409: z82.object({
5878
+ message: z82.string()
5813
5879
  }),
5814
- 500: z80.object({
5815
- message: z80.string()
5880
+ 500: z82.object({
5881
+ message: z82.string()
5816
5882
  }),
5817
5883
  401: DefaultUnauthorizedSchema,
5818
5884
  404: DefaultNotFoundSchema,
@@ -5823,19 +5889,19 @@ var ticketContract = initContract30().router(
5823
5889
  updateChannel: {
5824
5890
  method: "PATCH",
5825
5891
  path: "/channel/update/:id",
5826
- pathParams: z80.object({ id: z80.string() }),
5827
- body: z80.object({ channel: z80.string() }),
5892
+ pathParams: z82.object({ id: z82.string() }),
5893
+ body: z82.object({ channel: z82.string() }),
5828
5894
  headers: DefaultHeaderSchema,
5829
5895
  responses: {
5830
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5831
- 400: z80.object({
5832
- message: z80.string()
5896
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5897
+ 400: z82.object({
5898
+ message: z82.string()
5833
5899
  }),
5834
- 409: z80.object({
5835
- message: z80.string()
5900
+ 409: z82.object({
5901
+ message: z82.string()
5836
5902
  }),
5837
- 500: z80.object({
5838
- message: z80.string()
5903
+ 500: z82.object({
5904
+ message: z82.string()
5839
5905
  }),
5840
5906
  401: DefaultUnauthorizedSchema,
5841
5907
  404: DefaultNotFoundSchema,
@@ -5846,19 +5912,19 @@ var ticketContract = initContract30().router(
5846
5912
  updateTags: {
5847
5913
  method: "PATCH",
5848
5914
  path: "/tags/update/:id",
5849
- pathParams: z80.object({ id: z80.string() }),
5850
- body: z80.object({ tags: z80.array(z80.string()) }),
5915
+ pathParams: z82.object({ id: z82.string() }),
5916
+ body: z82.object({ tags: z82.array(z82.string()) }),
5851
5917
  headers: DefaultHeaderSchema,
5852
5918
  responses: {
5853
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5854
- 400: z80.object({
5855
- message: z80.string()
5919
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5920
+ 400: z82.object({
5921
+ message: z82.string()
5856
5922
  }),
5857
- 409: z80.object({
5858
- message: z80.string()
5923
+ 409: z82.object({
5924
+ message: z82.string()
5859
5925
  }),
5860
- 500: z80.object({
5861
- message: z80.string()
5926
+ 500: z82.object({
5927
+ message: z82.string()
5862
5928
  }),
5863
5929
  401: DefaultUnauthorizedSchema,
5864
5930
  404: DefaultNotFoundSchema,
@@ -5869,25 +5935,25 @@ var ticketContract = initContract30().router(
5869
5935
  changeAssignee: {
5870
5936
  method: "PATCH",
5871
5937
  path: "/assignee/update/:id",
5872
- pathParams: z80.object({ id: z80.string() }),
5873
- body: z80.object({
5874
- ticketId: z80.string(),
5875
- assigneeId: z80.string(),
5876
- reason: z80.string().optional()
5938
+ pathParams: z82.object({ id: z82.string() }),
5939
+ body: z82.object({
5940
+ ticketId: z82.string(),
5941
+ assigneeId: z82.string(),
5942
+ reason: z82.string().optional()
5877
5943
  }),
5878
5944
  headers: DefaultHeaderSchema,
5879
5945
  responses: {
5880
5946
  200: DefaultSuccessResponseSchema.extend({
5881
5947
  data: TicketSchema
5882
5948
  }),
5883
- 400: z80.object({
5884
- message: z80.string()
5949
+ 400: z82.object({
5950
+ message: z82.string()
5885
5951
  }),
5886
- 409: z80.object({
5887
- message: z80.string()
5952
+ 409: z82.object({
5953
+ message: z82.string()
5888
5954
  }),
5889
- 500: z80.object({
5890
- message: z80.string()
5955
+ 500: z82.object({
5956
+ message: z82.string()
5891
5957
  }),
5892
5958
  401: DefaultUnauthorizedSchema,
5893
5959
  404: DefaultNotFoundSchema,
@@ -5898,14 +5964,14 @@ var ticketContract = initContract30().router(
5898
5964
  getTicketCountByContact: {
5899
5965
  method: "GET",
5900
5966
  path: "/ticket_count/contact/:id",
5901
- pathParams: z80.object({ id: z80.string() }),
5967
+ pathParams: z82.object({ id: z82.string() }),
5902
5968
  headers: DefaultHeaderSchema,
5903
5969
  responses: {
5904
5970
  200: DefaultSuccessResponseSchema.extend({
5905
5971
  data: TicketCountByContactSchema
5906
5972
  }),
5907
- 400: z80.object({
5908
- message: z80.string()
5973
+ 400: z82.object({
5974
+ message: z82.string()
5909
5975
  }),
5910
5976
  401: DefaultUnauthorizedSchema,
5911
5977
  500: DefaultErrorResponseSchema
@@ -5921,14 +5987,14 @@ var ticketContract = initContract30().router(
5921
5987
  201: DefaultSuccessResponseSchema.extend({
5922
5988
  data: TicketCustomFieldSchema
5923
5989
  }),
5924
- 400: z80.object({
5925
- message: z80.string()
5990
+ 400: z82.object({
5991
+ message: z82.string()
5926
5992
  }),
5927
- 409: z80.object({
5928
- message: z80.string()
5993
+ 409: z82.object({
5994
+ message: z82.string()
5929
5995
  }),
5930
- 500: z80.object({
5931
- message: z80.string()
5996
+ 500: z82.object({
5997
+ message: z82.string()
5932
5998
  }),
5933
5999
  401: DefaultUnauthorizedSchema,
5934
6000
  404: DefaultNotFoundSchema,
@@ -5953,24 +6019,24 @@ var ticketContract = initContract30().router(
5953
6019
 
5954
6020
  // src/user/index.ts
5955
6021
  import { initContract as initContract31 } from "@ts-rest/core";
5956
- import z82 from "zod";
6022
+ import z84 from "zod";
5957
6023
 
5958
6024
  // src/user/validation.ts
5959
- import { z as z81 } from "zod";
5960
- var CreateUserSchema = z81.object({
5961
- name: z81.string(),
5962
- email: z81.string().email(),
5963
- address: z81.string().nullable(),
5964
- phone: z81.string().nullable(),
5965
- password: z81.string(),
5966
- notificationCount: z81.number().nullable().optional(),
5967
- roles: z81.array(z81.string())
6025
+ import { z as z83 } from "zod";
6026
+ var CreateUserSchema = z83.object({
6027
+ name: z83.string(),
6028
+ email: z83.string().email(),
6029
+ address: z83.string().nullable(),
6030
+ phone: z83.string().nullable(),
6031
+ password: z83.string(),
6032
+ notificationCount: z83.number().nullable().optional(),
6033
+ roles: z83.array(z83.string())
5968
6034
  });
5969
6035
  var UpdateUserSchema = CreateUserSchema.extend({
5970
- newPassword: z81.string()
6036
+ newPassword: z83.string()
5971
6037
  });
5972
- var UpdateUserProfileSchema = z81.object({
5973
- password: z81.string()
6038
+ var UpdateUserProfileSchema = z83.object({
6039
+ password: z83.string()
5974
6040
  });
5975
6041
 
5976
6042
  // src/user/index.ts
@@ -5985,8 +6051,8 @@ var userContract = initContract31().router(
5985
6051
  201: DefaultSuccessResponseSchema.extend({
5986
6052
  user: UserSchema
5987
6053
  }),
5988
- 400: z82.object({
5989
- message: z82.string()
6054
+ 400: z84.object({
6055
+ message: z84.string()
5990
6056
  }),
5991
6057
  401: DefaultUnauthorizedSchema,
5992
6058
  404: DefaultNotFoundSchema,
@@ -5999,16 +6065,16 @@ var userContract = initContract31().router(
5999
6065
  method: "GET",
6000
6066
  path: "",
6001
6067
  headers: DefaultHeaderSchema,
6002
- query: z82.object({
6003
- page: z82.coerce.number().optional(),
6004
- pageSize: z82.coerce.number().optional(),
6068
+ query: z84.object({
6069
+ page: z84.coerce.number().optional(),
6070
+ pageSize: z84.coerce.number().optional(),
6005
6071
  // Don't add default 10. In some places, we need to fetch all users.
6006
- keyword: z82.string().optional()
6072
+ keyword: z84.string().optional()
6007
6073
  }).optional(),
6008
6074
  responses: {
6009
6075
  200: WithPagination(UserSchema),
6010
- 400: z82.object({
6011
- message: z82.string()
6076
+ 400: z84.object({
6077
+ message: z84.string()
6012
6078
  }),
6013
6079
  401: DefaultUnauthorizedSchema,
6014
6080
  500: DefaultErrorResponseSchema
@@ -6018,12 +6084,12 @@ var userContract = initContract31().router(
6018
6084
  getUserById: {
6019
6085
  method: "GET",
6020
6086
  path: "/:id",
6021
- pathParams: z82.object({ id: z82.string() }),
6087
+ pathParams: z84.object({ id: z84.string() }),
6022
6088
  headers: DefaultHeaderSchema,
6023
6089
  responses: {
6024
6090
  200: UserSchema,
6025
- 400: z82.object({
6026
- message: z82.string()
6091
+ 400: z84.object({
6092
+ message: z84.string()
6027
6093
  }),
6028
6094
  401: DefaultUnauthorizedSchema
6029
6095
  },
@@ -6032,15 +6098,15 @@ var userContract = initContract31().router(
6032
6098
  updateUser: {
6033
6099
  method: "PATCH",
6034
6100
  path: "/:id",
6035
- pathParams: z82.object({ id: z82.string() }),
6101
+ pathParams: z84.object({ id: z84.string() }),
6036
6102
  headers: DefaultHeaderSchema,
6037
6103
  body: UpdateUserSchema,
6038
6104
  responses: {
6039
6105
  201: DefaultSuccessResponseSchema.extend({
6040
6106
  user: UserSchema
6041
6107
  }),
6042
- 400: z82.object({
6043
- message: z82.string()
6108
+ 400: z84.object({
6109
+ message: z84.string()
6044
6110
  }),
6045
6111
  401: DefaultUnauthorizedSchema,
6046
6112
  404: DefaultNotFoundSchema,
@@ -6052,15 +6118,15 @@ var userContract = initContract31().router(
6052
6118
  updateUserProfile: {
6053
6119
  method: "PATCH",
6054
6120
  path: "/profile/:id",
6055
- pathParams: z82.object({ id: z82.string() }),
6121
+ pathParams: z84.object({ id: z84.string() }),
6056
6122
  headers: DefaultHeaderSchema,
6057
6123
  body: UpdateUserProfileSchema,
6058
6124
  responses: {
6059
6125
  201: DefaultSuccessResponseSchema.extend({
6060
6126
  user: UserSchema
6061
6127
  }),
6062
- 400: z82.object({
6063
- message: z82.string()
6128
+ 400: z84.object({
6129
+ message: z84.string()
6064
6130
  }),
6065
6131
  401: DefaultUnauthorizedSchema,
6066
6132
  404: DefaultNotFoundSchema,
@@ -6072,11 +6138,11 @@ var userContract = initContract31().router(
6072
6138
  deleteUser: {
6073
6139
  method: "DELETE",
6074
6140
  path: "/:id",
6075
- pathParams: z82.object({ id: z82.string() }),
6141
+ pathParams: z84.object({ id: z84.string() }),
6076
6142
  headers: DefaultHeaderSchema,
6077
6143
  body: null,
6078
6144
  responses: {
6079
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6145
+ 200: DefaultSuccessResponseSchema.extend({ message: z84.string() }),
6080
6146
  404: DefaultNotFoundSchema,
6081
6147
  422: DefaultUnprocessibleSchema,
6082
6148
  500: DefaultErrorResponseSchema
@@ -6089,26 +6155,26 @@ var userContract = initContract31().router(
6089
6155
 
6090
6156
  // src/user-presence-status-log/index.ts
6091
6157
  import { initContract as initContract32 } from "@ts-rest/core";
6092
- import z85 from "zod";
6158
+ import z87 from "zod";
6093
6159
 
6094
6160
  // src/user-presence-status-log/schema.ts
6095
- import z83 from "zod";
6161
+ import z85 from "zod";
6096
6162
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
6097
6163
  user: UserSchema,
6098
6164
  previousPresenceStatus: PresenceStatusSchema,
6099
6165
  newPresenceStatus: PresenceStatusSchema,
6100
- reason: z83.string()
6166
+ reason: z85.string()
6101
6167
  });
6102
6168
 
6103
6169
  // src/user-presence-status-log/validation.ts
6104
- import z84 from "zod";
6105
- var UserPresenceStatusLogParamsSchema = z84.object({
6106
- page: z84.coerce.number().default(1),
6107
- pageSize: z84.coerce.number().default(10),
6108
- selectedDate: z84.string().optional()
6170
+ import z86 from "zod";
6171
+ var UserPresenceStatusLogParamsSchema = z86.object({
6172
+ page: z86.coerce.number().default(1),
6173
+ pageSize: z86.coerce.number().default(10),
6174
+ selectedDate: z86.string().optional()
6109
6175
  }).optional();
6110
- var UserPresenceStatusLogExportParamsSchema = z84.object({
6111
- selectedDate: z84.string().optional()
6176
+ var UserPresenceStatusLogExportParamsSchema = z86.object({
6177
+ selectedDate: z86.string().optional()
6112
6178
  });
6113
6179
 
6114
6180
  // src/user-presence-status-log/index.ts
@@ -6121,8 +6187,8 @@ var userPresenceStatusLogContract = initContract32().router(
6121
6187
  headers: DefaultHeaderSchema,
6122
6188
  responses: {
6123
6189
  200: WithPagination(UserPresenceStatusLogSchema),
6124
- 400: z85.object({
6125
- message: z85.string()
6190
+ 400: z87.object({
6191
+ message: z87.string()
6126
6192
  }),
6127
6193
  401: DefaultUnauthorizedSchema,
6128
6194
  500: DefaultErrorResponseSchema
@@ -6136,8 +6202,8 @@ var userPresenceStatusLogContract = initContract32().router(
6136
6202
  headers: DefaultHeaderSchema,
6137
6203
  responses: {
6138
6204
  200: null,
6139
- 400: z85.object({
6140
- message: z85.string()
6205
+ 400: z87.object({
6206
+ message: z87.string()
6141
6207
  }),
6142
6208
  401: DefaultUnauthorizedSchema,
6143
6209
  500: DefaultErrorResponseSchema
@@ -6149,44 +6215,44 @@ var userPresenceStatusLogContract = initContract32().router(
6149
6215
 
6150
6216
  // src/widget/index.ts
6151
6217
  import { initContract as initContract33 } from "@ts-rest/core";
6152
- import z88 from "zod";
6218
+ import z90 from "zod";
6153
6219
 
6154
6220
  // src/widget/schema.ts
6155
- import z86 from "zod";
6156
- var FieldsSchema = z86.object({ data: z86.array(z86.string()) });
6157
- var WidgetPositionSchema = z86.union([
6158
- z86.literal("menu"),
6159
- z86.literal("ticket_detail"),
6160
- z86.literal("contact_detail")
6221
+ import z88 from "zod";
6222
+ var FieldsSchema = z88.object({ data: z88.array(z88.string()) });
6223
+ var WidgetPositionSchema = z88.union([
6224
+ z88.literal("menu"),
6225
+ z88.literal("ticket_detail"),
6226
+ z88.literal("contact_detail")
6161
6227
  ]);
6162
6228
  var WidgetSchema = DefaultEntitySchema.extend({
6163
- name: z86.string(),
6164
- description: z86.string().nullable(),
6229
+ name: z88.string(),
6230
+ description: z88.string().nullable(),
6165
6231
  position: WidgetPositionSchema.nullable(),
6166
6232
  fields: FieldsSchema,
6167
- url: z86.string()
6233
+ url: z88.string()
6168
6234
  });
6169
6235
 
6170
6236
  // src/widget/validation.ts
6171
- import z87 from "zod";
6172
- var CreateWidgetSchema = z87.object({
6173
- name: z87.string(),
6174
- description: z87.string(),
6175
- url: z87.string(),
6237
+ import z89 from "zod";
6238
+ var CreateWidgetSchema = z89.object({
6239
+ name: z89.string(),
6240
+ description: z89.string(),
6241
+ url: z89.string(),
6176
6242
  position: WidgetPositionSchema,
6177
- fields: z87.object({
6243
+ fields: z89.object({
6178
6244
  data: (
6179
6245
  // Array of attribute system names
6180
- z87.array(z87.string())
6246
+ z89.array(z89.string())
6181
6247
  )
6182
6248
  }).optional()
6183
6249
  });
6184
6250
  var UpdateWidgetSchema = CreateWidgetSchema;
6185
- var GetWidgetUrlPathQuerySchema = z87.object({
6186
- widgetId: z87.string(),
6251
+ var GetWidgetUrlPathQuerySchema = z89.object({
6252
+ widgetId: z89.string(),
6187
6253
  // Position ID is ticket ID, contact ID, etc.
6188
6254
  // TODO: The name "Position ID" is confusing. Think of a better name.
6189
- positionId: z87.string()
6255
+ positionId: z89.string()
6190
6256
  });
6191
6257
 
6192
6258
  // src/widget/index.ts
@@ -6201,8 +6267,8 @@ var widgetContract = initContract33().router(
6201
6267
  201: DefaultSuccessResponseSchema.extend({
6202
6268
  widget: WidgetSchema
6203
6269
  }),
6204
- 400: z88.object({
6205
- message: z88.string()
6270
+ 400: z90.object({
6271
+ message: z90.string()
6206
6272
  }),
6207
6273
  401: DefaultUnauthorizedSchema,
6208
6274
  500: DefaultErrorResponseSchema
@@ -6212,17 +6278,17 @@ var widgetContract = initContract33().router(
6212
6278
  getWidgets: {
6213
6279
  method: "GET",
6214
6280
  path: "",
6215
- query: z88.object({
6216
- page: z88.coerce.number().default(1),
6217
- pageSize: z88.coerce.number().default(10),
6218
- keyword: z88.coerce.string().optional()
6281
+ query: z90.object({
6282
+ page: z90.coerce.number().default(1),
6283
+ pageSize: z90.coerce.number().default(10),
6284
+ keyword: z90.coerce.string().optional()
6219
6285
  }).optional(),
6220
6286
  headers: DefaultHeaderSchema,
6221
6287
  responses: {
6222
6288
  200: WithPagination(WidgetSchema),
6223
6289
  500: DefaultErrorResponseSchema,
6224
- 400: z88.object({
6225
- message: z88.string()
6290
+ 400: z90.object({
6291
+ message: z90.string()
6226
6292
  }),
6227
6293
  401: DefaultUnauthorizedSchema
6228
6294
  },
@@ -6233,9 +6299,9 @@ var widgetContract = initContract33().router(
6233
6299
  path: "/menu",
6234
6300
  headers: DefaultHeaderSchema,
6235
6301
  responses: {
6236
- 200: z88.array(WidgetSchema),
6237
- 400: z88.object({
6238
- message: z88.string()
6302
+ 200: z90.array(WidgetSchema),
6303
+ 400: z90.object({
6304
+ message: z90.string()
6239
6305
  }),
6240
6306
  401: DefaultUnauthorizedSchema,
6241
6307
  500: DefaultErrorResponseSchema
@@ -6247,9 +6313,9 @@ var widgetContract = initContract33().router(
6247
6313
  path: "/ticket_detail",
6248
6314
  headers: DefaultHeaderSchema,
6249
6315
  responses: {
6250
- 200: z88.array(WidgetSchema),
6251
- 400: z88.object({
6252
- message: z88.string()
6316
+ 200: z90.array(WidgetSchema),
6317
+ 400: z90.object({
6318
+ message: z90.string()
6253
6319
  }),
6254
6320
  401: DefaultUnauthorizedSchema,
6255
6321
  500: DefaultErrorResponseSchema
@@ -6261,9 +6327,9 @@ var widgetContract = initContract33().router(
6261
6327
  path: "/contact_detail",
6262
6328
  headers: DefaultHeaderSchema,
6263
6329
  responses: {
6264
- 200: z88.array(WidgetSchema),
6265
- 400: z88.object({
6266
- message: z88.string()
6330
+ 200: z90.array(WidgetSchema),
6331
+ 400: z90.object({
6332
+ message: z90.string()
6267
6333
  }),
6268
6334
  401: DefaultUnauthorizedSchema,
6269
6335
  500: DefaultErrorResponseSchema
@@ -6273,12 +6339,12 @@ var widgetContract = initContract33().router(
6273
6339
  getWidgetById: {
6274
6340
  method: "GET",
6275
6341
  path: "/:id",
6276
- pathParams: z88.object({ id: z88.string() }),
6342
+ pathParams: z90.object({ id: z90.string() }),
6277
6343
  headers: DefaultHeaderSchema,
6278
6344
  responses: {
6279
6345
  200: WidgetSchema,
6280
- 400: z88.object({
6281
- message: z88.string()
6346
+ 400: z90.object({
6347
+ message: z90.string()
6282
6348
  }),
6283
6349
  401: DefaultUnauthorizedSchema,
6284
6350
  500: DefaultErrorResponseSchema
@@ -6292,10 +6358,10 @@ var widgetContract = initContract33().router(
6292
6358
  headers: DefaultHeaderSchema,
6293
6359
  responses: {
6294
6360
  201: DefaultSuccessResponseSchema.extend({
6295
- url: z88.string()
6361
+ url: z90.string()
6296
6362
  }),
6297
- 400: z88.object({
6298
- message: z88.string()
6363
+ 400: z90.object({
6364
+ message: z90.string()
6299
6365
  }),
6300
6366
  401: DefaultUnauthorizedSchema
6301
6367
  },
@@ -6304,14 +6370,14 @@ var widgetContract = initContract33().router(
6304
6370
  updateWidget: {
6305
6371
  method: "PATCH",
6306
6372
  path: "/:id",
6307
- pathParams: z88.object({ id: z88.string() }),
6373
+ pathParams: z90.object({ id: z90.string() }),
6308
6374
  headers: DefaultHeaderSchema,
6309
6375
  responses: {
6310
6376
  201: DefaultSuccessResponseSchema.extend({
6311
6377
  widget: WidgetSchema
6312
6378
  }),
6313
- 400: z88.object({
6314
- message: z88.string()
6379
+ 400: z90.object({
6380
+ message: z90.string()
6315
6381
  }),
6316
6382
  401: DefaultUnauthorizedSchema
6317
6383
  },
@@ -6321,11 +6387,11 @@ var widgetContract = initContract33().router(
6321
6387
  deleteWidget: {
6322
6388
  method: "DELETE",
6323
6389
  path: "/:id",
6324
- pathParams: z88.object({ id: z88.string() }),
6390
+ pathParams: z90.object({ id: z90.string() }),
6325
6391
  headers: DefaultHeaderSchema,
6326
6392
  body: null,
6327
6393
  responses: {
6328
- 200: DefaultSuccessResponseSchema.extend({ message: z88.string() }),
6394
+ 200: DefaultSuccessResponseSchema.extend({ message: z90.string() }),
6329
6395
  500: DefaultErrorResponseSchema
6330
6396
  },
6331
6397
  summary: "Delete a widget."
@@ -6336,24 +6402,24 @@ var widgetContract = initContract33().router(
6336
6402
 
6337
6403
  // src/wrap-up-form/index.ts
6338
6404
  import { initContract as initContract34 } from "@ts-rest/core";
6339
- import z90 from "zod";
6405
+ import z92 from "zod";
6340
6406
 
6341
6407
  // src/wrap-up-form/validation.ts
6342
- import { z as z89 } from "zod";
6343
- var CreateWrapUpFormSchema = z89.object({
6344
- note: z89.string().nullable().optional(),
6345
- disposition: z89.string().nullable().optional(),
6346
- callFrom: z89.string().nullable().optional(),
6347
- callTo: z89.string().nullable().optional()
6408
+ import { z as z91 } from "zod";
6409
+ var CreateWrapUpFormSchema = z91.object({
6410
+ note: z91.string().nullable().optional(),
6411
+ disposition: z91.string().nullable().optional(),
6412
+ callFrom: z91.string().nullable().optional(),
6413
+ callTo: z91.string().nullable().optional()
6348
6414
  });
6349
6415
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6350
- tags: z89.array(z89.string()).optional()
6416
+ tags: z91.array(z91.string()).optional()
6351
6417
  });
6352
- var CreateCXLogWrapUpFormSchema = z89.object({
6353
- cxLogId: z89.string().uuid(),
6354
- disposition: z89.string().optional(),
6355
- tagIds: z89.array(z89.string().uuid()).optional(),
6356
- note: z89.string().optional()
6418
+ var CreateCXLogWrapUpFormSchema = z91.object({
6419
+ cxLogId: z91.string().uuid(),
6420
+ disposition: z91.string().optional(),
6421
+ tagIds: z91.array(z91.string().uuid()).optional(),
6422
+ note: z91.string().optional()
6357
6423
  });
6358
6424
 
6359
6425
  // src/wrap-up-form/index.ts
@@ -6368,8 +6434,8 @@ var wrapUpFormContract = initContract34().router(
6368
6434
  201: DefaultSuccessResponseSchema.extend({
6369
6435
  wrapUpForm: WrapUpFormSchema
6370
6436
  }),
6371
- 400: z90.object({
6372
- message: z90.string()
6437
+ 400: z92.object({
6438
+ message: z92.string()
6373
6439
  }),
6374
6440
  401: DefaultUnauthorizedSchema,
6375
6441
  500: DefaultErrorResponseSchema
@@ -6391,15 +6457,15 @@ var wrapUpFormContract = initContract34().router(
6391
6457
  getWrapUpForms: {
6392
6458
  method: "GET",
6393
6459
  path: "",
6394
- query: z90.object({
6395
- page: z90.coerce.number().default(1),
6396
- pageSize: z90.coerce.number().default(10)
6460
+ query: z92.object({
6461
+ page: z92.coerce.number().default(1),
6462
+ pageSize: z92.coerce.number().default(10)
6397
6463
  }).optional(),
6398
6464
  headers: DefaultHeaderSchema,
6399
6465
  responses: {
6400
6466
  200: WithPagination(WrapUpFormSchema),
6401
- 400: z90.object({
6402
- message: z90.string()
6467
+ 400: z92.object({
6468
+ message: z92.string()
6403
6469
  }),
6404
6470
  401: DefaultUnauthorizedSchema,
6405
6471
  500: DefaultErrorResponseSchema
@@ -6409,15 +6475,15 @@ var wrapUpFormContract = initContract34().router(
6409
6475
  updateWrapUpForm: {
6410
6476
  method: "PATCH",
6411
6477
  path: "/:id",
6412
- pathParams: z90.object({ id: z90.string() }),
6478
+ pathParams: z92.object({ id: z92.string() }),
6413
6479
  headers: DefaultHeaderSchema,
6414
6480
  body: UpdateWrapUpFormSchema,
6415
6481
  responses: {
6416
6482
  201: DefaultSuccessResponseSchema.extend({
6417
6483
  wrapUpForm: WrapUpFormSchema
6418
6484
  }),
6419
- 400: z90.object({
6420
- message: z90.string()
6485
+ 400: z92.object({
6486
+ message: z92.string()
6421
6487
  }),
6422
6488
  401: DefaultUnauthorizedSchema,
6423
6489
  500: DefaultErrorResponseSchema
@@ -6430,28 +6496,28 @@ var wrapUpFormContract = initContract34().router(
6430
6496
 
6431
6497
  // src/upload/index.ts
6432
6498
  import { initContract as initContract35 } from "@ts-rest/core";
6433
- import z91 from "zod";
6499
+ import z93 from "zod";
6434
6500
  var uploadContract = initContract35().router(
6435
6501
  {
6436
6502
  rename: {
6437
6503
  method: "POST",
6438
6504
  path: "/:id/rename",
6439
- pathParams: z91.object({
6440
- id: z91.string()
6505
+ pathParams: z93.object({
6506
+ id: z93.string()
6441
6507
  }),
6442
6508
  headers: DefaultHeaderSchema,
6443
6509
  responses: {
6444
6510
  201: DefaultSuccessResponseSchema.extend({
6445
- message: z91.string()
6511
+ message: z93.string()
6446
6512
  }),
6447
- 400: z91.object({
6448
- message: z91.string()
6513
+ 400: z93.object({
6514
+ message: z93.string()
6449
6515
  }),
6450
- 409: z91.object({
6451
- message: z91.string()
6516
+ 409: z93.object({
6517
+ message: z93.string()
6452
6518
  }),
6453
- 500: z91.object({
6454
- message: z91.string()
6519
+ 500: z93.object({
6520
+ message: z93.string()
6455
6521
  }),
6456
6522
  401: DefaultUnauthorizedSchema,
6457
6523
  404: DefaultNotFoundSchema,
@@ -6463,23 +6529,23 @@ var uploadContract = initContract35().router(
6463
6529
  delete: {
6464
6530
  method: "DELETE",
6465
6531
  path: "/:id",
6466
- pathParams: z91.object({
6467
- id: z91.string()
6532
+ pathParams: z93.object({
6533
+ id: z93.string()
6468
6534
  }),
6469
6535
  headers: DefaultHeaderSchema,
6470
6536
  body: null,
6471
6537
  responses: {
6472
6538
  201: DefaultSuccessResponseSchema.extend({
6473
- message: z91.string()
6539
+ message: z93.string()
6474
6540
  }),
6475
- 400: z91.object({
6476
- message: z91.string()
6541
+ 400: z93.object({
6542
+ message: z93.string()
6477
6543
  }),
6478
- 409: z91.object({
6479
- message: z91.string()
6544
+ 409: z93.object({
6545
+ message: z93.string()
6480
6546
  }),
6481
- 500: z91.object({
6482
- message: z91.string()
6547
+ 500: z93.object({
6548
+ message: z93.string()
6483
6549
  }),
6484
6550
  401: DefaultUnauthorizedSchema,
6485
6551
  404: DefaultNotFoundSchema,
@@ -6494,19 +6560,19 @@ var uploadContract = initContract35().router(
6494
6560
  );
6495
6561
 
6496
6562
  // src/viber/index.ts
6497
- import z93 from "zod";
6563
+ import z95 from "zod";
6498
6564
 
6499
6565
  // src/viber/validation.ts
6500
- import z92 from "zod";
6501
- var ViberChannelSchema = z92.object({
6502
- name: z92.string(),
6503
- accessToken: z92.string(),
6504
- actor: z92.object({
6505
- id: z92.string().uuid(),
6506
- name: z92.string(),
6507
- email: z92.string().email(),
6508
- address: z92.string().nullable(),
6509
- phone: z92.string().nullable()
6566
+ import z94 from "zod";
6567
+ var ViberChannelSchema = z94.object({
6568
+ name: z94.string(),
6569
+ accessToken: z94.string(),
6570
+ actor: z94.object({
6571
+ id: z94.string().uuid(),
6572
+ name: z94.string(),
6573
+ email: z94.string().email(),
6574
+ address: z94.string().nullable(),
6575
+ phone: z94.string().nullable()
6510
6576
  }).optional()
6511
6577
  });
6512
6578
 
@@ -6535,8 +6601,8 @@ var viberContract = initContract36().router({
6535
6601
  }),
6536
6602
  400: DefaultErrorResponseSchema
6537
6603
  },
6538
- body: z93.object({
6539
- id: z93.string().uuid()
6604
+ body: z95.object({
6605
+ id: z95.string().uuid()
6540
6606
  }),
6541
6607
  summary: "Connect viber channel"
6542
6608
  },
@@ -6552,8 +6618,8 @@ var viberContract = initContract36().router({
6552
6618
  reconnect: {
6553
6619
  method: "POST",
6554
6620
  path: "/reconnect/:channelId",
6555
- pathParams: z93.object({
6556
- channelId: z93.string().uuid()
6621
+ pathParams: z95.object({
6622
+ channelId: z95.string().uuid()
6557
6623
  }),
6558
6624
  responses: {
6559
6625
  200: DefaultSuccessResponseSchema.extend({
@@ -6568,8 +6634,8 @@ var viberContract = initContract36().router({
6568
6634
  delete: {
6569
6635
  method: "DELETE",
6570
6636
  path: "/delete/:channelId",
6571
- pathParams: z93.object({
6572
- channelId: z93.string().uuid()
6637
+ pathParams: z95.object({
6638
+ channelId: z95.string().uuid()
6573
6639
  }),
6574
6640
  body: null,
6575
6641
  responses: {
@@ -6582,58 +6648,58 @@ var viberContract = initContract36().router({
6582
6648
 
6583
6649
  // src/notification/index.ts
6584
6650
  import { initContract as initContract37 } from "@ts-rest/core";
6585
- import z96 from "zod";
6651
+ import z98 from "zod";
6586
6652
 
6587
6653
  // src/notification/validation.ts
6588
- import z95 from "zod";
6654
+ import z97 from "zod";
6589
6655
 
6590
6656
  // src/notification/schema.ts
6591
- import z94 from "zod";
6592
- var NotificationChangeSchema = z94.object({
6593
- id: z94.string().uuid(),
6594
- createdAt: z94.date(),
6595
- updatedAt: z94.date(),
6596
- deletedAt: z94.date().nullable(),
6597
- actorId: z94.string().uuid(),
6657
+ import z96 from "zod";
6658
+ var NotificationChangeSchema = z96.object({
6659
+ id: z96.string().uuid(),
6660
+ createdAt: z96.date(),
6661
+ updatedAt: z96.date(),
6662
+ deletedAt: z96.date().nullable(),
6663
+ actorId: z96.string().uuid(),
6598
6664
  actor: UserSchema,
6599
- notificationObjectId: z94.string().uuid(),
6600
- readAt: z94.date()
6601
- });
6602
- var NotificationObjectSchema = z94.object({
6603
- id: z94.string().uuid(),
6604
- createdAt: z94.date(),
6605
- updatedAt: z94.date(),
6606
- deletedAt: z94.date().nullable(),
6607
- data: z94.string(),
6665
+ notificationObjectId: z96.string().uuid(),
6666
+ readAt: z96.date()
6667
+ });
6668
+ var NotificationObjectSchema = z96.object({
6669
+ id: z96.string().uuid(),
6670
+ createdAt: z96.date(),
6671
+ updatedAt: z96.date(),
6672
+ deletedAt: z96.date().nullable(),
6673
+ data: z96.string(),
6608
6674
  notificationChange: NotificationChangeSchema
6609
6675
  });
6610
- var NotificationSchema = z94.object({
6611
- id: z94.string().uuid(),
6612
- createdAt: z94.date(),
6613
- updatedAt: z94.date(),
6614
- deletedAt: z94.date().nullable(),
6615
- notificationObjectId: z94.string().uuid(),
6616
- notifierId: z94.string().uuid(),
6676
+ var NotificationSchema = z96.object({
6677
+ id: z96.string().uuid(),
6678
+ createdAt: z96.date(),
6679
+ updatedAt: z96.date(),
6680
+ deletedAt: z96.date().nullable(),
6681
+ notificationObjectId: z96.string().uuid(),
6682
+ notifierId: z96.string().uuid(),
6617
6683
  notificationObject: NotificationObjectSchema,
6618
- readAt: z94.date()
6684
+ readAt: z96.date()
6619
6685
  });
6620
6686
 
6621
6687
  // src/notification/validation.ts
6622
- var GetNotificationsRequestSchema = z95.object({
6623
- page: z95.coerce.number().default(1),
6624
- pageSize: z95.coerce.number().default(10)
6688
+ var GetNotificationsRequestSchema = z97.object({
6689
+ page: z97.coerce.number().default(1),
6690
+ pageSize: z97.coerce.number().default(10)
6625
6691
  });
6626
- var GetNotificationsResponseSchema = z95.object({
6627
- notificationCount: z95.number(),
6628
- notifications: z95.array(NotificationSchema),
6629
- total: z95.number(),
6630
- page: z95.number(),
6631
- pageSize: z95.number(),
6632
- lastPage: z95.number(),
6633
- totalUnreadCount: z95.number().optional()
6692
+ var GetNotificationsResponseSchema = z97.object({
6693
+ notificationCount: z97.number(),
6694
+ notifications: z97.array(NotificationSchema),
6695
+ total: z97.number(),
6696
+ page: z97.number(),
6697
+ pageSize: z97.number(),
6698
+ lastPage: z97.number(),
6699
+ totalUnreadCount: z97.number().optional()
6634
6700
  });
6635
- var ResetNotificationRequestSchema = z95.object({
6636
- userId: z95.string()
6701
+ var ResetNotificationRequestSchema = z97.object({
6702
+ userId: z97.string()
6637
6703
  });
6638
6704
 
6639
6705
  // src/notification/index.ts
@@ -6647,14 +6713,14 @@ var userNotificationContract = initContract37().router(
6647
6713
  200: DefaultSuccessResponseSchema.extend({
6648
6714
  data: GetNotificationsResponseSchema
6649
6715
  }),
6650
- 400: z96.object({
6651
- message: z96.string()
6716
+ 400: z98.object({
6717
+ message: z98.string()
6652
6718
  }),
6653
- 409: z96.object({
6654
- message: z96.string()
6719
+ 409: z98.object({
6720
+ message: z98.string()
6655
6721
  }),
6656
- 500: z96.object({
6657
- message: z96.string()
6722
+ 500: z98.object({
6723
+ message: z98.string()
6658
6724
  }),
6659
6725
  401: DefaultUnauthorizedSchema,
6660
6726
  404: DefaultNotFoundSchema,
@@ -6667,16 +6733,16 @@ var userNotificationContract = initContract37().router(
6667
6733
  path: "/new_notifications_count",
6668
6734
  responses: {
6669
6735
  200: DefaultSuccessResponseSchema.extend({
6670
- total: z96.number()
6736
+ total: z98.number()
6671
6737
  }),
6672
- 400: z96.object({
6673
- message: z96.string()
6738
+ 400: z98.object({
6739
+ message: z98.string()
6674
6740
  }),
6675
- 409: z96.object({
6676
- message: z96.string()
6741
+ 409: z98.object({
6742
+ message: z98.string()
6677
6743
  }),
6678
- 500: z96.object({
6679
- message: z96.string()
6744
+ 500: z98.object({
6745
+ message: z98.string()
6680
6746
  }),
6681
6747
  401: DefaultUnauthorizedSchema,
6682
6748
  404: DefaultNotFoundSchema,
@@ -6691,14 +6757,14 @@ var userNotificationContract = initContract37().router(
6691
6757
  201: DefaultSuccessResponseSchema.extend({
6692
6758
  data: UserSchema
6693
6759
  }),
6694
- 400: z96.object({
6695
- message: z96.string()
6760
+ 400: z98.object({
6761
+ message: z98.string()
6696
6762
  }),
6697
- 409: z96.object({
6698
- message: z96.string()
6763
+ 409: z98.object({
6764
+ message: z98.string()
6699
6765
  }),
6700
- 500: z96.object({
6701
- message: z96.string()
6766
+ 500: z98.object({
6767
+ message: z98.string()
6702
6768
  }),
6703
6769
  401: DefaultUnauthorizedSchema,
6704
6770
  404: DefaultNotFoundSchema,
@@ -6710,19 +6776,19 @@ var userNotificationContract = initContract37().router(
6710
6776
  readNotification: {
6711
6777
  method: "POST",
6712
6778
  path: "/read/:id",
6713
- pathParams: z96.object({ id: z96.string() }),
6779
+ pathParams: z98.object({ id: z98.string() }),
6714
6780
  responses: {
6715
6781
  201: DefaultSuccessResponseSchema.extend({
6716
6782
  data: NotificationSchema
6717
6783
  }),
6718
- 400: z96.object({
6719
- message: z96.string()
6784
+ 400: z98.object({
6785
+ message: z98.string()
6720
6786
  }),
6721
- 409: z96.object({
6722
- message: z96.string()
6787
+ 409: z98.object({
6788
+ message: z98.string()
6723
6789
  }),
6724
- 500: z96.object({
6725
- message: z96.string()
6790
+ 500: z98.object({
6791
+ message: z98.string()
6726
6792
  }),
6727
6793
  401: DefaultUnauthorizedSchema,
6728
6794
  404: DefaultNotFoundSchema,
@@ -6804,6 +6870,7 @@ export {
6804
6870
  dashboardContract,
6805
6871
  evaluateFormContract,
6806
6872
  extensionContract2 as extensionContract,
6873
+ mailContract,
6807
6874
  mainChatContract,
6808
6875
  notificationContract,
6809
6876
  permissionContract,