@cognigy/rest-api-client
Version:
Cognigy REST-Client
66 lines • 3.67 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flowQuerySchema = exports.flowSchema = exports.flowDataSchema = exports.flowInDBSchema = exports.localizedFlowDataSchema = void 0;
/* Custom Modules */
const createQuerySchema_1 = require("../../helper/createQuerySchema");
const IEntityMeta_1 = require("./IEntityMeta");
const ITrainGroupFeedbackReport_1 = require("./intent/ITrainGroupFeedbackReport");
exports.localizedFlowDataSchema = {
title: "localizedFlowDataSchema",
type: "object",
additionalProperties: false,
properties: {
attachedLexiconReferences: {
type: "array",
items: { format: "mongo-id" },
},
localeReference: { format: "mongo-id" },
}
};
exports.flowInDBSchema = {
title: "flowInDBSchema",
type: "object",
additionalProperties: false,
properties: Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), { attachedFlows: { type: "array", additionalItems: { type: "string", format: "mongo-id" } }, localizedData: { type: "array", items: exports.localizedFlowDataSchema }, context: {}, img: { type: "string" }, name: { type: "string", format: "resource-name" }, description: { type: "string", format: "resource-description" }, chartReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, referenceId: { type: "string", format: "uuid" } }),
};
exports.flowDataSchema = {
title: "flowDataSchema",
type: "object",
additionalProperties: false,
properties: {
attachedFlows: { type: "array", additionalItems: { type: "string", format: "mongo-id" } },
attachedLexicons: { type: "array", additionalItems: { type: "string", format: "mongo-id" } },
context: {
type: "object",
additionalProperties: false,
patternProperties: {
'^[^.]+$': {
type: ['object', 'string', 'number', 'boolean', 'array'],
additionalProperties: false,
patternProperties: {
'^[^.]+$': {} // Specify the desired schema for the innermost properties
}
}
}
},
img: { type: "string" },
name: { type: "string", format: "resource-name" },
description: { type: "string", format: "resource-description" },
},
};
exports.flowSchema = {
title: "flowSchema",
type: "object",
additionalProperties: false,
properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.flowDataSchema.properties), { feedbackReport: ITrainGroupFeedbackReport_1.trainGroupFeedbackReportDataSchema, isTrainingOutOfDate: { type: "boolean" }, lastTrainedAt: { type: "number" }, localeReference: { format: "mongo-id" }, chartReference: { type: "string", format: "mongo-id" }, intentTrainGroupReference: { type: "string", format: "mongo-id" }, intentTrainGroupReferenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, referenceId: { type: "string", format: "uuid" }, nluOptions: {
type: "object",
additionalProperties: false,
properties: {
intentModelVersion: {
type: "string"
}
}
} }),
};
exports.flowQuerySchema = (0, createQuerySchema_1.createQuerySchema)("flowQuerySchema", exports.flowSchema);
//# sourceMappingURL=IFlow.js.map