import { Ib, TransformResult } from '@ibgib/ts-gib/dist/types.mjs'; import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs'; import { CommentIbGib_V1 } from '@ibgib/core-gib/dist/common/comment/comment-types.mjs'; import { IbGibSpaceAny } from '@ibgib/core-gib/dist/witness/space/space-base-v1.mjs'; import { MetaspaceService } from '@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs'; import { ProjectData_V1, ProjectIbGib_V1, ProjectIbInfo } from './project-types.mjs'; export declare function getProjectSafeName({ name }: { name: string; }): string; /** * Generates the `ib` string for a ProjectIbGib based on its data. * The structure is: `${PROJECT_ATOM} ${safeName} ${addlMetadataText}` * where addlMetadataText contains underscore-delimited fields like timestampInTicks. * * ## notes * * atow (04/2025), we are "descending" (forking) from a source comment ibgib to * create the project. As such, we are positioning the project ibgib itself to * have a similar structure to a comment ibgib. So the schema for the `ib` * purposefully has the safeName in the second position just like a comment * ibgib has a saferized version of the comment.data.text in its ib schema. * * WARNING * WARNING * ATOW (05/2025) THIS FUNCTION'S DETAILS ARE USED IN MUT8-IBGIB * APIFUNCTIONINFO. IF THIS CHANGES, THEN THAT FUNCTION MUST BE CHANGED TOO. * WARNING * WARNING * * @see {@link ProjectIbInfo} * @see {@link ProjectAddlMetadataInfo} * */ export declare function getProjectIb({ data, }: { data: ProjectData_V1; }): string; export declare function validateProjectIb({ ib, }: { ib: Ib; }): string[] | undefined; /** * Parses a project `ib` string into its components. * * @see {@link getProjectIb} for expected ib schema */ export declare function parseProjectIb({ ib, }: { ib: Ib; }): ProjectIbInfo; /** * Validates the ProjectData_V1 structure. * Returns array of error messages if invalid, otherwise undefined. */ export declare function validateProjectData_V1({ data, }: { data: ProjectData_V1 | any; }): string[] | undefined; /** * Validates a ProjectIbGib_V1 intrinsically, its data, and the consistency * between the ib string and the data content. * Returns an array of error messages if invalid, otherwise undefined. */ export declare function validateProjectIbGib_V1({ ibGib, }: { ibGib: IbGib_V1; }): Promise; /** * Type guard to check if an object conforms to ProjectData_V1 structure. */ export declare function isProjectData_V1(data: any): data is ProjectData_V1; /** * Type guard to check if an IbGib_V1 is structurally a ProjectIbGib_V1. * Verifies the atom in the ib and checks data structure using isProjectData_V1. */ export declare function isProjectIbGib_V1(ibGib: IbGib_V1): ibGib is ProjectIbGib_V1; /** * Creates a new Project ibGib. */ export declare function createProjectIbGib({ name, srcCommentIbGib, description, saveInSpace, space, }: { name: string; /** * NOT implemented yet */ srcCommentIbGib?: CommentIbGib_V1; description?: string; /** * If true, saves the newly created project ibgib and all intermediate * dependency ibgibs (dna and others) in the given {@link space}, or default * local space if that is falsy. */ saveInSpace?: boolean; /** * If set and {@link saveInSpace} is true, then this will be where all * ibgibs are saved. */ space?: IbGibSpaceAny; }): Promise>; interface AddChildOptsDetails_Text { type: 'text'; title?: string; text?: string; } interface AddChildOptsDetails_Canvas { wakka: string; } /** * discriminate union other options here */ type AddChildOptsDetails = AddChildOptsDetails_Text | AddChildOptsDetails_Canvas; interface AddChildOpts { type: 'text'; ibGib: IbGib_V1; details: TDetails; /** * rel8nName to use to rel8 the child to the ibgib. */ rel8nName?: string; metaspace: MetaspaceService; space: IbGibSpaceAny; } export declare function addChildIbGib(arg: AddChildOpts): Promise; /** * Retrieves all the latest project ibGibs from a given space (or the default * local user space). */ export declare function getProjects({ metaspace, space, }: { metaspace: MetaspaceService; space?: IbGibSpaceAny; }): Promise; export {}; //# sourceMappingURL=project-helper.d.mts.map