@kl1/contracts 1.1.1-uat → 1.1.3-uat
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +909 -824
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +908 -824
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +2180 -1184
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/mail/account-contract.d.ts +289 -136
- package/dist/src/mail/account-contract.d.ts.map +1 -1
- package/dist/src/mail/index.d.ts +10 -0
- package/dist/src/mail/index.d.ts.map +1 -1
- package/dist/src/mail/mail-contract.d.ts +1775 -1162
- package/dist/src/mail/mail-contract.d.ts.map +1 -1
- package/dist/src/mail/mail-server-contract.d.ts +477 -18
- package/dist/src/mail/mail-server-contract.d.ts.map +1 -1
- package/dist/src/mail/message-contract.d.ts +54 -54
- package/dist/src/mail/room-contract.d.ts +957 -954
- package/dist/src/mail/room-contract.d.ts.map +1 -1
- package/dist/src/mail/schemas/account-validation.schema.d.ts +140 -140
- package/dist/src/mail/schemas/account-validation.schema.d.ts.map +1 -1
- package/dist/src/mail/schemas/account.schema.d.ts +32 -32
- package/dist/src/mail/schemas/message.schema.d.ts +42 -42
- package/dist/src/mail/schemas/message.schema.d.ts.map +1 -1
- package/dist/src/mail/schemas/room-validation.schema.d.ts +325 -322
- package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
- package/dist/src/mail/schemas/room.schema.d.ts +683 -259
- package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
- package/dist/src/user/index.d.ts +388 -4
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/validation.d.ts +7 -0
- package/dist/src/user/validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -44,6 +44,7 @@ __export(src_exports, {
|
|
44
44
|
dashboardContract: () => dashboardContract,
|
45
45
|
evaluateFormContract: () => evaluateFormContract,
|
46
46
|
extensionContract: () => extensionContract2,
|
47
|
+
mailContract: () => mailContract,
|
47
48
|
mainChatContract: () => mainChatContract,
|
48
49
|
notificationContract: () => notificationContract,
|
49
50
|
permissionContract: () => permissionContract,
|
@@ -4039,7 +4040,7 @@ var import_core22 = require("@ts-rest/core");
|
|
4039
4040
|
|
4040
4041
|
// src/mail/room-contract.ts
|
4041
4042
|
var import_core18 = require("@ts-rest/core");
|
4042
|
-
var
|
4043
|
+
var import_zod60 = __toESM(require("zod"));
|
4043
4044
|
|
4044
4045
|
// src/mail/schemas/room.schema.ts
|
4045
4046
|
var import_zod58 = __toESM(require("zod"));
|
@@ -4053,12 +4054,12 @@ var MailServerSchema = import_zod56.default.object({
|
|
4053
4054
|
deletedAt: import_zod56.default.date().nullable(),
|
4054
4055
|
name: import_zod56.default.string(),
|
4055
4056
|
smtpHost: import_zod56.default.string(),
|
4056
|
-
smtpPort: import_zod56.default.
|
4057
|
-
smtpTlsPort: import_zod56.default.
|
4057
|
+
smtpPort: import_zod56.default.number(),
|
4058
|
+
smtpTlsPort: import_zod56.default.number(),
|
4058
4059
|
useTlsForSmtp: import_zod56.default.boolean(),
|
4059
4060
|
imapHost: import_zod56.default.string(),
|
4060
|
-
imapPort: import_zod56.default.
|
4061
|
-
imapTlsPort: import_zod56.default.
|
4061
|
+
imapPort: import_zod56.default.number(),
|
4062
|
+
imapTlsPort: import_zod56.default.number(),
|
4062
4063
|
useTlsForImap: import_zod56.default.boolean()
|
4063
4064
|
});
|
4064
4065
|
var MailAccountSchema = import_zod56.default.object({
|
@@ -4101,12 +4102,12 @@ var AttachmentSchema = import_zod57.default.object({
|
|
4101
4102
|
createdAt: import_zod57.default.date(),
|
4102
4103
|
updatedAt: import_zod57.default.date(),
|
4103
4104
|
deletedAt: import_zod57.default.nullable(import_zod57.default.date()),
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
|
4108
|
-
|
4109
|
-
|
4105
|
+
bucketName: import_zod57.default.string(),
|
4106
|
+
fileName: import_zod57.default.string(),
|
4107
|
+
fileKey: import_zod57.default.string(),
|
4108
|
+
fileSize: import_zod57.default.number(),
|
4109
|
+
fileUrl: import_zod57.default.string(),
|
4110
|
+
extensionName: import_zod57.default.string()
|
4110
4111
|
})
|
4111
4112
|
});
|
4112
4113
|
var MessageSchema2 = import_zod57.default.object({
|
@@ -4160,7 +4161,7 @@ var UserModel = import_zod58.default.object({
|
|
4160
4161
|
email: import_zod58.default.string(),
|
4161
4162
|
address: import_zod58.default.string().nullable(),
|
4162
4163
|
phone: import_zod58.default.string().nullable(),
|
4163
|
-
|
4164
|
+
notificationCount: import_zod58.default.number().nullable()
|
4164
4165
|
});
|
4165
4166
|
var ActivityLogModel = import_zod58.default.object({
|
4166
4167
|
id: import_zod58.default.string(),
|
@@ -4172,7 +4173,9 @@ var ActivityLogModel = import_zod58.default.object({
|
|
4172
4173
|
roomId: import_zod58.default.string(),
|
4173
4174
|
actor: UserModel
|
4174
4175
|
});
|
4175
|
-
var
|
4176
|
+
var MessagesAndLogsSchema = import_zod58.default.array(
|
4177
|
+
import_zod58.default.union([MessageSchema2, ActivityLogModel])
|
4178
|
+
);
|
4176
4179
|
var MailRoomSchema = import_zod58.default.object({
|
4177
4180
|
id: import_zod58.default.string(),
|
4178
4181
|
createdAt: import_zod58.default.date(),
|
@@ -4195,7 +4198,7 @@ var MailRoomSchema = import_zod58.default.object({
|
|
4195
4198
|
tags: import_zod58.default.array(TagSchema2),
|
4196
4199
|
assignee: UserModel,
|
4197
4200
|
messages: import_zod58.default.array(MessageSchema2),
|
4198
|
-
messagesAndLogs:
|
4201
|
+
messagesAndLogs: MessagesAndLogsSchema,
|
4199
4202
|
mail: MailAccountSchema,
|
4200
4203
|
unReadMessageCount: import_zod58.default.number()
|
4201
4204
|
});
|
@@ -4209,6 +4212,54 @@ var AttachmentSchema2 = import_zod58.default.object({
|
|
4209
4212
|
upload: UploadSchema
|
4210
4213
|
});
|
4211
4214
|
|
4215
|
+
// src/mail/schemas/room-validation.schema.ts
|
4216
|
+
var import_zod59 = __toESM(require("zod"));
|
4217
|
+
var RoomContractsValidationSchema = {
|
4218
|
+
getAll: {
|
4219
|
+
input: import_zod59.default.object({
|
4220
|
+
page: import_zod59.default.coerce.number().default(1),
|
4221
|
+
pageSize: import_zod59.default.coerce.number().default(10),
|
4222
|
+
keyword: import_zod59.default.string().optional(),
|
4223
|
+
level1: import_zod59.default.union([
|
4224
|
+
import_zod59.default.literal("open"),
|
4225
|
+
import_zod59.default.literal("close"),
|
4226
|
+
import_zod59.default.literal("inbox"),
|
4227
|
+
import_zod59.default.literal("sent"),
|
4228
|
+
import_zod59.default.literal("scheduled"),
|
4229
|
+
import_zod59.default.literal("starred")
|
4230
|
+
]).optional(),
|
4231
|
+
level2: import_zod59.default.union([
|
4232
|
+
import_zod59.default.literal("all"),
|
4233
|
+
import_zod59.default.literal("unassign"),
|
4234
|
+
import_zod59.default.literal("mine"),
|
4235
|
+
import_zod59.default.literal("other")
|
4236
|
+
]).optional()
|
4237
|
+
}),
|
4238
|
+
output: import_zod59.default.object({
|
4239
|
+
data: import_zod59.default.array(MailRoomSchema),
|
4240
|
+
total: import_zod59.default.number(),
|
4241
|
+
page: import_zod59.default.number(),
|
4242
|
+
pageSize: import_zod59.default.number()
|
4243
|
+
})
|
4244
|
+
},
|
4245
|
+
update: {
|
4246
|
+
input: import_zod59.default.object({
|
4247
|
+
resolved: import_zod59.default.boolean().or(
|
4248
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4249
|
+
).optional().nullable(),
|
4250
|
+
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4251
|
+
note: import_zod59.default.string().optional(),
|
4252
|
+
tags: import_zod59.default.array(import_zod59.default.string().uuid()).optional(),
|
4253
|
+
handover: import_zod59.default.boolean().or(
|
4254
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4255
|
+
).optional().nullable(),
|
4256
|
+
selfAssign: import_zod59.default.boolean().or(
|
4257
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4258
|
+
).optional().nullable()
|
4259
|
+
})
|
4260
|
+
}
|
4261
|
+
};
|
4262
|
+
|
4212
4263
|
// src/mail/room-contract.ts
|
4213
4264
|
var roomContract = (0, import_core18.initContract)().router(
|
4214
4265
|
{
|
@@ -4217,7 +4268,7 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4217
4268
|
path: "/",
|
4218
4269
|
responses: {
|
4219
4270
|
200: DefaultSuccessResponseSchema.extend({
|
4220
|
-
message:
|
4271
|
+
message: import_zod60.default.string()
|
4221
4272
|
}),
|
4222
4273
|
...DefaultResponses
|
4223
4274
|
},
|
@@ -4227,19 +4278,13 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4227
4278
|
getAll: {
|
4228
4279
|
method: "GET",
|
4229
4280
|
path: "",
|
4230
|
-
query:
|
4231
|
-
page: import_zod59.default.coerce.number().default(1),
|
4232
|
-
pageSize: import_zod59.default.coerce.number().default(10),
|
4233
|
-
keyword: import_zod59.default.string().optional(),
|
4234
|
-
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4235
|
-
resolved: import_zod59.default.boolean().or(import_zod59.default.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
|
4236
|
-
}),
|
4281
|
+
query: RoomContractsValidationSchema.getAll.input,
|
4237
4282
|
responses: {
|
4238
4283
|
200: DefaultSuccessResponseSchema.extend({
|
4239
|
-
data:
|
4240
|
-
total:
|
4241
|
-
page:
|
4242
|
-
pageSize:
|
4284
|
+
data: import_zod60.default.array(MailRoomSchema),
|
4285
|
+
total: import_zod60.default.number(),
|
4286
|
+
page: import_zod60.default.number(),
|
4287
|
+
pageSize: import_zod60.default.number()
|
4243
4288
|
}),
|
4244
4289
|
...DefaultResponses
|
4245
4290
|
},
|
@@ -4248,8 +4293,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4248
4293
|
getById: {
|
4249
4294
|
method: "GET",
|
4250
4295
|
path: "/:id",
|
4251
|
-
pathParams:
|
4252
|
-
id:
|
4296
|
+
pathParams: import_zod60.default.object({
|
4297
|
+
id: import_zod60.default.string().uuid()
|
4253
4298
|
}),
|
4254
4299
|
responses: {
|
4255
4300
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4262,12 +4307,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4262
4307
|
getAttachments: {
|
4263
4308
|
method: "GET",
|
4264
4309
|
path: "/:id/attachments",
|
4265
|
-
pathParams:
|
4266
|
-
id:
|
4310
|
+
pathParams: import_zod60.default.object({
|
4311
|
+
id: import_zod60.default.string().uuid()
|
4267
4312
|
}),
|
4268
4313
|
responses: {
|
4269
4314
|
200: DefaultSuccessResponseSchema.extend({
|
4270
|
-
data:
|
4315
|
+
data: import_zod60.default.array(AttachmentSchema2)
|
4271
4316
|
}),
|
4272
4317
|
...DefaultResponses
|
4273
4318
|
},
|
@@ -4276,12 +4321,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4276
4321
|
getParticipants: {
|
4277
4322
|
method: "GET",
|
4278
4323
|
path: "/:id/participants",
|
4279
|
-
pathParams:
|
4280
|
-
id:
|
4324
|
+
pathParams: import_zod60.default.object({
|
4325
|
+
id: import_zod60.default.string().uuid()
|
4281
4326
|
}),
|
4282
4327
|
responses: {
|
4283
4328
|
200: DefaultSuccessResponseSchema.extend({
|
4284
|
-
data:
|
4329
|
+
data: import_zod60.default.array(MailUserSchema)
|
4285
4330
|
}),
|
4286
4331
|
...DefaultResponses
|
4287
4332
|
},
|
@@ -4290,8 +4335,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4290
4335
|
update: {
|
4291
4336
|
method: "PATCH",
|
4292
4337
|
path: "/:id",
|
4293
|
-
pathParams:
|
4294
|
-
id:
|
4338
|
+
pathParams: import_zod60.default.object({
|
4339
|
+
id: import_zod60.default.string()
|
4295
4340
|
}),
|
4296
4341
|
responses: {
|
4297
4342
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4299,28 +4344,18 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4299
4344
|
}),
|
4300
4345
|
...DefaultResponses
|
4301
4346
|
},
|
4302
|
-
body:
|
4303
|
-
resolved: import_zod59.default.boolean().or(
|
4304
|
-
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4305
|
-
).optional().nullable(),
|
4306
|
-
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4307
|
-
note: import_zod59.default.string().optional(),
|
4308
|
-
tags: import_zod59.default.array(import_zod59.default.string().uuid()).optional(),
|
4309
|
-
handover: import_zod59.default.boolean().or(
|
4310
|
-
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4311
|
-
).optional().nullable()
|
4312
|
-
}),
|
4347
|
+
body: RoomContractsValidationSchema.update.input,
|
4313
4348
|
summary: "Update a mail room by id"
|
4314
4349
|
},
|
4315
4350
|
markAsRead: {
|
4316
4351
|
method: "GET",
|
4317
4352
|
path: "/:id",
|
4318
|
-
pathParams:
|
4319
|
-
id:
|
4353
|
+
pathParams: import_zod60.default.object({
|
4354
|
+
id: import_zod60.default.string().uuid()
|
4320
4355
|
}),
|
4321
4356
|
responses: {
|
4322
4357
|
200: DefaultSuccessResponseSchema.extend({
|
4323
|
-
message:
|
4358
|
+
message: import_zod60.default.string()
|
4324
4359
|
}),
|
4325
4360
|
...DefaultResponses
|
4326
4361
|
},
|
@@ -4334,47 +4369,47 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4334
4369
|
|
4335
4370
|
// src/mail/account-contract.ts
|
4336
4371
|
var import_core19 = require("@ts-rest/core");
|
4337
|
-
var
|
4372
|
+
var import_zod62 = __toESM(require("zod"));
|
4338
4373
|
|
4339
4374
|
// src/mail/schemas/account-validation.schema.ts
|
4340
|
-
var
|
4375
|
+
var import_zod61 = __toESM(require("zod"));
|
4341
4376
|
var AccountContractsValidationSchemas = {
|
4342
4377
|
create: {
|
4343
|
-
input:
|
4344
|
-
address:
|
4345
|
-
name:
|
4346
|
-
password:
|
4347
|
-
mailServerId:
|
4378
|
+
input: import_zod61.default.object({
|
4379
|
+
address: import_zod61.default.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
4380
|
+
name: import_zod61.default.string().min(1, "Account name cannot be empty."),
|
4381
|
+
password: import_zod61.default.string().min(1, "Password cannot be empty."),
|
4382
|
+
mailServerId: import_zod61.default.string().uuid("Invalid mail_server_id")
|
4348
4383
|
})
|
4349
4384
|
},
|
4350
4385
|
getById: {
|
4351
|
-
input:
|
4352
|
-
id:
|
4386
|
+
input: import_zod61.default.object({
|
4387
|
+
id: import_zod61.default.string().uuid()
|
4353
4388
|
}),
|
4354
4389
|
output: MailAccountSchema
|
4355
4390
|
},
|
4356
4391
|
getAll: {
|
4357
|
-
output:
|
4392
|
+
output: import_zod61.default.array(MailAccountSchema)
|
4358
4393
|
},
|
4359
4394
|
update: {
|
4360
4395
|
input: MailAccountSchema,
|
4361
4396
|
output: MailAccountSchema
|
4362
4397
|
},
|
4363
4398
|
disconnect: {
|
4364
|
-
input:
|
4365
|
-
id:
|
4399
|
+
input: import_zod61.default.object({
|
4400
|
+
id: import_zod61.default.string().uuid()
|
4366
4401
|
}),
|
4367
4402
|
output: MailAccountSchema
|
4368
4403
|
},
|
4369
4404
|
reconnect: {
|
4370
|
-
input:
|
4371
|
-
id:
|
4405
|
+
input: import_zod61.default.object({
|
4406
|
+
id: import_zod61.default.string()
|
4372
4407
|
}),
|
4373
4408
|
output: MailAccountSchema
|
4374
4409
|
},
|
4375
4410
|
delete: {
|
4376
|
-
input:
|
4377
|
-
id:
|
4411
|
+
input: import_zod61.default.object({
|
4412
|
+
id: import_zod61.default.string()
|
4378
4413
|
}),
|
4379
4414
|
output: MailAccountSchema
|
4380
4415
|
}
|
@@ -4390,16 +4425,16 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4390
4425
|
responses: {
|
4391
4426
|
201: DefaultSuccessResponseSchema.extend({
|
4392
4427
|
// data: AccountContractsValidationSchemas.create.output,
|
4393
|
-
message:
|
4428
|
+
message: import_zod62.default.string()
|
4394
4429
|
}),
|
4395
|
-
400:
|
4396
|
-
message:
|
4430
|
+
400: import_zod62.default.object({
|
4431
|
+
message: import_zod62.default.string()
|
4397
4432
|
}),
|
4398
|
-
409:
|
4399
|
-
message:
|
4433
|
+
409: import_zod62.default.object({
|
4434
|
+
message: import_zod62.default.string()
|
4400
4435
|
}),
|
4401
|
-
500:
|
4402
|
-
message:
|
4436
|
+
500: import_zod62.default.object({
|
4437
|
+
message: import_zod62.default.string()
|
4403
4438
|
}),
|
4404
4439
|
...DefaultResponses
|
4405
4440
|
},
|
@@ -4428,20 +4463,19 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4428
4463
|
path: "",
|
4429
4464
|
responses: {
|
4430
4465
|
200: DefaultSuccessResponseSchema.extend({
|
4431
|
-
data:
|
4432
|
-
// data: AccountContractsValidationSchemas.getAll.output,
|
4466
|
+
data: import_zod62.default.array(MailAccountSchema)
|
4433
4467
|
}),
|
4434
4468
|
...DefaultResponses
|
4435
4469
|
},
|
4436
|
-
summary: "Get
|
4470
|
+
summary: "Get all accounts"
|
4437
4471
|
},
|
4438
4472
|
//#endregion get all accounts
|
4439
4473
|
//#region ........update account
|
4440
4474
|
update: {
|
4441
4475
|
method: "PATCH",
|
4442
4476
|
path: "/:id",
|
4443
|
-
pathParams:
|
4444
|
-
id:
|
4477
|
+
pathParams: import_zod62.default.object({
|
4478
|
+
id: import_zod62.default.string().uuid()
|
4445
4479
|
}),
|
4446
4480
|
responses: {
|
4447
4481
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -4490,7 +4524,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4490
4524
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
4491
4525
|
responses: {
|
4492
4526
|
200: DefaultSuccessResponseSchema.extend({
|
4493
|
-
message:
|
4527
|
+
message: import_zod62.default.string()
|
4494
4528
|
}),
|
4495
4529
|
...DefaultResponses
|
4496
4530
|
},
|
@@ -4507,64 +4541,91 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4507
4541
|
|
4508
4542
|
// src/mail/mail-server-contract.ts
|
4509
4543
|
var import_core20 = require("@ts-rest/core");
|
4510
|
-
var
|
4544
|
+
var import_zod64 = __toESM(require("zod"));
|
4545
|
+
|
4546
|
+
// src/mail/schemas/servers-validation.schema.ts
|
4547
|
+
var import_zod63 = __toESM(require("zod"));
|
4548
|
+
var CreateMailServerSchema = import_zod63.default.object({
|
4549
|
+
name: import_zod63.default.string(),
|
4550
|
+
smtpHost: import_zod63.default.string(),
|
4551
|
+
smtpPort: import_zod63.default.number(),
|
4552
|
+
smtpTlsPort: import_zod63.default.number(),
|
4553
|
+
useTlsForSmtp: import_zod63.default.boolean(),
|
4554
|
+
imapHost: import_zod63.default.string(),
|
4555
|
+
imapPort: import_zod63.default.number(),
|
4556
|
+
imapTlsPort: import_zod63.default.number(),
|
4557
|
+
useTlsForImap: import_zod63.default.boolean()
|
4558
|
+
});
|
4559
|
+
|
4560
|
+
// src/mail/mail-server-contract.ts
|
4511
4561
|
var serverContract = (0, import_core20.initContract)().router(
|
4512
4562
|
{
|
4513
4563
|
create: {
|
4514
4564
|
method: "POST",
|
4515
4565
|
path: "/",
|
4516
4566
|
responses: {
|
4517
|
-
|
4518
|
-
|
4567
|
+
201: DefaultSuccessResponseSchema.extend({
|
4568
|
+
data: MailServerSchema
|
4519
4569
|
}),
|
4520
4570
|
...DefaultResponses
|
4521
4571
|
},
|
4522
|
-
body:
|
4572
|
+
body: CreateMailServerSchema,
|
4523
4573
|
summary: "Register a new mail server"
|
4524
4574
|
},
|
4525
|
-
|
4575
|
+
getById: {
|
4526
4576
|
method: "GET",
|
4527
4577
|
path: "/:id",
|
4528
|
-
pathParams:
|
4529
|
-
id:
|
4578
|
+
pathParams: import_zod64.default.object({
|
4579
|
+
id: import_zod64.default.string().uuid()
|
4530
4580
|
}),
|
4531
4581
|
responses: {
|
4532
4582
|
200: DefaultSuccessResponseSchema.extend({
|
4533
|
-
|
4583
|
+
data: MailServerSchema
|
4534
4584
|
}),
|
4535
4585
|
...DefaultResponses
|
4536
4586
|
},
|
4537
4587
|
summary: "Get a mail server by id"
|
4538
4588
|
},
|
4589
|
+
getAll: {
|
4590
|
+
method: "GET",
|
4591
|
+
path: "/",
|
4592
|
+
responses: {
|
4593
|
+
200: DefaultSuccessResponseSchema.extend({
|
4594
|
+
data: import_zod64.default.array(MailServerSchema)
|
4595
|
+
}),
|
4596
|
+
...DefaultResponses
|
4597
|
+
},
|
4598
|
+
summary: "Get all mail servers"
|
4599
|
+
},
|
4539
4600
|
update: {
|
4540
4601
|
method: "PATCH",
|
4541
4602
|
path: "/:id",
|
4542
|
-
pathParams:
|
4543
|
-
id:
|
4603
|
+
pathParams: import_zod64.default.object({
|
4604
|
+
id: import_zod64.default.string().uuid()
|
4544
4605
|
}),
|
4545
4606
|
responses: {
|
4546
4607
|
200: DefaultSuccessResponseSchema.extend({
|
4547
|
-
|
4608
|
+
data: MailServerSchema
|
4548
4609
|
}),
|
4549
4610
|
...DefaultResponses
|
4550
4611
|
},
|
4551
|
-
body:
|
4552
|
-
summary: "Update a mail server
|
4612
|
+
body: CreateMailServerSchema.partial(),
|
4613
|
+
summary: "Update a mail server"
|
4553
4614
|
},
|
4554
4615
|
delete: {
|
4555
|
-
method: "
|
4616
|
+
method: "DELETE",
|
4556
4617
|
path: "/:id",
|
4557
|
-
pathParams:
|
4558
|
-
id:
|
4618
|
+
pathParams: import_zod64.default.object({
|
4619
|
+
id: import_zod64.default.string().uuid()
|
4559
4620
|
}),
|
4560
4621
|
responses: {
|
4561
4622
|
200: DefaultSuccessResponseSchema.extend({
|
4562
|
-
|
4623
|
+
data: MailServerSchema
|
4563
4624
|
}),
|
4564
4625
|
...DefaultResponses
|
4565
4626
|
},
|
4566
4627
|
body: null,
|
4567
|
-
summary: "Delete a mail server
|
4628
|
+
summary: "Delete a mail server"
|
4568
4629
|
}
|
4569
4630
|
},
|
4570
4631
|
{
|
@@ -4574,44 +4635,44 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4574
4635
|
|
4575
4636
|
// src/mail/message-contract.ts
|
4576
4637
|
var import_core21 = require("@ts-rest/core");
|
4577
|
-
var
|
4638
|
+
var import_zod66 = __toESM(require("zod"));
|
4578
4639
|
|
4579
4640
|
// src/mail/schemas/message-validation.schema.ts
|
4580
|
-
var
|
4581
|
-
var MailParticipant =
|
4582
|
-
name:
|
4583
|
-
address:
|
4641
|
+
var import_zod65 = __toESM(require("zod"));
|
4642
|
+
var MailParticipant = import_zod65.default.object({
|
4643
|
+
name: import_zod65.default.string().optional(),
|
4644
|
+
address: import_zod65.default.string().email()
|
4584
4645
|
});
|
4585
4646
|
var MessageContractsValidationsSchema = {
|
4586
4647
|
submit: {
|
4587
|
-
input:
|
4588
|
-
subject:
|
4589
|
-
text:
|
4590
|
-
html:
|
4648
|
+
input: import_zod65.default.object({
|
4649
|
+
subject: import_zod65.default.string(),
|
4650
|
+
text: import_zod65.default.string(),
|
4651
|
+
html: import_zod65.default.string(),
|
4591
4652
|
from: MailParticipant,
|
4592
|
-
to:
|
4593
|
-
cc:
|
4594
|
-
bcc:
|
4595
|
-
reference:
|
4596
|
-
messageId:
|
4597
|
-
action:
|
4653
|
+
to: import_zod65.default.array(MailParticipant),
|
4654
|
+
cc: import_zod65.default.array(MailParticipant).optional(),
|
4655
|
+
bcc: import_zod65.default.array(MailParticipant).optional(),
|
4656
|
+
reference: import_zod65.default.object({
|
4657
|
+
messageId: import_zod65.default.string(),
|
4658
|
+
action: import_zod65.default.union([import_zod65.default.literal("reply"), import_zod65.default.literal("forward")])
|
4598
4659
|
}).optional(),
|
4599
|
-
attachments:
|
4600
|
-
|
4601
|
-
fileType:
|
4602
|
-
fileName:
|
4603
|
-
fileKey:
|
4604
|
-
fileSize:
|
4605
|
-
bucketName:
|
4606
|
-
presignedUrl:
|
4660
|
+
attachments: import_zod65.default.array(
|
4661
|
+
import_zod65.default.object({
|
4662
|
+
fileType: import_zod65.default.string(),
|
4663
|
+
fileName: import_zod65.default.string(),
|
4664
|
+
fileKey: import_zod65.default.string(),
|
4665
|
+
fileSize: import_zod65.default.number(),
|
4666
|
+
bucketName: import_zod65.default.string(),
|
4667
|
+
presignedUrl: import_zod65.default.string()
|
4607
4668
|
})
|
4608
4669
|
).optional()
|
4609
4670
|
}),
|
4610
|
-
output:
|
4611
|
-
response:
|
4612
|
-
messageId:
|
4613
|
-
sendAt:
|
4614
|
-
queueId:
|
4671
|
+
output: import_zod65.default.object({
|
4672
|
+
response: import_zod65.default.string(),
|
4673
|
+
messageId: import_zod65.default.string(),
|
4674
|
+
sendAt: import_zod65.default.string(),
|
4675
|
+
queueId: import_zod65.default.string()
|
4615
4676
|
})
|
4616
4677
|
}
|
4617
4678
|
};
|
@@ -4636,8 +4697,8 @@ var messageContract = (0, import_core21.initContract)().router(
|
|
4636
4697
|
getById: {
|
4637
4698
|
method: "GET",
|
4638
4699
|
path: "/:id",
|
4639
|
-
pathParams:
|
4640
|
-
id:
|
4700
|
+
pathParams: import_zod66.default.object({
|
4701
|
+
id: import_zod66.default.string()
|
4641
4702
|
}),
|
4642
4703
|
responses: {
|
4643
4704
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4664,7 +4725,7 @@ var mailContract = (0, import_core22.initContract)().router({
|
|
4664
4725
|
|
4665
4726
|
// src/messenger/index.ts
|
4666
4727
|
var import_core23 = require("@ts-rest/core");
|
4667
|
-
var
|
4728
|
+
var import_zod67 = __toESM(require("zod"));
|
4668
4729
|
var messengerContract = (0, import_core23.initContract)().router({
|
4669
4730
|
sendMessage: {
|
4670
4731
|
method: "POST",
|
@@ -4698,8 +4759,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4698
4759
|
reconnect: {
|
4699
4760
|
method: "POST",
|
4700
4761
|
path: "/reconnect/:channelId",
|
4701
|
-
pathParams:
|
4702
|
-
channelId:
|
4762
|
+
pathParams: import_zod67.default.object({
|
4763
|
+
channelId: import_zod67.default.string().uuid()
|
4703
4764
|
}),
|
4704
4765
|
body: null,
|
4705
4766
|
responses: {
|
@@ -4711,8 +4772,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4711
4772
|
delete: {
|
4712
4773
|
method: "DELETE",
|
4713
4774
|
path: "/delete/:channelId",
|
4714
|
-
pathParams:
|
4715
|
-
channelId:
|
4775
|
+
pathParams: import_zod67.default.object({
|
4776
|
+
channelId: import_zod67.default.string().uuid()
|
4716
4777
|
}),
|
4717
4778
|
body: null,
|
4718
4779
|
responses: {
|
@@ -4744,7 +4805,7 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4744
4805
|
|
4745
4806
|
// src/permission/index.ts
|
4746
4807
|
var import_core24 = require("@ts-rest/core");
|
4747
|
-
var
|
4808
|
+
var import_zod68 = __toESM(require("zod"));
|
4748
4809
|
var permissionContract = (0, import_core24.initContract)().router(
|
4749
4810
|
{
|
4750
4811
|
getPermissions: {
|
@@ -4752,9 +4813,9 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4752
4813
|
path: "",
|
4753
4814
|
headers: DefaultHeaderSchema,
|
4754
4815
|
responses: {
|
4755
|
-
200:
|
4756
|
-
400:
|
4757
|
-
message:
|
4816
|
+
200: import_zod68.default.object({ permissions: PermissionSchema.array() }),
|
4817
|
+
400: import_zod68.default.object({
|
4818
|
+
message: import_zod68.default.string()
|
4758
4819
|
}),
|
4759
4820
|
401: DefaultUnauthorizedSchema,
|
4760
4821
|
500: DefaultErrorResponseSchema
|
@@ -4767,15 +4828,15 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4767
4828
|
|
4768
4829
|
// src/role/index.ts
|
4769
4830
|
var import_core25 = require("@ts-rest/core");
|
4770
|
-
var
|
4831
|
+
var import_zod70 = __toESM(require("zod"));
|
4771
4832
|
|
4772
4833
|
// src/role/validation.ts
|
4773
|
-
var
|
4774
|
-
var CreateRoleSchema =
|
4775
|
-
systemName:
|
4776
|
-
displayName:
|
4777
|
-
description:
|
4778
|
-
permissions:
|
4834
|
+
var import_zod69 = require("zod");
|
4835
|
+
var CreateRoleSchema = import_zod69.z.object({
|
4836
|
+
systemName: import_zod69.z.string(),
|
4837
|
+
displayName: import_zod69.z.string(),
|
4838
|
+
description: import_zod69.z.string().nullable(),
|
4839
|
+
permissions: import_zod69.z.array(import_zod69.z.string())
|
4779
4840
|
});
|
4780
4841
|
var UpdateRoleSchema = CreateRoleSchema;
|
4781
4842
|
|
@@ -4791,8 +4852,8 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4791
4852
|
201: DefaultSuccessResponseSchema.extend({
|
4792
4853
|
role: RoleSchema
|
4793
4854
|
}),
|
4794
|
-
400:
|
4795
|
-
message:
|
4855
|
+
400: import_zod70.default.object({
|
4856
|
+
message: import_zod70.default.string()
|
4796
4857
|
}),
|
4797
4858
|
401: DefaultUnauthorizedSchema,
|
4798
4859
|
500: DefaultErrorResponseSchema
|
@@ -4802,15 +4863,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4802
4863
|
getRoles: {
|
4803
4864
|
method: "GET",
|
4804
4865
|
path: "",
|
4805
|
-
query:
|
4806
|
-
page:
|
4807
|
-
pageSize:
|
4866
|
+
query: import_zod70.default.object({
|
4867
|
+
page: import_zod70.default.coerce.number().default(1),
|
4868
|
+
pageSize: import_zod70.default.coerce.number().default(10)
|
4808
4869
|
}).optional(),
|
4809
4870
|
headers: DefaultHeaderSchema,
|
4810
4871
|
responses: {
|
4811
4872
|
200: WithPagination(RoleSchema),
|
4812
|
-
400:
|
4813
|
-
message:
|
4873
|
+
400: import_zod70.default.object({
|
4874
|
+
message: import_zod70.default.string()
|
4814
4875
|
}),
|
4815
4876
|
401: DefaultUnauthorizedSchema,
|
4816
4877
|
500: DefaultErrorResponseSchema
|
@@ -4820,15 +4881,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4820
4881
|
updateRole: {
|
4821
4882
|
method: "PATCH",
|
4822
4883
|
path: "/:id",
|
4823
|
-
pathParams:
|
4884
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4824
4885
|
headers: DefaultHeaderSchema,
|
4825
4886
|
body: UpdateRoleSchema,
|
4826
4887
|
responses: {
|
4827
4888
|
201: DefaultSuccessResponseSchema.extend({
|
4828
4889
|
role: RoleSchema
|
4829
4890
|
}),
|
4830
|
-
400:
|
4831
|
-
message:
|
4891
|
+
400: import_zod70.default.object({
|
4892
|
+
message: import_zod70.default.string()
|
4832
4893
|
}),
|
4833
4894
|
401: DefaultUnauthorizedSchema,
|
4834
4895
|
500: DefaultErrorResponseSchema
|
@@ -4838,11 +4899,11 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4838
4899
|
deleteRole: {
|
4839
4900
|
method: "DELETE",
|
4840
4901
|
path: "/:id",
|
4841
|
-
pathParams:
|
4902
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4842
4903
|
headers: DefaultHeaderSchema,
|
4843
4904
|
body: null,
|
4844
4905
|
responses: {
|
4845
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4906
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod70.default.string() }),
|
4846
4907
|
500: DefaultErrorResponseSchema
|
4847
4908
|
},
|
4848
4909
|
summary: "Delete a role."
|
@@ -4853,19 +4914,19 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4853
4914
|
|
4854
4915
|
// src/tag/index.ts
|
4855
4916
|
var import_core26 = require("@ts-rest/core");
|
4856
|
-
var
|
4917
|
+
var import_zod72 = __toESM(require("zod"));
|
4857
4918
|
|
4858
4919
|
// src/tag/validation.ts
|
4859
|
-
var
|
4860
|
-
var CreateTagSchema =
|
4861
|
-
name:
|
4920
|
+
var import_zod71 = require("zod");
|
4921
|
+
var CreateTagSchema = import_zod71.z.object({
|
4922
|
+
name: import_zod71.z.string(),
|
4862
4923
|
group: TagGroupSchema
|
4863
4924
|
});
|
4864
|
-
var GetTagsSchema =
|
4925
|
+
var GetTagsSchema = import_zod71.z.object({
|
4865
4926
|
group: TagGroupSchema.default("general"),
|
4866
|
-
keyword:
|
4927
|
+
keyword: import_zod71.z.string()
|
4867
4928
|
}).partial().optional();
|
4868
|
-
var UpdateTagSchema =
|
4929
|
+
var UpdateTagSchema = import_zod71.z.object({ name: import_zod71.z.string() });
|
4869
4930
|
|
4870
4931
|
// src/tag/index.ts
|
4871
4932
|
var tagContract = (0, import_core26.initContract)().router(
|
@@ -4888,7 +4949,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4888
4949
|
query: GetTagsSchema,
|
4889
4950
|
responses: {
|
4890
4951
|
200: DefaultSuccessResponseSchema.extend({
|
4891
|
-
tags:
|
4952
|
+
tags: import_zod72.default.array(TagSchema)
|
4892
4953
|
}),
|
4893
4954
|
500: DefaultErrorResponseSchema
|
4894
4955
|
},
|
@@ -4897,7 +4958,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4897
4958
|
updateTag: {
|
4898
4959
|
method: "PATCH",
|
4899
4960
|
path: "/:id",
|
4900
|
-
pathParams:
|
4961
|
+
pathParams: import_zod72.default.object({ id: import_zod72.default.string() }),
|
4901
4962
|
body: UpdateTagSchema,
|
4902
4963
|
responses: {
|
4903
4964
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4910,11 +4971,11 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4910
4971
|
deleteTag: {
|
4911
4972
|
method: "DELETE",
|
4912
4973
|
path: "/:id",
|
4913
|
-
pathParams:
|
4914
|
-
body:
|
4974
|
+
pathParams: import_zod72.default.object({ id: import_zod72.default.string() }),
|
4975
|
+
body: import_zod72.default.any().optional(),
|
4915
4976
|
// We don't need the body.
|
4916
4977
|
responses: {
|
4917
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4978
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod72.default.string() }),
|
4918
4979
|
500: DefaultErrorResponseSchema
|
4919
4980
|
},
|
4920
4981
|
headers: DefaultHeaderSchema
|
@@ -4927,27 +4988,27 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4927
4988
|
|
4928
4989
|
// src/telephony-agent-presence-status/index.ts
|
4929
4990
|
var import_core27 = require("@ts-rest/core");
|
4930
|
-
var
|
4991
|
+
var import_zod75 = __toESM(require("zod"));
|
4931
4992
|
|
4932
4993
|
// src/telephony-agent-presence-status/schema.ts
|
4933
|
-
var
|
4994
|
+
var import_zod73 = __toESM(require("zod"));
|
4934
4995
|
var PresenceStatusSchema = DefaultEntitySchema.extend({
|
4935
|
-
status:
|
4936
|
-
description:
|
4996
|
+
status: import_zod73.default.string(),
|
4997
|
+
description: import_zod73.default.string()
|
4937
4998
|
});
|
4938
4999
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
4939
5000
|
user: UserSchema,
|
4940
5001
|
presenceStatus: PresenceStatusSchema,
|
4941
|
-
customPresenceStatus:
|
5002
|
+
customPresenceStatus: import_zod73.default.string().nullable().optional()
|
4942
5003
|
});
|
4943
5004
|
|
4944
5005
|
// src/telephony-agent-presence-status/validation.ts
|
4945
|
-
var
|
4946
|
-
var UpdateUserStatusSchema =
|
4947
|
-
userId:
|
4948
|
-
presenceStatusId:
|
4949
|
-
customPreseneStatus:
|
4950
|
-
reason:
|
5006
|
+
var import_zod74 = require("zod");
|
5007
|
+
var UpdateUserStatusSchema = import_zod74.z.object({
|
5008
|
+
userId: import_zod74.z.string(),
|
5009
|
+
presenceStatusId: import_zod74.z.string().nullable().optional(),
|
5010
|
+
customPreseneStatus: import_zod74.z.string().nullable().optional(),
|
5011
|
+
reason: import_zod74.z.string()
|
4951
5012
|
});
|
4952
5013
|
|
4953
5014
|
// src/telephony-agent-presence-status/index.ts
|
@@ -4958,9 +5019,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4958
5019
|
path: "/presence_status",
|
4959
5020
|
headers: DefaultHeaderSchema,
|
4960
5021
|
responses: {
|
4961
|
-
200:
|
4962
|
-
400:
|
4963
|
-
message:
|
5022
|
+
200: import_zod75.default.array(PresenceStatusSchema),
|
5023
|
+
400: import_zod75.default.object({
|
5024
|
+
message: import_zod75.default.string()
|
4964
5025
|
}),
|
4965
5026
|
401: DefaultUnauthorizedSchema,
|
4966
5027
|
500: DefaultErrorResponseSchema
|
@@ -4972,9 +5033,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4972
5033
|
path: "/agents/presence_status",
|
4973
5034
|
headers: DefaultHeaderSchema,
|
4974
5035
|
responses: {
|
4975
|
-
200:
|
4976
|
-
400:
|
4977
|
-
message:
|
5036
|
+
200: import_zod75.default.array(UserPresenceStatusSchema),
|
5037
|
+
400: import_zod75.default.object({
|
5038
|
+
message: import_zod75.default.string()
|
4978
5039
|
}),
|
4979
5040
|
401: DefaultUnauthorizedSchema,
|
4980
5041
|
500: DefaultErrorResponseSchema
|
@@ -4984,12 +5045,12 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4984
5045
|
getAgentStatus: {
|
4985
5046
|
method: "GET",
|
4986
5047
|
path: "/presence_status/check_update/:userId",
|
4987
|
-
pathParams:
|
5048
|
+
pathParams: import_zod75.default.object({ userId: import_zod75.default.string() }),
|
4988
5049
|
headers: DefaultHeaderSchema,
|
4989
5050
|
responses: {
|
4990
5051
|
200: UserPresenceStatusSchema,
|
4991
|
-
400:
|
4992
|
-
message:
|
5052
|
+
400: import_zod75.default.object({
|
5053
|
+
message: import_zod75.default.string()
|
4993
5054
|
}),
|
4994
5055
|
401: DefaultUnauthorizedSchema,
|
4995
5056
|
500: DefaultErrorResponseSchema
|
@@ -5005,8 +5066,8 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5005
5066
|
200: DefaultSuccessResponseSchema.extend({
|
5006
5067
|
userPresenceStatu: UserPresenceStatusSchema
|
5007
5068
|
}),
|
5008
|
-
400:
|
5009
|
-
message:
|
5069
|
+
400: import_zod75.default.object({
|
5070
|
+
message: import_zod75.default.string()
|
5010
5071
|
}),
|
5011
5072
|
401: DefaultUnauthorizedSchema,
|
5012
5073
|
500: DefaultErrorResponseSchema
|
@@ -5018,62 +5079,62 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5018
5079
|
);
|
5019
5080
|
|
5020
5081
|
// src/telephony-cdr/index.ts
|
5021
|
-
var
|
5082
|
+
var import_zod78 = __toESM(require("zod"));
|
5022
5083
|
|
5023
5084
|
// src/telephony-cdr/validation.ts
|
5024
|
-
var
|
5025
|
-
var CreateTelephonyCdrSchema =
|
5026
|
-
uniqueCallId:
|
5027
|
-
timeStart:
|
5028
|
-
callFrom:
|
5029
|
-
callTo:
|
5030
|
-
callDuration:
|
5031
|
-
talkDuration:
|
5032
|
-
srcTrunkName:
|
5033
|
-
dstTrunkName:
|
5034
|
-
pinCode:
|
5035
|
-
status:
|
5036
|
-
type:
|
5037
|
-
recording:
|
5038
|
-
didNumber:
|
5039
|
-
agentRingTime:
|
5085
|
+
var import_zod76 = __toESM(require("zod"));
|
5086
|
+
var CreateTelephonyCdrSchema = import_zod76.default.object({
|
5087
|
+
uniqueCallId: import_zod76.default.string({ required_error: "uniqueCallId is required" }),
|
5088
|
+
timeStart: import_zod76.default.string({ required_error: "timeStart is required" }),
|
5089
|
+
callFrom: import_zod76.default.string({ required_error: "callFrom is required" }),
|
5090
|
+
callTo: import_zod76.default.string({ required_error: "callTo is required" }),
|
5091
|
+
callDuration: import_zod76.default.number().nullable(),
|
5092
|
+
talkDuration: import_zod76.default.number().nullable(),
|
5093
|
+
srcTrunkName: import_zod76.default.string().nullable(),
|
5094
|
+
dstTrunkName: import_zod76.default.string().nullable(),
|
5095
|
+
pinCode: import_zod76.default.string().nullable(),
|
5096
|
+
status: import_zod76.default.string(),
|
5097
|
+
type: import_zod76.default.string(),
|
5098
|
+
recording: import_zod76.default.string().nullable(),
|
5099
|
+
didNumber: import_zod76.default.string().nullable(),
|
5100
|
+
agentRingTime: import_zod76.default.number().nullable()
|
5040
5101
|
});
|
5041
5102
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5042
|
-
selectedDate:
|
5043
|
-
type:
|
5044
|
-
status:
|
5045
|
-
callFrom:
|
5046
|
-
callTo:
|
5047
|
-
trunk:
|
5048
|
-
userId:
|
5049
|
-
queueStatus:
|
5050
|
-
agentIds:
|
5051
|
-
agentCallsOnly:
|
5103
|
+
selectedDate: import_zod76.default.string().optional(),
|
5104
|
+
type: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5105
|
+
status: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5106
|
+
callFrom: import_zod76.default.string().optional(),
|
5107
|
+
callTo: import_zod76.default.string().optional(),
|
5108
|
+
trunk: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5109
|
+
userId: import_zod76.default.string().uuid().optional(),
|
5110
|
+
queueStatus: import_zod76.default.string().optional(),
|
5111
|
+
agentIds: import_zod76.default.array(import_zod76.default.string().uuid()).optional(),
|
5112
|
+
agentCallsOnly: import_zod76.default.coerce.boolean().optional()
|
5052
5113
|
});
|
5053
5114
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5054
|
-
type:
|
5055
|
-
status:
|
5056
|
-
callFrom:
|
5057
|
-
callTo:
|
5058
|
-
result:
|
5059
|
-
callTags:
|
5060
|
-
selectedDate:
|
5061
|
-
agentId:
|
5062
|
-
contact:
|
5063
|
-
callStatus:
|
5064
|
-
queueIds:
|
5065
|
-
notes:
|
5115
|
+
type: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5116
|
+
status: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5117
|
+
callFrom: import_zod76.default.string().optional(),
|
5118
|
+
callTo: import_zod76.default.string().optional(),
|
5119
|
+
result: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5120
|
+
callTags: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5121
|
+
selectedDate: import_zod76.default.string().optional(),
|
5122
|
+
agentId: import_zod76.default.string().optional(),
|
5123
|
+
contact: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5124
|
+
callStatus: import_zod76.default.array(import_zod76.default.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5125
|
+
queueIds: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5126
|
+
notes: import_zod76.default.string().optional()
|
5066
5127
|
});
|
5067
5128
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5068
|
-
|
5069
|
-
page:
|
5070
|
-
pageSize:
|
5129
|
+
import_zod76.default.object({
|
5130
|
+
page: import_zod76.default.coerce.number().positive().optional(),
|
5131
|
+
pageSize: import_zod76.default.coerce.number().positive().optional()
|
5071
5132
|
})
|
5072
5133
|
);
|
5073
5134
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5074
5135
|
var EmtptyArrayUndefined = [[], void 0];
|
5075
5136
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5076
|
-
reportType:
|
5137
|
+
reportType: import_zod76.default.enum([
|
5077
5138
|
"extcallstatistics",
|
5078
5139
|
"extcallactivity",
|
5079
5140
|
"trunkactivity",
|
@@ -5083,52 +5144,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5083
5144
|
"queueagentmisscalls",
|
5084
5145
|
"queueagentinoutcalls"
|
5085
5146
|
]),
|
5086
|
-
selectedDate:
|
5087
|
-
communicationType:
|
5088
|
-
time:
|
5089
|
-
queueList:
|
5090
|
-
queueId:
|
5091
|
-
trunkList:
|
5092
|
-
extensionList:
|
5147
|
+
selectedDate: import_zod76.default.string().optional(),
|
5148
|
+
communicationType: import_zod76.default.union([import_zod76.default.literal("Inbound"), import_zod76.default.literal("Outbound"), import_zod76.default.literal("Internal")]).optional(),
|
5149
|
+
time: import_zod76.default.string().optional(),
|
5150
|
+
queueList: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5151
|
+
queueId: import_zod76.default.string().optional(),
|
5152
|
+
trunkList: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5153
|
+
extensionList: import_zod76.default.array(import_zod76.default.string()).optional()
|
5093
5154
|
}).superRefine((input, ctx) => {
|
5094
5155
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
5095
5156
|
ctx.addIssue({
|
5096
|
-
code:
|
5157
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5097
5158
|
path: ["selectedDate"],
|
5098
5159
|
message: "selectedDate is required."
|
5099
5160
|
});
|
5100
5161
|
}
|
5101
5162
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
5102
5163
|
ctx.addIssue({
|
5103
|
-
code:
|
5164
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5104
5165
|
path: ["time"],
|
5105
5166
|
message: "time is required."
|
5106
5167
|
});
|
5107
5168
|
}
|
5108
5169
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
5109
5170
|
ctx.addIssue({
|
5110
|
-
code:
|
5171
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5111
5172
|
path: ["queueList"],
|
5112
5173
|
message: "queueList is required."
|
5113
5174
|
});
|
5114
5175
|
}
|
5115
5176
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
5116
5177
|
ctx.addIssue({
|
5117
|
-
code:
|
5178
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5118
5179
|
path: ["queueId"],
|
5119
5180
|
message: "queueId is required."
|
5120
5181
|
});
|
5121
5182
|
}
|
5122
5183
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
5123
5184
|
ctx.addIssue({
|
5124
|
-
code:
|
5185
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5125
5186
|
path: ["trunkList"],
|
5126
5187
|
message: "trunkList is required."
|
5127
5188
|
});
|
5128
5189
|
}
|
5129
5190
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
5130
5191
|
ctx.addIssue({
|
5131
|
-
code:
|
5192
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5132
5193
|
path: ["extensionList"],
|
5133
5194
|
message: "extensionList is required."
|
5134
5195
|
});
|
@@ -5139,161 +5200,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5139
5200
|
var import_core28 = require("@ts-rest/core");
|
5140
5201
|
|
5141
5202
|
// src/telephony-cdr/call-report.schema.ts
|
5142
|
-
var
|
5143
|
-
var ExtCallStatisticsListSchema =
|
5203
|
+
var import_zod77 = __toESM(require("zod"));
|
5204
|
+
var ExtCallStatisticsListSchema = import_zod77.default.object({
|
5144
5205
|
/** @example "ext_num" */
|
5145
|
-
ext_num:
|
5206
|
+
ext_num: import_zod77.default.string(),
|
5146
5207
|
/** @example "ext_name" */
|
5147
|
-
ext_name:
|
5208
|
+
ext_name: import_zod77.default.string(),
|
5148
5209
|
/** @example 0 */
|
5149
|
-
answered_calls:
|
5210
|
+
answered_calls: import_zod77.default.number(),
|
5150
5211
|
/** @example 0 */
|
5151
|
-
no_answer_calls:
|
5212
|
+
no_answer_calls: import_zod77.default.number(),
|
5152
5213
|
/** @example 0 */
|
5153
|
-
busy_calls:
|
5214
|
+
busy_calls: import_zod77.default.number(),
|
5154
5215
|
/** @example 0 */
|
5155
|
-
failed_calls:
|
5216
|
+
failed_calls: import_zod77.default.number(),
|
5156
5217
|
/** @example 0 */
|
5157
|
-
voicemail_calls:
|
5218
|
+
voicemail_calls: import_zod77.default.number(),
|
5158
5219
|
/** @example 0 */
|
5159
|
-
total_holding_time:
|
5220
|
+
total_holding_time: import_zod77.default.number(),
|
5160
5221
|
/** @example 0 */
|
5161
|
-
total_talking_time:
|
5222
|
+
total_talking_time: import_zod77.default.number(),
|
5162
5223
|
/** @example "src_name" */
|
5163
|
-
src_name:
|
5224
|
+
src_name: import_zod77.default.string(),
|
5164
5225
|
/** @example 0 */
|
5165
|
-
total_call_count:
|
5226
|
+
total_call_count: import_zod77.default.number(),
|
5166
5227
|
/** @example "mobile" */
|
5167
|
-
mobile:
|
5168
|
-
});
|
5169
|
-
var ExtStatisticSchema =
|
5170
|
-
ext_num:
|
5171
|
-
ext_name:
|
5172
|
-
answered_calls:
|
5173
|
-
no_answer_calls:
|
5174
|
-
busy_calls:
|
5175
|
-
failed_calls:
|
5176
|
-
voicemail_calls:
|
5177
|
-
total_holding_time:
|
5178
|
-
total_talking_time:
|
5179
|
-
time:
|
5180
|
-
mobile:
|
5181
|
-
});
|
5182
|
-
var ExtCallActivityListSchema =
|
5183
|
-
time:
|
5184
|
-
answered_calls:
|
5185
|
-
no_answer_calls:
|
5186
|
-
busy_calls:
|
5187
|
-
failed_calls:
|
5188
|
-
voicemail_calls:
|
5189
|
-
total_holding_time:
|
5190
|
-
total_talking_time:
|
5191
|
-
ext_statistics:
|
5192
|
-
});
|
5193
|
-
var TrunkList =
|
5194
|
-
trunk_name:
|
5195
|
-
total_calls:
|
5196
|
-
});
|
5197
|
-
var TrunkActivityListSchema =
|
5198
|
-
time:
|
5199
|
-
trunk_list:
|
5200
|
-
});
|
5201
|
-
var QueueAvgWaitTalkTimeListSchema =
|
5202
|
-
time:
|
5203
|
-
avg_wait_time:
|
5204
|
-
avg_talk_time:
|
5205
|
-
});
|
5206
|
-
var SatisfactionListSchema =
|
5207
|
-
press_key:
|
5208
|
-
total:
|
5209
|
-
key_point:
|
5210
|
-
});
|
5211
|
-
var agentListSchema =
|
5212
|
-
agent_name:
|
5213
|
-
agent_num:
|
5214
|
-
satisfaction_list:
|
5215
|
-
total_key:
|
5216
|
-
total_point:
|
5217
|
-
average_point:
|
5218
|
-
});
|
5219
|
-
var QueueSatisfactionSchema =
|
5220
|
-
queue_name:
|
5221
|
-
queue_num:
|
5222
|
-
satisfaction_list:
|
5223
|
-
agent_list:
|
5224
|
-
total_key:
|
5225
|
-
total_point:
|
5226
|
-
average_point:
|
5227
|
-
});
|
5228
|
-
var QueuePerformanceListSchema =
|
5229
|
-
queue:
|
5230
|
-
total_calls:
|
5231
|
-
answered_calls:
|
5232
|
-
missed_calls:
|
5233
|
-
abandoned_calls:
|
5234
|
-
average_waiting_time:
|
5235
|
-
average_talking_time:
|
5236
|
-
max_waiting_time:
|
5237
|
-
answered_rate:
|
5238
|
-
missed_rate:
|
5239
|
-
abandoned_rate:
|
5240
|
-
sla:
|
5241
|
-
});
|
5242
|
-
var QueueAgentMissCallsListSchema =
|
5243
|
-
agent_name:
|
5244
|
-
agent_num:
|
5245
|
-
time:
|
5246
|
-
total_wait_time:
|
5247
|
-
src_name:
|
5248
|
-
src_num:
|
5249
|
-
queue_status:
|
5250
|
-
polling_attempts:
|
5251
|
-
missed_reason:
|
5252
|
-
});
|
5253
|
-
var QueueAgentInOutCallsListSchema =
|
5254
|
-
agent_name:
|
5255
|
-
agent_num:
|
5256
|
-
inbound_calls:
|
5257
|
-
inbound_duration:
|
5258
|
-
outbound_calls:
|
5259
|
-
outbound_duration:
|
5260
|
-
total_calls:
|
5261
|
-
total_duration:
|
5262
|
-
average_talk_duration:
|
5263
|
-
});
|
5264
|
-
var CallReportModel =
|
5265
|
-
errcode:
|
5266
|
-
errmsg:
|
5267
|
-
total_number:
|
5268
|
-
is_12hour:
|
5269
|
-
ext_call_statistics_list:
|
5270
|
-
ext_call_activity_list:
|
5271
|
-
trunk_activity_list:
|
5272
|
-
queue_avg_wait_talk_time_list:
|
5228
|
+
mobile: import_zod77.default.string()
|
5229
|
+
});
|
5230
|
+
var ExtStatisticSchema = import_zod77.default.object({
|
5231
|
+
ext_num: import_zod77.default.string(),
|
5232
|
+
ext_name: import_zod77.default.string(),
|
5233
|
+
answered_calls: import_zod77.default.number(),
|
5234
|
+
no_answer_calls: import_zod77.default.number(),
|
5235
|
+
busy_calls: import_zod77.default.number(),
|
5236
|
+
failed_calls: import_zod77.default.number(),
|
5237
|
+
voicemail_calls: import_zod77.default.number(),
|
5238
|
+
total_holding_time: import_zod77.default.number(),
|
5239
|
+
total_talking_time: import_zod77.default.number(),
|
5240
|
+
time: import_zod77.default.number(),
|
5241
|
+
mobile: import_zod77.default.string()
|
5242
|
+
});
|
5243
|
+
var ExtCallActivityListSchema = import_zod77.default.object({
|
5244
|
+
time: import_zod77.default.number(),
|
5245
|
+
answered_calls: import_zod77.default.number(),
|
5246
|
+
no_answer_calls: import_zod77.default.number(),
|
5247
|
+
busy_calls: import_zod77.default.number(),
|
5248
|
+
failed_calls: import_zod77.default.number(),
|
5249
|
+
voicemail_calls: import_zod77.default.number(),
|
5250
|
+
total_holding_time: import_zod77.default.number(),
|
5251
|
+
total_talking_time: import_zod77.default.number(),
|
5252
|
+
ext_statistics: import_zod77.default.array(ExtStatisticSchema)
|
5253
|
+
});
|
5254
|
+
var TrunkList = import_zod77.default.object({
|
5255
|
+
trunk_name: import_zod77.default.string(),
|
5256
|
+
total_calls: import_zod77.default.number()
|
5257
|
+
});
|
5258
|
+
var TrunkActivityListSchema = import_zod77.default.object({
|
5259
|
+
time: import_zod77.default.number(),
|
5260
|
+
trunk_list: import_zod77.default.array(TrunkList)
|
5261
|
+
});
|
5262
|
+
var QueueAvgWaitTalkTimeListSchema = import_zod77.default.object({
|
5263
|
+
time: import_zod77.default.number(),
|
5264
|
+
avg_wait_time: import_zod77.default.number(),
|
5265
|
+
avg_talk_time: import_zod77.default.number()
|
5266
|
+
});
|
5267
|
+
var SatisfactionListSchema = import_zod77.default.object({
|
5268
|
+
press_key: import_zod77.default.string(),
|
5269
|
+
total: import_zod77.default.number(),
|
5270
|
+
key_point: import_zod77.default.number().optional()
|
5271
|
+
});
|
5272
|
+
var agentListSchema = import_zod77.default.object({
|
5273
|
+
agent_name: import_zod77.default.string(),
|
5274
|
+
agent_num: import_zod77.default.string(),
|
5275
|
+
satisfaction_list: import_zod77.default.array(SatisfactionListSchema).optional(),
|
5276
|
+
total_key: import_zod77.default.number().optional(),
|
5277
|
+
total_point: import_zod77.default.number().optional(),
|
5278
|
+
average_point: import_zod77.default.number().optional()
|
5279
|
+
});
|
5280
|
+
var QueueSatisfactionSchema = import_zod77.default.object({
|
5281
|
+
queue_name: import_zod77.default.string(),
|
5282
|
+
queue_num: import_zod77.default.string(),
|
5283
|
+
satisfaction_list: import_zod77.default.array(SatisfactionListSchema).optional(),
|
5284
|
+
agent_list: import_zod77.default.array(agentListSchema).optional(),
|
5285
|
+
total_key: import_zod77.default.number().optional(),
|
5286
|
+
total_point: import_zod77.default.number().optional(),
|
5287
|
+
average_point: import_zod77.default.number().optional()
|
5288
|
+
});
|
5289
|
+
var QueuePerformanceListSchema = import_zod77.default.object({
|
5290
|
+
queue: import_zod77.default.string(),
|
5291
|
+
total_calls: import_zod77.default.number(),
|
5292
|
+
answered_calls: import_zod77.default.number(),
|
5293
|
+
missed_calls: import_zod77.default.number(),
|
5294
|
+
abandoned_calls: import_zod77.default.number(),
|
5295
|
+
average_waiting_time: import_zod77.default.number(),
|
5296
|
+
average_talking_time: import_zod77.default.number(),
|
5297
|
+
max_waiting_time: import_zod77.default.number(),
|
5298
|
+
answered_rate: import_zod77.default.number(),
|
5299
|
+
missed_rate: import_zod77.default.number(),
|
5300
|
+
abandoned_rate: import_zod77.default.number(),
|
5301
|
+
sla: import_zod77.default.number()
|
5302
|
+
});
|
5303
|
+
var QueueAgentMissCallsListSchema = import_zod77.default.object({
|
5304
|
+
agent_name: import_zod77.default.string(),
|
5305
|
+
agent_num: import_zod77.default.string(),
|
5306
|
+
time: import_zod77.default.string(),
|
5307
|
+
total_wait_time: import_zod77.default.number(),
|
5308
|
+
src_name: import_zod77.default.string(),
|
5309
|
+
src_num: import_zod77.default.string(),
|
5310
|
+
queue_status: import_zod77.default.string(),
|
5311
|
+
polling_attempts: import_zod77.default.number(),
|
5312
|
+
missed_reason: import_zod77.default.string()
|
5313
|
+
});
|
5314
|
+
var QueueAgentInOutCallsListSchema = import_zod77.default.object({
|
5315
|
+
agent_name: import_zod77.default.string(),
|
5316
|
+
agent_num: import_zod77.default.string(),
|
5317
|
+
inbound_calls: import_zod77.default.number(),
|
5318
|
+
inbound_duration: import_zod77.default.number(),
|
5319
|
+
outbound_calls: import_zod77.default.number(),
|
5320
|
+
outbound_duration: import_zod77.default.number(),
|
5321
|
+
total_calls: import_zod77.default.number(),
|
5322
|
+
total_duration: import_zod77.default.number(),
|
5323
|
+
average_talk_duration: import_zod77.default.number()
|
5324
|
+
});
|
5325
|
+
var CallReportModel = import_zod77.default.object({
|
5326
|
+
errcode: import_zod77.default.number(),
|
5327
|
+
errmsg: import_zod77.default.string(),
|
5328
|
+
total_number: import_zod77.default.number(),
|
5329
|
+
is_12hour: import_zod77.default.number().optional(),
|
5330
|
+
ext_call_statistics_list: import_zod77.default.array(ExtCallStatisticsListSchema).optional(),
|
5331
|
+
ext_call_activity_list: import_zod77.default.array(ExtCallActivityListSchema).optional(),
|
5332
|
+
trunk_activity_list: import_zod77.default.array(TrunkActivityListSchema).optional(),
|
5333
|
+
queue_avg_wait_talk_time_list: import_zod77.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5273
5334
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5274
|
-
queue_performance_list:
|
5275
|
-
queue_agent_miss_calls_list:
|
5276
|
-
queue_agent_in_out_calls_list:
|
5277
|
-
callback_result:
|
5278
|
-
page:
|
5279
|
-
pageSize:
|
5280
|
-
});
|
5281
|
-
var CallReportSchema =
|
5282
|
-
errcode:
|
5283
|
-
errmsg:
|
5284
|
-
total_number:
|
5285
|
-
is_12hour:
|
5286
|
-
ext_call_statistics_list:
|
5287
|
-
ext_call_activity_list:
|
5288
|
-
trunk_activity_list:
|
5289
|
-
queue_avg_wait_talk_time_list:
|
5335
|
+
queue_performance_list: import_zod77.default.array(QueuePerformanceListSchema).optional(),
|
5336
|
+
queue_agent_miss_calls_list: import_zod77.default.array(QueueAgentMissCallsListSchema).optional(),
|
5337
|
+
queue_agent_in_out_calls_list: import_zod77.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5338
|
+
callback_result: import_zod77.default.string(),
|
5339
|
+
page: import_zod77.default.number().optional(),
|
5340
|
+
pageSize: import_zod77.default.number().optional()
|
5341
|
+
});
|
5342
|
+
var CallReportSchema = import_zod77.default.object({
|
5343
|
+
errcode: import_zod77.default.number(),
|
5344
|
+
errmsg: import_zod77.default.string(),
|
5345
|
+
total_number: import_zod77.default.number(),
|
5346
|
+
is_12hour: import_zod77.default.number().optional(),
|
5347
|
+
ext_call_statistics_list: import_zod77.default.array(ExtCallStatisticsListSchema).optional(),
|
5348
|
+
ext_call_activity_list: import_zod77.default.array(ExtCallActivityListSchema).optional(),
|
5349
|
+
trunk_activity_list: import_zod77.default.array(TrunkActivityListSchema).optional(),
|
5350
|
+
queue_avg_wait_talk_time_list: import_zod77.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5290
5351
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5291
|
-
queue_performance_list:
|
5292
|
-
queue_agent_miss_calls_list:
|
5293
|
-
queue_agent_in_out_calls_list:
|
5294
|
-
callback_result:
|
5295
|
-
page:
|
5296
|
-
pageSize:
|
5352
|
+
queue_performance_list: import_zod77.default.array(QueuePerformanceListSchema).optional(),
|
5353
|
+
queue_agent_miss_calls_list: import_zod77.default.array(QueueAgentMissCallsListSchema).optional(),
|
5354
|
+
queue_agent_in_out_calls_list: import_zod77.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5355
|
+
callback_result: import_zod77.default.string(),
|
5356
|
+
page: import_zod77.default.number().optional(),
|
5357
|
+
pageSize: import_zod77.default.number().optional()
|
5297
5358
|
});
|
5298
5359
|
|
5299
5360
|
// src/telephony-cdr/index.ts
|
@@ -5306,10 +5367,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5306
5367
|
query: GetAllTelephonyCdrSchema,
|
5307
5368
|
responses: {
|
5308
5369
|
200: DefaultSuccessResponseSchema.extend({
|
5309
|
-
total:
|
5310
|
-
page:
|
5311
|
-
pageSize:
|
5312
|
-
telephonyCdrs:
|
5370
|
+
total: import_zod78.default.number(),
|
5371
|
+
page: import_zod78.default.number(),
|
5372
|
+
pageSize: import_zod78.default.number(),
|
5373
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5313
5374
|
}),
|
5314
5375
|
401: DefaultUnauthorizedSchema
|
5315
5376
|
},
|
@@ -5322,10 +5383,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5322
5383
|
query: GetAllTelephonyCdrSchema,
|
5323
5384
|
responses: {
|
5324
5385
|
200: DefaultSuccessResponseSchema.extend({
|
5325
|
-
total:
|
5326
|
-
page:
|
5327
|
-
pageSize:
|
5328
|
-
telephonyCdrs:
|
5386
|
+
total: import_zod78.default.number(),
|
5387
|
+
page: import_zod78.default.number(),
|
5388
|
+
pageSize: import_zod78.default.number(),
|
5389
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5329
5390
|
}),
|
5330
5391
|
401: DefaultUnauthorizedSchema
|
5331
5392
|
},
|
@@ -5338,10 +5399,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5338
5399
|
query: GetRecentTelephonyCdrSchema,
|
5339
5400
|
responses: {
|
5340
5401
|
200: DefaultSuccessResponseSchema.extend({
|
5341
|
-
total:
|
5342
|
-
page:
|
5343
|
-
pageSize:
|
5344
|
-
telephonyCdrs:
|
5402
|
+
total: import_zod78.default.number(),
|
5403
|
+
page: import_zod78.default.number(),
|
5404
|
+
pageSize: import_zod78.default.number(),
|
5405
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5345
5406
|
}),
|
5346
5407
|
401: DefaultUnauthorizedSchema
|
5347
5408
|
},
|
@@ -5433,35 +5494,35 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5433
5494
|
|
5434
5495
|
// src/telephony-extension/index.ts
|
5435
5496
|
var import_core29 = require("@ts-rest/core");
|
5436
|
-
var
|
5497
|
+
var import_zod80 = __toESM(require("zod"));
|
5437
5498
|
|
5438
5499
|
// src/telephony-extension/schema.ts
|
5439
|
-
var
|
5440
|
-
var TelephonyExtensionSchema3 =
|
5441
|
-
errcode:
|
5442
|
-
errmsg:
|
5443
|
-
total_number:
|
5444
|
-
data:
|
5445
|
-
|
5446
|
-
id:
|
5447
|
-
online_status:
|
5448
|
-
fx_phone:
|
5449
|
-
sip_phone:
|
5450
|
-
status:
|
5451
|
-
ext_dev_type:
|
5452
|
-
}),
|
5453
|
-
linkus_desktop:
|
5454
|
-
linkus_mobile:
|
5455
|
-
linkus_web:
|
5456
|
-
status:
|
5457
|
-
ext_dev_type:
|
5500
|
+
var import_zod79 = __toESM(require("zod"));
|
5501
|
+
var TelephonyExtensionSchema3 = import_zod79.default.object({
|
5502
|
+
errcode: import_zod79.default.coerce.number(),
|
5503
|
+
errmsg: import_zod79.default.string(),
|
5504
|
+
total_number: import_zod79.default.coerce.number(),
|
5505
|
+
data: import_zod79.default.array(
|
5506
|
+
import_zod79.default.object({
|
5507
|
+
id: import_zod79.default.coerce.number(),
|
5508
|
+
online_status: import_zod79.default.object({
|
5509
|
+
fx_phone: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5510
|
+
sip_phone: import_zod79.default.object({
|
5511
|
+
status: import_zod79.default.coerce.number(),
|
5512
|
+
ext_dev_type: import_zod79.default.string().optional()
|
5513
|
+
}),
|
5514
|
+
linkus_desktop: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5515
|
+
linkus_mobile: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5516
|
+
linkus_web: import_zod79.default.object({
|
5517
|
+
status: import_zod79.default.coerce.number(),
|
5518
|
+
ext_dev_type: import_zod79.default.string().optional()
|
5458
5519
|
})
|
5459
5520
|
}).optional(),
|
5460
|
-
presence_status:
|
5461
|
-
number:
|
5462
|
-
caller_id_name:
|
5463
|
-
role_name:
|
5464
|
-
email_addr:
|
5521
|
+
presence_status: import_zod79.default.string().optional(),
|
5522
|
+
number: import_zod79.default.string().optional(),
|
5523
|
+
caller_id_name: import_zod79.default.string().optional(),
|
5524
|
+
role_name: import_zod79.default.string().optional(),
|
5525
|
+
email_addr: import_zod79.default.string().optional()
|
5465
5526
|
})
|
5466
5527
|
)
|
5467
5528
|
});
|
@@ -5476,8 +5537,8 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5476
5537
|
query: null,
|
5477
5538
|
responses: {
|
5478
5539
|
200: TelephonyExtensionSchema3,
|
5479
|
-
400:
|
5480
|
-
message:
|
5540
|
+
400: import_zod80.default.object({
|
5541
|
+
message: import_zod80.default.string()
|
5481
5542
|
}),
|
5482
5543
|
401: DefaultUnauthorizedSchema,
|
5483
5544
|
500: DefaultErrorResponseSchema
|
@@ -5490,10 +5551,10 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5490
5551
|
|
5491
5552
|
// src/ticket/index.ts
|
5492
5553
|
var import_core30 = require("@ts-rest/core");
|
5493
|
-
var
|
5554
|
+
var import_zod82 = __toESM(require("zod"));
|
5494
5555
|
|
5495
5556
|
// src/ticket/validation.ts
|
5496
|
-
var
|
5557
|
+
var import_zod81 = __toESM(require("zod"));
|
5497
5558
|
var addErrorMessage2 = (field) => {
|
5498
5559
|
return field.refine(
|
5499
5560
|
({ isRequired, value }) => {
|
@@ -5511,106 +5572,106 @@ var addErrorMessage2 = (field) => {
|
|
5511
5572
|
}
|
5512
5573
|
);
|
5513
5574
|
};
|
5514
|
-
var BaseSchema3 =
|
5515
|
-
isRequired:
|
5516
|
-
attributeId:
|
5575
|
+
var BaseSchema3 = import_zod81.default.object({
|
5576
|
+
isRequired: import_zod81.default.boolean(),
|
5577
|
+
attributeId: import_zod81.default.string()
|
5517
5578
|
});
|
5518
5579
|
var SingleValue2 = addErrorMessage2(
|
5519
5580
|
BaseSchema3.extend({
|
5520
|
-
value:
|
5581
|
+
value: import_zod81.default.string()
|
5521
5582
|
})
|
5522
5583
|
);
|
5523
|
-
var CreateTicketValidationSchema =
|
5584
|
+
var CreateTicketValidationSchema = import_zod81.default.object({
|
5524
5585
|
title: SingleValue2,
|
5525
5586
|
description: SingleValue2,
|
5526
5587
|
status: SingleValue2,
|
5527
5588
|
type: SingleValue2,
|
5528
5589
|
priority: SingleValue2,
|
5529
5590
|
contact: SingleValue2,
|
5530
|
-
assignee:
|
5531
|
-
isRequired:
|
5532
|
-
attributeId:
|
5533
|
-
value:
|
5591
|
+
assignee: import_zod81.default.object({
|
5592
|
+
isRequired: import_zod81.default.boolean(),
|
5593
|
+
attributeId: import_zod81.default.string(),
|
5594
|
+
value: import_zod81.default.string()
|
5534
5595
|
}),
|
5535
5596
|
channel: SingleValue2,
|
5536
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5537
|
-
categories: BaseSchema3.extend({ value:
|
5538
|
-
customFields:
|
5597
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: import_zod81.default.array(import_zod81.default.string()) })),
|
5598
|
+
categories: BaseSchema3.extend({ value: import_zod81.default.array(import_zod81.default.string()) }),
|
5599
|
+
customFields: import_zod81.default.array(
|
5539
5600
|
addErrorMessage2(
|
5540
5601
|
BaseSchema3.extend({
|
5541
|
-
value:
|
5542
|
-
type:
|
5543
|
-
isDefaultAttribute:
|
5602
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())]),
|
5603
|
+
type: import_zod81.default.string(),
|
5604
|
+
isDefaultAttribute: import_zod81.default.boolean()
|
5544
5605
|
})
|
5545
5606
|
)
|
5546
5607
|
),
|
5547
|
-
reasonToAssign:
|
5608
|
+
reasonToAssign: import_zod81.default.object({ value: import_zod81.default.string() }).optional()
|
5548
5609
|
});
|
5549
5610
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5550
|
-
var TicketAttachmentRecordSchema =
|
5551
|
-
bucketName:
|
5552
|
-
fileKey:
|
5553
|
-
fileName:
|
5554
|
-
fileSize:
|
5555
|
-
url:
|
5556
|
-
});
|
5557
|
-
var CreateTicketAttachmentRecordsSchema =
|
5558
|
-
ticketId:
|
5559
|
-
attributeId:
|
5560
|
-
ticketAttachmentRecords:
|
5561
|
-
});
|
5562
|
-
var TicketParamsSchema =
|
5563
|
-
page:
|
5564
|
-
pageSize:
|
5565
|
-
});
|
5566
|
-
var CustomFieldQuery =
|
5567
|
-
attributeId:
|
5568
|
-
type:
|
5569
|
-
value:
|
5570
|
-
});
|
5571
|
-
var GetAllTicketQuerySchema =
|
5572
|
-
page:
|
5573
|
-
pageSize:
|
5574
|
-
selectedDate:
|
5575
|
-
keyword:
|
5576
|
-
title:
|
5577
|
-
description:
|
5578
|
-
status:
|
5579
|
-
priority:
|
5580
|
-
channel:
|
5581
|
-
type:
|
5582
|
-
ticketType:
|
5583
|
-
contact:
|
5584
|
-
tags:
|
5585
|
-
categories:
|
5586
|
-
assignee:
|
5587
|
-
customFields:
|
5588
|
-
|
5589
|
-
attributeId:
|
5590
|
-
type:
|
5591
|
-
value:
|
5611
|
+
var TicketAttachmentRecordSchema = import_zod81.default.object({
|
5612
|
+
bucketName: import_zod81.default.string(),
|
5613
|
+
fileKey: import_zod81.default.string(),
|
5614
|
+
fileName: import_zod81.default.string(),
|
5615
|
+
fileSize: import_zod81.default.coerce.number(),
|
5616
|
+
url: import_zod81.default.string()
|
5617
|
+
});
|
5618
|
+
var CreateTicketAttachmentRecordsSchema = import_zod81.default.object({
|
5619
|
+
ticketId: import_zod81.default.string(),
|
5620
|
+
attributeId: import_zod81.default.string(),
|
5621
|
+
ticketAttachmentRecords: import_zod81.default.array(TicketAttachmentRecordSchema)
|
5622
|
+
});
|
5623
|
+
var TicketParamsSchema = import_zod81.default.object({
|
5624
|
+
page: import_zod81.default.coerce.number().default(1),
|
5625
|
+
pageSize: import_zod81.default.coerce.number().default(10)
|
5626
|
+
});
|
5627
|
+
var CustomFieldQuery = import_zod81.default.object({
|
5628
|
+
attributeId: import_zod81.default.string(),
|
5629
|
+
type: import_zod81.default.string(),
|
5630
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5631
|
+
});
|
5632
|
+
var GetAllTicketQuerySchema = import_zod81.default.object({
|
5633
|
+
page: import_zod81.default.string().transform((value) => Number(value)),
|
5634
|
+
pageSize: import_zod81.default.string().transform((value) => Number(value)),
|
5635
|
+
selectedDate: import_zod81.default.string(),
|
5636
|
+
keyword: import_zod81.default.string(),
|
5637
|
+
title: import_zod81.default.string(),
|
5638
|
+
description: import_zod81.default.string(),
|
5639
|
+
status: import_zod81.default.array(import_zod81.default.string()),
|
5640
|
+
priority: import_zod81.default.array(import_zod81.default.string()),
|
5641
|
+
channel: import_zod81.default.array(import_zod81.default.string()),
|
5642
|
+
type: import_zod81.default.array(import_zod81.default.string()),
|
5643
|
+
ticketType: import_zod81.default.array(import_zod81.default.string()),
|
5644
|
+
contact: import_zod81.default.array(import_zod81.default.string()),
|
5645
|
+
tags: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5646
|
+
categories: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5647
|
+
assignee: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5648
|
+
customFields: import_zod81.default.array(
|
5649
|
+
import_zod81.default.object({
|
5650
|
+
attributeId: import_zod81.default.string().uuid(),
|
5651
|
+
type: import_zod81.default.string(),
|
5652
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5592
5653
|
})
|
5593
5654
|
)
|
5594
5655
|
}).partial();
|
5595
|
-
var ExportAllTicketQuerySchema =
|
5596
|
-
agent:
|
5597
|
-
selectedDate:
|
5598
|
-
keyword:
|
5599
|
-
title:
|
5600
|
-
description:
|
5601
|
-
status:
|
5602
|
-
priority:
|
5603
|
-
channel:
|
5604
|
-
type:
|
5605
|
-
ticketType:
|
5606
|
-
contact:
|
5607
|
-
tags:
|
5608
|
-
categories:
|
5609
|
-
customFields:
|
5610
|
-
|
5611
|
-
attributeId:
|
5612
|
-
type:
|
5613
|
-
value:
|
5656
|
+
var ExportAllTicketQuerySchema = import_zod81.default.object({
|
5657
|
+
agent: import_zod81.default.array(import_zod81.default.string()),
|
5658
|
+
selectedDate: import_zod81.default.string(),
|
5659
|
+
keyword: import_zod81.default.string(),
|
5660
|
+
title: import_zod81.default.string(),
|
5661
|
+
description: import_zod81.default.string(),
|
5662
|
+
status: import_zod81.default.array(import_zod81.default.string()),
|
5663
|
+
priority: import_zod81.default.array(import_zod81.default.string()),
|
5664
|
+
channel: import_zod81.default.array(import_zod81.default.string()),
|
5665
|
+
type: import_zod81.default.array(import_zod81.default.string()),
|
5666
|
+
ticketType: import_zod81.default.array(import_zod81.default.string()),
|
5667
|
+
contact: import_zod81.default.array(import_zod81.default.string()),
|
5668
|
+
tags: import_zod81.default.array(import_zod81.default.string()),
|
5669
|
+
categories: import_zod81.default.array(import_zod81.default.string()),
|
5670
|
+
customFields: import_zod81.default.array(
|
5671
|
+
import_zod81.default.object({
|
5672
|
+
attributeId: import_zod81.default.string().uuid(),
|
5673
|
+
type: import_zod81.default.string(),
|
5674
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5614
5675
|
})
|
5615
5676
|
)
|
5616
5677
|
}).partial();
|
@@ -5626,14 +5687,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5626
5687
|
201: DefaultSuccessResponseSchema.extend({
|
5627
5688
|
data: TicketSchema
|
5628
5689
|
}),
|
5629
|
-
400:
|
5630
|
-
message:
|
5690
|
+
400: import_zod82.default.object({
|
5691
|
+
message: import_zod82.default.string()
|
5631
5692
|
}),
|
5632
|
-
409:
|
5633
|
-
message:
|
5693
|
+
409: import_zod82.default.object({
|
5694
|
+
message: import_zod82.default.string()
|
5634
5695
|
}),
|
5635
|
-
500:
|
5636
|
-
message:
|
5696
|
+
500: import_zod82.default.object({
|
5697
|
+
message: import_zod82.default.string()
|
5637
5698
|
}),
|
5638
5699
|
401: DefaultUnauthorizedSchema,
|
5639
5700
|
404: DefaultNotFoundSchema,
|
@@ -5654,8 +5715,8 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5654
5715
|
TicketSchema
|
5655
5716
|
)
|
5656
5717
|
}),
|
5657
|
-
400:
|
5658
|
-
message:
|
5718
|
+
400: import_zod82.default.object({
|
5719
|
+
message: import_zod82.default.string()
|
5659
5720
|
}),
|
5660
5721
|
401: DefaultUnauthorizedSchema,
|
5661
5722
|
500: DefaultErrorResponseSchema
|
@@ -5665,14 +5726,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5665
5726
|
getTicketById: {
|
5666
5727
|
method: "GET",
|
5667
5728
|
path: "/:id",
|
5668
|
-
pathParams:
|
5729
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5669
5730
|
headers: DefaultHeaderSchema,
|
5670
5731
|
responses: {
|
5671
5732
|
200: DefaultSuccessResponseSchema.extend({
|
5672
5733
|
data: TicketSchema
|
5673
5734
|
}),
|
5674
|
-
400:
|
5675
|
-
message:
|
5735
|
+
400: import_zod82.default.object({
|
5736
|
+
message: import_zod82.default.string()
|
5676
5737
|
}),
|
5677
5738
|
401: DefaultUnauthorizedSchema,
|
5678
5739
|
500: DefaultErrorResponseSchema
|
@@ -5682,15 +5743,15 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5682
5743
|
getTicketByContactId: {
|
5683
5744
|
method: "GET",
|
5684
5745
|
path: "/contact/:id",
|
5685
|
-
pathParams:
|
5746
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5686
5747
|
query: TicketParamsSchema,
|
5687
5748
|
headers: DefaultHeaderSchema,
|
5688
5749
|
responses: {
|
5689
5750
|
200: DefaultSuccessResponseSchema.extend({
|
5690
5751
|
data: WithPagination(TicketSchema)
|
5691
5752
|
}),
|
5692
|
-
400:
|
5693
|
-
message:
|
5753
|
+
400: import_zod82.default.object({
|
5754
|
+
message: import_zod82.default.string()
|
5694
5755
|
}),
|
5695
5756
|
401: DefaultUnauthorizedSchema,
|
5696
5757
|
500: DefaultErrorResponseSchema
|
@@ -5700,21 +5761,21 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5700
5761
|
updateTicket: {
|
5701
5762
|
method: "PATCH",
|
5702
5763
|
path: "/:id",
|
5703
|
-
pathParams:
|
5764
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5704
5765
|
body: UpdateTicketValidationSchema,
|
5705
5766
|
headers: DefaultHeaderSchema,
|
5706
5767
|
responses: {
|
5707
5768
|
201: DefaultSuccessResponseSchema.extend({
|
5708
5769
|
data: TicketSchema
|
5709
5770
|
}),
|
5710
|
-
400:
|
5711
|
-
message:
|
5771
|
+
400: import_zod82.default.object({
|
5772
|
+
message: import_zod82.default.string()
|
5712
5773
|
}),
|
5713
|
-
409:
|
5714
|
-
message:
|
5774
|
+
409: import_zod82.default.object({
|
5775
|
+
message: import_zod82.default.string()
|
5715
5776
|
}),
|
5716
|
-
500:
|
5717
|
-
message:
|
5777
|
+
500: import_zod82.default.object({
|
5778
|
+
message: import_zod82.default.string()
|
5718
5779
|
}),
|
5719
5780
|
401: DefaultUnauthorizedSchema,
|
5720
5781
|
404: DefaultNotFoundSchema,
|
@@ -5725,11 +5786,11 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5725
5786
|
deleteTicket: {
|
5726
5787
|
method: "DELETE",
|
5727
5788
|
path: "/:id",
|
5728
|
-
pathParams:
|
5789
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5729
5790
|
headers: DefaultHeaderSchema,
|
5730
5791
|
body: null,
|
5731
5792
|
responses: {
|
5732
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5793
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5733
5794
|
500: DefaultErrorResponseSchema
|
5734
5795
|
},
|
5735
5796
|
summary: "Delete a extension."
|
@@ -5737,19 +5798,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5737
5798
|
updateDescription: {
|
5738
5799
|
method: "PATCH",
|
5739
5800
|
path: "/description/update/:id",
|
5740
|
-
pathParams:
|
5741
|
-
body:
|
5801
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5802
|
+
body: import_zod82.default.object({ description: import_zod82.default.string() }),
|
5742
5803
|
headers: DefaultHeaderSchema,
|
5743
5804
|
responses: {
|
5744
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
5745
|
-
400:
|
5746
|
-
message:
|
5805
|
+
201: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5806
|
+
400: import_zod82.default.object({
|
5807
|
+
message: import_zod82.default.string()
|
5747
5808
|
}),
|
5748
|
-
409:
|
5749
|
-
message:
|
5809
|
+
409: import_zod82.default.object({
|
5810
|
+
message: import_zod82.default.string()
|
5750
5811
|
}),
|
5751
|
-
500:
|
5752
|
-
message:
|
5812
|
+
500: import_zod82.default.object({
|
5813
|
+
message: import_zod82.default.string()
|
5753
5814
|
}),
|
5754
5815
|
401: DefaultUnauthorizedSchema,
|
5755
5816
|
404: DefaultNotFoundSchema,
|
@@ -5760,19 +5821,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5760
5821
|
updateTitle: {
|
5761
5822
|
method: "PATCH",
|
5762
5823
|
path: "/title/update/:id",
|
5763
|
-
pathParams:
|
5764
|
-
body:
|
5824
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5825
|
+
body: import_zod82.default.object({ title: import_zod82.default.string() }),
|
5765
5826
|
headers: DefaultHeaderSchema,
|
5766
5827
|
responses: {
|
5767
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5768
|
-
400:
|
5769
|
-
message:
|
5828
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5829
|
+
400: import_zod82.default.object({
|
5830
|
+
message: import_zod82.default.string()
|
5770
5831
|
}),
|
5771
|
-
409:
|
5772
|
-
message:
|
5832
|
+
409: import_zod82.default.object({
|
5833
|
+
message: import_zod82.default.string()
|
5773
5834
|
}),
|
5774
|
-
500:
|
5775
|
-
message:
|
5835
|
+
500: import_zod82.default.object({
|
5836
|
+
message: import_zod82.default.string()
|
5776
5837
|
}),
|
5777
5838
|
401: DefaultUnauthorizedSchema,
|
5778
5839
|
404: DefaultNotFoundSchema,
|
@@ -5783,19 +5844,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5783
5844
|
updateType: {
|
5784
5845
|
method: "PATCH",
|
5785
5846
|
path: "/type/update/:id",
|
5786
|
-
pathParams:
|
5787
|
-
body:
|
5847
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5848
|
+
body: import_zod82.default.object({ type: import_zod82.default.string() }),
|
5788
5849
|
headers: DefaultHeaderSchema,
|
5789
5850
|
responses: {
|
5790
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5791
|
-
400:
|
5792
|
-
message:
|
5851
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5852
|
+
400: import_zod82.default.object({
|
5853
|
+
message: import_zod82.default.string()
|
5793
5854
|
}),
|
5794
|
-
409:
|
5795
|
-
message:
|
5855
|
+
409: import_zod82.default.object({
|
5856
|
+
message: import_zod82.default.string()
|
5796
5857
|
}),
|
5797
|
-
500:
|
5798
|
-
message:
|
5858
|
+
500: import_zod82.default.object({
|
5859
|
+
message: import_zod82.default.string()
|
5799
5860
|
}),
|
5800
5861
|
401: DefaultUnauthorizedSchema,
|
5801
5862
|
404: DefaultNotFoundSchema,
|
@@ -5806,19 +5867,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5806
5867
|
updateStatus: {
|
5807
5868
|
method: "PATCH",
|
5808
5869
|
path: "/status/update/:id",
|
5809
|
-
pathParams:
|
5810
|
-
body:
|
5870
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5871
|
+
body: import_zod82.default.object({ status: import_zod82.default.string() }),
|
5811
5872
|
headers: DefaultHeaderSchema,
|
5812
5873
|
responses: {
|
5813
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5814
|
-
400:
|
5815
|
-
message:
|
5874
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5875
|
+
400: import_zod82.default.object({
|
5876
|
+
message: import_zod82.default.string()
|
5816
5877
|
}),
|
5817
|
-
409:
|
5818
|
-
message:
|
5878
|
+
409: import_zod82.default.object({
|
5879
|
+
message: import_zod82.default.string()
|
5819
5880
|
}),
|
5820
|
-
500:
|
5821
|
-
message:
|
5881
|
+
500: import_zod82.default.object({
|
5882
|
+
message: import_zod82.default.string()
|
5822
5883
|
}),
|
5823
5884
|
401: DefaultUnauthorizedSchema,
|
5824
5885
|
404: DefaultNotFoundSchema,
|
@@ -5829,19 +5890,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5829
5890
|
updatePriority: {
|
5830
5891
|
method: "PATCH",
|
5831
5892
|
path: "/priority/update/:id",
|
5832
|
-
pathParams:
|
5833
|
-
body:
|
5893
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5894
|
+
body: import_zod82.default.object({ priority: import_zod82.default.string() }),
|
5834
5895
|
headers: DefaultHeaderSchema,
|
5835
5896
|
responses: {
|
5836
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5837
|
-
400:
|
5838
|
-
message:
|
5897
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5898
|
+
400: import_zod82.default.object({
|
5899
|
+
message: import_zod82.default.string()
|
5839
5900
|
}),
|
5840
|
-
409:
|
5841
|
-
message:
|
5901
|
+
409: import_zod82.default.object({
|
5902
|
+
message: import_zod82.default.string()
|
5842
5903
|
}),
|
5843
|
-
500:
|
5844
|
-
message:
|
5904
|
+
500: import_zod82.default.object({
|
5905
|
+
message: import_zod82.default.string()
|
5845
5906
|
}),
|
5846
5907
|
401: DefaultUnauthorizedSchema,
|
5847
5908
|
404: DefaultNotFoundSchema,
|
@@ -5852,19 +5913,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5852
5913
|
updateChannel: {
|
5853
5914
|
method: "PATCH",
|
5854
5915
|
path: "/channel/update/:id",
|
5855
|
-
pathParams:
|
5856
|
-
body:
|
5916
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5917
|
+
body: import_zod82.default.object({ channel: import_zod82.default.string() }),
|
5857
5918
|
headers: DefaultHeaderSchema,
|
5858
5919
|
responses: {
|
5859
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5860
|
-
400:
|
5861
|
-
message:
|
5920
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5921
|
+
400: import_zod82.default.object({
|
5922
|
+
message: import_zod82.default.string()
|
5862
5923
|
}),
|
5863
|
-
409:
|
5864
|
-
message:
|
5924
|
+
409: import_zod82.default.object({
|
5925
|
+
message: import_zod82.default.string()
|
5865
5926
|
}),
|
5866
|
-
500:
|
5867
|
-
message:
|
5927
|
+
500: import_zod82.default.object({
|
5928
|
+
message: import_zod82.default.string()
|
5868
5929
|
}),
|
5869
5930
|
401: DefaultUnauthorizedSchema,
|
5870
5931
|
404: DefaultNotFoundSchema,
|
@@ -5875,19 +5936,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5875
5936
|
updateTags: {
|
5876
5937
|
method: "PATCH",
|
5877
5938
|
path: "/tags/update/:id",
|
5878
|
-
pathParams:
|
5879
|
-
body:
|
5939
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5940
|
+
body: import_zod82.default.object({ tags: import_zod82.default.array(import_zod82.default.string()) }),
|
5880
5941
|
headers: DefaultHeaderSchema,
|
5881
5942
|
responses: {
|
5882
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5883
|
-
400:
|
5884
|
-
message:
|
5943
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5944
|
+
400: import_zod82.default.object({
|
5945
|
+
message: import_zod82.default.string()
|
5885
5946
|
}),
|
5886
|
-
409:
|
5887
|
-
message:
|
5947
|
+
409: import_zod82.default.object({
|
5948
|
+
message: import_zod82.default.string()
|
5888
5949
|
}),
|
5889
|
-
500:
|
5890
|
-
message:
|
5950
|
+
500: import_zod82.default.object({
|
5951
|
+
message: import_zod82.default.string()
|
5891
5952
|
}),
|
5892
5953
|
401: DefaultUnauthorizedSchema,
|
5893
5954
|
404: DefaultNotFoundSchema,
|
@@ -5898,25 +5959,25 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5898
5959
|
changeAssignee: {
|
5899
5960
|
method: "PATCH",
|
5900
5961
|
path: "/assignee/update/:id",
|
5901
|
-
pathParams:
|
5902
|
-
body:
|
5903
|
-
ticketId:
|
5904
|
-
assigneeId:
|
5905
|
-
reason:
|
5962
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5963
|
+
body: import_zod82.default.object({
|
5964
|
+
ticketId: import_zod82.default.string(),
|
5965
|
+
assigneeId: import_zod82.default.string(),
|
5966
|
+
reason: import_zod82.default.string().optional()
|
5906
5967
|
}),
|
5907
5968
|
headers: DefaultHeaderSchema,
|
5908
5969
|
responses: {
|
5909
5970
|
200: DefaultSuccessResponseSchema.extend({
|
5910
5971
|
data: TicketSchema
|
5911
5972
|
}),
|
5912
|
-
400:
|
5913
|
-
message:
|
5973
|
+
400: import_zod82.default.object({
|
5974
|
+
message: import_zod82.default.string()
|
5914
5975
|
}),
|
5915
|
-
409:
|
5916
|
-
message:
|
5976
|
+
409: import_zod82.default.object({
|
5977
|
+
message: import_zod82.default.string()
|
5917
5978
|
}),
|
5918
|
-
500:
|
5919
|
-
message:
|
5979
|
+
500: import_zod82.default.object({
|
5980
|
+
message: import_zod82.default.string()
|
5920
5981
|
}),
|
5921
5982
|
401: DefaultUnauthorizedSchema,
|
5922
5983
|
404: DefaultNotFoundSchema,
|
@@ -5927,14 +5988,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5927
5988
|
getTicketCountByContact: {
|
5928
5989
|
method: "GET",
|
5929
5990
|
path: "/ticket_count/contact/:id",
|
5930
|
-
pathParams:
|
5991
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5931
5992
|
headers: DefaultHeaderSchema,
|
5932
5993
|
responses: {
|
5933
5994
|
200: DefaultSuccessResponseSchema.extend({
|
5934
5995
|
data: TicketCountByContactSchema
|
5935
5996
|
}),
|
5936
|
-
400:
|
5937
|
-
message:
|
5997
|
+
400: import_zod82.default.object({
|
5998
|
+
message: import_zod82.default.string()
|
5938
5999
|
}),
|
5939
6000
|
401: DefaultUnauthorizedSchema,
|
5940
6001
|
500: DefaultErrorResponseSchema
|
@@ -5950,14 +6011,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5950
6011
|
201: DefaultSuccessResponseSchema.extend({
|
5951
6012
|
data: TicketCustomFieldSchema
|
5952
6013
|
}),
|
5953
|
-
400:
|
5954
|
-
message:
|
6014
|
+
400: import_zod82.default.object({
|
6015
|
+
message: import_zod82.default.string()
|
5955
6016
|
}),
|
5956
|
-
409:
|
5957
|
-
message:
|
6017
|
+
409: import_zod82.default.object({
|
6018
|
+
message: import_zod82.default.string()
|
5958
6019
|
}),
|
5959
|
-
500:
|
5960
|
-
message:
|
6020
|
+
500: import_zod82.default.object({
|
6021
|
+
message: import_zod82.default.string()
|
5961
6022
|
}),
|
5962
6023
|
401: DefaultUnauthorizedSchema,
|
5963
6024
|
404: DefaultNotFoundSchema,
|
@@ -5982,21 +6043,24 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5982
6043
|
|
5983
6044
|
// src/user/index.ts
|
5984
6045
|
var import_core31 = require("@ts-rest/core");
|
5985
|
-
var
|
6046
|
+
var import_zod84 = __toESM(require("zod"));
|
5986
6047
|
|
5987
6048
|
// src/user/validation.ts
|
5988
|
-
var
|
5989
|
-
var CreateUserSchema =
|
5990
|
-
name:
|
5991
|
-
email:
|
5992
|
-
address:
|
5993
|
-
phone:
|
5994
|
-
password:
|
5995
|
-
notificationCount:
|
5996
|
-
roles:
|
6049
|
+
var import_zod83 = require("zod");
|
6050
|
+
var CreateUserSchema = import_zod83.z.object({
|
6051
|
+
name: import_zod83.z.string(),
|
6052
|
+
email: import_zod83.z.string().email(),
|
6053
|
+
address: import_zod83.z.string().nullable(),
|
6054
|
+
phone: import_zod83.z.string().nullable(),
|
6055
|
+
password: import_zod83.z.string(),
|
6056
|
+
notificationCount: import_zod83.z.number().nullable().optional(),
|
6057
|
+
roles: import_zod83.z.array(import_zod83.z.string())
|
5997
6058
|
});
|
5998
6059
|
var UpdateUserSchema = CreateUserSchema.extend({
|
5999
|
-
newPassword:
|
6060
|
+
newPassword: import_zod83.z.string()
|
6061
|
+
});
|
6062
|
+
var UpdateUserProfileSchema = import_zod83.z.object({
|
6063
|
+
password: import_zod83.z.string()
|
6000
6064
|
});
|
6001
6065
|
|
6002
6066
|
// src/user/index.ts
|
@@ -6011,8 +6075,8 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6011
6075
|
201: DefaultSuccessResponseSchema.extend({
|
6012
6076
|
user: UserSchema
|
6013
6077
|
}),
|
6014
|
-
400:
|
6015
|
-
message:
|
6078
|
+
400: import_zod84.default.object({
|
6079
|
+
message: import_zod84.default.string()
|
6016
6080
|
}),
|
6017
6081
|
401: DefaultUnauthorizedSchema,
|
6018
6082
|
404: DefaultNotFoundSchema,
|
@@ -6025,16 +6089,16 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6025
6089
|
method: "GET",
|
6026
6090
|
path: "",
|
6027
6091
|
headers: DefaultHeaderSchema,
|
6028
|
-
query:
|
6029
|
-
page:
|
6030
|
-
pageSize:
|
6092
|
+
query: import_zod84.default.object({
|
6093
|
+
page: import_zod84.default.coerce.number().optional(),
|
6094
|
+
pageSize: import_zod84.default.coerce.number().optional(),
|
6031
6095
|
// Don't add default 10. In some places, we need to fetch all users.
|
6032
|
-
keyword:
|
6096
|
+
keyword: import_zod84.default.string().optional()
|
6033
6097
|
}).optional(),
|
6034
6098
|
responses: {
|
6035
6099
|
200: WithPagination(UserSchema),
|
6036
|
-
400:
|
6037
|
-
message:
|
6100
|
+
400: import_zod84.default.object({
|
6101
|
+
message: import_zod84.default.string()
|
6038
6102
|
}),
|
6039
6103
|
401: DefaultUnauthorizedSchema,
|
6040
6104
|
500: DefaultErrorResponseSchema
|
@@ -6044,12 +6108,12 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6044
6108
|
getUserById: {
|
6045
6109
|
method: "GET",
|
6046
6110
|
path: "/:id",
|
6047
|
-
pathParams:
|
6111
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6048
6112
|
headers: DefaultHeaderSchema,
|
6049
6113
|
responses: {
|
6050
6114
|
200: UserSchema,
|
6051
|
-
400:
|
6052
|
-
message:
|
6115
|
+
400: import_zod84.default.object({
|
6116
|
+
message: import_zod84.default.string()
|
6053
6117
|
}),
|
6054
6118
|
401: DefaultUnauthorizedSchema
|
6055
6119
|
},
|
@@ -6058,15 +6122,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6058
6122
|
updateUser: {
|
6059
6123
|
method: "PATCH",
|
6060
6124
|
path: "/:id",
|
6061
|
-
pathParams:
|
6125
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6062
6126
|
headers: DefaultHeaderSchema,
|
6063
6127
|
body: UpdateUserSchema,
|
6064
6128
|
responses: {
|
6065
6129
|
201: DefaultSuccessResponseSchema.extend({
|
6066
|
-
|
6130
|
+
user: UserSchema
|
6067
6131
|
}),
|
6068
|
-
400:
|
6069
|
-
message:
|
6132
|
+
400: import_zod84.default.object({
|
6133
|
+
message: import_zod84.default.string()
|
6070
6134
|
}),
|
6071
6135
|
401: DefaultUnauthorizedSchema,
|
6072
6136
|
404: DefaultNotFoundSchema,
|
@@ -6075,14 +6139,34 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6075
6139
|
},
|
6076
6140
|
summary: "Update a user."
|
6077
6141
|
},
|
6142
|
+
updateUserProfile: {
|
6143
|
+
method: "PATCH",
|
6144
|
+
path: "/profile/:id",
|
6145
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6146
|
+
headers: DefaultHeaderSchema,
|
6147
|
+
body: UpdateUserProfileSchema,
|
6148
|
+
responses: {
|
6149
|
+
201: DefaultSuccessResponseSchema.extend({
|
6150
|
+
user: UserSchema
|
6151
|
+
}),
|
6152
|
+
400: import_zod84.default.object({
|
6153
|
+
message: import_zod84.default.string()
|
6154
|
+
}),
|
6155
|
+
401: DefaultUnauthorizedSchema,
|
6156
|
+
404: DefaultNotFoundSchema,
|
6157
|
+
422: DefaultUnprocessibleSchema,
|
6158
|
+
500: DefaultErrorResponseSchema
|
6159
|
+
},
|
6160
|
+
summary: "Update a user profile."
|
6161
|
+
},
|
6078
6162
|
deleteUser: {
|
6079
6163
|
method: "DELETE",
|
6080
6164
|
path: "/:id",
|
6081
|
-
pathParams:
|
6165
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6082
6166
|
headers: DefaultHeaderSchema,
|
6083
6167
|
body: null,
|
6084
6168
|
responses: {
|
6085
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6169
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod84.default.string() }),
|
6086
6170
|
404: DefaultNotFoundSchema,
|
6087
6171
|
422: DefaultUnprocessibleSchema,
|
6088
6172
|
500: DefaultErrorResponseSchema
|
@@ -6095,26 +6179,26 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6095
6179
|
|
6096
6180
|
// src/user-presence-status-log/index.ts
|
6097
6181
|
var import_core32 = require("@ts-rest/core");
|
6098
|
-
var
|
6182
|
+
var import_zod87 = __toESM(require("zod"));
|
6099
6183
|
|
6100
6184
|
// src/user-presence-status-log/schema.ts
|
6101
|
-
var
|
6185
|
+
var import_zod85 = __toESM(require("zod"));
|
6102
6186
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6103
6187
|
user: UserSchema,
|
6104
6188
|
previousPresenceStatus: PresenceStatusSchema,
|
6105
6189
|
newPresenceStatus: PresenceStatusSchema,
|
6106
|
-
reason:
|
6190
|
+
reason: import_zod85.default.string()
|
6107
6191
|
});
|
6108
6192
|
|
6109
6193
|
// src/user-presence-status-log/validation.ts
|
6110
|
-
var
|
6111
|
-
var UserPresenceStatusLogParamsSchema =
|
6112
|
-
page:
|
6113
|
-
pageSize:
|
6114
|
-
selectedDate:
|
6194
|
+
var import_zod86 = __toESM(require("zod"));
|
6195
|
+
var UserPresenceStatusLogParamsSchema = import_zod86.default.object({
|
6196
|
+
page: import_zod86.default.coerce.number().default(1),
|
6197
|
+
pageSize: import_zod86.default.coerce.number().default(10),
|
6198
|
+
selectedDate: import_zod86.default.string().optional()
|
6115
6199
|
}).optional();
|
6116
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6117
|
-
selectedDate:
|
6200
|
+
var UserPresenceStatusLogExportParamsSchema = import_zod86.default.object({
|
6201
|
+
selectedDate: import_zod86.default.string().optional()
|
6118
6202
|
});
|
6119
6203
|
|
6120
6204
|
// src/user-presence-status-log/index.ts
|
@@ -6127,8 +6211,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6127
6211
|
headers: DefaultHeaderSchema,
|
6128
6212
|
responses: {
|
6129
6213
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6130
|
-
400:
|
6131
|
-
message:
|
6214
|
+
400: import_zod87.default.object({
|
6215
|
+
message: import_zod87.default.string()
|
6132
6216
|
}),
|
6133
6217
|
401: DefaultUnauthorizedSchema,
|
6134
6218
|
500: DefaultErrorResponseSchema
|
@@ -6142,8 +6226,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6142
6226
|
headers: DefaultHeaderSchema,
|
6143
6227
|
responses: {
|
6144
6228
|
200: null,
|
6145
|
-
400:
|
6146
|
-
message:
|
6229
|
+
400: import_zod87.default.object({
|
6230
|
+
message: import_zod87.default.string()
|
6147
6231
|
}),
|
6148
6232
|
401: DefaultUnauthorizedSchema,
|
6149
6233
|
500: DefaultErrorResponseSchema
|
@@ -6155,44 +6239,44 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6155
6239
|
|
6156
6240
|
// src/widget/index.ts
|
6157
6241
|
var import_core33 = require("@ts-rest/core");
|
6158
|
-
var
|
6242
|
+
var import_zod90 = __toESM(require("zod"));
|
6159
6243
|
|
6160
6244
|
// src/widget/schema.ts
|
6161
|
-
var
|
6162
|
-
var FieldsSchema =
|
6163
|
-
var WidgetPositionSchema =
|
6164
|
-
|
6165
|
-
|
6166
|
-
|
6245
|
+
var import_zod88 = __toESM(require("zod"));
|
6246
|
+
var FieldsSchema = import_zod88.default.object({ data: import_zod88.default.array(import_zod88.default.string()) });
|
6247
|
+
var WidgetPositionSchema = import_zod88.default.union([
|
6248
|
+
import_zod88.default.literal("menu"),
|
6249
|
+
import_zod88.default.literal("ticket_detail"),
|
6250
|
+
import_zod88.default.literal("contact_detail")
|
6167
6251
|
]);
|
6168
6252
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6169
|
-
name:
|
6170
|
-
description:
|
6253
|
+
name: import_zod88.default.string(),
|
6254
|
+
description: import_zod88.default.string().nullable(),
|
6171
6255
|
position: WidgetPositionSchema.nullable(),
|
6172
6256
|
fields: FieldsSchema,
|
6173
|
-
url:
|
6257
|
+
url: import_zod88.default.string()
|
6174
6258
|
});
|
6175
6259
|
|
6176
6260
|
// src/widget/validation.ts
|
6177
|
-
var
|
6178
|
-
var CreateWidgetSchema =
|
6179
|
-
name:
|
6180
|
-
description:
|
6181
|
-
url:
|
6261
|
+
var import_zod89 = __toESM(require("zod"));
|
6262
|
+
var CreateWidgetSchema = import_zod89.default.object({
|
6263
|
+
name: import_zod89.default.string(),
|
6264
|
+
description: import_zod89.default.string(),
|
6265
|
+
url: import_zod89.default.string(),
|
6182
6266
|
position: WidgetPositionSchema,
|
6183
|
-
fields:
|
6267
|
+
fields: import_zod89.default.object({
|
6184
6268
|
data: (
|
6185
6269
|
// Array of attribute system names
|
6186
|
-
|
6270
|
+
import_zod89.default.array(import_zod89.default.string())
|
6187
6271
|
)
|
6188
6272
|
}).optional()
|
6189
6273
|
});
|
6190
6274
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6191
|
-
var GetWidgetUrlPathQuerySchema =
|
6192
|
-
widgetId:
|
6275
|
+
var GetWidgetUrlPathQuerySchema = import_zod89.default.object({
|
6276
|
+
widgetId: import_zod89.default.string(),
|
6193
6277
|
// Position ID is ticket ID, contact ID, etc.
|
6194
6278
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6195
|
-
positionId:
|
6279
|
+
positionId: import_zod89.default.string()
|
6196
6280
|
});
|
6197
6281
|
|
6198
6282
|
// src/widget/index.ts
|
@@ -6207,8 +6291,8 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6207
6291
|
201: DefaultSuccessResponseSchema.extend({
|
6208
6292
|
widget: WidgetSchema
|
6209
6293
|
}),
|
6210
|
-
400:
|
6211
|
-
message:
|
6294
|
+
400: import_zod90.default.object({
|
6295
|
+
message: import_zod90.default.string()
|
6212
6296
|
}),
|
6213
6297
|
401: DefaultUnauthorizedSchema,
|
6214
6298
|
500: DefaultErrorResponseSchema
|
@@ -6218,17 +6302,17 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6218
6302
|
getWidgets: {
|
6219
6303
|
method: "GET",
|
6220
6304
|
path: "",
|
6221
|
-
query:
|
6222
|
-
page:
|
6223
|
-
pageSize:
|
6224
|
-
keyword:
|
6305
|
+
query: import_zod90.default.object({
|
6306
|
+
page: import_zod90.default.coerce.number().default(1),
|
6307
|
+
pageSize: import_zod90.default.coerce.number().default(10),
|
6308
|
+
keyword: import_zod90.default.coerce.string().optional()
|
6225
6309
|
}).optional(),
|
6226
6310
|
headers: DefaultHeaderSchema,
|
6227
6311
|
responses: {
|
6228
6312
|
200: WithPagination(WidgetSchema),
|
6229
6313
|
500: DefaultErrorResponseSchema,
|
6230
|
-
400:
|
6231
|
-
message:
|
6314
|
+
400: import_zod90.default.object({
|
6315
|
+
message: import_zod90.default.string()
|
6232
6316
|
}),
|
6233
6317
|
401: DefaultUnauthorizedSchema
|
6234
6318
|
},
|
@@ -6239,9 +6323,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6239
6323
|
path: "/menu",
|
6240
6324
|
headers: DefaultHeaderSchema,
|
6241
6325
|
responses: {
|
6242
|
-
200:
|
6243
|
-
400:
|
6244
|
-
message:
|
6326
|
+
200: import_zod90.default.array(WidgetSchema),
|
6327
|
+
400: import_zod90.default.object({
|
6328
|
+
message: import_zod90.default.string()
|
6245
6329
|
}),
|
6246
6330
|
401: DefaultUnauthorizedSchema,
|
6247
6331
|
500: DefaultErrorResponseSchema
|
@@ -6253,9 +6337,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6253
6337
|
path: "/ticket_detail",
|
6254
6338
|
headers: DefaultHeaderSchema,
|
6255
6339
|
responses: {
|
6256
|
-
200:
|
6257
|
-
400:
|
6258
|
-
message:
|
6340
|
+
200: import_zod90.default.array(WidgetSchema),
|
6341
|
+
400: import_zod90.default.object({
|
6342
|
+
message: import_zod90.default.string()
|
6259
6343
|
}),
|
6260
6344
|
401: DefaultUnauthorizedSchema,
|
6261
6345
|
500: DefaultErrorResponseSchema
|
@@ -6267,9 +6351,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6267
6351
|
path: "/contact_detail",
|
6268
6352
|
headers: DefaultHeaderSchema,
|
6269
6353
|
responses: {
|
6270
|
-
200:
|
6271
|
-
400:
|
6272
|
-
message:
|
6354
|
+
200: import_zod90.default.array(WidgetSchema),
|
6355
|
+
400: import_zod90.default.object({
|
6356
|
+
message: import_zod90.default.string()
|
6273
6357
|
}),
|
6274
6358
|
401: DefaultUnauthorizedSchema,
|
6275
6359
|
500: DefaultErrorResponseSchema
|
@@ -6279,12 +6363,12 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6279
6363
|
getWidgetById: {
|
6280
6364
|
method: "GET",
|
6281
6365
|
path: "/:id",
|
6282
|
-
pathParams:
|
6366
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6283
6367
|
headers: DefaultHeaderSchema,
|
6284
6368
|
responses: {
|
6285
6369
|
200: WidgetSchema,
|
6286
|
-
400:
|
6287
|
-
message:
|
6370
|
+
400: import_zod90.default.object({
|
6371
|
+
message: import_zod90.default.string()
|
6288
6372
|
}),
|
6289
6373
|
401: DefaultUnauthorizedSchema,
|
6290
6374
|
500: DefaultErrorResponseSchema
|
@@ -6298,10 +6382,10 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6298
6382
|
headers: DefaultHeaderSchema,
|
6299
6383
|
responses: {
|
6300
6384
|
201: DefaultSuccessResponseSchema.extend({
|
6301
|
-
url:
|
6385
|
+
url: import_zod90.default.string()
|
6302
6386
|
}),
|
6303
|
-
400:
|
6304
|
-
message:
|
6387
|
+
400: import_zod90.default.object({
|
6388
|
+
message: import_zod90.default.string()
|
6305
6389
|
}),
|
6306
6390
|
401: DefaultUnauthorizedSchema
|
6307
6391
|
},
|
@@ -6310,14 +6394,14 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6310
6394
|
updateWidget: {
|
6311
6395
|
method: "PATCH",
|
6312
6396
|
path: "/:id",
|
6313
|
-
pathParams:
|
6397
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6314
6398
|
headers: DefaultHeaderSchema,
|
6315
6399
|
responses: {
|
6316
6400
|
201: DefaultSuccessResponseSchema.extend({
|
6317
6401
|
widget: WidgetSchema
|
6318
6402
|
}),
|
6319
|
-
400:
|
6320
|
-
message:
|
6403
|
+
400: import_zod90.default.object({
|
6404
|
+
message: import_zod90.default.string()
|
6321
6405
|
}),
|
6322
6406
|
401: DefaultUnauthorizedSchema
|
6323
6407
|
},
|
@@ -6327,11 +6411,11 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6327
6411
|
deleteWidget: {
|
6328
6412
|
method: "DELETE",
|
6329
6413
|
path: "/:id",
|
6330
|
-
pathParams:
|
6414
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6331
6415
|
headers: DefaultHeaderSchema,
|
6332
6416
|
body: null,
|
6333
6417
|
responses: {
|
6334
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6418
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod90.default.string() }),
|
6335
6419
|
500: DefaultErrorResponseSchema
|
6336
6420
|
},
|
6337
6421
|
summary: "Delete a widget."
|
@@ -6342,24 +6426,24 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6342
6426
|
|
6343
6427
|
// src/wrap-up-form/index.ts
|
6344
6428
|
var import_core34 = require("@ts-rest/core");
|
6345
|
-
var
|
6429
|
+
var import_zod92 = __toESM(require("zod"));
|
6346
6430
|
|
6347
6431
|
// src/wrap-up-form/validation.ts
|
6348
|
-
var
|
6349
|
-
var CreateWrapUpFormSchema =
|
6350
|
-
note:
|
6351
|
-
disposition:
|
6352
|
-
callFrom:
|
6353
|
-
callTo:
|
6432
|
+
var import_zod91 = require("zod");
|
6433
|
+
var CreateWrapUpFormSchema = import_zod91.z.object({
|
6434
|
+
note: import_zod91.z.string().nullable().optional(),
|
6435
|
+
disposition: import_zod91.z.string().nullable().optional(),
|
6436
|
+
callFrom: import_zod91.z.string().nullable().optional(),
|
6437
|
+
callTo: import_zod91.z.string().nullable().optional()
|
6354
6438
|
});
|
6355
6439
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6356
|
-
tags:
|
6440
|
+
tags: import_zod91.z.array(import_zod91.z.string()).optional()
|
6357
6441
|
});
|
6358
|
-
var CreateCXLogWrapUpFormSchema =
|
6359
|
-
cxLogId:
|
6360
|
-
disposition:
|
6361
|
-
tagIds:
|
6362
|
-
note:
|
6442
|
+
var CreateCXLogWrapUpFormSchema = import_zod91.z.object({
|
6443
|
+
cxLogId: import_zod91.z.string().uuid(),
|
6444
|
+
disposition: import_zod91.z.string().optional(),
|
6445
|
+
tagIds: import_zod91.z.array(import_zod91.z.string().uuid()).optional(),
|
6446
|
+
note: import_zod91.z.string().optional()
|
6363
6447
|
});
|
6364
6448
|
|
6365
6449
|
// src/wrap-up-form/index.ts
|
@@ -6374,8 +6458,8 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6374
6458
|
201: DefaultSuccessResponseSchema.extend({
|
6375
6459
|
wrapUpForm: WrapUpFormSchema
|
6376
6460
|
}),
|
6377
|
-
400:
|
6378
|
-
message:
|
6461
|
+
400: import_zod92.default.object({
|
6462
|
+
message: import_zod92.default.string()
|
6379
6463
|
}),
|
6380
6464
|
401: DefaultUnauthorizedSchema,
|
6381
6465
|
500: DefaultErrorResponseSchema
|
@@ -6397,15 +6481,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6397
6481
|
getWrapUpForms: {
|
6398
6482
|
method: "GET",
|
6399
6483
|
path: "",
|
6400
|
-
query:
|
6401
|
-
page:
|
6402
|
-
pageSize:
|
6484
|
+
query: import_zod92.default.object({
|
6485
|
+
page: import_zod92.default.coerce.number().default(1),
|
6486
|
+
pageSize: import_zod92.default.coerce.number().default(10)
|
6403
6487
|
}).optional(),
|
6404
6488
|
headers: DefaultHeaderSchema,
|
6405
6489
|
responses: {
|
6406
6490
|
200: WithPagination(WrapUpFormSchema),
|
6407
|
-
400:
|
6408
|
-
message:
|
6491
|
+
400: import_zod92.default.object({
|
6492
|
+
message: import_zod92.default.string()
|
6409
6493
|
}),
|
6410
6494
|
401: DefaultUnauthorizedSchema,
|
6411
6495
|
500: DefaultErrorResponseSchema
|
@@ -6415,15 +6499,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6415
6499
|
updateWrapUpForm: {
|
6416
6500
|
method: "PATCH",
|
6417
6501
|
path: "/:id",
|
6418
|
-
pathParams:
|
6502
|
+
pathParams: import_zod92.default.object({ id: import_zod92.default.string() }),
|
6419
6503
|
headers: DefaultHeaderSchema,
|
6420
6504
|
body: UpdateWrapUpFormSchema,
|
6421
6505
|
responses: {
|
6422
6506
|
201: DefaultSuccessResponseSchema.extend({
|
6423
6507
|
wrapUpForm: WrapUpFormSchema
|
6424
6508
|
}),
|
6425
|
-
400:
|
6426
|
-
message:
|
6509
|
+
400: import_zod92.default.object({
|
6510
|
+
message: import_zod92.default.string()
|
6427
6511
|
}),
|
6428
6512
|
401: DefaultUnauthorizedSchema,
|
6429
6513
|
500: DefaultErrorResponseSchema
|
@@ -6436,28 +6520,28 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6436
6520
|
|
6437
6521
|
// src/upload/index.ts
|
6438
6522
|
var import_core35 = require("@ts-rest/core");
|
6439
|
-
var
|
6523
|
+
var import_zod93 = __toESM(require("zod"));
|
6440
6524
|
var uploadContract = (0, import_core35.initContract)().router(
|
6441
6525
|
{
|
6442
6526
|
rename: {
|
6443
6527
|
method: "POST",
|
6444
6528
|
path: "/:id/rename",
|
6445
|
-
pathParams:
|
6446
|
-
id:
|
6529
|
+
pathParams: import_zod93.default.object({
|
6530
|
+
id: import_zod93.default.string()
|
6447
6531
|
}),
|
6448
6532
|
headers: DefaultHeaderSchema,
|
6449
6533
|
responses: {
|
6450
6534
|
201: DefaultSuccessResponseSchema.extend({
|
6451
|
-
message:
|
6535
|
+
message: import_zod93.default.string()
|
6452
6536
|
}),
|
6453
|
-
400:
|
6454
|
-
message:
|
6537
|
+
400: import_zod93.default.object({
|
6538
|
+
message: import_zod93.default.string()
|
6455
6539
|
}),
|
6456
|
-
409:
|
6457
|
-
message:
|
6540
|
+
409: import_zod93.default.object({
|
6541
|
+
message: import_zod93.default.string()
|
6458
6542
|
}),
|
6459
|
-
500:
|
6460
|
-
message:
|
6543
|
+
500: import_zod93.default.object({
|
6544
|
+
message: import_zod93.default.string()
|
6461
6545
|
}),
|
6462
6546
|
401: DefaultUnauthorizedSchema,
|
6463
6547
|
404: DefaultNotFoundSchema,
|
@@ -6469,23 +6553,23 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6469
6553
|
delete: {
|
6470
6554
|
method: "DELETE",
|
6471
6555
|
path: "/:id",
|
6472
|
-
pathParams:
|
6473
|
-
id:
|
6556
|
+
pathParams: import_zod93.default.object({
|
6557
|
+
id: import_zod93.default.string()
|
6474
6558
|
}),
|
6475
6559
|
headers: DefaultHeaderSchema,
|
6476
6560
|
body: null,
|
6477
6561
|
responses: {
|
6478
6562
|
201: DefaultSuccessResponseSchema.extend({
|
6479
|
-
message:
|
6563
|
+
message: import_zod93.default.string()
|
6480
6564
|
}),
|
6481
|
-
400:
|
6482
|
-
message:
|
6565
|
+
400: import_zod93.default.object({
|
6566
|
+
message: import_zod93.default.string()
|
6483
6567
|
}),
|
6484
|
-
409:
|
6485
|
-
message:
|
6568
|
+
409: import_zod93.default.object({
|
6569
|
+
message: import_zod93.default.string()
|
6486
6570
|
}),
|
6487
|
-
500:
|
6488
|
-
message:
|
6571
|
+
500: import_zod93.default.object({
|
6572
|
+
message: import_zod93.default.string()
|
6489
6573
|
}),
|
6490
6574
|
401: DefaultUnauthorizedSchema,
|
6491
6575
|
404: DefaultNotFoundSchema,
|
@@ -6500,19 +6584,19 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6500
6584
|
);
|
6501
6585
|
|
6502
6586
|
// src/viber/index.ts
|
6503
|
-
var
|
6587
|
+
var import_zod95 = __toESM(require("zod"));
|
6504
6588
|
|
6505
6589
|
// src/viber/validation.ts
|
6506
|
-
var
|
6507
|
-
var ViberChannelSchema =
|
6508
|
-
name:
|
6509
|
-
accessToken:
|
6510
|
-
actor:
|
6511
|
-
id:
|
6512
|
-
name:
|
6513
|
-
email:
|
6514
|
-
address:
|
6515
|
-
phone:
|
6590
|
+
var import_zod94 = __toESM(require("zod"));
|
6591
|
+
var ViberChannelSchema = import_zod94.default.object({
|
6592
|
+
name: import_zod94.default.string(),
|
6593
|
+
accessToken: import_zod94.default.string(),
|
6594
|
+
actor: import_zod94.default.object({
|
6595
|
+
id: import_zod94.default.string().uuid(),
|
6596
|
+
name: import_zod94.default.string(),
|
6597
|
+
email: import_zod94.default.string().email(),
|
6598
|
+
address: import_zod94.default.string().nullable(),
|
6599
|
+
phone: import_zod94.default.string().nullable()
|
6516
6600
|
}).optional()
|
6517
6601
|
});
|
6518
6602
|
|
@@ -6541,8 +6625,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6541
6625
|
}),
|
6542
6626
|
400: DefaultErrorResponseSchema
|
6543
6627
|
},
|
6544
|
-
body:
|
6545
|
-
id:
|
6628
|
+
body: import_zod95.default.object({
|
6629
|
+
id: import_zod95.default.string().uuid()
|
6546
6630
|
}),
|
6547
6631
|
summary: "Connect viber channel"
|
6548
6632
|
},
|
@@ -6558,8 +6642,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6558
6642
|
reconnect: {
|
6559
6643
|
method: "POST",
|
6560
6644
|
path: "/reconnect/:channelId",
|
6561
|
-
pathParams:
|
6562
|
-
channelId:
|
6645
|
+
pathParams: import_zod95.default.object({
|
6646
|
+
channelId: import_zod95.default.string().uuid()
|
6563
6647
|
}),
|
6564
6648
|
responses: {
|
6565
6649
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6574,8 +6658,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6574
6658
|
delete: {
|
6575
6659
|
method: "DELETE",
|
6576
6660
|
path: "/delete/:channelId",
|
6577
|
-
pathParams:
|
6578
|
-
channelId:
|
6661
|
+
pathParams: import_zod95.default.object({
|
6662
|
+
channelId: import_zod95.default.string().uuid()
|
6579
6663
|
}),
|
6580
6664
|
body: null,
|
6581
6665
|
responses: {
|
@@ -6588,58 +6672,58 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6588
6672
|
|
6589
6673
|
// src/notification/index.ts
|
6590
6674
|
var import_core37 = require("@ts-rest/core");
|
6591
|
-
var
|
6675
|
+
var import_zod98 = __toESM(require("zod"));
|
6592
6676
|
|
6593
6677
|
// src/notification/validation.ts
|
6594
|
-
var
|
6678
|
+
var import_zod97 = __toESM(require("zod"));
|
6595
6679
|
|
6596
6680
|
// src/notification/schema.ts
|
6597
|
-
var
|
6598
|
-
var NotificationChangeSchema =
|
6599
|
-
id:
|
6600
|
-
createdAt:
|
6601
|
-
updatedAt:
|
6602
|
-
deletedAt:
|
6603
|
-
actorId:
|
6681
|
+
var import_zod96 = __toESM(require("zod"));
|
6682
|
+
var NotificationChangeSchema = import_zod96.default.object({
|
6683
|
+
id: import_zod96.default.string().uuid(),
|
6684
|
+
createdAt: import_zod96.default.date(),
|
6685
|
+
updatedAt: import_zod96.default.date(),
|
6686
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6687
|
+
actorId: import_zod96.default.string().uuid(),
|
6604
6688
|
actor: UserSchema,
|
6605
|
-
notificationObjectId:
|
6606
|
-
readAt:
|
6607
|
-
});
|
6608
|
-
var NotificationObjectSchema =
|
6609
|
-
id:
|
6610
|
-
createdAt:
|
6611
|
-
updatedAt:
|
6612
|
-
deletedAt:
|
6613
|
-
data:
|
6689
|
+
notificationObjectId: import_zod96.default.string().uuid(),
|
6690
|
+
readAt: import_zod96.default.date()
|
6691
|
+
});
|
6692
|
+
var NotificationObjectSchema = import_zod96.default.object({
|
6693
|
+
id: import_zod96.default.string().uuid(),
|
6694
|
+
createdAt: import_zod96.default.date(),
|
6695
|
+
updatedAt: import_zod96.default.date(),
|
6696
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6697
|
+
data: import_zod96.default.string(),
|
6614
6698
|
notificationChange: NotificationChangeSchema
|
6615
6699
|
});
|
6616
|
-
var NotificationSchema =
|
6617
|
-
id:
|
6618
|
-
createdAt:
|
6619
|
-
updatedAt:
|
6620
|
-
deletedAt:
|
6621
|
-
notificationObjectId:
|
6622
|
-
notifierId:
|
6700
|
+
var NotificationSchema = import_zod96.default.object({
|
6701
|
+
id: import_zod96.default.string().uuid(),
|
6702
|
+
createdAt: import_zod96.default.date(),
|
6703
|
+
updatedAt: import_zod96.default.date(),
|
6704
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6705
|
+
notificationObjectId: import_zod96.default.string().uuid(),
|
6706
|
+
notifierId: import_zod96.default.string().uuid(),
|
6623
6707
|
notificationObject: NotificationObjectSchema,
|
6624
|
-
readAt:
|
6708
|
+
readAt: import_zod96.default.date()
|
6625
6709
|
});
|
6626
6710
|
|
6627
6711
|
// src/notification/validation.ts
|
6628
|
-
var GetNotificationsRequestSchema =
|
6629
|
-
page:
|
6630
|
-
pageSize:
|
6712
|
+
var GetNotificationsRequestSchema = import_zod97.default.object({
|
6713
|
+
page: import_zod97.default.coerce.number().default(1),
|
6714
|
+
pageSize: import_zod97.default.coerce.number().default(10)
|
6631
6715
|
});
|
6632
|
-
var GetNotificationsResponseSchema =
|
6633
|
-
notificationCount:
|
6634
|
-
notifications:
|
6635
|
-
total:
|
6636
|
-
page:
|
6637
|
-
pageSize:
|
6638
|
-
lastPage:
|
6639
|
-
totalUnreadCount:
|
6716
|
+
var GetNotificationsResponseSchema = import_zod97.default.object({
|
6717
|
+
notificationCount: import_zod97.default.number(),
|
6718
|
+
notifications: import_zod97.default.array(NotificationSchema),
|
6719
|
+
total: import_zod97.default.number(),
|
6720
|
+
page: import_zod97.default.number(),
|
6721
|
+
pageSize: import_zod97.default.number(),
|
6722
|
+
lastPage: import_zod97.default.number(),
|
6723
|
+
totalUnreadCount: import_zod97.default.number().optional()
|
6640
6724
|
});
|
6641
|
-
var ResetNotificationRequestSchema =
|
6642
|
-
userId:
|
6725
|
+
var ResetNotificationRequestSchema = import_zod97.default.object({
|
6726
|
+
userId: import_zod97.default.string()
|
6643
6727
|
});
|
6644
6728
|
|
6645
6729
|
// src/notification/index.ts
|
@@ -6653,14 +6737,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6653
6737
|
200: DefaultSuccessResponseSchema.extend({
|
6654
6738
|
data: GetNotificationsResponseSchema
|
6655
6739
|
}),
|
6656
|
-
400:
|
6657
|
-
message:
|
6740
|
+
400: import_zod98.default.object({
|
6741
|
+
message: import_zod98.default.string()
|
6658
6742
|
}),
|
6659
|
-
409:
|
6660
|
-
message:
|
6743
|
+
409: import_zod98.default.object({
|
6744
|
+
message: import_zod98.default.string()
|
6661
6745
|
}),
|
6662
|
-
500:
|
6663
|
-
message:
|
6746
|
+
500: import_zod98.default.object({
|
6747
|
+
message: import_zod98.default.string()
|
6664
6748
|
}),
|
6665
6749
|
401: DefaultUnauthorizedSchema,
|
6666
6750
|
404: DefaultNotFoundSchema,
|
@@ -6673,16 +6757,16 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6673
6757
|
path: "/new_notifications_count",
|
6674
6758
|
responses: {
|
6675
6759
|
200: DefaultSuccessResponseSchema.extend({
|
6676
|
-
total:
|
6760
|
+
total: import_zod98.default.number()
|
6677
6761
|
}),
|
6678
|
-
400:
|
6679
|
-
message:
|
6762
|
+
400: import_zod98.default.object({
|
6763
|
+
message: import_zod98.default.string()
|
6680
6764
|
}),
|
6681
|
-
409:
|
6682
|
-
message:
|
6765
|
+
409: import_zod98.default.object({
|
6766
|
+
message: import_zod98.default.string()
|
6683
6767
|
}),
|
6684
|
-
500:
|
6685
|
-
message:
|
6768
|
+
500: import_zod98.default.object({
|
6769
|
+
message: import_zod98.default.string()
|
6686
6770
|
}),
|
6687
6771
|
401: DefaultUnauthorizedSchema,
|
6688
6772
|
404: DefaultNotFoundSchema,
|
@@ -6697,14 +6781,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6697
6781
|
201: DefaultSuccessResponseSchema.extend({
|
6698
6782
|
data: UserSchema
|
6699
6783
|
}),
|
6700
|
-
400:
|
6701
|
-
message:
|
6784
|
+
400: import_zod98.default.object({
|
6785
|
+
message: import_zod98.default.string()
|
6702
6786
|
}),
|
6703
|
-
409:
|
6704
|
-
message:
|
6787
|
+
409: import_zod98.default.object({
|
6788
|
+
message: import_zod98.default.string()
|
6705
6789
|
}),
|
6706
|
-
500:
|
6707
|
-
message:
|
6790
|
+
500: import_zod98.default.object({
|
6791
|
+
message: import_zod98.default.string()
|
6708
6792
|
}),
|
6709
6793
|
401: DefaultUnauthorizedSchema,
|
6710
6794
|
404: DefaultNotFoundSchema,
|
@@ -6716,19 +6800,19 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6716
6800
|
readNotification: {
|
6717
6801
|
method: "POST",
|
6718
6802
|
path: "/read/:id",
|
6719
|
-
pathParams:
|
6803
|
+
pathParams: import_zod98.default.object({ id: import_zod98.default.string() }),
|
6720
6804
|
responses: {
|
6721
6805
|
201: DefaultSuccessResponseSchema.extend({
|
6722
6806
|
data: NotificationSchema
|
6723
6807
|
}),
|
6724
|
-
400:
|
6725
|
-
message:
|
6808
|
+
400: import_zod98.default.object({
|
6809
|
+
message: import_zod98.default.string()
|
6726
6810
|
}),
|
6727
|
-
409:
|
6728
|
-
message:
|
6811
|
+
409: import_zod98.default.object({
|
6812
|
+
message: import_zod98.default.string()
|
6729
6813
|
}),
|
6730
|
-
500:
|
6731
|
-
message:
|
6814
|
+
500: import_zod98.default.object({
|
6815
|
+
message: import_zod98.default.string()
|
6732
6816
|
}),
|
6733
6817
|
401: DefaultUnauthorizedSchema,
|
6734
6818
|
404: DefaultNotFoundSchema,
|
@@ -6811,6 +6895,7 @@ var notificationContract = (0, import_core38.initContract)().router({
|
|
6811
6895
|
dashboardContract,
|
6812
6896
|
evaluateFormContract,
|
6813
6897
|
extensionContract,
|
6898
|
+
mailContract,
|
6814
6899
|
mainChatContract,
|
6815
6900
|
notificationContract,
|
6816
6901
|
permissionContract,
|