@kl1/contracts 1.0.51 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -8
- package/dist/index.mjs.map +1 -1
- package/dist/src/app/index.d.ts +17 -0
- package/dist/src/app/index.d.ts.map +1 -0
- package/dist/src/contract.d.ts +90 -0
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/mail/mail-server.d.ts +216 -0
- package/dist/src/mail/mail-server.d.ts.map +1 -0
- package/dist/src/platform-contact/schema.d.ts +30 -0
- package/dist/src/platform-contact/schema.d.ts.map +1 -0
- package/dist/src/telephony-cdr/index.d.ts +90 -0
- package/dist/src/telephony-cdr/index.d.ts.map +1 -1
- package/dist/src/telephony-cdr/validation.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -4445,6 +4445,8 @@ var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
|
4445
4445
|
pageSize: import_zod72.default.coerce.number().positive().optional()
|
4446
4446
|
})
|
4447
4447
|
);
|
4448
|
+
var NullEmptyStringUndefined = ["", null, void 0];
|
4449
|
+
var EmtptyArrayUndefined = [[], void 0];
|
4448
4450
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
4449
4451
|
reportType: import_zod72.default.enum([
|
4450
4452
|
"extcallstatistics",
|
@@ -4464,50 +4466,49 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
4464
4466
|
trunkList: import_zod72.default.array(import_zod72.default.string()).optional(),
|
4465
4467
|
extensionList: import_zod72.default.array(import_zod72.default.string()).optional()
|
4466
4468
|
}).superRefine((input, ctx) => {
|
4467
|
-
|
4468
|
-
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance") && (input.selectedDate === null || input.selectedDate === "")) {
|
4469
|
+
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
4469
4470
|
ctx.addIssue({
|
4470
4471
|
code: import_zod72.default.ZodIssueCode.custom,
|
4471
4472
|
path: ["selectedDate"],
|
4472
4473
|
message: "selectedDate is required."
|
4473
4474
|
});
|
4474
4475
|
}
|
4475
|
-
if (input.reportType === "extcallstatistics" && (input.communicationType
|
4476
|
+
if (input.reportType === "extcallstatistics" && NullEmptyStringUndefined.includes(input.communicationType)) {
|
4476
4477
|
ctx.addIssue({
|
4477
4478
|
code: import_zod72.default.ZodIssueCode.custom,
|
4478
4479
|
path: ["communicationType"],
|
4479
4480
|
message: "communicationType is required."
|
4480
4481
|
});
|
4481
4482
|
}
|
4482
|
-
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && (input.time
|
4483
|
+
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
4483
4484
|
ctx.addIssue({
|
4484
4485
|
code: import_zod72.default.ZodIssueCode.custom,
|
4485
4486
|
path: ["time"],
|
4486
4487
|
message: "time is required."
|
4487
4488
|
});
|
4488
4489
|
}
|
4489
|
-
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && (
|
4490
|
+
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
4490
4491
|
ctx.addIssue({
|
4491
4492
|
code: import_zod72.default.ZodIssueCode.custom,
|
4492
4493
|
path: ["queueList"],
|
4493
4494
|
message: "queueList is required."
|
4494
4495
|
});
|
4495
4496
|
}
|
4496
|
-
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && (input.queueId
|
4497
|
+
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
4497
4498
|
ctx.addIssue({
|
4498
4499
|
code: import_zod72.default.ZodIssueCode.custom,
|
4499
4500
|
path: ["queueId"],
|
4500
4501
|
message: "queueId is required."
|
4501
4502
|
});
|
4502
4503
|
}
|
4503
|
-
if (input.reportType === "trunkactivity" && (
|
4504
|
+
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
4504
4505
|
ctx.addIssue({
|
4505
4506
|
code: import_zod72.default.ZodIssueCode.custom,
|
4506
4507
|
path: ["trunkList"],
|
4507
4508
|
message: "trunkList is required."
|
4508
4509
|
});
|
4509
4510
|
}
|
4510
|
-
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && (
|
4511
|
+
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
4511
4512
|
ctx.addIssue({
|
4512
4513
|
code: import_zod72.default.ZodIssueCode.custom,
|
4513
4514
|
path: ["extensionList"],
|
@@ -4751,6 +4752,17 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
4751
4752
|
},
|
4752
4753
|
summary: "Get yeastar call report."
|
4753
4754
|
},
|
4755
|
+
yeastarCallReportExport: {
|
4756
|
+
method: "POST",
|
4757
|
+
path: "/yeastar_call_report/export",
|
4758
|
+
headers: DefaultHeaderSchema,
|
4759
|
+
body: GetYeastarCallReportSchema,
|
4760
|
+
responses: {
|
4761
|
+
200: null,
|
4762
|
+
401: DefaultUnauthorizedSchema
|
4763
|
+
},
|
4764
|
+
summary: "Export yeastar call report."
|
4765
|
+
},
|
4754
4766
|
getTrunks: {
|
4755
4767
|
method: "GET",
|
4756
4768
|
path: "/trunks",
|