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