@kl1/contracts 1.2.63-uat → 1.2.65-uat
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api-contracts/src/channel/index.d.ts +1004 -5
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/schema.d.ts +8 -0
- package/dist/api-contracts/src/channel/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/validation.d.ts +10 -0
- package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +515 -169
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts +124 -45
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +151 -56
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +4046 -1361
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/index.d.ts +11 -0
- package/dist/api-contracts/src/cx-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/schema.d.ts +9 -0
- package/dist/api-contracts/src/cx-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/index.d.ts +290 -1
- package/dist/api-contracts/src/dashboard/index.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/schema.d.ts +71 -0
- package/dist/api-contracts/src/dashboard/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/index.d.ts +165 -43
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/schema.d.ts +10 -3
- package/dist/api-contracts/src/facebook-feed/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/validation.d.ts +5 -0
- package/dist/api-contracts/src/facebook-feed/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +132 -33
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/index.d.ts +131 -40
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/validation.d.ts +14 -5
- package/dist/api-contracts/src/line/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/index.d.ts +132 -33
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/validation.d.ts +5 -0
- package/dist/api-contracts/src/messenger/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/index.d.ts +74 -50
- package/dist/api-contracts/src/presence-status/index.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/schema.d.ts +11 -8
- package/dist/api-contracts/src/presence-status/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/validation.d.ts +18 -12
- package/dist/api-contracts/src/presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/sms/index.d.ts +42 -5
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telegram/index.d.ts +110 -33
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +36 -439
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts +15 -13
- package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts +0 -3
- package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/user-presence-status-log/index.d.ts +24 -16
- package/dist/api-contracts/src/user-presence-status-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/user-presence-status-log/schema.d.ts +30 -20
- package/dist/api-contracts/src/user-presence-status-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/viber/index.d.ts +110 -33
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +110 -33
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +167 -39
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/validation.d.ts +3 -3
- package/dist/api-contracts/src/workflow-rule/index.d.ts +58 -12
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/entities/src/enums/chat.d.ts +12 -0
- package/dist/entities/src/enums/chat.d.ts.map +1 -1
- package/dist/index.js +1615 -1507
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1615 -1507
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -195,7 +195,8 @@ var ChannelMetadataSchema = z6.object({
|
|
195
195
|
}).optional(),
|
196
196
|
lineRichMenuId: z6.string().optional().nullable(),
|
197
197
|
messengerIntegrationType: z6.union([z6.literal("own"), z6.literal("business")]).optional(),
|
198
|
-
facebookFeedIntegrationType: z6.union([z6.literal("own"), z6.literal("business")]).optional()
|
198
|
+
facebookFeedIntegrationType: z6.union([z6.literal("own"), z6.literal("business")]).optional(),
|
199
|
+
isCSATEnabled: z6.boolean().optional()
|
199
200
|
});
|
200
201
|
var ChannelSchema = z6.object({
|
201
202
|
id: z6.string().uuid(),
|
@@ -627,6 +628,7 @@ var MessageTypeSchema = z18.enum([
|
|
627
628
|
"choice",
|
628
629
|
"dropdown",
|
629
630
|
// system
|
631
|
+
"csat",
|
630
632
|
"assign",
|
631
633
|
"solve",
|
632
634
|
"resolved",
|
@@ -684,6 +686,7 @@ var RoomSchema = DefaultEntitySchema.extend({
|
|
684
686
|
isBotRoom: z18.boolean(),
|
685
687
|
direction: MessageDirectionTypeSchema,
|
686
688
|
platformContact: PlatformContactSchema,
|
689
|
+
csatStatus: z18.string().nullable(),
|
687
690
|
actor: z18.object({
|
688
691
|
id: z18.string().uuid(),
|
689
692
|
createdAt: z18.date(),
|
@@ -2266,7 +2269,7 @@ var WaapiQrResponseSchema = DefaultSuccessResponseSchema.extend({
|
|
2266
2269
|
data: WaapiQrSchema
|
2267
2270
|
});
|
2268
2271
|
var GetWaapiQrQuerySchema = z40.object({
|
2269
|
-
|
2272
|
+
instanceId: z40.string()
|
2270
2273
|
});
|
2271
2274
|
var SendSeenToWaapiSchema = z40.object({
|
2272
2275
|
channelId: z40.string().uuid(),
|
@@ -2464,7 +2467,7 @@ var whatsapp = initContract7().router(
|
|
2464
2467
|
},
|
2465
2468
|
createWaapi: {
|
2466
2469
|
method: "POST",
|
2467
|
-
path: "/
|
2470
|
+
path: "/mobile",
|
2468
2471
|
body: null,
|
2469
2472
|
responses: {
|
2470
2473
|
200: WaapiResponseSchema,
|
@@ -2474,13 +2477,26 @@ var whatsapp = initContract7().router(
|
|
2474
2477
|
},
|
2475
2478
|
getWaapiQr: {
|
2476
2479
|
method: "GET",
|
2477
|
-
path: "/
|
2480
|
+
path: "/mobile/qr",
|
2478
2481
|
query: GetWaapiQrQuerySchema,
|
2479
2482
|
responses: {
|
2480
2483
|
200: WaapiQrResponseSchema,
|
2481
2484
|
500: DefaultErrorResponseSchema,
|
2482
2485
|
400: DefaultErrorResponseSchema
|
2483
2486
|
}
|
2487
|
+
},
|
2488
|
+
deleteWaapi: {
|
2489
|
+
method: "DELETE",
|
2490
|
+
path: "/mobile/:instanceId",
|
2491
|
+
pathParams: z41.object({
|
2492
|
+
instanceId: z41.string()
|
2493
|
+
}),
|
2494
|
+
body: z41.any().optional(),
|
2495
|
+
responses: {
|
2496
|
+
200: DefaultSuccessResponseSchema,
|
2497
|
+
500: DefaultErrorResponseSchema,
|
2498
|
+
400: DefaultErrorResponseSchema
|
2499
|
+
}
|
2484
2500
|
}
|
2485
2501
|
},
|
2486
2502
|
{
|
@@ -2619,6 +2635,23 @@ var channelContract = initContract7().router(
|
|
2619
2635
|
}),
|
2620
2636
|
summary: "Update new tenant"
|
2621
2637
|
},
|
2638
|
+
updateChannelCsatPreference: {
|
2639
|
+
method: "POST",
|
2640
|
+
path: "/csat/:channelId",
|
2641
|
+
pathParams: z41.object({
|
2642
|
+
channelId: z41.string().uuid()
|
2643
|
+
}),
|
2644
|
+
responses: {
|
2645
|
+
200: DefaultSuccessResponseSchema.extend({
|
2646
|
+
channel: ChannelSchema
|
2647
|
+
}),
|
2648
|
+
408: DefaultErrorResponseSchema
|
2649
|
+
},
|
2650
|
+
body: z41.object({
|
2651
|
+
isCSATEnabled: z41.boolean()
|
2652
|
+
}),
|
2653
|
+
summary: "Enable or Disable CSAT for channel"
|
2654
|
+
},
|
2622
2655
|
messenger,
|
2623
2656
|
line,
|
2624
2657
|
instagram,
|
@@ -4300,23 +4333,27 @@ var MessageStatusSchema = z54.object({
|
|
4300
4333
|
total: z54.number().nullable(),
|
4301
4334
|
closed: z54.number().nullable(),
|
4302
4335
|
unassignedOpen: z54.number().nullable(),
|
4303
|
-
assignedOpen: z54.number().nullable()
|
4336
|
+
assignedOpen: z54.number().nullable(),
|
4337
|
+
hold: z54.number()
|
4304
4338
|
});
|
4305
4339
|
var MessageAverageSchema = z54.object({
|
4306
4340
|
selectedWeekAvgByDay: z54.array(
|
4307
4341
|
z54.object({
|
4308
4342
|
day: z54.string().nullable(),
|
4309
4343
|
avgResolutionTime: z54.string().nullable(),
|
4310
|
-
avgResponseTime: z54.string().nullable()
|
4344
|
+
avgResponseTime: z54.string().nullable(),
|
4345
|
+
resolutionRate: z54.string()
|
4311
4346
|
})
|
4312
4347
|
).optional().nullable(),
|
4313
4348
|
previousWeekAvg: z54.object({
|
4314
4349
|
avgResolutionTime: z54.string().nullable(),
|
4315
|
-
avgResponseTime: z54.string().nullable()
|
4350
|
+
avgResponseTime: z54.string().nullable(),
|
4351
|
+
resolutionRate: z54.string()
|
4316
4352
|
}).nullable().optional(),
|
4317
4353
|
selectedWeekAvg: z54.object({
|
4318
4354
|
avgResolutionTime: z54.string().nullable(),
|
4319
|
-
avgResponseTime: z54.string().nullable()
|
4355
|
+
avgResponseTime: z54.string().nullable(),
|
4356
|
+
resolutionRate: z54.string()
|
4320
4357
|
}).nullable().optional()
|
4321
4358
|
});
|
4322
4359
|
var ChannelIncomingMessageSchema = z54.object({
|
@@ -4345,6 +4382,25 @@ var CallCountsSchema = z54.object({
|
|
4345
4382
|
failedCallCount: z54.number().gte(0),
|
4346
4383
|
totalCallCount: z54.number().gte(0)
|
4347
4384
|
});
|
4385
|
+
var MessageQueueDataSchema = z54.object({
|
4386
|
+
id: z54.string().uuid().nullable(),
|
4387
|
+
name: z54.string(),
|
4388
|
+
sla: z54.number(),
|
4389
|
+
newContactCount: z54.number(),
|
4390
|
+
existingContactCount: z54.number(),
|
4391
|
+
totalRoomCount: z54.number(),
|
4392
|
+
closedRoomCount: z54.number(),
|
4393
|
+
unassignedRoomCount: z54.number(),
|
4394
|
+
assignedRoomCount: z54.number(),
|
4395
|
+
holdRoomCount: z54.number()
|
4396
|
+
});
|
4397
|
+
var AgentMessageStatisticsSchema = z54.object({
|
4398
|
+
id: z54.string().uuid(),
|
4399
|
+
name: z54.string(),
|
4400
|
+
openedRoomCount: z54.number(),
|
4401
|
+
holdRoomCount: z54.number(),
|
4402
|
+
closedRoomCount: z54.number()
|
4403
|
+
});
|
4348
4404
|
|
4349
4405
|
// src/dashboard/index.ts
|
4350
4406
|
var dashboardContract = initContract13().router(
|
@@ -4603,6 +4659,62 @@ var dashboardContract = initContract13().router(
|
|
4603
4659
|
callCounts: CallCountsSchema
|
4604
4660
|
})
|
4605
4661
|
}
|
4662
|
+
},
|
4663
|
+
getAllQueueSLA: {
|
4664
|
+
method: "GET",
|
4665
|
+
path: "/all-queue-sla",
|
4666
|
+
query: z55.object({ selectedDate: z55.string().min(1) }),
|
4667
|
+
responses: {
|
4668
|
+
200: DefaultSuccessResponseSchema.extend({
|
4669
|
+
allQueueSLA: z55.number()
|
4670
|
+
})
|
4671
|
+
}
|
4672
|
+
},
|
4673
|
+
getAllMessageQueueData: {
|
4674
|
+
method: "GET",
|
4675
|
+
path: "/all-message-queue-data",
|
4676
|
+
query: z55.object({
|
4677
|
+
selectedDate: z55.string().min(1),
|
4678
|
+
page: z55.coerce.number().positive(),
|
4679
|
+
pageSize: z55.coerce.number().positive()
|
4680
|
+
}),
|
4681
|
+
responses: {
|
4682
|
+
200: DefaultSuccessResponseSchema.extend({
|
4683
|
+
allMessageQueueData: z55.array(MessageQueueDataSchema)
|
4684
|
+
})
|
4685
|
+
}
|
4686
|
+
},
|
4687
|
+
getMessageQueueData: {
|
4688
|
+
method: "GET",
|
4689
|
+
path: "/message-queue-data",
|
4690
|
+
query: z55.object({
|
4691
|
+
automationQueueId: z55.string().uuid().optional(),
|
4692
|
+
selectedDate: z55.string().min(1),
|
4693
|
+
channelIds: z55.array(z55.string().uuid()).optional()
|
4694
|
+
}),
|
4695
|
+
responses: {
|
4696
|
+
200: DefaultSuccessResponseSchema.extend({
|
4697
|
+
messageQueueData: MessageQueueDataSchema
|
4698
|
+
})
|
4699
|
+
}
|
4700
|
+
},
|
4701
|
+
getAgentMessageStatistics: {
|
4702
|
+
method: "GET",
|
4703
|
+
path: "/agent-message-statistics",
|
4704
|
+
query: z55.object({
|
4705
|
+
automationQueueId: z55.string().uuid().optional(),
|
4706
|
+
selectedDate: z55.string().min(1),
|
4707
|
+
channelIds: z55.array(z55.string().uuid()).optional(),
|
4708
|
+
page: z55.coerce.number().positive(),
|
4709
|
+
pageSize: z55.coerce.number().positive()
|
4710
|
+
}),
|
4711
|
+
responses: {
|
4712
|
+
200: DefaultSuccessResponseSchema.extend({
|
4713
|
+
page: z55.coerce.number().positive(),
|
4714
|
+
pageSize: z55.coerce.number().positive(),
|
4715
|
+
agentMessageStatistics: z55.array(AgentMessageStatisticsSchema)
|
4716
|
+
})
|
4717
|
+
}
|
4606
4718
|
}
|
4607
4719
|
},
|
4608
4720
|
{
|
@@ -5019,7 +5131,7 @@ var lineContract = initContract17().router({
|
|
5019
5131
|
path: "/message",
|
5020
5132
|
body: SendMessageToPlatformSchema,
|
5021
5133
|
responses: {
|
5022
|
-
200: SendMessageResponseSchema,
|
5134
|
+
200: z63.union([SendMessageResponseSchema, z63.literal("TALK TO AGENT")]),
|
5023
5135
|
500: DefaultErrorResponseSchema
|
5024
5136
|
}
|
5025
5137
|
},
|
@@ -5404,70 +5516,52 @@ var tagContract = initContract22().router(
|
|
5404
5516
|
|
5405
5517
|
// src/telephony-agent-presence-status/index.ts
|
5406
5518
|
import { initContract as initContract23 } from "@ts-rest/core";
|
5407
|
-
import
|
5408
|
-
|
5409
|
-
// src/telephony-agent-presence-status/schema.ts
|
5410
|
-
import z72 from "zod";
|
5519
|
+
import z73 from "zod";
|
5411
5520
|
|
5412
5521
|
// src/presence-status/schema.ts
|
5413
5522
|
import z71 from "zod";
|
5414
|
-
var
|
5415
|
-
"
|
5416
|
-
"
|
5417
|
-
|
5523
|
+
var PresenceStatusEnum = z71.enum([
|
5524
|
+
"receive_call_noti",
|
5525
|
+
"do_not_receive_call_noti",
|
5526
|
+
"default"
|
5418
5527
|
]);
|
5419
5528
|
var PresenceStatusSchema = z71.object({
|
5420
5529
|
id: z71.string().uuid(),
|
5421
5530
|
createdAt: z71.date(),
|
5422
5531
|
updatedAt: z71.date(),
|
5423
5532
|
deletedAt: z71.date().nullable(),
|
5424
|
-
|
5425
|
-
|
5426
|
-
position: z71.number()
|
5533
|
+
systemName: PresenceStatusEnum,
|
5534
|
+
displayName: z71.string(),
|
5535
|
+
position: z71.number(),
|
5536
|
+
emoji: z71.string()
|
5427
5537
|
});
|
5428
5538
|
|
5429
5539
|
// src/telephony-agent-presence-status/schema.ts
|
5430
5540
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
5431
5541
|
user: UserSchema,
|
5432
|
-
presenceStatus: PresenceStatusSchema
|
5433
|
-
customPresenceStatus: z72.string().nullable().optional()
|
5542
|
+
presenceStatus: PresenceStatusSchema
|
5434
5543
|
});
|
5435
5544
|
|
5436
5545
|
// src/telephony-agent-presence-status/validation.ts
|
5437
|
-
import { z as
|
5438
|
-
var UpdateUserStatusSchema =
|
5439
|
-
userId:
|
5440
|
-
presenceStatusId:
|
5441
|
-
|
5442
|
-
reason: z73.string()
|
5546
|
+
import { z as z72 } from "zod";
|
5547
|
+
var UpdateUserStatusSchema = z72.object({
|
5548
|
+
userId: z72.string(),
|
5549
|
+
presenceStatusId: z72.string().nullable().optional(),
|
5550
|
+
reason: z72.string()
|
5443
5551
|
});
|
5444
5552
|
|
5445
5553
|
// src/telephony-agent-presence-status/index.ts
|
5446
5554
|
var telephonyAgentPresenceStatusContract = initContract23().router(
|
5447
5555
|
{
|
5448
|
-
getAllAgentStatus: {
|
5449
|
-
method: "GET",
|
5450
|
-
path: "/agents/presence_status",
|
5451
|
-
headers: DefaultHeaderSchema,
|
5452
|
-
responses: {
|
5453
|
-
200: z74.array(UserPresenceStatusSchema),
|
5454
|
-
400: z74.object({
|
5455
|
-
message: z74.string()
|
5456
|
-
}),
|
5457
|
-
401: DefaultUnauthorizedSchema,
|
5458
|
-
500: DefaultErrorResponseSchema
|
5459
|
-
},
|
5460
|
-
summary: "Get all user presence status list."
|
5461
|
-
},
|
5462
5556
|
getAgentStatus: {
|
5463
5557
|
method: "GET",
|
5464
5558
|
path: "/presence_status/check_update/:userId",
|
5465
|
-
pathParams:
|
5559
|
+
pathParams: z73.object({ userId: z73.string() }),
|
5466
5560
|
headers: DefaultHeaderSchema,
|
5467
5561
|
responses: {
|
5468
5562
|
200: UserPresenceStatusSchema,
|
5469
|
-
400:
|
5470
|
-
message:
|
5563
|
+
400: z73.object({
|
5564
|
+
message: z73.string()
|
5471
5565
|
}),
|
5472
5566
|
401: DefaultUnauthorizedSchema,
|
5473
5567
|
500: DefaultErrorResponseSchema
|
@@ -5483,8 +5577,8 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5483
5577
|
200: DefaultSuccessResponseSchema.extend({
|
5484
5578
|
userPresenceStatu: UserPresenceStatusSchema
|
5485
5579
|
}),
|
5486
|
-
400:
|
5487
|
-
message:
|
5580
|
+
400: z73.object({
|
5581
|
+
message: z73.string()
|
5488
5582
|
}),
|
5489
5583
|
401: DefaultUnauthorizedSchema,
|
5490
5584
|
500: DefaultErrorResponseSchema
|
@@ -5496,65 +5590,65 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5496
5590
|
);
|
5497
5591
|
|
5498
5592
|
// src/telephony-cdr/index.ts
|
5499
|
-
import
|
5593
|
+
import z75 from "zod";
|
5500
5594
|
|
5501
5595
|
// src/telephony-cdr/validation.ts
|
5502
|
-
import
|
5503
|
-
var CreateTelephonyCdrSchema =
|
5504
|
-
uniqueCallId:
|
5505
|
-
timeStart:
|
5506
|
-
callFrom:
|
5507
|
-
callTo:
|
5508
|
-
callDuration:
|
5509
|
-
talkDuration:
|
5510
|
-
srcTrunkName:
|
5511
|
-
dstTrunkName:
|
5512
|
-
pinCode:
|
5513
|
-
status:
|
5514
|
-
type:
|
5515
|
-
recording:
|
5516
|
-
didNumber:
|
5517
|
-
agentRingTime:
|
5596
|
+
import z74 from "zod";
|
5597
|
+
var CreateTelephonyCdrSchema = z74.object({
|
5598
|
+
uniqueCallId: z74.string({ required_error: "uniqueCallId is required" }),
|
5599
|
+
timeStart: z74.string({ required_error: "timeStart is required" }),
|
5600
|
+
callFrom: z74.string({ required_error: "callFrom is required" }),
|
5601
|
+
callTo: z74.string({ required_error: "callTo is required" }),
|
5602
|
+
callDuration: z74.number().nullable(),
|
5603
|
+
talkDuration: z74.number().nullable(),
|
5604
|
+
srcTrunkName: z74.string().nullable(),
|
5605
|
+
dstTrunkName: z74.string().nullable(),
|
5606
|
+
pinCode: z74.string().nullable(),
|
5607
|
+
status: z74.string(),
|
5608
|
+
type: z74.string(),
|
5609
|
+
recording: z74.string().nullable(),
|
5610
|
+
didNumber: z74.string().nullable(),
|
5611
|
+
agentRingTime: z74.number().nullable()
|
5518
5612
|
});
|
5519
5613
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5520
|
-
selectedDate:
|
5521
|
-
type:
|
5522
|
-
status:
|
5523
|
-
callFrom:
|
5524
|
-
callTo:
|
5525
|
-
trunk:
|
5526
|
-
userId:
|
5527
|
-
queueStatus:
|
5528
|
-
agentIds:
|
5529
|
-
agentCallsOnly:
|
5530
|
-
contactId:
|
5614
|
+
selectedDate: z74.string().optional(),
|
5615
|
+
type: z74.array(z74.string()).optional(),
|
5616
|
+
status: z74.array(z74.string()).optional(),
|
5617
|
+
callFrom: z74.string().optional(),
|
5618
|
+
callTo: z74.string().optional(),
|
5619
|
+
trunk: z74.array(z74.string()).optional(),
|
5620
|
+
userId: z74.string().uuid().optional(),
|
5621
|
+
queueStatus: z74.string().optional(),
|
5622
|
+
agentIds: z74.array(z74.string().uuid()).optional(),
|
5623
|
+
agentCallsOnly: z74.coerce.boolean().optional(),
|
5624
|
+
contactId: z74.string().uuid().optional()
|
5531
5625
|
});
|
5532
5626
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5533
|
-
type:
|
5534
|
-
status:
|
5535
|
-
callFrom:
|
5536
|
-
callTo:
|
5537
|
-
result:
|
5538
|
-
callTags:
|
5539
|
-
selectedDate:
|
5540
|
-
agentId:
|
5541
|
-
contact:
|
5542
|
-
callStatus:
|
5543
|
-
queueIds:
|
5544
|
-
notes:
|
5627
|
+
type: z74.array(z74.string()).optional(),
|
5628
|
+
status: z74.array(z74.string()).optional(),
|
5629
|
+
callFrom: z74.string().optional(),
|
5630
|
+
callTo: z74.string().optional(),
|
5631
|
+
result: z74.array(z74.string()).optional(),
|
5632
|
+
callTags: z74.array(z74.string()).optional(),
|
5633
|
+
selectedDate: z74.string().optional(),
|
5634
|
+
agentId: z74.string().optional(),
|
5635
|
+
contact: z74.array(z74.string()).optional(),
|
5636
|
+
callStatus: z74.array(z74.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5637
|
+
queueIds: z74.array(z74.string()).optional(),
|
5638
|
+
notes: z74.string().optional()
|
5545
5639
|
});
|
5546
5640
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5547
|
-
|
5548
|
-
page:
|
5549
|
-
pageSize:
|
5641
|
+
z74.object({
|
5642
|
+
page: z74.coerce.number().positive().optional(),
|
5643
|
+
pageSize: z74.coerce.number().positive().optional(),
|
5550
5644
|
// We use this export route for both CDR and Call Log.
|
5551
|
-
module:
|
5645
|
+
module: z74.union([z74.literal("cdrs"), z74.literal("call-logs")]).optional().default("cdrs")
|
5552
5646
|
})
|
5553
5647
|
);
|
5554
5648
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5555
5649
|
var EmtptyArrayUndefined = [[], void 0];
|
5556
5650
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5557
|
-
reportType:
|
5651
|
+
reportType: z74.enum([
|
5558
5652
|
"extcallstatistics",
|
5559
5653
|
"extcallactivity",
|
5560
5654
|
"trunkactivity",
|
@@ -5564,52 +5658,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5564
5658
|
"queueagentmisscalls",
|
5565
5659
|
"queueagentinoutcalls"
|
5566
5660
|
]),
|
5567
|
-
selectedDate:
|
5568
|
-
communicationType:
|
5569
|
-
time:
|
5570
|
-
queueList:
|
5571
|
-
queueId:
|
5572
|
-
trunkList:
|
5573
|
-
extensionList:
|
5661
|
+
selectedDate: z74.string().optional(),
|
5662
|
+
communicationType: z74.union([z74.literal("Inbound"), z74.literal("Outbound"), z74.literal("Internal")]).optional(),
|
5663
|
+
time: z74.string().optional(),
|
5664
|
+
queueList: z74.array(z74.string()).optional(),
|
5665
|
+
queueId: z74.string().optional(),
|
5666
|
+
trunkList: z74.array(z74.string()).optional(),
|
5667
|
+
extensionList: z74.array(z74.string()).optional()
|
5574
5668
|
}).superRefine((input, ctx) => {
|
5575
5669
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
5576
5670
|
ctx.addIssue({
|
5577
|
-
code:
|
5671
|
+
code: z74.ZodIssueCode.custom,
|
5578
5672
|
path: ["selectedDate"],
|
5579
5673
|
message: "selectedDate is required."
|
5580
5674
|
});
|
5581
5675
|
}
|
5582
5676
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
5583
5677
|
ctx.addIssue({
|
5584
|
-
code:
|
5678
|
+
code: z74.ZodIssueCode.custom,
|
5585
5679
|
path: ["time"],
|
5586
5680
|
message: "time is required."
|
5587
5681
|
});
|
5588
5682
|
}
|
5589
5683
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
5590
5684
|
ctx.addIssue({
|
5591
|
-
code:
|
5685
|
+
code: z74.ZodIssueCode.custom,
|
5592
5686
|
path: ["queueList"],
|
5593
5687
|
message: "queueList is required."
|
5594
5688
|
});
|
5595
5689
|
}
|
5596
5690
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
5597
5691
|
ctx.addIssue({
|
5598
|
-
code:
|
5692
|
+
code: z74.ZodIssueCode.custom,
|
5599
5693
|
path: ["queueId"],
|
5600
5694
|
message: "queueId is required."
|
5601
5695
|
});
|
5602
5696
|
}
|
5603
5697
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
5604
5698
|
ctx.addIssue({
|
5605
|
-
code:
|
5699
|
+
code: z74.ZodIssueCode.custom,
|
5606
5700
|
path: ["trunkList"],
|
5607
5701
|
message: "trunkList is required."
|
5608
5702
|
});
|
5609
5703
|
}
|
5610
5704
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
5611
5705
|
ctx.addIssue({
|
5612
|
-
code:
|
5706
|
+
code: z74.ZodIssueCode.custom,
|
5613
5707
|
path: ["extensionList"],
|
5614
5708
|
message: "extensionList is required."
|
5615
5709
|
});
|
@@ -5627,10 +5721,10 @@ var telephonyCdrContract = initContract24().router(
|
|
5627
5721
|
query: GetAllTelephonyCdrSchema,
|
5628
5722
|
responses: {
|
5629
5723
|
200: DefaultSuccessResponseSchema.extend({
|
5630
|
-
total:
|
5631
|
-
page:
|
5632
|
-
pageSize:
|
5633
|
-
telephonyCdrs:
|
5724
|
+
total: z75.number(),
|
5725
|
+
page: z75.number(),
|
5726
|
+
pageSize: z75.number(),
|
5727
|
+
telephonyCdrs: z75.array(TelephonyCdrSchema)
|
5634
5728
|
}),
|
5635
5729
|
401: DefaultUnauthorizedSchema
|
5636
5730
|
},
|
@@ -5643,10 +5737,10 @@ var telephonyCdrContract = initContract24().router(
|
|
5643
5737
|
query: GetAllTelephonyCdrSchema,
|
5644
5738
|
responses: {
|
5645
5739
|
200: DefaultSuccessResponseSchema.extend({
|
5646
|
-
total:
|
5647
|
-
page:
|
5648
|
-
pageSize:
|
5649
|
-
telephonyCdrs:
|
5740
|
+
total: z75.number(),
|
5741
|
+
page: z75.number(),
|
5742
|
+
pageSize: z75.number(),
|
5743
|
+
telephonyCdrs: z75.array(TelephonyCdrSchema)
|
5650
5744
|
}),
|
5651
5745
|
401: DefaultUnauthorizedSchema
|
5652
5746
|
},
|
@@ -5659,10 +5753,10 @@ var telephonyCdrContract = initContract24().router(
|
|
5659
5753
|
query: GetRecentTelephonyCdrSchema,
|
5660
5754
|
responses: {
|
5661
5755
|
200: DefaultSuccessResponseSchema.extend({
|
5662
|
-
total:
|
5663
|
-
page:
|
5664
|
-
pageSize:
|
5665
|
-
telephonyCdrs:
|
5756
|
+
total: z75.number(),
|
5757
|
+
page: z75.number(),
|
5758
|
+
pageSize: z75.number(),
|
5759
|
+
telephonyCdrs: z75.array(TelephonyCdrSchema)
|
5666
5760
|
}),
|
5667
5761
|
401: DefaultUnauthorizedSchema
|
5668
5762
|
},
|
@@ -5687,7 +5781,7 @@ var telephonyCdrContract = initContract24().router(
|
|
5687
5781
|
body: GetYeastarCallReportSchema,
|
5688
5782
|
responses: {
|
5689
5783
|
// 200: CallReportSchema,
|
5690
|
-
200:
|
5784
|
+
200: z75.object({}),
|
5691
5785
|
401: DefaultUnauthorizedSchema
|
5692
5786
|
},
|
5693
5787
|
summary: "Get yeastar call report."
|
@@ -5755,10 +5849,10 @@ var telephonyCdrContract = initContract24().router(
|
|
5755
5849
|
headers: DefaultHeaderSchema,
|
5756
5850
|
responses: {
|
5757
5851
|
200: DefaultSuccessResponseSchema.extend({
|
5758
|
-
callRedirectTo:
|
5852
|
+
callRedirectTo: z75.string()
|
5759
5853
|
}),
|
5760
|
-
400:
|
5761
|
-
message:
|
5854
|
+
400: z75.object({
|
5855
|
+
message: z75.string()
|
5762
5856
|
}),
|
5763
5857
|
401: DefaultUnauthorizedSchema,
|
5764
5858
|
500: DefaultErrorResponseSchema
|
@@ -5771,10 +5865,10 @@ var telephonyCdrContract = initContract24().router(
|
|
5771
5865
|
body: TelephonyRedirectSettingSchema,
|
5772
5866
|
responses: {
|
5773
5867
|
200: DefaultSuccessResponseSchema.extend({
|
5774
|
-
callRedirectTo:
|
5868
|
+
callRedirectTo: z75.string()
|
5775
5869
|
}),
|
5776
|
-
400:
|
5777
|
-
message:
|
5870
|
+
400: z75.object({
|
5871
|
+
message: z75.string()
|
5778
5872
|
}),
|
5779
5873
|
401: DefaultUnauthorizedSchema,
|
5780
5874
|
500: DefaultErrorResponseSchema
|
@@ -5786,11 +5880,11 @@ var telephonyCdrContract = initContract24().router(
|
|
5786
5880
|
headers: DefaultHeaderSchema,
|
5787
5881
|
responses: {
|
5788
5882
|
200: DefaultSuccessResponseSchema.extend({
|
5789
|
-
callRedirectTo:
|
5790
|
-
isMultiTabUsed:
|
5883
|
+
callRedirectTo: z75.string(),
|
5884
|
+
isMultiTabUsed: z75.string()
|
5791
5885
|
}),
|
5792
|
-
400:
|
5793
|
-
message:
|
5886
|
+
400: z75.object({
|
5887
|
+
message: z75.string()
|
5794
5888
|
}),
|
5795
5889
|
401: DefaultUnauthorizedSchema,
|
5796
5890
|
500: DefaultErrorResponseSchema
|
@@ -5803,11 +5897,11 @@ var telephonyCdrContract = initContract24().router(
|
|
5803
5897
|
body: CallSettingSchema,
|
5804
5898
|
responses: {
|
5805
5899
|
200: DefaultSuccessResponseSchema.extend({
|
5806
|
-
callRedirectTo:
|
5807
|
-
isMultiTabUsed:
|
5900
|
+
callRedirectTo: z75.string(),
|
5901
|
+
isMultiTabUsed: z75.string()
|
5808
5902
|
}),
|
5809
|
-
400:
|
5810
|
-
message:
|
5903
|
+
400: z75.object({
|
5904
|
+
message: z75.string()
|
5811
5905
|
}),
|
5812
5906
|
401: DefaultUnauthorizedSchema,
|
5813
5907
|
500: DefaultErrorResponseSchema
|
@@ -5819,35 +5913,35 @@ var telephonyCdrContract = initContract24().router(
|
|
5819
5913
|
|
5820
5914
|
// src/telephony-extension/index.ts
|
5821
5915
|
import { initContract as initContract25 } from "@ts-rest/core";
|
5822
|
-
import
|
5916
|
+
import z77 from "zod";
|
5823
5917
|
|
5824
5918
|
// src/telephony-extension/schema.ts
|
5825
|
-
import
|
5826
|
-
var TelephonyExtensionSchema3 =
|
5827
|
-
errcode:
|
5828
|
-
errmsg:
|
5829
|
-
total_number:
|
5830
|
-
data:
|
5831
|
-
|
5832
|
-
id:
|
5833
|
-
online_status:
|
5834
|
-
fx_phone:
|
5835
|
-
sip_phone:
|
5836
|
-
status:
|
5837
|
-
ext_dev_type:
|
5838
|
-
}),
|
5839
|
-
linkus_desktop:
|
5840
|
-
linkus_mobile:
|
5841
|
-
linkus_web:
|
5842
|
-
status:
|
5843
|
-
ext_dev_type:
|
5919
|
+
import z76 from "zod";
|
5920
|
+
var TelephonyExtensionSchema3 = z76.object({
|
5921
|
+
errcode: z76.coerce.number(),
|
5922
|
+
errmsg: z76.string(),
|
5923
|
+
total_number: z76.coerce.number(),
|
5924
|
+
data: z76.array(
|
5925
|
+
z76.object({
|
5926
|
+
id: z76.coerce.number(),
|
5927
|
+
online_status: z76.object({
|
5928
|
+
fx_phone: z76.object({ status: z76.coerce.number() }),
|
5929
|
+
sip_phone: z76.object({
|
5930
|
+
status: z76.coerce.number(),
|
5931
|
+
ext_dev_type: z76.string().optional()
|
5932
|
+
}),
|
5933
|
+
linkus_desktop: z76.object({ status: z76.coerce.number() }),
|
5934
|
+
linkus_mobile: z76.object({ status: z76.coerce.number() }),
|
5935
|
+
linkus_web: z76.object({
|
5936
|
+
status: z76.coerce.number(),
|
5937
|
+
ext_dev_type: z76.string().optional()
|
5844
5938
|
})
|
5845
5939
|
}).optional(),
|
5846
|
-
presence_status:
|
5847
|
-
number:
|
5848
|
-
caller_id_name:
|
5849
|
-
role_name:
|
5850
|
-
email_addr:
|
5940
|
+
presence_status: z76.string().optional(),
|
5941
|
+
number: z76.string().optional(),
|
5942
|
+
caller_id_name: z76.string().optional(),
|
5943
|
+
role_name: z76.string().optional(),
|
5944
|
+
email_addr: z76.string().optional()
|
5851
5945
|
})
|
5852
5946
|
)
|
5853
5947
|
});
|
@@ -5862,8 +5956,8 @@ var telephonyExtensionContract = initContract25().router(
|
|
5862
5956
|
query: null,
|
5863
5957
|
responses: {
|
5864
5958
|
200: TelephonyExtensionSchema3,
|
5865
|
-
400:
|
5866
|
-
message:
|
5959
|
+
400: z77.object({
|
5960
|
+
message: z77.string()
|
5867
5961
|
}),
|
5868
5962
|
401: DefaultUnauthorizedSchema,
|
5869
5963
|
500: DefaultErrorResponseSchema
|
@@ -5876,10 +5970,10 @@ var telephonyExtensionContract = initContract25().router(
|
|
5876
5970
|
|
5877
5971
|
// src/ticket/index.ts
|
5878
5972
|
import { initContract as initContract26 } from "@ts-rest/core";
|
5879
|
-
import
|
5973
|
+
import z79 from "zod";
|
5880
5974
|
|
5881
5975
|
// src/ticket/validation.ts
|
5882
|
-
import
|
5976
|
+
import z78 from "zod";
|
5883
5977
|
var addErrorMessage2 = (field) => {
|
5884
5978
|
return field.refine(
|
5885
5979
|
({ isRequired, value }) => {
|
@@ -5897,108 +5991,108 @@ var addErrorMessage2 = (field) => {
|
|
5897
5991
|
}
|
5898
5992
|
);
|
5899
5993
|
};
|
5900
|
-
var BaseSchema3 =
|
5901
|
-
isRequired:
|
5902
|
-
attributeId:
|
5994
|
+
var BaseSchema3 = z78.object({
|
5995
|
+
isRequired: z78.boolean(),
|
5996
|
+
attributeId: z78.string()
|
5903
5997
|
});
|
5904
5998
|
var SingleValue2 = addErrorMessage2(
|
5905
5999
|
BaseSchema3.extend({
|
5906
|
-
value:
|
6000
|
+
value: z78.string()
|
5907
6001
|
})
|
5908
6002
|
);
|
5909
|
-
var CreateTicketValidationSchema =
|
6003
|
+
var CreateTicketValidationSchema = z78.object({
|
5910
6004
|
title: SingleValue2,
|
5911
6005
|
description: SingleValue2,
|
5912
6006
|
status: SingleValue2,
|
5913
6007
|
type: SingleValue2,
|
5914
6008
|
priority: SingleValue2,
|
5915
6009
|
contact: SingleValue2,
|
5916
|
-
assignee:
|
5917
|
-
isRequired:
|
5918
|
-
attributeId:
|
5919
|
-
value:
|
6010
|
+
assignee: z78.object({
|
6011
|
+
isRequired: z78.boolean(),
|
6012
|
+
attributeId: z78.string(),
|
6013
|
+
value: z78.string()
|
5920
6014
|
}),
|
5921
6015
|
channel: SingleValue2,
|
5922
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5923
|
-
categories: BaseSchema3.extend({ value:
|
5924
|
-
customFields:
|
6016
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: z78.array(z78.string()) })),
|
6017
|
+
categories: BaseSchema3.extend({ value: z78.array(z78.string()) }),
|
6018
|
+
customFields: z78.array(
|
5925
6019
|
addErrorMessage2(
|
5926
6020
|
BaseSchema3.extend({
|
5927
|
-
value:
|
5928
|
-
type:
|
5929
|
-
isDefaultAttribute:
|
6021
|
+
value: z78.union([z78.string(), z78.array(z78.string())]),
|
6022
|
+
type: z78.string(),
|
6023
|
+
isDefaultAttribute: z78.boolean()
|
5930
6024
|
})
|
5931
6025
|
)
|
5932
6026
|
),
|
5933
|
-
reasonToAssign:
|
6027
|
+
reasonToAssign: z78.object({ value: z78.string() }).optional()
|
5934
6028
|
});
|
5935
6029
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5936
|
-
var TicketAttachmentRecordSchema =
|
5937
|
-
bucketName:
|
5938
|
-
fileKey:
|
5939
|
-
fileName:
|
5940
|
-
fileSize:
|
5941
|
-
url:
|
5942
|
-
});
|
5943
|
-
var CreateTicketAttachmentRecordsSchema =
|
5944
|
-
ticketId:
|
5945
|
-
attributeId:
|
5946
|
-
ticketAttachmentRecords:
|
5947
|
-
});
|
5948
|
-
var TicketParamsSchema =
|
5949
|
-
page:
|
5950
|
-
pageSize:
|
5951
|
-
});
|
5952
|
-
var CustomFieldQuery =
|
5953
|
-
attributeId:
|
5954
|
-
type:
|
5955
|
-
value:
|
5956
|
-
});
|
5957
|
-
var GetAllTicketQuerySchema =
|
5958
|
-
page:
|
5959
|
-
pageSize:
|
5960
|
-
selectedDate:
|
5961
|
-
ticketNumber:
|
5962
|
-
keyword:
|
5963
|
-
title:
|
5964
|
-
description:
|
5965
|
-
status:
|
5966
|
-
priority:
|
5967
|
-
channel:
|
5968
|
-
type:
|
5969
|
-
ticketType:
|
5970
|
-
contact:
|
5971
|
-
tags:
|
5972
|
-
categories:
|
5973
|
-
assignee:
|
5974
|
-
customFields:
|
5975
|
-
|
5976
|
-
attributeId:
|
5977
|
-
type:
|
5978
|
-
value:
|
6030
|
+
var TicketAttachmentRecordSchema = z78.object({
|
6031
|
+
bucketName: z78.string(),
|
6032
|
+
fileKey: z78.string(),
|
6033
|
+
fileName: z78.string(),
|
6034
|
+
fileSize: z78.coerce.number(),
|
6035
|
+
url: z78.string()
|
6036
|
+
});
|
6037
|
+
var CreateTicketAttachmentRecordsSchema = z78.object({
|
6038
|
+
ticketId: z78.string(),
|
6039
|
+
attributeId: z78.string(),
|
6040
|
+
ticketAttachmentRecords: z78.array(TicketAttachmentRecordSchema)
|
6041
|
+
});
|
6042
|
+
var TicketParamsSchema = z78.object({
|
6043
|
+
page: z78.coerce.number().default(1),
|
6044
|
+
pageSize: z78.coerce.number().default(10)
|
6045
|
+
});
|
6046
|
+
var CustomFieldQuery = z78.object({
|
6047
|
+
attributeId: z78.string(),
|
6048
|
+
type: z78.string(),
|
6049
|
+
value: z78.union([z78.string(), z78.array(z78.string())])
|
6050
|
+
});
|
6051
|
+
var GetAllTicketQuerySchema = z78.object({
|
6052
|
+
page: z78.string().transform((value) => Number(value)),
|
6053
|
+
pageSize: z78.string().transform((value) => Number(value)),
|
6054
|
+
selectedDate: z78.string(),
|
6055
|
+
ticketNumber: z78.string(),
|
6056
|
+
keyword: z78.string(),
|
6057
|
+
title: z78.string(),
|
6058
|
+
description: z78.string(),
|
6059
|
+
status: z78.array(z78.string()),
|
6060
|
+
priority: z78.array(z78.string()),
|
6061
|
+
channel: z78.array(z78.string()),
|
6062
|
+
type: z78.array(z78.string()),
|
6063
|
+
ticketType: z78.array(z78.string()),
|
6064
|
+
contact: z78.array(z78.string()),
|
6065
|
+
tags: z78.array(z78.string().uuid()),
|
6066
|
+
categories: z78.array(z78.string().uuid()),
|
6067
|
+
assignee: z78.array(z78.string().uuid()),
|
6068
|
+
customFields: z78.array(
|
6069
|
+
z78.object({
|
6070
|
+
attributeId: z78.string().uuid(),
|
6071
|
+
type: z78.string(),
|
6072
|
+
value: z78.union([z78.string(), z78.array(z78.string())])
|
5979
6073
|
})
|
5980
6074
|
)
|
5981
6075
|
}).partial();
|
5982
|
-
var ExportAllTicketQuerySchema =
|
5983
|
-
agent:
|
5984
|
-
selectedDate:
|
5985
|
-
keyword:
|
5986
|
-
title:
|
5987
|
-
description:
|
5988
|
-
status:
|
5989
|
-
priority:
|
5990
|
-
assignee:
|
5991
|
-
channel:
|
5992
|
-
type:
|
5993
|
-
ticketType:
|
5994
|
-
contact:
|
5995
|
-
tags:
|
5996
|
-
categories:
|
5997
|
-
customFields:
|
5998
|
-
|
5999
|
-
attributeId:
|
6000
|
-
type:
|
6001
|
-
value:
|
6076
|
+
var ExportAllTicketQuerySchema = z78.object({
|
6077
|
+
agent: z78.array(z78.string()),
|
6078
|
+
selectedDate: z78.string(),
|
6079
|
+
keyword: z78.string(),
|
6080
|
+
title: z78.string(),
|
6081
|
+
description: z78.string(),
|
6082
|
+
status: z78.array(z78.string()),
|
6083
|
+
priority: z78.array(z78.string()),
|
6084
|
+
assignee: z78.array(z78.string().uuid()),
|
6085
|
+
channel: z78.array(z78.string()),
|
6086
|
+
type: z78.array(z78.string()),
|
6087
|
+
ticketType: z78.array(z78.string()),
|
6088
|
+
contact: z78.array(z78.string()),
|
6089
|
+
tags: z78.array(z78.string()),
|
6090
|
+
categories: z78.array(z78.string()),
|
6091
|
+
customFields: z78.array(
|
6092
|
+
z78.object({
|
6093
|
+
attributeId: z78.string().uuid(),
|
6094
|
+
type: z78.string(),
|
6095
|
+
value: z78.union([z78.string(), z78.array(z78.string())])
|
6002
6096
|
})
|
6003
6097
|
)
|
6004
6098
|
}).partial();
|
@@ -6014,14 +6108,14 @@ var ticketContract = initContract26().router(
|
|
6014
6108
|
201: DefaultSuccessResponseSchema.extend({
|
6015
6109
|
data: TicketSchema
|
6016
6110
|
}),
|
6017
|
-
400:
|
6018
|
-
message:
|
6111
|
+
400: z79.object({
|
6112
|
+
message: z79.string()
|
6019
6113
|
}),
|
6020
|
-
409:
|
6021
|
-
message:
|
6114
|
+
409: z79.object({
|
6115
|
+
message: z79.string()
|
6022
6116
|
}),
|
6023
|
-
500:
|
6024
|
-
message:
|
6117
|
+
500: z79.object({
|
6118
|
+
message: z79.string()
|
6025
6119
|
}),
|
6026
6120
|
401: DefaultUnauthorizedSchema,
|
6027
6121
|
404: DefaultNotFoundSchema,
|
@@ -6042,8 +6136,8 @@ var ticketContract = initContract26().router(
|
|
6042
6136
|
TicketSchema
|
6043
6137
|
)
|
6044
6138
|
}),
|
6045
|
-
400:
|
6046
|
-
message:
|
6139
|
+
400: z79.object({
|
6140
|
+
message: z79.string()
|
6047
6141
|
}),
|
6048
6142
|
401: DefaultUnauthorizedSchema,
|
6049
6143
|
500: DefaultErrorResponseSchema
|
@@ -6053,14 +6147,14 @@ var ticketContract = initContract26().router(
|
|
6053
6147
|
getTicketById: {
|
6054
6148
|
method: "GET",
|
6055
6149
|
path: "/:id",
|
6056
|
-
pathParams:
|
6150
|
+
pathParams: z79.object({ id: z79.string() }),
|
6057
6151
|
headers: DefaultHeaderSchema,
|
6058
6152
|
responses: {
|
6059
6153
|
200: DefaultSuccessResponseSchema.extend({
|
6060
6154
|
data: TicketSchema
|
6061
6155
|
}),
|
6062
|
-
400:
|
6063
|
-
message:
|
6156
|
+
400: z79.object({
|
6157
|
+
message: z79.string()
|
6064
6158
|
}),
|
6065
6159
|
401: DefaultUnauthorizedSchema,
|
6066
6160
|
500: DefaultErrorResponseSchema
|
@@ -6070,15 +6164,15 @@ var ticketContract = initContract26().router(
|
|
6070
6164
|
getTicketByContactId: {
|
6071
6165
|
method: "GET",
|
6072
6166
|
path: "/contact/:id",
|
6073
|
-
pathParams:
|
6167
|
+
pathParams: z79.object({ id: z79.string() }),
|
6074
6168
|
query: TicketParamsSchema,
|
6075
6169
|
headers: DefaultHeaderSchema,
|
6076
6170
|
responses: {
|
6077
6171
|
200: DefaultSuccessResponseSchema.extend({
|
6078
6172
|
data: WithPagination(TicketSchema)
|
6079
6173
|
}),
|
6080
|
-
400:
|
6081
|
-
message:
|
6174
|
+
400: z79.object({
|
6175
|
+
message: z79.string()
|
6082
6176
|
}),
|
6083
6177
|
401: DefaultUnauthorizedSchema,
|
6084
6178
|
500: DefaultErrorResponseSchema
|
@@ -6088,21 +6182,21 @@ var ticketContract = initContract26().router(
|
|
6088
6182
|
updateTicket: {
|
6089
6183
|
method: "PATCH",
|
6090
6184
|
path: "/:id",
|
6091
|
-
pathParams:
|
6185
|
+
pathParams: z79.object({ id: z79.string() }),
|
6092
6186
|
body: UpdateTicketValidationSchema,
|
6093
6187
|
headers: DefaultHeaderSchema,
|
6094
6188
|
responses: {
|
6095
6189
|
201: DefaultSuccessResponseSchema.extend({
|
6096
6190
|
data: TicketSchema
|
6097
6191
|
}),
|
6098
|
-
400:
|
6099
|
-
message:
|
6192
|
+
400: z79.object({
|
6193
|
+
message: z79.string()
|
6100
6194
|
}),
|
6101
|
-
409:
|
6102
|
-
message:
|
6195
|
+
409: z79.object({
|
6196
|
+
message: z79.string()
|
6103
6197
|
}),
|
6104
|
-
500:
|
6105
|
-
message:
|
6198
|
+
500: z79.object({
|
6199
|
+
message: z79.string()
|
6106
6200
|
}),
|
6107
6201
|
401: DefaultUnauthorizedSchema,
|
6108
6202
|
404: DefaultNotFoundSchema,
|
@@ -6113,11 +6207,11 @@ var ticketContract = initContract26().router(
|
|
6113
6207
|
deleteTicket: {
|
6114
6208
|
method: "DELETE",
|
6115
6209
|
path: "/:id",
|
6116
|
-
pathParams:
|
6210
|
+
pathParams: z79.object({ id: z79.string() }),
|
6117
6211
|
headers: DefaultHeaderSchema,
|
6118
6212
|
body: null,
|
6119
6213
|
responses: {
|
6120
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6214
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6121
6215
|
500: DefaultErrorResponseSchema
|
6122
6216
|
},
|
6123
6217
|
summary: "Delete a extension."
|
@@ -6125,19 +6219,19 @@ var ticketContract = initContract26().router(
|
|
6125
6219
|
updateDescription: {
|
6126
6220
|
method: "PATCH",
|
6127
6221
|
path: "/description/update/:id",
|
6128
|
-
pathParams:
|
6129
|
-
body:
|
6222
|
+
pathParams: z79.object({ id: z79.string() }),
|
6223
|
+
body: z79.object({ description: z79.string() }),
|
6130
6224
|
headers: DefaultHeaderSchema,
|
6131
6225
|
responses: {
|
6132
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
6133
|
-
400:
|
6134
|
-
message:
|
6226
|
+
201: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6227
|
+
400: z79.object({
|
6228
|
+
message: z79.string()
|
6135
6229
|
}),
|
6136
|
-
409:
|
6137
|
-
message:
|
6230
|
+
409: z79.object({
|
6231
|
+
message: z79.string()
|
6138
6232
|
}),
|
6139
|
-
500:
|
6140
|
-
message:
|
6233
|
+
500: z79.object({
|
6234
|
+
message: z79.string()
|
6141
6235
|
}),
|
6142
6236
|
401: DefaultUnauthorizedSchema,
|
6143
6237
|
404: DefaultNotFoundSchema,
|
@@ -6148,19 +6242,19 @@ var ticketContract = initContract26().router(
|
|
6148
6242
|
updateTitle: {
|
6149
6243
|
method: "PATCH",
|
6150
6244
|
path: "/title/update/:id",
|
6151
|
-
pathParams:
|
6152
|
-
body:
|
6245
|
+
pathParams: z79.object({ id: z79.string() }),
|
6246
|
+
body: z79.object({ title: z79.string() }),
|
6153
6247
|
headers: DefaultHeaderSchema,
|
6154
6248
|
responses: {
|
6155
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6156
|
-
400:
|
6157
|
-
message:
|
6249
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6250
|
+
400: z79.object({
|
6251
|
+
message: z79.string()
|
6158
6252
|
}),
|
6159
|
-
409:
|
6160
|
-
message:
|
6253
|
+
409: z79.object({
|
6254
|
+
message: z79.string()
|
6161
6255
|
}),
|
6162
|
-
500:
|
6163
|
-
message:
|
6256
|
+
500: z79.object({
|
6257
|
+
message: z79.string()
|
6164
6258
|
}),
|
6165
6259
|
401: DefaultUnauthorizedSchema,
|
6166
6260
|
404: DefaultNotFoundSchema,
|
@@ -6171,19 +6265,19 @@ var ticketContract = initContract26().router(
|
|
6171
6265
|
updateType: {
|
6172
6266
|
method: "PATCH",
|
6173
6267
|
path: "/type/update/:id",
|
6174
|
-
pathParams:
|
6175
|
-
body:
|
6268
|
+
pathParams: z79.object({ id: z79.string() }),
|
6269
|
+
body: z79.object({ type: z79.string() }),
|
6176
6270
|
headers: DefaultHeaderSchema,
|
6177
6271
|
responses: {
|
6178
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6179
|
-
400:
|
6180
|
-
message:
|
6272
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6273
|
+
400: z79.object({
|
6274
|
+
message: z79.string()
|
6181
6275
|
}),
|
6182
|
-
409:
|
6183
|
-
message:
|
6276
|
+
409: z79.object({
|
6277
|
+
message: z79.string()
|
6184
6278
|
}),
|
6185
|
-
500:
|
6186
|
-
message:
|
6279
|
+
500: z79.object({
|
6280
|
+
message: z79.string()
|
6187
6281
|
}),
|
6188
6282
|
401: DefaultUnauthorizedSchema,
|
6189
6283
|
404: DefaultNotFoundSchema,
|
@@ -6194,19 +6288,19 @@ var ticketContract = initContract26().router(
|
|
6194
6288
|
updateStatus: {
|
6195
6289
|
method: "PATCH",
|
6196
6290
|
path: "/status/update/:id",
|
6197
|
-
pathParams:
|
6198
|
-
body:
|
6291
|
+
pathParams: z79.object({ id: z79.string() }),
|
6292
|
+
body: z79.object({ status: z79.string() }),
|
6199
6293
|
headers: DefaultHeaderSchema,
|
6200
6294
|
responses: {
|
6201
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6202
|
-
400:
|
6203
|
-
message:
|
6295
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6296
|
+
400: z79.object({
|
6297
|
+
message: z79.string()
|
6204
6298
|
}),
|
6205
|
-
409:
|
6206
|
-
message:
|
6299
|
+
409: z79.object({
|
6300
|
+
message: z79.string()
|
6207
6301
|
}),
|
6208
|
-
500:
|
6209
|
-
message:
|
6302
|
+
500: z79.object({
|
6303
|
+
message: z79.string()
|
6210
6304
|
}),
|
6211
6305
|
401: DefaultUnauthorizedSchema,
|
6212
6306
|
404: DefaultNotFoundSchema,
|
@@ -6217,19 +6311,19 @@ var ticketContract = initContract26().router(
|
|
6217
6311
|
updatePriority: {
|
6218
6312
|
method: "PATCH",
|
6219
6313
|
path: "/priority/update/:id",
|
6220
|
-
pathParams:
|
6221
|
-
body:
|
6314
|
+
pathParams: z79.object({ id: z79.string() }),
|
6315
|
+
body: z79.object({ priority: z79.string() }),
|
6222
6316
|
headers: DefaultHeaderSchema,
|
6223
6317
|
responses: {
|
6224
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6225
|
-
400:
|
6226
|
-
message:
|
6318
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6319
|
+
400: z79.object({
|
6320
|
+
message: z79.string()
|
6227
6321
|
}),
|
6228
|
-
409:
|
6229
|
-
message:
|
6322
|
+
409: z79.object({
|
6323
|
+
message: z79.string()
|
6230
6324
|
}),
|
6231
|
-
500:
|
6232
|
-
message:
|
6325
|
+
500: z79.object({
|
6326
|
+
message: z79.string()
|
6233
6327
|
}),
|
6234
6328
|
401: DefaultUnauthorizedSchema,
|
6235
6329
|
404: DefaultNotFoundSchema,
|
@@ -6240,19 +6334,19 @@ var ticketContract = initContract26().router(
|
|
6240
6334
|
updateChannel: {
|
6241
6335
|
method: "PATCH",
|
6242
6336
|
path: "/channel/update/:id",
|
6243
|
-
pathParams:
|
6244
|
-
body:
|
6337
|
+
pathParams: z79.object({ id: z79.string() }),
|
6338
|
+
body: z79.object({ channel: z79.string() }),
|
6245
6339
|
headers: DefaultHeaderSchema,
|
6246
6340
|
responses: {
|
6247
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6248
|
-
400:
|
6249
|
-
message:
|
6341
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6342
|
+
400: z79.object({
|
6343
|
+
message: z79.string()
|
6250
6344
|
}),
|
6251
|
-
409:
|
6252
|
-
message:
|
6345
|
+
409: z79.object({
|
6346
|
+
message: z79.string()
|
6253
6347
|
}),
|
6254
|
-
500:
|
6255
|
-
message:
|
6348
|
+
500: z79.object({
|
6349
|
+
message: z79.string()
|
6256
6350
|
}),
|
6257
6351
|
401: DefaultUnauthorizedSchema,
|
6258
6352
|
404: DefaultNotFoundSchema,
|
@@ -6263,19 +6357,19 @@ var ticketContract = initContract26().router(
|
|
6263
6357
|
updateTags: {
|
6264
6358
|
method: "PATCH",
|
6265
6359
|
path: "/tags/update/:id",
|
6266
|
-
pathParams:
|
6267
|
-
body:
|
6360
|
+
pathParams: z79.object({ id: z79.string() }),
|
6361
|
+
body: z79.object({ tags: z79.array(z79.string()) }),
|
6268
6362
|
headers: DefaultHeaderSchema,
|
6269
6363
|
responses: {
|
6270
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6271
|
-
400:
|
6272
|
-
message:
|
6364
|
+
200: DefaultSuccessResponseSchema.extend({ message: z79.string() }),
|
6365
|
+
400: z79.object({
|
6366
|
+
message: z79.string()
|
6273
6367
|
}),
|
6274
|
-
409:
|
6275
|
-
message:
|
6368
|
+
409: z79.object({
|
6369
|
+
message: z79.string()
|
6276
6370
|
}),
|
6277
|
-
500:
|
6278
|
-
message:
|
6371
|
+
500: z79.object({
|
6372
|
+
message: z79.string()
|
6279
6373
|
}),
|
6280
6374
|
401: DefaultUnauthorizedSchema,
|
6281
6375
|
404: DefaultNotFoundSchema,
|
@@ -6286,25 +6380,25 @@ var ticketContract = initContract26().router(
|
|
6286
6380
|
changeAssignee: {
|
6287
6381
|
method: "PATCH",
|
6288
6382
|
path: "/assignee/update/:id",
|
6289
|
-
pathParams:
|
6290
|
-
body:
|
6291
|
-
ticketId:
|
6292
|
-
assigneeId:
|
6293
|
-
reason:
|
6383
|
+
pathParams: z79.object({ id: z79.string() }),
|
6384
|
+
body: z79.object({
|
6385
|
+
ticketId: z79.string(),
|
6386
|
+
assigneeId: z79.string(),
|
6387
|
+
reason: z79.string().optional()
|
6294
6388
|
}),
|
6295
6389
|
headers: DefaultHeaderSchema,
|
6296
6390
|
responses: {
|
6297
6391
|
200: DefaultSuccessResponseSchema.extend({
|
6298
6392
|
data: TicketSchema
|
6299
6393
|
}),
|
6300
|
-
400:
|
6301
|
-
message:
|
6394
|
+
400: z79.object({
|
6395
|
+
message: z79.string()
|
6302
6396
|
}),
|
6303
|
-
409:
|
6304
|
-
message:
|
6397
|
+
409: z79.object({
|
6398
|
+
message: z79.string()
|
6305
6399
|
}),
|
6306
|
-
500:
|
6307
|
-
message:
|
6400
|
+
500: z79.object({
|
6401
|
+
message: z79.string()
|
6308
6402
|
}),
|
6309
6403
|
401: DefaultUnauthorizedSchema,
|
6310
6404
|
404: DefaultNotFoundSchema,
|
@@ -6315,14 +6409,14 @@ var ticketContract = initContract26().router(
|
|
6315
6409
|
getTicketCountByContact: {
|
6316
6410
|
method: "GET",
|
6317
6411
|
path: "/ticket_count/contact/:id",
|
6318
|
-
pathParams:
|
6412
|
+
pathParams: z79.object({ id: z79.string() }),
|
6319
6413
|
headers: DefaultHeaderSchema,
|
6320
6414
|
responses: {
|
6321
6415
|
200: DefaultSuccessResponseSchema.extend({
|
6322
6416
|
data: TicketCountByContactSchema
|
6323
6417
|
}),
|
6324
|
-
400:
|
6325
|
-
message:
|
6418
|
+
400: z79.object({
|
6419
|
+
message: z79.string()
|
6326
6420
|
}),
|
6327
6421
|
401: DefaultUnauthorizedSchema,
|
6328
6422
|
500: DefaultErrorResponseSchema
|
@@ -6338,14 +6432,14 @@ var ticketContract = initContract26().router(
|
|
6338
6432
|
201: DefaultSuccessResponseSchema.extend({
|
6339
6433
|
data: TicketCustomFieldSchema
|
6340
6434
|
}),
|
6341
|
-
400:
|
6342
|
-
message:
|
6435
|
+
400: z79.object({
|
6436
|
+
message: z79.string()
|
6343
6437
|
}),
|
6344
|
-
409:
|
6345
|
-
message:
|
6438
|
+
409: z79.object({
|
6439
|
+
message: z79.string()
|
6346
6440
|
}),
|
6347
|
-
500:
|
6348
|
-
message:
|
6441
|
+
500: z79.object({
|
6442
|
+
message: z79.string()
|
6349
6443
|
}),
|
6350
6444
|
401: DefaultUnauthorizedSchema,
|
6351
6445
|
404: DefaultNotFoundSchema,
|
@@ -6370,10 +6464,10 @@ var ticketContract = initContract26().router(
|
|
6370
6464
|
headers: DefaultHeaderSchema,
|
6371
6465
|
responses: {
|
6372
6466
|
200: DefaultSuccessResponseSchema.extend({
|
6373
|
-
ticketReasonRequired:
|
6467
|
+
ticketReasonRequired: z79.string()
|
6374
6468
|
}),
|
6375
|
-
400:
|
6376
|
-
message:
|
6469
|
+
400: z79.object({
|
6470
|
+
message: z79.string()
|
6377
6471
|
}),
|
6378
6472
|
401: DefaultUnauthorizedSchema,
|
6379
6473
|
500: DefaultErrorResponseSchema
|
@@ -6386,10 +6480,10 @@ var ticketContract = initContract26().router(
|
|
6386
6480
|
body: TicketReasonRequiredSchema,
|
6387
6481
|
responses: {
|
6388
6482
|
200: DefaultSuccessResponseSchema.extend({
|
6389
|
-
ticketReasonRequired:
|
6483
|
+
ticketReasonRequired: z79.string()
|
6390
6484
|
}),
|
6391
|
-
400:
|
6392
|
-
message:
|
6485
|
+
400: z79.object({
|
6486
|
+
message: z79.string()
|
6393
6487
|
}),
|
6394
6488
|
401: DefaultUnauthorizedSchema,
|
6395
6489
|
500: DefaultErrorResponseSchema
|
@@ -6401,24 +6495,24 @@ var ticketContract = initContract26().router(
|
|
6401
6495
|
|
6402
6496
|
// src/user/index.ts
|
6403
6497
|
import { initContract as initContract27 } from "@ts-rest/core";
|
6404
|
-
import
|
6498
|
+
import z81 from "zod";
|
6405
6499
|
|
6406
6500
|
// src/user/validation.ts
|
6407
|
-
import { z as
|
6408
|
-
var CreateUserSchema =
|
6409
|
-
name:
|
6410
|
-
email:
|
6411
|
-
address:
|
6412
|
-
phone:
|
6413
|
-
password:
|
6414
|
-
notificationCount:
|
6415
|
-
roles:
|
6501
|
+
import { z as z80 } from "zod";
|
6502
|
+
var CreateUserSchema = z80.object({
|
6503
|
+
name: z80.string(),
|
6504
|
+
email: z80.string().email(),
|
6505
|
+
address: z80.string().nullable(),
|
6506
|
+
phone: z80.string().nullable(),
|
6507
|
+
password: z80.string(),
|
6508
|
+
notificationCount: z80.number().nullable().optional(),
|
6509
|
+
roles: z80.array(z80.string())
|
6416
6510
|
});
|
6417
6511
|
var UpdateUserSchema = CreateUserSchema.extend({
|
6418
|
-
newPassword:
|
6512
|
+
newPassword: z80.string()
|
6419
6513
|
});
|
6420
|
-
var UpdateUserProfileSchema =
|
6421
|
-
password:
|
6514
|
+
var UpdateUserProfileSchema = z80.object({
|
6515
|
+
password: z80.string()
|
6422
6516
|
});
|
6423
6517
|
|
6424
6518
|
// src/user/index.ts
|
@@ -6433,8 +6527,8 @@ var userContract = initContract27().router(
|
|
6433
6527
|
201: DefaultSuccessResponseSchema.extend({
|
6434
6528
|
user: UserSchema
|
6435
6529
|
}),
|
6436
|
-
400:
|
6437
|
-
message:
|
6530
|
+
400: z81.object({
|
6531
|
+
message: z81.string()
|
6438
6532
|
}),
|
6439
6533
|
401: DefaultUnauthorizedSchema,
|
6440
6534
|
404: DefaultNotFoundSchema,
|
@@ -6447,18 +6541,18 @@ var userContract = initContract27().router(
|
|
6447
6541
|
method: "GET",
|
6448
6542
|
path: "",
|
6449
6543
|
headers: DefaultHeaderSchema,
|
6450
|
-
query:
|
6451
|
-
page:
|
6452
|
-
pageSize:
|
6544
|
+
query: z81.object({
|
6545
|
+
page: z81.coerce.number().optional(),
|
6546
|
+
pageSize: z81.coerce.number().optional(),
|
6453
6547
|
// Don't add default 10. In some places, we need to fetch all users.
|
6454
|
-
keyword:
|
6455
|
-
userIds:
|
6456
|
-
withPresenceStatus:
|
6548
|
+
keyword: z81.string().optional(),
|
6549
|
+
userIds: z81.array(z81.string()).optional(),
|
6550
|
+
withPresenceStatus: z81.string().transform((val) => val === "true").optional()
|
6457
6551
|
}).optional(),
|
6458
6552
|
responses: {
|
6459
6553
|
200: WithPagination(UserSchema),
|
6460
|
-
400:
|
6461
|
-
message:
|
6554
|
+
400: z81.object({
|
6555
|
+
message: z81.string()
|
6462
6556
|
}),
|
6463
6557
|
401: DefaultUnauthorizedSchema,
|
6464
6558
|
500: DefaultErrorResponseSchema
|
@@ -6468,12 +6562,12 @@ var userContract = initContract27().router(
|
|
6468
6562
|
getUserById: {
|
6469
6563
|
method: "GET",
|
6470
6564
|
path: "/:id",
|
6471
|
-
pathParams:
|
6565
|
+
pathParams: z81.object({ id: z81.string() }),
|
6472
6566
|
headers: DefaultHeaderSchema,
|
6473
6567
|
responses: {
|
6474
6568
|
200: UserSchema,
|
6475
|
-
400:
|
6476
|
-
message:
|
6569
|
+
400: z81.object({
|
6570
|
+
message: z81.string()
|
6477
6571
|
}),
|
6478
6572
|
401: DefaultUnauthorizedSchema
|
6479
6573
|
},
|
@@ -6482,15 +6576,15 @@ var userContract = initContract27().router(
|
|
6482
6576
|
updateUser: {
|
6483
6577
|
method: "PATCH",
|
6484
6578
|
path: "/:id",
|
6485
|
-
pathParams:
|
6579
|
+
pathParams: z81.object({ id: z81.string() }),
|
6486
6580
|
headers: DefaultHeaderSchema,
|
6487
6581
|
body: UpdateUserSchema,
|
6488
6582
|
responses: {
|
6489
6583
|
201: DefaultSuccessResponseSchema.extend({
|
6490
6584
|
user: UserSchema
|
6491
6585
|
}),
|
6492
|
-
400:
|
6493
|
-
message:
|
6586
|
+
400: z81.object({
|
6587
|
+
message: z81.string()
|
6494
6588
|
}),
|
6495
6589
|
401: DefaultUnauthorizedSchema,
|
6496
6590
|
404: DefaultNotFoundSchema,
|
@@ -6502,15 +6596,15 @@ var userContract = initContract27().router(
|
|
6502
6596
|
updateUserProfile: {
|
6503
6597
|
method: "PATCH",
|
6504
6598
|
path: "/profile/:id",
|
6505
|
-
pathParams:
|
6599
|
+
pathParams: z81.object({ id: z81.string() }),
|
6506
6600
|
headers: DefaultHeaderSchema,
|
6507
6601
|
body: UpdateUserProfileSchema,
|
6508
6602
|
responses: {
|
6509
6603
|
201: DefaultSuccessResponseSchema.extend({
|
6510
6604
|
user: UserSchema
|
6511
6605
|
}),
|
6512
|
-
400:
|
6513
|
-
message:
|
6606
|
+
400: z81.object({
|
6607
|
+
message: z81.string()
|
6514
6608
|
}),
|
6515
6609
|
401: DefaultUnauthorizedSchema,
|
6516
6610
|
404: DefaultNotFoundSchema,
|
@@ -6522,11 +6616,11 @@ var userContract = initContract27().router(
|
|
6522
6616
|
deleteUser: {
|
6523
6617
|
method: "DELETE",
|
6524
6618
|
path: "/:id",
|
6525
|
-
pathParams:
|
6619
|
+
pathParams: z81.object({ id: z81.string() }),
|
6526
6620
|
headers: DefaultHeaderSchema,
|
6527
6621
|
body: null,
|
6528
6622
|
responses: {
|
6529
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6623
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
6530
6624
|
404: DefaultNotFoundSchema,
|
6531
6625
|
422: DefaultUnprocessibleSchema,
|
6532
6626
|
500: DefaultErrorResponseSchema
|
@@ -6539,26 +6633,26 @@ var userContract = initContract27().router(
|
|
6539
6633
|
|
6540
6634
|
// src/user-presence-status-log/index.ts
|
6541
6635
|
import { initContract as initContract28 } from "@ts-rest/core";
|
6542
|
-
import
|
6636
|
+
import z84 from "zod";
|
6543
6637
|
|
6544
6638
|
// src/user-presence-status-log/schema.ts
|
6545
|
-
import
|
6639
|
+
import z82 from "zod";
|
6546
6640
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6547
6641
|
user: UserSchema,
|
6548
6642
|
previousPresenceStatus: PresenceStatusSchema,
|
6549
6643
|
newPresenceStatus: PresenceStatusSchema,
|
6550
|
-
reason:
|
6644
|
+
reason: z82.string()
|
6551
6645
|
});
|
6552
6646
|
|
6553
6647
|
// src/user-presence-status-log/validation.ts
|
6554
|
-
import
|
6555
|
-
var UserPresenceStatusLogParamsSchema =
|
6556
|
-
page:
|
6557
|
-
pageSize:
|
6558
|
-
selectedDate:
|
6648
|
+
import z83 from "zod";
|
6649
|
+
var UserPresenceStatusLogParamsSchema = z83.object({
|
6650
|
+
page: z83.coerce.number().default(1),
|
6651
|
+
pageSize: z83.coerce.number().default(10),
|
6652
|
+
selectedDate: z83.string().optional()
|
6559
6653
|
}).optional();
|
6560
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6561
|
-
selectedDate:
|
6654
|
+
var UserPresenceStatusLogExportParamsSchema = z83.object({
|
6655
|
+
selectedDate: z83.string().optional()
|
6562
6656
|
});
|
6563
6657
|
|
6564
6658
|
// src/user-presence-status-log/index.ts
|
@@ -6571,8 +6665,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
6571
6665
|
headers: DefaultHeaderSchema,
|
6572
6666
|
responses: {
|
6573
6667
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6574
|
-
400:
|
6575
|
-
message:
|
6668
|
+
400: z84.object({
|
6669
|
+
message: z84.string()
|
6576
6670
|
}),
|
6577
6671
|
401: DefaultUnauthorizedSchema,
|
6578
6672
|
500: DefaultErrorResponseSchema
|
@@ -6586,8 +6680,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
6586
6680
|
headers: DefaultHeaderSchema,
|
6587
6681
|
responses: {
|
6588
6682
|
200: null,
|
6589
|
-
400:
|
6590
|
-
message:
|
6683
|
+
400: z84.object({
|
6684
|
+
message: z84.string()
|
6591
6685
|
}),
|
6592
6686
|
401: DefaultUnauthorizedSchema,
|
6593
6687
|
500: DefaultErrorResponseSchema
|
@@ -6599,44 +6693,44 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
6599
6693
|
|
6600
6694
|
// src/widget/index.ts
|
6601
6695
|
import { initContract as initContract29 } from "@ts-rest/core";
|
6602
|
-
import
|
6696
|
+
import z87 from "zod";
|
6603
6697
|
|
6604
6698
|
// src/widget/schema.ts
|
6605
|
-
import
|
6606
|
-
var FieldsSchema =
|
6607
|
-
var WidgetPositionSchema =
|
6608
|
-
|
6609
|
-
|
6610
|
-
|
6699
|
+
import z85 from "zod";
|
6700
|
+
var FieldsSchema = z85.object({ data: z85.array(z85.string()) });
|
6701
|
+
var WidgetPositionSchema = z85.union([
|
6702
|
+
z85.literal("menu"),
|
6703
|
+
z85.literal("ticket_detail"),
|
6704
|
+
z85.literal("contact_detail")
|
6611
6705
|
]);
|
6612
6706
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6613
|
-
name:
|
6614
|
-
description:
|
6707
|
+
name: z85.string(),
|
6708
|
+
description: z85.string().nullable(),
|
6615
6709
|
position: WidgetPositionSchema.nullable(),
|
6616
6710
|
fields: FieldsSchema,
|
6617
|
-
url:
|
6711
|
+
url: z85.string()
|
6618
6712
|
});
|
6619
6713
|
|
6620
6714
|
// src/widget/validation.ts
|
6621
|
-
import
|
6622
|
-
var CreateWidgetSchema =
|
6623
|
-
name:
|
6624
|
-
description:
|
6625
|
-
url:
|
6715
|
+
import z86 from "zod";
|
6716
|
+
var CreateWidgetSchema = z86.object({
|
6717
|
+
name: z86.string(),
|
6718
|
+
description: z86.string(),
|
6719
|
+
url: z86.string(),
|
6626
6720
|
position: WidgetPositionSchema,
|
6627
|
-
fields:
|
6721
|
+
fields: z86.object({
|
6628
6722
|
data: (
|
6629
6723
|
// Array of attribute system names
|
6630
|
-
|
6724
|
+
z86.array(z86.string())
|
6631
6725
|
)
|
6632
6726
|
}).optional()
|
6633
6727
|
});
|
6634
6728
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6635
|
-
var GetWidgetUrlPathQuerySchema =
|
6636
|
-
widgetId:
|
6729
|
+
var GetWidgetUrlPathQuerySchema = z86.object({
|
6730
|
+
widgetId: z86.string(),
|
6637
6731
|
// Position ID is ticket ID, contact ID, etc.
|
6638
6732
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6639
|
-
positionId:
|
6733
|
+
positionId: z86.string()
|
6640
6734
|
});
|
6641
6735
|
|
6642
6736
|
// src/widget/index.ts
|
@@ -6651,8 +6745,8 @@ var widgetContract = initContract29().router(
|
|
6651
6745
|
201: DefaultSuccessResponseSchema.extend({
|
6652
6746
|
widget: WidgetSchema
|
6653
6747
|
}),
|
6654
|
-
400:
|
6655
|
-
message:
|
6748
|
+
400: z87.object({
|
6749
|
+
message: z87.string()
|
6656
6750
|
}),
|
6657
6751
|
401: DefaultUnauthorizedSchema,
|
6658
6752
|
500: DefaultErrorResponseSchema
|
@@ -6662,17 +6756,17 @@ var widgetContract = initContract29().router(
|
|
6662
6756
|
getWidgets: {
|
6663
6757
|
method: "GET",
|
6664
6758
|
path: "",
|
6665
|
-
query:
|
6666
|
-
page:
|
6667
|
-
pageSize:
|
6668
|
-
keyword:
|
6759
|
+
query: z87.object({
|
6760
|
+
page: z87.coerce.number().default(1),
|
6761
|
+
pageSize: z87.coerce.number().default(10),
|
6762
|
+
keyword: z87.coerce.string().optional()
|
6669
6763
|
}).optional(),
|
6670
6764
|
headers: DefaultHeaderSchema,
|
6671
6765
|
responses: {
|
6672
6766
|
200: WithPagination(WidgetSchema),
|
6673
6767
|
500: DefaultErrorResponseSchema,
|
6674
|
-
400:
|
6675
|
-
message:
|
6768
|
+
400: z87.object({
|
6769
|
+
message: z87.string()
|
6676
6770
|
}),
|
6677
6771
|
401: DefaultUnauthorizedSchema
|
6678
6772
|
},
|
@@ -6683,9 +6777,9 @@ var widgetContract = initContract29().router(
|
|
6683
6777
|
path: "/menu",
|
6684
6778
|
headers: DefaultHeaderSchema,
|
6685
6779
|
responses: {
|
6686
|
-
200:
|
6687
|
-
400:
|
6688
|
-
message:
|
6780
|
+
200: z87.array(WidgetSchema),
|
6781
|
+
400: z87.object({
|
6782
|
+
message: z87.string()
|
6689
6783
|
}),
|
6690
6784
|
401: DefaultUnauthorizedSchema,
|
6691
6785
|
500: DefaultErrorResponseSchema
|
@@ -6697,9 +6791,9 @@ var widgetContract = initContract29().router(
|
|
6697
6791
|
path: "/ticket_detail",
|
6698
6792
|
headers: DefaultHeaderSchema,
|
6699
6793
|
responses: {
|
6700
|
-
200:
|
6701
|
-
400:
|
6702
|
-
message:
|
6794
|
+
200: z87.array(WidgetSchema),
|
6795
|
+
400: z87.object({
|
6796
|
+
message: z87.string()
|
6703
6797
|
}),
|
6704
6798
|
401: DefaultUnauthorizedSchema,
|
6705
6799
|
500: DefaultErrorResponseSchema
|
@@ -6711,9 +6805,9 @@ var widgetContract = initContract29().router(
|
|
6711
6805
|
path: "/contact_detail",
|
6712
6806
|
headers: DefaultHeaderSchema,
|
6713
6807
|
responses: {
|
6714
|
-
200:
|
6715
|
-
400:
|
6716
|
-
message:
|
6808
|
+
200: z87.array(WidgetSchema),
|
6809
|
+
400: z87.object({
|
6810
|
+
message: z87.string()
|
6717
6811
|
}),
|
6718
6812
|
401: DefaultUnauthorizedSchema,
|
6719
6813
|
500: DefaultErrorResponseSchema
|
@@ -6723,12 +6817,12 @@ var widgetContract = initContract29().router(
|
|
6723
6817
|
getWidgetById: {
|
6724
6818
|
method: "GET",
|
6725
6819
|
path: "/:id",
|
6726
|
-
pathParams:
|
6820
|
+
pathParams: z87.object({ id: z87.string() }),
|
6727
6821
|
headers: DefaultHeaderSchema,
|
6728
6822
|
responses: {
|
6729
6823
|
200: WidgetSchema,
|
6730
|
-
400:
|
6731
|
-
message:
|
6824
|
+
400: z87.object({
|
6825
|
+
message: z87.string()
|
6732
6826
|
}),
|
6733
6827
|
401: DefaultUnauthorizedSchema,
|
6734
6828
|
500: DefaultErrorResponseSchema
|
@@ -6742,10 +6836,10 @@ var widgetContract = initContract29().router(
|
|
6742
6836
|
headers: DefaultHeaderSchema,
|
6743
6837
|
responses: {
|
6744
6838
|
201: DefaultSuccessResponseSchema.extend({
|
6745
|
-
url:
|
6839
|
+
url: z87.string()
|
6746
6840
|
}),
|
6747
|
-
400:
|
6748
|
-
message:
|
6841
|
+
400: z87.object({
|
6842
|
+
message: z87.string()
|
6749
6843
|
}),
|
6750
6844
|
401: DefaultUnauthorizedSchema
|
6751
6845
|
},
|
@@ -6754,14 +6848,14 @@ var widgetContract = initContract29().router(
|
|
6754
6848
|
updateWidget: {
|
6755
6849
|
method: "PATCH",
|
6756
6850
|
path: "/:id",
|
6757
|
-
pathParams:
|
6851
|
+
pathParams: z87.object({ id: z87.string() }),
|
6758
6852
|
headers: DefaultHeaderSchema,
|
6759
6853
|
responses: {
|
6760
6854
|
201: DefaultSuccessResponseSchema.extend({
|
6761
6855
|
widget: WidgetSchema
|
6762
6856
|
}),
|
6763
|
-
400:
|
6764
|
-
message:
|
6857
|
+
400: z87.object({
|
6858
|
+
message: z87.string()
|
6765
6859
|
}),
|
6766
6860
|
401: DefaultUnauthorizedSchema
|
6767
6861
|
},
|
@@ -6771,11 +6865,11 @@ var widgetContract = initContract29().router(
|
|
6771
6865
|
deleteWidget: {
|
6772
6866
|
method: "DELETE",
|
6773
6867
|
path: "/:id",
|
6774
|
-
pathParams:
|
6868
|
+
pathParams: z87.object({ id: z87.string() }),
|
6775
6869
|
headers: DefaultHeaderSchema,
|
6776
6870
|
body: null,
|
6777
6871
|
responses: {
|
6778
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6872
|
+
200: DefaultSuccessResponseSchema.extend({ message: z87.string() }),
|
6779
6873
|
500: DefaultErrorResponseSchema
|
6780
6874
|
},
|
6781
6875
|
summary: "Delete a widget."
|
@@ -6786,35 +6880,35 @@ var widgetContract = initContract29().router(
|
|
6786
6880
|
|
6787
6881
|
// src/wrap-up-form/index.ts
|
6788
6882
|
import { initContract as initContract30 } from "@ts-rest/core";
|
6789
|
-
import
|
6883
|
+
import z89 from "zod";
|
6790
6884
|
|
6791
6885
|
// src/wrap-up-form/validation.ts
|
6792
|
-
import { z as
|
6793
|
-
var CreateWrapUpFormSchema =
|
6794
|
-
note:
|
6795
|
-
disposition:
|
6796
|
-
callFrom:
|
6797
|
-
callTo:
|
6886
|
+
import { z as z88 } from "zod";
|
6887
|
+
var CreateWrapUpFormSchema = z88.object({
|
6888
|
+
note: z88.string().nullable().optional(),
|
6889
|
+
disposition: z88.string().nullable().optional(),
|
6890
|
+
callFrom: z88.string().nullable().optional(),
|
6891
|
+
callTo: z88.string().nullable().optional()
|
6798
6892
|
});
|
6799
6893
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6800
|
-
cxLogId:
|
6801
|
-
type:
|
6802
|
-
tags:
|
6803
|
-
categoryIds:
|
6804
|
-
customFields:
|
6805
|
-
|
6806
|
-
id:
|
6807
|
-
type:
|
6808
|
-
value:
|
6894
|
+
cxLogId: z88.string().uuid().optional(),
|
6895
|
+
type: z88.string().optional(),
|
6896
|
+
tags: z88.array(z88.string()).optional(),
|
6897
|
+
categoryIds: z88.array(z88.string().uuid()).optional(),
|
6898
|
+
customFields: z88.array(
|
6899
|
+
z88.object({
|
6900
|
+
id: z88.string().uuid(),
|
6901
|
+
type: z88.string(),
|
6902
|
+
value: z88.string()
|
6809
6903
|
})
|
6810
6904
|
).optional(),
|
6811
|
-
durationSeconds:
|
6905
|
+
durationSeconds: z88.number().optional()
|
6812
6906
|
});
|
6813
|
-
var CreateCXLogWrapUpFormSchema =
|
6814
|
-
cxLogId:
|
6815
|
-
disposition:
|
6816
|
-
tagIds:
|
6817
|
-
note:
|
6907
|
+
var CreateCXLogWrapUpFormSchema = z88.object({
|
6908
|
+
cxLogId: z88.string().uuid(),
|
6909
|
+
disposition: z88.string().optional(),
|
6910
|
+
tagIds: z88.array(z88.string().uuid()).optional(),
|
6911
|
+
note: z88.string().optional()
|
6818
6912
|
});
|
6819
6913
|
|
6820
6914
|
// src/wrap-up-form/index.ts
|
@@ -6826,10 +6920,10 @@ var wrapUpFormContract = initContract30().router(
|
|
6826
6920
|
headers: DefaultHeaderSchema,
|
6827
6921
|
responses: {
|
6828
6922
|
200: DefaultSuccessResponseSchema.extend({
|
6829
|
-
wrapUpFormTimer:
|
6923
|
+
wrapUpFormTimer: z89.number()
|
6830
6924
|
}),
|
6831
|
-
400:
|
6832
|
-
message:
|
6925
|
+
400: z89.object({
|
6926
|
+
message: z89.string()
|
6833
6927
|
}),
|
6834
6928
|
401: DefaultUnauthorizedSchema,
|
6835
6929
|
500: DefaultErrorResponseSchema
|
@@ -6838,14 +6932,14 @@ var wrapUpFormContract = initContract30().router(
|
|
6838
6932
|
updateWrapUpFormTimer: {
|
6839
6933
|
method: "PATCH",
|
6840
6934
|
path: "/timer",
|
6841
|
-
body:
|
6935
|
+
body: z89.object({ newWrapUpFormTimer: z89.number().positive() }),
|
6842
6936
|
headers: DefaultHeaderSchema,
|
6843
6937
|
responses: {
|
6844
6938
|
200: DefaultSuccessResponseSchema.extend({
|
6845
|
-
wrapUpFormTimer:
|
6939
|
+
wrapUpFormTimer: z89.number()
|
6846
6940
|
}),
|
6847
|
-
400:
|
6848
|
-
message:
|
6941
|
+
400: z89.object({
|
6942
|
+
message: z89.string()
|
6849
6943
|
}),
|
6850
6944
|
401: DefaultUnauthorizedSchema,
|
6851
6945
|
500: DefaultErrorResponseSchema
|
@@ -6860,8 +6954,8 @@ var wrapUpFormContract = initContract30().router(
|
|
6860
6954
|
201: DefaultSuccessResponseSchema.extend({
|
6861
6955
|
wrapUpForm: WrapUpFormSchema
|
6862
6956
|
}),
|
6863
|
-
400:
|
6864
|
-
message:
|
6957
|
+
400: z89.object({
|
6958
|
+
message: z89.string()
|
6865
6959
|
}),
|
6866
6960
|
401: DefaultUnauthorizedSchema,
|
6867
6961
|
500: DefaultErrorResponseSchema
|
@@ -6883,15 +6977,15 @@ var wrapUpFormContract = initContract30().router(
|
|
6883
6977
|
getWrapUpForms: {
|
6884
6978
|
method: "GET",
|
6885
6979
|
path: "",
|
6886
|
-
query:
|
6887
|
-
page:
|
6888
|
-
pageSize:
|
6980
|
+
query: z89.object({
|
6981
|
+
page: z89.coerce.number().default(1),
|
6982
|
+
pageSize: z89.coerce.number().default(10)
|
6889
6983
|
}).optional(),
|
6890
6984
|
headers: DefaultHeaderSchema,
|
6891
6985
|
responses: {
|
6892
6986
|
200: WithPagination(WrapUpFormSchema),
|
6893
|
-
400:
|
6894
|
-
message:
|
6987
|
+
400: z89.object({
|
6988
|
+
message: z89.string()
|
6895
6989
|
}),
|
6896
6990
|
401: DefaultUnauthorizedSchema,
|
6897
6991
|
500: DefaultErrorResponseSchema
|
@@ -6901,12 +6995,12 @@ var wrapUpFormContract = initContract30().router(
|
|
6901
6995
|
getWrapUpForm: {
|
6902
6996
|
method: "GET",
|
6903
6997
|
path: "/:id",
|
6904
|
-
pathParams:
|
6998
|
+
pathParams: z89.object({ id: z89.string() }),
|
6905
6999
|
headers: DefaultHeaderSchema,
|
6906
7000
|
responses: {
|
6907
7001
|
200: WrapUpFormSchema,
|
6908
|
-
400:
|
6909
|
-
message:
|
7002
|
+
400: z89.object({
|
7003
|
+
message: z89.string()
|
6910
7004
|
}),
|
6911
7005
|
401: DefaultUnauthorizedSchema,
|
6912
7006
|
500: DefaultErrorResponseSchema
|
@@ -6915,15 +7009,15 @@ var wrapUpFormContract = initContract30().router(
|
|
6915
7009
|
updateWrapUpForm: {
|
6916
7010
|
method: "PATCH",
|
6917
7011
|
path: "/:id",
|
6918
|
-
pathParams:
|
7012
|
+
pathParams: z89.object({ id: z89.string() }),
|
6919
7013
|
headers: DefaultHeaderSchema,
|
6920
7014
|
body: UpdateWrapUpFormSchema,
|
6921
7015
|
responses: {
|
6922
7016
|
201: DefaultSuccessResponseSchema.extend({
|
6923
7017
|
wrapUpForm: WrapUpFormSchema
|
6924
7018
|
}),
|
6925
|
-
400:
|
6926
|
-
message:
|
7019
|
+
400: z89.object({
|
7020
|
+
message: z89.string()
|
6927
7021
|
}),
|
6928
7022
|
401: DefaultUnauthorizedSchema,
|
6929
7023
|
500: DefaultErrorResponseSchema
|
@@ -6936,28 +7030,28 @@ var wrapUpFormContract = initContract30().router(
|
|
6936
7030
|
|
6937
7031
|
// src/upload/index.ts
|
6938
7032
|
import { initContract as initContract31 } from "@ts-rest/core";
|
6939
|
-
import
|
7033
|
+
import z90 from "zod";
|
6940
7034
|
var uploadContract = initContract31().router(
|
6941
7035
|
{
|
6942
7036
|
rename: {
|
6943
7037
|
method: "POST",
|
6944
7038
|
path: "/:id/rename",
|
6945
|
-
pathParams:
|
6946
|
-
id:
|
7039
|
+
pathParams: z90.object({
|
7040
|
+
id: z90.string()
|
6947
7041
|
}),
|
6948
7042
|
headers: DefaultHeaderSchema,
|
6949
7043
|
responses: {
|
6950
7044
|
201: DefaultSuccessResponseSchema.extend({
|
6951
|
-
message:
|
7045
|
+
message: z90.string()
|
6952
7046
|
}),
|
6953
|
-
400:
|
6954
|
-
message:
|
7047
|
+
400: z90.object({
|
7048
|
+
message: z90.string()
|
6955
7049
|
}),
|
6956
|
-
409:
|
6957
|
-
message:
|
7050
|
+
409: z90.object({
|
7051
|
+
message: z90.string()
|
6958
7052
|
}),
|
6959
|
-
500:
|
6960
|
-
message:
|
7053
|
+
500: z90.object({
|
7054
|
+
message: z90.string()
|
6961
7055
|
}),
|
6962
7056
|
401: DefaultUnauthorizedSchema,
|
6963
7057
|
404: DefaultNotFoundSchema,
|
@@ -6969,23 +7063,23 @@ var uploadContract = initContract31().router(
|
|
6969
7063
|
delete: {
|
6970
7064
|
method: "DELETE",
|
6971
7065
|
path: "/:id",
|
6972
|
-
pathParams:
|
6973
|
-
id:
|
7066
|
+
pathParams: z90.object({
|
7067
|
+
id: z90.string()
|
6974
7068
|
}),
|
6975
7069
|
headers: DefaultHeaderSchema,
|
6976
7070
|
body: null,
|
6977
7071
|
responses: {
|
6978
7072
|
201: DefaultSuccessResponseSchema.extend({
|
6979
|
-
message:
|
7073
|
+
message: z90.string()
|
6980
7074
|
}),
|
6981
|
-
400:
|
6982
|
-
message:
|
7075
|
+
400: z90.object({
|
7076
|
+
message: z90.string()
|
6983
7077
|
}),
|
6984
|
-
409:
|
6985
|
-
message:
|
7078
|
+
409: z90.object({
|
7079
|
+
message: z90.string()
|
6986
7080
|
}),
|
6987
|
-
500:
|
6988
|
-
message:
|
7081
|
+
500: z90.object({
|
7082
|
+
message: z90.string()
|
6989
7083
|
}),
|
6990
7084
|
401: DefaultUnauthorizedSchema,
|
6991
7085
|
404: DefaultNotFoundSchema,
|
@@ -7000,19 +7094,19 @@ var uploadContract = initContract31().router(
|
|
7000
7094
|
);
|
7001
7095
|
|
7002
7096
|
// src/viber/index.ts
|
7003
|
-
import
|
7097
|
+
import z92 from "zod";
|
7004
7098
|
|
7005
7099
|
// src/viber/validation.ts
|
7006
|
-
import
|
7007
|
-
var ViberChannelSchema =
|
7008
|
-
name:
|
7009
|
-
accessToken:
|
7010
|
-
actor:
|
7011
|
-
id:
|
7012
|
-
name:
|
7013
|
-
email:
|
7014
|
-
address:
|
7015
|
-
phone:
|
7100
|
+
import z91 from "zod";
|
7101
|
+
var ViberChannelSchema = z91.object({
|
7102
|
+
name: z91.string(),
|
7103
|
+
accessToken: z91.string(),
|
7104
|
+
actor: z91.object({
|
7105
|
+
id: z91.string().uuid(),
|
7106
|
+
name: z91.string(),
|
7107
|
+
email: z91.string().email(),
|
7108
|
+
address: z91.string().nullable(),
|
7109
|
+
phone: z91.string().nullable()
|
7016
7110
|
}).optional()
|
7017
7111
|
});
|
7018
7112
|
|
@@ -7041,8 +7135,8 @@ var viberContract = initContract32().router({
|
|
7041
7135
|
}),
|
7042
7136
|
400: DefaultErrorResponseSchema
|
7043
7137
|
},
|
7044
|
-
body:
|
7045
|
-
id:
|
7138
|
+
body: z92.object({
|
7139
|
+
id: z92.string().uuid()
|
7046
7140
|
}),
|
7047
7141
|
summary: "Connect viber channel"
|
7048
7142
|
},
|
@@ -7058,8 +7152,8 @@ var viberContract = initContract32().router({
|
|
7058
7152
|
reconnect: {
|
7059
7153
|
method: "POST",
|
7060
7154
|
path: "/reconnect/:channelId",
|
7061
|
-
pathParams:
|
7062
|
-
channelId:
|
7155
|
+
pathParams: z92.object({
|
7156
|
+
channelId: z92.string().uuid()
|
7063
7157
|
}),
|
7064
7158
|
responses: {
|
7065
7159
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7074,8 +7168,8 @@ var viberContract = initContract32().router({
|
|
7074
7168
|
delete: {
|
7075
7169
|
method: "DELETE",
|
7076
7170
|
path: "/delete/:channelId",
|
7077
|
-
pathParams:
|
7078
|
-
channelId:
|
7171
|
+
pathParams: z92.object({
|
7172
|
+
channelId: z92.string().uuid()
|
7079
7173
|
}),
|
7080
7174
|
body: null,
|
7081
7175
|
responses: {
|
@@ -7087,21 +7181,21 @@ var viberContract = initContract32().router({
|
|
7087
7181
|
});
|
7088
7182
|
|
7089
7183
|
// src/telegram/index.ts
|
7090
|
-
import
|
7184
|
+
import z94 from "zod";
|
7091
7185
|
import { initContract as initContract33 } from "@ts-rest/core";
|
7092
7186
|
|
7093
7187
|
// src/telegram/validation.ts
|
7094
|
-
import
|
7095
|
-
var TelegramChannelSchema =
|
7096
|
-
name:
|
7188
|
+
import z93 from "zod";
|
7189
|
+
var TelegramChannelSchema = z93.object({
|
7190
|
+
name: z93.string(),
|
7097
7191
|
// Telegram bot access token
|
7098
|
-
accessToken:
|
7099
|
-
actor:
|
7100
|
-
id:
|
7101
|
-
name:
|
7102
|
-
email:
|
7103
|
-
address:
|
7104
|
-
phone:
|
7192
|
+
accessToken: z93.string(),
|
7193
|
+
actor: z93.object({
|
7194
|
+
id: z93.string().uuid(),
|
7195
|
+
name: z93.string(),
|
7196
|
+
email: z93.string().email(),
|
7197
|
+
address: z93.string().nullable(),
|
7198
|
+
phone: z93.string().nullable()
|
7105
7199
|
}).optional()
|
7106
7200
|
});
|
7107
7201
|
|
@@ -7128,8 +7222,8 @@ var telegramContract = initContract33().router({
|
|
7128
7222
|
500: DefaultErrorResponseSchema,
|
7129
7223
|
400: DefaultErrorResponseSchema
|
7130
7224
|
},
|
7131
|
-
body:
|
7132
|
-
id:
|
7225
|
+
body: z94.object({
|
7226
|
+
id: z94.string().uuid()
|
7133
7227
|
}),
|
7134
7228
|
summary: "Disconnect telegram channel"
|
7135
7229
|
},
|
@@ -7145,8 +7239,8 @@ var telegramContract = initContract33().router({
|
|
7145
7239
|
reconnect: {
|
7146
7240
|
method: "POST",
|
7147
7241
|
path: "/reconnect/:channelId",
|
7148
|
-
pathParams:
|
7149
|
-
channelId:
|
7242
|
+
pathParams: z94.object({
|
7243
|
+
channelId: z94.string().uuid()
|
7150
7244
|
}),
|
7151
7245
|
body: null,
|
7152
7246
|
responses: {
|
@@ -7159,8 +7253,8 @@ var telegramContract = initContract33().router({
|
|
7159
7253
|
delete: {
|
7160
7254
|
method: "DELETE",
|
7161
7255
|
path: "/delete/:channelId",
|
7162
|
-
pathParams:
|
7163
|
-
channelId:
|
7256
|
+
pathParams: z94.object({
|
7257
|
+
channelId: z94.string().uuid()
|
7164
7258
|
}),
|
7165
7259
|
body: null,
|
7166
7260
|
responses: {
|
@@ -7174,58 +7268,58 @@ var telegramContract = initContract33().router({
|
|
7174
7268
|
|
7175
7269
|
// src/notification/index.ts
|
7176
7270
|
import { initContract as initContract34 } from "@ts-rest/core";
|
7177
|
-
import
|
7271
|
+
import z97 from "zod";
|
7178
7272
|
|
7179
7273
|
// src/notification/validation.ts
|
7180
|
-
import
|
7274
|
+
import z96 from "zod";
|
7181
7275
|
|
7182
7276
|
// src/notification/schema.ts
|
7183
|
-
import
|
7184
|
-
var NotificationChangeSchema =
|
7185
|
-
id:
|
7186
|
-
createdAt:
|
7187
|
-
updatedAt:
|
7188
|
-
deletedAt:
|
7189
|
-
actorId:
|
7277
|
+
import z95 from "zod";
|
7278
|
+
var NotificationChangeSchema = z95.object({
|
7279
|
+
id: z95.string().uuid(),
|
7280
|
+
createdAt: z95.date(),
|
7281
|
+
updatedAt: z95.date(),
|
7282
|
+
deletedAt: z95.date().nullable(),
|
7283
|
+
actorId: z95.string().uuid(),
|
7190
7284
|
actor: UserSchema,
|
7191
|
-
notificationObjectId:
|
7192
|
-
readAt:
|
7193
|
-
});
|
7194
|
-
var NotificationObjectSchema =
|
7195
|
-
id:
|
7196
|
-
createdAt:
|
7197
|
-
updatedAt:
|
7198
|
-
deletedAt:
|
7199
|
-
data:
|
7285
|
+
notificationObjectId: z95.string().uuid(),
|
7286
|
+
readAt: z95.date()
|
7287
|
+
});
|
7288
|
+
var NotificationObjectSchema = z95.object({
|
7289
|
+
id: z95.string().uuid(),
|
7290
|
+
createdAt: z95.date(),
|
7291
|
+
updatedAt: z95.date(),
|
7292
|
+
deletedAt: z95.date().nullable(),
|
7293
|
+
data: z95.string(),
|
7200
7294
|
notificationChange: NotificationChangeSchema
|
7201
7295
|
});
|
7202
|
-
var NotificationSchema =
|
7203
|
-
id:
|
7204
|
-
createdAt:
|
7205
|
-
updatedAt:
|
7206
|
-
deletedAt:
|
7207
|
-
notificationObjectId:
|
7208
|
-
notifierId:
|
7296
|
+
var NotificationSchema = z95.object({
|
7297
|
+
id: z95.string().uuid(),
|
7298
|
+
createdAt: z95.date(),
|
7299
|
+
updatedAt: z95.date(),
|
7300
|
+
deletedAt: z95.date().nullable(),
|
7301
|
+
notificationObjectId: z95.string().uuid(),
|
7302
|
+
notifierId: z95.string().uuid(),
|
7209
7303
|
notificationObject: NotificationObjectSchema,
|
7210
|
-
readAt:
|
7304
|
+
readAt: z95.date()
|
7211
7305
|
});
|
7212
7306
|
|
7213
7307
|
// src/notification/validation.ts
|
7214
|
-
var GetNotificationsRequestSchema =
|
7215
|
-
page:
|
7216
|
-
pageSize:
|
7308
|
+
var GetNotificationsRequestSchema = z96.object({
|
7309
|
+
page: z96.coerce.number().default(1),
|
7310
|
+
pageSize: z96.coerce.number().default(10)
|
7217
7311
|
});
|
7218
|
-
var GetNotificationsResponseSchema =
|
7219
|
-
notificationCount:
|
7220
|
-
notifications:
|
7221
|
-
total:
|
7222
|
-
page:
|
7223
|
-
pageSize:
|
7224
|
-
lastPage:
|
7225
|
-
totalUnreadCount:
|
7312
|
+
var GetNotificationsResponseSchema = z96.object({
|
7313
|
+
notificationCount: z96.number(),
|
7314
|
+
notifications: z96.array(NotificationSchema),
|
7315
|
+
total: z96.number(),
|
7316
|
+
page: z96.number(),
|
7317
|
+
pageSize: z96.number(),
|
7318
|
+
lastPage: z96.number(),
|
7319
|
+
totalUnreadCount: z96.number().optional()
|
7226
7320
|
});
|
7227
|
-
var ResetNotificationRequestSchema =
|
7228
|
-
userId:
|
7321
|
+
var ResetNotificationRequestSchema = z96.object({
|
7322
|
+
userId: z96.string()
|
7229
7323
|
});
|
7230
7324
|
|
7231
7325
|
// src/notification/index.ts
|
@@ -7239,14 +7333,14 @@ var userNotificationContract = initContract34().router(
|
|
7239
7333
|
200: DefaultSuccessResponseSchema.extend({
|
7240
7334
|
data: GetNotificationsResponseSchema
|
7241
7335
|
}),
|
7242
|
-
400:
|
7243
|
-
message:
|
7336
|
+
400: z97.object({
|
7337
|
+
message: z97.string()
|
7244
7338
|
}),
|
7245
|
-
409:
|
7246
|
-
message:
|
7339
|
+
409: z97.object({
|
7340
|
+
message: z97.string()
|
7247
7341
|
}),
|
7248
|
-
500:
|
7249
|
-
message:
|
7342
|
+
500: z97.object({
|
7343
|
+
message: z97.string()
|
7250
7344
|
}),
|
7251
7345
|
401: DefaultUnauthorizedSchema,
|
7252
7346
|
404: DefaultNotFoundSchema,
|
@@ -7259,16 +7353,16 @@ var userNotificationContract = initContract34().router(
|
|
7259
7353
|
path: "/new_notifications_count",
|
7260
7354
|
responses: {
|
7261
7355
|
200: DefaultSuccessResponseSchema.extend({
|
7262
|
-
total:
|
7356
|
+
total: z97.number()
|
7263
7357
|
}),
|
7264
|
-
400:
|
7265
|
-
message:
|
7358
|
+
400: z97.object({
|
7359
|
+
message: z97.string()
|
7266
7360
|
}),
|
7267
|
-
409:
|
7268
|
-
message:
|
7361
|
+
409: z97.object({
|
7362
|
+
message: z97.string()
|
7269
7363
|
}),
|
7270
|
-
500:
|
7271
|
-
message:
|
7364
|
+
500: z97.object({
|
7365
|
+
message: z97.string()
|
7272
7366
|
}),
|
7273
7367
|
401: DefaultUnauthorizedSchema,
|
7274
7368
|
404: DefaultNotFoundSchema,
|
@@ -7283,14 +7377,14 @@ var userNotificationContract = initContract34().router(
|
|
7283
7377
|
201: DefaultSuccessResponseSchema.extend({
|
7284
7378
|
data: UserSchema
|
7285
7379
|
}),
|
7286
|
-
400:
|
7287
|
-
message:
|
7380
|
+
400: z97.object({
|
7381
|
+
message: z97.string()
|
7288
7382
|
}),
|
7289
|
-
409:
|
7290
|
-
message:
|
7383
|
+
409: z97.object({
|
7384
|
+
message: z97.string()
|
7291
7385
|
}),
|
7292
|
-
500:
|
7293
|
-
message:
|
7386
|
+
500: z97.object({
|
7387
|
+
message: z97.string()
|
7294
7388
|
}),
|
7295
7389
|
401: DefaultUnauthorizedSchema,
|
7296
7390
|
404: DefaultNotFoundSchema,
|
@@ -7302,19 +7396,19 @@ var userNotificationContract = initContract34().router(
|
|
7302
7396
|
readNotification: {
|
7303
7397
|
method: "POST",
|
7304
7398
|
path: "/read/:id",
|
7305
|
-
pathParams:
|
7399
|
+
pathParams: z97.object({ id: z97.string() }),
|
7306
7400
|
responses: {
|
7307
7401
|
201: DefaultSuccessResponseSchema.extend({
|
7308
7402
|
data: NotificationSchema
|
7309
7403
|
}),
|
7310
|
-
400:
|
7311
|
-
message:
|
7404
|
+
400: z97.object({
|
7405
|
+
message: z97.string()
|
7312
7406
|
}),
|
7313
|
-
409:
|
7314
|
-
message:
|
7407
|
+
409: z97.object({
|
7408
|
+
message: z97.string()
|
7315
7409
|
}),
|
7316
|
-
500:
|
7317
|
-
message:
|
7410
|
+
500: z97.object({
|
7411
|
+
message: z97.string()
|
7318
7412
|
}),
|
7319
7413
|
401: DefaultUnauthorizedSchema,
|
7320
7414
|
404: DefaultNotFoundSchema,
|
@@ -7331,63 +7425,63 @@ var userNotificationContract = initContract34().router(
|
|
7331
7425
|
|
7332
7426
|
// src/snippet/index.ts
|
7333
7427
|
import { initContract as initContract35 } from "@ts-rest/core";
|
7334
|
-
import { z as
|
7428
|
+
import { z as z100 } from "zod";
|
7335
7429
|
|
7336
7430
|
// src/snippet/schema.ts
|
7337
|
-
import
|
7431
|
+
import z98 from "zod";
|
7338
7432
|
var SnippetGroupSchema = DefaultEntitySchema.extend({
|
7339
|
-
name:
|
7340
|
-
platformType:
|
7433
|
+
name: z98.string(),
|
7434
|
+
platformType: z98.string()
|
7341
7435
|
});
|
7342
7436
|
var SnippetContentSchema = DefaultEntitySchema.extend({
|
7343
|
-
contentType:
|
7344
|
-
contentValue:
|
7345
|
-
contentTemplate:
|
7346
|
-
order:
|
7437
|
+
contentType: z98.string(),
|
7438
|
+
contentValue: z98.string().nullable(),
|
7439
|
+
contentTemplate: z98.any().nullable(),
|
7440
|
+
order: z98.number(),
|
7347
7441
|
upload: UploadSchema.nullable()
|
7348
7442
|
});
|
7349
7443
|
var SnippetSchema = DefaultEntitySchema.extend({
|
7350
|
-
name:
|
7444
|
+
name: z98.string(),
|
7351
7445
|
snippetGroup: SnippetGroupSchema,
|
7352
7446
|
snippetContent: SnippetContentSchema
|
7353
7447
|
});
|
7354
|
-
var SnippetGroupListItemSchema =
|
7355
|
-
id:
|
7356
|
-
name:
|
7448
|
+
var SnippetGroupListItemSchema = z98.object({
|
7449
|
+
id: z98.string().uuid(),
|
7450
|
+
name: z98.string()
|
7357
7451
|
});
|
7358
|
-
var SnippetListItemSchema =
|
7359
|
-
id:
|
7360
|
-
shortCutName:
|
7361
|
-
contentType:
|
7362
|
-
contentValue:
|
7363
|
-
snippetGroupId:
|
7452
|
+
var SnippetListItemSchema = z98.object({
|
7453
|
+
id: z98.string().uuid(),
|
7454
|
+
shortCutName: z98.string(),
|
7455
|
+
contentType: z98.string(),
|
7456
|
+
contentValue: z98.string().nullable(),
|
7457
|
+
snippetGroupId: z98.string()
|
7364
7458
|
});
|
7365
7459
|
|
7366
7460
|
// src/snippet/validation.ts
|
7367
|
-
import { z as
|
7368
|
-
var CreateSnippetGroupSchema =
|
7369
|
-
name:
|
7370
|
-
platformType:
|
7461
|
+
import { z as z99 } from "zod";
|
7462
|
+
var CreateSnippetGroupSchema = z99.object({
|
7463
|
+
name: z99.string(),
|
7464
|
+
platformType: z99.string()
|
7371
7465
|
});
|
7372
|
-
var UpdateSnippetGroupSchema =
|
7373
|
-
name:
|
7374
|
-
platformType:
|
7466
|
+
var UpdateSnippetGroupSchema = z99.object({
|
7467
|
+
name: z99.string().optional(),
|
7468
|
+
platformType: z99.string().optional()
|
7375
7469
|
});
|
7376
|
-
var DeleteSnippetGroupSchema =
|
7377
|
-
id:
|
7470
|
+
var DeleteSnippetGroupSchema = z99.object({
|
7471
|
+
id: z99.string()
|
7378
7472
|
});
|
7379
|
-
var CreateSnippetSchema =
|
7380
|
-
shortcutName:
|
7381
|
-
contentType:
|
7382
|
-
contentValue:
|
7383
|
-
snippetGroupId:
|
7384
|
-
platformType:
|
7473
|
+
var CreateSnippetSchema = z99.object({
|
7474
|
+
shortcutName: z99.string(),
|
7475
|
+
contentType: z99.string(),
|
7476
|
+
contentValue: z99.string().optional(),
|
7477
|
+
snippetGroupId: z99.string(),
|
7478
|
+
platformType: z99.string()
|
7385
7479
|
});
|
7386
7480
|
var UpdateSnippetSchema = CreateSnippetSchema.extend({
|
7387
|
-
snippetContentId:
|
7481
|
+
snippetContentId: z99.string()
|
7388
7482
|
});
|
7389
|
-
var DeleteSnippetSchema =
|
7390
|
-
snippetId:
|
7483
|
+
var DeleteSnippetSchema = z99.object({
|
7484
|
+
snippetId: z99.string()
|
7391
7485
|
});
|
7392
7486
|
|
7393
7487
|
// src/snippet/index.ts
|
@@ -7410,7 +7504,7 @@ var snippetContract = initContract35().router(
|
|
7410
7504
|
query: null,
|
7411
7505
|
responses: {
|
7412
7506
|
200: DefaultSuccessResponseSchema.extend({
|
7413
|
-
snippetgroups:
|
7507
|
+
snippetgroups: z100.array(SnippetGroupSchema)
|
7414
7508
|
}),
|
7415
7509
|
500: DefaultErrorResponseSchema
|
7416
7510
|
}
|
@@ -7418,7 +7512,7 @@ var snippetContract = initContract35().router(
|
|
7418
7512
|
updateSnippetGroup: {
|
7419
7513
|
method: "PATCH",
|
7420
7514
|
path: "/groups/:id",
|
7421
|
-
pathParams:
|
7515
|
+
pathParams: z100.object({ id: z100.string() }),
|
7422
7516
|
body: UpdateSnippetGroupSchema,
|
7423
7517
|
responses: {
|
7424
7518
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7430,7 +7524,7 @@ var snippetContract = initContract35().router(
|
|
7430
7524
|
deleteSnippetGroup: {
|
7431
7525
|
method: "DELETE",
|
7432
7526
|
path: "/groups/:id",
|
7433
|
-
pathParams:
|
7527
|
+
pathParams: z100.object({ id: z100.string() }),
|
7434
7528
|
body: null,
|
7435
7529
|
responses: {
|
7436
7530
|
200: DefaultSuccessResponseSchema,
|
@@ -7442,7 +7536,7 @@ var snippetContract = initContract35().router(
|
|
7442
7536
|
path: "",
|
7443
7537
|
responses: {
|
7444
7538
|
200: DefaultSuccessResponseSchema.extend({
|
7445
|
-
snippets:
|
7539
|
+
snippets: z100.array(SnippetSchema)
|
7446
7540
|
}),
|
7447
7541
|
500: DefaultErrorResponseSchema
|
7448
7542
|
}
|
@@ -7461,7 +7555,7 @@ var snippetContract = initContract35().router(
|
|
7461
7555
|
updateSnippet: {
|
7462
7556
|
method: "PATCH",
|
7463
7557
|
path: "/:id",
|
7464
|
-
pathParams:
|
7558
|
+
pathParams: z100.object({ id: z100.string() }),
|
7465
7559
|
body: UpdateSnippetSchema,
|
7466
7560
|
responses: {
|
7467
7561
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7473,7 +7567,7 @@ var snippetContract = initContract35().router(
|
|
7473
7567
|
deleteSnippet: {
|
7474
7568
|
method: "DELETE",
|
7475
7569
|
path: "/:id",
|
7476
|
-
pathParams:
|
7570
|
+
pathParams: z100.object({ id: z100.string() }),
|
7477
7571
|
body: null,
|
7478
7572
|
responses: {
|
7479
7573
|
200: DefaultSuccessResponseSchema,
|
@@ -7490,77 +7584,77 @@ var snippetContract = initContract35().router(
|
|
7490
7584
|
import { initContract as initContract36 } from "@ts-rest/core";
|
7491
7585
|
|
7492
7586
|
// src/business-calendar/validation.ts
|
7493
|
-
import
|
7494
|
-
var TimeSlotDataSchema =
|
7495
|
-
var CreateBusinessHourSchema =
|
7496
|
-
day:
|
7497
|
-
isEnabled:
|
7587
|
+
import z101 from "zod";
|
7588
|
+
var TimeSlotDataSchema = z101.any();
|
7589
|
+
var CreateBusinessHourSchema = z101.object({
|
7590
|
+
day: z101.string(),
|
7591
|
+
isEnabled: z101.boolean(),
|
7498
7592
|
timeSlots: TimeSlotDataSchema
|
7499
7593
|
}).array();
|
7500
|
-
var UpdateBusinessHourSchema =
|
7501
|
-
id:
|
7502
|
-
day:
|
7503
|
-
isEnabled:
|
7594
|
+
var UpdateBusinessHourSchema = z101.object({
|
7595
|
+
id: z101.string(),
|
7596
|
+
day: z101.string(),
|
7597
|
+
isEnabled: z101.boolean(),
|
7504
7598
|
timeSlots: TimeSlotDataSchema
|
7505
7599
|
}).array();
|
7506
|
-
var CreateHolidaySchema =
|
7507
|
-
name:
|
7508
|
-
date:
|
7509
|
-
isEnabled:
|
7600
|
+
var CreateHolidaySchema = z101.object({
|
7601
|
+
name: z101.string(),
|
7602
|
+
date: z101.string(),
|
7603
|
+
isEnabled: z101.boolean()
|
7510
7604
|
}).array();
|
7511
|
-
var UpdateHolidaySchema =
|
7512
|
-
id:
|
7513
|
-
name:
|
7514
|
-
date:
|
7515
|
-
isEnabled:
|
7605
|
+
var UpdateHolidaySchema = z101.object({
|
7606
|
+
id: z101.string().optional(),
|
7607
|
+
name: z101.string(),
|
7608
|
+
date: z101.string(),
|
7609
|
+
isEnabled: z101.boolean()
|
7516
7610
|
}).array();
|
7517
|
-
var CreateBusinessCalendarSchema =
|
7518
|
-
name:
|
7519
|
-
description:
|
7520
|
-
timeZone:
|
7521
|
-
isEnabled:
|
7611
|
+
var CreateBusinessCalendarSchema = z101.object({
|
7612
|
+
name: z101.string(),
|
7613
|
+
description: z101.string().optional(),
|
7614
|
+
timeZone: z101.string(),
|
7615
|
+
isEnabled: z101.boolean(),
|
7522
7616
|
businessHours: CreateBusinessHourSchema,
|
7523
7617
|
holidays: CreateHolidaySchema
|
7524
7618
|
});
|
7525
|
-
var UpdateBusinessCalendarSchema =
|
7526
|
-
id:
|
7527
|
-
name:
|
7528
|
-
description:
|
7529
|
-
timeZone:
|
7530
|
-
isEnabled:
|
7619
|
+
var UpdateBusinessCalendarSchema = z101.object({
|
7620
|
+
id: z101.string(),
|
7621
|
+
name: z101.string(),
|
7622
|
+
description: z101.string().optional(),
|
7623
|
+
timeZone: z101.string(),
|
7624
|
+
isEnabled: z101.boolean(),
|
7531
7625
|
businessHours: UpdateBusinessHourSchema,
|
7532
7626
|
holidays: UpdateHolidaySchema
|
7533
7627
|
});
|
7534
|
-
var DeleteBusinessCalendarSchema =
|
7535
|
-
id:
|
7628
|
+
var DeleteBusinessCalendarSchema = z101.object({
|
7629
|
+
id: z101.string()
|
7536
7630
|
});
|
7537
7631
|
|
7538
7632
|
// src/business-calendar/schema.ts
|
7539
|
-
import
|
7540
|
-
var TimeSlotDataSchema2 =
|
7633
|
+
import z102 from "zod";
|
7634
|
+
var TimeSlotDataSchema2 = z102.any();
|
7541
7635
|
var BusinessHourSchema = DefaultEntitySchema.extend({
|
7542
|
-
day:
|
7543
|
-
isEnabled:
|
7636
|
+
day: z102.string(),
|
7637
|
+
isEnabled: z102.boolean(),
|
7544
7638
|
timeSlots: TimeSlotDataSchema2
|
7545
7639
|
});
|
7546
7640
|
var HolidaySchema = DefaultEntitySchema.extend({
|
7547
|
-
name:
|
7548
|
-
date:
|
7549
|
-
isEnabled:
|
7550
|
-
isDefault:
|
7641
|
+
name: z102.string(),
|
7642
|
+
date: z102.string(),
|
7643
|
+
isEnabled: z102.boolean(),
|
7644
|
+
isDefault: z102.boolean()
|
7551
7645
|
});
|
7552
7646
|
var BusinessCalendarSchema = DefaultEntitySchema.extend({
|
7553
|
-
name:
|
7554
|
-
description:
|
7555
|
-
timeZone:
|
7556
|
-
isEnabled:
|
7557
|
-
isDefault:
|
7647
|
+
name: z102.string(),
|
7648
|
+
description: z102.string().optional(),
|
7649
|
+
timeZone: z102.string(),
|
7650
|
+
isEnabled: z102.boolean(),
|
7651
|
+
isDefault: z102.boolean(),
|
7558
7652
|
businessHours: BusinessHourSchema.array(),
|
7559
7653
|
holidays: HolidaySchema.array()
|
7560
7654
|
});
|
7561
7655
|
|
7562
7656
|
// src/business-calendar/index.ts
|
7563
|
-
import
|
7657
|
+
import z103 from "zod";
|
7564
7658
|
var businessCalendarContract = initContract36().router({
|
7565
7659
|
createBusinessCalendar: {
|
7566
7660
|
method: "POST",
|
@@ -7586,7 +7680,7 @@ var businessCalendarContract = initContract36().router({
|
|
7586
7680
|
updateBusinessCalendar: {
|
7587
7681
|
method: "POST",
|
7588
7682
|
path: "business-calendars/:id",
|
7589
|
-
pathParams:
|
7683
|
+
pathParams: z103.object({ id: z103.string() }),
|
7590
7684
|
body: UpdateBusinessCalendarSchema,
|
7591
7685
|
responses: {
|
7592
7686
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -7598,7 +7692,7 @@ var businessCalendarContract = initContract36().router({
|
|
7598
7692
|
deleteBusinessCalendar: {
|
7599
7693
|
method: "DELETE",
|
7600
7694
|
path: "business-calendars/:id",
|
7601
|
-
pathParams:
|
7695
|
+
pathParams: z103.object({ id: z103.string() }),
|
7602
7696
|
body: null,
|
7603
7697
|
responses: {
|
7604
7698
|
200: DefaultSuccessResponseSchema,
|
@@ -7611,73 +7705,73 @@ var businessCalendarContract = initContract36().router({
|
|
7611
7705
|
import { initContract as initContract37 } from "@ts-rest/core";
|
7612
7706
|
|
7613
7707
|
// src/facebook-feed/validation.ts
|
7614
|
-
import
|
7615
|
-
var GetFacebookPagesSchema2 =
|
7616
|
-
data:
|
7617
|
-
|
7708
|
+
import z104 from "zod";
|
7709
|
+
var GetFacebookPagesSchema2 = z104.object({
|
7710
|
+
data: z104.array(
|
7711
|
+
z104.object({
|
7618
7712
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
7619
|
-
access_token:
|
7620
|
-
category:
|
7713
|
+
access_token: z104.string(),
|
7714
|
+
category: z104.string(),
|
7621
7715
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
7622
|
-
category_list:
|
7623
|
-
|
7624
|
-
id:
|
7625
|
-
name:
|
7716
|
+
category_list: z104.array(
|
7717
|
+
z104.object({
|
7718
|
+
id: z104.string(),
|
7719
|
+
name: z104.string()
|
7626
7720
|
})
|
7627
7721
|
),
|
7628
|
-
id:
|
7629
|
-
name:
|
7630
|
-
tasks:
|
7722
|
+
id: z104.string(),
|
7723
|
+
name: z104.string(),
|
7724
|
+
tasks: z104.string().array()
|
7631
7725
|
})
|
7632
7726
|
),
|
7633
|
-
paging:
|
7634
|
-
cursors:
|
7635
|
-
before:
|
7636
|
-
after:
|
7727
|
+
paging: z104.object({
|
7728
|
+
cursors: z104.object({
|
7729
|
+
before: z104.string().optional(),
|
7730
|
+
after: z104.string().optional()
|
7637
7731
|
})
|
7638
7732
|
}).optional()
|
7639
7733
|
});
|
7640
|
-
var GetFacebookPagesQuerySchema2 =
|
7641
|
-
accessToken:
|
7642
|
-
userId:
|
7734
|
+
var GetFacebookPagesQuerySchema2 = z104.object({
|
7735
|
+
accessToken: z104.string(),
|
7736
|
+
userId: z104.string()
|
7643
7737
|
});
|
7644
7738
|
var ReconnectFacebookFeedSchema = ChannelSchema.merge(
|
7645
|
-
|
7646
|
-
isReloginRequired:
|
7647
|
-
platformContacts:
|
7648
|
-
id:
|
7649
|
-
name:
|
7650
|
-
createdAt:
|
7651
|
-
updatedAt:
|
7652
|
-
deletedAt:
|
7739
|
+
z104.object({
|
7740
|
+
isReloginRequired: z104.boolean(),
|
7741
|
+
platformContacts: z104.array(PlatformContactSchema),
|
7742
|
+
id: z104.string().uuid(),
|
7743
|
+
name: z104.string(),
|
7744
|
+
createdAt: z104.date(),
|
7745
|
+
updatedAt: z104.date(),
|
7746
|
+
deletedAt: z104.date().nullable()
|
7653
7747
|
})
|
7654
7748
|
);
|
7655
|
-
var GetFeedPostResponseSchema =
|
7656
|
-
id:
|
7657
|
-
message:
|
7658
|
-
created_time:
|
7659
|
-
can_reply_privately:
|
7660
|
-
from:
|
7661
|
-
permalink_url:
|
7662
|
-
attachments:
|
7663
|
-
data:
|
7664
|
-
|
7665
|
-
media:
|
7666
|
-
image:
|
7667
|
-
height:
|
7668
|
-
src:
|
7669
|
-
width:
|
7749
|
+
var GetFeedPostResponseSchema = z104.object({
|
7750
|
+
id: z104.string(),
|
7751
|
+
message: z104.string(),
|
7752
|
+
created_time: z104.string(),
|
7753
|
+
can_reply_privately: z104.boolean(),
|
7754
|
+
from: z104.object({ name: z104.string(), id: z104.string() }),
|
7755
|
+
permalink_url: z104.string(),
|
7756
|
+
attachments: z104.object({
|
7757
|
+
data: z104.array(
|
7758
|
+
z104.object({
|
7759
|
+
media: z104.object({
|
7760
|
+
image: z104.object({
|
7761
|
+
height: z104.number(),
|
7762
|
+
src: z104.string(),
|
7763
|
+
width: z104.number()
|
7670
7764
|
})
|
7671
7765
|
}),
|
7672
|
-
media_type:
|
7673
|
-
url:
|
7766
|
+
media_type: z104.string(),
|
7767
|
+
url: z104.string()
|
7674
7768
|
})
|
7675
7769
|
)
|
7676
7770
|
})
|
7677
7771
|
});
|
7678
7772
|
|
7679
7773
|
// src/facebook-feed/index.ts
|
7680
|
-
import
|
7774
|
+
import z105 from "zod";
|
7681
7775
|
var facebookFeedContract = initContract37().router({
|
7682
7776
|
connectToService: {
|
7683
7777
|
method: "POST",
|
@@ -7702,8 +7796,8 @@ var facebookFeedContract = initContract37().router({
|
|
7702
7796
|
reconnect: {
|
7703
7797
|
method: "POST",
|
7704
7798
|
path: "/reconnect/:channelId",
|
7705
|
-
pathParams:
|
7706
|
-
channelId:
|
7799
|
+
pathParams: z105.object({
|
7800
|
+
channelId: z105.string().uuid()
|
7707
7801
|
}),
|
7708
7802
|
body: null,
|
7709
7803
|
responses: {
|
@@ -7715,8 +7809,8 @@ var facebookFeedContract = initContract37().router({
|
|
7715
7809
|
delete: {
|
7716
7810
|
method: "DELETE",
|
7717
7811
|
path: "/delete/:channelId",
|
7718
|
-
pathParams:
|
7719
|
-
channelId:
|
7812
|
+
pathParams: z105.object({
|
7813
|
+
channelId: z105.string().uuid()
|
7720
7814
|
}),
|
7721
7815
|
body: null,
|
7722
7816
|
responses: {
|
@@ -7768,168 +7862,168 @@ var facebookFeedContract = initContract37().router({
|
|
7768
7862
|
|
7769
7863
|
// src/public-api/index.ts
|
7770
7864
|
import { initContract as initContract38 } from "@ts-rest/core";
|
7771
|
-
import
|
7865
|
+
import z108 from "zod";
|
7772
7866
|
|
7773
7867
|
// src/public-api/validation.ts
|
7774
|
-
import
|
7868
|
+
import z107 from "zod";
|
7775
7869
|
|
7776
7870
|
// src/public-api/schema.ts
|
7777
|
-
import
|
7778
|
-
var ContactPhonesSchema2 =
|
7779
|
-
id:
|
7780
|
-
createdAt:
|
7781
|
-
updatedAt:
|
7782
|
-
deletedAt:
|
7783
|
-
phone:
|
7784
|
-
isPrimary:
|
7785
|
-
});
|
7786
|
-
var ContactEmailsSchema2 =
|
7787
|
-
id:
|
7788
|
-
createdAt:
|
7789
|
-
updatedAt:
|
7790
|
-
deletedAt:
|
7791
|
-
email:
|
7792
|
-
isPrimary:
|
7793
|
-
});
|
7794
|
-
var ContactCustomFieldSchema2 =
|
7795
|
-
id:
|
7796
|
-
createdAt:
|
7797
|
-
updatedAt:
|
7798
|
-
deletedAt:
|
7799
|
-
textValue:
|
7800
|
-
booleanValue:
|
7801
|
-
numberValue:
|
7802
|
-
dateValue:
|
7871
|
+
import z106 from "zod";
|
7872
|
+
var ContactPhonesSchema2 = z106.object({
|
7873
|
+
id: z106.string().uuid(),
|
7874
|
+
createdAt: z106.date(),
|
7875
|
+
updatedAt: z106.date(),
|
7876
|
+
deletedAt: z106.date().nullable(),
|
7877
|
+
phone: z106.string(),
|
7878
|
+
isPrimary: z106.boolean()
|
7879
|
+
});
|
7880
|
+
var ContactEmailsSchema2 = z106.object({
|
7881
|
+
id: z106.string().uuid(),
|
7882
|
+
createdAt: z106.date(),
|
7883
|
+
updatedAt: z106.date(),
|
7884
|
+
deletedAt: z106.date().nullable(),
|
7885
|
+
email: z106.string(),
|
7886
|
+
isPrimary: z106.boolean()
|
7887
|
+
});
|
7888
|
+
var ContactCustomFieldSchema2 = z106.object({
|
7889
|
+
id: z106.string().uuid(),
|
7890
|
+
createdAt: z106.date(),
|
7891
|
+
updatedAt: z106.date(),
|
7892
|
+
deletedAt: z106.date().nullable(),
|
7893
|
+
textValue: z106.string().nullable(),
|
7894
|
+
booleanValue: z106.boolean().nullable(),
|
7895
|
+
numberValue: z106.number().nullable(),
|
7896
|
+
dateValue: z106.date().nullable(),
|
7803
7897
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
7804
|
-
uploads:
|
7805
|
-
});
|
7806
|
-
var ContactEntityTypesSchema2 =
|
7807
|
-
id:
|
7808
|
-
createdAt:
|
7809
|
-
updatedAt:
|
7810
|
-
deletedAt:
|
7811
|
-
entity:
|
7812
|
-
description:
|
7813
|
-
});
|
7814
|
-
var ContactActivitySchema2 =
|
7815
|
-
id:
|
7816
|
-
createdAt:
|
7817
|
-
updatedAt:
|
7818
|
-
deletedAt:
|
7819
|
-
entityId:
|
7820
|
-
description:
|
7898
|
+
uploads: z106.array(UploadSchema)
|
7899
|
+
});
|
7900
|
+
var ContactEntityTypesSchema2 = z106.object({
|
7901
|
+
id: z106.string().uuid(),
|
7902
|
+
createdAt: z106.date(),
|
7903
|
+
updatedAt: z106.date(),
|
7904
|
+
deletedAt: z106.date().nullable(),
|
7905
|
+
entity: z106.string(),
|
7906
|
+
description: z106.string().nullable()
|
7907
|
+
});
|
7908
|
+
var ContactActivitySchema2 = z106.object({
|
7909
|
+
id: z106.string().uuid(),
|
7910
|
+
createdAt: z106.date(),
|
7911
|
+
updatedAt: z106.date(),
|
7912
|
+
deletedAt: z106.date().nullable(),
|
7913
|
+
entityId: z106.string(),
|
7914
|
+
description: z106.string(),
|
7821
7915
|
entityType: ContactEntityTypesSchema2
|
7822
7916
|
});
|
7823
|
-
var ContactSchema2 =
|
7824
|
-
id:
|
7825
|
-
createdAt:
|
7826
|
-
updatedAt:
|
7827
|
-
deletedAt:
|
7828
|
-
name:
|
7829
|
-
address:
|
7830
|
-
channel:
|
7831
|
-
notes:
|
7832
|
-
contactProfile:
|
7833
|
-
socialProfileUrl:
|
7834
|
-
tags:
|
7917
|
+
var ContactSchema2 = z106.object({
|
7918
|
+
id: z106.string().uuid(),
|
7919
|
+
createdAt: z106.date(),
|
7920
|
+
updatedAt: z106.date(),
|
7921
|
+
deletedAt: z106.date().nullable(),
|
7922
|
+
name: z106.string(),
|
7923
|
+
address: z106.string().nullable(),
|
7924
|
+
channel: z106.string().nullable(),
|
7925
|
+
notes: z106.string().nullable(),
|
7926
|
+
contactProfile: z106.string().nullable(),
|
7927
|
+
socialProfileUrl: z106.string().nullable(),
|
7928
|
+
tags: z106.array(TagSchema),
|
7835
7929
|
company: CompanySchema.omit({ customFields: true }).nullable(),
|
7836
|
-
customFields:
|
7837
|
-
contactEmails:
|
7838
|
-
contactPhones:
|
7839
|
-
activityLogs:
|
7930
|
+
customFields: z106.array(ContactCustomFieldSchema2),
|
7931
|
+
contactEmails: z106.array(ContactEmailsSchema2),
|
7932
|
+
contactPhones: z106.array(ContactPhonesSchema2),
|
7933
|
+
activityLogs: z106.array(ContactActivitySchema2).optional()
|
7840
7934
|
});
|
7841
7935
|
|
7842
7936
|
// src/public-api/validation.ts
|
7843
7937
|
var ContactContractValidationSchema2 = {
|
7844
7938
|
create: {
|
7845
|
-
request:
|
7846
|
-
name:
|
7847
|
-
email:
|
7848
|
-
|
7849
|
-
email:
|
7850
|
-
isPrimary:
|
7939
|
+
request: z107.object({
|
7940
|
+
name: z107.string(),
|
7941
|
+
email: z107.array(
|
7942
|
+
z107.object({
|
7943
|
+
email: z107.string().email(),
|
7944
|
+
isPrimary: z107.boolean()
|
7851
7945
|
})
|
7852
7946
|
).optional(),
|
7853
|
-
channel:
|
7854
|
-
address:
|
7855
|
-
phone:
|
7856
|
-
|
7857
|
-
phone:
|
7858
|
-
isPrimary:
|
7947
|
+
channel: z107.string().optional(),
|
7948
|
+
address: z107.string().optional(),
|
7949
|
+
phone: z107.array(
|
7950
|
+
z107.object({
|
7951
|
+
phone: z107.string(),
|
7952
|
+
isPrimary: z107.boolean()
|
7859
7953
|
})
|
7860
7954
|
).optional(),
|
7861
|
-
notes:
|
7862
|
-
tags:
|
7863
|
-
company:
|
7864
|
-
customFields:
|
7955
|
+
notes: z107.string().optional(),
|
7956
|
+
tags: z107.array(z107.string()).optional(),
|
7957
|
+
company: z107.string().optional(),
|
7958
|
+
customFields: z107.record(z107.string())
|
7865
7959
|
// Dynamic keys with string values
|
7866
7960
|
}),
|
7867
7961
|
response: ContactSchema2
|
7868
7962
|
},
|
7869
7963
|
getById: {
|
7870
|
-
request:
|
7871
|
-
id:
|
7964
|
+
request: z107.object({
|
7965
|
+
id: z107.string().uuid()
|
7872
7966
|
})
|
7873
7967
|
},
|
7874
7968
|
delete: {
|
7875
|
-
request:
|
7876
|
-
id:
|
7969
|
+
request: z107.object({
|
7970
|
+
id: z107.string().uuid()
|
7877
7971
|
})
|
7878
7972
|
},
|
7879
7973
|
getAll: {
|
7880
|
-
request:
|
7881
|
-
page:
|
7882
|
-
pageSize:
|
7883
|
-
keyword:
|
7884
|
-
company:
|
7885
|
-
name:
|
7886
|
-
address:
|
7887
|
-
channel:
|
7888
|
-
selectedDate:
|
7889
|
-
customFields:
|
7890
|
-
|
7891
|
-
attributeId:
|
7892
|
-
type:
|
7893
|
-
value:
|
7974
|
+
request: z107.object({
|
7975
|
+
page: z107.coerce.number().default(1),
|
7976
|
+
pageSize: z107.coerce.number().default(10),
|
7977
|
+
keyword: z107.string().optional(),
|
7978
|
+
company: z107.array(z107.string().uuid()),
|
7979
|
+
name: z107.string(),
|
7980
|
+
address: z107.string(),
|
7981
|
+
channel: z107.array(z107.string()),
|
7982
|
+
selectedDate: z107.string(),
|
7983
|
+
customFields: z107.array(
|
7984
|
+
z107.object({
|
7985
|
+
attributeId: z107.string().uuid(),
|
7986
|
+
type: z107.string(),
|
7987
|
+
value: z107.union([z107.string(), z107.array(z107.string())])
|
7894
7988
|
})
|
7895
7989
|
),
|
7896
|
-
tags:
|
7897
|
-
phone:
|
7898
|
-
email:
|
7899
|
-
notes:
|
7990
|
+
tags: z107.array(z107.string().uuid()),
|
7991
|
+
phone: z107.string(),
|
7992
|
+
email: z107.string(),
|
7993
|
+
notes: z107.string()
|
7900
7994
|
}).partial(),
|
7901
7995
|
response: {
|
7902
|
-
page:
|
7903
|
-
pageSize:
|
7904
|
-
total:
|
7905
|
-
lastPage:
|
7906
|
-
data:
|
7996
|
+
page: z107.number(),
|
7997
|
+
pageSize: z107.number(),
|
7998
|
+
total: z107.number(),
|
7999
|
+
lastPage: z107.number(),
|
8000
|
+
data: z107.array(ContactSchema2)
|
7907
8001
|
}
|
7908
8002
|
},
|
7909
8003
|
getContactFields: {
|
7910
|
-
request:
|
7911
|
-
page:
|
7912
|
-
pageSize:
|
8004
|
+
request: z107.object({
|
8005
|
+
page: z107.coerce.number().default(1),
|
8006
|
+
pageSize: z107.coerce.number().default(10)
|
7913
8007
|
}).partial(),
|
7914
8008
|
response: {
|
7915
|
-
page:
|
7916
|
-
pageSize:
|
7917
|
-
total:
|
7918
|
-
lastPage:
|
7919
|
-
data:
|
8009
|
+
page: z107.number(),
|
8010
|
+
pageSize: z107.number(),
|
8011
|
+
total: z107.number(),
|
8012
|
+
lastPage: z107.number(),
|
8013
|
+
data: z107.array(ContactCustomFieldSchema2)
|
7920
8014
|
}
|
7921
8015
|
},
|
7922
8016
|
addAttachments: {
|
7923
|
-
request:
|
7924
|
-
contactId:
|
7925
|
-
attributeId:
|
7926
|
-
contactAttachmentRecords:
|
7927
|
-
|
7928
|
-
bucketName:
|
7929
|
-
fileKey:
|
7930
|
-
fileName:
|
7931
|
-
fileSize:
|
7932
|
-
url:
|
8017
|
+
request: z107.object({
|
8018
|
+
contactId: z107.string(),
|
8019
|
+
attributeId: z107.string().uuid(),
|
8020
|
+
contactAttachmentRecords: z107.array(
|
8021
|
+
z107.object({
|
8022
|
+
bucketName: z107.string(),
|
8023
|
+
fileKey: z107.string(),
|
8024
|
+
fileName: z107.string(),
|
8025
|
+
fileSize: z107.coerce.number(),
|
8026
|
+
url: z107.string()
|
7933
8027
|
})
|
7934
8028
|
)
|
7935
8029
|
}),
|
@@ -7948,11 +8042,11 @@ var publicApiContract = initContract38().router(
|
|
7948
8042
|
201: DefaultSuccessResponseSchema.extend({
|
7949
8043
|
data: ContactSchema2
|
7950
8044
|
}),
|
7951
|
-
400:
|
7952
|
-
message:
|
8045
|
+
400: z108.object({
|
8046
|
+
message: z108.string()
|
7953
8047
|
}),
|
7954
|
-
409:
|
7955
|
-
message:
|
8048
|
+
409: z108.object({
|
8049
|
+
message: z108.string()
|
7956
8050
|
}),
|
7957
8051
|
401: DefaultUnauthorizedSchema,
|
7958
8052
|
404: DefaultNotFoundSchema,
|
@@ -7967,13 +8061,13 @@ var publicApiContract = initContract38().router(
|
|
7967
8061
|
query: GetTagsSchema,
|
7968
8062
|
responses: {
|
7969
8063
|
200: DefaultSuccessResponseSchema.extend({
|
7970
|
-
tags:
|
8064
|
+
tags: z108.array(TagSchema)
|
7971
8065
|
}),
|
7972
|
-
400:
|
7973
|
-
message:
|
8066
|
+
400: z108.object({
|
8067
|
+
message: z108.string()
|
7974
8068
|
}),
|
7975
|
-
409:
|
7976
|
-
message:
|
8069
|
+
409: z108.object({
|
8070
|
+
message: z108.string()
|
7977
8071
|
}),
|
7978
8072
|
401: DefaultUnauthorizedSchema,
|
7979
8073
|
404: DefaultNotFoundSchema,
|
@@ -7989,11 +8083,11 @@ var publicApiContract = initContract38().router(
|
|
7989
8083
|
200: DefaultSuccessResponseSchema.extend(
|
7990
8084
|
ContactContractValidationSchema2.getAll.response
|
7991
8085
|
),
|
7992
|
-
400:
|
7993
|
-
message:
|
8086
|
+
400: z108.object({
|
8087
|
+
message: z108.string()
|
7994
8088
|
}),
|
7995
|
-
409:
|
7996
|
-
message:
|
8089
|
+
409: z108.object({
|
8090
|
+
message: z108.string()
|
7997
8091
|
}),
|
7998
8092
|
401: DefaultUnauthorizedSchema,
|
7999
8093
|
404: DefaultNotFoundSchema,
|
@@ -8010,11 +8104,11 @@ var publicApiContract = initContract38().router(
|
|
8010
8104
|
200: DefaultSuccessResponseSchema.extend(
|
8011
8105
|
ContactContractValidationSchema2.getContactFields.response
|
8012
8106
|
),
|
8013
|
-
400:
|
8014
|
-
message:
|
8107
|
+
400: z108.object({
|
8108
|
+
message: z108.string()
|
8015
8109
|
}),
|
8016
|
-
409:
|
8017
|
-
message:
|
8110
|
+
409: z108.object({
|
8111
|
+
message: z108.string()
|
8018
8112
|
}),
|
8019
8113
|
401: DefaultUnauthorizedSchema,
|
8020
8114
|
404: DefaultNotFoundSchema,
|
@@ -8028,17 +8122,17 @@ var publicApiContract = initContract38().router(
|
|
8028
8122
|
path: "/contacts/:id",
|
8029
8123
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8030
8124
|
responses: {
|
8031
|
-
200:
|
8032
|
-
status:
|
8033
|
-
message:
|
8125
|
+
200: z108.object({
|
8126
|
+
status: z108.string(),
|
8127
|
+
message: z108.string(),
|
8034
8128
|
data: ContactSchema2,
|
8035
|
-
requestId:
|
8129
|
+
requestId: z108.string()
|
8036
8130
|
}),
|
8037
|
-
400:
|
8038
|
-
message:
|
8131
|
+
400: z108.object({
|
8132
|
+
message: z108.string()
|
8039
8133
|
}),
|
8040
|
-
409:
|
8041
|
-
message:
|
8134
|
+
409: z108.object({
|
8135
|
+
message: z108.string()
|
8042
8136
|
}),
|
8043
8137
|
401: DefaultUnauthorizedSchema,
|
8044
8138
|
404: DefaultNotFoundSchema,
|
@@ -8056,11 +8150,11 @@ var publicApiContract = initContract38().router(
|
|
8056
8150
|
201: DefaultSuccessResponseSchema.extend({
|
8057
8151
|
message: ContactCustomFieldSchema2
|
8058
8152
|
}),
|
8059
|
-
400:
|
8060
|
-
message:
|
8153
|
+
400: z108.object({
|
8154
|
+
message: z108.string()
|
8061
8155
|
}),
|
8062
|
-
409:
|
8063
|
-
message:
|
8156
|
+
409: z108.object({
|
8157
|
+
message: z108.string()
|
8064
8158
|
}),
|
8065
8159
|
401: DefaultUnauthorizedSchema,
|
8066
8160
|
404: DefaultNotFoundSchema,
|
@@ -8074,17 +8168,17 @@ var publicApiContract = initContract38().router(
|
|
8074
8168
|
path: "/contacts/:id",
|
8075
8169
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8076
8170
|
responses: {
|
8077
|
-
200:
|
8078
|
-
status:
|
8079
|
-
message:
|
8171
|
+
200: z108.object({
|
8172
|
+
status: z108.string(),
|
8173
|
+
message: z108.string(),
|
8080
8174
|
data: ContactSchema2,
|
8081
|
-
requestId:
|
8175
|
+
requestId: z108.string()
|
8082
8176
|
}),
|
8083
|
-
400:
|
8084
|
-
message:
|
8177
|
+
400: z108.object({
|
8178
|
+
message: z108.string()
|
8085
8179
|
}),
|
8086
|
-
409:
|
8087
|
-
message:
|
8180
|
+
409: z108.object({
|
8181
|
+
message: z108.string()
|
8088
8182
|
}),
|
8089
8183
|
401: DefaultUnauthorizedSchema,
|
8090
8184
|
404: DefaultNotFoundSchema,
|
@@ -8098,17 +8192,17 @@ var publicApiContract = initContract38().router(
|
|
8098
8192
|
path: "/contacts/:id",
|
8099
8193
|
pathParams: ContactContractValidationSchema2.delete.request,
|
8100
8194
|
responses: {
|
8101
|
-
200:
|
8102
|
-
status:
|
8103
|
-
message:
|
8195
|
+
200: z108.object({
|
8196
|
+
status: z108.string(),
|
8197
|
+
message: z108.string(),
|
8104
8198
|
data: ContactSchema2,
|
8105
|
-
requestId:
|
8199
|
+
requestId: z108.string()
|
8106
8200
|
}),
|
8107
|
-
400:
|
8108
|
-
message:
|
8201
|
+
400: z108.object({
|
8202
|
+
message: z108.string()
|
8109
8203
|
}),
|
8110
|
-
409:
|
8111
|
-
message:
|
8204
|
+
409: z108.object({
|
8205
|
+
message: z108.string()
|
8112
8206
|
}),
|
8113
8207
|
401: DefaultUnauthorizedSchema,
|
8114
8208
|
404: DefaultNotFoundSchema,
|
@@ -8126,17 +8220,17 @@ var publicApiContract = initContract38().router(
|
|
8126
8220
|
|
8127
8221
|
// src/workflow-rule/index.ts
|
8128
8222
|
import { initContract as initContract39 } from "@ts-rest/core";
|
8129
|
-
import
|
8223
|
+
import z109 from "zod";
|
8130
8224
|
var chatContract = initContract39().router(
|
8131
8225
|
{
|
8132
8226
|
updateAssignee: {
|
8133
8227
|
method: "POST",
|
8134
8228
|
path: "/room/assignee",
|
8135
|
-
body:
|
8136
|
-
assigneeId:
|
8137
|
-
roomId:
|
8138
|
-
workflowId:
|
8139
|
-
queueId:
|
8229
|
+
body: z109.object({
|
8230
|
+
assigneeId: z109.string().uuid().optional(),
|
8231
|
+
roomId: z109.string().uuid(),
|
8232
|
+
workflowId: z109.string().uuid(),
|
8233
|
+
queueId: z109.string().uuid().optional()
|
8140
8234
|
}),
|
8141
8235
|
responses: {
|
8142
8236
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -8150,9 +8244,9 @@ var chatContract = initContract39().router(
|
|
8150
8244
|
autoReply: {
|
8151
8245
|
method: "POST",
|
8152
8246
|
path: "/message/send",
|
8153
|
-
body:
|
8154
|
-
roomId:
|
8155
|
-
message:
|
8247
|
+
body: z109.object({
|
8248
|
+
roomId: z109.string().uuid(),
|
8249
|
+
message: z109.string(),
|
8156
8250
|
messageType: WorkflowAutoReplyMessageTypeSchema
|
8157
8251
|
// workflowId: z.string().uuid(),
|
8158
8252
|
}),
|
@@ -8168,15 +8262,15 @@ var chatContract = initContract39().router(
|
|
8168
8262
|
solveRoom: {
|
8169
8263
|
method: "POST",
|
8170
8264
|
path: "/room/solve",
|
8171
|
-
body:
|
8172
|
-
roomId:
|
8173
|
-
disposition:
|
8174
|
-
workflowId:
|
8265
|
+
body: z109.object({
|
8266
|
+
roomId: z109.string(),
|
8267
|
+
disposition: z109.string(),
|
8268
|
+
workflowId: z109.string().uuid()
|
8175
8269
|
}),
|
8176
8270
|
responses: {
|
8177
8271
|
200: DefaultSuccessResponseSchema.extend({
|
8178
8272
|
data: RoomSchema.extend({
|
8179
|
-
solveMessage:
|
8273
|
+
solveMessage: z109.string()
|
8180
8274
|
})
|
8181
8275
|
}),
|
8182
8276
|
409: DefaultErrorResponseSchema
|
@@ -8186,9 +8280,9 @@ var chatContract = initContract39().router(
|
|
8186
8280
|
emitMessage: {
|
8187
8281
|
method: "POST",
|
8188
8282
|
path: "/message/emit",
|
8189
|
-
body:
|
8190
|
-
messageId:
|
8191
|
-
queueId:
|
8283
|
+
body: z109.object({
|
8284
|
+
messageId: z109.string().uuid(),
|
8285
|
+
queueId: z109.string().uuid().optional().nullable()
|
8192
8286
|
}),
|
8193
8287
|
responses: {
|
8194
8288
|
200: DefaultSuccessResponseSchema,
|
@@ -8199,16 +8293,16 @@ var chatContract = initContract39().router(
|
|
8199
8293
|
}
|
8200
8294
|
},
|
8201
8295
|
{
|
8202
|
-
baseHeaders:
|
8203
|
-
"x-tenant":
|
8204
|
-
"x-code":
|
8296
|
+
baseHeaders: z109.object({
|
8297
|
+
"x-tenant": z109.string({ required_error: "Tenant id is required" }),
|
8298
|
+
"x-code": z109.string().uuid().optional()
|
8205
8299
|
}),
|
8206
8300
|
pathPrefix: "chat"
|
8207
8301
|
}
|
8208
8302
|
);
|
8209
8303
|
|
8210
8304
|
// src/botpress/index.ts
|
8211
|
-
import
|
8305
|
+
import z110 from "zod";
|
8212
8306
|
import { initContract as initContract40 } from "@ts-rest/core";
|
8213
8307
|
var botpressContract = initContract40().router(
|
8214
8308
|
{
|
@@ -8227,7 +8321,7 @@ var botpressContract = initContract40().router(
|
|
8227
8321
|
path: "/",
|
8228
8322
|
responses: {
|
8229
8323
|
200: DefaultSuccessResponseSchema.extend({
|
8230
|
-
data:
|
8324
|
+
data: z110.array(BotpressBotSchema)
|
8231
8325
|
}),
|
8232
8326
|
500: DefaultErrorResponseSchema
|
8233
8327
|
}
|
@@ -8264,7 +8358,7 @@ var botContract = initContract40().router(
|
|
8264
8358
|
path: "/",
|
8265
8359
|
responses: {
|
8266
8360
|
200: DefaultSuccessResponseSchema.extend({
|
8267
|
-
data:
|
8361
|
+
data: z110.array(BotpressBotSchema)
|
8268
8362
|
}),
|
8269
8363
|
500: DefaultErrorResponseSchema
|
8270
8364
|
}
|
@@ -8277,14 +8371,15 @@ var botContract = initContract40().router(
|
|
8277
8371
|
|
8278
8372
|
// src/presence-status/index.ts
|
8279
8373
|
import { initContract as initContract41 } from "@ts-rest/core";
|
8280
|
-
import
|
8374
|
+
import z112 from "zod";
|
8281
8375
|
|
8282
8376
|
// src/presence-status/validation.ts
|
8283
|
-
import { z as
|
8284
|
-
var CreatePresenceStatusSchema =
|
8285
|
-
|
8286
|
-
|
8287
|
-
position:
|
8377
|
+
import { z as z111 } from "zod";
|
8378
|
+
var CreatePresenceStatusSchema = z111.object({
|
8379
|
+
systemName: PresenceStatusEnum,
|
8380
|
+
displayName: z111.string(),
|
8381
|
+
position: z111.number(),
|
8382
|
+
emoji: z111.string()
|
8288
8383
|
});
|
8289
8384
|
var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
|
8290
8385
|
|
@@ -8296,12 +8391,12 @@ var presenceStatusContract = initContract41().router(
|
|
8296
8391
|
path: "",
|
8297
8392
|
headers: DefaultHeaderSchema,
|
8298
8393
|
responses: {
|
8299
|
-
200:
|
8300
|
-
total:
|
8301
|
-
data:
|
8394
|
+
200: z112.object({
|
8395
|
+
total: z112.number(),
|
8396
|
+
data: z112.array(PresenceStatusSchema)
|
8302
8397
|
}),
|
8303
|
-
400:
|
8304
|
-
message:
|
8398
|
+
400: z112.object({
|
8399
|
+
message: z112.string()
|
8305
8400
|
}),
|
8306
8401
|
401: DefaultUnauthorizedSchema,
|
8307
8402
|
500: DefaultErrorResponseSchema
|
@@ -8317,8 +8412,8 @@ var presenceStatusContract = initContract41().router(
|
|
8317
8412
|
201: DefaultSuccessResponseSchema.extend({
|
8318
8413
|
presenceStatus: PresenceStatusSchema
|
8319
8414
|
}),
|
8320
|
-
400:
|
8321
|
-
message:
|
8415
|
+
400: z112.object({
|
8416
|
+
message: z112.string()
|
8322
8417
|
}),
|
8323
8418
|
401: DefaultUnauthorizedSchema,
|
8324
8419
|
404: DefaultNotFoundSchema,
|
@@ -8330,12 +8425,12 @@ var presenceStatusContract = initContract41().router(
|
|
8330
8425
|
getPresenceStatusById: {
|
8331
8426
|
method: "GET",
|
8332
8427
|
path: "/:id",
|
8333
|
-
pathParams:
|
8428
|
+
pathParams: z112.object({ id: z112.string() }),
|
8334
8429
|
headers: DefaultHeaderSchema,
|
8335
8430
|
responses: {
|
8336
8431
|
200: PresenceStatusSchema,
|
8337
|
-
400:
|
8338
|
-
message:
|
8432
|
+
400: z112.object({
|
8433
|
+
message: z112.string()
|
8339
8434
|
}),
|
8340
8435
|
401: DefaultUnauthorizedSchema,
|
8341
8436
|
404: DefaultNotFoundSchema,
|
@@ -8347,15 +8442,15 @@ var presenceStatusContract = initContract41().router(
|
|
8347
8442
|
updatePresenceStatus: {
|
8348
8443
|
method: "PATCH",
|
8349
8444
|
path: "/:id",
|
8350
|
-
pathParams:
|
8445
|
+
pathParams: z112.object({ id: z112.string() }),
|
8351
8446
|
headers: DefaultHeaderSchema,
|
8352
8447
|
body: UpdatePresenceStatusSchema,
|
8353
8448
|
responses: {
|
8354
8449
|
201: DefaultSuccessResponseSchema.extend({
|
8355
8450
|
presenceStatus: PresenceStatusSchema
|
8356
8451
|
}),
|
8357
|
-
400:
|
8358
|
-
message:
|
8452
|
+
400: z112.object({
|
8453
|
+
message: z112.string()
|
8359
8454
|
}),
|
8360
8455
|
401: DefaultUnauthorizedSchema,
|
8361
8456
|
404: DefaultNotFoundSchema,
|
@@ -8367,11 +8462,11 @@ var presenceStatusContract = initContract41().router(
|
|
8367
8462
|
deletePresenceStatus: {
|
8368
8463
|
method: "DELETE",
|
8369
8464
|
path: "/:id",
|
8370
|
-
pathParams:
|
8465
|
+
pathParams: z112.object({ id: z112.string() }),
|
8371
8466
|
headers: DefaultHeaderSchema,
|
8372
8467
|
body: null,
|
8373
8468
|
responses: {
|
8374
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
8469
|
+
200: DefaultSuccessResponseSchema.extend({ message: z112.string() }),
|
8375
8470
|
404: DefaultNotFoundSchema,
|
8376
8471
|
422: DefaultUnprocessibleSchema,
|
8377
8472
|
500: DefaultErrorResponseSchema
|
@@ -8384,7 +8479,7 @@ var presenceStatusContract = initContract41().router(
|
|
8384
8479
|
|
8385
8480
|
// src/whatsapp/index.ts
|
8386
8481
|
import { initContract as initContract42 } from "@ts-rest/core";
|
8387
|
-
import
|
8482
|
+
import z113 from "zod";
|
8388
8483
|
var whatsappContract = initContract42().router({
|
8389
8484
|
sendMessage: {
|
8390
8485
|
method: "POST",
|
@@ -8419,8 +8514,8 @@ var whatsappContract = initContract42().router({
|
|
8419
8514
|
reconnect: {
|
8420
8515
|
method: "POST",
|
8421
8516
|
path: "/reconnect/:channelId",
|
8422
|
-
pathParams:
|
8423
|
-
channelId:
|
8517
|
+
pathParams: z113.object({
|
8518
|
+
channelId: z113.string().uuid()
|
8424
8519
|
}),
|
8425
8520
|
body: null,
|
8426
8521
|
responses: {
|
@@ -8432,8 +8527,8 @@ var whatsappContract = initContract42().router({
|
|
8432
8527
|
delete: {
|
8433
8528
|
method: "DELETE",
|
8434
8529
|
path: "/delete/:channelId",
|
8435
|
-
pathParams:
|
8436
|
-
channelId:
|
8530
|
+
pathParams: z113.object({
|
8531
|
+
channelId: z113.string().uuid()
|
8437
8532
|
}),
|
8438
8533
|
body: null,
|
8439
8534
|
responses: {
|
@@ -8454,7 +8549,7 @@ var whatsappContract = initContract42().router({
|
|
8454
8549
|
},
|
8455
8550
|
createWaapi: {
|
8456
8551
|
method: "POST",
|
8457
|
-
path: "/
|
8552
|
+
path: "/mobile",
|
8458
8553
|
body: null,
|
8459
8554
|
responses: {
|
8460
8555
|
200: WaapiResponseSchema,
|
@@ -8464,7 +8559,7 @@ var whatsappContract = initContract42().router({
|
|
8464
8559
|
},
|
8465
8560
|
getWaapiQr: {
|
8466
8561
|
method: "GET",
|
8467
|
-
path: "/
|
8562
|
+
path: "/mobile/qr",
|
8468
8563
|
query: GetWaapiQrQuerySchema,
|
8469
8564
|
responses: {
|
8470
8565
|
200: WaapiQrResponseSchema,
|
@@ -8472,9 +8567,22 @@ var whatsappContract = initContract42().router({
|
|
8472
8567
|
400: DefaultErrorResponseSchema
|
8473
8568
|
}
|
8474
8569
|
},
|
8570
|
+
deleteWaapi: {
|
8571
|
+
method: "DELETE",
|
8572
|
+
path: "/mobile/:instanceId",
|
8573
|
+
pathParams: z113.object({
|
8574
|
+
instanceId: z113.string()
|
8575
|
+
}),
|
8576
|
+
body: z113.any().optional(),
|
8577
|
+
responses: {
|
8578
|
+
200: DefaultSuccessResponseSchema,
|
8579
|
+
500: DefaultErrorResponseSchema,
|
8580
|
+
400: DefaultErrorResponseSchema
|
8581
|
+
}
|
8582
|
+
},
|
8475
8583
|
sendSeenToWaapi: {
|
8476
8584
|
method: "POST",
|
8477
|
-
path: "/
|
8585
|
+
path: "/mobile/send-seen",
|
8478
8586
|
body: SendSeenToWaapiSchema,
|
8479
8587
|
responses: {
|
8480
8588
|
200: WaapiResponseSchema,
|
@@ -8673,7 +8781,7 @@ var presenceStatusContract2 = initContract43().router({
|
|
8673
8781
|
|
8674
8782
|
// src/general-setting/index.ts
|
8675
8783
|
import { initContract as initContract44 } from "@ts-rest/core";
|
8676
|
-
import
|
8784
|
+
import z114 from "zod";
|
8677
8785
|
var generalSettingContract = initContract44().router(
|
8678
8786
|
{
|
8679
8787
|
autoOpenedContactWidgetId: {
|
@@ -8681,20 +8789,20 @@ var generalSettingContract = initContract44().router(
|
|
8681
8789
|
method: "GET",
|
8682
8790
|
path: "/auto-opened-contact-widget-id",
|
8683
8791
|
responses: {
|
8684
|
-
200:
|
8685
|
-
autoOpenedContactWidgetId:
|
8792
|
+
200: z114.object({
|
8793
|
+
autoOpenedContactWidgetId: z114.string().nullable()
|
8686
8794
|
})
|
8687
8795
|
}
|
8688
8796
|
},
|
8689
8797
|
updateAutoOpenedContactWidgetId: {
|
8690
8798
|
method: "PATCH",
|
8691
8799
|
path: "/auto-opened-contact-widget-id",
|
8692
|
-
body:
|
8693
|
-
autoOpenedContactWidgetId:
|
8800
|
+
body: z114.object({
|
8801
|
+
autoOpenedContactWidgetId: z114.string().nullable()
|
8694
8802
|
}),
|
8695
8803
|
responses: {
|
8696
|
-
200:
|
8697
|
-
autoOpenedContactWidgetId:
|
8804
|
+
200: z114.object({
|
8805
|
+
autoOpenedContactWidgetId: z114.string().nullable()
|
8698
8806
|
})
|
8699
8807
|
}
|
8700
8808
|
}
|
@@ -8707,49 +8815,49 @@ var generalSettingContract = initContract44().router(
|
|
8707
8815
|
|
8708
8816
|
// src/automation-queue/index.ts
|
8709
8817
|
import { initContract as initContract45 } from "@ts-rest/core";
|
8710
|
-
import { z as
|
8818
|
+
import { z as z117 } from "zod";
|
8711
8819
|
|
8712
8820
|
// src/automation-queue/validation.ts
|
8713
|
-
import { z as
|
8714
|
-
var QueueDistributionStrategySchema =
|
8715
|
-
|
8716
|
-
|
8717
|
-
|
8718
|
-
|
8821
|
+
import { z as z115 } from "zod";
|
8822
|
+
var QueueDistributionStrategySchema = z115.union([
|
8823
|
+
z115.literal("round-robin"),
|
8824
|
+
z115.literal("fewest-assignments"),
|
8825
|
+
z115.literal("random"),
|
8826
|
+
z115.literal("notify-all")
|
8719
8827
|
]);
|
8720
|
-
var CreateAutomationQueueSchema =
|
8721
|
-
emoji:
|
8722
|
-
name:
|
8723
|
-
description:
|
8724
|
-
managerIds:
|
8725
|
-
agentIds:
|
8828
|
+
var CreateAutomationQueueSchema = z115.object({
|
8829
|
+
emoji: z115.string().emoji(),
|
8830
|
+
name: z115.string(),
|
8831
|
+
description: z115.string().nullable(),
|
8832
|
+
managerIds: z115.array(z115.string().uuid()).min(1),
|
8833
|
+
agentIds: z115.array(z115.string().uuid()).min(1),
|
8726
8834
|
distributionStrategy: QueueDistributionStrategySchema,
|
8727
|
-
maximumAssignPerAgent:
|
8835
|
+
maximumAssignPerAgent: z115.number().positive()
|
8728
8836
|
// ringTimeOut: z.number().positive(),
|
8729
8837
|
// retryInterval: z.number().positive(),
|
8730
8838
|
// queueTimeOut: z.number().positive(),
|
8731
8839
|
// isAssignmentDeniable: z.coerce.boolean(),
|
8732
8840
|
});
|
8733
8841
|
var UpdateAutomationQueueSchema = CreateAutomationQueueSchema;
|
8734
|
-
var CheckHasAssignedRoomSchema =
|
8735
|
-
userId:
|
8736
|
-
queueId:
|
8842
|
+
var CheckHasAssignedRoomSchema = z115.object({
|
8843
|
+
userId: z115.string().uuid().optional(),
|
8844
|
+
queueId: z115.string().uuid().optional()
|
8737
8845
|
});
|
8738
8846
|
|
8739
8847
|
// src/automation-queue/schema.ts
|
8740
|
-
import { z as
|
8848
|
+
import { z as z116 } from "zod";
|
8741
8849
|
var AutomationQueueSchema = DefaultEntitySchema.extend({
|
8742
|
-
emoji:
|
8743
|
-
name:
|
8744
|
-
description:
|
8850
|
+
emoji: z116.string(),
|
8851
|
+
name: z116.string(),
|
8852
|
+
description: z116.string().nullable(),
|
8745
8853
|
distributionStrategy: QueueDistributionStrategySchema,
|
8746
|
-
maximumAssignPerAgent:
|
8854
|
+
maximumAssignPerAgent: z116.number().positive(),
|
8747
8855
|
// ringTimeOut: z.number(),
|
8748
8856
|
// retryInterval: z.number(),
|
8749
8857
|
// queueTimeOut: z.number(),
|
8750
8858
|
// isAssignmentDeniable: z.boolean(),
|
8751
|
-
managers:
|
8752
|
-
agents:
|
8859
|
+
managers: z116.array(UserSchema),
|
8860
|
+
agents: z116.array(UserSchema)
|
8753
8861
|
});
|
8754
8862
|
|
8755
8863
|
// src/automation-queue/index.ts
|
@@ -8768,8 +8876,8 @@ var automationQueueContract = initContract45().router(
|
|
8768
8876
|
duplicateAutomationQueue: {
|
8769
8877
|
method: "POST",
|
8770
8878
|
path: "/:id/duplicate",
|
8771
|
-
pathParams:
|
8772
|
-
id:
|
8879
|
+
pathParams: z117.object({
|
8880
|
+
id: z117.string().uuid()
|
8773
8881
|
}),
|
8774
8882
|
body: null,
|
8775
8883
|
responses: {
|
@@ -8781,20 +8889,20 @@ var automationQueueContract = initContract45().router(
|
|
8781
8889
|
getAutomationQueues: {
|
8782
8890
|
method: "GET",
|
8783
8891
|
path: "",
|
8784
|
-
query:
|
8785
|
-
userId:
|
8892
|
+
query: z117.object({
|
8893
|
+
userId: z117.string().uuid().optional()
|
8786
8894
|
}).optional(),
|
8787
8895
|
responses: {
|
8788
8896
|
200: DefaultSuccessResponseSchema.extend({
|
8789
|
-
data:
|
8897
|
+
data: z117.array(AutomationQueueSchema)
|
8790
8898
|
})
|
8791
8899
|
}
|
8792
8900
|
},
|
8793
8901
|
getAutomationQueueById: {
|
8794
8902
|
method: "GET",
|
8795
8903
|
path: "/:id",
|
8796
|
-
pathParams:
|
8797
|
-
id:
|
8904
|
+
pathParams: z117.object({
|
8905
|
+
id: z117.string().uuid()
|
8798
8906
|
}),
|
8799
8907
|
responses: {
|
8800
8908
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -8805,8 +8913,8 @@ var automationQueueContract = initContract45().router(
|
|
8805
8913
|
updateAutomationQueue: {
|
8806
8914
|
method: "PATCH",
|
8807
8915
|
path: "/:id",
|
8808
|
-
pathParams:
|
8809
|
-
id:
|
8916
|
+
pathParams: z117.object({
|
8917
|
+
id: z117.string().uuid()
|
8810
8918
|
}),
|
8811
8919
|
body: UpdateAutomationQueueSchema,
|
8812
8920
|
responses: {
|
@@ -8818,13 +8926,13 @@ var automationQueueContract = initContract45().router(
|
|
8818
8926
|
deleteAutomationQueue: {
|
8819
8927
|
method: "DELETE",
|
8820
8928
|
path: "/:id",
|
8821
|
-
pathParams:
|
8822
|
-
id:
|
8929
|
+
pathParams: z117.object({
|
8930
|
+
id: z117.string().uuid()
|
8823
8931
|
}),
|
8824
8932
|
body: null,
|
8825
8933
|
responses: {
|
8826
8934
|
200: DefaultSuccessResponseSchema.extend({
|
8827
|
-
message:
|
8935
|
+
message: z117.string()
|
8828
8936
|
})
|
8829
8937
|
}
|
8830
8938
|
},
|
@@ -8834,8 +8942,8 @@ var automationQueueContract = initContract45().router(
|
|
8834
8942
|
body: CheckHasAssignedRoomSchema,
|
8835
8943
|
responses: {
|
8836
8944
|
200: DefaultSuccessResponseSchema.extend({
|
8837
|
-
data:
|
8838
|
-
hasAssignedRoom:
|
8945
|
+
data: z117.object({
|
8946
|
+
hasAssignedRoom: z117.boolean()
|
8839
8947
|
})
|
8840
8948
|
})
|
8841
8949
|
}
|
@@ -8852,282 +8960,282 @@ import { initContract as initContract50 } from "@ts-rest/core";
|
|
8852
8960
|
|
8853
8961
|
// src/mail/room-contract.ts
|
8854
8962
|
import { initContract as initContract46 } from "@ts-rest/core";
|
8855
|
-
import
|
8963
|
+
import z122 from "zod";
|
8856
8964
|
|
8857
8965
|
// src/mail/schemas/room.schema.ts
|
8858
|
-
import
|
8966
|
+
import z120 from "zod";
|
8859
8967
|
|
8860
8968
|
// src/mail/schemas/account.schema.ts
|
8969
|
+
import z118 from "zod";
|
8970
|
+
var MailServerSchema = z118.object({
|
8971
|
+
id: z118.string(),
|
8972
|
+
createdAt: z118.date(),
|
8973
|
+
updatedAt: z118.date(),
|
8974
|
+
deletedAt: z118.date().nullable(),
|
8975
|
+
name: z118.string(),
|
8976
|
+
smtpHost: z118.string(),
|
8977
|
+
smtpPort: z118.number(),
|
8978
|
+
smtpTlsPort: z118.number(),
|
8979
|
+
useTlsForSmtp: z118.boolean(),
|
8980
|
+
imapHost: z118.string(),
|
8981
|
+
imapPort: z118.number(),
|
8982
|
+
imapTlsPort: z118.number(),
|
8983
|
+
useTlsForImap: z118.boolean()
|
8984
|
+
});
|
8985
|
+
var MailAccountSchema = z118.object({
|
8986
|
+
id: z118.string(),
|
8987
|
+
createdAt: z118.date(),
|
8988
|
+
updatedAt: z118.date(),
|
8989
|
+
deletedAt: z118.date().nullable(),
|
8990
|
+
name: z118.string(),
|
8991
|
+
address: z118.string(),
|
8992
|
+
accountId: z118.string(),
|
8993
|
+
mailServerId: z118.string(),
|
8994
|
+
mailServer: MailServerSchema,
|
8995
|
+
state: z118.union([
|
8996
|
+
z118.literal("init"),
|
8997
|
+
z118.literal("syncing"),
|
8998
|
+
z118.literal("connecting"),
|
8999
|
+
z118.literal("connected"),
|
9000
|
+
z118.literal("disconnected"),
|
9001
|
+
z118.literal("authenticationError"),
|
9002
|
+
z118.literal("connectError"),
|
9003
|
+
z118.literal("unset")
|
9004
|
+
])
|
9005
|
+
});
|
9006
|
+
var OAuth2AppSchema = z118.object({
|
9007
|
+
id: z118.string(),
|
9008
|
+
name: z118.string(),
|
9009
|
+
description: z118.string(),
|
9010
|
+
title: z118.string(),
|
9011
|
+
provider: z118.string(),
|
9012
|
+
enabled: z118.boolean(),
|
9013
|
+
legacy: z118.boolean(),
|
9014
|
+
created: z118.string(),
|
9015
|
+
updated: z118.string(),
|
9016
|
+
includeInListing: z118.boolean(),
|
9017
|
+
clientId: z118.string(),
|
9018
|
+
clientSecret: z118.string(),
|
9019
|
+
authority: z118.string(),
|
9020
|
+
redirectUrl: z118.string(),
|
9021
|
+
serviceClient: z118.string(),
|
9022
|
+
googleProjectId: z118.string(),
|
9023
|
+
serviceClientEmail: z118.string(),
|
9024
|
+
serviceKey: z118.string()
|
9025
|
+
});
|
9026
|
+
|
9027
|
+
// src/mail/schemas/message.schema.ts
|
8861
9028
|
import z119 from "zod";
|
8862
|
-
var
|
9029
|
+
var AttachmentSchema = z119.object({
|
8863
9030
|
id: z119.string(),
|
8864
9031
|
createdAt: z119.date(),
|
8865
9032
|
updatedAt: z119.date(),
|
8866
|
-
deletedAt: z119.
|
8867
|
-
|
8868
|
-
|
8869
|
-
|
8870
|
-
|
8871
|
-
|
8872
|
-
|
8873
|
-
|
8874
|
-
|
8875
|
-
|
8876
|
-
|
8877
|
-
|
9033
|
+
deletedAt: z119.nullable(z119.date()),
|
9034
|
+
roomId: z119.string(),
|
9035
|
+
messageId: z119.string(),
|
9036
|
+
fileName: z119.string(),
|
9037
|
+
fileType: z119.string(),
|
9038
|
+
emailEngineAttachmentId: z119.string(),
|
9039
|
+
uploadId: z119.string(),
|
9040
|
+
upload: z119.object({
|
9041
|
+
id: z119.string(),
|
9042
|
+
createdAt: z119.date(),
|
9043
|
+
updatedAt: z119.date(),
|
9044
|
+
deletedAt: z119.nullable(z119.date()),
|
9045
|
+
bucketName: z119.string(),
|
9046
|
+
fileName: z119.string(),
|
9047
|
+
fileKey: z119.string(),
|
9048
|
+
fileSize: z119.number(),
|
9049
|
+
fileUrl: z119.string(),
|
9050
|
+
extensionName: z119.string()
|
9051
|
+
})
|
9052
|
+
});
|
9053
|
+
var MessageSchema2 = z119.object({
|
8878
9054
|
id: z119.string(),
|
8879
9055
|
createdAt: z119.date(),
|
8880
9056
|
updatedAt: z119.date(),
|
8881
|
-
deletedAt: z119.
|
8882
|
-
|
8883
|
-
|
8884
|
-
|
8885
|
-
|
8886
|
-
|
8887
|
-
|
8888
|
-
|
8889
|
-
|
8890
|
-
|
8891
|
-
|
8892
|
-
|
8893
|
-
|
8894
|
-
|
8895
|
-
|
8896
|
-
|
8897
|
-
|
8898
|
-
|
8899
|
-
|
8900
|
-
|
8901
|
-
|
8902
|
-
title: z119.string(),
|
8903
|
-
provider: z119.string(),
|
8904
|
-
enabled: z119.boolean(),
|
8905
|
-
legacy: z119.boolean(),
|
8906
|
-
created: z119.string(),
|
8907
|
-
updated: z119.string(),
|
8908
|
-
includeInListing: z119.boolean(),
|
8909
|
-
clientId: z119.string(),
|
8910
|
-
clientSecret: z119.string(),
|
8911
|
-
authority: z119.string(),
|
8912
|
-
redirectUrl: z119.string(),
|
8913
|
-
serviceClient: z119.string(),
|
8914
|
-
googleProjectId: z119.string(),
|
8915
|
-
serviceClientEmail: z119.string(),
|
8916
|
-
serviceKey: z119.string()
|
9057
|
+
deletedAt: z119.nullable(z119.date()),
|
9058
|
+
roomId: z119.string(),
|
9059
|
+
subject: z119.string(),
|
9060
|
+
textPlain: z119.string(),
|
9061
|
+
textHtml: z119.string(),
|
9062
|
+
textId: z119.string(),
|
9063
|
+
emailEngineEmailId: z119.string(),
|
9064
|
+
emailEngineMessageId: z119.string(),
|
9065
|
+
emailEngineReplyTo: z119.nullable(z119.string()),
|
9066
|
+
direction: z119.string(),
|
9067
|
+
date: z119.date(),
|
9068
|
+
action: z119.string(),
|
9069
|
+
unseen: z119.boolean(),
|
9070
|
+
sendAt: z119.date(),
|
9071
|
+
starred: z119.boolean(),
|
9072
|
+
seemsLikeNew: z119.boolean(),
|
9073
|
+
from: z119.array(MailParticipant),
|
9074
|
+
to: z119.array(MailParticipant),
|
9075
|
+
cc: z119.array(MailParticipant),
|
9076
|
+
bcc: z119.array(MailParticipant),
|
9077
|
+
attachments: z119.array(AttachmentSchema)
|
8917
9078
|
});
|
8918
9079
|
|
8919
|
-
// src/mail/schemas/
|
8920
|
-
|
8921
|
-
|
9080
|
+
// src/mail/schemas/room.schema.ts
|
9081
|
+
var ContactSchema3 = z120.object({
|
9082
|
+
id: z120.string().uuid(),
|
9083
|
+
createdAt: z120.date(),
|
9084
|
+
updatedAt: z120.date(),
|
9085
|
+
deletedAt: z120.date().nullable(),
|
9086
|
+
name: z120.string(),
|
9087
|
+
address: z120.string().nullable(),
|
9088
|
+
channel: z120.string().nullable(),
|
9089
|
+
notes: z120.string().nullable(),
|
9090
|
+
contactProfile: z120.string().nullable(),
|
9091
|
+
socialProfileUrl: z120.string().nullable()
|
9092
|
+
});
|
9093
|
+
var MailUserSchema = z120.object({
|
9094
|
+
id: z120.string(),
|
9095
|
+
createdAt: z120.date(),
|
9096
|
+
updatedAt: z120.date(),
|
9097
|
+
deletedAt: z120.date().nullable(),
|
9098
|
+
name: z120.string(),
|
9099
|
+
address: z120.string(),
|
9100
|
+
contactId: z120.string(),
|
9101
|
+
contact: ContactSchema3,
|
9102
|
+
isNewContact: z120.boolean()
|
9103
|
+
});
|
9104
|
+
var MailParticipant = z120.object({
|
8922
9105
|
id: z120.string(),
|
8923
9106
|
createdAt: z120.date(),
|
8924
9107
|
updatedAt: z120.date(),
|
8925
|
-
deletedAt: z120.
|
9108
|
+
deletedAt: z120.date().nullable(),
|
8926
9109
|
roomId: z120.string(),
|
8927
9110
|
messageId: z120.string(),
|
8928
|
-
|
8929
|
-
|
8930
|
-
emailEngineAttachmentId: z120.string(),
|
8931
|
-
uploadId: z120.string(),
|
8932
|
-
upload: z120.object({
|
8933
|
-
id: z120.string(),
|
8934
|
-
createdAt: z120.date(),
|
8935
|
-
updatedAt: z120.date(),
|
8936
|
-
deletedAt: z120.nullable(z120.date()),
|
8937
|
-
bucketName: z120.string(),
|
8938
|
-
fileName: z120.string(),
|
8939
|
-
fileKey: z120.string(),
|
8940
|
-
fileSize: z120.number(),
|
8941
|
-
fileUrl: z120.string(),
|
8942
|
-
extensionName: z120.string()
|
8943
|
-
})
|
9111
|
+
mailUserId: z120.string(),
|
9112
|
+
mailUser: MailUserSchema
|
8944
9113
|
});
|
8945
|
-
var
|
9114
|
+
var TagSchema2 = z120.object({
|
9115
|
+
color: z120.string(),
|
8946
9116
|
id: z120.string(),
|
8947
9117
|
createdAt: z120.date(),
|
8948
9118
|
updatedAt: z120.date(),
|
8949
|
-
deletedAt: z120.
|
9119
|
+
deletedAt: z120.date().nullable(),
|
9120
|
+
name: z120.string()
|
9121
|
+
});
|
9122
|
+
var UserModel = z120.object({
|
9123
|
+
id: z120.string().uuid(),
|
9124
|
+
createdAt: z120.date(),
|
9125
|
+
updatedAt: z120.date(),
|
9126
|
+
deletedAt: z120.date().nullable(),
|
9127
|
+
name: z120.string(),
|
9128
|
+
email: z120.string(),
|
9129
|
+
address: z120.string().nullable(),
|
9130
|
+
phone: z120.string().nullable(),
|
9131
|
+
notificationCount: z120.number().nullable()
|
9132
|
+
});
|
9133
|
+
var ActivityLogModel = z120.object({
|
9134
|
+
id: z120.string(),
|
9135
|
+
createdAt: z120.date(),
|
9136
|
+
updatedAt: z120.date(),
|
9137
|
+
deletedAt: z120.nullable(z120.string()),
|
9138
|
+
description: z120.string(),
|
9139
|
+
actorId: z120.string(),
|
8950
9140
|
roomId: z120.string(),
|
9141
|
+
actor: UserModel
|
9142
|
+
});
|
9143
|
+
var MessagesAndLogsSchema = z120.array(
|
9144
|
+
z120.union([MessageSchema2, ActivityLogModel])
|
9145
|
+
);
|
9146
|
+
var MailRoomSchema = z120.object({
|
9147
|
+
id: z120.string(),
|
9148
|
+
createdAt: z120.date(),
|
9149
|
+
updatedAt: z120.date(),
|
9150
|
+
deletedAt: z120.date().nullable(),
|
8951
9151
|
subject: z120.string(),
|
8952
|
-
|
8953
|
-
|
8954
|
-
|
8955
|
-
|
8956
|
-
emailEngineMessageId: z120.string(),
|
8957
|
-
emailEngineReplyTo: z120.nullable(z120.string()),
|
9152
|
+
resolved: z120.boolean(),
|
9153
|
+
assigneeId: z120.string().nullable(),
|
9154
|
+
note: z120.string(),
|
9155
|
+
mailId: z120.string(),
|
8958
9156
|
direction: z120.string(),
|
8959
|
-
|
8960
|
-
|
8961
|
-
unseen: z120.boolean(),
|
8962
|
-
sendAt: z120.date(),
|
8963
|
-
starred: z120.boolean(),
|
8964
|
-
seemsLikeNew: z120.boolean(),
|
9157
|
+
lastMessageId: z120.string(),
|
9158
|
+
firstMessageId: z120.string(),
|
8965
9159
|
from: z120.array(MailParticipant),
|
8966
9160
|
to: z120.array(MailParticipant),
|
8967
9161
|
cc: z120.array(MailParticipant),
|
8968
9162
|
bcc: z120.array(MailParticipant),
|
8969
|
-
attachments: z120.array(AttachmentSchema)
|
8970
|
-
});
|
8971
|
-
|
8972
|
-
// src/mail/schemas/room.schema.ts
|
8973
|
-
var ContactSchema3 = z121.object({
|
8974
|
-
id: z121.string().uuid(),
|
8975
|
-
createdAt: z121.date(),
|
8976
|
-
updatedAt: z121.date(),
|
8977
|
-
deletedAt: z121.date().nullable(),
|
8978
|
-
name: z121.string(),
|
8979
|
-
address: z121.string().nullable(),
|
8980
|
-
channel: z121.string().nullable(),
|
8981
|
-
notes: z121.string().nullable(),
|
8982
|
-
contactProfile: z121.string().nullable(),
|
8983
|
-
socialProfileUrl: z121.string().nullable()
|
8984
|
-
});
|
8985
|
-
var MailUserSchema = z121.object({
|
8986
|
-
id: z121.string(),
|
8987
|
-
createdAt: z121.date(),
|
8988
|
-
updatedAt: z121.date(),
|
8989
|
-
deletedAt: z121.date().nullable(),
|
8990
|
-
name: z121.string(),
|
8991
|
-
address: z121.string(),
|
8992
|
-
contactId: z121.string(),
|
8993
|
-
contact: ContactSchema3,
|
8994
|
-
isNewContact: z121.boolean()
|
8995
|
-
});
|
8996
|
-
var MailParticipant = z121.object({
|
8997
|
-
id: z121.string(),
|
8998
|
-
createdAt: z121.date(),
|
8999
|
-
updatedAt: z121.date(),
|
9000
|
-
deletedAt: z121.date().nullable(),
|
9001
|
-
roomId: z121.string(),
|
9002
|
-
messageId: z121.string(),
|
9003
|
-
mailUserId: z121.string(),
|
9004
|
-
mailUser: MailUserSchema
|
9005
|
-
});
|
9006
|
-
var TagSchema2 = z121.object({
|
9007
|
-
color: z121.string(),
|
9008
|
-
id: z121.string(),
|
9009
|
-
createdAt: z121.date(),
|
9010
|
-
updatedAt: z121.date(),
|
9011
|
-
deletedAt: z121.date().nullable(),
|
9012
|
-
name: z121.string()
|
9013
|
-
});
|
9014
|
-
var UserModel = z121.object({
|
9015
|
-
id: z121.string().uuid(),
|
9016
|
-
createdAt: z121.date(),
|
9017
|
-
updatedAt: z121.date(),
|
9018
|
-
deletedAt: z121.date().nullable(),
|
9019
|
-
name: z121.string(),
|
9020
|
-
email: z121.string(),
|
9021
|
-
address: z121.string().nullable(),
|
9022
|
-
phone: z121.string().nullable(),
|
9023
|
-
notificationCount: z121.number().nullable()
|
9024
|
-
});
|
9025
|
-
var ActivityLogModel = z121.object({
|
9026
|
-
id: z121.string(),
|
9027
|
-
createdAt: z121.date(),
|
9028
|
-
updatedAt: z121.date(),
|
9029
|
-
deletedAt: z121.nullable(z121.string()),
|
9030
|
-
description: z121.string(),
|
9031
|
-
actorId: z121.string(),
|
9032
|
-
roomId: z121.string(),
|
9033
|
-
actor: UserModel
|
9034
|
-
});
|
9035
|
-
var MessagesAndLogsSchema = z121.array(
|
9036
|
-
z121.union([MessageSchema2, ActivityLogModel])
|
9037
|
-
);
|
9038
|
-
var MailRoomSchema = z121.object({
|
9039
|
-
id: z121.string(),
|
9040
|
-
createdAt: z121.date(),
|
9041
|
-
updatedAt: z121.date(),
|
9042
|
-
deletedAt: z121.date().nullable(),
|
9043
|
-
subject: z121.string(),
|
9044
|
-
resolved: z121.boolean(),
|
9045
|
-
assigneeId: z121.string().nullable(),
|
9046
|
-
note: z121.string(),
|
9047
|
-
mailId: z121.string(),
|
9048
|
-
direction: z121.string(),
|
9049
|
-
lastMessageId: z121.string(),
|
9050
|
-
firstMessageId: z121.string(),
|
9051
|
-
from: z121.array(MailParticipant),
|
9052
|
-
to: z121.array(MailParticipant),
|
9053
|
-
cc: z121.array(MailParticipant),
|
9054
|
-
bcc: z121.array(MailParticipant),
|
9055
9163
|
firstMessage: MessageSchema2,
|
9056
9164
|
lastMessage: MessageSchema2,
|
9057
|
-
tags:
|
9165
|
+
tags: z120.array(TagSchema2),
|
9058
9166
|
assignee: UserModel,
|
9059
|
-
messages:
|
9167
|
+
messages: z120.array(MessageSchema2),
|
9060
9168
|
messagesAndLogs: MessagesAndLogsSchema,
|
9061
9169
|
mail: MailAccountSchema,
|
9062
|
-
unReadMessageCount:
|
9170
|
+
unReadMessageCount: z120.number(),
|
9063
9171
|
cxlog: CxLogSchema
|
9064
9172
|
});
|
9065
|
-
var AttachmentSchema2 =
|
9066
|
-
fileName:
|
9067
|
-
fileType:
|
9068
|
-
emailEngineAttachmentId:
|
9069
|
-
uploadId:
|
9070
|
-
messageId:
|
9071
|
-
roomId:
|
9173
|
+
var AttachmentSchema2 = z120.object({
|
9174
|
+
fileName: z120.string(),
|
9175
|
+
fileType: z120.string(),
|
9176
|
+
emailEngineAttachmentId: z120.string(),
|
9177
|
+
uploadId: z120.string(),
|
9178
|
+
messageId: z120.string(),
|
9179
|
+
roomId: z120.string(),
|
9072
9180
|
upload: UploadSchema
|
9073
9181
|
});
|
9074
9182
|
|
9075
9183
|
// src/mail/schemas/room-validation.schema.ts
|
9076
|
-
import
|
9184
|
+
import z121 from "zod";
|
9077
9185
|
var RoomContractsValidationSchema = {
|
9078
9186
|
getAll: {
|
9079
|
-
input:
|
9080
|
-
page:
|
9081
|
-
pageSize:
|
9082
|
-
keyword:
|
9083
|
-
value:
|
9084
|
-
category:
|
9187
|
+
input: z121.object({
|
9188
|
+
page: z121.coerce.number().default(1),
|
9189
|
+
pageSize: z121.coerce.number().default(10),
|
9190
|
+
keyword: z121.object({
|
9191
|
+
value: z121.string(),
|
9192
|
+
category: z121.union([z121.literal("contact"), z121.literal("message")])
|
9085
9193
|
}).optional(),
|
9086
|
-
contactLabels:
|
9087
|
-
channels:
|
9088
|
-
date:
|
9089
|
-
contacts:
|
9090
|
-
assignees:
|
9091
|
-
level1:
|
9092
|
-
|
9093
|
-
|
9094
|
-
|
9095
|
-
|
9096
|
-
|
9097
|
-
|
9194
|
+
contactLabels: z121.array(z121.string()).optional(),
|
9195
|
+
channels: z121.array(z121.string().email()).optional(),
|
9196
|
+
date: z121.string().optional(),
|
9197
|
+
contacts: z121.array(z121.string()).optional(),
|
9198
|
+
assignees: z121.array(z121.string()).optional(),
|
9199
|
+
level1: z121.union([
|
9200
|
+
z121.literal("open"),
|
9201
|
+
z121.literal("close"),
|
9202
|
+
z121.literal("inbox"),
|
9203
|
+
z121.literal("sent"),
|
9204
|
+
z121.literal("scheduled"),
|
9205
|
+
z121.literal("starred")
|
9098
9206
|
]).optional(),
|
9099
|
-
level2:
|
9100
|
-
|
9101
|
-
|
9102
|
-
|
9103
|
-
|
9207
|
+
level2: z121.union([
|
9208
|
+
z121.literal("all"),
|
9209
|
+
z121.literal("unassign"),
|
9210
|
+
z121.literal("mine"),
|
9211
|
+
z121.literal("other")
|
9104
9212
|
]).optional()
|
9105
9213
|
}),
|
9106
|
-
output:
|
9107
|
-
data:
|
9108
|
-
total:
|
9109
|
-
page:
|
9110
|
-
pageSize:
|
9214
|
+
output: z121.object({
|
9215
|
+
data: z121.array(MailRoomSchema),
|
9216
|
+
total: z121.number(),
|
9217
|
+
page: z121.number(),
|
9218
|
+
pageSize: z121.number()
|
9111
9219
|
})
|
9112
9220
|
},
|
9113
9221
|
update: {
|
9114
|
-
input:
|
9115
|
-
disposition:
|
9116
|
-
|
9117
|
-
|
9118
|
-
|
9119
|
-
|
9120
|
-
|
9121
|
-
|
9222
|
+
input: z121.object({
|
9223
|
+
disposition: z121.union([
|
9224
|
+
z121.literal("resolved"),
|
9225
|
+
z121.literal("follow up"),
|
9226
|
+
z121.literal("escalated"),
|
9227
|
+
z121.literal("dropped"),
|
9228
|
+
z121.literal("prank"),
|
9229
|
+
z121.literal("blank")
|
9122
9230
|
]).optional().nullable(),
|
9123
|
-
assigneeId:
|
9124
|
-
note:
|
9125
|
-
tags:
|
9126
|
-
handover:
|
9127
|
-
|
9231
|
+
assigneeId: z121.string().uuid().optional().nullable(),
|
9232
|
+
note: z121.string().optional(),
|
9233
|
+
tags: z121.array(z121.string().uuid()).optional(),
|
9234
|
+
handover: z121.boolean().or(
|
9235
|
+
z121.union([z121.literal("true"), z121.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9128
9236
|
).optional().nullable(),
|
9129
|
-
selfAssign:
|
9130
|
-
|
9237
|
+
selfAssign: z121.boolean().or(
|
9238
|
+
z121.union([z121.literal("true"), z121.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9131
9239
|
).optional().nullable()
|
9132
9240
|
})
|
9133
9241
|
}
|
@@ -9141,7 +9249,7 @@ var roomContract = initContract46().router(
|
|
9141
9249
|
path: "/",
|
9142
9250
|
responses: {
|
9143
9251
|
200: DefaultSuccessResponseSchema.extend({
|
9144
|
-
message:
|
9252
|
+
message: z122.string()
|
9145
9253
|
}),
|
9146
9254
|
...DefaultResponses
|
9147
9255
|
},
|
@@ -9154,10 +9262,10 @@ var roomContract = initContract46().router(
|
|
9154
9262
|
query: RoomContractsValidationSchema.getAll.input,
|
9155
9263
|
responses: {
|
9156
9264
|
200: DefaultSuccessResponseSchema.extend({
|
9157
|
-
data:
|
9158
|
-
total:
|
9159
|
-
page:
|
9160
|
-
pageSize:
|
9265
|
+
data: z122.array(MailRoomSchema),
|
9266
|
+
total: z122.number(),
|
9267
|
+
page: z122.number(),
|
9268
|
+
pageSize: z122.number()
|
9161
9269
|
}),
|
9162
9270
|
...DefaultResponses
|
9163
9271
|
},
|
@@ -9169,24 +9277,24 @@ var roomContract = initContract46().router(
|
|
9169
9277
|
path: "/count_rooms/all",
|
9170
9278
|
responses: {
|
9171
9279
|
200: DefaultSuccessResponseSchema.extend({
|
9172
|
-
data:
|
9173
|
-
general:
|
9174
|
-
|
9175
|
-
name:
|
9176
|
-
count:
|
9177
|
-
unReadMessagesCount:
|
9280
|
+
data: z122.object({
|
9281
|
+
general: z122.array(
|
9282
|
+
z122.object({
|
9283
|
+
name: z122.string(),
|
9284
|
+
count: z122.number(),
|
9285
|
+
unReadMessagesCount: z122.number()
|
9178
9286
|
})
|
9179
9287
|
),
|
9180
|
-
channels:
|
9181
|
-
|
9288
|
+
channels: z122.array(
|
9289
|
+
z122.object({
|
9182
9290
|
channel: MailAccountSchema,
|
9183
|
-
count:
|
9291
|
+
count: z122.number()
|
9184
9292
|
})
|
9185
9293
|
),
|
9186
|
-
contactLabels:
|
9187
|
-
|
9294
|
+
contactLabels: z122.array(
|
9295
|
+
z122.object({
|
9188
9296
|
label: TagSchema,
|
9189
|
-
count:
|
9297
|
+
count: z122.number()
|
9190
9298
|
})
|
9191
9299
|
)
|
9192
9300
|
})
|
@@ -9198,12 +9306,12 @@ var roomContract = initContract46().router(
|
|
9198
9306
|
getAttachments: {
|
9199
9307
|
method: "GET",
|
9200
9308
|
path: "/:id/attachments",
|
9201
|
-
pathParams:
|
9202
|
-
id:
|
9309
|
+
pathParams: z122.object({
|
9310
|
+
id: z122.string().uuid()
|
9203
9311
|
}),
|
9204
9312
|
responses: {
|
9205
9313
|
200: DefaultSuccessResponseSchema.extend({
|
9206
|
-
data:
|
9314
|
+
data: z122.array(AttachmentSchema2)
|
9207
9315
|
}),
|
9208
9316
|
...DefaultResponses
|
9209
9317
|
},
|
@@ -9212,12 +9320,12 @@ var roomContract = initContract46().router(
|
|
9212
9320
|
getParticipants: {
|
9213
9321
|
method: "GET",
|
9214
9322
|
path: "/:id/participants",
|
9215
|
-
pathParams:
|
9216
|
-
id:
|
9323
|
+
pathParams: z122.object({
|
9324
|
+
id: z122.string().uuid()
|
9217
9325
|
}),
|
9218
9326
|
responses: {
|
9219
9327
|
200: DefaultSuccessResponseSchema.extend({
|
9220
|
-
data:
|
9328
|
+
data: z122.array(MailParticipant)
|
9221
9329
|
}),
|
9222
9330
|
...DefaultResponses
|
9223
9331
|
},
|
@@ -9228,22 +9336,22 @@ var roomContract = initContract46().router(
|
|
9228
9336
|
path: "/add_email_to_contact",
|
9229
9337
|
responses: {
|
9230
9338
|
200: DefaultSuccessResponseSchema.extend({
|
9231
|
-
data:
|
9339
|
+
data: z122.string()
|
9232
9340
|
}),
|
9233
9341
|
...DefaultResponses
|
9234
9342
|
},
|
9235
|
-
body:
|
9236
|
-
email:
|
9237
|
-
contactId:
|
9238
|
-
mailUserId:
|
9343
|
+
body: z122.object({
|
9344
|
+
email: z122.string(),
|
9345
|
+
contactId: z122.string(),
|
9346
|
+
mailUserId: z122.string()
|
9239
9347
|
}),
|
9240
9348
|
summary: "Add a new email of a mail room participant to an existing contact"
|
9241
9349
|
},
|
9242
9350
|
update: {
|
9243
9351
|
method: "PATCH",
|
9244
9352
|
path: "/:id",
|
9245
|
-
pathParams:
|
9246
|
-
id:
|
9353
|
+
pathParams: z122.object({
|
9354
|
+
id: z122.string()
|
9247
9355
|
}),
|
9248
9356
|
responses: {
|
9249
9357
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9257,12 +9365,12 @@ var roomContract = initContract46().router(
|
|
9257
9365
|
markAsRead: {
|
9258
9366
|
method: "POST",
|
9259
9367
|
path: "/mark_as_read",
|
9260
|
-
body:
|
9261
|
-
id:
|
9368
|
+
body: z122.object({
|
9369
|
+
id: z122.string()
|
9262
9370
|
}),
|
9263
9371
|
responses: {
|
9264
9372
|
200: DefaultSuccessResponseSchema.extend({
|
9265
|
-
message:
|
9373
|
+
message: z122.string()
|
9266
9374
|
}),
|
9267
9375
|
...DefaultResponses
|
9268
9376
|
},
|
@@ -9271,8 +9379,8 @@ var roomContract = initContract46().router(
|
|
9271
9379
|
getById: {
|
9272
9380
|
method: "GET",
|
9273
9381
|
path: "/:id",
|
9274
|
-
pathParams:
|
9275
|
-
id:
|
9382
|
+
pathParams: z122.object({
|
9383
|
+
id: z122.string().uuid()
|
9276
9384
|
}),
|
9277
9385
|
responses: {
|
9278
9386
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9290,70 +9398,70 @@ var roomContract = initContract46().router(
|
|
9290
9398
|
|
9291
9399
|
// src/mail/account-contract.ts
|
9292
9400
|
import { initContract as initContract47 } from "@ts-rest/core";
|
9293
|
-
import
|
9401
|
+
import z124 from "zod";
|
9294
9402
|
|
9295
9403
|
// src/mail/schemas/account-validation.schema.ts
|
9296
|
-
import
|
9404
|
+
import z123 from "zod";
|
9297
9405
|
var AccountContractsValidationSchemas = {
|
9298
9406
|
create: {
|
9299
|
-
input:
|
9300
|
-
address:
|
9301
|
-
name:
|
9302
|
-
password:
|
9303
|
-
mailServerId:
|
9407
|
+
input: z123.object({
|
9408
|
+
address: z123.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
9409
|
+
name: z123.string().min(1, "Account name cannot be empty."),
|
9410
|
+
password: z123.string().min(1, "Password cannot be empty."),
|
9411
|
+
mailServerId: z123.string().uuid("Invalid mail_server_id")
|
9304
9412
|
})
|
9305
9413
|
},
|
9306
9414
|
getById: {
|
9307
|
-
input:
|
9308
|
-
id:
|
9415
|
+
input: z123.object({
|
9416
|
+
id: z123.string().uuid()
|
9309
9417
|
}),
|
9310
9418
|
output: MailAccountSchema
|
9311
9419
|
},
|
9312
9420
|
getAll: {
|
9313
|
-
output:
|
9421
|
+
output: z123.array(MailAccountSchema)
|
9314
9422
|
},
|
9315
9423
|
update: {
|
9316
9424
|
input: MailAccountSchema,
|
9317
9425
|
output: MailAccountSchema
|
9318
9426
|
},
|
9319
9427
|
disconnect: {
|
9320
|
-
input:
|
9321
|
-
id:
|
9428
|
+
input: z123.object({
|
9429
|
+
id: z123.string().uuid()
|
9322
9430
|
}),
|
9323
9431
|
output: MailAccountSchema
|
9324
9432
|
},
|
9325
9433
|
reconnect: {
|
9326
|
-
input:
|
9327
|
-
id:
|
9434
|
+
input: z123.object({
|
9435
|
+
id: z123.string()
|
9328
9436
|
}),
|
9329
9437
|
output: MailAccountSchema
|
9330
9438
|
},
|
9331
9439
|
delete: {
|
9332
|
-
input:
|
9333
|
-
id:
|
9440
|
+
input: z123.object({
|
9441
|
+
id: z123.string()
|
9334
9442
|
}),
|
9335
|
-
output:
|
9443
|
+
output: z123.string()
|
9336
9444
|
},
|
9337
9445
|
deleteEmailEngineAcc: {
|
9338
|
-
input:
|
9339
|
-
account:
|
9446
|
+
input: z123.object({
|
9447
|
+
account: z123.string()
|
9340
9448
|
}),
|
9341
9449
|
output: MailAccountSchema
|
9342
9450
|
},
|
9343
9451
|
generateOAuth2AuthenticationLink: {
|
9344
|
-
body:
|
9345
|
-
oAuth2AppId:
|
9346
|
-
mailServerId:
|
9452
|
+
body: z123.object({
|
9453
|
+
oAuth2AppId: z123.string(),
|
9454
|
+
mailServerId: z123.string()
|
9347
9455
|
}),
|
9348
|
-
response:
|
9349
|
-
url:
|
9350
|
-
account:
|
9456
|
+
response: z123.object({
|
9457
|
+
url: z123.string(),
|
9458
|
+
account: z123.string()
|
9351
9459
|
})
|
9352
9460
|
},
|
9353
9461
|
createOAuth2Acc: {
|
9354
|
-
body:
|
9355
|
-
account:
|
9356
|
-
name:
|
9462
|
+
body: z123.object({
|
9463
|
+
account: z123.string(),
|
9464
|
+
name: z123.string()
|
9357
9465
|
}),
|
9358
9466
|
response: MailAccountSchema
|
9359
9467
|
}
|
@@ -9371,14 +9479,14 @@ var accountContract = initContract47().router(
|
|
9371
9479
|
// data: AccountContractsValidationSchemas.create.output,
|
9372
9480
|
data: MailAccountSchema
|
9373
9481
|
}),
|
9374
|
-
400:
|
9375
|
-
message:
|
9482
|
+
400: z124.object({
|
9483
|
+
message: z124.string()
|
9376
9484
|
}),
|
9377
|
-
409:
|
9378
|
-
message:
|
9485
|
+
409: z124.object({
|
9486
|
+
message: z124.string()
|
9379
9487
|
}),
|
9380
|
-
500:
|
9381
|
-
message:
|
9488
|
+
500: z124.object({
|
9489
|
+
message: z124.string()
|
9382
9490
|
}),
|
9383
9491
|
...DefaultResponses
|
9384
9492
|
},
|
@@ -9394,14 +9502,14 @@ var accountContract = initContract47().router(
|
|
9394
9502
|
201: DefaultSuccessResponseSchema.extend({
|
9395
9503
|
data: AccountContractsValidationSchemas.generateOAuth2AuthenticationLink.response
|
9396
9504
|
}),
|
9397
|
-
400:
|
9398
|
-
message:
|
9505
|
+
400: z124.object({
|
9506
|
+
message: z124.string()
|
9399
9507
|
}),
|
9400
|
-
409:
|
9401
|
-
message:
|
9508
|
+
409: z124.object({
|
9509
|
+
message: z124.string()
|
9402
9510
|
}),
|
9403
|
-
500:
|
9404
|
-
message:
|
9511
|
+
500: z124.object({
|
9512
|
+
message: z124.string()
|
9405
9513
|
}),
|
9406
9514
|
...DefaultResponses
|
9407
9515
|
},
|
@@ -9415,7 +9523,7 @@ var accountContract = initContract47().router(
|
|
9415
9523
|
path: "/sync",
|
9416
9524
|
responses: {
|
9417
9525
|
200: DefaultSuccessResponseSchema.extend({
|
9418
|
-
message:
|
9526
|
+
message: z124.string()
|
9419
9527
|
}),
|
9420
9528
|
...DefaultResponses
|
9421
9529
|
},
|
@@ -9440,13 +9548,13 @@ var accountContract = initContract47().router(
|
|
9440
9548
|
getAll: {
|
9441
9549
|
method: "GET",
|
9442
9550
|
path: "",
|
9443
|
-
query:
|
9444
|
-
state:
|
9445
|
-
withDeleted:
|
9551
|
+
query: z124.object({
|
9552
|
+
state: z124.union([z124.literal("connected"), z124.literal("disconnected")]).optional(),
|
9553
|
+
withDeleted: z124.boolean().default(false)
|
9446
9554
|
}).optional(),
|
9447
9555
|
responses: {
|
9448
9556
|
200: DefaultSuccessResponseSchema.extend({
|
9449
|
-
data:
|
9557
|
+
data: z124.array(MailAccountSchema)
|
9450
9558
|
}),
|
9451
9559
|
...DefaultResponses
|
9452
9560
|
},
|
@@ -9457,8 +9565,8 @@ var accountContract = initContract47().router(
|
|
9457
9565
|
update: {
|
9458
9566
|
method: "PATCH",
|
9459
9567
|
path: "/:id",
|
9460
|
-
pathParams:
|
9461
|
-
id:
|
9568
|
+
pathParams: z124.object({
|
9569
|
+
id: z124.string().uuid()
|
9462
9570
|
}),
|
9463
9571
|
responses: {
|
9464
9572
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -9507,7 +9615,7 @@ var accountContract = initContract47().router(
|
|
9507
9615
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
9508
9616
|
responses: {
|
9509
9617
|
200: DefaultSuccessResponseSchema.extend({
|
9510
|
-
message:
|
9618
|
+
message: z124.string()
|
9511
9619
|
}),
|
9512
9620
|
...DefaultResponses
|
9513
9621
|
},
|
@@ -9522,7 +9630,7 @@ var accountContract = initContract47().router(
|
|
9522
9630
|
pathParams: AccountContractsValidationSchemas.deleteEmailEngineAcc.input,
|
9523
9631
|
responses: {
|
9524
9632
|
200: DefaultSuccessResponseSchema.extend({
|
9525
|
-
message:
|
9633
|
+
message: z124.string()
|
9526
9634
|
}),
|
9527
9635
|
...DefaultResponses
|
9528
9636
|
},
|
@@ -9551,20 +9659,20 @@ var accountContract = initContract47().router(
|
|
9551
9659
|
|
9552
9660
|
// src/mail/mail-server-contract.ts
|
9553
9661
|
import { initContract as initContract48 } from "@ts-rest/core";
|
9554
|
-
import
|
9662
|
+
import z126 from "zod";
|
9555
9663
|
|
9556
9664
|
// src/mail/schemas/servers-validation.schema.ts
|
9557
|
-
import
|
9558
|
-
var CreateMailServerSchema =
|
9559
|
-
name:
|
9560
|
-
smtpHost:
|
9561
|
-
smtpPort:
|
9562
|
-
smtpTlsPort:
|
9563
|
-
useTlsForSmtp:
|
9564
|
-
imapHost:
|
9565
|
-
imapPort:
|
9566
|
-
imapTlsPort:
|
9567
|
-
useTlsForImap:
|
9665
|
+
import z125 from "zod";
|
9666
|
+
var CreateMailServerSchema = z125.object({
|
9667
|
+
name: z125.string(),
|
9668
|
+
smtpHost: z125.string(),
|
9669
|
+
smtpPort: z125.number(),
|
9670
|
+
smtpTlsPort: z125.number(),
|
9671
|
+
useTlsForSmtp: z125.boolean(),
|
9672
|
+
imapHost: z125.string(),
|
9673
|
+
imapPort: z125.number(),
|
9674
|
+
imapTlsPort: z125.number(),
|
9675
|
+
useTlsForImap: z125.boolean()
|
9568
9676
|
});
|
9569
9677
|
|
9570
9678
|
// src/mail/mail-server-contract.ts
|
@@ -9587,11 +9695,11 @@ var serverContract = initContract48().router(
|
|
9587
9695
|
path: "/oauth2/apps",
|
9588
9696
|
responses: {
|
9589
9697
|
200: DefaultSuccessResponseSchema.extend({
|
9590
|
-
data:
|
9591
|
-
total:
|
9592
|
-
pages:
|
9593
|
-
page:
|
9594
|
-
apps:
|
9698
|
+
data: z126.object({
|
9699
|
+
total: z126.number(),
|
9700
|
+
pages: z126.number(),
|
9701
|
+
page: z126.number(),
|
9702
|
+
apps: z126.array(OAuth2AppSchema)
|
9595
9703
|
})
|
9596
9704
|
}),
|
9597
9705
|
...DefaultResponses
|
@@ -9601,8 +9709,8 @@ var serverContract = initContract48().router(
|
|
9601
9709
|
getById: {
|
9602
9710
|
method: "GET",
|
9603
9711
|
path: "/:id",
|
9604
|
-
pathParams:
|
9605
|
-
id:
|
9712
|
+
pathParams: z126.object({
|
9713
|
+
id: z126.string().uuid()
|
9606
9714
|
}),
|
9607
9715
|
responses: {
|
9608
9716
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9617,7 +9725,7 @@ var serverContract = initContract48().router(
|
|
9617
9725
|
path: "/",
|
9618
9726
|
responses: {
|
9619
9727
|
200: DefaultSuccessResponseSchema.extend({
|
9620
|
-
data:
|
9728
|
+
data: z126.array(MailServerSchema)
|
9621
9729
|
}),
|
9622
9730
|
...DefaultResponses
|
9623
9731
|
},
|
@@ -9626,8 +9734,8 @@ var serverContract = initContract48().router(
|
|
9626
9734
|
update: {
|
9627
9735
|
method: "PATCH",
|
9628
9736
|
path: "/:id",
|
9629
|
-
pathParams:
|
9630
|
-
id:
|
9737
|
+
pathParams: z126.object({
|
9738
|
+
id: z126.string().uuid()
|
9631
9739
|
}),
|
9632
9740
|
responses: {
|
9633
9741
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9641,8 +9749,8 @@ var serverContract = initContract48().router(
|
|
9641
9749
|
delete: {
|
9642
9750
|
method: "DELETE",
|
9643
9751
|
path: "/:id",
|
9644
|
-
pathParams:
|
9645
|
-
id:
|
9752
|
+
pathParams: z126.object({
|
9753
|
+
id: z126.string().uuid()
|
9646
9754
|
}),
|
9647
9755
|
responses: {
|
9648
9756
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9661,45 +9769,45 @@ var serverContract = initContract48().router(
|
|
9661
9769
|
|
9662
9770
|
// src/mail/message-contract.ts
|
9663
9771
|
import { initContract as initContract49 } from "@ts-rest/core";
|
9664
|
-
import
|
9772
|
+
import z128 from "zod";
|
9665
9773
|
|
9666
9774
|
// src/mail/schemas/message-validation.schema.ts
|
9667
|
-
import
|
9668
|
-
var MailParticipant2 =
|
9669
|
-
name:
|
9670
|
-
address:
|
9775
|
+
import z127 from "zod";
|
9776
|
+
var MailParticipant2 = z127.object({
|
9777
|
+
name: z127.string().optional(),
|
9778
|
+
address: z127.string().email()
|
9671
9779
|
});
|
9672
9780
|
var MessageContractsValidationsSchema = {
|
9673
9781
|
submit: {
|
9674
|
-
input:
|
9675
|
-
subject:
|
9676
|
-
text:
|
9677
|
-
html:
|
9782
|
+
input: z127.object({
|
9783
|
+
subject: z127.string(),
|
9784
|
+
text: z127.string(),
|
9785
|
+
html: z127.string(),
|
9678
9786
|
from: MailParticipant2,
|
9679
9787
|
to: MailParticipant2,
|
9680
|
-
cc:
|
9681
|
-
bcc:
|
9682
|
-
sendAt:
|
9683
|
-
reference:
|
9684
|
-
messageId:
|
9685
|
-
action:
|
9788
|
+
cc: z127.array(MailParticipant2).optional(),
|
9789
|
+
bcc: z127.array(MailParticipant2).optional(),
|
9790
|
+
sendAt: z127.string().optional(),
|
9791
|
+
reference: z127.object({
|
9792
|
+
messageId: z127.string(),
|
9793
|
+
action: z127.union([z127.literal("reply"), z127.literal("forward")])
|
9686
9794
|
}).optional(),
|
9687
|
-
attachments:
|
9688
|
-
|
9689
|
-
fileType:
|
9690
|
-
fileName:
|
9691
|
-
fileKey:
|
9692
|
-
fileSize:
|
9693
|
-
bucketName:
|
9694
|
-
presignedUrl:
|
9795
|
+
attachments: z127.array(
|
9796
|
+
z127.object({
|
9797
|
+
fileType: z127.string(),
|
9798
|
+
fileName: z127.string(),
|
9799
|
+
fileKey: z127.string(),
|
9800
|
+
fileSize: z127.number(),
|
9801
|
+
bucketName: z127.string(),
|
9802
|
+
presignedUrl: z127.string()
|
9695
9803
|
})
|
9696
9804
|
).optional()
|
9697
9805
|
}),
|
9698
|
-
output:
|
9699
|
-
response:
|
9700
|
-
messageId:
|
9701
|
-
sendAt:
|
9702
|
-
queueId:
|
9806
|
+
output: z127.object({
|
9807
|
+
response: z127.string(),
|
9808
|
+
messageId: z127.string(),
|
9809
|
+
sendAt: z127.string(),
|
9810
|
+
queueId: z127.string()
|
9703
9811
|
})
|
9704
9812
|
}
|
9705
9813
|
};
|
@@ -9728,8 +9836,8 @@ var messageContract = initContract49().router(
|
|
9728
9836
|
path: "/new_message_count",
|
9729
9837
|
responses: {
|
9730
9838
|
200: DefaultSuccessResponseSchema.extend({
|
9731
|
-
data:
|
9732
|
-
count:
|
9839
|
+
data: z128.object({
|
9840
|
+
count: z128.number()
|
9733
9841
|
})
|
9734
9842
|
}),
|
9735
9843
|
...DefaultResponses
|
@@ -9741,8 +9849,8 @@ var messageContract = initContract49().router(
|
|
9741
9849
|
getById: {
|
9742
9850
|
method: "GET",
|
9743
9851
|
path: "/:id",
|
9744
|
-
pathParams:
|
9745
|
-
id:
|
9852
|
+
pathParams: z128.object({
|
9853
|
+
id: z128.string()
|
9746
9854
|
}),
|
9747
9855
|
responses: {
|
9748
9856
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9757,8 +9865,8 @@ var messageContract = initContract49().router(
|
|
9757
9865
|
update: {
|
9758
9866
|
method: "PATCH",
|
9759
9867
|
path: "/:id",
|
9760
|
-
pathParams:
|
9761
|
-
id:
|
9868
|
+
pathParams: z128.object({
|
9869
|
+
id: z128.string()
|
9762
9870
|
}),
|
9763
9871
|
responses: {
|
9764
9872
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9774,8 +9882,8 @@ var messageContract = initContract49().router(
|
|
9774
9882
|
delete: {
|
9775
9883
|
method: "DELETE",
|
9776
9884
|
path: "/:id",
|
9777
|
-
pathParams:
|
9778
|
-
id:
|
9885
|
+
pathParams: z128.object({
|
9886
|
+
id: z128.string()
|
9779
9887
|
}),
|
9780
9888
|
responses: {
|
9781
9889
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9791,13 +9899,13 @@ var messageContract = initContract49().router(
|
|
9791
9899
|
cancelScheduledMessage: {
|
9792
9900
|
method: "DELETE",
|
9793
9901
|
path: "/scheduled_message/:id",
|
9794
|
-
pathParams:
|
9795
|
-
id:
|
9902
|
+
pathParams: z128.object({
|
9903
|
+
id: z128.string()
|
9796
9904
|
}),
|
9797
9905
|
responses: {
|
9798
9906
|
200: DefaultSuccessResponseSchema.extend({
|
9799
|
-
data:
|
9800
|
-
totalMessagesCount:
|
9907
|
+
data: z128.object({
|
9908
|
+
totalMessagesCount: z128.number()
|
9801
9909
|
})
|
9802
9910
|
}),
|
9803
9911
|
...DefaultResponses
|
@@ -9822,38 +9930,38 @@ var mailContract = initContract50().router({
|
|
9822
9930
|
|
9823
9931
|
// src/webchat/index.ts
|
9824
9932
|
import { initContract as initContract51 } from "@ts-rest/core";
|
9825
|
-
import
|
9933
|
+
import z131 from "zod";
|
9826
9934
|
|
9827
9935
|
// src/webchat/schema.ts
|
9828
|
-
import
|
9936
|
+
import z130 from "zod";
|
9829
9937
|
|
9830
9938
|
// src/webchat/validation.ts
|
9831
|
-
import
|
9939
|
+
import z129 from "zod";
|
9832
9940
|
var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
|
9833
9941
|
ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
|
9834
9942
|
return ChatwootChannelType3;
|
9835
9943
|
})(ChatwootChannelType2 || {});
|
9836
|
-
var WebChatChannelSchema =
|
9837
|
-
avatar:
|
9838
|
-
name:
|
9839
|
-
type:
|
9840
|
-
websiteName:
|
9841
|
-
welcomeTitle:
|
9842
|
-
websiteUrl:
|
9843
|
-
welcomeTagline:
|
9844
|
-
agentAwayMessage:
|
9845
|
-
widgetColor:
|
9944
|
+
var WebChatChannelSchema = z129.object({
|
9945
|
+
avatar: z129.string().optional(),
|
9946
|
+
name: z129.string(),
|
9947
|
+
type: z129.nativeEnum(ChatwootChannelType2),
|
9948
|
+
websiteName: z129.string(),
|
9949
|
+
welcomeTitle: z129.string(),
|
9950
|
+
websiteUrl: z129.string().url(),
|
9951
|
+
welcomeTagline: z129.string().optional(),
|
9952
|
+
agentAwayMessage: z129.string().optional(),
|
9953
|
+
widgetColor: z129.string().optional()
|
9846
9954
|
});
|
9847
9955
|
|
9848
9956
|
// src/webchat/schema.ts
|
9849
|
-
var ConnectWebChatChannelSchema =
|
9850
|
-
name:
|
9851
|
-
actor:
|
9852
|
-
id:
|
9853
|
-
name:
|
9854
|
-
email:
|
9855
|
-
address:
|
9856
|
-
phone:
|
9957
|
+
var ConnectWebChatChannelSchema = z130.object({
|
9958
|
+
name: z130.string(),
|
9959
|
+
actor: z130.object({
|
9960
|
+
id: z130.string().uuid(),
|
9961
|
+
name: z130.string(),
|
9962
|
+
email: z130.string().email(),
|
9963
|
+
address: z130.string().nullable(),
|
9964
|
+
phone: z130.string().nullable()
|
9857
9965
|
}),
|
9858
9966
|
channel: WebChatChannelSchema
|
9859
9967
|
});
|
@@ -9886,8 +9994,8 @@ var platformWebchatContract = initContract51().router({
|
|
9886
9994
|
disconnectToService: {
|
9887
9995
|
method: "POST",
|
9888
9996
|
path: "/disconnect",
|
9889
|
-
body:
|
9890
|
-
id:
|
9997
|
+
body: z131.object({
|
9998
|
+
id: z131.string().uuid()
|
9891
9999
|
}),
|
9892
10000
|
responses: {
|
9893
10001
|
200: ChannelServiceResponseSchema,
|
@@ -9898,8 +10006,8 @@ var platformWebchatContract = initContract51().router({
|
|
9898
10006
|
reconnect: {
|
9899
10007
|
method: "POST",
|
9900
10008
|
path: "/reconnect/:channelId",
|
9901
|
-
pathParams:
|
9902
|
-
channelId:
|
10009
|
+
pathParams: z131.object({
|
10010
|
+
channelId: z131.string().uuid()
|
9903
10011
|
}),
|
9904
10012
|
body: null,
|
9905
10013
|
responses: {
|
@@ -9911,8 +10019,8 @@ var platformWebchatContract = initContract51().router({
|
|
9911
10019
|
delete: {
|
9912
10020
|
method: "DELETE",
|
9913
10021
|
path: "/delete/:channelId",
|
9914
|
-
pathParams:
|
9915
|
-
channelId:
|
10022
|
+
pathParams: z131.object({
|
10023
|
+
channelId: z131.string().uuid()
|
9916
10024
|
}),
|
9917
10025
|
body: null,
|
9918
10026
|
responses: {
|
@@ -9925,18 +10033,18 @@ var platformWebchatContract = initContract51().router({
|
|
9925
10033
|
|
9926
10034
|
// src/hold-label/index.ts
|
9927
10035
|
import { initContract as initContract52 } from "@ts-rest/core";
|
9928
|
-
import
|
10036
|
+
import z133 from "zod";
|
9929
10037
|
|
9930
10038
|
// src/hold-label/validation.ts
|
9931
|
-
import
|
9932
|
-
var UpdatePositionSchema2 =
|
9933
|
-
holdLabels:
|
9934
|
-
|
10039
|
+
import z132 from "zod";
|
10040
|
+
var UpdatePositionSchema2 = z132.object({
|
10041
|
+
holdLabels: z132.array(
|
10042
|
+
z132.object({ id: z132.string().uuid(), position: z132.number() })
|
9935
10043
|
)
|
9936
10044
|
});
|
9937
|
-
var HoldRoomSchema =
|
9938
|
-
roomId:
|
9939
|
-
holdLabelId:
|
10045
|
+
var HoldRoomSchema = z132.object({
|
10046
|
+
roomId: z132.string().uuid(),
|
10047
|
+
holdLabelId: z132.string().uuid()
|
9940
10048
|
});
|
9941
10049
|
|
9942
10050
|
// src/hold-label/index.ts
|
@@ -9945,7 +10053,7 @@ var holdLabelContract = initContract52().router(
|
|
9945
10053
|
createHoldLabel: {
|
9946
10054
|
method: "POST",
|
9947
10055
|
path: "/",
|
9948
|
-
body:
|
10056
|
+
body: z133.object({ name: z133.string() }),
|
9949
10057
|
responses: {
|
9950
10058
|
201: DefaultSuccessResponseSchema.extend({
|
9951
10059
|
holdLabel: HoldLabelSchema
|
@@ -9957,7 +10065,7 @@ var holdLabelContract = initContract52().router(
|
|
9957
10065
|
path: "/",
|
9958
10066
|
responses: {
|
9959
10067
|
200: DefaultSuccessResponseSchema.extend({
|
9960
|
-
holdLabels:
|
10068
|
+
holdLabels: z133.array(HoldLabelSchema)
|
9961
10069
|
})
|
9962
10070
|
}
|
9963
10071
|
},
|
@@ -9975,8 +10083,8 @@ var holdLabelContract = initContract52().router(
|
|
9975
10083
|
updateHoldLabel: {
|
9976
10084
|
method: "PATCH",
|
9977
10085
|
path: "/:id",
|
9978
|
-
pathParams:
|
9979
|
-
body:
|
10086
|
+
pathParams: z133.object({ id: z133.string().uuid() }),
|
10087
|
+
body: z133.object({ name: z133.string() }),
|
9980
10088
|
responses: {
|
9981
10089
|
200: DefaultSuccessResponseSchema.extend({
|
9982
10090
|
holdLabel: HoldLabelSchema
|
@@ -9986,7 +10094,7 @@ var holdLabelContract = initContract52().router(
|
|
9986
10094
|
deleteHoldLabel: {
|
9987
10095
|
method: "DELETE",
|
9988
10096
|
path: "/:id",
|
9989
|
-
pathParams:
|
10097
|
+
pathParams: z133.object({ id: z133.string().uuid() }),
|
9990
10098
|
body: null,
|
9991
10099
|
responses: {
|
9992
10100
|
200: DefaultSuccessResponseSchema
|
@@ -9997,27 +10105,27 @@ var holdLabelContract = initContract52().router(
|
|
9997
10105
|
path: "/auto-unhold",
|
9998
10106
|
responses: {
|
9999
10107
|
200: DefaultSuccessResponseSchema.extend({
|
10000
|
-
autoUnhold:
|
10108
|
+
autoUnhold: z133.boolean()
|
10001
10109
|
})
|
10002
10110
|
}
|
10003
10111
|
},
|
10004
10112
|
updateAutoUnhold: {
|
10005
10113
|
method: "POST",
|
10006
10114
|
path: "/auto-unhold",
|
10007
|
-
body:
|
10115
|
+
body: z133.object({ autoUnhold: z133.boolean() }),
|
10008
10116
|
responses: {
|
10009
10117
|
200: DefaultSuccessResponseSchema.extend({
|
10010
|
-
autoUnhold:
|
10118
|
+
autoUnhold: z133.boolean()
|
10011
10119
|
})
|
10012
10120
|
}
|
10013
10121
|
},
|
10014
10122
|
getHoldLogs: {
|
10015
10123
|
method: "GET",
|
10016
10124
|
path: "/hold-logs",
|
10017
|
-
query:
|
10125
|
+
query: z133.object({ cxLogId: z133.string().uuid() }),
|
10018
10126
|
responses: {
|
10019
|
-
200:
|
10020
|
-
holdLogs:
|
10127
|
+
200: z133.object({
|
10128
|
+
holdLogs: z133.array(FormattedHoldLogSchema)
|
10021
10129
|
})
|
10022
10130
|
}
|
10023
10131
|
},
|
@@ -10034,7 +10142,7 @@ var holdLabelContract = initContract52().router(
|
|
10034
10142
|
unholdRoom: {
|
10035
10143
|
method: "POST",
|
10036
10144
|
path: "/unhold-room",
|
10037
|
-
body:
|
10145
|
+
body: z133.object({ roomId: z133.string().uuid() }),
|
10038
10146
|
responses: {
|
10039
10147
|
200: DefaultSuccessResponseSchema.extend({
|
10040
10148
|
holdLog: HoldLogSchema.optional()
|
@@ -10047,89 +10155,89 @@ var holdLabelContract = initContract52().router(
|
|
10047
10155
|
|
10048
10156
|
// src/subscription/index.ts
|
10049
10157
|
import { initContract as initContract53 } from "@ts-rest/core";
|
10050
|
-
import { z as
|
10158
|
+
import { z as z136 } from "zod";
|
10051
10159
|
|
10052
10160
|
// src/subscription/schema.ts
|
10053
|
-
import
|
10161
|
+
import z134 from "zod";
|
10054
10162
|
var ProductPriceSchema = DefaultEntitySchema.extend({
|
10055
|
-
priceId:
|
10056
|
-
name:
|
10057
|
-
perUnit:
|
10058
|
-
price:
|
10059
|
-
currency:
|
10163
|
+
priceId: z134.string(),
|
10164
|
+
name: z134.string().nullable(),
|
10165
|
+
perUnit: z134.number(),
|
10166
|
+
price: z134.number(),
|
10167
|
+
currency: z134.string().nullable()
|
10060
10168
|
});
|
10061
10169
|
var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
|
10062
|
-
provider:
|
10063
|
-
productId:
|
10064
|
-
name:
|
10065
|
-
type:
|
10066
|
-
omnichannel:
|
10067
|
-
usageType:
|
10170
|
+
provider: z134.string(),
|
10171
|
+
productId: z134.string(),
|
10172
|
+
name: z134.string(),
|
10173
|
+
type: z134.string(),
|
10174
|
+
omnichannel: z134.string(),
|
10175
|
+
usageType: z134.string().nullable(),
|
10068
10176
|
productPrice: ProductPriceSchema
|
10069
10177
|
});
|
10070
10178
|
var RelatedProductSchema = DefaultEntitySchema.extend({
|
10071
|
-
includedQuantity:
|
10179
|
+
includedQuantity: z134.number(),
|
10072
10180
|
product: ProductWithoutRelatedSchema
|
10073
10181
|
});
|
10074
10182
|
var ProductSchema = DefaultEntitySchema.extend({
|
10075
|
-
provider:
|
10076
|
-
productId:
|
10077
|
-
name:
|
10078
|
-
type:
|
10079
|
-
omnichannel:
|
10080
|
-
usageType:
|
10183
|
+
provider: z134.string(),
|
10184
|
+
productId: z134.string(),
|
10185
|
+
name: z134.string(),
|
10186
|
+
type: z134.string(),
|
10187
|
+
omnichannel: z134.string(),
|
10188
|
+
usageType: z134.string().nullable(),
|
10081
10189
|
productPrice: ProductPriceSchema,
|
10082
|
-
relatedProducts:
|
10190
|
+
relatedProducts: z134.array(RelatedProductSchema)
|
10083
10191
|
});
|
10084
10192
|
var CustomerSchema = DefaultEntitySchema.extend({
|
10085
|
-
provider:
|
10086
|
-
customerId:
|
10087
|
-
email:
|
10088
|
-
name:
|
10089
|
-
balance:
|
10193
|
+
provider: z134.string(),
|
10194
|
+
customerId: z134.string(),
|
10195
|
+
email: z134.string(),
|
10196
|
+
name: z134.string(),
|
10197
|
+
balance: z134.number()
|
10090
10198
|
});
|
10091
10199
|
var SubscriptionProuctSchema = DefaultEntitySchema.extend({
|
10092
|
-
limit:
|
10093
|
-
subscriptionItemId:
|
10094
|
-
usage:
|
10200
|
+
limit: z134.number(),
|
10201
|
+
subscriptionItemId: z134.string(),
|
10202
|
+
usage: z134.number().nullable(),
|
10095
10203
|
product: ProductSchema
|
10096
10204
|
});
|
10097
10205
|
var SubscriptionSchema = DefaultEntitySchema.extend({
|
10098
|
-
provider:
|
10099
|
-
type:
|
10100
|
-
subscriptionId:
|
10101
|
-
interval:
|
10102
|
-
quantity:
|
10103
|
-
amount:
|
10104
|
-
startAt:
|
10105
|
-
expireAt:
|
10106
|
-
status:
|
10107
|
-
name:
|
10108
|
-
subscriptionProducts:
|
10206
|
+
provider: z134.string(),
|
10207
|
+
type: z134.string(),
|
10208
|
+
subscriptionId: z134.string(),
|
10209
|
+
interval: z134.string(),
|
10210
|
+
quantity: z134.number(),
|
10211
|
+
amount: z134.number(),
|
10212
|
+
startAt: z134.date().nullable(),
|
10213
|
+
expireAt: z134.date(),
|
10214
|
+
status: z134.string(),
|
10215
|
+
name: z134.string().nullable(),
|
10216
|
+
subscriptionProducts: z134.array(SubscriptionProuctSchema),
|
10109
10217
|
productPrice: ProductPriceSchema,
|
10110
10218
|
product: ProductSchema
|
10111
10219
|
});
|
10112
10220
|
|
10113
10221
|
// src/subscription/validation.ts
|
10114
|
-
import { z as
|
10115
|
-
var GetAvailablePlanSchema =
|
10116
|
-
type:
|
10117
|
-
currency:
|
10118
|
-
});
|
10119
|
-
var UpdateSubscriptionSchema =
|
10120
|
-
planProductId:
|
10121
|
-
planProductPriceId:
|
10122
|
-
subscriptionId:
|
10123
|
-
subscriptionProducts:
|
10124
|
-
|
10125
|
-
productId:
|
10126
|
-
productPriceId:
|
10127
|
-
quantity:
|
10222
|
+
import { z as z135 } from "zod";
|
10223
|
+
var GetAvailablePlanSchema = z135.object({
|
10224
|
+
type: z135.string(),
|
10225
|
+
currency: z135.string()
|
10226
|
+
});
|
10227
|
+
var UpdateSubscriptionSchema = z135.object({
|
10228
|
+
planProductId: z135.string(),
|
10229
|
+
planProductPriceId: z135.string(),
|
10230
|
+
subscriptionId: z135.string(),
|
10231
|
+
subscriptionProducts: z135.array(
|
10232
|
+
z135.object({
|
10233
|
+
productId: z135.string(),
|
10234
|
+
productPriceId: z135.string(),
|
10235
|
+
quantity: z135.number()
|
10128
10236
|
})
|
10129
10237
|
)
|
10130
10238
|
});
|
10131
|
-
var TopUpBalanceSchema =
|
10132
|
-
quantity:
|
10239
|
+
var TopUpBalanceSchema = z135.object({
|
10240
|
+
quantity: z135.number()
|
10133
10241
|
});
|
10134
10242
|
|
10135
10243
|
// src/subscription/index.ts
|
@@ -10153,9 +10261,9 @@ var subscriptionContract = initContract53().router(
|
|
10153
10261
|
body: UpdateSubscriptionSchema,
|
10154
10262
|
responses: {
|
10155
10263
|
200: DefaultSuccessResponseSchema.extend({
|
10156
|
-
message:
|
10157
|
-
requireCheckout:
|
10158
|
-
checkoutUrl:
|
10264
|
+
message: z136.string(),
|
10265
|
+
requireCheckout: z136.boolean(),
|
10266
|
+
checkoutUrl: z136.string().nullable()
|
10159
10267
|
}),
|
10160
10268
|
402: DefaultErrorResponseSchema,
|
10161
10269
|
500: DefaultErrorResponseSchema
|
@@ -10167,7 +10275,7 @@ var subscriptionContract = initContract53().router(
|
|
10167
10275
|
body: TopUpBalanceSchema,
|
10168
10276
|
responses: {
|
10169
10277
|
200: DefaultSuccessResponseSchema.extend({
|
10170
|
-
checkoutUrl:
|
10278
|
+
checkoutUrl: z136.string()
|
10171
10279
|
}),
|
10172
10280
|
500: DefaultErrorResponseSchema
|
10173
10281
|
}
|
@@ -10178,7 +10286,7 @@ var subscriptionContract = initContract53().router(
|
|
10178
10286
|
query: GetAvailablePlanSchema,
|
10179
10287
|
responses: {
|
10180
10288
|
200: DefaultSuccessResponseSchema.extend({
|
10181
|
-
data:
|
10289
|
+
data: z136.array(ProductSchema)
|
10182
10290
|
}),
|
10183
10291
|
500: DefaultErrorResponseSchema
|
10184
10292
|
}
|
@@ -10201,19 +10309,19 @@ var subscriptionContract = initContract53().router(
|
|
10201
10309
|
|
10202
10310
|
// src/cx-intelligence/index.ts
|
10203
10311
|
import { initContract as initContract54 } from "@ts-rest/core";
|
10204
|
-
import
|
10312
|
+
import z137 from "zod";
|
10205
10313
|
var cxIntelligenceContract = initContract54().router(
|
10206
10314
|
{
|
10207
10315
|
toggle: {
|
10208
10316
|
method: "POST",
|
10209
10317
|
path: "/toggle",
|
10210
10318
|
headers: DefaultHeaderSchema,
|
10211
|
-
body:
|
10212
|
-
enabled:
|
10319
|
+
body: z137.object({
|
10320
|
+
enabled: z137.union([z137.literal(true), z137.literal(false)])
|
10213
10321
|
}),
|
10214
10322
|
responses: {
|
10215
10323
|
200: DefaultSuccessResponseSchema.extend({
|
10216
|
-
message:
|
10324
|
+
message: z137.string()
|
10217
10325
|
}),
|
10218
10326
|
500: DefaultErrorResponseSchema
|
10219
10327
|
},
|
@@ -10223,15 +10331,15 @@ var cxIntelligenceContract = initContract54().router(
|
|
10223
10331
|
method: "POST",
|
10224
10332
|
path: "/cx-logs/:id/transcribe",
|
10225
10333
|
headers: DefaultHeaderSchema,
|
10226
|
-
pathParams:
|
10227
|
-
id:
|
10334
|
+
pathParams: z137.object({
|
10335
|
+
id: z137.string().uuid()
|
10228
10336
|
}),
|
10229
|
-
body:
|
10230
|
-
fileUrl:
|
10337
|
+
body: z137.object({
|
10338
|
+
fileUrl: z137.string()
|
10231
10339
|
}),
|
10232
10340
|
responses: {
|
10233
10341
|
200: DefaultSuccessResponseSchema.extend({
|
10234
|
-
message:
|
10342
|
+
message: z137.string()
|
10235
10343
|
}),
|
10236
10344
|
403: DefaultErrorResponseSchema,
|
10237
10345
|
404: DefaultErrorResponseSchema,
|
@@ -10251,13 +10359,13 @@ var settingCxIntelligenceContract = initContract54().router(
|
|
10251
10359
|
headers: DefaultHeaderSchema,
|
10252
10360
|
responses: {
|
10253
10361
|
200: DefaultSuccessResponseSchema.extend({
|
10254
|
-
message:
|
10255
|
-
status:
|
10362
|
+
message: z137.string(),
|
10363
|
+
status: z137.boolean()
|
10256
10364
|
}),
|
10257
|
-
422:
|
10258
|
-
requestId:
|
10259
|
-
message:
|
10260
|
-
status:
|
10365
|
+
422: z137.object({
|
10366
|
+
requestId: z137.string(),
|
10367
|
+
message: z137.string(),
|
10368
|
+
status: z137.boolean()
|
10261
10369
|
}),
|
10262
10370
|
500: DefaultErrorResponseSchema
|
10263
10371
|
},
|