Skip to content

Commit 7d70a05

Browse files
feat(api): add project_creation_defaults field to organization policies
1 parent e96ca1a commit 7d70a05

6 files changed

Lines changed: 45 additions & 3 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-163329b61609d5c35f782faa460b99ad014584f1f0746d863c5612d6ee6e2c4b.yml
3-
openapi_spec_hash: 97bfee064dda4a0e940140c91fec5206
4-
config_hash: e7d6e90c037f5d495ae913f3806471fd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod/gitpod-b9c1a7558d4dda4b0e58729d1c14b130d19262615d63ce6c78340daeca76188e.yml
3+
openapi_spec_hash: a91da1453dbfb8aceccb085665b3b21d
4+
config_hash: 9052d3b03d620cf6871184b15487e020

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ Types:
480480
- <code><a href="./src/resources/organizations/policies.ts">CustomSecurityAgent</a></code>
481481
- <code><a href="./src/resources/organizations/policies.ts">KernelControlsAction</a></code>
482482
- <code><a href="./src/resources/organizations/policies.ts">OrganizationPolicies</a></code>
483+
- <code><a href="./src/resources/organizations/policies.ts">ProjectCreationDefaults</a></code>
483484
- <code><a href="./src/resources/organizations/policies.ts">SecurityAgentPolicy</a></code>
484485
- <code><a href="./src/resources/organizations/policies.ts">VetoExecPolicy</a></code>
485486
- <code><a href="./src/resources/organizations/policies.ts">PolicyRetrieveResponse</a></code>

src/resources/organizations/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export {
7777
type CustomSecurityAgent,
7878
type KernelControlsAction,
7979
type OrganizationPolicies,
80+
type ProjectCreationDefaults,
8081
type SecurityAgentPolicy,
8182
type VetoExecPolicy,
8283
type PolicyRetrieveResponse,

src/resources/organizations/organizations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import {
6666
PolicyRetrieveResponse,
6767
PolicyUpdateParams,
6868
PolicyUpdateResponse,
69+
ProjectCreationDefaults,
6970
SecurityAgentPolicy,
7071
VetoExecPolicy,
7172
} from './policies';
@@ -1063,6 +1064,7 @@ export declare namespace Organizations {
10631064
type CustomSecurityAgent as CustomSecurityAgent,
10641065
type KernelControlsAction as KernelControlsAction,
10651066
type OrganizationPolicies as OrganizationPolicies,
1067+
type ProjectCreationDefaults as ProjectCreationDefaults,
10661068
type SecurityAgentPolicy as SecurityAgentPolicy,
10671069
type VetoExecPolicy as VetoExecPolicy,
10681070
type PolicyRetrieveResponse as PolicyRetrieveResponse,

src/resources/organizations/policies.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,12 @@ export interface OrganizationPolicies {
349349
*/
350350
maximumEnvironmentTimeout?: string;
351351

352+
/**
353+
* project_creation_defaults contains default settings applied to newly created
354+
* projects.
355+
*/
356+
projectCreationDefaults?: ProjectCreationDefaults;
357+
352358
/**
353359
* security_agent_policy contains security agent configuration for the
354360
* organization. When configured, security agents are automatically deployed to all
@@ -377,6 +383,18 @@ export namespace OrganizationPolicies {
377383
}
378384
}
379385

386+
/**
387+
* ProjectCreationDefaults contains default settings applied to newly created
388+
* projects.
389+
*/
390+
export interface ProjectCreationDefaults {
391+
/**
392+
* insights_enabled controls whether Insights (co-author attribution) is
393+
* automatically enabled on newly created projects.
394+
*/
395+
insightsEnabled?: boolean;
396+
}
397+
380398
/**
381399
* SecurityAgentPolicy contains security agent configuration for an organization.
382400
* When enabled, security agents are automatically deployed to all environments.
@@ -527,6 +545,12 @@ export interface PolicyUpdateParams {
527545
*/
528546
portSharingDisabled?: boolean | null;
529547

548+
/**
549+
* project_creation_defaults contains updates to default settings applied to newly
550+
* created projects.
551+
*/
552+
projectCreationDefaults?: PolicyUpdateParams.ProjectCreationDefaults | null;
553+
530554
/**
531555
* require_custom_domain_access controls whether users must access via custom
532556
* domain when one is configured. When true, access via app.gitpod.io is blocked.
@@ -606,6 +630,18 @@ export namespace PolicyUpdateParams {
606630
allowedVersions?: Array<string>;
607631
}
608632

633+
/**
634+
* project_creation_defaults contains updates to default settings applied to newly
635+
* created projects.
636+
*/
637+
export interface ProjectCreationDefaults {
638+
/**
639+
* insights_enabled controls whether Insights (co-author attribution) is
640+
* automatically enabled on newly created projects.
641+
*/
642+
insightsEnabled?: boolean | null;
643+
}
644+
609645
/**
610646
* security_agent_policy contains security agent configuration updates
611647
*/
@@ -659,6 +695,7 @@ export declare namespace Policies {
659695
type CustomSecurityAgent as CustomSecurityAgent,
660696
type KernelControlsAction as KernelControlsAction,
661697
type OrganizationPolicies as OrganizationPolicies,
698+
type ProjectCreationDefaults as ProjectCreationDefaults,
662699
type SecurityAgentPolicy as SecurityAgentPolicy,
663700
type VetoExecPolicy as VetoExecPolicy,
664701
type PolicyRetrieveResponse as PolicyRetrieveResponse,

tests/api-resources/organizations/policies.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ describe('resource policies', () => {
6969
membersCreateProjects: true,
7070
membersRequireProjects: true,
7171
portSharingDisabled: true,
72+
projectCreationDefaults: { insightsEnabled: true },
7273
requireCustomDomainAccess: true,
7374
restrictAccountCreationToScim: true,
7475
securityAgentPolicy: {

0 commit comments

Comments
 (0)