@kl1/contracts 1.1.2-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 +891 -829
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +890 -829
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +1783 -1170
- 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 +3 -3
- package/dist/src/user/index.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,24 +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()
|
6000
6061
|
});
|
6001
|
-
var UpdateUserProfileSchema =
|
6002
|
-
password:
|
6062
|
+
var UpdateUserProfileSchema = import_zod83.z.object({
|
6063
|
+
password: import_zod83.z.string()
|
6003
6064
|
});
|
6004
6065
|
|
6005
6066
|
// src/user/index.ts
|
@@ -6014,8 +6075,8 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6014
6075
|
201: DefaultSuccessResponseSchema.extend({
|
6015
6076
|
user: UserSchema
|
6016
6077
|
}),
|
6017
|
-
400:
|
6018
|
-
message:
|
6078
|
+
400: import_zod84.default.object({
|
6079
|
+
message: import_zod84.default.string()
|
6019
6080
|
}),
|
6020
6081
|
401: DefaultUnauthorizedSchema,
|
6021
6082
|
404: DefaultNotFoundSchema,
|
@@ -6028,16 +6089,16 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6028
6089
|
method: "GET",
|
6029
6090
|
path: "",
|
6030
6091
|
headers: DefaultHeaderSchema,
|
6031
|
-
query:
|
6032
|
-
page:
|
6033
|
-
pageSize:
|
6092
|
+
query: import_zod84.default.object({
|
6093
|
+
page: import_zod84.default.coerce.number().optional(),
|
6094
|
+
pageSize: import_zod84.default.coerce.number().optional(),
|
6034
6095
|
// Don't add default 10. In some places, we need to fetch all users.
|
6035
|
-
keyword:
|
6096
|
+
keyword: import_zod84.default.string().optional()
|
6036
6097
|
}).optional(),
|
6037
6098
|
responses: {
|
6038
6099
|
200: WithPagination(UserSchema),
|
6039
|
-
400:
|
6040
|
-
message:
|
6100
|
+
400: import_zod84.default.object({
|
6101
|
+
message: import_zod84.default.string()
|
6041
6102
|
}),
|
6042
6103
|
401: DefaultUnauthorizedSchema,
|
6043
6104
|
500: DefaultErrorResponseSchema
|
@@ -6047,12 +6108,12 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6047
6108
|
getUserById: {
|
6048
6109
|
method: "GET",
|
6049
6110
|
path: "/:id",
|
6050
|
-
pathParams:
|
6111
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6051
6112
|
headers: DefaultHeaderSchema,
|
6052
6113
|
responses: {
|
6053
6114
|
200: UserSchema,
|
6054
|
-
400:
|
6055
|
-
message:
|
6115
|
+
400: import_zod84.default.object({
|
6116
|
+
message: import_zod84.default.string()
|
6056
6117
|
}),
|
6057
6118
|
401: DefaultUnauthorizedSchema
|
6058
6119
|
},
|
@@ -6061,15 +6122,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6061
6122
|
updateUser: {
|
6062
6123
|
method: "PATCH",
|
6063
6124
|
path: "/:id",
|
6064
|
-
pathParams:
|
6125
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6065
6126
|
headers: DefaultHeaderSchema,
|
6066
6127
|
body: UpdateUserSchema,
|
6067
6128
|
responses: {
|
6068
6129
|
201: DefaultSuccessResponseSchema.extend({
|
6069
|
-
|
6130
|
+
user: UserSchema
|
6070
6131
|
}),
|
6071
|
-
400:
|
6072
|
-
message:
|
6132
|
+
400: import_zod84.default.object({
|
6133
|
+
message: import_zod84.default.string()
|
6073
6134
|
}),
|
6074
6135
|
401: DefaultUnauthorizedSchema,
|
6075
6136
|
404: DefaultNotFoundSchema,
|
@@ -6081,15 +6142,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6081
6142
|
updateUserProfile: {
|
6082
6143
|
method: "PATCH",
|
6083
6144
|
path: "/profile/:id",
|
6084
|
-
pathParams:
|
6145
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6085
6146
|
headers: DefaultHeaderSchema,
|
6086
6147
|
body: UpdateUserProfileSchema,
|
6087
6148
|
responses: {
|
6088
6149
|
201: DefaultSuccessResponseSchema.extend({
|
6089
6150
|
user: UserSchema
|
6090
6151
|
}),
|
6091
|
-
400:
|
6092
|
-
message:
|
6152
|
+
400: import_zod84.default.object({
|
6153
|
+
message: import_zod84.default.string()
|
6093
6154
|
}),
|
6094
6155
|
401: DefaultUnauthorizedSchema,
|
6095
6156
|
404: DefaultNotFoundSchema,
|
@@ -6101,11 +6162,11 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6101
6162
|
deleteUser: {
|
6102
6163
|
method: "DELETE",
|
6103
6164
|
path: "/:id",
|
6104
|
-
pathParams:
|
6165
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6105
6166
|
headers: DefaultHeaderSchema,
|
6106
6167
|
body: null,
|
6107
6168
|
responses: {
|
6108
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6169
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod84.default.string() }),
|
6109
6170
|
404: DefaultNotFoundSchema,
|
6110
6171
|
422: DefaultUnprocessibleSchema,
|
6111
6172
|
500: DefaultErrorResponseSchema
|
@@ -6118,26 +6179,26 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6118
6179
|
|
6119
6180
|
// src/user-presence-status-log/index.ts
|
6120
6181
|
var import_core32 = require("@ts-rest/core");
|
6121
|
-
var
|
6182
|
+
var import_zod87 = __toESM(require("zod"));
|
6122
6183
|
|
6123
6184
|
// src/user-presence-status-log/schema.ts
|
6124
|
-
var
|
6185
|
+
var import_zod85 = __toESM(require("zod"));
|
6125
6186
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6126
6187
|
user: UserSchema,
|
6127
6188
|
previousPresenceStatus: PresenceStatusSchema,
|
6128
6189
|
newPresenceStatus: PresenceStatusSchema,
|
6129
|
-
reason:
|
6190
|
+
reason: import_zod85.default.string()
|
6130
6191
|
});
|
6131
6192
|
|
6132
6193
|
// src/user-presence-status-log/validation.ts
|
6133
|
-
var
|
6134
|
-
var UserPresenceStatusLogParamsSchema =
|
6135
|
-
page:
|
6136
|
-
pageSize:
|
6137
|
-
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()
|
6138
6199
|
}).optional();
|
6139
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6140
|
-
selectedDate:
|
6200
|
+
var UserPresenceStatusLogExportParamsSchema = import_zod86.default.object({
|
6201
|
+
selectedDate: import_zod86.default.string().optional()
|
6141
6202
|
});
|
6142
6203
|
|
6143
6204
|
// src/user-presence-status-log/index.ts
|
@@ -6150,8 +6211,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6150
6211
|
headers: DefaultHeaderSchema,
|
6151
6212
|
responses: {
|
6152
6213
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6153
|
-
400:
|
6154
|
-
message:
|
6214
|
+
400: import_zod87.default.object({
|
6215
|
+
message: import_zod87.default.string()
|
6155
6216
|
}),
|
6156
6217
|
401: DefaultUnauthorizedSchema,
|
6157
6218
|
500: DefaultErrorResponseSchema
|
@@ -6165,8 +6226,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6165
6226
|
headers: DefaultHeaderSchema,
|
6166
6227
|
responses: {
|
6167
6228
|
200: null,
|
6168
|
-
400:
|
6169
|
-
message:
|
6229
|
+
400: import_zod87.default.object({
|
6230
|
+
message: import_zod87.default.string()
|
6170
6231
|
}),
|
6171
6232
|
401: DefaultUnauthorizedSchema,
|
6172
6233
|
500: DefaultErrorResponseSchema
|
@@ -6178,44 +6239,44 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6178
6239
|
|
6179
6240
|
// src/widget/index.ts
|
6180
6241
|
var import_core33 = require("@ts-rest/core");
|
6181
|
-
var
|
6242
|
+
var import_zod90 = __toESM(require("zod"));
|
6182
6243
|
|
6183
6244
|
// src/widget/schema.ts
|
6184
|
-
var
|
6185
|
-
var FieldsSchema =
|
6186
|
-
var WidgetPositionSchema =
|
6187
|
-
|
6188
|
-
|
6189
|
-
|
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")
|
6190
6251
|
]);
|
6191
6252
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6192
|
-
name:
|
6193
|
-
description:
|
6253
|
+
name: import_zod88.default.string(),
|
6254
|
+
description: import_zod88.default.string().nullable(),
|
6194
6255
|
position: WidgetPositionSchema.nullable(),
|
6195
6256
|
fields: FieldsSchema,
|
6196
|
-
url:
|
6257
|
+
url: import_zod88.default.string()
|
6197
6258
|
});
|
6198
6259
|
|
6199
6260
|
// src/widget/validation.ts
|
6200
|
-
var
|
6201
|
-
var CreateWidgetSchema =
|
6202
|
-
name:
|
6203
|
-
description:
|
6204
|
-
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(),
|
6205
6266
|
position: WidgetPositionSchema,
|
6206
|
-
fields:
|
6267
|
+
fields: import_zod89.default.object({
|
6207
6268
|
data: (
|
6208
6269
|
// Array of attribute system names
|
6209
|
-
|
6270
|
+
import_zod89.default.array(import_zod89.default.string())
|
6210
6271
|
)
|
6211
6272
|
}).optional()
|
6212
6273
|
});
|
6213
6274
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6214
|
-
var GetWidgetUrlPathQuerySchema =
|
6215
|
-
widgetId:
|
6275
|
+
var GetWidgetUrlPathQuerySchema = import_zod89.default.object({
|
6276
|
+
widgetId: import_zod89.default.string(),
|
6216
6277
|
// Position ID is ticket ID, contact ID, etc.
|
6217
6278
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6218
|
-
positionId:
|
6279
|
+
positionId: import_zod89.default.string()
|
6219
6280
|
});
|
6220
6281
|
|
6221
6282
|
// src/widget/index.ts
|
@@ -6230,8 +6291,8 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6230
6291
|
201: DefaultSuccessResponseSchema.extend({
|
6231
6292
|
widget: WidgetSchema
|
6232
6293
|
}),
|
6233
|
-
400:
|
6234
|
-
message:
|
6294
|
+
400: import_zod90.default.object({
|
6295
|
+
message: import_zod90.default.string()
|
6235
6296
|
}),
|
6236
6297
|
401: DefaultUnauthorizedSchema,
|
6237
6298
|
500: DefaultErrorResponseSchema
|
@@ -6241,17 +6302,17 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6241
6302
|
getWidgets: {
|
6242
6303
|
method: "GET",
|
6243
6304
|
path: "",
|
6244
|
-
query:
|
6245
|
-
page:
|
6246
|
-
pageSize:
|
6247
|
-
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()
|
6248
6309
|
}).optional(),
|
6249
6310
|
headers: DefaultHeaderSchema,
|
6250
6311
|
responses: {
|
6251
6312
|
200: WithPagination(WidgetSchema),
|
6252
6313
|
500: DefaultErrorResponseSchema,
|
6253
|
-
400:
|
6254
|
-
message:
|
6314
|
+
400: import_zod90.default.object({
|
6315
|
+
message: import_zod90.default.string()
|
6255
6316
|
}),
|
6256
6317
|
401: DefaultUnauthorizedSchema
|
6257
6318
|
},
|
@@ -6262,9 +6323,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6262
6323
|
path: "/menu",
|
6263
6324
|
headers: DefaultHeaderSchema,
|
6264
6325
|
responses: {
|
6265
|
-
200:
|
6266
|
-
400:
|
6267
|
-
message:
|
6326
|
+
200: import_zod90.default.array(WidgetSchema),
|
6327
|
+
400: import_zod90.default.object({
|
6328
|
+
message: import_zod90.default.string()
|
6268
6329
|
}),
|
6269
6330
|
401: DefaultUnauthorizedSchema,
|
6270
6331
|
500: DefaultErrorResponseSchema
|
@@ -6276,9 +6337,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6276
6337
|
path: "/ticket_detail",
|
6277
6338
|
headers: DefaultHeaderSchema,
|
6278
6339
|
responses: {
|
6279
|
-
200:
|
6280
|
-
400:
|
6281
|
-
message:
|
6340
|
+
200: import_zod90.default.array(WidgetSchema),
|
6341
|
+
400: import_zod90.default.object({
|
6342
|
+
message: import_zod90.default.string()
|
6282
6343
|
}),
|
6283
6344
|
401: DefaultUnauthorizedSchema,
|
6284
6345
|
500: DefaultErrorResponseSchema
|
@@ -6290,9 +6351,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6290
6351
|
path: "/contact_detail",
|
6291
6352
|
headers: DefaultHeaderSchema,
|
6292
6353
|
responses: {
|
6293
|
-
200:
|
6294
|
-
400:
|
6295
|
-
message:
|
6354
|
+
200: import_zod90.default.array(WidgetSchema),
|
6355
|
+
400: import_zod90.default.object({
|
6356
|
+
message: import_zod90.default.string()
|
6296
6357
|
}),
|
6297
6358
|
401: DefaultUnauthorizedSchema,
|
6298
6359
|
500: DefaultErrorResponseSchema
|
@@ -6302,12 +6363,12 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6302
6363
|
getWidgetById: {
|
6303
6364
|
method: "GET",
|
6304
6365
|
path: "/:id",
|
6305
|
-
pathParams:
|
6366
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6306
6367
|
headers: DefaultHeaderSchema,
|
6307
6368
|
responses: {
|
6308
6369
|
200: WidgetSchema,
|
6309
|
-
400:
|
6310
|
-
message:
|
6370
|
+
400: import_zod90.default.object({
|
6371
|
+
message: import_zod90.default.string()
|
6311
6372
|
}),
|
6312
6373
|
401: DefaultUnauthorizedSchema,
|
6313
6374
|
500: DefaultErrorResponseSchema
|
@@ -6321,10 +6382,10 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6321
6382
|
headers: DefaultHeaderSchema,
|
6322
6383
|
responses: {
|
6323
6384
|
201: DefaultSuccessResponseSchema.extend({
|
6324
|
-
url:
|
6385
|
+
url: import_zod90.default.string()
|
6325
6386
|
}),
|
6326
|
-
400:
|
6327
|
-
message:
|
6387
|
+
400: import_zod90.default.object({
|
6388
|
+
message: import_zod90.default.string()
|
6328
6389
|
}),
|
6329
6390
|
401: DefaultUnauthorizedSchema
|
6330
6391
|
},
|
@@ -6333,14 +6394,14 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6333
6394
|
updateWidget: {
|
6334
6395
|
method: "PATCH",
|
6335
6396
|
path: "/:id",
|
6336
|
-
pathParams:
|
6397
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6337
6398
|
headers: DefaultHeaderSchema,
|
6338
6399
|
responses: {
|
6339
6400
|
201: DefaultSuccessResponseSchema.extend({
|
6340
6401
|
widget: WidgetSchema
|
6341
6402
|
}),
|
6342
|
-
400:
|
6343
|
-
message:
|
6403
|
+
400: import_zod90.default.object({
|
6404
|
+
message: import_zod90.default.string()
|
6344
6405
|
}),
|
6345
6406
|
401: DefaultUnauthorizedSchema
|
6346
6407
|
},
|
@@ -6350,11 +6411,11 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6350
6411
|
deleteWidget: {
|
6351
6412
|
method: "DELETE",
|
6352
6413
|
path: "/:id",
|
6353
|
-
pathParams:
|
6414
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6354
6415
|
headers: DefaultHeaderSchema,
|
6355
6416
|
body: null,
|
6356
6417
|
responses: {
|
6357
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6418
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod90.default.string() }),
|
6358
6419
|
500: DefaultErrorResponseSchema
|
6359
6420
|
},
|
6360
6421
|
summary: "Delete a widget."
|
@@ -6365,24 +6426,24 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6365
6426
|
|
6366
6427
|
// src/wrap-up-form/index.ts
|
6367
6428
|
var import_core34 = require("@ts-rest/core");
|
6368
|
-
var
|
6429
|
+
var import_zod92 = __toESM(require("zod"));
|
6369
6430
|
|
6370
6431
|
// src/wrap-up-form/validation.ts
|
6371
|
-
var
|
6372
|
-
var CreateWrapUpFormSchema =
|
6373
|
-
note:
|
6374
|
-
disposition:
|
6375
|
-
callFrom:
|
6376
|
-
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()
|
6377
6438
|
});
|
6378
6439
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6379
|
-
tags:
|
6440
|
+
tags: import_zod91.z.array(import_zod91.z.string()).optional()
|
6380
6441
|
});
|
6381
|
-
var CreateCXLogWrapUpFormSchema =
|
6382
|
-
cxLogId:
|
6383
|
-
disposition:
|
6384
|
-
tagIds:
|
6385
|
-
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()
|
6386
6447
|
});
|
6387
6448
|
|
6388
6449
|
// src/wrap-up-form/index.ts
|
@@ -6397,8 +6458,8 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6397
6458
|
201: DefaultSuccessResponseSchema.extend({
|
6398
6459
|
wrapUpForm: WrapUpFormSchema
|
6399
6460
|
}),
|
6400
|
-
400:
|
6401
|
-
message:
|
6461
|
+
400: import_zod92.default.object({
|
6462
|
+
message: import_zod92.default.string()
|
6402
6463
|
}),
|
6403
6464
|
401: DefaultUnauthorizedSchema,
|
6404
6465
|
500: DefaultErrorResponseSchema
|
@@ -6420,15 +6481,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6420
6481
|
getWrapUpForms: {
|
6421
6482
|
method: "GET",
|
6422
6483
|
path: "",
|
6423
|
-
query:
|
6424
|
-
page:
|
6425
|
-
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)
|
6426
6487
|
}).optional(),
|
6427
6488
|
headers: DefaultHeaderSchema,
|
6428
6489
|
responses: {
|
6429
6490
|
200: WithPagination(WrapUpFormSchema),
|
6430
|
-
400:
|
6431
|
-
message:
|
6491
|
+
400: import_zod92.default.object({
|
6492
|
+
message: import_zod92.default.string()
|
6432
6493
|
}),
|
6433
6494
|
401: DefaultUnauthorizedSchema,
|
6434
6495
|
500: DefaultErrorResponseSchema
|
@@ -6438,15 +6499,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6438
6499
|
updateWrapUpForm: {
|
6439
6500
|
method: "PATCH",
|
6440
6501
|
path: "/:id",
|
6441
|
-
pathParams:
|
6502
|
+
pathParams: import_zod92.default.object({ id: import_zod92.default.string() }),
|
6442
6503
|
headers: DefaultHeaderSchema,
|
6443
6504
|
body: UpdateWrapUpFormSchema,
|
6444
6505
|
responses: {
|
6445
6506
|
201: DefaultSuccessResponseSchema.extend({
|
6446
6507
|
wrapUpForm: WrapUpFormSchema
|
6447
6508
|
}),
|
6448
|
-
400:
|
6449
|
-
message:
|
6509
|
+
400: import_zod92.default.object({
|
6510
|
+
message: import_zod92.default.string()
|
6450
6511
|
}),
|
6451
6512
|
401: DefaultUnauthorizedSchema,
|
6452
6513
|
500: DefaultErrorResponseSchema
|
@@ -6459,28 +6520,28 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6459
6520
|
|
6460
6521
|
// src/upload/index.ts
|
6461
6522
|
var import_core35 = require("@ts-rest/core");
|
6462
|
-
var
|
6523
|
+
var import_zod93 = __toESM(require("zod"));
|
6463
6524
|
var uploadContract = (0, import_core35.initContract)().router(
|
6464
6525
|
{
|
6465
6526
|
rename: {
|
6466
6527
|
method: "POST",
|
6467
6528
|
path: "/:id/rename",
|
6468
|
-
pathParams:
|
6469
|
-
id:
|
6529
|
+
pathParams: import_zod93.default.object({
|
6530
|
+
id: import_zod93.default.string()
|
6470
6531
|
}),
|
6471
6532
|
headers: DefaultHeaderSchema,
|
6472
6533
|
responses: {
|
6473
6534
|
201: DefaultSuccessResponseSchema.extend({
|
6474
|
-
message:
|
6535
|
+
message: import_zod93.default.string()
|
6475
6536
|
}),
|
6476
|
-
400:
|
6477
|
-
message:
|
6537
|
+
400: import_zod93.default.object({
|
6538
|
+
message: import_zod93.default.string()
|
6478
6539
|
}),
|
6479
|
-
409:
|
6480
|
-
message:
|
6540
|
+
409: import_zod93.default.object({
|
6541
|
+
message: import_zod93.default.string()
|
6481
6542
|
}),
|
6482
|
-
500:
|
6483
|
-
message:
|
6543
|
+
500: import_zod93.default.object({
|
6544
|
+
message: import_zod93.default.string()
|
6484
6545
|
}),
|
6485
6546
|
401: DefaultUnauthorizedSchema,
|
6486
6547
|
404: DefaultNotFoundSchema,
|
@@ -6492,23 +6553,23 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6492
6553
|
delete: {
|
6493
6554
|
method: "DELETE",
|
6494
6555
|
path: "/:id",
|
6495
|
-
pathParams:
|
6496
|
-
id:
|
6556
|
+
pathParams: import_zod93.default.object({
|
6557
|
+
id: import_zod93.default.string()
|
6497
6558
|
}),
|
6498
6559
|
headers: DefaultHeaderSchema,
|
6499
6560
|
body: null,
|
6500
6561
|
responses: {
|
6501
6562
|
201: DefaultSuccessResponseSchema.extend({
|
6502
|
-
message:
|
6563
|
+
message: import_zod93.default.string()
|
6503
6564
|
}),
|
6504
|
-
400:
|
6505
|
-
message:
|
6565
|
+
400: import_zod93.default.object({
|
6566
|
+
message: import_zod93.default.string()
|
6506
6567
|
}),
|
6507
|
-
409:
|
6508
|
-
message:
|
6568
|
+
409: import_zod93.default.object({
|
6569
|
+
message: import_zod93.default.string()
|
6509
6570
|
}),
|
6510
|
-
500:
|
6511
|
-
message:
|
6571
|
+
500: import_zod93.default.object({
|
6572
|
+
message: import_zod93.default.string()
|
6512
6573
|
}),
|
6513
6574
|
401: DefaultUnauthorizedSchema,
|
6514
6575
|
404: DefaultNotFoundSchema,
|
@@ -6523,19 +6584,19 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6523
6584
|
);
|
6524
6585
|
|
6525
6586
|
// src/viber/index.ts
|
6526
|
-
var
|
6587
|
+
var import_zod95 = __toESM(require("zod"));
|
6527
6588
|
|
6528
6589
|
// src/viber/validation.ts
|
6529
|
-
var
|
6530
|
-
var ViberChannelSchema =
|
6531
|
-
name:
|
6532
|
-
accessToken:
|
6533
|
-
actor:
|
6534
|
-
id:
|
6535
|
-
name:
|
6536
|
-
email:
|
6537
|
-
address:
|
6538
|
-
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()
|
6539
6600
|
}).optional()
|
6540
6601
|
});
|
6541
6602
|
|
@@ -6564,8 +6625,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6564
6625
|
}),
|
6565
6626
|
400: DefaultErrorResponseSchema
|
6566
6627
|
},
|
6567
|
-
body:
|
6568
|
-
id:
|
6628
|
+
body: import_zod95.default.object({
|
6629
|
+
id: import_zod95.default.string().uuid()
|
6569
6630
|
}),
|
6570
6631
|
summary: "Connect viber channel"
|
6571
6632
|
},
|
@@ -6581,8 +6642,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6581
6642
|
reconnect: {
|
6582
6643
|
method: "POST",
|
6583
6644
|
path: "/reconnect/:channelId",
|
6584
|
-
pathParams:
|
6585
|
-
channelId:
|
6645
|
+
pathParams: import_zod95.default.object({
|
6646
|
+
channelId: import_zod95.default.string().uuid()
|
6586
6647
|
}),
|
6587
6648
|
responses: {
|
6588
6649
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6597,8 +6658,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6597
6658
|
delete: {
|
6598
6659
|
method: "DELETE",
|
6599
6660
|
path: "/delete/:channelId",
|
6600
|
-
pathParams:
|
6601
|
-
channelId:
|
6661
|
+
pathParams: import_zod95.default.object({
|
6662
|
+
channelId: import_zod95.default.string().uuid()
|
6602
6663
|
}),
|
6603
6664
|
body: null,
|
6604
6665
|
responses: {
|
@@ -6611,58 +6672,58 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6611
6672
|
|
6612
6673
|
// src/notification/index.ts
|
6613
6674
|
var import_core37 = require("@ts-rest/core");
|
6614
|
-
var
|
6675
|
+
var import_zod98 = __toESM(require("zod"));
|
6615
6676
|
|
6616
6677
|
// src/notification/validation.ts
|
6617
|
-
var
|
6678
|
+
var import_zod97 = __toESM(require("zod"));
|
6618
6679
|
|
6619
6680
|
// src/notification/schema.ts
|
6620
|
-
var
|
6621
|
-
var NotificationChangeSchema =
|
6622
|
-
id:
|
6623
|
-
createdAt:
|
6624
|
-
updatedAt:
|
6625
|
-
deletedAt:
|
6626
|
-
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(),
|
6627
6688
|
actor: UserSchema,
|
6628
|
-
notificationObjectId:
|
6629
|
-
readAt:
|
6630
|
-
});
|
6631
|
-
var NotificationObjectSchema =
|
6632
|
-
id:
|
6633
|
-
createdAt:
|
6634
|
-
updatedAt:
|
6635
|
-
deletedAt:
|
6636
|
-
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(),
|
6637
6698
|
notificationChange: NotificationChangeSchema
|
6638
6699
|
});
|
6639
|
-
var NotificationSchema =
|
6640
|
-
id:
|
6641
|
-
createdAt:
|
6642
|
-
updatedAt:
|
6643
|
-
deletedAt:
|
6644
|
-
notificationObjectId:
|
6645
|
-
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(),
|
6646
6707
|
notificationObject: NotificationObjectSchema,
|
6647
|
-
readAt:
|
6708
|
+
readAt: import_zod96.default.date()
|
6648
6709
|
});
|
6649
6710
|
|
6650
6711
|
// src/notification/validation.ts
|
6651
|
-
var GetNotificationsRequestSchema =
|
6652
|
-
page:
|
6653
|
-
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)
|
6654
6715
|
});
|
6655
|
-
var GetNotificationsResponseSchema =
|
6656
|
-
notificationCount:
|
6657
|
-
notifications:
|
6658
|
-
total:
|
6659
|
-
page:
|
6660
|
-
pageSize:
|
6661
|
-
lastPage:
|
6662
|
-
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()
|
6663
6724
|
});
|
6664
|
-
var ResetNotificationRequestSchema =
|
6665
|
-
userId:
|
6725
|
+
var ResetNotificationRequestSchema = import_zod97.default.object({
|
6726
|
+
userId: import_zod97.default.string()
|
6666
6727
|
});
|
6667
6728
|
|
6668
6729
|
// src/notification/index.ts
|
@@ -6676,14 +6737,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6676
6737
|
200: DefaultSuccessResponseSchema.extend({
|
6677
6738
|
data: GetNotificationsResponseSchema
|
6678
6739
|
}),
|
6679
|
-
400:
|
6680
|
-
message:
|
6740
|
+
400: import_zod98.default.object({
|
6741
|
+
message: import_zod98.default.string()
|
6681
6742
|
}),
|
6682
|
-
409:
|
6683
|
-
message:
|
6743
|
+
409: import_zod98.default.object({
|
6744
|
+
message: import_zod98.default.string()
|
6684
6745
|
}),
|
6685
|
-
500:
|
6686
|
-
message:
|
6746
|
+
500: import_zod98.default.object({
|
6747
|
+
message: import_zod98.default.string()
|
6687
6748
|
}),
|
6688
6749
|
401: DefaultUnauthorizedSchema,
|
6689
6750
|
404: DefaultNotFoundSchema,
|
@@ -6696,16 +6757,16 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6696
6757
|
path: "/new_notifications_count",
|
6697
6758
|
responses: {
|
6698
6759
|
200: DefaultSuccessResponseSchema.extend({
|
6699
|
-
total:
|
6760
|
+
total: import_zod98.default.number()
|
6700
6761
|
}),
|
6701
|
-
400:
|
6702
|
-
message:
|
6762
|
+
400: import_zod98.default.object({
|
6763
|
+
message: import_zod98.default.string()
|
6703
6764
|
}),
|
6704
|
-
409:
|
6705
|
-
message:
|
6765
|
+
409: import_zod98.default.object({
|
6766
|
+
message: import_zod98.default.string()
|
6706
6767
|
}),
|
6707
|
-
500:
|
6708
|
-
message:
|
6768
|
+
500: import_zod98.default.object({
|
6769
|
+
message: import_zod98.default.string()
|
6709
6770
|
}),
|
6710
6771
|
401: DefaultUnauthorizedSchema,
|
6711
6772
|
404: DefaultNotFoundSchema,
|
@@ -6720,14 +6781,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6720
6781
|
201: DefaultSuccessResponseSchema.extend({
|
6721
6782
|
data: UserSchema
|
6722
6783
|
}),
|
6723
|
-
400:
|
6724
|
-
message:
|
6784
|
+
400: import_zod98.default.object({
|
6785
|
+
message: import_zod98.default.string()
|
6725
6786
|
}),
|
6726
|
-
409:
|
6727
|
-
message:
|
6787
|
+
409: import_zod98.default.object({
|
6788
|
+
message: import_zod98.default.string()
|
6728
6789
|
}),
|
6729
|
-
500:
|
6730
|
-
message:
|
6790
|
+
500: import_zod98.default.object({
|
6791
|
+
message: import_zod98.default.string()
|
6731
6792
|
}),
|
6732
6793
|
401: DefaultUnauthorizedSchema,
|
6733
6794
|
404: DefaultNotFoundSchema,
|
@@ -6739,19 +6800,19 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6739
6800
|
readNotification: {
|
6740
6801
|
method: "POST",
|
6741
6802
|
path: "/read/:id",
|
6742
|
-
pathParams:
|
6803
|
+
pathParams: import_zod98.default.object({ id: import_zod98.default.string() }),
|
6743
6804
|
responses: {
|
6744
6805
|
201: DefaultSuccessResponseSchema.extend({
|
6745
6806
|
data: NotificationSchema
|
6746
6807
|
}),
|
6747
|
-
400:
|
6748
|
-
message:
|
6808
|
+
400: import_zod98.default.object({
|
6809
|
+
message: import_zod98.default.string()
|
6749
6810
|
}),
|
6750
|
-
409:
|
6751
|
-
message:
|
6811
|
+
409: import_zod98.default.object({
|
6812
|
+
message: import_zod98.default.string()
|
6752
6813
|
}),
|
6753
|
-
500:
|
6754
|
-
message:
|
6814
|
+
500: import_zod98.default.object({
|
6815
|
+
message: import_zod98.default.string()
|
6755
6816
|
}),
|
6756
6817
|
401: DefaultUnauthorizedSchema,
|
6757
6818
|
404: DefaultNotFoundSchema,
|
@@ -6834,6 +6895,7 @@ var notificationContract = (0, import_core38.initContract)().router({
|
|
6834
6895
|
dashboardContract,
|
6835
6896
|
evaluateFormContract,
|
6836
6897
|
extensionContract,
|
6898
|
+
mailContract,
|
6837
6899
|
mainChatContract,
|
6838
6900
|
notificationContract,
|
6839
6901
|
permissionContract,
|