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