@kl1/contracts 1.1.3 → 1.1.4-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 (59) hide show
  1. package/dist/index.js +933 -885
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +932 -885
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/app/index.d.ts +17 -0
  6. package/dist/src/app/index.d.ts.map +1 -0
  7. package/dist/src/chat/index.d.ts +2985 -2123
  8. package/dist/src/chat/index.d.ts.map +1 -1
  9. package/dist/src/chat/schema.d.ts +24 -8
  10. package/dist/src/chat/schema.d.ts.map +1 -1
  11. package/dist/src/chat/validation.d.ts +76 -7
  12. package/dist/src/chat/validation.d.ts.map +1 -1
  13. package/dist/src/chatwoot/index.d.ts +7527 -0
  14. package/dist/src/chatwoot/index.d.ts.map +1 -0
  15. package/dist/src/chatwoot/schema.d.ts +79 -0
  16. package/dist/src/chatwoot/schema.d.ts.map +1 -0
  17. package/dist/src/chatwoot/validation.d.ts +53 -0
  18. package/dist/src/chatwoot/validation.d.ts.map +1 -0
  19. package/dist/src/contract.d.ts +5243 -3485
  20. package/dist/src/contract.d.ts.map +1 -1
  21. package/dist/src/index.d.ts +1 -0
  22. package/dist/src/index.d.ts.map +1 -1
  23. package/dist/src/instagram/index.d.ts +73 -7
  24. package/dist/src/instagram/index.d.ts.map +1 -1
  25. package/dist/src/line/index.d.ts +73 -7
  26. package/dist/src/line/index.d.ts.map +1 -1
  27. package/dist/src/mail/account-contract.d.ts +289 -136
  28. package/dist/src/mail/account-contract.d.ts.map +1 -1
  29. package/dist/src/mail/index.d.ts +10 -0
  30. package/dist/src/mail/index.d.ts.map +1 -1
  31. package/dist/src/mail/mail-contract.d.ts +1775 -1162
  32. package/dist/src/mail/mail-contract.d.ts.map +1 -1
  33. package/dist/src/mail/mail-server-contract.d.ts +477 -18
  34. package/dist/src/mail/mail-server-contract.d.ts.map +1 -1
  35. package/dist/src/mail/mail-server.d.ts +216 -0
  36. package/dist/src/mail/mail-server.d.ts.map +1 -0
  37. package/dist/src/mail/message-contract.d.ts +54 -54
  38. package/dist/src/mail/room-contract.d.ts +957 -954
  39. package/dist/src/mail/room-contract.d.ts.map +1 -1
  40. package/dist/src/mail/schemas/account-validation.schema.d.ts +140 -140
  41. package/dist/src/mail/schemas/account-validation.schema.d.ts.map +1 -1
  42. package/dist/src/mail/schemas/account.schema.d.ts +32 -32
  43. package/dist/src/mail/schemas/message.schema.d.ts +42 -42
  44. package/dist/src/mail/schemas/message.schema.d.ts.map +1 -1
  45. package/dist/src/mail/schemas/room-validation.schema.d.ts +325 -322
  46. package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
  47. package/dist/src/mail/schemas/room.schema.d.ts +683 -259
  48. package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
  49. package/dist/src/messenger/index.d.ts +83 -7
  50. package/dist/src/messenger/index.d.ts.map +1 -1
  51. package/dist/src/platform-contact/schema.d.ts +30 -0
  52. package/dist/src/platform-contact/schema.d.ts.map +1 -0
  53. package/dist/src/telephony-cdr/index.d.ts +9 -0
  54. package/dist/src/telephony-cdr/index.d.ts.map +1 -1
  55. package/dist/src/telephony-cdr/validation.d.ts +6 -0
  56. package/dist/src/telephony-cdr/validation.d.ts.map +1 -1
  57. package/dist/src/viber/index.d.ts +73 -7
  58. package/dist/src/viber/index.d.ts.map +1 -1
  59. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1101,7 +1101,9 @@ var PlatformContactSchema = z26.object({
1101
1101
  var RoomSchema = DefaultEntitySchema.extend({
1102
1102
  lastMessage: z26.string(),
1103
1103
  handleTime: z26.number(),
1104
- closeAt: z26.date(),
1104
+ closedAt: 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(),
@@ -1278,61 +1280,8 @@ var RepliedMessageSchema = DefaultEntitySchema.extend({
1278
1280
  url: z26.string(),
1279
1281
  previewUrl: z26.string(),
1280
1282
  imageSetId: z26.string(),
1281
- // room: RoomSchema,
1282
1283
  upload: UploadSchema,
1283
- // id: z.string().uuid(),
1284
- // createdAt: z.date(),
1285
- // updatedAt: z.date(),
1286
- // deletedAt: z.date().nullable(),
1287
- // name: z.string(),
1288
- // email: z.string().email(),
1289
- // emailVerifiedAt: z.date().nullable(),
1290
- // password: z.string(),
1291
- // address: z.string().nullable(),
1292
- // phone: z.string().nullable(),
1293
- // notificationCount: z.number().nullable(),
1294
- // roles: z.array(RoleSchema),
1295
- // extension: z.object({
1296
- // id: z.string().uuid(),
1297
- // createdAt: z.date(),
1298
- // updatedAt: z.date(),
1299
- // deletedAt: z.date().nullable(),
1300
- // userId: z.string().nullable(),
1301
- // sipServerUrl: z.string(),
1302
- // sipUserName: z.string(),
1303
- // webphoneLoginUser: z.string(),
1304
- // extensionId: z.string().nullable(),
1305
- // extensionName: z.string(),
1306
- // telephonySignature: z.string().nullable(),
1307
- // }),
1308
- // }),
1309
1284
  actor: UserSchema,
1310
- // id: z.string().uuid(),
1311
- // createdAt: z.date(),
1312
- // updatedAt: z.date(),
1313
- // deletedAt: z.date().nullable(),
1314
- // name: z.string(),
1315
- // email: z.string().email(),
1316
- // emailVerifiedAt: z.date().nullable(),
1317
- // password: z.string(),
1318
- // address: z.string().nullable(),
1319
- // phone: z.string().nullable(),
1320
- // notificationCount: z.number().nullable(),
1321
- // roles: z.array(RoleSchema),
1322
- // extension: z.object({
1323
- // id: z.string().uuid(),
1324
- // createdAt: z.date(),
1325
- // updatedAt: z.date(),
1326
- // deletedAt: z.date().nullable(),
1327
- // userId: z.string().nullable(),
1328
- // sipServerUrl: z.string(),
1329
- // sipUserName: z.string(),
1330
- // webphoneLoginUser: z.string(),
1331
- // extensionId: z.string().nullable(),
1332
- // extensionName: z.string(),
1333
- // telephonySignature: z.string().nullable(),
1334
- // }),
1335
- // }),
1336
1285
  assignee: UserSchema,
1337
1286
  sender: UserSchema
1338
1287
  });
@@ -1448,7 +1397,12 @@ var SendMessageSchema = z29.object({
1448
1397
  messageAttachments: MessageAttachmentSchema.optional(),
1449
1398
  user: UserSchema.optional(),
1450
1399
  sticker: StickerSchema.optional(),
1451
- file: z29.custom().optional()
1400
+ file: z29.custom().optional(),
1401
+ messengerTags: z29.union([
1402
+ z29.literal("post_purchase_update"),
1403
+ z29.literal("account_update"),
1404
+ z29.literal("confirmed_event_update")
1405
+ ]).optional()
1452
1406
  });
1453
1407
  var SolveRoomSchema = z29.object({
1454
1408
  roomId: z29.string(),
@@ -1497,6 +1451,7 @@ var SendMessageToPlatformSchema = z29.object({
1497
1451
  createdAt: z29.string(),
1498
1452
  updatedAt: z29.string(),
1499
1453
  platformContact: z29.object({
1454
+ id: z29.string().uuid(),
1500
1455
  channelId: z29.string().uuid(),
1501
1456
  socialPlatformId: z29.string().nullable(),
1502
1457
  type: ChannelTypeSchema,
@@ -1511,12 +1466,23 @@ var SendMessageToPlatformSchema = z29.object({
1511
1466
  })
1512
1467
  }),
1513
1468
  actor: z29.object({
1469
+ id: z29.string().uuid(),
1514
1470
  name: z29.string(),
1515
1471
  email: z29.string().email(),
1516
1472
  address: z29.string().nullable(),
1517
1473
  phone: z29.string().nullable()
1518
1474
  }).nullable(),
1519
- channel: ChannelSchema2
1475
+ assignee: z29.object({
1476
+ id: z29.string().uuid(),
1477
+ name: z29.string(),
1478
+ email: z29.string().email()
1479
+ }).nullable(),
1480
+ channel: ChannelSchema2,
1481
+ messengerTags: z29.union([
1482
+ z29.literal("post_purchase_update"),
1483
+ z29.literal("account_update"),
1484
+ z29.literal("confirmed_event_update")
1485
+ ]).optional()
1520
1486
  }),
1521
1487
  message: z29.object({
1522
1488
  message: z29.string().optional(),
@@ -2022,6 +1988,7 @@ var mainChatContract = initContract7().router(
2022
1988
  body: SendMessageSchema,
2023
1989
  responses: {
2024
1990
  200: SendMessageResponseSchema,
1991
+ 400: DefaultErrorResponseSchema,
2025
1992
  422: DefaultErrorResponseSchema,
2026
1993
  500: DefaultErrorResponseSchema
2027
1994
  },
@@ -2094,7 +2061,24 @@ var mainChatContract = initContract7().router(
2094
2061
  }),
2095
2062
  responses: {
2096
2063
  200: DefaultSuccessResponseSchema.extend({
2097
- data: RoomSchema
2064
+ data: z33.object({
2065
+ room: RoomSchema,
2066
+ latestIncomingMessage: z33.object({
2067
+ message: z33.string(),
2068
+ direction: MessageDirectionTypeSchema,
2069
+ type: MessageTypeSchema,
2070
+ readAt: z33.date(),
2071
+ metadata: z33.any(),
2072
+ platformId: z33.string(),
2073
+ platformMessageId: z33.string(),
2074
+ replyPlatformMessageId: z33.string(),
2075
+ template: z33.any(),
2076
+ locale: MessageLocaleTypeSchema,
2077
+ url: z33.string(),
2078
+ previewUrl: z33.string(),
2079
+ imageSetId: z33.string()
2080
+ })
2081
+ })
2098
2082
  }),
2099
2083
  404: DefaultErrorResponseSchema
2100
2084
  },
@@ -4015,7 +3999,7 @@ import { initContract as initContract22 } from "@ts-rest/core";
4015
3999
 
4016
4000
  // src/mail/room-contract.ts
4017
4001
  import { initContract as initContract18 } from "@ts-rest/core";
4018
- import z59 from "zod";
4002
+ import z60 from "zod";
4019
4003
 
4020
4004
  // src/mail/schemas/room.schema.ts
4021
4005
  import z58 from "zod";
@@ -4029,12 +4013,12 @@ var MailServerSchema = z56.object({
4029
4013
  deletedAt: z56.date().nullable(),
4030
4014
  name: z56.string(),
4031
4015
  smtpHost: z56.string(),
4032
- smtpPort: z56.string(),
4033
- smtpTlsPort: z56.string(),
4016
+ smtpPort: z56.number(),
4017
+ smtpTlsPort: z56.number(),
4034
4018
  useTlsForSmtp: z56.boolean(),
4035
4019
  imapHost: z56.string(),
4036
- imapPort: z56.string(),
4037
- imapTlsPort: z56.string(),
4020
+ imapPort: z56.number(),
4021
+ imapTlsPort: z56.number(),
4038
4022
  useTlsForImap: z56.boolean()
4039
4023
  });
4040
4024
  var MailAccountSchema = z56.object({
@@ -4077,12 +4061,12 @@ var AttachmentSchema = z57.object({
4077
4061
  createdAt: z57.date(),
4078
4062
  updatedAt: z57.date(),
4079
4063
  deletedAt: z57.nullable(z57.date()),
4080
- bucket_name: z57.string(),
4081
- file_name: z57.string(),
4082
- file_key: z57.string(),
4083
- file_size: z57.number(),
4084
- file_url: z57.string(),
4085
- extension_name: z57.string()
4064
+ bucketName: z57.string(),
4065
+ fileName: z57.string(),
4066
+ fileKey: z57.string(),
4067
+ fileSize: z57.number(),
4068
+ fileUrl: z57.string(),
4069
+ extensionName: z57.string()
4086
4070
  })
4087
4071
  });
4088
4072
  var MessageSchema2 = z57.object({
@@ -4136,7 +4120,7 @@ var UserModel = z58.object({
4136
4120
  email: z58.string(),
4137
4121
  address: z58.string().nullable(),
4138
4122
  phone: z58.string().nullable(),
4139
- notification_count: z58.number().nullable()
4123
+ notificationCount: z58.number().nullable()
4140
4124
  });
4141
4125
  var ActivityLogModel = z58.object({
4142
4126
  id: z58.string(),
@@ -4148,7 +4132,9 @@ var ActivityLogModel = z58.object({
4148
4132
  roomId: z58.string(),
4149
4133
  actor: UserModel
4150
4134
  });
4151
- var MessagesAndLogs = z58.array(z58.union([MessageSchema2, ActivityLogModel]));
4135
+ var MessagesAndLogsSchema = z58.array(
4136
+ z58.union([MessageSchema2, ActivityLogModel])
4137
+ );
4152
4138
  var MailRoomSchema = z58.object({
4153
4139
  id: z58.string(),
4154
4140
  createdAt: z58.date(),
@@ -4171,7 +4157,7 @@ var MailRoomSchema = z58.object({
4171
4157
  tags: z58.array(TagSchema2),
4172
4158
  assignee: UserModel,
4173
4159
  messages: z58.array(MessageSchema2),
4174
- messagesAndLogs: MessagesAndLogs,
4160
+ messagesAndLogs: MessagesAndLogsSchema,
4175
4161
  mail: MailAccountSchema,
4176
4162
  unReadMessageCount: z58.number()
4177
4163
  });
@@ -4185,6 +4171,54 @@ var AttachmentSchema2 = z58.object({
4185
4171
  upload: UploadSchema
4186
4172
  });
4187
4173
 
4174
+ // src/mail/schemas/room-validation.schema.ts
4175
+ import z59 from "zod";
4176
+ var RoomContractsValidationSchema = {
4177
+ getAll: {
4178
+ input: z59.object({
4179
+ page: z59.coerce.number().default(1),
4180
+ pageSize: z59.coerce.number().default(10),
4181
+ keyword: z59.string().optional(),
4182
+ level1: z59.union([
4183
+ z59.literal("open"),
4184
+ z59.literal("close"),
4185
+ z59.literal("inbox"),
4186
+ z59.literal("sent"),
4187
+ z59.literal("scheduled"),
4188
+ z59.literal("starred")
4189
+ ]).optional(),
4190
+ level2: z59.union([
4191
+ z59.literal("all"),
4192
+ z59.literal("unassign"),
4193
+ z59.literal("mine"),
4194
+ z59.literal("other")
4195
+ ]).optional()
4196
+ }),
4197
+ output: z59.object({
4198
+ data: z59.array(MailRoomSchema),
4199
+ total: z59.number(),
4200
+ page: z59.number(),
4201
+ pageSize: z59.number()
4202
+ })
4203
+ },
4204
+ update: {
4205
+ input: z59.object({
4206
+ resolved: z59.boolean().or(
4207
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4208
+ ).optional().nullable(),
4209
+ assigneeId: z59.string().uuid().optional().nullable(),
4210
+ note: z59.string().optional(),
4211
+ tags: z59.array(z59.string().uuid()).optional(),
4212
+ handover: z59.boolean().or(
4213
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4214
+ ).optional().nullable(),
4215
+ selfAssign: z59.boolean().or(
4216
+ z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4217
+ ).optional().nullable()
4218
+ })
4219
+ }
4220
+ };
4221
+
4188
4222
  // src/mail/room-contract.ts
4189
4223
  var roomContract = initContract18().router(
4190
4224
  {
@@ -4193,7 +4227,7 @@ var roomContract = initContract18().router(
4193
4227
  path: "/",
4194
4228
  responses: {
4195
4229
  200: DefaultSuccessResponseSchema.extend({
4196
- message: z59.string()
4230
+ message: z60.string()
4197
4231
  }),
4198
4232
  ...DefaultResponses
4199
4233
  },
@@ -4203,19 +4237,13 @@ var roomContract = initContract18().router(
4203
4237
  getAll: {
4204
4238
  method: "GET",
4205
4239
  path: "",
4206
- query: z59.object({
4207
- page: z59.coerce.number().default(1),
4208
- pageSize: z59.coerce.number().default(10),
4209
- keyword: z59.string().optional(),
4210
- assigneeId: z59.string().uuid().optional().nullable(),
4211
- resolved: z59.boolean().or(z59.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
4212
- }),
4240
+ query: RoomContractsValidationSchema.getAll.input,
4213
4241
  responses: {
4214
4242
  200: DefaultSuccessResponseSchema.extend({
4215
- data: z59.array(MailRoomSchema),
4216
- total: z59.number(),
4217
- page: z59.number(),
4218
- pageSize: z59.number()
4243
+ data: z60.array(MailRoomSchema),
4244
+ total: z60.number(),
4245
+ page: z60.number(),
4246
+ pageSize: z60.number()
4219
4247
  }),
4220
4248
  ...DefaultResponses
4221
4249
  },
@@ -4224,8 +4252,8 @@ var roomContract = initContract18().router(
4224
4252
  getById: {
4225
4253
  method: "GET",
4226
4254
  path: "/:id",
4227
- pathParams: z59.object({
4228
- id: z59.string().uuid()
4255
+ pathParams: z60.object({
4256
+ id: z60.string().uuid()
4229
4257
  }),
4230
4258
  responses: {
4231
4259
  200: DefaultSuccessResponseSchema.extend({
@@ -4238,12 +4266,12 @@ var roomContract = initContract18().router(
4238
4266
  getAttachments: {
4239
4267
  method: "GET",
4240
4268
  path: "/:id/attachments",
4241
- pathParams: z59.object({
4242
- id: z59.string().uuid()
4269
+ pathParams: z60.object({
4270
+ id: z60.string().uuid()
4243
4271
  }),
4244
4272
  responses: {
4245
4273
  200: DefaultSuccessResponseSchema.extend({
4246
- data: z59.array(AttachmentSchema2)
4274
+ data: z60.array(AttachmentSchema2)
4247
4275
  }),
4248
4276
  ...DefaultResponses
4249
4277
  },
@@ -4252,12 +4280,12 @@ var roomContract = initContract18().router(
4252
4280
  getParticipants: {
4253
4281
  method: "GET",
4254
4282
  path: "/:id/participants",
4255
- pathParams: z59.object({
4256
- id: z59.string().uuid()
4283
+ pathParams: z60.object({
4284
+ id: z60.string().uuid()
4257
4285
  }),
4258
4286
  responses: {
4259
4287
  200: DefaultSuccessResponseSchema.extend({
4260
- data: z59.array(MailUserSchema)
4288
+ data: z60.array(MailUserSchema)
4261
4289
  }),
4262
4290
  ...DefaultResponses
4263
4291
  },
@@ -4266,8 +4294,8 @@ var roomContract = initContract18().router(
4266
4294
  update: {
4267
4295
  method: "PATCH",
4268
4296
  path: "/:id",
4269
- pathParams: z59.object({
4270
- id: z59.string()
4297
+ pathParams: z60.object({
4298
+ id: z60.string()
4271
4299
  }),
4272
4300
  responses: {
4273
4301
  200: DefaultSuccessResponseSchema.extend({
@@ -4275,28 +4303,18 @@ var roomContract = initContract18().router(
4275
4303
  }),
4276
4304
  ...DefaultResponses
4277
4305
  },
4278
- body: z59.object({
4279
- resolved: z59.boolean().or(
4280
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4281
- ).optional().nullable(),
4282
- assigneeId: z59.string().uuid().optional().nullable(),
4283
- note: z59.string().optional(),
4284
- tags: z59.array(z59.string().uuid()).optional(),
4285
- handover: z59.boolean().or(
4286
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4287
- ).optional().nullable()
4288
- }),
4306
+ body: RoomContractsValidationSchema.update.input,
4289
4307
  summary: "Update a mail room by id"
4290
4308
  },
4291
4309
  markAsRead: {
4292
4310
  method: "GET",
4293
4311
  path: "/:id",
4294
- pathParams: z59.object({
4295
- id: z59.string().uuid()
4312
+ pathParams: z60.object({
4313
+ id: z60.string().uuid()
4296
4314
  }),
4297
4315
  responses: {
4298
4316
  200: DefaultSuccessResponseSchema.extend({
4299
- message: z59.string()
4317
+ message: z60.string()
4300
4318
  }),
4301
4319
  ...DefaultResponses
4302
4320
  },
@@ -4310,47 +4328,47 @@ var roomContract = initContract18().router(
4310
4328
 
4311
4329
  // src/mail/account-contract.ts
4312
4330
  import { initContract as initContract19 } from "@ts-rest/core";
4313
- import z61 from "zod";
4331
+ import z62 from "zod";
4314
4332
 
4315
4333
  // src/mail/schemas/account-validation.schema.ts
4316
- import z60 from "zod";
4334
+ import z61 from "zod";
4317
4335
  var AccountContractsValidationSchemas = {
4318
4336
  create: {
4319
- input: z60.object({
4320
- address: z60.string().email("Email address must be valid email."),
4321
- name: z60.string().min(1, "Account name cannot be empty."),
4322
- password: z60.string().min(1, "Password cannot be empty."),
4323
- mailServerId: z60.string().uuid("Invalid mail_server_id")
4337
+ input: z61.object({
4338
+ address: z61.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
4339
+ name: z61.string().min(1, "Account name cannot be empty."),
4340
+ password: z61.string().min(1, "Password cannot be empty."),
4341
+ mailServerId: z61.string().uuid("Invalid mail_server_id")
4324
4342
  })
4325
4343
  },
4326
4344
  getById: {
4327
- input: z60.object({
4328
- id: z60.string().uuid()
4345
+ input: z61.object({
4346
+ id: z61.string().uuid()
4329
4347
  }),
4330
4348
  output: MailAccountSchema
4331
4349
  },
4332
4350
  getAll: {
4333
- output: z60.array(MailAccountSchema)
4351
+ output: z61.array(MailAccountSchema)
4334
4352
  },
4335
4353
  update: {
4336
4354
  input: MailAccountSchema,
4337
4355
  output: MailAccountSchema
4338
4356
  },
4339
4357
  disconnect: {
4340
- input: z60.object({
4341
- id: z60.string().uuid()
4358
+ input: z61.object({
4359
+ id: z61.string().uuid()
4342
4360
  }),
4343
4361
  output: MailAccountSchema
4344
4362
  },
4345
4363
  reconnect: {
4346
- input: z60.object({
4347
- id: z60.string()
4364
+ input: z61.object({
4365
+ id: z61.string()
4348
4366
  }),
4349
4367
  output: MailAccountSchema
4350
4368
  },
4351
4369
  delete: {
4352
- input: z60.object({
4353
- id: z60.string()
4370
+ input: z61.object({
4371
+ id: z61.string()
4354
4372
  }),
4355
4373
  output: MailAccountSchema
4356
4374
  }
@@ -4366,16 +4384,16 @@ var accountContract = initContract19().router(
4366
4384
  responses: {
4367
4385
  201: DefaultSuccessResponseSchema.extend({
4368
4386
  // data: AccountContractsValidationSchemas.create.output,
4369
- message: z61.string()
4387
+ message: z62.string()
4370
4388
  }),
4371
- 400: z61.object({
4372
- message: z61.string()
4389
+ 400: z62.object({
4390
+ message: z62.string()
4373
4391
  }),
4374
- 409: z61.object({
4375
- message: z61.string()
4392
+ 409: z62.object({
4393
+ message: z62.string()
4376
4394
  }),
4377
- 500: z61.object({
4378
- message: z61.string()
4395
+ 500: z62.object({
4396
+ message: z62.string()
4379
4397
  }),
4380
4398
  ...DefaultResponses
4381
4399
  },
@@ -4404,20 +4422,19 @@ var accountContract = initContract19().router(
4404
4422
  path: "",
4405
4423
  responses: {
4406
4424
  200: DefaultSuccessResponseSchema.extend({
4407
- data: z61.any()
4408
- // data: AccountContractsValidationSchemas.getAll.output,
4425
+ data: z62.array(MailAccountSchema)
4409
4426
  }),
4410
4427
  ...DefaultResponses
4411
4428
  },
4412
- summary: "Get al accounts"
4429
+ summary: "Get all accounts"
4413
4430
  },
4414
4431
  //#endregion get all accounts
4415
4432
  //#region ........update account
4416
4433
  update: {
4417
4434
  method: "PATCH",
4418
4435
  path: "/:id",
4419
- pathParams: z61.object({
4420
- id: z61.string().uuid()
4436
+ pathParams: z62.object({
4437
+ id: z62.string().uuid()
4421
4438
  }),
4422
4439
  responses: {
4423
4440
  201: DefaultSuccessResponseSchema.extend({
@@ -4466,7 +4483,7 @@ var accountContract = initContract19().router(
4466
4483
  pathParams: AccountContractsValidationSchemas.delete.input,
4467
4484
  responses: {
4468
4485
  200: DefaultSuccessResponseSchema.extend({
4469
- message: z61.string()
4486
+ message: z62.string()
4470
4487
  }),
4471
4488
  ...DefaultResponses
4472
4489
  },
@@ -4483,64 +4500,91 @@ var accountContract = initContract19().router(
4483
4500
 
4484
4501
  // src/mail/mail-server-contract.ts
4485
4502
  import { initContract as initContract20 } from "@ts-rest/core";
4486
- import z62 from "zod";
4503
+ import z64 from "zod";
4504
+
4505
+ // src/mail/schemas/servers-validation.schema.ts
4506
+ import z63 from "zod";
4507
+ var CreateMailServerSchema = z63.object({
4508
+ name: z63.string(),
4509
+ smtpHost: z63.string(),
4510
+ smtpPort: z63.number(),
4511
+ smtpTlsPort: z63.number(),
4512
+ useTlsForSmtp: z63.boolean(),
4513
+ imapHost: z63.string(),
4514
+ imapPort: z63.number(),
4515
+ imapTlsPort: z63.number(),
4516
+ useTlsForImap: z63.boolean()
4517
+ });
4518
+
4519
+ // src/mail/mail-server-contract.ts
4487
4520
  var serverContract = initContract20().router(
4488
4521
  {
4489
4522
  create: {
4490
4523
  method: "POST",
4491
4524
  path: "/",
4492
4525
  responses: {
4493
- 200: DefaultSuccessResponseSchema.extend({
4494
- message: z62.string()
4526
+ 201: DefaultSuccessResponseSchema.extend({
4527
+ data: MailServerSchema
4495
4528
  }),
4496
4529
  ...DefaultResponses
4497
4530
  },
4498
- body: null,
4531
+ body: CreateMailServerSchema,
4499
4532
  summary: "Register a new mail server"
4500
4533
  },
4501
- get: {
4534
+ getById: {
4502
4535
  method: "GET",
4503
4536
  path: "/:id",
4504
- pathParams: z62.object({
4505
- id: z62.string()
4537
+ pathParams: z64.object({
4538
+ id: z64.string().uuid()
4506
4539
  }),
4507
4540
  responses: {
4508
4541
  200: DefaultSuccessResponseSchema.extend({
4509
- message: z62.string()
4542
+ data: MailServerSchema
4510
4543
  }),
4511
4544
  ...DefaultResponses
4512
4545
  },
4513
4546
  summary: "Get a mail server by id"
4514
4547
  },
4548
+ getAll: {
4549
+ method: "GET",
4550
+ path: "/",
4551
+ responses: {
4552
+ 200: DefaultSuccessResponseSchema.extend({
4553
+ data: z64.array(MailServerSchema)
4554
+ }),
4555
+ ...DefaultResponses
4556
+ },
4557
+ summary: "Get all mail servers"
4558
+ },
4515
4559
  update: {
4516
4560
  method: "PATCH",
4517
4561
  path: "/:id",
4518
- pathParams: z62.object({
4519
- id: z62.string()
4562
+ pathParams: z64.object({
4563
+ id: z64.string().uuid()
4520
4564
  }),
4521
4565
  responses: {
4522
4566
  200: DefaultSuccessResponseSchema.extend({
4523
- message: z62.string()
4567
+ data: MailServerSchema
4524
4568
  }),
4525
4569
  ...DefaultResponses
4526
4570
  },
4527
- body: null,
4528
- summary: "Update a mail server by id"
4571
+ body: CreateMailServerSchema.partial(),
4572
+ summary: "Update a mail server"
4529
4573
  },
4530
4574
  delete: {
4531
- method: "PATCH",
4575
+ method: "DELETE",
4532
4576
  path: "/:id",
4533
- pathParams: z62.object({
4534
- id: z62.string()
4577
+ pathParams: z64.object({
4578
+ id: z64.string().uuid()
4535
4579
  }),
4536
4580
  responses: {
4537
4581
  200: DefaultSuccessResponseSchema.extend({
4538
- message: z62.string()
4582
+ data: MailServerSchema
4539
4583
  }),
4540
4584
  ...DefaultResponses
4541
4585
  },
4542
4586
  body: null,
4543
- summary: "Delete a mail server by id"
4587
+ summary: "Delete a mail server"
4544
4588
  }
4545
4589
  },
4546
4590
  {
@@ -4550,44 +4594,44 @@ var serverContract = initContract20().router(
4550
4594
 
4551
4595
  // src/mail/message-contract.ts
4552
4596
  import { initContract as initContract21 } from "@ts-rest/core";
4553
- import z64 from "zod";
4597
+ import z66 from "zod";
4554
4598
 
4555
4599
  // src/mail/schemas/message-validation.schema.ts
4556
- import z63 from "zod";
4557
- var MailParticipant = z63.object({
4558
- name: z63.string().optional(),
4559
- address: z63.string().email()
4600
+ import z65 from "zod";
4601
+ var MailParticipant = z65.object({
4602
+ name: z65.string().optional(),
4603
+ address: z65.string().email()
4560
4604
  });
4561
4605
  var MessageContractsValidationsSchema = {
4562
4606
  submit: {
4563
- input: z63.object({
4564
- subject: z63.string(),
4565
- text: z63.string(),
4566
- html: z63.string(),
4607
+ input: z65.object({
4608
+ subject: z65.string(),
4609
+ text: z65.string(),
4610
+ html: z65.string(),
4567
4611
  from: MailParticipant,
4568
- to: z63.array(MailParticipant),
4569
- cc: z63.array(MailParticipant).optional(),
4570
- bcc: z63.array(MailParticipant).optional(),
4571
- reference: z63.object({
4572
- messageId: z63.string(),
4573
- action: z63.union([z63.literal("reply"), z63.literal("forward")])
4612
+ to: z65.array(MailParticipant),
4613
+ cc: z65.array(MailParticipant).optional(),
4614
+ bcc: z65.array(MailParticipant).optional(),
4615
+ reference: z65.object({
4616
+ messageId: z65.string(),
4617
+ action: z65.union([z65.literal("reply"), z65.literal("forward")])
4574
4618
  }).optional(),
4575
- attachments: z63.array(
4576
- z63.object({
4577
- fileType: z63.string(),
4578
- fileName: z63.string(),
4579
- fileKey: z63.string(),
4580
- fileSize: z63.number(),
4581
- bucketName: z63.string(),
4582
- presignedUrl: z63.string()
4619
+ attachments: z65.array(
4620
+ z65.object({
4621
+ fileType: z65.string(),
4622
+ fileName: z65.string(),
4623
+ fileKey: z65.string(),
4624
+ fileSize: z65.number(),
4625
+ bucketName: z65.string(),
4626
+ presignedUrl: z65.string()
4583
4627
  })
4584
4628
  ).optional()
4585
4629
  }),
4586
- output: z63.object({
4587
- response: z63.string(),
4588
- messageId: z63.string(),
4589
- sendAt: z63.string(),
4590
- queueId: z63.string()
4630
+ output: z65.object({
4631
+ response: z65.string(),
4632
+ messageId: z65.string(),
4633
+ sendAt: z65.string(),
4634
+ queueId: z65.string()
4591
4635
  })
4592
4636
  }
4593
4637
  };
@@ -4612,8 +4656,8 @@ var messageContract = initContract21().router(
4612
4656
  getById: {
4613
4657
  method: "GET",
4614
4658
  path: "/:id",
4615
- pathParams: z64.object({
4616
- id: z64.string()
4659
+ pathParams: z66.object({
4660
+ id: z66.string()
4617
4661
  }),
4618
4662
  responses: {
4619
4663
  200: DefaultSuccessResponseSchema.extend({
@@ -4640,7 +4684,7 @@ var mailContract = initContract22().router({
4640
4684
 
4641
4685
  // src/messenger/index.ts
4642
4686
  import { initContract as initContract23 } from "@ts-rest/core";
4643
- import z65 from "zod";
4687
+ import z67 from "zod";
4644
4688
  var messengerContract = initContract23().router({
4645
4689
  sendMessage: {
4646
4690
  method: "POST",
@@ -4648,6 +4692,7 @@ var messengerContract = initContract23().router({
4648
4692
  body: SendMessageToPlatformSchema,
4649
4693
  responses: {
4650
4694
  200: SendMessageResponseSchema,
4695
+ 400: DefaultErrorResponseSchema,
4651
4696
  500: DefaultErrorResponseSchema
4652
4697
  }
4653
4698
  },
@@ -4674,8 +4719,8 @@ var messengerContract = initContract23().router({
4674
4719
  reconnect: {
4675
4720
  method: "POST",
4676
4721
  path: "/reconnect/:channelId",
4677
- pathParams: z65.object({
4678
- channelId: z65.string().uuid()
4722
+ pathParams: z67.object({
4723
+ channelId: z67.string().uuid()
4679
4724
  }),
4680
4725
  body: null,
4681
4726
  responses: {
@@ -4687,8 +4732,8 @@ var messengerContract = initContract23().router({
4687
4732
  delete: {
4688
4733
  method: "DELETE",
4689
4734
  path: "/delete/:channelId",
4690
- pathParams: z65.object({
4691
- channelId: z65.string().uuid()
4735
+ pathParams: z67.object({
4736
+ channelId: z67.string().uuid()
4692
4737
  }),
4693
4738
  body: null,
4694
4739
  responses: {
@@ -4720,7 +4765,7 @@ var messengerContract = initContract23().router({
4720
4765
 
4721
4766
  // src/permission/index.ts
4722
4767
  import { initContract as initContract24 } from "@ts-rest/core";
4723
- import z66 from "zod";
4768
+ import z68 from "zod";
4724
4769
  var permissionContract = initContract24().router(
4725
4770
  {
4726
4771
  getPermissions: {
@@ -4728,9 +4773,9 @@ var permissionContract = initContract24().router(
4728
4773
  path: "",
4729
4774
  headers: DefaultHeaderSchema,
4730
4775
  responses: {
4731
- 200: z66.object({ permissions: PermissionSchema.array() }),
4732
- 400: z66.object({
4733
- message: z66.string()
4776
+ 200: z68.object({ permissions: PermissionSchema.array() }),
4777
+ 400: z68.object({
4778
+ message: z68.string()
4734
4779
  }),
4735
4780
  401: DefaultUnauthorizedSchema,
4736
4781
  500: DefaultErrorResponseSchema
@@ -4743,15 +4788,15 @@ var permissionContract = initContract24().router(
4743
4788
 
4744
4789
  // src/role/index.ts
4745
4790
  import { initContract as initContract25 } from "@ts-rest/core";
4746
- import z68 from "zod";
4791
+ import z70 from "zod";
4747
4792
 
4748
4793
  // src/role/validation.ts
4749
- import { z as z67 } from "zod";
4750
- var CreateRoleSchema = z67.object({
4751
- systemName: z67.string(),
4752
- displayName: z67.string(),
4753
- description: z67.string().nullable(),
4754
- permissions: z67.array(z67.string())
4794
+ import { z as z69 } from "zod";
4795
+ var CreateRoleSchema = z69.object({
4796
+ systemName: z69.string(),
4797
+ displayName: z69.string(),
4798
+ description: z69.string().nullable(),
4799
+ permissions: z69.array(z69.string())
4755
4800
  });
4756
4801
  var UpdateRoleSchema = CreateRoleSchema;
4757
4802
 
@@ -4767,8 +4812,8 @@ var roleContract = initContract25().router(
4767
4812
  201: DefaultSuccessResponseSchema.extend({
4768
4813
  role: RoleSchema
4769
4814
  }),
4770
- 400: z68.object({
4771
- message: z68.string()
4815
+ 400: z70.object({
4816
+ message: z70.string()
4772
4817
  }),
4773
4818
  401: DefaultUnauthorizedSchema,
4774
4819
  500: DefaultErrorResponseSchema
@@ -4778,15 +4823,15 @@ var roleContract = initContract25().router(
4778
4823
  getRoles: {
4779
4824
  method: "GET",
4780
4825
  path: "",
4781
- query: z68.object({
4782
- page: z68.coerce.number().default(1),
4783
- pageSize: z68.coerce.number().default(10)
4826
+ query: z70.object({
4827
+ page: z70.coerce.number().default(1),
4828
+ pageSize: z70.coerce.number().default(10)
4784
4829
  }).optional(),
4785
4830
  headers: DefaultHeaderSchema,
4786
4831
  responses: {
4787
4832
  200: WithPagination(RoleSchema),
4788
- 400: z68.object({
4789
- message: z68.string()
4833
+ 400: z70.object({
4834
+ message: z70.string()
4790
4835
  }),
4791
4836
  401: DefaultUnauthorizedSchema,
4792
4837
  500: DefaultErrorResponseSchema
@@ -4796,15 +4841,15 @@ var roleContract = initContract25().router(
4796
4841
  updateRole: {
4797
4842
  method: "PATCH",
4798
4843
  path: "/:id",
4799
- pathParams: z68.object({ id: z68.string() }),
4844
+ pathParams: z70.object({ id: z70.string() }),
4800
4845
  headers: DefaultHeaderSchema,
4801
4846
  body: UpdateRoleSchema,
4802
4847
  responses: {
4803
4848
  201: DefaultSuccessResponseSchema.extend({
4804
4849
  role: RoleSchema
4805
4850
  }),
4806
- 400: z68.object({
4807
- message: z68.string()
4851
+ 400: z70.object({
4852
+ message: z70.string()
4808
4853
  }),
4809
4854
  401: DefaultUnauthorizedSchema,
4810
4855
  500: DefaultErrorResponseSchema
@@ -4814,11 +4859,11 @@ var roleContract = initContract25().router(
4814
4859
  deleteRole: {
4815
4860
  method: "DELETE",
4816
4861
  path: "/:id",
4817
- pathParams: z68.object({ id: z68.string() }),
4862
+ pathParams: z70.object({ id: z70.string() }),
4818
4863
  headers: DefaultHeaderSchema,
4819
4864
  body: null,
4820
4865
  responses: {
4821
- 200: DefaultSuccessResponseSchema.extend({ message: z68.string() }),
4866
+ 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4822
4867
  500: DefaultErrorResponseSchema
4823
4868
  },
4824
4869
  summary: "Delete a role."
@@ -4829,19 +4874,19 @@ var roleContract = initContract25().router(
4829
4874
 
4830
4875
  // src/tag/index.ts
4831
4876
  import { initContract as initContract26 } from "@ts-rest/core";
4832
- import z70 from "zod";
4877
+ import z72 from "zod";
4833
4878
 
4834
4879
  // src/tag/validation.ts
4835
- import { z as z69 } from "zod";
4836
- var CreateTagSchema = z69.object({
4837
- name: z69.string(),
4880
+ import { z as z71 } from "zod";
4881
+ var CreateTagSchema = z71.object({
4882
+ name: z71.string(),
4838
4883
  group: TagGroupSchema
4839
4884
  });
4840
- var GetTagsSchema = z69.object({
4885
+ var GetTagsSchema = z71.object({
4841
4886
  group: TagGroupSchema.default("general"),
4842
- keyword: z69.string()
4887
+ keyword: z71.string()
4843
4888
  }).partial().optional();
4844
- var UpdateTagSchema = z69.object({ name: z69.string() });
4889
+ var UpdateTagSchema = z71.object({ name: z71.string() });
4845
4890
 
4846
4891
  // src/tag/index.ts
4847
4892
  var tagContract = initContract26().router(
@@ -4864,7 +4909,7 @@ var tagContract = initContract26().router(
4864
4909
  query: GetTagsSchema,
4865
4910
  responses: {
4866
4911
  200: DefaultSuccessResponseSchema.extend({
4867
- tags: z70.array(TagSchema)
4912
+ tags: z72.array(TagSchema)
4868
4913
  }),
4869
4914
  500: DefaultErrorResponseSchema
4870
4915
  },
@@ -4873,7 +4918,7 @@ var tagContract = initContract26().router(
4873
4918
  updateTag: {
4874
4919
  method: "PATCH",
4875
4920
  path: "/:id",
4876
- pathParams: z70.object({ id: z70.string() }),
4921
+ pathParams: z72.object({ id: z72.string() }),
4877
4922
  body: UpdateTagSchema,
4878
4923
  responses: {
4879
4924
  200: DefaultSuccessResponseSchema.extend({
@@ -4886,11 +4931,11 @@ var tagContract = initContract26().router(
4886
4931
  deleteTag: {
4887
4932
  method: "DELETE",
4888
4933
  path: "/:id",
4889
- pathParams: z70.object({ id: z70.string() }),
4890
- body: z70.any().optional(),
4934
+ pathParams: z72.object({ id: z72.string() }),
4935
+ body: z72.any().optional(),
4891
4936
  // We don't need the body.
4892
4937
  responses: {
4893
- 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4938
+ 200: DefaultSuccessResponseSchema.extend({ message: z72.string() }),
4894
4939
  500: DefaultErrorResponseSchema
4895
4940
  },
4896
4941
  headers: DefaultHeaderSchema
@@ -4903,27 +4948,27 @@ var tagContract = initContract26().router(
4903
4948
 
4904
4949
  // src/telephony-agent-presence-status/index.ts
4905
4950
  import { initContract as initContract27 } from "@ts-rest/core";
4906
- import z73 from "zod";
4951
+ import z75 from "zod";
4907
4952
 
4908
4953
  // src/telephony-agent-presence-status/schema.ts
4909
- import z71 from "zod";
4954
+ import z73 from "zod";
4910
4955
  var PresenceStatusSchema = DefaultEntitySchema.extend({
4911
- status: z71.string(),
4912
- description: z71.string()
4956
+ status: z73.string(),
4957
+ description: z73.string()
4913
4958
  });
4914
4959
  var UserPresenceStatusSchema = DefaultEntitySchema.extend({
4915
4960
  user: UserSchema,
4916
4961
  presenceStatus: PresenceStatusSchema,
4917
- customPresenceStatus: z71.string().nullable().optional()
4962
+ customPresenceStatus: z73.string().nullable().optional()
4918
4963
  });
4919
4964
 
4920
4965
  // src/telephony-agent-presence-status/validation.ts
4921
- import { z as z72 } from "zod";
4922
- var UpdateUserStatusSchema = z72.object({
4923
- userId: z72.string(),
4924
- presenceStatusId: z72.string().nullable().optional(),
4925
- customPreseneStatus: z72.string().nullable().optional(),
4926
- reason: z72.string()
4966
+ import { z as z74 } from "zod";
4967
+ var UpdateUserStatusSchema = z74.object({
4968
+ userId: z74.string(),
4969
+ presenceStatusId: z74.string().nullable().optional(),
4970
+ customPreseneStatus: z74.string().nullable().optional(),
4971
+ reason: z74.string()
4927
4972
  });
4928
4973
 
4929
4974
  // src/telephony-agent-presence-status/index.ts
@@ -4934,9 +4979,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4934
4979
  path: "/presence_status",
4935
4980
  headers: DefaultHeaderSchema,
4936
4981
  responses: {
4937
- 200: z73.array(PresenceStatusSchema),
4938
- 400: z73.object({
4939
- message: z73.string()
4982
+ 200: z75.array(PresenceStatusSchema),
4983
+ 400: z75.object({
4984
+ message: z75.string()
4940
4985
  }),
4941
4986
  401: DefaultUnauthorizedSchema,
4942
4987
  500: DefaultErrorResponseSchema
@@ -4948,9 +4993,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4948
4993
  path: "/agents/presence_status",
4949
4994
  headers: DefaultHeaderSchema,
4950
4995
  responses: {
4951
- 200: z73.array(UserPresenceStatusSchema),
4952
- 400: z73.object({
4953
- message: z73.string()
4996
+ 200: z75.array(UserPresenceStatusSchema),
4997
+ 400: z75.object({
4998
+ message: z75.string()
4954
4999
  }),
4955
5000
  401: DefaultUnauthorizedSchema,
4956
5001
  500: DefaultErrorResponseSchema
@@ -4960,12 +5005,12 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4960
5005
  getAgentStatus: {
4961
5006
  method: "GET",
4962
5007
  path: "/presence_status/check_update/:userId",
4963
- pathParams: z73.object({ userId: z73.string() }),
5008
+ pathParams: z75.object({ userId: z75.string() }),
4964
5009
  headers: DefaultHeaderSchema,
4965
5010
  responses: {
4966
5011
  200: UserPresenceStatusSchema,
4967
- 400: z73.object({
4968
- message: z73.string()
5012
+ 400: z75.object({
5013
+ message: z75.string()
4969
5014
  }),
4970
5015
  401: DefaultUnauthorizedSchema,
4971
5016
  500: DefaultErrorResponseSchema
@@ -4981,8 +5026,8 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4981
5026
  200: DefaultSuccessResponseSchema.extend({
4982
5027
  userPresenceStatu: UserPresenceStatusSchema
4983
5028
  }),
4984
- 400: z73.object({
4985
- message: z73.string()
5029
+ 400: z75.object({
5030
+ message: z75.string()
4986
5031
  }),
4987
5032
  401: DefaultUnauthorizedSchema,
4988
5033
  500: DefaultErrorResponseSchema
@@ -4994,62 +5039,63 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4994
5039
  );
4995
5040
 
4996
5041
  // src/telephony-cdr/index.ts
4997
- import z76 from "zod";
5042
+ import z78 from "zod";
4998
5043
 
4999
5044
  // src/telephony-cdr/validation.ts
5000
- import z74 from "zod";
5001
- var CreateTelephonyCdrSchema = z74.object({
5002
- uniqueCallId: z74.string({ required_error: "uniqueCallId is required" }),
5003
- timeStart: z74.string({ required_error: "timeStart is required" }),
5004
- callFrom: z74.string({ required_error: "callFrom is required" }),
5005
- callTo: z74.string({ required_error: "callTo is required" }),
5006
- callDuration: z74.number().nullable(),
5007
- talkDuration: z74.number().nullable(),
5008
- srcTrunkName: z74.string().nullable(),
5009
- dstTrunkName: z74.string().nullable(),
5010
- pinCode: z74.string().nullable(),
5011
- status: z74.string(),
5012
- type: z74.string(),
5013
- recording: z74.string().nullable(),
5014
- didNumber: z74.string().nullable(),
5015
- agentRingTime: z74.number().nullable()
5045
+ import z76 from "zod";
5046
+ var CreateTelephonyCdrSchema = z76.object({
5047
+ uniqueCallId: z76.string({ required_error: "uniqueCallId is required" }),
5048
+ timeStart: z76.string({ required_error: "timeStart is required" }),
5049
+ callFrom: z76.string({ required_error: "callFrom is required" }),
5050
+ callTo: z76.string({ required_error: "callTo is required" }),
5051
+ callDuration: z76.number().nullable(),
5052
+ talkDuration: z76.number().nullable(),
5053
+ srcTrunkName: z76.string().nullable(),
5054
+ dstTrunkName: z76.string().nullable(),
5055
+ pinCode: z76.string().nullable(),
5056
+ status: z76.string(),
5057
+ type: z76.string(),
5058
+ recording: z76.string().nullable(),
5059
+ didNumber: z76.string().nullable(),
5060
+ agentRingTime: z76.number().nullable()
5016
5061
  });
5017
5062
  var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5018
- selectedDate: z74.string().optional(),
5019
- type: z74.array(z74.string()).optional(),
5020
- status: z74.array(z74.string()).optional(),
5021
- callFrom: z74.string().optional(),
5022
- callTo: z74.string().optional(),
5023
- trunk: z74.array(z74.string()).optional(),
5024
- userId: z74.string().uuid().optional(),
5025
- queueStatus: z74.string().optional(),
5026
- agentIds: z74.array(z74.string().uuid()).optional(),
5027
- agentCallsOnly: z74.coerce.boolean().optional()
5063
+ selectedDate: z76.string().optional(),
5064
+ type: z76.array(z76.string()).optional(),
5065
+ status: z76.array(z76.string()).optional(),
5066
+ callFrom: z76.string().optional(),
5067
+ callTo: z76.string().optional(),
5068
+ trunk: z76.array(z76.string()).optional(),
5069
+ userId: z76.string().uuid().optional(),
5070
+ queueStatus: z76.string().optional(),
5071
+ agentIds: z76.array(z76.string().uuid()).optional(),
5072
+ agentCallsOnly: z76.coerce.boolean().optional(),
5073
+ contactId: z76.string().uuid().optional()
5028
5074
  });
5029
5075
  var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5030
- type: z74.array(z74.string()).optional(),
5031
- status: z74.array(z74.string()).optional(),
5032
- callFrom: z74.string().optional(),
5033
- callTo: z74.string().optional(),
5034
- result: z74.array(z74.string()).optional(),
5035
- callTags: z74.array(z74.string()).optional(),
5036
- selectedDate: z74.string().optional(),
5037
- agentId: z74.string().optional(),
5038
- contact: z74.array(z74.string()).optional(),
5039
- callStatus: z74.array(z74.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5040
- queueIds: z74.array(z74.string()).optional(),
5041
- notes: z74.string().optional()
5076
+ type: z76.array(z76.string()).optional(),
5077
+ status: z76.array(z76.string()).optional(),
5078
+ callFrom: z76.string().optional(),
5079
+ callTo: z76.string().optional(),
5080
+ result: z76.array(z76.string()).optional(),
5081
+ callTags: z76.array(z76.string()).optional(),
5082
+ selectedDate: z76.string().optional(),
5083
+ agentId: z76.string().optional(),
5084
+ contact: z76.array(z76.string()).optional(),
5085
+ callStatus: z76.array(z76.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5086
+ queueIds: z76.array(z76.string()).optional(),
5087
+ notes: z76.string().optional()
5042
5088
  });
5043
5089
  var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
5044
- z74.object({
5045
- page: z74.coerce.number().positive().optional(),
5046
- pageSize: z74.coerce.number().positive().optional()
5090
+ z76.object({
5091
+ page: z76.coerce.number().positive().optional(),
5092
+ pageSize: z76.coerce.number().positive().optional()
5047
5093
  })
5048
5094
  );
5049
5095
  var NullEmptyStringUndefined = ["", null, void 0];
5050
5096
  var EmtptyArrayUndefined = [[], void 0];
5051
5097
  var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5052
- reportType: z74.enum([
5098
+ reportType: z76.enum([
5053
5099
  "extcallstatistics",
5054
5100
  "extcallactivity",
5055
5101
  "trunkactivity",
@@ -5059,52 +5105,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5059
5105
  "queueagentmisscalls",
5060
5106
  "queueagentinoutcalls"
5061
5107
  ]),
5062
- selectedDate: z74.string().optional(),
5063
- communicationType: z74.union([z74.literal("Inbound"), z74.literal("Outbound"), z74.literal("Internal")]).optional(),
5064
- time: z74.string().optional(),
5065
- queueList: z74.array(z74.string()).optional(),
5066
- queueId: z74.string().optional(),
5067
- trunkList: z74.array(z74.string()).optional(),
5068
- extensionList: z74.array(z74.string()).optional()
5108
+ selectedDate: z76.string().optional(),
5109
+ communicationType: z76.union([z76.literal("Inbound"), z76.literal("Outbound"), z76.literal("Internal")]).optional(),
5110
+ time: z76.string().optional(),
5111
+ queueList: z76.array(z76.string()).optional(),
5112
+ queueId: z76.string().optional(),
5113
+ trunkList: z76.array(z76.string()).optional(),
5114
+ extensionList: z76.array(z76.string()).optional()
5069
5115
  }).superRefine((input, ctx) => {
5070
5116
  if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
5071
5117
  ctx.addIssue({
5072
- code: z74.ZodIssueCode.custom,
5118
+ code: z76.ZodIssueCode.custom,
5073
5119
  path: ["selectedDate"],
5074
5120
  message: "selectedDate is required."
5075
5121
  });
5076
5122
  }
5077
5123
  if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
5078
5124
  ctx.addIssue({
5079
- code: z74.ZodIssueCode.custom,
5125
+ code: z76.ZodIssueCode.custom,
5080
5126
  path: ["time"],
5081
5127
  message: "time is required."
5082
5128
  });
5083
5129
  }
5084
5130
  if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
5085
5131
  ctx.addIssue({
5086
- code: z74.ZodIssueCode.custom,
5132
+ code: z76.ZodIssueCode.custom,
5087
5133
  path: ["queueList"],
5088
5134
  message: "queueList is required."
5089
5135
  });
5090
5136
  }
5091
5137
  if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
5092
5138
  ctx.addIssue({
5093
- code: z74.ZodIssueCode.custom,
5139
+ code: z76.ZodIssueCode.custom,
5094
5140
  path: ["queueId"],
5095
5141
  message: "queueId is required."
5096
5142
  });
5097
5143
  }
5098
5144
  if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
5099
5145
  ctx.addIssue({
5100
- code: z74.ZodIssueCode.custom,
5146
+ code: z76.ZodIssueCode.custom,
5101
5147
  path: ["trunkList"],
5102
5148
  message: "trunkList is required."
5103
5149
  });
5104
5150
  }
5105
5151
  if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
5106
5152
  ctx.addIssue({
5107
- code: z74.ZodIssueCode.custom,
5153
+ code: z76.ZodIssueCode.custom,
5108
5154
  path: ["extensionList"],
5109
5155
  message: "extensionList is required."
5110
5156
  });
@@ -5115,161 +5161,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5115
5161
  import { initContract as initContract28 } from "@ts-rest/core";
5116
5162
 
5117
5163
  // src/telephony-cdr/call-report.schema.ts
5118
- import z75 from "zod";
5119
- var ExtCallStatisticsListSchema = z75.object({
5164
+ import z77 from "zod";
5165
+ var ExtCallStatisticsListSchema = z77.object({
5120
5166
  /** @example "ext_num" */
5121
- ext_num: z75.string(),
5167
+ ext_num: z77.string(),
5122
5168
  /** @example "ext_name" */
5123
- ext_name: z75.string(),
5169
+ ext_name: z77.string(),
5124
5170
  /** @example 0 */
5125
- answered_calls: z75.number(),
5171
+ answered_calls: z77.number(),
5126
5172
  /** @example 0 */
5127
- no_answer_calls: z75.number(),
5173
+ no_answer_calls: z77.number(),
5128
5174
  /** @example 0 */
5129
- busy_calls: z75.number(),
5175
+ busy_calls: z77.number(),
5130
5176
  /** @example 0 */
5131
- failed_calls: z75.number(),
5177
+ failed_calls: z77.number(),
5132
5178
  /** @example 0 */
5133
- voicemail_calls: z75.number(),
5179
+ voicemail_calls: z77.number(),
5134
5180
  /** @example 0 */
5135
- total_holding_time: z75.number(),
5181
+ total_holding_time: z77.number(),
5136
5182
  /** @example 0 */
5137
- total_talking_time: z75.number(),
5183
+ total_talking_time: z77.number(),
5138
5184
  /** @example "src_name" */
5139
- src_name: z75.string(),
5185
+ src_name: z77.string(),
5140
5186
  /** @example 0 */
5141
- total_call_count: z75.number(),
5187
+ total_call_count: z77.number(),
5142
5188
  /** @example "mobile" */
5143
- mobile: z75.string()
5144
- });
5145
- var ExtStatisticSchema = z75.object({
5146
- ext_num: z75.string(),
5147
- ext_name: z75.string(),
5148
- answered_calls: z75.number(),
5149
- no_answer_calls: z75.number(),
5150
- busy_calls: z75.number(),
5151
- failed_calls: z75.number(),
5152
- voicemail_calls: z75.number(),
5153
- total_holding_time: z75.number(),
5154
- total_talking_time: z75.number(),
5155
- time: z75.number(),
5156
- mobile: z75.string()
5157
- });
5158
- var ExtCallActivityListSchema = z75.object({
5159
- time: z75.number(),
5160
- answered_calls: z75.number(),
5161
- no_answer_calls: z75.number(),
5162
- busy_calls: z75.number(),
5163
- failed_calls: z75.number(),
5164
- voicemail_calls: z75.number(),
5165
- total_holding_time: z75.number(),
5166
- total_talking_time: z75.number(),
5167
- ext_statistics: z75.array(ExtStatisticSchema)
5168
- });
5169
- var TrunkList = z75.object({
5170
- trunk_name: z75.string(),
5171
- total_calls: z75.number()
5172
- });
5173
- var TrunkActivityListSchema = z75.object({
5174
- time: z75.number(),
5175
- trunk_list: z75.array(TrunkList)
5176
- });
5177
- var QueueAvgWaitTalkTimeListSchema = z75.object({
5178
- time: z75.number(),
5179
- avg_wait_time: z75.number(),
5180
- avg_talk_time: z75.number()
5181
- });
5182
- var SatisfactionListSchema = z75.object({
5183
- press_key: z75.string(),
5184
- total: z75.number(),
5185
- key_point: z75.number().optional()
5186
- });
5187
- var agentListSchema = z75.object({
5188
- agent_name: z75.string(),
5189
- agent_num: z75.string(),
5190
- satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5191
- total_key: z75.number().optional(),
5192
- total_point: z75.number().optional(),
5193
- average_point: z75.number().optional()
5194
- });
5195
- var QueueSatisfactionSchema = z75.object({
5196
- queue_name: z75.string(),
5197
- queue_num: z75.string(),
5198
- satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5199
- agent_list: z75.array(agentListSchema).optional(),
5200
- total_key: z75.number().optional(),
5201
- total_point: z75.number().optional(),
5202
- average_point: z75.number().optional()
5203
- });
5204
- var QueuePerformanceListSchema = z75.object({
5205
- queue: z75.string(),
5206
- total_calls: z75.number(),
5207
- answered_calls: z75.number(),
5208
- missed_calls: z75.number(),
5209
- abandoned_calls: z75.number(),
5210
- average_waiting_time: z75.number(),
5211
- average_talking_time: z75.number(),
5212
- max_waiting_time: z75.number(),
5213
- answered_rate: z75.number(),
5214
- missed_rate: z75.number(),
5215
- abandoned_rate: z75.number(),
5216
- sla: z75.number()
5217
- });
5218
- var QueueAgentMissCallsListSchema = z75.object({
5219
- agent_name: z75.string(),
5220
- agent_num: z75.string(),
5221
- time: z75.string(),
5222
- total_wait_time: z75.number(),
5223
- src_name: z75.string(),
5224
- src_num: z75.string(),
5225
- queue_status: z75.string(),
5226
- polling_attempts: z75.number(),
5227
- missed_reason: z75.string()
5228
- });
5229
- var QueueAgentInOutCallsListSchema = z75.object({
5230
- agent_name: z75.string(),
5231
- agent_num: z75.string(),
5232
- inbound_calls: z75.number(),
5233
- inbound_duration: z75.number(),
5234
- outbound_calls: z75.number(),
5235
- outbound_duration: z75.number(),
5236
- total_calls: z75.number(),
5237
- total_duration: z75.number(),
5238
- average_talk_duration: z75.number()
5239
- });
5240
- var CallReportModel = z75.object({
5241
- errcode: z75.number(),
5242
- errmsg: z75.string(),
5243
- total_number: z75.number(),
5244
- is_12hour: z75.number().optional(),
5245
- ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5246
- ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5247
- trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5248
- queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5189
+ mobile: z77.string()
5190
+ });
5191
+ var ExtStatisticSchema = z77.object({
5192
+ ext_num: z77.string(),
5193
+ ext_name: z77.string(),
5194
+ answered_calls: z77.number(),
5195
+ no_answer_calls: z77.number(),
5196
+ busy_calls: z77.number(),
5197
+ failed_calls: z77.number(),
5198
+ voicemail_calls: z77.number(),
5199
+ total_holding_time: z77.number(),
5200
+ total_talking_time: z77.number(),
5201
+ time: z77.number(),
5202
+ mobile: z77.string()
5203
+ });
5204
+ var ExtCallActivityListSchema = z77.object({
5205
+ time: z77.number(),
5206
+ answered_calls: z77.number(),
5207
+ no_answer_calls: z77.number(),
5208
+ busy_calls: z77.number(),
5209
+ failed_calls: z77.number(),
5210
+ voicemail_calls: z77.number(),
5211
+ total_holding_time: z77.number(),
5212
+ total_talking_time: z77.number(),
5213
+ ext_statistics: z77.array(ExtStatisticSchema)
5214
+ });
5215
+ var TrunkList = z77.object({
5216
+ trunk_name: z77.string(),
5217
+ total_calls: z77.number()
5218
+ });
5219
+ var TrunkActivityListSchema = z77.object({
5220
+ time: z77.number(),
5221
+ trunk_list: z77.array(TrunkList)
5222
+ });
5223
+ var QueueAvgWaitTalkTimeListSchema = z77.object({
5224
+ time: z77.number(),
5225
+ avg_wait_time: z77.number(),
5226
+ avg_talk_time: z77.number()
5227
+ });
5228
+ var SatisfactionListSchema = z77.object({
5229
+ press_key: z77.string(),
5230
+ total: z77.number(),
5231
+ key_point: z77.number().optional()
5232
+ });
5233
+ var agentListSchema = z77.object({
5234
+ agent_name: z77.string(),
5235
+ agent_num: z77.string(),
5236
+ satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5237
+ total_key: z77.number().optional(),
5238
+ total_point: z77.number().optional(),
5239
+ average_point: z77.number().optional()
5240
+ });
5241
+ var QueueSatisfactionSchema = z77.object({
5242
+ queue_name: z77.string(),
5243
+ queue_num: z77.string(),
5244
+ satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5245
+ agent_list: z77.array(agentListSchema).optional(),
5246
+ total_key: z77.number().optional(),
5247
+ total_point: z77.number().optional(),
5248
+ average_point: z77.number().optional()
5249
+ });
5250
+ var QueuePerformanceListSchema = z77.object({
5251
+ queue: z77.string(),
5252
+ total_calls: z77.number(),
5253
+ answered_calls: z77.number(),
5254
+ missed_calls: z77.number(),
5255
+ abandoned_calls: z77.number(),
5256
+ average_waiting_time: z77.number(),
5257
+ average_talking_time: z77.number(),
5258
+ max_waiting_time: z77.number(),
5259
+ answered_rate: z77.number(),
5260
+ missed_rate: z77.number(),
5261
+ abandoned_rate: z77.number(),
5262
+ sla: z77.number()
5263
+ });
5264
+ var QueueAgentMissCallsListSchema = z77.object({
5265
+ agent_name: z77.string(),
5266
+ agent_num: z77.string(),
5267
+ time: z77.string(),
5268
+ total_wait_time: z77.number(),
5269
+ src_name: z77.string(),
5270
+ src_num: z77.string(),
5271
+ queue_status: z77.string(),
5272
+ polling_attempts: z77.number(),
5273
+ missed_reason: z77.string()
5274
+ });
5275
+ var QueueAgentInOutCallsListSchema = z77.object({
5276
+ agent_name: z77.string(),
5277
+ agent_num: z77.string(),
5278
+ inbound_calls: z77.number(),
5279
+ inbound_duration: z77.number(),
5280
+ outbound_calls: z77.number(),
5281
+ outbound_duration: z77.number(),
5282
+ total_calls: z77.number(),
5283
+ total_duration: z77.number(),
5284
+ average_talk_duration: z77.number()
5285
+ });
5286
+ var CallReportModel = z77.object({
5287
+ errcode: z77.number(),
5288
+ errmsg: z77.string(),
5289
+ total_number: z77.number(),
5290
+ is_12hour: z77.number().optional(),
5291
+ ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5292
+ ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5293
+ trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5294
+ queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5249
5295
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5250
- queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5251
- queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5252
- queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5253
- callback_result: z75.string(),
5254
- page: z75.number().optional(),
5255
- pageSize: z75.number().optional()
5256
- });
5257
- var CallReportSchema = z75.object({
5258
- errcode: z75.number(),
5259
- errmsg: z75.string(),
5260
- total_number: z75.number(),
5261
- is_12hour: z75.number().optional(),
5262
- ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5263
- ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5264
- trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5265
- queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5296
+ queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5297
+ queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5298
+ queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5299
+ callback_result: z77.string(),
5300
+ page: z77.number().optional(),
5301
+ pageSize: z77.number().optional()
5302
+ });
5303
+ var CallReportSchema = z77.object({
5304
+ errcode: z77.number(),
5305
+ errmsg: z77.string(),
5306
+ total_number: z77.number(),
5307
+ is_12hour: z77.number().optional(),
5308
+ ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5309
+ ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5310
+ trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5311
+ queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5266
5312
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5267
- queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5268
- queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5269
- queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5270
- callback_result: z75.string(),
5271
- page: z75.number().optional(),
5272
- pageSize: z75.number().optional()
5313
+ queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5314
+ queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5315
+ queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5316
+ callback_result: z77.string(),
5317
+ page: z77.number().optional(),
5318
+ pageSize: z77.number().optional()
5273
5319
  });
5274
5320
 
5275
5321
  // src/telephony-cdr/index.ts
@@ -5282,10 +5328,10 @@ var telephonyCdrContract = initContract28().router(
5282
5328
  query: GetAllTelephonyCdrSchema,
5283
5329
  responses: {
5284
5330
  200: DefaultSuccessResponseSchema.extend({
5285
- total: z76.number(),
5286
- page: z76.number(),
5287
- pageSize: z76.number(),
5288
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5331
+ total: z78.number(),
5332
+ page: z78.number(),
5333
+ pageSize: z78.number(),
5334
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5289
5335
  }),
5290
5336
  401: DefaultUnauthorizedSchema
5291
5337
  },
@@ -5298,10 +5344,10 @@ var telephonyCdrContract = initContract28().router(
5298
5344
  query: GetAllTelephonyCdrSchema,
5299
5345
  responses: {
5300
5346
  200: DefaultSuccessResponseSchema.extend({
5301
- total: z76.number(),
5302
- page: z76.number(),
5303
- pageSize: z76.number(),
5304
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5347
+ total: z78.number(),
5348
+ page: z78.number(),
5349
+ pageSize: z78.number(),
5350
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5305
5351
  }),
5306
5352
  401: DefaultUnauthorizedSchema
5307
5353
  },
@@ -5314,10 +5360,10 @@ var telephonyCdrContract = initContract28().router(
5314
5360
  query: GetRecentTelephonyCdrSchema,
5315
5361
  responses: {
5316
5362
  200: DefaultSuccessResponseSchema.extend({
5317
- total: z76.number(),
5318
- page: z76.number(),
5319
- pageSize: z76.number(),
5320
- telephonyCdrs: z76.array(TelephonyCdrSchema)
5363
+ total: z78.number(),
5364
+ page: z78.number(),
5365
+ pageSize: z78.number(),
5366
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5321
5367
  }),
5322
5368
  401: DefaultUnauthorizedSchema
5323
5369
  },
@@ -5409,35 +5455,35 @@ var telephonyCdrContract = initContract28().router(
5409
5455
 
5410
5456
  // src/telephony-extension/index.ts
5411
5457
  import { initContract as initContract29 } from "@ts-rest/core";
5412
- import z78 from "zod";
5458
+ import z80 from "zod";
5413
5459
 
5414
5460
  // src/telephony-extension/schema.ts
5415
- import z77 from "zod";
5416
- var TelephonyExtensionSchema3 = z77.object({
5417
- errcode: z77.coerce.number(),
5418
- errmsg: z77.string(),
5419
- total_number: z77.coerce.number(),
5420
- data: z77.array(
5421
- z77.object({
5422
- id: z77.coerce.number(),
5423
- online_status: z77.object({
5424
- fx_phone: z77.object({ status: z77.coerce.number() }),
5425
- sip_phone: z77.object({
5426
- status: z77.coerce.number(),
5427
- ext_dev_type: z77.string().optional()
5428
- }),
5429
- linkus_desktop: z77.object({ status: z77.coerce.number() }),
5430
- linkus_mobile: z77.object({ status: z77.coerce.number() }),
5431
- linkus_web: z77.object({
5432
- status: z77.coerce.number(),
5433
- ext_dev_type: z77.string().optional()
5461
+ import z79 from "zod";
5462
+ var TelephonyExtensionSchema3 = z79.object({
5463
+ errcode: z79.coerce.number(),
5464
+ errmsg: z79.string(),
5465
+ total_number: z79.coerce.number(),
5466
+ data: z79.array(
5467
+ z79.object({
5468
+ id: z79.coerce.number(),
5469
+ online_status: z79.object({
5470
+ fx_phone: z79.object({ status: z79.coerce.number() }),
5471
+ sip_phone: z79.object({
5472
+ status: z79.coerce.number(),
5473
+ ext_dev_type: z79.string().optional()
5474
+ }),
5475
+ linkus_desktop: z79.object({ status: z79.coerce.number() }),
5476
+ linkus_mobile: z79.object({ status: z79.coerce.number() }),
5477
+ linkus_web: z79.object({
5478
+ status: z79.coerce.number(),
5479
+ ext_dev_type: z79.string().optional()
5434
5480
  })
5435
5481
  }).optional(),
5436
- presence_status: z77.string().optional(),
5437
- number: z77.string().optional(),
5438
- caller_id_name: z77.string().optional(),
5439
- role_name: z77.string().optional(),
5440
- email_addr: z77.string().optional()
5482
+ presence_status: z79.string().optional(),
5483
+ number: z79.string().optional(),
5484
+ caller_id_name: z79.string().optional(),
5485
+ role_name: z79.string().optional(),
5486
+ email_addr: z79.string().optional()
5441
5487
  })
5442
5488
  )
5443
5489
  });
@@ -5452,8 +5498,8 @@ var telephonyExtensionContract = initContract29().router(
5452
5498
  query: null,
5453
5499
  responses: {
5454
5500
  200: TelephonyExtensionSchema3,
5455
- 400: z78.object({
5456
- message: z78.string()
5501
+ 400: z80.object({
5502
+ message: z80.string()
5457
5503
  }),
5458
5504
  401: DefaultUnauthorizedSchema,
5459
5505
  500: DefaultErrorResponseSchema
@@ -5466,10 +5512,10 @@ var telephonyExtensionContract = initContract29().router(
5466
5512
 
5467
5513
  // src/ticket/index.ts
5468
5514
  import { initContract as initContract30 } from "@ts-rest/core";
5469
- import z80 from "zod";
5515
+ import z82 from "zod";
5470
5516
 
5471
5517
  // src/ticket/validation.ts
5472
- import z79 from "zod";
5518
+ import z81 from "zod";
5473
5519
  var addErrorMessage2 = (field) => {
5474
5520
  return field.refine(
5475
5521
  ({ isRequired, value }) => {
@@ -5487,106 +5533,106 @@ var addErrorMessage2 = (field) => {
5487
5533
  }
5488
5534
  );
5489
5535
  };
5490
- var BaseSchema3 = z79.object({
5491
- isRequired: z79.boolean(),
5492
- attributeId: z79.string()
5536
+ var BaseSchema3 = z81.object({
5537
+ isRequired: z81.boolean(),
5538
+ attributeId: z81.string()
5493
5539
  });
5494
5540
  var SingleValue2 = addErrorMessage2(
5495
5541
  BaseSchema3.extend({
5496
- value: z79.string()
5542
+ value: z81.string()
5497
5543
  })
5498
5544
  );
5499
- var CreateTicketValidationSchema = z79.object({
5545
+ var CreateTicketValidationSchema = z81.object({
5500
5546
  title: SingleValue2,
5501
5547
  description: SingleValue2,
5502
5548
  status: SingleValue2,
5503
5549
  type: SingleValue2,
5504
5550
  priority: SingleValue2,
5505
5551
  contact: SingleValue2,
5506
- assignee: z79.object({
5507
- isRequired: z79.boolean(),
5508
- attributeId: z79.string(),
5509
- value: z79.string()
5552
+ assignee: z81.object({
5553
+ isRequired: z81.boolean(),
5554
+ attributeId: z81.string(),
5555
+ value: z81.string()
5510
5556
  }),
5511
5557
  channel: SingleValue2,
5512
- tags: addErrorMessage2(BaseSchema3.extend({ value: z79.array(z79.string()) })),
5513
- categories: BaseSchema3.extend({ value: z79.array(z79.string()) }),
5514
- customFields: z79.array(
5558
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z81.array(z81.string()) })),
5559
+ categories: BaseSchema3.extend({ value: z81.array(z81.string()) }),
5560
+ customFields: z81.array(
5515
5561
  addErrorMessage2(
5516
5562
  BaseSchema3.extend({
5517
- value: z79.union([z79.string(), z79.array(z79.string())]),
5518
- type: z79.string(),
5519
- isDefaultAttribute: z79.boolean()
5563
+ value: z81.union([z81.string(), z81.array(z81.string())]),
5564
+ type: z81.string(),
5565
+ isDefaultAttribute: z81.boolean()
5520
5566
  })
5521
5567
  )
5522
5568
  ),
5523
- reasonToAssign: z79.object({ value: z79.string() }).optional()
5569
+ reasonToAssign: z81.object({ value: z81.string() }).optional()
5524
5570
  });
5525
5571
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5526
- var TicketAttachmentRecordSchema = z79.object({
5527
- bucketName: z79.string(),
5528
- fileKey: z79.string(),
5529
- fileName: z79.string(),
5530
- fileSize: z79.coerce.number(),
5531
- url: z79.string()
5532
- });
5533
- var CreateTicketAttachmentRecordsSchema = z79.object({
5534
- ticketId: z79.string(),
5535
- attributeId: z79.string(),
5536
- ticketAttachmentRecords: z79.array(TicketAttachmentRecordSchema)
5537
- });
5538
- var TicketParamsSchema = z79.object({
5539
- page: z79.coerce.number().default(1),
5540
- pageSize: z79.coerce.number().default(10)
5541
- });
5542
- var CustomFieldQuery = z79.object({
5543
- attributeId: z79.string(),
5544
- type: z79.string(),
5545
- value: z79.union([z79.string(), z79.array(z79.string())])
5546
- });
5547
- var GetAllTicketQuerySchema = z79.object({
5548
- page: z79.string().transform((value) => Number(value)),
5549
- pageSize: z79.string().transform((value) => Number(value)),
5550
- selectedDate: z79.string(),
5551
- keyword: z79.string(),
5552
- title: z79.string(),
5553
- description: z79.string(),
5554
- status: z79.array(z79.string()),
5555
- priority: z79.array(z79.string()),
5556
- channel: z79.array(z79.string()),
5557
- type: z79.array(z79.string()),
5558
- ticketType: z79.array(z79.string()),
5559
- contact: z79.array(z79.string()),
5560
- tags: z79.array(z79.string().uuid()),
5561
- categories: z79.array(z79.string().uuid()),
5562
- assignee: z79.array(z79.string().uuid()),
5563
- customFields: z79.array(
5564
- z79.object({
5565
- attributeId: z79.string().uuid(),
5566
- type: z79.string(),
5567
- value: z79.union([z79.string(), z79.array(z79.string())])
5572
+ var TicketAttachmentRecordSchema = z81.object({
5573
+ bucketName: z81.string(),
5574
+ fileKey: z81.string(),
5575
+ fileName: z81.string(),
5576
+ fileSize: z81.coerce.number(),
5577
+ url: z81.string()
5578
+ });
5579
+ var CreateTicketAttachmentRecordsSchema = z81.object({
5580
+ ticketId: z81.string(),
5581
+ attributeId: z81.string(),
5582
+ ticketAttachmentRecords: z81.array(TicketAttachmentRecordSchema)
5583
+ });
5584
+ var TicketParamsSchema = z81.object({
5585
+ page: z81.coerce.number().default(1),
5586
+ pageSize: z81.coerce.number().default(10)
5587
+ });
5588
+ var CustomFieldQuery = z81.object({
5589
+ attributeId: z81.string(),
5590
+ type: z81.string(),
5591
+ value: z81.union([z81.string(), z81.array(z81.string())])
5592
+ });
5593
+ var GetAllTicketQuerySchema = z81.object({
5594
+ page: z81.string().transform((value) => Number(value)),
5595
+ pageSize: z81.string().transform((value) => Number(value)),
5596
+ selectedDate: z81.string(),
5597
+ keyword: z81.string(),
5598
+ title: z81.string(),
5599
+ description: z81.string(),
5600
+ status: z81.array(z81.string()),
5601
+ priority: z81.array(z81.string()),
5602
+ channel: z81.array(z81.string()),
5603
+ type: z81.array(z81.string()),
5604
+ ticketType: z81.array(z81.string()),
5605
+ contact: z81.array(z81.string()),
5606
+ tags: z81.array(z81.string().uuid()),
5607
+ categories: z81.array(z81.string().uuid()),
5608
+ assignee: z81.array(z81.string().uuid()),
5609
+ customFields: z81.array(
5610
+ z81.object({
5611
+ attributeId: z81.string().uuid(),
5612
+ type: z81.string(),
5613
+ value: z81.union([z81.string(), z81.array(z81.string())])
5568
5614
  })
5569
5615
  )
5570
5616
  }).partial();
5571
- var ExportAllTicketQuerySchema = z79.object({
5572
- agent: z79.array(z79.string()),
5573
- selectedDate: z79.string(),
5574
- keyword: z79.string(),
5575
- title: z79.string(),
5576
- description: z79.string(),
5577
- status: z79.array(z79.string()),
5578
- priority: z79.array(z79.string()),
5579
- channel: z79.array(z79.string()),
5580
- type: z79.array(z79.string()),
5581
- ticketType: z79.array(z79.string()),
5582
- contact: z79.array(z79.string()),
5583
- tags: z79.array(z79.string()),
5584
- categories: z79.array(z79.string()),
5585
- customFields: z79.array(
5586
- z79.object({
5587
- attributeId: z79.string().uuid(),
5588
- type: z79.string(),
5589
- value: z79.union([z79.string(), z79.array(z79.string())])
5617
+ var ExportAllTicketQuerySchema = z81.object({
5618
+ agent: z81.array(z81.string()),
5619
+ selectedDate: z81.string(),
5620
+ keyword: z81.string(),
5621
+ title: z81.string(),
5622
+ description: z81.string(),
5623
+ status: z81.array(z81.string()),
5624
+ priority: z81.array(z81.string()),
5625
+ channel: z81.array(z81.string()),
5626
+ type: z81.array(z81.string()),
5627
+ ticketType: z81.array(z81.string()),
5628
+ contact: z81.array(z81.string()),
5629
+ tags: z81.array(z81.string()),
5630
+ categories: z81.array(z81.string()),
5631
+ customFields: z81.array(
5632
+ z81.object({
5633
+ attributeId: z81.string().uuid(),
5634
+ type: z81.string(),
5635
+ value: z81.union([z81.string(), z81.array(z81.string())])
5590
5636
  })
5591
5637
  )
5592
5638
  }).partial();
@@ -5602,14 +5648,14 @@ var ticketContract = initContract30().router(
5602
5648
  201: DefaultSuccessResponseSchema.extend({
5603
5649
  data: TicketSchema
5604
5650
  }),
5605
- 400: z80.object({
5606
- message: z80.string()
5651
+ 400: z82.object({
5652
+ message: z82.string()
5607
5653
  }),
5608
- 409: z80.object({
5609
- message: z80.string()
5654
+ 409: z82.object({
5655
+ message: z82.string()
5610
5656
  }),
5611
- 500: z80.object({
5612
- message: z80.string()
5657
+ 500: z82.object({
5658
+ message: z82.string()
5613
5659
  }),
5614
5660
  401: DefaultUnauthorizedSchema,
5615
5661
  404: DefaultNotFoundSchema,
@@ -5630,8 +5676,8 @@ var ticketContract = initContract30().router(
5630
5676
  TicketSchema
5631
5677
  )
5632
5678
  }),
5633
- 400: z80.object({
5634
- message: z80.string()
5679
+ 400: z82.object({
5680
+ message: z82.string()
5635
5681
  }),
5636
5682
  401: DefaultUnauthorizedSchema,
5637
5683
  500: DefaultErrorResponseSchema
@@ -5641,14 +5687,14 @@ var ticketContract = initContract30().router(
5641
5687
  getTicketById: {
5642
5688
  method: "GET",
5643
5689
  path: "/:id",
5644
- pathParams: z80.object({ id: z80.string() }),
5690
+ pathParams: z82.object({ id: z82.string() }),
5645
5691
  headers: DefaultHeaderSchema,
5646
5692
  responses: {
5647
5693
  200: DefaultSuccessResponseSchema.extend({
5648
5694
  data: TicketSchema
5649
5695
  }),
5650
- 400: z80.object({
5651
- message: z80.string()
5696
+ 400: z82.object({
5697
+ message: z82.string()
5652
5698
  }),
5653
5699
  401: DefaultUnauthorizedSchema,
5654
5700
  500: DefaultErrorResponseSchema
@@ -5658,15 +5704,15 @@ var ticketContract = initContract30().router(
5658
5704
  getTicketByContactId: {
5659
5705
  method: "GET",
5660
5706
  path: "/contact/:id",
5661
- pathParams: z80.object({ id: z80.string() }),
5707
+ pathParams: z82.object({ id: z82.string() }),
5662
5708
  query: TicketParamsSchema,
5663
5709
  headers: DefaultHeaderSchema,
5664
5710
  responses: {
5665
5711
  200: DefaultSuccessResponseSchema.extend({
5666
5712
  data: WithPagination(TicketSchema)
5667
5713
  }),
5668
- 400: z80.object({
5669
- message: z80.string()
5714
+ 400: z82.object({
5715
+ message: z82.string()
5670
5716
  }),
5671
5717
  401: DefaultUnauthorizedSchema,
5672
5718
  500: DefaultErrorResponseSchema
@@ -5676,21 +5722,21 @@ var ticketContract = initContract30().router(
5676
5722
  updateTicket: {
5677
5723
  method: "PATCH",
5678
5724
  path: "/:id",
5679
- pathParams: z80.object({ id: z80.string() }),
5725
+ pathParams: z82.object({ id: z82.string() }),
5680
5726
  body: UpdateTicketValidationSchema,
5681
5727
  headers: DefaultHeaderSchema,
5682
5728
  responses: {
5683
5729
  201: DefaultSuccessResponseSchema.extend({
5684
5730
  data: TicketSchema
5685
5731
  }),
5686
- 400: z80.object({
5687
- message: z80.string()
5732
+ 400: z82.object({
5733
+ message: z82.string()
5688
5734
  }),
5689
- 409: z80.object({
5690
- message: z80.string()
5735
+ 409: z82.object({
5736
+ message: z82.string()
5691
5737
  }),
5692
- 500: z80.object({
5693
- message: z80.string()
5738
+ 500: z82.object({
5739
+ message: z82.string()
5694
5740
  }),
5695
5741
  401: DefaultUnauthorizedSchema,
5696
5742
  404: DefaultNotFoundSchema,
@@ -5701,11 +5747,11 @@ var ticketContract = initContract30().router(
5701
5747
  deleteTicket: {
5702
5748
  method: "DELETE",
5703
5749
  path: "/:id",
5704
- pathParams: z80.object({ id: z80.string() }),
5750
+ pathParams: z82.object({ id: z82.string() }),
5705
5751
  headers: DefaultHeaderSchema,
5706
5752
  body: null,
5707
5753
  responses: {
5708
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5754
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5709
5755
  500: DefaultErrorResponseSchema
5710
5756
  },
5711
5757
  summary: "Delete a extension."
@@ -5713,19 +5759,19 @@ var ticketContract = initContract30().router(
5713
5759
  updateDescription: {
5714
5760
  method: "PATCH",
5715
5761
  path: "/description/update/:id",
5716
- pathParams: z80.object({ id: z80.string() }),
5717
- body: z80.object({ description: z80.string() }),
5762
+ pathParams: z82.object({ id: z82.string() }),
5763
+ body: z82.object({ description: z82.string() }),
5718
5764
  headers: DefaultHeaderSchema,
5719
5765
  responses: {
5720
- 201: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5721
- 400: z80.object({
5722
- message: z80.string()
5766
+ 201: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5767
+ 400: z82.object({
5768
+ message: z82.string()
5723
5769
  }),
5724
- 409: z80.object({
5725
- message: z80.string()
5770
+ 409: z82.object({
5771
+ message: z82.string()
5726
5772
  }),
5727
- 500: z80.object({
5728
- message: z80.string()
5773
+ 500: z82.object({
5774
+ message: z82.string()
5729
5775
  }),
5730
5776
  401: DefaultUnauthorizedSchema,
5731
5777
  404: DefaultNotFoundSchema,
@@ -5736,19 +5782,19 @@ var ticketContract = initContract30().router(
5736
5782
  updateTitle: {
5737
5783
  method: "PATCH",
5738
5784
  path: "/title/update/:id",
5739
- pathParams: z80.object({ id: z80.string() }),
5740
- body: z80.object({ title: z80.string() }),
5785
+ pathParams: z82.object({ id: z82.string() }),
5786
+ body: z82.object({ title: z82.string() }),
5741
5787
  headers: DefaultHeaderSchema,
5742
5788
  responses: {
5743
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5744
- 400: z80.object({
5745
- message: z80.string()
5789
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5790
+ 400: z82.object({
5791
+ message: z82.string()
5746
5792
  }),
5747
- 409: z80.object({
5748
- message: z80.string()
5793
+ 409: z82.object({
5794
+ message: z82.string()
5749
5795
  }),
5750
- 500: z80.object({
5751
- message: z80.string()
5796
+ 500: z82.object({
5797
+ message: z82.string()
5752
5798
  }),
5753
5799
  401: DefaultUnauthorizedSchema,
5754
5800
  404: DefaultNotFoundSchema,
@@ -5759,19 +5805,19 @@ var ticketContract = initContract30().router(
5759
5805
  updateType: {
5760
5806
  method: "PATCH",
5761
5807
  path: "/type/update/:id",
5762
- pathParams: z80.object({ id: z80.string() }),
5763
- body: z80.object({ type: z80.string() }),
5808
+ pathParams: z82.object({ id: z82.string() }),
5809
+ body: z82.object({ type: z82.string() }),
5764
5810
  headers: DefaultHeaderSchema,
5765
5811
  responses: {
5766
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5767
- 400: z80.object({
5768
- message: z80.string()
5812
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5813
+ 400: z82.object({
5814
+ message: z82.string()
5769
5815
  }),
5770
- 409: z80.object({
5771
- message: z80.string()
5816
+ 409: z82.object({
5817
+ message: z82.string()
5772
5818
  }),
5773
- 500: z80.object({
5774
- message: z80.string()
5819
+ 500: z82.object({
5820
+ message: z82.string()
5775
5821
  }),
5776
5822
  401: DefaultUnauthorizedSchema,
5777
5823
  404: DefaultNotFoundSchema,
@@ -5782,19 +5828,19 @@ var ticketContract = initContract30().router(
5782
5828
  updateStatus: {
5783
5829
  method: "PATCH",
5784
5830
  path: "/status/update/:id",
5785
- pathParams: z80.object({ id: z80.string() }),
5786
- body: z80.object({ status: z80.string() }),
5831
+ pathParams: z82.object({ id: z82.string() }),
5832
+ body: z82.object({ status: z82.string() }),
5787
5833
  headers: DefaultHeaderSchema,
5788
5834
  responses: {
5789
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5790
- 400: z80.object({
5791
- message: z80.string()
5835
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5836
+ 400: z82.object({
5837
+ message: z82.string()
5792
5838
  }),
5793
- 409: z80.object({
5794
- message: z80.string()
5839
+ 409: z82.object({
5840
+ message: z82.string()
5795
5841
  }),
5796
- 500: z80.object({
5797
- message: z80.string()
5842
+ 500: z82.object({
5843
+ message: z82.string()
5798
5844
  }),
5799
5845
  401: DefaultUnauthorizedSchema,
5800
5846
  404: DefaultNotFoundSchema,
@@ -5805,19 +5851,19 @@ var ticketContract = initContract30().router(
5805
5851
  updatePriority: {
5806
5852
  method: "PATCH",
5807
5853
  path: "/priority/update/:id",
5808
- pathParams: z80.object({ id: z80.string() }),
5809
- body: z80.object({ priority: z80.string() }),
5854
+ pathParams: z82.object({ id: z82.string() }),
5855
+ body: z82.object({ priority: z82.string() }),
5810
5856
  headers: DefaultHeaderSchema,
5811
5857
  responses: {
5812
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5813
- 400: z80.object({
5814
- message: z80.string()
5858
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5859
+ 400: z82.object({
5860
+ message: z82.string()
5815
5861
  }),
5816
- 409: z80.object({
5817
- message: z80.string()
5862
+ 409: z82.object({
5863
+ message: z82.string()
5818
5864
  }),
5819
- 500: z80.object({
5820
- message: z80.string()
5865
+ 500: z82.object({
5866
+ message: z82.string()
5821
5867
  }),
5822
5868
  401: DefaultUnauthorizedSchema,
5823
5869
  404: DefaultNotFoundSchema,
@@ -5828,19 +5874,19 @@ var ticketContract = initContract30().router(
5828
5874
  updateChannel: {
5829
5875
  method: "PATCH",
5830
5876
  path: "/channel/update/:id",
5831
- pathParams: z80.object({ id: z80.string() }),
5832
- body: z80.object({ channel: z80.string() }),
5877
+ pathParams: z82.object({ id: z82.string() }),
5878
+ body: z82.object({ channel: z82.string() }),
5833
5879
  headers: DefaultHeaderSchema,
5834
5880
  responses: {
5835
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5836
- 400: z80.object({
5837
- message: z80.string()
5881
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5882
+ 400: z82.object({
5883
+ message: z82.string()
5838
5884
  }),
5839
- 409: z80.object({
5840
- message: z80.string()
5885
+ 409: z82.object({
5886
+ message: z82.string()
5841
5887
  }),
5842
- 500: z80.object({
5843
- message: z80.string()
5888
+ 500: z82.object({
5889
+ message: z82.string()
5844
5890
  }),
5845
5891
  401: DefaultUnauthorizedSchema,
5846
5892
  404: DefaultNotFoundSchema,
@@ -5851,19 +5897,19 @@ var ticketContract = initContract30().router(
5851
5897
  updateTags: {
5852
5898
  method: "PATCH",
5853
5899
  path: "/tags/update/:id",
5854
- pathParams: z80.object({ id: z80.string() }),
5855
- body: z80.object({ tags: z80.array(z80.string()) }),
5900
+ pathParams: z82.object({ id: z82.string() }),
5901
+ body: z82.object({ tags: z82.array(z82.string()) }),
5856
5902
  headers: DefaultHeaderSchema,
5857
5903
  responses: {
5858
- 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5859
- 400: z80.object({
5860
- message: z80.string()
5904
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5905
+ 400: z82.object({
5906
+ message: z82.string()
5861
5907
  }),
5862
- 409: z80.object({
5863
- message: z80.string()
5908
+ 409: z82.object({
5909
+ message: z82.string()
5864
5910
  }),
5865
- 500: z80.object({
5866
- message: z80.string()
5911
+ 500: z82.object({
5912
+ message: z82.string()
5867
5913
  }),
5868
5914
  401: DefaultUnauthorizedSchema,
5869
5915
  404: DefaultNotFoundSchema,
@@ -5874,25 +5920,25 @@ var ticketContract = initContract30().router(
5874
5920
  changeAssignee: {
5875
5921
  method: "PATCH",
5876
5922
  path: "/assignee/update/:id",
5877
- pathParams: z80.object({ id: z80.string() }),
5878
- body: z80.object({
5879
- ticketId: z80.string(),
5880
- assigneeId: z80.string(),
5881
- reason: z80.string().optional()
5923
+ pathParams: z82.object({ id: z82.string() }),
5924
+ body: z82.object({
5925
+ ticketId: z82.string(),
5926
+ assigneeId: z82.string(),
5927
+ reason: z82.string().optional()
5882
5928
  }),
5883
5929
  headers: DefaultHeaderSchema,
5884
5930
  responses: {
5885
5931
  200: DefaultSuccessResponseSchema.extend({
5886
5932
  data: TicketSchema
5887
5933
  }),
5888
- 400: z80.object({
5889
- message: z80.string()
5934
+ 400: z82.object({
5935
+ message: z82.string()
5890
5936
  }),
5891
- 409: z80.object({
5892
- message: z80.string()
5937
+ 409: z82.object({
5938
+ message: z82.string()
5893
5939
  }),
5894
- 500: z80.object({
5895
- message: z80.string()
5940
+ 500: z82.object({
5941
+ message: z82.string()
5896
5942
  }),
5897
5943
  401: DefaultUnauthorizedSchema,
5898
5944
  404: DefaultNotFoundSchema,
@@ -5903,14 +5949,14 @@ var ticketContract = initContract30().router(
5903
5949
  getTicketCountByContact: {
5904
5950
  method: "GET",
5905
5951
  path: "/ticket_count/contact/:id",
5906
- pathParams: z80.object({ id: z80.string() }),
5952
+ pathParams: z82.object({ id: z82.string() }),
5907
5953
  headers: DefaultHeaderSchema,
5908
5954
  responses: {
5909
5955
  200: DefaultSuccessResponseSchema.extend({
5910
5956
  data: TicketCountByContactSchema
5911
5957
  }),
5912
- 400: z80.object({
5913
- message: z80.string()
5958
+ 400: z82.object({
5959
+ message: z82.string()
5914
5960
  }),
5915
5961
  401: DefaultUnauthorizedSchema,
5916
5962
  500: DefaultErrorResponseSchema
@@ -5926,14 +5972,14 @@ var ticketContract = initContract30().router(
5926
5972
  201: DefaultSuccessResponseSchema.extend({
5927
5973
  data: TicketCustomFieldSchema
5928
5974
  }),
5929
- 400: z80.object({
5930
- message: z80.string()
5975
+ 400: z82.object({
5976
+ message: z82.string()
5931
5977
  }),
5932
- 409: z80.object({
5933
- message: z80.string()
5978
+ 409: z82.object({
5979
+ message: z82.string()
5934
5980
  }),
5935
- 500: z80.object({
5936
- message: z80.string()
5981
+ 500: z82.object({
5982
+ message: z82.string()
5937
5983
  }),
5938
5984
  401: DefaultUnauthorizedSchema,
5939
5985
  404: DefaultNotFoundSchema,
@@ -5958,24 +6004,24 @@ var ticketContract = initContract30().router(
5958
6004
 
5959
6005
  // src/user/index.ts
5960
6006
  import { initContract as initContract31 } from "@ts-rest/core";
5961
- import z82 from "zod";
6007
+ import z84 from "zod";
5962
6008
 
5963
6009
  // src/user/validation.ts
5964
- import { z as z81 } from "zod";
5965
- var CreateUserSchema = z81.object({
5966
- name: z81.string(),
5967
- email: z81.string().email(),
5968
- address: z81.string().nullable(),
5969
- phone: z81.string().nullable(),
5970
- password: z81.string(),
5971
- notificationCount: z81.number().nullable().optional(),
5972
- roles: z81.array(z81.string())
6010
+ import { z as z83 } from "zod";
6011
+ var CreateUserSchema = z83.object({
6012
+ name: z83.string(),
6013
+ email: z83.string().email(),
6014
+ address: z83.string().nullable(),
6015
+ phone: z83.string().nullable(),
6016
+ password: z83.string(),
6017
+ notificationCount: z83.number().nullable().optional(),
6018
+ roles: z83.array(z83.string())
5973
6019
  });
5974
6020
  var UpdateUserSchema = CreateUserSchema.extend({
5975
- newPassword: z81.string()
6021
+ newPassword: z83.string()
5976
6022
  });
5977
- var UpdateUserProfileSchema = z81.object({
5978
- password: z81.string()
6023
+ var UpdateUserProfileSchema = z83.object({
6024
+ password: z83.string()
5979
6025
  });
5980
6026
 
5981
6027
  // src/user/index.ts
@@ -5990,8 +6036,8 @@ var userContract = initContract31().router(
5990
6036
  201: DefaultSuccessResponseSchema.extend({
5991
6037
  user: UserSchema
5992
6038
  }),
5993
- 400: z82.object({
5994
- message: z82.string()
6039
+ 400: z84.object({
6040
+ message: z84.string()
5995
6041
  }),
5996
6042
  401: DefaultUnauthorizedSchema,
5997
6043
  404: DefaultNotFoundSchema,
@@ -6004,16 +6050,16 @@ var userContract = initContract31().router(
6004
6050
  method: "GET",
6005
6051
  path: "",
6006
6052
  headers: DefaultHeaderSchema,
6007
- query: z82.object({
6008
- page: z82.coerce.number().optional(),
6009
- pageSize: z82.coerce.number().optional(),
6053
+ query: z84.object({
6054
+ page: z84.coerce.number().optional(),
6055
+ pageSize: z84.coerce.number().optional(),
6010
6056
  // Don't add default 10. In some places, we need to fetch all users.
6011
- keyword: z82.string().optional()
6057
+ keyword: z84.string().optional()
6012
6058
  }).optional(),
6013
6059
  responses: {
6014
6060
  200: WithPagination(UserSchema),
6015
- 400: z82.object({
6016
- message: z82.string()
6061
+ 400: z84.object({
6062
+ message: z84.string()
6017
6063
  }),
6018
6064
  401: DefaultUnauthorizedSchema,
6019
6065
  500: DefaultErrorResponseSchema
@@ -6023,12 +6069,12 @@ var userContract = initContract31().router(
6023
6069
  getUserById: {
6024
6070
  method: "GET",
6025
6071
  path: "/:id",
6026
- pathParams: z82.object({ id: z82.string() }),
6072
+ pathParams: z84.object({ id: z84.string() }),
6027
6073
  headers: DefaultHeaderSchema,
6028
6074
  responses: {
6029
6075
  200: UserSchema,
6030
- 400: z82.object({
6031
- message: z82.string()
6076
+ 400: z84.object({
6077
+ message: z84.string()
6032
6078
  }),
6033
6079
  401: DefaultUnauthorizedSchema
6034
6080
  },
@@ -6037,15 +6083,15 @@ var userContract = initContract31().router(
6037
6083
  updateUser: {
6038
6084
  method: "PATCH",
6039
6085
  path: "/:id",
6040
- pathParams: z82.object({ id: z82.string() }),
6086
+ pathParams: z84.object({ id: z84.string() }),
6041
6087
  headers: DefaultHeaderSchema,
6042
6088
  body: UpdateUserSchema,
6043
6089
  responses: {
6044
6090
  201: DefaultSuccessResponseSchema.extend({
6045
6091
  user: UserSchema
6046
6092
  }),
6047
- 400: z82.object({
6048
- message: z82.string()
6093
+ 400: z84.object({
6094
+ message: z84.string()
6049
6095
  }),
6050
6096
  401: DefaultUnauthorizedSchema,
6051
6097
  404: DefaultNotFoundSchema,
@@ -6057,15 +6103,15 @@ var userContract = initContract31().router(
6057
6103
  updateUserProfile: {
6058
6104
  method: "PATCH",
6059
6105
  path: "/profile/:id",
6060
- pathParams: z82.object({ id: z82.string() }),
6106
+ pathParams: z84.object({ id: z84.string() }),
6061
6107
  headers: DefaultHeaderSchema,
6062
6108
  body: UpdateUserProfileSchema,
6063
6109
  responses: {
6064
6110
  201: DefaultSuccessResponseSchema.extend({
6065
6111
  user: UserSchema
6066
6112
  }),
6067
- 400: z82.object({
6068
- message: z82.string()
6113
+ 400: z84.object({
6114
+ message: z84.string()
6069
6115
  }),
6070
6116
  401: DefaultUnauthorizedSchema,
6071
6117
  404: DefaultNotFoundSchema,
@@ -6077,11 +6123,11 @@ var userContract = initContract31().router(
6077
6123
  deleteUser: {
6078
6124
  method: "DELETE",
6079
6125
  path: "/:id",
6080
- pathParams: z82.object({ id: z82.string() }),
6126
+ pathParams: z84.object({ id: z84.string() }),
6081
6127
  headers: DefaultHeaderSchema,
6082
6128
  body: null,
6083
6129
  responses: {
6084
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6130
+ 200: DefaultSuccessResponseSchema.extend({ message: z84.string() }),
6085
6131
  404: DefaultNotFoundSchema,
6086
6132
  422: DefaultUnprocessibleSchema,
6087
6133
  500: DefaultErrorResponseSchema
@@ -6094,26 +6140,26 @@ var userContract = initContract31().router(
6094
6140
 
6095
6141
  // src/user-presence-status-log/index.ts
6096
6142
  import { initContract as initContract32 } from "@ts-rest/core";
6097
- import z85 from "zod";
6143
+ import z87 from "zod";
6098
6144
 
6099
6145
  // src/user-presence-status-log/schema.ts
6100
- import z83 from "zod";
6146
+ import z85 from "zod";
6101
6147
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
6102
6148
  user: UserSchema,
6103
6149
  previousPresenceStatus: PresenceStatusSchema,
6104
6150
  newPresenceStatus: PresenceStatusSchema,
6105
- reason: z83.string()
6151
+ reason: z85.string()
6106
6152
  });
6107
6153
 
6108
6154
  // src/user-presence-status-log/validation.ts
6109
- import z84 from "zod";
6110
- var UserPresenceStatusLogParamsSchema = z84.object({
6111
- page: z84.coerce.number().default(1),
6112
- pageSize: z84.coerce.number().default(10),
6113
- selectedDate: z84.string().optional()
6155
+ import z86 from "zod";
6156
+ var UserPresenceStatusLogParamsSchema = z86.object({
6157
+ page: z86.coerce.number().default(1),
6158
+ pageSize: z86.coerce.number().default(10),
6159
+ selectedDate: z86.string().optional()
6114
6160
  }).optional();
6115
- var UserPresenceStatusLogExportParamsSchema = z84.object({
6116
- selectedDate: z84.string().optional()
6161
+ var UserPresenceStatusLogExportParamsSchema = z86.object({
6162
+ selectedDate: z86.string().optional()
6117
6163
  });
6118
6164
 
6119
6165
  // src/user-presence-status-log/index.ts
@@ -6126,8 +6172,8 @@ var userPresenceStatusLogContract = initContract32().router(
6126
6172
  headers: DefaultHeaderSchema,
6127
6173
  responses: {
6128
6174
  200: WithPagination(UserPresenceStatusLogSchema),
6129
- 400: z85.object({
6130
- message: z85.string()
6175
+ 400: z87.object({
6176
+ message: z87.string()
6131
6177
  }),
6132
6178
  401: DefaultUnauthorizedSchema,
6133
6179
  500: DefaultErrorResponseSchema
@@ -6141,8 +6187,8 @@ var userPresenceStatusLogContract = initContract32().router(
6141
6187
  headers: DefaultHeaderSchema,
6142
6188
  responses: {
6143
6189
  200: null,
6144
- 400: z85.object({
6145
- message: z85.string()
6190
+ 400: z87.object({
6191
+ message: z87.string()
6146
6192
  }),
6147
6193
  401: DefaultUnauthorizedSchema,
6148
6194
  500: DefaultErrorResponseSchema
@@ -6154,44 +6200,44 @@ var userPresenceStatusLogContract = initContract32().router(
6154
6200
 
6155
6201
  // src/widget/index.ts
6156
6202
  import { initContract as initContract33 } from "@ts-rest/core";
6157
- import z88 from "zod";
6203
+ import z90 from "zod";
6158
6204
 
6159
6205
  // src/widget/schema.ts
6160
- import z86 from "zod";
6161
- var FieldsSchema = z86.object({ data: z86.array(z86.string()) });
6162
- var WidgetPositionSchema = z86.union([
6163
- z86.literal("menu"),
6164
- z86.literal("ticket_detail"),
6165
- z86.literal("contact_detail")
6206
+ import z88 from "zod";
6207
+ var FieldsSchema = z88.object({ data: z88.array(z88.string()) });
6208
+ var WidgetPositionSchema = z88.union([
6209
+ z88.literal("menu"),
6210
+ z88.literal("ticket_detail"),
6211
+ z88.literal("contact_detail")
6166
6212
  ]);
6167
6213
  var WidgetSchema = DefaultEntitySchema.extend({
6168
- name: z86.string(),
6169
- description: z86.string().nullable(),
6214
+ name: z88.string(),
6215
+ description: z88.string().nullable(),
6170
6216
  position: WidgetPositionSchema.nullable(),
6171
6217
  fields: FieldsSchema,
6172
- url: z86.string()
6218
+ url: z88.string()
6173
6219
  });
6174
6220
 
6175
6221
  // src/widget/validation.ts
6176
- import z87 from "zod";
6177
- var CreateWidgetSchema = z87.object({
6178
- name: z87.string(),
6179
- description: z87.string(),
6180
- url: z87.string(),
6222
+ import z89 from "zod";
6223
+ var CreateWidgetSchema = z89.object({
6224
+ name: z89.string(),
6225
+ description: z89.string(),
6226
+ url: z89.string(),
6181
6227
  position: WidgetPositionSchema,
6182
- fields: z87.object({
6228
+ fields: z89.object({
6183
6229
  data: (
6184
6230
  // Array of attribute system names
6185
- z87.array(z87.string())
6231
+ z89.array(z89.string())
6186
6232
  )
6187
6233
  }).optional()
6188
6234
  });
6189
6235
  var UpdateWidgetSchema = CreateWidgetSchema;
6190
- var GetWidgetUrlPathQuerySchema = z87.object({
6191
- widgetId: z87.string(),
6236
+ var GetWidgetUrlPathQuerySchema = z89.object({
6237
+ widgetId: z89.string(),
6192
6238
  // Position ID is ticket ID, contact ID, etc.
6193
6239
  // TODO: The name "Position ID" is confusing. Think of a better name.
6194
- positionId: z87.string()
6240
+ positionId: z89.string()
6195
6241
  });
6196
6242
 
6197
6243
  // src/widget/index.ts
@@ -6206,8 +6252,8 @@ var widgetContract = initContract33().router(
6206
6252
  201: DefaultSuccessResponseSchema.extend({
6207
6253
  widget: WidgetSchema
6208
6254
  }),
6209
- 400: z88.object({
6210
- message: z88.string()
6255
+ 400: z90.object({
6256
+ message: z90.string()
6211
6257
  }),
6212
6258
  401: DefaultUnauthorizedSchema,
6213
6259
  500: DefaultErrorResponseSchema
@@ -6217,17 +6263,17 @@ var widgetContract = initContract33().router(
6217
6263
  getWidgets: {
6218
6264
  method: "GET",
6219
6265
  path: "",
6220
- query: z88.object({
6221
- page: z88.coerce.number().default(1),
6222
- pageSize: z88.coerce.number().default(10),
6223
- keyword: z88.coerce.string().optional()
6266
+ query: z90.object({
6267
+ page: z90.coerce.number().default(1),
6268
+ pageSize: z90.coerce.number().default(10),
6269
+ keyword: z90.coerce.string().optional()
6224
6270
  }).optional(),
6225
6271
  headers: DefaultHeaderSchema,
6226
6272
  responses: {
6227
6273
  200: WithPagination(WidgetSchema),
6228
6274
  500: DefaultErrorResponseSchema,
6229
- 400: z88.object({
6230
- message: z88.string()
6275
+ 400: z90.object({
6276
+ message: z90.string()
6231
6277
  }),
6232
6278
  401: DefaultUnauthorizedSchema
6233
6279
  },
@@ -6238,9 +6284,9 @@ var widgetContract = initContract33().router(
6238
6284
  path: "/menu",
6239
6285
  headers: DefaultHeaderSchema,
6240
6286
  responses: {
6241
- 200: z88.array(WidgetSchema),
6242
- 400: z88.object({
6243
- message: z88.string()
6287
+ 200: z90.array(WidgetSchema),
6288
+ 400: z90.object({
6289
+ message: z90.string()
6244
6290
  }),
6245
6291
  401: DefaultUnauthorizedSchema,
6246
6292
  500: DefaultErrorResponseSchema
@@ -6252,9 +6298,9 @@ var widgetContract = initContract33().router(
6252
6298
  path: "/ticket_detail",
6253
6299
  headers: DefaultHeaderSchema,
6254
6300
  responses: {
6255
- 200: z88.array(WidgetSchema),
6256
- 400: z88.object({
6257
- message: z88.string()
6301
+ 200: z90.array(WidgetSchema),
6302
+ 400: z90.object({
6303
+ message: z90.string()
6258
6304
  }),
6259
6305
  401: DefaultUnauthorizedSchema,
6260
6306
  500: DefaultErrorResponseSchema
@@ -6266,9 +6312,9 @@ var widgetContract = initContract33().router(
6266
6312
  path: "/contact_detail",
6267
6313
  headers: DefaultHeaderSchema,
6268
6314
  responses: {
6269
- 200: z88.array(WidgetSchema),
6270
- 400: z88.object({
6271
- message: z88.string()
6315
+ 200: z90.array(WidgetSchema),
6316
+ 400: z90.object({
6317
+ message: z90.string()
6272
6318
  }),
6273
6319
  401: DefaultUnauthorizedSchema,
6274
6320
  500: DefaultErrorResponseSchema
@@ -6278,12 +6324,12 @@ var widgetContract = initContract33().router(
6278
6324
  getWidgetById: {
6279
6325
  method: "GET",
6280
6326
  path: "/:id",
6281
- pathParams: z88.object({ id: z88.string() }),
6327
+ pathParams: z90.object({ id: z90.string() }),
6282
6328
  headers: DefaultHeaderSchema,
6283
6329
  responses: {
6284
6330
  200: WidgetSchema,
6285
- 400: z88.object({
6286
- message: z88.string()
6331
+ 400: z90.object({
6332
+ message: z90.string()
6287
6333
  }),
6288
6334
  401: DefaultUnauthorizedSchema,
6289
6335
  500: DefaultErrorResponseSchema
@@ -6297,10 +6343,10 @@ var widgetContract = initContract33().router(
6297
6343
  headers: DefaultHeaderSchema,
6298
6344
  responses: {
6299
6345
  201: DefaultSuccessResponseSchema.extend({
6300
- url: z88.string()
6346
+ url: z90.string()
6301
6347
  }),
6302
- 400: z88.object({
6303
- message: z88.string()
6348
+ 400: z90.object({
6349
+ message: z90.string()
6304
6350
  }),
6305
6351
  401: DefaultUnauthorizedSchema
6306
6352
  },
@@ -6309,14 +6355,14 @@ var widgetContract = initContract33().router(
6309
6355
  updateWidget: {
6310
6356
  method: "PATCH",
6311
6357
  path: "/:id",
6312
- pathParams: z88.object({ id: z88.string() }),
6358
+ pathParams: z90.object({ id: z90.string() }),
6313
6359
  headers: DefaultHeaderSchema,
6314
6360
  responses: {
6315
6361
  201: DefaultSuccessResponseSchema.extend({
6316
6362
  widget: WidgetSchema
6317
6363
  }),
6318
- 400: z88.object({
6319
- message: z88.string()
6364
+ 400: z90.object({
6365
+ message: z90.string()
6320
6366
  }),
6321
6367
  401: DefaultUnauthorizedSchema
6322
6368
  },
@@ -6326,11 +6372,11 @@ var widgetContract = initContract33().router(
6326
6372
  deleteWidget: {
6327
6373
  method: "DELETE",
6328
6374
  path: "/:id",
6329
- pathParams: z88.object({ id: z88.string() }),
6375
+ pathParams: z90.object({ id: z90.string() }),
6330
6376
  headers: DefaultHeaderSchema,
6331
6377
  body: null,
6332
6378
  responses: {
6333
- 200: DefaultSuccessResponseSchema.extend({ message: z88.string() }),
6379
+ 200: DefaultSuccessResponseSchema.extend({ message: z90.string() }),
6334
6380
  500: DefaultErrorResponseSchema
6335
6381
  },
6336
6382
  summary: "Delete a widget."
@@ -6341,24 +6387,24 @@ var widgetContract = initContract33().router(
6341
6387
 
6342
6388
  // src/wrap-up-form/index.ts
6343
6389
  import { initContract as initContract34 } from "@ts-rest/core";
6344
- import z90 from "zod";
6390
+ import z92 from "zod";
6345
6391
 
6346
6392
  // src/wrap-up-form/validation.ts
6347
- import { z as z89 } from "zod";
6348
- var CreateWrapUpFormSchema = z89.object({
6349
- note: z89.string().nullable().optional(),
6350
- disposition: z89.string().nullable().optional(),
6351
- callFrom: z89.string().nullable().optional(),
6352
- callTo: z89.string().nullable().optional()
6393
+ import { z as z91 } from "zod";
6394
+ var CreateWrapUpFormSchema = z91.object({
6395
+ note: z91.string().nullable().optional(),
6396
+ disposition: z91.string().nullable().optional(),
6397
+ callFrom: z91.string().nullable().optional(),
6398
+ callTo: z91.string().nullable().optional()
6353
6399
  });
6354
6400
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6355
- tags: z89.array(z89.string()).optional()
6401
+ tags: z91.array(z91.string()).optional()
6356
6402
  });
6357
- var CreateCXLogWrapUpFormSchema = z89.object({
6358
- cxLogId: z89.string().uuid(),
6359
- disposition: z89.string().optional(),
6360
- tagIds: z89.array(z89.string().uuid()).optional(),
6361
- note: z89.string().optional()
6403
+ var CreateCXLogWrapUpFormSchema = z91.object({
6404
+ cxLogId: z91.string().uuid(),
6405
+ disposition: z91.string().optional(),
6406
+ tagIds: z91.array(z91.string().uuid()).optional(),
6407
+ note: z91.string().optional()
6362
6408
  });
6363
6409
 
6364
6410
  // src/wrap-up-form/index.ts
@@ -6373,8 +6419,8 @@ var wrapUpFormContract = initContract34().router(
6373
6419
  201: DefaultSuccessResponseSchema.extend({
6374
6420
  wrapUpForm: WrapUpFormSchema
6375
6421
  }),
6376
- 400: z90.object({
6377
- message: z90.string()
6422
+ 400: z92.object({
6423
+ message: z92.string()
6378
6424
  }),
6379
6425
  401: DefaultUnauthorizedSchema,
6380
6426
  500: DefaultErrorResponseSchema
@@ -6396,15 +6442,15 @@ var wrapUpFormContract = initContract34().router(
6396
6442
  getWrapUpForms: {
6397
6443
  method: "GET",
6398
6444
  path: "",
6399
- query: z90.object({
6400
- page: z90.coerce.number().default(1),
6401
- pageSize: z90.coerce.number().default(10)
6445
+ query: z92.object({
6446
+ page: z92.coerce.number().default(1),
6447
+ pageSize: z92.coerce.number().default(10)
6402
6448
  }).optional(),
6403
6449
  headers: DefaultHeaderSchema,
6404
6450
  responses: {
6405
6451
  200: WithPagination(WrapUpFormSchema),
6406
- 400: z90.object({
6407
- message: z90.string()
6452
+ 400: z92.object({
6453
+ message: z92.string()
6408
6454
  }),
6409
6455
  401: DefaultUnauthorizedSchema,
6410
6456
  500: DefaultErrorResponseSchema
@@ -6414,15 +6460,15 @@ var wrapUpFormContract = initContract34().router(
6414
6460
  updateWrapUpForm: {
6415
6461
  method: "PATCH",
6416
6462
  path: "/:id",
6417
- pathParams: z90.object({ id: z90.string() }),
6463
+ pathParams: z92.object({ id: z92.string() }),
6418
6464
  headers: DefaultHeaderSchema,
6419
6465
  body: UpdateWrapUpFormSchema,
6420
6466
  responses: {
6421
6467
  201: DefaultSuccessResponseSchema.extend({
6422
6468
  wrapUpForm: WrapUpFormSchema
6423
6469
  }),
6424
- 400: z90.object({
6425
- message: z90.string()
6470
+ 400: z92.object({
6471
+ message: z92.string()
6426
6472
  }),
6427
6473
  401: DefaultUnauthorizedSchema,
6428
6474
  500: DefaultErrorResponseSchema
@@ -6435,28 +6481,28 @@ var wrapUpFormContract = initContract34().router(
6435
6481
 
6436
6482
  // src/upload/index.ts
6437
6483
  import { initContract as initContract35 } from "@ts-rest/core";
6438
- import z91 from "zod";
6484
+ import z93 from "zod";
6439
6485
  var uploadContract = initContract35().router(
6440
6486
  {
6441
6487
  rename: {
6442
6488
  method: "POST",
6443
6489
  path: "/:id/rename",
6444
- pathParams: z91.object({
6445
- id: z91.string()
6490
+ pathParams: z93.object({
6491
+ id: z93.string()
6446
6492
  }),
6447
6493
  headers: DefaultHeaderSchema,
6448
6494
  responses: {
6449
6495
  201: DefaultSuccessResponseSchema.extend({
6450
- message: z91.string()
6496
+ message: z93.string()
6451
6497
  }),
6452
- 400: z91.object({
6453
- message: z91.string()
6498
+ 400: z93.object({
6499
+ message: z93.string()
6454
6500
  }),
6455
- 409: z91.object({
6456
- message: z91.string()
6501
+ 409: z93.object({
6502
+ message: z93.string()
6457
6503
  }),
6458
- 500: z91.object({
6459
- message: z91.string()
6504
+ 500: z93.object({
6505
+ message: z93.string()
6460
6506
  }),
6461
6507
  401: DefaultUnauthorizedSchema,
6462
6508
  404: DefaultNotFoundSchema,
@@ -6468,23 +6514,23 @@ var uploadContract = initContract35().router(
6468
6514
  delete: {
6469
6515
  method: "DELETE",
6470
6516
  path: "/:id",
6471
- pathParams: z91.object({
6472
- id: z91.string()
6517
+ pathParams: z93.object({
6518
+ id: z93.string()
6473
6519
  }),
6474
6520
  headers: DefaultHeaderSchema,
6475
6521
  body: null,
6476
6522
  responses: {
6477
6523
  201: DefaultSuccessResponseSchema.extend({
6478
- message: z91.string()
6524
+ message: z93.string()
6479
6525
  }),
6480
- 400: z91.object({
6481
- message: z91.string()
6526
+ 400: z93.object({
6527
+ message: z93.string()
6482
6528
  }),
6483
- 409: z91.object({
6484
- message: z91.string()
6529
+ 409: z93.object({
6530
+ message: z93.string()
6485
6531
  }),
6486
- 500: z91.object({
6487
- message: z91.string()
6532
+ 500: z93.object({
6533
+ message: z93.string()
6488
6534
  }),
6489
6535
  401: DefaultUnauthorizedSchema,
6490
6536
  404: DefaultNotFoundSchema,
@@ -6499,19 +6545,19 @@ var uploadContract = initContract35().router(
6499
6545
  );
6500
6546
 
6501
6547
  // src/viber/index.ts
6502
- import z93 from "zod";
6548
+ import z95 from "zod";
6503
6549
 
6504
6550
  // src/viber/validation.ts
6505
- import z92 from "zod";
6506
- var ViberChannelSchema = z92.object({
6507
- name: z92.string(),
6508
- accessToken: z92.string(),
6509
- actor: z92.object({
6510
- id: z92.string().uuid(),
6511
- name: z92.string(),
6512
- email: z92.string().email(),
6513
- address: z92.string().nullable(),
6514
- phone: z92.string().nullable()
6551
+ import z94 from "zod";
6552
+ var ViberChannelSchema = z94.object({
6553
+ name: z94.string(),
6554
+ accessToken: z94.string(),
6555
+ actor: z94.object({
6556
+ id: z94.string().uuid(),
6557
+ name: z94.string(),
6558
+ email: z94.string().email(),
6559
+ address: z94.string().nullable(),
6560
+ phone: z94.string().nullable()
6515
6561
  }).optional()
6516
6562
  });
6517
6563
 
@@ -6540,8 +6586,8 @@ var viberContract = initContract36().router({
6540
6586
  }),
6541
6587
  400: DefaultErrorResponseSchema
6542
6588
  },
6543
- body: z93.object({
6544
- id: z93.string().uuid()
6589
+ body: z95.object({
6590
+ id: z95.string().uuid()
6545
6591
  }),
6546
6592
  summary: "Connect viber channel"
6547
6593
  },
@@ -6557,8 +6603,8 @@ var viberContract = initContract36().router({
6557
6603
  reconnect: {
6558
6604
  method: "POST",
6559
6605
  path: "/reconnect/:channelId",
6560
- pathParams: z93.object({
6561
- channelId: z93.string().uuid()
6606
+ pathParams: z95.object({
6607
+ channelId: z95.string().uuid()
6562
6608
  }),
6563
6609
  responses: {
6564
6610
  200: DefaultSuccessResponseSchema.extend({
@@ -6573,8 +6619,8 @@ var viberContract = initContract36().router({
6573
6619
  delete: {
6574
6620
  method: "DELETE",
6575
6621
  path: "/delete/:channelId",
6576
- pathParams: z93.object({
6577
- channelId: z93.string().uuid()
6622
+ pathParams: z95.object({
6623
+ channelId: z95.string().uuid()
6578
6624
  }),
6579
6625
  body: null,
6580
6626
  responses: {
@@ -6587,58 +6633,58 @@ var viberContract = initContract36().router({
6587
6633
 
6588
6634
  // src/notification/index.ts
6589
6635
  import { initContract as initContract37 } from "@ts-rest/core";
6590
- import z96 from "zod";
6636
+ import z98 from "zod";
6591
6637
 
6592
6638
  // src/notification/validation.ts
6593
- import z95 from "zod";
6639
+ import z97 from "zod";
6594
6640
 
6595
6641
  // src/notification/schema.ts
6596
- import z94 from "zod";
6597
- var NotificationChangeSchema = z94.object({
6598
- id: z94.string().uuid(),
6599
- createdAt: z94.date(),
6600
- updatedAt: z94.date(),
6601
- deletedAt: z94.date().nullable(),
6602
- actorId: z94.string().uuid(),
6642
+ import z96 from "zod";
6643
+ var NotificationChangeSchema = z96.object({
6644
+ id: z96.string().uuid(),
6645
+ createdAt: z96.date(),
6646
+ updatedAt: z96.date(),
6647
+ deletedAt: z96.date().nullable(),
6648
+ actorId: z96.string().uuid(),
6603
6649
  actor: UserSchema,
6604
- notificationObjectId: z94.string().uuid(),
6605
- readAt: z94.date()
6606
- });
6607
- var NotificationObjectSchema = z94.object({
6608
- id: z94.string().uuid(),
6609
- createdAt: z94.date(),
6610
- updatedAt: z94.date(),
6611
- deletedAt: z94.date().nullable(),
6612
- data: z94.string(),
6650
+ notificationObjectId: z96.string().uuid(),
6651
+ readAt: z96.date()
6652
+ });
6653
+ var NotificationObjectSchema = z96.object({
6654
+ id: z96.string().uuid(),
6655
+ createdAt: z96.date(),
6656
+ updatedAt: z96.date(),
6657
+ deletedAt: z96.date().nullable(),
6658
+ data: z96.string(),
6613
6659
  notificationChange: NotificationChangeSchema
6614
6660
  });
6615
- var NotificationSchema = z94.object({
6616
- id: z94.string().uuid(),
6617
- createdAt: z94.date(),
6618
- updatedAt: z94.date(),
6619
- deletedAt: z94.date().nullable(),
6620
- notificationObjectId: z94.string().uuid(),
6621
- notifierId: z94.string().uuid(),
6661
+ var NotificationSchema = z96.object({
6662
+ id: z96.string().uuid(),
6663
+ createdAt: z96.date(),
6664
+ updatedAt: z96.date(),
6665
+ deletedAt: z96.date().nullable(),
6666
+ notificationObjectId: z96.string().uuid(),
6667
+ notifierId: z96.string().uuid(),
6622
6668
  notificationObject: NotificationObjectSchema,
6623
- readAt: z94.date()
6669
+ readAt: z96.date()
6624
6670
  });
6625
6671
 
6626
6672
  // src/notification/validation.ts
6627
- var GetNotificationsRequestSchema = z95.object({
6628
- page: z95.coerce.number().default(1),
6629
- pageSize: z95.coerce.number().default(10)
6673
+ var GetNotificationsRequestSchema = z97.object({
6674
+ page: z97.coerce.number().default(1),
6675
+ pageSize: z97.coerce.number().default(10)
6630
6676
  });
6631
- var GetNotificationsResponseSchema = z95.object({
6632
- notificationCount: z95.number(),
6633
- notifications: z95.array(NotificationSchema),
6634
- total: z95.number(),
6635
- page: z95.number(),
6636
- pageSize: z95.number(),
6637
- lastPage: z95.number(),
6638
- totalUnreadCount: z95.number().optional()
6677
+ var GetNotificationsResponseSchema = z97.object({
6678
+ notificationCount: z97.number(),
6679
+ notifications: z97.array(NotificationSchema),
6680
+ total: z97.number(),
6681
+ page: z97.number(),
6682
+ pageSize: z97.number(),
6683
+ lastPage: z97.number(),
6684
+ totalUnreadCount: z97.number().optional()
6639
6685
  });
6640
- var ResetNotificationRequestSchema = z95.object({
6641
- userId: z95.string()
6686
+ var ResetNotificationRequestSchema = z97.object({
6687
+ userId: z97.string()
6642
6688
  });
6643
6689
 
6644
6690
  // src/notification/index.ts
@@ -6652,14 +6698,14 @@ var userNotificationContract = initContract37().router(
6652
6698
  200: DefaultSuccessResponseSchema.extend({
6653
6699
  data: GetNotificationsResponseSchema
6654
6700
  }),
6655
- 400: z96.object({
6656
- message: z96.string()
6701
+ 400: z98.object({
6702
+ message: z98.string()
6657
6703
  }),
6658
- 409: z96.object({
6659
- message: z96.string()
6704
+ 409: z98.object({
6705
+ message: z98.string()
6660
6706
  }),
6661
- 500: z96.object({
6662
- message: z96.string()
6707
+ 500: z98.object({
6708
+ message: z98.string()
6663
6709
  }),
6664
6710
  401: DefaultUnauthorizedSchema,
6665
6711
  404: DefaultNotFoundSchema,
@@ -6672,16 +6718,16 @@ var userNotificationContract = initContract37().router(
6672
6718
  path: "/new_notifications_count",
6673
6719
  responses: {
6674
6720
  200: DefaultSuccessResponseSchema.extend({
6675
- total: z96.number()
6721
+ total: z98.number()
6676
6722
  }),
6677
- 400: z96.object({
6678
- message: z96.string()
6723
+ 400: z98.object({
6724
+ message: z98.string()
6679
6725
  }),
6680
- 409: z96.object({
6681
- message: z96.string()
6726
+ 409: z98.object({
6727
+ message: z98.string()
6682
6728
  }),
6683
- 500: z96.object({
6684
- message: z96.string()
6729
+ 500: z98.object({
6730
+ message: z98.string()
6685
6731
  }),
6686
6732
  401: DefaultUnauthorizedSchema,
6687
6733
  404: DefaultNotFoundSchema,
@@ -6696,14 +6742,14 @@ var userNotificationContract = initContract37().router(
6696
6742
  201: DefaultSuccessResponseSchema.extend({
6697
6743
  data: UserSchema
6698
6744
  }),
6699
- 400: z96.object({
6700
- message: z96.string()
6745
+ 400: z98.object({
6746
+ message: z98.string()
6701
6747
  }),
6702
- 409: z96.object({
6703
- message: z96.string()
6748
+ 409: z98.object({
6749
+ message: z98.string()
6704
6750
  }),
6705
- 500: z96.object({
6706
- message: z96.string()
6751
+ 500: z98.object({
6752
+ message: z98.string()
6707
6753
  }),
6708
6754
  401: DefaultUnauthorizedSchema,
6709
6755
  404: DefaultNotFoundSchema,
@@ -6715,19 +6761,19 @@ var userNotificationContract = initContract37().router(
6715
6761
  readNotification: {
6716
6762
  method: "POST",
6717
6763
  path: "/read/:id",
6718
- pathParams: z96.object({ id: z96.string() }),
6764
+ pathParams: z98.object({ id: z98.string() }),
6719
6765
  responses: {
6720
6766
  201: DefaultSuccessResponseSchema.extend({
6721
6767
  data: NotificationSchema
6722
6768
  }),
6723
- 400: z96.object({
6724
- message: z96.string()
6769
+ 400: z98.object({
6770
+ message: z98.string()
6725
6771
  }),
6726
- 409: z96.object({
6727
- message: z96.string()
6772
+ 409: z98.object({
6773
+ message: z98.string()
6728
6774
  }),
6729
- 500: z96.object({
6730
- message: z96.string()
6775
+ 500: z98.object({
6776
+ message: z98.string()
6731
6777
  }),
6732
6778
  401: DefaultUnauthorizedSchema,
6733
6779
  404: DefaultNotFoundSchema,
@@ -6809,6 +6855,7 @@ export {
6809
6855
  dashboardContract,
6810
6856
  evaluateFormContract,
6811
6857
  extensionContract2 as extensionContract,
6858
+ mailContract,
6812
6859
  mainChatContract,
6813
6860
  notificationContract,
6814
6861
  permissionContract,