@kl1/contracts 1.0.99 → 1.1.0-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 +895 -827
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +894 -827
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/index.d.ts +111 -0
- package/dist/src/chat/index.d.ts.map +1 -1
- package/dist/src/chat/schema.d.ts +16 -0
- package/dist/src/chat/schema.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +69 -0
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +1987 -1152
- 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/instagram/index.d.ts +66 -0
- package/dist/src/instagram/index.d.ts.map +1 -1
- package/dist/src/line/index.d.ts +66 -0
- package/dist/src/line/index.d.ts.map +1 -1
- package/dist/src/mail/account-contract.d.ts +132 -132
- 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 +1612 -1152
- 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 +951 -948
- 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 +319 -316
- 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/messenger/index.d.ts +66 -0
- package/dist/src/messenger/index.d.ts.map +1 -1
- package/dist/src/viber/index.d.ts +66 -0
- package/dist/src/viber/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,
|
@@ -1165,6 +1166,8 @@ var RoomSchema = DefaultEntitySchema.extend({
|
|
1165
1166
|
lastMessage: import_zod26.default.string(),
|
1166
1167
|
handleTime: import_zod26.default.number(),
|
1167
1168
|
closeAt: import_zod26.default.date(),
|
1169
|
+
lastMessageAt: import_zod26.default.date().nullable(),
|
1170
|
+
status: import_zod26.default.number(),
|
1168
1171
|
unreadCount: import_zod26.default.number(),
|
1169
1172
|
firstResponseAt: import_zod26.default.date(),
|
1170
1173
|
firstResponseTime: import_zod26.default.number(),
|
@@ -1511,7 +1514,8 @@ var SendMessageSchema = import_zod29.default.object({
|
|
1511
1514
|
messageAttachments: MessageAttachmentSchema.optional(),
|
1512
1515
|
user: UserSchema.optional(),
|
1513
1516
|
sticker: StickerSchema.optional(),
|
1514
|
-
file: import_zod29.default.custom().optional()
|
1517
|
+
file: import_zod29.default.custom().optional(),
|
1518
|
+
messengerTags: import_zod29.default.union([import_zod29.default.literal(1), import_zod29.default.literal(2), import_zod29.default.literal(3)]).optional()
|
1515
1519
|
});
|
1516
1520
|
var SolveRoomSchema = import_zod29.default.object({
|
1517
1521
|
roomId: import_zod29.default.string(),
|
@@ -1560,6 +1564,7 @@ var SendMessageToPlatformSchema = import_zod29.default.object({
|
|
1560
1564
|
createdAt: import_zod29.default.string(),
|
1561
1565
|
updatedAt: import_zod29.default.string(),
|
1562
1566
|
platformContact: import_zod29.default.object({
|
1567
|
+
id: import_zod29.default.string().uuid(),
|
1563
1568
|
channelId: import_zod29.default.string().uuid(),
|
1564
1569
|
socialPlatformId: import_zod29.default.string().nullable(),
|
1565
1570
|
type: ChannelTypeSchema,
|
@@ -1574,12 +1579,19 @@ var SendMessageToPlatformSchema = import_zod29.default.object({
|
|
1574
1579
|
})
|
1575
1580
|
}),
|
1576
1581
|
actor: import_zod29.default.object({
|
1582
|
+
id: import_zod29.default.string().uuid(),
|
1577
1583
|
name: import_zod29.default.string(),
|
1578
1584
|
email: import_zod29.default.string().email(),
|
1579
1585
|
address: import_zod29.default.string().nullable(),
|
1580
1586
|
phone: import_zod29.default.string().nullable()
|
1581
1587
|
}).nullable(),
|
1582
|
-
|
1588
|
+
assignee: import_zod29.default.object({
|
1589
|
+
id: import_zod29.default.string().uuid(),
|
1590
|
+
name: import_zod29.default.string(),
|
1591
|
+
email: import_zod29.default.string().email()
|
1592
|
+
}).nullable(),
|
1593
|
+
channel: ChannelSchema2,
|
1594
|
+
status: import_zod29.default.number()
|
1583
1595
|
}),
|
1584
1596
|
message: import_zod29.default.object({
|
1585
1597
|
message: import_zod29.default.string().optional(),
|
@@ -4073,7 +4085,7 @@ var import_core22 = require("@ts-rest/core");
|
|
4073
4085
|
|
4074
4086
|
// src/mail/room-contract.ts
|
4075
4087
|
var import_core18 = require("@ts-rest/core");
|
4076
|
-
var
|
4088
|
+
var import_zod60 = __toESM(require("zod"));
|
4077
4089
|
|
4078
4090
|
// src/mail/schemas/room.schema.ts
|
4079
4091
|
var import_zod58 = __toESM(require("zod"));
|
@@ -4087,12 +4099,12 @@ var MailServerSchema = import_zod56.default.object({
|
|
4087
4099
|
deletedAt: import_zod56.default.date().nullable(),
|
4088
4100
|
name: import_zod56.default.string(),
|
4089
4101
|
smtpHost: import_zod56.default.string(),
|
4090
|
-
smtpPort: import_zod56.default.
|
4091
|
-
smtpTlsPort: import_zod56.default.
|
4102
|
+
smtpPort: import_zod56.default.number(),
|
4103
|
+
smtpTlsPort: import_zod56.default.number(),
|
4092
4104
|
useTlsForSmtp: import_zod56.default.boolean(),
|
4093
4105
|
imapHost: import_zod56.default.string(),
|
4094
|
-
imapPort: import_zod56.default.
|
4095
|
-
imapTlsPort: import_zod56.default.
|
4106
|
+
imapPort: import_zod56.default.number(),
|
4107
|
+
imapTlsPort: import_zod56.default.number(),
|
4096
4108
|
useTlsForImap: import_zod56.default.boolean()
|
4097
4109
|
});
|
4098
4110
|
var MailAccountSchema = import_zod56.default.object({
|
@@ -4135,12 +4147,12 @@ var AttachmentSchema = import_zod57.default.object({
|
|
4135
4147
|
createdAt: import_zod57.default.date(),
|
4136
4148
|
updatedAt: import_zod57.default.date(),
|
4137
4149
|
deletedAt: import_zod57.default.nullable(import_zod57.default.date()),
|
4138
|
-
|
4139
|
-
|
4140
|
-
|
4141
|
-
|
4142
|
-
|
4143
|
-
|
4150
|
+
bucketName: import_zod57.default.string(),
|
4151
|
+
fileName: import_zod57.default.string(),
|
4152
|
+
fileKey: import_zod57.default.string(),
|
4153
|
+
fileSize: import_zod57.default.number(),
|
4154
|
+
fileUrl: import_zod57.default.string(),
|
4155
|
+
extensionName: import_zod57.default.string()
|
4144
4156
|
})
|
4145
4157
|
});
|
4146
4158
|
var MessageSchema2 = import_zod57.default.object({
|
@@ -4194,7 +4206,7 @@ var UserModel = import_zod58.default.object({
|
|
4194
4206
|
email: import_zod58.default.string(),
|
4195
4207
|
address: import_zod58.default.string().nullable(),
|
4196
4208
|
phone: import_zod58.default.string().nullable(),
|
4197
|
-
|
4209
|
+
notificationCount: import_zod58.default.number().nullable()
|
4198
4210
|
});
|
4199
4211
|
var ActivityLogModel = import_zod58.default.object({
|
4200
4212
|
id: import_zod58.default.string(),
|
@@ -4206,7 +4218,9 @@ var ActivityLogModel = import_zod58.default.object({
|
|
4206
4218
|
roomId: import_zod58.default.string(),
|
4207
4219
|
actor: UserModel
|
4208
4220
|
});
|
4209
|
-
var
|
4221
|
+
var MessagesAndLogsSchema = import_zod58.default.array(
|
4222
|
+
import_zod58.default.union([MessageSchema2, ActivityLogModel])
|
4223
|
+
);
|
4210
4224
|
var MailRoomSchema = import_zod58.default.object({
|
4211
4225
|
id: import_zod58.default.string(),
|
4212
4226
|
createdAt: import_zod58.default.date(),
|
@@ -4229,7 +4243,7 @@ var MailRoomSchema = import_zod58.default.object({
|
|
4229
4243
|
tags: import_zod58.default.array(TagSchema2),
|
4230
4244
|
assignee: UserModel,
|
4231
4245
|
messages: import_zod58.default.array(MessageSchema2),
|
4232
|
-
messagesAndLogs:
|
4246
|
+
messagesAndLogs: MessagesAndLogsSchema,
|
4233
4247
|
mail: MailAccountSchema,
|
4234
4248
|
unReadMessageCount: import_zod58.default.number()
|
4235
4249
|
});
|
@@ -4243,6 +4257,42 @@ var AttachmentSchema2 = import_zod58.default.object({
|
|
4243
4257
|
upload: UploadSchema
|
4244
4258
|
});
|
4245
4259
|
|
4260
|
+
// src/mail/schemas/room-validation.schema.ts
|
4261
|
+
var import_zod59 = __toESM(require("zod"));
|
4262
|
+
var RoomContractsValidationSchema = {
|
4263
|
+
getAll: {
|
4264
|
+
input: import_zod59.default.object({
|
4265
|
+
page: import_zod59.default.coerce.number().default(1),
|
4266
|
+
pageSize: import_zod59.default.coerce.number().default(10),
|
4267
|
+
keyword: import_zod59.default.string().optional(),
|
4268
|
+
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4269
|
+
resolved: import_zod59.default.boolean().or(import_zod59.default.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
|
4270
|
+
}),
|
4271
|
+
output: import_zod59.default.object({
|
4272
|
+
data: import_zod59.default.array(MailRoomSchema),
|
4273
|
+
total: import_zod59.default.number(),
|
4274
|
+
page: import_zod59.default.number(),
|
4275
|
+
pageSize: import_zod59.default.number()
|
4276
|
+
})
|
4277
|
+
},
|
4278
|
+
update: {
|
4279
|
+
input: import_zod59.default.object({
|
4280
|
+
resolved: import_zod59.default.boolean().or(
|
4281
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4282
|
+
).optional().nullable(),
|
4283
|
+
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4284
|
+
note: import_zod59.default.string().optional(),
|
4285
|
+
tags: import_zod59.default.array(import_zod59.default.string().uuid()).optional(),
|
4286
|
+
handover: import_zod59.default.boolean().or(
|
4287
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4288
|
+
).optional().nullable(),
|
4289
|
+
selfAssign: import_zod59.default.boolean().or(
|
4290
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4291
|
+
).optional().nullable()
|
4292
|
+
})
|
4293
|
+
}
|
4294
|
+
};
|
4295
|
+
|
4246
4296
|
// src/mail/room-contract.ts
|
4247
4297
|
var roomContract = (0, import_core18.initContract)().router(
|
4248
4298
|
{
|
@@ -4251,7 +4301,7 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4251
4301
|
path: "/",
|
4252
4302
|
responses: {
|
4253
4303
|
200: DefaultSuccessResponseSchema.extend({
|
4254
|
-
message:
|
4304
|
+
message: import_zod60.default.string()
|
4255
4305
|
}),
|
4256
4306
|
...DefaultResponses
|
4257
4307
|
},
|
@@ -4261,19 +4311,19 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4261
4311
|
getAll: {
|
4262
4312
|
method: "GET",
|
4263
4313
|
path: "",
|
4264
|
-
query:
|
4265
|
-
page:
|
4266
|
-
pageSize:
|
4267
|
-
keyword:
|
4268
|
-
assigneeId:
|
4269
|
-
resolved:
|
4314
|
+
query: import_zod60.default.object({
|
4315
|
+
page: import_zod60.default.coerce.number().default(1),
|
4316
|
+
pageSize: import_zod60.default.coerce.number().default(10),
|
4317
|
+
keyword: import_zod60.default.string().optional(),
|
4318
|
+
assigneeId: import_zod60.default.string().uuid().optional().nullable(),
|
4319
|
+
resolved: import_zod60.default.boolean().or(import_zod60.default.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
|
4270
4320
|
}),
|
4271
4321
|
responses: {
|
4272
4322
|
200: DefaultSuccessResponseSchema.extend({
|
4273
|
-
data:
|
4274
|
-
total:
|
4275
|
-
page:
|
4276
|
-
pageSize:
|
4323
|
+
data: import_zod60.default.array(MailRoomSchema),
|
4324
|
+
total: import_zod60.default.number(),
|
4325
|
+
page: import_zod60.default.number(),
|
4326
|
+
pageSize: import_zod60.default.number()
|
4277
4327
|
}),
|
4278
4328
|
...DefaultResponses
|
4279
4329
|
},
|
@@ -4282,8 +4332,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4282
4332
|
getById: {
|
4283
4333
|
method: "GET",
|
4284
4334
|
path: "/:id",
|
4285
|
-
pathParams:
|
4286
|
-
id:
|
4335
|
+
pathParams: import_zod60.default.object({
|
4336
|
+
id: import_zod60.default.string().uuid()
|
4287
4337
|
}),
|
4288
4338
|
responses: {
|
4289
4339
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4296,12 +4346,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4296
4346
|
getAttachments: {
|
4297
4347
|
method: "GET",
|
4298
4348
|
path: "/:id/attachments",
|
4299
|
-
pathParams:
|
4300
|
-
id:
|
4349
|
+
pathParams: import_zod60.default.object({
|
4350
|
+
id: import_zod60.default.string().uuid()
|
4301
4351
|
}),
|
4302
4352
|
responses: {
|
4303
4353
|
200: DefaultSuccessResponseSchema.extend({
|
4304
|
-
data:
|
4354
|
+
data: import_zod60.default.array(AttachmentSchema2)
|
4305
4355
|
}),
|
4306
4356
|
...DefaultResponses
|
4307
4357
|
},
|
@@ -4310,12 +4360,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4310
4360
|
getParticipants: {
|
4311
4361
|
method: "GET",
|
4312
4362
|
path: "/:id/participants",
|
4313
|
-
pathParams:
|
4314
|
-
id:
|
4363
|
+
pathParams: import_zod60.default.object({
|
4364
|
+
id: import_zod60.default.string().uuid()
|
4315
4365
|
}),
|
4316
4366
|
responses: {
|
4317
4367
|
200: DefaultSuccessResponseSchema.extend({
|
4318
|
-
data:
|
4368
|
+
data: import_zod60.default.array(MailUserSchema)
|
4319
4369
|
}),
|
4320
4370
|
...DefaultResponses
|
4321
4371
|
},
|
@@ -4324,8 +4374,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4324
4374
|
update: {
|
4325
4375
|
method: "PATCH",
|
4326
4376
|
path: "/:id",
|
4327
|
-
pathParams:
|
4328
|
-
id:
|
4377
|
+
pathParams: import_zod60.default.object({
|
4378
|
+
id: import_zod60.default.string()
|
4329
4379
|
}),
|
4330
4380
|
responses: {
|
4331
4381
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4333,28 +4383,18 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4333
4383
|
}),
|
4334
4384
|
...DefaultResponses
|
4335
4385
|
},
|
4336
|
-
body:
|
4337
|
-
resolved: import_zod59.default.boolean().or(
|
4338
|
-
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4339
|
-
).optional().nullable(),
|
4340
|
-
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4341
|
-
note: import_zod59.default.string().optional(),
|
4342
|
-
tags: import_zod59.default.array(import_zod59.default.string().uuid()).optional(),
|
4343
|
-
handover: import_zod59.default.boolean().or(
|
4344
|
-
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4345
|
-
).optional().nullable()
|
4346
|
-
}),
|
4386
|
+
body: RoomContractsValidationSchema.update.input,
|
4347
4387
|
summary: "Update a mail room by id"
|
4348
4388
|
},
|
4349
4389
|
markAsRead: {
|
4350
4390
|
method: "GET",
|
4351
4391
|
path: "/:id",
|
4352
|
-
pathParams:
|
4353
|
-
id:
|
4392
|
+
pathParams: import_zod60.default.object({
|
4393
|
+
id: import_zod60.default.string().uuid()
|
4354
4394
|
}),
|
4355
4395
|
responses: {
|
4356
4396
|
200: DefaultSuccessResponseSchema.extend({
|
4357
|
-
message:
|
4397
|
+
message: import_zod60.default.string()
|
4358
4398
|
}),
|
4359
4399
|
...DefaultResponses
|
4360
4400
|
},
|
@@ -4368,47 +4408,47 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4368
4408
|
|
4369
4409
|
// src/mail/account-contract.ts
|
4370
4410
|
var import_core19 = require("@ts-rest/core");
|
4371
|
-
var
|
4411
|
+
var import_zod62 = __toESM(require("zod"));
|
4372
4412
|
|
4373
4413
|
// src/mail/schemas/account-validation.schema.ts
|
4374
|
-
var
|
4414
|
+
var import_zod61 = __toESM(require("zod"));
|
4375
4415
|
var AccountContractsValidationSchemas = {
|
4376
4416
|
create: {
|
4377
|
-
input:
|
4378
|
-
address:
|
4379
|
-
name:
|
4380
|
-
password:
|
4381
|
-
mailServerId:
|
4417
|
+
input: import_zod61.default.object({
|
4418
|
+
address: import_zod61.default.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
4419
|
+
name: import_zod61.default.string().min(1, "Account name cannot be empty."),
|
4420
|
+
password: import_zod61.default.string().min(1, "Password cannot be empty."),
|
4421
|
+
mailServerId: import_zod61.default.string().uuid("Invalid mail_server_id")
|
4382
4422
|
})
|
4383
4423
|
},
|
4384
4424
|
getById: {
|
4385
|
-
input:
|
4386
|
-
id:
|
4425
|
+
input: import_zod61.default.object({
|
4426
|
+
id: import_zod61.default.string().uuid()
|
4387
4427
|
}),
|
4388
4428
|
output: MailAccountSchema
|
4389
4429
|
},
|
4390
4430
|
getAll: {
|
4391
|
-
output:
|
4431
|
+
output: import_zod61.default.array(MailAccountSchema)
|
4392
4432
|
},
|
4393
4433
|
update: {
|
4394
4434
|
input: MailAccountSchema,
|
4395
4435
|
output: MailAccountSchema
|
4396
4436
|
},
|
4397
4437
|
disconnect: {
|
4398
|
-
input:
|
4399
|
-
id:
|
4438
|
+
input: import_zod61.default.object({
|
4439
|
+
id: import_zod61.default.string().uuid()
|
4400
4440
|
}),
|
4401
4441
|
output: MailAccountSchema
|
4402
4442
|
},
|
4403
4443
|
reconnect: {
|
4404
|
-
input:
|
4405
|
-
id:
|
4444
|
+
input: import_zod61.default.object({
|
4445
|
+
id: import_zod61.default.string()
|
4406
4446
|
}),
|
4407
4447
|
output: MailAccountSchema
|
4408
4448
|
},
|
4409
4449
|
delete: {
|
4410
|
-
input:
|
4411
|
-
id:
|
4450
|
+
input: import_zod61.default.object({
|
4451
|
+
id: import_zod61.default.string()
|
4412
4452
|
}),
|
4413
4453
|
output: MailAccountSchema
|
4414
4454
|
}
|
@@ -4424,16 +4464,16 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4424
4464
|
responses: {
|
4425
4465
|
201: DefaultSuccessResponseSchema.extend({
|
4426
4466
|
// data: AccountContractsValidationSchemas.create.output,
|
4427
|
-
message:
|
4467
|
+
message: import_zod62.default.string()
|
4428
4468
|
}),
|
4429
|
-
400:
|
4430
|
-
message:
|
4469
|
+
400: import_zod62.default.object({
|
4470
|
+
message: import_zod62.default.string()
|
4431
4471
|
}),
|
4432
|
-
409:
|
4433
|
-
message:
|
4472
|
+
409: import_zod62.default.object({
|
4473
|
+
message: import_zod62.default.string()
|
4434
4474
|
}),
|
4435
|
-
500:
|
4436
|
-
message:
|
4475
|
+
500: import_zod62.default.object({
|
4476
|
+
message: import_zod62.default.string()
|
4437
4477
|
}),
|
4438
4478
|
...DefaultResponses
|
4439
4479
|
},
|
@@ -4462,7 +4502,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4462
4502
|
path: "",
|
4463
4503
|
responses: {
|
4464
4504
|
200: DefaultSuccessResponseSchema.extend({
|
4465
|
-
data:
|
4505
|
+
data: import_zod62.default.any()
|
4466
4506
|
// data: AccountContractsValidationSchemas.getAll.output,
|
4467
4507
|
}),
|
4468
4508
|
...DefaultResponses
|
@@ -4474,8 +4514,8 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4474
4514
|
update: {
|
4475
4515
|
method: "PATCH",
|
4476
4516
|
path: "/:id",
|
4477
|
-
pathParams:
|
4478
|
-
id:
|
4517
|
+
pathParams: import_zod62.default.object({
|
4518
|
+
id: import_zod62.default.string().uuid()
|
4479
4519
|
}),
|
4480
4520
|
responses: {
|
4481
4521
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -4524,7 +4564,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4524
4564
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
4525
4565
|
responses: {
|
4526
4566
|
200: DefaultSuccessResponseSchema.extend({
|
4527
|
-
message:
|
4567
|
+
message: import_zod62.default.string()
|
4528
4568
|
}),
|
4529
4569
|
...DefaultResponses
|
4530
4570
|
},
|
@@ -4541,64 +4581,91 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4541
4581
|
|
4542
4582
|
// src/mail/mail-server-contract.ts
|
4543
4583
|
var import_core20 = require("@ts-rest/core");
|
4544
|
-
var
|
4584
|
+
var import_zod64 = __toESM(require("zod"));
|
4585
|
+
|
4586
|
+
// src/mail/schemas/servers-validation.schema.ts
|
4587
|
+
var import_zod63 = __toESM(require("zod"));
|
4588
|
+
var CreateMailServerSchema = import_zod63.default.object({
|
4589
|
+
name: import_zod63.default.string(),
|
4590
|
+
smtpHost: import_zod63.default.string(),
|
4591
|
+
smtpPort: import_zod63.default.number(),
|
4592
|
+
smtpTlsPort: import_zod63.default.number(),
|
4593
|
+
useTlsForSmtp: import_zod63.default.boolean(),
|
4594
|
+
imapHost: import_zod63.default.string(),
|
4595
|
+
imapPort: import_zod63.default.number(),
|
4596
|
+
imapTlsPort: import_zod63.default.number(),
|
4597
|
+
useTlsForImap: import_zod63.default.boolean()
|
4598
|
+
});
|
4599
|
+
|
4600
|
+
// src/mail/mail-server-contract.ts
|
4545
4601
|
var serverContract = (0, import_core20.initContract)().router(
|
4546
4602
|
{
|
4547
4603
|
create: {
|
4548
4604
|
method: "POST",
|
4549
4605
|
path: "/",
|
4550
4606
|
responses: {
|
4551
|
-
|
4552
|
-
|
4607
|
+
201: DefaultSuccessResponseSchema.extend({
|
4608
|
+
data: MailServerSchema
|
4553
4609
|
}),
|
4554
4610
|
...DefaultResponses
|
4555
4611
|
},
|
4556
|
-
body:
|
4612
|
+
body: CreateMailServerSchema,
|
4557
4613
|
summary: "Register a new mail server"
|
4558
4614
|
},
|
4559
|
-
|
4615
|
+
getById: {
|
4560
4616
|
method: "GET",
|
4561
4617
|
path: "/:id",
|
4562
|
-
pathParams:
|
4563
|
-
id:
|
4618
|
+
pathParams: import_zod64.default.object({
|
4619
|
+
id: import_zod64.default.string().uuid()
|
4564
4620
|
}),
|
4565
4621
|
responses: {
|
4566
4622
|
200: DefaultSuccessResponseSchema.extend({
|
4567
|
-
|
4623
|
+
data: MailServerSchema
|
4568
4624
|
}),
|
4569
4625
|
...DefaultResponses
|
4570
4626
|
},
|
4571
4627
|
summary: "Get a mail server by id"
|
4572
4628
|
},
|
4629
|
+
getAll: {
|
4630
|
+
method: "GET",
|
4631
|
+
path: "/",
|
4632
|
+
responses: {
|
4633
|
+
200: DefaultSuccessResponseSchema.extend({
|
4634
|
+
data: import_zod64.default.array(MailServerSchema)
|
4635
|
+
}),
|
4636
|
+
...DefaultResponses
|
4637
|
+
},
|
4638
|
+
summary: "Get all mail servers"
|
4639
|
+
},
|
4573
4640
|
update: {
|
4574
4641
|
method: "PATCH",
|
4575
4642
|
path: "/:id",
|
4576
|
-
pathParams:
|
4577
|
-
id:
|
4643
|
+
pathParams: import_zod64.default.object({
|
4644
|
+
id: import_zod64.default.string().uuid()
|
4578
4645
|
}),
|
4579
4646
|
responses: {
|
4580
4647
|
200: DefaultSuccessResponseSchema.extend({
|
4581
|
-
|
4648
|
+
data: MailServerSchema
|
4582
4649
|
}),
|
4583
4650
|
...DefaultResponses
|
4584
4651
|
},
|
4585
|
-
body:
|
4586
|
-
summary: "Update a mail server
|
4652
|
+
body: CreateMailServerSchema.partial(),
|
4653
|
+
summary: "Update a mail server"
|
4587
4654
|
},
|
4588
4655
|
delete: {
|
4589
|
-
method: "
|
4656
|
+
method: "DELETE",
|
4590
4657
|
path: "/:id",
|
4591
|
-
pathParams:
|
4592
|
-
id:
|
4658
|
+
pathParams: import_zod64.default.object({
|
4659
|
+
id: import_zod64.default.string().uuid()
|
4593
4660
|
}),
|
4594
4661
|
responses: {
|
4595
4662
|
200: DefaultSuccessResponseSchema.extend({
|
4596
|
-
|
4663
|
+
data: MailServerSchema
|
4597
4664
|
}),
|
4598
4665
|
...DefaultResponses
|
4599
4666
|
},
|
4600
4667
|
body: null,
|
4601
|
-
summary: "Delete a mail server
|
4668
|
+
summary: "Delete a mail server"
|
4602
4669
|
}
|
4603
4670
|
},
|
4604
4671
|
{
|
@@ -4608,44 +4675,44 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4608
4675
|
|
4609
4676
|
// src/mail/message-contract.ts
|
4610
4677
|
var import_core21 = require("@ts-rest/core");
|
4611
|
-
var
|
4678
|
+
var import_zod66 = __toESM(require("zod"));
|
4612
4679
|
|
4613
4680
|
// src/mail/schemas/message-validation.schema.ts
|
4614
|
-
var
|
4615
|
-
var MailParticipant =
|
4616
|
-
name:
|
4617
|
-
address:
|
4681
|
+
var import_zod65 = __toESM(require("zod"));
|
4682
|
+
var MailParticipant = import_zod65.default.object({
|
4683
|
+
name: import_zod65.default.string().optional(),
|
4684
|
+
address: import_zod65.default.string().email()
|
4618
4685
|
});
|
4619
4686
|
var MessageContractsValidationsSchema = {
|
4620
4687
|
submit: {
|
4621
|
-
input:
|
4622
|
-
subject:
|
4623
|
-
text:
|
4624
|
-
html:
|
4688
|
+
input: import_zod65.default.object({
|
4689
|
+
subject: import_zod65.default.string(),
|
4690
|
+
text: import_zod65.default.string(),
|
4691
|
+
html: import_zod65.default.string(),
|
4625
4692
|
from: MailParticipant,
|
4626
|
-
to:
|
4627
|
-
cc:
|
4628
|
-
bcc:
|
4629
|
-
reference:
|
4630
|
-
messageId:
|
4631
|
-
action:
|
4693
|
+
to: import_zod65.default.array(MailParticipant),
|
4694
|
+
cc: import_zod65.default.array(MailParticipant).optional(),
|
4695
|
+
bcc: import_zod65.default.array(MailParticipant).optional(),
|
4696
|
+
reference: import_zod65.default.object({
|
4697
|
+
messageId: import_zod65.default.string(),
|
4698
|
+
action: import_zod65.default.union([import_zod65.default.literal("reply"), import_zod65.default.literal("forward")])
|
4632
4699
|
}).optional(),
|
4633
|
-
attachments:
|
4634
|
-
|
4635
|
-
fileType:
|
4636
|
-
fileName:
|
4637
|
-
fileKey:
|
4638
|
-
fileSize:
|
4639
|
-
bucketName:
|
4640
|
-
presignedUrl:
|
4700
|
+
attachments: import_zod65.default.array(
|
4701
|
+
import_zod65.default.object({
|
4702
|
+
fileType: import_zod65.default.string(),
|
4703
|
+
fileName: import_zod65.default.string(),
|
4704
|
+
fileKey: import_zod65.default.string(),
|
4705
|
+
fileSize: import_zod65.default.number(),
|
4706
|
+
bucketName: import_zod65.default.string(),
|
4707
|
+
presignedUrl: import_zod65.default.string()
|
4641
4708
|
})
|
4642
4709
|
).optional()
|
4643
4710
|
}),
|
4644
|
-
output:
|
4645
|
-
response:
|
4646
|
-
messageId:
|
4647
|
-
sendAt:
|
4648
|
-
queueId:
|
4711
|
+
output: import_zod65.default.object({
|
4712
|
+
response: import_zod65.default.string(),
|
4713
|
+
messageId: import_zod65.default.string(),
|
4714
|
+
sendAt: import_zod65.default.string(),
|
4715
|
+
queueId: import_zod65.default.string()
|
4649
4716
|
})
|
4650
4717
|
}
|
4651
4718
|
};
|
@@ -4670,8 +4737,8 @@ var messageContract = (0, import_core21.initContract)().router(
|
|
4670
4737
|
getById: {
|
4671
4738
|
method: "GET",
|
4672
4739
|
path: "/:id",
|
4673
|
-
pathParams:
|
4674
|
-
id:
|
4740
|
+
pathParams: import_zod66.default.object({
|
4741
|
+
id: import_zod66.default.string()
|
4675
4742
|
}),
|
4676
4743
|
responses: {
|
4677
4744
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4698,7 +4765,7 @@ var mailContract = (0, import_core22.initContract)().router({
|
|
4698
4765
|
|
4699
4766
|
// src/messenger/index.ts
|
4700
4767
|
var import_core23 = require("@ts-rest/core");
|
4701
|
-
var
|
4768
|
+
var import_zod67 = __toESM(require("zod"));
|
4702
4769
|
var messengerContract = (0, import_core23.initContract)().router({
|
4703
4770
|
sendMessage: {
|
4704
4771
|
method: "POST",
|
@@ -4732,8 +4799,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4732
4799
|
reconnect: {
|
4733
4800
|
method: "POST",
|
4734
4801
|
path: "/reconnect/:channelId",
|
4735
|
-
pathParams:
|
4736
|
-
channelId:
|
4802
|
+
pathParams: import_zod67.default.object({
|
4803
|
+
channelId: import_zod67.default.string().uuid()
|
4737
4804
|
}),
|
4738
4805
|
body: null,
|
4739
4806
|
responses: {
|
@@ -4745,8 +4812,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4745
4812
|
delete: {
|
4746
4813
|
method: "DELETE",
|
4747
4814
|
path: "/delete/:channelId",
|
4748
|
-
pathParams:
|
4749
|
-
channelId:
|
4815
|
+
pathParams: import_zod67.default.object({
|
4816
|
+
channelId: import_zod67.default.string().uuid()
|
4750
4817
|
}),
|
4751
4818
|
body: null,
|
4752
4819
|
responses: {
|
@@ -4778,7 +4845,7 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4778
4845
|
|
4779
4846
|
// src/permission/index.ts
|
4780
4847
|
var import_core24 = require("@ts-rest/core");
|
4781
|
-
var
|
4848
|
+
var import_zod68 = __toESM(require("zod"));
|
4782
4849
|
var permissionContract = (0, import_core24.initContract)().router(
|
4783
4850
|
{
|
4784
4851
|
getPermissions: {
|
@@ -4786,9 +4853,9 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4786
4853
|
path: "",
|
4787
4854
|
headers: DefaultHeaderSchema,
|
4788
4855
|
responses: {
|
4789
|
-
200:
|
4790
|
-
400:
|
4791
|
-
message:
|
4856
|
+
200: import_zod68.default.object({ permissions: PermissionSchema.array() }),
|
4857
|
+
400: import_zod68.default.object({
|
4858
|
+
message: import_zod68.default.string()
|
4792
4859
|
}),
|
4793
4860
|
401: DefaultUnauthorizedSchema,
|
4794
4861
|
500: DefaultErrorResponseSchema
|
@@ -4801,15 +4868,15 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4801
4868
|
|
4802
4869
|
// src/role/index.ts
|
4803
4870
|
var import_core25 = require("@ts-rest/core");
|
4804
|
-
var
|
4871
|
+
var import_zod70 = __toESM(require("zod"));
|
4805
4872
|
|
4806
4873
|
// src/role/validation.ts
|
4807
|
-
var
|
4808
|
-
var CreateRoleSchema =
|
4809
|
-
systemName:
|
4810
|
-
displayName:
|
4811
|
-
description:
|
4812
|
-
permissions:
|
4874
|
+
var import_zod69 = require("zod");
|
4875
|
+
var CreateRoleSchema = import_zod69.z.object({
|
4876
|
+
systemName: import_zod69.z.string(),
|
4877
|
+
displayName: import_zod69.z.string(),
|
4878
|
+
description: import_zod69.z.string().nullable(),
|
4879
|
+
permissions: import_zod69.z.array(import_zod69.z.string())
|
4813
4880
|
});
|
4814
4881
|
var UpdateRoleSchema = CreateRoleSchema;
|
4815
4882
|
|
@@ -4825,8 +4892,8 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4825
4892
|
201: DefaultSuccessResponseSchema.extend({
|
4826
4893
|
role: RoleSchema
|
4827
4894
|
}),
|
4828
|
-
400:
|
4829
|
-
message:
|
4895
|
+
400: import_zod70.default.object({
|
4896
|
+
message: import_zod70.default.string()
|
4830
4897
|
}),
|
4831
4898
|
401: DefaultUnauthorizedSchema,
|
4832
4899
|
500: DefaultErrorResponseSchema
|
@@ -4836,15 +4903,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4836
4903
|
getRoles: {
|
4837
4904
|
method: "GET",
|
4838
4905
|
path: "",
|
4839
|
-
query:
|
4840
|
-
page:
|
4841
|
-
pageSize:
|
4906
|
+
query: import_zod70.default.object({
|
4907
|
+
page: import_zod70.default.coerce.number().default(1),
|
4908
|
+
pageSize: import_zod70.default.coerce.number().default(10)
|
4842
4909
|
}).optional(),
|
4843
4910
|
headers: DefaultHeaderSchema,
|
4844
4911
|
responses: {
|
4845
4912
|
200: WithPagination(RoleSchema),
|
4846
|
-
400:
|
4847
|
-
message:
|
4913
|
+
400: import_zod70.default.object({
|
4914
|
+
message: import_zod70.default.string()
|
4848
4915
|
}),
|
4849
4916
|
401: DefaultUnauthorizedSchema,
|
4850
4917
|
500: DefaultErrorResponseSchema
|
@@ -4854,15 +4921,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4854
4921
|
updateRole: {
|
4855
4922
|
method: "PATCH",
|
4856
4923
|
path: "/:id",
|
4857
|
-
pathParams:
|
4924
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4858
4925
|
headers: DefaultHeaderSchema,
|
4859
4926
|
body: UpdateRoleSchema,
|
4860
4927
|
responses: {
|
4861
4928
|
201: DefaultSuccessResponseSchema.extend({
|
4862
4929
|
role: RoleSchema
|
4863
4930
|
}),
|
4864
|
-
400:
|
4865
|
-
message:
|
4931
|
+
400: import_zod70.default.object({
|
4932
|
+
message: import_zod70.default.string()
|
4866
4933
|
}),
|
4867
4934
|
401: DefaultUnauthorizedSchema,
|
4868
4935
|
500: DefaultErrorResponseSchema
|
@@ -4872,11 +4939,11 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4872
4939
|
deleteRole: {
|
4873
4940
|
method: "DELETE",
|
4874
4941
|
path: "/:id",
|
4875
|
-
pathParams:
|
4942
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4876
4943
|
headers: DefaultHeaderSchema,
|
4877
4944
|
body: null,
|
4878
4945
|
responses: {
|
4879
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4946
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod70.default.string() }),
|
4880
4947
|
500: DefaultErrorResponseSchema
|
4881
4948
|
},
|
4882
4949
|
summary: "Delete a role."
|
@@ -4887,19 +4954,19 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4887
4954
|
|
4888
4955
|
// src/tag/index.ts
|
4889
4956
|
var import_core26 = require("@ts-rest/core");
|
4890
|
-
var
|
4957
|
+
var import_zod72 = __toESM(require("zod"));
|
4891
4958
|
|
4892
4959
|
// src/tag/validation.ts
|
4893
|
-
var
|
4894
|
-
var CreateTagSchema =
|
4895
|
-
name:
|
4960
|
+
var import_zod71 = require("zod");
|
4961
|
+
var CreateTagSchema = import_zod71.z.object({
|
4962
|
+
name: import_zod71.z.string(),
|
4896
4963
|
group: TagGroupSchema
|
4897
4964
|
});
|
4898
|
-
var GetTagsSchema =
|
4965
|
+
var GetTagsSchema = import_zod71.z.object({
|
4899
4966
|
group: TagGroupSchema.default("general"),
|
4900
|
-
keyword:
|
4967
|
+
keyword: import_zod71.z.string()
|
4901
4968
|
}).partial().optional();
|
4902
|
-
var UpdateTagSchema =
|
4969
|
+
var UpdateTagSchema = import_zod71.z.object({ name: import_zod71.z.string() });
|
4903
4970
|
|
4904
4971
|
// src/tag/index.ts
|
4905
4972
|
var tagContract = (0, import_core26.initContract)().router(
|
@@ -4922,7 +4989,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4922
4989
|
query: GetTagsSchema,
|
4923
4990
|
responses: {
|
4924
4991
|
200: DefaultSuccessResponseSchema.extend({
|
4925
|
-
tags:
|
4992
|
+
tags: import_zod72.default.array(TagSchema)
|
4926
4993
|
}),
|
4927
4994
|
500: DefaultErrorResponseSchema
|
4928
4995
|
},
|
@@ -4931,7 +4998,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4931
4998
|
updateTag: {
|
4932
4999
|
method: "PATCH",
|
4933
5000
|
path: "/:id",
|
4934
|
-
pathParams:
|
5001
|
+
pathParams: import_zod72.default.object({ id: import_zod72.default.string() }),
|
4935
5002
|
body: UpdateTagSchema,
|
4936
5003
|
responses: {
|
4937
5004
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4944,11 +5011,11 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4944
5011
|
deleteTag: {
|
4945
5012
|
method: "DELETE",
|
4946
5013
|
path: "/:id",
|
4947
|
-
pathParams:
|
4948
|
-
body:
|
5014
|
+
pathParams: import_zod72.default.object({ id: import_zod72.default.string() }),
|
5015
|
+
body: import_zod72.default.any().optional(),
|
4949
5016
|
// We don't need the body.
|
4950
5017
|
responses: {
|
4951
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5018
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod72.default.string() }),
|
4952
5019
|
500: DefaultErrorResponseSchema
|
4953
5020
|
},
|
4954
5021
|
headers: DefaultHeaderSchema
|
@@ -4961,27 +5028,27 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4961
5028
|
|
4962
5029
|
// src/telephony-agent-presence-status/index.ts
|
4963
5030
|
var import_core27 = require("@ts-rest/core");
|
4964
|
-
var
|
5031
|
+
var import_zod75 = __toESM(require("zod"));
|
4965
5032
|
|
4966
5033
|
// src/telephony-agent-presence-status/schema.ts
|
4967
|
-
var
|
5034
|
+
var import_zod73 = __toESM(require("zod"));
|
4968
5035
|
var PresenceStatusSchema = DefaultEntitySchema.extend({
|
4969
|
-
status:
|
4970
|
-
description:
|
5036
|
+
status: import_zod73.default.string(),
|
5037
|
+
description: import_zod73.default.string()
|
4971
5038
|
});
|
4972
5039
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
4973
5040
|
user: UserSchema,
|
4974
5041
|
presenceStatus: PresenceStatusSchema,
|
4975
|
-
customPresenceStatus:
|
5042
|
+
customPresenceStatus: import_zod73.default.string().nullable().optional()
|
4976
5043
|
});
|
4977
5044
|
|
4978
5045
|
// src/telephony-agent-presence-status/validation.ts
|
4979
|
-
var
|
4980
|
-
var UpdateUserStatusSchema =
|
4981
|
-
userId:
|
4982
|
-
presenceStatusId:
|
4983
|
-
customPreseneStatus:
|
4984
|
-
reason:
|
5046
|
+
var import_zod74 = require("zod");
|
5047
|
+
var UpdateUserStatusSchema = import_zod74.z.object({
|
5048
|
+
userId: import_zod74.z.string(),
|
5049
|
+
presenceStatusId: import_zod74.z.string().nullable().optional(),
|
5050
|
+
customPreseneStatus: import_zod74.z.string().nullable().optional(),
|
5051
|
+
reason: import_zod74.z.string()
|
4985
5052
|
});
|
4986
5053
|
|
4987
5054
|
// src/telephony-agent-presence-status/index.ts
|
@@ -4992,9 +5059,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4992
5059
|
path: "/presence_status",
|
4993
5060
|
headers: DefaultHeaderSchema,
|
4994
5061
|
responses: {
|
4995
|
-
200:
|
4996
|
-
400:
|
4997
|
-
message:
|
5062
|
+
200: import_zod75.default.array(PresenceStatusSchema),
|
5063
|
+
400: import_zod75.default.object({
|
5064
|
+
message: import_zod75.default.string()
|
4998
5065
|
}),
|
4999
5066
|
401: DefaultUnauthorizedSchema,
|
5000
5067
|
500: DefaultErrorResponseSchema
|
@@ -5006,9 +5073,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5006
5073
|
path: "/agents/presence_status",
|
5007
5074
|
headers: DefaultHeaderSchema,
|
5008
5075
|
responses: {
|
5009
|
-
200:
|
5010
|
-
400:
|
5011
|
-
message:
|
5076
|
+
200: import_zod75.default.array(UserPresenceStatusSchema),
|
5077
|
+
400: import_zod75.default.object({
|
5078
|
+
message: import_zod75.default.string()
|
5012
5079
|
}),
|
5013
5080
|
401: DefaultUnauthorizedSchema,
|
5014
5081
|
500: DefaultErrorResponseSchema
|
@@ -5018,12 +5085,12 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5018
5085
|
getAgentStatus: {
|
5019
5086
|
method: "GET",
|
5020
5087
|
path: "/presence_status/check_update/:userId",
|
5021
|
-
pathParams:
|
5088
|
+
pathParams: import_zod75.default.object({ userId: import_zod75.default.string() }),
|
5022
5089
|
headers: DefaultHeaderSchema,
|
5023
5090
|
responses: {
|
5024
5091
|
200: UserPresenceStatusSchema,
|
5025
|
-
400:
|
5026
|
-
message:
|
5092
|
+
400: import_zod75.default.object({
|
5093
|
+
message: import_zod75.default.string()
|
5027
5094
|
}),
|
5028
5095
|
401: DefaultUnauthorizedSchema,
|
5029
5096
|
500: DefaultErrorResponseSchema
|
@@ -5039,8 +5106,8 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5039
5106
|
200: DefaultSuccessResponseSchema.extend({
|
5040
5107
|
userPresenceStatu: UserPresenceStatusSchema
|
5041
5108
|
}),
|
5042
|
-
400:
|
5043
|
-
message:
|
5109
|
+
400: import_zod75.default.object({
|
5110
|
+
message: import_zod75.default.string()
|
5044
5111
|
}),
|
5045
5112
|
401: DefaultUnauthorizedSchema,
|
5046
5113
|
500: DefaultErrorResponseSchema
|
@@ -5052,62 +5119,62 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5052
5119
|
);
|
5053
5120
|
|
5054
5121
|
// src/telephony-cdr/index.ts
|
5055
|
-
var
|
5122
|
+
var import_zod78 = __toESM(require("zod"));
|
5056
5123
|
|
5057
5124
|
// src/telephony-cdr/validation.ts
|
5058
|
-
var
|
5059
|
-
var CreateTelephonyCdrSchema =
|
5060
|
-
uniqueCallId:
|
5061
|
-
timeStart:
|
5062
|
-
callFrom:
|
5063
|
-
callTo:
|
5064
|
-
callDuration:
|
5065
|
-
talkDuration:
|
5066
|
-
srcTrunkName:
|
5067
|
-
dstTrunkName:
|
5068
|
-
pinCode:
|
5069
|
-
status:
|
5070
|
-
type:
|
5071
|
-
recording:
|
5072
|
-
didNumber:
|
5073
|
-
agentRingTime:
|
5125
|
+
var import_zod76 = __toESM(require("zod"));
|
5126
|
+
var CreateTelephonyCdrSchema = import_zod76.default.object({
|
5127
|
+
uniqueCallId: import_zod76.default.string({ required_error: "uniqueCallId is required" }),
|
5128
|
+
timeStart: import_zod76.default.string({ required_error: "timeStart is required" }),
|
5129
|
+
callFrom: import_zod76.default.string({ required_error: "callFrom is required" }),
|
5130
|
+
callTo: import_zod76.default.string({ required_error: "callTo is required" }),
|
5131
|
+
callDuration: import_zod76.default.number().nullable(),
|
5132
|
+
talkDuration: import_zod76.default.number().nullable(),
|
5133
|
+
srcTrunkName: import_zod76.default.string().nullable(),
|
5134
|
+
dstTrunkName: import_zod76.default.string().nullable(),
|
5135
|
+
pinCode: import_zod76.default.string().nullable(),
|
5136
|
+
status: import_zod76.default.string(),
|
5137
|
+
type: import_zod76.default.string(),
|
5138
|
+
recording: import_zod76.default.string().nullable(),
|
5139
|
+
didNumber: import_zod76.default.string().nullable(),
|
5140
|
+
agentRingTime: import_zod76.default.number().nullable()
|
5074
5141
|
});
|
5075
5142
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5076
|
-
selectedDate:
|
5077
|
-
type:
|
5078
|
-
status:
|
5079
|
-
callFrom:
|
5080
|
-
callTo:
|
5081
|
-
trunk:
|
5082
|
-
userId:
|
5083
|
-
queueStatus:
|
5084
|
-
agentIds:
|
5085
|
-
agentCallsOnly:
|
5143
|
+
selectedDate: import_zod76.default.string().optional(),
|
5144
|
+
type: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5145
|
+
status: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5146
|
+
callFrom: import_zod76.default.string().optional(),
|
5147
|
+
callTo: import_zod76.default.string().optional(),
|
5148
|
+
trunk: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5149
|
+
userId: import_zod76.default.string().uuid().optional(),
|
5150
|
+
queueStatus: import_zod76.default.string().optional(),
|
5151
|
+
agentIds: import_zod76.default.array(import_zod76.default.string().uuid()).optional(),
|
5152
|
+
agentCallsOnly: import_zod76.default.coerce.boolean().optional()
|
5086
5153
|
});
|
5087
5154
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5088
|
-
type:
|
5089
|
-
status:
|
5090
|
-
callFrom:
|
5091
|
-
callTo:
|
5092
|
-
result:
|
5093
|
-
callTags:
|
5094
|
-
selectedDate:
|
5095
|
-
agentId:
|
5096
|
-
contact:
|
5097
|
-
callStatus:
|
5098
|
-
queueIds:
|
5099
|
-
notes:
|
5155
|
+
type: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5156
|
+
status: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5157
|
+
callFrom: import_zod76.default.string().optional(),
|
5158
|
+
callTo: import_zod76.default.string().optional(),
|
5159
|
+
result: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5160
|
+
callTags: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5161
|
+
selectedDate: import_zod76.default.string().optional(),
|
5162
|
+
agentId: import_zod76.default.string().optional(),
|
5163
|
+
contact: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5164
|
+
callStatus: import_zod76.default.array(import_zod76.default.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5165
|
+
queueIds: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5166
|
+
notes: import_zod76.default.string().optional()
|
5100
5167
|
});
|
5101
5168
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5102
|
-
|
5103
|
-
page:
|
5104
|
-
pageSize:
|
5169
|
+
import_zod76.default.object({
|
5170
|
+
page: import_zod76.default.coerce.number().positive().optional(),
|
5171
|
+
pageSize: import_zod76.default.coerce.number().positive().optional()
|
5105
5172
|
})
|
5106
5173
|
);
|
5107
5174
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5108
5175
|
var EmtptyArrayUndefined = [[], void 0];
|
5109
5176
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5110
|
-
reportType:
|
5177
|
+
reportType: import_zod76.default.enum([
|
5111
5178
|
"extcallstatistics",
|
5112
5179
|
"extcallactivity",
|
5113
5180
|
"trunkactivity",
|
@@ -5117,52 +5184,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5117
5184
|
"queueagentmisscalls",
|
5118
5185
|
"queueagentinoutcalls"
|
5119
5186
|
]),
|
5120
|
-
selectedDate:
|
5121
|
-
communicationType:
|
5122
|
-
time:
|
5123
|
-
queueList:
|
5124
|
-
queueId:
|
5125
|
-
trunkList:
|
5126
|
-
extensionList:
|
5187
|
+
selectedDate: import_zod76.default.string().optional(),
|
5188
|
+
communicationType: import_zod76.default.union([import_zod76.default.literal("Inbound"), import_zod76.default.literal("Outbound"), import_zod76.default.literal("Internal")]).optional(),
|
5189
|
+
time: import_zod76.default.string().optional(),
|
5190
|
+
queueList: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5191
|
+
queueId: import_zod76.default.string().optional(),
|
5192
|
+
trunkList: import_zod76.default.array(import_zod76.default.string()).optional(),
|
5193
|
+
extensionList: import_zod76.default.array(import_zod76.default.string()).optional()
|
5127
5194
|
}).superRefine((input, ctx) => {
|
5128
5195
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
5129
5196
|
ctx.addIssue({
|
5130
|
-
code:
|
5197
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5131
5198
|
path: ["selectedDate"],
|
5132
5199
|
message: "selectedDate is required."
|
5133
5200
|
});
|
5134
5201
|
}
|
5135
5202
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
5136
5203
|
ctx.addIssue({
|
5137
|
-
code:
|
5204
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5138
5205
|
path: ["time"],
|
5139
5206
|
message: "time is required."
|
5140
5207
|
});
|
5141
5208
|
}
|
5142
5209
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
5143
5210
|
ctx.addIssue({
|
5144
|
-
code:
|
5211
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5145
5212
|
path: ["queueList"],
|
5146
5213
|
message: "queueList is required."
|
5147
5214
|
});
|
5148
5215
|
}
|
5149
5216
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
5150
5217
|
ctx.addIssue({
|
5151
|
-
code:
|
5218
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5152
5219
|
path: ["queueId"],
|
5153
5220
|
message: "queueId is required."
|
5154
5221
|
});
|
5155
5222
|
}
|
5156
5223
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
5157
5224
|
ctx.addIssue({
|
5158
|
-
code:
|
5225
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5159
5226
|
path: ["trunkList"],
|
5160
5227
|
message: "trunkList is required."
|
5161
5228
|
});
|
5162
5229
|
}
|
5163
5230
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
5164
5231
|
ctx.addIssue({
|
5165
|
-
code:
|
5232
|
+
code: import_zod76.default.ZodIssueCode.custom,
|
5166
5233
|
path: ["extensionList"],
|
5167
5234
|
message: "extensionList is required."
|
5168
5235
|
});
|
@@ -5173,161 +5240,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5173
5240
|
var import_core28 = require("@ts-rest/core");
|
5174
5241
|
|
5175
5242
|
// src/telephony-cdr/call-report.schema.ts
|
5176
|
-
var
|
5177
|
-
var ExtCallStatisticsListSchema =
|
5243
|
+
var import_zod77 = __toESM(require("zod"));
|
5244
|
+
var ExtCallStatisticsListSchema = import_zod77.default.object({
|
5178
5245
|
/** @example "ext_num" */
|
5179
|
-
ext_num:
|
5246
|
+
ext_num: import_zod77.default.string(),
|
5180
5247
|
/** @example "ext_name" */
|
5181
|
-
ext_name:
|
5248
|
+
ext_name: import_zod77.default.string(),
|
5182
5249
|
/** @example 0 */
|
5183
|
-
answered_calls:
|
5250
|
+
answered_calls: import_zod77.default.number(),
|
5184
5251
|
/** @example 0 */
|
5185
|
-
no_answer_calls:
|
5252
|
+
no_answer_calls: import_zod77.default.number(),
|
5186
5253
|
/** @example 0 */
|
5187
|
-
busy_calls:
|
5254
|
+
busy_calls: import_zod77.default.number(),
|
5188
5255
|
/** @example 0 */
|
5189
|
-
failed_calls:
|
5256
|
+
failed_calls: import_zod77.default.number(),
|
5190
5257
|
/** @example 0 */
|
5191
|
-
voicemail_calls:
|
5258
|
+
voicemail_calls: import_zod77.default.number(),
|
5192
5259
|
/** @example 0 */
|
5193
|
-
total_holding_time:
|
5260
|
+
total_holding_time: import_zod77.default.number(),
|
5194
5261
|
/** @example 0 */
|
5195
|
-
total_talking_time:
|
5262
|
+
total_talking_time: import_zod77.default.number(),
|
5196
5263
|
/** @example "src_name" */
|
5197
|
-
src_name:
|
5264
|
+
src_name: import_zod77.default.string(),
|
5198
5265
|
/** @example 0 */
|
5199
|
-
total_call_count:
|
5266
|
+
total_call_count: import_zod77.default.number(),
|
5200
5267
|
/** @example "mobile" */
|
5201
|
-
mobile:
|
5202
|
-
});
|
5203
|
-
var ExtStatisticSchema =
|
5204
|
-
ext_num:
|
5205
|
-
ext_name:
|
5206
|
-
answered_calls:
|
5207
|
-
no_answer_calls:
|
5208
|
-
busy_calls:
|
5209
|
-
failed_calls:
|
5210
|
-
voicemail_calls:
|
5211
|
-
total_holding_time:
|
5212
|
-
total_talking_time:
|
5213
|
-
time:
|
5214
|
-
mobile:
|
5215
|
-
});
|
5216
|
-
var ExtCallActivityListSchema =
|
5217
|
-
time:
|
5218
|
-
answered_calls:
|
5219
|
-
no_answer_calls:
|
5220
|
-
busy_calls:
|
5221
|
-
failed_calls:
|
5222
|
-
voicemail_calls:
|
5223
|
-
total_holding_time:
|
5224
|
-
total_talking_time:
|
5225
|
-
ext_statistics:
|
5226
|
-
});
|
5227
|
-
var TrunkList =
|
5228
|
-
trunk_name:
|
5229
|
-
total_calls:
|
5230
|
-
});
|
5231
|
-
var TrunkActivityListSchema =
|
5232
|
-
time:
|
5233
|
-
trunk_list:
|
5234
|
-
});
|
5235
|
-
var QueueAvgWaitTalkTimeListSchema =
|
5236
|
-
time:
|
5237
|
-
avg_wait_time:
|
5238
|
-
avg_talk_time:
|
5239
|
-
});
|
5240
|
-
var SatisfactionListSchema =
|
5241
|
-
press_key:
|
5242
|
-
total:
|
5243
|
-
key_point:
|
5244
|
-
});
|
5245
|
-
var agentListSchema =
|
5246
|
-
agent_name:
|
5247
|
-
agent_num:
|
5248
|
-
satisfaction_list:
|
5249
|
-
total_key:
|
5250
|
-
total_point:
|
5251
|
-
average_point:
|
5252
|
-
});
|
5253
|
-
var QueueSatisfactionSchema =
|
5254
|
-
queue_name:
|
5255
|
-
queue_num:
|
5256
|
-
satisfaction_list:
|
5257
|
-
agent_list:
|
5258
|
-
total_key:
|
5259
|
-
total_point:
|
5260
|
-
average_point:
|
5261
|
-
});
|
5262
|
-
var QueuePerformanceListSchema =
|
5263
|
-
queue:
|
5264
|
-
total_calls:
|
5265
|
-
answered_calls:
|
5266
|
-
missed_calls:
|
5267
|
-
abandoned_calls:
|
5268
|
-
average_waiting_time:
|
5269
|
-
average_talking_time:
|
5270
|
-
max_waiting_time:
|
5271
|
-
answered_rate:
|
5272
|
-
missed_rate:
|
5273
|
-
abandoned_rate:
|
5274
|
-
sla:
|
5275
|
-
});
|
5276
|
-
var QueueAgentMissCallsListSchema =
|
5277
|
-
agent_name:
|
5278
|
-
agent_num:
|
5279
|
-
time:
|
5280
|
-
total_wait_time:
|
5281
|
-
src_name:
|
5282
|
-
src_num:
|
5283
|
-
queue_status:
|
5284
|
-
polling_attempts:
|
5285
|
-
missed_reason:
|
5286
|
-
});
|
5287
|
-
var QueueAgentInOutCallsListSchema =
|
5288
|
-
agent_name:
|
5289
|
-
agent_num:
|
5290
|
-
inbound_calls:
|
5291
|
-
inbound_duration:
|
5292
|
-
outbound_calls:
|
5293
|
-
outbound_duration:
|
5294
|
-
total_calls:
|
5295
|
-
total_duration:
|
5296
|
-
average_talk_duration:
|
5297
|
-
});
|
5298
|
-
var CallReportModel =
|
5299
|
-
errcode:
|
5300
|
-
errmsg:
|
5301
|
-
total_number:
|
5302
|
-
is_12hour:
|
5303
|
-
ext_call_statistics_list:
|
5304
|
-
ext_call_activity_list:
|
5305
|
-
trunk_activity_list:
|
5306
|
-
queue_avg_wait_talk_time_list:
|
5268
|
+
mobile: import_zod77.default.string()
|
5269
|
+
});
|
5270
|
+
var ExtStatisticSchema = import_zod77.default.object({
|
5271
|
+
ext_num: import_zod77.default.string(),
|
5272
|
+
ext_name: import_zod77.default.string(),
|
5273
|
+
answered_calls: import_zod77.default.number(),
|
5274
|
+
no_answer_calls: import_zod77.default.number(),
|
5275
|
+
busy_calls: import_zod77.default.number(),
|
5276
|
+
failed_calls: import_zod77.default.number(),
|
5277
|
+
voicemail_calls: import_zod77.default.number(),
|
5278
|
+
total_holding_time: import_zod77.default.number(),
|
5279
|
+
total_talking_time: import_zod77.default.number(),
|
5280
|
+
time: import_zod77.default.number(),
|
5281
|
+
mobile: import_zod77.default.string()
|
5282
|
+
});
|
5283
|
+
var ExtCallActivityListSchema = import_zod77.default.object({
|
5284
|
+
time: import_zod77.default.number(),
|
5285
|
+
answered_calls: import_zod77.default.number(),
|
5286
|
+
no_answer_calls: import_zod77.default.number(),
|
5287
|
+
busy_calls: import_zod77.default.number(),
|
5288
|
+
failed_calls: import_zod77.default.number(),
|
5289
|
+
voicemail_calls: import_zod77.default.number(),
|
5290
|
+
total_holding_time: import_zod77.default.number(),
|
5291
|
+
total_talking_time: import_zod77.default.number(),
|
5292
|
+
ext_statistics: import_zod77.default.array(ExtStatisticSchema)
|
5293
|
+
});
|
5294
|
+
var TrunkList = import_zod77.default.object({
|
5295
|
+
trunk_name: import_zod77.default.string(),
|
5296
|
+
total_calls: import_zod77.default.number()
|
5297
|
+
});
|
5298
|
+
var TrunkActivityListSchema = import_zod77.default.object({
|
5299
|
+
time: import_zod77.default.number(),
|
5300
|
+
trunk_list: import_zod77.default.array(TrunkList)
|
5301
|
+
});
|
5302
|
+
var QueueAvgWaitTalkTimeListSchema = import_zod77.default.object({
|
5303
|
+
time: import_zod77.default.number(),
|
5304
|
+
avg_wait_time: import_zod77.default.number(),
|
5305
|
+
avg_talk_time: import_zod77.default.number()
|
5306
|
+
});
|
5307
|
+
var SatisfactionListSchema = import_zod77.default.object({
|
5308
|
+
press_key: import_zod77.default.string(),
|
5309
|
+
total: import_zod77.default.number(),
|
5310
|
+
key_point: import_zod77.default.number().optional()
|
5311
|
+
});
|
5312
|
+
var agentListSchema = import_zod77.default.object({
|
5313
|
+
agent_name: import_zod77.default.string(),
|
5314
|
+
agent_num: import_zod77.default.string(),
|
5315
|
+
satisfaction_list: import_zod77.default.array(SatisfactionListSchema).optional(),
|
5316
|
+
total_key: import_zod77.default.number().optional(),
|
5317
|
+
total_point: import_zod77.default.number().optional(),
|
5318
|
+
average_point: import_zod77.default.number().optional()
|
5319
|
+
});
|
5320
|
+
var QueueSatisfactionSchema = import_zod77.default.object({
|
5321
|
+
queue_name: import_zod77.default.string(),
|
5322
|
+
queue_num: import_zod77.default.string(),
|
5323
|
+
satisfaction_list: import_zod77.default.array(SatisfactionListSchema).optional(),
|
5324
|
+
agent_list: import_zod77.default.array(agentListSchema).optional(),
|
5325
|
+
total_key: import_zod77.default.number().optional(),
|
5326
|
+
total_point: import_zod77.default.number().optional(),
|
5327
|
+
average_point: import_zod77.default.number().optional()
|
5328
|
+
});
|
5329
|
+
var QueuePerformanceListSchema = import_zod77.default.object({
|
5330
|
+
queue: import_zod77.default.string(),
|
5331
|
+
total_calls: import_zod77.default.number(),
|
5332
|
+
answered_calls: import_zod77.default.number(),
|
5333
|
+
missed_calls: import_zod77.default.number(),
|
5334
|
+
abandoned_calls: import_zod77.default.number(),
|
5335
|
+
average_waiting_time: import_zod77.default.number(),
|
5336
|
+
average_talking_time: import_zod77.default.number(),
|
5337
|
+
max_waiting_time: import_zod77.default.number(),
|
5338
|
+
answered_rate: import_zod77.default.number(),
|
5339
|
+
missed_rate: import_zod77.default.number(),
|
5340
|
+
abandoned_rate: import_zod77.default.number(),
|
5341
|
+
sla: import_zod77.default.number()
|
5342
|
+
});
|
5343
|
+
var QueueAgentMissCallsListSchema = import_zod77.default.object({
|
5344
|
+
agent_name: import_zod77.default.string(),
|
5345
|
+
agent_num: import_zod77.default.string(),
|
5346
|
+
time: import_zod77.default.string(),
|
5347
|
+
total_wait_time: import_zod77.default.number(),
|
5348
|
+
src_name: import_zod77.default.string(),
|
5349
|
+
src_num: import_zod77.default.string(),
|
5350
|
+
queue_status: import_zod77.default.string(),
|
5351
|
+
polling_attempts: import_zod77.default.number(),
|
5352
|
+
missed_reason: import_zod77.default.string()
|
5353
|
+
});
|
5354
|
+
var QueueAgentInOutCallsListSchema = import_zod77.default.object({
|
5355
|
+
agent_name: import_zod77.default.string(),
|
5356
|
+
agent_num: import_zod77.default.string(),
|
5357
|
+
inbound_calls: import_zod77.default.number(),
|
5358
|
+
inbound_duration: import_zod77.default.number(),
|
5359
|
+
outbound_calls: import_zod77.default.number(),
|
5360
|
+
outbound_duration: import_zod77.default.number(),
|
5361
|
+
total_calls: import_zod77.default.number(),
|
5362
|
+
total_duration: import_zod77.default.number(),
|
5363
|
+
average_talk_duration: import_zod77.default.number()
|
5364
|
+
});
|
5365
|
+
var CallReportModel = import_zod77.default.object({
|
5366
|
+
errcode: import_zod77.default.number(),
|
5367
|
+
errmsg: import_zod77.default.string(),
|
5368
|
+
total_number: import_zod77.default.number(),
|
5369
|
+
is_12hour: import_zod77.default.number().optional(),
|
5370
|
+
ext_call_statistics_list: import_zod77.default.array(ExtCallStatisticsListSchema).optional(),
|
5371
|
+
ext_call_activity_list: import_zod77.default.array(ExtCallActivityListSchema).optional(),
|
5372
|
+
trunk_activity_list: import_zod77.default.array(TrunkActivityListSchema).optional(),
|
5373
|
+
queue_avg_wait_talk_time_list: import_zod77.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5307
5374
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5308
|
-
queue_performance_list:
|
5309
|
-
queue_agent_miss_calls_list:
|
5310
|
-
queue_agent_in_out_calls_list:
|
5311
|
-
callback_result:
|
5312
|
-
page:
|
5313
|
-
pageSize:
|
5314
|
-
});
|
5315
|
-
var CallReportSchema =
|
5316
|
-
errcode:
|
5317
|
-
errmsg:
|
5318
|
-
total_number:
|
5319
|
-
is_12hour:
|
5320
|
-
ext_call_statistics_list:
|
5321
|
-
ext_call_activity_list:
|
5322
|
-
trunk_activity_list:
|
5323
|
-
queue_avg_wait_talk_time_list:
|
5375
|
+
queue_performance_list: import_zod77.default.array(QueuePerformanceListSchema).optional(),
|
5376
|
+
queue_agent_miss_calls_list: import_zod77.default.array(QueueAgentMissCallsListSchema).optional(),
|
5377
|
+
queue_agent_in_out_calls_list: import_zod77.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5378
|
+
callback_result: import_zod77.default.string(),
|
5379
|
+
page: import_zod77.default.number().optional(),
|
5380
|
+
pageSize: import_zod77.default.number().optional()
|
5381
|
+
});
|
5382
|
+
var CallReportSchema = import_zod77.default.object({
|
5383
|
+
errcode: import_zod77.default.number(),
|
5384
|
+
errmsg: import_zod77.default.string(),
|
5385
|
+
total_number: import_zod77.default.number(),
|
5386
|
+
is_12hour: import_zod77.default.number().optional(),
|
5387
|
+
ext_call_statistics_list: import_zod77.default.array(ExtCallStatisticsListSchema).optional(),
|
5388
|
+
ext_call_activity_list: import_zod77.default.array(ExtCallActivityListSchema).optional(),
|
5389
|
+
trunk_activity_list: import_zod77.default.array(TrunkActivityListSchema).optional(),
|
5390
|
+
queue_avg_wait_talk_time_list: import_zod77.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5324
5391
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5325
|
-
queue_performance_list:
|
5326
|
-
queue_agent_miss_calls_list:
|
5327
|
-
queue_agent_in_out_calls_list:
|
5328
|
-
callback_result:
|
5329
|
-
page:
|
5330
|
-
pageSize:
|
5392
|
+
queue_performance_list: import_zod77.default.array(QueuePerformanceListSchema).optional(),
|
5393
|
+
queue_agent_miss_calls_list: import_zod77.default.array(QueueAgentMissCallsListSchema).optional(),
|
5394
|
+
queue_agent_in_out_calls_list: import_zod77.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5395
|
+
callback_result: import_zod77.default.string(),
|
5396
|
+
page: import_zod77.default.number().optional(),
|
5397
|
+
pageSize: import_zod77.default.number().optional()
|
5331
5398
|
});
|
5332
5399
|
|
5333
5400
|
// src/telephony-cdr/index.ts
|
@@ -5340,10 +5407,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5340
5407
|
query: GetAllTelephonyCdrSchema,
|
5341
5408
|
responses: {
|
5342
5409
|
200: DefaultSuccessResponseSchema.extend({
|
5343
|
-
total:
|
5344
|
-
page:
|
5345
|
-
pageSize:
|
5346
|
-
telephonyCdrs:
|
5410
|
+
total: import_zod78.default.number(),
|
5411
|
+
page: import_zod78.default.number(),
|
5412
|
+
pageSize: import_zod78.default.number(),
|
5413
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5347
5414
|
}),
|
5348
5415
|
401: DefaultUnauthorizedSchema
|
5349
5416
|
},
|
@@ -5356,10 +5423,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5356
5423
|
query: GetAllTelephonyCdrSchema,
|
5357
5424
|
responses: {
|
5358
5425
|
200: DefaultSuccessResponseSchema.extend({
|
5359
|
-
total:
|
5360
|
-
page:
|
5361
|
-
pageSize:
|
5362
|
-
telephonyCdrs:
|
5426
|
+
total: import_zod78.default.number(),
|
5427
|
+
page: import_zod78.default.number(),
|
5428
|
+
pageSize: import_zod78.default.number(),
|
5429
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5363
5430
|
}),
|
5364
5431
|
401: DefaultUnauthorizedSchema
|
5365
5432
|
},
|
@@ -5372,10 +5439,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5372
5439
|
query: GetRecentTelephonyCdrSchema,
|
5373
5440
|
responses: {
|
5374
5441
|
200: DefaultSuccessResponseSchema.extend({
|
5375
|
-
total:
|
5376
|
-
page:
|
5377
|
-
pageSize:
|
5378
|
-
telephonyCdrs:
|
5442
|
+
total: import_zod78.default.number(),
|
5443
|
+
page: import_zod78.default.number(),
|
5444
|
+
pageSize: import_zod78.default.number(),
|
5445
|
+
telephonyCdrs: import_zod78.default.array(TelephonyCdrSchema)
|
5379
5446
|
}),
|
5380
5447
|
401: DefaultUnauthorizedSchema
|
5381
5448
|
},
|
@@ -5467,35 +5534,35 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5467
5534
|
|
5468
5535
|
// src/telephony-extension/index.ts
|
5469
5536
|
var import_core29 = require("@ts-rest/core");
|
5470
|
-
var
|
5537
|
+
var import_zod80 = __toESM(require("zod"));
|
5471
5538
|
|
5472
5539
|
// src/telephony-extension/schema.ts
|
5473
|
-
var
|
5474
|
-
var TelephonyExtensionSchema3 =
|
5475
|
-
errcode:
|
5476
|
-
errmsg:
|
5477
|
-
total_number:
|
5478
|
-
data:
|
5479
|
-
|
5480
|
-
id:
|
5481
|
-
online_status:
|
5482
|
-
fx_phone:
|
5483
|
-
sip_phone:
|
5484
|
-
status:
|
5485
|
-
ext_dev_type:
|
5486
|
-
}),
|
5487
|
-
linkus_desktop:
|
5488
|
-
linkus_mobile:
|
5489
|
-
linkus_web:
|
5490
|
-
status:
|
5491
|
-
ext_dev_type:
|
5540
|
+
var import_zod79 = __toESM(require("zod"));
|
5541
|
+
var TelephonyExtensionSchema3 = import_zod79.default.object({
|
5542
|
+
errcode: import_zod79.default.coerce.number(),
|
5543
|
+
errmsg: import_zod79.default.string(),
|
5544
|
+
total_number: import_zod79.default.coerce.number(),
|
5545
|
+
data: import_zod79.default.array(
|
5546
|
+
import_zod79.default.object({
|
5547
|
+
id: import_zod79.default.coerce.number(),
|
5548
|
+
online_status: import_zod79.default.object({
|
5549
|
+
fx_phone: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5550
|
+
sip_phone: import_zod79.default.object({
|
5551
|
+
status: import_zod79.default.coerce.number(),
|
5552
|
+
ext_dev_type: import_zod79.default.string().optional()
|
5553
|
+
}),
|
5554
|
+
linkus_desktop: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5555
|
+
linkus_mobile: import_zod79.default.object({ status: import_zod79.default.coerce.number() }),
|
5556
|
+
linkus_web: import_zod79.default.object({
|
5557
|
+
status: import_zod79.default.coerce.number(),
|
5558
|
+
ext_dev_type: import_zod79.default.string().optional()
|
5492
5559
|
})
|
5493
5560
|
}).optional(),
|
5494
|
-
presence_status:
|
5495
|
-
number:
|
5496
|
-
caller_id_name:
|
5497
|
-
role_name:
|
5498
|
-
email_addr:
|
5561
|
+
presence_status: import_zod79.default.string().optional(),
|
5562
|
+
number: import_zod79.default.string().optional(),
|
5563
|
+
caller_id_name: import_zod79.default.string().optional(),
|
5564
|
+
role_name: import_zod79.default.string().optional(),
|
5565
|
+
email_addr: import_zod79.default.string().optional()
|
5499
5566
|
})
|
5500
5567
|
)
|
5501
5568
|
});
|
@@ -5510,8 +5577,8 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5510
5577
|
query: null,
|
5511
5578
|
responses: {
|
5512
5579
|
200: TelephonyExtensionSchema3,
|
5513
|
-
400:
|
5514
|
-
message:
|
5580
|
+
400: import_zod80.default.object({
|
5581
|
+
message: import_zod80.default.string()
|
5515
5582
|
}),
|
5516
5583
|
401: DefaultUnauthorizedSchema,
|
5517
5584
|
500: DefaultErrorResponseSchema
|
@@ -5524,10 +5591,10 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5524
5591
|
|
5525
5592
|
// src/ticket/index.ts
|
5526
5593
|
var import_core30 = require("@ts-rest/core");
|
5527
|
-
var
|
5594
|
+
var import_zod82 = __toESM(require("zod"));
|
5528
5595
|
|
5529
5596
|
// src/ticket/validation.ts
|
5530
|
-
var
|
5597
|
+
var import_zod81 = __toESM(require("zod"));
|
5531
5598
|
var addErrorMessage2 = (field) => {
|
5532
5599
|
return field.refine(
|
5533
5600
|
({ isRequired, value }) => {
|
@@ -5545,106 +5612,106 @@ var addErrorMessage2 = (field) => {
|
|
5545
5612
|
}
|
5546
5613
|
);
|
5547
5614
|
};
|
5548
|
-
var BaseSchema3 =
|
5549
|
-
isRequired:
|
5550
|
-
attributeId:
|
5615
|
+
var BaseSchema3 = import_zod81.default.object({
|
5616
|
+
isRequired: import_zod81.default.boolean(),
|
5617
|
+
attributeId: import_zod81.default.string()
|
5551
5618
|
});
|
5552
5619
|
var SingleValue2 = addErrorMessage2(
|
5553
5620
|
BaseSchema3.extend({
|
5554
|
-
value:
|
5621
|
+
value: import_zod81.default.string()
|
5555
5622
|
})
|
5556
5623
|
);
|
5557
|
-
var CreateTicketValidationSchema =
|
5624
|
+
var CreateTicketValidationSchema = import_zod81.default.object({
|
5558
5625
|
title: SingleValue2,
|
5559
5626
|
description: SingleValue2,
|
5560
5627
|
status: SingleValue2,
|
5561
5628
|
type: SingleValue2,
|
5562
5629
|
priority: SingleValue2,
|
5563
5630
|
contact: SingleValue2,
|
5564
|
-
assignee:
|
5565
|
-
isRequired:
|
5566
|
-
attributeId:
|
5567
|
-
value:
|
5631
|
+
assignee: import_zod81.default.object({
|
5632
|
+
isRequired: import_zod81.default.boolean(),
|
5633
|
+
attributeId: import_zod81.default.string(),
|
5634
|
+
value: import_zod81.default.string()
|
5568
5635
|
}),
|
5569
5636
|
channel: SingleValue2,
|
5570
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5571
|
-
categories: BaseSchema3.extend({ value:
|
5572
|
-
customFields:
|
5637
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: import_zod81.default.array(import_zod81.default.string()) })),
|
5638
|
+
categories: BaseSchema3.extend({ value: import_zod81.default.array(import_zod81.default.string()) }),
|
5639
|
+
customFields: import_zod81.default.array(
|
5573
5640
|
addErrorMessage2(
|
5574
5641
|
BaseSchema3.extend({
|
5575
|
-
value:
|
5576
|
-
type:
|
5577
|
-
isDefaultAttribute:
|
5642
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())]),
|
5643
|
+
type: import_zod81.default.string(),
|
5644
|
+
isDefaultAttribute: import_zod81.default.boolean()
|
5578
5645
|
})
|
5579
5646
|
)
|
5580
5647
|
),
|
5581
|
-
reasonToAssign:
|
5648
|
+
reasonToAssign: import_zod81.default.object({ value: import_zod81.default.string() }).optional()
|
5582
5649
|
});
|
5583
5650
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5584
|
-
var TicketAttachmentRecordSchema =
|
5585
|
-
bucketName:
|
5586
|
-
fileKey:
|
5587
|
-
fileName:
|
5588
|
-
fileSize:
|
5589
|
-
url:
|
5590
|
-
});
|
5591
|
-
var CreateTicketAttachmentRecordsSchema =
|
5592
|
-
ticketId:
|
5593
|
-
attributeId:
|
5594
|
-
ticketAttachmentRecords:
|
5595
|
-
});
|
5596
|
-
var TicketParamsSchema =
|
5597
|
-
page:
|
5598
|
-
pageSize:
|
5599
|
-
});
|
5600
|
-
var CustomFieldQuery =
|
5601
|
-
attributeId:
|
5602
|
-
type:
|
5603
|
-
value:
|
5604
|
-
});
|
5605
|
-
var GetAllTicketQuerySchema =
|
5606
|
-
page:
|
5607
|
-
pageSize:
|
5608
|
-
selectedDate:
|
5609
|
-
keyword:
|
5610
|
-
title:
|
5611
|
-
description:
|
5612
|
-
status:
|
5613
|
-
priority:
|
5614
|
-
channel:
|
5615
|
-
type:
|
5616
|
-
ticketType:
|
5617
|
-
contact:
|
5618
|
-
tags:
|
5619
|
-
categories:
|
5620
|
-
assignee:
|
5621
|
-
customFields:
|
5622
|
-
|
5623
|
-
attributeId:
|
5624
|
-
type:
|
5625
|
-
value:
|
5651
|
+
var TicketAttachmentRecordSchema = import_zod81.default.object({
|
5652
|
+
bucketName: import_zod81.default.string(),
|
5653
|
+
fileKey: import_zod81.default.string(),
|
5654
|
+
fileName: import_zod81.default.string(),
|
5655
|
+
fileSize: import_zod81.default.coerce.number(),
|
5656
|
+
url: import_zod81.default.string()
|
5657
|
+
});
|
5658
|
+
var CreateTicketAttachmentRecordsSchema = import_zod81.default.object({
|
5659
|
+
ticketId: import_zod81.default.string(),
|
5660
|
+
attributeId: import_zod81.default.string(),
|
5661
|
+
ticketAttachmentRecords: import_zod81.default.array(TicketAttachmentRecordSchema)
|
5662
|
+
});
|
5663
|
+
var TicketParamsSchema = import_zod81.default.object({
|
5664
|
+
page: import_zod81.default.coerce.number().default(1),
|
5665
|
+
pageSize: import_zod81.default.coerce.number().default(10)
|
5666
|
+
});
|
5667
|
+
var CustomFieldQuery = import_zod81.default.object({
|
5668
|
+
attributeId: import_zod81.default.string(),
|
5669
|
+
type: import_zod81.default.string(),
|
5670
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5671
|
+
});
|
5672
|
+
var GetAllTicketQuerySchema = import_zod81.default.object({
|
5673
|
+
page: import_zod81.default.string().transform((value) => Number(value)),
|
5674
|
+
pageSize: import_zod81.default.string().transform((value) => Number(value)),
|
5675
|
+
selectedDate: import_zod81.default.string(),
|
5676
|
+
keyword: import_zod81.default.string(),
|
5677
|
+
title: import_zod81.default.string(),
|
5678
|
+
description: import_zod81.default.string(),
|
5679
|
+
status: import_zod81.default.array(import_zod81.default.string()),
|
5680
|
+
priority: import_zod81.default.array(import_zod81.default.string()),
|
5681
|
+
channel: import_zod81.default.array(import_zod81.default.string()),
|
5682
|
+
type: import_zod81.default.array(import_zod81.default.string()),
|
5683
|
+
ticketType: import_zod81.default.array(import_zod81.default.string()),
|
5684
|
+
contact: import_zod81.default.array(import_zod81.default.string()),
|
5685
|
+
tags: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5686
|
+
categories: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5687
|
+
assignee: import_zod81.default.array(import_zod81.default.string().uuid()),
|
5688
|
+
customFields: import_zod81.default.array(
|
5689
|
+
import_zod81.default.object({
|
5690
|
+
attributeId: import_zod81.default.string().uuid(),
|
5691
|
+
type: import_zod81.default.string(),
|
5692
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5626
5693
|
})
|
5627
5694
|
)
|
5628
5695
|
}).partial();
|
5629
|
-
var ExportAllTicketQuerySchema =
|
5630
|
-
agent:
|
5631
|
-
selectedDate:
|
5632
|
-
keyword:
|
5633
|
-
title:
|
5634
|
-
description:
|
5635
|
-
status:
|
5636
|
-
priority:
|
5637
|
-
channel:
|
5638
|
-
type:
|
5639
|
-
ticketType:
|
5640
|
-
contact:
|
5641
|
-
tags:
|
5642
|
-
categories:
|
5643
|
-
customFields:
|
5644
|
-
|
5645
|
-
attributeId:
|
5646
|
-
type:
|
5647
|
-
value:
|
5696
|
+
var ExportAllTicketQuerySchema = import_zod81.default.object({
|
5697
|
+
agent: import_zod81.default.array(import_zod81.default.string()),
|
5698
|
+
selectedDate: import_zod81.default.string(),
|
5699
|
+
keyword: import_zod81.default.string(),
|
5700
|
+
title: import_zod81.default.string(),
|
5701
|
+
description: import_zod81.default.string(),
|
5702
|
+
status: import_zod81.default.array(import_zod81.default.string()),
|
5703
|
+
priority: import_zod81.default.array(import_zod81.default.string()),
|
5704
|
+
channel: import_zod81.default.array(import_zod81.default.string()),
|
5705
|
+
type: import_zod81.default.array(import_zod81.default.string()),
|
5706
|
+
ticketType: import_zod81.default.array(import_zod81.default.string()),
|
5707
|
+
contact: import_zod81.default.array(import_zod81.default.string()),
|
5708
|
+
tags: import_zod81.default.array(import_zod81.default.string()),
|
5709
|
+
categories: import_zod81.default.array(import_zod81.default.string()),
|
5710
|
+
customFields: import_zod81.default.array(
|
5711
|
+
import_zod81.default.object({
|
5712
|
+
attributeId: import_zod81.default.string().uuid(),
|
5713
|
+
type: import_zod81.default.string(),
|
5714
|
+
value: import_zod81.default.union([import_zod81.default.string(), import_zod81.default.array(import_zod81.default.string())])
|
5648
5715
|
})
|
5649
5716
|
)
|
5650
5717
|
}).partial();
|
@@ -5660,14 +5727,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5660
5727
|
201: DefaultSuccessResponseSchema.extend({
|
5661
5728
|
data: TicketSchema
|
5662
5729
|
}),
|
5663
|
-
400:
|
5664
|
-
message:
|
5730
|
+
400: import_zod82.default.object({
|
5731
|
+
message: import_zod82.default.string()
|
5665
5732
|
}),
|
5666
|
-
409:
|
5667
|
-
message:
|
5733
|
+
409: import_zod82.default.object({
|
5734
|
+
message: import_zod82.default.string()
|
5668
5735
|
}),
|
5669
|
-
500:
|
5670
|
-
message:
|
5736
|
+
500: import_zod82.default.object({
|
5737
|
+
message: import_zod82.default.string()
|
5671
5738
|
}),
|
5672
5739
|
401: DefaultUnauthorizedSchema,
|
5673
5740
|
404: DefaultNotFoundSchema,
|
@@ -5688,8 +5755,8 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5688
5755
|
TicketSchema
|
5689
5756
|
)
|
5690
5757
|
}),
|
5691
|
-
400:
|
5692
|
-
message:
|
5758
|
+
400: import_zod82.default.object({
|
5759
|
+
message: import_zod82.default.string()
|
5693
5760
|
}),
|
5694
5761
|
401: DefaultUnauthorizedSchema,
|
5695
5762
|
500: DefaultErrorResponseSchema
|
@@ -5699,14 +5766,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5699
5766
|
getTicketById: {
|
5700
5767
|
method: "GET",
|
5701
5768
|
path: "/:id",
|
5702
|
-
pathParams:
|
5769
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5703
5770
|
headers: DefaultHeaderSchema,
|
5704
5771
|
responses: {
|
5705
5772
|
200: DefaultSuccessResponseSchema.extend({
|
5706
5773
|
data: TicketSchema
|
5707
5774
|
}),
|
5708
|
-
400:
|
5709
|
-
message:
|
5775
|
+
400: import_zod82.default.object({
|
5776
|
+
message: import_zod82.default.string()
|
5710
5777
|
}),
|
5711
5778
|
401: DefaultUnauthorizedSchema,
|
5712
5779
|
500: DefaultErrorResponseSchema
|
@@ -5716,15 +5783,15 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5716
5783
|
getTicketByContactId: {
|
5717
5784
|
method: "GET",
|
5718
5785
|
path: "/contact/:id",
|
5719
|
-
pathParams:
|
5786
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5720
5787
|
query: TicketParamsSchema,
|
5721
5788
|
headers: DefaultHeaderSchema,
|
5722
5789
|
responses: {
|
5723
5790
|
200: DefaultSuccessResponseSchema.extend({
|
5724
5791
|
data: WithPagination(TicketSchema)
|
5725
5792
|
}),
|
5726
|
-
400:
|
5727
|
-
message:
|
5793
|
+
400: import_zod82.default.object({
|
5794
|
+
message: import_zod82.default.string()
|
5728
5795
|
}),
|
5729
5796
|
401: DefaultUnauthorizedSchema,
|
5730
5797
|
500: DefaultErrorResponseSchema
|
@@ -5734,21 +5801,21 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5734
5801
|
updateTicket: {
|
5735
5802
|
method: "PATCH",
|
5736
5803
|
path: "/:id",
|
5737
|
-
pathParams:
|
5804
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5738
5805
|
body: UpdateTicketValidationSchema,
|
5739
5806
|
headers: DefaultHeaderSchema,
|
5740
5807
|
responses: {
|
5741
5808
|
201: DefaultSuccessResponseSchema.extend({
|
5742
5809
|
data: TicketSchema
|
5743
5810
|
}),
|
5744
|
-
400:
|
5745
|
-
message:
|
5811
|
+
400: import_zod82.default.object({
|
5812
|
+
message: import_zod82.default.string()
|
5746
5813
|
}),
|
5747
|
-
409:
|
5748
|
-
message:
|
5814
|
+
409: import_zod82.default.object({
|
5815
|
+
message: import_zod82.default.string()
|
5749
5816
|
}),
|
5750
|
-
500:
|
5751
|
-
message:
|
5817
|
+
500: import_zod82.default.object({
|
5818
|
+
message: import_zod82.default.string()
|
5752
5819
|
}),
|
5753
5820
|
401: DefaultUnauthorizedSchema,
|
5754
5821
|
404: DefaultNotFoundSchema,
|
@@ -5759,11 +5826,11 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5759
5826
|
deleteTicket: {
|
5760
5827
|
method: "DELETE",
|
5761
5828
|
path: "/:id",
|
5762
|
-
pathParams:
|
5829
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5763
5830
|
headers: DefaultHeaderSchema,
|
5764
5831
|
body: null,
|
5765
5832
|
responses: {
|
5766
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5833
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5767
5834
|
500: DefaultErrorResponseSchema
|
5768
5835
|
},
|
5769
5836
|
summary: "Delete a extension."
|
@@ -5771,19 +5838,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5771
5838
|
updateDescription: {
|
5772
5839
|
method: "PATCH",
|
5773
5840
|
path: "/description/update/:id",
|
5774
|
-
pathParams:
|
5775
|
-
body:
|
5841
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5842
|
+
body: import_zod82.default.object({ description: import_zod82.default.string() }),
|
5776
5843
|
headers: DefaultHeaderSchema,
|
5777
5844
|
responses: {
|
5778
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
5779
|
-
400:
|
5780
|
-
message:
|
5845
|
+
201: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5846
|
+
400: import_zod82.default.object({
|
5847
|
+
message: import_zod82.default.string()
|
5781
5848
|
}),
|
5782
|
-
409:
|
5783
|
-
message:
|
5849
|
+
409: import_zod82.default.object({
|
5850
|
+
message: import_zod82.default.string()
|
5784
5851
|
}),
|
5785
|
-
500:
|
5786
|
-
message:
|
5852
|
+
500: import_zod82.default.object({
|
5853
|
+
message: import_zod82.default.string()
|
5787
5854
|
}),
|
5788
5855
|
401: DefaultUnauthorizedSchema,
|
5789
5856
|
404: DefaultNotFoundSchema,
|
@@ -5794,19 +5861,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5794
5861
|
updateTitle: {
|
5795
5862
|
method: "PATCH",
|
5796
5863
|
path: "/title/update/:id",
|
5797
|
-
pathParams:
|
5798
|
-
body:
|
5864
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5865
|
+
body: import_zod82.default.object({ title: import_zod82.default.string() }),
|
5799
5866
|
headers: DefaultHeaderSchema,
|
5800
5867
|
responses: {
|
5801
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5802
|
-
400:
|
5803
|
-
message:
|
5868
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5869
|
+
400: import_zod82.default.object({
|
5870
|
+
message: import_zod82.default.string()
|
5804
5871
|
}),
|
5805
|
-
409:
|
5806
|
-
message:
|
5872
|
+
409: import_zod82.default.object({
|
5873
|
+
message: import_zod82.default.string()
|
5807
5874
|
}),
|
5808
|
-
500:
|
5809
|
-
message:
|
5875
|
+
500: import_zod82.default.object({
|
5876
|
+
message: import_zod82.default.string()
|
5810
5877
|
}),
|
5811
5878
|
401: DefaultUnauthorizedSchema,
|
5812
5879
|
404: DefaultNotFoundSchema,
|
@@ -5817,19 +5884,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5817
5884
|
updateType: {
|
5818
5885
|
method: "PATCH",
|
5819
5886
|
path: "/type/update/:id",
|
5820
|
-
pathParams:
|
5821
|
-
body:
|
5887
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5888
|
+
body: import_zod82.default.object({ type: import_zod82.default.string() }),
|
5822
5889
|
headers: DefaultHeaderSchema,
|
5823
5890
|
responses: {
|
5824
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5825
|
-
400:
|
5826
|
-
message:
|
5891
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5892
|
+
400: import_zod82.default.object({
|
5893
|
+
message: import_zod82.default.string()
|
5827
5894
|
}),
|
5828
|
-
409:
|
5829
|
-
message:
|
5895
|
+
409: import_zod82.default.object({
|
5896
|
+
message: import_zod82.default.string()
|
5830
5897
|
}),
|
5831
|
-
500:
|
5832
|
-
message:
|
5898
|
+
500: import_zod82.default.object({
|
5899
|
+
message: import_zod82.default.string()
|
5833
5900
|
}),
|
5834
5901
|
401: DefaultUnauthorizedSchema,
|
5835
5902
|
404: DefaultNotFoundSchema,
|
@@ -5840,19 +5907,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5840
5907
|
updateStatus: {
|
5841
5908
|
method: "PATCH",
|
5842
5909
|
path: "/status/update/:id",
|
5843
|
-
pathParams:
|
5844
|
-
body:
|
5910
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5911
|
+
body: import_zod82.default.object({ status: import_zod82.default.string() }),
|
5845
5912
|
headers: DefaultHeaderSchema,
|
5846
5913
|
responses: {
|
5847
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5848
|
-
400:
|
5849
|
-
message:
|
5914
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5915
|
+
400: import_zod82.default.object({
|
5916
|
+
message: import_zod82.default.string()
|
5850
5917
|
}),
|
5851
|
-
409:
|
5852
|
-
message:
|
5918
|
+
409: import_zod82.default.object({
|
5919
|
+
message: import_zod82.default.string()
|
5853
5920
|
}),
|
5854
|
-
500:
|
5855
|
-
message:
|
5921
|
+
500: import_zod82.default.object({
|
5922
|
+
message: import_zod82.default.string()
|
5856
5923
|
}),
|
5857
5924
|
401: DefaultUnauthorizedSchema,
|
5858
5925
|
404: DefaultNotFoundSchema,
|
@@ -5863,19 +5930,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5863
5930
|
updatePriority: {
|
5864
5931
|
method: "PATCH",
|
5865
5932
|
path: "/priority/update/:id",
|
5866
|
-
pathParams:
|
5867
|
-
body:
|
5933
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5934
|
+
body: import_zod82.default.object({ priority: import_zod82.default.string() }),
|
5868
5935
|
headers: DefaultHeaderSchema,
|
5869
5936
|
responses: {
|
5870
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5871
|
-
400:
|
5872
|
-
message:
|
5937
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5938
|
+
400: import_zod82.default.object({
|
5939
|
+
message: import_zod82.default.string()
|
5873
5940
|
}),
|
5874
|
-
409:
|
5875
|
-
message:
|
5941
|
+
409: import_zod82.default.object({
|
5942
|
+
message: import_zod82.default.string()
|
5876
5943
|
}),
|
5877
|
-
500:
|
5878
|
-
message:
|
5944
|
+
500: import_zod82.default.object({
|
5945
|
+
message: import_zod82.default.string()
|
5879
5946
|
}),
|
5880
5947
|
401: DefaultUnauthorizedSchema,
|
5881
5948
|
404: DefaultNotFoundSchema,
|
@@ -5886,19 +5953,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5886
5953
|
updateChannel: {
|
5887
5954
|
method: "PATCH",
|
5888
5955
|
path: "/channel/update/:id",
|
5889
|
-
pathParams:
|
5890
|
-
body:
|
5956
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5957
|
+
body: import_zod82.default.object({ channel: import_zod82.default.string() }),
|
5891
5958
|
headers: DefaultHeaderSchema,
|
5892
5959
|
responses: {
|
5893
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5894
|
-
400:
|
5895
|
-
message:
|
5960
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5961
|
+
400: import_zod82.default.object({
|
5962
|
+
message: import_zod82.default.string()
|
5896
5963
|
}),
|
5897
|
-
409:
|
5898
|
-
message:
|
5964
|
+
409: import_zod82.default.object({
|
5965
|
+
message: import_zod82.default.string()
|
5899
5966
|
}),
|
5900
|
-
500:
|
5901
|
-
message:
|
5967
|
+
500: import_zod82.default.object({
|
5968
|
+
message: import_zod82.default.string()
|
5902
5969
|
}),
|
5903
5970
|
401: DefaultUnauthorizedSchema,
|
5904
5971
|
404: DefaultNotFoundSchema,
|
@@ -5909,19 +5976,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5909
5976
|
updateTags: {
|
5910
5977
|
method: "PATCH",
|
5911
5978
|
path: "/tags/update/:id",
|
5912
|
-
pathParams:
|
5913
|
-
body:
|
5979
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5980
|
+
body: import_zod82.default.object({ tags: import_zod82.default.array(import_zod82.default.string()) }),
|
5914
5981
|
headers: DefaultHeaderSchema,
|
5915
5982
|
responses: {
|
5916
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5917
|
-
400:
|
5918
|
-
message:
|
5983
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5984
|
+
400: import_zod82.default.object({
|
5985
|
+
message: import_zod82.default.string()
|
5919
5986
|
}),
|
5920
|
-
409:
|
5921
|
-
message:
|
5987
|
+
409: import_zod82.default.object({
|
5988
|
+
message: import_zod82.default.string()
|
5922
5989
|
}),
|
5923
|
-
500:
|
5924
|
-
message:
|
5990
|
+
500: import_zod82.default.object({
|
5991
|
+
message: import_zod82.default.string()
|
5925
5992
|
}),
|
5926
5993
|
401: DefaultUnauthorizedSchema,
|
5927
5994
|
404: DefaultNotFoundSchema,
|
@@ -5932,25 +5999,25 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5932
5999
|
changeAssignee: {
|
5933
6000
|
method: "PATCH",
|
5934
6001
|
path: "/assignee/update/:id",
|
5935
|
-
pathParams:
|
5936
|
-
body:
|
5937
|
-
ticketId:
|
5938
|
-
assigneeId:
|
5939
|
-
reason:
|
6002
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
6003
|
+
body: import_zod82.default.object({
|
6004
|
+
ticketId: import_zod82.default.string(),
|
6005
|
+
assigneeId: import_zod82.default.string(),
|
6006
|
+
reason: import_zod82.default.string().optional()
|
5940
6007
|
}),
|
5941
6008
|
headers: DefaultHeaderSchema,
|
5942
6009
|
responses: {
|
5943
6010
|
200: DefaultSuccessResponseSchema.extend({
|
5944
6011
|
data: TicketSchema
|
5945
6012
|
}),
|
5946
|
-
400:
|
5947
|
-
message:
|
6013
|
+
400: import_zod82.default.object({
|
6014
|
+
message: import_zod82.default.string()
|
5948
6015
|
}),
|
5949
|
-
409:
|
5950
|
-
message:
|
6016
|
+
409: import_zod82.default.object({
|
6017
|
+
message: import_zod82.default.string()
|
5951
6018
|
}),
|
5952
|
-
500:
|
5953
|
-
message:
|
6019
|
+
500: import_zod82.default.object({
|
6020
|
+
message: import_zod82.default.string()
|
5954
6021
|
}),
|
5955
6022
|
401: DefaultUnauthorizedSchema,
|
5956
6023
|
404: DefaultNotFoundSchema,
|
@@ -5961,14 +6028,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5961
6028
|
getTicketCountByContact: {
|
5962
6029
|
method: "GET",
|
5963
6030
|
path: "/ticket_count/contact/:id",
|
5964
|
-
pathParams:
|
6031
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5965
6032
|
headers: DefaultHeaderSchema,
|
5966
6033
|
responses: {
|
5967
6034
|
200: DefaultSuccessResponseSchema.extend({
|
5968
6035
|
data: TicketCountByContactSchema
|
5969
6036
|
}),
|
5970
|
-
400:
|
5971
|
-
message:
|
6037
|
+
400: import_zod82.default.object({
|
6038
|
+
message: import_zod82.default.string()
|
5972
6039
|
}),
|
5973
6040
|
401: DefaultUnauthorizedSchema,
|
5974
6041
|
500: DefaultErrorResponseSchema
|
@@ -5984,14 +6051,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5984
6051
|
201: DefaultSuccessResponseSchema.extend({
|
5985
6052
|
data: TicketCustomFieldSchema
|
5986
6053
|
}),
|
5987
|
-
400:
|
5988
|
-
message:
|
6054
|
+
400: import_zod82.default.object({
|
6055
|
+
message: import_zod82.default.string()
|
5989
6056
|
}),
|
5990
|
-
409:
|
5991
|
-
message:
|
6057
|
+
409: import_zod82.default.object({
|
6058
|
+
message: import_zod82.default.string()
|
5992
6059
|
}),
|
5993
|
-
500:
|
5994
|
-
message:
|
6060
|
+
500: import_zod82.default.object({
|
6061
|
+
message: import_zod82.default.string()
|
5995
6062
|
}),
|
5996
6063
|
401: DefaultUnauthorizedSchema,
|
5997
6064
|
404: DefaultNotFoundSchema,
|
@@ -6016,24 +6083,24 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
6016
6083
|
|
6017
6084
|
// src/user/index.ts
|
6018
6085
|
var import_core31 = require("@ts-rest/core");
|
6019
|
-
var
|
6086
|
+
var import_zod84 = __toESM(require("zod"));
|
6020
6087
|
|
6021
6088
|
// src/user/validation.ts
|
6022
|
-
var
|
6023
|
-
var CreateUserSchema =
|
6024
|
-
name:
|
6025
|
-
email:
|
6026
|
-
address:
|
6027
|
-
phone:
|
6028
|
-
password:
|
6029
|
-
notificationCount:
|
6030
|
-
roles:
|
6089
|
+
var import_zod83 = require("zod");
|
6090
|
+
var CreateUserSchema = import_zod83.z.object({
|
6091
|
+
name: import_zod83.z.string(),
|
6092
|
+
email: import_zod83.z.string().email(),
|
6093
|
+
address: import_zod83.z.string().nullable(),
|
6094
|
+
phone: import_zod83.z.string().nullable(),
|
6095
|
+
password: import_zod83.z.string(),
|
6096
|
+
notificationCount: import_zod83.z.number().nullable().optional(),
|
6097
|
+
roles: import_zod83.z.array(import_zod83.z.string())
|
6031
6098
|
});
|
6032
6099
|
var UpdateUserSchema = CreateUserSchema.extend({
|
6033
|
-
newPassword:
|
6100
|
+
newPassword: import_zod83.z.string()
|
6034
6101
|
});
|
6035
|
-
var UpdateUserProfileSchema =
|
6036
|
-
password:
|
6102
|
+
var UpdateUserProfileSchema = import_zod83.z.object({
|
6103
|
+
password: import_zod83.z.string()
|
6037
6104
|
});
|
6038
6105
|
|
6039
6106
|
// src/user/index.ts
|
@@ -6048,8 +6115,8 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6048
6115
|
201: DefaultSuccessResponseSchema.extend({
|
6049
6116
|
user: UserSchema
|
6050
6117
|
}),
|
6051
|
-
400:
|
6052
|
-
message:
|
6118
|
+
400: import_zod84.default.object({
|
6119
|
+
message: import_zod84.default.string()
|
6053
6120
|
}),
|
6054
6121
|
401: DefaultUnauthorizedSchema,
|
6055
6122
|
404: DefaultNotFoundSchema,
|
@@ -6062,16 +6129,16 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6062
6129
|
method: "GET",
|
6063
6130
|
path: "",
|
6064
6131
|
headers: DefaultHeaderSchema,
|
6065
|
-
query:
|
6066
|
-
page:
|
6067
|
-
pageSize:
|
6132
|
+
query: import_zod84.default.object({
|
6133
|
+
page: import_zod84.default.coerce.number().optional(),
|
6134
|
+
pageSize: import_zod84.default.coerce.number().optional(),
|
6068
6135
|
// Don't add default 10. In some places, we need to fetch all users.
|
6069
|
-
keyword:
|
6136
|
+
keyword: import_zod84.default.string().optional()
|
6070
6137
|
}).optional(),
|
6071
6138
|
responses: {
|
6072
6139
|
200: WithPagination(UserSchema),
|
6073
|
-
400:
|
6074
|
-
message:
|
6140
|
+
400: import_zod84.default.object({
|
6141
|
+
message: import_zod84.default.string()
|
6075
6142
|
}),
|
6076
6143
|
401: DefaultUnauthorizedSchema,
|
6077
6144
|
500: DefaultErrorResponseSchema
|
@@ -6081,12 +6148,12 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6081
6148
|
getUserById: {
|
6082
6149
|
method: "GET",
|
6083
6150
|
path: "/:id",
|
6084
|
-
pathParams:
|
6151
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6085
6152
|
headers: DefaultHeaderSchema,
|
6086
6153
|
responses: {
|
6087
6154
|
200: UserSchema,
|
6088
|
-
400:
|
6089
|
-
message:
|
6155
|
+
400: import_zod84.default.object({
|
6156
|
+
message: import_zod84.default.string()
|
6090
6157
|
}),
|
6091
6158
|
401: DefaultUnauthorizedSchema
|
6092
6159
|
},
|
@@ -6095,15 +6162,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6095
6162
|
updateUser: {
|
6096
6163
|
method: "PATCH",
|
6097
6164
|
path: "/:id",
|
6098
|
-
pathParams:
|
6165
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6099
6166
|
headers: DefaultHeaderSchema,
|
6100
6167
|
body: UpdateUserSchema,
|
6101
6168
|
responses: {
|
6102
6169
|
201: DefaultSuccessResponseSchema.extend({
|
6103
6170
|
user: UserSchema
|
6104
6171
|
}),
|
6105
|
-
400:
|
6106
|
-
message:
|
6172
|
+
400: import_zod84.default.object({
|
6173
|
+
message: import_zod84.default.string()
|
6107
6174
|
}),
|
6108
6175
|
401: DefaultUnauthorizedSchema,
|
6109
6176
|
404: DefaultNotFoundSchema,
|
@@ -6115,15 +6182,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6115
6182
|
updateUserProfile: {
|
6116
6183
|
method: "PATCH",
|
6117
6184
|
path: "/profile/:id",
|
6118
|
-
pathParams:
|
6185
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6119
6186
|
headers: DefaultHeaderSchema,
|
6120
6187
|
body: UpdateUserProfileSchema,
|
6121
6188
|
responses: {
|
6122
6189
|
201: DefaultSuccessResponseSchema.extend({
|
6123
6190
|
user: UserSchema
|
6124
6191
|
}),
|
6125
|
-
400:
|
6126
|
-
message:
|
6192
|
+
400: import_zod84.default.object({
|
6193
|
+
message: import_zod84.default.string()
|
6127
6194
|
}),
|
6128
6195
|
401: DefaultUnauthorizedSchema,
|
6129
6196
|
404: DefaultNotFoundSchema,
|
@@ -6135,11 +6202,11 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6135
6202
|
deleteUser: {
|
6136
6203
|
method: "DELETE",
|
6137
6204
|
path: "/:id",
|
6138
|
-
pathParams:
|
6205
|
+
pathParams: import_zod84.default.object({ id: import_zod84.default.string() }),
|
6139
6206
|
headers: DefaultHeaderSchema,
|
6140
6207
|
body: null,
|
6141
6208
|
responses: {
|
6142
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6209
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod84.default.string() }),
|
6143
6210
|
404: DefaultNotFoundSchema,
|
6144
6211
|
422: DefaultUnprocessibleSchema,
|
6145
6212
|
500: DefaultErrorResponseSchema
|
@@ -6152,26 +6219,26 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6152
6219
|
|
6153
6220
|
// src/user-presence-status-log/index.ts
|
6154
6221
|
var import_core32 = require("@ts-rest/core");
|
6155
|
-
var
|
6222
|
+
var import_zod87 = __toESM(require("zod"));
|
6156
6223
|
|
6157
6224
|
// src/user-presence-status-log/schema.ts
|
6158
|
-
var
|
6225
|
+
var import_zod85 = __toESM(require("zod"));
|
6159
6226
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6160
6227
|
user: UserSchema,
|
6161
6228
|
previousPresenceStatus: PresenceStatusSchema,
|
6162
6229
|
newPresenceStatus: PresenceStatusSchema,
|
6163
|
-
reason:
|
6230
|
+
reason: import_zod85.default.string()
|
6164
6231
|
});
|
6165
6232
|
|
6166
6233
|
// src/user-presence-status-log/validation.ts
|
6167
|
-
var
|
6168
|
-
var UserPresenceStatusLogParamsSchema =
|
6169
|
-
page:
|
6170
|
-
pageSize:
|
6171
|
-
selectedDate:
|
6234
|
+
var import_zod86 = __toESM(require("zod"));
|
6235
|
+
var UserPresenceStatusLogParamsSchema = import_zod86.default.object({
|
6236
|
+
page: import_zod86.default.coerce.number().default(1),
|
6237
|
+
pageSize: import_zod86.default.coerce.number().default(10),
|
6238
|
+
selectedDate: import_zod86.default.string().optional()
|
6172
6239
|
}).optional();
|
6173
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6174
|
-
selectedDate:
|
6240
|
+
var UserPresenceStatusLogExportParamsSchema = import_zod86.default.object({
|
6241
|
+
selectedDate: import_zod86.default.string().optional()
|
6175
6242
|
});
|
6176
6243
|
|
6177
6244
|
// src/user-presence-status-log/index.ts
|
@@ -6184,8 +6251,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6184
6251
|
headers: DefaultHeaderSchema,
|
6185
6252
|
responses: {
|
6186
6253
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6187
|
-
400:
|
6188
|
-
message:
|
6254
|
+
400: import_zod87.default.object({
|
6255
|
+
message: import_zod87.default.string()
|
6189
6256
|
}),
|
6190
6257
|
401: DefaultUnauthorizedSchema,
|
6191
6258
|
500: DefaultErrorResponseSchema
|
@@ -6199,8 +6266,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6199
6266
|
headers: DefaultHeaderSchema,
|
6200
6267
|
responses: {
|
6201
6268
|
200: null,
|
6202
|
-
400:
|
6203
|
-
message:
|
6269
|
+
400: import_zod87.default.object({
|
6270
|
+
message: import_zod87.default.string()
|
6204
6271
|
}),
|
6205
6272
|
401: DefaultUnauthorizedSchema,
|
6206
6273
|
500: DefaultErrorResponseSchema
|
@@ -6212,44 +6279,44 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6212
6279
|
|
6213
6280
|
// src/widget/index.ts
|
6214
6281
|
var import_core33 = require("@ts-rest/core");
|
6215
|
-
var
|
6282
|
+
var import_zod90 = __toESM(require("zod"));
|
6216
6283
|
|
6217
6284
|
// src/widget/schema.ts
|
6218
|
-
var
|
6219
|
-
var FieldsSchema =
|
6220
|
-
var WidgetPositionSchema =
|
6221
|
-
|
6222
|
-
|
6223
|
-
|
6285
|
+
var import_zod88 = __toESM(require("zod"));
|
6286
|
+
var FieldsSchema = import_zod88.default.object({ data: import_zod88.default.array(import_zod88.default.string()) });
|
6287
|
+
var WidgetPositionSchema = import_zod88.default.union([
|
6288
|
+
import_zod88.default.literal("menu"),
|
6289
|
+
import_zod88.default.literal("ticket_detail"),
|
6290
|
+
import_zod88.default.literal("contact_detail")
|
6224
6291
|
]);
|
6225
6292
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6226
|
-
name:
|
6227
|
-
description:
|
6293
|
+
name: import_zod88.default.string(),
|
6294
|
+
description: import_zod88.default.string().nullable(),
|
6228
6295
|
position: WidgetPositionSchema.nullable(),
|
6229
6296
|
fields: FieldsSchema,
|
6230
|
-
url:
|
6297
|
+
url: import_zod88.default.string()
|
6231
6298
|
});
|
6232
6299
|
|
6233
6300
|
// src/widget/validation.ts
|
6234
|
-
var
|
6235
|
-
var CreateWidgetSchema =
|
6236
|
-
name:
|
6237
|
-
description:
|
6238
|
-
url:
|
6301
|
+
var import_zod89 = __toESM(require("zod"));
|
6302
|
+
var CreateWidgetSchema = import_zod89.default.object({
|
6303
|
+
name: import_zod89.default.string(),
|
6304
|
+
description: import_zod89.default.string(),
|
6305
|
+
url: import_zod89.default.string(),
|
6239
6306
|
position: WidgetPositionSchema,
|
6240
|
-
fields:
|
6307
|
+
fields: import_zod89.default.object({
|
6241
6308
|
data: (
|
6242
6309
|
// Array of attribute system names
|
6243
|
-
|
6310
|
+
import_zod89.default.array(import_zod89.default.string())
|
6244
6311
|
)
|
6245
6312
|
}).optional()
|
6246
6313
|
});
|
6247
6314
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6248
|
-
var GetWidgetUrlPathQuerySchema =
|
6249
|
-
widgetId:
|
6315
|
+
var GetWidgetUrlPathQuerySchema = import_zod89.default.object({
|
6316
|
+
widgetId: import_zod89.default.string(),
|
6250
6317
|
// Position ID is ticket ID, contact ID, etc.
|
6251
6318
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6252
|
-
positionId:
|
6319
|
+
positionId: import_zod89.default.string()
|
6253
6320
|
});
|
6254
6321
|
|
6255
6322
|
// src/widget/index.ts
|
@@ -6264,8 +6331,8 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6264
6331
|
201: DefaultSuccessResponseSchema.extend({
|
6265
6332
|
widget: WidgetSchema
|
6266
6333
|
}),
|
6267
|
-
400:
|
6268
|
-
message:
|
6334
|
+
400: import_zod90.default.object({
|
6335
|
+
message: import_zod90.default.string()
|
6269
6336
|
}),
|
6270
6337
|
401: DefaultUnauthorizedSchema,
|
6271
6338
|
500: DefaultErrorResponseSchema
|
@@ -6275,17 +6342,17 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6275
6342
|
getWidgets: {
|
6276
6343
|
method: "GET",
|
6277
6344
|
path: "",
|
6278
|
-
query:
|
6279
|
-
page:
|
6280
|
-
pageSize:
|
6281
|
-
keyword:
|
6345
|
+
query: import_zod90.default.object({
|
6346
|
+
page: import_zod90.default.coerce.number().default(1),
|
6347
|
+
pageSize: import_zod90.default.coerce.number().default(10),
|
6348
|
+
keyword: import_zod90.default.coerce.string().optional()
|
6282
6349
|
}).optional(),
|
6283
6350
|
headers: DefaultHeaderSchema,
|
6284
6351
|
responses: {
|
6285
6352
|
200: WithPagination(WidgetSchema),
|
6286
6353
|
500: DefaultErrorResponseSchema,
|
6287
|
-
400:
|
6288
|
-
message:
|
6354
|
+
400: import_zod90.default.object({
|
6355
|
+
message: import_zod90.default.string()
|
6289
6356
|
}),
|
6290
6357
|
401: DefaultUnauthorizedSchema
|
6291
6358
|
},
|
@@ -6296,9 +6363,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6296
6363
|
path: "/menu",
|
6297
6364
|
headers: DefaultHeaderSchema,
|
6298
6365
|
responses: {
|
6299
|
-
200:
|
6300
|
-
400:
|
6301
|
-
message:
|
6366
|
+
200: import_zod90.default.array(WidgetSchema),
|
6367
|
+
400: import_zod90.default.object({
|
6368
|
+
message: import_zod90.default.string()
|
6302
6369
|
}),
|
6303
6370
|
401: DefaultUnauthorizedSchema,
|
6304
6371
|
500: DefaultErrorResponseSchema
|
@@ -6310,9 +6377,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6310
6377
|
path: "/ticket_detail",
|
6311
6378
|
headers: DefaultHeaderSchema,
|
6312
6379
|
responses: {
|
6313
|
-
200:
|
6314
|
-
400:
|
6315
|
-
message:
|
6380
|
+
200: import_zod90.default.array(WidgetSchema),
|
6381
|
+
400: import_zod90.default.object({
|
6382
|
+
message: import_zod90.default.string()
|
6316
6383
|
}),
|
6317
6384
|
401: DefaultUnauthorizedSchema,
|
6318
6385
|
500: DefaultErrorResponseSchema
|
@@ -6324,9 +6391,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6324
6391
|
path: "/contact_detail",
|
6325
6392
|
headers: DefaultHeaderSchema,
|
6326
6393
|
responses: {
|
6327
|
-
200:
|
6328
|
-
400:
|
6329
|
-
message:
|
6394
|
+
200: import_zod90.default.array(WidgetSchema),
|
6395
|
+
400: import_zod90.default.object({
|
6396
|
+
message: import_zod90.default.string()
|
6330
6397
|
}),
|
6331
6398
|
401: DefaultUnauthorizedSchema,
|
6332
6399
|
500: DefaultErrorResponseSchema
|
@@ -6336,12 +6403,12 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6336
6403
|
getWidgetById: {
|
6337
6404
|
method: "GET",
|
6338
6405
|
path: "/:id",
|
6339
|
-
pathParams:
|
6406
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6340
6407
|
headers: DefaultHeaderSchema,
|
6341
6408
|
responses: {
|
6342
6409
|
200: WidgetSchema,
|
6343
|
-
400:
|
6344
|
-
message:
|
6410
|
+
400: import_zod90.default.object({
|
6411
|
+
message: import_zod90.default.string()
|
6345
6412
|
}),
|
6346
6413
|
401: DefaultUnauthorizedSchema,
|
6347
6414
|
500: DefaultErrorResponseSchema
|
@@ -6355,10 +6422,10 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6355
6422
|
headers: DefaultHeaderSchema,
|
6356
6423
|
responses: {
|
6357
6424
|
201: DefaultSuccessResponseSchema.extend({
|
6358
|
-
url:
|
6425
|
+
url: import_zod90.default.string()
|
6359
6426
|
}),
|
6360
|
-
400:
|
6361
|
-
message:
|
6427
|
+
400: import_zod90.default.object({
|
6428
|
+
message: import_zod90.default.string()
|
6362
6429
|
}),
|
6363
6430
|
401: DefaultUnauthorizedSchema
|
6364
6431
|
},
|
@@ -6367,14 +6434,14 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6367
6434
|
updateWidget: {
|
6368
6435
|
method: "PATCH",
|
6369
6436
|
path: "/:id",
|
6370
|
-
pathParams:
|
6437
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6371
6438
|
headers: DefaultHeaderSchema,
|
6372
6439
|
responses: {
|
6373
6440
|
201: DefaultSuccessResponseSchema.extend({
|
6374
6441
|
widget: WidgetSchema
|
6375
6442
|
}),
|
6376
|
-
400:
|
6377
|
-
message:
|
6443
|
+
400: import_zod90.default.object({
|
6444
|
+
message: import_zod90.default.string()
|
6378
6445
|
}),
|
6379
6446
|
401: DefaultUnauthorizedSchema
|
6380
6447
|
},
|
@@ -6384,11 +6451,11 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6384
6451
|
deleteWidget: {
|
6385
6452
|
method: "DELETE",
|
6386
6453
|
path: "/:id",
|
6387
|
-
pathParams:
|
6454
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6388
6455
|
headers: DefaultHeaderSchema,
|
6389
6456
|
body: null,
|
6390
6457
|
responses: {
|
6391
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6458
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod90.default.string() }),
|
6392
6459
|
500: DefaultErrorResponseSchema
|
6393
6460
|
},
|
6394
6461
|
summary: "Delete a widget."
|
@@ -6399,24 +6466,24 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6399
6466
|
|
6400
6467
|
// src/wrap-up-form/index.ts
|
6401
6468
|
var import_core34 = require("@ts-rest/core");
|
6402
|
-
var
|
6469
|
+
var import_zod92 = __toESM(require("zod"));
|
6403
6470
|
|
6404
6471
|
// src/wrap-up-form/validation.ts
|
6405
|
-
var
|
6406
|
-
var CreateWrapUpFormSchema =
|
6407
|
-
note:
|
6408
|
-
disposition:
|
6409
|
-
callFrom:
|
6410
|
-
callTo:
|
6472
|
+
var import_zod91 = require("zod");
|
6473
|
+
var CreateWrapUpFormSchema = import_zod91.z.object({
|
6474
|
+
note: import_zod91.z.string().nullable().optional(),
|
6475
|
+
disposition: import_zod91.z.string().nullable().optional(),
|
6476
|
+
callFrom: import_zod91.z.string().nullable().optional(),
|
6477
|
+
callTo: import_zod91.z.string().nullable().optional()
|
6411
6478
|
});
|
6412
6479
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6413
|
-
tags:
|
6480
|
+
tags: import_zod91.z.array(import_zod91.z.string()).optional()
|
6414
6481
|
});
|
6415
|
-
var CreateCXLogWrapUpFormSchema =
|
6416
|
-
cxLogId:
|
6417
|
-
disposition:
|
6418
|
-
tagIds:
|
6419
|
-
note:
|
6482
|
+
var CreateCXLogWrapUpFormSchema = import_zod91.z.object({
|
6483
|
+
cxLogId: import_zod91.z.string().uuid(),
|
6484
|
+
disposition: import_zod91.z.string().optional(),
|
6485
|
+
tagIds: import_zod91.z.array(import_zod91.z.string().uuid()).optional(),
|
6486
|
+
note: import_zod91.z.string().optional()
|
6420
6487
|
});
|
6421
6488
|
|
6422
6489
|
// src/wrap-up-form/index.ts
|
@@ -6431,8 +6498,8 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6431
6498
|
201: DefaultSuccessResponseSchema.extend({
|
6432
6499
|
wrapUpForm: WrapUpFormSchema
|
6433
6500
|
}),
|
6434
|
-
400:
|
6435
|
-
message:
|
6501
|
+
400: import_zod92.default.object({
|
6502
|
+
message: import_zod92.default.string()
|
6436
6503
|
}),
|
6437
6504
|
401: DefaultUnauthorizedSchema,
|
6438
6505
|
500: DefaultErrorResponseSchema
|
@@ -6454,15 +6521,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6454
6521
|
getWrapUpForms: {
|
6455
6522
|
method: "GET",
|
6456
6523
|
path: "",
|
6457
|
-
query:
|
6458
|
-
page:
|
6459
|
-
pageSize:
|
6524
|
+
query: import_zod92.default.object({
|
6525
|
+
page: import_zod92.default.coerce.number().default(1),
|
6526
|
+
pageSize: import_zod92.default.coerce.number().default(10)
|
6460
6527
|
}).optional(),
|
6461
6528
|
headers: DefaultHeaderSchema,
|
6462
6529
|
responses: {
|
6463
6530
|
200: WithPagination(WrapUpFormSchema),
|
6464
|
-
400:
|
6465
|
-
message:
|
6531
|
+
400: import_zod92.default.object({
|
6532
|
+
message: import_zod92.default.string()
|
6466
6533
|
}),
|
6467
6534
|
401: DefaultUnauthorizedSchema,
|
6468
6535
|
500: DefaultErrorResponseSchema
|
@@ -6472,15 +6539,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6472
6539
|
updateWrapUpForm: {
|
6473
6540
|
method: "PATCH",
|
6474
6541
|
path: "/:id",
|
6475
|
-
pathParams:
|
6542
|
+
pathParams: import_zod92.default.object({ id: import_zod92.default.string() }),
|
6476
6543
|
headers: DefaultHeaderSchema,
|
6477
6544
|
body: UpdateWrapUpFormSchema,
|
6478
6545
|
responses: {
|
6479
6546
|
201: DefaultSuccessResponseSchema.extend({
|
6480
6547
|
wrapUpForm: WrapUpFormSchema
|
6481
6548
|
}),
|
6482
|
-
400:
|
6483
|
-
message:
|
6549
|
+
400: import_zod92.default.object({
|
6550
|
+
message: import_zod92.default.string()
|
6484
6551
|
}),
|
6485
6552
|
401: DefaultUnauthorizedSchema,
|
6486
6553
|
500: DefaultErrorResponseSchema
|
@@ -6493,28 +6560,28 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6493
6560
|
|
6494
6561
|
// src/upload/index.ts
|
6495
6562
|
var import_core35 = require("@ts-rest/core");
|
6496
|
-
var
|
6563
|
+
var import_zod93 = __toESM(require("zod"));
|
6497
6564
|
var uploadContract = (0, import_core35.initContract)().router(
|
6498
6565
|
{
|
6499
6566
|
rename: {
|
6500
6567
|
method: "POST",
|
6501
6568
|
path: "/:id/rename",
|
6502
|
-
pathParams:
|
6503
|
-
id:
|
6569
|
+
pathParams: import_zod93.default.object({
|
6570
|
+
id: import_zod93.default.string()
|
6504
6571
|
}),
|
6505
6572
|
headers: DefaultHeaderSchema,
|
6506
6573
|
responses: {
|
6507
6574
|
201: DefaultSuccessResponseSchema.extend({
|
6508
|
-
message:
|
6575
|
+
message: import_zod93.default.string()
|
6509
6576
|
}),
|
6510
|
-
400:
|
6511
|
-
message:
|
6577
|
+
400: import_zod93.default.object({
|
6578
|
+
message: import_zod93.default.string()
|
6512
6579
|
}),
|
6513
|
-
409:
|
6514
|
-
message:
|
6580
|
+
409: import_zod93.default.object({
|
6581
|
+
message: import_zod93.default.string()
|
6515
6582
|
}),
|
6516
|
-
500:
|
6517
|
-
message:
|
6583
|
+
500: import_zod93.default.object({
|
6584
|
+
message: import_zod93.default.string()
|
6518
6585
|
}),
|
6519
6586
|
401: DefaultUnauthorizedSchema,
|
6520
6587
|
404: DefaultNotFoundSchema,
|
@@ -6526,23 +6593,23 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6526
6593
|
delete: {
|
6527
6594
|
method: "DELETE",
|
6528
6595
|
path: "/:id",
|
6529
|
-
pathParams:
|
6530
|
-
id:
|
6596
|
+
pathParams: import_zod93.default.object({
|
6597
|
+
id: import_zod93.default.string()
|
6531
6598
|
}),
|
6532
6599
|
headers: DefaultHeaderSchema,
|
6533
6600
|
body: null,
|
6534
6601
|
responses: {
|
6535
6602
|
201: DefaultSuccessResponseSchema.extend({
|
6536
|
-
message:
|
6603
|
+
message: import_zod93.default.string()
|
6537
6604
|
}),
|
6538
|
-
400:
|
6539
|
-
message:
|
6605
|
+
400: import_zod93.default.object({
|
6606
|
+
message: import_zod93.default.string()
|
6540
6607
|
}),
|
6541
|
-
409:
|
6542
|
-
message:
|
6608
|
+
409: import_zod93.default.object({
|
6609
|
+
message: import_zod93.default.string()
|
6543
6610
|
}),
|
6544
|
-
500:
|
6545
|
-
message:
|
6611
|
+
500: import_zod93.default.object({
|
6612
|
+
message: import_zod93.default.string()
|
6546
6613
|
}),
|
6547
6614
|
401: DefaultUnauthorizedSchema,
|
6548
6615
|
404: DefaultNotFoundSchema,
|
@@ -6557,19 +6624,19 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6557
6624
|
);
|
6558
6625
|
|
6559
6626
|
// src/viber/index.ts
|
6560
|
-
var
|
6627
|
+
var import_zod95 = __toESM(require("zod"));
|
6561
6628
|
|
6562
6629
|
// src/viber/validation.ts
|
6563
|
-
var
|
6564
|
-
var ViberChannelSchema =
|
6565
|
-
name:
|
6566
|
-
accessToken:
|
6567
|
-
actor:
|
6568
|
-
id:
|
6569
|
-
name:
|
6570
|
-
email:
|
6571
|
-
address:
|
6572
|
-
phone:
|
6630
|
+
var import_zod94 = __toESM(require("zod"));
|
6631
|
+
var ViberChannelSchema = import_zod94.default.object({
|
6632
|
+
name: import_zod94.default.string(),
|
6633
|
+
accessToken: import_zod94.default.string(),
|
6634
|
+
actor: import_zod94.default.object({
|
6635
|
+
id: import_zod94.default.string().uuid(),
|
6636
|
+
name: import_zod94.default.string(),
|
6637
|
+
email: import_zod94.default.string().email(),
|
6638
|
+
address: import_zod94.default.string().nullable(),
|
6639
|
+
phone: import_zod94.default.string().nullable()
|
6573
6640
|
}).optional()
|
6574
6641
|
});
|
6575
6642
|
|
@@ -6598,8 +6665,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6598
6665
|
}),
|
6599
6666
|
400: DefaultErrorResponseSchema
|
6600
6667
|
},
|
6601
|
-
body:
|
6602
|
-
id:
|
6668
|
+
body: import_zod95.default.object({
|
6669
|
+
id: import_zod95.default.string().uuid()
|
6603
6670
|
}),
|
6604
6671
|
summary: "Connect viber channel"
|
6605
6672
|
},
|
@@ -6615,8 +6682,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6615
6682
|
reconnect: {
|
6616
6683
|
method: "POST",
|
6617
6684
|
path: "/reconnect/:channelId",
|
6618
|
-
pathParams:
|
6619
|
-
channelId:
|
6685
|
+
pathParams: import_zod95.default.object({
|
6686
|
+
channelId: import_zod95.default.string().uuid()
|
6620
6687
|
}),
|
6621
6688
|
responses: {
|
6622
6689
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6631,8 +6698,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6631
6698
|
delete: {
|
6632
6699
|
method: "DELETE",
|
6633
6700
|
path: "/delete/:channelId",
|
6634
|
-
pathParams:
|
6635
|
-
channelId:
|
6701
|
+
pathParams: import_zod95.default.object({
|
6702
|
+
channelId: import_zod95.default.string().uuid()
|
6636
6703
|
}),
|
6637
6704
|
body: null,
|
6638
6705
|
responses: {
|
@@ -6645,58 +6712,58 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6645
6712
|
|
6646
6713
|
// src/notification/index.ts
|
6647
6714
|
var import_core37 = require("@ts-rest/core");
|
6648
|
-
var
|
6715
|
+
var import_zod98 = __toESM(require("zod"));
|
6649
6716
|
|
6650
6717
|
// src/notification/validation.ts
|
6651
|
-
var
|
6718
|
+
var import_zod97 = __toESM(require("zod"));
|
6652
6719
|
|
6653
6720
|
// src/notification/schema.ts
|
6654
|
-
var
|
6655
|
-
var NotificationChangeSchema =
|
6656
|
-
id:
|
6657
|
-
createdAt:
|
6658
|
-
updatedAt:
|
6659
|
-
deletedAt:
|
6660
|
-
actorId:
|
6721
|
+
var import_zod96 = __toESM(require("zod"));
|
6722
|
+
var NotificationChangeSchema = import_zod96.default.object({
|
6723
|
+
id: import_zod96.default.string().uuid(),
|
6724
|
+
createdAt: import_zod96.default.date(),
|
6725
|
+
updatedAt: import_zod96.default.date(),
|
6726
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6727
|
+
actorId: import_zod96.default.string().uuid(),
|
6661
6728
|
actor: UserSchema,
|
6662
|
-
notificationObjectId:
|
6663
|
-
readAt:
|
6664
|
-
});
|
6665
|
-
var NotificationObjectSchema =
|
6666
|
-
id:
|
6667
|
-
createdAt:
|
6668
|
-
updatedAt:
|
6669
|
-
deletedAt:
|
6670
|
-
data:
|
6729
|
+
notificationObjectId: import_zod96.default.string().uuid(),
|
6730
|
+
readAt: import_zod96.default.date()
|
6731
|
+
});
|
6732
|
+
var NotificationObjectSchema = import_zod96.default.object({
|
6733
|
+
id: import_zod96.default.string().uuid(),
|
6734
|
+
createdAt: import_zod96.default.date(),
|
6735
|
+
updatedAt: import_zod96.default.date(),
|
6736
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6737
|
+
data: import_zod96.default.string(),
|
6671
6738
|
notificationChange: NotificationChangeSchema
|
6672
6739
|
});
|
6673
|
-
var NotificationSchema =
|
6674
|
-
id:
|
6675
|
-
createdAt:
|
6676
|
-
updatedAt:
|
6677
|
-
deletedAt:
|
6678
|
-
notificationObjectId:
|
6679
|
-
notifierId:
|
6740
|
+
var NotificationSchema = import_zod96.default.object({
|
6741
|
+
id: import_zod96.default.string().uuid(),
|
6742
|
+
createdAt: import_zod96.default.date(),
|
6743
|
+
updatedAt: import_zod96.default.date(),
|
6744
|
+
deletedAt: import_zod96.default.date().nullable(),
|
6745
|
+
notificationObjectId: import_zod96.default.string().uuid(),
|
6746
|
+
notifierId: import_zod96.default.string().uuid(),
|
6680
6747
|
notificationObject: NotificationObjectSchema,
|
6681
|
-
readAt:
|
6748
|
+
readAt: import_zod96.default.date()
|
6682
6749
|
});
|
6683
6750
|
|
6684
6751
|
// src/notification/validation.ts
|
6685
|
-
var GetNotificationsRequestSchema =
|
6686
|
-
page:
|
6687
|
-
pageSize:
|
6752
|
+
var GetNotificationsRequestSchema = import_zod97.default.object({
|
6753
|
+
page: import_zod97.default.coerce.number().default(1),
|
6754
|
+
pageSize: import_zod97.default.coerce.number().default(10)
|
6688
6755
|
});
|
6689
|
-
var GetNotificationsResponseSchema =
|
6690
|
-
notificationCount:
|
6691
|
-
notifications:
|
6692
|
-
total:
|
6693
|
-
page:
|
6694
|
-
pageSize:
|
6695
|
-
lastPage:
|
6696
|
-
totalUnreadCount:
|
6756
|
+
var GetNotificationsResponseSchema = import_zod97.default.object({
|
6757
|
+
notificationCount: import_zod97.default.number(),
|
6758
|
+
notifications: import_zod97.default.array(NotificationSchema),
|
6759
|
+
total: import_zod97.default.number(),
|
6760
|
+
page: import_zod97.default.number(),
|
6761
|
+
pageSize: import_zod97.default.number(),
|
6762
|
+
lastPage: import_zod97.default.number(),
|
6763
|
+
totalUnreadCount: import_zod97.default.number().optional()
|
6697
6764
|
});
|
6698
|
-
var ResetNotificationRequestSchema =
|
6699
|
-
userId:
|
6765
|
+
var ResetNotificationRequestSchema = import_zod97.default.object({
|
6766
|
+
userId: import_zod97.default.string()
|
6700
6767
|
});
|
6701
6768
|
|
6702
6769
|
// src/notification/index.ts
|
@@ -6710,14 +6777,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6710
6777
|
200: DefaultSuccessResponseSchema.extend({
|
6711
6778
|
data: GetNotificationsResponseSchema
|
6712
6779
|
}),
|
6713
|
-
400:
|
6714
|
-
message:
|
6780
|
+
400: import_zod98.default.object({
|
6781
|
+
message: import_zod98.default.string()
|
6715
6782
|
}),
|
6716
|
-
409:
|
6717
|
-
message:
|
6783
|
+
409: import_zod98.default.object({
|
6784
|
+
message: import_zod98.default.string()
|
6718
6785
|
}),
|
6719
|
-
500:
|
6720
|
-
message:
|
6786
|
+
500: import_zod98.default.object({
|
6787
|
+
message: import_zod98.default.string()
|
6721
6788
|
}),
|
6722
6789
|
401: DefaultUnauthorizedSchema,
|
6723
6790
|
404: DefaultNotFoundSchema,
|
@@ -6730,16 +6797,16 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6730
6797
|
path: "/new_notifications_count",
|
6731
6798
|
responses: {
|
6732
6799
|
200: DefaultSuccessResponseSchema.extend({
|
6733
|
-
total:
|
6800
|
+
total: import_zod98.default.number()
|
6734
6801
|
}),
|
6735
|
-
400:
|
6736
|
-
message:
|
6802
|
+
400: import_zod98.default.object({
|
6803
|
+
message: import_zod98.default.string()
|
6737
6804
|
}),
|
6738
|
-
409:
|
6739
|
-
message:
|
6805
|
+
409: import_zod98.default.object({
|
6806
|
+
message: import_zod98.default.string()
|
6740
6807
|
}),
|
6741
|
-
500:
|
6742
|
-
message:
|
6808
|
+
500: import_zod98.default.object({
|
6809
|
+
message: import_zod98.default.string()
|
6743
6810
|
}),
|
6744
6811
|
401: DefaultUnauthorizedSchema,
|
6745
6812
|
404: DefaultNotFoundSchema,
|
@@ -6754,14 +6821,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6754
6821
|
201: DefaultSuccessResponseSchema.extend({
|
6755
6822
|
data: UserSchema
|
6756
6823
|
}),
|
6757
|
-
400:
|
6758
|
-
message:
|
6824
|
+
400: import_zod98.default.object({
|
6825
|
+
message: import_zod98.default.string()
|
6759
6826
|
}),
|
6760
|
-
409:
|
6761
|
-
message:
|
6827
|
+
409: import_zod98.default.object({
|
6828
|
+
message: import_zod98.default.string()
|
6762
6829
|
}),
|
6763
|
-
500:
|
6764
|
-
message:
|
6830
|
+
500: import_zod98.default.object({
|
6831
|
+
message: import_zod98.default.string()
|
6765
6832
|
}),
|
6766
6833
|
401: DefaultUnauthorizedSchema,
|
6767
6834
|
404: DefaultNotFoundSchema,
|
@@ -6773,19 +6840,19 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6773
6840
|
readNotification: {
|
6774
6841
|
method: "POST",
|
6775
6842
|
path: "/read/:id",
|
6776
|
-
pathParams:
|
6843
|
+
pathParams: import_zod98.default.object({ id: import_zod98.default.string() }),
|
6777
6844
|
responses: {
|
6778
6845
|
201: DefaultSuccessResponseSchema.extend({
|
6779
6846
|
data: NotificationSchema
|
6780
6847
|
}),
|
6781
|
-
400:
|
6782
|
-
message:
|
6848
|
+
400: import_zod98.default.object({
|
6849
|
+
message: import_zod98.default.string()
|
6783
6850
|
}),
|
6784
|
-
409:
|
6785
|
-
message:
|
6851
|
+
409: import_zod98.default.object({
|
6852
|
+
message: import_zod98.default.string()
|
6786
6853
|
}),
|
6787
|
-
500:
|
6788
|
-
message:
|
6854
|
+
500: import_zod98.default.object({
|
6855
|
+
message: import_zod98.default.string()
|
6789
6856
|
}),
|
6790
6857
|
401: DefaultUnauthorizedSchema,
|
6791
6858
|
404: DefaultNotFoundSchema,
|
@@ -6868,6 +6935,7 @@ var notificationContract = (0, import_core38.initContract)().router({
|
|
6868
6935
|
dashboardContract,
|
6869
6936
|
evaluateFormContract,
|
6870
6937
|
extensionContract,
|
6938
|
+
mailContract,
|
6871
6939
|
mainChatContract,
|
6872
6940
|
notificationContract,
|
6873
6941
|
permissionContract,
|