@kl1/contracts 1.1.3-uat → 1.1.3

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 (47) hide show
  1. package/dist/index.js +890 -913
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +890 -912
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/chat/index.d.ts +54 -165
  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 +1674 -2659
  12. package/dist/src/contract.d.ts.map +1 -1
  13. package/dist/src/dashboard/index.d.ts +5 -1
  14. package/dist/src/dashboard/index.d.ts.map +1 -1
  15. package/dist/src/dashboard/validation.d.ts +10 -0
  16. package/dist/src/dashboard/validation.d.ts.map +1 -1
  17. package/dist/src/index.d.ts +0 -1
  18. package/dist/src/index.d.ts.map +1 -1
  19. package/dist/src/instagram/index.d.ts +7 -73
  20. package/dist/src/instagram/index.d.ts.map +1 -1
  21. package/dist/src/line/index.d.ts +7 -73
  22. package/dist/src/line/index.d.ts.map +1 -1
  23. package/dist/src/mail/account-contract.d.ts +136 -289
  24. package/dist/src/mail/account-contract.d.ts.map +1 -1
  25. package/dist/src/mail/index.d.ts +0 -10
  26. package/dist/src/mail/index.d.ts.map +1 -1
  27. package/dist/src/mail/mail-contract.d.ts +1162 -1775
  28. package/dist/src/mail/mail-contract.d.ts.map +1 -1
  29. package/dist/src/mail/mail-server-contract.d.ts +18 -477
  30. package/dist/src/mail/mail-server-contract.d.ts.map +1 -1
  31. package/dist/src/mail/message-contract.d.ts +54 -54
  32. package/dist/src/mail/room-contract.d.ts +954 -957
  33. package/dist/src/mail/room-contract.d.ts.map +1 -1
  34. package/dist/src/mail/schemas/account-validation.schema.d.ts +140 -140
  35. package/dist/src/mail/schemas/account-validation.schema.d.ts.map +1 -1
  36. package/dist/src/mail/schemas/account.schema.d.ts +32 -32
  37. package/dist/src/mail/schemas/message.schema.d.ts +42 -42
  38. package/dist/src/mail/schemas/message.schema.d.ts.map +1 -1
  39. package/dist/src/mail/schemas/room-validation.schema.d.ts +322 -325
  40. package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
  41. package/dist/src/mail/schemas/room.schema.d.ts +259 -683
  42. package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
  43. package/dist/src/messenger/index.d.ts +7 -73
  44. package/dist/src/messenger/index.d.ts.map +1 -1
  45. package/dist/src/viber/index.d.ts +7 -73
  46. package/dist/src/viber/index.d.ts.map +1 -1
  47. package/package.json +1 -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(),
@@ -3083,6 +3117,11 @@ var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
3083
3117
  agentId: z44.string().uuid().optional()
3084
3118
  })
3085
3119
  ).optional();
3120
+ var GetDashboardInOutQueryParamsSchema = GetDashboardQueryParamsSchema.merge(
3121
+ z44.object({
3122
+ direction: z44.string().optional()
3123
+ })
3124
+ );
3086
3125
 
3087
3126
  // src/dashboard/index.ts
3088
3127
  import z46 from "zod";
@@ -3414,7 +3453,7 @@ var dashboardContract = initContract12().router(
3414
3453
  method: "GET",
3415
3454
  path: "/call/tag",
3416
3455
  summary: "Get call tag data",
3417
- query: GetDashboardQueryParamsSchema,
3456
+ query: GetDashboardInOutQueryParamsSchema,
3418
3457
  headers: DefaultHeaderSchema,
3419
3458
  responses: {
3420
3459
  200: DefaultSuccessResponseSchema.extend({
@@ -3976,7 +4015,7 @@ import { initContract as initContract22 } from "@ts-rest/core";
3976
4015
 
3977
4016
  // src/mail/room-contract.ts
3978
4017
  import { initContract as initContract18 } from "@ts-rest/core";
3979
- import z60 from "zod";
4018
+ import z59 from "zod";
3980
4019
 
3981
4020
  // src/mail/schemas/room.schema.ts
3982
4021
  import z58 from "zod";
@@ -3990,12 +4029,12 @@ var MailServerSchema = z56.object({
3990
4029
  deletedAt: z56.date().nullable(),
3991
4030
  name: z56.string(),
3992
4031
  smtpHost: z56.string(),
3993
- smtpPort: z56.number(),
3994
- smtpTlsPort: z56.number(),
4032
+ smtpPort: z56.string(),
4033
+ smtpTlsPort: z56.string(),
3995
4034
  useTlsForSmtp: z56.boolean(),
3996
4035
  imapHost: z56.string(),
3997
- imapPort: z56.number(),
3998
- imapTlsPort: z56.number(),
4036
+ imapPort: z56.string(),
4037
+ imapTlsPort: z56.string(),
3999
4038
  useTlsForImap: z56.boolean()
4000
4039
  });
4001
4040
  var MailAccountSchema = z56.object({
@@ -4038,12 +4077,12 @@ var AttachmentSchema = z57.object({
4038
4077
  createdAt: z57.date(),
4039
4078
  updatedAt: z57.date(),
4040
4079
  deletedAt: z57.nullable(z57.date()),
4041
- bucketName: z57.string(),
4042
- fileName: z57.string(),
4043
- fileKey: z57.string(),
4044
- fileSize: z57.number(),
4045
- fileUrl: z57.string(),
4046
- 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()
4047
4086
  })
4048
4087
  });
4049
4088
  var MessageSchema2 = z57.object({
@@ -4097,7 +4136,7 @@ var UserModel = z58.object({
4097
4136
  email: z58.string(),
4098
4137
  address: z58.string().nullable(),
4099
4138
  phone: z58.string().nullable(),
4100
- notificationCount: z58.number().nullable()
4139
+ notification_count: z58.number().nullable()
4101
4140
  });
4102
4141
  var ActivityLogModel = z58.object({
4103
4142
  id: z58.string(),
@@ -4109,9 +4148,7 @@ var ActivityLogModel = z58.object({
4109
4148
  roomId: z58.string(),
4110
4149
  actor: UserModel
4111
4150
  });
4112
- var MessagesAndLogsSchema = z58.array(
4113
- z58.union([MessageSchema2, ActivityLogModel])
4114
- );
4151
+ var MessagesAndLogs = z58.array(z58.union([MessageSchema2, ActivityLogModel]));
4115
4152
  var MailRoomSchema = z58.object({
4116
4153
  id: z58.string(),
4117
4154
  createdAt: z58.date(),
@@ -4134,7 +4171,7 @@ var MailRoomSchema = z58.object({
4134
4171
  tags: z58.array(TagSchema2),
4135
4172
  assignee: UserModel,
4136
4173
  messages: z58.array(MessageSchema2),
4137
- messagesAndLogs: MessagesAndLogsSchema,
4174
+ messagesAndLogs: MessagesAndLogs,
4138
4175
  mail: MailAccountSchema,
4139
4176
  unReadMessageCount: z58.number()
4140
4177
  });
@@ -4148,54 +4185,6 @@ var AttachmentSchema2 = z58.object({
4148
4185
  upload: UploadSchema
4149
4186
  });
4150
4187
 
4151
- // src/mail/schemas/room-validation.schema.ts
4152
- import z59 from "zod";
4153
- var RoomContractsValidationSchema = {
4154
- getAll: {
4155
- input: z59.object({
4156
- page: z59.coerce.number().default(1),
4157
- pageSize: z59.coerce.number().default(10),
4158
- keyword: z59.string().optional(),
4159
- level1: z59.union([
4160
- z59.literal("open"),
4161
- z59.literal("close"),
4162
- z59.literal("inbox"),
4163
- z59.literal("sent"),
4164
- z59.literal("scheduled"),
4165
- z59.literal("starred")
4166
- ]).optional(),
4167
- level2: z59.union([
4168
- z59.literal("all"),
4169
- z59.literal("unassign"),
4170
- z59.literal("mine"),
4171
- z59.literal("other")
4172
- ]).optional()
4173
- }),
4174
- output: z59.object({
4175
- data: z59.array(MailRoomSchema),
4176
- total: z59.number(),
4177
- page: z59.number(),
4178
- pageSize: z59.number()
4179
- })
4180
- },
4181
- update: {
4182
- input: z59.object({
4183
- resolved: z59.boolean().or(
4184
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4185
- ).optional().nullable(),
4186
- assigneeId: z59.string().uuid().optional().nullable(),
4187
- note: z59.string().optional(),
4188
- tags: z59.array(z59.string().uuid()).optional(),
4189
- handover: z59.boolean().or(
4190
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4191
- ).optional().nullable(),
4192
- selfAssign: z59.boolean().or(
4193
- z59.union([z59.literal("true"), z59.literal("false")]).transform((value) => value.toLowerCase() === "true")
4194
- ).optional().nullable()
4195
- })
4196
- }
4197
- };
4198
-
4199
4188
  // src/mail/room-contract.ts
4200
4189
  var roomContract = initContract18().router(
4201
4190
  {
@@ -4204,7 +4193,7 @@ var roomContract = initContract18().router(
4204
4193
  path: "/",
4205
4194
  responses: {
4206
4195
  200: DefaultSuccessResponseSchema.extend({
4207
- message: z60.string()
4196
+ message: z59.string()
4208
4197
  }),
4209
4198
  ...DefaultResponses
4210
4199
  },
@@ -4214,13 +4203,19 @@ var roomContract = initContract18().router(
4214
4203
  getAll: {
4215
4204
  method: "GET",
4216
4205
  path: "",
4217
- 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
+ }),
4218
4213
  responses: {
4219
4214
  200: DefaultSuccessResponseSchema.extend({
4220
- data: z60.array(MailRoomSchema),
4221
- total: z60.number(),
4222
- page: z60.number(),
4223
- pageSize: z60.number()
4215
+ data: z59.array(MailRoomSchema),
4216
+ total: z59.number(),
4217
+ page: z59.number(),
4218
+ pageSize: z59.number()
4224
4219
  }),
4225
4220
  ...DefaultResponses
4226
4221
  },
@@ -4229,8 +4224,8 @@ var roomContract = initContract18().router(
4229
4224
  getById: {
4230
4225
  method: "GET",
4231
4226
  path: "/:id",
4232
- pathParams: z60.object({
4233
- id: z60.string().uuid()
4227
+ pathParams: z59.object({
4228
+ id: z59.string().uuid()
4234
4229
  }),
4235
4230
  responses: {
4236
4231
  200: DefaultSuccessResponseSchema.extend({
@@ -4243,12 +4238,12 @@ var roomContract = initContract18().router(
4243
4238
  getAttachments: {
4244
4239
  method: "GET",
4245
4240
  path: "/:id/attachments",
4246
- pathParams: z60.object({
4247
- id: z60.string().uuid()
4241
+ pathParams: z59.object({
4242
+ id: z59.string().uuid()
4248
4243
  }),
4249
4244
  responses: {
4250
4245
  200: DefaultSuccessResponseSchema.extend({
4251
- data: z60.array(AttachmentSchema2)
4246
+ data: z59.array(AttachmentSchema2)
4252
4247
  }),
4253
4248
  ...DefaultResponses
4254
4249
  },
@@ -4257,12 +4252,12 @@ var roomContract = initContract18().router(
4257
4252
  getParticipants: {
4258
4253
  method: "GET",
4259
4254
  path: "/:id/participants",
4260
- pathParams: z60.object({
4261
- id: z60.string().uuid()
4255
+ pathParams: z59.object({
4256
+ id: z59.string().uuid()
4262
4257
  }),
4263
4258
  responses: {
4264
4259
  200: DefaultSuccessResponseSchema.extend({
4265
- data: z60.array(MailUserSchema)
4260
+ data: z59.array(MailUserSchema)
4266
4261
  }),
4267
4262
  ...DefaultResponses
4268
4263
  },
@@ -4271,8 +4266,8 @@ var roomContract = initContract18().router(
4271
4266
  update: {
4272
4267
  method: "PATCH",
4273
4268
  path: "/:id",
4274
- pathParams: z60.object({
4275
- id: z60.string()
4269
+ pathParams: z59.object({
4270
+ id: z59.string()
4276
4271
  }),
4277
4272
  responses: {
4278
4273
  200: DefaultSuccessResponseSchema.extend({
@@ -4280,18 +4275,28 @@ var roomContract = initContract18().router(
4280
4275
  }),
4281
4276
  ...DefaultResponses
4282
4277
  },
4283
- 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
+ }),
4284
4289
  summary: "Update a mail room by id"
4285
4290
  },
4286
4291
  markAsRead: {
4287
4292
  method: "GET",
4288
4293
  path: "/:id",
4289
- pathParams: z60.object({
4290
- id: z60.string().uuid()
4294
+ pathParams: z59.object({
4295
+ id: z59.string().uuid()
4291
4296
  }),
4292
4297
  responses: {
4293
4298
  200: DefaultSuccessResponseSchema.extend({
4294
- message: z60.string()
4299
+ message: z59.string()
4295
4300
  }),
4296
4301
  ...DefaultResponses
4297
4302
  },
@@ -4305,47 +4310,47 @@ var roomContract = initContract18().router(
4305
4310
 
4306
4311
  // src/mail/account-contract.ts
4307
4312
  import { initContract as initContract19 } from "@ts-rest/core";
4308
- import z62 from "zod";
4313
+ import z61 from "zod";
4309
4314
 
4310
4315
  // src/mail/schemas/account-validation.schema.ts
4311
- import z61 from "zod";
4316
+ import z60 from "zod";
4312
4317
  var AccountContractsValidationSchemas = {
4313
4318
  create: {
4314
- input: z61.object({
4315
- address: z61.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
4316
- name: z61.string().min(1, "Account name cannot be empty."),
4317
- password: z61.string().min(1, "Password cannot be empty."),
4318
- 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")
4319
4324
  })
4320
4325
  },
4321
4326
  getById: {
4322
- input: z61.object({
4323
- id: z61.string().uuid()
4327
+ input: z60.object({
4328
+ id: z60.string().uuid()
4324
4329
  }),
4325
4330
  output: MailAccountSchema
4326
4331
  },
4327
4332
  getAll: {
4328
- output: z61.array(MailAccountSchema)
4333
+ output: z60.array(MailAccountSchema)
4329
4334
  },
4330
4335
  update: {
4331
4336
  input: MailAccountSchema,
4332
4337
  output: MailAccountSchema
4333
4338
  },
4334
4339
  disconnect: {
4335
- input: z61.object({
4336
- id: z61.string().uuid()
4340
+ input: z60.object({
4341
+ id: z60.string().uuid()
4337
4342
  }),
4338
4343
  output: MailAccountSchema
4339
4344
  },
4340
4345
  reconnect: {
4341
- input: z61.object({
4342
- id: z61.string()
4346
+ input: z60.object({
4347
+ id: z60.string()
4343
4348
  }),
4344
4349
  output: MailAccountSchema
4345
4350
  },
4346
4351
  delete: {
4347
- input: z61.object({
4348
- id: z61.string()
4352
+ input: z60.object({
4353
+ id: z60.string()
4349
4354
  }),
4350
4355
  output: MailAccountSchema
4351
4356
  }
@@ -4361,16 +4366,16 @@ var accountContract = initContract19().router(
4361
4366
  responses: {
4362
4367
  201: DefaultSuccessResponseSchema.extend({
4363
4368
  // data: AccountContractsValidationSchemas.create.output,
4364
- message: z62.string()
4369
+ message: z61.string()
4365
4370
  }),
4366
- 400: z62.object({
4367
- message: z62.string()
4371
+ 400: z61.object({
4372
+ message: z61.string()
4368
4373
  }),
4369
- 409: z62.object({
4370
- message: z62.string()
4374
+ 409: z61.object({
4375
+ message: z61.string()
4371
4376
  }),
4372
- 500: z62.object({
4373
- message: z62.string()
4377
+ 500: z61.object({
4378
+ message: z61.string()
4374
4379
  }),
4375
4380
  ...DefaultResponses
4376
4381
  },
@@ -4399,19 +4404,20 @@ var accountContract = initContract19().router(
4399
4404
  path: "",
4400
4405
  responses: {
4401
4406
  200: DefaultSuccessResponseSchema.extend({
4402
- data: z62.array(MailAccountSchema)
4407
+ data: z61.any()
4408
+ // data: AccountContractsValidationSchemas.getAll.output,
4403
4409
  }),
4404
4410
  ...DefaultResponses
4405
4411
  },
4406
- summary: "Get all accounts"
4412
+ summary: "Get al accounts"
4407
4413
  },
4408
4414
  //#endregion get all accounts
4409
4415
  //#region ........update account
4410
4416
  update: {
4411
4417
  method: "PATCH",
4412
4418
  path: "/:id",
4413
- pathParams: z62.object({
4414
- id: z62.string().uuid()
4419
+ pathParams: z61.object({
4420
+ id: z61.string().uuid()
4415
4421
  }),
4416
4422
  responses: {
4417
4423
  201: DefaultSuccessResponseSchema.extend({
@@ -4460,7 +4466,7 @@ var accountContract = initContract19().router(
4460
4466
  pathParams: AccountContractsValidationSchemas.delete.input,
4461
4467
  responses: {
4462
4468
  200: DefaultSuccessResponseSchema.extend({
4463
- message: z62.string()
4469
+ message: z61.string()
4464
4470
  }),
4465
4471
  ...DefaultResponses
4466
4472
  },
@@ -4477,91 +4483,64 @@ var accountContract = initContract19().router(
4477
4483
 
4478
4484
  // src/mail/mail-server-contract.ts
4479
4485
  import { initContract as initContract20 } from "@ts-rest/core";
4480
- import z64 from "zod";
4481
-
4482
- // src/mail/schemas/servers-validation.schema.ts
4483
- import z63 from "zod";
4484
- var CreateMailServerSchema = z63.object({
4485
- name: z63.string(),
4486
- smtpHost: z63.string(),
4487
- smtpPort: z63.number(),
4488
- smtpTlsPort: z63.number(),
4489
- useTlsForSmtp: z63.boolean(),
4490
- imapHost: z63.string(),
4491
- imapPort: z63.number(),
4492
- imapTlsPort: z63.number(),
4493
- useTlsForImap: z63.boolean()
4494
- });
4495
-
4496
- // src/mail/mail-server-contract.ts
4486
+ import z62 from "zod";
4497
4487
  var serverContract = initContract20().router(
4498
4488
  {
4499
4489
  create: {
4500
4490
  method: "POST",
4501
4491
  path: "/",
4502
4492
  responses: {
4503
- 201: DefaultSuccessResponseSchema.extend({
4504
- data: MailServerSchema
4493
+ 200: DefaultSuccessResponseSchema.extend({
4494
+ message: z62.string()
4505
4495
  }),
4506
4496
  ...DefaultResponses
4507
4497
  },
4508
- body: CreateMailServerSchema,
4498
+ body: null,
4509
4499
  summary: "Register a new mail server"
4510
4500
  },
4511
- getById: {
4501
+ get: {
4512
4502
  method: "GET",
4513
4503
  path: "/:id",
4514
- pathParams: z64.object({
4515
- id: z64.string().uuid()
4504
+ pathParams: z62.object({
4505
+ id: z62.string()
4516
4506
  }),
4517
4507
  responses: {
4518
4508
  200: DefaultSuccessResponseSchema.extend({
4519
- data: MailServerSchema
4509
+ message: z62.string()
4520
4510
  }),
4521
4511
  ...DefaultResponses
4522
4512
  },
4523
4513
  summary: "Get a mail server by id"
4524
4514
  },
4525
- getAll: {
4526
- method: "GET",
4527
- path: "/",
4528
- responses: {
4529
- 200: DefaultSuccessResponseSchema.extend({
4530
- data: z64.array(MailServerSchema)
4531
- }),
4532
- ...DefaultResponses
4533
- },
4534
- summary: "Get all mail servers"
4535
- },
4536
4515
  update: {
4537
4516
  method: "PATCH",
4538
4517
  path: "/:id",
4539
- pathParams: z64.object({
4540
- id: z64.string().uuid()
4518
+ pathParams: z62.object({
4519
+ id: z62.string()
4541
4520
  }),
4542
4521
  responses: {
4543
4522
  200: DefaultSuccessResponseSchema.extend({
4544
- data: MailServerSchema
4523
+ message: z62.string()
4545
4524
  }),
4546
4525
  ...DefaultResponses
4547
4526
  },
4548
- body: CreateMailServerSchema.partial(),
4549
- summary: "Update a mail server"
4527
+ body: null,
4528
+ summary: "Update a mail server by id"
4550
4529
  },
4551
4530
  delete: {
4552
- method: "DELETE",
4531
+ method: "PATCH",
4553
4532
  path: "/:id",
4554
- pathParams: z64.object({
4555
- id: z64.string().uuid()
4533
+ pathParams: z62.object({
4534
+ id: z62.string()
4556
4535
  }),
4557
4536
  responses: {
4558
4537
  200: DefaultSuccessResponseSchema.extend({
4559
- data: MailServerSchema
4538
+ message: z62.string()
4560
4539
  }),
4561
4540
  ...DefaultResponses
4562
4541
  },
4563
4542
  body: null,
4564
- summary: "Delete a mail server"
4543
+ summary: "Delete a mail server by id"
4565
4544
  }
4566
4545
  },
4567
4546
  {
@@ -4571,44 +4550,44 @@ var serverContract = initContract20().router(
4571
4550
 
4572
4551
  // src/mail/message-contract.ts
4573
4552
  import { initContract as initContract21 } from "@ts-rest/core";
4574
- import z66 from "zod";
4553
+ import z64 from "zod";
4575
4554
 
4576
4555
  // src/mail/schemas/message-validation.schema.ts
4577
- import z65 from "zod";
4578
- var MailParticipant = z65.object({
4579
- name: z65.string().optional(),
4580
- address: z65.string().email()
4556
+ import z63 from "zod";
4557
+ var MailParticipant = z63.object({
4558
+ name: z63.string().optional(),
4559
+ address: z63.string().email()
4581
4560
  });
4582
4561
  var MessageContractsValidationsSchema = {
4583
4562
  submit: {
4584
- input: z65.object({
4585
- subject: z65.string(),
4586
- text: z65.string(),
4587
- html: z65.string(),
4563
+ input: z63.object({
4564
+ subject: z63.string(),
4565
+ text: z63.string(),
4566
+ html: z63.string(),
4588
4567
  from: MailParticipant,
4589
- to: z65.array(MailParticipant),
4590
- cc: z65.array(MailParticipant).optional(),
4591
- bcc: z65.array(MailParticipant).optional(),
4592
- reference: z65.object({
4593
- messageId: z65.string(),
4594
- 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")])
4595
4574
  }).optional(),
4596
- attachments: z65.array(
4597
- z65.object({
4598
- fileType: z65.string(),
4599
- fileName: z65.string(),
4600
- fileKey: z65.string(),
4601
- fileSize: z65.number(),
4602
- bucketName: z65.string(),
4603
- 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()
4604
4583
  })
4605
4584
  ).optional()
4606
4585
  }),
4607
- output: z65.object({
4608
- response: z65.string(),
4609
- messageId: z65.string(),
4610
- sendAt: z65.string(),
4611
- queueId: z65.string()
4586
+ output: z63.object({
4587
+ response: z63.string(),
4588
+ messageId: z63.string(),
4589
+ sendAt: z63.string(),
4590
+ queueId: z63.string()
4612
4591
  })
4613
4592
  }
4614
4593
  };
@@ -4633,8 +4612,8 @@ var messageContract = initContract21().router(
4633
4612
  getById: {
4634
4613
  method: "GET",
4635
4614
  path: "/:id",
4636
- pathParams: z66.object({
4637
- id: z66.string()
4615
+ pathParams: z64.object({
4616
+ id: z64.string()
4638
4617
  }),
4639
4618
  responses: {
4640
4619
  200: DefaultSuccessResponseSchema.extend({
@@ -4661,7 +4640,7 @@ var mailContract = initContract22().router({
4661
4640
 
4662
4641
  // src/messenger/index.ts
4663
4642
  import { initContract as initContract23 } from "@ts-rest/core";
4664
- import z67 from "zod";
4643
+ import z65 from "zod";
4665
4644
  var messengerContract = initContract23().router({
4666
4645
  sendMessage: {
4667
4646
  method: "POST",
@@ -4695,8 +4674,8 @@ var messengerContract = initContract23().router({
4695
4674
  reconnect: {
4696
4675
  method: "POST",
4697
4676
  path: "/reconnect/:channelId",
4698
- pathParams: z67.object({
4699
- channelId: z67.string().uuid()
4677
+ pathParams: z65.object({
4678
+ channelId: z65.string().uuid()
4700
4679
  }),
4701
4680
  body: null,
4702
4681
  responses: {
@@ -4708,8 +4687,8 @@ var messengerContract = initContract23().router({
4708
4687
  delete: {
4709
4688
  method: "DELETE",
4710
4689
  path: "/delete/:channelId",
4711
- pathParams: z67.object({
4712
- channelId: z67.string().uuid()
4690
+ pathParams: z65.object({
4691
+ channelId: z65.string().uuid()
4713
4692
  }),
4714
4693
  body: null,
4715
4694
  responses: {
@@ -4741,7 +4720,7 @@ var messengerContract = initContract23().router({
4741
4720
 
4742
4721
  // src/permission/index.ts
4743
4722
  import { initContract as initContract24 } from "@ts-rest/core";
4744
- import z68 from "zod";
4723
+ import z66 from "zod";
4745
4724
  var permissionContract = initContract24().router(
4746
4725
  {
4747
4726
  getPermissions: {
@@ -4749,9 +4728,9 @@ var permissionContract = initContract24().router(
4749
4728
  path: "",
4750
4729
  headers: DefaultHeaderSchema,
4751
4730
  responses: {
4752
- 200: z68.object({ permissions: PermissionSchema.array() }),
4753
- 400: z68.object({
4754
- message: z68.string()
4731
+ 200: z66.object({ permissions: PermissionSchema.array() }),
4732
+ 400: z66.object({
4733
+ message: z66.string()
4755
4734
  }),
4756
4735
  401: DefaultUnauthorizedSchema,
4757
4736
  500: DefaultErrorResponseSchema
@@ -4764,15 +4743,15 @@ var permissionContract = initContract24().router(
4764
4743
 
4765
4744
  // src/role/index.ts
4766
4745
  import { initContract as initContract25 } from "@ts-rest/core";
4767
- import z70 from "zod";
4746
+ import z68 from "zod";
4768
4747
 
4769
4748
  // src/role/validation.ts
4770
- import { z as z69 } from "zod";
4771
- var CreateRoleSchema = z69.object({
4772
- systemName: z69.string(),
4773
- displayName: z69.string(),
4774
- description: z69.string().nullable(),
4775
- 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())
4776
4755
  });
4777
4756
  var UpdateRoleSchema = CreateRoleSchema;
4778
4757
 
@@ -4788,8 +4767,8 @@ var roleContract = initContract25().router(
4788
4767
  201: DefaultSuccessResponseSchema.extend({
4789
4768
  role: RoleSchema
4790
4769
  }),
4791
- 400: z70.object({
4792
- message: z70.string()
4770
+ 400: z68.object({
4771
+ message: z68.string()
4793
4772
  }),
4794
4773
  401: DefaultUnauthorizedSchema,
4795
4774
  500: DefaultErrorResponseSchema
@@ -4799,15 +4778,15 @@ var roleContract = initContract25().router(
4799
4778
  getRoles: {
4800
4779
  method: "GET",
4801
4780
  path: "",
4802
- query: z70.object({
4803
- page: z70.coerce.number().default(1),
4804
- pageSize: z70.coerce.number().default(10)
4781
+ query: z68.object({
4782
+ page: z68.coerce.number().default(1),
4783
+ pageSize: z68.coerce.number().default(10)
4805
4784
  }).optional(),
4806
4785
  headers: DefaultHeaderSchema,
4807
4786
  responses: {
4808
4787
  200: WithPagination(RoleSchema),
4809
- 400: z70.object({
4810
- message: z70.string()
4788
+ 400: z68.object({
4789
+ message: z68.string()
4811
4790
  }),
4812
4791
  401: DefaultUnauthorizedSchema,
4813
4792
  500: DefaultErrorResponseSchema
@@ -4817,15 +4796,15 @@ var roleContract = initContract25().router(
4817
4796
  updateRole: {
4818
4797
  method: "PATCH",
4819
4798
  path: "/:id",
4820
- pathParams: z70.object({ id: z70.string() }),
4799
+ pathParams: z68.object({ id: z68.string() }),
4821
4800
  headers: DefaultHeaderSchema,
4822
4801
  body: UpdateRoleSchema,
4823
4802
  responses: {
4824
4803
  201: DefaultSuccessResponseSchema.extend({
4825
4804
  role: RoleSchema
4826
4805
  }),
4827
- 400: z70.object({
4828
- message: z70.string()
4806
+ 400: z68.object({
4807
+ message: z68.string()
4829
4808
  }),
4830
4809
  401: DefaultUnauthorizedSchema,
4831
4810
  500: DefaultErrorResponseSchema
@@ -4835,11 +4814,11 @@ var roleContract = initContract25().router(
4835
4814
  deleteRole: {
4836
4815
  method: "DELETE",
4837
4816
  path: "/:id",
4838
- pathParams: z70.object({ id: z70.string() }),
4817
+ pathParams: z68.object({ id: z68.string() }),
4839
4818
  headers: DefaultHeaderSchema,
4840
4819
  body: null,
4841
4820
  responses: {
4842
- 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4821
+ 200: DefaultSuccessResponseSchema.extend({ message: z68.string() }),
4843
4822
  500: DefaultErrorResponseSchema
4844
4823
  },
4845
4824
  summary: "Delete a role."
@@ -4850,19 +4829,19 @@ var roleContract = initContract25().router(
4850
4829
 
4851
4830
  // src/tag/index.ts
4852
4831
  import { initContract as initContract26 } from "@ts-rest/core";
4853
- import z72 from "zod";
4832
+ import z70 from "zod";
4854
4833
 
4855
4834
  // src/tag/validation.ts
4856
- import { z as z71 } from "zod";
4857
- var CreateTagSchema = z71.object({
4858
- name: z71.string(),
4835
+ import { z as z69 } from "zod";
4836
+ var CreateTagSchema = z69.object({
4837
+ name: z69.string(),
4859
4838
  group: TagGroupSchema
4860
4839
  });
4861
- var GetTagsSchema = z71.object({
4840
+ var GetTagsSchema = z69.object({
4862
4841
  group: TagGroupSchema.default("general"),
4863
- keyword: z71.string()
4842
+ keyword: z69.string()
4864
4843
  }).partial().optional();
4865
- var UpdateTagSchema = z71.object({ name: z71.string() });
4844
+ var UpdateTagSchema = z69.object({ name: z69.string() });
4866
4845
 
4867
4846
  // src/tag/index.ts
4868
4847
  var tagContract = initContract26().router(
@@ -4885,7 +4864,7 @@ var tagContract = initContract26().router(
4885
4864
  query: GetTagsSchema,
4886
4865
  responses: {
4887
4866
  200: DefaultSuccessResponseSchema.extend({
4888
- tags: z72.array(TagSchema)
4867
+ tags: z70.array(TagSchema)
4889
4868
  }),
4890
4869
  500: DefaultErrorResponseSchema
4891
4870
  },
@@ -4894,7 +4873,7 @@ var tagContract = initContract26().router(
4894
4873
  updateTag: {
4895
4874
  method: "PATCH",
4896
4875
  path: "/:id",
4897
- pathParams: z72.object({ id: z72.string() }),
4876
+ pathParams: z70.object({ id: z70.string() }),
4898
4877
  body: UpdateTagSchema,
4899
4878
  responses: {
4900
4879
  200: DefaultSuccessResponseSchema.extend({
@@ -4907,11 +4886,11 @@ var tagContract = initContract26().router(
4907
4886
  deleteTag: {
4908
4887
  method: "DELETE",
4909
4888
  path: "/:id",
4910
- pathParams: z72.object({ id: z72.string() }),
4911
- body: z72.any().optional(),
4889
+ pathParams: z70.object({ id: z70.string() }),
4890
+ body: z70.any().optional(),
4912
4891
  // We don't need the body.
4913
4892
  responses: {
4914
- 200: DefaultSuccessResponseSchema.extend({ message: z72.string() }),
4893
+ 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
4915
4894
  500: DefaultErrorResponseSchema
4916
4895
  },
4917
4896
  headers: DefaultHeaderSchema
@@ -4924,27 +4903,27 @@ var tagContract = initContract26().router(
4924
4903
 
4925
4904
  // src/telephony-agent-presence-status/index.ts
4926
4905
  import { initContract as initContract27 } from "@ts-rest/core";
4927
- import z75 from "zod";
4906
+ import z73 from "zod";
4928
4907
 
4929
4908
  // src/telephony-agent-presence-status/schema.ts
4930
- import z73 from "zod";
4909
+ import z71 from "zod";
4931
4910
  var PresenceStatusSchema = DefaultEntitySchema.extend({
4932
- status: z73.string(),
4933
- description: z73.string()
4911
+ status: z71.string(),
4912
+ description: z71.string()
4934
4913
  });
4935
4914
  var UserPresenceStatusSchema = DefaultEntitySchema.extend({
4936
4915
  user: UserSchema,
4937
4916
  presenceStatus: PresenceStatusSchema,
4938
- customPresenceStatus: z73.string().nullable().optional()
4917
+ customPresenceStatus: z71.string().nullable().optional()
4939
4918
  });
4940
4919
 
4941
4920
  // src/telephony-agent-presence-status/validation.ts
4942
- import { z as z74 } from "zod";
4943
- var UpdateUserStatusSchema = z74.object({
4944
- userId: z74.string(),
4945
- presenceStatusId: z74.string().nullable().optional(),
4946
- customPreseneStatus: z74.string().nullable().optional(),
4947
- 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()
4948
4927
  });
4949
4928
 
4950
4929
  // src/telephony-agent-presence-status/index.ts
@@ -4955,9 +4934,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4955
4934
  path: "/presence_status",
4956
4935
  headers: DefaultHeaderSchema,
4957
4936
  responses: {
4958
- 200: z75.array(PresenceStatusSchema),
4959
- 400: z75.object({
4960
- message: z75.string()
4937
+ 200: z73.array(PresenceStatusSchema),
4938
+ 400: z73.object({
4939
+ message: z73.string()
4961
4940
  }),
4962
4941
  401: DefaultUnauthorizedSchema,
4963
4942
  500: DefaultErrorResponseSchema
@@ -4969,9 +4948,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4969
4948
  path: "/agents/presence_status",
4970
4949
  headers: DefaultHeaderSchema,
4971
4950
  responses: {
4972
- 200: z75.array(UserPresenceStatusSchema),
4973
- 400: z75.object({
4974
- message: z75.string()
4951
+ 200: z73.array(UserPresenceStatusSchema),
4952
+ 400: z73.object({
4953
+ message: z73.string()
4975
4954
  }),
4976
4955
  401: DefaultUnauthorizedSchema,
4977
4956
  500: DefaultErrorResponseSchema
@@ -4981,12 +4960,12 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
4981
4960
  getAgentStatus: {
4982
4961
  method: "GET",
4983
4962
  path: "/presence_status/check_update/:userId",
4984
- pathParams: z75.object({ userId: z75.string() }),
4963
+ pathParams: z73.object({ userId: z73.string() }),
4985
4964
  headers: DefaultHeaderSchema,
4986
4965
  responses: {
4987
4966
  200: UserPresenceStatusSchema,
4988
- 400: z75.object({
4989
- message: z75.string()
4967
+ 400: z73.object({
4968
+ message: z73.string()
4990
4969
  }),
4991
4970
  401: DefaultUnauthorizedSchema,
4992
4971
  500: DefaultErrorResponseSchema
@@ -5002,8 +4981,8 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
5002
4981
  200: DefaultSuccessResponseSchema.extend({
5003
4982
  userPresenceStatu: UserPresenceStatusSchema
5004
4983
  }),
5005
- 400: z75.object({
5006
- message: z75.string()
4984
+ 400: z73.object({
4985
+ message: z73.string()
5007
4986
  }),
5008
4987
  401: DefaultUnauthorizedSchema,
5009
4988
  500: DefaultErrorResponseSchema
@@ -5015,62 +4994,62 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
5015
4994
  );
5016
4995
 
5017
4996
  // src/telephony-cdr/index.ts
5018
- import z78 from "zod";
4997
+ import z76 from "zod";
5019
4998
 
5020
4999
  // src/telephony-cdr/validation.ts
5021
- import z76 from "zod";
5022
- var CreateTelephonyCdrSchema = z76.object({
5023
- uniqueCallId: z76.string({ required_error: "uniqueCallId is required" }),
5024
- timeStart: z76.string({ required_error: "timeStart is required" }),
5025
- callFrom: z76.string({ required_error: "callFrom is required" }),
5026
- callTo: z76.string({ required_error: "callTo is required" }),
5027
- callDuration: z76.number().nullable(),
5028
- talkDuration: z76.number().nullable(),
5029
- srcTrunkName: z76.string().nullable(),
5030
- dstTrunkName: z76.string().nullable(),
5031
- pinCode: z76.string().nullable(),
5032
- status: z76.string(),
5033
- type: z76.string(),
5034
- recording: z76.string().nullable(),
5035
- didNumber: z76.string().nullable(),
5036
- 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()
5037
5016
  });
5038
5017
  var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5039
- selectedDate: z76.string().optional(),
5040
- type: z76.array(z76.string()).optional(),
5041
- status: z76.array(z76.string()).optional(),
5042
- callFrom: z76.string().optional(),
5043
- callTo: z76.string().optional(),
5044
- trunk: z76.array(z76.string()).optional(),
5045
- userId: z76.string().uuid().optional(),
5046
- queueStatus: z76.string().optional(),
5047
- agentIds: z76.array(z76.string().uuid()).optional(),
5048
- agentCallsOnly: z76.coerce.boolean().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()
5049
5028
  });
5050
5029
  var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
5051
- type: z76.array(z76.string()).optional(),
5052
- status: z76.array(z76.string()).optional(),
5053
- callFrom: z76.string().optional(),
5054
- callTo: z76.string().optional(),
5055
- result: z76.array(z76.string()).optional(),
5056
- callTags: z76.array(z76.string()).optional(),
5057
- selectedDate: z76.string().optional(),
5058
- agentId: z76.string().optional(),
5059
- contact: z76.array(z76.string()).optional(),
5060
- callStatus: z76.array(z76.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5061
- queueIds: z76.array(z76.string()).optional(),
5062
- notes: z76.string().optional()
5030
+ type: z74.array(z74.string()).optional(),
5031
+ status: z74.array(z74.string()).optional(),
5032
+ callFrom: z74.string().optional(),
5033
+ callTo: z74.string().optional(),
5034
+ result: z74.array(z74.string()).optional(),
5035
+ callTags: z74.array(z74.string()).optional(),
5036
+ selectedDate: z74.string().optional(),
5037
+ agentId: z74.string().optional(),
5038
+ contact: z74.array(z74.string()).optional(),
5039
+ callStatus: z74.array(z74.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
5040
+ queueIds: z74.array(z74.string()).optional(),
5041
+ notes: z74.string().optional()
5063
5042
  });
5064
5043
  var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
5065
- z76.object({
5066
- page: z76.coerce.number().positive().optional(),
5067
- pageSize: z76.coerce.number().positive().optional()
5044
+ z74.object({
5045
+ page: z74.coerce.number().positive().optional(),
5046
+ pageSize: z74.coerce.number().positive().optional()
5068
5047
  })
5069
5048
  );
5070
5049
  var NullEmptyStringUndefined = ["", null, void 0];
5071
5050
  var EmtptyArrayUndefined = [[], void 0];
5072
5051
  var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5073
- reportType: z76.enum([
5052
+ reportType: z74.enum([
5074
5053
  "extcallstatistics",
5075
5054
  "extcallactivity",
5076
5055
  "trunkactivity",
@@ -5080,52 +5059,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5080
5059
  "queueagentmisscalls",
5081
5060
  "queueagentinoutcalls"
5082
5061
  ]),
5083
- selectedDate: z76.string().optional(),
5084
- communicationType: z76.union([z76.literal("Inbound"), z76.literal("Outbound"), z76.literal("Internal")]).optional(),
5085
- time: z76.string().optional(),
5086
- queueList: z76.array(z76.string()).optional(),
5087
- queueId: z76.string().optional(),
5088
- trunkList: z76.array(z76.string()).optional(),
5089
- extensionList: z76.array(z76.string()).optional()
5062
+ selectedDate: z74.string().optional(),
5063
+ communicationType: z74.union([z74.literal("Inbound"), z74.literal("Outbound"), z74.literal("Internal")]).optional(),
5064
+ time: z74.string().optional(),
5065
+ queueList: z74.array(z74.string()).optional(),
5066
+ queueId: z74.string().optional(),
5067
+ trunkList: z74.array(z74.string()).optional(),
5068
+ extensionList: z74.array(z74.string()).optional()
5090
5069
  }).superRefine((input, ctx) => {
5091
5070
  if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
5092
5071
  ctx.addIssue({
5093
- code: z76.ZodIssueCode.custom,
5072
+ code: z74.ZodIssueCode.custom,
5094
5073
  path: ["selectedDate"],
5095
5074
  message: "selectedDate is required."
5096
5075
  });
5097
5076
  }
5098
5077
  if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
5099
5078
  ctx.addIssue({
5100
- code: z76.ZodIssueCode.custom,
5079
+ code: z74.ZodIssueCode.custom,
5101
5080
  path: ["time"],
5102
5081
  message: "time is required."
5103
5082
  });
5104
5083
  }
5105
5084
  if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
5106
5085
  ctx.addIssue({
5107
- code: z76.ZodIssueCode.custom,
5086
+ code: z74.ZodIssueCode.custom,
5108
5087
  path: ["queueList"],
5109
5088
  message: "queueList is required."
5110
5089
  });
5111
5090
  }
5112
5091
  if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
5113
5092
  ctx.addIssue({
5114
- code: z76.ZodIssueCode.custom,
5093
+ code: z74.ZodIssueCode.custom,
5115
5094
  path: ["queueId"],
5116
5095
  message: "queueId is required."
5117
5096
  });
5118
5097
  }
5119
5098
  if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
5120
5099
  ctx.addIssue({
5121
- code: z76.ZodIssueCode.custom,
5100
+ code: z74.ZodIssueCode.custom,
5122
5101
  path: ["trunkList"],
5123
5102
  message: "trunkList is required."
5124
5103
  });
5125
5104
  }
5126
5105
  if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
5127
5106
  ctx.addIssue({
5128
- code: z76.ZodIssueCode.custom,
5107
+ code: z74.ZodIssueCode.custom,
5129
5108
  path: ["extensionList"],
5130
5109
  message: "extensionList is required."
5131
5110
  });
@@ -5136,161 +5115,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5136
5115
  import { initContract as initContract28 } from "@ts-rest/core";
5137
5116
 
5138
5117
  // src/telephony-cdr/call-report.schema.ts
5139
- import z77 from "zod";
5140
- var ExtCallStatisticsListSchema = z77.object({
5118
+ import z75 from "zod";
5119
+ var ExtCallStatisticsListSchema = z75.object({
5141
5120
  /** @example "ext_num" */
5142
- ext_num: z77.string(),
5121
+ ext_num: z75.string(),
5143
5122
  /** @example "ext_name" */
5144
- ext_name: z77.string(),
5123
+ ext_name: z75.string(),
5145
5124
  /** @example 0 */
5146
- answered_calls: z77.number(),
5125
+ answered_calls: z75.number(),
5147
5126
  /** @example 0 */
5148
- no_answer_calls: z77.number(),
5127
+ no_answer_calls: z75.number(),
5149
5128
  /** @example 0 */
5150
- busy_calls: z77.number(),
5129
+ busy_calls: z75.number(),
5151
5130
  /** @example 0 */
5152
- failed_calls: z77.number(),
5131
+ failed_calls: z75.number(),
5153
5132
  /** @example 0 */
5154
- voicemail_calls: z77.number(),
5133
+ voicemail_calls: z75.number(),
5155
5134
  /** @example 0 */
5156
- total_holding_time: z77.number(),
5135
+ total_holding_time: z75.number(),
5157
5136
  /** @example 0 */
5158
- total_talking_time: z77.number(),
5137
+ total_talking_time: z75.number(),
5159
5138
  /** @example "src_name" */
5160
- src_name: z77.string(),
5139
+ src_name: z75.string(),
5161
5140
  /** @example 0 */
5162
- total_call_count: z77.number(),
5141
+ total_call_count: z75.number(),
5163
5142
  /** @example "mobile" */
5164
- mobile: z77.string()
5165
- });
5166
- var ExtStatisticSchema = z77.object({
5167
- ext_num: z77.string(),
5168
- ext_name: z77.string(),
5169
- answered_calls: z77.number(),
5170
- no_answer_calls: z77.number(),
5171
- busy_calls: z77.number(),
5172
- failed_calls: z77.number(),
5173
- voicemail_calls: z77.number(),
5174
- total_holding_time: z77.number(),
5175
- total_talking_time: z77.number(),
5176
- time: z77.number(),
5177
- mobile: z77.string()
5178
- });
5179
- var ExtCallActivityListSchema = z77.object({
5180
- time: z77.number(),
5181
- answered_calls: z77.number(),
5182
- no_answer_calls: z77.number(),
5183
- busy_calls: z77.number(),
5184
- failed_calls: z77.number(),
5185
- voicemail_calls: z77.number(),
5186
- total_holding_time: z77.number(),
5187
- total_talking_time: z77.number(),
5188
- ext_statistics: z77.array(ExtStatisticSchema)
5189
- });
5190
- var TrunkList = z77.object({
5191
- trunk_name: z77.string(),
5192
- total_calls: z77.number()
5193
- });
5194
- var TrunkActivityListSchema = z77.object({
5195
- time: z77.number(),
5196
- trunk_list: z77.array(TrunkList)
5197
- });
5198
- var QueueAvgWaitTalkTimeListSchema = z77.object({
5199
- time: z77.number(),
5200
- avg_wait_time: z77.number(),
5201
- avg_talk_time: z77.number()
5202
- });
5203
- var SatisfactionListSchema = z77.object({
5204
- press_key: z77.string(),
5205
- total: z77.number(),
5206
- key_point: z77.number().optional()
5207
- });
5208
- var agentListSchema = z77.object({
5209
- agent_name: z77.string(),
5210
- agent_num: z77.string(),
5211
- satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5212
- total_key: z77.number().optional(),
5213
- total_point: z77.number().optional(),
5214
- average_point: z77.number().optional()
5215
- });
5216
- var QueueSatisfactionSchema = z77.object({
5217
- queue_name: z77.string(),
5218
- queue_num: z77.string(),
5219
- satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5220
- agent_list: z77.array(agentListSchema).optional(),
5221
- total_key: z77.number().optional(),
5222
- total_point: z77.number().optional(),
5223
- average_point: z77.number().optional()
5224
- });
5225
- var QueuePerformanceListSchema = z77.object({
5226
- queue: z77.string(),
5227
- total_calls: z77.number(),
5228
- answered_calls: z77.number(),
5229
- missed_calls: z77.number(),
5230
- abandoned_calls: z77.number(),
5231
- average_waiting_time: z77.number(),
5232
- average_talking_time: z77.number(),
5233
- max_waiting_time: z77.number(),
5234
- answered_rate: z77.number(),
5235
- missed_rate: z77.number(),
5236
- abandoned_rate: z77.number(),
5237
- sla: z77.number()
5238
- });
5239
- var QueueAgentMissCallsListSchema = z77.object({
5240
- agent_name: z77.string(),
5241
- agent_num: z77.string(),
5242
- time: z77.string(),
5243
- total_wait_time: z77.number(),
5244
- src_name: z77.string(),
5245
- src_num: z77.string(),
5246
- queue_status: z77.string(),
5247
- polling_attempts: z77.number(),
5248
- missed_reason: z77.string()
5249
- });
5250
- var QueueAgentInOutCallsListSchema = z77.object({
5251
- agent_name: z77.string(),
5252
- agent_num: z77.string(),
5253
- inbound_calls: z77.number(),
5254
- inbound_duration: z77.number(),
5255
- outbound_calls: z77.number(),
5256
- outbound_duration: z77.number(),
5257
- total_calls: z77.number(),
5258
- total_duration: z77.number(),
5259
- average_talk_duration: z77.number()
5260
- });
5261
- var CallReportModel = z77.object({
5262
- errcode: z77.number(),
5263
- errmsg: z77.string(),
5264
- total_number: z77.number(),
5265
- is_12hour: z77.number().optional(),
5266
- ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5267
- ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5268
- trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5269
- queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5143
+ mobile: z75.string()
5144
+ });
5145
+ var ExtStatisticSchema = z75.object({
5146
+ ext_num: z75.string(),
5147
+ ext_name: z75.string(),
5148
+ answered_calls: z75.number(),
5149
+ no_answer_calls: z75.number(),
5150
+ busy_calls: z75.number(),
5151
+ failed_calls: z75.number(),
5152
+ voicemail_calls: z75.number(),
5153
+ total_holding_time: z75.number(),
5154
+ total_talking_time: z75.number(),
5155
+ time: z75.number(),
5156
+ mobile: z75.string()
5157
+ });
5158
+ var ExtCallActivityListSchema = z75.object({
5159
+ time: z75.number(),
5160
+ answered_calls: z75.number(),
5161
+ no_answer_calls: z75.number(),
5162
+ busy_calls: z75.number(),
5163
+ failed_calls: z75.number(),
5164
+ voicemail_calls: z75.number(),
5165
+ total_holding_time: z75.number(),
5166
+ total_talking_time: z75.number(),
5167
+ ext_statistics: z75.array(ExtStatisticSchema)
5168
+ });
5169
+ var TrunkList = z75.object({
5170
+ trunk_name: z75.string(),
5171
+ total_calls: z75.number()
5172
+ });
5173
+ var TrunkActivityListSchema = z75.object({
5174
+ time: z75.number(),
5175
+ trunk_list: z75.array(TrunkList)
5176
+ });
5177
+ var QueueAvgWaitTalkTimeListSchema = z75.object({
5178
+ time: z75.number(),
5179
+ avg_wait_time: z75.number(),
5180
+ avg_talk_time: z75.number()
5181
+ });
5182
+ var SatisfactionListSchema = z75.object({
5183
+ press_key: z75.string(),
5184
+ total: z75.number(),
5185
+ key_point: z75.number().optional()
5186
+ });
5187
+ var agentListSchema = z75.object({
5188
+ agent_name: z75.string(),
5189
+ agent_num: z75.string(),
5190
+ satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5191
+ total_key: z75.number().optional(),
5192
+ total_point: z75.number().optional(),
5193
+ average_point: z75.number().optional()
5194
+ });
5195
+ var QueueSatisfactionSchema = z75.object({
5196
+ queue_name: z75.string(),
5197
+ queue_num: z75.string(),
5198
+ satisfaction_list: z75.array(SatisfactionListSchema).optional(),
5199
+ agent_list: z75.array(agentListSchema).optional(),
5200
+ total_key: z75.number().optional(),
5201
+ total_point: z75.number().optional(),
5202
+ average_point: z75.number().optional()
5203
+ });
5204
+ var QueuePerformanceListSchema = z75.object({
5205
+ queue: z75.string(),
5206
+ total_calls: z75.number(),
5207
+ answered_calls: z75.number(),
5208
+ missed_calls: z75.number(),
5209
+ abandoned_calls: z75.number(),
5210
+ average_waiting_time: z75.number(),
5211
+ average_talking_time: z75.number(),
5212
+ max_waiting_time: z75.number(),
5213
+ answered_rate: z75.number(),
5214
+ missed_rate: z75.number(),
5215
+ abandoned_rate: z75.number(),
5216
+ sla: z75.number()
5217
+ });
5218
+ var QueueAgentMissCallsListSchema = z75.object({
5219
+ agent_name: z75.string(),
5220
+ agent_num: z75.string(),
5221
+ time: z75.string(),
5222
+ total_wait_time: z75.number(),
5223
+ src_name: z75.string(),
5224
+ src_num: z75.string(),
5225
+ queue_status: z75.string(),
5226
+ polling_attempts: z75.number(),
5227
+ missed_reason: z75.string()
5228
+ });
5229
+ var QueueAgentInOutCallsListSchema = z75.object({
5230
+ agent_name: z75.string(),
5231
+ agent_num: z75.string(),
5232
+ inbound_calls: z75.number(),
5233
+ inbound_duration: z75.number(),
5234
+ outbound_calls: z75.number(),
5235
+ outbound_duration: z75.number(),
5236
+ total_calls: z75.number(),
5237
+ total_duration: z75.number(),
5238
+ average_talk_duration: z75.number()
5239
+ });
5240
+ var CallReportModel = z75.object({
5241
+ errcode: z75.number(),
5242
+ errmsg: z75.string(),
5243
+ total_number: z75.number(),
5244
+ is_12hour: z75.number().optional(),
5245
+ ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5246
+ ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5247
+ trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5248
+ queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5270
5249
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5271
- queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5272
- queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5273
- queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5274
- callback_result: z77.string(),
5275
- page: z77.number().optional(),
5276
- pageSize: z77.number().optional()
5277
- });
5278
- var CallReportSchema = z77.object({
5279
- errcode: z77.number(),
5280
- errmsg: z77.string(),
5281
- total_number: z77.number(),
5282
- is_12hour: z77.number().optional(),
5283
- ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5284
- ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5285
- trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5286
- queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5250
+ queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5251
+ queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5252
+ queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5253
+ callback_result: z75.string(),
5254
+ page: z75.number().optional(),
5255
+ pageSize: z75.number().optional()
5256
+ });
5257
+ var CallReportSchema = z75.object({
5258
+ errcode: z75.number(),
5259
+ errmsg: z75.string(),
5260
+ total_number: z75.number(),
5261
+ is_12hour: z75.number().optional(),
5262
+ ext_call_statistics_list: z75.array(ExtCallStatisticsListSchema).optional(),
5263
+ ext_call_activity_list: z75.array(ExtCallActivityListSchema).optional(),
5264
+ trunk_activity_list: z75.array(TrunkActivityListSchema).optional(),
5265
+ queue_avg_wait_talk_time_list: z75.array(QueueAvgWaitTalkTimeListSchema).optional(),
5287
5266
  queue_satisfaction: QueueSatisfactionSchema.optional(),
5288
- queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5289
- queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5290
- queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5291
- callback_result: z77.string(),
5292
- page: z77.number().optional(),
5293
- pageSize: z77.number().optional()
5267
+ queue_performance_list: z75.array(QueuePerformanceListSchema).optional(),
5268
+ queue_agent_miss_calls_list: z75.array(QueueAgentMissCallsListSchema).optional(),
5269
+ queue_agent_in_out_calls_list: z75.array(QueueAgentInOutCallsListSchema).optional(),
5270
+ callback_result: z75.string(),
5271
+ page: z75.number().optional(),
5272
+ pageSize: z75.number().optional()
5294
5273
  });
5295
5274
 
5296
5275
  // src/telephony-cdr/index.ts
@@ -5303,10 +5282,10 @@ var telephonyCdrContract = initContract28().router(
5303
5282
  query: GetAllTelephonyCdrSchema,
5304
5283
  responses: {
5305
5284
  200: DefaultSuccessResponseSchema.extend({
5306
- total: z78.number(),
5307
- page: z78.number(),
5308
- pageSize: z78.number(),
5309
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5285
+ total: z76.number(),
5286
+ page: z76.number(),
5287
+ pageSize: z76.number(),
5288
+ telephonyCdrs: z76.array(TelephonyCdrSchema)
5310
5289
  }),
5311
5290
  401: DefaultUnauthorizedSchema
5312
5291
  },
@@ -5319,10 +5298,10 @@ var telephonyCdrContract = initContract28().router(
5319
5298
  query: GetAllTelephonyCdrSchema,
5320
5299
  responses: {
5321
5300
  200: DefaultSuccessResponseSchema.extend({
5322
- total: z78.number(),
5323
- page: z78.number(),
5324
- pageSize: z78.number(),
5325
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5301
+ total: z76.number(),
5302
+ page: z76.number(),
5303
+ pageSize: z76.number(),
5304
+ telephonyCdrs: z76.array(TelephonyCdrSchema)
5326
5305
  }),
5327
5306
  401: DefaultUnauthorizedSchema
5328
5307
  },
@@ -5335,10 +5314,10 @@ var telephonyCdrContract = initContract28().router(
5335
5314
  query: GetRecentTelephonyCdrSchema,
5336
5315
  responses: {
5337
5316
  200: DefaultSuccessResponseSchema.extend({
5338
- total: z78.number(),
5339
- page: z78.number(),
5340
- pageSize: z78.number(),
5341
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5317
+ total: z76.number(),
5318
+ page: z76.number(),
5319
+ pageSize: z76.number(),
5320
+ telephonyCdrs: z76.array(TelephonyCdrSchema)
5342
5321
  }),
5343
5322
  401: DefaultUnauthorizedSchema
5344
5323
  },
@@ -5430,35 +5409,35 @@ var telephonyCdrContract = initContract28().router(
5430
5409
 
5431
5410
  // src/telephony-extension/index.ts
5432
5411
  import { initContract as initContract29 } from "@ts-rest/core";
5433
- import z80 from "zod";
5412
+ import z78 from "zod";
5434
5413
 
5435
5414
  // src/telephony-extension/schema.ts
5436
- import z79 from "zod";
5437
- var TelephonyExtensionSchema3 = z79.object({
5438
- errcode: z79.coerce.number(),
5439
- errmsg: z79.string(),
5440
- total_number: z79.coerce.number(),
5441
- data: z79.array(
5442
- z79.object({
5443
- id: z79.coerce.number(),
5444
- online_status: z79.object({
5445
- fx_phone: z79.object({ status: z79.coerce.number() }),
5446
- sip_phone: z79.object({
5447
- status: z79.coerce.number(),
5448
- ext_dev_type: z79.string().optional()
5449
- }),
5450
- linkus_desktop: z79.object({ status: z79.coerce.number() }),
5451
- linkus_mobile: z79.object({ status: z79.coerce.number() }),
5452
- linkus_web: z79.object({
5453
- status: z79.coerce.number(),
5454
- ext_dev_type: z79.string().optional()
5415
+ import z77 from "zod";
5416
+ var TelephonyExtensionSchema3 = z77.object({
5417
+ errcode: z77.coerce.number(),
5418
+ errmsg: z77.string(),
5419
+ total_number: z77.coerce.number(),
5420
+ data: z77.array(
5421
+ z77.object({
5422
+ id: z77.coerce.number(),
5423
+ online_status: z77.object({
5424
+ fx_phone: z77.object({ status: z77.coerce.number() }),
5425
+ sip_phone: z77.object({
5426
+ status: z77.coerce.number(),
5427
+ ext_dev_type: z77.string().optional()
5428
+ }),
5429
+ linkus_desktop: z77.object({ status: z77.coerce.number() }),
5430
+ linkus_mobile: z77.object({ status: z77.coerce.number() }),
5431
+ linkus_web: z77.object({
5432
+ status: z77.coerce.number(),
5433
+ ext_dev_type: z77.string().optional()
5455
5434
  })
5456
5435
  }).optional(),
5457
- presence_status: z79.string().optional(),
5458
- number: z79.string().optional(),
5459
- caller_id_name: z79.string().optional(),
5460
- role_name: z79.string().optional(),
5461
- email_addr: z79.string().optional()
5436
+ presence_status: z77.string().optional(),
5437
+ number: z77.string().optional(),
5438
+ caller_id_name: z77.string().optional(),
5439
+ role_name: z77.string().optional(),
5440
+ email_addr: z77.string().optional()
5462
5441
  })
5463
5442
  )
5464
5443
  });
@@ -5473,8 +5452,8 @@ var telephonyExtensionContract = initContract29().router(
5473
5452
  query: null,
5474
5453
  responses: {
5475
5454
  200: TelephonyExtensionSchema3,
5476
- 400: z80.object({
5477
- message: z80.string()
5455
+ 400: z78.object({
5456
+ message: z78.string()
5478
5457
  }),
5479
5458
  401: DefaultUnauthorizedSchema,
5480
5459
  500: DefaultErrorResponseSchema
@@ -5487,10 +5466,10 @@ var telephonyExtensionContract = initContract29().router(
5487
5466
 
5488
5467
  // src/ticket/index.ts
5489
5468
  import { initContract as initContract30 } from "@ts-rest/core";
5490
- import z82 from "zod";
5469
+ import z80 from "zod";
5491
5470
 
5492
5471
  // src/ticket/validation.ts
5493
- import z81 from "zod";
5472
+ import z79 from "zod";
5494
5473
  var addErrorMessage2 = (field) => {
5495
5474
  return field.refine(
5496
5475
  ({ isRequired, value }) => {
@@ -5508,106 +5487,106 @@ var addErrorMessage2 = (field) => {
5508
5487
  }
5509
5488
  );
5510
5489
  };
5511
- var BaseSchema3 = z81.object({
5512
- isRequired: z81.boolean(),
5513
- attributeId: z81.string()
5490
+ var BaseSchema3 = z79.object({
5491
+ isRequired: z79.boolean(),
5492
+ attributeId: z79.string()
5514
5493
  });
5515
5494
  var SingleValue2 = addErrorMessage2(
5516
5495
  BaseSchema3.extend({
5517
- value: z81.string()
5496
+ value: z79.string()
5518
5497
  })
5519
5498
  );
5520
- var CreateTicketValidationSchema = z81.object({
5499
+ var CreateTicketValidationSchema = z79.object({
5521
5500
  title: SingleValue2,
5522
5501
  description: SingleValue2,
5523
5502
  status: SingleValue2,
5524
5503
  type: SingleValue2,
5525
5504
  priority: SingleValue2,
5526
5505
  contact: SingleValue2,
5527
- assignee: z81.object({
5528
- isRequired: z81.boolean(),
5529
- attributeId: z81.string(),
5530
- value: z81.string()
5506
+ assignee: z79.object({
5507
+ isRequired: z79.boolean(),
5508
+ attributeId: z79.string(),
5509
+ value: z79.string()
5531
5510
  }),
5532
5511
  channel: SingleValue2,
5533
- tags: addErrorMessage2(BaseSchema3.extend({ value: z81.array(z81.string()) })),
5534
- categories: BaseSchema3.extend({ value: z81.array(z81.string()) }),
5535
- customFields: z81.array(
5512
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z79.array(z79.string()) })),
5513
+ categories: BaseSchema3.extend({ value: z79.array(z79.string()) }),
5514
+ customFields: z79.array(
5536
5515
  addErrorMessage2(
5537
5516
  BaseSchema3.extend({
5538
- value: z81.union([z81.string(), z81.array(z81.string())]),
5539
- type: z81.string(),
5540
- isDefaultAttribute: z81.boolean()
5517
+ value: z79.union([z79.string(), z79.array(z79.string())]),
5518
+ type: z79.string(),
5519
+ isDefaultAttribute: z79.boolean()
5541
5520
  })
5542
5521
  )
5543
5522
  ),
5544
- reasonToAssign: z81.object({ value: z81.string() }).optional()
5523
+ reasonToAssign: z79.object({ value: z79.string() }).optional()
5545
5524
  });
5546
5525
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5547
- var TicketAttachmentRecordSchema = z81.object({
5548
- bucketName: z81.string(),
5549
- fileKey: z81.string(),
5550
- fileName: z81.string(),
5551
- fileSize: z81.coerce.number(),
5552
- url: z81.string()
5553
- });
5554
- var CreateTicketAttachmentRecordsSchema = z81.object({
5555
- ticketId: z81.string(),
5556
- attributeId: z81.string(),
5557
- ticketAttachmentRecords: z81.array(TicketAttachmentRecordSchema)
5558
- });
5559
- var TicketParamsSchema = z81.object({
5560
- page: z81.coerce.number().default(1),
5561
- pageSize: z81.coerce.number().default(10)
5562
- });
5563
- var CustomFieldQuery = z81.object({
5564
- attributeId: z81.string(),
5565
- type: z81.string(),
5566
- value: z81.union([z81.string(), z81.array(z81.string())])
5567
- });
5568
- var GetAllTicketQuerySchema = z81.object({
5569
- page: z81.string().transform((value) => Number(value)),
5570
- pageSize: z81.string().transform((value) => Number(value)),
5571
- selectedDate: z81.string(),
5572
- keyword: z81.string(),
5573
- title: z81.string(),
5574
- description: z81.string(),
5575
- status: z81.array(z81.string()),
5576
- priority: z81.array(z81.string()),
5577
- channel: z81.array(z81.string()),
5578
- type: z81.array(z81.string()),
5579
- ticketType: z81.array(z81.string()),
5580
- contact: z81.array(z81.string()),
5581
- tags: z81.array(z81.string().uuid()),
5582
- categories: z81.array(z81.string().uuid()),
5583
- assignee: z81.array(z81.string().uuid()),
5584
- customFields: z81.array(
5585
- z81.object({
5586
- attributeId: z81.string().uuid(),
5587
- type: z81.string(),
5588
- value: z81.union([z81.string(), z81.array(z81.string())])
5526
+ var TicketAttachmentRecordSchema = z79.object({
5527
+ bucketName: z79.string(),
5528
+ fileKey: z79.string(),
5529
+ fileName: z79.string(),
5530
+ fileSize: z79.coerce.number(),
5531
+ url: z79.string()
5532
+ });
5533
+ var CreateTicketAttachmentRecordsSchema = z79.object({
5534
+ ticketId: z79.string(),
5535
+ attributeId: z79.string(),
5536
+ ticketAttachmentRecords: z79.array(TicketAttachmentRecordSchema)
5537
+ });
5538
+ var TicketParamsSchema = z79.object({
5539
+ page: z79.coerce.number().default(1),
5540
+ pageSize: z79.coerce.number().default(10)
5541
+ });
5542
+ var CustomFieldQuery = z79.object({
5543
+ attributeId: z79.string(),
5544
+ type: z79.string(),
5545
+ value: z79.union([z79.string(), z79.array(z79.string())])
5546
+ });
5547
+ var GetAllTicketQuerySchema = z79.object({
5548
+ page: z79.string().transform((value) => Number(value)),
5549
+ pageSize: z79.string().transform((value) => Number(value)),
5550
+ selectedDate: z79.string(),
5551
+ keyword: z79.string(),
5552
+ title: z79.string(),
5553
+ description: z79.string(),
5554
+ status: z79.array(z79.string()),
5555
+ priority: z79.array(z79.string()),
5556
+ channel: z79.array(z79.string()),
5557
+ type: z79.array(z79.string()),
5558
+ ticketType: z79.array(z79.string()),
5559
+ contact: z79.array(z79.string()),
5560
+ tags: z79.array(z79.string().uuid()),
5561
+ categories: z79.array(z79.string().uuid()),
5562
+ assignee: z79.array(z79.string().uuid()),
5563
+ customFields: z79.array(
5564
+ z79.object({
5565
+ attributeId: z79.string().uuid(),
5566
+ type: z79.string(),
5567
+ value: z79.union([z79.string(), z79.array(z79.string())])
5589
5568
  })
5590
5569
  )
5591
5570
  }).partial();
5592
- var ExportAllTicketQuerySchema = z81.object({
5593
- agent: z81.array(z81.string()),
5594
- selectedDate: z81.string(),
5595
- keyword: z81.string(),
5596
- title: z81.string(),
5597
- description: z81.string(),
5598
- status: z81.array(z81.string()),
5599
- priority: z81.array(z81.string()),
5600
- channel: z81.array(z81.string()),
5601
- type: z81.array(z81.string()),
5602
- ticketType: z81.array(z81.string()),
5603
- contact: z81.array(z81.string()),
5604
- tags: z81.array(z81.string()),
5605
- categories: z81.array(z81.string()),
5606
- customFields: z81.array(
5607
- z81.object({
5608
- attributeId: z81.string().uuid(),
5609
- type: z81.string(),
5610
- value: z81.union([z81.string(), z81.array(z81.string())])
5571
+ var ExportAllTicketQuerySchema = z79.object({
5572
+ agent: z79.array(z79.string()),
5573
+ selectedDate: z79.string(),
5574
+ keyword: z79.string(),
5575
+ title: z79.string(),
5576
+ description: z79.string(),
5577
+ status: z79.array(z79.string()),
5578
+ priority: z79.array(z79.string()),
5579
+ channel: z79.array(z79.string()),
5580
+ type: z79.array(z79.string()),
5581
+ ticketType: z79.array(z79.string()),
5582
+ contact: z79.array(z79.string()),
5583
+ tags: z79.array(z79.string()),
5584
+ categories: z79.array(z79.string()),
5585
+ customFields: z79.array(
5586
+ z79.object({
5587
+ attributeId: z79.string().uuid(),
5588
+ type: z79.string(),
5589
+ value: z79.union([z79.string(), z79.array(z79.string())])
5611
5590
  })
5612
5591
  )
5613
5592
  }).partial();
@@ -5623,14 +5602,14 @@ var ticketContract = initContract30().router(
5623
5602
  201: DefaultSuccessResponseSchema.extend({
5624
5603
  data: TicketSchema
5625
5604
  }),
5626
- 400: z82.object({
5627
- message: z82.string()
5605
+ 400: z80.object({
5606
+ message: z80.string()
5628
5607
  }),
5629
- 409: z82.object({
5630
- message: z82.string()
5608
+ 409: z80.object({
5609
+ message: z80.string()
5631
5610
  }),
5632
- 500: z82.object({
5633
- message: z82.string()
5611
+ 500: z80.object({
5612
+ message: z80.string()
5634
5613
  }),
5635
5614
  401: DefaultUnauthorizedSchema,
5636
5615
  404: DefaultNotFoundSchema,
@@ -5651,8 +5630,8 @@ var ticketContract = initContract30().router(
5651
5630
  TicketSchema
5652
5631
  )
5653
5632
  }),
5654
- 400: z82.object({
5655
- message: z82.string()
5633
+ 400: z80.object({
5634
+ message: z80.string()
5656
5635
  }),
5657
5636
  401: DefaultUnauthorizedSchema,
5658
5637
  500: DefaultErrorResponseSchema
@@ -5662,14 +5641,14 @@ var ticketContract = initContract30().router(
5662
5641
  getTicketById: {
5663
5642
  method: "GET",
5664
5643
  path: "/:id",
5665
- pathParams: z82.object({ id: z82.string() }),
5644
+ pathParams: z80.object({ id: z80.string() }),
5666
5645
  headers: DefaultHeaderSchema,
5667
5646
  responses: {
5668
5647
  200: DefaultSuccessResponseSchema.extend({
5669
5648
  data: TicketSchema
5670
5649
  }),
5671
- 400: z82.object({
5672
- message: z82.string()
5650
+ 400: z80.object({
5651
+ message: z80.string()
5673
5652
  }),
5674
5653
  401: DefaultUnauthorizedSchema,
5675
5654
  500: DefaultErrorResponseSchema
@@ -5679,15 +5658,15 @@ var ticketContract = initContract30().router(
5679
5658
  getTicketByContactId: {
5680
5659
  method: "GET",
5681
5660
  path: "/contact/:id",
5682
- pathParams: z82.object({ id: z82.string() }),
5661
+ pathParams: z80.object({ id: z80.string() }),
5683
5662
  query: TicketParamsSchema,
5684
5663
  headers: DefaultHeaderSchema,
5685
5664
  responses: {
5686
5665
  200: DefaultSuccessResponseSchema.extend({
5687
5666
  data: WithPagination(TicketSchema)
5688
5667
  }),
5689
- 400: z82.object({
5690
- message: z82.string()
5668
+ 400: z80.object({
5669
+ message: z80.string()
5691
5670
  }),
5692
5671
  401: DefaultUnauthorizedSchema,
5693
5672
  500: DefaultErrorResponseSchema
@@ -5697,21 +5676,21 @@ var ticketContract = initContract30().router(
5697
5676
  updateTicket: {
5698
5677
  method: "PATCH",
5699
5678
  path: "/:id",
5700
- pathParams: z82.object({ id: z82.string() }),
5679
+ pathParams: z80.object({ id: z80.string() }),
5701
5680
  body: UpdateTicketValidationSchema,
5702
5681
  headers: DefaultHeaderSchema,
5703
5682
  responses: {
5704
5683
  201: DefaultSuccessResponseSchema.extend({
5705
5684
  data: TicketSchema
5706
5685
  }),
5707
- 400: z82.object({
5708
- message: z82.string()
5686
+ 400: z80.object({
5687
+ message: z80.string()
5709
5688
  }),
5710
- 409: z82.object({
5711
- message: z82.string()
5689
+ 409: z80.object({
5690
+ message: z80.string()
5712
5691
  }),
5713
- 500: z82.object({
5714
- message: z82.string()
5692
+ 500: z80.object({
5693
+ message: z80.string()
5715
5694
  }),
5716
5695
  401: DefaultUnauthorizedSchema,
5717
5696
  404: DefaultNotFoundSchema,
@@ -5722,11 +5701,11 @@ var ticketContract = initContract30().router(
5722
5701
  deleteTicket: {
5723
5702
  method: "DELETE",
5724
5703
  path: "/:id",
5725
- pathParams: z82.object({ id: z82.string() }),
5704
+ pathParams: z80.object({ id: z80.string() }),
5726
5705
  headers: DefaultHeaderSchema,
5727
5706
  body: null,
5728
5707
  responses: {
5729
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5708
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5730
5709
  500: DefaultErrorResponseSchema
5731
5710
  },
5732
5711
  summary: "Delete a extension."
@@ -5734,19 +5713,19 @@ var ticketContract = initContract30().router(
5734
5713
  updateDescription: {
5735
5714
  method: "PATCH",
5736
5715
  path: "/description/update/:id",
5737
- pathParams: z82.object({ id: z82.string() }),
5738
- body: z82.object({ description: z82.string() }),
5716
+ pathParams: z80.object({ id: z80.string() }),
5717
+ body: z80.object({ description: z80.string() }),
5739
5718
  headers: DefaultHeaderSchema,
5740
5719
  responses: {
5741
- 201: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5742
- 400: z82.object({
5743
- message: z82.string()
5720
+ 201: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5721
+ 400: z80.object({
5722
+ message: z80.string()
5744
5723
  }),
5745
- 409: z82.object({
5746
- message: z82.string()
5724
+ 409: z80.object({
5725
+ message: z80.string()
5747
5726
  }),
5748
- 500: z82.object({
5749
- message: z82.string()
5727
+ 500: z80.object({
5728
+ message: z80.string()
5750
5729
  }),
5751
5730
  401: DefaultUnauthorizedSchema,
5752
5731
  404: DefaultNotFoundSchema,
@@ -5757,19 +5736,19 @@ var ticketContract = initContract30().router(
5757
5736
  updateTitle: {
5758
5737
  method: "PATCH",
5759
5738
  path: "/title/update/:id",
5760
- pathParams: z82.object({ id: z82.string() }),
5761
- body: z82.object({ title: z82.string() }),
5739
+ pathParams: z80.object({ id: z80.string() }),
5740
+ body: z80.object({ title: z80.string() }),
5762
5741
  headers: DefaultHeaderSchema,
5763
5742
  responses: {
5764
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5765
- 400: z82.object({
5766
- message: z82.string()
5743
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5744
+ 400: z80.object({
5745
+ message: z80.string()
5767
5746
  }),
5768
- 409: z82.object({
5769
- message: z82.string()
5747
+ 409: z80.object({
5748
+ message: z80.string()
5770
5749
  }),
5771
- 500: z82.object({
5772
- message: z82.string()
5750
+ 500: z80.object({
5751
+ message: z80.string()
5773
5752
  }),
5774
5753
  401: DefaultUnauthorizedSchema,
5775
5754
  404: DefaultNotFoundSchema,
@@ -5780,19 +5759,19 @@ var ticketContract = initContract30().router(
5780
5759
  updateType: {
5781
5760
  method: "PATCH",
5782
5761
  path: "/type/update/:id",
5783
- pathParams: z82.object({ id: z82.string() }),
5784
- body: z82.object({ type: z82.string() }),
5762
+ pathParams: z80.object({ id: z80.string() }),
5763
+ body: z80.object({ type: z80.string() }),
5785
5764
  headers: DefaultHeaderSchema,
5786
5765
  responses: {
5787
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5788
- 400: z82.object({
5789
- message: z82.string()
5766
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5767
+ 400: z80.object({
5768
+ message: z80.string()
5790
5769
  }),
5791
- 409: z82.object({
5792
- message: z82.string()
5770
+ 409: z80.object({
5771
+ message: z80.string()
5793
5772
  }),
5794
- 500: z82.object({
5795
- message: z82.string()
5773
+ 500: z80.object({
5774
+ message: z80.string()
5796
5775
  }),
5797
5776
  401: DefaultUnauthorizedSchema,
5798
5777
  404: DefaultNotFoundSchema,
@@ -5803,19 +5782,19 @@ var ticketContract = initContract30().router(
5803
5782
  updateStatus: {
5804
5783
  method: "PATCH",
5805
5784
  path: "/status/update/:id",
5806
- pathParams: z82.object({ id: z82.string() }),
5807
- body: z82.object({ status: z82.string() }),
5785
+ pathParams: z80.object({ id: z80.string() }),
5786
+ body: z80.object({ status: z80.string() }),
5808
5787
  headers: DefaultHeaderSchema,
5809
5788
  responses: {
5810
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5811
- 400: z82.object({
5812
- message: z82.string()
5789
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5790
+ 400: z80.object({
5791
+ message: z80.string()
5813
5792
  }),
5814
- 409: z82.object({
5815
- message: z82.string()
5793
+ 409: z80.object({
5794
+ message: z80.string()
5816
5795
  }),
5817
- 500: z82.object({
5818
- message: z82.string()
5796
+ 500: z80.object({
5797
+ message: z80.string()
5819
5798
  }),
5820
5799
  401: DefaultUnauthorizedSchema,
5821
5800
  404: DefaultNotFoundSchema,
@@ -5826,19 +5805,19 @@ var ticketContract = initContract30().router(
5826
5805
  updatePriority: {
5827
5806
  method: "PATCH",
5828
5807
  path: "/priority/update/:id",
5829
- pathParams: z82.object({ id: z82.string() }),
5830
- body: z82.object({ priority: z82.string() }),
5808
+ pathParams: z80.object({ id: z80.string() }),
5809
+ body: z80.object({ priority: z80.string() }),
5831
5810
  headers: DefaultHeaderSchema,
5832
5811
  responses: {
5833
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5834
- 400: z82.object({
5835
- message: z82.string()
5812
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5813
+ 400: z80.object({
5814
+ message: z80.string()
5836
5815
  }),
5837
- 409: z82.object({
5838
- message: z82.string()
5816
+ 409: z80.object({
5817
+ message: z80.string()
5839
5818
  }),
5840
- 500: z82.object({
5841
- message: z82.string()
5819
+ 500: z80.object({
5820
+ message: z80.string()
5842
5821
  }),
5843
5822
  401: DefaultUnauthorizedSchema,
5844
5823
  404: DefaultNotFoundSchema,
@@ -5849,19 +5828,19 @@ var ticketContract = initContract30().router(
5849
5828
  updateChannel: {
5850
5829
  method: "PATCH",
5851
5830
  path: "/channel/update/:id",
5852
- pathParams: z82.object({ id: z82.string() }),
5853
- body: z82.object({ channel: z82.string() }),
5831
+ pathParams: z80.object({ id: z80.string() }),
5832
+ body: z80.object({ channel: z80.string() }),
5854
5833
  headers: DefaultHeaderSchema,
5855
5834
  responses: {
5856
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5857
- 400: z82.object({
5858
- message: z82.string()
5835
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5836
+ 400: z80.object({
5837
+ message: z80.string()
5859
5838
  }),
5860
- 409: z82.object({
5861
- message: z82.string()
5839
+ 409: z80.object({
5840
+ message: z80.string()
5862
5841
  }),
5863
- 500: z82.object({
5864
- message: z82.string()
5842
+ 500: z80.object({
5843
+ message: z80.string()
5865
5844
  }),
5866
5845
  401: DefaultUnauthorizedSchema,
5867
5846
  404: DefaultNotFoundSchema,
@@ -5872,19 +5851,19 @@ var ticketContract = initContract30().router(
5872
5851
  updateTags: {
5873
5852
  method: "PATCH",
5874
5853
  path: "/tags/update/:id",
5875
- pathParams: z82.object({ id: z82.string() }),
5876
- body: z82.object({ tags: z82.array(z82.string()) }),
5854
+ pathParams: z80.object({ id: z80.string() }),
5855
+ body: z80.object({ tags: z80.array(z80.string()) }),
5877
5856
  headers: DefaultHeaderSchema,
5878
5857
  responses: {
5879
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5880
- 400: z82.object({
5881
- message: z82.string()
5858
+ 200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
5859
+ 400: z80.object({
5860
+ message: z80.string()
5882
5861
  }),
5883
- 409: z82.object({
5884
- message: z82.string()
5862
+ 409: z80.object({
5863
+ message: z80.string()
5885
5864
  }),
5886
- 500: z82.object({
5887
- message: z82.string()
5865
+ 500: z80.object({
5866
+ message: z80.string()
5888
5867
  }),
5889
5868
  401: DefaultUnauthorizedSchema,
5890
5869
  404: DefaultNotFoundSchema,
@@ -5895,25 +5874,25 @@ var ticketContract = initContract30().router(
5895
5874
  changeAssignee: {
5896
5875
  method: "PATCH",
5897
5876
  path: "/assignee/update/:id",
5898
- pathParams: z82.object({ id: z82.string() }),
5899
- body: z82.object({
5900
- ticketId: z82.string(),
5901
- assigneeId: z82.string(),
5902
- reason: z82.string().optional()
5877
+ pathParams: z80.object({ id: z80.string() }),
5878
+ body: z80.object({
5879
+ ticketId: z80.string(),
5880
+ assigneeId: z80.string(),
5881
+ reason: z80.string().optional()
5903
5882
  }),
5904
5883
  headers: DefaultHeaderSchema,
5905
5884
  responses: {
5906
5885
  200: DefaultSuccessResponseSchema.extend({
5907
5886
  data: TicketSchema
5908
5887
  }),
5909
- 400: z82.object({
5910
- message: z82.string()
5888
+ 400: z80.object({
5889
+ message: z80.string()
5911
5890
  }),
5912
- 409: z82.object({
5913
- message: z82.string()
5891
+ 409: z80.object({
5892
+ message: z80.string()
5914
5893
  }),
5915
- 500: z82.object({
5916
- message: z82.string()
5894
+ 500: z80.object({
5895
+ message: z80.string()
5917
5896
  }),
5918
5897
  401: DefaultUnauthorizedSchema,
5919
5898
  404: DefaultNotFoundSchema,
@@ -5924,14 +5903,14 @@ var ticketContract = initContract30().router(
5924
5903
  getTicketCountByContact: {
5925
5904
  method: "GET",
5926
5905
  path: "/ticket_count/contact/:id",
5927
- pathParams: z82.object({ id: z82.string() }),
5906
+ pathParams: z80.object({ id: z80.string() }),
5928
5907
  headers: DefaultHeaderSchema,
5929
5908
  responses: {
5930
5909
  200: DefaultSuccessResponseSchema.extend({
5931
5910
  data: TicketCountByContactSchema
5932
5911
  }),
5933
- 400: z82.object({
5934
- message: z82.string()
5912
+ 400: z80.object({
5913
+ message: z80.string()
5935
5914
  }),
5936
5915
  401: DefaultUnauthorizedSchema,
5937
5916
  500: DefaultErrorResponseSchema
@@ -5947,14 +5926,14 @@ var ticketContract = initContract30().router(
5947
5926
  201: DefaultSuccessResponseSchema.extend({
5948
5927
  data: TicketCustomFieldSchema
5949
5928
  }),
5950
- 400: z82.object({
5951
- message: z82.string()
5929
+ 400: z80.object({
5930
+ message: z80.string()
5952
5931
  }),
5953
- 409: z82.object({
5954
- message: z82.string()
5932
+ 409: z80.object({
5933
+ message: z80.string()
5955
5934
  }),
5956
- 500: z82.object({
5957
- message: z82.string()
5935
+ 500: z80.object({
5936
+ message: z80.string()
5958
5937
  }),
5959
5938
  401: DefaultUnauthorizedSchema,
5960
5939
  404: DefaultNotFoundSchema,
@@ -5979,24 +5958,24 @@ var ticketContract = initContract30().router(
5979
5958
 
5980
5959
  // src/user/index.ts
5981
5960
  import { initContract as initContract31 } from "@ts-rest/core";
5982
- import z84 from "zod";
5961
+ import z82 from "zod";
5983
5962
 
5984
5963
  // src/user/validation.ts
5985
- import { z as z83 } from "zod";
5986
- var CreateUserSchema = z83.object({
5987
- name: z83.string(),
5988
- email: z83.string().email(),
5989
- address: z83.string().nullable(),
5990
- phone: z83.string().nullable(),
5991
- password: z83.string(),
5992
- notificationCount: z83.number().nullable().optional(),
5993
- roles: z83.array(z83.string())
5964
+ import { z as z81 } from "zod";
5965
+ var CreateUserSchema = z81.object({
5966
+ name: z81.string(),
5967
+ email: z81.string().email(),
5968
+ address: z81.string().nullable(),
5969
+ phone: z81.string().nullable(),
5970
+ password: z81.string(),
5971
+ notificationCount: z81.number().nullable().optional(),
5972
+ roles: z81.array(z81.string())
5994
5973
  });
5995
5974
  var UpdateUserSchema = CreateUserSchema.extend({
5996
- newPassword: z83.string()
5975
+ newPassword: z81.string()
5997
5976
  });
5998
- var UpdateUserProfileSchema = z83.object({
5999
- password: z83.string()
5977
+ var UpdateUserProfileSchema = z81.object({
5978
+ password: z81.string()
6000
5979
  });
6001
5980
 
6002
5981
  // src/user/index.ts
@@ -6011,8 +5990,8 @@ var userContract = initContract31().router(
6011
5990
  201: DefaultSuccessResponseSchema.extend({
6012
5991
  user: UserSchema
6013
5992
  }),
6014
- 400: z84.object({
6015
- message: z84.string()
5993
+ 400: z82.object({
5994
+ message: z82.string()
6016
5995
  }),
6017
5996
  401: DefaultUnauthorizedSchema,
6018
5997
  404: DefaultNotFoundSchema,
@@ -6025,16 +6004,16 @@ var userContract = initContract31().router(
6025
6004
  method: "GET",
6026
6005
  path: "",
6027
6006
  headers: DefaultHeaderSchema,
6028
- query: z84.object({
6029
- page: z84.coerce.number().optional(),
6030
- pageSize: z84.coerce.number().optional(),
6007
+ query: z82.object({
6008
+ page: z82.coerce.number().optional(),
6009
+ pageSize: z82.coerce.number().optional(),
6031
6010
  // Don't add default 10. In some places, we need to fetch all users.
6032
- keyword: z84.string().optional()
6011
+ keyword: z82.string().optional()
6033
6012
  }).optional(),
6034
6013
  responses: {
6035
6014
  200: WithPagination(UserSchema),
6036
- 400: z84.object({
6037
- message: z84.string()
6015
+ 400: z82.object({
6016
+ message: z82.string()
6038
6017
  }),
6039
6018
  401: DefaultUnauthorizedSchema,
6040
6019
  500: DefaultErrorResponseSchema
@@ -6044,12 +6023,12 @@ var userContract = initContract31().router(
6044
6023
  getUserById: {
6045
6024
  method: "GET",
6046
6025
  path: "/:id",
6047
- pathParams: z84.object({ id: z84.string() }),
6026
+ pathParams: z82.object({ id: z82.string() }),
6048
6027
  headers: DefaultHeaderSchema,
6049
6028
  responses: {
6050
6029
  200: UserSchema,
6051
- 400: z84.object({
6052
- message: z84.string()
6030
+ 400: z82.object({
6031
+ message: z82.string()
6053
6032
  }),
6054
6033
  401: DefaultUnauthorizedSchema
6055
6034
  },
@@ -6058,15 +6037,15 @@ var userContract = initContract31().router(
6058
6037
  updateUser: {
6059
6038
  method: "PATCH",
6060
6039
  path: "/:id",
6061
- pathParams: z84.object({ id: z84.string() }),
6040
+ pathParams: z82.object({ id: z82.string() }),
6062
6041
  headers: DefaultHeaderSchema,
6063
6042
  body: UpdateUserSchema,
6064
6043
  responses: {
6065
6044
  201: DefaultSuccessResponseSchema.extend({
6066
6045
  user: UserSchema
6067
6046
  }),
6068
- 400: z84.object({
6069
- message: z84.string()
6047
+ 400: z82.object({
6048
+ message: z82.string()
6070
6049
  }),
6071
6050
  401: DefaultUnauthorizedSchema,
6072
6051
  404: DefaultNotFoundSchema,
@@ -6078,15 +6057,15 @@ var userContract = initContract31().router(
6078
6057
  updateUserProfile: {
6079
6058
  method: "PATCH",
6080
6059
  path: "/profile/:id",
6081
- pathParams: z84.object({ id: z84.string() }),
6060
+ pathParams: z82.object({ id: z82.string() }),
6082
6061
  headers: DefaultHeaderSchema,
6083
6062
  body: UpdateUserProfileSchema,
6084
6063
  responses: {
6085
6064
  201: DefaultSuccessResponseSchema.extend({
6086
6065
  user: UserSchema
6087
6066
  }),
6088
- 400: z84.object({
6089
- message: z84.string()
6067
+ 400: z82.object({
6068
+ message: z82.string()
6090
6069
  }),
6091
6070
  401: DefaultUnauthorizedSchema,
6092
6071
  404: DefaultNotFoundSchema,
@@ -6098,11 +6077,11 @@ var userContract = initContract31().router(
6098
6077
  deleteUser: {
6099
6078
  method: "DELETE",
6100
6079
  path: "/:id",
6101
- pathParams: z84.object({ id: z84.string() }),
6080
+ pathParams: z82.object({ id: z82.string() }),
6102
6081
  headers: DefaultHeaderSchema,
6103
6082
  body: null,
6104
6083
  responses: {
6105
- 200: DefaultSuccessResponseSchema.extend({ message: z84.string() }),
6084
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6106
6085
  404: DefaultNotFoundSchema,
6107
6086
  422: DefaultUnprocessibleSchema,
6108
6087
  500: DefaultErrorResponseSchema
@@ -6115,26 +6094,26 @@ var userContract = initContract31().router(
6115
6094
 
6116
6095
  // src/user-presence-status-log/index.ts
6117
6096
  import { initContract as initContract32 } from "@ts-rest/core";
6118
- import z87 from "zod";
6097
+ import z85 from "zod";
6119
6098
 
6120
6099
  // src/user-presence-status-log/schema.ts
6121
- import z85 from "zod";
6100
+ import z83 from "zod";
6122
6101
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
6123
6102
  user: UserSchema,
6124
6103
  previousPresenceStatus: PresenceStatusSchema,
6125
6104
  newPresenceStatus: PresenceStatusSchema,
6126
- reason: z85.string()
6105
+ reason: z83.string()
6127
6106
  });
6128
6107
 
6129
6108
  // src/user-presence-status-log/validation.ts
6130
- import z86 from "zod";
6131
- var UserPresenceStatusLogParamsSchema = z86.object({
6132
- page: z86.coerce.number().default(1),
6133
- pageSize: z86.coerce.number().default(10),
6134
- selectedDate: z86.string().optional()
6109
+ import z84 from "zod";
6110
+ var UserPresenceStatusLogParamsSchema = z84.object({
6111
+ page: z84.coerce.number().default(1),
6112
+ pageSize: z84.coerce.number().default(10),
6113
+ selectedDate: z84.string().optional()
6135
6114
  }).optional();
6136
- var UserPresenceStatusLogExportParamsSchema = z86.object({
6137
- selectedDate: z86.string().optional()
6115
+ var UserPresenceStatusLogExportParamsSchema = z84.object({
6116
+ selectedDate: z84.string().optional()
6138
6117
  });
6139
6118
 
6140
6119
  // src/user-presence-status-log/index.ts
@@ -6147,8 +6126,8 @@ var userPresenceStatusLogContract = initContract32().router(
6147
6126
  headers: DefaultHeaderSchema,
6148
6127
  responses: {
6149
6128
  200: WithPagination(UserPresenceStatusLogSchema),
6150
- 400: z87.object({
6151
- message: z87.string()
6129
+ 400: z85.object({
6130
+ message: z85.string()
6152
6131
  }),
6153
6132
  401: DefaultUnauthorizedSchema,
6154
6133
  500: DefaultErrorResponseSchema
@@ -6162,8 +6141,8 @@ var userPresenceStatusLogContract = initContract32().router(
6162
6141
  headers: DefaultHeaderSchema,
6163
6142
  responses: {
6164
6143
  200: null,
6165
- 400: z87.object({
6166
- message: z87.string()
6144
+ 400: z85.object({
6145
+ message: z85.string()
6167
6146
  }),
6168
6147
  401: DefaultUnauthorizedSchema,
6169
6148
  500: DefaultErrorResponseSchema
@@ -6175,44 +6154,44 @@ var userPresenceStatusLogContract = initContract32().router(
6175
6154
 
6176
6155
  // src/widget/index.ts
6177
6156
  import { initContract as initContract33 } from "@ts-rest/core";
6178
- import z90 from "zod";
6157
+ import z88 from "zod";
6179
6158
 
6180
6159
  // src/widget/schema.ts
6181
- import z88 from "zod";
6182
- var FieldsSchema = z88.object({ data: z88.array(z88.string()) });
6183
- var WidgetPositionSchema = z88.union([
6184
- z88.literal("menu"),
6185
- z88.literal("ticket_detail"),
6186
- z88.literal("contact_detail")
6160
+ import z86 from "zod";
6161
+ var FieldsSchema = z86.object({ data: z86.array(z86.string()) });
6162
+ var WidgetPositionSchema = z86.union([
6163
+ z86.literal("menu"),
6164
+ z86.literal("ticket_detail"),
6165
+ z86.literal("contact_detail")
6187
6166
  ]);
6188
6167
  var WidgetSchema = DefaultEntitySchema.extend({
6189
- name: z88.string(),
6190
- description: z88.string().nullable(),
6168
+ name: z86.string(),
6169
+ description: z86.string().nullable(),
6191
6170
  position: WidgetPositionSchema.nullable(),
6192
6171
  fields: FieldsSchema,
6193
- url: z88.string()
6172
+ url: z86.string()
6194
6173
  });
6195
6174
 
6196
6175
  // src/widget/validation.ts
6197
- import z89 from "zod";
6198
- var CreateWidgetSchema = z89.object({
6199
- name: z89.string(),
6200
- description: z89.string(),
6201
- url: z89.string(),
6176
+ import z87 from "zod";
6177
+ var CreateWidgetSchema = z87.object({
6178
+ name: z87.string(),
6179
+ description: z87.string(),
6180
+ url: z87.string(),
6202
6181
  position: WidgetPositionSchema,
6203
- fields: z89.object({
6182
+ fields: z87.object({
6204
6183
  data: (
6205
6184
  // Array of attribute system names
6206
- z89.array(z89.string())
6185
+ z87.array(z87.string())
6207
6186
  )
6208
6187
  }).optional()
6209
6188
  });
6210
6189
  var UpdateWidgetSchema = CreateWidgetSchema;
6211
- var GetWidgetUrlPathQuerySchema = z89.object({
6212
- widgetId: z89.string(),
6190
+ var GetWidgetUrlPathQuerySchema = z87.object({
6191
+ widgetId: z87.string(),
6213
6192
  // Position ID is ticket ID, contact ID, etc.
6214
6193
  // TODO: The name "Position ID" is confusing. Think of a better name.
6215
- positionId: z89.string()
6194
+ positionId: z87.string()
6216
6195
  });
6217
6196
 
6218
6197
  // src/widget/index.ts
@@ -6227,8 +6206,8 @@ var widgetContract = initContract33().router(
6227
6206
  201: DefaultSuccessResponseSchema.extend({
6228
6207
  widget: WidgetSchema
6229
6208
  }),
6230
- 400: z90.object({
6231
- message: z90.string()
6209
+ 400: z88.object({
6210
+ message: z88.string()
6232
6211
  }),
6233
6212
  401: DefaultUnauthorizedSchema,
6234
6213
  500: DefaultErrorResponseSchema
@@ -6238,17 +6217,17 @@ var widgetContract = initContract33().router(
6238
6217
  getWidgets: {
6239
6218
  method: "GET",
6240
6219
  path: "",
6241
- query: z90.object({
6242
- page: z90.coerce.number().default(1),
6243
- pageSize: z90.coerce.number().default(10),
6244
- keyword: z90.coerce.string().optional()
6220
+ query: z88.object({
6221
+ page: z88.coerce.number().default(1),
6222
+ pageSize: z88.coerce.number().default(10),
6223
+ keyword: z88.coerce.string().optional()
6245
6224
  }).optional(),
6246
6225
  headers: DefaultHeaderSchema,
6247
6226
  responses: {
6248
6227
  200: WithPagination(WidgetSchema),
6249
6228
  500: DefaultErrorResponseSchema,
6250
- 400: z90.object({
6251
- message: z90.string()
6229
+ 400: z88.object({
6230
+ message: z88.string()
6252
6231
  }),
6253
6232
  401: DefaultUnauthorizedSchema
6254
6233
  },
@@ -6259,9 +6238,9 @@ var widgetContract = initContract33().router(
6259
6238
  path: "/menu",
6260
6239
  headers: DefaultHeaderSchema,
6261
6240
  responses: {
6262
- 200: z90.array(WidgetSchema),
6263
- 400: z90.object({
6264
- message: z90.string()
6241
+ 200: z88.array(WidgetSchema),
6242
+ 400: z88.object({
6243
+ message: z88.string()
6265
6244
  }),
6266
6245
  401: DefaultUnauthorizedSchema,
6267
6246
  500: DefaultErrorResponseSchema
@@ -6273,9 +6252,9 @@ var widgetContract = initContract33().router(
6273
6252
  path: "/ticket_detail",
6274
6253
  headers: DefaultHeaderSchema,
6275
6254
  responses: {
6276
- 200: z90.array(WidgetSchema),
6277
- 400: z90.object({
6278
- message: z90.string()
6255
+ 200: z88.array(WidgetSchema),
6256
+ 400: z88.object({
6257
+ message: z88.string()
6279
6258
  }),
6280
6259
  401: DefaultUnauthorizedSchema,
6281
6260
  500: DefaultErrorResponseSchema
@@ -6287,9 +6266,9 @@ var widgetContract = initContract33().router(
6287
6266
  path: "/contact_detail",
6288
6267
  headers: DefaultHeaderSchema,
6289
6268
  responses: {
6290
- 200: z90.array(WidgetSchema),
6291
- 400: z90.object({
6292
- message: z90.string()
6269
+ 200: z88.array(WidgetSchema),
6270
+ 400: z88.object({
6271
+ message: z88.string()
6293
6272
  }),
6294
6273
  401: DefaultUnauthorizedSchema,
6295
6274
  500: DefaultErrorResponseSchema
@@ -6299,12 +6278,12 @@ var widgetContract = initContract33().router(
6299
6278
  getWidgetById: {
6300
6279
  method: "GET",
6301
6280
  path: "/:id",
6302
- pathParams: z90.object({ id: z90.string() }),
6281
+ pathParams: z88.object({ id: z88.string() }),
6303
6282
  headers: DefaultHeaderSchema,
6304
6283
  responses: {
6305
6284
  200: WidgetSchema,
6306
- 400: z90.object({
6307
- message: z90.string()
6285
+ 400: z88.object({
6286
+ message: z88.string()
6308
6287
  }),
6309
6288
  401: DefaultUnauthorizedSchema,
6310
6289
  500: DefaultErrorResponseSchema
@@ -6318,10 +6297,10 @@ var widgetContract = initContract33().router(
6318
6297
  headers: DefaultHeaderSchema,
6319
6298
  responses: {
6320
6299
  201: DefaultSuccessResponseSchema.extend({
6321
- url: z90.string()
6300
+ url: z88.string()
6322
6301
  }),
6323
- 400: z90.object({
6324
- message: z90.string()
6302
+ 400: z88.object({
6303
+ message: z88.string()
6325
6304
  }),
6326
6305
  401: DefaultUnauthorizedSchema
6327
6306
  },
@@ -6330,14 +6309,14 @@ var widgetContract = initContract33().router(
6330
6309
  updateWidget: {
6331
6310
  method: "PATCH",
6332
6311
  path: "/:id",
6333
- pathParams: z90.object({ id: z90.string() }),
6312
+ pathParams: z88.object({ id: z88.string() }),
6334
6313
  headers: DefaultHeaderSchema,
6335
6314
  responses: {
6336
6315
  201: DefaultSuccessResponseSchema.extend({
6337
6316
  widget: WidgetSchema
6338
6317
  }),
6339
- 400: z90.object({
6340
- message: z90.string()
6318
+ 400: z88.object({
6319
+ message: z88.string()
6341
6320
  }),
6342
6321
  401: DefaultUnauthorizedSchema
6343
6322
  },
@@ -6347,11 +6326,11 @@ var widgetContract = initContract33().router(
6347
6326
  deleteWidget: {
6348
6327
  method: "DELETE",
6349
6328
  path: "/:id",
6350
- pathParams: z90.object({ id: z90.string() }),
6329
+ pathParams: z88.object({ id: z88.string() }),
6351
6330
  headers: DefaultHeaderSchema,
6352
6331
  body: null,
6353
6332
  responses: {
6354
- 200: DefaultSuccessResponseSchema.extend({ message: z90.string() }),
6333
+ 200: DefaultSuccessResponseSchema.extend({ message: z88.string() }),
6355
6334
  500: DefaultErrorResponseSchema
6356
6335
  },
6357
6336
  summary: "Delete a widget."
@@ -6362,24 +6341,24 @@ var widgetContract = initContract33().router(
6362
6341
 
6363
6342
  // src/wrap-up-form/index.ts
6364
6343
  import { initContract as initContract34 } from "@ts-rest/core";
6365
- import z92 from "zod";
6344
+ import z90 from "zod";
6366
6345
 
6367
6346
  // src/wrap-up-form/validation.ts
6368
- import { z as z91 } from "zod";
6369
- var CreateWrapUpFormSchema = z91.object({
6370
- note: z91.string().nullable().optional(),
6371
- disposition: z91.string().nullable().optional(),
6372
- callFrom: z91.string().nullable().optional(),
6373
- callTo: z91.string().nullable().optional()
6347
+ import { z as z89 } from "zod";
6348
+ var CreateWrapUpFormSchema = z89.object({
6349
+ note: z89.string().nullable().optional(),
6350
+ disposition: z89.string().nullable().optional(),
6351
+ callFrom: z89.string().nullable().optional(),
6352
+ callTo: z89.string().nullable().optional()
6374
6353
  });
6375
6354
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6376
- tags: z91.array(z91.string()).optional()
6355
+ tags: z89.array(z89.string()).optional()
6377
6356
  });
6378
- var CreateCXLogWrapUpFormSchema = z91.object({
6379
- cxLogId: z91.string().uuid(),
6380
- disposition: z91.string().optional(),
6381
- tagIds: z91.array(z91.string().uuid()).optional(),
6382
- note: z91.string().optional()
6357
+ var CreateCXLogWrapUpFormSchema = z89.object({
6358
+ cxLogId: z89.string().uuid(),
6359
+ disposition: z89.string().optional(),
6360
+ tagIds: z89.array(z89.string().uuid()).optional(),
6361
+ note: z89.string().optional()
6383
6362
  });
6384
6363
 
6385
6364
  // src/wrap-up-form/index.ts
@@ -6394,8 +6373,8 @@ var wrapUpFormContract = initContract34().router(
6394
6373
  201: DefaultSuccessResponseSchema.extend({
6395
6374
  wrapUpForm: WrapUpFormSchema
6396
6375
  }),
6397
- 400: z92.object({
6398
- message: z92.string()
6376
+ 400: z90.object({
6377
+ message: z90.string()
6399
6378
  }),
6400
6379
  401: DefaultUnauthorizedSchema,
6401
6380
  500: DefaultErrorResponseSchema
@@ -6417,15 +6396,15 @@ var wrapUpFormContract = initContract34().router(
6417
6396
  getWrapUpForms: {
6418
6397
  method: "GET",
6419
6398
  path: "",
6420
- query: z92.object({
6421
- page: z92.coerce.number().default(1),
6422
- pageSize: z92.coerce.number().default(10)
6399
+ query: z90.object({
6400
+ page: z90.coerce.number().default(1),
6401
+ pageSize: z90.coerce.number().default(10)
6423
6402
  }).optional(),
6424
6403
  headers: DefaultHeaderSchema,
6425
6404
  responses: {
6426
6405
  200: WithPagination(WrapUpFormSchema),
6427
- 400: z92.object({
6428
- message: z92.string()
6406
+ 400: z90.object({
6407
+ message: z90.string()
6429
6408
  }),
6430
6409
  401: DefaultUnauthorizedSchema,
6431
6410
  500: DefaultErrorResponseSchema
@@ -6435,15 +6414,15 @@ var wrapUpFormContract = initContract34().router(
6435
6414
  updateWrapUpForm: {
6436
6415
  method: "PATCH",
6437
6416
  path: "/:id",
6438
- pathParams: z92.object({ id: z92.string() }),
6417
+ pathParams: z90.object({ id: z90.string() }),
6439
6418
  headers: DefaultHeaderSchema,
6440
6419
  body: UpdateWrapUpFormSchema,
6441
6420
  responses: {
6442
6421
  201: DefaultSuccessResponseSchema.extend({
6443
6422
  wrapUpForm: WrapUpFormSchema
6444
6423
  }),
6445
- 400: z92.object({
6446
- message: z92.string()
6424
+ 400: z90.object({
6425
+ message: z90.string()
6447
6426
  }),
6448
6427
  401: DefaultUnauthorizedSchema,
6449
6428
  500: DefaultErrorResponseSchema
@@ -6456,28 +6435,28 @@ var wrapUpFormContract = initContract34().router(
6456
6435
 
6457
6436
  // src/upload/index.ts
6458
6437
  import { initContract as initContract35 } from "@ts-rest/core";
6459
- import z93 from "zod";
6438
+ import z91 from "zod";
6460
6439
  var uploadContract = initContract35().router(
6461
6440
  {
6462
6441
  rename: {
6463
6442
  method: "POST",
6464
6443
  path: "/:id/rename",
6465
- pathParams: z93.object({
6466
- id: z93.string()
6444
+ pathParams: z91.object({
6445
+ id: z91.string()
6467
6446
  }),
6468
6447
  headers: DefaultHeaderSchema,
6469
6448
  responses: {
6470
6449
  201: DefaultSuccessResponseSchema.extend({
6471
- message: z93.string()
6450
+ message: z91.string()
6472
6451
  }),
6473
- 400: z93.object({
6474
- message: z93.string()
6452
+ 400: z91.object({
6453
+ message: z91.string()
6475
6454
  }),
6476
- 409: z93.object({
6477
- message: z93.string()
6455
+ 409: z91.object({
6456
+ message: z91.string()
6478
6457
  }),
6479
- 500: z93.object({
6480
- message: z93.string()
6458
+ 500: z91.object({
6459
+ message: z91.string()
6481
6460
  }),
6482
6461
  401: DefaultUnauthorizedSchema,
6483
6462
  404: DefaultNotFoundSchema,
@@ -6489,23 +6468,23 @@ var uploadContract = initContract35().router(
6489
6468
  delete: {
6490
6469
  method: "DELETE",
6491
6470
  path: "/:id",
6492
- pathParams: z93.object({
6493
- id: z93.string()
6471
+ pathParams: z91.object({
6472
+ id: z91.string()
6494
6473
  }),
6495
6474
  headers: DefaultHeaderSchema,
6496
6475
  body: null,
6497
6476
  responses: {
6498
6477
  201: DefaultSuccessResponseSchema.extend({
6499
- message: z93.string()
6478
+ message: z91.string()
6500
6479
  }),
6501
- 400: z93.object({
6502
- message: z93.string()
6480
+ 400: z91.object({
6481
+ message: z91.string()
6503
6482
  }),
6504
- 409: z93.object({
6505
- message: z93.string()
6483
+ 409: z91.object({
6484
+ message: z91.string()
6506
6485
  }),
6507
- 500: z93.object({
6508
- message: z93.string()
6486
+ 500: z91.object({
6487
+ message: z91.string()
6509
6488
  }),
6510
6489
  401: DefaultUnauthorizedSchema,
6511
6490
  404: DefaultNotFoundSchema,
@@ -6520,19 +6499,19 @@ var uploadContract = initContract35().router(
6520
6499
  );
6521
6500
 
6522
6501
  // src/viber/index.ts
6523
- import z95 from "zod";
6502
+ import z93 from "zod";
6524
6503
 
6525
6504
  // src/viber/validation.ts
6526
- import z94 from "zod";
6527
- var ViberChannelSchema = z94.object({
6528
- name: z94.string(),
6529
- accessToken: z94.string(),
6530
- actor: z94.object({
6531
- id: z94.string().uuid(),
6532
- name: z94.string(),
6533
- email: z94.string().email(),
6534
- address: z94.string().nullable(),
6535
- phone: z94.string().nullable()
6505
+ import z92 from "zod";
6506
+ var ViberChannelSchema = z92.object({
6507
+ name: z92.string(),
6508
+ accessToken: z92.string(),
6509
+ actor: z92.object({
6510
+ id: z92.string().uuid(),
6511
+ name: z92.string(),
6512
+ email: z92.string().email(),
6513
+ address: z92.string().nullable(),
6514
+ phone: z92.string().nullable()
6536
6515
  }).optional()
6537
6516
  });
6538
6517
 
@@ -6561,8 +6540,8 @@ var viberContract = initContract36().router({
6561
6540
  }),
6562
6541
  400: DefaultErrorResponseSchema
6563
6542
  },
6564
- body: z95.object({
6565
- id: z95.string().uuid()
6543
+ body: z93.object({
6544
+ id: z93.string().uuid()
6566
6545
  }),
6567
6546
  summary: "Connect viber channel"
6568
6547
  },
@@ -6578,8 +6557,8 @@ var viberContract = initContract36().router({
6578
6557
  reconnect: {
6579
6558
  method: "POST",
6580
6559
  path: "/reconnect/:channelId",
6581
- pathParams: z95.object({
6582
- channelId: z95.string().uuid()
6560
+ pathParams: z93.object({
6561
+ channelId: z93.string().uuid()
6583
6562
  }),
6584
6563
  responses: {
6585
6564
  200: DefaultSuccessResponseSchema.extend({
@@ -6594,8 +6573,8 @@ var viberContract = initContract36().router({
6594
6573
  delete: {
6595
6574
  method: "DELETE",
6596
6575
  path: "/delete/:channelId",
6597
- pathParams: z95.object({
6598
- channelId: z95.string().uuid()
6576
+ pathParams: z93.object({
6577
+ channelId: z93.string().uuid()
6599
6578
  }),
6600
6579
  body: null,
6601
6580
  responses: {
@@ -6608,58 +6587,58 @@ var viberContract = initContract36().router({
6608
6587
 
6609
6588
  // src/notification/index.ts
6610
6589
  import { initContract as initContract37 } from "@ts-rest/core";
6611
- import z98 from "zod";
6590
+ import z96 from "zod";
6612
6591
 
6613
6592
  // src/notification/validation.ts
6614
- import z97 from "zod";
6593
+ import z95 from "zod";
6615
6594
 
6616
6595
  // src/notification/schema.ts
6617
- import z96 from "zod";
6618
- var NotificationChangeSchema = z96.object({
6619
- id: z96.string().uuid(),
6620
- createdAt: z96.date(),
6621
- updatedAt: z96.date(),
6622
- deletedAt: z96.date().nullable(),
6623
- actorId: z96.string().uuid(),
6596
+ import z94 from "zod";
6597
+ var NotificationChangeSchema = z94.object({
6598
+ id: z94.string().uuid(),
6599
+ createdAt: z94.date(),
6600
+ updatedAt: z94.date(),
6601
+ deletedAt: z94.date().nullable(),
6602
+ actorId: z94.string().uuid(),
6624
6603
  actor: UserSchema,
6625
- notificationObjectId: z96.string().uuid(),
6626
- readAt: z96.date()
6627
- });
6628
- var NotificationObjectSchema = z96.object({
6629
- id: z96.string().uuid(),
6630
- createdAt: z96.date(),
6631
- updatedAt: z96.date(),
6632
- deletedAt: z96.date().nullable(),
6633
- data: z96.string(),
6604
+ notificationObjectId: z94.string().uuid(),
6605
+ readAt: z94.date()
6606
+ });
6607
+ var NotificationObjectSchema = z94.object({
6608
+ id: z94.string().uuid(),
6609
+ createdAt: z94.date(),
6610
+ updatedAt: z94.date(),
6611
+ deletedAt: z94.date().nullable(),
6612
+ data: z94.string(),
6634
6613
  notificationChange: NotificationChangeSchema
6635
6614
  });
6636
- var NotificationSchema = z96.object({
6637
- id: z96.string().uuid(),
6638
- createdAt: z96.date(),
6639
- updatedAt: z96.date(),
6640
- deletedAt: z96.date().nullable(),
6641
- notificationObjectId: z96.string().uuid(),
6642
- notifierId: z96.string().uuid(),
6615
+ var NotificationSchema = z94.object({
6616
+ id: z94.string().uuid(),
6617
+ createdAt: z94.date(),
6618
+ updatedAt: z94.date(),
6619
+ deletedAt: z94.date().nullable(),
6620
+ notificationObjectId: z94.string().uuid(),
6621
+ notifierId: z94.string().uuid(),
6643
6622
  notificationObject: NotificationObjectSchema,
6644
- readAt: z96.date()
6623
+ readAt: z94.date()
6645
6624
  });
6646
6625
 
6647
6626
  // src/notification/validation.ts
6648
- var GetNotificationsRequestSchema = z97.object({
6649
- page: z97.coerce.number().default(1),
6650
- pageSize: z97.coerce.number().default(10)
6627
+ var GetNotificationsRequestSchema = z95.object({
6628
+ page: z95.coerce.number().default(1),
6629
+ pageSize: z95.coerce.number().default(10)
6651
6630
  });
6652
- var GetNotificationsResponseSchema = z97.object({
6653
- notificationCount: z97.number(),
6654
- notifications: z97.array(NotificationSchema),
6655
- total: z97.number(),
6656
- page: z97.number(),
6657
- pageSize: z97.number(),
6658
- lastPage: z97.number(),
6659
- totalUnreadCount: z97.number().optional()
6631
+ var GetNotificationsResponseSchema = z95.object({
6632
+ notificationCount: z95.number(),
6633
+ notifications: z95.array(NotificationSchema),
6634
+ total: z95.number(),
6635
+ page: z95.number(),
6636
+ pageSize: z95.number(),
6637
+ lastPage: z95.number(),
6638
+ totalUnreadCount: z95.number().optional()
6660
6639
  });
6661
- var ResetNotificationRequestSchema = z97.object({
6662
- userId: z97.string()
6640
+ var ResetNotificationRequestSchema = z95.object({
6641
+ userId: z95.string()
6663
6642
  });
6664
6643
 
6665
6644
  // src/notification/index.ts
@@ -6673,14 +6652,14 @@ var userNotificationContract = initContract37().router(
6673
6652
  200: DefaultSuccessResponseSchema.extend({
6674
6653
  data: GetNotificationsResponseSchema
6675
6654
  }),
6676
- 400: z98.object({
6677
- message: z98.string()
6655
+ 400: z96.object({
6656
+ message: z96.string()
6678
6657
  }),
6679
- 409: z98.object({
6680
- message: z98.string()
6658
+ 409: z96.object({
6659
+ message: z96.string()
6681
6660
  }),
6682
- 500: z98.object({
6683
- message: z98.string()
6661
+ 500: z96.object({
6662
+ message: z96.string()
6684
6663
  }),
6685
6664
  401: DefaultUnauthorizedSchema,
6686
6665
  404: DefaultNotFoundSchema,
@@ -6693,16 +6672,16 @@ var userNotificationContract = initContract37().router(
6693
6672
  path: "/new_notifications_count",
6694
6673
  responses: {
6695
6674
  200: DefaultSuccessResponseSchema.extend({
6696
- total: z98.number()
6675
+ total: z96.number()
6697
6676
  }),
6698
- 400: z98.object({
6699
- message: z98.string()
6677
+ 400: z96.object({
6678
+ message: z96.string()
6700
6679
  }),
6701
- 409: z98.object({
6702
- message: z98.string()
6680
+ 409: z96.object({
6681
+ message: z96.string()
6703
6682
  }),
6704
- 500: z98.object({
6705
- message: z98.string()
6683
+ 500: z96.object({
6684
+ message: z96.string()
6706
6685
  }),
6707
6686
  401: DefaultUnauthorizedSchema,
6708
6687
  404: DefaultNotFoundSchema,
@@ -6717,14 +6696,14 @@ var userNotificationContract = initContract37().router(
6717
6696
  201: DefaultSuccessResponseSchema.extend({
6718
6697
  data: UserSchema
6719
6698
  }),
6720
- 400: z98.object({
6721
- message: z98.string()
6699
+ 400: z96.object({
6700
+ message: z96.string()
6722
6701
  }),
6723
- 409: z98.object({
6724
- message: z98.string()
6702
+ 409: z96.object({
6703
+ message: z96.string()
6725
6704
  }),
6726
- 500: z98.object({
6727
- message: z98.string()
6705
+ 500: z96.object({
6706
+ message: z96.string()
6728
6707
  }),
6729
6708
  401: DefaultUnauthorizedSchema,
6730
6709
  404: DefaultNotFoundSchema,
@@ -6736,19 +6715,19 @@ var userNotificationContract = initContract37().router(
6736
6715
  readNotification: {
6737
6716
  method: "POST",
6738
6717
  path: "/read/:id",
6739
- pathParams: z98.object({ id: z98.string() }),
6718
+ pathParams: z96.object({ id: z96.string() }),
6740
6719
  responses: {
6741
6720
  201: DefaultSuccessResponseSchema.extend({
6742
6721
  data: NotificationSchema
6743
6722
  }),
6744
- 400: z98.object({
6745
- message: z98.string()
6723
+ 400: z96.object({
6724
+ message: z96.string()
6746
6725
  }),
6747
- 409: z98.object({
6748
- message: z98.string()
6726
+ 409: z96.object({
6727
+ message: z96.string()
6749
6728
  }),
6750
- 500: z98.object({
6751
- message: z98.string()
6729
+ 500: z96.object({
6730
+ message: z96.string()
6752
6731
  }),
6753
6732
  401: DefaultUnauthorizedSchema,
6754
6733
  404: DefaultNotFoundSchema,
@@ -6830,7 +6809,6 @@ export {
6830
6809
  dashboardContract,
6831
6810
  evaluateFormContract,
6832
6811
  extensionContract2 as extensionContract,
6833
- mailContract,
6834
6812
  mainChatContract,
6835
6813
  notificationContract,
6836
6814
  permissionContract,