@kl1/contracts 1.3.80 → 1.3.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-contracts/src/channel/index.d.ts +64 -0
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/validation.d.ts +64 -0
- package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +43 -0
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +25 -0
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +254 -430
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/index.d.ts +9 -0
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/index.d.ts +1 -0
- package/dist/api-contracts/src/index.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +9 -0
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/index.d.ts +9 -0
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/index.d.ts +9 -0
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/sms/index.d.ts +9 -0
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/subscription/index.d.ts +438 -0
- package/dist/api-contracts/src/subscription/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telegram/index.d.ts +9 -0
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +0 -430
- 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 +0 -3
- 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/viber/index.d.ts +9 -0
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +9 -0
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +9 -0
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/workflow-rule/index.d.ts +54 -0
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/index.js +1605 -1567
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1604 -1567
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1402,7 +1402,8 @@ var SendMessageToPlatformSchema = z26.object({
|
|
1402
1402
|
channel: z26.string().nullable(),
|
1403
1403
|
notes: z26.string().nullable(),
|
1404
1404
|
contactProfile: z26.string().nullable(),
|
1405
|
-
socialProfileUrl: z26.string().nullable()
|
1405
|
+
socialProfileUrl: z26.string().nullable(),
|
1406
|
+
deletedAt: z26.date().nullable()
|
1406
1407
|
})
|
1407
1408
|
}),
|
1408
1409
|
actor: z26.object({
|
@@ -1628,6 +1629,9 @@ var AllHoldAndQueueRoomCountSchema = z26.object({
|
|
1628
1629
|
holdRoomCount: z26.record(z26.string(), z26.number()),
|
1629
1630
|
queueRoomCount: z26.record(z26.string(), z26.number())
|
1630
1631
|
});
|
1632
|
+
var AllOpenCloseBotRoomCountSchema = z26.object({
|
1633
|
+
allOpenedClosedBotRoomCount: z26.number()
|
1634
|
+
});
|
1631
1635
|
|
1632
1636
|
// src/sms/index.ts
|
1633
1637
|
var smsContract = initContract().router({
|
@@ -2220,6 +2224,22 @@ var ConnectWhatsappSchema = z37.object({
|
|
2220
2224
|
});
|
2221
2225
|
var CsatPreferenceSchema = z37.object({
|
2222
2226
|
isCSATEnabled: z37.boolean(),
|
2227
|
+
headline: z37.string().optional().nullable(),
|
2228
|
+
image: z37.object({
|
2229
|
+
bucketName: z37.string(),
|
2230
|
+
fileName: z37.string(),
|
2231
|
+
fileSize: z37.number(),
|
2232
|
+
fileKey: z37.string(),
|
2233
|
+
originalUrl: z37.string().optional().nullable()
|
2234
|
+
}).optional().nullable(),
|
2235
|
+
scaleOptions: z37.array(
|
2236
|
+
z37.object({
|
2237
|
+
value: z37.string(),
|
2238
|
+
label: z37.string(),
|
2239
|
+
color: z37.string().optional().nullable(),
|
2240
|
+
style: z37.string().optional().nullable()
|
2241
|
+
})
|
2242
|
+
).optional().nullable(),
|
2223
2243
|
dispositions: z37.array(z37.string()).optional()
|
2224
2244
|
});
|
2225
2245
|
var ConnectLazadaSchema = z37.object({
|
@@ -2997,6 +3017,16 @@ var mainChatRoomContract = initContract8().router(
|
|
2997
3017
|
},
|
2998
3018
|
summary: "Get all queue and hold rooms count"
|
2999
3019
|
},
|
3020
|
+
getAllBotRoomCount: {
|
3021
|
+
method: "GET",
|
3022
|
+
path: "/all-bot-rooms-count",
|
3023
|
+
responses: {
|
3024
|
+
200: DefaultSuccessResponseSchema.extend({
|
3025
|
+
data: AllOpenCloseBotRoomCountSchema
|
3026
|
+
})
|
3027
|
+
},
|
3028
|
+
summary: "Get all opened and closed bot rooms count"
|
3029
|
+
},
|
3000
3030
|
botRoomTakeOver: {
|
3001
3031
|
method: "POST",
|
3002
3032
|
path: "/bot-room/take-over/:roomId",
|
@@ -5841,10 +5871,7 @@ var tagContract = initContract22().router(
|
|
5841
5871
|
|
5842
5872
|
// src/telephony-agent-presence-status/index.ts
|
5843
5873
|
import { initContract as initContract23 } from "@ts-rest/core";
|
5844
|
-
import
|
5845
|
-
|
5846
|
-
// src/telephony-agent-presence-status/schema.ts
|
5847
|
-
import z73 from "zod";
|
5874
|
+
import z74 from "zod";
|
5848
5875
|
|
5849
5876
|
// src/presence-status/schema.ts
|
5850
5877
|
import z72 from "zod";
|
@@ -5879,45 +5906,29 @@ var UserPresenceStatusSchema = z72.object({
|
|
5879
5906
|
// src/telephony-agent-presence-status/schema.ts
|
5880
5907
|
var UserPresenceStatusSchema2 = DefaultEntitySchema.extend({
|
5881
5908
|
user: UserSchema,
|
5882
|
-
presenceStatus: PresenceStatusSchema
|
5883
|
-
customPresenceStatus: z73.string().nullable().optional()
|
5909
|
+
presenceStatus: PresenceStatusSchema
|
5884
5910
|
});
|
5885
5911
|
|
5886
5912
|
// src/telephony-agent-presence-status/validation.ts
|
5887
|
-
import { z as
|
5888
|
-
var UpdateUserStatusSchema =
|
5889
|
-
userId:
|
5890
|
-
presenceStatusId:
|
5891
|
-
|
5892
|
-
reason: z74.string()
|
5913
|
+
import { z as z73 } from "zod";
|
5914
|
+
var UpdateUserStatusSchema = z73.object({
|
5915
|
+
userId: z73.string(),
|
5916
|
+
presenceStatusId: z73.string().nullable().optional(),
|
5917
|
+
reason: z73.string()
|
5893
5918
|
});
|
5894
5919
|
|
5895
5920
|
// src/telephony-agent-presence-status/index.ts
|
5896
5921
|
var telephonyAgentPresenceStatusContract = initContract23().router(
|
5897
5922
|
{
|
5898
|
-
getAllAgentStatus: {
|
5899
|
-
method: "GET",
|
5900
|
-
path: "/agents/presence_status",
|
5901
|
-
headers: DefaultHeaderSchema,
|
5902
|
-
responses: {
|
5903
|
-
200: z75.array(UserPresenceStatusSchema2),
|
5904
|
-
400: z75.object({
|
5905
|
-
message: z75.string()
|
5906
|
-
}),
|
5907
|
-
401: DefaultUnauthorizedSchema,
|
5908
|
-
500: DefaultErrorResponseSchema
|
5909
|
-
},
|
5910
|
-
summary: "Get all user presence status list."
|
5911
|
-
},
|
5912
5923
|
getAgentStatus: {
|
5913
5924
|
method: "GET",
|
5914
5925
|
path: "/presence_status/check_update/:userId",
|
5915
|
-
pathParams:
|
5926
|
+
pathParams: z74.object({ userId: z74.string() }),
|
5916
5927
|
headers: DefaultHeaderSchema,
|
5917
5928
|
responses: {
|
5918
5929
|
200: UserPresenceStatusSchema2,
|
5919
|
-
400:
|
5920
|
-
message:
|
5930
|
+
400: z74.object({
|
5931
|
+
message: z74.string()
|
5921
5932
|
}),
|
5922
5933
|
401: DefaultUnauthorizedSchema,
|
5923
5934
|
500: DefaultErrorResponseSchema
|
@@ -5933,8 +5944,8 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5933
5944
|
200: DefaultSuccessResponseSchema.extend({
|
5934
5945
|
userPresenceStatu: UserPresenceStatusSchema2
|
5935
5946
|
}),
|
5936
|
-
400:
|
5937
|
-
message:
|
5947
|
+
400: z74.object({
|
5948
|
+
message: z74.string()
|
5938
5949
|
}),
|
5939
5950
|
401: DefaultUnauthorizedSchema,
|
5940
5951
|
500: DefaultErrorResponseSchema
|
@@ -5946,65 +5957,65 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5946
5957
|
);
|
5947
5958
|
|
5948
5959
|
// src/telephony-cdr/index.ts
|
5949
|
-
import
|
5960
|
+
import z76 from "zod";
|
5950
5961
|
|
5951
5962
|
// src/telephony-cdr/validation.ts
|
5952
|
-
import
|
5953
|
-
var CreateTelephonyCdrSchema =
|
5954
|
-
uniqueCallId:
|
5955
|
-
timeStart:
|
5956
|
-
callFrom:
|
5957
|
-
callTo:
|
5958
|
-
callDuration:
|
5959
|
-
talkDuration:
|
5960
|
-
srcTrunkName:
|
5961
|
-
dstTrunkName:
|
5962
|
-
pinCode:
|
5963
|
-
status:
|
5964
|
-
type:
|
5965
|
-
recording:
|
5966
|
-
didNumber:
|
5967
|
-
agentRingTime:
|
5963
|
+
import z75 from "zod";
|
5964
|
+
var CreateTelephonyCdrSchema = z75.object({
|
5965
|
+
uniqueCallId: z75.string({ required_error: "uniqueCallId is required" }),
|
5966
|
+
timeStart: z75.string({ required_error: "timeStart is required" }),
|
5967
|
+
callFrom: z75.string({ required_error: "callFrom is required" }),
|
5968
|
+
callTo: z75.string({ required_error: "callTo is required" }),
|
5969
|
+
callDuration: z75.number().nullable(),
|
5970
|
+
talkDuration: z75.number().nullable(),
|
5971
|
+
srcTrunkName: z75.string().nullable(),
|
5972
|
+
dstTrunkName: z75.string().nullable(),
|
5973
|
+
pinCode: z75.string().nullable(),
|
5974
|
+
status: z75.string(),
|
5975
|
+
type: z75.string(),
|
5976
|
+
recording: z75.string().nullable(),
|
5977
|
+
didNumber: z75.string().nullable(),
|
5978
|
+
agentRingTime: z75.number().nullable()
|
5968
5979
|
});
|
5969
5980
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5970
|
-
selectedDate:
|
5971
|
-
type:
|
5972
|
-
status:
|
5973
|
-
callFrom:
|
5974
|
-
callTo:
|
5975
|
-
trunk:
|
5976
|
-
userId:
|
5977
|
-
queueStatus:
|
5978
|
-
agentIds:
|
5979
|
-
agentCallsOnly:
|
5980
|
-
contactId:
|
5981
|
+
selectedDate: z75.string().optional(),
|
5982
|
+
type: z75.array(z75.string()).optional(),
|
5983
|
+
status: z75.array(z75.string()).optional(),
|
5984
|
+
callFrom: z75.string().optional(),
|
5985
|
+
callTo: z75.string().optional(),
|
5986
|
+
trunk: z75.array(z75.string()).optional(),
|
5987
|
+
userId: z75.string().uuid().optional(),
|
5988
|
+
queueStatus: z75.string().optional(),
|
5989
|
+
agentIds: z75.array(z75.string().uuid()).optional(),
|
5990
|
+
agentCallsOnly: z75.coerce.boolean().optional(),
|
5991
|
+
contactId: z75.string().uuid().optional()
|
5981
5992
|
});
|
5982
5993
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5983
|
-
type:
|
5984
|
-
status:
|
5985
|
-
callFrom:
|
5986
|
-
callTo:
|
5987
|
-
result:
|
5988
|
-
callTags:
|
5989
|
-
selectedDate:
|
5990
|
-
agentId:
|
5991
|
-
contact:
|
5992
|
-
callStatus:
|
5993
|
-
queueIds:
|
5994
|
-
notes:
|
5994
|
+
type: z75.array(z75.string()).optional(),
|
5995
|
+
status: z75.array(z75.string()).optional(),
|
5996
|
+
callFrom: z75.string().optional(),
|
5997
|
+
callTo: z75.string().optional(),
|
5998
|
+
result: z75.array(z75.string()).optional(),
|
5999
|
+
callTags: z75.array(z75.string()).optional(),
|
6000
|
+
selectedDate: z75.string().optional(),
|
6001
|
+
agentId: z75.string().optional(),
|
6002
|
+
contact: z75.array(z75.string()).optional(),
|
6003
|
+
callStatus: z75.array(z75.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
6004
|
+
queueIds: z75.array(z75.string()).optional(),
|
6005
|
+
notes: z75.string().optional()
|
5995
6006
|
});
|
5996
6007
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5997
|
-
|
5998
|
-
page:
|
5999
|
-
pageSize:
|
6008
|
+
z75.object({
|
6009
|
+
page: z75.coerce.number().positive().optional(),
|
6010
|
+
pageSize: z75.coerce.number().positive().optional(),
|
6000
6011
|
// We use this export route for both CDR and Call Log.
|
6001
|
-
module:
|
6012
|
+
module: z75.union([z75.literal("cdrs"), z75.literal("call-logs")]).optional().default("cdrs")
|
6002
6013
|
})
|
6003
6014
|
);
|
6004
6015
|
var NullEmptyStringUndefined = ["", null, void 0];
|
6005
6016
|
var EmtptyArrayUndefined = [[], void 0];
|
6006
6017
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
6007
|
-
reportType:
|
6018
|
+
reportType: z75.enum([
|
6008
6019
|
"extcallstatistics",
|
6009
6020
|
"extcallactivity",
|
6010
6021
|
"trunkactivity",
|
@@ -6014,52 +6025,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
6014
6025
|
"queueagentmisscalls",
|
6015
6026
|
"queueagentinoutcalls"
|
6016
6027
|
]),
|
6017
|
-
selectedDate:
|
6018
|
-
communicationType:
|
6019
|
-
time:
|
6020
|
-
queueList:
|
6021
|
-
queueId:
|
6022
|
-
trunkList:
|
6023
|
-
extensionList:
|
6028
|
+
selectedDate: z75.string().optional(),
|
6029
|
+
communicationType: z75.union([z75.literal("Inbound"), z75.literal("Outbound"), z75.literal("Internal")]).optional(),
|
6030
|
+
time: z75.string().optional(),
|
6031
|
+
queueList: z75.array(z75.string()).optional(),
|
6032
|
+
queueId: z75.string().optional(),
|
6033
|
+
trunkList: z75.array(z75.string()).optional(),
|
6034
|
+
extensionList: z75.array(z75.string()).optional()
|
6024
6035
|
}).superRefine((input, ctx) => {
|
6025
6036
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
6026
6037
|
ctx.addIssue({
|
6027
|
-
code:
|
6038
|
+
code: z75.ZodIssueCode.custom,
|
6028
6039
|
path: ["selectedDate"],
|
6029
6040
|
message: "selectedDate is required."
|
6030
6041
|
});
|
6031
6042
|
}
|
6032
6043
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
6033
6044
|
ctx.addIssue({
|
6034
|
-
code:
|
6045
|
+
code: z75.ZodIssueCode.custom,
|
6035
6046
|
path: ["time"],
|
6036
6047
|
message: "time is required."
|
6037
6048
|
});
|
6038
6049
|
}
|
6039
6050
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
6040
6051
|
ctx.addIssue({
|
6041
|
-
code:
|
6052
|
+
code: z75.ZodIssueCode.custom,
|
6042
6053
|
path: ["queueList"],
|
6043
6054
|
message: "queueList is required."
|
6044
6055
|
});
|
6045
6056
|
}
|
6046
6057
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
6047
6058
|
ctx.addIssue({
|
6048
|
-
code:
|
6059
|
+
code: z75.ZodIssueCode.custom,
|
6049
6060
|
path: ["queueId"],
|
6050
6061
|
message: "queueId is required."
|
6051
6062
|
});
|
6052
6063
|
}
|
6053
6064
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
6054
6065
|
ctx.addIssue({
|
6055
|
-
code:
|
6066
|
+
code: z75.ZodIssueCode.custom,
|
6056
6067
|
path: ["trunkList"],
|
6057
6068
|
message: "trunkList is required."
|
6058
6069
|
});
|
6059
6070
|
}
|
6060
6071
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
6061
6072
|
ctx.addIssue({
|
6062
|
-
code:
|
6073
|
+
code: z75.ZodIssueCode.custom,
|
6063
6074
|
path: ["extensionList"],
|
6064
6075
|
message: "extensionList is required."
|
6065
6076
|
});
|
@@ -6077,10 +6088,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6077
6088
|
query: GetAllTelephonyCdrSchema,
|
6078
6089
|
responses: {
|
6079
6090
|
200: DefaultSuccessResponseSchema.extend({
|
6080
|
-
total:
|
6081
|
-
page:
|
6082
|
-
pageSize:
|
6083
|
-
telephonyCdrs:
|
6091
|
+
total: z76.number(),
|
6092
|
+
page: z76.number(),
|
6093
|
+
pageSize: z76.number(),
|
6094
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6084
6095
|
}),
|
6085
6096
|
401: DefaultUnauthorizedSchema
|
6086
6097
|
},
|
@@ -6093,10 +6104,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6093
6104
|
query: GetAllTelephonyCdrSchema,
|
6094
6105
|
responses: {
|
6095
6106
|
200: DefaultSuccessResponseSchema.extend({
|
6096
|
-
total:
|
6097
|
-
page:
|
6098
|
-
pageSize:
|
6099
|
-
telephonyCdrs:
|
6107
|
+
total: z76.number(),
|
6108
|
+
page: z76.number(),
|
6109
|
+
pageSize: z76.number(),
|
6110
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6100
6111
|
}),
|
6101
6112
|
401: DefaultUnauthorizedSchema
|
6102
6113
|
},
|
@@ -6109,10 +6120,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6109
6120
|
query: GetRecentTelephonyCdrSchema,
|
6110
6121
|
responses: {
|
6111
6122
|
200: DefaultSuccessResponseSchema.extend({
|
6112
|
-
total:
|
6113
|
-
page:
|
6114
|
-
pageSize:
|
6115
|
-
telephonyCdrs:
|
6123
|
+
total: z76.number(),
|
6124
|
+
page: z76.number(),
|
6125
|
+
pageSize: z76.number(),
|
6126
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6116
6127
|
}),
|
6117
6128
|
401: DefaultUnauthorizedSchema
|
6118
6129
|
},
|
@@ -6139,7 +6150,7 @@ var telephonyCdrContract = initContract24().router(
|
|
6139
6150
|
body: GetYeastarCallReportSchema,
|
6140
6151
|
responses: {
|
6141
6152
|
// 200: CallReportSchema,
|
6142
|
-
200:
|
6153
|
+
200: z76.object({}),
|
6143
6154
|
401: DefaultUnauthorizedSchema
|
6144
6155
|
},
|
6145
6156
|
summary: "Get yeastar call report."
|
@@ -6207,10 +6218,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6207
6218
|
headers: DefaultHeaderSchema,
|
6208
6219
|
responses: {
|
6209
6220
|
200: DefaultSuccessResponseSchema.extend({
|
6210
|
-
callRedirectTo:
|
6221
|
+
callRedirectTo: z76.string()
|
6211
6222
|
}),
|
6212
|
-
400:
|
6213
|
-
message:
|
6223
|
+
400: z76.object({
|
6224
|
+
message: z76.string()
|
6214
6225
|
}),
|
6215
6226
|
401: DefaultUnauthorizedSchema,
|
6216
6227
|
500: DefaultErrorResponseSchema
|
@@ -6223,10 +6234,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6223
6234
|
body: TelephonyRedirectSettingSchema,
|
6224
6235
|
responses: {
|
6225
6236
|
200: DefaultSuccessResponseSchema.extend({
|
6226
|
-
callRedirectTo:
|
6237
|
+
callRedirectTo: z76.string()
|
6227
6238
|
}),
|
6228
|
-
400:
|
6229
|
-
message:
|
6239
|
+
400: z76.object({
|
6240
|
+
message: z76.string()
|
6230
6241
|
}),
|
6231
6242
|
401: DefaultUnauthorizedSchema,
|
6232
6243
|
500: DefaultErrorResponseSchema
|
@@ -6238,11 +6249,11 @@ var telephonyCdrContract = initContract24().router(
|
|
6238
6249
|
headers: DefaultHeaderSchema,
|
6239
6250
|
responses: {
|
6240
6251
|
200: DefaultSuccessResponseSchema.extend({
|
6241
|
-
callRedirectTo:
|
6242
|
-
isMultiTabUsed:
|
6252
|
+
callRedirectTo: z76.string(),
|
6253
|
+
isMultiTabUsed: z76.string()
|
6243
6254
|
}),
|
6244
|
-
400:
|
6245
|
-
message:
|
6255
|
+
400: z76.object({
|
6256
|
+
message: z76.string()
|
6246
6257
|
}),
|
6247
6258
|
401: DefaultUnauthorizedSchema,
|
6248
6259
|
500: DefaultErrorResponseSchema
|
@@ -6255,11 +6266,11 @@ var telephonyCdrContract = initContract24().router(
|
|
6255
6266
|
body: CallSettingSchema,
|
6256
6267
|
responses: {
|
6257
6268
|
200: DefaultSuccessResponseSchema.extend({
|
6258
|
-
callRedirectTo:
|
6259
|
-
isMultiTabUsed:
|
6269
|
+
callRedirectTo: z76.string(),
|
6270
|
+
isMultiTabUsed: z76.string()
|
6260
6271
|
}),
|
6261
|
-
400:
|
6262
|
-
message:
|
6272
|
+
400: z76.object({
|
6273
|
+
message: z76.string()
|
6263
6274
|
}),
|
6264
6275
|
401: DefaultUnauthorizedSchema,
|
6265
6276
|
500: DefaultErrorResponseSchema
|
@@ -6271,35 +6282,35 @@ var telephonyCdrContract = initContract24().router(
|
|
6271
6282
|
|
6272
6283
|
// src/telephony-extension/index.ts
|
6273
6284
|
import { initContract as initContract25 } from "@ts-rest/core";
|
6274
|
-
import
|
6285
|
+
import z78 from "zod";
|
6275
6286
|
|
6276
6287
|
// src/telephony-extension/schema.ts
|
6277
|
-
import
|
6278
|
-
var TelephonyExtensionSchema3 =
|
6279
|
-
errcode:
|
6280
|
-
errmsg:
|
6281
|
-
total_number:
|
6282
|
-
data:
|
6283
|
-
|
6284
|
-
id:
|
6285
|
-
online_status:
|
6286
|
-
fx_phone:
|
6287
|
-
sip_phone:
|
6288
|
-
status:
|
6289
|
-
ext_dev_type:
|
6290
|
-
}),
|
6291
|
-
linkus_desktop:
|
6292
|
-
linkus_mobile:
|
6293
|
-
linkus_web:
|
6294
|
-
status:
|
6295
|
-
ext_dev_type:
|
6288
|
+
import z77 from "zod";
|
6289
|
+
var TelephonyExtensionSchema3 = z77.object({
|
6290
|
+
errcode: z77.coerce.number(),
|
6291
|
+
errmsg: z77.string(),
|
6292
|
+
total_number: z77.coerce.number(),
|
6293
|
+
data: z77.array(
|
6294
|
+
z77.object({
|
6295
|
+
id: z77.coerce.number(),
|
6296
|
+
online_status: z77.object({
|
6297
|
+
fx_phone: z77.object({ status: z77.coerce.number() }),
|
6298
|
+
sip_phone: z77.object({
|
6299
|
+
status: z77.coerce.number(),
|
6300
|
+
ext_dev_type: z77.string().optional()
|
6301
|
+
}),
|
6302
|
+
linkus_desktop: z77.object({ status: z77.coerce.number() }),
|
6303
|
+
linkus_mobile: z77.object({ status: z77.coerce.number() }),
|
6304
|
+
linkus_web: z77.object({
|
6305
|
+
status: z77.coerce.number(),
|
6306
|
+
ext_dev_type: z77.string().optional()
|
6296
6307
|
})
|
6297
6308
|
}).optional(),
|
6298
|
-
presence_status:
|
6299
|
-
number:
|
6300
|
-
caller_id_name:
|
6301
|
-
role_name:
|
6302
|
-
email_addr:
|
6309
|
+
presence_status: z77.string().optional(),
|
6310
|
+
number: z77.string().optional(),
|
6311
|
+
caller_id_name: z77.string().optional(),
|
6312
|
+
role_name: z77.string().optional(),
|
6313
|
+
email_addr: z77.string().optional()
|
6303
6314
|
})
|
6304
6315
|
)
|
6305
6316
|
});
|
@@ -6314,8 +6325,8 @@ var telephonyExtensionContract = initContract25().router(
|
|
6314
6325
|
query: null,
|
6315
6326
|
responses: {
|
6316
6327
|
200: TelephonyExtensionSchema3,
|
6317
|
-
400:
|
6318
|
-
message:
|
6328
|
+
400: z78.object({
|
6329
|
+
message: z78.string()
|
6319
6330
|
}),
|
6320
6331
|
401: DefaultUnauthorizedSchema,
|
6321
6332
|
500: DefaultErrorResponseSchema
|
@@ -6328,10 +6339,10 @@ var telephonyExtensionContract = initContract25().router(
|
|
6328
6339
|
|
6329
6340
|
// src/ticket/index.ts
|
6330
6341
|
import { initContract as initContract26 } from "@ts-rest/core";
|
6331
|
-
import
|
6342
|
+
import z80 from "zod";
|
6332
6343
|
|
6333
6344
|
// src/ticket/validation.ts
|
6334
|
-
import
|
6345
|
+
import z79 from "zod";
|
6335
6346
|
var addErrorMessage2 = (field) => {
|
6336
6347
|
return field.refine(
|
6337
6348
|
({ isRequired, value }) => {
|
@@ -6349,108 +6360,108 @@ var addErrorMessage2 = (field) => {
|
|
6349
6360
|
}
|
6350
6361
|
);
|
6351
6362
|
};
|
6352
|
-
var BaseSchema3 =
|
6353
|
-
isRequired:
|
6354
|
-
attributeId:
|
6363
|
+
var BaseSchema3 = z79.object({
|
6364
|
+
isRequired: z79.boolean(),
|
6365
|
+
attributeId: z79.string()
|
6355
6366
|
});
|
6356
6367
|
var SingleValue2 = addErrorMessage2(
|
6357
6368
|
BaseSchema3.extend({
|
6358
|
-
value:
|
6369
|
+
value: z79.string()
|
6359
6370
|
})
|
6360
6371
|
);
|
6361
|
-
var CreateTicketValidationSchema =
|
6372
|
+
var CreateTicketValidationSchema = z79.object({
|
6362
6373
|
title: SingleValue2,
|
6363
6374
|
description: SingleValue2,
|
6364
6375
|
status: SingleValue2,
|
6365
6376
|
type: SingleValue2,
|
6366
6377
|
priority: SingleValue2,
|
6367
6378
|
contact: SingleValue2,
|
6368
|
-
assignee:
|
6369
|
-
isRequired:
|
6370
|
-
attributeId:
|
6371
|
-
value:
|
6379
|
+
assignee: z79.object({
|
6380
|
+
isRequired: z79.boolean(),
|
6381
|
+
attributeId: z79.string(),
|
6382
|
+
value: z79.string()
|
6372
6383
|
}),
|
6373
6384
|
channel: SingleValue2,
|
6374
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
6375
|
-
categories: BaseSchema3.extend({ value:
|
6376
|
-
customFields:
|
6385
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: z79.array(z79.string()) })),
|
6386
|
+
categories: BaseSchema3.extend({ value: z79.array(z79.string()) }),
|
6387
|
+
customFields: z79.array(
|
6377
6388
|
addErrorMessage2(
|
6378
6389
|
BaseSchema3.extend({
|
6379
|
-
value:
|
6380
|
-
type:
|
6381
|
-
isDefaultAttribute:
|
6390
|
+
value: z79.union([z79.string(), z79.array(z79.string())]),
|
6391
|
+
type: z79.string(),
|
6392
|
+
isDefaultAttribute: z79.boolean()
|
6382
6393
|
})
|
6383
6394
|
)
|
6384
6395
|
),
|
6385
|
-
reasonToAssign:
|
6396
|
+
reasonToAssign: z79.object({ value: z79.string() }).optional()
|
6386
6397
|
});
|
6387
6398
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
6388
|
-
var TicketAttachmentRecordSchema =
|
6389
|
-
bucketName:
|
6390
|
-
fileKey:
|
6391
|
-
fileName:
|
6392
|
-
fileSize:
|
6393
|
-
url:
|
6394
|
-
});
|
6395
|
-
var CreateTicketAttachmentRecordsSchema =
|
6396
|
-
ticketId:
|
6397
|
-
attributeId:
|
6398
|
-
ticketAttachmentRecords:
|
6399
|
-
});
|
6400
|
-
var TicketParamsSchema =
|
6401
|
-
page:
|
6402
|
-
pageSize:
|
6403
|
-
});
|
6404
|
-
var CustomFieldQuery =
|
6405
|
-
attributeId:
|
6406
|
-
type:
|
6407
|
-
value:
|
6408
|
-
});
|
6409
|
-
var GetAllTicketQuerySchema =
|
6410
|
-
page:
|
6411
|
-
pageSize:
|
6412
|
-
selectedDate:
|
6413
|
-
ticketNumber:
|
6414
|
-
keyword:
|
6415
|
-
title:
|
6416
|
-
description:
|
6417
|
-
status:
|
6418
|
-
priority:
|
6419
|
-
channel:
|
6420
|
-
type:
|
6421
|
-
ticketType:
|
6422
|
-
contact:
|
6423
|
-
tags:
|
6424
|
-
categories:
|
6425
|
-
assignee:
|
6426
|
-
customFields:
|
6427
|
-
|
6428
|
-
attributeId:
|
6429
|
-
type:
|
6430
|
-
value:
|
6399
|
+
var TicketAttachmentRecordSchema = z79.object({
|
6400
|
+
bucketName: z79.string(),
|
6401
|
+
fileKey: z79.string(),
|
6402
|
+
fileName: z79.string(),
|
6403
|
+
fileSize: z79.coerce.number(),
|
6404
|
+
url: z79.string()
|
6405
|
+
});
|
6406
|
+
var CreateTicketAttachmentRecordsSchema = z79.object({
|
6407
|
+
ticketId: z79.string(),
|
6408
|
+
attributeId: z79.string(),
|
6409
|
+
ticketAttachmentRecords: z79.array(TicketAttachmentRecordSchema)
|
6410
|
+
});
|
6411
|
+
var TicketParamsSchema = z79.object({
|
6412
|
+
page: z79.coerce.number().default(1),
|
6413
|
+
pageSize: z79.coerce.number().default(10)
|
6414
|
+
});
|
6415
|
+
var CustomFieldQuery = z79.object({
|
6416
|
+
attributeId: z79.string(),
|
6417
|
+
type: z79.string(),
|
6418
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6419
|
+
});
|
6420
|
+
var GetAllTicketQuerySchema = z79.object({
|
6421
|
+
page: z79.string().transform((value) => Number(value)),
|
6422
|
+
pageSize: z79.string().transform((value) => Number(value)),
|
6423
|
+
selectedDate: z79.string(),
|
6424
|
+
ticketNumber: z79.string(),
|
6425
|
+
keyword: z79.string(),
|
6426
|
+
title: z79.string(),
|
6427
|
+
description: z79.string(),
|
6428
|
+
status: z79.array(z79.string()),
|
6429
|
+
priority: z79.array(z79.string()),
|
6430
|
+
channel: z79.array(z79.string()),
|
6431
|
+
type: z79.array(z79.string()),
|
6432
|
+
ticketType: z79.array(z79.string()),
|
6433
|
+
contact: z79.array(z79.string()),
|
6434
|
+
tags: z79.array(z79.string().uuid()),
|
6435
|
+
categories: z79.array(z79.string().uuid()),
|
6436
|
+
assignee: z79.array(z79.string().uuid()),
|
6437
|
+
customFields: z79.array(
|
6438
|
+
z79.object({
|
6439
|
+
attributeId: z79.string().uuid(),
|
6440
|
+
type: z79.string(),
|
6441
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6431
6442
|
})
|
6432
6443
|
)
|
6433
6444
|
}).partial();
|
6434
|
-
var ExportAllTicketQuerySchema =
|
6435
|
-
agent:
|
6436
|
-
selectedDate:
|
6437
|
-
keyword:
|
6438
|
-
title:
|
6439
|
-
description:
|
6440
|
-
status:
|
6441
|
-
priority:
|
6442
|
-
assignee:
|
6443
|
-
channel:
|
6444
|
-
type:
|
6445
|
-
ticketType:
|
6446
|
-
contact:
|
6447
|
-
tags:
|
6448
|
-
categories:
|
6449
|
-
customFields:
|
6450
|
-
|
6451
|
-
attributeId:
|
6452
|
-
type:
|
6453
|
-
value:
|
6445
|
+
var ExportAllTicketQuerySchema = z79.object({
|
6446
|
+
agent: z79.array(z79.string()),
|
6447
|
+
selectedDate: z79.string(),
|
6448
|
+
keyword: z79.string(),
|
6449
|
+
title: z79.string(),
|
6450
|
+
description: z79.string(),
|
6451
|
+
status: z79.array(z79.string()),
|
6452
|
+
priority: z79.array(z79.string()),
|
6453
|
+
assignee: z79.array(z79.string().uuid()),
|
6454
|
+
channel: z79.array(z79.string()),
|
6455
|
+
type: z79.array(z79.string()),
|
6456
|
+
ticketType: z79.array(z79.string()),
|
6457
|
+
contact: z79.array(z79.string()),
|
6458
|
+
tags: z79.array(z79.string()),
|
6459
|
+
categories: z79.array(z79.string()),
|
6460
|
+
customFields: z79.array(
|
6461
|
+
z79.object({
|
6462
|
+
attributeId: z79.string().uuid(),
|
6463
|
+
type: z79.string(),
|
6464
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6454
6465
|
})
|
6455
6466
|
)
|
6456
6467
|
}).partial();
|
@@ -6466,14 +6477,14 @@ var ticketContract = initContract26().router(
|
|
6466
6477
|
201: DefaultSuccessResponseSchema.extend({
|
6467
6478
|
data: TicketSchema
|
6468
6479
|
}),
|
6469
|
-
400:
|
6470
|
-
message:
|
6480
|
+
400: z80.object({
|
6481
|
+
message: z80.string()
|
6471
6482
|
}),
|
6472
|
-
409:
|
6473
|
-
message:
|
6483
|
+
409: z80.object({
|
6484
|
+
message: z80.string()
|
6474
6485
|
}),
|
6475
|
-
500:
|
6476
|
-
message:
|
6486
|
+
500: z80.object({
|
6487
|
+
message: z80.string()
|
6477
6488
|
}),
|
6478
6489
|
401: DefaultUnauthorizedSchema,
|
6479
6490
|
404: DefaultNotFoundSchema,
|
@@ -6494,8 +6505,8 @@ var ticketContract = initContract26().router(
|
|
6494
6505
|
TicketSchema
|
6495
6506
|
)
|
6496
6507
|
}),
|
6497
|
-
400:
|
6498
|
-
message:
|
6508
|
+
400: z80.object({
|
6509
|
+
message: z80.string()
|
6499
6510
|
}),
|
6500
6511
|
401: DefaultUnauthorizedSchema,
|
6501
6512
|
500: DefaultErrorResponseSchema
|
@@ -6505,14 +6516,14 @@ var ticketContract = initContract26().router(
|
|
6505
6516
|
getTicketById: {
|
6506
6517
|
method: "GET",
|
6507
6518
|
path: "/:id",
|
6508
|
-
pathParams:
|
6519
|
+
pathParams: z80.object({ id: z80.string() }),
|
6509
6520
|
headers: DefaultHeaderSchema,
|
6510
6521
|
responses: {
|
6511
6522
|
200: DefaultSuccessResponseSchema.extend({
|
6512
6523
|
data: TicketSchema
|
6513
6524
|
}),
|
6514
|
-
400:
|
6515
|
-
message:
|
6525
|
+
400: z80.object({
|
6526
|
+
message: z80.string()
|
6516
6527
|
}),
|
6517
6528
|
401: DefaultUnauthorizedSchema,
|
6518
6529
|
500: DefaultErrorResponseSchema
|
@@ -6522,15 +6533,15 @@ var ticketContract = initContract26().router(
|
|
6522
6533
|
getTicketByContactId: {
|
6523
6534
|
method: "GET",
|
6524
6535
|
path: "/contact/:id",
|
6525
|
-
pathParams:
|
6536
|
+
pathParams: z80.object({ id: z80.string() }),
|
6526
6537
|
query: TicketParamsSchema,
|
6527
6538
|
headers: DefaultHeaderSchema,
|
6528
6539
|
responses: {
|
6529
6540
|
200: DefaultSuccessResponseSchema.extend({
|
6530
6541
|
data: WithPagination(TicketSchema)
|
6531
6542
|
}),
|
6532
|
-
400:
|
6533
|
-
message:
|
6543
|
+
400: z80.object({
|
6544
|
+
message: z80.string()
|
6534
6545
|
}),
|
6535
6546
|
401: DefaultUnauthorizedSchema,
|
6536
6547
|
500: DefaultErrorResponseSchema
|
@@ -6540,21 +6551,21 @@ var ticketContract = initContract26().router(
|
|
6540
6551
|
updateTicket: {
|
6541
6552
|
method: "PATCH",
|
6542
6553
|
path: "/:id",
|
6543
|
-
pathParams:
|
6554
|
+
pathParams: z80.object({ id: z80.string() }),
|
6544
6555
|
body: UpdateTicketValidationSchema,
|
6545
6556
|
headers: DefaultHeaderSchema,
|
6546
6557
|
responses: {
|
6547
6558
|
201: DefaultSuccessResponseSchema.extend({
|
6548
6559
|
data: TicketSchema
|
6549
6560
|
}),
|
6550
|
-
400:
|
6551
|
-
message:
|
6561
|
+
400: z80.object({
|
6562
|
+
message: z80.string()
|
6552
6563
|
}),
|
6553
|
-
409:
|
6554
|
-
message:
|
6564
|
+
409: z80.object({
|
6565
|
+
message: z80.string()
|
6555
6566
|
}),
|
6556
|
-
500:
|
6557
|
-
message:
|
6567
|
+
500: z80.object({
|
6568
|
+
message: z80.string()
|
6558
6569
|
}),
|
6559
6570
|
401: DefaultUnauthorizedSchema,
|
6560
6571
|
404: DefaultNotFoundSchema,
|
@@ -6565,11 +6576,11 @@ var ticketContract = initContract26().router(
|
|
6565
6576
|
deleteTicket: {
|
6566
6577
|
method: "DELETE",
|
6567
6578
|
path: "/:id",
|
6568
|
-
pathParams:
|
6579
|
+
pathParams: z80.object({ id: z80.string() }),
|
6569
6580
|
headers: DefaultHeaderSchema,
|
6570
6581
|
body: null,
|
6571
6582
|
responses: {
|
6572
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6583
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6573
6584
|
500: DefaultErrorResponseSchema
|
6574
6585
|
},
|
6575
6586
|
summary: "Delete a extension."
|
@@ -6577,19 +6588,19 @@ var ticketContract = initContract26().router(
|
|
6577
6588
|
updateDescription: {
|
6578
6589
|
method: "PATCH",
|
6579
6590
|
path: "/description/update/:id",
|
6580
|
-
pathParams:
|
6581
|
-
body:
|
6591
|
+
pathParams: z80.object({ id: z80.string() }),
|
6592
|
+
body: z80.object({ description: z80.string() }),
|
6582
6593
|
headers: DefaultHeaderSchema,
|
6583
6594
|
responses: {
|
6584
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
6585
|
-
400:
|
6586
|
-
message:
|
6595
|
+
201: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6596
|
+
400: z80.object({
|
6597
|
+
message: z80.string()
|
6587
6598
|
}),
|
6588
|
-
409:
|
6589
|
-
message:
|
6599
|
+
409: z80.object({
|
6600
|
+
message: z80.string()
|
6590
6601
|
}),
|
6591
|
-
500:
|
6592
|
-
message:
|
6602
|
+
500: z80.object({
|
6603
|
+
message: z80.string()
|
6593
6604
|
}),
|
6594
6605
|
401: DefaultUnauthorizedSchema,
|
6595
6606
|
404: DefaultNotFoundSchema,
|
@@ -6600,19 +6611,19 @@ var ticketContract = initContract26().router(
|
|
6600
6611
|
updateTitle: {
|
6601
6612
|
method: "PATCH",
|
6602
6613
|
path: "/title/update/:id",
|
6603
|
-
pathParams:
|
6604
|
-
body:
|
6614
|
+
pathParams: z80.object({ id: z80.string() }),
|
6615
|
+
body: z80.object({ title: z80.string() }),
|
6605
6616
|
headers: DefaultHeaderSchema,
|
6606
6617
|
responses: {
|
6607
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6608
|
-
400:
|
6609
|
-
message:
|
6618
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6619
|
+
400: z80.object({
|
6620
|
+
message: z80.string()
|
6610
6621
|
}),
|
6611
|
-
409:
|
6612
|
-
message:
|
6622
|
+
409: z80.object({
|
6623
|
+
message: z80.string()
|
6613
6624
|
}),
|
6614
|
-
500:
|
6615
|
-
message:
|
6625
|
+
500: z80.object({
|
6626
|
+
message: z80.string()
|
6616
6627
|
}),
|
6617
6628
|
401: DefaultUnauthorizedSchema,
|
6618
6629
|
404: DefaultNotFoundSchema,
|
@@ -6623,19 +6634,19 @@ var ticketContract = initContract26().router(
|
|
6623
6634
|
updateType: {
|
6624
6635
|
method: "PATCH",
|
6625
6636
|
path: "/type/update/:id",
|
6626
|
-
pathParams:
|
6627
|
-
body:
|
6637
|
+
pathParams: z80.object({ id: z80.string() }),
|
6638
|
+
body: z80.object({ type: z80.string() }),
|
6628
6639
|
headers: DefaultHeaderSchema,
|
6629
6640
|
responses: {
|
6630
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6631
|
-
400:
|
6632
|
-
message:
|
6641
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6642
|
+
400: z80.object({
|
6643
|
+
message: z80.string()
|
6633
6644
|
}),
|
6634
|
-
409:
|
6635
|
-
message:
|
6645
|
+
409: z80.object({
|
6646
|
+
message: z80.string()
|
6636
6647
|
}),
|
6637
|
-
500:
|
6638
|
-
message:
|
6648
|
+
500: z80.object({
|
6649
|
+
message: z80.string()
|
6639
6650
|
}),
|
6640
6651
|
401: DefaultUnauthorizedSchema,
|
6641
6652
|
404: DefaultNotFoundSchema,
|
@@ -6646,19 +6657,19 @@ var ticketContract = initContract26().router(
|
|
6646
6657
|
updateStatus: {
|
6647
6658
|
method: "PATCH",
|
6648
6659
|
path: "/status/update/:id",
|
6649
|
-
pathParams:
|
6650
|
-
body:
|
6660
|
+
pathParams: z80.object({ id: z80.string() }),
|
6661
|
+
body: z80.object({ status: z80.string() }),
|
6651
6662
|
headers: DefaultHeaderSchema,
|
6652
6663
|
responses: {
|
6653
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6654
|
-
400:
|
6655
|
-
message:
|
6664
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6665
|
+
400: z80.object({
|
6666
|
+
message: z80.string()
|
6656
6667
|
}),
|
6657
|
-
409:
|
6658
|
-
message:
|
6668
|
+
409: z80.object({
|
6669
|
+
message: z80.string()
|
6659
6670
|
}),
|
6660
|
-
500:
|
6661
|
-
message:
|
6671
|
+
500: z80.object({
|
6672
|
+
message: z80.string()
|
6662
6673
|
}),
|
6663
6674
|
401: DefaultUnauthorizedSchema,
|
6664
6675
|
404: DefaultNotFoundSchema,
|
@@ -6669,19 +6680,19 @@ var ticketContract = initContract26().router(
|
|
6669
6680
|
updatePriority: {
|
6670
6681
|
method: "PATCH",
|
6671
6682
|
path: "/priority/update/:id",
|
6672
|
-
pathParams:
|
6673
|
-
body:
|
6683
|
+
pathParams: z80.object({ id: z80.string() }),
|
6684
|
+
body: z80.object({ priority: z80.string() }),
|
6674
6685
|
headers: DefaultHeaderSchema,
|
6675
6686
|
responses: {
|
6676
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6677
|
-
400:
|
6678
|
-
message:
|
6687
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6688
|
+
400: z80.object({
|
6689
|
+
message: z80.string()
|
6679
6690
|
}),
|
6680
|
-
409:
|
6681
|
-
message:
|
6691
|
+
409: z80.object({
|
6692
|
+
message: z80.string()
|
6682
6693
|
}),
|
6683
|
-
500:
|
6684
|
-
message:
|
6694
|
+
500: z80.object({
|
6695
|
+
message: z80.string()
|
6685
6696
|
}),
|
6686
6697
|
401: DefaultUnauthorizedSchema,
|
6687
6698
|
404: DefaultNotFoundSchema,
|
@@ -6692,19 +6703,19 @@ var ticketContract = initContract26().router(
|
|
6692
6703
|
updateChannel: {
|
6693
6704
|
method: "PATCH",
|
6694
6705
|
path: "/channel/update/:id",
|
6695
|
-
pathParams:
|
6696
|
-
body:
|
6706
|
+
pathParams: z80.object({ id: z80.string() }),
|
6707
|
+
body: z80.object({ channel: z80.string() }),
|
6697
6708
|
headers: DefaultHeaderSchema,
|
6698
6709
|
responses: {
|
6699
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6700
|
-
400:
|
6701
|
-
message:
|
6710
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6711
|
+
400: z80.object({
|
6712
|
+
message: z80.string()
|
6702
6713
|
}),
|
6703
|
-
409:
|
6704
|
-
message:
|
6714
|
+
409: z80.object({
|
6715
|
+
message: z80.string()
|
6705
6716
|
}),
|
6706
|
-
500:
|
6707
|
-
message:
|
6717
|
+
500: z80.object({
|
6718
|
+
message: z80.string()
|
6708
6719
|
}),
|
6709
6720
|
401: DefaultUnauthorizedSchema,
|
6710
6721
|
404: DefaultNotFoundSchema,
|
@@ -6715,19 +6726,19 @@ var ticketContract = initContract26().router(
|
|
6715
6726
|
updateTags: {
|
6716
6727
|
method: "PATCH",
|
6717
6728
|
path: "/tags/update/:id",
|
6718
|
-
pathParams:
|
6719
|
-
body:
|
6729
|
+
pathParams: z80.object({ id: z80.string() }),
|
6730
|
+
body: z80.object({ tags: z80.array(z80.string()) }),
|
6720
6731
|
headers: DefaultHeaderSchema,
|
6721
6732
|
responses: {
|
6722
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6723
|
-
400:
|
6724
|
-
message:
|
6733
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6734
|
+
400: z80.object({
|
6735
|
+
message: z80.string()
|
6725
6736
|
}),
|
6726
|
-
409:
|
6727
|
-
message:
|
6737
|
+
409: z80.object({
|
6738
|
+
message: z80.string()
|
6728
6739
|
}),
|
6729
|
-
500:
|
6730
|
-
message:
|
6740
|
+
500: z80.object({
|
6741
|
+
message: z80.string()
|
6731
6742
|
}),
|
6732
6743
|
401: DefaultUnauthorizedSchema,
|
6733
6744
|
404: DefaultNotFoundSchema,
|
@@ -6738,25 +6749,25 @@ var ticketContract = initContract26().router(
|
|
6738
6749
|
changeAssignee: {
|
6739
6750
|
method: "PATCH",
|
6740
6751
|
path: "/assignee/update/:id",
|
6741
|
-
pathParams:
|
6742
|
-
body:
|
6743
|
-
ticketId:
|
6744
|
-
assigneeId:
|
6745
|
-
reason:
|
6752
|
+
pathParams: z80.object({ id: z80.string() }),
|
6753
|
+
body: z80.object({
|
6754
|
+
ticketId: z80.string(),
|
6755
|
+
assigneeId: z80.string(),
|
6756
|
+
reason: z80.string().optional()
|
6746
6757
|
}),
|
6747
6758
|
headers: DefaultHeaderSchema,
|
6748
6759
|
responses: {
|
6749
6760
|
200: DefaultSuccessResponseSchema.extend({
|
6750
6761
|
data: TicketSchema
|
6751
6762
|
}),
|
6752
|
-
400:
|
6753
|
-
message:
|
6763
|
+
400: z80.object({
|
6764
|
+
message: z80.string()
|
6754
6765
|
}),
|
6755
|
-
409:
|
6756
|
-
message:
|
6766
|
+
409: z80.object({
|
6767
|
+
message: z80.string()
|
6757
6768
|
}),
|
6758
|
-
500:
|
6759
|
-
message:
|
6769
|
+
500: z80.object({
|
6770
|
+
message: z80.string()
|
6760
6771
|
}),
|
6761
6772
|
401: DefaultUnauthorizedSchema,
|
6762
6773
|
404: DefaultNotFoundSchema,
|
@@ -6767,14 +6778,14 @@ var ticketContract = initContract26().router(
|
|
6767
6778
|
getTicketCountByContact: {
|
6768
6779
|
method: "GET",
|
6769
6780
|
path: "/ticket_count/contact/:id",
|
6770
|
-
pathParams:
|
6781
|
+
pathParams: z80.object({ id: z80.string() }),
|
6771
6782
|
headers: DefaultHeaderSchema,
|
6772
6783
|
responses: {
|
6773
6784
|
200: DefaultSuccessResponseSchema.extend({
|
6774
6785
|
data: TicketCountByContactSchema
|
6775
6786
|
}),
|
6776
|
-
400:
|
6777
|
-
message:
|
6787
|
+
400: z80.object({
|
6788
|
+
message: z80.string()
|
6778
6789
|
}),
|
6779
6790
|
401: DefaultUnauthorizedSchema,
|
6780
6791
|
500: DefaultErrorResponseSchema
|
@@ -6790,14 +6801,14 @@ var ticketContract = initContract26().router(
|
|
6790
6801
|
201: DefaultSuccessResponseSchema.extend({
|
6791
6802
|
data: TicketCustomFieldSchema
|
6792
6803
|
}),
|
6793
|
-
400:
|
6794
|
-
message:
|
6804
|
+
400: z80.object({
|
6805
|
+
message: z80.string()
|
6795
6806
|
}),
|
6796
|
-
409:
|
6797
|
-
message:
|
6807
|
+
409: z80.object({
|
6808
|
+
message: z80.string()
|
6798
6809
|
}),
|
6799
|
-
500:
|
6800
|
-
message:
|
6810
|
+
500: z80.object({
|
6811
|
+
message: z80.string()
|
6801
6812
|
}),
|
6802
6813
|
401: DefaultUnauthorizedSchema,
|
6803
6814
|
404: DefaultNotFoundSchema,
|
@@ -6824,10 +6835,10 @@ var ticketContract = initContract26().router(
|
|
6824
6835
|
headers: DefaultHeaderSchema,
|
6825
6836
|
responses: {
|
6826
6837
|
200: DefaultSuccessResponseSchema.extend({
|
6827
|
-
ticketReasonRequired:
|
6838
|
+
ticketReasonRequired: z80.string()
|
6828
6839
|
}),
|
6829
|
-
400:
|
6830
|
-
message:
|
6840
|
+
400: z80.object({
|
6841
|
+
message: z80.string()
|
6831
6842
|
}),
|
6832
6843
|
401: DefaultUnauthorizedSchema,
|
6833
6844
|
500: DefaultErrorResponseSchema
|
@@ -6840,10 +6851,10 @@ var ticketContract = initContract26().router(
|
|
6840
6851
|
body: TicketReasonRequiredSchema,
|
6841
6852
|
responses: {
|
6842
6853
|
200: DefaultSuccessResponseSchema.extend({
|
6843
|
-
ticketReasonRequired:
|
6854
|
+
ticketReasonRequired: z80.string()
|
6844
6855
|
}),
|
6845
|
-
400:
|
6846
|
-
message:
|
6856
|
+
400: z80.object({
|
6857
|
+
message: z80.string()
|
6847
6858
|
}),
|
6848
6859
|
401: DefaultUnauthorizedSchema,
|
6849
6860
|
500: DefaultErrorResponseSchema
|
@@ -6855,24 +6866,24 @@ var ticketContract = initContract26().router(
|
|
6855
6866
|
|
6856
6867
|
// src/user/index.ts
|
6857
6868
|
import { initContract as initContract27 } from "@ts-rest/core";
|
6858
|
-
import
|
6869
|
+
import z82 from "zod";
|
6859
6870
|
|
6860
6871
|
// src/user/validation.ts
|
6861
|
-
import { z as
|
6862
|
-
var CreateUserSchema =
|
6863
|
-
name:
|
6864
|
-
email:
|
6865
|
-
address:
|
6866
|
-
phone:
|
6867
|
-
password:
|
6868
|
-
notificationCount:
|
6869
|
-
roles:
|
6872
|
+
import { z as z81 } from "zod";
|
6873
|
+
var CreateUserSchema = z81.object({
|
6874
|
+
name: z81.string(),
|
6875
|
+
email: z81.string().email(),
|
6876
|
+
address: z81.string().nullable(),
|
6877
|
+
phone: z81.string().nullable(),
|
6878
|
+
password: z81.string(),
|
6879
|
+
notificationCount: z81.number().nullable().optional(),
|
6880
|
+
roles: z81.array(z81.string())
|
6870
6881
|
});
|
6871
6882
|
var UpdateUserSchema = CreateUserSchema.extend({
|
6872
|
-
newPassword:
|
6883
|
+
newPassword: z81.string()
|
6873
6884
|
});
|
6874
|
-
var UpdateUserProfileSchema =
|
6875
|
-
password:
|
6885
|
+
var UpdateUserProfileSchema = z81.object({
|
6886
|
+
password: z81.string()
|
6876
6887
|
});
|
6877
6888
|
|
6878
6889
|
// src/user/index.ts
|
@@ -6887,8 +6898,8 @@ var userContract = initContract27().router(
|
|
6887
6898
|
201: DefaultSuccessResponseSchema.extend({
|
6888
6899
|
user: UserSchema
|
6889
6900
|
}),
|
6890
|
-
400:
|
6891
|
-
message:
|
6901
|
+
400: z82.object({
|
6902
|
+
message: z82.string()
|
6892
6903
|
}),
|
6893
6904
|
401: DefaultUnauthorizedSchema,
|
6894
6905
|
404: DefaultNotFoundSchema,
|
@@ -6901,15 +6912,15 @@ var userContract = initContract27().router(
|
|
6901
6912
|
method: "GET",
|
6902
6913
|
path: "/essential",
|
6903
6914
|
headers: DefaultHeaderSchema,
|
6904
|
-
query:
|
6905
|
-
page:
|
6906
|
-
pageSize:
|
6907
|
-
keyword:
|
6915
|
+
query: z82.object({
|
6916
|
+
page: z82.number().optional(),
|
6917
|
+
pageSize: z82.number().optional(),
|
6918
|
+
keyword: z82.string().optional()
|
6908
6919
|
}).optional(),
|
6909
6920
|
responses: {
|
6910
6921
|
200: WithPagination(EssentialUserSchema),
|
6911
|
-
400:
|
6912
|
-
message:
|
6922
|
+
400: z82.object({
|
6923
|
+
message: z82.string()
|
6913
6924
|
}),
|
6914
6925
|
401: DefaultUnauthorizedSchema,
|
6915
6926
|
500: DefaultErrorResponseSchema
|
@@ -6919,16 +6930,16 @@ var userContract = initContract27().router(
|
|
6919
6930
|
method: "GET",
|
6920
6931
|
path: "",
|
6921
6932
|
headers: DefaultHeaderSchema,
|
6922
|
-
query:
|
6923
|
-
page:
|
6924
|
-
pageSize:
|
6933
|
+
query: z82.object({
|
6934
|
+
page: z82.coerce.number().optional(),
|
6935
|
+
pageSize: z82.coerce.number().optional(),
|
6925
6936
|
// Don't add default 10. In some places, we need to fetch all users.
|
6926
|
-
keyword:
|
6937
|
+
keyword: z82.string().optional(),
|
6927
6938
|
// userIds: z.array(z.string()).optional(),
|
6928
|
-
userIds:
|
6929
|
-
|
6939
|
+
userIds: z82.union([
|
6940
|
+
z82.array(z82.string()),
|
6930
6941
|
// If it's an array
|
6931
|
-
|
6942
|
+
z82.record(z82.string())
|
6932
6943
|
// If it's an object
|
6933
6944
|
]).transform((val) => {
|
6934
6945
|
if (Array.isArray(val)) {
|
@@ -6936,12 +6947,12 @@ var userContract = initContract27().router(
|
|
6936
6947
|
}
|
6937
6948
|
return Object.values(val);
|
6938
6949
|
}).optional(),
|
6939
|
-
withPresenceStatus:
|
6950
|
+
withPresenceStatus: z82.string().transform((val) => val === "true").optional()
|
6940
6951
|
}).optional(),
|
6941
6952
|
responses: {
|
6942
6953
|
200: WithPagination(UserSchema),
|
6943
|
-
400:
|
6944
|
-
message:
|
6954
|
+
400: z82.object({
|
6955
|
+
message: z82.string()
|
6945
6956
|
}),
|
6946
6957
|
401: DefaultUnauthorizedSchema,
|
6947
6958
|
500: DefaultErrorResponseSchema
|
@@ -6951,12 +6962,12 @@ var userContract = initContract27().router(
|
|
6951
6962
|
getUserById: {
|
6952
6963
|
method: "GET",
|
6953
6964
|
path: "/:id",
|
6954
|
-
pathParams:
|
6965
|
+
pathParams: z82.object({ id: z82.string() }),
|
6955
6966
|
headers: DefaultHeaderSchema,
|
6956
6967
|
responses: {
|
6957
6968
|
200: UserSchema,
|
6958
|
-
400:
|
6959
|
-
message:
|
6969
|
+
400: z82.object({
|
6970
|
+
message: z82.string()
|
6960
6971
|
}),
|
6961
6972
|
401: DefaultUnauthorizedSchema
|
6962
6973
|
},
|
@@ -6965,15 +6976,15 @@ var userContract = initContract27().router(
|
|
6965
6976
|
updateUser: {
|
6966
6977
|
method: "PATCH",
|
6967
6978
|
path: "/:id",
|
6968
|
-
pathParams:
|
6979
|
+
pathParams: z82.object({ id: z82.string() }),
|
6969
6980
|
headers: DefaultHeaderSchema,
|
6970
6981
|
body: UpdateUserSchema,
|
6971
6982
|
responses: {
|
6972
6983
|
201: DefaultSuccessResponseSchema.extend({
|
6973
6984
|
user: UserSchema
|
6974
6985
|
}),
|
6975
|
-
400:
|
6976
|
-
message:
|
6986
|
+
400: z82.object({
|
6987
|
+
message: z82.string()
|
6977
6988
|
}),
|
6978
6989
|
401: DefaultUnauthorizedSchema,
|
6979
6990
|
404: DefaultNotFoundSchema,
|
@@ -6985,15 +6996,15 @@ var userContract = initContract27().router(
|
|
6985
6996
|
updateUserProfile: {
|
6986
6997
|
method: "PATCH",
|
6987
6998
|
path: "/profile/:id",
|
6988
|
-
pathParams:
|
6999
|
+
pathParams: z82.object({ id: z82.string() }),
|
6989
7000
|
headers: DefaultHeaderSchema,
|
6990
7001
|
body: UpdateUserProfileSchema,
|
6991
7002
|
responses: {
|
6992
7003
|
201: DefaultSuccessResponseSchema.extend({
|
6993
7004
|
user: UserSchema
|
6994
7005
|
}),
|
6995
|
-
400:
|
6996
|
-
message:
|
7006
|
+
400: z82.object({
|
7007
|
+
message: z82.string()
|
6997
7008
|
}),
|
6998
7009
|
401: DefaultUnauthorizedSchema,
|
6999
7010
|
404: DefaultNotFoundSchema,
|
@@ -7005,11 +7016,11 @@ var userContract = initContract27().router(
|
|
7005
7016
|
deleteUser: {
|
7006
7017
|
method: "DELETE",
|
7007
7018
|
path: "/:id",
|
7008
|
-
pathParams:
|
7019
|
+
pathParams: z82.object({ id: z82.string() }),
|
7009
7020
|
headers: DefaultHeaderSchema,
|
7010
7021
|
body: null,
|
7011
7022
|
responses: {
|
7012
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
7023
|
+
200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
|
7013
7024
|
404: DefaultNotFoundSchema,
|
7014
7025
|
422: DefaultUnprocessibleSchema,
|
7015
7026
|
500: DefaultErrorResponseSchema
|
@@ -7022,26 +7033,26 @@ var userContract = initContract27().router(
|
|
7022
7033
|
|
7023
7034
|
// src/user-presence-status-log/index.ts
|
7024
7035
|
import { initContract as initContract28 } from "@ts-rest/core";
|
7025
|
-
import
|
7036
|
+
import z85 from "zod";
|
7026
7037
|
|
7027
7038
|
// src/user-presence-status-log/schema.ts
|
7028
|
-
import
|
7039
|
+
import z83 from "zod";
|
7029
7040
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
7030
7041
|
user: UserSchema,
|
7031
7042
|
previousPresenceStatus: PresenceStatusSchema,
|
7032
7043
|
newPresenceStatus: PresenceStatusSchema,
|
7033
|
-
reason:
|
7044
|
+
reason: z83.string()
|
7034
7045
|
});
|
7035
7046
|
|
7036
7047
|
// src/user-presence-status-log/validation.ts
|
7037
|
-
import
|
7038
|
-
var UserPresenceStatusLogParamsSchema =
|
7039
|
-
page:
|
7040
|
-
pageSize:
|
7041
|
-
selectedDate:
|
7048
|
+
import z84 from "zod";
|
7049
|
+
var UserPresenceStatusLogParamsSchema = z84.object({
|
7050
|
+
page: z84.coerce.number().default(1),
|
7051
|
+
pageSize: z84.coerce.number().default(10),
|
7052
|
+
selectedDate: z84.string().optional()
|
7042
7053
|
}).optional();
|
7043
|
-
var UserPresenceStatusLogExportParamsSchema =
|
7044
|
-
selectedDate:
|
7054
|
+
var UserPresenceStatusLogExportParamsSchema = z84.object({
|
7055
|
+
selectedDate: z84.string().optional()
|
7045
7056
|
});
|
7046
7057
|
|
7047
7058
|
// src/user-presence-status-log/index.ts
|
@@ -7054,8 +7065,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7054
7065
|
headers: DefaultHeaderSchema,
|
7055
7066
|
responses: {
|
7056
7067
|
200: WithPagination(UserPresenceStatusLogSchema),
|
7057
|
-
400:
|
7058
|
-
message:
|
7068
|
+
400: z85.object({
|
7069
|
+
message: z85.string()
|
7059
7070
|
}),
|
7060
7071
|
401: DefaultUnauthorizedSchema,
|
7061
7072
|
500: DefaultErrorResponseSchema
|
@@ -7071,8 +7082,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7071
7082
|
headers: DefaultHeaderSchema,
|
7072
7083
|
responses: {
|
7073
7084
|
200: null,
|
7074
|
-
400:
|
7075
|
-
message:
|
7085
|
+
400: z85.object({
|
7086
|
+
message: z85.string()
|
7076
7087
|
}),
|
7077
7088
|
401: DefaultUnauthorizedSchema,
|
7078
7089
|
500: DefaultErrorResponseSchema
|
@@ -7084,67 +7095,67 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7084
7095
|
|
7085
7096
|
// src/widget/index.ts
|
7086
7097
|
import { initContract as initContract29 } from "@ts-rest/core";
|
7087
|
-
import
|
7098
|
+
import z88 from "zod";
|
7088
7099
|
|
7089
7100
|
// src/widget/schema.ts
|
7090
|
-
import
|
7091
|
-
var FieldsSchema =
|
7092
|
-
var WidgetPositionSchema =
|
7093
|
-
|
7094
|
-
|
7095
|
-
|
7096
|
-
|
7097
|
-
|
7101
|
+
import z86 from "zod";
|
7102
|
+
var FieldsSchema = z86.object({ data: z86.array(z86.string()) });
|
7103
|
+
var WidgetPositionSchema = z86.union([
|
7104
|
+
z86.literal("menu"),
|
7105
|
+
z86.literal("ticket_detail"),
|
7106
|
+
z86.literal("contact_detail"),
|
7107
|
+
z86.literal("contact_profile"),
|
7108
|
+
z86.literal("inbox_detail")
|
7098
7109
|
]);
|
7099
|
-
var WidgetTypeSchema =
|
7100
|
-
|
7101
|
-
|
7110
|
+
var WidgetTypeSchema = z86.union([
|
7111
|
+
z86.literal("iframe"),
|
7112
|
+
z86.literal("custom")
|
7102
7113
|
]);
|
7103
|
-
var WidgetHeaderSchema =
|
7104
|
-
key:
|
7105
|
-
value:
|
7114
|
+
var WidgetHeaderSchema = z86.object({
|
7115
|
+
key: z86.string(),
|
7116
|
+
value: z86.string()
|
7106
7117
|
});
|
7107
|
-
var WidgetMethodSchema =
|
7108
|
-
|
7109
|
-
|
7118
|
+
var WidgetMethodSchema = z86.union([
|
7119
|
+
z86.literal("get"),
|
7120
|
+
z86.literal("post")
|
7110
7121
|
]);
|
7111
7122
|
var WidgetSchema = DefaultEntitySchema.extend({
|
7112
|
-
name:
|
7113
|
-
description:
|
7123
|
+
name: z86.string(),
|
7124
|
+
description: z86.string().nullable(),
|
7114
7125
|
position: WidgetPositionSchema,
|
7115
7126
|
fields: FieldsSchema,
|
7116
|
-
url:
|
7127
|
+
url: z86.string(),
|
7117
7128
|
type: WidgetTypeSchema.nullable(),
|
7118
|
-
headers:
|
7129
|
+
headers: z86.array(WidgetHeaderSchema).nullable(),
|
7119
7130
|
method: WidgetMethodSchema.nullable(),
|
7120
|
-
fileKey:
|
7121
|
-
fileUrl:
|
7131
|
+
fileKey: z86.string().nullable(),
|
7132
|
+
fileUrl: z86.string().nullable()
|
7122
7133
|
});
|
7123
7134
|
|
7124
7135
|
// src/widget/validation.ts
|
7125
|
-
import
|
7126
|
-
var CreateWidgetSchema =
|
7127
|
-
name:
|
7128
|
-
description:
|
7129
|
-
url:
|
7136
|
+
import z87 from "zod";
|
7137
|
+
var CreateWidgetSchema = z87.object({
|
7138
|
+
name: z87.string(),
|
7139
|
+
description: z87.string().optional(),
|
7140
|
+
url: z87.string(),
|
7130
7141
|
position: WidgetPositionSchema,
|
7131
|
-
fields:
|
7142
|
+
fields: z87.object({
|
7132
7143
|
data: (
|
7133
7144
|
// Array of attribute system names
|
7134
|
-
|
7145
|
+
z87.array(z87.string())
|
7135
7146
|
)
|
7136
7147
|
}).optional(),
|
7137
7148
|
type: WidgetTypeSchema,
|
7138
|
-
headers:
|
7149
|
+
headers: z87.array(WidgetHeaderSchema).optional(),
|
7139
7150
|
method: WidgetMethodSchema.optional(),
|
7140
|
-
fileKey:
|
7151
|
+
fileKey: z87.string().nullable()
|
7141
7152
|
});
|
7142
7153
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
7143
|
-
var GetWidgetUrlPathQuerySchema =
|
7144
|
-
widgetId:
|
7154
|
+
var GetWidgetUrlPathQuerySchema = z87.object({
|
7155
|
+
widgetId: z87.string(),
|
7145
7156
|
// Position ID is ticket ID, contact ID, etc.
|
7146
7157
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
7147
|
-
positionId:
|
7158
|
+
positionId: z87.string()
|
7148
7159
|
});
|
7149
7160
|
|
7150
7161
|
// src/widget/index.ts
|
@@ -7159,8 +7170,8 @@ var widgetContract = initContract29().router(
|
|
7159
7170
|
201: DefaultSuccessResponseSchema.extend({
|
7160
7171
|
widget: WidgetSchema
|
7161
7172
|
}),
|
7162
|
-
400:
|
7163
|
-
message:
|
7173
|
+
400: z88.object({
|
7174
|
+
message: z88.string()
|
7164
7175
|
}),
|
7165
7176
|
401: DefaultUnauthorizedSchema,
|
7166
7177
|
500: DefaultErrorResponseSchema
|
@@ -7170,17 +7181,17 @@ var widgetContract = initContract29().router(
|
|
7170
7181
|
getWidgets: {
|
7171
7182
|
method: "GET",
|
7172
7183
|
path: "",
|
7173
|
-
query:
|
7174
|
-
page:
|
7175
|
-
pageSize:
|
7176
|
-
keyword:
|
7184
|
+
query: z88.object({
|
7185
|
+
page: z88.coerce.number().default(1),
|
7186
|
+
pageSize: z88.coerce.number().default(10),
|
7187
|
+
keyword: z88.coerce.string().optional()
|
7177
7188
|
}).optional(),
|
7178
7189
|
headers: DefaultHeaderSchema,
|
7179
7190
|
responses: {
|
7180
7191
|
200: WithPagination(WidgetSchema),
|
7181
7192
|
500: DefaultErrorResponseSchema,
|
7182
|
-
400:
|
7183
|
-
message:
|
7193
|
+
400: z88.object({
|
7194
|
+
message: z88.string()
|
7184
7195
|
}),
|
7185
7196
|
401: DefaultUnauthorizedSchema
|
7186
7197
|
},
|
@@ -7191,9 +7202,9 @@ var widgetContract = initContract29().router(
|
|
7191
7202
|
path: "/menu",
|
7192
7203
|
headers: DefaultHeaderSchema,
|
7193
7204
|
responses: {
|
7194
|
-
200:
|
7195
|
-
400:
|
7196
|
-
message:
|
7205
|
+
200: z88.array(WidgetSchema),
|
7206
|
+
400: z88.object({
|
7207
|
+
message: z88.string()
|
7197
7208
|
}),
|
7198
7209
|
401: DefaultUnauthorizedSchema,
|
7199
7210
|
500: DefaultErrorResponseSchema
|
@@ -7205,9 +7216,9 @@ var widgetContract = initContract29().router(
|
|
7205
7216
|
path: "/ticket_detail",
|
7206
7217
|
headers: DefaultHeaderSchema,
|
7207
7218
|
responses: {
|
7208
|
-
200:
|
7209
|
-
400:
|
7210
|
-
message:
|
7219
|
+
200: z88.array(WidgetSchema),
|
7220
|
+
400: z88.object({
|
7221
|
+
message: z88.string()
|
7211
7222
|
}),
|
7212
7223
|
401: DefaultUnauthorizedSchema,
|
7213
7224
|
500: DefaultErrorResponseSchema
|
@@ -7219,9 +7230,9 @@ var widgetContract = initContract29().router(
|
|
7219
7230
|
path: "/contact_detail",
|
7220
7231
|
headers: DefaultHeaderSchema,
|
7221
7232
|
responses: {
|
7222
|
-
200:
|
7223
|
-
400:
|
7224
|
-
message:
|
7233
|
+
200: z88.array(WidgetSchema),
|
7234
|
+
400: z88.object({
|
7235
|
+
message: z88.string()
|
7225
7236
|
}),
|
7226
7237
|
401: DefaultUnauthorizedSchema,
|
7227
7238
|
500: DefaultErrorResponseSchema
|
@@ -7233,9 +7244,9 @@ var widgetContract = initContract29().router(
|
|
7233
7244
|
path: "/contact_profile",
|
7234
7245
|
headers: DefaultHeaderSchema,
|
7235
7246
|
responses: {
|
7236
|
-
200:
|
7237
|
-
400:
|
7238
|
-
message:
|
7247
|
+
200: z88.array(WidgetSchema),
|
7248
|
+
400: z88.object({
|
7249
|
+
message: z88.string()
|
7239
7250
|
}),
|
7240
7251
|
401: DefaultUnauthorizedSchema,
|
7241
7252
|
500: DefaultErrorResponseSchema
|
@@ -7247,9 +7258,9 @@ var widgetContract = initContract29().router(
|
|
7247
7258
|
path: "/inbox_detail",
|
7248
7259
|
headers: DefaultHeaderSchema,
|
7249
7260
|
responses: {
|
7250
|
-
200:
|
7251
|
-
400:
|
7252
|
-
message:
|
7261
|
+
200: z88.array(WidgetSchema),
|
7262
|
+
400: z88.object({
|
7263
|
+
message: z88.string()
|
7253
7264
|
}),
|
7254
7265
|
401: DefaultUnauthorizedSchema,
|
7255
7266
|
500: DefaultErrorResponseSchema
|
@@ -7259,12 +7270,12 @@ var widgetContract = initContract29().router(
|
|
7259
7270
|
getWidgetById: {
|
7260
7271
|
method: "GET",
|
7261
7272
|
path: "/:id",
|
7262
|
-
pathParams:
|
7273
|
+
pathParams: z88.object({ id: z88.string() }),
|
7263
7274
|
headers: DefaultHeaderSchema,
|
7264
7275
|
responses: {
|
7265
7276
|
200: WidgetSchema,
|
7266
|
-
400:
|
7267
|
-
message:
|
7277
|
+
400: z88.object({
|
7278
|
+
message: z88.string()
|
7268
7279
|
}),
|
7269
7280
|
401: DefaultUnauthorizedSchema,
|
7270
7281
|
500: DefaultErrorResponseSchema
|
@@ -7278,14 +7289,14 @@ var widgetContract = initContract29().router(
|
|
7278
7289
|
headers: DefaultHeaderSchema,
|
7279
7290
|
responses: {
|
7280
7291
|
201: DefaultSuccessResponseSchema.extend({
|
7281
|
-
widget:
|
7282
|
-
token:
|
7283
|
-
headers:
|
7284
|
-
url:
|
7292
|
+
widget: z88.object({
|
7293
|
+
token: z88.string().nullable(),
|
7294
|
+
headers: z88.array(WidgetHeaderSchema),
|
7295
|
+
url: z88.string()
|
7285
7296
|
})
|
7286
7297
|
}),
|
7287
|
-
400:
|
7288
|
-
message:
|
7298
|
+
400: z88.object({
|
7299
|
+
message: z88.string()
|
7289
7300
|
}),
|
7290
7301
|
401: DefaultUnauthorizedSchema
|
7291
7302
|
},
|
@@ -7294,14 +7305,14 @@ var widgetContract = initContract29().router(
|
|
7294
7305
|
updateWidget: {
|
7295
7306
|
method: "PATCH",
|
7296
7307
|
path: "/:id",
|
7297
|
-
pathParams:
|
7308
|
+
pathParams: z88.object({ id: z88.string() }),
|
7298
7309
|
headers: DefaultHeaderSchema,
|
7299
7310
|
responses: {
|
7300
7311
|
201: DefaultSuccessResponseSchema.extend({
|
7301
7312
|
widget: WidgetSchema
|
7302
7313
|
}),
|
7303
|
-
400:
|
7304
|
-
message:
|
7314
|
+
400: z88.object({
|
7315
|
+
message: z88.string()
|
7305
7316
|
}),
|
7306
7317
|
401: DefaultUnauthorizedSchema
|
7307
7318
|
},
|
@@ -7311,11 +7322,11 @@ var widgetContract = initContract29().router(
|
|
7311
7322
|
deleteWidget: {
|
7312
7323
|
method: "DELETE",
|
7313
7324
|
path: "/:id",
|
7314
|
-
pathParams:
|
7325
|
+
pathParams: z88.object({ id: z88.string() }),
|
7315
7326
|
headers: DefaultHeaderSchema,
|
7316
7327
|
body: null,
|
7317
7328
|
responses: {
|
7318
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
7329
|
+
200: DefaultSuccessResponseSchema.extend({ message: z88.string() }),
|
7319
7330
|
500: DefaultErrorResponseSchema
|
7320
7331
|
},
|
7321
7332
|
summary: "Delete a widget."
|
@@ -7326,35 +7337,35 @@ var widgetContract = initContract29().router(
|
|
7326
7337
|
|
7327
7338
|
// src/wrap-up-form/index.ts
|
7328
7339
|
import { initContract as initContract30 } from "@ts-rest/core";
|
7329
|
-
import
|
7340
|
+
import z90 from "zod";
|
7330
7341
|
|
7331
7342
|
// src/wrap-up-form/validation.ts
|
7332
|
-
import { z as
|
7333
|
-
var CreateWrapUpFormSchema =
|
7334
|
-
note:
|
7335
|
-
disposition:
|
7336
|
-
callFrom:
|
7337
|
-
callTo:
|
7343
|
+
import { z as z89 } from "zod";
|
7344
|
+
var CreateWrapUpFormSchema = z89.object({
|
7345
|
+
note: z89.string().nullable().optional(),
|
7346
|
+
disposition: z89.string().nullable().optional(),
|
7347
|
+
callFrom: z89.string().nullable().optional(),
|
7348
|
+
callTo: z89.string().nullable().optional()
|
7338
7349
|
});
|
7339
7350
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
7340
|
-
cxLogId:
|
7341
|
-
type:
|
7342
|
-
tags:
|
7343
|
-
categoryIds:
|
7344
|
-
customFields:
|
7345
|
-
|
7346
|
-
id:
|
7347
|
-
type:
|
7348
|
-
value:
|
7351
|
+
cxLogId: z89.string().uuid().optional(),
|
7352
|
+
type: z89.string().optional(),
|
7353
|
+
tags: z89.array(z89.string()).optional(),
|
7354
|
+
categoryIds: z89.array(z89.string().uuid()).optional(),
|
7355
|
+
customFields: z89.array(
|
7356
|
+
z89.object({
|
7357
|
+
id: z89.string().uuid(),
|
7358
|
+
type: z89.string(),
|
7359
|
+
value: z89.string()
|
7349
7360
|
})
|
7350
7361
|
).optional(),
|
7351
|
-
durationSeconds:
|
7362
|
+
durationSeconds: z89.number().optional()
|
7352
7363
|
});
|
7353
|
-
var CreateCXLogWrapUpFormSchema =
|
7354
|
-
cxLogId:
|
7355
|
-
disposition:
|
7356
|
-
tagIds:
|
7357
|
-
note:
|
7364
|
+
var CreateCXLogWrapUpFormSchema = z89.object({
|
7365
|
+
cxLogId: z89.string().uuid(),
|
7366
|
+
disposition: z89.string().optional(),
|
7367
|
+
tagIds: z89.array(z89.string().uuid()).optional(),
|
7368
|
+
note: z89.string().optional()
|
7358
7369
|
});
|
7359
7370
|
|
7360
7371
|
// src/wrap-up-form/index.ts
|
@@ -7366,10 +7377,10 @@ var wrapUpFormContract = initContract30().router(
|
|
7366
7377
|
headers: DefaultHeaderSchema,
|
7367
7378
|
responses: {
|
7368
7379
|
200: DefaultSuccessResponseSchema.extend({
|
7369
|
-
wrapUpFormTimer:
|
7380
|
+
wrapUpFormTimer: z90.number()
|
7370
7381
|
}),
|
7371
|
-
400:
|
7372
|
-
message:
|
7382
|
+
400: z90.object({
|
7383
|
+
message: z90.string()
|
7373
7384
|
}),
|
7374
7385
|
401: DefaultUnauthorizedSchema,
|
7375
7386
|
500: DefaultErrorResponseSchema
|
@@ -7378,14 +7389,14 @@ var wrapUpFormContract = initContract30().router(
|
|
7378
7389
|
updateWrapUpFormTimer: {
|
7379
7390
|
method: "PATCH",
|
7380
7391
|
path: "/timer",
|
7381
|
-
body:
|
7392
|
+
body: z90.object({ newWrapUpFormTimer: z90.number().positive() }),
|
7382
7393
|
headers: DefaultHeaderSchema,
|
7383
7394
|
responses: {
|
7384
7395
|
200: DefaultSuccessResponseSchema.extend({
|
7385
|
-
wrapUpFormTimer:
|
7396
|
+
wrapUpFormTimer: z90.number()
|
7386
7397
|
}),
|
7387
|
-
400:
|
7388
|
-
message:
|
7398
|
+
400: z90.object({
|
7399
|
+
message: z90.string()
|
7389
7400
|
}),
|
7390
7401
|
401: DefaultUnauthorizedSchema,
|
7391
7402
|
500: DefaultErrorResponseSchema
|
@@ -7400,8 +7411,8 @@ var wrapUpFormContract = initContract30().router(
|
|
7400
7411
|
201: DefaultSuccessResponseSchema.extend({
|
7401
7412
|
wrapUpForm: WrapUpFormSchema
|
7402
7413
|
}),
|
7403
|
-
400:
|
7404
|
-
message:
|
7414
|
+
400: z90.object({
|
7415
|
+
message: z90.string()
|
7405
7416
|
}),
|
7406
7417
|
401: DefaultUnauthorizedSchema,
|
7407
7418
|
500: DefaultErrorResponseSchema
|
@@ -7423,15 +7434,15 @@ var wrapUpFormContract = initContract30().router(
|
|
7423
7434
|
getWrapUpForms: {
|
7424
7435
|
method: "GET",
|
7425
7436
|
path: "",
|
7426
|
-
query:
|
7427
|
-
page:
|
7428
|
-
pageSize:
|
7437
|
+
query: z90.object({
|
7438
|
+
page: z90.coerce.number().default(1),
|
7439
|
+
pageSize: z90.coerce.number().default(10)
|
7429
7440
|
}).optional(),
|
7430
7441
|
headers: DefaultHeaderSchema,
|
7431
7442
|
responses: {
|
7432
7443
|
200: WithPagination(WrapUpFormSchema),
|
7433
|
-
400:
|
7434
|
-
message:
|
7444
|
+
400: z90.object({
|
7445
|
+
message: z90.string()
|
7435
7446
|
}),
|
7436
7447
|
401: DefaultUnauthorizedSchema,
|
7437
7448
|
500: DefaultErrorResponseSchema
|
@@ -7441,12 +7452,12 @@ var wrapUpFormContract = initContract30().router(
|
|
7441
7452
|
getWrapUpForm: {
|
7442
7453
|
method: "GET",
|
7443
7454
|
path: "/:id",
|
7444
|
-
pathParams:
|
7455
|
+
pathParams: z90.object({ id: z90.string() }),
|
7445
7456
|
headers: DefaultHeaderSchema,
|
7446
7457
|
responses: {
|
7447
7458
|
200: WrapUpFormSchema,
|
7448
|
-
400:
|
7449
|
-
message:
|
7459
|
+
400: z90.object({
|
7460
|
+
message: z90.string()
|
7450
7461
|
}),
|
7451
7462
|
401: DefaultUnauthorizedSchema,
|
7452
7463
|
500: DefaultErrorResponseSchema
|
@@ -7455,15 +7466,15 @@ var wrapUpFormContract = initContract30().router(
|
|
7455
7466
|
updateWrapUpForm: {
|
7456
7467
|
method: "PATCH",
|
7457
7468
|
path: "/:id",
|
7458
|
-
pathParams:
|
7469
|
+
pathParams: z90.object({ id: z90.string() }),
|
7459
7470
|
headers: DefaultHeaderSchema,
|
7460
7471
|
body: UpdateWrapUpFormSchema,
|
7461
7472
|
responses: {
|
7462
7473
|
201: DefaultSuccessResponseSchema.extend({
|
7463
7474
|
wrapUpForm: WrapUpFormSchema
|
7464
7475
|
}),
|
7465
|
-
400:
|
7466
|
-
message:
|
7476
|
+
400: z90.object({
|
7477
|
+
message: z90.string()
|
7467
7478
|
}),
|
7468
7479
|
401: DefaultUnauthorizedSchema,
|
7469
7480
|
500: DefaultErrorResponseSchema
|
@@ -7476,28 +7487,28 @@ var wrapUpFormContract = initContract30().router(
|
|
7476
7487
|
|
7477
7488
|
// src/upload/index.ts
|
7478
7489
|
import { initContract as initContract31 } from "@ts-rest/core";
|
7479
|
-
import
|
7490
|
+
import z91 from "zod";
|
7480
7491
|
var uploadContract = initContract31().router(
|
7481
7492
|
{
|
7482
7493
|
rename: {
|
7483
7494
|
method: "POST",
|
7484
7495
|
path: "/:id/rename",
|
7485
|
-
pathParams:
|
7486
|
-
id:
|
7496
|
+
pathParams: z91.object({
|
7497
|
+
id: z91.string()
|
7487
7498
|
}),
|
7488
7499
|
headers: DefaultHeaderSchema,
|
7489
7500
|
responses: {
|
7490
7501
|
201: DefaultSuccessResponseSchema.extend({
|
7491
|
-
message:
|
7502
|
+
message: z91.string()
|
7492
7503
|
}),
|
7493
|
-
400:
|
7494
|
-
message:
|
7504
|
+
400: z91.object({
|
7505
|
+
message: z91.string()
|
7495
7506
|
}),
|
7496
|
-
409:
|
7497
|
-
message:
|
7507
|
+
409: z91.object({
|
7508
|
+
message: z91.string()
|
7498
7509
|
}),
|
7499
|
-
500:
|
7500
|
-
message:
|
7510
|
+
500: z91.object({
|
7511
|
+
message: z91.string()
|
7501
7512
|
}),
|
7502
7513
|
401: DefaultUnauthorizedSchema,
|
7503
7514
|
404: DefaultNotFoundSchema,
|
@@ -7509,23 +7520,23 @@ var uploadContract = initContract31().router(
|
|
7509
7520
|
delete: {
|
7510
7521
|
method: "DELETE",
|
7511
7522
|
path: "/:id",
|
7512
|
-
pathParams:
|
7513
|
-
id:
|
7523
|
+
pathParams: z91.object({
|
7524
|
+
id: z91.string()
|
7514
7525
|
}),
|
7515
7526
|
headers: DefaultHeaderSchema,
|
7516
7527
|
body: null,
|
7517
7528
|
responses: {
|
7518
7529
|
201: DefaultSuccessResponseSchema.extend({
|
7519
|
-
message:
|
7530
|
+
message: z91.string()
|
7520
7531
|
}),
|
7521
|
-
400:
|
7522
|
-
message:
|
7532
|
+
400: z91.object({
|
7533
|
+
message: z91.string()
|
7523
7534
|
}),
|
7524
|
-
409:
|
7525
|
-
message:
|
7535
|
+
409: z91.object({
|
7536
|
+
message: z91.string()
|
7526
7537
|
}),
|
7527
|
-
500:
|
7528
|
-
message:
|
7538
|
+
500: z91.object({
|
7539
|
+
message: z91.string()
|
7529
7540
|
}),
|
7530
7541
|
401: DefaultUnauthorizedSchema,
|
7531
7542
|
404: DefaultNotFoundSchema,
|
@@ -7540,19 +7551,19 @@ var uploadContract = initContract31().router(
|
|
7540
7551
|
);
|
7541
7552
|
|
7542
7553
|
// src/viber/index.ts
|
7543
|
-
import
|
7554
|
+
import z93 from "zod";
|
7544
7555
|
|
7545
7556
|
// src/viber/validation.ts
|
7546
|
-
import
|
7547
|
-
var ViberChannelSchema =
|
7548
|
-
name:
|
7549
|
-
accessToken:
|
7550
|
-
actor:
|
7551
|
-
id:
|
7552
|
-
name:
|
7553
|
-
email:
|
7554
|
-
address:
|
7555
|
-
phone:
|
7557
|
+
import z92 from "zod";
|
7558
|
+
var ViberChannelSchema = z92.object({
|
7559
|
+
name: z92.string(),
|
7560
|
+
accessToken: z92.string(),
|
7561
|
+
actor: z92.object({
|
7562
|
+
id: z92.string().uuid(),
|
7563
|
+
name: z92.string(),
|
7564
|
+
email: z92.string().email(),
|
7565
|
+
address: z92.string().nullable(),
|
7566
|
+
phone: z92.string().nullable()
|
7556
7567
|
}).optional()
|
7557
7568
|
});
|
7558
7569
|
|
@@ -7581,8 +7592,8 @@ var viberContract = initContract32().router({
|
|
7581
7592
|
}),
|
7582
7593
|
400: DefaultErrorResponseSchema
|
7583
7594
|
},
|
7584
|
-
body:
|
7585
|
-
id:
|
7595
|
+
body: z93.object({
|
7596
|
+
id: z93.string().uuid()
|
7586
7597
|
}),
|
7587
7598
|
summary: "Connect viber channel"
|
7588
7599
|
},
|
@@ -7598,8 +7609,8 @@ var viberContract = initContract32().router({
|
|
7598
7609
|
reconnect: {
|
7599
7610
|
method: "POST",
|
7600
7611
|
path: "/reconnect/:channelId",
|
7601
|
-
pathParams:
|
7602
|
-
channelId:
|
7612
|
+
pathParams: z93.object({
|
7613
|
+
channelId: z93.string().uuid()
|
7603
7614
|
}),
|
7604
7615
|
responses: {
|
7605
7616
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7614,8 +7625,8 @@ var viberContract = initContract32().router({
|
|
7614
7625
|
delete: {
|
7615
7626
|
method: "DELETE",
|
7616
7627
|
path: "/delete/:channelId",
|
7617
|
-
pathParams:
|
7618
|
-
channelId:
|
7628
|
+
pathParams: z93.object({
|
7629
|
+
channelId: z93.string().uuid()
|
7619
7630
|
}),
|
7620
7631
|
body: null,
|
7621
7632
|
responses: {
|
@@ -7627,21 +7638,21 @@ var viberContract = initContract32().router({
|
|
7627
7638
|
});
|
7628
7639
|
|
7629
7640
|
// src/telegram/index.ts
|
7630
|
-
import
|
7641
|
+
import z95 from "zod";
|
7631
7642
|
import { initContract as initContract33 } from "@ts-rest/core";
|
7632
7643
|
|
7633
7644
|
// src/telegram/validation.ts
|
7634
|
-
import
|
7635
|
-
var TelegramChannelSchema =
|
7636
|
-
name:
|
7645
|
+
import z94 from "zod";
|
7646
|
+
var TelegramChannelSchema = z94.object({
|
7647
|
+
name: z94.string(),
|
7637
7648
|
// Telegram bot access token
|
7638
|
-
accessToken:
|
7639
|
-
actor:
|
7640
|
-
id:
|
7641
|
-
name:
|
7642
|
-
email:
|
7643
|
-
address:
|
7644
|
-
phone:
|
7649
|
+
accessToken: z94.string(),
|
7650
|
+
actor: z94.object({
|
7651
|
+
id: z94.string().uuid(),
|
7652
|
+
name: z94.string(),
|
7653
|
+
email: z94.string().email(),
|
7654
|
+
address: z94.string().nullable(),
|
7655
|
+
phone: z94.string().nullable()
|
7645
7656
|
}).optional()
|
7646
7657
|
});
|
7647
7658
|
|
@@ -7668,8 +7679,8 @@ var telegramContract = initContract33().router({
|
|
7668
7679
|
500: DefaultErrorResponseSchema,
|
7669
7680
|
400: DefaultErrorResponseSchema
|
7670
7681
|
},
|
7671
|
-
body:
|
7672
|
-
id:
|
7682
|
+
body: z95.object({
|
7683
|
+
id: z95.string().uuid()
|
7673
7684
|
}),
|
7674
7685
|
summary: "Disconnect telegram channel"
|
7675
7686
|
},
|
@@ -7685,8 +7696,8 @@ var telegramContract = initContract33().router({
|
|
7685
7696
|
reconnect: {
|
7686
7697
|
method: "POST",
|
7687
7698
|
path: "/reconnect/:channelId",
|
7688
|
-
pathParams:
|
7689
|
-
channelId:
|
7699
|
+
pathParams: z95.object({
|
7700
|
+
channelId: z95.string().uuid()
|
7690
7701
|
}),
|
7691
7702
|
body: null,
|
7692
7703
|
responses: {
|
@@ -7699,8 +7710,8 @@ var telegramContract = initContract33().router({
|
|
7699
7710
|
delete: {
|
7700
7711
|
method: "DELETE",
|
7701
7712
|
path: "/delete/:channelId",
|
7702
|
-
pathParams:
|
7703
|
-
channelId:
|
7713
|
+
pathParams: z95.object({
|
7714
|
+
channelId: z95.string().uuid()
|
7704
7715
|
}),
|
7705
7716
|
body: null,
|
7706
7717
|
responses: {
|
@@ -7714,58 +7725,58 @@ var telegramContract = initContract33().router({
|
|
7714
7725
|
|
7715
7726
|
// src/notification/index.ts
|
7716
7727
|
import { initContract as initContract34 } from "@ts-rest/core";
|
7717
|
-
import
|
7728
|
+
import z98 from "zod";
|
7718
7729
|
|
7719
7730
|
// src/notification/validation.ts
|
7720
|
-
import
|
7731
|
+
import z97 from "zod";
|
7721
7732
|
|
7722
7733
|
// src/notification/schema.ts
|
7723
|
-
import
|
7724
|
-
var NotificationChangeSchema =
|
7725
|
-
id:
|
7726
|
-
createdAt:
|
7727
|
-
updatedAt:
|
7728
|
-
deletedAt:
|
7729
|
-
actorId:
|
7734
|
+
import z96 from "zod";
|
7735
|
+
var NotificationChangeSchema = z96.object({
|
7736
|
+
id: z96.string().uuid(),
|
7737
|
+
createdAt: z96.date(),
|
7738
|
+
updatedAt: z96.date(),
|
7739
|
+
deletedAt: z96.date().nullable(),
|
7740
|
+
actorId: z96.string().uuid(),
|
7730
7741
|
actor: UserSchema,
|
7731
|
-
notificationObjectId:
|
7732
|
-
readAt:
|
7733
|
-
});
|
7734
|
-
var NotificationObjectSchema =
|
7735
|
-
id:
|
7736
|
-
createdAt:
|
7737
|
-
updatedAt:
|
7738
|
-
deletedAt:
|
7739
|
-
data:
|
7742
|
+
notificationObjectId: z96.string().uuid(),
|
7743
|
+
readAt: z96.date()
|
7744
|
+
});
|
7745
|
+
var NotificationObjectSchema = z96.object({
|
7746
|
+
id: z96.string().uuid(),
|
7747
|
+
createdAt: z96.date(),
|
7748
|
+
updatedAt: z96.date(),
|
7749
|
+
deletedAt: z96.date().nullable(),
|
7750
|
+
data: z96.string(),
|
7740
7751
|
notificationChange: NotificationChangeSchema
|
7741
7752
|
});
|
7742
|
-
var NotificationSchema =
|
7743
|
-
id:
|
7744
|
-
createdAt:
|
7745
|
-
updatedAt:
|
7746
|
-
deletedAt:
|
7747
|
-
notificationObjectId:
|
7748
|
-
notifierId:
|
7753
|
+
var NotificationSchema = z96.object({
|
7754
|
+
id: z96.string().uuid(),
|
7755
|
+
createdAt: z96.date(),
|
7756
|
+
updatedAt: z96.date(),
|
7757
|
+
deletedAt: z96.date().nullable(),
|
7758
|
+
notificationObjectId: z96.string().uuid(),
|
7759
|
+
notifierId: z96.string().uuid(),
|
7749
7760
|
notificationObject: NotificationObjectSchema,
|
7750
|
-
readAt:
|
7761
|
+
readAt: z96.date()
|
7751
7762
|
});
|
7752
7763
|
|
7753
7764
|
// src/notification/validation.ts
|
7754
|
-
var GetNotificationsRequestSchema =
|
7755
|
-
page:
|
7756
|
-
pageSize:
|
7765
|
+
var GetNotificationsRequestSchema = z97.object({
|
7766
|
+
page: z97.coerce.number().default(1),
|
7767
|
+
pageSize: z97.coerce.number().default(10)
|
7757
7768
|
});
|
7758
|
-
var GetNotificationsResponseSchema =
|
7759
|
-
notificationCount:
|
7760
|
-
notifications:
|
7761
|
-
total:
|
7762
|
-
page:
|
7763
|
-
pageSize:
|
7764
|
-
lastPage:
|
7765
|
-
totalUnreadCount:
|
7769
|
+
var GetNotificationsResponseSchema = z97.object({
|
7770
|
+
notificationCount: z97.number(),
|
7771
|
+
notifications: z97.array(NotificationSchema),
|
7772
|
+
total: z97.number(),
|
7773
|
+
page: z97.number(),
|
7774
|
+
pageSize: z97.number(),
|
7775
|
+
lastPage: z97.number(),
|
7776
|
+
totalUnreadCount: z97.number().optional()
|
7766
7777
|
});
|
7767
|
-
var ResetNotificationRequestSchema =
|
7768
|
-
userId:
|
7778
|
+
var ResetNotificationRequestSchema = z97.object({
|
7779
|
+
userId: z97.string()
|
7769
7780
|
});
|
7770
7781
|
|
7771
7782
|
// src/notification/index.ts
|
@@ -7779,14 +7790,14 @@ var userNotificationContract = initContract34().router(
|
|
7779
7790
|
200: DefaultSuccessResponseSchema.extend({
|
7780
7791
|
data: GetNotificationsResponseSchema
|
7781
7792
|
}),
|
7782
|
-
400:
|
7783
|
-
message:
|
7793
|
+
400: z98.object({
|
7794
|
+
message: z98.string()
|
7784
7795
|
}),
|
7785
|
-
409:
|
7786
|
-
message:
|
7796
|
+
409: z98.object({
|
7797
|
+
message: z98.string()
|
7787
7798
|
}),
|
7788
|
-
500:
|
7789
|
-
message:
|
7799
|
+
500: z98.object({
|
7800
|
+
message: z98.string()
|
7790
7801
|
}),
|
7791
7802
|
401: DefaultUnauthorizedSchema,
|
7792
7803
|
404: DefaultNotFoundSchema,
|
@@ -7799,16 +7810,16 @@ var userNotificationContract = initContract34().router(
|
|
7799
7810
|
path: "/new_notifications_count",
|
7800
7811
|
responses: {
|
7801
7812
|
200: DefaultSuccessResponseSchema.extend({
|
7802
|
-
total:
|
7813
|
+
total: z98.number()
|
7803
7814
|
}),
|
7804
|
-
400:
|
7805
|
-
message:
|
7815
|
+
400: z98.object({
|
7816
|
+
message: z98.string()
|
7806
7817
|
}),
|
7807
|
-
409:
|
7808
|
-
message:
|
7818
|
+
409: z98.object({
|
7819
|
+
message: z98.string()
|
7809
7820
|
}),
|
7810
|
-
500:
|
7811
|
-
message:
|
7821
|
+
500: z98.object({
|
7822
|
+
message: z98.string()
|
7812
7823
|
}),
|
7813
7824
|
401: DefaultUnauthorizedSchema,
|
7814
7825
|
404: DefaultNotFoundSchema,
|
@@ -7823,14 +7834,14 @@ var userNotificationContract = initContract34().router(
|
|
7823
7834
|
201: DefaultSuccessResponseSchema.extend({
|
7824
7835
|
data: UserSchema
|
7825
7836
|
}),
|
7826
|
-
400:
|
7827
|
-
message:
|
7837
|
+
400: z98.object({
|
7838
|
+
message: z98.string()
|
7828
7839
|
}),
|
7829
|
-
409:
|
7830
|
-
message:
|
7840
|
+
409: z98.object({
|
7841
|
+
message: z98.string()
|
7831
7842
|
}),
|
7832
|
-
500:
|
7833
|
-
message:
|
7843
|
+
500: z98.object({
|
7844
|
+
message: z98.string()
|
7834
7845
|
}),
|
7835
7846
|
401: DefaultUnauthorizedSchema,
|
7836
7847
|
404: DefaultNotFoundSchema,
|
@@ -7842,19 +7853,19 @@ var userNotificationContract = initContract34().router(
|
|
7842
7853
|
readNotification: {
|
7843
7854
|
method: "POST",
|
7844
7855
|
path: "/read/:id",
|
7845
|
-
pathParams:
|
7856
|
+
pathParams: z98.object({ id: z98.string() }),
|
7846
7857
|
responses: {
|
7847
7858
|
201: DefaultSuccessResponseSchema.extend({
|
7848
7859
|
data: NotificationSchema
|
7849
7860
|
}),
|
7850
|
-
400:
|
7851
|
-
message:
|
7861
|
+
400: z98.object({
|
7862
|
+
message: z98.string()
|
7852
7863
|
}),
|
7853
|
-
409:
|
7854
|
-
message:
|
7864
|
+
409: z98.object({
|
7865
|
+
message: z98.string()
|
7855
7866
|
}),
|
7856
|
-
500:
|
7857
|
-
message:
|
7867
|
+
500: z98.object({
|
7868
|
+
message: z98.string()
|
7858
7869
|
}),
|
7859
7870
|
401: DefaultUnauthorizedSchema,
|
7860
7871
|
404: DefaultNotFoundSchema,
|
@@ -7871,63 +7882,63 @@ var userNotificationContract = initContract34().router(
|
|
7871
7882
|
|
7872
7883
|
// src/snippet/index.ts
|
7873
7884
|
import { initContract as initContract35 } from "@ts-rest/core";
|
7874
|
-
import { z as
|
7885
|
+
import { z as z101 } from "zod";
|
7875
7886
|
|
7876
7887
|
// src/snippet/schema.ts
|
7877
|
-
import
|
7888
|
+
import z99 from "zod";
|
7878
7889
|
var SnippetGroupSchema = DefaultEntitySchema.extend({
|
7879
|
-
name:
|
7880
|
-
platformType:
|
7890
|
+
name: z99.string(),
|
7891
|
+
platformType: z99.string()
|
7881
7892
|
});
|
7882
7893
|
var SnippetContentSchema = DefaultEntitySchema.extend({
|
7883
|
-
contentType:
|
7884
|
-
contentValue:
|
7885
|
-
contentTemplate:
|
7886
|
-
order:
|
7894
|
+
contentType: z99.string(),
|
7895
|
+
contentValue: z99.string().nullable(),
|
7896
|
+
contentTemplate: z99.any().nullable(),
|
7897
|
+
order: z99.number(),
|
7887
7898
|
upload: UploadSchema.nullable()
|
7888
7899
|
});
|
7889
7900
|
var SnippetSchema = DefaultEntitySchema.extend({
|
7890
|
-
name:
|
7901
|
+
name: z99.string(),
|
7891
7902
|
snippetGroup: SnippetGroupSchema,
|
7892
7903
|
snippetContent: SnippetContentSchema
|
7893
7904
|
});
|
7894
|
-
var SnippetGroupListItemSchema =
|
7895
|
-
id:
|
7896
|
-
name:
|
7905
|
+
var SnippetGroupListItemSchema = z99.object({
|
7906
|
+
id: z99.string().uuid(),
|
7907
|
+
name: z99.string()
|
7897
7908
|
});
|
7898
|
-
var SnippetListItemSchema =
|
7899
|
-
id:
|
7900
|
-
shortCutName:
|
7901
|
-
contentType:
|
7902
|
-
contentValue:
|
7903
|
-
snippetGroupId:
|
7909
|
+
var SnippetListItemSchema = z99.object({
|
7910
|
+
id: z99.string().uuid(),
|
7911
|
+
shortCutName: z99.string(),
|
7912
|
+
contentType: z99.string(),
|
7913
|
+
contentValue: z99.string().nullable(),
|
7914
|
+
snippetGroupId: z99.string()
|
7904
7915
|
});
|
7905
7916
|
|
7906
7917
|
// src/snippet/validation.ts
|
7907
|
-
import { z as
|
7908
|
-
var CreateSnippetGroupSchema =
|
7909
|
-
name:
|
7910
|
-
platformType:
|
7918
|
+
import { z as z100 } from "zod";
|
7919
|
+
var CreateSnippetGroupSchema = z100.object({
|
7920
|
+
name: z100.string(),
|
7921
|
+
platformType: z100.string()
|
7911
7922
|
});
|
7912
|
-
var UpdateSnippetGroupSchema =
|
7913
|
-
name:
|
7914
|
-
platformType:
|
7923
|
+
var UpdateSnippetGroupSchema = z100.object({
|
7924
|
+
name: z100.string().optional(),
|
7925
|
+
platformType: z100.string().optional()
|
7915
7926
|
});
|
7916
|
-
var DeleteSnippetGroupSchema =
|
7917
|
-
id:
|
7927
|
+
var DeleteSnippetGroupSchema = z100.object({
|
7928
|
+
id: z100.string()
|
7918
7929
|
});
|
7919
|
-
var CreateSnippetSchema =
|
7920
|
-
shortcutName:
|
7921
|
-
contentType:
|
7922
|
-
contentValue:
|
7923
|
-
snippetGroupId:
|
7924
|
-
platformType:
|
7930
|
+
var CreateSnippetSchema = z100.object({
|
7931
|
+
shortcutName: z100.string(),
|
7932
|
+
contentType: z100.string(),
|
7933
|
+
contentValue: z100.string().optional(),
|
7934
|
+
snippetGroupId: z100.string(),
|
7935
|
+
platformType: z100.string()
|
7925
7936
|
});
|
7926
7937
|
var UpdateSnippetSchema = CreateSnippetSchema.extend({
|
7927
|
-
snippetContentId:
|
7938
|
+
snippetContentId: z100.string()
|
7928
7939
|
});
|
7929
|
-
var DeleteSnippetSchema =
|
7930
|
-
snippetId:
|
7940
|
+
var DeleteSnippetSchema = z100.object({
|
7941
|
+
snippetId: z100.string()
|
7931
7942
|
});
|
7932
7943
|
|
7933
7944
|
// src/snippet/index.ts
|
@@ -7950,7 +7961,7 @@ var snippetContract = initContract35().router(
|
|
7950
7961
|
query: null,
|
7951
7962
|
responses: {
|
7952
7963
|
200: DefaultSuccessResponseSchema.extend({
|
7953
|
-
snippetgroups:
|
7964
|
+
snippetgroups: z101.array(SnippetGroupSchema)
|
7954
7965
|
}),
|
7955
7966
|
500: DefaultErrorResponseSchema
|
7956
7967
|
}
|
@@ -7958,7 +7969,7 @@ var snippetContract = initContract35().router(
|
|
7958
7969
|
updateSnippetGroup: {
|
7959
7970
|
method: "PATCH",
|
7960
7971
|
path: "/groups/:id",
|
7961
|
-
pathParams:
|
7972
|
+
pathParams: z101.object({ id: z101.string() }),
|
7962
7973
|
body: UpdateSnippetGroupSchema,
|
7963
7974
|
responses: {
|
7964
7975
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7970,7 +7981,7 @@ var snippetContract = initContract35().router(
|
|
7970
7981
|
deleteSnippetGroup: {
|
7971
7982
|
method: "DELETE",
|
7972
7983
|
path: "/groups/:id",
|
7973
|
-
pathParams:
|
7984
|
+
pathParams: z101.object({ id: z101.string() }),
|
7974
7985
|
body: null,
|
7975
7986
|
responses: {
|
7976
7987
|
200: DefaultSuccessResponseSchema,
|
@@ -7982,7 +7993,7 @@ var snippetContract = initContract35().router(
|
|
7982
7993
|
path: "",
|
7983
7994
|
responses: {
|
7984
7995
|
200: DefaultSuccessResponseSchema.extend({
|
7985
|
-
snippets:
|
7996
|
+
snippets: z101.array(SnippetSchema)
|
7986
7997
|
}),
|
7987
7998
|
500: DefaultErrorResponseSchema
|
7988
7999
|
}
|
@@ -8001,7 +8012,7 @@ var snippetContract = initContract35().router(
|
|
8001
8012
|
updateSnippet: {
|
8002
8013
|
method: "PATCH",
|
8003
8014
|
path: "/:id",
|
8004
|
-
pathParams:
|
8015
|
+
pathParams: z101.object({ id: z101.string() }),
|
8005
8016
|
body: UpdateSnippetSchema,
|
8006
8017
|
responses: {
|
8007
8018
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -8013,7 +8024,7 @@ var snippetContract = initContract35().router(
|
|
8013
8024
|
deleteSnippet: {
|
8014
8025
|
method: "DELETE",
|
8015
8026
|
path: "/:id",
|
8016
|
-
pathParams:
|
8027
|
+
pathParams: z101.object({ id: z101.string() }),
|
8017
8028
|
body: null,
|
8018
8029
|
responses: {
|
8019
8030
|
200: DefaultSuccessResponseSchema,
|
@@ -8030,77 +8041,77 @@ var snippetContract = initContract35().router(
|
|
8030
8041
|
import { initContract as initContract36 } from "@ts-rest/core";
|
8031
8042
|
|
8032
8043
|
// src/business-calendar/validation.ts
|
8033
|
-
import
|
8034
|
-
var TimeSlotDataSchema =
|
8035
|
-
var CreateBusinessHourSchema =
|
8036
|
-
day:
|
8037
|
-
isEnabled:
|
8044
|
+
import z102 from "zod";
|
8045
|
+
var TimeSlotDataSchema = z102.any();
|
8046
|
+
var CreateBusinessHourSchema = z102.object({
|
8047
|
+
day: z102.string(),
|
8048
|
+
isEnabled: z102.boolean(),
|
8038
8049
|
timeSlots: TimeSlotDataSchema
|
8039
8050
|
}).array();
|
8040
|
-
var UpdateBusinessHourSchema =
|
8041
|
-
id:
|
8042
|
-
day:
|
8043
|
-
isEnabled:
|
8051
|
+
var UpdateBusinessHourSchema = z102.object({
|
8052
|
+
id: z102.string(),
|
8053
|
+
day: z102.string(),
|
8054
|
+
isEnabled: z102.boolean(),
|
8044
8055
|
timeSlots: TimeSlotDataSchema
|
8045
8056
|
}).array();
|
8046
|
-
var CreateHolidaySchema =
|
8047
|
-
name:
|
8048
|
-
date:
|
8049
|
-
isEnabled:
|
8057
|
+
var CreateHolidaySchema = z102.object({
|
8058
|
+
name: z102.string(),
|
8059
|
+
date: z102.string(),
|
8060
|
+
isEnabled: z102.boolean()
|
8050
8061
|
}).array();
|
8051
|
-
var UpdateHolidaySchema =
|
8052
|
-
id:
|
8053
|
-
name:
|
8054
|
-
date:
|
8055
|
-
isEnabled:
|
8062
|
+
var UpdateHolidaySchema = z102.object({
|
8063
|
+
id: z102.string().optional(),
|
8064
|
+
name: z102.string(),
|
8065
|
+
date: z102.string(),
|
8066
|
+
isEnabled: z102.boolean()
|
8056
8067
|
}).array();
|
8057
|
-
var CreateBusinessCalendarSchema =
|
8058
|
-
name:
|
8059
|
-
description:
|
8060
|
-
timeZone:
|
8061
|
-
isEnabled:
|
8068
|
+
var CreateBusinessCalendarSchema = z102.object({
|
8069
|
+
name: z102.string(),
|
8070
|
+
description: z102.string().optional(),
|
8071
|
+
timeZone: z102.string(),
|
8072
|
+
isEnabled: z102.boolean(),
|
8062
8073
|
businessHours: CreateBusinessHourSchema,
|
8063
8074
|
holidays: CreateHolidaySchema
|
8064
8075
|
});
|
8065
|
-
var UpdateBusinessCalendarSchema =
|
8066
|
-
id:
|
8067
|
-
name:
|
8068
|
-
description:
|
8069
|
-
timeZone:
|
8070
|
-
isEnabled:
|
8076
|
+
var UpdateBusinessCalendarSchema = z102.object({
|
8077
|
+
id: z102.string(),
|
8078
|
+
name: z102.string(),
|
8079
|
+
description: z102.string().optional(),
|
8080
|
+
timeZone: z102.string(),
|
8081
|
+
isEnabled: z102.boolean(),
|
8071
8082
|
businessHours: UpdateBusinessHourSchema,
|
8072
8083
|
holidays: UpdateHolidaySchema
|
8073
8084
|
});
|
8074
|
-
var DeleteBusinessCalendarSchema =
|
8075
|
-
id:
|
8085
|
+
var DeleteBusinessCalendarSchema = z102.object({
|
8086
|
+
id: z102.string()
|
8076
8087
|
});
|
8077
8088
|
|
8078
8089
|
// src/business-calendar/schema.ts
|
8079
|
-
import
|
8080
|
-
var TimeSlotDataSchema2 =
|
8090
|
+
import z103 from "zod";
|
8091
|
+
var TimeSlotDataSchema2 = z103.any();
|
8081
8092
|
var BusinessHourSchema = DefaultEntitySchema.extend({
|
8082
|
-
day:
|
8083
|
-
isEnabled:
|
8093
|
+
day: z103.string(),
|
8094
|
+
isEnabled: z103.boolean(),
|
8084
8095
|
timeSlots: TimeSlotDataSchema2
|
8085
8096
|
});
|
8086
8097
|
var HolidaySchema = DefaultEntitySchema.extend({
|
8087
|
-
name:
|
8088
|
-
date:
|
8089
|
-
isEnabled:
|
8090
|
-
isDefault:
|
8098
|
+
name: z103.string(),
|
8099
|
+
date: z103.string(),
|
8100
|
+
isEnabled: z103.boolean(),
|
8101
|
+
isDefault: z103.boolean()
|
8091
8102
|
});
|
8092
8103
|
var BusinessCalendarSchema = DefaultEntitySchema.extend({
|
8093
|
-
name:
|
8094
|
-
description:
|
8095
|
-
timeZone:
|
8096
|
-
isEnabled:
|
8097
|
-
isDefault:
|
8104
|
+
name: z103.string(),
|
8105
|
+
description: z103.string().optional(),
|
8106
|
+
timeZone: z103.string(),
|
8107
|
+
isEnabled: z103.boolean(),
|
8108
|
+
isDefault: z103.boolean(),
|
8098
8109
|
businessHours: BusinessHourSchema.array(),
|
8099
8110
|
holidays: HolidaySchema.array()
|
8100
8111
|
});
|
8101
8112
|
|
8102
8113
|
// src/business-calendar/index.ts
|
8103
|
-
import
|
8114
|
+
import z104 from "zod";
|
8104
8115
|
var businessCalendarContract = initContract36().router(
|
8105
8116
|
{
|
8106
8117
|
createBusinessCalendar: {
|
@@ -8127,7 +8138,7 @@ var businessCalendarContract = initContract36().router(
|
|
8127
8138
|
updateBusinessCalendar: {
|
8128
8139
|
method: "POST",
|
8129
8140
|
path: "/:id",
|
8130
|
-
pathParams:
|
8141
|
+
pathParams: z104.object({ id: z104.string() }),
|
8131
8142
|
body: UpdateBusinessCalendarSchema,
|
8132
8143
|
responses: {
|
8133
8144
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -8139,7 +8150,7 @@ var businessCalendarContract = initContract36().router(
|
|
8139
8150
|
deleteBusinessCalendar: {
|
8140
8151
|
method: "DELETE",
|
8141
8152
|
path: "/:id",
|
8142
|
-
pathParams:
|
8153
|
+
pathParams: z104.object({ id: z104.string() }),
|
8143
8154
|
body: null,
|
8144
8155
|
responses: {
|
8145
8156
|
200: DefaultSuccessResponseSchema,
|
@@ -8156,73 +8167,73 @@ var businessCalendarContract = initContract36().router(
|
|
8156
8167
|
import { initContract as initContract37 } from "@ts-rest/core";
|
8157
8168
|
|
8158
8169
|
// src/facebook-feed/validation.ts
|
8159
|
-
import
|
8160
|
-
var GetFacebookPagesSchema2 =
|
8161
|
-
data:
|
8162
|
-
|
8170
|
+
import z105 from "zod";
|
8171
|
+
var GetFacebookPagesSchema2 = z105.object({
|
8172
|
+
data: z105.array(
|
8173
|
+
z105.object({
|
8163
8174
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
8164
|
-
access_token:
|
8165
|
-
category:
|
8175
|
+
access_token: z105.string(),
|
8176
|
+
category: z105.string(),
|
8166
8177
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
8167
|
-
category_list:
|
8168
|
-
|
8169
|
-
id:
|
8170
|
-
name:
|
8178
|
+
category_list: z105.array(
|
8179
|
+
z105.object({
|
8180
|
+
id: z105.string(),
|
8181
|
+
name: z105.string()
|
8171
8182
|
})
|
8172
8183
|
),
|
8173
|
-
id:
|
8174
|
-
name:
|
8175
|
-
tasks:
|
8184
|
+
id: z105.string(),
|
8185
|
+
name: z105.string(),
|
8186
|
+
tasks: z105.string().array()
|
8176
8187
|
})
|
8177
8188
|
),
|
8178
|
-
paging:
|
8179
|
-
cursors:
|
8180
|
-
before:
|
8181
|
-
after:
|
8189
|
+
paging: z105.object({
|
8190
|
+
cursors: z105.object({
|
8191
|
+
before: z105.string().optional(),
|
8192
|
+
after: z105.string().optional()
|
8182
8193
|
})
|
8183
8194
|
}).optional()
|
8184
8195
|
});
|
8185
|
-
var GetFacebookPagesQuerySchema2 =
|
8186
|
-
accessToken:
|
8187
|
-
userId:
|
8196
|
+
var GetFacebookPagesQuerySchema2 = z105.object({
|
8197
|
+
accessToken: z105.string(),
|
8198
|
+
userId: z105.string()
|
8188
8199
|
});
|
8189
8200
|
var ReconnectFacebookFeedSchema = ChannelSchema.merge(
|
8190
|
-
|
8191
|
-
isReloginRequired:
|
8192
|
-
platformContacts:
|
8193
|
-
id:
|
8194
|
-
name:
|
8195
|
-
createdAt:
|
8196
|
-
updatedAt:
|
8197
|
-
deletedAt:
|
8201
|
+
z105.object({
|
8202
|
+
isReloginRequired: z105.boolean(),
|
8203
|
+
platformContacts: z105.array(PlatformContactSchema),
|
8204
|
+
id: z105.string().uuid(),
|
8205
|
+
name: z105.string(),
|
8206
|
+
createdAt: z105.date(),
|
8207
|
+
updatedAt: z105.date(),
|
8208
|
+
deletedAt: z105.date().nullable()
|
8198
8209
|
})
|
8199
8210
|
);
|
8200
|
-
var GetFeedPostResponseSchema =
|
8201
|
-
id:
|
8202
|
-
message:
|
8203
|
-
created_time:
|
8204
|
-
can_reply_privately:
|
8205
|
-
from:
|
8206
|
-
permalink_url:
|
8207
|
-
attachments:
|
8208
|
-
data:
|
8209
|
-
|
8210
|
-
media:
|
8211
|
-
image:
|
8212
|
-
height:
|
8213
|
-
src:
|
8214
|
-
width:
|
8211
|
+
var GetFeedPostResponseSchema = z105.object({
|
8212
|
+
id: z105.string(),
|
8213
|
+
message: z105.string(),
|
8214
|
+
created_time: z105.string(),
|
8215
|
+
can_reply_privately: z105.boolean(),
|
8216
|
+
from: z105.object({ name: z105.string(), id: z105.string() }),
|
8217
|
+
permalink_url: z105.string(),
|
8218
|
+
attachments: z105.object({
|
8219
|
+
data: z105.array(
|
8220
|
+
z105.object({
|
8221
|
+
media: z105.object({
|
8222
|
+
image: z105.object({
|
8223
|
+
height: z105.number(),
|
8224
|
+
src: z105.string(),
|
8225
|
+
width: z105.number()
|
8215
8226
|
})
|
8216
8227
|
}),
|
8217
|
-
media_type:
|
8218
|
-
url:
|
8228
|
+
media_type: z105.string(),
|
8229
|
+
url: z105.string()
|
8219
8230
|
})
|
8220
8231
|
)
|
8221
8232
|
})
|
8222
8233
|
});
|
8223
8234
|
|
8224
8235
|
// src/facebook-feed/index.ts
|
8225
|
-
import
|
8236
|
+
import z106 from "zod";
|
8226
8237
|
var facebookFeedContract = initContract37().router({
|
8227
8238
|
connectToService: {
|
8228
8239
|
method: "POST",
|
@@ -8247,8 +8258,8 @@ var facebookFeedContract = initContract37().router({
|
|
8247
8258
|
reconnect: {
|
8248
8259
|
method: "POST",
|
8249
8260
|
path: "/reconnect/:channelId",
|
8250
|
-
pathParams:
|
8251
|
-
channelId:
|
8261
|
+
pathParams: z106.object({
|
8262
|
+
channelId: z106.string().uuid()
|
8252
8263
|
}),
|
8253
8264
|
body: null,
|
8254
8265
|
responses: {
|
@@ -8260,8 +8271,8 @@ var facebookFeedContract = initContract37().router({
|
|
8260
8271
|
delete: {
|
8261
8272
|
method: "DELETE",
|
8262
8273
|
path: "/delete/:channelId",
|
8263
|
-
pathParams:
|
8264
|
-
channelId:
|
8274
|
+
pathParams: z106.object({
|
8275
|
+
channelId: z106.string().uuid()
|
8265
8276
|
}),
|
8266
8277
|
body: null,
|
8267
8278
|
responses: {
|
@@ -8313,168 +8324,168 @@ var facebookFeedContract = initContract37().router({
|
|
8313
8324
|
|
8314
8325
|
// src/public-api/index.ts
|
8315
8326
|
import { initContract as initContract38 } from "@ts-rest/core";
|
8316
|
-
import
|
8327
|
+
import z109 from "zod";
|
8317
8328
|
|
8318
8329
|
// src/public-api/validation.ts
|
8319
|
-
import
|
8330
|
+
import z108 from "zod";
|
8320
8331
|
|
8321
8332
|
// src/public-api/schema.ts
|
8322
|
-
import
|
8323
|
-
var ContactPhonesSchema2 =
|
8324
|
-
id:
|
8325
|
-
createdAt:
|
8326
|
-
updatedAt:
|
8327
|
-
deletedAt:
|
8328
|
-
phone:
|
8329
|
-
isPrimary:
|
8330
|
-
});
|
8331
|
-
var ContactEmailsSchema2 =
|
8332
|
-
id:
|
8333
|
-
createdAt:
|
8334
|
-
updatedAt:
|
8335
|
-
deletedAt:
|
8336
|
-
email:
|
8337
|
-
isPrimary:
|
8338
|
-
});
|
8339
|
-
var ContactCustomFieldSchema2 =
|
8340
|
-
id:
|
8341
|
-
createdAt:
|
8342
|
-
updatedAt:
|
8343
|
-
deletedAt:
|
8344
|
-
textValue:
|
8345
|
-
booleanValue:
|
8346
|
-
numberValue:
|
8347
|
-
dateValue:
|
8333
|
+
import z107 from "zod";
|
8334
|
+
var ContactPhonesSchema2 = z107.object({
|
8335
|
+
id: z107.string().uuid(),
|
8336
|
+
createdAt: z107.date(),
|
8337
|
+
updatedAt: z107.date(),
|
8338
|
+
deletedAt: z107.date().nullable(),
|
8339
|
+
phone: z107.string(),
|
8340
|
+
isPrimary: z107.boolean()
|
8341
|
+
});
|
8342
|
+
var ContactEmailsSchema2 = z107.object({
|
8343
|
+
id: z107.string().uuid(),
|
8344
|
+
createdAt: z107.date(),
|
8345
|
+
updatedAt: z107.date(),
|
8346
|
+
deletedAt: z107.date().nullable(),
|
8347
|
+
email: z107.string(),
|
8348
|
+
isPrimary: z107.boolean()
|
8349
|
+
});
|
8350
|
+
var ContactCustomFieldSchema2 = z107.object({
|
8351
|
+
id: z107.string().uuid(),
|
8352
|
+
createdAt: z107.date(),
|
8353
|
+
updatedAt: z107.date(),
|
8354
|
+
deletedAt: z107.date().nullable(),
|
8355
|
+
textValue: z107.string().nullable(),
|
8356
|
+
booleanValue: z107.boolean().nullable(),
|
8357
|
+
numberValue: z107.number().nullable(),
|
8358
|
+
dateValue: z107.date().nullable(),
|
8348
8359
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
8349
|
-
uploads:
|
8350
|
-
});
|
8351
|
-
var ContactEntityTypesSchema2 =
|
8352
|
-
id:
|
8353
|
-
createdAt:
|
8354
|
-
updatedAt:
|
8355
|
-
deletedAt:
|
8356
|
-
entity:
|
8357
|
-
description:
|
8358
|
-
});
|
8359
|
-
var ContactActivitySchema2 =
|
8360
|
-
id:
|
8361
|
-
createdAt:
|
8362
|
-
updatedAt:
|
8363
|
-
deletedAt:
|
8364
|
-
entityId:
|
8365
|
-
description:
|
8360
|
+
uploads: z107.array(UploadSchema)
|
8361
|
+
});
|
8362
|
+
var ContactEntityTypesSchema2 = z107.object({
|
8363
|
+
id: z107.string().uuid(),
|
8364
|
+
createdAt: z107.date(),
|
8365
|
+
updatedAt: z107.date(),
|
8366
|
+
deletedAt: z107.date().nullable(),
|
8367
|
+
entity: z107.string(),
|
8368
|
+
description: z107.string().nullable()
|
8369
|
+
});
|
8370
|
+
var ContactActivitySchema2 = z107.object({
|
8371
|
+
id: z107.string().uuid(),
|
8372
|
+
createdAt: z107.date(),
|
8373
|
+
updatedAt: z107.date(),
|
8374
|
+
deletedAt: z107.date().nullable(),
|
8375
|
+
entityId: z107.string(),
|
8376
|
+
description: z107.string(),
|
8366
8377
|
entityType: ContactEntityTypesSchema2
|
8367
8378
|
});
|
8368
|
-
var ContactSchema2 =
|
8369
|
-
id:
|
8370
|
-
createdAt:
|
8371
|
-
updatedAt:
|
8372
|
-
deletedAt:
|
8373
|
-
name:
|
8374
|
-
address:
|
8375
|
-
channel:
|
8376
|
-
notes:
|
8377
|
-
contactProfile:
|
8378
|
-
socialProfileUrl:
|
8379
|
-
tags:
|
8379
|
+
var ContactSchema2 = z107.object({
|
8380
|
+
id: z107.string().uuid(),
|
8381
|
+
createdAt: z107.date(),
|
8382
|
+
updatedAt: z107.date(),
|
8383
|
+
deletedAt: z107.date().nullable(),
|
8384
|
+
name: z107.string(),
|
8385
|
+
address: z107.string().nullable(),
|
8386
|
+
channel: z107.string().nullable(),
|
8387
|
+
notes: z107.string().nullable(),
|
8388
|
+
contactProfile: z107.string().nullable(),
|
8389
|
+
socialProfileUrl: z107.string().nullable(),
|
8390
|
+
tags: z107.array(TagSchema),
|
8380
8391
|
company: CompanySchema.omit({ customFields: true }).nullable(),
|
8381
|
-
customFields:
|
8382
|
-
contactEmails:
|
8383
|
-
contactPhones:
|
8384
|
-
activityLogs:
|
8392
|
+
customFields: z107.array(ContactCustomFieldSchema2),
|
8393
|
+
contactEmails: z107.array(ContactEmailsSchema2),
|
8394
|
+
contactPhones: z107.array(ContactPhonesSchema2),
|
8395
|
+
activityLogs: z107.array(ContactActivitySchema2).optional()
|
8385
8396
|
});
|
8386
8397
|
|
8387
8398
|
// src/public-api/validation.ts
|
8388
8399
|
var ContactContractValidationSchema2 = {
|
8389
8400
|
create: {
|
8390
|
-
request:
|
8391
|
-
name:
|
8392
|
-
email:
|
8393
|
-
|
8394
|
-
email:
|
8395
|
-
isPrimary:
|
8401
|
+
request: z108.object({
|
8402
|
+
name: z108.string(),
|
8403
|
+
email: z108.array(
|
8404
|
+
z108.object({
|
8405
|
+
email: z108.string().email(),
|
8406
|
+
isPrimary: z108.boolean()
|
8396
8407
|
})
|
8397
8408
|
).optional(),
|
8398
|
-
channel:
|
8399
|
-
address:
|
8400
|
-
phone:
|
8401
|
-
|
8402
|
-
phone:
|
8403
|
-
isPrimary:
|
8409
|
+
channel: z108.string().optional(),
|
8410
|
+
address: z108.string().optional(),
|
8411
|
+
phone: z108.array(
|
8412
|
+
z108.object({
|
8413
|
+
phone: z108.string(),
|
8414
|
+
isPrimary: z108.boolean()
|
8404
8415
|
})
|
8405
8416
|
).optional(),
|
8406
|
-
notes:
|
8407
|
-
tags:
|
8408
|
-
company:
|
8409
|
-
customFields:
|
8417
|
+
notes: z108.string().optional(),
|
8418
|
+
tags: z108.array(z108.string()).optional(),
|
8419
|
+
company: z108.string().optional(),
|
8420
|
+
customFields: z108.record(z108.string())
|
8410
8421
|
// Dynamic keys with string values
|
8411
8422
|
}),
|
8412
8423
|
response: ContactSchema2
|
8413
8424
|
},
|
8414
8425
|
getById: {
|
8415
|
-
request:
|
8416
|
-
id:
|
8426
|
+
request: z108.object({
|
8427
|
+
id: z108.string().uuid()
|
8417
8428
|
})
|
8418
8429
|
},
|
8419
8430
|
delete: {
|
8420
|
-
request:
|
8421
|
-
id:
|
8431
|
+
request: z108.object({
|
8432
|
+
id: z108.string().uuid()
|
8422
8433
|
})
|
8423
8434
|
},
|
8424
8435
|
getAll: {
|
8425
|
-
request:
|
8426
|
-
page:
|
8427
|
-
pageSize:
|
8428
|
-
keyword:
|
8429
|
-
company:
|
8430
|
-
name:
|
8431
|
-
address:
|
8432
|
-
channel:
|
8433
|
-
selectedDate:
|
8434
|
-
customFields:
|
8435
|
-
|
8436
|
-
attributeId:
|
8437
|
-
type:
|
8438
|
-
value:
|
8436
|
+
request: z108.object({
|
8437
|
+
page: z108.coerce.number().default(1),
|
8438
|
+
pageSize: z108.coerce.number().default(10),
|
8439
|
+
keyword: z108.string().optional(),
|
8440
|
+
company: z108.array(z108.string().uuid()),
|
8441
|
+
name: z108.string(),
|
8442
|
+
address: z108.string(),
|
8443
|
+
channel: z108.array(z108.string()),
|
8444
|
+
selectedDate: z108.string(),
|
8445
|
+
customFields: z108.array(
|
8446
|
+
z108.object({
|
8447
|
+
attributeId: z108.string().uuid(),
|
8448
|
+
type: z108.string(),
|
8449
|
+
value: z108.union([z108.string(), z108.array(z108.string())])
|
8439
8450
|
})
|
8440
8451
|
),
|
8441
|
-
tags:
|
8442
|
-
phone:
|
8443
|
-
email:
|
8444
|
-
notes:
|
8452
|
+
tags: z108.array(z108.string().uuid()),
|
8453
|
+
phone: z108.string(),
|
8454
|
+
email: z108.string(),
|
8455
|
+
notes: z108.string()
|
8445
8456
|
}).partial(),
|
8446
8457
|
response: {
|
8447
|
-
page:
|
8448
|
-
pageSize:
|
8449
|
-
total:
|
8450
|
-
lastPage:
|
8451
|
-
data:
|
8458
|
+
page: z108.number(),
|
8459
|
+
pageSize: z108.number(),
|
8460
|
+
total: z108.number(),
|
8461
|
+
lastPage: z108.number(),
|
8462
|
+
data: z108.array(ContactSchema2)
|
8452
8463
|
}
|
8453
8464
|
},
|
8454
8465
|
getContactFields: {
|
8455
|
-
request:
|
8456
|
-
page:
|
8457
|
-
pageSize:
|
8466
|
+
request: z108.object({
|
8467
|
+
page: z108.coerce.number().default(1),
|
8468
|
+
pageSize: z108.coerce.number().default(10)
|
8458
8469
|
}).partial(),
|
8459
8470
|
response: {
|
8460
|
-
page:
|
8461
|
-
pageSize:
|
8462
|
-
total:
|
8463
|
-
lastPage:
|
8464
|
-
data:
|
8471
|
+
page: z108.number(),
|
8472
|
+
pageSize: z108.number(),
|
8473
|
+
total: z108.number(),
|
8474
|
+
lastPage: z108.number(),
|
8475
|
+
data: z108.array(ContactCustomFieldSchema2)
|
8465
8476
|
}
|
8466
8477
|
},
|
8467
8478
|
addAttachments: {
|
8468
|
-
request:
|
8469
|
-
contactId:
|
8470
|
-
attributeId:
|
8471
|
-
contactAttachmentRecords:
|
8472
|
-
|
8473
|
-
bucketName:
|
8474
|
-
fileKey:
|
8475
|
-
fileName:
|
8476
|
-
fileSize:
|
8477
|
-
url:
|
8479
|
+
request: z108.object({
|
8480
|
+
contactId: z108.string(),
|
8481
|
+
attributeId: z108.string().uuid(),
|
8482
|
+
contactAttachmentRecords: z108.array(
|
8483
|
+
z108.object({
|
8484
|
+
bucketName: z108.string(),
|
8485
|
+
fileKey: z108.string(),
|
8486
|
+
fileName: z108.string(),
|
8487
|
+
fileSize: z108.coerce.number(),
|
8488
|
+
url: z108.string()
|
8478
8489
|
})
|
8479
8490
|
)
|
8480
8491
|
}),
|
@@ -8493,11 +8504,11 @@ var publicApiContract = initContract38().router(
|
|
8493
8504
|
201: DefaultSuccessResponseSchema.extend({
|
8494
8505
|
data: ContactSchema2
|
8495
8506
|
}),
|
8496
|
-
400:
|
8497
|
-
message:
|
8507
|
+
400: z109.object({
|
8508
|
+
message: z109.string()
|
8498
8509
|
}),
|
8499
|
-
409:
|
8500
|
-
message:
|
8510
|
+
409: z109.object({
|
8511
|
+
message: z109.string()
|
8501
8512
|
}),
|
8502
8513
|
401: DefaultUnauthorizedSchema,
|
8503
8514
|
404: DefaultNotFoundSchema,
|
@@ -8512,13 +8523,13 @@ var publicApiContract = initContract38().router(
|
|
8512
8523
|
query: GetTagsSchema,
|
8513
8524
|
responses: {
|
8514
8525
|
200: DefaultSuccessResponseSchema.extend({
|
8515
|
-
tags:
|
8526
|
+
tags: z109.array(TagSchema)
|
8516
8527
|
}),
|
8517
|
-
400:
|
8518
|
-
message:
|
8528
|
+
400: z109.object({
|
8529
|
+
message: z109.string()
|
8519
8530
|
}),
|
8520
|
-
409:
|
8521
|
-
message:
|
8531
|
+
409: z109.object({
|
8532
|
+
message: z109.string()
|
8522
8533
|
}),
|
8523
8534
|
401: DefaultUnauthorizedSchema,
|
8524
8535
|
404: DefaultNotFoundSchema,
|
@@ -8534,11 +8545,11 @@ var publicApiContract = initContract38().router(
|
|
8534
8545
|
200: DefaultSuccessResponseSchema.extend(
|
8535
8546
|
ContactContractValidationSchema2.getAll.response
|
8536
8547
|
),
|
8537
|
-
400:
|
8538
|
-
message:
|
8548
|
+
400: z109.object({
|
8549
|
+
message: z109.string()
|
8539
8550
|
}),
|
8540
|
-
409:
|
8541
|
-
message:
|
8551
|
+
409: z109.object({
|
8552
|
+
message: z109.string()
|
8542
8553
|
}),
|
8543
8554
|
401: DefaultUnauthorizedSchema,
|
8544
8555
|
404: DefaultNotFoundSchema,
|
@@ -8555,11 +8566,11 @@ var publicApiContract = initContract38().router(
|
|
8555
8566
|
200: DefaultSuccessResponseSchema.extend(
|
8556
8567
|
ContactContractValidationSchema2.getContactFields.response
|
8557
8568
|
),
|
8558
|
-
400:
|
8559
|
-
message:
|
8569
|
+
400: z109.object({
|
8570
|
+
message: z109.string()
|
8560
8571
|
}),
|
8561
|
-
409:
|
8562
|
-
message:
|
8572
|
+
409: z109.object({
|
8573
|
+
message: z109.string()
|
8563
8574
|
}),
|
8564
8575
|
401: DefaultUnauthorizedSchema,
|
8565
8576
|
404: DefaultNotFoundSchema,
|
@@ -8573,17 +8584,17 @@ var publicApiContract = initContract38().router(
|
|
8573
8584
|
path: "/contacts/:id",
|
8574
8585
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8575
8586
|
responses: {
|
8576
|
-
200:
|
8577
|
-
status:
|
8578
|
-
message:
|
8587
|
+
200: z109.object({
|
8588
|
+
status: z109.string(),
|
8589
|
+
message: z109.string(),
|
8579
8590
|
data: ContactSchema2,
|
8580
|
-
requestId:
|
8591
|
+
requestId: z109.string()
|
8581
8592
|
}),
|
8582
|
-
400:
|
8583
|
-
message:
|
8593
|
+
400: z109.object({
|
8594
|
+
message: z109.string()
|
8584
8595
|
}),
|
8585
|
-
409:
|
8586
|
-
message:
|
8596
|
+
409: z109.object({
|
8597
|
+
message: z109.string()
|
8587
8598
|
}),
|
8588
8599
|
401: DefaultUnauthorizedSchema,
|
8589
8600
|
404: DefaultNotFoundSchema,
|
@@ -8601,11 +8612,11 @@ var publicApiContract = initContract38().router(
|
|
8601
8612
|
201: DefaultSuccessResponseSchema.extend({
|
8602
8613
|
message: ContactCustomFieldSchema2
|
8603
8614
|
}),
|
8604
|
-
400:
|
8605
|
-
message:
|
8615
|
+
400: z109.object({
|
8616
|
+
message: z109.string()
|
8606
8617
|
}),
|
8607
|
-
409:
|
8608
|
-
message:
|
8618
|
+
409: z109.object({
|
8619
|
+
message: z109.string()
|
8609
8620
|
}),
|
8610
8621
|
401: DefaultUnauthorizedSchema,
|
8611
8622
|
404: DefaultNotFoundSchema,
|
@@ -8619,17 +8630,17 @@ var publicApiContract = initContract38().router(
|
|
8619
8630
|
path: "/contacts/:id",
|
8620
8631
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8621
8632
|
responses: {
|
8622
|
-
200:
|
8623
|
-
status:
|
8624
|
-
message:
|
8633
|
+
200: z109.object({
|
8634
|
+
status: z109.string(),
|
8635
|
+
message: z109.string(),
|
8625
8636
|
data: ContactSchema2,
|
8626
|
-
requestId:
|
8637
|
+
requestId: z109.string()
|
8627
8638
|
}),
|
8628
|
-
400:
|
8629
|
-
message:
|
8639
|
+
400: z109.object({
|
8640
|
+
message: z109.string()
|
8630
8641
|
}),
|
8631
|
-
409:
|
8632
|
-
message:
|
8642
|
+
409: z109.object({
|
8643
|
+
message: z109.string()
|
8633
8644
|
}),
|
8634
8645
|
401: DefaultUnauthorizedSchema,
|
8635
8646
|
404: DefaultNotFoundSchema,
|
@@ -8643,17 +8654,17 @@ var publicApiContract = initContract38().router(
|
|
8643
8654
|
path: "/contacts/:id",
|
8644
8655
|
pathParams: ContactContractValidationSchema2.delete.request,
|
8645
8656
|
responses: {
|
8646
|
-
200:
|
8647
|
-
status:
|
8648
|
-
message:
|
8657
|
+
200: z109.object({
|
8658
|
+
status: z109.string(),
|
8659
|
+
message: z109.string(),
|
8649
8660
|
data: ContactSchema2,
|
8650
|
-
requestId:
|
8661
|
+
requestId: z109.string()
|
8651
8662
|
}),
|
8652
|
-
400:
|
8653
|
-
message:
|
8663
|
+
400: z109.object({
|
8664
|
+
message: z109.string()
|
8654
8665
|
}),
|
8655
|
-
409:
|
8656
|
-
message:
|
8666
|
+
409: z109.object({
|
8667
|
+
message: z109.string()
|
8657
8668
|
}),
|
8658
8669
|
401: DefaultUnauthorizedSchema,
|
8659
8670
|
404: DefaultNotFoundSchema,
|
@@ -8671,17 +8682,17 @@ var publicApiContract = initContract38().router(
|
|
8671
8682
|
|
8672
8683
|
// src/workflow-rule/index.ts
|
8673
8684
|
import { initContract as initContract39 } from "@ts-rest/core";
|
8674
|
-
import
|
8685
|
+
import z110 from "zod";
|
8675
8686
|
var chatContract = initContract39().router(
|
8676
8687
|
{
|
8677
8688
|
updateAssignee: {
|
8678
8689
|
method: "POST",
|
8679
8690
|
path: "/room/assignee",
|
8680
|
-
body:
|
8681
|
-
assigneeId:
|
8682
|
-
roomId:
|
8683
|
-
workflowId:
|
8684
|
-
queueId:
|
8691
|
+
body: z110.object({
|
8692
|
+
assigneeId: z110.string().uuid().optional(),
|
8693
|
+
roomId: z110.string().uuid(),
|
8694
|
+
workflowId: z110.string().uuid(),
|
8695
|
+
queueId: z110.string().uuid().optional()
|
8685
8696
|
}),
|
8686
8697
|
responses: {
|
8687
8698
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -8695,9 +8706,9 @@ var chatContract = initContract39().router(
|
|
8695
8706
|
autoReply: {
|
8696
8707
|
method: "POST",
|
8697
8708
|
path: "/message/send",
|
8698
|
-
body:
|
8699
|
-
roomId:
|
8700
|
-
message:
|
8709
|
+
body: z110.object({
|
8710
|
+
roomId: z110.string().uuid(),
|
8711
|
+
message: z110.string(),
|
8701
8712
|
messageType: WorkflowAutoReplyMessageTypeSchema
|
8702
8713
|
// workflowId: z.string().uuid(),
|
8703
8714
|
}),
|
@@ -8713,15 +8724,15 @@ var chatContract = initContract39().router(
|
|
8713
8724
|
solveRoom: {
|
8714
8725
|
method: "POST",
|
8715
8726
|
path: "/room/solve",
|
8716
|
-
body:
|
8717
|
-
roomId:
|
8718
|
-
disposition:
|
8719
|
-
workflowId:
|
8727
|
+
body: z110.object({
|
8728
|
+
roomId: z110.string(),
|
8729
|
+
disposition: z110.string(),
|
8730
|
+
workflowId: z110.string().uuid()
|
8720
8731
|
}),
|
8721
8732
|
responses: {
|
8722
8733
|
200: DefaultSuccessResponseSchema.extend({
|
8723
8734
|
data: RoomSchema.extend({
|
8724
|
-
solveMessage:
|
8735
|
+
solveMessage: z110.string()
|
8725
8736
|
})
|
8726
8737
|
}),
|
8727
8738
|
409: DefaultErrorResponseSchema
|
@@ -8731,9 +8742,9 @@ var chatContract = initContract39().router(
|
|
8731
8742
|
emitMessage: {
|
8732
8743
|
method: "POST",
|
8733
8744
|
path: "/message/emit",
|
8734
|
-
body:
|
8735
|
-
messageId:
|
8736
|
-
queueId:
|
8745
|
+
body: z110.object({
|
8746
|
+
messageId: z110.string().uuid(),
|
8747
|
+
queueId: z110.string().uuid().optional().nullable()
|
8737
8748
|
}),
|
8738
8749
|
responses: {
|
8739
8750
|
200: DefaultSuccessResponseSchema,
|
@@ -8741,19 +8752,33 @@ var chatContract = initContract39().router(
|
|
8741
8752
|
404: DefaultErrorResponseSchema
|
8742
8753
|
},
|
8743
8754
|
summary: "Get message by ID"
|
8755
|
+
},
|
8756
|
+
tagContact: {
|
8757
|
+
method: "POST",
|
8758
|
+
path: "/contact/tag",
|
8759
|
+
body: z110.object({
|
8760
|
+
contactId: z110.string().uuid(),
|
8761
|
+
tagId: z110.string().uuid()
|
8762
|
+
}),
|
8763
|
+
responses: {
|
8764
|
+
200: DefaultSuccessResponseSchema,
|
8765
|
+
403: DefaultErrorResponseSchema,
|
8766
|
+
404: DefaultErrorResponseSchema
|
8767
|
+
},
|
8768
|
+
summary: "Attach Tag to Contact"
|
8744
8769
|
}
|
8745
8770
|
},
|
8746
8771
|
{
|
8747
|
-
baseHeaders:
|
8748
|
-
"x-tenant":
|
8749
|
-
"x-code":
|
8772
|
+
baseHeaders: z110.object({
|
8773
|
+
"x-tenant": z110.string({ required_error: "Tenant id is required" }),
|
8774
|
+
"x-code": z110.string().uuid().optional()
|
8750
8775
|
}),
|
8751
8776
|
pathPrefix: "chat"
|
8752
8777
|
}
|
8753
8778
|
);
|
8754
8779
|
|
8755
8780
|
// src/botpress/index.ts
|
8756
|
-
import
|
8781
|
+
import z111 from "zod";
|
8757
8782
|
import { initContract as initContract40 } from "@ts-rest/core";
|
8758
8783
|
var botpressContract = initContract40().router(
|
8759
8784
|
{
|
@@ -8772,7 +8797,7 @@ var botpressContract = initContract40().router(
|
|
8772
8797
|
path: "/",
|
8773
8798
|
responses: {
|
8774
8799
|
200: DefaultSuccessResponseSchema.extend({
|
8775
|
-
data:
|
8800
|
+
data: z111.array(BotpressBotSchema)
|
8776
8801
|
}),
|
8777
8802
|
500: DefaultErrorResponseSchema
|
8778
8803
|
}
|
@@ -8809,7 +8834,7 @@ var botContract = initContract40().router(
|
|
8809
8834
|
path: "/",
|
8810
8835
|
responses: {
|
8811
8836
|
200: DefaultSuccessResponseSchema.extend({
|
8812
|
-
data:
|
8837
|
+
data: z111.array(BotpressBotSchema)
|
8813
8838
|
}),
|
8814
8839
|
500: DefaultErrorResponseSchema
|
8815
8840
|
}
|
@@ -8822,17 +8847,17 @@ var botContract = initContract40().router(
|
|
8822
8847
|
|
8823
8848
|
// src/presence-status/index.ts
|
8824
8849
|
import { initContract as initContract41 } from "@ts-rest/core";
|
8825
|
-
import
|
8850
|
+
import z113 from "zod";
|
8826
8851
|
|
8827
8852
|
// src/presence-status/validation.ts
|
8828
|
-
import { z as
|
8829
|
-
var CreatePresenceStatusSchema =
|
8830
|
-
systemName:
|
8831
|
-
displayName:
|
8832
|
-
description:
|
8833
|
-
position:
|
8834
|
-
emoji:
|
8835
|
-
presenceStatusOption:
|
8853
|
+
import { z as z112 } from "zod";
|
8854
|
+
var CreatePresenceStatusSchema = z112.object({
|
8855
|
+
systemName: z112.string(),
|
8856
|
+
displayName: z112.string(),
|
8857
|
+
description: z112.string().optional(),
|
8858
|
+
position: z112.number(),
|
8859
|
+
emoji: z112.string(),
|
8860
|
+
presenceStatusOption: z112.array(TPresenceStatusOption)
|
8836
8861
|
});
|
8837
8862
|
var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
|
8838
8863
|
|
@@ -8843,16 +8868,16 @@ var presenceStatusContract = initContract41().router(
|
|
8843
8868
|
method: "GET",
|
8844
8869
|
path: "",
|
8845
8870
|
headers: DefaultHeaderSchema,
|
8846
|
-
query:
|
8847
|
-
keyword:
|
8871
|
+
query: z113.object({
|
8872
|
+
keyword: z113.string().optional()
|
8848
8873
|
}).optional(),
|
8849
8874
|
responses: {
|
8850
|
-
200:
|
8851
|
-
total:
|
8852
|
-
data:
|
8875
|
+
200: z113.object({
|
8876
|
+
total: z113.number(),
|
8877
|
+
data: z113.array(PresenceStatusSchema)
|
8853
8878
|
}),
|
8854
|
-
400:
|
8855
|
-
message:
|
8879
|
+
400: z113.object({
|
8880
|
+
message: z113.string()
|
8856
8881
|
}),
|
8857
8882
|
401: DefaultUnauthorizedSchema,
|
8858
8883
|
500: DefaultErrorResponseSchema
|
@@ -8864,9 +8889,9 @@ var presenceStatusContract = initContract41().router(
|
|
8864
8889
|
path: "/ps/user-presence-status",
|
8865
8890
|
headers: DefaultHeaderSchema,
|
8866
8891
|
responses: {
|
8867
|
-
200:
|
8868
|
-
400:
|
8869
|
-
message:
|
8892
|
+
200: z113.array(UserPresenceStatusSchema),
|
8893
|
+
400: z113.object({
|
8894
|
+
message: z113.string()
|
8870
8895
|
}),
|
8871
8896
|
401: DefaultUnauthorizedSchema,
|
8872
8897
|
500: DefaultErrorResponseSchema
|
@@ -8882,8 +8907,8 @@ var presenceStatusContract = initContract41().router(
|
|
8882
8907
|
201: DefaultSuccessResponseSchema.extend({
|
8883
8908
|
presenceStatus: PresenceStatusSchema
|
8884
8909
|
}),
|
8885
|
-
400:
|
8886
|
-
message:
|
8910
|
+
400: z113.object({
|
8911
|
+
message: z113.string()
|
8887
8912
|
}),
|
8888
8913
|
401: DefaultUnauthorizedSchema,
|
8889
8914
|
404: DefaultNotFoundSchema,
|
@@ -8895,12 +8920,12 @@ var presenceStatusContract = initContract41().router(
|
|
8895
8920
|
getPresenceStatusById: {
|
8896
8921
|
method: "GET",
|
8897
8922
|
path: "/:id",
|
8898
|
-
pathParams:
|
8923
|
+
pathParams: z113.object({ id: z113.string() }),
|
8899
8924
|
headers: DefaultHeaderSchema,
|
8900
8925
|
responses: {
|
8901
8926
|
200: PresenceStatusSchema,
|
8902
|
-
400:
|
8903
|
-
message:
|
8927
|
+
400: z113.object({
|
8928
|
+
message: z113.string()
|
8904
8929
|
}),
|
8905
8930
|
401: DefaultUnauthorizedSchema,
|
8906
8931
|
404: DefaultNotFoundSchema,
|
@@ -8912,15 +8937,15 @@ var presenceStatusContract = initContract41().router(
|
|
8912
8937
|
updatePresenceStatus: {
|
8913
8938
|
method: "PATCH",
|
8914
8939
|
path: "/:id",
|
8915
|
-
pathParams:
|
8940
|
+
pathParams: z113.object({ id: z113.string() }),
|
8916
8941
|
headers: DefaultHeaderSchema,
|
8917
8942
|
body: UpdatePresenceStatusSchema,
|
8918
8943
|
responses: {
|
8919
8944
|
201: DefaultSuccessResponseSchema.extend({
|
8920
8945
|
presenceStatus: PresenceStatusSchema
|
8921
8946
|
}),
|
8922
|
-
400:
|
8923
|
-
message:
|
8947
|
+
400: z113.object({
|
8948
|
+
message: z113.string()
|
8924
8949
|
}),
|
8925
8950
|
401: DefaultUnauthorizedSchema,
|
8926
8951
|
404: DefaultNotFoundSchema,
|
@@ -8932,11 +8957,11 @@ var presenceStatusContract = initContract41().router(
|
|
8932
8957
|
deletePresenceStatus: {
|
8933
8958
|
method: "DELETE",
|
8934
8959
|
path: "/:id",
|
8935
|
-
pathParams:
|
8960
|
+
pathParams: z113.object({ id: z113.string() }),
|
8936
8961
|
headers: DefaultHeaderSchema,
|
8937
8962
|
body: null,
|
8938
8963
|
responses: {
|
8939
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
8964
|
+
200: DefaultSuccessResponseSchema.extend({ message: z113.string() }),
|
8940
8965
|
404: DefaultNotFoundSchema,
|
8941
8966
|
422: DefaultUnprocessibleSchema,
|
8942
8967
|
500: DefaultErrorResponseSchema
|
@@ -8949,7 +8974,7 @@ var presenceStatusContract = initContract41().router(
|
|
8949
8974
|
|
8950
8975
|
// src/whatsapp/index.ts
|
8951
8976
|
import { initContract as initContract42 } from "@ts-rest/core";
|
8952
|
-
import
|
8977
|
+
import z114 from "zod";
|
8953
8978
|
var whatsappContract = initContract42().router({
|
8954
8979
|
sendMessage: {
|
8955
8980
|
method: "POST",
|
@@ -8984,11 +9009,11 @@ var whatsappContract = initContract42().router({
|
|
8984
9009
|
reconnect: {
|
8985
9010
|
method: "POST",
|
8986
9011
|
path: "/reconnect/:channelId",
|
8987
|
-
pathParams:
|
8988
|
-
channelId:
|
9012
|
+
pathParams: z114.object({
|
9013
|
+
channelId: z114.string().uuid()
|
8989
9014
|
}),
|
8990
|
-
body:
|
8991
|
-
instanceId:
|
9015
|
+
body: z114.object({
|
9016
|
+
instanceId: z114.string().nullable().optional()
|
8992
9017
|
}),
|
8993
9018
|
responses: {
|
8994
9019
|
200: ChannelServiceResponseSchema,
|
@@ -8999,8 +9024,8 @@ var whatsappContract = initContract42().router({
|
|
8999
9024
|
delete: {
|
9000
9025
|
method: "DELETE",
|
9001
9026
|
path: "/delete/:channelId",
|
9002
|
-
pathParams:
|
9003
|
-
channelId:
|
9027
|
+
pathParams: z114.object({
|
9028
|
+
channelId: z114.string().uuid()
|
9004
9029
|
}),
|
9005
9030
|
body: null,
|
9006
9031
|
responses: {
|
@@ -9042,10 +9067,10 @@ var whatsappContract = initContract42().router({
|
|
9042
9067
|
deleteWaapi: {
|
9043
9068
|
method: "DELETE",
|
9044
9069
|
path: "/mobile/:instanceId",
|
9045
|
-
pathParams:
|
9046
|
-
instanceId:
|
9070
|
+
pathParams: z114.object({
|
9071
|
+
instanceId: z114.string()
|
9047
9072
|
}),
|
9048
|
-
body:
|
9073
|
+
body: z114.any().optional(),
|
9049
9074
|
responses: {
|
9050
9075
|
200: DefaultSuccessResponseSchema,
|
9051
9076
|
500: DefaultErrorResponseSchema,
|
@@ -9066,21 +9091,21 @@ var whatsappContract = initContract42().router({
|
|
9066
9091
|
|
9067
9092
|
// src/invoice/index.ts
|
9068
9093
|
import { initContract as initContract43 } from "@ts-rest/core";
|
9069
|
-
import { z as
|
9094
|
+
import { z as z116 } from "zod";
|
9070
9095
|
|
9071
9096
|
// src/invoice/schema.ts
|
9072
|
-
import
|
9097
|
+
import z115 from "zod";
|
9073
9098
|
var InvoiceSchema = DefaultEntitySchema.extend({
|
9074
|
-
invoiceId:
|
9075
|
-
amountPaid:
|
9076
|
-
billingReason:
|
9077
|
-
collectionMethod:
|
9078
|
-
created:
|
9079
|
-
currency:
|
9080
|
-
hostedInvoiceUrl:
|
9081
|
-
invoicePdf:
|
9082
|
-
number:
|
9083
|
-
paid:
|
9099
|
+
invoiceId: z115.string(),
|
9100
|
+
amountPaid: z115.number(),
|
9101
|
+
billingReason: z115.string(),
|
9102
|
+
collectionMethod: z115.string(),
|
9103
|
+
created: z115.number(),
|
9104
|
+
currency: z115.string(),
|
9105
|
+
hostedInvoiceUrl: z115.string(),
|
9106
|
+
invoicePdf: z115.string(),
|
9107
|
+
number: z115.string(),
|
9108
|
+
paid: z115.boolean()
|
9084
9109
|
});
|
9085
9110
|
|
9086
9111
|
// src/invoice/index.ts
|
@@ -9092,7 +9117,7 @@ var invoiceContract = initContract43().router(
|
|
9092
9117
|
query: null,
|
9093
9118
|
responses: {
|
9094
9119
|
200: DefaultSuccessResponseSchema.extend({
|
9095
|
-
invoices:
|
9120
|
+
invoices: z116.array(InvoiceSchema)
|
9096
9121
|
}),
|
9097
9122
|
500: DefaultErrorResponseSchema
|
9098
9123
|
}
|
@@ -9302,7 +9327,7 @@ var presenceStatusContract2 = initContract44().router({
|
|
9302
9327
|
|
9303
9328
|
// src/general-setting/index.ts
|
9304
9329
|
import { initContract as initContract45 } from "@ts-rest/core";
|
9305
|
-
import
|
9330
|
+
import z117 from "zod";
|
9306
9331
|
var generalSettingContract = initContract45().router(
|
9307
9332
|
{
|
9308
9333
|
autoOpenedContactWidgetId: {
|
@@ -9310,20 +9335,20 @@ var generalSettingContract = initContract45().router(
|
|
9310
9335
|
method: "GET",
|
9311
9336
|
path: "/auto-opened-contact-widget-id",
|
9312
9337
|
responses: {
|
9313
|
-
200:
|
9314
|
-
autoOpenedContactWidgetId:
|
9338
|
+
200: z117.object({
|
9339
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9315
9340
|
})
|
9316
9341
|
}
|
9317
9342
|
},
|
9318
9343
|
updateAutoOpenedContactWidgetId: {
|
9319
9344
|
method: "PATCH",
|
9320
9345
|
path: "/auto-opened-contact-widget-id",
|
9321
|
-
body:
|
9322
|
-
autoOpenedContactWidgetId:
|
9346
|
+
body: z117.object({
|
9347
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9323
9348
|
}),
|
9324
9349
|
responses: {
|
9325
|
-
200:
|
9326
|
-
autoOpenedContactWidgetId:
|
9350
|
+
200: z117.object({
|
9351
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9327
9352
|
})
|
9328
9353
|
}
|
9329
9354
|
}
|
@@ -9336,51 +9361,51 @@ var generalSettingContract = initContract45().router(
|
|
9336
9361
|
|
9337
9362
|
// src/automation-queue/index.ts
|
9338
9363
|
import { initContract as initContract46 } from "@ts-rest/core";
|
9339
|
-
import { z as
|
9364
|
+
import { z as z120 } from "zod";
|
9340
9365
|
|
9341
9366
|
// src/automation-queue/validation.ts
|
9342
|
-
import { z as
|
9343
|
-
var QueueDistributionStrategySchema =
|
9344
|
-
|
9345
|
-
|
9346
|
-
|
9347
|
-
|
9367
|
+
import { z as z118 } from "zod";
|
9368
|
+
var QueueDistributionStrategySchema = z118.union([
|
9369
|
+
z118.literal("round-robin"),
|
9370
|
+
z118.literal("fewest-assignments"),
|
9371
|
+
z118.literal("random"),
|
9372
|
+
z118.literal("notify-all")
|
9348
9373
|
]);
|
9349
|
-
var CreateAutomationQueueSchema =
|
9350
|
-
emoji:
|
9351
|
-
name:
|
9352
|
-
description:
|
9353
|
-
managerIds:
|
9354
|
-
agentIds:
|
9374
|
+
var CreateAutomationQueueSchema = z118.object({
|
9375
|
+
emoji: z118.string().emoji(),
|
9376
|
+
name: z118.string(),
|
9377
|
+
description: z118.string().nullable(),
|
9378
|
+
managerIds: z118.array(z118.string().uuid()).min(1),
|
9379
|
+
agentIds: z118.array(z118.string().uuid()).min(1),
|
9355
9380
|
distributionStrategy: QueueDistributionStrategySchema.nullable(),
|
9356
|
-
maximumAssignPerAgent:
|
9357
|
-
autoAssign:
|
9381
|
+
maximumAssignPerAgent: z118.number().positive().nullable(),
|
9382
|
+
autoAssign: z118.boolean().nullable()
|
9358
9383
|
// ringTimeOut: z.number().positive(),
|
9359
9384
|
// retryInterval: z.number().positive(),
|
9360
9385
|
// queueTimeOut: z.number().positive(),
|
9361
9386
|
// isAssignmentDeniable: z.coerce.boolean(),
|
9362
9387
|
});
|
9363
9388
|
var UpdateAutomationQueueSchema = CreateAutomationQueueSchema;
|
9364
|
-
var CheckHasAssignedRoomSchema =
|
9365
|
-
userId:
|
9366
|
-
queueId:
|
9389
|
+
var CheckHasAssignedRoomSchema = z118.object({
|
9390
|
+
userId: z118.string().uuid().optional(),
|
9391
|
+
queueId: z118.string().uuid().optional()
|
9367
9392
|
});
|
9368
9393
|
|
9369
9394
|
// src/automation-queue/schema.ts
|
9370
|
-
import { z as
|
9395
|
+
import { z as z119 } from "zod";
|
9371
9396
|
var AutomationQueueSchema = DefaultEntitySchema.extend({
|
9372
|
-
emoji:
|
9373
|
-
name:
|
9374
|
-
description:
|
9397
|
+
emoji: z119.string(),
|
9398
|
+
name: z119.string(),
|
9399
|
+
description: z119.string().nullable(),
|
9375
9400
|
distributionStrategy: QueueDistributionStrategySchema,
|
9376
|
-
maximumAssignPerAgent:
|
9401
|
+
maximumAssignPerAgent: z119.number().positive(),
|
9377
9402
|
// ringTimeOut: z.number(),
|
9378
9403
|
// retryInterval: z.number(),
|
9379
9404
|
// queueTimeOut: z.number(),
|
9380
9405
|
// isAssignmentDeniable: z.boolean(),
|
9381
|
-
autoAssign:
|
9382
|
-
managers:
|
9383
|
-
agents:
|
9406
|
+
autoAssign: z119.boolean(),
|
9407
|
+
managers: z119.array(UserSchema),
|
9408
|
+
agents: z119.array(UserSchema)
|
9384
9409
|
});
|
9385
9410
|
|
9386
9411
|
// src/automation-queue/index.ts
|
@@ -9399,8 +9424,8 @@ var automationQueueContract = initContract46().router(
|
|
9399
9424
|
duplicateAutomationQueue: {
|
9400
9425
|
method: "POST",
|
9401
9426
|
path: "/:id/duplicate",
|
9402
|
-
pathParams:
|
9403
|
-
id:
|
9427
|
+
pathParams: z120.object({
|
9428
|
+
id: z120.string().uuid()
|
9404
9429
|
}),
|
9405
9430
|
body: null,
|
9406
9431
|
responses: {
|
@@ -9412,21 +9437,21 @@ var automationQueueContract = initContract46().router(
|
|
9412
9437
|
getAutomationQueues: {
|
9413
9438
|
method: "GET",
|
9414
9439
|
path: "",
|
9415
|
-
query:
|
9416
|
-
userId:
|
9417
|
-
withRelations:
|
9440
|
+
query: z120.object({
|
9441
|
+
userId: z120.string().uuid().optional(),
|
9442
|
+
withRelations: z120.coerce.boolean().default(true).optional()
|
9418
9443
|
}).optional(),
|
9419
9444
|
responses: {
|
9420
9445
|
200: DefaultSuccessResponseSchema.extend({
|
9421
|
-
data:
|
9446
|
+
data: z120.array(AutomationQueueSchema)
|
9422
9447
|
})
|
9423
9448
|
}
|
9424
9449
|
},
|
9425
9450
|
getAutomationQueueById: {
|
9426
9451
|
method: "GET",
|
9427
9452
|
path: "/:id",
|
9428
|
-
pathParams:
|
9429
|
-
id:
|
9453
|
+
pathParams: z120.object({
|
9454
|
+
id: z120.string().uuid()
|
9430
9455
|
}),
|
9431
9456
|
responses: {
|
9432
9457
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9437,8 +9462,8 @@ var automationQueueContract = initContract46().router(
|
|
9437
9462
|
updateAutomationQueue: {
|
9438
9463
|
method: "PATCH",
|
9439
9464
|
path: "/:id",
|
9440
|
-
pathParams:
|
9441
|
-
id:
|
9465
|
+
pathParams: z120.object({
|
9466
|
+
id: z120.string().uuid()
|
9442
9467
|
}),
|
9443
9468
|
body: UpdateAutomationQueueSchema,
|
9444
9469
|
responses: {
|
@@ -9450,13 +9475,13 @@ var automationQueueContract = initContract46().router(
|
|
9450
9475
|
deleteAutomationQueue: {
|
9451
9476
|
method: "DELETE",
|
9452
9477
|
path: "/:id",
|
9453
|
-
pathParams:
|
9454
|
-
id:
|
9478
|
+
pathParams: z120.object({
|
9479
|
+
id: z120.string().uuid()
|
9455
9480
|
}),
|
9456
9481
|
body: null,
|
9457
9482
|
responses: {
|
9458
9483
|
200: DefaultSuccessResponseSchema.extend({
|
9459
|
-
message:
|
9484
|
+
message: z120.string()
|
9460
9485
|
})
|
9461
9486
|
}
|
9462
9487
|
},
|
@@ -9466,8 +9491,8 @@ var automationQueueContract = initContract46().router(
|
|
9466
9491
|
body: CheckHasAssignedRoomSchema,
|
9467
9492
|
responses: {
|
9468
9493
|
200: DefaultSuccessResponseSchema.extend({
|
9469
|
-
data:
|
9470
|
-
hasAssignedRoom:
|
9494
|
+
data: z120.object({
|
9495
|
+
hasAssignedRoom: z120.boolean()
|
9471
9496
|
})
|
9472
9497
|
})
|
9473
9498
|
}
|
@@ -9484,282 +9509,282 @@ import { initContract as initContract51 } from "@ts-rest/core";
|
|
9484
9509
|
|
9485
9510
|
// src/mail/room-contract.ts
|
9486
9511
|
import { initContract as initContract47 } from "@ts-rest/core";
|
9487
|
-
import
|
9512
|
+
import z125 from "zod";
|
9488
9513
|
|
9489
9514
|
// src/mail/schemas/room.schema.ts
|
9490
|
-
import
|
9515
|
+
import z123 from "zod";
|
9491
9516
|
|
9492
9517
|
// src/mail/schemas/account.schema.ts
|
9518
|
+
import z121 from "zod";
|
9519
|
+
var MailServerSchema = z121.object({
|
9520
|
+
id: z121.string(),
|
9521
|
+
createdAt: z121.date(),
|
9522
|
+
updatedAt: z121.date(),
|
9523
|
+
deletedAt: z121.date().nullable(),
|
9524
|
+
name: z121.string(),
|
9525
|
+
smtpHost: z121.string(),
|
9526
|
+
smtpPort: z121.number(),
|
9527
|
+
smtpTlsPort: z121.number(),
|
9528
|
+
useTlsForSmtp: z121.boolean(),
|
9529
|
+
imapHost: z121.string(),
|
9530
|
+
imapPort: z121.number(),
|
9531
|
+
imapTlsPort: z121.number(),
|
9532
|
+
useTlsForImap: z121.boolean()
|
9533
|
+
});
|
9534
|
+
var MailAccountSchema = z121.object({
|
9535
|
+
id: z121.string(),
|
9536
|
+
createdAt: z121.date(),
|
9537
|
+
updatedAt: z121.date(),
|
9538
|
+
deletedAt: z121.date().nullable(),
|
9539
|
+
name: z121.string(),
|
9540
|
+
address: z121.string(),
|
9541
|
+
accountId: z121.string(),
|
9542
|
+
mailServerId: z121.string(),
|
9543
|
+
mailServer: MailServerSchema,
|
9544
|
+
state: z121.union([
|
9545
|
+
z121.literal("init"),
|
9546
|
+
z121.literal("syncing"),
|
9547
|
+
z121.literal("connecting"),
|
9548
|
+
z121.literal("connected"),
|
9549
|
+
z121.literal("disconnected"),
|
9550
|
+
z121.literal("authenticationError"),
|
9551
|
+
z121.literal("connectError"),
|
9552
|
+
z121.literal("unset")
|
9553
|
+
])
|
9554
|
+
});
|
9555
|
+
var OAuth2AppSchema = z121.object({
|
9556
|
+
id: z121.string(),
|
9557
|
+
name: z121.string(),
|
9558
|
+
description: z121.string(),
|
9559
|
+
title: z121.string(),
|
9560
|
+
provider: z121.string(),
|
9561
|
+
enabled: z121.boolean(),
|
9562
|
+
legacy: z121.boolean(),
|
9563
|
+
created: z121.string(),
|
9564
|
+
updated: z121.string(),
|
9565
|
+
includeInListing: z121.boolean(),
|
9566
|
+
clientId: z121.string(),
|
9567
|
+
clientSecret: z121.string(),
|
9568
|
+
authority: z121.string(),
|
9569
|
+
redirectUrl: z121.string(),
|
9570
|
+
serviceClient: z121.string(),
|
9571
|
+
googleProjectId: z121.string(),
|
9572
|
+
serviceClientEmail: z121.string(),
|
9573
|
+
serviceKey: z121.string()
|
9574
|
+
});
|
9575
|
+
|
9576
|
+
// src/mail/schemas/message.schema.ts
|
9493
9577
|
import z122 from "zod";
|
9494
|
-
var
|
9578
|
+
var AttachmentSchema = z122.object({
|
9495
9579
|
id: z122.string(),
|
9496
9580
|
createdAt: z122.date(),
|
9497
9581
|
updatedAt: z122.date(),
|
9498
|
-
deletedAt: z122.
|
9499
|
-
|
9500
|
-
|
9501
|
-
|
9502
|
-
|
9503
|
-
|
9504
|
-
|
9505
|
-
|
9506
|
-
|
9507
|
-
|
9508
|
-
|
9509
|
-
|
9582
|
+
deletedAt: z122.nullable(z122.date()),
|
9583
|
+
roomId: z122.string(),
|
9584
|
+
messageId: z122.string(),
|
9585
|
+
fileName: z122.string(),
|
9586
|
+
fileType: z122.string(),
|
9587
|
+
emailEngineAttachmentId: z122.string(),
|
9588
|
+
uploadId: z122.string(),
|
9589
|
+
upload: z122.object({
|
9590
|
+
id: z122.string(),
|
9591
|
+
createdAt: z122.date(),
|
9592
|
+
updatedAt: z122.date(),
|
9593
|
+
deletedAt: z122.nullable(z122.date()),
|
9594
|
+
bucketName: z122.string(),
|
9595
|
+
fileName: z122.string(),
|
9596
|
+
fileKey: z122.string(),
|
9597
|
+
fileSize: z122.number(),
|
9598
|
+
fileUrl: z122.string(),
|
9599
|
+
extensionName: z122.string()
|
9600
|
+
})
|
9601
|
+
});
|
9602
|
+
var MessageSchema2 = z122.object({
|
9510
9603
|
id: z122.string(),
|
9511
9604
|
createdAt: z122.date(),
|
9512
9605
|
updatedAt: z122.date(),
|
9513
|
-
deletedAt: z122.
|
9514
|
-
|
9515
|
-
|
9516
|
-
|
9517
|
-
|
9518
|
-
|
9519
|
-
|
9520
|
-
|
9521
|
-
|
9522
|
-
|
9523
|
-
|
9524
|
-
|
9525
|
-
|
9526
|
-
|
9527
|
-
|
9528
|
-
|
9529
|
-
|
9530
|
-
|
9531
|
-
|
9532
|
-
|
9533
|
-
|
9534
|
-
title: z122.string(),
|
9535
|
-
provider: z122.string(),
|
9536
|
-
enabled: z122.boolean(),
|
9537
|
-
legacy: z122.boolean(),
|
9538
|
-
created: z122.string(),
|
9539
|
-
updated: z122.string(),
|
9540
|
-
includeInListing: z122.boolean(),
|
9541
|
-
clientId: z122.string(),
|
9542
|
-
clientSecret: z122.string(),
|
9543
|
-
authority: z122.string(),
|
9544
|
-
redirectUrl: z122.string(),
|
9545
|
-
serviceClient: z122.string(),
|
9546
|
-
googleProjectId: z122.string(),
|
9547
|
-
serviceClientEmail: z122.string(),
|
9548
|
-
serviceKey: z122.string()
|
9606
|
+
deletedAt: z122.nullable(z122.date()),
|
9607
|
+
roomId: z122.string(),
|
9608
|
+
subject: z122.string(),
|
9609
|
+
textPlain: z122.string(),
|
9610
|
+
textHtml: z122.string(),
|
9611
|
+
textId: z122.string(),
|
9612
|
+
emailEngineEmailId: z122.string(),
|
9613
|
+
emailEngineMessageId: z122.string(),
|
9614
|
+
emailEngineReplyTo: z122.nullable(z122.string()),
|
9615
|
+
direction: z122.string(),
|
9616
|
+
date: z122.date(),
|
9617
|
+
action: z122.string(),
|
9618
|
+
unseen: z122.boolean(),
|
9619
|
+
sendAt: z122.date(),
|
9620
|
+
starred: z122.boolean(),
|
9621
|
+
seemsLikeNew: z122.boolean(),
|
9622
|
+
from: z122.array(MailParticipant),
|
9623
|
+
to: z122.array(MailParticipant),
|
9624
|
+
cc: z122.array(MailParticipant),
|
9625
|
+
bcc: z122.array(MailParticipant),
|
9626
|
+
attachments: z122.array(AttachmentSchema)
|
9549
9627
|
});
|
9550
9628
|
|
9551
|
-
// src/mail/schemas/
|
9552
|
-
|
9553
|
-
|
9629
|
+
// src/mail/schemas/room.schema.ts
|
9630
|
+
var ContactSchema3 = z123.object({
|
9631
|
+
id: z123.string().uuid(),
|
9632
|
+
createdAt: z123.date(),
|
9633
|
+
updatedAt: z123.date(),
|
9634
|
+
deletedAt: z123.date().nullable(),
|
9635
|
+
name: z123.string(),
|
9636
|
+
address: z123.string().nullable(),
|
9637
|
+
channel: z123.string().nullable(),
|
9638
|
+
notes: z123.string().nullable(),
|
9639
|
+
contactProfile: z123.string().nullable(),
|
9640
|
+
socialProfileUrl: z123.string().nullable()
|
9641
|
+
});
|
9642
|
+
var MailUserSchema = z123.object({
|
9643
|
+
id: z123.string(),
|
9644
|
+
createdAt: z123.date(),
|
9645
|
+
updatedAt: z123.date(),
|
9646
|
+
deletedAt: z123.date().nullable(),
|
9647
|
+
name: z123.string(),
|
9648
|
+
address: z123.string(),
|
9649
|
+
contactId: z123.string(),
|
9650
|
+
contact: ContactSchema3,
|
9651
|
+
isNewContact: z123.boolean()
|
9652
|
+
});
|
9653
|
+
var MailParticipant = z123.object({
|
9554
9654
|
id: z123.string(),
|
9555
9655
|
createdAt: z123.date(),
|
9556
9656
|
updatedAt: z123.date(),
|
9557
|
-
deletedAt: z123.
|
9657
|
+
deletedAt: z123.date().nullable(),
|
9558
9658
|
roomId: z123.string(),
|
9559
9659
|
messageId: z123.string(),
|
9560
|
-
|
9561
|
-
|
9562
|
-
emailEngineAttachmentId: z123.string(),
|
9563
|
-
uploadId: z123.string(),
|
9564
|
-
upload: z123.object({
|
9565
|
-
id: z123.string(),
|
9566
|
-
createdAt: z123.date(),
|
9567
|
-
updatedAt: z123.date(),
|
9568
|
-
deletedAt: z123.nullable(z123.date()),
|
9569
|
-
bucketName: z123.string(),
|
9570
|
-
fileName: z123.string(),
|
9571
|
-
fileKey: z123.string(),
|
9572
|
-
fileSize: z123.number(),
|
9573
|
-
fileUrl: z123.string(),
|
9574
|
-
extensionName: z123.string()
|
9575
|
-
})
|
9660
|
+
mailUserId: z123.string(),
|
9661
|
+
mailUser: MailUserSchema
|
9576
9662
|
});
|
9577
|
-
var
|
9663
|
+
var TagSchema2 = z123.object({
|
9664
|
+
color: z123.string(),
|
9578
9665
|
id: z123.string(),
|
9579
9666
|
createdAt: z123.date(),
|
9580
9667
|
updatedAt: z123.date(),
|
9581
|
-
deletedAt: z123.
|
9668
|
+
deletedAt: z123.date().nullable(),
|
9669
|
+
name: z123.string()
|
9670
|
+
});
|
9671
|
+
var UserModel = z123.object({
|
9672
|
+
id: z123.string().uuid(),
|
9673
|
+
createdAt: z123.date(),
|
9674
|
+
updatedAt: z123.date(),
|
9675
|
+
deletedAt: z123.date().nullable(),
|
9676
|
+
name: z123.string(),
|
9677
|
+
email: z123.string(),
|
9678
|
+
address: z123.string().nullable(),
|
9679
|
+
phone: z123.string().nullable(),
|
9680
|
+
notificationCount: z123.number().nullable()
|
9681
|
+
});
|
9682
|
+
var ActivityLogModel = z123.object({
|
9683
|
+
id: z123.string(),
|
9684
|
+
createdAt: z123.date(),
|
9685
|
+
updatedAt: z123.date(),
|
9686
|
+
deletedAt: z123.nullable(z123.string()),
|
9687
|
+
description: z123.string(),
|
9688
|
+
actorId: z123.string(),
|
9582
9689
|
roomId: z123.string(),
|
9690
|
+
actor: UserModel
|
9691
|
+
});
|
9692
|
+
var MessagesAndLogsSchema = z123.array(
|
9693
|
+
z123.union([MessageSchema2, ActivityLogModel])
|
9694
|
+
);
|
9695
|
+
var MailRoomSchema = z123.object({
|
9696
|
+
id: z123.string(),
|
9697
|
+
createdAt: z123.date(),
|
9698
|
+
updatedAt: z123.date(),
|
9699
|
+
deletedAt: z123.date().nullable(),
|
9583
9700
|
subject: z123.string(),
|
9584
|
-
|
9585
|
-
|
9586
|
-
|
9587
|
-
|
9588
|
-
emailEngineMessageId: z123.string(),
|
9589
|
-
emailEngineReplyTo: z123.nullable(z123.string()),
|
9701
|
+
resolved: z123.boolean(),
|
9702
|
+
assigneeId: z123.string().nullable(),
|
9703
|
+
note: z123.string(),
|
9704
|
+
mailId: z123.string(),
|
9590
9705
|
direction: z123.string(),
|
9591
|
-
|
9592
|
-
|
9593
|
-
unseen: z123.boolean(),
|
9594
|
-
sendAt: z123.date(),
|
9595
|
-
starred: z123.boolean(),
|
9596
|
-
seemsLikeNew: z123.boolean(),
|
9706
|
+
lastMessageId: z123.string(),
|
9707
|
+
firstMessageId: z123.string(),
|
9597
9708
|
from: z123.array(MailParticipant),
|
9598
9709
|
to: z123.array(MailParticipant),
|
9599
9710
|
cc: z123.array(MailParticipant),
|
9600
9711
|
bcc: z123.array(MailParticipant),
|
9601
|
-
attachments: z123.array(AttachmentSchema)
|
9602
|
-
});
|
9603
|
-
|
9604
|
-
// src/mail/schemas/room.schema.ts
|
9605
|
-
var ContactSchema3 = z124.object({
|
9606
|
-
id: z124.string().uuid(),
|
9607
|
-
createdAt: z124.date(),
|
9608
|
-
updatedAt: z124.date(),
|
9609
|
-
deletedAt: z124.date().nullable(),
|
9610
|
-
name: z124.string(),
|
9611
|
-
address: z124.string().nullable(),
|
9612
|
-
channel: z124.string().nullable(),
|
9613
|
-
notes: z124.string().nullable(),
|
9614
|
-
contactProfile: z124.string().nullable(),
|
9615
|
-
socialProfileUrl: z124.string().nullable()
|
9616
|
-
});
|
9617
|
-
var MailUserSchema = z124.object({
|
9618
|
-
id: z124.string(),
|
9619
|
-
createdAt: z124.date(),
|
9620
|
-
updatedAt: z124.date(),
|
9621
|
-
deletedAt: z124.date().nullable(),
|
9622
|
-
name: z124.string(),
|
9623
|
-
address: z124.string(),
|
9624
|
-
contactId: z124.string(),
|
9625
|
-
contact: ContactSchema3,
|
9626
|
-
isNewContact: z124.boolean()
|
9627
|
-
});
|
9628
|
-
var MailParticipant = z124.object({
|
9629
|
-
id: z124.string(),
|
9630
|
-
createdAt: z124.date(),
|
9631
|
-
updatedAt: z124.date(),
|
9632
|
-
deletedAt: z124.date().nullable(),
|
9633
|
-
roomId: z124.string(),
|
9634
|
-
messageId: z124.string(),
|
9635
|
-
mailUserId: z124.string(),
|
9636
|
-
mailUser: MailUserSchema
|
9637
|
-
});
|
9638
|
-
var TagSchema2 = z124.object({
|
9639
|
-
color: z124.string(),
|
9640
|
-
id: z124.string(),
|
9641
|
-
createdAt: z124.date(),
|
9642
|
-
updatedAt: z124.date(),
|
9643
|
-
deletedAt: z124.date().nullable(),
|
9644
|
-
name: z124.string()
|
9645
|
-
});
|
9646
|
-
var UserModel = z124.object({
|
9647
|
-
id: z124.string().uuid(),
|
9648
|
-
createdAt: z124.date(),
|
9649
|
-
updatedAt: z124.date(),
|
9650
|
-
deletedAt: z124.date().nullable(),
|
9651
|
-
name: z124.string(),
|
9652
|
-
email: z124.string(),
|
9653
|
-
address: z124.string().nullable(),
|
9654
|
-
phone: z124.string().nullable(),
|
9655
|
-
notificationCount: z124.number().nullable()
|
9656
|
-
});
|
9657
|
-
var ActivityLogModel = z124.object({
|
9658
|
-
id: z124.string(),
|
9659
|
-
createdAt: z124.date(),
|
9660
|
-
updatedAt: z124.date(),
|
9661
|
-
deletedAt: z124.nullable(z124.string()),
|
9662
|
-
description: z124.string(),
|
9663
|
-
actorId: z124.string(),
|
9664
|
-
roomId: z124.string(),
|
9665
|
-
actor: UserModel
|
9666
|
-
});
|
9667
|
-
var MessagesAndLogsSchema = z124.array(
|
9668
|
-
z124.union([MessageSchema2, ActivityLogModel])
|
9669
|
-
);
|
9670
|
-
var MailRoomSchema = z124.object({
|
9671
|
-
id: z124.string(),
|
9672
|
-
createdAt: z124.date(),
|
9673
|
-
updatedAt: z124.date(),
|
9674
|
-
deletedAt: z124.date().nullable(),
|
9675
|
-
subject: z124.string(),
|
9676
|
-
resolved: z124.boolean(),
|
9677
|
-
assigneeId: z124.string().nullable(),
|
9678
|
-
note: z124.string(),
|
9679
|
-
mailId: z124.string(),
|
9680
|
-
direction: z124.string(),
|
9681
|
-
lastMessageId: z124.string(),
|
9682
|
-
firstMessageId: z124.string(),
|
9683
|
-
from: z124.array(MailParticipant),
|
9684
|
-
to: z124.array(MailParticipant),
|
9685
|
-
cc: z124.array(MailParticipant),
|
9686
|
-
bcc: z124.array(MailParticipant),
|
9687
9712
|
firstMessage: MessageSchema2,
|
9688
9713
|
lastMessage: MessageSchema2,
|
9689
|
-
tags:
|
9714
|
+
tags: z123.array(TagSchema2),
|
9690
9715
|
assignee: UserModel,
|
9691
|
-
messages:
|
9716
|
+
messages: z123.array(MessageSchema2),
|
9692
9717
|
messagesAndLogs: MessagesAndLogsSchema,
|
9693
9718
|
mail: MailAccountSchema,
|
9694
|
-
unReadMessageCount:
|
9719
|
+
unReadMessageCount: z123.number(),
|
9695
9720
|
cxlog: CxLogSchema
|
9696
9721
|
});
|
9697
|
-
var AttachmentSchema2 =
|
9698
|
-
fileName:
|
9699
|
-
fileType:
|
9700
|
-
emailEngineAttachmentId:
|
9701
|
-
uploadId:
|
9702
|
-
messageId:
|
9703
|
-
roomId:
|
9722
|
+
var AttachmentSchema2 = z123.object({
|
9723
|
+
fileName: z123.string(),
|
9724
|
+
fileType: z123.string(),
|
9725
|
+
emailEngineAttachmentId: z123.string(),
|
9726
|
+
uploadId: z123.string(),
|
9727
|
+
messageId: z123.string(),
|
9728
|
+
roomId: z123.string(),
|
9704
9729
|
upload: UploadSchema
|
9705
9730
|
});
|
9706
9731
|
|
9707
9732
|
// src/mail/schemas/room-validation.schema.ts
|
9708
|
-
import
|
9733
|
+
import z124 from "zod";
|
9709
9734
|
var RoomContractsValidationSchema = {
|
9710
9735
|
getAll: {
|
9711
|
-
input:
|
9712
|
-
page:
|
9713
|
-
pageSize:
|
9714
|
-
keyword:
|
9715
|
-
value:
|
9716
|
-
category:
|
9736
|
+
input: z124.object({
|
9737
|
+
page: z124.coerce.number().default(1),
|
9738
|
+
pageSize: z124.coerce.number().default(10),
|
9739
|
+
keyword: z124.object({
|
9740
|
+
value: z124.string(),
|
9741
|
+
category: z124.union([z124.literal("contact"), z124.literal("message")])
|
9717
9742
|
}).optional(),
|
9718
|
-
contactLabels:
|
9719
|
-
channels:
|
9720
|
-
date:
|
9721
|
-
contacts:
|
9722
|
-
assignees:
|
9723
|
-
level1:
|
9724
|
-
|
9725
|
-
|
9726
|
-
|
9727
|
-
|
9728
|
-
|
9729
|
-
|
9743
|
+
contactLabels: z124.array(z124.string()).optional(),
|
9744
|
+
channels: z124.array(z124.string().email()).optional(),
|
9745
|
+
date: z124.string().optional(),
|
9746
|
+
contacts: z124.array(z124.string()).optional(),
|
9747
|
+
assignees: z124.array(z124.string()).optional(),
|
9748
|
+
level1: z124.union([
|
9749
|
+
z124.literal("open"),
|
9750
|
+
z124.literal("close"),
|
9751
|
+
z124.literal("inbox"),
|
9752
|
+
z124.literal("sent"),
|
9753
|
+
z124.literal("scheduled"),
|
9754
|
+
z124.literal("starred")
|
9730
9755
|
]).optional(),
|
9731
|
-
level2:
|
9732
|
-
|
9733
|
-
|
9734
|
-
|
9735
|
-
|
9756
|
+
level2: z124.union([
|
9757
|
+
z124.literal("all"),
|
9758
|
+
z124.literal("unassign"),
|
9759
|
+
z124.literal("mine"),
|
9760
|
+
z124.literal("other")
|
9736
9761
|
]).optional()
|
9737
9762
|
}),
|
9738
|
-
output:
|
9739
|
-
data:
|
9740
|
-
total:
|
9741
|
-
page:
|
9742
|
-
pageSize:
|
9763
|
+
output: z124.object({
|
9764
|
+
data: z124.array(MailRoomSchema),
|
9765
|
+
total: z124.number(),
|
9766
|
+
page: z124.number(),
|
9767
|
+
pageSize: z124.number()
|
9743
9768
|
})
|
9744
9769
|
},
|
9745
9770
|
update: {
|
9746
|
-
input:
|
9747
|
-
disposition:
|
9748
|
-
|
9749
|
-
|
9750
|
-
|
9751
|
-
|
9752
|
-
|
9753
|
-
|
9771
|
+
input: z124.object({
|
9772
|
+
disposition: z124.union([
|
9773
|
+
z124.literal("resolved"),
|
9774
|
+
z124.literal("follow up"),
|
9775
|
+
z124.literal("escalated"),
|
9776
|
+
z124.literal("dropped"),
|
9777
|
+
z124.literal("prank"),
|
9778
|
+
z124.literal("blank")
|
9754
9779
|
]).optional().nullable(),
|
9755
|
-
assigneeId:
|
9756
|
-
note:
|
9757
|
-
tags:
|
9758
|
-
handover:
|
9759
|
-
|
9780
|
+
assigneeId: z124.string().uuid().optional().nullable(),
|
9781
|
+
note: z124.string().optional(),
|
9782
|
+
tags: z124.array(z124.string().uuid()).optional(),
|
9783
|
+
handover: z124.boolean().or(
|
9784
|
+
z124.union([z124.literal("true"), z124.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9760
9785
|
).optional().nullable(),
|
9761
|
-
selfAssign:
|
9762
|
-
|
9786
|
+
selfAssign: z124.boolean().or(
|
9787
|
+
z124.union([z124.literal("true"), z124.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9763
9788
|
).optional().nullable()
|
9764
9789
|
})
|
9765
9790
|
}
|
@@ -9773,7 +9798,7 @@ var roomContract = initContract47().router(
|
|
9773
9798
|
path: "/",
|
9774
9799
|
responses: {
|
9775
9800
|
200: DefaultSuccessResponseSchema.extend({
|
9776
|
-
message:
|
9801
|
+
message: z125.string()
|
9777
9802
|
}),
|
9778
9803
|
...DefaultResponses
|
9779
9804
|
},
|
@@ -9786,10 +9811,10 @@ var roomContract = initContract47().router(
|
|
9786
9811
|
query: RoomContractsValidationSchema.getAll.input,
|
9787
9812
|
responses: {
|
9788
9813
|
200: DefaultSuccessResponseSchema.extend({
|
9789
|
-
data:
|
9790
|
-
total:
|
9791
|
-
page:
|
9792
|
-
pageSize:
|
9814
|
+
data: z125.array(MailRoomSchema),
|
9815
|
+
total: z125.number(),
|
9816
|
+
page: z125.number(),
|
9817
|
+
pageSize: z125.number()
|
9793
9818
|
}),
|
9794
9819
|
...DefaultResponses
|
9795
9820
|
},
|
@@ -9801,24 +9826,24 @@ var roomContract = initContract47().router(
|
|
9801
9826
|
path: "/count_rooms/all",
|
9802
9827
|
responses: {
|
9803
9828
|
200: DefaultSuccessResponseSchema.extend({
|
9804
|
-
data:
|
9805
|
-
general:
|
9806
|
-
|
9807
|
-
name:
|
9808
|
-
count:
|
9809
|
-
unReadMessagesCount:
|
9829
|
+
data: z125.object({
|
9830
|
+
general: z125.array(
|
9831
|
+
z125.object({
|
9832
|
+
name: z125.string(),
|
9833
|
+
count: z125.number(),
|
9834
|
+
unReadMessagesCount: z125.number()
|
9810
9835
|
})
|
9811
9836
|
),
|
9812
|
-
channels:
|
9813
|
-
|
9837
|
+
channels: z125.array(
|
9838
|
+
z125.object({
|
9814
9839
|
channel: MailAccountSchema,
|
9815
|
-
count:
|
9840
|
+
count: z125.number()
|
9816
9841
|
})
|
9817
9842
|
),
|
9818
|
-
contactLabels:
|
9819
|
-
|
9843
|
+
contactLabels: z125.array(
|
9844
|
+
z125.object({
|
9820
9845
|
label: TagSchema,
|
9821
|
-
count:
|
9846
|
+
count: z125.number()
|
9822
9847
|
})
|
9823
9848
|
)
|
9824
9849
|
})
|
@@ -9830,12 +9855,12 @@ var roomContract = initContract47().router(
|
|
9830
9855
|
getAttachments: {
|
9831
9856
|
method: "GET",
|
9832
9857
|
path: "/:id/attachments",
|
9833
|
-
pathParams:
|
9834
|
-
id:
|
9858
|
+
pathParams: z125.object({
|
9859
|
+
id: z125.string().uuid()
|
9835
9860
|
}),
|
9836
9861
|
responses: {
|
9837
9862
|
200: DefaultSuccessResponseSchema.extend({
|
9838
|
-
data:
|
9863
|
+
data: z125.array(AttachmentSchema2)
|
9839
9864
|
}),
|
9840
9865
|
...DefaultResponses
|
9841
9866
|
},
|
@@ -9844,12 +9869,12 @@ var roomContract = initContract47().router(
|
|
9844
9869
|
getParticipants: {
|
9845
9870
|
method: "GET",
|
9846
9871
|
path: "/:id/participants",
|
9847
|
-
pathParams:
|
9848
|
-
id:
|
9872
|
+
pathParams: z125.object({
|
9873
|
+
id: z125.string().uuid()
|
9849
9874
|
}),
|
9850
9875
|
responses: {
|
9851
9876
|
200: DefaultSuccessResponseSchema.extend({
|
9852
|
-
data:
|
9877
|
+
data: z125.array(MailParticipant)
|
9853
9878
|
}),
|
9854
9879
|
...DefaultResponses
|
9855
9880
|
},
|
@@ -9860,22 +9885,22 @@ var roomContract = initContract47().router(
|
|
9860
9885
|
path: "/add_email_to_contact",
|
9861
9886
|
responses: {
|
9862
9887
|
200: DefaultSuccessResponseSchema.extend({
|
9863
|
-
data:
|
9888
|
+
data: z125.string()
|
9864
9889
|
}),
|
9865
9890
|
...DefaultResponses
|
9866
9891
|
},
|
9867
|
-
body:
|
9868
|
-
email:
|
9869
|
-
contactId:
|
9870
|
-
mailUserId:
|
9892
|
+
body: z125.object({
|
9893
|
+
email: z125.string(),
|
9894
|
+
contactId: z125.string(),
|
9895
|
+
mailUserId: z125.string()
|
9871
9896
|
}),
|
9872
9897
|
summary: "Add a new email of a mail room participant to an existing contact"
|
9873
9898
|
},
|
9874
9899
|
update: {
|
9875
9900
|
method: "PATCH",
|
9876
9901
|
path: "/:id",
|
9877
|
-
pathParams:
|
9878
|
-
id:
|
9902
|
+
pathParams: z125.object({
|
9903
|
+
id: z125.string()
|
9879
9904
|
}),
|
9880
9905
|
responses: {
|
9881
9906
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9889,12 +9914,12 @@ var roomContract = initContract47().router(
|
|
9889
9914
|
markAsRead: {
|
9890
9915
|
method: "POST",
|
9891
9916
|
path: "/mark_as_read",
|
9892
|
-
body:
|
9893
|
-
id:
|
9917
|
+
body: z125.object({
|
9918
|
+
id: z125.string()
|
9894
9919
|
}),
|
9895
9920
|
responses: {
|
9896
9921
|
200: DefaultSuccessResponseSchema.extend({
|
9897
|
-
message:
|
9922
|
+
message: z125.string()
|
9898
9923
|
}),
|
9899
9924
|
...DefaultResponses
|
9900
9925
|
},
|
@@ -9903,8 +9928,8 @@ var roomContract = initContract47().router(
|
|
9903
9928
|
getById: {
|
9904
9929
|
method: "GET",
|
9905
9930
|
path: "/:id",
|
9906
|
-
pathParams:
|
9907
|
-
id:
|
9931
|
+
pathParams: z125.object({
|
9932
|
+
id: z125.string().uuid()
|
9908
9933
|
}),
|
9909
9934
|
responses: {
|
9910
9935
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9922,70 +9947,70 @@ var roomContract = initContract47().router(
|
|
9922
9947
|
|
9923
9948
|
// src/mail/account-contract.ts
|
9924
9949
|
import { initContract as initContract48 } from "@ts-rest/core";
|
9925
|
-
import
|
9950
|
+
import z127 from "zod";
|
9926
9951
|
|
9927
9952
|
// src/mail/schemas/account-validation.schema.ts
|
9928
|
-
import
|
9953
|
+
import z126 from "zod";
|
9929
9954
|
var AccountContractsValidationSchemas = {
|
9930
9955
|
create: {
|
9931
|
-
input:
|
9932
|
-
address:
|
9933
|
-
name:
|
9934
|
-
password:
|
9935
|
-
mailServerId:
|
9956
|
+
input: z126.object({
|
9957
|
+
address: z126.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
9958
|
+
name: z126.string().min(1, "Account name cannot be empty."),
|
9959
|
+
password: z126.string().min(1, "Password cannot be empty."),
|
9960
|
+
mailServerId: z126.string().uuid("Invalid mail_server_id")
|
9936
9961
|
})
|
9937
9962
|
},
|
9938
9963
|
getById: {
|
9939
|
-
input:
|
9940
|
-
id:
|
9964
|
+
input: z126.object({
|
9965
|
+
id: z126.string().uuid()
|
9941
9966
|
}),
|
9942
9967
|
output: MailAccountSchema
|
9943
9968
|
},
|
9944
9969
|
getAll: {
|
9945
|
-
output:
|
9970
|
+
output: z126.array(MailAccountSchema)
|
9946
9971
|
},
|
9947
9972
|
update: {
|
9948
9973
|
input: MailAccountSchema,
|
9949
9974
|
output: MailAccountSchema
|
9950
9975
|
},
|
9951
9976
|
disconnect: {
|
9952
|
-
input:
|
9953
|
-
id:
|
9977
|
+
input: z126.object({
|
9978
|
+
id: z126.string().uuid()
|
9954
9979
|
}),
|
9955
9980
|
output: MailAccountSchema
|
9956
9981
|
},
|
9957
9982
|
reconnect: {
|
9958
|
-
input:
|
9959
|
-
id:
|
9983
|
+
input: z126.object({
|
9984
|
+
id: z126.string()
|
9960
9985
|
}),
|
9961
9986
|
output: MailAccountSchema
|
9962
9987
|
},
|
9963
9988
|
delete: {
|
9964
|
-
input:
|
9965
|
-
id:
|
9989
|
+
input: z126.object({
|
9990
|
+
id: z126.string()
|
9966
9991
|
}),
|
9967
|
-
output:
|
9992
|
+
output: z126.string()
|
9968
9993
|
},
|
9969
9994
|
deleteEmailEngineAcc: {
|
9970
|
-
input:
|
9971
|
-
account:
|
9995
|
+
input: z126.object({
|
9996
|
+
account: z126.string()
|
9972
9997
|
}),
|
9973
9998
|
output: MailAccountSchema
|
9974
9999
|
},
|
9975
10000
|
generateOAuth2AuthenticationLink: {
|
9976
|
-
body:
|
9977
|
-
oAuth2AppId:
|
9978
|
-
mailServerId:
|
10001
|
+
body: z126.object({
|
10002
|
+
oAuth2AppId: z126.string(),
|
10003
|
+
mailServerId: z126.string()
|
9979
10004
|
}),
|
9980
|
-
response:
|
9981
|
-
url:
|
9982
|
-
account:
|
10005
|
+
response: z126.object({
|
10006
|
+
url: z126.string(),
|
10007
|
+
account: z126.string()
|
9983
10008
|
})
|
9984
10009
|
},
|
9985
10010
|
createOAuth2Acc: {
|
9986
|
-
body:
|
9987
|
-
account:
|
9988
|
-
name:
|
10011
|
+
body: z126.object({
|
10012
|
+
account: z126.string(),
|
10013
|
+
name: z126.string()
|
9989
10014
|
}),
|
9990
10015
|
response: MailAccountSchema
|
9991
10016
|
}
|
@@ -10003,14 +10028,14 @@ var accountContract = initContract48().router(
|
|
10003
10028
|
// data: AccountContractsValidationSchemas.create.output,
|
10004
10029
|
data: MailAccountSchema
|
10005
10030
|
}),
|
10006
|
-
400:
|
10007
|
-
message:
|
10031
|
+
400: z127.object({
|
10032
|
+
message: z127.string()
|
10008
10033
|
}),
|
10009
|
-
409:
|
10010
|
-
message:
|
10034
|
+
409: z127.object({
|
10035
|
+
message: z127.string()
|
10011
10036
|
}),
|
10012
|
-
500:
|
10013
|
-
message:
|
10037
|
+
500: z127.object({
|
10038
|
+
message: z127.string()
|
10014
10039
|
}),
|
10015
10040
|
...DefaultResponses
|
10016
10041
|
},
|
@@ -10026,14 +10051,14 @@ var accountContract = initContract48().router(
|
|
10026
10051
|
201: DefaultSuccessResponseSchema.extend({
|
10027
10052
|
data: AccountContractsValidationSchemas.generateOAuth2AuthenticationLink.response
|
10028
10053
|
}),
|
10029
|
-
400:
|
10030
|
-
message:
|
10054
|
+
400: z127.object({
|
10055
|
+
message: z127.string()
|
10031
10056
|
}),
|
10032
|
-
409:
|
10033
|
-
message:
|
10057
|
+
409: z127.object({
|
10058
|
+
message: z127.string()
|
10034
10059
|
}),
|
10035
|
-
500:
|
10036
|
-
message:
|
10060
|
+
500: z127.object({
|
10061
|
+
message: z127.string()
|
10037
10062
|
}),
|
10038
10063
|
...DefaultResponses
|
10039
10064
|
},
|
@@ -10047,7 +10072,7 @@ var accountContract = initContract48().router(
|
|
10047
10072
|
path: "/sync",
|
10048
10073
|
responses: {
|
10049
10074
|
200: DefaultSuccessResponseSchema.extend({
|
10050
|
-
message:
|
10075
|
+
message: z127.string()
|
10051
10076
|
}),
|
10052
10077
|
...DefaultResponses
|
10053
10078
|
},
|
@@ -10072,13 +10097,13 @@ var accountContract = initContract48().router(
|
|
10072
10097
|
getAll: {
|
10073
10098
|
method: "GET",
|
10074
10099
|
path: "",
|
10075
|
-
query:
|
10076
|
-
state:
|
10077
|
-
withDeleted:
|
10100
|
+
query: z127.object({
|
10101
|
+
state: z127.union([z127.literal("connected"), z127.literal("disconnected")]).optional(),
|
10102
|
+
withDeleted: z127.boolean().default(false)
|
10078
10103
|
}).optional(),
|
10079
10104
|
responses: {
|
10080
10105
|
200: DefaultSuccessResponseSchema.extend({
|
10081
|
-
data:
|
10106
|
+
data: z127.array(MailAccountSchema)
|
10082
10107
|
}),
|
10083
10108
|
...DefaultResponses
|
10084
10109
|
},
|
@@ -10089,8 +10114,8 @@ var accountContract = initContract48().router(
|
|
10089
10114
|
update: {
|
10090
10115
|
method: "PATCH",
|
10091
10116
|
path: "/:id",
|
10092
|
-
pathParams:
|
10093
|
-
id:
|
10117
|
+
pathParams: z127.object({
|
10118
|
+
id: z127.string().uuid()
|
10094
10119
|
}),
|
10095
10120
|
responses: {
|
10096
10121
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -10139,7 +10164,7 @@ var accountContract = initContract48().router(
|
|
10139
10164
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
10140
10165
|
responses: {
|
10141
10166
|
200: DefaultSuccessResponseSchema.extend({
|
10142
|
-
message:
|
10167
|
+
message: z127.string()
|
10143
10168
|
}),
|
10144
10169
|
...DefaultResponses
|
10145
10170
|
},
|
@@ -10154,7 +10179,7 @@ var accountContract = initContract48().router(
|
|
10154
10179
|
pathParams: AccountContractsValidationSchemas.deleteEmailEngineAcc.input,
|
10155
10180
|
responses: {
|
10156
10181
|
200: DefaultSuccessResponseSchema.extend({
|
10157
|
-
message:
|
10182
|
+
message: z127.string()
|
10158
10183
|
}),
|
10159
10184
|
...DefaultResponses
|
10160
10185
|
},
|
@@ -10183,20 +10208,20 @@ var accountContract = initContract48().router(
|
|
10183
10208
|
|
10184
10209
|
// src/mail/mail-server-contract.ts
|
10185
10210
|
import { initContract as initContract49 } from "@ts-rest/core";
|
10186
|
-
import
|
10211
|
+
import z129 from "zod";
|
10187
10212
|
|
10188
10213
|
// src/mail/schemas/servers-validation.schema.ts
|
10189
|
-
import
|
10190
|
-
var CreateMailServerSchema =
|
10191
|
-
name:
|
10192
|
-
smtpHost:
|
10193
|
-
smtpPort:
|
10194
|
-
smtpTlsPort:
|
10195
|
-
useTlsForSmtp:
|
10196
|
-
imapHost:
|
10197
|
-
imapPort:
|
10198
|
-
imapTlsPort:
|
10199
|
-
useTlsForImap:
|
10214
|
+
import z128 from "zod";
|
10215
|
+
var CreateMailServerSchema = z128.object({
|
10216
|
+
name: z128.string(),
|
10217
|
+
smtpHost: z128.string(),
|
10218
|
+
smtpPort: z128.number(),
|
10219
|
+
smtpTlsPort: z128.number(),
|
10220
|
+
useTlsForSmtp: z128.boolean(),
|
10221
|
+
imapHost: z128.string(),
|
10222
|
+
imapPort: z128.number(),
|
10223
|
+
imapTlsPort: z128.number(),
|
10224
|
+
useTlsForImap: z128.boolean()
|
10200
10225
|
});
|
10201
10226
|
|
10202
10227
|
// src/mail/mail-server-contract.ts
|
@@ -10219,11 +10244,11 @@ var serverContract = initContract49().router(
|
|
10219
10244
|
path: "/oauth2/apps",
|
10220
10245
|
responses: {
|
10221
10246
|
200: DefaultSuccessResponseSchema.extend({
|
10222
|
-
data:
|
10223
|
-
total:
|
10224
|
-
pages:
|
10225
|
-
page:
|
10226
|
-
apps:
|
10247
|
+
data: z129.object({
|
10248
|
+
total: z129.number(),
|
10249
|
+
pages: z129.number(),
|
10250
|
+
page: z129.number(),
|
10251
|
+
apps: z129.array(OAuth2AppSchema)
|
10227
10252
|
})
|
10228
10253
|
}),
|
10229
10254
|
...DefaultResponses
|
@@ -10233,8 +10258,8 @@ var serverContract = initContract49().router(
|
|
10233
10258
|
getById: {
|
10234
10259
|
method: "GET",
|
10235
10260
|
path: "/:id",
|
10236
|
-
pathParams:
|
10237
|
-
id:
|
10261
|
+
pathParams: z129.object({
|
10262
|
+
id: z129.string().uuid()
|
10238
10263
|
}),
|
10239
10264
|
responses: {
|
10240
10265
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10249,7 +10274,7 @@ var serverContract = initContract49().router(
|
|
10249
10274
|
path: "/",
|
10250
10275
|
responses: {
|
10251
10276
|
200: DefaultSuccessResponseSchema.extend({
|
10252
|
-
data:
|
10277
|
+
data: z129.array(MailServerSchema)
|
10253
10278
|
}),
|
10254
10279
|
...DefaultResponses
|
10255
10280
|
},
|
@@ -10258,8 +10283,8 @@ var serverContract = initContract49().router(
|
|
10258
10283
|
update: {
|
10259
10284
|
method: "PATCH",
|
10260
10285
|
path: "/:id",
|
10261
|
-
pathParams:
|
10262
|
-
id:
|
10286
|
+
pathParams: z129.object({
|
10287
|
+
id: z129.string().uuid()
|
10263
10288
|
}),
|
10264
10289
|
responses: {
|
10265
10290
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10273,8 +10298,8 @@ var serverContract = initContract49().router(
|
|
10273
10298
|
delete: {
|
10274
10299
|
method: "DELETE",
|
10275
10300
|
path: "/:id",
|
10276
|
-
pathParams:
|
10277
|
-
id:
|
10301
|
+
pathParams: z129.object({
|
10302
|
+
id: z129.string().uuid()
|
10278
10303
|
}),
|
10279
10304
|
responses: {
|
10280
10305
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10293,45 +10318,45 @@ var serverContract = initContract49().router(
|
|
10293
10318
|
|
10294
10319
|
// src/mail/message-contract.ts
|
10295
10320
|
import { initContract as initContract50 } from "@ts-rest/core";
|
10296
|
-
import
|
10321
|
+
import z131 from "zod";
|
10297
10322
|
|
10298
10323
|
// src/mail/schemas/message-validation.schema.ts
|
10299
|
-
import
|
10300
|
-
var MailParticipant2 =
|
10301
|
-
name:
|
10302
|
-
address:
|
10324
|
+
import z130 from "zod";
|
10325
|
+
var MailParticipant2 = z130.object({
|
10326
|
+
name: z130.string().optional(),
|
10327
|
+
address: z130.string().email()
|
10303
10328
|
});
|
10304
10329
|
var MessageContractsValidationsSchema = {
|
10305
10330
|
submit: {
|
10306
|
-
input:
|
10307
|
-
subject:
|
10308
|
-
text:
|
10309
|
-
html:
|
10331
|
+
input: z130.object({
|
10332
|
+
subject: z130.string(),
|
10333
|
+
text: z130.string(),
|
10334
|
+
html: z130.string(),
|
10310
10335
|
from: MailParticipant2,
|
10311
10336
|
to: MailParticipant2,
|
10312
|
-
cc:
|
10313
|
-
bcc:
|
10314
|
-
sendAt:
|
10315
|
-
reference:
|
10316
|
-
messageId:
|
10317
|
-
action:
|
10337
|
+
cc: z130.array(MailParticipant2).optional(),
|
10338
|
+
bcc: z130.array(MailParticipant2).optional(),
|
10339
|
+
sendAt: z130.string().optional(),
|
10340
|
+
reference: z130.object({
|
10341
|
+
messageId: z130.string(),
|
10342
|
+
action: z130.union([z130.literal("reply"), z130.literal("forward")])
|
10318
10343
|
}).optional(),
|
10319
|
-
attachments:
|
10320
|
-
|
10321
|
-
fileType:
|
10322
|
-
fileName:
|
10323
|
-
fileKey:
|
10324
|
-
fileSize:
|
10325
|
-
bucketName:
|
10326
|
-
presignedUrl:
|
10344
|
+
attachments: z130.array(
|
10345
|
+
z130.object({
|
10346
|
+
fileType: z130.string(),
|
10347
|
+
fileName: z130.string(),
|
10348
|
+
fileKey: z130.string(),
|
10349
|
+
fileSize: z130.number(),
|
10350
|
+
bucketName: z130.string(),
|
10351
|
+
presignedUrl: z130.string()
|
10327
10352
|
})
|
10328
10353
|
).optional()
|
10329
10354
|
}),
|
10330
|
-
output:
|
10331
|
-
response:
|
10332
|
-
messageId:
|
10333
|
-
sendAt:
|
10334
|
-
queueId:
|
10355
|
+
output: z130.object({
|
10356
|
+
response: z130.string(),
|
10357
|
+
messageId: z130.string(),
|
10358
|
+
sendAt: z130.string(),
|
10359
|
+
queueId: z130.string()
|
10335
10360
|
})
|
10336
10361
|
}
|
10337
10362
|
};
|
@@ -10360,8 +10385,8 @@ var messageContract = initContract50().router(
|
|
10360
10385
|
path: "/new_message_count",
|
10361
10386
|
responses: {
|
10362
10387
|
200: DefaultSuccessResponseSchema.extend({
|
10363
|
-
data:
|
10364
|
-
count:
|
10388
|
+
data: z131.object({
|
10389
|
+
count: z131.number()
|
10365
10390
|
})
|
10366
10391
|
}),
|
10367
10392
|
...DefaultResponses
|
@@ -10373,8 +10398,8 @@ var messageContract = initContract50().router(
|
|
10373
10398
|
getById: {
|
10374
10399
|
method: "GET",
|
10375
10400
|
path: "/:id",
|
10376
|
-
pathParams:
|
10377
|
-
id:
|
10401
|
+
pathParams: z131.object({
|
10402
|
+
id: z131.string()
|
10378
10403
|
}),
|
10379
10404
|
responses: {
|
10380
10405
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10389,8 +10414,8 @@ var messageContract = initContract50().router(
|
|
10389
10414
|
update: {
|
10390
10415
|
method: "PATCH",
|
10391
10416
|
path: "/:id",
|
10392
|
-
pathParams:
|
10393
|
-
id:
|
10417
|
+
pathParams: z131.object({
|
10418
|
+
id: z131.string()
|
10394
10419
|
}),
|
10395
10420
|
responses: {
|
10396
10421
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10406,8 +10431,8 @@ var messageContract = initContract50().router(
|
|
10406
10431
|
delete: {
|
10407
10432
|
method: "DELETE",
|
10408
10433
|
path: "/:id",
|
10409
|
-
pathParams:
|
10410
|
-
id:
|
10434
|
+
pathParams: z131.object({
|
10435
|
+
id: z131.string()
|
10411
10436
|
}),
|
10412
10437
|
responses: {
|
10413
10438
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10423,13 +10448,13 @@ var messageContract = initContract50().router(
|
|
10423
10448
|
cancelScheduledMessage: {
|
10424
10449
|
method: "DELETE",
|
10425
10450
|
path: "/scheduled_message/:id",
|
10426
|
-
pathParams:
|
10427
|
-
id:
|
10451
|
+
pathParams: z131.object({
|
10452
|
+
id: z131.string()
|
10428
10453
|
}),
|
10429
10454
|
responses: {
|
10430
10455
|
200: DefaultSuccessResponseSchema.extend({
|
10431
|
-
data:
|
10432
|
-
totalMessagesCount:
|
10456
|
+
data: z131.object({
|
10457
|
+
totalMessagesCount: z131.number()
|
10433
10458
|
})
|
10434
10459
|
}),
|
10435
10460
|
...DefaultResponses
|
@@ -10454,38 +10479,38 @@ var mailContract = initContract51().router({
|
|
10454
10479
|
|
10455
10480
|
// src/webchat/index.ts
|
10456
10481
|
import { initContract as initContract52 } from "@ts-rest/core";
|
10457
|
-
import
|
10482
|
+
import z134 from "zod";
|
10458
10483
|
|
10459
10484
|
// src/webchat/schema.ts
|
10460
|
-
import
|
10485
|
+
import z133 from "zod";
|
10461
10486
|
|
10462
10487
|
// src/webchat/validation.ts
|
10463
|
-
import
|
10488
|
+
import z132 from "zod";
|
10464
10489
|
var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
|
10465
10490
|
ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
|
10466
10491
|
return ChatwootChannelType3;
|
10467
10492
|
})(ChatwootChannelType2 || {});
|
10468
|
-
var WebChatChannelSchema =
|
10469
|
-
avatar:
|
10470
|
-
name:
|
10471
|
-
type:
|
10472
|
-
websiteName:
|
10473
|
-
welcomeTitle:
|
10474
|
-
websiteUrl:
|
10475
|
-
welcomeTagline:
|
10476
|
-
agentAwayMessage:
|
10477
|
-
widgetColor:
|
10493
|
+
var WebChatChannelSchema = z132.object({
|
10494
|
+
avatar: z132.string().optional(),
|
10495
|
+
name: z132.string(),
|
10496
|
+
type: z132.nativeEnum(ChatwootChannelType2),
|
10497
|
+
websiteName: z132.string(),
|
10498
|
+
welcomeTitle: z132.string(),
|
10499
|
+
websiteUrl: z132.string().url(),
|
10500
|
+
welcomeTagline: z132.string().optional(),
|
10501
|
+
agentAwayMessage: z132.string().optional(),
|
10502
|
+
widgetColor: z132.string().optional()
|
10478
10503
|
});
|
10479
10504
|
|
10480
10505
|
// src/webchat/schema.ts
|
10481
|
-
var ConnectWebChatChannelSchema =
|
10482
|
-
name:
|
10483
|
-
actor:
|
10484
|
-
id:
|
10485
|
-
name:
|
10486
|
-
email:
|
10487
|
-
address:
|
10488
|
-
phone:
|
10506
|
+
var ConnectWebChatChannelSchema = z133.object({
|
10507
|
+
name: z133.string(),
|
10508
|
+
actor: z133.object({
|
10509
|
+
id: z133.string().uuid(),
|
10510
|
+
name: z133.string(),
|
10511
|
+
email: z133.string().email(),
|
10512
|
+
address: z133.string().nullable(),
|
10513
|
+
phone: z133.string().nullable()
|
10489
10514
|
}),
|
10490
10515
|
channel: WebChatChannelSchema
|
10491
10516
|
});
|
@@ -10519,8 +10544,8 @@ var platformWebchatContract = initContract52().router(
|
|
10519
10544
|
disconnectToService: {
|
10520
10545
|
method: "POST",
|
10521
10546
|
path: "/disconnect",
|
10522
|
-
body:
|
10523
|
-
id:
|
10547
|
+
body: z134.object({
|
10548
|
+
id: z134.string().uuid()
|
10524
10549
|
}),
|
10525
10550
|
responses: {
|
10526
10551
|
200: ChannelServiceResponseSchema,
|
@@ -10531,8 +10556,8 @@ var platformWebchatContract = initContract52().router(
|
|
10531
10556
|
reconnect: {
|
10532
10557
|
method: "POST",
|
10533
10558
|
path: "/reconnect/:channelId",
|
10534
|
-
pathParams:
|
10535
|
-
channelId:
|
10559
|
+
pathParams: z134.object({
|
10560
|
+
channelId: z134.string().uuid()
|
10536
10561
|
}),
|
10537
10562
|
body: null,
|
10538
10563
|
responses: {
|
@@ -10544,8 +10569,8 @@ var platformWebchatContract = initContract52().router(
|
|
10544
10569
|
delete: {
|
10545
10570
|
method: "DELETE",
|
10546
10571
|
path: "/delete/:channelId",
|
10547
|
-
pathParams:
|
10548
|
-
channelId:
|
10572
|
+
pathParams: z134.object({
|
10573
|
+
channelId: z134.string().uuid()
|
10549
10574
|
}),
|
10550
10575
|
body: null,
|
10551
10576
|
responses: {
|
@@ -10562,18 +10587,18 @@ var platformWebchatContract = initContract52().router(
|
|
10562
10587
|
|
10563
10588
|
// src/hold-label/index.ts
|
10564
10589
|
import { initContract as initContract53 } from "@ts-rest/core";
|
10565
|
-
import
|
10590
|
+
import z136 from "zod";
|
10566
10591
|
|
10567
10592
|
// src/hold-label/validation.ts
|
10568
|
-
import
|
10569
|
-
var UpdatePositionSchema2 =
|
10570
|
-
holdLabels:
|
10571
|
-
|
10593
|
+
import z135 from "zod";
|
10594
|
+
var UpdatePositionSchema2 = z135.object({
|
10595
|
+
holdLabels: z135.array(
|
10596
|
+
z135.object({ id: z135.string().uuid(), position: z135.number() })
|
10572
10597
|
)
|
10573
10598
|
});
|
10574
|
-
var HoldRoomSchema =
|
10575
|
-
roomId:
|
10576
|
-
holdLabelId:
|
10599
|
+
var HoldRoomSchema = z135.object({
|
10600
|
+
roomId: z135.string().uuid(),
|
10601
|
+
holdLabelId: z135.string().uuid()
|
10577
10602
|
});
|
10578
10603
|
|
10579
10604
|
// src/hold-label/index.ts
|
@@ -10582,7 +10607,7 @@ var holdLabelContract = initContract53().router(
|
|
10582
10607
|
createHoldLabel: {
|
10583
10608
|
method: "POST",
|
10584
10609
|
path: "/",
|
10585
|
-
body:
|
10610
|
+
body: z136.object({ name: z136.string() }),
|
10586
10611
|
responses: {
|
10587
10612
|
201: DefaultSuccessResponseSchema.extend({
|
10588
10613
|
holdLabel: HoldLabelSchema
|
@@ -10594,7 +10619,7 @@ var holdLabelContract = initContract53().router(
|
|
10594
10619
|
path: "/",
|
10595
10620
|
responses: {
|
10596
10621
|
200: DefaultSuccessResponseSchema.extend({
|
10597
|
-
holdLabels:
|
10622
|
+
holdLabels: z136.array(HoldLabelSchema)
|
10598
10623
|
})
|
10599
10624
|
}
|
10600
10625
|
},
|
@@ -10612,8 +10637,8 @@ var holdLabelContract = initContract53().router(
|
|
10612
10637
|
updateHoldLabel: {
|
10613
10638
|
method: "PATCH",
|
10614
10639
|
path: "/:id",
|
10615
|
-
pathParams:
|
10616
|
-
body:
|
10640
|
+
pathParams: z136.object({ id: z136.string().uuid() }),
|
10641
|
+
body: z136.object({ name: z136.string() }),
|
10617
10642
|
responses: {
|
10618
10643
|
200: DefaultSuccessResponseSchema.extend({
|
10619
10644
|
holdLabel: HoldLabelSchema
|
@@ -10623,7 +10648,7 @@ var holdLabelContract = initContract53().router(
|
|
10623
10648
|
deleteHoldLabel: {
|
10624
10649
|
method: "DELETE",
|
10625
10650
|
path: "/:id",
|
10626
|
-
pathParams:
|
10651
|
+
pathParams: z136.object({ id: z136.string().uuid() }),
|
10627
10652
|
body: null,
|
10628
10653
|
responses: {
|
10629
10654
|
200: DefaultSuccessResponseSchema
|
@@ -10634,10 +10659,10 @@ var holdLabelContract = initContract53().router(
|
|
10634
10659
|
path: "/auto-unhold",
|
10635
10660
|
responses: {
|
10636
10661
|
200: DefaultSuccessResponseSchema.extend({
|
10637
|
-
autoUnhold:
|
10638
|
-
resumeLabel:
|
10639
|
-
show:
|
10640
|
-
name:
|
10662
|
+
autoUnhold: z136.boolean(),
|
10663
|
+
resumeLabel: z136.object({
|
10664
|
+
show: z136.boolean(),
|
10665
|
+
name: z136.string()
|
10641
10666
|
})
|
10642
10667
|
})
|
10643
10668
|
}
|
@@ -10645,19 +10670,19 @@ var holdLabelContract = initContract53().router(
|
|
10645
10670
|
updateAutoUnhold: {
|
10646
10671
|
method: "POST",
|
10647
10672
|
path: "/auto-unhold",
|
10648
|
-
body:
|
10649
|
-
autoUnhold:
|
10650
|
-
resumeLabel:
|
10651
|
-
show:
|
10652
|
-
name:
|
10673
|
+
body: z136.object({
|
10674
|
+
autoUnhold: z136.boolean().optional(),
|
10675
|
+
resumeLabel: z136.object({
|
10676
|
+
show: z136.boolean().optional(),
|
10677
|
+
name: z136.string().optional()
|
10653
10678
|
}).optional()
|
10654
10679
|
}),
|
10655
10680
|
responses: {
|
10656
10681
|
200: DefaultSuccessResponseSchema.extend({
|
10657
|
-
autoUnhold:
|
10658
|
-
resumeLabel:
|
10659
|
-
show:
|
10660
|
-
name:
|
10682
|
+
autoUnhold: z136.boolean(),
|
10683
|
+
resumeLabel: z136.object({
|
10684
|
+
show: z136.boolean(),
|
10685
|
+
name: z136.string()
|
10661
10686
|
})
|
10662
10687
|
})
|
10663
10688
|
}
|
@@ -10665,10 +10690,10 @@ var holdLabelContract = initContract53().router(
|
|
10665
10690
|
getHoldLogs: {
|
10666
10691
|
method: "GET",
|
10667
10692
|
path: "/hold-logs",
|
10668
|
-
query:
|
10693
|
+
query: z136.object({ cxLogId: z136.string().uuid() }),
|
10669
10694
|
responses: {
|
10670
|
-
200:
|
10671
|
-
holdLogs:
|
10695
|
+
200: z136.object({
|
10696
|
+
holdLogs: z136.array(FormattedHoldLogSchema)
|
10672
10697
|
})
|
10673
10698
|
}
|
10674
10699
|
},
|
@@ -10685,7 +10710,7 @@ var holdLabelContract = initContract53().router(
|
|
10685
10710
|
unholdRoom: {
|
10686
10711
|
method: "POST",
|
10687
10712
|
path: "/unhold-room",
|
10688
|
-
body:
|
10713
|
+
body: z136.object({ roomId: z136.string().uuid() }),
|
10689
10714
|
responses: {
|
10690
10715
|
200: DefaultSuccessResponseSchema.extend({
|
10691
10716
|
holdLog: HoldLogSchema.optional()
|
@@ -10698,89 +10723,89 @@ var holdLabelContract = initContract53().router(
|
|
10698
10723
|
|
10699
10724
|
// src/subscription/index.ts
|
10700
10725
|
import { initContract as initContract54 } from "@ts-rest/core";
|
10701
|
-
import { z as
|
10726
|
+
import { z as z139 } from "zod";
|
10702
10727
|
|
10703
10728
|
// src/subscription/schema.ts
|
10704
|
-
import
|
10729
|
+
import z137 from "zod";
|
10705
10730
|
var ProductPriceSchema = DefaultEntitySchema.extend({
|
10706
|
-
priceId:
|
10707
|
-
name:
|
10708
|
-
perUnit:
|
10709
|
-
price:
|
10710
|
-
currency:
|
10731
|
+
priceId: z137.string(),
|
10732
|
+
name: z137.string().nullable(),
|
10733
|
+
perUnit: z137.number(),
|
10734
|
+
price: z137.number(),
|
10735
|
+
currency: z137.string().nullable()
|
10711
10736
|
});
|
10712
10737
|
var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
|
10713
|
-
provider:
|
10714
|
-
productId:
|
10715
|
-
name:
|
10716
|
-
type:
|
10717
|
-
omnichannel:
|
10718
|
-
usageType:
|
10738
|
+
provider: z137.string(),
|
10739
|
+
productId: z137.string(),
|
10740
|
+
name: z137.string(),
|
10741
|
+
type: z137.string(),
|
10742
|
+
omnichannel: z137.string(),
|
10743
|
+
usageType: z137.string().nullable(),
|
10719
10744
|
productPrice: ProductPriceSchema
|
10720
10745
|
});
|
10721
10746
|
var RelatedProductSchema = DefaultEntitySchema.extend({
|
10722
|
-
includedQuantity:
|
10747
|
+
includedQuantity: z137.number(),
|
10723
10748
|
product: ProductWithoutRelatedSchema
|
10724
10749
|
});
|
10725
10750
|
var ProductSchema = DefaultEntitySchema.extend({
|
10726
|
-
provider:
|
10727
|
-
productId:
|
10728
|
-
name:
|
10729
|
-
type:
|
10730
|
-
omnichannel:
|
10731
|
-
usageType:
|
10751
|
+
provider: z137.string(),
|
10752
|
+
productId: z137.string(),
|
10753
|
+
name: z137.string(),
|
10754
|
+
type: z137.string(),
|
10755
|
+
omnichannel: z137.string(),
|
10756
|
+
usageType: z137.string().nullable(),
|
10732
10757
|
productPrice: ProductPriceSchema,
|
10733
|
-
relatedProducts:
|
10758
|
+
relatedProducts: z137.array(RelatedProductSchema)
|
10734
10759
|
});
|
10735
10760
|
var CustomerSchema = DefaultEntitySchema.extend({
|
10736
|
-
provider:
|
10737
|
-
customerId:
|
10738
|
-
email:
|
10739
|
-
name:
|
10740
|
-
balance:
|
10761
|
+
provider: z137.string(),
|
10762
|
+
customerId: z137.string(),
|
10763
|
+
email: z137.string(),
|
10764
|
+
name: z137.string(),
|
10765
|
+
balance: z137.number()
|
10741
10766
|
});
|
10742
10767
|
var SubscriptionProuctSchema = DefaultEntitySchema.extend({
|
10743
|
-
limit:
|
10744
|
-
subscriptionItemId:
|
10745
|
-
usage:
|
10768
|
+
limit: z137.number(),
|
10769
|
+
subscriptionItemId: z137.string(),
|
10770
|
+
usage: z137.number().nullable(),
|
10746
10771
|
product: ProductSchema
|
10747
10772
|
});
|
10748
10773
|
var SubscriptionSchema = DefaultEntitySchema.extend({
|
10749
|
-
provider:
|
10750
|
-
type:
|
10751
|
-
subscriptionId:
|
10752
|
-
interval:
|
10753
|
-
quantity:
|
10754
|
-
amount:
|
10755
|
-
startAt:
|
10756
|
-
expireAt:
|
10757
|
-
status:
|
10758
|
-
name:
|
10759
|
-
subscriptionProducts:
|
10774
|
+
provider: z137.string(),
|
10775
|
+
type: z137.string(),
|
10776
|
+
subscriptionId: z137.string(),
|
10777
|
+
interval: z137.string(),
|
10778
|
+
quantity: z137.number(),
|
10779
|
+
amount: z137.number(),
|
10780
|
+
startAt: z137.date().nullable(),
|
10781
|
+
expireAt: z137.date(),
|
10782
|
+
status: z137.string(),
|
10783
|
+
name: z137.string().nullable(),
|
10784
|
+
subscriptionProducts: z137.array(SubscriptionProuctSchema),
|
10760
10785
|
productPrice: ProductPriceSchema,
|
10761
10786
|
product: ProductSchema
|
10762
10787
|
});
|
10763
10788
|
|
10764
10789
|
// src/subscription/validation.ts
|
10765
|
-
import { z as
|
10766
|
-
var GetAvailablePlanSchema =
|
10767
|
-
type:
|
10768
|
-
currency:
|
10769
|
-
});
|
10770
|
-
var UpdateSubscriptionSchema =
|
10771
|
-
planProductId:
|
10772
|
-
planProductPriceId:
|
10773
|
-
subscriptionId:
|
10774
|
-
subscriptionProducts:
|
10775
|
-
|
10776
|
-
productId:
|
10777
|
-
productPriceId:
|
10778
|
-
quantity:
|
10790
|
+
import { z as z138 } from "zod";
|
10791
|
+
var GetAvailablePlanSchema = z138.object({
|
10792
|
+
type: z138.string(),
|
10793
|
+
currency: z138.string()
|
10794
|
+
});
|
10795
|
+
var UpdateSubscriptionSchema = z138.object({
|
10796
|
+
planProductId: z138.string(),
|
10797
|
+
planProductPriceId: z138.string(),
|
10798
|
+
subscriptionId: z138.string(),
|
10799
|
+
subscriptionProducts: z138.array(
|
10800
|
+
z138.object({
|
10801
|
+
productId: z138.string(),
|
10802
|
+
productPriceId: z138.string(),
|
10803
|
+
quantity: z138.number()
|
10779
10804
|
})
|
10780
10805
|
)
|
10781
10806
|
});
|
10782
|
-
var TopUpBalanceSchema =
|
10783
|
-
quantity:
|
10807
|
+
var TopUpBalanceSchema = z138.object({
|
10808
|
+
quantity: z138.number()
|
10784
10809
|
});
|
10785
10810
|
|
10786
10811
|
// src/subscription/index.ts
|
@@ -10804,9 +10829,9 @@ var subscriptionContract = initContract54().router(
|
|
10804
10829
|
body: UpdateSubscriptionSchema,
|
10805
10830
|
responses: {
|
10806
10831
|
200: DefaultSuccessResponseSchema.extend({
|
10807
|
-
message:
|
10808
|
-
requireCheckout:
|
10809
|
-
checkoutUrl:
|
10832
|
+
message: z139.string(),
|
10833
|
+
requireCheckout: z139.boolean(),
|
10834
|
+
checkoutUrl: z139.string().nullable()
|
10810
10835
|
}),
|
10811
10836
|
402: DefaultErrorResponseSchema,
|
10812
10837
|
500: DefaultErrorResponseSchema
|
@@ -10818,7 +10843,7 @@ var subscriptionContract = initContract54().router(
|
|
10818
10843
|
body: TopUpBalanceSchema,
|
10819
10844
|
responses: {
|
10820
10845
|
200: DefaultSuccessResponseSchema.extend({
|
10821
|
-
checkoutUrl:
|
10846
|
+
checkoutUrl: z139.string()
|
10822
10847
|
}),
|
10823
10848
|
500: DefaultErrorResponseSchema
|
10824
10849
|
}
|
@@ -10829,7 +10854,18 @@ var subscriptionContract = initContract54().router(
|
|
10829
10854
|
query: GetAvailablePlanSchema,
|
10830
10855
|
responses: {
|
10831
10856
|
200: DefaultSuccessResponseSchema.extend({
|
10832
|
-
data:
|
10857
|
+
data: z139.array(ProductSchema)
|
10858
|
+
}),
|
10859
|
+
500: DefaultErrorResponseSchema
|
10860
|
+
}
|
10861
|
+
},
|
10862
|
+
getAvailableAddOns: {
|
10863
|
+
method: "GET",
|
10864
|
+
path: "/available-add-ons",
|
10865
|
+
query: GetAvailablePlanSchema,
|
10866
|
+
responses: {
|
10867
|
+
200: DefaultSuccessResponseSchema.extend({
|
10868
|
+
data: z139.array(ProductSchema)
|
10833
10869
|
}),
|
10834
10870
|
500: DefaultErrorResponseSchema
|
10835
10871
|
}
|
@@ -10852,19 +10888,19 @@ var subscriptionContract = initContract54().router(
|
|
10852
10888
|
|
10853
10889
|
// src/cx-intelligence/index.ts
|
10854
10890
|
import { initContract as initContract55 } from "@ts-rest/core";
|
10855
|
-
import
|
10891
|
+
import z140 from "zod";
|
10856
10892
|
var cxIntelligenceContract = initContract55().router(
|
10857
10893
|
{
|
10858
10894
|
toggle: {
|
10859
10895
|
method: "POST",
|
10860
10896
|
path: "/toggle",
|
10861
10897
|
headers: DefaultHeaderSchema,
|
10862
|
-
body:
|
10863
|
-
enabled:
|
10898
|
+
body: z140.object({
|
10899
|
+
enabled: z140.union([z140.literal(true), z140.literal(false)])
|
10864
10900
|
}),
|
10865
10901
|
responses: {
|
10866
10902
|
200: DefaultSuccessResponseSchema.extend({
|
10867
|
-
message:
|
10903
|
+
message: z140.string()
|
10868
10904
|
}),
|
10869
10905
|
500: DefaultErrorResponseSchema
|
10870
10906
|
},
|
@@ -10874,15 +10910,15 @@ var cxIntelligenceContract = initContract55().router(
|
|
10874
10910
|
method: "POST",
|
10875
10911
|
path: "/cx-logs/:id/transcribe",
|
10876
10912
|
headers: DefaultHeaderSchema,
|
10877
|
-
pathParams:
|
10878
|
-
id:
|
10913
|
+
pathParams: z140.object({
|
10914
|
+
id: z140.string().uuid()
|
10879
10915
|
}),
|
10880
|
-
body:
|
10881
|
-
fileUrl:
|
10916
|
+
body: z140.object({
|
10917
|
+
fileUrl: z140.string()
|
10882
10918
|
}),
|
10883
10919
|
responses: {
|
10884
10920
|
200: DefaultSuccessResponseSchema.extend({
|
10885
|
-
message:
|
10921
|
+
message: z140.string()
|
10886
10922
|
}),
|
10887
10923
|
403: DefaultErrorResponseSchema,
|
10888
10924
|
404: DefaultErrorResponseSchema,
|
@@ -10902,13 +10938,13 @@ var settingCxIntelligenceContract = initContract55().router(
|
|
10902
10938
|
headers: DefaultHeaderSchema,
|
10903
10939
|
responses: {
|
10904
10940
|
200: DefaultSuccessResponseSchema.extend({
|
10905
|
-
message:
|
10906
|
-
status:
|
10941
|
+
message: z140.string(),
|
10942
|
+
status: z140.boolean()
|
10907
10943
|
}),
|
10908
|
-
422:
|
10909
|
-
requestId:
|
10910
|
-
message:
|
10911
|
-
status:
|
10944
|
+
422: z140.object({
|
10945
|
+
requestId: z140.string(),
|
10946
|
+
message: z140.string(),
|
10947
|
+
status: z140.boolean()
|
10912
10948
|
}),
|
10913
10949
|
500: DefaultErrorResponseSchema
|
10914
10950
|
},
|
@@ -10920,20 +10956,20 @@ var settingCxIntelligenceContract = initContract55().router(
|
|
10920
10956
|
|
10921
10957
|
// src/export/index.ts
|
10922
10958
|
import { initContract as initContract56 } from "@ts-rest/core";
|
10923
|
-
import
|
10959
|
+
import z141 from "zod";
|
10924
10960
|
var exportContract = initContract56().router(
|
10925
10961
|
{
|
10926
10962
|
notifyExport: {
|
10927
10963
|
method: "POST",
|
10928
10964
|
path: "notify",
|
10929
|
-
body:
|
10930
|
-
userId:
|
10931
|
-
module:
|
10932
|
-
fileUrl:
|
10965
|
+
body: z141.object({
|
10966
|
+
userId: z141.string().uuid(),
|
10967
|
+
module: z141.string(),
|
10968
|
+
fileUrl: z141.string()
|
10933
10969
|
}),
|
10934
10970
|
responses: {
|
10935
10971
|
200: DefaultSuccessResponseSchema.extend({
|
10936
|
-
success:
|
10972
|
+
success: z141.boolean()
|
10937
10973
|
}),
|
10938
10974
|
500: DefaultErrorResponseSchema
|
10939
10975
|
}
|
@@ -11016,6 +11052,7 @@ export {
|
|
11016
11052
|
userContract,
|
11017
11053
|
userNotificationContract,
|
11018
11054
|
userPresenceStatusLogContract,
|
11055
|
+
widgetContract,
|
11019
11056
|
widgetSettingContract,
|
11020
11057
|
workflowContract,
|
11021
11058
|
wrapUpFormContract
|