@@ -24,28 +24,128 @@ export class Projects extends APIResource {
24
24
policies : PoliciesAPI . Policies = new PoliciesAPI . Policies ( this . _client ) ;
25
25
26
26
/**
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
+ * ```
28
67
*/
29
68
create ( body : ProjectCreateParams , options ?: RequestOptions ) : APIPromise < ProjectCreateResponse > {
30
69
return this . _client . post ( '/gitpod.v1.ProjectService/CreateProject' , { body, ...options } ) ;
31
70
}
32
71
33
72
/**
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
+ * ```
35
90
*/
36
91
retrieve ( body : ProjectRetrieveParams , options ?: RequestOptions ) : APIPromise < ProjectRetrieveResponse > {
37
92
return this . _client . post ( '/gitpod.v1.ProjectService/GetProject' , { body, ...options } ) ;
38
93
}
39
94
40
95
/**
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
+ * ```
42
125
*/
43
126
update ( body : ProjectUpdateParams , options ?: RequestOptions ) : APIPromise < ProjectUpdateResponse > {
44
127
return this . _client . post ( '/gitpod.v1.ProjectService/UpdateProject' , { body, ...options } ) ;
45
128
}
46
129
47
130
/**
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
+ * ```
49
149
*/
50
150
list ( params : ProjectListParams , options ?: RequestOptions ) : PagePromise < ProjectsProjectsPage , Project > {
51
151
const { token, pageSize, ...body } = params ;
@@ -58,14 +158,47 @@ export class Projects extends APIResource {
58
158
}
59
159
60
160
/**
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
+ * ```
62
178
*/
63
179
delete ( body : ProjectDeleteParams , options ?: RequestOptions ) : APIPromise < unknown > {
64
180
return this . _client . post ( '/gitpod.v1.ProjectService/DeleteProject' , { body, ...options } ) ;
65
181
}
66
182
67
183
/**
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
+ * ```
69
202
*/
70
203
createFromEnvironment (
71
204
body : ProjectCreateFromEnvironmentParams ,
0 commit comments