@cognigy/rest-api-client
Version:
Cognigy REST-Client
110 lines • 5.81 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.intentSchema = exports.intentDataSchema = exports.intentInDBDataSchema = exports.localizedIntentDataSchema = exports.overrideIntentDefaultRepliesAsExamplesTypes = exports.intentTypes = void 0;
const IEntityMeta_1 = require("../IEntityMeta");
const IIntentFeedbackReport_1 = require("./IIntentFeedbackReport");
const IIntentRelation_1 = require("./IIntentRelation");
exports.intentTypes = ["yesNoIntent", "default"];
exports.overrideIntentDefaultRepliesAsExamplesTypes = [
"useFlowSettings",
"on",
"off"
];
exports.localizedIntentDataSchema = {
title: "localizedIntentDataSchema",
type: "object",
additionalProperties: false,
properties: {
condition: { type: ["string", "null"], maxLength: 2000 },
confirmationSentences: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 300 }
},
rules: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 300 }
},
disambiguationSentence: { type: "string", maxLength: 300 },
localeReference: { format: "mongo-id" }
}
};
exports.intentInDBDataSchema = {
title: "intentInDBDataSchema",
type: "object",
additionalProperties: false,
properties: Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), { feedbackReport: IIntentFeedbackReport_1.intentFeedbackInDBReportSchema, localizedData: { type: "array", items: exports.localizedIntentDataSchema }, enabledLocaleReferences: { type: "array", items: { format: "mongo-id" } }, name: { type: "string", format: "resource-name" }, description: { type: "string", format: "resource-description" }, intentType: { type: "string", enum: [...exports.intentTypes] }, intentRelationReferences: {
type: "array",
items: { type: "string", format: "mongo-id" }
}, tags: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 30 }
}, data: { type: ["object", "null"] }, nodeReferenceId: { type: ["string", "null"], format: "uuid" }, isDisabled: { type: "boolean" }, isRejectIntent: { type: "boolean" }, parentIntentId: { type: ["string", "null"], format: "mongo-id" }, childFeatures: {
oneOf: [
{ type: "boolean" },
{ type: "array", items: { type: "string", format: "mongo-id" } }
]
}, biasTowardsParentOrChildIntents: { type: "string", enum: [...IIntentRelation_1.biasTowardsParentOrChildIntentsTypes] }, flowReferenceId: { type: "string", format: "uuid" }, referenceId: { type: "string", format: "uuid" }, flowReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, analyticsLabel: { type: "string", format: "analytics-label" }, overrideIntentDefaultRepliesAsExamples: {
type: ["string", "null"],
enum: [...exports.overrideIntentDefaultRepliesAsExamplesTypes]
} })
};
exports.intentDataSchema = {
title: "intentDataSchema",
type: "object",
additionalProperties: false,
properties: {
name: { type: "string", format: "resource-name" },
description: { type: "string", format: "resource-description" },
intentType: { type: "string", enum: [...exports.intentTypes] },
condition: { type: ["string", "null"], maxLength: 2000 },
intentRelationReferences: {
type: "array",
items: { type: "string", format: "mongo-id" }
},
tags: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 30 }
},
confirmationSentences: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 300 }
},
rules: {
type: "array",
maxItems: 10,
items: { type: "string", minLength: 1, maxLength: 300 }
},
disambiguationSentence: { type: "string", maxLength: 300 },
data: { type: ["object", "null"] },
nodeReferenceId: { type: ["string", "null"], format: "uuid" },
isDisabled: { type: "boolean" },
isRejectIntent: { type: "boolean" },
parentIntentId: { type: ["string", "null"], format: "mongo-id" },
childFeatures: {
oneOf: [
{ type: "boolean" },
{ type: "array", items: { type: "string", format: "mongo-id" } }
]
},
biasTowardsParentOrChildIntents: { type: "string", enum: [...IIntentRelation_1.biasTowardsParentOrChildIntentsTypes] },
flowReferenceId: { type: "string", format: "uuid" },
feedbackReport: IIntentFeedbackReport_1.intentFeedbackReportDataSchema,
analyticsLabel: { type: "string", format: "analytics-label" },
overrideIntentDefaultRepliesAsExamples: {
type: ["string", "null"],
enum: [...exports.overrideIntentDefaultRepliesAsExamplesTypes]
}
}
};
exports.intentSchema = {
title: "intentSchema",
type: "object",
additionalProperties: false,
properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.intentDataSchema.properties), { referenceId: { type: "string", format: "uuid" }, localeReference: { type: "string", format: "mongo-id" }, flowReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } })
};
//# sourceMappingURL=IIntent.js.map