Class: Projects
Defined in: src/utils/projects.ts Projects class for managing projects in the Galileo platform. Delegates to the internal GalileoApiClient for API interactions.Constructors
Constructor
Returns
Projects
Methods
addUserCollaborators()
Parameters
collaborators
object[]
Collaborator payloads to create.
projectId?
string
(Optional) Project ID override when client is not project-scoped.
Returns
Promise<object[]>
A promise that resolves to the created collaborators.
create()
Parameters
name
string
Name of the project.
options?
ProjectCreateOptions
(Optional) Additional project creation settings.
Returns
Promise<{
createdAt: string;
createdBy?: null | string;
id: string;
name?: null | string;
type?: | null
| "prompt_evaluation"
| "llm_monitor"
| "gen_ai"
| "training_inference"
| "protect";
updatedAt: string;
}>
A promise that resolves to the created project.
delete()
Parameters
options
GetProjectOptions
The deletion options.
Returns
Promise<{
message: string;
}>
A promise that resolves to the delete response payload.
get()
Parameters
options
GetProjectOptions
The lookup options.
Returns
Promise<{
bookmark?: boolean;
createdAt: string;
createdBy: string;
createdByUser: {
email: string;
firstName?: null | string;
id: string;
lastName?: null | string;
};
description?: null | string;
id: string;
labels?: "sample"[];
name?: null | string;
permissions?: object[];
runs: object[];
type?: | null
| "prompt_evaluation"
| "llm_monitor"
| "gen_ai"
| "training_inference"
| "protect";
updatedAt: string;
}>
A promise that resolves to the matching project.
getAllUserCollaborators()
Parameters
projectId?
string
(Optional) The project ID to list collaborators for.
Returns
Promise<object[]>
A promise that resolves to all collaborators for the project.
getWithEnvFallbacks()
Parameters
options
GetProjectOptions
The lookup options.
Returns
Promise<{
bookmark?: boolean;
createdAt: string;
createdBy: string;
createdByUser: {
email: string;
firstName?: null | string;
id: string;
lastName?: null | string;
};
description?: null | string;
id: string;
labels?: "sample"[];
name?: null | string;
permissions?: object[];
runs: object[];
type?: | null
| "prompt_evaluation"
| "llm_monitor"
| "gen_ai"
| "training_inference"
| "protect";
updatedAt: string;
}>
A promise that resolves to the matching project.
list()
Parameters
projectType?
(Optional) Project type filter to apply."prompt_evaluation" | "llm_monitor" | "gen_ai" | "training_inference" | "protect"
Returns
Promise<object[]>
A promise that resolves to the matching projects.
removeUserCollaborator()
Parameters
userId
string
ID of the collaborator to remove.
projectId
string
Project ID that the collaborator belongs to.
Returns
Promise<void>
A promise that resolves when removal succeeds.
shareWithUser()
Parameters
projectId
string
ID of the project to share.
userId
string
ID of the user receiving access.
role
(Optional) Role to assign to the user (defaults to viewer)."owner" | "editor" | "annotator" | "viewer"
Returns
Promise<{
createdAt: string;
email: string;
firstName: null | string;
id: string;
lastName: null | string;
permissions?: object[];
role: "owner" | "editor" | "annotator" | "viewer";
userId: string;
}>
A promise that resolves to the created collaborator record.
unshareWithUser()
Parameters
projectId
string
ID of the project to unshare.
userId
string
ID of the user losing access.
Returns
Promise<void>
A promise that resolves when the user is unshared.
updateUserCollaborator()
Parameters
userId
string
ID of the collaborator to update.
update
Update payload describing the collaborator changes.role
"owner" | "editor" | "annotator" | "viewer"
(Optional) Updated role for the collaborator.
projectId?
string
(Optional) Project ID override when client is not project-scoped.
Returns
Promise<{
createdAt: string;
email: string;
firstName: null | string;
id: string;
lastName: null | string;
permissions?: object[];
role: "owner" | "editor" | "annotator" | "viewer";
userId: string;
}>
A promise that resolves to the updated collaborator.