@cognigy/rest-api-client
Version:
Cognigy REST-Client
73 lines • 2.9 kB
JavaScript
export const overlapIntentFeedbackFindingArrayType = [
"strongOverlap",
"someOverlap"
];
export const genericIntentFeedbackFindingArrayType = [
"poorFScore",
"fairFScore",
"goodFScore",
"fewSentences",
"unclearIntent",
"noSiblings"
];
export const intentFeedbackInDBReportSchema = {
title: "intentFeedbackInDBReportSchema",
type: "object",
additionalProperties: false,
properties: {
info: {
type: "object",
additionalProperties: false,
properties: {
fScore: { type: "number" }
}
},
findings: {
type: "array",
additionalItems: false,
items: {
type: "object",
additionalProperties: false,
required: ["type"],
properties: {
type: {
type: "string",
enum: [...genericIntentFeedbackFindingArrayType, ...overlapIntentFeedbackFindingArrayType, "lowDataIntents"]
},
// The referenceId can also equal 'Reject', hence cannot have a format
overlappingIntentReferenceId: { type: ["string", "null"] },
overlappingIntentName: { type: ["string", "null"] },
overlappingFlowId: { type: ["string", "null"], format: "mongo-id" },
overlappingFlowName: { type: ["string", "null"] },
overlappingIntentId: { type: ["string", "null"], format: "mongo-id" },
intents: {
type: "array",
additionalItems: false,
items: {
type: "object",
additionalProperties: false,
properties: {
// The referenceId can also equal 'Reject', hence cannot have a format
intentReferenceId: { type: ["string", "null"] },
intentName: { type: ["string", "null"] },
flowId: { type: ["string", "null"], format: "mongo-id" },
flowName: { type: ["string", "null"] },
intentId: { type: ["string", "null"], format: "mongo-id" },
},
},
},
},
},
},
},
};
export const intentFeedbackReportDataSchema = {
title: "intentFeedbackReportDataSchema",
type: "object",
additionalProperties: false,
properties: Object.assign(Object.assign({}, intentFeedbackInDBReportSchema.properties), { intentReferenceId: {
type: "string",
format: "uuid"
} }),
};
//# sourceMappingURL=IIntentFeedbackReport.js.map