@kl1/contracts 1.3.74 → 1.3.75
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/automation-queue/index.d.ts +43 -12
- package/dist/api-contracts/src/automation-queue/index.d.ts.map +1 -1
- package/dist/api-contracts/src/automation-queue/schema.d.ts +3 -0
- package/dist/api-contracts/src/automation-queue/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/automation-queue/validation.d.ts +18 -12
- package/dist/api-contracts/src/automation-queue/validation.d.ts.map +1 -1
- 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 +3 -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 +3 -0
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +213 -430
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/index.d.ts +26 -0
- package/dist/api-contracts/src/cx-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/schema.d.ts +18 -0
- package/dist/api-contracts/src/cx-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/index.d.ts +5 -0
- package/dist/api-contracts/src/dashboard/index.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/schema.d.ts +3 -0
- package/dist/api-contracts/src/dashboard/schema.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/subscription/index.d.ts +438 -0
- package/dist/api-contracts/src/subscription/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/workflow-rule/index.d.ts +54 -0
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/index.js +1595 -1567
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1594 -1567
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1185,6 +1185,7 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
|
|
1185
1185
|
queue: z25.object({
|
1186
1186
|
queueName: z25.string().nullable().optional()
|
1187
1187
|
}).nullable(),
|
1188
|
+
automationQueue: z25.object({ id: z25.string().uuid(), name: z25.string() }).nullable(),
|
1188
1189
|
contact: ContactSchema.nullable(),
|
1189
1190
|
firstAssignee: UserSchema.nullable(),
|
1190
1191
|
agent: UserSchema.nullable(),
|
@@ -1229,7 +1230,8 @@ var GetRoomsSchema = z26.object({
|
|
1229
1230
|
caseId: z26.string().optional(),
|
1230
1231
|
dispositions: z26.array(z26.string()).optional(),
|
1231
1232
|
holdLabelId: z26.string().uuid().optional(),
|
1232
|
-
automationQueueId: z26.string().uuid().optional()
|
1233
|
+
automationQueueId: z26.string().uuid().optional(),
|
1234
|
+
botpressBotId: z26.string().uuid().optional()
|
1233
1235
|
});
|
1234
1236
|
var UpdateRoomTagsAndNotesSchema = z26.object({
|
1235
1237
|
note: z26.string().optional(),
|
@@ -2218,6 +2220,22 @@ var ConnectWhatsappSchema = z37.object({
|
|
2218
2220
|
});
|
2219
2221
|
var CsatPreferenceSchema = z37.object({
|
2220
2222
|
isCSATEnabled: z37.boolean(),
|
2223
|
+
headline: z37.string().optional().nullable(),
|
2224
|
+
image: z37.object({
|
2225
|
+
bucketName: z37.string(),
|
2226
|
+
fileName: z37.string(),
|
2227
|
+
fileSize: z37.number(),
|
2228
|
+
fileKey: z37.string(),
|
2229
|
+
originalUrl: z37.string().optional().nullable()
|
2230
|
+
}).optional().nullable(),
|
2231
|
+
scaleOptions: z37.array(
|
2232
|
+
z37.object({
|
2233
|
+
value: z37.string(),
|
2234
|
+
label: z37.string(),
|
2235
|
+
color: z37.string().optional().nullable(),
|
2236
|
+
style: z37.string().optional().nullable()
|
2237
|
+
})
|
2238
|
+
).optional().nullable(),
|
2221
2239
|
dispositions: z37.array(z37.string()).optional()
|
2222
2240
|
});
|
2223
2241
|
var ConnectLazadaSchema = z37.object({
|
@@ -4190,7 +4208,6 @@ var cxLogContract = initContract12().router({
|
|
4190
4208
|
200: null,
|
4191
4209
|
401: DefaultUnauthorizedSchema
|
4192
4210
|
},
|
4193
|
-
// IMPORTANT: THIS SHOULD BE Z.ANY(). DO NOT CHANGE!
|
4194
4211
|
query: z53.any(),
|
4195
4212
|
summary: "Export cx-logs"
|
4196
4213
|
},
|
@@ -4430,6 +4447,7 @@ var MessageStatusSchema = z55.object({
|
|
4430
4447
|
closed: z55.number().nullable(),
|
4431
4448
|
unassignedOpen: z55.number().nullable(),
|
4432
4449
|
assignedOpen: z55.number().nullable(),
|
4450
|
+
botRoom: z55.number().nullable(),
|
4433
4451
|
hold: z55.number()
|
4434
4452
|
});
|
4435
4453
|
var MessageAverageSchema = z55.object({
|
@@ -5819,10 +5837,7 @@ var tagContract = initContract22().router(
|
|
5819
5837
|
|
5820
5838
|
// src/telephony-agent-presence-status/index.ts
|
5821
5839
|
import { initContract as initContract23 } from "@ts-rest/core";
|
5822
|
-
import
|
5823
|
-
|
5824
|
-
// src/telephony-agent-presence-status/schema.ts
|
5825
|
-
import z73 from "zod";
|
5840
|
+
import z74 from "zod";
|
5826
5841
|
|
5827
5842
|
// src/presence-status/schema.ts
|
5828
5843
|
import z72 from "zod";
|
@@ -5857,45 +5872,29 @@ var UserPresenceStatusSchema = z72.object({
|
|
5857
5872
|
// src/telephony-agent-presence-status/schema.ts
|
5858
5873
|
var UserPresenceStatusSchema2 = DefaultEntitySchema.extend({
|
5859
5874
|
user: UserSchema,
|
5860
|
-
presenceStatus: PresenceStatusSchema
|
5861
|
-
customPresenceStatus: z73.string().nullable().optional()
|
5875
|
+
presenceStatus: PresenceStatusSchema
|
5862
5876
|
});
|
5863
5877
|
|
5864
5878
|
// src/telephony-agent-presence-status/validation.ts
|
5865
|
-
import { z as
|
5866
|
-
var UpdateUserStatusSchema =
|
5867
|
-
userId:
|
5868
|
-
presenceStatusId:
|
5869
|
-
|
5870
|
-
reason: z74.string()
|
5879
|
+
import { z as z73 } from "zod";
|
5880
|
+
var UpdateUserStatusSchema = z73.object({
|
5881
|
+
userId: z73.string(),
|
5882
|
+
presenceStatusId: z73.string().nullable().optional(),
|
5883
|
+
reason: z73.string()
|
5871
5884
|
});
|
5872
5885
|
|
5873
5886
|
// src/telephony-agent-presence-status/index.ts
|
5874
5887
|
var telephonyAgentPresenceStatusContract = initContract23().router(
|
5875
5888
|
{
|
5876
|
-
getAllAgentStatus: {
|
5877
|
-
method: "GET",
|
5878
|
-
path: "/agents/presence_status",
|
5879
|
-
headers: DefaultHeaderSchema,
|
5880
|
-
responses: {
|
5881
|
-
200: z75.array(UserPresenceStatusSchema2),
|
5882
|
-
400: z75.object({
|
5883
|
-
message: z75.string()
|
5884
|
-
}),
|
5885
|
-
401: DefaultUnauthorizedSchema,
|
5886
|
-
500: DefaultErrorResponseSchema
|
5887
|
-
},
|
5888
|
-
summary: "Get all user presence status list."
|
5889
|
-
},
|
5890
5889
|
getAgentStatus: {
|
5891
5890
|
method: "GET",
|
5892
5891
|
path: "/presence_status/check_update/:userId",
|
5893
|
-
pathParams:
|
5892
|
+
pathParams: z74.object({ userId: z74.string() }),
|
5894
5893
|
headers: DefaultHeaderSchema,
|
5895
5894
|
responses: {
|
5896
5895
|
200: UserPresenceStatusSchema2,
|
5897
|
-
400:
|
5898
|
-
message:
|
5896
|
+
400: z74.object({
|
5897
|
+
message: z74.string()
|
5899
5898
|
}),
|
5900
5899
|
401: DefaultUnauthorizedSchema,
|
5901
5900
|
500: DefaultErrorResponseSchema
|
@@ -5911,8 +5910,8 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5911
5910
|
200: DefaultSuccessResponseSchema.extend({
|
5912
5911
|
userPresenceStatu: UserPresenceStatusSchema2
|
5913
5912
|
}),
|
5914
|
-
400:
|
5915
|
-
message:
|
5913
|
+
400: z74.object({
|
5914
|
+
message: z74.string()
|
5916
5915
|
}),
|
5917
5916
|
401: DefaultUnauthorizedSchema,
|
5918
5917
|
500: DefaultErrorResponseSchema
|
@@ -5924,65 +5923,65 @@ var telephonyAgentPresenceStatusContract = initContract23().router(
|
|
5924
5923
|
);
|
5925
5924
|
|
5926
5925
|
// src/telephony-cdr/index.ts
|
5927
|
-
import
|
5926
|
+
import z76 from "zod";
|
5928
5927
|
|
5929
5928
|
// src/telephony-cdr/validation.ts
|
5930
|
-
import
|
5931
|
-
var CreateTelephonyCdrSchema =
|
5932
|
-
uniqueCallId:
|
5933
|
-
timeStart:
|
5934
|
-
callFrom:
|
5935
|
-
callTo:
|
5936
|
-
callDuration:
|
5937
|
-
talkDuration:
|
5938
|
-
srcTrunkName:
|
5939
|
-
dstTrunkName:
|
5940
|
-
pinCode:
|
5941
|
-
status:
|
5942
|
-
type:
|
5943
|
-
recording:
|
5944
|
-
didNumber:
|
5945
|
-
agentRingTime:
|
5929
|
+
import z75 from "zod";
|
5930
|
+
var CreateTelephonyCdrSchema = z75.object({
|
5931
|
+
uniqueCallId: z75.string({ required_error: "uniqueCallId is required" }),
|
5932
|
+
timeStart: z75.string({ required_error: "timeStart is required" }),
|
5933
|
+
callFrom: z75.string({ required_error: "callFrom is required" }),
|
5934
|
+
callTo: z75.string({ required_error: "callTo is required" }),
|
5935
|
+
callDuration: z75.number().nullable(),
|
5936
|
+
talkDuration: z75.number().nullable(),
|
5937
|
+
srcTrunkName: z75.string().nullable(),
|
5938
|
+
dstTrunkName: z75.string().nullable(),
|
5939
|
+
pinCode: z75.string().nullable(),
|
5940
|
+
status: z75.string(),
|
5941
|
+
type: z75.string(),
|
5942
|
+
recording: z75.string().nullable(),
|
5943
|
+
didNumber: z75.string().nullable(),
|
5944
|
+
agentRingTime: z75.number().nullable()
|
5946
5945
|
});
|
5947
5946
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5948
|
-
selectedDate:
|
5949
|
-
type:
|
5950
|
-
status:
|
5951
|
-
callFrom:
|
5952
|
-
callTo:
|
5953
|
-
trunk:
|
5954
|
-
userId:
|
5955
|
-
queueStatus:
|
5956
|
-
agentIds:
|
5957
|
-
agentCallsOnly:
|
5958
|
-
contactId:
|
5947
|
+
selectedDate: z75.string().optional(),
|
5948
|
+
type: z75.array(z75.string()).optional(),
|
5949
|
+
status: z75.array(z75.string()).optional(),
|
5950
|
+
callFrom: z75.string().optional(),
|
5951
|
+
callTo: z75.string().optional(),
|
5952
|
+
trunk: z75.array(z75.string()).optional(),
|
5953
|
+
userId: z75.string().uuid().optional(),
|
5954
|
+
queueStatus: z75.string().optional(),
|
5955
|
+
agentIds: z75.array(z75.string().uuid()).optional(),
|
5956
|
+
agentCallsOnly: z75.coerce.boolean().optional(),
|
5957
|
+
contactId: z75.string().uuid().optional()
|
5959
5958
|
});
|
5960
5959
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5961
|
-
type:
|
5962
|
-
status:
|
5963
|
-
callFrom:
|
5964
|
-
callTo:
|
5965
|
-
result:
|
5966
|
-
callTags:
|
5967
|
-
selectedDate:
|
5968
|
-
agentId:
|
5969
|
-
contact:
|
5970
|
-
callStatus:
|
5971
|
-
queueIds:
|
5972
|
-
notes:
|
5960
|
+
type: z75.array(z75.string()).optional(),
|
5961
|
+
status: z75.array(z75.string()).optional(),
|
5962
|
+
callFrom: z75.string().optional(),
|
5963
|
+
callTo: z75.string().optional(),
|
5964
|
+
result: z75.array(z75.string()).optional(),
|
5965
|
+
callTags: z75.array(z75.string()).optional(),
|
5966
|
+
selectedDate: z75.string().optional(),
|
5967
|
+
agentId: z75.string().optional(),
|
5968
|
+
contact: z75.array(z75.string()).optional(),
|
5969
|
+
callStatus: z75.array(z75.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5970
|
+
queueIds: z75.array(z75.string()).optional(),
|
5971
|
+
notes: z75.string().optional()
|
5973
5972
|
});
|
5974
5973
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5975
|
-
|
5976
|
-
page:
|
5977
|
-
pageSize:
|
5974
|
+
z75.object({
|
5975
|
+
page: z75.coerce.number().positive().optional(),
|
5976
|
+
pageSize: z75.coerce.number().positive().optional(),
|
5978
5977
|
// We use this export route for both CDR and Call Log.
|
5979
|
-
module:
|
5978
|
+
module: z75.union([z75.literal("cdrs"), z75.literal("call-logs")]).optional().default("cdrs")
|
5980
5979
|
})
|
5981
5980
|
);
|
5982
5981
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5983
5982
|
var EmtptyArrayUndefined = [[], void 0];
|
5984
5983
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5985
|
-
reportType:
|
5984
|
+
reportType: z75.enum([
|
5986
5985
|
"extcallstatistics",
|
5987
5986
|
"extcallactivity",
|
5988
5987
|
"trunkactivity",
|
@@ -5992,52 +5991,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5992
5991
|
"queueagentmisscalls",
|
5993
5992
|
"queueagentinoutcalls"
|
5994
5993
|
]),
|
5995
|
-
selectedDate:
|
5996
|
-
communicationType:
|
5997
|
-
time:
|
5998
|
-
queueList:
|
5999
|
-
queueId:
|
6000
|
-
trunkList:
|
6001
|
-
extensionList:
|
5994
|
+
selectedDate: z75.string().optional(),
|
5995
|
+
communicationType: z75.union([z75.literal("Inbound"), z75.literal("Outbound"), z75.literal("Internal")]).optional(),
|
5996
|
+
time: z75.string().optional(),
|
5997
|
+
queueList: z75.array(z75.string()).optional(),
|
5998
|
+
queueId: z75.string().optional(),
|
5999
|
+
trunkList: z75.array(z75.string()).optional(),
|
6000
|
+
extensionList: z75.array(z75.string()).optional()
|
6002
6001
|
}).superRefine((input, ctx) => {
|
6003
6002
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
6004
6003
|
ctx.addIssue({
|
6005
|
-
code:
|
6004
|
+
code: z75.ZodIssueCode.custom,
|
6006
6005
|
path: ["selectedDate"],
|
6007
6006
|
message: "selectedDate is required."
|
6008
6007
|
});
|
6009
6008
|
}
|
6010
6009
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
6011
6010
|
ctx.addIssue({
|
6012
|
-
code:
|
6011
|
+
code: z75.ZodIssueCode.custom,
|
6013
6012
|
path: ["time"],
|
6014
6013
|
message: "time is required."
|
6015
6014
|
});
|
6016
6015
|
}
|
6017
6016
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
6018
6017
|
ctx.addIssue({
|
6019
|
-
code:
|
6018
|
+
code: z75.ZodIssueCode.custom,
|
6020
6019
|
path: ["queueList"],
|
6021
6020
|
message: "queueList is required."
|
6022
6021
|
});
|
6023
6022
|
}
|
6024
6023
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
6025
6024
|
ctx.addIssue({
|
6026
|
-
code:
|
6025
|
+
code: z75.ZodIssueCode.custom,
|
6027
6026
|
path: ["queueId"],
|
6028
6027
|
message: "queueId is required."
|
6029
6028
|
});
|
6030
6029
|
}
|
6031
6030
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
6032
6031
|
ctx.addIssue({
|
6033
|
-
code:
|
6032
|
+
code: z75.ZodIssueCode.custom,
|
6034
6033
|
path: ["trunkList"],
|
6035
6034
|
message: "trunkList is required."
|
6036
6035
|
});
|
6037
6036
|
}
|
6038
6037
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
6039
6038
|
ctx.addIssue({
|
6040
|
-
code:
|
6039
|
+
code: z75.ZodIssueCode.custom,
|
6041
6040
|
path: ["extensionList"],
|
6042
6041
|
message: "extensionList is required."
|
6043
6042
|
});
|
@@ -6055,10 +6054,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6055
6054
|
query: GetAllTelephonyCdrSchema,
|
6056
6055
|
responses: {
|
6057
6056
|
200: DefaultSuccessResponseSchema.extend({
|
6058
|
-
total:
|
6059
|
-
page:
|
6060
|
-
pageSize:
|
6061
|
-
telephonyCdrs:
|
6057
|
+
total: z76.number(),
|
6058
|
+
page: z76.number(),
|
6059
|
+
pageSize: z76.number(),
|
6060
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6062
6061
|
}),
|
6063
6062
|
401: DefaultUnauthorizedSchema
|
6064
6063
|
},
|
@@ -6071,10 +6070,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6071
6070
|
query: GetAllTelephonyCdrSchema,
|
6072
6071
|
responses: {
|
6073
6072
|
200: DefaultSuccessResponseSchema.extend({
|
6074
|
-
total:
|
6075
|
-
page:
|
6076
|
-
pageSize:
|
6077
|
-
telephonyCdrs:
|
6073
|
+
total: z76.number(),
|
6074
|
+
page: z76.number(),
|
6075
|
+
pageSize: z76.number(),
|
6076
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6078
6077
|
}),
|
6079
6078
|
401: DefaultUnauthorizedSchema
|
6080
6079
|
},
|
@@ -6087,10 +6086,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6087
6086
|
query: GetRecentTelephonyCdrSchema,
|
6088
6087
|
responses: {
|
6089
6088
|
200: DefaultSuccessResponseSchema.extend({
|
6090
|
-
total:
|
6091
|
-
page:
|
6092
|
-
pageSize:
|
6093
|
-
telephonyCdrs:
|
6089
|
+
total: z76.number(),
|
6090
|
+
page: z76.number(),
|
6091
|
+
pageSize: z76.number(),
|
6092
|
+
telephonyCdrs: z76.array(TelephonyCdrSchema)
|
6094
6093
|
}),
|
6095
6094
|
401: DefaultUnauthorizedSchema
|
6096
6095
|
},
|
@@ -6117,7 +6116,7 @@ var telephonyCdrContract = initContract24().router(
|
|
6117
6116
|
body: GetYeastarCallReportSchema,
|
6118
6117
|
responses: {
|
6119
6118
|
// 200: CallReportSchema,
|
6120
|
-
200:
|
6119
|
+
200: z76.object({}),
|
6121
6120
|
401: DefaultUnauthorizedSchema
|
6122
6121
|
},
|
6123
6122
|
summary: "Get yeastar call report."
|
@@ -6185,10 +6184,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6185
6184
|
headers: DefaultHeaderSchema,
|
6186
6185
|
responses: {
|
6187
6186
|
200: DefaultSuccessResponseSchema.extend({
|
6188
|
-
callRedirectTo:
|
6187
|
+
callRedirectTo: z76.string()
|
6189
6188
|
}),
|
6190
|
-
400:
|
6191
|
-
message:
|
6189
|
+
400: z76.object({
|
6190
|
+
message: z76.string()
|
6192
6191
|
}),
|
6193
6192
|
401: DefaultUnauthorizedSchema,
|
6194
6193
|
500: DefaultErrorResponseSchema
|
@@ -6201,10 +6200,10 @@ var telephonyCdrContract = initContract24().router(
|
|
6201
6200
|
body: TelephonyRedirectSettingSchema,
|
6202
6201
|
responses: {
|
6203
6202
|
200: DefaultSuccessResponseSchema.extend({
|
6204
|
-
callRedirectTo:
|
6203
|
+
callRedirectTo: z76.string()
|
6205
6204
|
}),
|
6206
|
-
400:
|
6207
|
-
message:
|
6205
|
+
400: z76.object({
|
6206
|
+
message: z76.string()
|
6208
6207
|
}),
|
6209
6208
|
401: DefaultUnauthorizedSchema,
|
6210
6209
|
500: DefaultErrorResponseSchema
|
@@ -6216,11 +6215,11 @@ var telephonyCdrContract = initContract24().router(
|
|
6216
6215
|
headers: DefaultHeaderSchema,
|
6217
6216
|
responses: {
|
6218
6217
|
200: DefaultSuccessResponseSchema.extend({
|
6219
|
-
callRedirectTo:
|
6220
|
-
isMultiTabUsed:
|
6218
|
+
callRedirectTo: z76.string(),
|
6219
|
+
isMultiTabUsed: z76.string()
|
6221
6220
|
}),
|
6222
|
-
400:
|
6223
|
-
message:
|
6221
|
+
400: z76.object({
|
6222
|
+
message: z76.string()
|
6224
6223
|
}),
|
6225
6224
|
401: DefaultUnauthorizedSchema,
|
6226
6225
|
500: DefaultErrorResponseSchema
|
@@ -6233,11 +6232,11 @@ var telephonyCdrContract = initContract24().router(
|
|
6233
6232
|
body: CallSettingSchema,
|
6234
6233
|
responses: {
|
6235
6234
|
200: DefaultSuccessResponseSchema.extend({
|
6236
|
-
callRedirectTo:
|
6237
|
-
isMultiTabUsed:
|
6235
|
+
callRedirectTo: z76.string(),
|
6236
|
+
isMultiTabUsed: z76.string()
|
6238
6237
|
}),
|
6239
|
-
400:
|
6240
|
-
message:
|
6238
|
+
400: z76.object({
|
6239
|
+
message: z76.string()
|
6241
6240
|
}),
|
6242
6241
|
401: DefaultUnauthorizedSchema,
|
6243
6242
|
500: DefaultErrorResponseSchema
|
@@ -6249,35 +6248,35 @@ var telephonyCdrContract = initContract24().router(
|
|
6249
6248
|
|
6250
6249
|
// src/telephony-extension/index.ts
|
6251
6250
|
import { initContract as initContract25 } from "@ts-rest/core";
|
6252
|
-
import
|
6251
|
+
import z78 from "zod";
|
6253
6252
|
|
6254
6253
|
// src/telephony-extension/schema.ts
|
6255
|
-
import
|
6256
|
-
var TelephonyExtensionSchema3 =
|
6257
|
-
errcode:
|
6258
|
-
errmsg:
|
6259
|
-
total_number:
|
6260
|
-
data:
|
6261
|
-
|
6262
|
-
id:
|
6263
|
-
online_status:
|
6264
|
-
fx_phone:
|
6265
|
-
sip_phone:
|
6266
|
-
status:
|
6267
|
-
ext_dev_type:
|
6268
|
-
}),
|
6269
|
-
linkus_desktop:
|
6270
|
-
linkus_mobile:
|
6271
|
-
linkus_web:
|
6272
|
-
status:
|
6273
|
-
ext_dev_type:
|
6254
|
+
import z77 from "zod";
|
6255
|
+
var TelephonyExtensionSchema3 = z77.object({
|
6256
|
+
errcode: z77.coerce.number(),
|
6257
|
+
errmsg: z77.string(),
|
6258
|
+
total_number: z77.coerce.number(),
|
6259
|
+
data: z77.array(
|
6260
|
+
z77.object({
|
6261
|
+
id: z77.coerce.number(),
|
6262
|
+
online_status: z77.object({
|
6263
|
+
fx_phone: z77.object({ status: z77.coerce.number() }),
|
6264
|
+
sip_phone: z77.object({
|
6265
|
+
status: z77.coerce.number(),
|
6266
|
+
ext_dev_type: z77.string().optional()
|
6267
|
+
}),
|
6268
|
+
linkus_desktop: z77.object({ status: z77.coerce.number() }),
|
6269
|
+
linkus_mobile: z77.object({ status: z77.coerce.number() }),
|
6270
|
+
linkus_web: z77.object({
|
6271
|
+
status: z77.coerce.number(),
|
6272
|
+
ext_dev_type: z77.string().optional()
|
6274
6273
|
})
|
6275
6274
|
}).optional(),
|
6276
|
-
presence_status:
|
6277
|
-
number:
|
6278
|
-
caller_id_name:
|
6279
|
-
role_name:
|
6280
|
-
email_addr:
|
6275
|
+
presence_status: z77.string().optional(),
|
6276
|
+
number: z77.string().optional(),
|
6277
|
+
caller_id_name: z77.string().optional(),
|
6278
|
+
role_name: z77.string().optional(),
|
6279
|
+
email_addr: z77.string().optional()
|
6281
6280
|
})
|
6282
6281
|
)
|
6283
6282
|
});
|
@@ -6292,8 +6291,8 @@ var telephonyExtensionContract = initContract25().router(
|
|
6292
6291
|
query: null,
|
6293
6292
|
responses: {
|
6294
6293
|
200: TelephonyExtensionSchema3,
|
6295
|
-
400:
|
6296
|
-
message:
|
6294
|
+
400: z78.object({
|
6295
|
+
message: z78.string()
|
6297
6296
|
}),
|
6298
6297
|
401: DefaultUnauthorizedSchema,
|
6299
6298
|
500: DefaultErrorResponseSchema
|
@@ -6306,10 +6305,10 @@ var telephonyExtensionContract = initContract25().router(
|
|
6306
6305
|
|
6307
6306
|
// src/ticket/index.ts
|
6308
6307
|
import { initContract as initContract26 } from "@ts-rest/core";
|
6309
|
-
import
|
6308
|
+
import z80 from "zod";
|
6310
6309
|
|
6311
6310
|
// src/ticket/validation.ts
|
6312
|
-
import
|
6311
|
+
import z79 from "zod";
|
6313
6312
|
var addErrorMessage2 = (field) => {
|
6314
6313
|
return field.refine(
|
6315
6314
|
({ isRequired, value }) => {
|
@@ -6327,108 +6326,108 @@ var addErrorMessage2 = (field) => {
|
|
6327
6326
|
}
|
6328
6327
|
);
|
6329
6328
|
};
|
6330
|
-
var BaseSchema3 =
|
6331
|
-
isRequired:
|
6332
|
-
attributeId:
|
6329
|
+
var BaseSchema3 = z79.object({
|
6330
|
+
isRequired: z79.boolean(),
|
6331
|
+
attributeId: z79.string()
|
6333
6332
|
});
|
6334
6333
|
var SingleValue2 = addErrorMessage2(
|
6335
6334
|
BaseSchema3.extend({
|
6336
|
-
value:
|
6335
|
+
value: z79.string()
|
6337
6336
|
})
|
6338
6337
|
);
|
6339
|
-
var CreateTicketValidationSchema =
|
6338
|
+
var CreateTicketValidationSchema = z79.object({
|
6340
6339
|
title: SingleValue2,
|
6341
6340
|
description: SingleValue2,
|
6342
6341
|
status: SingleValue2,
|
6343
6342
|
type: SingleValue2,
|
6344
6343
|
priority: SingleValue2,
|
6345
6344
|
contact: SingleValue2,
|
6346
|
-
assignee:
|
6347
|
-
isRequired:
|
6348
|
-
attributeId:
|
6349
|
-
value:
|
6345
|
+
assignee: z79.object({
|
6346
|
+
isRequired: z79.boolean(),
|
6347
|
+
attributeId: z79.string(),
|
6348
|
+
value: z79.string()
|
6350
6349
|
}),
|
6351
6350
|
channel: SingleValue2,
|
6352
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
6353
|
-
categories: BaseSchema3.extend({ value:
|
6354
|
-
customFields:
|
6351
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: z79.array(z79.string()) })),
|
6352
|
+
categories: BaseSchema3.extend({ value: z79.array(z79.string()) }),
|
6353
|
+
customFields: z79.array(
|
6355
6354
|
addErrorMessage2(
|
6356
6355
|
BaseSchema3.extend({
|
6357
|
-
value:
|
6358
|
-
type:
|
6359
|
-
isDefaultAttribute:
|
6356
|
+
value: z79.union([z79.string(), z79.array(z79.string())]),
|
6357
|
+
type: z79.string(),
|
6358
|
+
isDefaultAttribute: z79.boolean()
|
6360
6359
|
})
|
6361
6360
|
)
|
6362
6361
|
),
|
6363
|
-
reasonToAssign:
|
6362
|
+
reasonToAssign: z79.object({ value: z79.string() }).optional()
|
6364
6363
|
});
|
6365
6364
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
6366
|
-
var TicketAttachmentRecordSchema =
|
6367
|
-
bucketName:
|
6368
|
-
fileKey:
|
6369
|
-
fileName:
|
6370
|
-
fileSize:
|
6371
|
-
url:
|
6372
|
-
});
|
6373
|
-
var CreateTicketAttachmentRecordsSchema =
|
6374
|
-
ticketId:
|
6375
|
-
attributeId:
|
6376
|
-
ticketAttachmentRecords:
|
6377
|
-
});
|
6378
|
-
var TicketParamsSchema =
|
6379
|
-
page:
|
6380
|
-
pageSize:
|
6381
|
-
});
|
6382
|
-
var CustomFieldQuery =
|
6383
|
-
attributeId:
|
6384
|
-
type:
|
6385
|
-
value:
|
6386
|
-
});
|
6387
|
-
var GetAllTicketQuerySchema =
|
6388
|
-
page:
|
6389
|
-
pageSize:
|
6390
|
-
selectedDate:
|
6391
|
-
ticketNumber:
|
6392
|
-
keyword:
|
6393
|
-
title:
|
6394
|
-
description:
|
6395
|
-
status:
|
6396
|
-
priority:
|
6397
|
-
channel:
|
6398
|
-
type:
|
6399
|
-
ticketType:
|
6400
|
-
contact:
|
6401
|
-
tags:
|
6402
|
-
categories:
|
6403
|
-
assignee:
|
6404
|
-
customFields:
|
6405
|
-
|
6406
|
-
attributeId:
|
6407
|
-
type:
|
6408
|
-
value:
|
6365
|
+
var TicketAttachmentRecordSchema = z79.object({
|
6366
|
+
bucketName: z79.string(),
|
6367
|
+
fileKey: z79.string(),
|
6368
|
+
fileName: z79.string(),
|
6369
|
+
fileSize: z79.coerce.number(),
|
6370
|
+
url: z79.string()
|
6371
|
+
});
|
6372
|
+
var CreateTicketAttachmentRecordsSchema = z79.object({
|
6373
|
+
ticketId: z79.string(),
|
6374
|
+
attributeId: z79.string(),
|
6375
|
+
ticketAttachmentRecords: z79.array(TicketAttachmentRecordSchema)
|
6376
|
+
});
|
6377
|
+
var TicketParamsSchema = z79.object({
|
6378
|
+
page: z79.coerce.number().default(1),
|
6379
|
+
pageSize: z79.coerce.number().default(10)
|
6380
|
+
});
|
6381
|
+
var CustomFieldQuery = z79.object({
|
6382
|
+
attributeId: z79.string(),
|
6383
|
+
type: z79.string(),
|
6384
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6385
|
+
});
|
6386
|
+
var GetAllTicketQuerySchema = z79.object({
|
6387
|
+
page: z79.string().transform((value) => Number(value)),
|
6388
|
+
pageSize: z79.string().transform((value) => Number(value)),
|
6389
|
+
selectedDate: z79.string(),
|
6390
|
+
ticketNumber: z79.string(),
|
6391
|
+
keyword: z79.string(),
|
6392
|
+
title: z79.string(),
|
6393
|
+
description: z79.string(),
|
6394
|
+
status: z79.array(z79.string()),
|
6395
|
+
priority: z79.array(z79.string()),
|
6396
|
+
channel: z79.array(z79.string()),
|
6397
|
+
type: z79.array(z79.string()),
|
6398
|
+
ticketType: z79.array(z79.string()),
|
6399
|
+
contact: z79.array(z79.string()),
|
6400
|
+
tags: z79.array(z79.string().uuid()),
|
6401
|
+
categories: z79.array(z79.string().uuid()),
|
6402
|
+
assignee: z79.array(z79.string().uuid()),
|
6403
|
+
customFields: z79.array(
|
6404
|
+
z79.object({
|
6405
|
+
attributeId: z79.string().uuid(),
|
6406
|
+
type: z79.string(),
|
6407
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6409
6408
|
})
|
6410
6409
|
)
|
6411
6410
|
}).partial();
|
6412
|
-
var ExportAllTicketQuerySchema =
|
6413
|
-
agent:
|
6414
|
-
selectedDate:
|
6415
|
-
keyword:
|
6416
|
-
title:
|
6417
|
-
description:
|
6418
|
-
status:
|
6419
|
-
priority:
|
6420
|
-
assignee:
|
6421
|
-
channel:
|
6422
|
-
type:
|
6423
|
-
ticketType:
|
6424
|
-
contact:
|
6425
|
-
tags:
|
6426
|
-
categories:
|
6427
|
-
customFields:
|
6428
|
-
|
6429
|
-
attributeId:
|
6430
|
-
type:
|
6431
|
-
value:
|
6411
|
+
var ExportAllTicketQuerySchema = z79.object({
|
6412
|
+
agent: z79.array(z79.string()),
|
6413
|
+
selectedDate: z79.string(),
|
6414
|
+
keyword: z79.string(),
|
6415
|
+
title: z79.string(),
|
6416
|
+
description: z79.string(),
|
6417
|
+
status: z79.array(z79.string()),
|
6418
|
+
priority: z79.array(z79.string()),
|
6419
|
+
assignee: z79.array(z79.string().uuid()),
|
6420
|
+
channel: z79.array(z79.string()),
|
6421
|
+
type: z79.array(z79.string()),
|
6422
|
+
ticketType: z79.array(z79.string()),
|
6423
|
+
contact: z79.array(z79.string()),
|
6424
|
+
tags: z79.array(z79.string()),
|
6425
|
+
categories: z79.array(z79.string()),
|
6426
|
+
customFields: z79.array(
|
6427
|
+
z79.object({
|
6428
|
+
attributeId: z79.string().uuid(),
|
6429
|
+
type: z79.string(),
|
6430
|
+
value: z79.union([z79.string(), z79.array(z79.string())])
|
6432
6431
|
})
|
6433
6432
|
)
|
6434
6433
|
}).partial();
|
@@ -6444,14 +6443,14 @@ var ticketContract = initContract26().router(
|
|
6444
6443
|
201: DefaultSuccessResponseSchema.extend({
|
6445
6444
|
data: TicketSchema
|
6446
6445
|
}),
|
6447
|
-
400:
|
6448
|
-
message:
|
6446
|
+
400: z80.object({
|
6447
|
+
message: z80.string()
|
6449
6448
|
}),
|
6450
|
-
409:
|
6451
|
-
message:
|
6449
|
+
409: z80.object({
|
6450
|
+
message: z80.string()
|
6452
6451
|
}),
|
6453
|
-
500:
|
6454
|
-
message:
|
6452
|
+
500: z80.object({
|
6453
|
+
message: z80.string()
|
6455
6454
|
}),
|
6456
6455
|
401: DefaultUnauthorizedSchema,
|
6457
6456
|
404: DefaultNotFoundSchema,
|
@@ -6472,8 +6471,8 @@ var ticketContract = initContract26().router(
|
|
6472
6471
|
TicketSchema
|
6473
6472
|
)
|
6474
6473
|
}),
|
6475
|
-
400:
|
6476
|
-
message:
|
6474
|
+
400: z80.object({
|
6475
|
+
message: z80.string()
|
6477
6476
|
}),
|
6478
6477
|
401: DefaultUnauthorizedSchema,
|
6479
6478
|
500: DefaultErrorResponseSchema
|
@@ -6483,14 +6482,14 @@ var ticketContract = initContract26().router(
|
|
6483
6482
|
getTicketById: {
|
6484
6483
|
method: "GET",
|
6485
6484
|
path: "/:id",
|
6486
|
-
pathParams:
|
6485
|
+
pathParams: z80.object({ id: z80.string() }),
|
6487
6486
|
headers: DefaultHeaderSchema,
|
6488
6487
|
responses: {
|
6489
6488
|
200: DefaultSuccessResponseSchema.extend({
|
6490
6489
|
data: TicketSchema
|
6491
6490
|
}),
|
6492
|
-
400:
|
6493
|
-
message:
|
6491
|
+
400: z80.object({
|
6492
|
+
message: z80.string()
|
6494
6493
|
}),
|
6495
6494
|
401: DefaultUnauthorizedSchema,
|
6496
6495
|
500: DefaultErrorResponseSchema
|
@@ -6500,15 +6499,15 @@ var ticketContract = initContract26().router(
|
|
6500
6499
|
getTicketByContactId: {
|
6501
6500
|
method: "GET",
|
6502
6501
|
path: "/contact/:id",
|
6503
|
-
pathParams:
|
6502
|
+
pathParams: z80.object({ id: z80.string() }),
|
6504
6503
|
query: TicketParamsSchema,
|
6505
6504
|
headers: DefaultHeaderSchema,
|
6506
6505
|
responses: {
|
6507
6506
|
200: DefaultSuccessResponseSchema.extend({
|
6508
6507
|
data: WithPagination(TicketSchema)
|
6509
6508
|
}),
|
6510
|
-
400:
|
6511
|
-
message:
|
6509
|
+
400: z80.object({
|
6510
|
+
message: z80.string()
|
6512
6511
|
}),
|
6513
6512
|
401: DefaultUnauthorizedSchema,
|
6514
6513
|
500: DefaultErrorResponseSchema
|
@@ -6518,21 +6517,21 @@ var ticketContract = initContract26().router(
|
|
6518
6517
|
updateTicket: {
|
6519
6518
|
method: "PATCH",
|
6520
6519
|
path: "/:id",
|
6521
|
-
pathParams:
|
6520
|
+
pathParams: z80.object({ id: z80.string() }),
|
6522
6521
|
body: UpdateTicketValidationSchema,
|
6523
6522
|
headers: DefaultHeaderSchema,
|
6524
6523
|
responses: {
|
6525
6524
|
201: DefaultSuccessResponseSchema.extend({
|
6526
6525
|
data: TicketSchema
|
6527
6526
|
}),
|
6528
|
-
400:
|
6529
|
-
message:
|
6527
|
+
400: z80.object({
|
6528
|
+
message: z80.string()
|
6530
6529
|
}),
|
6531
|
-
409:
|
6532
|
-
message:
|
6530
|
+
409: z80.object({
|
6531
|
+
message: z80.string()
|
6533
6532
|
}),
|
6534
|
-
500:
|
6535
|
-
message:
|
6533
|
+
500: z80.object({
|
6534
|
+
message: z80.string()
|
6536
6535
|
}),
|
6537
6536
|
401: DefaultUnauthorizedSchema,
|
6538
6537
|
404: DefaultNotFoundSchema,
|
@@ -6543,11 +6542,11 @@ var ticketContract = initContract26().router(
|
|
6543
6542
|
deleteTicket: {
|
6544
6543
|
method: "DELETE",
|
6545
6544
|
path: "/:id",
|
6546
|
-
pathParams:
|
6545
|
+
pathParams: z80.object({ id: z80.string() }),
|
6547
6546
|
headers: DefaultHeaderSchema,
|
6548
6547
|
body: null,
|
6549
6548
|
responses: {
|
6550
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6549
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6551
6550
|
500: DefaultErrorResponseSchema
|
6552
6551
|
},
|
6553
6552
|
summary: "Delete a extension."
|
@@ -6555,19 +6554,19 @@ var ticketContract = initContract26().router(
|
|
6555
6554
|
updateDescription: {
|
6556
6555
|
method: "PATCH",
|
6557
6556
|
path: "/description/update/:id",
|
6558
|
-
pathParams:
|
6559
|
-
body:
|
6557
|
+
pathParams: z80.object({ id: z80.string() }),
|
6558
|
+
body: z80.object({ description: z80.string() }),
|
6560
6559
|
headers: DefaultHeaderSchema,
|
6561
6560
|
responses: {
|
6562
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
6563
|
-
400:
|
6564
|
-
message:
|
6561
|
+
201: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6562
|
+
400: z80.object({
|
6563
|
+
message: z80.string()
|
6565
6564
|
}),
|
6566
|
-
409:
|
6567
|
-
message:
|
6565
|
+
409: z80.object({
|
6566
|
+
message: z80.string()
|
6568
6567
|
}),
|
6569
|
-
500:
|
6570
|
-
message:
|
6568
|
+
500: z80.object({
|
6569
|
+
message: z80.string()
|
6571
6570
|
}),
|
6572
6571
|
401: DefaultUnauthorizedSchema,
|
6573
6572
|
404: DefaultNotFoundSchema,
|
@@ -6578,19 +6577,19 @@ var ticketContract = initContract26().router(
|
|
6578
6577
|
updateTitle: {
|
6579
6578
|
method: "PATCH",
|
6580
6579
|
path: "/title/update/:id",
|
6581
|
-
pathParams:
|
6582
|
-
body:
|
6580
|
+
pathParams: z80.object({ id: z80.string() }),
|
6581
|
+
body: z80.object({ title: z80.string() }),
|
6583
6582
|
headers: DefaultHeaderSchema,
|
6584
6583
|
responses: {
|
6585
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6586
|
-
400:
|
6587
|
-
message:
|
6584
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6585
|
+
400: z80.object({
|
6586
|
+
message: z80.string()
|
6588
6587
|
}),
|
6589
|
-
409:
|
6590
|
-
message:
|
6588
|
+
409: z80.object({
|
6589
|
+
message: z80.string()
|
6591
6590
|
}),
|
6592
|
-
500:
|
6593
|
-
message:
|
6591
|
+
500: z80.object({
|
6592
|
+
message: z80.string()
|
6594
6593
|
}),
|
6595
6594
|
401: DefaultUnauthorizedSchema,
|
6596
6595
|
404: DefaultNotFoundSchema,
|
@@ -6601,19 +6600,19 @@ var ticketContract = initContract26().router(
|
|
6601
6600
|
updateType: {
|
6602
6601
|
method: "PATCH",
|
6603
6602
|
path: "/type/update/:id",
|
6604
|
-
pathParams:
|
6605
|
-
body:
|
6603
|
+
pathParams: z80.object({ id: z80.string() }),
|
6604
|
+
body: z80.object({ type: z80.string() }),
|
6606
6605
|
headers: DefaultHeaderSchema,
|
6607
6606
|
responses: {
|
6608
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6609
|
-
400:
|
6610
|
-
message:
|
6607
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6608
|
+
400: z80.object({
|
6609
|
+
message: z80.string()
|
6611
6610
|
}),
|
6612
|
-
409:
|
6613
|
-
message:
|
6611
|
+
409: z80.object({
|
6612
|
+
message: z80.string()
|
6614
6613
|
}),
|
6615
|
-
500:
|
6616
|
-
message:
|
6614
|
+
500: z80.object({
|
6615
|
+
message: z80.string()
|
6617
6616
|
}),
|
6618
6617
|
401: DefaultUnauthorizedSchema,
|
6619
6618
|
404: DefaultNotFoundSchema,
|
@@ -6624,19 +6623,19 @@ var ticketContract = initContract26().router(
|
|
6624
6623
|
updateStatus: {
|
6625
6624
|
method: "PATCH",
|
6626
6625
|
path: "/status/update/:id",
|
6627
|
-
pathParams:
|
6628
|
-
body:
|
6626
|
+
pathParams: z80.object({ id: z80.string() }),
|
6627
|
+
body: z80.object({ status: z80.string() }),
|
6629
6628
|
headers: DefaultHeaderSchema,
|
6630
6629
|
responses: {
|
6631
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6632
|
-
400:
|
6633
|
-
message:
|
6630
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6631
|
+
400: z80.object({
|
6632
|
+
message: z80.string()
|
6634
6633
|
}),
|
6635
|
-
409:
|
6636
|
-
message:
|
6634
|
+
409: z80.object({
|
6635
|
+
message: z80.string()
|
6637
6636
|
}),
|
6638
|
-
500:
|
6639
|
-
message:
|
6637
|
+
500: z80.object({
|
6638
|
+
message: z80.string()
|
6640
6639
|
}),
|
6641
6640
|
401: DefaultUnauthorizedSchema,
|
6642
6641
|
404: DefaultNotFoundSchema,
|
@@ -6647,19 +6646,19 @@ var ticketContract = initContract26().router(
|
|
6647
6646
|
updatePriority: {
|
6648
6647
|
method: "PATCH",
|
6649
6648
|
path: "/priority/update/:id",
|
6650
|
-
pathParams:
|
6651
|
-
body:
|
6649
|
+
pathParams: z80.object({ id: z80.string() }),
|
6650
|
+
body: z80.object({ priority: z80.string() }),
|
6652
6651
|
headers: DefaultHeaderSchema,
|
6653
6652
|
responses: {
|
6654
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6655
|
-
400:
|
6656
|
-
message:
|
6653
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6654
|
+
400: z80.object({
|
6655
|
+
message: z80.string()
|
6657
6656
|
}),
|
6658
|
-
409:
|
6659
|
-
message:
|
6657
|
+
409: z80.object({
|
6658
|
+
message: z80.string()
|
6660
6659
|
}),
|
6661
|
-
500:
|
6662
|
-
message:
|
6660
|
+
500: z80.object({
|
6661
|
+
message: z80.string()
|
6663
6662
|
}),
|
6664
6663
|
401: DefaultUnauthorizedSchema,
|
6665
6664
|
404: DefaultNotFoundSchema,
|
@@ -6670,19 +6669,19 @@ var ticketContract = initContract26().router(
|
|
6670
6669
|
updateChannel: {
|
6671
6670
|
method: "PATCH",
|
6672
6671
|
path: "/channel/update/:id",
|
6673
|
-
pathParams:
|
6674
|
-
body:
|
6672
|
+
pathParams: z80.object({ id: z80.string() }),
|
6673
|
+
body: z80.object({ channel: z80.string() }),
|
6675
6674
|
headers: DefaultHeaderSchema,
|
6676
6675
|
responses: {
|
6677
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6678
|
-
400:
|
6679
|
-
message:
|
6676
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6677
|
+
400: z80.object({
|
6678
|
+
message: z80.string()
|
6680
6679
|
}),
|
6681
|
-
409:
|
6682
|
-
message:
|
6680
|
+
409: z80.object({
|
6681
|
+
message: z80.string()
|
6683
6682
|
}),
|
6684
|
-
500:
|
6685
|
-
message:
|
6683
|
+
500: z80.object({
|
6684
|
+
message: z80.string()
|
6686
6685
|
}),
|
6687
6686
|
401: DefaultUnauthorizedSchema,
|
6688
6687
|
404: DefaultNotFoundSchema,
|
@@ -6693,19 +6692,19 @@ var ticketContract = initContract26().router(
|
|
6693
6692
|
updateTags: {
|
6694
6693
|
method: "PATCH",
|
6695
6694
|
path: "/tags/update/:id",
|
6696
|
-
pathParams:
|
6697
|
-
body:
|
6695
|
+
pathParams: z80.object({ id: z80.string() }),
|
6696
|
+
body: z80.object({ tags: z80.array(z80.string()) }),
|
6698
6697
|
headers: DefaultHeaderSchema,
|
6699
6698
|
responses: {
|
6700
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6701
|
-
400:
|
6702
|
-
message:
|
6699
|
+
200: DefaultSuccessResponseSchema.extend({ message: z80.string() }),
|
6700
|
+
400: z80.object({
|
6701
|
+
message: z80.string()
|
6703
6702
|
}),
|
6704
|
-
409:
|
6705
|
-
message:
|
6703
|
+
409: z80.object({
|
6704
|
+
message: z80.string()
|
6706
6705
|
}),
|
6707
|
-
500:
|
6708
|
-
message:
|
6706
|
+
500: z80.object({
|
6707
|
+
message: z80.string()
|
6709
6708
|
}),
|
6710
6709
|
401: DefaultUnauthorizedSchema,
|
6711
6710
|
404: DefaultNotFoundSchema,
|
@@ -6716,25 +6715,25 @@ var ticketContract = initContract26().router(
|
|
6716
6715
|
changeAssignee: {
|
6717
6716
|
method: "PATCH",
|
6718
6717
|
path: "/assignee/update/:id",
|
6719
|
-
pathParams:
|
6720
|
-
body:
|
6721
|
-
ticketId:
|
6722
|
-
assigneeId:
|
6723
|
-
reason:
|
6718
|
+
pathParams: z80.object({ id: z80.string() }),
|
6719
|
+
body: z80.object({
|
6720
|
+
ticketId: z80.string(),
|
6721
|
+
assigneeId: z80.string(),
|
6722
|
+
reason: z80.string().optional()
|
6724
6723
|
}),
|
6725
6724
|
headers: DefaultHeaderSchema,
|
6726
6725
|
responses: {
|
6727
6726
|
200: DefaultSuccessResponseSchema.extend({
|
6728
6727
|
data: TicketSchema
|
6729
6728
|
}),
|
6730
|
-
400:
|
6731
|
-
message:
|
6729
|
+
400: z80.object({
|
6730
|
+
message: z80.string()
|
6732
6731
|
}),
|
6733
|
-
409:
|
6734
|
-
message:
|
6732
|
+
409: z80.object({
|
6733
|
+
message: z80.string()
|
6735
6734
|
}),
|
6736
|
-
500:
|
6737
|
-
message:
|
6735
|
+
500: z80.object({
|
6736
|
+
message: z80.string()
|
6738
6737
|
}),
|
6739
6738
|
401: DefaultUnauthorizedSchema,
|
6740
6739
|
404: DefaultNotFoundSchema,
|
@@ -6745,14 +6744,14 @@ var ticketContract = initContract26().router(
|
|
6745
6744
|
getTicketCountByContact: {
|
6746
6745
|
method: "GET",
|
6747
6746
|
path: "/ticket_count/contact/:id",
|
6748
|
-
pathParams:
|
6747
|
+
pathParams: z80.object({ id: z80.string() }),
|
6749
6748
|
headers: DefaultHeaderSchema,
|
6750
6749
|
responses: {
|
6751
6750
|
200: DefaultSuccessResponseSchema.extend({
|
6752
6751
|
data: TicketCountByContactSchema
|
6753
6752
|
}),
|
6754
|
-
400:
|
6755
|
-
message:
|
6753
|
+
400: z80.object({
|
6754
|
+
message: z80.string()
|
6756
6755
|
}),
|
6757
6756
|
401: DefaultUnauthorizedSchema,
|
6758
6757
|
500: DefaultErrorResponseSchema
|
@@ -6768,14 +6767,14 @@ var ticketContract = initContract26().router(
|
|
6768
6767
|
201: DefaultSuccessResponseSchema.extend({
|
6769
6768
|
data: TicketCustomFieldSchema
|
6770
6769
|
}),
|
6771
|
-
400:
|
6772
|
-
message:
|
6770
|
+
400: z80.object({
|
6771
|
+
message: z80.string()
|
6773
6772
|
}),
|
6774
|
-
409:
|
6775
|
-
message:
|
6773
|
+
409: z80.object({
|
6774
|
+
message: z80.string()
|
6776
6775
|
}),
|
6777
|
-
500:
|
6778
|
-
message:
|
6776
|
+
500: z80.object({
|
6777
|
+
message: z80.string()
|
6779
6778
|
}),
|
6780
6779
|
401: DefaultUnauthorizedSchema,
|
6781
6780
|
404: DefaultNotFoundSchema,
|
@@ -6802,10 +6801,10 @@ var ticketContract = initContract26().router(
|
|
6802
6801
|
headers: DefaultHeaderSchema,
|
6803
6802
|
responses: {
|
6804
6803
|
200: DefaultSuccessResponseSchema.extend({
|
6805
|
-
ticketReasonRequired:
|
6804
|
+
ticketReasonRequired: z80.string()
|
6806
6805
|
}),
|
6807
|
-
400:
|
6808
|
-
message:
|
6806
|
+
400: z80.object({
|
6807
|
+
message: z80.string()
|
6809
6808
|
}),
|
6810
6809
|
401: DefaultUnauthorizedSchema,
|
6811
6810
|
500: DefaultErrorResponseSchema
|
@@ -6818,10 +6817,10 @@ var ticketContract = initContract26().router(
|
|
6818
6817
|
body: TicketReasonRequiredSchema,
|
6819
6818
|
responses: {
|
6820
6819
|
200: DefaultSuccessResponseSchema.extend({
|
6821
|
-
ticketReasonRequired:
|
6820
|
+
ticketReasonRequired: z80.string()
|
6822
6821
|
}),
|
6823
|
-
400:
|
6824
|
-
message:
|
6822
|
+
400: z80.object({
|
6823
|
+
message: z80.string()
|
6825
6824
|
}),
|
6826
6825
|
401: DefaultUnauthorizedSchema,
|
6827
6826
|
500: DefaultErrorResponseSchema
|
@@ -6833,24 +6832,24 @@ var ticketContract = initContract26().router(
|
|
6833
6832
|
|
6834
6833
|
// src/user/index.ts
|
6835
6834
|
import { initContract as initContract27 } from "@ts-rest/core";
|
6836
|
-
import
|
6835
|
+
import z82 from "zod";
|
6837
6836
|
|
6838
6837
|
// src/user/validation.ts
|
6839
|
-
import { z as
|
6840
|
-
var CreateUserSchema =
|
6841
|
-
name:
|
6842
|
-
email:
|
6843
|
-
address:
|
6844
|
-
phone:
|
6845
|
-
password:
|
6846
|
-
notificationCount:
|
6847
|
-
roles:
|
6838
|
+
import { z as z81 } from "zod";
|
6839
|
+
var CreateUserSchema = z81.object({
|
6840
|
+
name: z81.string(),
|
6841
|
+
email: z81.string().email(),
|
6842
|
+
address: z81.string().nullable(),
|
6843
|
+
phone: z81.string().nullable(),
|
6844
|
+
password: z81.string(),
|
6845
|
+
notificationCount: z81.number().nullable().optional(),
|
6846
|
+
roles: z81.array(z81.string())
|
6848
6847
|
});
|
6849
6848
|
var UpdateUserSchema = CreateUserSchema.extend({
|
6850
|
-
newPassword:
|
6849
|
+
newPassword: z81.string()
|
6851
6850
|
});
|
6852
|
-
var UpdateUserProfileSchema =
|
6853
|
-
password:
|
6851
|
+
var UpdateUserProfileSchema = z81.object({
|
6852
|
+
password: z81.string()
|
6854
6853
|
});
|
6855
6854
|
|
6856
6855
|
// src/user/index.ts
|
@@ -6865,8 +6864,8 @@ var userContract = initContract27().router(
|
|
6865
6864
|
201: DefaultSuccessResponseSchema.extend({
|
6866
6865
|
user: UserSchema
|
6867
6866
|
}),
|
6868
|
-
400:
|
6869
|
-
message:
|
6867
|
+
400: z82.object({
|
6868
|
+
message: z82.string()
|
6870
6869
|
}),
|
6871
6870
|
401: DefaultUnauthorizedSchema,
|
6872
6871
|
404: DefaultNotFoundSchema,
|
@@ -6879,15 +6878,15 @@ var userContract = initContract27().router(
|
|
6879
6878
|
method: "GET",
|
6880
6879
|
path: "/essential",
|
6881
6880
|
headers: DefaultHeaderSchema,
|
6882
|
-
query:
|
6883
|
-
page:
|
6884
|
-
pageSize:
|
6885
|
-
keyword:
|
6881
|
+
query: z82.object({
|
6882
|
+
page: z82.number().optional(),
|
6883
|
+
pageSize: z82.number().optional(),
|
6884
|
+
keyword: z82.string().optional()
|
6886
6885
|
}).optional(),
|
6887
6886
|
responses: {
|
6888
6887
|
200: WithPagination(EssentialUserSchema),
|
6889
|
-
400:
|
6890
|
-
message:
|
6888
|
+
400: z82.object({
|
6889
|
+
message: z82.string()
|
6891
6890
|
}),
|
6892
6891
|
401: DefaultUnauthorizedSchema,
|
6893
6892
|
500: DefaultErrorResponseSchema
|
@@ -6897,16 +6896,16 @@ var userContract = initContract27().router(
|
|
6897
6896
|
method: "GET",
|
6898
6897
|
path: "",
|
6899
6898
|
headers: DefaultHeaderSchema,
|
6900
|
-
query:
|
6901
|
-
page:
|
6902
|
-
pageSize:
|
6899
|
+
query: z82.object({
|
6900
|
+
page: z82.coerce.number().optional(),
|
6901
|
+
pageSize: z82.coerce.number().optional(),
|
6903
6902
|
// Don't add default 10. In some places, we need to fetch all users.
|
6904
|
-
keyword:
|
6903
|
+
keyword: z82.string().optional(),
|
6905
6904
|
// userIds: z.array(z.string()).optional(),
|
6906
|
-
userIds:
|
6907
|
-
|
6905
|
+
userIds: z82.union([
|
6906
|
+
z82.array(z82.string()),
|
6908
6907
|
// If it's an array
|
6909
|
-
|
6908
|
+
z82.record(z82.string())
|
6910
6909
|
// If it's an object
|
6911
6910
|
]).transform((val) => {
|
6912
6911
|
if (Array.isArray(val)) {
|
@@ -6914,12 +6913,12 @@ var userContract = initContract27().router(
|
|
6914
6913
|
}
|
6915
6914
|
return Object.values(val);
|
6916
6915
|
}).optional(),
|
6917
|
-
withPresenceStatus:
|
6916
|
+
withPresenceStatus: z82.string().transform((val) => val === "true").optional()
|
6918
6917
|
}).optional(),
|
6919
6918
|
responses: {
|
6920
6919
|
200: WithPagination(UserSchema),
|
6921
|
-
400:
|
6922
|
-
message:
|
6920
|
+
400: z82.object({
|
6921
|
+
message: z82.string()
|
6923
6922
|
}),
|
6924
6923
|
401: DefaultUnauthorizedSchema,
|
6925
6924
|
500: DefaultErrorResponseSchema
|
@@ -6929,12 +6928,12 @@ var userContract = initContract27().router(
|
|
6929
6928
|
getUserById: {
|
6930
6929
|
method: "GET",
|
6931
6930
|
path: "/:id",
|
6932
|
-
pathParams:
|
6931
|
+
pathParams: z82.object({ id: z82.string() }),
|
6933
6932
|
headers: DefaultHeaderSchema,
|
6934
6933
|
responses: {
|
6935
6934
|
200: UserSchema,
|
6936
|
-
400:
|
6937
|
-
message:
|
6935
|
+
400: z82.object({
|
6936
|
+
message: z82.string()
|
6938
6937
|
}),
|
6939
6938
|
401: DefaultUnauthorizedSchema
|
6940
6939
|
},
|
@@ -6943,15 +6942,15 @@ var userContract = initContract27().router(
|
|
6943
6942
|
updateUser: {
|
6944
6943
|
method: "PATCH",
|
6945
6944
|
path: "/:id",
|
6946
|
-
pathParams:
|
6945
|
+
pathParams: z82.object({ id: z82.string() }),
|
6947
6946
|
headers: DefaultHeaderSchema,
|
6948
6947
|
body: UpdateUserSchema,
|
6949
6948
|
responses: {
|
6950
6949
|
201: DefaultSuccessResponseSchema.extend({
|
6951
6950
|
user: UserSchema
|
6952
6951
|
}),
|
6953
|
-
400:
|
6954
|
-
message:
|
6952
|
+
400: z82.object({
|
6953
|
+
message: z82.string()
|
6955
6954
|
}),
|
6956
6955
|
401: DefaultUnauthorizedSchema,
|
6957
6956
|
404: DefaultNotFoundSchema,
|
@@ -6963,15 +6962,15 @@ var userContract = initContract27().router(
|
|
6963
6962
|
updateUserProfile: {
|
6964
6963
|
method: "PATCH",
|
6965
6964
|
path: "/profile/:id",
|
6966
|
-
pathParams:
|
6965
|
+
pathParams: z82.object({ id: z82.string() }),
|
6967
6966
|
headers: DefaultHeaderSchema,
|
6968
6967
|
body: UpdateUserProfileSchema,
|
6969
6968
|
responses: {
|
6970
6969
|
201: DefaultSuccessResponseSchema.extend({
|
6971
6970
|
user: UserSchema
|
6972
6971
|
}),
|
6973
|
-
400:
|
6974
|
-
message:
|
6972
|
+
400: z82.object({
|
6973
|
+
message: z82.string()
|
6975
6974
|
}),
|
6976
6975
|
401: DefaultUnauthorizedSchema,
|
6977
6976
|
404: DefaultNotFoundSchema,
|
@@ -6983,11 +6982,11 @@ var userContract = initContract27().router(
|
|
6983
6982
|
deleteUser: {
|
6984
6983
|
method: "DELETE",
|
6985
6984
|
path: "/:id",
|
6986
|
-
pathParams:
|
6985
|
+
pathParams: z82.object({ id: z82.string() }),
|
6987
6986
|
headers: DefaultHeaderSchema,
|
6988
6987
|
body: null,
|
6989
6988
|
responses: {
|
6990
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6989
|
+
200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
|
6991
6990
|
404: DefaultNotFoundSchema,
|
6992
6991
|
422: DefaultUnprocessibleSchema,
|
6993
6992
|
500: DefaultErrorResponseSchema
|
@@ -7000,26 +6999,26 @@ var userContract = initContract27().router(
|
|
7000
6999
|
|
7001
7000
|
// src/user-presence-status-log/index.ts
|
7002
7001
|
import { initContract as initContract28 } from "@ts-rest/core";
|
7003
|
-
import
|
7002
|
+
import z85 from "zod";
|
7004
7003
|
|
7005
7004
|
// src/user-presence-status-log/schema.ts
|
7006
|
-
import
|
7005
|
+
import z83 from "zod";
|
7007
7006
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
7008
7007
|
user: UserSchema,
|
7009
7008
|
previousPresenceStatus: PresenceStatusSchema,
|
7010
7009
|
newPresenceStatus: PresenceStatusSchema,
|
7011
|
-
reason:
|
7010
|
+
reason: z83.string()
|
7012
7011
|
});
|
7013
7012
|
|
7014
7013
|
// src/user-presence-status-log/validation.ts
|
7015
|
-
import
|
7016
|
-
var UserPresenceStatusLogParamsSchema =
|
7017
|
-
page:
|
7018
|
-
pageSize:
|
7019
|
-
selectedDate:
|
7014
|
+
import z84 from "zod";
|
7015
|
+
var UserPresenceStatusLogParamsSchema = z84.object({
|
7016
|
+
page: z84.coerce.number().default(1),
|
7017
|
+
pageSize: z84.coerce.number().default(10),
|
7018
|
+
selectedDate: z84.string().optional()
|
7020
7019
|
}).optional();
|
7021
|
-
var UserPresenceStatusLogExportParamsSchema =
|
7022
|
-
selectedDate:
|
7020
|
+
var UserPresenceStatusLogExportParamsSchema = z84.object({
|
7021
|
+
selectedDate: z84.string().optional()
|
7023
7022
|
});
|
7024
7023
|
|
7025
7024
|
// src/user-presence-status-log/index.ts
|
@@ -7032,8 +7031,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7032
7031
|
headers: DefaultHeaderSchema,
|
7033
7032
|
responses: {
|
7034
7033
|
200: WithPagination(UserPresenceStatusLogSchema),
|
7035
|
-
400:
|
7036
|
-
message:
|
7034
|
+
400: z85.object({
|
7035
|
+
message: z85.string()
|
7037
7036
|
}),
|
7038
7037
|
401: DefaultUnauthorizedSchema,
|
7039
7038
|
500: DefaultErrorResponseSchema
|
@@ -7049,8 +7048,8 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7049
7048
|
headers: DefaultHeaderSchema,
|
7050
7049
|
responses: {
|
7051
7050
|
200: null,
|
7052
|
-
400:
|
7053
|
-
message:
|
7051
|
+
400: z85.object({
|
7052
|
+
message: z85.string()
|
7054
7053
|
}),
|
7055
7054
|
401: DefaultUnauthorizedSchema,
|
7056
7055
|
500: DefaultErrorResponseSchema
|
@@ -7062,67 +7061,67 @@ var userPresenceStatusLogContract = initContract28().router(
|
|
7062
7061
|
|
7063
7062
|
// src/widget/index.ts
|
7064
7063
|
import { initContract as initContract29 } from "@ts-rest/core";
|
7065
|
-
import
|
7064
|
+
import z88 from "zod";
|
7066
7065
|
|
7067
7066
|
// src/widget/schema.ts
|
7068
|
-
import
|
7069
|
-
var FieldsSchema =
|
7070
|
-
var WidgetPositionSchema =
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7067
|
+
import z86 from "zod";
|
7068
|
+
var FieldsSchema = z86.object({ data: z86.array(z86.string()) });
|
7069
|
+
var WidgetPositionSchema = z86.union([
|
7070
|
+
z86.literal("menu"),
|
7071
|
+
z86.literal("ticket_detail"),
|
7072
|
+
z86.literal("contact_detail"),
|
7073
|
+
z86.literal("contact_profile"),
|
7074
|
+
z86.literal("inbox_detail")
|
7076
7075
|
]);
|
7077
|
-
var WidgetTypeSchema =
|
7078
|
-
|
7079
|
-
|
7076
|
+
var WidgetTypeSchema = z86.union([
|
7077
|
+
z86.literal("iframe"),
|
7078
|
+
z86.literal("custom")
|
7080
7079
|
]);
|
7081
|
-
var WidgetHeaderSchema =
|
7082
|
-
key:
|
7083
|
-
value:
|
7080
|
+
var WidgetHeaderSchema = z86.object({
|
7081
|
+
key: z86.string(),
|
7082
|
+
value: z86.string()
|
7084
7083
|
});
|
7085
|
-
var WidgetMethodSchema =
|
7086
|
-
|
7087
|
-
|
7084
|
+
var WidgetMethodSchema = z86.union([
|
7085
|
+
z86.literal("get"),
|
7086
|
+
z86.literal("post")
|
7088
7087
|
]);
|
7089
7088
|
var WidgetSchema = DefaultEntitySchema.extend({
|
7090
|
-
name:
|
7091
|
-
description:
|
7089
|
+
name: z86.string(),
|
7090
|
+
description: z86.string().nullable(),
|
7092
7091
|
position: WidgetPositionSchema,
|
7093
7092
|
fields: FieldsSchema,
|
7094
|
-
url:
|
7093
|
+
url: z86.string(),
|
7095
7094
|
type: WidgetTypeSchema.nullable(),
|
7096
|
-
headers:
|
7095
|
+
headers: z86.array(WidgetHeaderSchema).nullable(),
|
7097
7096
|
method: WidgetMethodSchema.nullable(),
|
7098
|
-
fileKey:
|
7099
|
-
fileUrl:
|
7097
|
+
fileKey: z86.string().nullable(),
|
7098
|
+
fileUrl: z86.string().nullable()
|
7100
7099
|
});
|
7101
7100
|
|
7102
7101
|
// src/widget/validation.ts
|
7103
|
-
import
|
7104
|
-
var CreateWidgetSchema =
|
7105
|
-
name:
|
7106
|
-
description:
|
7107
|
-
url:
|
7102
|
+
import z87 from "zod";
|
7103
|
+
var CreateWidgetSchema = z87.object({
|
7104
|
+
name: z87.string(),
|
7105
|
+
description: z87.string().optional(),
|
7106
|
+
url: z87.string(),
|
7108
7107
|
position: WidgetPositionSchema,
|
7109
|
-
fields:
|
7108
|
+
fields: z87.object({
|
7110
7109
|
data: (
|
7111
7110
|
// Array of attribute system names
|
7112
|
-
|
7111
|
+
z87.array(z87.string())
|
7113
7112
|
)
|
7114
7113
|
}).optional(),
|
7115
7114
|
type: WidgetTypeSchema,
|
7116
|
-
headers:
|
7115
|
+
headers: z87.array(WidgetHeaderSchema).optional(),
|
7117
7116
|
method: WidgetMethodSchema.optional(),
|
7118
|
-
fileKey:
|
7117
|
+
fileKey: z87.string().nullable()
|
7119
7118
|
});
|
7120
7119
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
7121
|
-
var GetWidgetUrlPathQuerySchema =
|
7122
|
-
widgetId:
|
7120
|
+
var GetWidgetUrlPathQuerySchema = z87.object({
|
7121
|
+
widgetId: z87.string(),
|
7123
7122
|
// Position ID is ticket ID, contact ID, etc.
|
7124
7123
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
7125
|
-
positionId:
|
7124
|
+
positionId: z87.string()
|
7126
7125
|
});
|
7127
7126
|
|
7128
7127
|
// src/widget/index.ts
|
@@ -7137,8 +7136,8 @@ var widgetContract = initContract29().router(
|
|
7137
7136
|
201: DefaultSuccessResponseSchema.extend({
|
7138
7137
|
widget: WidgetSchema
|
7139
7138
|
}),
|
7140
|
-
400:
|
7141
|
-
message:
|
7139
|
+
400: z88.object({
|
7140
|
+
message: z88.string()
|
7142
7141
|
}),
|
7143
7142
|
401: DefaultUnauthorizedSchema,
|
7144
7143
|
500: DefaultErrorResponseSchema
|
@@ -7148,17 +7147,17 @@ var widgetContract = initContract29().router(
|
|
7148
7147
|
getWidgets: {
|
7149
7148
|
method: "GET",
|
7150
7149
|
path: "",
|
7151
|
-
query:
|
7152
|
-
page:
|
7153
|
-
pageSize:
|
7154
|
-
keyword:
|
7150
|
+
query: z88.object({
|
7151
|
+
page: z88.coerce.number().default(1),
|
7152
|
+
pageSize: z88.coerce.number().default(10),
|
7153
|
+
keyword: z88.coerce.string().optional()
|
7155
7154
|
}).optional(),
|
7156
7155
|
headers: DefaultHeaderSchema,
|
7157
7156
|
responses: {
|
7158
7157
|
200: WithPagination(WidgetSchema),
|
7159
7158
|
500: DefaultErrorResponseSchema,
|
7160
|
-
400:
|
7161
|
-
message:
|
7159
|
+
400: z88.object({
|
7160
|
+
message: z88.string()
|
7162
7161
|
}),
|
7163
7162
|
401: DefaultUnauthorizedSchema
|
7164
7163
|
},
|
@@ -7169,9 +7168,9 @@ var widgetContract = initContract29().router(
|
|
7169
7168
|
path: "/menu",
|
7170
7169
|
headers: DefaultHeaderSchema,
|
7171
7170
|
responses: {
|
7172
|
-
200:
|
7173
|
-
400:
|
7174
|
-
message:
|
7171
|
+
200: z88.array(WidgetSchema),
|
7172
|
+
400: z88.object({
|
7173
|
+
message: z88.string()
|
7175
7174
|
}),
|
7176
7175
|
401: DefaultUnauthorizedSchema,
|
7177
7176
|
500: DefaultErrorResponseSchema
|
@@ -7183,9 +7182,9 @@ var widgetContract = initContract29().router(
|
|
7183
7182
|
path: "/ticket_detail",
|
7184
7183
|
headers: DefaultHeaderSchema,
|
7185
7184
|
responses: {
|
7186
|
-
200:
|
7187
|
-
400:
|
7188
|
-
message:
|
7185
|
+
200: z88.array(WidgetSchema),
|
7186
|
+
400: z88.object({
|
7187
|
+
message: z88.string()
|
7189
7188
|
}),
|
7190
7189
|
401: DefaultUnauthorizedSchema,
|
7191
7190
|
500: DefaultErrorResponseSchema
|
@@ -7197,9 +7196,9 @@ var widgetContract = initContract29().router(
|
|
7197
7196
|
path: "/contact_detail",
|
7198
7197
|
headers: DefaultHeaderSchema,
|
7199
7198
|
responses: {
|
7200
|
-
200:
|
7201
|
-
400:
|
7202
|
-
message:
|
7199
|
+
200: z88.array(WidgetSchema),
|
7200
|
+
400: z88.object({
|
7201
|
+
message: z88.string()
|
7203
7202
|
}),
|
7204
7203
|
401: DefaultUnauthorizedSchema,
|
7205
7204
|
500: DefaultErrorResponseSchema
|
@@ -7211,9 +7210,9 @@ var widgetContract = initContract29().router(
|
|
7211
7210
|
path: "/contact_profile",
|
7212
7211
|
headers: DefaultHeaderSchema,
|
7213
7212
|
responses: {
|
7214
|
-
200:
|
7215
|
-
400:
|
7216
|
-
message:
|
7213
|
+
200: z88.array(WidgetSchema),
|
7214
|
+
400: z88.object({
|
7215
|
+
message: z88.string()
|
7217
7216
|
}),
|
7218
7217
|
401: DefaultUnauthorizedSchema,
|
7219
7218
|
500: DefaultErrorResponseSchema
|
@@ -7225,9 +7224,9 @@ var widgetContract = initContract29().router(
|
|
7225
7224
|
path: "/inbox_detail",
|
7226
7225
|
headers: DefaultHeaderSchema,
|
7227
7226
|
responses: {
|
7228
|
-
200:
|
7229
|
-
400:
|
7230
|
-
message:
|
7227
|
+
200: z88.array(WidgetSchema),
|
7228
|
+
400: z88.object({
|
7229
|
+
message: z88.string()
|
7231
7230
|
}),
|
7232
7231
|
401: DefaultUnauthorizedSchema,
|
7233
7232
|
500: DefaultErrorResponseSchema
|
@@ -7237,12 +7236,12 @@ var widgetContract = initContract29().router(
|
|
7237
7236
|
getWidgetById: {
|
7238
7237
|
method: "GET",
|
7239
7238
|
path: "/:id",
|
7240
|
-
pathParams:
|
7239
|
+
pathParams: z88.object({ id: z88.string() }),
|
7241
7240
|
headers: DefaultHeaderSchema,
|
7242
7241
|
responses: {
|
7243
7242
|
200: WidgetSchema,
|
7244
|
-
400:
|
7245
|
-
message:
|
7243
|
+
400: z88.object({
|
7244
|
+
message: z88.string()
|
7246
7245
|
}),
|
7247
7246
|
401: DefaultUnauthorizedSchema,
|
7248
7247
|
500: DefaultErrorResponseSchema
|
@@ -7256,14 +7255,14 @@ var widgetContract = initContract29().router(
|
|
7256
7255
|
headers: DefaultHeaderSchema,
|
7257
7256
|
responses: {
|
7258
7257
|
201: DefaultSuccessResponseSchema.extend({
|
7259
|
-
widget:
|
7260
|
-
token:
|
7261
|
-
headers:
|
7262
|
-
url:
|
7258
|
+
widget: z88.object({
|
7259
|
+
token: z88.string().nullable(),
|
7260
|
+
headers: z88.array(WidgetHeaderSchema),
|
7261
|
+
url: z88.string()
|
7263
7262
|
})
|
7264
7263
|
}),
|
7265
|
-
400:
|
7266
|
-
message:
|
7264
|
+
400: z88.object({
|
7265
|
+
message: z88.string()
|
7267
7266
|
}),
|
7268
7267
|
401: DefaultUnauthorizedSchema
|
7269
7268
|
},
|
@@ -7272,14 +7271,14 @@ var widgetContract = initContract29().router(
|
|
7272
7271
|
updateWidget: {
|
7273
7272
|
method: "PATCH",
|
7274
7273
|
path: "/:id",
|
7275
|
-
pathParams:
|
7274
|
+
pathParams: z88.object({ id: z88.string() }),
|
7276
7275
|
headers: DefaultHeaderSchema,
|
7277
7276
|
responses: {
|
7278
7277
|
201: DefaultSuccessResponseSchema.extend({
|
7279
7278
|
widget: WidgetSchema
|
7280
7279
|
}),
|
7281
|
-
400:
|
7282
|
-
message:
|
7280
|
+
400: z88.object({
|
7281
|
+
message: z88.string()
|
7283
7282
|
}),
|
7284
7283
|
401: DefaultUnauthorizedSchema
|
7285
7284
|
},
|
@@ -7289,11 +7288,11 @@ var widgetContract = initContract29().router(
|
|
7289
7288
|
deleteWidget: {
|
7290
7289
|
method: "DELETE",
|
7291
7290
|
path: "/:id",
|
7292
|
-
pathParams:
|
7291
|
+
pathParams: z88.object({ id: z88.string() }),
|
7293
7292
|
headers: DefaultHeaderSchema,
|
7294
7293
|
body: null,
|
7295
7294
|
responses: {
|
7296
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
7295
|
+
200: DefaultSuccessResponseSchema.extend({ message: z88.string() }),
|
7297
7296
|
500: DefaultErrorResponseSchema
|
7298
7297
|
},
|
7299
7298
|
summary: "Delete a widget."
|
@@ -7304,35 +7303,35 @@ var widgetContract = initContract29().router(
|
|
7304
7303
|
|
7305
7304
|
// src/wrap-up-form/index.ts
|
7306
7305
|
import { initContract as initContract30 } from "@ts-rest/core";
|
7307
|
-
import
|
7306
|
+
import z90 from "zod";
|
7308
7307
|
|
7309
7308
|
// src/wrap-up-form/validation.ts
|
7310
|
-
import { z as
|
7311
|
-
var CreateWrapUpFormSchema =
|
7312
|
-
note:
|
7313
|
-
disposition:
|
7314
|
-
callFrom:
|
7315
|
-
callTo:
|
7309
|
+
import { z as z89 } from "zod";
|
7310
|
+
var CreateWrapUpFormSchema = z89.object({
|
7311
|
+
note: z89.string().nullable().optional(),
|
7312
|
+
disposition: z89.string().nullable().optional(),
|
7313
|
+
callFrom: z89.string().nullable().optional(),
|
7314
|
+
callTo: z89.string().nullable().optional()
|
7316
7315
|
});
|
7317
7316
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
7318
|
-
cxLogId:
|
7319
|
-
type:
|
7320
|
-
tags:
|
7321
|
-
categoryIds:
|
7322
|
-
customFields:
|
7323
|
-
|
7324
|
-
id:
|
7325
|
-
type:
|
7326
|
-
value:
|
7317
|
+
cxLogId: z89.string().uuid().optional(),
|
7318
|
+
type: z89.string().optional(),
|
7319
|
+
tags: z89.array(z89.string()).optional(),
|
7320
|
+
categoryIds: z89.array(z89.string().uuid()).optional(),
|
7321
|
+
customFields: z89.array(
|
7322
|
+
z89.object({
|
7323
|
+
id: z89.string().uuid(),
|
7324
|
+
type: z89.string(),
|
7325
|
+
value: z89.string()
|
7327
7326
|
})
|
7328
7327
|
).optional(),
|
7329
|
-
durationSeconds:
|
7328
|
+
durationSeconds: z89.number().optional()
|
7330
7329
|
});
|
7331
|
-
var CreateCXLogWrapUpFormSchema =
|
7332
|
-
cxLogId:
|
7333
|
-
disposition:
|
7334
|
-
tagIds:
|
7335
|
-
note:
|
7330
|
+
var CreateCXLogWrapUpFormSchema = z89.object({
|
7331
|
+
cxLogId: z89.string().uuid(),
|
7332
|
+
disposition: z89.string().optional(),
|
7333
|
+
tagIds: z89.array(z89.string().uuid()).optional(),
|
7334
|
+
note: z89.string().optional()
|
7336
7335
|
});
|
7337
7336
|
|
7338
7337
|
// src/wrap-up-form/index.ts
|
@@ -7344,10 +7343,10 @@ var wrapUpFormContract = initContract30().router(
|
|
7344
7343
|
headers: DefaultHeaderSchema,
|
7345
7344
|
responses: {
|
7346
7345
|
200: DefaultSuccessResponseSchema.extend({
|
7347
|
-
wrapUpFormTimer:
|
7346
|
+
wrapUpFormTimer: z90.number()
|
7348
7347
|
}),
|
7349
|
-
400:
|
7350
|
-
message:
|
7348
|
+
400: z90.object({
|
7349
|
+
message: z90.string()
|
7351
7350
|
}),
|
7352
7351
|
401: DefaultUnauthorizedSchema,
|
7353
7352
|
500: DefaultErrorResponseSchema
|
@@ -7356,14 +7355,14 @@ var wrapUpFormContract = initContract30().router(
|
|
7356
7355
|
updateWrapUpFormTimer: {
|
7357
7356
|
method: "PATCH",
|
7358
7357
|
path: "/timer",
|
7359
|
-
body:
|
7358
|
+
body: z90.object({ newWrapUpFormTimer: z90.number().positive() }),
|
7360
7359
|
headers: DefaultHeaderSchema,
|
7361
7360
|
responses: {
|
7362
7361
|
200: DefaultSuccessResponseSchema.extend({
|
7363
|
-
wrapUpFormTimer:
|
7362
|
+
wrapUpFormTimer: z90.number()
|
7364
7363
|
}),
|
7365
|
-
400:
|
7366
|
-
message:
|
7364
|
+
400: z90.object({
|
7365
|
+
message: z90.string()
|
7367
7366
|
}),
|
7368
7367
|
401: DefaultUnauthorizedSchema,
|
7369
7368
|
500: DefaultErrorResponseSchema
|
@@ -7378,8 +7377,8 @@ var wrapUpFormContract = initContract30().router(
|
|
7378
7377
|
201: DefaultSuccessResponseSchema.extend({
|
7379
7378
|
wrapUpForm: WrapUpFormSchema
|
7380
7379
|
}),
|
7381
|
-
400:
|
7382
|
-
message:
|
7380
|
+
400: z90.object({
|
7381
|
+
message: z90.string()
|
7383
7382
|
}),
|
7384
7383
|
401: DefaultUnauthorizedSchema,
|
7385
7384
|
500: DefaultErrorResponseSchema
|
@@ -7401,15 +7400,15 @@ var wrapUpFormContract = initContract30().router(
|
|
7401
7400
|
getWrapUpForms: {
|
7402
7401
|
method: "GET",
|
7403
7402
|
path: "",
|
7404
|
-
query:
|
7405
|
-
page:
|
7406
|
-
pageSize:
|
7403
|
+
query: z90.object({
|
7404
|
+
page: z90.coerce.number().default(1),
|
7405
|
+
pageSize: z90.coerce.number().default(10)
|
7407
7406
|
}).optional(),
|
7408
7407
|
headers: DefaultHeaderSchema,
|
7409
7408
|
responses: {
|
7410
7409
|
200: WithPagination(WrapUpFormSchema),
|
7411
|
-
400:
|
7412
|
-
message:
|
7410
|
+
400: z90.object({
|
7411
|
+
message: z90.string()
|
7413
7412
|
}),
|
7414
7413
|
401: DefaultUnauthorizedSchema,
|
7415
7414
|
500: DefaultErrorResponseSchema
|
@@ -7419,12 +7418,12 @@ var wrapUpFormContract = initContract30().router(
|
|
7419
7418
|
getWrapUpForm: {
|
7420
7419
|
method: "GET",
|
7421
7420
|
path: "/:id",
|
7422
|
-
pathParams:
|
7421
|
+
pathParams: z90.object({ id: z90.string() }),
|
7423
7422
|
headers: DefaultHeaderSchema,
|
7424
7423
|
responses: {
|
7425
7424
|
200: WrapUpFormSchema,
|
7426
|
-
400:
|
7427
|
-
message:
|
7425
|
+
400: z90.object({
|
7426
|
+
message: z90.string()
|
7428
7427
|
}),
|
7429
7428
|
401: DefaultUnauthorizedSchema,
|
7430
7429
|
500: DefaultErrorResponseSchema
|
@@ -7433,15 +7432,15 @@ var wrapUpFormContract = initContract30().router(
|
|
7433
7432
|
updateWrapUpForm: {
|
7434
7433
|
method: "PATCH",
|
7435
7434
|
path: "/:id",
|
7436
|
-
pathParams:
|
7435
|
+
pathParams: z90.object({ id: z90.string() }),
|
7437
7436
|
headers: DefaultHeaderSchema,
|
7438
7437
|
body: UpdateWrapUpFormSchema,
|
7439
7438
|
responses: {
|
7440
7439
|
201: DefaultSuccessResponseSchema.extend({
|
7441
7440
|
wrapUpForm: WrapUpFormSchema
|
7442
7441
|
}),
|
7443
|
-
400:
|
7444
|
-
message:
|
7442
|
+
400: z90.object({
|
7443
|
+
message: z90.string()
|
7445
7444
|
}),
|
7446
7445
|
401: DefaultUnauthorizedSchema,
|
7447
7446
|
500: DefaultErrorResponseSchema
|
@@ -7454,28 +7453,28 @@ var wrapUpFormContract = initContract30().router(
|
|
7454
7453
|
|
7455
7454
|
// src/upload/index.ts
|
7456
7455
|
import { initContract as initContract31 } from "@ts-rest/core";
|
7457
|
-
import
|
7456
|
+
import z91 from "zod";
|
7458
7457
|
var uploadContract = initContract31().router(
|
7459
7458
|
{
|
7460
7459
|
rename: {
|
7461
7460
|
method: "POST",
|
7462
7461
|
path: "/:id/rename",
|
7463
|
-
pathParams:
|
7464
|
-
id:
|
7462
|
+
pathParams: z91.object({
|
7463
|
+
id: z91.string()
|
7465
7464
|
}),
|
7466
7465
|
headers: DefaultHeaderSchema,
|
7467
7466
|
responses: {
|
7468
7467
|
201: DefaultSuccessResponseSchema.extend({
|
7469
|
-
message:
|
7468
|
+
message: z91.string()
|
7470
7469
|
}),
|
7471
|
-
400:
|
7472
|
-
message:
|
7470
|
+
400: z91.object({
|
7471
|
+
message: z91.string()
|
7473
7472
|
}),
|
7474
|
-
409:
|
7475
|
-
message:
|
7473
|
+
409: z91.object({
|
7474
|
+
message: z91.string()
|
7476
7475
|
}),
|
7477
|
-
500:
|
7478
|
-
message:
|
7476
|
+
500: z91.object({
|
7477
|
+
message: z91.string()
|
7479
7478
|
}),
|
7480
7479
|
401: DefaultUnauthorizedSchema,
|
7481
7480
|
404: DefaultNotFoundSchema,
|
@@ -7487,23 +7486,23 @@ var uploadContract = initContract31().router(
|
|
7487
7486
|
delete: {
|
7488
7487
|
method: "DELETE",
|
7489
7488
|
path: "/:id",
|
7490
|
-
pathParams:
|
7491
|
-
id:
|
7489
|
+
pathParams: z91.object({
|
7490
|
+
id: z91.string()
|
7492
7491
|
}),
|
7493
7492
|
headers: DefaultHeaderSchema,
|
7494
7493
|
body: null,
|
7495
7494
|
responses: {
|
7496
7495
|
201: DefaultSuccessResponseSchema.extend({
|
7497
|
-
message:
|
7496
|
+
message: z91.string()
|
7498
7497
|
}),
|
7499
|
-
400:
|
7500
|
-
message:
|
7498
|
+
400: z91.object({
|
7499
|
+
message: z91.string()
|
7501
7500
|
}),
|
7502
|
-
409:
|
7503
|
-
message:
|
7501
|
+
409: z91.object({
|
7502
|
+
message: z91.string()
|
7504
7503
|
}),
|
7505
|
-
500:
|
7506
|
-
message:
|
7504
|
+
500: z91.object({
|
7505
|
+
message: z91.string()
|
7507
7506
|
}),
|
7508
7507
|
401: DefaultUnauthorizedSchema,
|
7509
7508
|
404: DefaultNotFoundSchema,
|
@@ -7518,19 +7517,19 @@ var uploadContract = initContract31().router(
|
|
7518
7517
|
);
|
7519
7518
|
|
7520
7519
|
// src/viber/index.ts
|
7521
|
-
import
|
7520
|
+
import z93 from "zod";
|
7522
7521
|
|
7523
7522
|
// src/viber/validation.ts
|
7524
|
-
import
|
7525
|
-
var ViberChannelSchema =
|
7526
|
-
name:
|
7527
|
-
accessToken:
|
7528
|
-
actor:
|
7529
|
-
id:
|
7530
|
-
name:
|
7531
|
-
email:
|
7532
|
-
address:
|
7533
|
-
phone:
|
7523
|
+
import z92 from "zod";
|
7524
|
+
var ViberChannelSchema = z92.object({
|
7525
|
+
name: z92.string(),
|
7526
|
+
accessToken: z92.string(),
|
7527
|
+
actor: z92.object({
|
7528
|
+
id: z92.string().uuid(),
|
7529
|
+
name: z92.string(),
|
7530
|
+
email: z92.string().email(),
|
7531
|
+
address: z92.string().nullable(),
|
7532
|
+
phone: z92.string().nullable()
|
7534
7533
|
}).optional()
|
7535
7534
|
});
|
7536
7535
|
|
@@ -7559,8 +7558,8 @@ var viberContract = initContract32().router({
|
|
7559
7558
|
}),
|
7560
7559
|
400: DefaultErrorResponseSchema
|
7561
7560
|
},
|
7562
|
-
body:
|
7563
|
-
id:
|
7561
|
+
body: z93.object({
|
7562
|
+
id: z93.string().uuid()
|
7564
7563
|
}),
|
7565
7564
|
summary: "Connect viber channel"
|
7566
7565
|
},
|
@@ -7576,8 +7575,8 @@ var viberContract = initContract32().router({
|
|
7576
7575
|
reconnect: {
|
7577
7576
|
method: "POST",
|
7578
7577
|
path: "/reconnect/:channelId",
|
7579
|
-
pathParams:
|
7580
|
-
channelId:
|
7578
|
+
pathParams: z93.object({
|
7579
|
+
channelId: z93.string().uuid()
|
7581
7580
|
}),
|
7582
7581
|
responses: {
|
7583
7582
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7592,8 +7591,8 @@ var viberContract = initContract32().router({
|
|
7592
7591
|
delete: {
|
7593
7592
|
method: "DELETE",
|
7594
7593
|
path: "/delete/:channelId",
|
7595
|
-
pathParams:
|
7596
|
-
channelId:
|
7594
|
+
pathParams: z93.object({
|
7595
|
+
channelId: z93.string().uuid()
|
7597
7596
|
}),
|
7598
7597
|
body: null,
|
7599
7598
|
responses: {
|
@@ -7605,21 +7604,21 @@ var viberContract = initContract32().router({
|
|
7605
7604
|
});
|
7606
7605
|
|
7607
7606
|
// src/telegram/index.ts
|
7608
|
-
import
|
7607
|
+
import z95 from "zod";
|
7609
7608
|
import { initContract as initContract33 } from "@ts-rest/core";
|
7610
7609
|
|
7611
7610
|
// src/telegram/validation.ts
|
7612
|
-
import
|
7613
|
-
var TelegramChannelSchema =
|
7614
|
-
name:
|
7611
|
+
import z94 from "zod";
|
7612
|
+
var TelegramChannelSchema = z94.object({
|
7613
|
+
name: z94.string(),
|
7615
7614
|
// Telegram bot access token
|
7616
|
-
accessToken:
|
7617
|
-
actor:
|
7618
|
-
id:
|
7619
|
-
name:
|
7620
|
-
email:
|
7621
|
-
address:
|
7622
|
-
phone:
|
7615
|
+
accessToken: z94.string(),
|
7616
|
+
actor: z94.object({
|
7617
|
+
id: z94.string().uuid(),
|
7618
|
+
name: z94.string(),
|
7619
|
+
email: z94.string().email(),
|
7620
|
+
address: z94.string().nullable(),
|
7621
|
+
phone: z94.string().nullable()
|
7623
7622
|
}).optional()
|
7624
7623
|
});
|
7625
7624
|
|
@@ -7646,8 +7645,8 @@ var telegramContract = initContract33().router({
|
|
7646
7645
|
500: DefaultErrorResponseSchema,
|
7647
7646
|
400: DefaultErrorResponseSchema
|
7648
7647
|
},
|
7649
|
-
body:
|
7650
|
-
id:
|
7648
|
+
body: z95.object({
|
7649
|
+
id: z95.string().uuid()
|
7651
7650
|
}),
|
7652
7651
|
summary: "Disconnect telegram channel"
|
7653
7652
|
},
|
@@ -7663,8 +7662,8 @@ var telegramContract = initContract33().router({
|
|
7663
7662
|
reconnect: {
|
7664
7663
|
method: "POST",
|
7665
7664
|
path: "/reconnect/:channelId",
|
7666
|
-
pathParams:
|
7667
|
-
channelId:
|
7665
|
+
pathParams: z95.object({
|
7666
|
+
channelId: z95.string().uuid()
|
7668
7667
|
}),
|
7669
7668
|
body: null,
|
7670
7669
|
responses: {
|
@@ -7677,8 +7676,8 @@ var telegramContract = initContract33().router({
|
|
7677
7676
|
delete: {
|
7678
7677
|
method: "DELETE",
|
7679
7678
|
path: "/delete/:channelId",
|
7680
|
-
pathParams:
|
7681
|
-
channelId:
|
7679
|
+
pathParams: z95.object({
|
7680
|
+
channelId: z95.string().uuid()
|
7682
7681
|
}),
|
7683
7682
|
body: null,
|
7684
7683
|
responses: {
|
@@ -7692,58 +7691,58 @@ var telegramContract = initContract33().router({
|
|
7692
7691
|
|
7693
7692
|
// src/notification/index.ts
|
7694
7693
|
import { initContract as initContract34 } from "@ts-rest/core";
|
7695
|
-
import
|
7694
|
+
import z98 from "zod";
|
7696
7695
|
|
7697
7696
|
// src/notification/validation.ts
|
7698
|
-
import
|
7697
|
+
import z97 from "zod";
|
7699
7698
|
|
7700
7699
|
// src/notification/schema.ts
|
7701
|
-
import
|
7702
|
-
var NotificationChangeSchema =
|
7703
|
-
id:
|
7704
|
-
createdAt:
|
7705
|
-
updatedAt:
|
7706
|
-
deletedAt:
|
7707
|
-
actorId:
|
7700
|
+
import z96 from "zod";
|
7701
|
+
var NotificationChangeSchema = z96.object({
|
7702
|
+
id: z96.string().uuid(),
|
7703
|
+
createdAt: z96.date(),
|
7704
|
+
updatedAt: z96.date(),
|
7705
|
+
deletedAt: z96.date().nullable(),
|
7706
|
+
actorId: z96.string().uuid(),
|
7708
7707
|
actor: UserSchema,
|
7709
|
-
notificationObjectId:
|
7710
|
-
readAt:
|
7711
|
-
});
|
7712
|
-
var NotificationObjectSchema =
|
7713
|
-
id:
|
7714
|
-
createdAt:
|
7715
|
-
updatedAt:
|
7716
|
-
deletedAt:
|
7717
|
-
data:
|
7708
|
+
notificationObjectId: z96.string().uuid(),
|
7709
|
+
readAt: z96.date()
|
7710
|
+
});
|
7711
|
+
var NotificationObjectSchema = z96.object({
|
7712
|
+
id: z96.string().uuid(),
|
7713
|
+
createdAt: z96.date(),
|
7714
|
+
updatedAt: z96.date(),
|
7715
|
+
deletedAt: z96.date().nullable(),
|
7716
|
+
data: z96.string(),
|
7718
7717
|
notificationChange: NotificationChangeSchema
|
7719
7718
|
});
|
7720
|
-
var NotificationSchema =
|
7721
|
-
id:
|
7722
|
-
createdAt:
|
7723
|
-
updatedAt:
|
7724
|
-
deletedAt:
|
7725
|
-
notificationObjectId:
|
7726
|
-
notifierId:
|
7719
|
+
var NotificationSchema = z96.object({
|
7720
|
+
id: z96.string().uuid(),
|
7721
|
+
createdAt: z96.date(),
|
7722
|
+
updatedAt: z96.date(),
|
7723
|
+
deletedAt: z96.date().nullable(),
|
7724
|
+
notificationObjectId: z96.string().uuid(),
|
7725
|
+
notifierId: z96.string().uuid(),
|
7727
7726
|
notificationObject: NotificationObjectSchema,
|
7728
|
-
readAt:
|
7727
|
+
readAt: z96.date()
|
7729
7728
|
});
|
7730
7729
|
|
7731
7730
|
// src/notification/validation.ts
|
7732
|
-
var GetNotificationsRequestSchema =
|
7733
|
-
page:
|
7734
|
-
pageSize:
|
7731
|
+
var GetNotificationsRequestSchema = z97.object({
|
7732
|
+
page: z97.coerce.number().default(1),
|
7733
|
+
pageSize: z97.coerce.number().default(10)
|
7735
7734
|
});
|
7736
|
-
var GetNotificationsResponseSchema =
|
7737
|
-
notificationCount:
|
7738
|
-
notifications:
|
7739
|
-
total:
|
7740
|
-
page:
|
7741
|
-
pageSize:
|
7742
|
-
lastPage:
|
7743
|
-
totalUnreadCount:
|
7735
|
+
var GetNotificationsResponseSchema = z97.object({
|
7736
|
+
notificationCount: z97.number(),
|
7737
|
+
notifications: z97.array(NotificationSchema),
|
7738
|
+
total: z97.number(),
|
7739
|
+
page: z97.number(),
|
7740
|
+
pageSize: z97.number(),
|
7741
|
+
lastPage: z97.number(),
|
7742
|
+
totalUnreadCount: z97.number().optional()
|
7744
7743
|
});
|
7745
|
-
var ResetNotificationRequestSchema =
|
7746
|
-
userId:
|
7744
|
+
var ResetNotificationRequestSchema = z97.object({
|
7745
|
+
userId: z97.string()
|
7747
7746
|
});
|
7748
7747
|
|
7749
7748
|
// src/notification/index.ts
|
@@ -7757,14 +7756,14 @@ var userNotificationContract = initContract34().router(
|
|
7757
7756
|
200: DefaultSuccessResponseSchema.extend({
|
7758
7757
|
data: GetNotificationsResponseSchema
|
7759
7758
|
}),
|
7760
|
-
400:
|
7761
|
-
message:
|
7759
|
+
400: z98.object({
|
7760
|
+
message: z98.string()
|
7762
7761
|
}),
|
7763
|
-
409:
|
7764
|
-
message:
|
7762
|
+
409: z98.object({
|
7763
|
+
message: z98.string()
|
7765
7764
|
}),
|
7766
|
-
500:
|
7767
|
-
message:
|
7765
|
+
500: z98.object({
|
7766
|
+
message: z98.string()
|
7768
7767
|
}),
|
7769
7768
|
401: DefaultUnauthorizedSchema,
|
7770
7769
|
404: DefaultNotFoundSchema,
|
@@ -7777,16 +7776,16 @@ var userNotificationContract = initContract34().router(
|
|
7777
7776
|
path: "/new_notifications_count",
|
7778
7777
|
responses: {
|
7779
7778
|
200: DefaultSuccessResponseSchema.extend({
|
7780
|
-
total:
|
7779
|
+
total: z98.number()
|
7781
7780
|
}),
|
7782
|
-
400:
|
7783
|
-
message:
|
7781
|
+
400: z98.object({
|
7782
|
+
message: z98.string()
|
7784
7783
|
}),
|
7785
|
-
409:
|
7786
|
-
message:
|
7784
|
+
409: z98.object({
|
7785
|
+
message: z98.string()
|
7787
7786
|
}),
|
7788
|
-
500:
|
7789
|
-
message:
|
7787
|
+
500: z98.object({
|
7788
|
+
message: z98.string()
|
7790
7789
|
}),
|
7791
7790
|
401: DefaultUnauthorizedSchema,
|
7792
7791
|
404: DefaultNotFoundSchema,
|
@@ -7801,14 +7800,14 @@ var userNotificationContract = initContract34().router(
|
|
7801
7800
|
201: DefaultSuccessResponseSchema.extend({
|
7802
7801
|
data: UserSchema
|
7803
7802
|
}),
|
7804
|
-
400:
|
7805
|
-
message:
|
7803
|
+
400: z98.object({
|
7804
|
+
message: z98.string()
|
7806
7805
|
}),
|
7807
|
-
409:
|
7808
|
-
message:
|
7806
|
+
409: z98.object({
|
7807
|
+
message: z98.string()
|
7809
7808
|
}),
|
7810
|
-
500:
|
7811
|
-
message:
|
7809
|
+
500: z98.object({
|
7810
|
+
message: z98.string()
|
7812
7811
|
}),
|
7813
7812
|
401: DefaultUnauthorizedSchema,
|
7814
7813
|
404: DefaultNotFoundSchema,
|
@@ -7820,19 +7819,19 @@ var userNotificationContract = initContract34().router(
|
|
7820
7819
|
readNotification: {
|
7821
7820
|
method: "POST",
|
7822
7821
|
path: "/read/:id",
|
7823
|
-
pathParams:
|
7822
|
+
pathParams: z98.object({ id: z98.string() }),
|
7824
7823
|
responses: {
|
7825
7824
|
201: DefaultSuccessResponseSchema.extend({
|
7826
7825
|
data: NotificationSchema
|
7827
7826
|
}),
|
7828
|
-
400:
|
7829
|
-
message:
|
7827
|
+
400: z98.object({
|
7828
|
+
message: z98.string()
|
7830
7829
|
}),
|
7831
|
-
409:
|
7832
|
-
message:
|
7830
|
+
409: z98.object({
|
7831
|
+
message: z98.string()
|
7833
7832
|
}),
|
7834
|
-
500:
|
7835
|
-
message:
|
7833
|
+
500: z98.object({
|
7834
|
+
message: z98.string()
|
7836
7835
|
}),
|
7837
7836
|
401: DefaultUnauthorizedSchema,
|
7838
7837
|
404: DefaultNotFoundSchema,
|
@@ -7849,63 +7848,63 @@ var userNotificationContract = initContract34().router(
|
|
7849
7848
|
|
7850
7849
|
// src/snippet/index.ts
|
7851
7850
|
import { initContract as initContract35 } from "@ts-rest/core";
|
7852
|
-
import { z as
|
7851
|
+
import { z as z101 } from "zod";
|
7853
7852
|
|
7854
7853
|
// src/snippet/schema.ts
|
7855
|
-
import
|
7854
|
+
import z99 from "zod";
|
7856
7855
|
var SnippetGroupSchema = DefaultEntitySchema.extend({
|
7857
|
-
name:
|
7858
|
-
platformType:
|
7856
|
+
name: z99.string(),
|
7857
|
+
platformType: z99.string()
|
7859
7858
|
});
|
7860
7859
|
var SnippetContentSchema = DefaultEntitySchema.extend({
|
7861
|
-
contentType:
|
7862
|
-
contentValue:
|
7863
|
-
contentTemplate:
|
7864
|
-
order:
|
7860
|
+
contentType: z99.string(),
|
7861
|
+
contentValue: z99.string().nullable(),
|
7862
|
+
contentTemplate: z99.any().nullable(),
|
7863
|
+
order: z99.number(),
|
7865
7864
|
upload: UploadSchema.nullable()
|
7866
7865
|
});
|
7867
7866
|
var SnippetSchema = DefaultEntitySchema.extend({
|
7868
|
-
name:
|
7867
|
+
name: z99.string(),
|
7869
7868
|
snippetGroup: SnippetGroupSchema,
|
7870
7869
|
snippetContent: SnippetContentSchema
|
7871
7870
|
});
|
7872
|
-
var SnippetGroupListItemSchema =
|
7873
|
-
id:
|
7874
|
-
name:
|
7871
|
+
var SnippetGroupListItemSchema = z99.object({
|
7872
|
+
id: z99.string().uuid(),
|
7873
|
+
name: z99.string()
|
7875
7874
|
});
|
7876
|
-
var SnippetListItemSchema =
|
7877
|
-
id:
|
7878
|
-
shortCutName:
|
7879
|
-
contentType:
|
7880
|
-
contentValue:
|
7881
|
-
snippetGroupId:
|
7875
|
+
var SnippetListItemSchema = z99.object({
|
7876
|
+
id: z99.string().uuid(),
|
7877
|
+
shortCutName: z99.string(),
|
7878
|
+
contentType: z99.string(),
|
7879
|
+
contentValue: z99.string().nullable(),
|
7880
|
+
snippetGroupId: z99.string()
|
7882
7881
|
});
|
7883
7882
|
|
7884
7883
|
// src/snippet/validation.ts
|
7885
|
-
import { z as
|
7886
|
-
var CreateSnippetGroupSchema =
|
7887
|
-
name:
|
7888
|
-
platformType:
|
7884
|
+
import { z as z100 } from "zod";
|
7885
|
+
var CreateSnippetGroupSchema = z100.object({
|
7886
|
+
name: z100.string(),
|
7887
|
+
platformType: z100.string()
|
7889
7888
|
});
|
7890
|
-
var UpdateSnippetGroupSchema =
|
7891
|
-
name:
|
7892
|
-
platformType:
|
7889
|
+
var UpdateSnippetGroupSchema = z100.object({
|
7890
|
+
name: z100.string().optional(),
|
7891
|
+
platformType: z100.string().optional()
|
7893
7892
|
});
|
7894
|
-
var DeleteSnippetGroupSchema =
|
7895
|
-
id:
|
7893
|
+
var DeleteSnippetGroupSchema = z100.object({
|
7894
|
+
id: z100.string()
|
7896
7895
|
});
|
7897
|
-
var CreateSnippetSchema =
|
7898
|
-
shortcutName:
|
7899
|
-
contentType:
|
7900
|
-
contentValue:
|
7901
|
-
snippetGroupId:
|
7902
|
-
platformType:
|
7896
|
+
var CreateSnippetSchema = z100.object({
|
7897
|
+
shortcutName: z100.string(),
|
7898
|
+
contentType: z100.string(),
|
7899
|
+
contentValue: z100.string().optional(),
|
7900
|
+
snippetGroupId: z100.string(),
|
7901
|
+
platformType: z100.string()
|
7903
7902
|
});
|
7904
7903
|
var UpdateSnippetSchema = CreateSnippetSchema.extend({
|
7905
|
-
snippetContentId:
|
7904
|
+
snippetContentId: z100.string()
|
7906
7905
|
});
|
7907
|
-
var DeleteSnippetSchema =
|
7908
|
-
snippetId:
|
7906
|
+
var DeleteSnippetSchema = z100.object({
|
7907
|
+
snippetId: z100.string()
|
7909
7908
|
});
|
7910
7909
|
|
7911
7910
|
// src/snippet/index.ts
|
@@ -7928,7 +7927,7 @@ var snippetContract = initContract35().router(
|
|
7928
7927
|
query: null,
|
7929
7928
|
responses: {
|
7930
7929
|
200: DefaultSuccessResponseSchema.extend({
|
7931
|
-
snippetgroups:
|
7930
|
+
snippetgroups: z101.array(SnippetGroupSchema)
|
7932
7931
|
}),
|
7933
7932
|
500: DefaultErrorResponseSchema
|
7934
7933
|
}
|
@@ -7936,7 +7935,7 @@ var snippetContract = initContract35().router(
|
|
7936
7935
|
updateSnippetGroup: {
|
7937
7936
|
method: "PATCH",
|
7938
7937
|
path: "/groups/:id",
|
7939
|
-
pathParams:
|
7938
|
+
pathParams: z101.object({ id: z101.string() }),
|
7940
7939
|
body: UpdateSnippetGroupSchema,
|
7941
7940
|
responses: {
|
7942
7941
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7948,7 +7947,7 @@ var snippetContract = initContract35().router(
|
|
7948
7947
|
deleteSnippetGroup: {
|
7949
7948
|
method: "DELETE",
|
7950
7949
|
path: "/groups/:id",
|
7951
|
-
pathParams:
|
7950
|
+
pathParams: z101.object({ id: z101.string() }),
|
7952
7951
|
body: null,
|
7953
7952
|
responses: {
|
7954
7953
|
200: DefaultSuccessResponseSchema,
|
@@ -7960,7 +7959,7 @@ var snippetContract = initContract35().router(
|
|
7960
7959
|
path: "",
|
7961
7960
|
responses: {
|
7962
7961
|
200: DefaultSuccessResponseSchema.extend({
|
7963
|
-
snippets:
|
7962
|
+
snippets: z101.array(SnippetSchema)
|
7964
7963
|
}),
|
7965
7964
|
500: DefaultErrorResponseSchema
|
7966
7965
|
}
|
@@ -7979,7 +7978,7 @@ var snippetContract = initContract35().router(
|
|
7979
7978
|
updateSnippet: {
|
7980
7979
|
method: "PATCH",
|
7981
7980
|
path: "/:id",
|
7982
|
-
pathParams:
|
7981
|
+
pathParams: z101.object({ id: z101.string() }),
|
7983
7982
|
body: UpdateSnippetSchema,
|
7984
7983
|
responses: {
|
7985
7984
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -7991,7 +7990,7 @@ var snippetContract = initContract35().router(
|
|
7991
7990
|
deleteSnippet: {
|
7992
7991
|
method: "DELETE",
|
7993
7992
|
path: "/:id",
|
7994
|
-
pathParams:
|
7993
|
+
pathParams: z101.object({ id: z101.string() }),
|
7995
7994
|
body: null,
|
7996
7995
|
responses: {
|
7997
7996
|
200: DefaultSuccessResponseSchema,
|
@@ -8008,77 +8007,77 @@ var snippetContract = initContract35().router(
|
|
8008
8007
|
import { initContract as initContract36 } from "@ts-rest/core";
|
8009
8008
|
|
8010
8009
|
// src/business-calendar/validation.ts
|
8011
|
-
import
|
8012
|
-
var TimeSlotDataSchema =
|
8013
|
-
var CreateBusinessHourSchema =
|
8014
|
-
day:
|
8015
|
-
isEnabled:
|
8010
|
+
import z102 from "zod";
|
8011
|
+
var TimeSlotDataSchema = z102.any();
|
8012
|
+
var CreateBusinessHourSchema = z102.object({
|
8013
|
+
day: z102.string(),
|
8014
|
+
isEnabled: z102.boolean(),
|
8016
8015
|
timeSlots: TimeSlotDataSchema
|
8017
8016
|
}).array();
|
8018
|
-
var UpdateBusinessHourSchema =
|
8019
|
-
id:
|
8020
|
-
day:
|
8021
|
-
isEnabled:
|
8017
|
+
var UpdateBusinessHourSchema = z102.object({
|
8018
|
+
id: z102.string(),
|
8019
|
+
day: z102.string(),
|
8020
|
+
isEnabled: z102.boolean(),
|
8022
8021
|
timeSlots: TimeSlotDataSchema
|
8023
8022
|
}).array();
|
8024
|
-
var CreateHolidaySchema =
|
8025
|
-
name:
|
8026
|
-
date:
|
8027
|
-
isEnabled:
|
8023
|
+
var CreateHolidaySchema = z102.object({
|
8024
|
+
name: z102.string(),
|
8025
|
+
date: z102.string(),
|
8026
|
+
isEnabled: z102.boolean()
|
8028
8027
|
}).array();
|
8029
|
-
var UpdateHolidaySchema =
|
8030
|
-
id:
|
8031
|
-
name:
|
8032
|
-
date:
|
8033
|
-
isEnabled:
|
8028
|
+
var UpdateHolidaySchema = z102.object({
|
8029
|
+
id: z102.string().optional(),
|
8030
|
+
name: z102.string(),
|
8031
|
+
date: z102.string(),
|
8032
|
+
isEnabled: z102.boolean()
|
8034
8033
|
}).array();
|
8035
|
-
var CreateBusinessCalendarSchema =
|
8036
|
-
name:
|
8037
|
-
description:
|
8038
|
-
timeZone:
|
8039
|
-
isEnabled:
|
8034
|
+
var CreateBusinessCalendarSchema = z102.object({
|
8035
|
+
name: z102.string(),
|
8036
|
+
description: z102.string().optional(),
|
8037
|
+
timeZone: z102.string(),
|
8038
|
+
isEnabled: z102.boolean(),
|
8040
8039
|
businessHours: CreateBusinessHourSchema,
|
8041
8040
|
holidays: CreateHolidaySchema
|
8042
8041
|
});
|
8043
|
-
var UpdateBusinessCalendarSchema =
|
8044
|
-
id:
|
8045
|
-
name:
|
8046
|
-
description:
|
8047
|
-
timeZone:
|
8048
|
-
isEnabled:
|
8042
|
+
var UpdateBusinessCalendarSchema = z102.object({
|
8043
|
+
id: z102.string(),
|
8044
|
+
name: z102.string(),
|
8045
|
+
description: z102.string().optional(),
|
8046
|
+
timeZone: z102.string(),
|
8047
|
+
isEnabled: z102.boolean(),
|
8049
8048
|
businessHours: UpdateBusinessHourSchema,
|
8050
8049
|
holidays: UpdateHolidaySchema
|
8051
8050
|
});
|
8052
|
-
var DeleteBusinessCalendarSchema =
|
8053
|
-
id:
|
8051
|
+
var DeleteBusinessCalendarSchema = z102.object({
|
8052
|
+
id: z102.string()
|
8054
8053
|
});
|
8055
8054
|
|
8056
8055
|
// src/business-calendar/schema.ts
|
8057
|
-
import
|
8058
|
-
var TimeSlotDataSchema2 =
|
8056
|
+
import z103 from "zod";
|
8057
|
+
var TimeSlotDataSchema2 = z103.any();
|
8059
8058
|
var BusinessHourSchema = DefaultEntitySchema.extend({
|
8060
|
-
day:
|
8061
|
-
isEnabled:
|
8059
|
+
day: z103.string(),
|
8060
|
+
isEnabled: z103.boolean(),
|
8062
8061
|
timeSlots: TimeSlotDataSchema2
|
8063
8062
|
});
|
8064
8063
|
var HolidaySchema = DefaultEntitySchema.extend({
|
8065
|
-
name:
|
8066
|
-
date:
|
8067
|
-
isEnabled:
|
8068
|
-
isDefault:
|
8064
|
+
name: z103.string(),
|
8065
|
+
date: z103.string(),
|
8066
|
+
isEnabled: z103.boolean(),
|
8067
|
+
isDefault: z103.boolean()
|
8069
8068
|
});
|
8070
8069
|
var BusinessCalendarSchema = DefaultEntitySchema.extend({
|
8071
|
-
name:
|
8072
|
-
description:
|
8073
|
-
timeZone:
|
8074
|
-
isEnabled:
|
8075
|
-
isDefault:
|
8070
|
+
name: z103.string(),
|
8071
|
+
description: z103.string().optional(),
|
8072
|
+
timeZone: z103.string(),
|
8073
|
+
isEnabled: z103.boolean(),
|
8074
|
+
isDefault: z103.boolean(),
|
8076
8075
|
businessHours: BusinessHourSchema.array(),
|
8077
8076
|
holidays: HolidaySchema.array()
|
8078
8077
|
});
|
8079
8078
|
|
8080
8079
|
// src/business-calendar/index.ts
|
8081
|
-
import
|
8080
|
+
import z104 from "zod";
|
8082
8081
|
var businessCalendarContract = initContract36().router(
|
8083
8082
|
{
|
8084
8083
|
createBusinessCalendar: {
|
@@ -8105,7 +8104,7 @@ var businessCalendarContract = initContract36().router(
|
|
8105
8104
|
updateBusinessCalendar: {
|
8106
8105
|
method: "POST",
|
8107
8106
|
path: "/:id",
|
8108
|
-
pathParams:
|
8107
|
+
pathParams: z104.object({ id: z104.string() }),
|
8109
8108
|
body: UpdateBusinessCalendarSchema,
|
8110
8109
|
responses: {
|
8111
8110
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -8117,7 +8116,7 @@ var businessCalendarContract = initContract36().router(
|
|
8117
8116
|
deleteBusinessCalendar: {
|
8118
8117
|
method: "DELETE",
|
8119
8118
|
path: "/:id",
|
8120
|
-
pathParams:
|
8119
|
+
pathParams: z104.object({ id: z104.string() }),
|
8121
8120
|
body: null,
|
8122
8121
|
responses: {
|
8123
8122
|
200: DefaultSuccessResponseSchema,
|
@@ -8134,73 +8133,73 @@ var businessCalendarContract = initContract36().router(
|
|
8134
8133
|
import { initContract as initContract37 } from "@ts-rest/core";
|
8135
8134
|
|
8136
8135
|
// src/facebook-feed/validation.ts
|
8137
|
-
import
|
8138
|
-
var GetFacebookPagesSchema2 =
|
8139
|
-
data:
|
8140
|
-
|
8136
|
+
import z105 from "zod";
|
8137
|
+
var GetFacebookPagesSchema2 = z105.object({
|
8138
|
+
data: z105.array(
|
8139
|
+
z105.object({
|
8141
8140
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
8142
|
-
access_token:
|
8143
|
-
category:
|
8141
|
+
access_token: z105.string(),
|
8142
|
+
category: z105.string(),
|
8144
8143
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
8145
|
-
category_list:
|
8146
|
-
|
8147
|
-
id:
|
8148
|
-
name:
|
8144
|
+
category_list: z105.array(
|
8145
|
+
z105.object({
|
8146
|
+
id: z105.string(),
|
8147
|
+
name: z105.string()
|
8149
8148
|
})
|
8150
8149
|
),
|
8151
|
-
id:
|
8152
|
-
name:
|
8153
|
-
tasks:
|
8150
|
+
id: z105.string(),
|
8151
|
+
name: z105.string(),
|
8152
|
+
tasks: z105.string().array()
|
8154
8153
|
})
|
8155
8154
|
),
|
8156
|
-
paging:
|
8157
|
-
cursors:
|
8158
|
-
before:
|
8159
|
-
after:
|
8155
|
+
paging: z105.object({
|
8156
|
+
cursors: z105.object({
|
8157
|
+
before: z105.string().optional(),
|
8158
|
+
after: z105.string().optional()
|
8160
8159
|
})
|
8161
8160
|
}).optional()
|
8162
8161
|
});
|
8163
|
-
var GetFacebookPagesQuerySchema2 =
|
8164
|
-
accessToken:
|
8165
|
-
userId:
|
8162
|
+
var GetFacebookPagesQuerySchema2 = z105.object({
|
8163
|
+
accessToken: z105.string(),
|
8164
|
+
userId: z105.string()
|
8166
8165
|
});
|
8167
8166
|
var ReconnectFacebookFeedSchema = ChannelSchema.merge(
|
8168
|
-
|
8169
|
-
isReloginRequired:
|
8170
|
-
platformContacts:
|
8171
|
-
id:
|
8172
|
-
name:
|
8173
|
-
createdAt:
|
8174
|
-
updatedAt:
|
8175
|
-
deletedAt:
|
8167
|
+
z105.object({
|
8168
|
+
isReloginRequired: z105.boolean(),
|
8169
|
+
platformContacts: z105.array(PlatformContactSchema),
|
8170
|
+
id: z105.string().uuid(),
|
8171
|
+
name: z105.string(),
|
8172
|
+
createdAt: z105.date(),
|
8173
|
+
updatedAt: z105.date(),
|
8174
|
+
deletedAt: z105.date().nullable()
|
8176
8175
|
})
|
8177
8176
|
);
|
8178
|
-
var GetFeedPostResponseSchema =
|
8179
|
-
id:
|
8180
|
-
message:
|
8181
|
-
created_time:
|
8182
|
-
can_reply_privately:
|
8183
|
-
from:
|
8184
|
-
permalink_url:
|
8185
|
-
attachments:
|
8186
|
-
data:
|
8187
|
-
|
8188
|
-
media:
|
8189
|
-
image:
|
8190
|
-
height:
|
8191
|
-
src:
|
8192
|
-
width:
|
8177
|
+
var GetFeedPostResponseSchema = z105.object({
|
8178
|
+
id: z105.string(),
|
8179
|
+
message: z105.string(),
|
8180
|
+
created_time: z105.string(),
|
8181
|
+
can_reply_privately: z105.boolean(),
|
8182
|
+
from: z105.object({ name: z105.string(), id: z105.string() }),
|
8183
|
+
permalink_url: z105.string(),
|
8184
|
+
attachments: z105.object({
|
8185
|
+
data: z105.array(
|
8186
|
+
z105.object({
|
8187
|
+
media: z105.object({
|
8188
|
+
image: z105.object({
|
8189
|
+
height: z105.number(),
|
8190
|
+
src: z105.string(),
|
8191
|
+
width: z105.number()
|
8193
8192
|
})
|
8194
8193
|
}),
|
8195
|
-
media_type:
|
8196
|
-
url:
|
8194
|
+
media_type: z105.string(),
|
8195
|
+
url: z105.string()
|
8197
8196
|
})
|
8198
8197
|
)
|
8199
8198
|
})
|
8200
8199
|
});
|
8201
8200
|
|
8202
8201
|
// src/facebook-feed/index.ts
|
8203
|
-
import
|
8202
|
+
import z106 from "zod";
|
8204
8203
|
var facebookFeedContract = initContract37().router({
|
8205
8204
|
connectToService: {
|
8206
8205
|
method: "POST",
|
@@ -8225,8 +8224,8 @@ var facebookFeedContract = initContract37().router({
|
|
8225
8224
|
reconnect: {
|
8226
8225
|
method: "POST",
|
8227
8226
|
path: "/reconnect/:channelId",
|
8228
|
-
pathParams:
|
8229
|
-
channelId:
|
8227
|
+
pathParams: z106.object({
|
8228
|
+
channelId: z106.string().uuid()
|
8230
8229
|
}),
|
8231
8230
|
body: null,
|
8232
8231
|
responses: {
|
@@ -8238,8 +8237,8 @@ var facebookFeedContract = initContract37().router({
|
|
8238
8237
|
delete: {
|
8239
8238
|
method: "DELETE",
|
8240
8239
|
path: "/delete/:channelId",
|
8241
|
-
pathParams:
|
8242
|
-
channelId:
|
8240
|
+
pathParams: z106.object({
|
8241
|
+
channelId: z106.string().uuid()
|
8243
8242
|
}),
|
8244
8243
|
body: null,
|
8245
8244
|
responses: {
|
@@ -8291,168 +8290,168 @@ var facebookFeedContract = initContract37().router({
|
|
8291
8290
|
|
8292
8291
|
// src/public-api/index.ts
|
8293
8292
|
import { initContract as initContract38 } from "@ts-rest/core";
|
8294
|
-
import
|
8293
|
+
import z109 from "zod";
|
8295
8294
|
|
8296
8295
|
// src/public-api/validation.ts
|
8297
|
-
import
|
8296
|
+
import z108 from "zod";
|
8298
8297
|
|
8299
8298
|
// src/public-api/schema.ts
|
8300
|
-
import
|
8301
|
-
var ContactPhonesSchema2 =
|
8302
|
-
id:
|
8303
|
-
createdAt:
|
8304
|
-
updatedAt:
|
8305
|
-
deletedAt:
|
8306
|
-
phone:
|
8307
|
-
isPrimary:
|
8308
|
-
});
|
8309
|
-
var ContactEmailsSchema2 =
|
8310
|
-
id:
|
8311
|
-
createdAt:
|
8312
|
-
updatedAt:
|
8313
|
-
deletedAt:
|
8314
|
-
email:
|
8315
|
-
isPrimary:
|
8316
|
-
});
|
8317
|
-
var ContactCustomFieldSchema2 =
|
8318
|
-
id:
|
8319
|
-
createdAt:
|
8320
|
-
updatedAt:
|
8321
|
-
deletedAt:
|
8322
|
-
textValue:
|
8323
|
-
booleanValue:
|
8324
|
-
numberValue:
|
8325
|
-
dateValue:
|
8299
|
+
import z107 from "zod";
|
8300
|
+
var ContactPhonesSchema2 = z107.object({
|
8301
|
+
id: z107.string().uuid(),
|
8302
|
+
createdAt: z107.date(),
|
8303
|
+
updatedAt: z107.date(),
|
8304
|
+
deletedAt: z107.date().nullable(),
|
8305
|
+
phone: z107.string(),
|
8306
|
+
isPrimary: z107.boolean()
|
8307
|
+
});
|
8308
|
+
var ContactEmailsSchema2 = z107.object({
|
8309
|
+
id: z107.string().uuid(),
|
8310
|
+
createdAt: z107.date(),
|
8311
|
+
updatedAt: z107.date(),
|
8312
|
+
deletedAt: z107.date().nullable(),
|
8313
|
+
email: z107.string(),
|
8314
|
+
isPrimary: z107.boolean()
|
8315
|
+
});
|
8316
|
+
var ContactCustomFieldSchema2 = z107.object({
|
8317
|
+
id: z107.string().uuid(),
|
8318
|
+
createdAt: z107.date(),
|
8319
|
+
updatedAt: z107.date(),
|
8320
|
+
deletedAt: z107.date().nullable(),
|
8321
|
+
textValue: z107.string().nullable(),
|
8322
|
+
booleanValue: z107.boolean().nullable(),
|
8323
|
+
numberValue: z107.number().nullable(),
|
8324
|
+
dateValue: z107.date().nullable(),
|
8326
8325
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
8327
|
-
uploads:
|
8328
|
-
});
|
8329
|
-
var ContactEntityTypesSchema2 =
|
8330
|
-
id:
|
8331
|
-
createdAt:
|
8332
|
-
updatedAt:
|
8333
|
-
deletedAt:
|
8334
|
-
entity:
|
8335
|
-
description:
|
8336
|
-
});
|
8337
|
-
var ContactActivitySchema2 =
|
8338
|
-
id:
|
8339
|
-
createdAt:
|
8340
|
-
updatedAt:
|
8341
|
-
deletedAt:
|
8342
|
-
entityId:
|
8343
|
-
description:
|
8326
|
+
uploads: z107.array(UploadSchema)
|
8327
|
+
});
|
8328
|
+
var ContactEntityTypesSchema2 = z107.object({
|
8329
|
+
id: z107.string().uuid(),
|
8330
|
+
createdAt: z107.date(),
|
8331
|
+
updatedAt: z107.date(),
|
8332
|
+
deletedAt: z107.date().nullable(),
|
8333
|
+
entity: z107.string(),
|
8334
|
+
description: z107.string().nullable()
|
8335
|
+
});
|
8336
|
+
var ContactActivitySchema2 = z107.object({
|
8337
|
+
id: z107.string().uuid(),
|
8338
|
+
createdAt: z107.date(),
|
8339
|
+
updatedAt: z107.date(),
|
8340
|
+
deletedAt: z107.date().nullable(),
|
8341
|
+
entityId: z107.string(),
|
8342
|
+
description: z107.string(),
|
8344
8343
|
entityType: ContactEntityTypesSchema2
|
8345
8344
|
});
|
8346
|
-
var ContactSchema2 =
|
8347
|
-
id:
|
8348
|
-
createdAt:
|
8349
|
-
updatedAt:
|
8350
|
-
deletedAt:
|
8351
|
-
name:
|
8352
|
-
address:
|
8353
|
-
channel:
|
8354
|
-
notes:
|
8355
|
-
contactProfile:
|
8356
|
-
socialProfileUrl:
|
8357
|
-
tags:
|
8345
|
+
var ContactSchema2 = z107.object({
|
8346
|
+
id: z107.string().uuid(),
|
8347
|
+
createdAt: z107.date(),
|
8348
|
+
updatedAt: z107.date(),
|
8349
|
+
deletedAt: z107.date().nullable(),
|
8350
|
+
name: z107.string(),
|
8351
|
+
address: z107.string().nullable(),
|
8352
|
+
channel: z107.string().nullable(),
|
8353
|
+
notes: z107.string().nullable(),
|
8354
|
+
contactProfile: z107.string().nullable(),
|
8355
|
+
socialProfileUrl: z107.string().nullable(),
|
8356
|
+
tags: z107.array(TagSchema),
|
8358
8357
|
company: CompanySchema.omit({ customFields: true }).nullable(),
|
8359
|
-
customFields:
|
8360
|
-
contactEmails:
|
8361
|
-
contactPhones:
|
8362
|
-
activityLogs:
|
8358
|
+
customFields: z107.array(ContactCustomFieldSchema2),
|
8359
|
+
contactEmails: z107.array(ContactEmailsSchema2),
|
8360
|
+
contactPhones: z107.array(ContactPhonesSchema2),
|
8361
|
+
activityLogs: z107.array(ContactActivitySchema2).optional()
|
8363
8362
|
});
|
8364
8363
|
|
8365
8364
|
// src/public-api/validation.ts
|
8366
8365
|
var ContactContractValidationSchema2 = {
|
8367
8366
|
create: {
|
8368
|
-
request:
|
8369
|
-
name:
|
8370
|
-
email:
|
8371
|
-
|
8372
|
-
email:
|
8373
|
-
isPrimary:
|
8367
|
+
request: z108.object({
|
8368
|
+
name: z108.string(),
|
8369
|
+
email: z108.array(
|
8370
|
+
z108.object({
|
8371
|
+
email: z108.string().email(),
|
8372
|
+
isPrimary: z108.boolean()
|
8374
8373
|
})
|
8375
8374
|
).optional(),
|
8376
|
-
channel:
|
8377
|
-
address:
|
8378
|
-
phone:
|
8379
|
-
|
8380
|
-
phone:
|
8381
|
-
isPrimary:
|
8375
|
+
channel: z108.string().optional(),
|
8376
|
+
address: z108.string().optional(),
|
8377
|
+
phone: z108.array(
|
8378
|
+
z108.object({
|
8379
|
+
phone: z108.string(),
|
8380
|
+
isPrimary: z108.boolean()
|
8382
8381
|
})
|
8383
8382
|
).optional(),
|
8384
|
-
notes:
|
8385
|
-
tags:
|
8386
|
-
company:
|
8387
|
-
customFields:
|
8383
|
+
notes: z108.string().optional(),
|
8384
|
+
tags: z108.array(z108.string()).optional(),
|
8385
|
+
company: z108.string().optional(),
|
8386
|
+
customFields: z108.record(z108.string())
|
8388
8387
|
// Dynamic keys with string values
|
8389
8388
|
}),
|
8390
8389
|
response: ContactSchema2
|
8391
8390
|
},
|
8392
8391
|
getById: {
|
8393
|
-
request:
|
8394
|
-
id:
|
8392
|
+
request: z108.object({
|
8393
|
+
id: z108.string().uuid()
|
8395
8394
|
})
|
8396
8395
|
},
|
8397
8396
|
delete: {
|
8398
|
-
request:
|
8399
|
-
id:
|
8397
|
+
request: z108.object({
|
8398
|
+
id: z108.string().uuid()
|
8400
8399
|
})
|
8401
8400
|
},
|
8402
8401
|
getAll: {
|
8403
|
-
request:
|
8404
|
-
page:
|
8405
|
-
pageSize:
|
8406
|
-
keyword:
|
8407
|
-
company:
|
8408
|
-
name:
|
8409
|
-
address:
|
8410
|
-
channel:
|
8411
|
-
selectedDate:
|
8412
|
-
customFields:
|
8413
|
-
|
8414
|
-
attributeId:
|
8415
|
-
type:
|
8416
|
-
value:
|
8402
|
+
request: z108.object({
|
8403
|
+
page: z108.coerce.number().default(1),
|
8404
|
+
pageSize: z108.coerce.number().default(10),
|
8405
|
+
keyword: z108.string().optional(),
|
8406
|
+
company: z108.array(z108.string().uuid()),
|
8407
|
+
name: z108.string(),
|
8408
|
+
address: z108.string(),
|
8409
|
+
channel: z108.array(z108.string()),
|
8410
|
+
selectedDate: z108.string(),
|
8411
|
+
customFields: z108.array(
|
8412
|
+
z108.object({
|
8413
|
+
attributeId: z108.string().uuid(),
|
8414
|
+
type: z108.string(),
|
8415
|
+
value: z108.union([z108.string(), z108.array(z108.string())])
|
8417
8416
|
})
|
8418
8417
|
),
|
8419
|
-
tags:
|
8420
|
-
phone:
|
8421
|
-
email:
|
8422
|
-
notes:
|
8418
|
+
tags: z108.array(z108.string().uuid()),
|
8419
|
+
phone: z108.string(),
|
8420
|
+
email: z108.string(),
|
8421
|
+
notes: z108.string()
|
8423
8422
|
}).partial(),
|
8424
8423
|
response: {
|
8425
|
-
page:
|
8426
|
-
pageSize:
|
8427
|
-
total:
|
8428
|
-
lastPage:
|
8429
|
-
data:
|
8424
|
+
page: z108.number(),
|
8425
|
+
pageSize: z108.number(),
|
8426
|
+
total: z108.number(),
|
8427
|
+
lastPage: z108.number(),
|
8428
|
+
data: z108.array(ContactSchema2)
|
8430
8429
|
}
|
8431
8430
|
},
|
8432
8431
|
getContactFields: {
|
8433
|
-
request:
|
8434
|
-
page:
|
8435
|
-
pageSize:
|
8432
|
+
request: z108.object({
|
8433
|
+
page: z108.coerce.number().default(1),
|
8434
|
+
pageSize: z108.coerce.number().default(10)
|
8436
8435
|
}).partial(),
|
8437
8436
|
response: {
|
8438
|
-
page:
|
8439
|
-
pageSize:
|
8440
|
-
total:
|
8441
|
-
lastPage:
|
8442
|
-
data:
|
8437
|
+
page: z108.number(),
|
8438
|
+
pageSize: z108.number(),
|
8439
|
+
total: z108.number(),
|
8440
|
+
lastPage: z108.number(),
|
8441
|
+
data: z108.array(ContactCustomFieldSchema2)
|
8443
8442
|
}
|
8444
8443
|
},
|
8445
8444
|
addAttachments: {
|
8446
|
-
request:
|
8447
|
-
contactId:
|
8448
|
-
attributeId:
|
8449
|
-
contactAttachmentRecords:
|
8450
|
-
|
8451
|
-
bucketName:
|
8452
|
-
fileKey:
|
8453
|
-
fileName:
|
8454
|
-
fileSize:
|
8455
|
-
url:
|
8445
|
+
request: z108.object({
|
8446
|
+
contactId: z108.string(),
|
8447
|
+
attributeId: z108.string().uuid(),
|
8448
|
+
contactAttachmentRecords: z108.array(
|
8449
|
+
z108.object({
|
8450
|
+
bucketName: z108.string(),
|
8451
|
+
fileKey: z108.string(),
|
8452
|
+
fileName: z108.string(),
|
8453
|
+
fileSize: z108.coerce.number(),
|
8454
|
+
url: z108.string()
|
8456
8455
|
})
|
8457
8456
|
)
|
8458
8457
|
}),
|
@@ -8471,11 +8470,11 @@ var publicApiContract = initContract38().router(
|
|
8471
8470
|
201: DefaultSuccessResponseSchema.extend({
|
8472
8471
|
data: ContactSchema2
|
8473
8472
|
}),
|
8474
|
-
400:
|
8475
|
-
message:
|
8473
|
+
400: z109.object({
|
8474
|
+
message: z109.string()
|
8476
8475
|
}),
|
8477
|
-
409:
|
8478
|
-
message:
|
8476
|
+
409: z109.object({
|
8477
|
+
message: z109.string()
|
8479
8478
|
}),
|
8480
8479
|
401: DefaultUnauthorizedSchema,
|
8481
8480
|
404: DefaultNotFoundSchema,
|
@@ -8490,13 +8489,13 @@ var publicApiContract = initContract38().router(
|
|
8490
8489
|
query: GetTagsSchema,
|
8491
8490
|
responses: {
|
8492
8491
|
200: DefaultSuccessResponseSchema.extend({
|
8493
|
-
tags:
|
8492
|
+
tags: z109.array(TagSchema)
|
8494
8493
|
}),
|
8495
|
-
400:
|
8496
|
-
message:
|
8494
|
+
400: z109.object({
|
8495
|
+
message: z109.string()
|
8497
8496
|
}),
|
8498
|
-
409:
|
8499
|
-
message:
|
8497
|
+
409: z109.object({
|
8498
|
+
message: z109.string()
|
8500
8499
|
}),
|
8501
8500
|
401: DefaultUnauthorizedSchema,
|
8502
8501
|
404: DefaultNotFoundSchema,
|
@@ -8512,11 +8511,11 @@ var publicApiContract = initContract38().router(
|
|
8512
8511
|
200: DefaultSuccessResponseSchema.extend(
|
8513
8512
|
ContactContractValidationSchema2.getAll.response
|
8514
8513
|
),
|
8515
|
-
400:
|
8516
|
-
message:
|
8514
|
+
400: z109.object({
|
8515
|
+
message: z109.string()
|
8517
8516
|
}),
|
8518
|
-
409:
|
8519
|
-
message:
|
8517
|
+
409: z109.object({
|
8518
|
+
message: z109.string()
|
8520
8519
|
}),
|
8521
8520
|
401: DefaultUnauthorizedSchema,
|
8522
8521
|
404: DefaultNotFoundSchema,
|
@@ -8533,11 +8532,11 @@ var publicApiContract = initContract38().router(
|
|
8533
8532
|
200: DefaultSuccessResponseSchema.extend(
|
8534
8533
|
ContactContractValidationSchema2.getContactFields.response
|
8535
8534
|
),
|
8536
|
-
400:
|
8537
|
-
message:
|
8535
|
+
400: z109.object({
|
8536
|
+
message: z109.string()
|
8538
8537
|
}),
|
8539
|
-
409:
|
8540
|
-
message:
|
8538
|
+
409: z109.object({
|
8539
|
+
message: z109.string()
|
8541
8540
|
}),
|
8542
8541
|
401: DefaultUnauthorizedSchema,
|
8543
8542
|
404: DefaultNotFoundSchema,
|
@@ -8551,17 +8550,17 @@ var publicApiContract = initContract38().router(
|
|
8551
8550
|
path: "/contacts/:id",
|
8552
8551
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8553
8552
|
responses: {
|
8554
|
-
200:
|
8555
|
-
status:
|
8556
|
-
message:
|
8553
|
+
200: z109.object({
|
8554
|
+
status: z109.string(),
|
8555
|
+
message: z109.string(),
|
8557
8556
|
data: ContactSchema2,
|
8558
|
-
requestId:
|
8557
|
+
requestId: z109.string()
|
8559
8558
|
}),
|
8560
|
-
400:
|
8561
|
-
message:
|
8559
|
+
400: z109.object({
|
8560
|
+
message: z109.string()
|
8562
8561
|
}),
|
8563
|
-
409:
|
8564
|
-
message:
|
8562
|
+
409: z109.object({
|
8563
|
+
message: z109.string()
|
8565
8564
|
}),
|
8566
8565
|
401: DefaultUnauthorizedSchema,
|
8567
8566
|
404: DefaultNotFoundSchema,
|
@@ -8579,11 +8578,11 @@ var publicApiContract = initContract38().router(
|
|
8579
8578
|
201: DefaultSuccessResponseSchema.extend({
|
8580
8579
|
message: ContactCustomFieldSchema2
|
8581
8580
|
}),
|
8582
|
-
400:
|
8583
|
-
message:
|
8581
|
+
400: z109.object({
|
8582
|
+
message: z109.string()
|
8584
8583
|
}),
|
8585
|
-
409:
|
8586
|
-
message:
|
8584
|
+
409: z109.object({
|
8585
|
+
message: z109.string()
|
8587
8586
|
}),
|
8588
8587
|
401: DefaultUnauthorizedSchema,
|
8589
8588
|
404: DefaultNotFoundSchema,
|
@@ -8597,17 +8596,17 @@ var publicApiContract = initContract38().router(
|
|
8597
8596
|
path: "/contacts/:id",
|
8598
8597
|
pathParams: ContactContractValidationSchema2.getById.request,
|
8599
8598
|
responses: {
|
8600
|
-
200:
|
8601
|
-
status:
|
8602
|
-
message:
|
8599
|
+
200: z109.object({
|
8600
|
+
status: z109.string(),
|
8601
|
+
message: z109.string(),
|
8603
8602
|
data: ContactSchema2,
|
8604
|
-
requestId:
|
8603
|
+
requestId: z109.string()
|
8605
8604
|
}),
|
8606
|
-
400:
|
8607
|
-
message:
|
8605
|
+
400: z109.object({
|
8606
|
+
message: z109.string()
|
8608
8607
|
}),
|
8609
|
-
409:
|
8610
|
-
message:
|
8608
|
+
409: z109.object({
|
8609
|
+
message: z109.string()
|
8611
8610
|
}),
|
8612
8611
|
401: DefaultUnauthorizedSchema,
|
8613
8612
|
404: DefaultNotFoundSchema,
|
@@ -8621,17 +8620,17 @@ var publicApiContract = initContract38().router(
|
|
8621
8620
|
path: "/contacts/:id",
|
8622
8621
|
pathParams: ContactContractValidationSchema2.delete.request,
|
8623
8622
|
responses: {
|
8624
|
-
200:
|
8625
|
-
status:
|
8626
|
-
message:
|
8623
|
+
200: z109.object({
|
8624
|
+
status: z109.string(),
|
8625
|
+
message: z109.string(),
|
8627
8626
|
data: ContactSchema2,
|
8628
|
-
requestId:
|
8627
|
+
requestId: z109.string()
|
8629
8628
|
}),
|
8630
|
-
400:
|
8631
|
-
message:
|
8629
|
+
400: z109.object({
|
8630
|
+
message: z109.string()
|
8632
8631
|
}),
|
8633
|
-
409:
|
8634
|
-
message:
|
8632
|
+
409: z109.object({
|
8633
|
+
message: z109.string()
|
8635
8634
|
}),
|
8636
8635
|
401: DefaultUnauthorizedSchema,
|
8637
8636
|
404: DefaultNotFoundSchema,
|
@@ -8649,17 +8648,17 @@ var publicApiContract = initContract38().router(
|
|
8649
8648
|
|
8650
8649
|
// src/workflow-rule/index.ts
|
8651
8650
|
import { initContract as initContract39 } from "@ts-rest/core";
|
8652
|
-
import
|
8651
|
+
import z110 from "zod";
|
8653
8652
|
var chatContract = initContract39().router(
|
8654
8653
|
{
|
8655
8654
|
updateAssignee: {
|
8656
8655
|
method: "POST",
|
8657
8656
|
path: "/room/assignee",
|
8658
|
-
body:
|
8659
|
-
assigneeId:
|
8660
|
-
roomId:
|
8661
|
-
workflowId:
|
8662
|
-
queueId:
|
8657
|
+
body: z110.object({
|
8658
|
+
assigneeId: z110.string().uuid().optional(),
|
8659
|
+
roomId: z110.string().uuid(),
|
8660
|
+
workflowId: z110.string().uuid(),
|
8661
|
+
queueId: z110.string().uuid().optional()
|
8663
8662
|
}),
|
8664
8663
|
responses: {
|
8665
8664
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -8673,9 +8672,9 @@ var chatContract = initContract39().router(
|
|
8673
8672
|
autoReply: {
|
8674
8673
|
method: "POST",
|
8675
8674
|
path: "/message/send",
|
8676
|
-
body:
|
8677
|
-
roomId:
|
8678
|
-
message:
|
8675
|
+
body: z110.object({
|
8676
|
+
roomId: z110.string().uuid(),
|
8677
|
+
message: z110.string(),
|
8679
8678
|
messageType: WorkflowAutoReplyMessageTypeSchema
|
8680
8679
|
// workflowId: z.string().uuid(),
|
8681
8680
|
}),
|
@@ -8691,15 +8690,15 @@ var chatContract = initContract39().router(
|
|
8691
8690
|
solveRoom: {
|
8692
8691
|
method: "POST",
|
8693
8692
|
path: "/room/solve",
|
8694
|
-
body:
|
8695
|
-
roomId:
|
8696
|
-
disposition:
|
8697
|
-
workflowId:
|
8693
|
+
body: z110.object({
|
8694
|
+
roomId: z110.string(),
|
8695
|
+
disposition: z110.string(),
|
8696
|
+
workflowId: z110.string().uuid()
|
8698
8697
|
}),
|
8699
8698
|
responses: {
|
8700
8699
|
200: DefaultSuccessResponseSchema.extend({
|
8701
8700
|
data: RoomSchema.extend({
|
8702
|
-
solveMessage:
|
8701
|
+
solveMessage: z110.string()
|
8703
8702
|
})
|
8704
8703
|
}),
|
8705
8704
|
409: DefaultErrorResponseSchema
|
@@ -8709,9 +8708,9 @@ var chatContract = initContract39().router(
|
|
8709
8708
|
emitMessage: {
|
8710
8709
|
method: "POST",
|
8711
8710
|
path: "/message/emit",
|
8712
|
-
body:
|
8713
|
-
messageId:
|
8714
|
-
queueId:
|
8711
|
+
body: z110.object({
|
8712
|
+
messageId: z110.string().uuid(),
|
8713
|
+
queueId: z110.string().uuid().optional().nullable()
|
8715
8714
|
}),
|
8716
8715
|
responses: {
|
8717
8716
|
200: DefaultSuccessResponseSchema,
|
@@ -8719,19 +8718,33 @@ var chatContract = initContract39().router(
|
|
8719
8718
|
404: DefaultErrorResponseSchema
|
8720
8719
|
},
|
8721
8720
|
summary: "Get message by ID"
|
8721
|
+
},
|
8722
|
+
tagContact: {
|
8723
|
+
method: "POST",
|
8724
|
+
path: "/contact/tag",
|
8725
|
+
body: z110.object({
|
8726
|
+
contactId: z110.string().uuid(),
|
8727
|
+
tagId: z110.string().uuid()
|
8728
|
+
}),
|
8729
|
+
responses: {
|
8730
|
+
200: DefaultSuccessResponseSchema,
|
8731
|
+
403: DefaultErrorResponseSchema,
|
8732
|
+
404: DefaultErrorResponseSchema
|
8733
|
+
},
|
8734
|
+
summary: "Attach Tag to Contact"
|
8722
8735
|
}
|
8723
8736
|
},
|
8724
8737
|
{
|
8725
|
-
baseHeaders:
|
8726
|
-
"x-tenant":
|
8727
|
-
"x-code":
|
8738
|
+
baseHeaders: z110.object({
|
8739
|
+
"x-tenant": z110.string({ required_error: "Tenant id is required" }),
|
8740
|
+
"x-code": z110.string().uuid().optional()
|
8728
8741
|
}),
|
8729
8742
|
pathPrefix: "chat"
|
8730
8743
|
}
|
8731
8744
|
);
|
8732
8745
|
|
8733
8746
|
// src/botpress/index.ts
|
8734
|
-
import
|
8747
|
+
import z111 from "zod";
|
8735
8748
|
import { initContract as initContract40 } from "@ts-rest/core";
|
8736
8749
|
var botpressContract = initContract40().router(
|
8737
8750
|
{
|
@@ -8750,7 +8763,7 @@ var botpressContract = initContract40().router(
|
|
8750
8763
|
path: "/",
|
8751
8764
|
responses: {
|
8752
8765
|
200: DefaultSuccessResponseSchema.extend({
|
8753
|
-
data:
|
8766
|
+
data: z111.array(BotpressBotSchema)
|
8754
8767
|
}),
|
8755
8768
|
500: DefaultErrorResponseSchema
|
8756
8769
|
}
|
@@ -8787,7 +8800,7 @@ var botContract = initContract40().router(
|
|
8787
8800
|
path: "/",
|
8788
8801
|
responses: {
|
8789
8802
|
200: DefaultSuccessResponseSchema.extend({
|
8790
|
-
data:
|
8803
|
+
data: z111.array(BotpressBotSchema)
|
8791
8804
|
}),
|
8792
8805
|
500: DefaultErrorResponseSchema
|
8793
8806
|
}
|
@@ -8800,17 +8813,17 @@ var botContract = initContract40().router(
|
|
8800
8813
|
|
8801
8814
|
// src/presence-status/index.ts
|
8802
8815
|
import { initContract as initContract41 } from "@ts-rest/core";
|
8803
|
-
import
|
8816
|
+
import z113 from "zod";
|
8804
8817
|
|
8805
8818
|
// src/presence-status/validation.ts
|
8806
|
-
import { z as
|
8807
|
-
var CreatePresenceStatusSchema =
|
8808
|
-
systemName:
|
8809
|
-
displayName:
|
8810
|
-
description:
|
8811
|
-
position:
|
8812
|
-
emoji:
|
8813
|
-
presenceStatusOption:
|
8819
|
+
import { z as z112 } from "zod";
|
8820
|
+
var CreatePresenceStatusSchema = z112.object({
|
8821
|
+
systemName: z112.string(),
|
8822
|
+
displayName: z112.string(),
|
8823
|
+
description: z112.string().optional(),
|
8824
|
+
position: z112.number(),
|
8825
|
+
emoji: z112.string(),
|
8826
|
+
presenceStatusOption: z112.array(TPresenceStatusOption)
|
8814
8827
|
});
|
8815
8828
|
var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
|
8816
8829
|
|
@@ -8821,16 +8834,16 @@ var presenceStatusContract = initContract41().router(
|
|
8821
8834
|
method: "GET",
|
8822
8835
|
path: "",
|
8823
8836
|
headers: DefaultHeaderSchema,
|
8824
|
-
query:
|
8825
|
-
keyword:
|
8837
|
+
query: z113.object({
|
8838
|
+
keyword: z113.string().optional()
|
8826
8839
|
}).optional(),
|
8827
8840
|
responses: {
|
8828
|
-
200:
|
8829
|
-
total:
|
8830
|
-
data:
|
8841
|
+
200: z113.object({
|
8842
|
+
total: z113.number(),
|
8843
|
+
data: z113.array(PresenceStatusSchema)
|
8831
8844
|
}),
|
8832
|
-
400:
|
8833
|
-
message:
|
8845
|
+
400: z113.object({
|
8846
|
+
message: z113.string()
|
8834
8847
|
}),
|
8835
8848
|
401: DefaultUnauthorizedSchema,
|
8836
8849
|
500: DefaultErrorResponseSchema
|
@@ -8842,9 +8855,9 @@ var presenceStatusContract = initContract41().router(
|
|
8842
8855
|
path: "/ps/user-presence-status",
|
8843
8856
|
headers: DefaultHeaderSchema,
|
8844
8857
|
responses: {
|
8845
|
-
200:
|
8846
|
-
400:
|
8847
|
-
message:
|
8858
|
+
200: z113.array(UserPresenceStatusSchema),
|
8859
|
+
400: z113.object({
|
8860
|
+
message: z113.string()
|
8848
8861
|
}),
|
8849
8862
|
401: DefaultUnauthorizedSchema,
|
8850
8863
|
500: DefaultErrorResponseSchema
|
@@ -8860,8 +8873,8 @@ var presenceStatusContract = initContract41().router(
|
|
8860
8873
|
201: DefaultSuccessResponseSchema.extend({
|
8861
8874
|
presenceStatus: PresenceStatusSchema
|
8862
8875
|
}),
|
8863
|
-
400:
|
8864
|
-
message:
|
8876
|
+
400: z113.object({
|
8877
|
+
message: z113.string()
|
8865
8878
|
}),
|
8866
8879
|
401: DefaultUnauthorizedSchema,
|
8867
8880
|
404: DefaultNotFoundSchema,
|
@@ -8873,12 +8886,12 @@ var presenceStatusContract = initContract41().router(
|
|
8873
8886
|
getPresenceStatusById: {
|
8874
8887
|
method: "GET",
|
8875
8888
|
path: "/:id",
|
8876
|
-
pathParams:
|
8889
|
+
pathParams: z113.object({ id: z113.string() }),
|
8877
8890
|
headers: DefaultHeaderSchema,
|
8878
8891
|
responses: {
|
8879
8892
|
200: PresenceStatusSchema,
|
8880
|
-
400:
|
8881
|
-
message:
|
8893
|
+
400: z113.object({
|
8894
|
+
message: z113.string()
|
8882
8895
|
}),
|
8883
8896
|
401: DefaultUnauthorizedSchema,
|
8884
8897
|
404: DefaultNotFoundSchema,
|
@@ -8890,15 +8903,15 @@ var presenceStatusContract = initContract41().router(
|
|
8890
8903
|
updatePresenceStatus: {
|
8891
8904
|
method: "PATCH",
|
8892
8905
|
path: "/:id",
|
8893
|
-
pathParams:
|
8906
|
+
pathParams: z113.object({ id: z113.string() }),
|
8894
8907
|
headers: DefaultHeaderSchema,
|
8895
8908
|
body: UpdatePresenceStatusSchema,
|
8896
8909
|
responses: {
|
8897
8910
|
201: DefaultSuccessResponseSchema.extend({
|
8898
8911
|
presenceStatus: PresenceStatusSchema
|
8899
8912
|
}),
|
8900
|
-
400:
|
8901
|
-
message:
|
8913
|
+
400: z113.object({
|
8914
|
+
message: z113.string()
|
8902
8915
|
}),
|
8903
8916
|
401: DefaultUnauthorizedSchema,
|
8904
8917
|
404: DefaultNotFoundSchema,
|
@@ -8910,11 +8923,11 @@ var presenceStatusContract = initContract41().router(
|
|
8910
8923
|
deletePresenceStatus: {
|
8911
8924
|
method: "DELETE",
|
8912
8925
|
path: "/:id",
|
8913
|
-
pathParams:
|
8926
|
+
pathParams: z113.object({ id: z113.string() }),
|
8914
8927
|
headers: DefaultHeaderSchema,
|
8915
8928
|
body: null,
|
8916
8929
|
responses: {
|
8917
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
8930
|
+
200: DefaultSuccessResponseSchema.extend({ message: z113.string() }),
|
8918
8931
|
404: DefaultNotFoundSchema,
|
8919
8932
|
422: DefaultUnprocessibleSchema,
|
8920
8933
|
500: DefaultErrorResponseSchema
|
@@ -8927,7 +8940,7 @@ var presenceStatusContract = initContract41().router(
|
|
8927
8940
|
|
8928
8941
|
// src/whatsapp/index.ts
|
8929
8942
|
import { initContract as initContract42 } from "@ts-rest/core";
|
8930
|
-
import
|
8943
|
+
import z114 from "zod";
|
8931
8944
|
var whatsappContract = initContract42().router({
|
8932
8945
|
sendMessage: {
|
8933
8946
|
method: "POST",
|
@@ -8962,11 +8975,11 @@ var whatsappContract = initContract42().router({
|
|
8962
8975
|
reconnect: {
|
8963
8976
|
method: "POST",
|
8964
8977
|
path: "/reconnect/:channelId",
|
8965
|
-
pathParams:
|
8966
|
-
channelId:
|
8978
|
+
pathParams: z114.object({
|
8979
|
+
channelId: z114.string().uuid()
|
8967
8980
|
}),
|
8968
|
-
body:
|
8969
|
-
instanceId:
|
8981
|
+
body: z114.object({
|
8982
|
+
instanceId: z114.string().nullable().optional()
|
8970
8983
|
}),
|
8971
8984
|
responses: {
|
8972
8985
|
200: ChannelServiceResponseSchema,
|
@@ -8977,8 +8990,8 @@ var whatsappContract = initContract42().router({
|
|
8977
8990
|
delete: {
|
8978
8991
|
method: "DELETE",
|
8979
8992
|
path: "/delete/:channelId",
|
8980
|
-
pathParams:
|
8981
|
-
channelId:
|
8993
|
+
pathParams: z114.object({
|
8994
|
+
channelId: z114.string().uuid()
|
8982
8995
|
}),
|
8983
8996
|
body: null,
|
8984
8997
|
responses: {
|
@@ -9020,10 +9033,10 @@ var whatsappContract = initContract42().router({
|
|
9020
9033
|
deleteWaapi: {
|
9021
9034
|
method: "DELETE",
|
9022
9035
|
path: "/mobile/:instanceId",
|
9023
|
-
pathParams:
|
9024
|
-
instanceId:
|
9036
|
+
pathParams: z114.object({
|
9037
|
+
instanceId: z114.string()
|
9025
9038
|
}),
|
9026
|
-
body:
|
9039
|
+
body: z114.any().optional(),
|
9027
9040
|
responses: {
|
9028
9041
|
200: DefaultSuccessResponseSchema,
|
9029
9042
|
500: DefaultErrorResponseSchema,
|
@@ -9044,21 +9057,21 @@ var whatsappContract = initContract42().router({
|
|
9044
9057
|
|
9045
9058
|
// src/invoice/index.ts
|
9046
9059
|
import { initContract as initContract43 } from "@ts-rest/core";
|
9047
|
-
import { z as
|
9060
|
+
import { z as z116 } from "zod";
|
9048
9061
|
|
9049
9062
|
// src/invoice/schema.ts
|
9050
|
-
import
|
9063
|
+
import z115 from "zod";
|
9051
9064
|
var InvoiceSchema = DefaultEntitySchema.extend({
|
9052
|
-
invoiceId:
|
9053
|
-
amountPaid:
|
9054
|
-
billingReason:
|
9055
|
-
collectionMethod:
|
9056
|
-
created:
|
9057
|
-
currency:
|
9058
|
-
hostedInvoiceUrl:
|
9059
|
-
invoicePdf:
|
9060
|
-
number:
|
9061
|
-
paid:
|
9065
|
+
invoiceId: z115.string(),
|
9066
|
+
amountPaid: z115.number(),
|
9067
|
+
billingReason: z115.string(),
|
9068
|
+
collectionMethod: z115.string(),
|
9069
|
+
created: z115.number(),
|
9070
|
+
currency: z115.string(),
|
9071
|
+
hostedInvoiceUrl: z115.string(),
|
9072
|
+
invoicePdf: z115.string(),
|
9073
|
+
number: z115.string(),
|
9074
|
+
paid: z115.boolean()
|
9062
9075
|
});
|
9063
9076
|
|
9064
9077
|
// src/invoice/index.ts
|
@@ -9070,7 +9083,7 @@ var invoiceContract = initContract43().router(
|
|
9070
9083
|
query: null,
|
9071
9084
|
responses: {
|
9072
9085
|
200: DefaultSuccessResponseSchema.extend({
|
9073
|
-
invoices:
|
9086
|
+
invoices: z116.array(InvoiceSchema)
|
9074
9087
|
}),
|
9075
9088
|
500: DefaultErrorResponseSchema
|
9076
9089
|
}
|
@@ -9280,7 +9293,7 @@ var presenceStatusContract2 = initContract44().router({
|
|
9280
9293
|
|
9281
9294
|
// src/general-setting/index.ts
|
9282
9295
|
import { initContract as initContract45 } from "@ts-rest/core";
|
9283
|
-
import
|
9296
|
+
import z117 from "zod";
|
9284
9297
|
var generalSettingContract = initContract45().router(
|
9285
9298
|
{
|
9286
9299
|
autoOpenedContactWidgetId: {
|
@@ -9288,20 +9301,20 @@ var generalSettingContract = initContract45().router(
|
|
9288
9301
|
method: "GET",
|
9289
9302
|
path: "/auto-opened-contact-widget-id",
|
9290
9303
|
responses: {
|
9291
|
-
200:
|
9292
|
-
autoOpenedContactWidgetId:
|
9304
|
+
200: z117.object({
|
9305
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9293
9306
|
})
|
9294
9307
|
}
|
9295
9308
|
},
|
9296
9309
|
updateAutoOpenedContactWidgetId: {
|
9297
9310
|
method: "PATCH",
|
9298
9311
|
path: "/auto-opened-contact-widget-id",
|
9299
|
-
body:
|
9300
|
-
autoOpenedContactWidgetId:
|
9312
|
+
body: z117.object({
|
9313
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9301
9314
|
}),
|
9302
9315
|
responses: {
|
9303
|
-
200:
|
9304
|
-
autoOpenedContactWidgetId:
|
9316
|
+
200: z117.object({
|
9317
|
+
autoOpenedContactWidgetId: z117.string().nullable()
|
9305
9318
|
})
|
9306
9319
|
}
|
9307
9320
|
}
|
@@ -9314,49 +9327,51 @@ var generalSettingContract = initContract45().router(
|
|
9314
9327
|
|
9315
9328
|
// src/automation-queue/index.ts
|
9316
9329
|
import { initContract as initContract46 } from "@ts-rest/core";
|
9317
|
-
import { z as
|
9330
|
+
import { z as z120 } from "zod";
|
9318
9331
|
|
9319
9332
|
// src/automation-queue/validation.ts
|
9320
|
-
import { z as
|
9321
|
-
var QueueDistributionStrategySchema =
|
9322
|
-
|
9323
|
-
|
9324
|
-
|
9325
|
-
|
9333
|
+
import { z as z118 } from "zod";
|
9334
|
+
var QueueDistributionStrategySchema = z118.union([
|
9335
|
+
z118.literal("round-robin"),
|
9336
|
+
z118.literal("fewest-assignments"),
|
9337
|
+
z118.literal("random"),
|
9338
|
+
z118.literal("notify-all")
|
9326
9339
|
]);
|
9327
|
-
var CreateAutomationQueueSchema =
|
9328
|
-
emoji:
|
9329
|
-
name:
|
9330
|
-
description:
|
9331
|
-
managerIds:
|
9332
|
-
agentIds:
|
9333
|
-
distributionStrategy: QueueDistributionStrategySchema,
|
9334
|
-
maximumAssignPerAgent:
|
9340
|
+
var CreateAutomationQueueSchema = z118.object({
|
9341
|
+
emoji: z118.string().emoji(),
|
9342
|
+
name: z118.string(),
|
9343
|
+
description: z118.string().nullable(),
|
9344
|
+
managerIds: z118.array(z118.string().uuid()).min(1),
|
9345
|
+
agentIds: z118.array(z118.string().uuid()).min(1),
|
9346
|
+
distributionStrategy: QueueDistributionStrategySchema.nullable(),
|
9347
|
+
maximumAssignPerAgent: z118.number().positive().nullable(),
|
9348
|
+
autoAssign: z118.boolean().nullable()
|
9335
9349
|
// ringTimeOut: z.number().positive(),
|
9336
9350
|
// retryInterval: z.number().positive(),
|
9337
9351
|
// queueTimeOut: z.number().positive(),
|
9338
9352
|
// isAssignmentDeniable: z.coerce.boolean(),
|
9339
9353
|
});
|
9340
9354
|
var UpdateAutomationQueueSchema = CreateAutomationQueueSchema;
|
9341
|
-
var CheckHasAssignedRoomSchema =
|
9342
|
-
userId:
|
9343
|
-
queueId:
|
9355
|
+
var CheckHasAssignedRoomSchema = z118.object({
|
9356
|
+
userId: z118.string().uuid().optional(),
|
9357
|
+
queueId: z118.string().uuid().optional()
|
9344
9358
|
});
|
9345
9359
|
|
9346
9360
|
// src/automation-queue/schema.ts
|
9347
|
-
import { z as
|
9361
|
+
import { z as z119 } from "zod";
|
9348
9362
|
var AutomationQueueSchema = DefaultEntitySchema.extend({
|
9349
|
-
emoji:
|
9350
|
-
name:
|
9351
|
-
description:
|
9363
|
+
emoji: z119.string(),
|
9364
|
+
name: z119.string(),
|
9365
|
+
description: z119.string().nullable(),
|
9352
9366
|
distributionStrategy: QueueDistributionStrategySchema,
|
9353
|
-
maximumAssignPerAgent:
|
9367
|
+
maximumAssignPerAgent: z119.number().positive(),
|
9354
9368
|
// ringTimeOut: z.number(),
|
9355
9369
|
// retryInterval: z.number(),
|
9356
9370
|
// queueTimeOut: z.number(),
|
9357
9371
|
// isAssignmentDeniable: z.boolean(),
|
9358
|
-
|
9359
|
-
|
9372
|
+
autoAssign: z119.boolean(),
|
9373
|
+
managers: z119.array(UserSchema),
|
9374
|
+
agents: z119.array(UserSchema)
|
9360
9375
|
});
|
9361
9376
|
|
9362
9377
|
// src/automation-queue/index.ts
|
@@ -9375,8 +9390,8 @@ var automationQueueContract = initContract46().router(
|
|
9375
9390
|
duplicateAutomationQueue: {
|
9376
9391
|
method: "POST",
|
9377
9392
|
path: "/:id/duplicate",
|
9378
|
-
pathParams:
|
9379
|
-
id:
|
9393
|
+
pathParams: z120.object({
|
9394
|
+
id: z120.string().uuid()
|
9380
9395
|
}),
|
9381
9396
|
body: null,
|
9382
9397
|
responses: {
|
@@ -9388,21 +9403,21 @@ var automationQueueContract = initContract46().router(
|
|
9388
9403
|
getAutomationQueues: {
|
9389
9404
|
method: "GET",
|
9390
9405
|
path: "",
|
9391
|
-
query:
|
9392
|
-
userId:
|
9393
|
-
withRelations:
|
9406
|
+
query: z120.object({
|
9407
|
+
userId: z120.string().uuid().optional(),
|
9408
|
+
withRelations: z120.coerce.boolean().default(true).optional()
|
9394
9409
|
}).optional(),
|
9395
9410
|
responses: {
|
9396
9411
|
200: DefaultSuccessResponseSchema.extend({
|
9397
|
-
data:
|
9412
|
+
data: z120.array(AutomationQueueSchema)
|
9398
9413
|
})
|
9399
9414
|
}
|
9400
9415
|
},
|
9401
9416
|
getAutomationQueueById: {
|
9402
9417
|
method: "GET",
|
9403
9418
|
path: "/:id",
|
9404
|
-
pathParams:
|
9405
|
-
id:
|
9419
|
+
pathParams: z120.object({
|
9420
|
+
id: z120.string().uuid()
|
9406
9421
|
}),
|
9407
9422
|
responses: {
|
9408
9423
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9413,8 +9428,8 @@ var automationQueueContract = initContract46().router(
|
|
9413
9428
|
updateAutomationQueue: {
|
9414
9429
|
method: "PATCH",
|
9415
9430
|
path: "/:id",
|
9416
|
-
pathParams:
|
9417
|
-
id:
|
9431
|
+
pathParams: z120.object({
|
9432
|
+
id: z120.string().uuid()
|
9418
9433
|
}),
|
9419
9434
|
body: UpdateAutomationQueueSchema,
|
9420
9435
|
responses: {
|
@@ -9426,13 +9441,13 @@ var automationQueueContract = initContract46().router(
|
|
9426
9441
|
deleteAutomationQueue: {
|
9427
9442
|
method: "DELETE",
|
9428
9443
|
path: "/:id",
|
9429
|
-
pathParams:
|
9430
|
-
id:
|
9444
|
+
pathParams: z120.object({
|
9445
|
+
id: z120.string().uuid()
|
9431
9446
|
}),
|
9432
9447
|
body: null,
|
9433
9448
|
responses: {
|
9434
9449
|
200: DefaultSuccessResponseSchema.extend({
|
9435
|
-
message:
|
9450
|
+
message: z120.string()
|
9436
9451
|
})
|
9437
9452
|
}
|
9438
9453
|
},
|
@@ -9442,8 +9457,8 @@ var automationQueueContract = initContract46().router(
|
|
9442
9457
|
body: CheckHasAssignedRoomSchema,
|
9443
9458
|
responses: {
|
9444
9459
|
200: DefaultSuccessResponseSchema.extend({
|
9445
|
-
data:
|
9446
|
-
hasAssignedRoom:
|
9460
|
+
data: z120.object({
|
9461
|
+
hasAssignedRoom: z120.boolean()
|
9447
9462
|
})
|
9448
9463
|
})
|
9449
9464
|
}
|
@@ -9460,282 +9475,282 @@ import { initContract as initContract51 } from "@ts-rest/core";
|
|
9460
9475
|
|
9461
9476
|
// src/mail/room-contract.ts
|
9462
9477
|
import { initContract as initContract47 } from "@ts-rest/core";
|
9463
|
-
import
|
9478
|
+
import z125 from "zod";
|
9464
9479
|
|
9465
9480
|
// src/mail/schemas/room.schema.ts
|
9466
|
-
import
|
9481
|
+
import z123 from "zod";
|
9467
9482
|
|
9468
9483
|
// src/mail/schemas/account.schema.ts
|
9484
|
+
import z121 from "zod";
|
9485
|
+
var MailServerSchema = z121.object({
|
9486
|
+
id: z121.string(),
|
9487
|
+
createdAt: z121.date(),
|
9488
|
+
updatedAt: z121.date(),
|
9489
|
+
deletedAt: z121.date().nullable(),
|
9490
|
+
name: z121.string(),
|
9491
|
+
smtpHost: z121.string(),
|
9492
|
+
smtpPort: z121.number(),
|
9493
|
+
smtpTlsPort: z121.number(),
|
9494
|
+
useTlsForSmtp: z121.boolean(),
|
9495
|
+
imapHost: z121.string(),
|
9496
|
+
imapPort: z121.number(),
|
9497
|
+
imapTlsPort: z121.number(),
|
9498
|
+
useTlsForImap: z121.boolean()
|
9499
|
+
});
|
9500
|
+
var MailAccountSchema = z121.object({
|
9501
|
+
id: z121.string(),
|
9502
|
+
createdAt: z121.date(),
|
9503
|
+
updatedAt: z121.date(),
|
9504
|
+
deletedAt: z121.date().nullable(),
|
9505
|
+
name: z121.string(),
|
9506
|
+
address: z121.string(),
|
9507
|
+
accountId: z121.string(),
|
9508
|
+
mailServerId: z121.string(),
|
9509
|
+
mailServer: MailServerSchema,
|
9510
|
+
state: z121.union([
|
9511
|
+
z121.literal("init"),
|
9512
|
+
z121.literal("syncing"),
|
9513
|
+
z121.literal("connecting"),
|
9514
|
+
z121.literal("connected"),
|
9515
|
+
z121.literal("disconnected"),
|
9516
|
+
z121.literal("authenticationError"),
|
9517
|
+
z121.literal("connectError"),
|
9518
|
+
z121.literal("unset")
|
9519
|
+
])
|
9520
|
+
});
|
9521
|
+
var OAuth2AppSchema = z121.object({
|
9522
|
+
id: z121.string(),
|
9523
|
+
name: z121.string(),
|
9524
|
+
description: z121.string(),
|
9525
|
+
title: z121.string(),
|
9526
|
+
provider: z121.string(),
|
9527
|
+
enabled: z121.boolean(),
|
9528
|
+
legacy: z121.boolean(),
|
9529
|
+
created: z121.string(),
|
9530
|
+
updated: z121.string(),
|
9531
|
+
includeInListing: z121.boolean(),
|
9532
|
+
clientId: z121.string(),
|
9533
|
+
clientSecret: z121.string(),
|
9534
|
+
authority: z121.string(),
|
9535
|
+
redirectUrl: z121.string(),
|
9536
|
+
serviceClient: z121.string(),
|
9537
|
+
googleProjectId: z121.string(),
|
9538
|
+
serviceClientEmail: z121.string(),
|
9539
|
+
serviceKey: z121.string()
|
9540
|
+
});
|
9541
|
+
|
9542
|
+
// src/mail/schemas/message.schema.ts
|
9469
9543
|
import z122 from "zod";
|
9470
|
-
var
|
9544
|
+
var AttachmentSchema = z122.object({
|
9471
9545
|
id: z122.string(),
|
9472
9546
|
createdAt: z122.date(),
|
9473
9547
|
updatedAt: z122.date(),
|
9474
|
-
deletedAt: z122.
|
9475
|
-
|
9476
|
-
|
9477
|
-
|
9478
|
-
|
9479
|
-
|
9480
|
-
|
9481
|
-
|
9482
|
-
|
9483
|
-
|
9484
|
-
|
9485
|
-
|
9548
|
+
deletedAt: z122.nullable(z122.date()),
|
9549
|
+
roomId: z122.string(),
|
9550
|
+
messageId: z122.string(),
|
9551
|
+
fileName: z122.string(),
|
9552
|
+
fileType: z122.string(),
|
9553
|
+
emailEngineAttachmentId: z122.string(),
|
9554
|
+
uploadId: z122.string(),
|
9555
|
+
upload: z122.object({
|
9556
|
+
id: z122.string(),
|
9557
|
+
createdAt: z122.date(),
|
9558
|
+
updatedAt: z122.date(),
|
9559
|
+
deletedAt: z122.nullable(z122.date()),
|
9560
|
+
bucketName: z122.string(),
|
9561
|
+
fileName: z122.string(),
|
9562
|
+
fileKey: z122.string(),
|
9563
|
+
fileSize: z122.number(),
|
9564
|
+
fileUrl: z122.string(),
|
9565
|
+
extensionName: z122.string()
|
9566
|
+
})
|
9567
|
+
});
|
9568
|
+
var MessageSchema2 = z122.object({
|
9486
9569
|
id: z122.string(),
|
9487
9570
|
createdAt: z122.date(),
|
9488
9571
|
updatedAt: z122.date(),
|
9489
|
-
deletedAt: z122.
|
9490
|
-
|
9491
|
-
|
9492
|
-
|
9493
|
-
|
9494
|
-
|
9495
|
-
|
9496
|
-
|
9497
|
-
|
9498
|
-
|
9499
|
-
|
9500
|
-
|
9501
|
-
|
9502
|
-
|
9503
|
-
|
9504
|
-
|
9505
|
-
|
9506
|
-
|
9507
|
-
|
9508
|
-
|
9509
|
-
|
9510
|
-
title: z122.string(),
|
9511
|
-
provider: z122.string(),
|
9512
|
-
enabled: z122.boolean(),
|
9513
|
-
legacy: z122.boolean(),
|
9514
|
-
created: z122.string(),
|
9515
|
-
updated: z122.string(),
|
9516
|
-
includeInListing: z122.boolean(),
|
9517
|
-
clientId: z122.string(),
|
9518
|
-
clientSecret: z122.string(),
|
9519
|
-
authority: z122.string(),
|
9520
|
-
redirectUrl: z122.string(),
|
9521
|
-
serviceClient: z122.string(),
|
9522
|
-
googleProjectId: z122.string(),
|
9523
|
-
serviceClientEmail: z122.string(),
|
9524
|
-
serviceKey: z122.string()
|
9572
|
+
deletedAt: z122.nullable(z122.date()),
|
9573
|
+
roomId: z122.string(),
|
9574
|
+
subject: z122.string(),
|
9575
|
+
textPlain: z122.string(),
|
9576
|
+
textHtml: z122.string(),
|
9577
|
+
textId: z122.string(),
|
9578
|
+
emailEngineEmailId: z122.string(),
|
9579
|
+
emailEngineMessageId: z122.string(),
|
9580
|
+
emailEngineReplyTo: z122.nullable(z122.string()),
|
9581
|
+
direction: z122.string(),
|
9582
|
+
date: z122.date(),
|
9583
|
+
action: z122.string(),
|
9584
|
+
unseen: z122.boolean(),
|
9585
|
+
sendAt: z122.date(),
|
9586
|
+
starred: z122.boolean(),
|
9587
|
+
seemsLikeNew: z122.boolean(),
|
9588
|
+
from: z122.array(MailParticipant),
|
9589
|
+
to: z122.array(MailParticipant),
|
9590
|
+
cc: z122.array(MailParticipant),
|
9591
|
+
bcc: z122.array(MailParticipant),
|
9592
|
+
attachments: z122.array(AttachmentSchema)
|
9525
9593
|
});
|
9526
9594
|
|
9527
|
-
// src/mail/schemas/
|
9528
|
-
|
9529
|
-
|
9595
|
+
// src/mail/schemas/room.schema.ts
|
9596
|
+
var ContactSchema3 = z123.object({
|
9597
|
+
id: z123.string().uuid(),
|
9598
|
+
createdAt: z123.date(),
|
9599
|
+
updatedAt: z123.date(),
|
9600
|
+
deletedAt: z123.date().nullable(),
|
9601
|
+
name: z123.string(),
|
9602
|
+
address: z123.string().nullable(),
|
9603
|
+
channel: z123.string().nullable(),
|
9604
|
+
notes: z123.string().nullable(),
|
9605
|
+
contactProfile: z123.string().nullable(),
|
9606
|
+
socialProfileUrl: z123.string().nullable()
|
9607
|
+
});
|
9608
|
+
var MailUserSchema = z123.object({
|
9530
9609
|
id: z123.string(),
|
9531
9610
|
createdAt: z123.date(),
|
9532
9611
|
updatedAt: z123.date(),
|
9533
|
-
deletedAt: z123.
|
9612
|
+
deletedAt: z123.date().nullable(),
|
9613
|
+
name: z123.string(),
|
9614
|
+
address: z123.string(),
|
9615
|
+
contactId: z123.string(),
|
9616
|
+
contact: ContactSchema3,
|
9617
|
+
isNewContact: z123.boolean()
|
9618
|
+
});
|
9619
|
+
var MailParticipant = z123.object({
|
9620
|
+
id: z123.string(),
|
9621
|
+
createdAt: z123.date(),
|
9622
|
+
updatedAt: z123.date(),
|
9623
|
+
deletedAt: z123.date().nullable(),
|
9534
9624
|
roomId: z123.string(),
|
9535
9625
|
messageId: z123.string(),
|
9536
|
-
|
9537
|
-
|
9538
|
-
emailEngineAttachmentId: z123.string(),
|
9539
|
-
uploadId: z123.string(),
|
9540
|
-
upload: z123.object({
|
9541
|
-
id: z123.string(),
|
9542
|
-
createdAt: z123.date(),
|
9543
|
-
updatedAt: z123.date(),
|
9544
|
-
deletedAt: z123.nullable(z123.date()),
|
9545
|
-
bucketName: z123.string(),
|
9546
|
-
fileName: z123.string(),
|
9547
|
-
fileKey: z123.string(),
|
9548
|
-
fileSize: z123.number(),
|
9549
|
-
fileUrl: z123.string(),
|
9550
|
-
extensionName: z123.string()
|
9551
|
-
})
|
9626
|
+
mailUserId: z123.string(),
|
9627
|
+
mailUser: MailUserSchema
|
9552
9628
|
});
|
9553
|
-
var
|
9629
|
+
var TagSchema2 = z123.object({
|
9630
|
+
color: z123.string(),
|
9631
|
+
id: z123.string(),
|
9632
|
+
createdAt: z123.date(),
|
9633
|
+
updatedAt: z123.date(),
|
9634
|
+
deletedAt: z123.date().nullable(),
|
9635
|
+
name: z123.string()
|
9636
|
+
});
|
9637
|
+
var UserModel = z123.object({
|
9638
|
+
id: z123.string().uuid(),
|
9639
|
+
createdAt: z123.date(),
|
9640
|
+
updatedAt: z123.date(),
|
9641
|
+
deletedAt: z123.date().nullable(),
|
9642
|
+
name: z123.string(),
|
9643
|
+
email: z123.string(),
|
9644
|
+
address: z123.string().nullable(),
|
9645
|
+
phone: z123.string().nullable(),
|
9646
|
+
notificationCount: z123.number().nullable()
|
9647
|
+
});
|
9648
|
+
var ActivityLogModel = z123.object({
|
9554
9649
|
id: z123.string(),
|
9555
9650
|
createdAt: z123.date(),
|
9556
9651
|
updatedAt: z123.date(),
|
9557
|
-
deletedAt: z123.nullable(z123.
|
9652
|
+
deletedAt: z123.nullable(z123.string()),
|
9653
|
+
description: z123.string(),
|
9654
|
+
actorId: z123.string(),
|
9558
9655
|
roomId: z123.string(),
|
9656
|
+
actor: UserModel
|
9657
|
+
});
|
9658
|
+
var MessagesAndLogsSchema = z123.array(
|
9659
|
+
z123.union([MessageSchema2, ActivityLogModel])
|
9660
|
+
);
|
9661
|
+
var MailRoomSchema = z123.object({
|
9662
|
+
id: z123.string(),
|
9663
|
+
createdAt: z123.date(),
|
9664
|
+
updatedAt: z123.date(),
|
9665
|
+
deletedAt: z123.date().nullable(),
|
9559
9666
|
subject: z123.string(),
|
9560
|
-
|
9561
|
-
|
9562
|
-
|
9563
|
-
|
9564
|
-
emailEngineMessageId: z123.string(),
|
9565
|
-
emailEngineReplyTo: z123.nullable(z123.string()),
|
9667
|
+
resolved: z123.boolean(),
|
9668
|
+
assigneeId: z123.string().nullable(),
|
9669
|
+
note: z123.string(),
|
9670
|
+
mailId: z123.string(),
|
9566
9671
|
direction: z123.string(),
|
9567
|
-
|
9568
|
-
|
9569
|
-
unseen: z123.boolean(),
|
9570
|
-
sendAt: z123.date(),
|
9571
|
-
starred: z123.boolean(),
|
9572
|
-
seemsLikeNew: z123.boolean(),
|
9672
|
+
lastMessageId: z123.string(),
|
9673
|
+
firstMessageId: z123.string(),
|
9573
9674
|
from: z123.array(MailParticipant),
|
9574
9675
|
to: z123.array(MailParticipant),
|
9575
9676
|
cc: z123.array(MailParticipant),
|
9576
9677
|
bcc: z123.array(MailParticipant),
|
9577
|
-
attachments: z123.array(AttachmentSchema)
|
9578
|
-
});
|
9579
|
-
|
9580
|
-
// src/mail/schemas/room.schema.ts
|
9581
|
-
var ContactSchema3 = z124.object({
|
9582
|
-
id: z124.string().uuid(),
|
9583
|
-
createdAt: z124.date(),
|
9584
|
-
updatedAt: z124.date(),
|
9585
|
-
deletedAt: z124.date().nullable(),
|
9586
|
-
name: z124.string(),
|
9587
|
-
address: z124.string().nullable(),
|
9588
|
-
channel: z124.string().nullable(),
|
9589
|
-
notes: z124.string().nullable(),
|
9590
|
-
contactProfile: z124.string().nullable(),
|
9591
|
-
socialProfileUrl: z124.string().nullable()
|
9592
|
-
});
|
9593
|
-
var MailUserSchema = z124.object({
|
9594
|
-
id: z124.string(),
|
9595
|
-
createdAt: z124.date(),
|
9596
|
-
updatedAt: z124.date(),
|
9597
|
-
deletedAt: z124.date().nullable(),
|
9598
|
-
name: z124.string(),
|
9599
|
-
address: z124.string(),
|
9600
|
-
contactId: z124.string(),
|
9601
|
-
contact: ContactSchema3,
|
9602
|
-
isNewContact: z124.boolean()
|
9603
|
-
});
|
9604
|
-
var MailParticipant = z124.object({
|
9605
|
-
id: z124.string(),
|
9606
|
-
createdAt: z124.date(),
|
9607
|
-
updatedAt: z124.date(),
|
9608
|
-
deletedAt: z124.date().nullable(),
|
9609
|
-
roomId: z124.string(),
|
9610
|
-
messageId: z124.string(),
|
9611
|
-
mailUserId: z124.string(),
|
9612
|
-
mailUser: MailUserSchema
|
9613
|
-
});
|
9614
|
-
var TagSchema2 = z124.object({
|
9615
|
-
color: z124.string(),
|
9616
|
-
id: z124.string(),
|
9617
|
-
createdAt: z124.date(),
|
9618
|
-
updatedAt: z124.date(),
|
9619
|
-
deletedAt: z124.date().nullable(),
|
9620
|
-
name: z124.string()
|
9621
|
-
});
|
9622
|
-
var UserModel = z124.object({
|
9623
|
-
id: z124.string().uuid(),
|
9624
|
-
createdAt: z124.date(),
|
9625
|
-
updatedAt: z124.date(),
|
9626
|
-
deletedAt: z124.date().nullable(),
|
9627
|
-
name: z124.string(),
|
9628
|
-
email: z124.string(),
|
9629
|
-
address: z124.string().nullable(),
|
9630
|
-
phone: z124.string().nullable(),
|
9631
|
-
notificationCount: z124.number().nullable()
|
9632
|
-
});
|
9633
|
-
var ActivityLogModel = z124.object({
|
9634
|
-
id: z124.string(),
|
9635
|
-
createdAt: z124.date(),
|
9636
|
-
updatedAt: z124.date(),
|
9637
|
-
deletedAt: z124.nullable(z124.string()),
|
9638
|
-
description: z124.string(),
|
9639
|
-
actorId: z124.string(),
|
9640
|
-
roomId: z124.string(),
|
9641
|
-
actor: UserModel
|
9642
|
-
});
|
9643
|
-
var MessagesAndLogsSchema = z124.array(
|
9644
|
-
z124.union([MessageSchema2, ActivityLogModel])
|
9645
|
-
);
|
9646
|
-
var MailRoomSchema = z124.object({
|
9647
|
-
id: z124.string(),
|
9648
|
-
createdAt: z124.date(),
|
9649
|
-
updatedAt: z124.date(),
|
9650
|
-
deletedAt: z124.date().nullable(),
|
9651
|
-
subject: z124.string(),
|
9652
|
-
resolved: z124.boolean(),
|
9653
|
-
assigneeId: z124.string().nullable(),
|
9654
|
-
note: z124.string(),
|
9655
|
-
mailId: z124.string(),
|
9656
|
-
direction: z124.string(),
|
9657
|
-
lastMessageId: z124.string(),
|
9658
|
-
firstMessageId: z124.string(),
|
9659
|
-
from: z124.array(MailParticipant),
|
9660
|
-
to: z124.array(MailParticipant),
|
9661
|
-
cc: z124.array(MailParticipant),
|
9662
|
-
bcc: z124.array(MailParticipant),
|
9663
9678
|
firstMessage: MessageSchema2,
|
9664
9679
|
lastMessage: MessageSchema2,
|
9665
|
-
tags:
|
9680
|
+
tags: z123.array(TagSchema2),
|
9666
9681
|
assignee: UserModel,
|
9667
|
-
messages:
|
9682
|
+
messages: z123.array(MessageSchema2),
|
9668
9683
|
messagesAndLogs: MessagesAndLogsSchema,
|
9669
9684
|
mail: MailAccountSchema,
|
9670
|
-
unReadMessageCount:
|
9685
|
+
unReadMessageCount: z123.number(),
|
9671
9686
|
cxlog: CxLogSchema
|
9672
9687
|
});
|
9673
|
-
var AttachmentSchema2 =
|
9674
|
-
fileName:
|
9675
|
-
fileType:
|
9676
|
-
emailEngineAttachmentId:
|
9677
|
-
uploadId:
|
9678
|
-
messageId:
|
9679
|
-
roomId:
|
9688
|
+
var AttachmentSchema2 = z123.object({
|
9689
|
+
fileName: z123.string(),
|
9690
|
+
fileType: z123.string(),
|
9691
|
+
emailEngineAttachmentId: z123.string(),
|
9692
|
+
uploadId: z123.string(),
|
9693
|
+
messageId: z123.string(),
|
9694
|
+
roomId: z123.string(),
|
9680
9695
|
upload: UploadSchema
|
9681
9696
|
});
|
9682
9697
|
|
9683
9698
|
// src/mail/schemas/room-validation.schema.ts
|
9684
|
-
import
|
9699
|
+
import z124 from "zod";
|
9685
9700
|
var RoomContractsValidationSchema = {
|
9686
9701
|
getAll: {
|
9687
|
-
input:
|
9688
|
-
page:
|
9689
|
-
pageSize:
|
9690
|
-
keyword:
|
9691
|
-
value:
|
9692
|
-
category:
|
9702
|
+
input: z124.object({
|
9703
|
+
page: z124.coerce.number().default(1),
|
9704
|
+
pageSize: z124.coerce.number().default(10),
|
9705
|
+
keyword: z124.object({
|
9706
|
+
value: z124.string(),
|
9707
|
+
category: z124.union([z124.literal("contact"), z124.literal("message")])
|
9693
9708
|
}).optional(),
|
9694
|
-
contactLabels:
|
9695
|
-
channels:
|
9696
|
-
date:
|
9697
|
-
contacts:
|
9698
|
-
assignees:
|
9699
|
-
level1:
|
9700
|
-
|
9701
|
-
|
9702
|
-
|
9703
|
-
|
9704
|
-
|
9705
|
-
|
9709
|
+
contactLabels: z124.array(z124.string()).optional(),
|
9710
|
+
channels: z124.array(z124.string().email()).optional(),
|
9711
|
+
date: z124.string().optional(),
|
9712
|
+
contacts: z124.array(z124.string()).optional(),
|
9713
|
+
assignees: z124.array(z124.string()).optional(),
|
9714
|
+
level1: z124.union([
|
9715
|
+
z124.literal("open"),
|
9716
|
+
z124.literal("close"),
|
9717
|
+
z124.literal("inbox"),
|
9718
|
+
z124.literal("sent"),
|
9719
|
+
z124.literal("scheduled"),
|
9720
|
+
z124.literal("starred")
|
9706
9721
|
]).optional(),
|
9707
|
-
level2:
|
9708
|
-
|
9709
|
-
|
9710
|
-
|
9711
|
-
|
9722
|
+
level2: z124.union([
|
9723
|
+
z124.literal("all"),
|
9724
|
+
z124.literal("unassign"),
|
9725
|
+
z124.literal("mine"),
|
9726
|
+
z124.literal("other")
|
9712
9727
|
]).optional()
|
9713
9728
|
}),
|
9714
|
-
output:
|
9715
|
-
data:
|
9716
|
-
total:
|
9717
|
-
page:
|
9718
|
-
pageSize:
|
9729
|
+
output: z124.object({
|
9730
|
+
data: z124.array(MailRoomSchema),
|
9731
|
+
total: z124.number(),
|
9732
|
+
page: z124.number(),
|
9733
|
+
pageSize: z124.number()
|
9719
9734
|
})
|
9720
9735
|
},
|
9721
9736
|
update: {
|
9722
|
-
input:
|
9723
|
-
disposition:
|
9724
|
-
|
9725
|
-
|
9726
|
-
|
9727
|
-
|
9728
|
-
|
9729
|
-
|
9737
|
+
input: z124.object({
|
9738
|
+
disposition: z124.union([
|
9739
|
+
z124.literal("resolved"),
|
9740
|
+
z124.literal("follow up"),
|
9741
|
+
z124.literal("escalated"),
|
9742
|
+
z124.literal("dropped"),
|
9743
|
+
z124.literal("prank"),
|
9744
|
+
z124.literal("blank")
|
9730
9745
|
]).optional().nullable(),
|
9731
|
-
assigneeId:
|
9732
|
-
note:
|
9733
|
-
tags:
|
9734
|
-
handover:
|
9735
|
-
|
9746
|
+
assigneeId: z124.string().uuid().optional().nullable(),
|
9747
|
+
note: z124.string().optional(),
|
9748
|
+
tags: z124.array(z124.string().uuid()).optional(),
|
9749
|
+
handover: z124.boolean().or(
|
9750
|
+
z124.union([z124.literal("true"), z124.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9736
9751
|
).optional().nullable(),
|
9737
|
-
selfAssign:
|
9738
|
-
|
9752
|
+
selfAssign: z124.boolean().or(
|
9753
|
+
z124.union([z124.literal("true"), z124.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
9739
9754
|
).optional().nullable()
|
9740
9755
|
})
|
9741
9756
|
}
|
@@ -9749,7 +9764,7 @@ var roomContract = initContract47().router(
|
|
9749
9764
|
path: "/",
|
9750
9765
|
responses: {
|
9751
9766
|
200: DefaultSuccessResponseSchema.extend({
|
9752
|
-
message:
|
9767
|
+
message: z125.string()
|
9753
9768
|
}),
|
9754
9769
|
...DefaultResponses
|
9755
9770
|
},
|
@@ -9762,10 +9777,10 @@ var roomContract = initContract47().router(
|
|
9762
9777
|
query: RoomContractsValidationSchema.getAll.input,
|
9763
9778
|
responses: {
|
9764
9779
|
200: DefaultSuccessResponseSchema.extend({
|
9765
|
-
data:
|
9766
|
-
total:
|
9767
|
-
page:
|
9768
|
-
pageSize:
|
9780
|
+
data: z125.array(MailRoomSchema),
|
9781
|
+
total: z125.number(),
|
9782
|
+
page: z125.number(),
|
9783
|
+
pageSize: z125.number()
|
9769
9784
|
}),
|
9770
9785
|
...DefaultResponses
|
9771
9786
|
},
|
@@ -9777,24 +9792,24 @@ var roomContract = initContract47().router(
|
|
9777
9792
|
path: "/count_rooms/all",
|
9778
9793
|
responses: {
|
9779
9794
|
200: DefaultSuccessResponseSchema.extend({
|
9780
|
-
data:
|
9781
|
-
general:
|
9782
|
-
|
9783
|
-
name:
|
9784
|
-
count:
|
9785
|
-
unReadMessagesCount:
|
9795
|
+
data: z125.object({
|
9796
|
+
general: z125.array(
|
9797
|
+
z125.object({
|
9798
|
+
name: z125.string(),
|
9799
|
+
count: z125.number(),
|
9800
|
+
unReadMessagesCount: z125.number()
|
9786
9801
|
})
|
9787
9802
|
),
|
9788
|
-
channels:
|
9789
|
-
|
9803
|
+
channels: z125.array(
|
9804
|
+
z125.object({
|
9790
9805
|
channel: MailAccountSchema,
|
9791
|
-
count:
|
9806
|
+
count: z125.number()
|
9792
9807
|
})
|
9793
9808
|
),
|
9794
|
-
contactLabels:
|
9795
|
-
|
9809
|
+
contactLabels: z125.array(
|
9810
|
+
z125.object({
|
9796
9811
|
label: TagSchema,
|
9797
|
-
count:
|
9812
|
+
count: z125.number()
|
9798
9813
|
})
|
9799
9814
|
)
|
9800
9815
|
})
|
@@ -9806,12 +9821,12 @@ var roomContract = initContract47().router(
|
|
9806
9821
|
getAttachments: {
|
9807
9822
|
method: "GET",
|
9808
9823
|
path: "/:id/attachments",
|
9809
|
-
pathParams:
|
9810
|
-
id:
|
9824
|
+
pathParams: z125.object({
|
9825
|
+
id: z125.string().uuid()
|
9811
9826
|
}),
|
9812
9827
|
responses: {
|
9813
9828
|
200: DefaultSuccessResponseSchema.extend({
|
9814
|
-
data:
|
9829
|
+
data: z125.array(AttachmentSchema2)
|
9815
9830
|
}),
|
9816
9831
|
...DefaultResponses
|
9817
9832
|
},
|
@@ -9820,12 +9835,12 @@ var roomContract = initContract47().router(
|
|
9820
9835
|
getParticipants: {
|
9821
9836
|
method: "GET",
|
9822
9837
|
path: "/:id/participants",
|
9823
|
-
pathParams:
|
9824
|
-
id:
|
9838
|
+
pathParams: z125.object({
|
9839
|
+
id: z125.string().uuid()
|
9825
9840
|
}),
|
9826
9841
|
responses: {
|
9827
9842
|
200: DefaultSuccessResponseSchema.extend({
|
9828
|
-
data:
|
9843
|
+
data: z125.array(MailParticipant)
|
9829
9844
|
}),
|
9830
9845
|
...DefaultResponses
|
9831
9846
|
},
|
@@ -9836,22 +9851,22 @@ var roomContract = initContract47().router(
|
|
9836
9851
|
path: "/add_email_to_contact",
|
9837
9852
|
responses: {
|
9838
9853
|
200: DefaultSuccessResponseSchema.extend({
|
9839
|
-
data:
|
9854
|
+
data: z125.string()
|
9840
9855
|
}),
|
9841
9856
|
...DefaultResponses
|
9842
9857
|
},
|
9843
|
-
body:
|
9844
|
-
email:
|
9845
|
-
contactId:
|
9846
|
-
mailUserId:
|
9858
|
+
body: z125.object({
|
9859
|
+
email: z125.string(),
|
9860
|
+
contactId: z125.string(),
|
9861
|
+
mailUserId: z125.string()
|
9847
9862
|
}),
|
9848
9863
|
summary: "Add a new email of a mail room participant to an existing contact"
|
9849
9864
|
},
|
9850
9865
|
update: {
|
9851
9866
|
method: "PATCH",
|
9852
9867
|
path: "/:id",
|
9853
|
-
pathParams:
|
9854
|
-
id:
|
9868
|
+
pathParams: z125.object({
|
9869
|
+
id: z125.string()
|
9855
9870
|
}),
|
9856
9871
|
responses: {
|
9857
9872
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9865,12 +9880,12 @@ var roomContract = initContract47().router(
|
|
9865
9880
|
markAsRead: {
|
9866
9881
|
method: "POST",
|
9867
9882
|
path: "/mark_as_read",
|
9868
|
-
body:
|
9869
|
-
id:
|
9883
|
+
body: z125.object({
|
9884
|
+
id: z125.string()
|
9870
9885
|
}),
|
9871
9886
|
responses: {
|
9872
9887
|
200: DefaultSuccessResponseSchema.extend({
|
9873
|
-
message:
|
9888
|
+
message: z125.string()
|
9874
9889
|
}),
|
9875
9890
|
...DefaultResponses
|
9876
9891
|
},
|
@@ -9879,8 +9894,8 @@ var roomContract = initContract47().router(
|
|
9879
9894
|
getById: {
|
9880
9895
|
method: "GET",
|
9881
9896
|
path: "/:id",
|
9882
|
-
pathParams:
|
9883
|
-
id:
|
9897
|
+
pathParams: z125.object({
|
9898
|
+
id: z125.string().uuid()
|
9884
9899
|
}),
|
9885
9900
|
responses: {
|
9886
9901
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9898,70 +9913,70 @@ var roomContract = initContract47().router(
|
|
9898
9913
|
|
9899
9914
|
// src/mail/account-contract.ts
|
9900
9915
|
import { initContract as initContract48 } from "@ts-rest/core";
|
9901
|
-
import
|
9916
|
+
import z127 from "zod";
|
9902
9917
|
|
9903
9918
|
// src/mail/schemas/account-validation.schema.ts
|
9904
|
-
import
|
9919
|
+
import z126 from "zod";
|
9905
9920
|
var AccountContractsValidationSchemas = {
|
9906
9921
|
create: {
|
9907
|
-
input:
|
9908
|
-
address:
|
9909
|
-
name:
|
9910
|
-
password:
|
9911
|
-
mailServerId:
|
9922
|
+
input: z126.object({
|
9923
|
+
address: z126.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
9924
|
+
name: z126.string().min(1, "Account name cannot be empty."),
|
9925
|
+
password: z126.string().min(1, "Password cannot be empty."),
|
9926
|
+
mailServerId: z126.string().uuid("Invalid mail_server_id")
|
9912
9927
|
})
|
9913
9928
|
},
|
9914
9929
|
getById: {
|
9915
|
-
input:
|
9916
|
-
id:
|
9930
|
+
input: z126.object({
|
9931
|
+
id: z126.string().uuid()
|
9917
9932
|
}),
|
9918
9933
|
output: MailAccountSchema
|
9919
9934
|
},
|
9920
9935
|
getAll: {
|
9921
|
-
output:
|
9936
|
+
output: z126.array(MailAccountSchema)
|
9922
9937
|
},
|
9923
9938
|
update: {
|
9924
9939
|
input: MailAccountSchema,
|
9925
9940
|
output: MailAccountSchema
|
9926
9941
|
},
|
9927
9942
|
disconnect: {
|
9928
|
-
input:
|
9929
|
-
id:
|
9943
|
+
input: z126.object({
|
9944
|
+
id: z126.string().uuid()
|
9930
9945
|
}),
|
9931
9946
|
output: MailAccountSchema
|
9932
9947
|
},
|
9933
9948
|
reconnect: {
|
9934
|
-
input:
|
9935
|
-
id:
|
9949
|
+
input: z126.object({
|
9950
|
+
id: z126.string()
|
9936
9951
|
}),
|
9937
9952
|
output: MailAccountSchema
|
9938
9953
|
},
|
9939
9954
|
delete: {
|
9940
|
-
input:
|
9941
|
-
id:
|
9955
|
+
input: z126.object({
|
9956
|
+
id: z126.string()
|
9942
9957
|
}),
|
9943
|
-
output:
|
9958
|
+
output: z126.string()
|
9944
9959
|
},
|
9945
9960
|
deleteEmailEngineAcc: {
|
9946
|
-
input:
|
9947
|
-
account:
|
9961
|
+
input: z126.object({
|
9962
|
+
account: z126.string()
|
9948
9963
|
}),
|
9949
9964
|
output: MailAccountSchema
|
9950
9965
|
},
|
9951
9966
|
generateOAuth2AuthenticationLink: {
|
9952
|
-
body:
|
9953
|
-
oAuth2AppId:
|
9954
|
-
mailServerId:
|
9967
|
+
body: z126.object({
|
9968
|
+
oAuth2AppId: z126.string(),
|
9969
|
+
mailServerId: z126.string()
|
9955
9970
|
}),
|
9956
|
-
response:
|
9957
|
-
url:
|
9958
|
-
account:
|
9971
|
+
response: z126.object({
|
9972
|
+
url: z126.string(),
|
9973
|
+
account: z126.string()
|
9959
9974
|
})
|
9960
9975
|
},
|
9961
9976
|
createOAuth2Acc: {
|
9962
|
-
body:
|
9963
|
-
account:
|
9964
|
-
name:
|
9977
|
+
body: z126.object({
|
9978
|
+
account: z126.string(),
|
9979
|
+
name: z126.string()
|
9965
9980
|
}),
|
9966
9981
|
response: MailAccountSchema
|
9967
9982
|
}
|
@@ -9979,14 +9994,14 @@ var accountContract = initContract48().router(
|
|
9979
9994
|
// data: AccountContractsValidationSchemas.create.output,
|
9980
9995
|
data: MailAccountSchema
|
9981
9996
|
}),
|
9982
|
-
400:
|
9983
|
-
message:
|
9997
|
+
400: z127.object({
|
9998
|
+
message: z127.string()
|
9984
9999
|
}),
|
9985
|
-
409:
|
9986
|
-
message:
|
10000
|
+
409: z127.object({
|
10001
|
+
message: z127.string()
|
9987
10002
|
}),
|
9988
|
-
500:
|
9989
|
-
message:
|
10003
|
+
500: z127.object({
|
10004
|
+
message: z127.string()
|
9990
10005
|
}),
|
9991
10006
|
...DefaultResponses
|
9992
10007
|
},
|
@@ -10002,14 +10017,14 @@ var accountContract = initContract48().router(
|
|
10002
10017
|
201: DefaultSuccessResponseSchema.extend({
|
10003
10018
|
data: AccountContractsValidationSchemas.generateOAuth2AuthenticationLink.response
|
10004
10019
|
}),
|
10005
|
-
400:
|
10006
|
-
message:
|
10020
|
+
400: z127.object({
|
10021
|
+
message: z127.string()
|
10007
10022
|
}),
|
10008
|
-
409:
|
10009
|
-
message:
|
10023
|
+
409: z127.object({
|
10024
|
+
message: z127.string()
|
10010
10025
|
}),
|
10011
|
-
500:
|
10012
|
-
message:
|
10026
|
+
500: z127.object({
|
10027
|
+
message: z127.string()
|
10013
10028
|
}),
|
10014
10029
|
...DefaultResponses
|
10015
10030
|
},
|
@@ -10023,7 +10038,7 @@ var accountContract = initContract48().router(
|
|
10023
10038
|
path: "/sync",
|
10024
10039
|
responses: {
|
10025
10040
|
200: DefaultSuccessResponseSchema.extend({
|
10026
|
-
message:
|
10041
|
+
message: z127.string()
|
10027
10042
|
}),
|
10028
10043
|
...DefaultResponses
|
10029
10044
|
},
|
@@ -10048,13 +10063,13 @@ var accountContract = initContract48().router(
|
|
10048
10063
|
getAll: {
|
10049
10064
|
method: "GET",
|
10050
10065
|
path: "",
|
10051
|
-
query:
|
10052
|
-
state:
|
10053
|
-
withDeleted:
|
10066
|
+
query: z127.object({
|
10067
|
+
state: z127.union([z127.literal("connected"), z127.literal("disconnected")]).optional(),
|
10068
|
+
withDeleted: z127.boolean().default(false)
|
10054
10069
|
}).optional(),
|
10055
10070
|
responses: {
|
10056
10071
|
200: DefaultSuccessResponseSchema.extend({
|
10057
|
-
data:
|
10072
|
+
data: z127.array(MailAccountSchema)
|
10058
10073
|
}),
|
10059
10074
|
...DefaultResponses
|
10060
10075
|
},
|
@@ -10065,8 +10080,8 @@ var accountContract = initContract48().router(
|
|
10065
10080
|
update: {
|
10066
10081
|
method: "PATCH",
|
10067
10082
|
path: "/:id",
|
10068
|
-
pathParams:
|
10069
|
-
id:
|
10083
|
+
pathParams: z127.object({
|
10084
|
+
id: z127.string().uuid()
|
10070
10085
|
}),
|
10071
10086
|
responses: {
|
10072
10087
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -10115,7 +10130,7 @@ var accountContract = initContract48().router(
|
|
10115
10130
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
10116
10131
|
responses: {
|
10117
10132
|
200: DefaultSuccessResponseSchema.extend({
|
10118
|
-
message:
|
10133
|
+
message: z127.string()
|
10119
10134
|
}),
|
10120
10135
|
...DefaultResponses
|
10121
10136
|
},
|
@@ -10130,7 +10145,7 @@ var accountContract = initContract48().router(
|
|
10130
10145
|
pathParams: AccountContractsValidationSchemas.deleteEmailEngineAcc.input,
|
10131
10146
|
responses: {
|
10132
10147
|
200: DefaultSuccessResponseSchema.extend({
|
10133
|
-
message:
|
10148
|
+
message: z127.string()
|
10134
10149
|
}),
|
10135
10150
|
...DefaultResponses
|
10136
10151
|
},
|
@@ -10159,20 +10174,20 @@ var accountContract = initContract48().router(
|
|
10159
10174
|
|
10160
10175
|
// src/mail/mail-server-contract.ts
|
10161
10176
|
import { initContract as initContract49 } from "@ts-rest/core";
|
10162
|
-
import
|
10177
|
+
import z129 from "zod";
|
10163
10178
|
|
10164
10179
|
// src/mail/schemas/servers-validation.schema.ts
|
10165
|
-
import
|
10166
|
-
var CreateMailServerSchema =
|
10167
|
-
name:
|
10168
|
-
smtpHost:
|
10169
|
-
smtpPort:
|
10170
|
-
smtpTlsPort:
|
10171
|
-
useTlsForSmtp:
|
10172
|
-
imapHost:
|
10173
|
-
imapPort:
|
10174
|
-
imapTlsPort:
|
10175
|
-
useTlsForImap:
|
10180
|
+
import z128 from "zod";
|
10181
|
+
var CreateMailServerSchema = z128.object({
|
10182
|
+
name: z128.string(),
|
10183
|
+
smtpHost: z128.string(),
|
10184
|
+
smtpPort: z128.number(),
|
10185
|
+
smtpTlsPort: z128.number(),
|
10186
|
+
useTlsForSmtp: z128.boolean(),
|
10187
|
+
imapHost: z128.string(),
|
10188
|
+
imapPort: z128.number(),
|
10189
|
+
imapTlsPort: z128.number(),
|
10190
|
+
useTlsForImap: z128.boolean()
|
10176
10191
|
});
|
10177
10192
|
|
10178
10193
|
// src/mail/mail-server-contract.ts
|
@@ -10195,11 +10210,11 @@ var serverContract = initContract49().router(
|
|
10195
10210
|
path: "/oauth2/apps",
|
10196
10211
|
responses: {
|
10197
10212
|
200: DefaultSuccessResponseSchema.extend({
|
10198
|
-
data:
|
10199
|
-
total:
|
10200
|
-
pages:
|
10201
|
-
page:
|
10202
|
-
apps:
|
10213
|
+
data: z129.object({
|
10214
|
+
total: z129.number(),
|
10215
|
+
pages: z129.number(),
|
10216
|
+
page: z129.number(),
|
10217
|
+
apps: z129.array(OAuth2AppSchema)
|
10203
10218
|
})
|
10204
10219
|
}),
|
10205
10220
|
...DefaultResponses
|
@@ -10209,8 +10224,8 @@ var serverContract = initContract49().router(
|
|
10209
10224
|
getById: {
|
10210
10225
|
method: "GET",
|
10211
10226
|
path: "/:id",
|
10212
|
-
pathParams:
|
10213
|
-
id:
|
10227
|
+
pathParams: z129.object({
|
10228
|
+
id: z129.string().uuid()
|
10214
10229
|
}),
|
10215
10230
|
responses: {
|
10216
10231
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10225,7 +10240,7 @@ var serverContract = initContract49().router(
|
|
10225
10240
|
path: "/",
|
10226
10241
|
responses: {
|
10227
10242
|
200: DefaultSuccessResponseSchema.extend({
|
10228
|
-
data:
|
10243
|
+
data: z129.array(MailServerSchema)
|
10229
10244
|
}),
|
10230
10245
|
...DefaultResponses
|
10231
10246
|
},
|
@@ -10234,8 +10249,8 @@ var serverContract = initContract49().router(
|
|
10234
10249
|
update: {
|
10235
10250
|
method: "PATCH",
|
10236
10251
|
path: "/:id",
|
10237
|
-
pathParams:
|
10238
|
-
id:
|
10252
|
+
pathParams: z129.object({
|
10253
|
+
id: z129.string().uuid()
|
10239
10254
|
}),
|
10240
10255
|
responses: {
|
10241
10256
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10249,8 +10264,8 @@ var serverContract = initContract49().router(
|
|
10249
10264
|
delete: {
|
10250
10265
|
method: "DELETE",
|
10251
10266
|
path: "/:id",
|
10252
|
-
pathParams:
|
10253
|
-
id:
|
10267
|
+
pathParams: z129.object({
|
10268
|
+
id: z129.string().uuid()
|
10254
10269
|
}),
|
10255
10270
|
responses: {
|
10256
10271
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10269,45 +10284,45 @@ var serverContract = initContract49().router(
|
|
10269
10284
|
|
10270
10285
|
// src/mail/message-contract.ts
|
10271
10286
|
import { initContract as initContract50 } from "@ts-rest/core";
|
10272
|
-
import
|
10287
|
+
import z131 from "zod";
|
10273
10288
|
|
10274
10289
|
// src/mail/schemas/message-validation.schema.ts
|
10275
|
-
import
|
10276
|
-
var MailParticipant2 =
|
10277
|
-
name:
|
10278
|
-
address:
|
10290
|
+
import z130 from "zod";
|
10291
|
+
var MailParticipant2 = z130.object({
|
10292
|
+
name: z130.string().optional(),
|
10293
|
+
address: z130.string().email()
|
10279
10294
|
});
|
10280
10295
|
var MessageContractsValidationsSchema = {
|
10281
10296
|
submit: {
|
10282
|
-
input:
|
10283
|
-
subject:
|
10284
|
-
text:
|
10285
|
-
html:
|
10297
|
+
input: z130.object({
|
10298
|
+
subject: z130.string(),
|
10299
|
+
text: z130.string(),
|
10300
|
+
html: z130.string(),
|
10286
10301
|
from: MailParticipant2,
|
10287
10302
|
to: MailParticipant2,
|
10288
|
-
cc:
|
10289
|
-
bcc:
|
10290
|
-
sendAt:
|
10291
|
-
reference:
|
10292
|
-
messageId:
|
10293
|
-
action:
|
10303
|
+
cc: z130.array(MailParticipant2).optional(),
|
10304
|
+
bcc: z130.array(MailParticipant2).optional(),
|
10305
|
+
sendAt: z130.string().optional(),
|
10306
|
+
reference: z130.object({
|
10307
|
+
messageId: z130.string(),
|
10308
|
+
action: z130.union([z130.literal("reply"), z130.literal("forward")])
|
10294
10309
|
}).optional(),
|
10295
|
-
attachments:
|
10296
|
-
|
10297
|
-
fileType:
|
10298
|
-
fileName:
|
10299
|
-
fileKey:
|
10300
|
-
fileSize:
|
10301
|
-
bucketName:
|
10302
|
-
presignedUrl:
|
10310
|
+
attachments: z130.array(
|
10311
|
+
z130.object({
|
10312
|
+
fileType: z130.string(),
|
10313
|
+
fileName: z130.string(),
|
10314
|
+
fileKey: z130.string(),
|
10315
|
+
fileSize: z130.number(),
|
10316
|
+
bucketName: z130.string(),
|
10317
|
+
presignedUrl: z130.string()
|
10303
10318
|
})
|
10304
10319
|
).optional()
|
10305
10320
|
}),
|
10306
|
-
output:
|
10307
|
-
response:
|
10308
|
-
messageId:
|
10309
|
-
sendAt:
|
10310
|
-
queueId:
|
10321
|
+
output: z130.object({
|
10322
|
+
response: z130.string(),
|
10323
|
+
messageId: z130.string(),
|
10324
|
+
sendAt: z130.string(),
|
10325
|
+
queueId: z130.string()
|
10311
10326
|
})
|
10312
10327
|
}
|
10313
10328
|
};
|
@@ -10336,8 +10351,8 @@ var messageContract = initContract50().router(
|
|
10336
10351
|
path: "/new_message_count",
|
10337
10352
|
responses: {
|
10338
10353
|
200: DefaultSuccessResponseSchema.extend({
|
10339
|
-
data:
|
10340
|
-
count:
|
10354
|
+
data: z131.object({
|
10355
|
+
count: z131.number()
|
10341
10356
|
})
|
10342
10357
|
}),
|
10343
10358
|
...DefaultResponses
|
@@ -10349,8 +10364,8 @@ var messageContract = initContract50().router(
|
|
10349
10364
|
getById: {
|
10350
10365
|
method: "GET",
|
10351
10366
|
path: "/:id",
|
10352
|
-
pathParams:
|
10353
|
-
id:
|
10367
|
+
pathParams: z131.object({
|
10368
|
+
id: z131.string()
|
10354
10369
|
}),
|
10355
10370
|
responses: {
|
10356
10371
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10365,8 +10380,8 @@ var messageContract = initContract50().router(
|
|
10365
10380
|
update: {
|
10366
10381
|
method: "PATCH",
|
10367
10382
|
path: "/:id",
|
10368
|
-
pathParams:
|
10369
|
-
id:
|
10383
|
+
pathParams: z131.object({
|
10384
|
+
id: z131.string()
|
10370
10385
|
}),
|
10371
10386
|
responses: {
|
10372
10387
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10382,8 +10397,8 @@ var messageContract = initContract50().router(
|
|
10382
10397
|
delete: {
|
10383
10398
|
method: "DELETE",
|
10384
10399
|
path: "/:id",
|
10385
|
-
pathParams:
|
10386
|
-
id:
|
10400
|
+
pathParams: z131.object({
|
10401
|
+
id: z131.string()
|
10387
10402
|
}),
|
10388
10403
|
responses: {
|
10389
10404
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10399,13 +10414,13 @@ var messageContract = initContract50().router(
|
|
10399
10414
|
cancelScheduledMessage: {
|
10400
10415
|
method: "DELETE",
|
10401
10416
|
path: "/scheduled_message/:id",
|
10402
|
-
pathParams:
|
10403
|
-
id:
|
10417
|
+
pathParams: z131.object({
|
10418
|
+
id: z131.string()
|
10404
10419
|
}),
|
10405
10420
|
responses: {
|
10406
10421
|
200: DefaultSuccessResponseSchema.extend({
|
10407
|
-
data:
|
10408
|
-
totalMessagesCount:
|
10422
|
+
data: z131.object({
|
10423
|
+
totalMessagesCount: z131.number()
|
10409
10424
|
})
|
10410
10425
|
}),
|
10411
10426
|
...DefaultResponses
|
@@ -10430,38 +10445,38 @@ var mailContract = initContract51().router({
|
|
10430
10445
|
|
10431
10446
|
// src/webchat/index.ts
|
10432
10447
|
import { initContract as initContract52 } from "@ts-rest/core";
|
10433
|
-
import
|
10448
|
+
import z134 from "zod";
|
10434
10449
|
|
10435
10450
|
// src/webchat/schema.ts
|
10436
|
-
import
|
10451
|
+
import z133 from "zod";
|
10437
10452
|
|
10438
10453
|
// src/webchat/validation.ts
|
10439
|
-
import
|
10454
|
+
import z132 from "zod";
|
10440
10455
|
var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
|
10441
10456
|
ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
|
10442
10457
|
return ChatwootChannelType3;
|
10443
10458
|
})(ChatwootChannelType2 || {});
|
10444
|
-
var WebChatChannelSchema =
|
10445
|
-
avatar:
|
10446
|
-
name:
|
10447
|
-
type:
|
10448
|
-
websiteName:
|
10449
|
-
welcomeTitle:
|
10450
|
-
websiteUrl:
|
10451
|
-
welcomeTagline:
|
10452
|
-
agentAwayMessage:
|
10453
|
-
widgetColor:
|
10459
|
+
var WebChatChannelSchema = z132.object({
|
10460
|
+
avatar: z132.string().optional(),
|
10461
|
+
name: z132.string(),
|
10462
|
+
type: z132.nativeEnum(ChatwootChannelType2),
|
10463
|
+
websiteName: z132.string(),
|
10464
|
+
welcomeTitle: z132.string(),
|
10465
|
+
websiteUrl: z132.string().url(),
|
10466
|
+
welcomeTagline: z132.string().optional(),
|
10467
|
+
agentAwayMessage: z132.string().optional(),
|
10468
|
+
widgetColor: z132.string().optional()
|
10454
10469
|
});
|
10455
10470
|
|
10456
10471
|
// src/webchat/schema.ts
|
10457
|
-
var ConnectWebChatChannelSchema =
|
10458
|
-
name:
|
10459
|
-
actor:
|
10460
|
-
id:
|
10461
|
-
name:
|
10462
|
-
email:
|
10463
|
-
address:
|
10464
|
-
phone:
|
10472
|
+
var ConnectWebChatChannelSchema = z133.object({
|
10473
|
+
name: z133.string(),
|
10474
|
+
actor: z133.object({
|
10475
|
+
id: z133.string().uuid(),
|
10476
|
+
name: z133.string(),
|
10477
|
+
email: z133.string().email(),
|
10478
|
+
address: z133.string().nullable(),
|
10479
|
+
phone: z133.string().nullable()
|
10465
10480
|
}),
|
10466
10481
|
channel: WebChatChannelSchema
|
10467
10482
|
});
|
@@ -10495,8 +10510,8 @@ var platformWebchatContract = initContract52().router(
|
|
10495
10510
|
disconnectToService: {
|
10496
10511
|
method: "POST",
|
10497
10512
|
path: "/disconnect",
|
10498
|
-
body:
|
10499
|
-
id:
|
10513
|
+
body: z134.object({
|
10514
|
+
id: z134.string().uuid()
|
10500
10515
|
}),
|
10501
10516
|
responses: {
|
10502
10517
|
200: ChannelServiceResponseSchema,
|
@@ -10507,8 +10522,8 @@ var platformWebchatContract = initContract52().router(
|
|
10507
10522
|
reconnect: {
|
10508
10523
|
method: "POST",
|
10509
10524
|
path: "/reconnect/:channelId",
|
10510
|
-
pathParams:
|
10511
|
-
channelId:
|
10525
|
+
pathParams: z134.object({
|
10526
|
+
channelId: z134.string().uuid()
|
10512
10527
|
}),
|
10513
10528
|
body: null,
|
10514
10529
|
responses: {
|
@@ -10520,8 +10535,8 @@ var platformWebchatContract = initContract52().router(
|
|
10520
10535
|
delete: {
|
10521
10536
|
method: "DELETE",
|
10522
10537
|
path: "/delete/:channelId",
|
10523
|
-
pathParams:
|
10524
|
-
channelId:
|
10538
|
+
pathParams: z134.object({
|
10539
|
+
channelId: z134.string().uuid()
|
10525
10540
|
}),
|
10526
10541
|
body: null,
|
10527
10542
|
responses: {
|
@@ -10538,18 +10553,18 @@ var platformWebchatContract = initContract52().router(
|
|
10538
10553
|
|
10539
10554
|
// src/hold-label/index.ts
|
10540
10555
|
import { initContract as initContract53 } from "@ts-rest/core";
|
10541
|
-
import
|
10556
|
+
import z136 from "zod";
|
10542
10557
|
|
10543
10558
|
// src/hold-label/validation.ts
|
10544
|
-
import
|
10545
|
-
var UpdatePositionSchema2 =
|
10546
|
-
holdLabels:
|
10547
|
-
|
10559
|
+
import z135 from "zod";
|
10560
|
+
var UpdatePositionSchema2 = z135.object({
|
10561
|
+
holdLabels: z135.array(
|
10562
|
+
z135.object({ id: z135.string().uuid(), position: z135.number() })
|
10548
10563
|
)
|
10549
10564
|
});
|
10550
|
-
var HoldRoomSchema =
|
10551
|
-
roomId:
|
10552
|
-
holdLabelId:
|
10565
|
+
var HoldRoomSchema = z135.object({
|
10566
|
+
roomId: z135.string().uuid(),
|
10567
|
+
holdLabelId: z135.string().uuid()
|
10553
10568
|
});
|
10554
10569
|
|
10555
10570
|
// src/hold-label/index.ts
|
@@ -10558,7 +10573,7 @@ var holdLabelContract = initContract53().router(
|
|
10558
10573
|
createHoldLabel: {
|
10559
10574
|
method: "POST",
|
10560
10575
|
path: "/",
|
10561
|
-
body:
|
10576
|
+
body: z136.object({ name: z136.string() }),
|
10562
10577
|
responses: {
|
10563
10578
|
201: DefaultSuccessResponseSchema.extend({
|
10564
10579
|
holdLabel: HoldLabelSchema
|
@@ -10570,7 +10585,7 @@ var holdLabelContract = initContract53().router(
|
|
10570
10585
|
path: "/",
|
10571
10586
|
responses: {
|
10572
10587
|
200: DefaultSuccessResponseSchema.extend({
|
10573
|
-
holdLabels:
|
10588
|
+
holdLabels: z136.array(HoldLabelSchema)
|
10574
10589
|
})
|
10575
10590
|
}
|
10576
10591
|
},
|
@@ -10588,8 +10603,8 @@ var holdLabelContract = initContract53().router(
|
|
10588
10603
|
updateHoldLabel: {
|
10589
10604
|
method: "PATCH",
|
10590
10605
|
path: "/:id",
|
10591
|
-
pathParams:
|
10592
|
-
body:
|
10606
|
+
pathParams: z136.object({ id: z136.string().uuid() }),
|
10607
|
+
body: z136.object({ name: z136.string() }),
|
10593
10608
|
responses: {
|
10594
10609
|
200: DefaultSuccessResponseSchema.extend({
|
10595
10610
|
holdLabel: HoldLabelSchema
|
@@ -10599,7 +10614,7 @@ var holdLabelContract = initContract53().router(
|
|
10599
10614
|
deleteHoldLabel: {
|
10600
10615
|
method: "DELETE",
|
10601
10616
|
path: "/:id",
|
10602
|
-
pathParams:
|
10617
|
+
pathParams: z136.object({ id: z136.string().uuid() }),
|
10603
10618
|
body: null,
|
10604
10619
|
responses: {
|
10605
10620
|
200: DefaultSuccessResponseSchema
|
@@ -10610,10 +10625,10 @@ var holdLabelContract = initContract53().router(
|
|
10610
10625
|
path: "/auto-unhold",
|
10611
10626
|
responses: {
|
10612
10627
|
200: DefaultSuccessResponseSchema.extend({
|
10613
|
-
autoUnhold:
|
10614
|
-
resumeLabel:
|
10615
|
-
show:
|
10616
|
-
name:
|
10628
|
+
autoUnhold: z136.boolean(),
|
10629
|
+
resumeLabel: z136.object({
|
10630
|
+
show: z136.boolean(),
|
10631
|
+
name: z136.string()
|
10617
10632
|
})
|
10618
10633
|
})
|
10619
10634
|
}
|
@@ -10621,19 +10636,19 @@ var holdLabelContract = initContract53().router(
|
|
10621
10636
|
updateAutoUnhold: {
|
10622
10637
|
method: "POST",
|
10623
10638
|
path: "/auto-unhold",
|
10624
|
-
body:
|
10625
|
-
autoUnhold:
|
10626
|
-
resumeLabel:
|
10627
|
-
show:
|
10628
|
-
name:
|
10639
|
+
body: z136.object({
|
10640
|
+
autoUnhold: z136.boolean().optional(),
|
10641
|
+
resumeLabel: z136.object({
|
10642
|
+
show: z136.boolean().optional(),
|
10643
|
+
name: z136.string().optional()
|
10629
10644
|
}).optional()
|
10630
10645
|
}),
|
10631
10646
|
responses: {
|
10632
10647
|
200: DefaultSuccessResponseSchema.extend({
|
10633
|
-
autoUnhold:
|
10634
|
-
resumeLabel:
|
10635
|
-
show:
|
10636
|
-
name:
|
10648
|
+
autoUnhold: z136.boolean(),
|
10649
|
+
resumeLabel: z136.object({
|
10650
|
+
show: z136.boolean(),
|
10651
|
+
name: z136.string()
|
10637
10652
|
})
|
10638
10653
|
})
|
10639
10654
|
}
|
@@ -10641,10 +10656,10 @@ var holdLabelContract = initContract53().router(
|
|
10641
10656
|
getHoldLogs: {
|
10642
10657
|
method: "GET",
|
10643
10658
|
path: "/hold-logs",
|
10644
|
-
query:
|
10659
|
+
query: z136.object({ cxLogId: z136.string().uuid() }),
|
10645
10660
|
responses: {
|
10646
|
-
200:
|
10647
|
-
holdLogs:
|
10661
|
+
200: z136.object({
|
10662
|
+
holdLogs: z136.array(FormattedHoldLogSchema)
|
10648
10663
|
})
|
10649
10664
|
}
|
10650
10665
|
},
|
@@ -10661,7 +10676,7 @@ var holdLabelContract = initContract53().router(
|
|
10661
10676
|
unholdRoom: {
|
10662
10677
|
method: "POST",
|
10663
10678
|
path: "/unhold-room",
|
10664
|
-
body:
|
10679
|
+
body: z136.object({ roomId: z136.string().uuid() }),
|
10665
10680
|
responses: {
|
10666
10681
|
200: DefaultSuccessResponseSchema.extend({
|
10667
10682
|
holdLog: HoldLogSchema.optional()
|
@@ -10674,89 +10689,89 @@ var holdLabelContract = initContract53().router(
|
|
10674
10689
|
|
10675
10690
|
// src/subscription/index.ts
|
10676
10691
|
import { initContract as initContract54 } from "@ts-rest/core";
|
10677
|
-
import { z as
|
10692
|
+
import { z as z139 } from "zod";
|
10678
10693
|
|
10679
10694
|
// src/subscription/schema.ts
|
10680
|
-
import
|
10695
|
+
import z137 from "zod";
|
10681
10696
|
var ProductPriceSchema = DefaultEntitySchema.extend({
|
10682
|
-
priceId:
|
10683
|
-
name:
|
10684
|
-
perUnit:
|
10685
|
-
price:
|
10686
|
-
currency:
|
10697
|
+
priceId: z137.string(),
|
10698
|
+
name: z137.string().nullable(),
|
10699
|
+
perUnit: z137.number(),
|
10700
|
+
price: z137.number(),
|
10701
|
+
currency: z137.string().nullable()
|
10687
10702
|
});
|
10688
10703
|
var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
|
10689
|
-
provider:
|
10690
|
-
productId:
|
10691
|
-
name:
|
10692
|
-
type:
|
10693
|
-
omnichannel:
|
10694
|
-
usageType:
|
10704
|
+
provider: z137.string(),
|
10705
|
+
productId: z137.string(),
|
10706
|
+
name: z137.string(),
|
10707
|
+
type: z137.string(),
|
10708
|
+
omnichannel: z137.string(),
|
10709
|
+
usageType: z137.string().nullable(),
|
10695
10710
|
productPrice: ProductPriceSchema
|
10696
10711
|
});
|
10697
10712
|
var RelatedProductSchema = DefaultEntitySchema.extend({
|
10698
|
-
includedQuantity:
|
10713
|
+
includedQuantity: z137.number(),
|
10699
10714
|
product: ProductWithoutRelatedSchema
|
10700
10715
|
});
|
10701
10716
|
var ProductSchema = DefaultEntitySchema.extend({
|
10702
|
-
provider:
|
10703
|
-
productId:
|
10704
|
-
name:
|
10705
|
-
type:
|
10706
|
-
omnichannel:
|
10707
|
-
usageType:
|
10717
|
+
provider: z137.string(),
|
10718
|
+
productId: z137.string(),
|
10719
|
+
name: z137.string(),
|
10720
|
+
type: z137.string(),
|
10721
|
+
omnichannel: z137.string(),
|
10722
|
+
usageType: z137.string().nullable(),
|
10708
10723
|
productPrice: ProductPriceSchema,
|
10709
|
-
relatedProducts:
|
10724
|
+
relatedProducts: z137.array(RelatedProductSchema)
|
10710
10725
|
});
|
10711
10726
|
var CustomerSchema = DefaultEntitySchema.extend({
|
10712
|
-
provider:
|
10713
|
-
customerId:
|
10714
|
-
email:
|
10715
|
-
name:
|
10716
|
-
balance:
|
10727
|
+
provider: z137.string(),
|
10728
|
+
customerId: z137.string(),
|
10729
|
+
email: z137.string(),
|
10730
|
+
name: z137.string(),
|
10731
|
+
balance: z137.number()
|
10717
10732
|
});
|
10718
10733
|
var SubscriptionProuctSchema = DefaultEntitySchema.extend({
|
10719
|
-
limit:
|
10720
|
-
subscriptionItemId:
|
10721
|
-
usage:
|
10734
|
+
limit: z137.number(),
|
10735
|
+
subscriptionItemId: z137.string(),
|
10736
|
+
usage: z137.number().nullable(),
|
10722
10737
|
product: ProductSchema
|
10723
10738
|
});
|
10724
10739
|
var SubscriptionSchema = DefaultEntitySchema.extend({
|
10725
|
-
provider:
|
10726
|
-
type:
|
10727
|
-
subscriptionId:
|
10728
|
-
interval:
|
10729
|
-
quantity:
|
10730
|
-
amount:
|
10731
|
-
startAt:
|
10732
|
-
expireAt:
|
10733
|
-
status:
|
10734
|
-
name:
|
10735
|
-
subscriptionProducts:
|
10740
|
+
provider: z137.string(),
|
10741
|
+
type: z137.string(),
|
10742
|
+
subscriptionId: z137.string(),
|
10743
|
+
interval: z137.string(),
|
10744
|
+
quantity: z137.number(),
|
10745
|
+
amount: z137.number(),
|
10746
|
+
startAt: z137.date().nullable(),
|
10747
|
+
expireAt: z137.date(),
|
10748
|
+
status: z137.string(),
|
10749
|
+
name: z137.string().nullable(),
|
10750
|
+
subscriptionProducts: z137.array(SubscriptionProuctSchema),
|
10736
10751
|
productPrice: ProductPriceSchema,
|
10737
10752
|
product: ProductSchema
|
10738
10753
|
});
|
10739
10754
|
|
10740
10755
|
// src/subscription/validation.ts
|
10741
|
-
import { z as
|
10742
|
-
var GetAvailablePlanSchema =
|
10743
|
-
type:
|
10744
|
-
currency:
|
10745
|
-
});
|
10746
|
-
var UpdateSubscriptionSchema =
|
10747
|
-
planProductId:
|
10748
|
-
planProductPriceId:
|
10749
|
-
subscriptionId:
|
10750
|
-
subscriptionProducts:
|
10751
|
-
|
10752
|
-
productId:
|
10753
|
-
productPriceId:
|
10754
|
-
quantity:
|
10756
|
+
import { z as z138 } from "zod";
|
10757
|
+
var GetAvailablePlanSchema = z138.object({
|
10758
|
+
type: z138.string(),
|
10759
|
+
currency: z138.string()
|
10760
|
+
});
|
10761
|
+
var UpdateSubscriptionSchema = z138.object({
|
10762
|
+
planProductId: z138.string(),
|
10763
|
+
planProductPriceId: z138.string(),
|
10764
|
+
subscriptionId: z138.string(),
|
10765
|
+
subscriptionProducts: z138.array(
|
10766
|
+
z138.object({
|
10767
|
+
productId: z138.string(),
|
10768
|
+
productPriceId: z138.string(),
|
10769
|
+
quantity: z138.number()
|
10755
10770
|
})
|
10756
10771
|
)
|
10757
10772
|
});
|
10758
|
-
var TopUpBalanceSchema =
|
10759
|
-
quantity:
|
10773
|
+
var TopUpBalanceSchema = z138.object({
|
10774
|
+
quantity: z138.number()
|
10760
10775
|
});
|
10761
10776
|
|
10762
10777
|
// src/subscription/index.ts
|
@@ -10780,9 +10795,9 @@ var subscriptionContract = initContract54().router(
|
|
10780
10795
|
body: UpdateSubscriptionSchema,
|
10781
10796
|
responses: {
|
10782
10797
|
200: DefaultSuccessResponseSchema.extend({
|
10783
|
-
message:
|
10784
|
-
requireCheckout:
|
10785
|
-
checkoutUrl:
|
10798
|
+
message: z139.string(),
|
10799
|
+
requireCheckout: z139.boolean(),
|
10800
|
+
checkoutUrl: z139.string().nullable()
|
10786
10801
|
}),
|
10787
10802
|
402: DefaultErrorResponseSchema,
|
10788
10803
|
500: DefaultErrorResponseSchema
|
@@ -10794,7 +10809,7 @@ var subscriptionContract = initContract54().router(
|
|
10794
10809
|
body: TopUpBalanceSchema,
|
10795
10810
|
responses: {
|
10796
10811
|
200: DefaultSuccessResponseSchema.extend({
|
10797
|
-
checkoutUrl:
|
10812
|
+
checkoutUrl: z139.string()
|
10798
10813
|
}),
|
10799
10814
|
500: DefaultErrorResponseSchema
|
10800
10815
|
}
|
@@ -10805,7 +10820,18 @@ var subscriptionContract = initContract54().router(
|
|
10805
10820
|
query: GetAvailablePlanSchema,
|
10806
10821
|
responses: {
|
10807
10822
|
200: DefaultSuccessResponseSchema.extend({
|
10808
|
-
data:
|
10823
|
+
data: z139.array(ProductSchema)
|
10824
|
+
}),
|
10825
|
+
500: DefaultErrorResponseSchema
|
10826
|
+
}
|
10827
|
+
},
|
10828
|
+
getAvailableAddOns: {
|
10829
|
+
method: "GET",
|
10830
|
+
path: "/available-add-ons",
|
10831
|
+
query: GetAvailablePlanSchema,
|
10832
|
+
responses: {
|
10833
|
+
200: DefaultSuccessResponseSchema.extend({
|
10834
|
+
data: z139.array(ProductSchema)
|
10809
10835
|
}),
|
10810
10836
|
500: DefaultErrorResponseSchema
|
10811
10837
|
}
|
@@ -10828,19 +10854,19 @@ var subscriptionContract = initContract54().router(
|
|
10828
10854
|
|
10829
10855
|
// src/cx-intelligence/index.ts
|
10830
10856
|
import { initContract as initContract55 } from "@ts-rest/core";
|
10831
|
-
import
|
10857
|
+
import z140 from "zod";
|
10832
10858
|
var cxIntelligenceContract = initContract55().router(
|
10833
10859
|
{
|
10834
10860
|
toggle: {
|
10835
10861
|
method: "POST",
|
10836
10862
|
path: "/toggle",
|
10837
10863
|
headers: DefaultHeaderSchema,
|
10838
|
-
body:
|
10839
|
-
enabled:
|
10864
|
+
body: z140.object({
|
10865
|
+
enabled: z140.union([z140.literal(true), z140.literal(false)])
|
10840
10866
|
}),
|
10841
10867
|
responses: {
|
10842
10868
|
200: DefaultSuccessResponseSchema.extend({
|
10843
|
-
message:
|
10869
|
+
message: z140.string()
|
10844
10870
|
}),
|
10845
10871
|
500: DefaultErrorResponseSchema
|
10846
10872
|
},
|
@@ -10850,15 +10876,15 @@ var cxIntelligenceContract = initContract55().router(
|
|
10850
10876
|
method: "POST",
|
10851
10877
|
path: "/cx-logs/:id/transcribe",
|
10852
10878
|
headers: DefaultHeaderSchema,
|
10853
|
-
pathParams:
|
10854
|
-
id:
|
10879
|
+
pathParams: z140.object({
|
10880
|
+
id: z140.string().uuid()
|
10855
10881
|
}),
|
10856
|
-
body:
|
10857
|
-
fileUrl:
|
10882
|
+
body: z140.object({
|
10883
|
+
fileUrl: z140.string()
|
10858
10884
|
}),
|
10859
10885
|
responses: {
|
10860
10886
|
200: DefaultSuccessResponseSchema.extend({
|
10861
|
-
message:
|
10887
|
+
message: z140.string()
|
10862
10888
|
}),
|
10863
10889
|
403: DefaultErrorResponseSchema,
|
10864
10890
|
404: DefaultErrorResponseSchema,
|
@@ -10878,13 +10904,13 @@ var settingCxIntelligenceContract = initContract55().router(
|
|
10878
10904
|
headers: DefaultHeaderSchema,
|
10879
10905
|
responses: {
|
10880
10906
|
200: DefaultSuccessResponseSchema.extend({
|
10881
|
-
message:
|
10882
|
-
status:
|
10907
|
+
message: z140.string(),
|
10908
|
+
status: z140.boolean()
|
10883
10909
|
}),
|
10884
|
-
422:
|
10885
|
-
requestId:
|
10886
|
-
message:
|
10887
|
-
status:
|
10910
|
+
422: z140.object({
|
10911
|
+
requestId: z140.string(),
|
10912
|
+
message: z140.string(),
|
10913
|
+
status: z140.boolean()
|
10888
10914
|
}),
|
10889
10915
|
500: DefaultErrorResponseSchema
|
10890
10916
|
},
|
@@ -10896,20 +10922,20 @@ var settingCxIntelligenceContract = initContract55().router(
|
|
10896
10922
|
|
10897
10923
|
// src/export/index.ts
|
10898
10924
|
import { initContract as initContract56 } from "@ts-rest/core";
|
10899
|
-
import
|
10925
|
+
import z141 from "zod";
|
10900
10926
|
var exportContract = initContract56().router(
|
10901
10927
|
{
|
10902
10928
|
notifyExport: {
|
10903
10929
|
method: "POST",
|
10904
10930
|
path: "notify",
|
10905
|
-
body:
|
10906
|
-
userId:
|
10907
|
-
module:
|
10908
|
-
fileUrl:
|
10931
|
+
body: z141.object({
|
10932
|
+
userId: z141.string().uuid(),
|
10933
|
+
module: z141.string(),
|
10934
|
+
fileUrl: z141.string()
|
10909
10935
|
}),
|
10910
10936
|
responses: {
|
10911
10937
|
200: DefaultSuccessResponseSchema.extend({
|
10912
|
-
success:
|
10938
|
+
success: z141.boolean()
|
10913
10939
|
}),
|
10914
10940
|
500: DefaultErrorResponseSchema
|
10915
10941
|
}
|
@@ -10992,6 +11018,7 @@ export {
|
|
10992
11018
|
userContract,
|
10993
11019
|
userNotificationContract,
|
10994
11020
|
userPresenceStatusLogContract,
|
11021
|
+
widgetContract,
|
10995
11022
|
widgetSettingContract,
|
10996
11023
|
workflowContract,
|
10997
11024
|
wrapUpFormContract
|