UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

47 lines 1.7 kB
import { entityMetaSchema } from "./IEntityMeta"; export const 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" }, }, }; export const 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: goalStepMetricSchema, }, }, }; export const 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: goalStepSchema }, }, }; export const goalSchema = { title: "goalSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign(Object.assign({}, goalDataSchema.properties), entityMetaSchema.properties), { referenceId: { type: "string", format: "uuid" }, projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }), }; //# sourceMappingURL=IGoal.js.map