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