UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

50 lines 1.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.goalSchema = exports.goalDataSchema = exports.goalStepSchema = exports.goalStepMetricSchema = void 0; const IEntityMeta_1 = require("./IEntityMeta"); exports.goalStepMetricSchema = { title: "goalStepMetricSchema", type: "object", additionalProperties: false, properties: { _id: { type: "string", format: "mongo-id" }, name: { type: "string" }, description: { type: "string" }, type: { type: "string", enum: ["currency", "duration", "revenue"] }, value: { type: "number" }, }, }; exports.goalStepSchema = { title: "goalStepSchema", type: "object", additionalProperties: false, properties: { _id: { type: "string", format: "mongo-id" }, name: { type: "string" }, description: { type: "string" }, order: { type: "number" }, type: { type: "string", enum: ["start", "completion"] }, metrics: { type: "array", items: exports.goalStepMetricSchema, }, }, }; exports.goalDataSchema = { title: "goalDataSchema", type: "object", additionalProperties: false, properties: { version: { type: "string", format: "uuid" }, description: { type: "string" }, name: { type: "string", format: "resource-name" }, steps: { type: "array", items: exports.goalStepSchema }, }, }; exports.goalSchema = { title: "goalSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign(Object.assign({}, exports.goalDataSchema.properties), IEntityMeta_1.entityMetaSchema.properties), { referenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }), }; //# sourceMappingURL=IGoal.js.map