@kl1/contracts 1.1.4-uat → 1.1.4

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