@cognigy/rest-api-client
Version:
Cognigy REST-Client
46 lines • 1.52 kB
JavaScript
import { entityMetaSchema } from "./resources/IEntityMeta";
export const profileEntrySchemaTypes = ["string", "object", "number", "boolean"];
export const profileSchemaEntry = {
title: "profileSchemaEntry",
type: "object",
required: ["field", "internal", "type"],
properties: {
field: { type: "string" },
internal: { type: "string", format: "profile-schema-entry-internal" },
type: { type: "string", format: "profile-schema-entry-type" }
},
};
export const profileSchemaSchema = {
title: "profileSchemaSchema",
type: "object",
properties: Object.assign(Object.assign({}, entityMetaSchema.properties), { details: { type: "array", items: profileSchemaEntry, additionalItems: false }, schema: {
additionalProperties: {
type: "string",
propertyNames: { type: "string" },
enum: ["string", "object", "number", "boolean"]
},
} }),
};
/**
* WARNING!!
* make sure to update the default values for the profile mongoose model in the models/profiles.ts file
* when changing the profile schema and the default profile object below
*/
export const defaultProfile = {
firstname: "",
lastname: "",
email: "",
age: 0,
birthday: "",
gender: "",
location: "",
profilepic: "",
prevent_data_collection: false,
accepted_gdpr: false,
privacy_policy: {
accepted: false
},
tasks: [],
memories: [],
};
//# sourceMappingURL=IProfileSchema.js.map