@@ -24,28 +24,128 @@ export class Projects extends APIResource {
2424 policies : PoliciesAPI . Policies = new PoliciesAPI . Policies ( this . _client ) ;
2525
2626 /**
27- * CreateProject creates a new Project.
27+ * Creates a new project with specified configuration.
28+ *
29+ * Use this method to:
30+ *
31+ * - Set up development projects
32+ * - Configure project environments
33+ * - Define project settings
34+ * - Initialize project content
35+ *
36+ * ### Examples
37+ *
38+ * - Create basic project:
39+ *
40+ * Creates a project with minimal configuration.
41+ *
42+ * ```yaml
43+ * name: "Web Application"
44+ * environmentClass:
45+ * environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
46+ * initializer:
47+ * specs:
48+ * - git:
49+ * remoteUri: "https://github.com/org/repo"
50+ * ```
51+ *
52+ * - Create project with devcontainer:
53+ *
54+ * Creates a project with custom development container.
55+ *
56+ * ```yaml
57+ * name: "Backend Service"
58+ * environmentClass:
59+ * environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
60+ * initializer:
61+ * specs:
62+ * - git:
63+ * remoteUri: "https://github.com/org/backend"
64+ * devcontainerFilePath: ".devcontainer/devcontainer.json"
65+ * automationsFilePath: ".gitpod/automations.yaml"
66+ * ```
2867 */
2968 create ( body : ProjectCreateParams , options ?: RequestOptions ) : APIPromise < ProjectCreateResponse > {
3069 return this . _client . post ( '/gitpod.v1.ProjectService/CreateProject' , { body, ...options } ) ;
3170 }
3271
3372 /**
34- * GetProject retrieves a single Project.
73+ * Gets details about a specific project.
74+ *
75+ * Use this method to:
76+ *
77+ * - View project configuration
78+ * - Check project status
79+ * - Get project metadata
80+ *
81+ * ### Examples
82+ *
83+ * - Get project details:
84+ *
85+ * Retrieves information about a specific project.
86+ *
87+ * ```yaml
88+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
89+ * ```
3590 */
3691 retrieve ( body : ProjectRetrieveParams , options ?: RequestOptions ) : APIPromise < ProjectRetrieveResponse > {
3792 return this . _client . post ( '/gitpod.v1.ProjectService/GetProject' , { body, ...options } ) ;
3893 }
3994
4095 /**
41- * UpdateProject updates the properties of a Project.
96+ * Updates a project's configuration.
97+ *
98+ * Use this method to:
99+ *
100+ * - Modify project settings
101+ * - Update environment class
102+ * - Change project name
103+ * - Configure initializers
104+ *
105+ * ### Examples
106+ *
107+ * - Update project name:
108+ *
109+ * Changes the project's display name.
110+ *
111+ * ```yaml
112+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
113+ * name: "New Project Name"
114+ * ```
115+ *
116+ * - Update environment class:
117+ *
118+ * Changes the project's environment class.
119+ *
120+ * ```yaml
121+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
122+ * environmentClass:
123+ * environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
124+ * ```
42125 */
43126 update ( body : ProjectUpdateParams , options ?: RequestOptions ) : APIPromise < ProjectUpdateResponse > {
44127 return this . _client . post ( '/gitpod.v1.ProjectService/UpdateProject' , { body, ...options } ) ;
45128 }
46129
47130 /**
48- * ListProjects lists all projects the caller has access to.
131+ * Lists projects with optional filtering.
132+ *
133+ * Use this method to:
134+ *
135+ * - View all accessible projects
136+ * - Browse project configurations
137+ * - Monitor project status
138+ *
139+ * ### Examples
140+ *
141+ * - List projects:
142+ *
143+ * Shows all projects with pagination.
144+ *
145+ * ```yaml
146+ * pagination:
147+ * pageSize: 20
148+ * ```
49149 */
50150 list ( params : ProjectListParams , options ?: RequestOptions ) : PagePromise < ProjectsProjectsPage , Project > {
51151 const { token, pageSize, ...body } = params ;
@@ -58,14 +158,47 @@ export class Projects extends APIResource {
58158 }
59159
60160 /**
61- * DeleteProject deletes the specified project.
161+ * Deletes a project permanently.
162+ *
163+ * Use this method to:
164+ *
165+ * - Remove unused projects
166+ * - Clean up test projects
167+ * - Delete obsolete configurations
168+ *
169+ * ### Examples
170+ *
171+ * - Delete project:
172+ *
173+ * Permanently removes a project.
174+ *
175+ * ```yaml
176+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
177+ * ```
62178 */
63179 delete ( body : ProjectDeleteParams , options ?: RequestOptions ) : APIPromise < unknown > {
64180 return this . _client . post ( '/gitpod.v1.ProjectService/DeleteProject' , { body, ...options } ) ;
65181 }
66182
67183 /**
68- * CreateProject creates a new Project using an environment as template.
184+ * Creates a new project using an existing environment as a template.
185+ *
186+ * Use this method to:
187+ *
188+ * - Clone environment configurations
189+ * - Create projects from templates
190+ * - Share environment setups
191+ *
192+ * ### Examples
193+ *
194+ * - Create from environment:
195+ *
196+ * Creates a project based on existing environment.
197+ *
198+ * ```yaml
199+ * name: "Frontend Project"
200+ * environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
201+ * ```
69202 */
70203 createFromEnvironment (
71204 body : ProjectCreateFromEnvironmentParams ,
0 commit comments