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