@@ -7,21 +7,75 @@ import { RequestOptions } from '../../internal/request-options';
77
88export class Policies extends APIResource {
99 /**
10- * CreateProjectPolicy creates a Project Policy.
10+ * Creates a new policy for a project.
11+ *
12+ * Use this method to:
13+ *
14+ * - Set up access controls
15+ * - Define group permissions
16+ * - Configure role-based access
17+ *
18+ * ### Examples
19+ *
20+ * - Create admin policy:
21+ *
22+ * Grants admin access to a group.
23+ *
24+ * ```yaml
25+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
26+ * groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
27+ * role: PROJECT_ROLE_ADMIN
28+ * ```
1129 */
1230 create ( body : PolicyCreateParams , options ?: RequestOptions ) : APIPromise < PolicyCreateResponse > {
1331 return this . _client . post ( '/gitpod.v1.ProjectService/CreateProjectPolicy' , { body, ...options } ) ;
1432 }
1533
1634 /**
17- * UpdateProjectPolicy updates a Project Policy.
35+ * Updates an existing project policy.
36+ *
37+ * Use this method to:
38+ *
39+ * - Modify access levels
40+ * - Change group roles
41+ * - Update permissions
42+ *
43+ * ### Examples
44+ *
45+ * - Update policy role:
46+ *
47+ * Changes a group's access level.
48+ *
49+ * ```yaml
50+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
51+ * groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
52+ * role: PROJECT_ROLE_EDITOR
53+ * ```
1854 */
1955 update ( body : PolicyUpdateParams , options ?: RequestOptions ) : APIPromise < PolicyUpdateResponse > {
2056 return this . _client . post ( '/gitpod.v1.ProjectService/UpdateProjectPolicy' , { body, ...options } ) ;
2157 }
2258
2359 /**
24- * ListProjectPolicies lists policies for a project.
60+ * Lists policies for a project.
61+ *
62+ * Use this method to:
63+ *
64+ * - View access controls
65+ * - Check policy configurations
66+ * - Audit permissions
67+ *
68+ * ### Examples
69+ *
70+ * - List policies:
71+ *
72+ * Shows all policies for a project.
73+ *
74+ * ```yaml
75+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
76+ * pagination:
77+ * pageSize: 20
78+ * ```
2579 */
2680 list (
2781 params : PolicyListParams ,
@@ -36,7 +90,24 @@ export class Policies extends APIResource {
3690 }
3791
3892 /**
39- * DeleteProjectPolicy deletes a Project Policy.
93+ * Deletes a project policy.
94+ *
95+ * Use this method to:
96+ *
97+ * - Remove access controls
98+ * - Revoke permissions
99+ * - Clean up policies
100+ *
101+ * ### Examples
102+ *
103+ * - Delete policy:
104+ *
105+ * Removes a group's access policy.
106+ *
107+ * ```yaml
108+ * projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
109+ * groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
110+ * ```
40111 */
41112 delete ( body : PolicyDeleteParams , options ?: RequestOptions ) : APIPromise < unknown > {
42113 return this . _client . post ( '/gitpod.v1.ProjectService/DeleteProjectPolicy' , { body, ...options } ) ;
0 commit comments