UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

110 lines 4.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.trainerRecordQuerySchema = exports.trainerRecordInDbSchema = exports.trainerRecordSchema = exports.trainerRecordDataSchema = exports.trainerRecordBulkCreateDataSchema = void 0; /* Custom Modules */ const createQuerySchema_1 = require("../../helper/createQuerySchema"); /* Interfaces & Types */ const IEntityMeta_1 = require("../resources/IEntityMeta"); const THandleAction_1 = require("./THandleAction"); exports.trainerRecordBulkCreateDataSchema = { title: "trainerRecordBulkCreateDataSchema", type: "object", additionalProperties: false, properties: { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, count: { type: "integer", minimum: 0 }, localeReferenceId: { type: "string", format: "uuid" }, snapshotId: { anyOf: [ { type: "null" }, { format: "mongo-id" }, ] }, nlu: { type: "object", properties: { detailedSlots: { type: ["object", "null"], }, intentFlow: { type: ["null", "string"] }, intentId: { type: ["null", "string"] }, intentMapperResults: { type: ["null", "object"], additionalProperties: true, properties: { finalIntentName: { type: ["null", "string"] }, finalIntentScore: { type: ["null", "number"] }, highestFlow: { type: ["null", "string"] }, }, }, tokens: { type: "array", items: { type: "string" } }, type: { type: ["null", "string"] }, understood: { type: ["null", "boolean"] }, } }, text: { type: "string", minLength: 1 }, flowReferenceId: { type: "string", format: "uuid" }, }, }; exports.trainerRecordDataSchema = { title: "trainerRecordDataSchema", type: "object", additionalProperties: false, properties: { count: { type: "integer", minimum: 0 }, localeReferenceId: { type: "string", format: "uuid" }, snapshotId: { anyOf: [ { type: "null" }, { format: "mongo-id" }, ] }, nlu: { type: "object", properties: { detailedSlots: { type: ["object", "null"], }, intentFlow: { type: ["null", "string"] }, intentId: { type: ["null", "string"] }, intentMapperResults: { type: ["object", "null"], additionalProperties: true, properties: { finalIntentName: { type: ["null", "string"] }, finalIntentScore: { type: ["null", "number"] }, highestFlow: { type: ["null", "string"] }, }, }, tokens: { type: "array", items: { type: "string" } }, type: { type: ["null", "string"] }, understood: { type: ["null", "boolean"] }, } }, text: { type: "string", minLength: 1 }, flowReferenceId: { type: "string", format: "uuid" }, handled: { type: "boolean" }, handleAction: { type: ["string", "null"], enum: [...THandleAction_1.handleActionTypes, null] }, meta: { type: ["object", "null"] }, }, }; exports.trainerRecordSchema = { title: "trainerRecordSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.trainerRecordDataSchema.properties), { expiresAt: { type: "object" }, projectReference: { format: "mongo-id" }, organisationReference: { format: "mongo-id" } }), }; exports.trainerRecordInDbSchema = { title: "trainerRecordInDbSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign(Object.assign({}, IEntityMeta_1.entityMetaSchema.properties), exports.trainerRecordDataSchema.properties), { snapshotReference: { anyOf: [ { type: "null" }, { format: "mongo-id" }, ] }, expiresAt: { type: "object" }, projectReference: { format: "mongo-id" }, organisationReference: { format: "mongo-id" } }), }; exports.trainerRecordQuerySchema = (0, createQuerySchema_1.createQuerySchema)("trainerRecordQuerySchema", exports.trainerRecordSchema); //# sourceMappingURL=ITrainerRecord.js.map