UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

136 lines 4.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.nodeQuerySchema = exports.nodeSchema = exports.updateNodeDataSchema = exports.nodeDataSchema = exports.nodeInDBSchema = exports.searchableNodeFields = exports.defaultNodeFields = exports.ConvertActionType = void 0; /* Custom Modules */ const createQuerySchema_1 = require("../../helper/createQuerySchema"); var ConvertActionType; (function (ConvertActionType) { ConvertActionType["ADDED"] = "added"; ConvertActionType["REMOVED"] = "removed"; ConvertActionType["UPDATED"] = "updated"; })(ConvertActionType = exports.ConvertActionType || (exports.ConvertActionType = {})); exports.defaultNodeFields = [ "label", "comment", "commentColor", "isDisabled", "isEntryPoint", "preview", "analyticsLabel" ]; exports.searchableNodeFields = [ "comment", "label", "type", "_id", "referenceId", "extension", "config", "analyticsLabel" ]; exports.nodeInDBSchema = { title: "nodeInDBSchema", type: "object", additionalProperties: false, properties: { _id: { format: "mongo-id" }, localizedData: { type: "array", items: { type: "object", additionalProperties: false, properties: { config: { type: "object" }, localeReference: { format: "mongo-id" }, preview: {} } } }, referenceId: { type: "string", format: "uuid" }, comment: { type: "string", maxLength: 512 }, commentColor: { oneOf: [ { type: "string", format: "color" }, { type: "string", enum: [""] } ] }, label: { type: "string", maxLength: 200 }, isDisabled: { type: "boolean" }, isEntryPoint: { type: "boolean" }, type: { type: "string", minLength: 1, maxLength: 200 }, extension: { type: "string", format: "package-name" }, chartReference: { format: "mongo-id" }, resourceReference: { format: "mongo-id" }, projectReference: { format: "mongo-id" }, organisationReference: { format: "mongo-id" }, analyticsLabel: { format: "analytics-label" } } }; exports.nodeDataSchema = { title: "nodeDataSchema", type: "object", additionalProperties: false, properties: { preview: {}, comment: { type: "string", maxLength: 512 }, commentColor: { oneOf: [ { type: "string", format: "color" }, { type: "string", enum: [""] } ] }, label: { type: "string", maxLength: 200 }, analyticsLabel: { type: ["null", "string"], format: "analytics-label" }, isDisabled: { type: "boolean" }, isEntryPoint: { type: "boolean" }, config: { type: "object", additionalProperties: { propertyNames: { type: "string" } } }, localizedData: { type: "array", items: { type: "object", properties: { config: {}, preview: {}, localeReference: { type: "string", format: "mongo-id" } } } } } }; exports.updateNodeDataSchema = { title: "nodeDataSchema", type: "object", additionalProperties: false, properties: { preview: {}, comment: { type: "string", maxLength: 512 }, commentColor: { oneOf: [ { type: "string", format: "color" }, { type: "string", enum: [""] } ] }, label: { type: "string", maxLength: 200 }, analyticsLabel: { type: ["null", "string"], format: "analytics-label" }, isDisabled: { type: "boolean" }, isEntryPoint: { type: "boolean" }, config: { type: "object", additionalProperties: { propertyNames: { type: "string" } } } } }; exports.nodeSchema = { title: "nodeSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign({ _id: { format: "mongo-id" }, referenceId: { type: "string", format: "uuid" } }, exports.nodeDataSchema.properties), { type: { type: "string", minLength: 1, maxLength: 200 }, extension: { type: "string", format: "package-name" }, chartReference: { format: "mongo-id" }, resourceReference: { format: "mongo-id" }, localeReference: { type: "string", format: "mongo-id" }, projectReference: { format: "mongo-id" }, organisationReference: { format: "mongo-id" } }) }; exports.nodeQuerySchema = (0, createQuerySchema_1.createQuerySchema)("nodeQuerySchema", exports.nodeSchema); //# sourceMappingURL=IChartNode.js.map