UNPKG

@cognigy/rest-api-client

Version:

Cognigy REST-Client

30 lines 1.26 kB
/* Custom Modules */ import { createQuerySchema } from "../helper/createQuerySchema"; import { entityMetaSchema } from "./resources/IEntityMeta"; ; ; export const profileTypes = [ "simulator", "regular" // profiles that are not simulator. In db they will not have a type field for backward compatibility reasons. ]; export const profileDataSchema = { title: "profileDataSchema", type: "object", additionalProperties: false, properties: { active: { type: "boolean" }, type: { type: "string", enum: [...profileTypes] }, contactIds: { type: "array", items: { type: "string" }, additionalItems: false, minItems: 1 }, contactIdsHash: { type: "string" }, expiresAt: { type: "object" }, profile: {}, }, }; export const profileSchema = { title: "profileSchema", type: "object", additionalProperties: false, properties: Object.assign(Object.assign(Object.assign({}, profileDataSchema.properties), entityMetaSchema.properties), { projectReference: { type: "string", format: "mongo-id" }, organisationReference: { type: "string", format: "mongo-id" } }), }; export const profileQuerySchema = createQuerySchema("profileQuerySchema", profileSchema); //# sourceMappingURL=IProfile.js.map