import type { CreateResult, EntityParams } from '../types.js'; /** * Creates an entity with the given name, description, cover, properties, and types. * All IDs passed to this function (cover, types, property IDs, relation IDs, etc.) are validated. * If any invalid ID is provided, the function will throw an error. * * @deprecated Use `Ops.entities.create(...)`. * * @example * ```ts * const { id, ops } = createEntity({ * id: entityId, // optional and will be generated if not provided * name: 'name of the entity', * description: 'description of the entity', * cover: imageEntityId, * types: [typeEntityId1, typeEntityId2], * values: [ * { * property: propertyId, * value: 'value of the property' * } * ], * relations: { * [relationPropertyId]: { * toEntity: 'id of the entity', * id: 'id of the relation', // optional * toSpace: 'id of the to space', // optional * fromSpace: 'id of the from space', // optional * fromVersion: 'id of the from version', // optional * toVersion: 'id of the to version', // optional * position: positionString, // optional * entityId: 'id of the relation entity', // optional and will be generated if not provided * entityName: 'name of the relation entity', // optional * entityDescription: 'description of the relation entity', // optional * entityCover: 'id of the cover', // optional * entityValues: [ // optional values for the relation entity * { property: propertyId, value: 'value of the property' }, * ], * entityRelations: { // same structure as `relations` and can be nested * [relationPropertyId]: { * toEntity: 'id of the entity', * id: 'id of the relation', // optional * position: positionString, // optional * }, * }, * entityTypes: [typeEntityId1, typeEntityId2], // optional * }, * }, * }); * ``` * @param params – {@link EntityParams} * @returns – {@link CreateResult} * @throws Will throw an error if any provided ID is invalid */ export declare const createEntity: ({ id: providedId, name, description, cover, values, relations, types, }: EntityParams) => CreateResult; //# sourceMappingURL=create-entity.d.ts.map