UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

50 lines 2.16 kB
import { entityMetaSchema } from "../IEntityMeta"; export const knowledgeConnectorExecutionStatus = ["none", "active", "done", "error"]; export const knowledgeConnectorDataSchema = { title: "knowledgeConnectorDataSchema", type: "object", additionalProperties: false, required: ["extension", "type", "config", "name", "version", "schedule"], properties: { extension: { type: "string" }, type: { type: "string" }, version: { type: "string" }, config: { type: "object", additionalProperties: true }, name: { type: "string", format: "resource-name" }, schedule: { type: "object", additionalProperties: false, required: ["enabled", "weekDays", "hour", "minute"], properties: { enabled: { type: "boolean" }, start: { type: "integer", format: "timestamp" }, hour: { type: "integer", minimum: 0, maximum: 23 }, minute: { type: "integer", minimum: 0, maximum: 59 }, totalMinutes: { type: "integer", minimum: 0 }, timezone: { type: "string" }, weekDays: { type: "array", items: { type: "integer", minimum: 0, maximum: 6 } } } } } }; export const knowledgeConnectorSchema = { title: "knowledgeConnectorDataSchema", type: "object", additionalProperties: false, required: [ "extension", "type", "config", "name", "version", "schedule" ], properties: Object.assign(Object.assign(Object.assign({}, entityMetaSchema.properties), knowledgeConnectorDataSchema.properties), { referenceId: { type: "string" }, storeReference: { type: "string", format: "mongo-id" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" }, lastExecution: { type: ["integer", "null"], format: "timestamp" }, lastExecutionStatus: { type: "string", enum: [...knowledgeConnectorExecutionStatus] } }) }; //# sourceMappingURL=IKnowledgeConnector.js.map