Skip to content

Commit 70becd4

Browse files
feat: API for SCIM configuration management
1 parent 53dcf30 commit 70becd4

19 files changed

+1773
-4
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 161
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-baa13045a9492d958fc06db0dcee2fd99972435f8b9a707831cf4da8d84db194.yml
3-
openapi_spec_hash: 5e7adb5d5cdf924eb7c0e4ddf1b81260
4-
config_hash: d930f7e17a525d153b810339251607b7
1+
configured_endpoints: 167
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-40c6617e0b944168058135c9325d556b21c2edde19518090aefa542c76afcdb3.yml
3+
openapi_spec_hash: 235404d99aa56e51b933261d195dc206
4+
config_hash: cec4ffca97dd72023c573623499bc35b

api.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,29 @@ Methods:
438438
- <code title="post /gitpod.v1.OrganizationService/GetOrganizationPolicies">client.organizations.policies.<a href="./src/gitpod/resources/organizations/policies.py">retrieve</a>(\*\*<a href="src/gitpod/types/organizations/policy_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/policy_retrieve_response.py">PolicyRetrieveResponse</a></code>
439439
- <code title="post /gitpod.v1.OrganizationService/UpdateOrganizationPolicies">client.organizations.policies.<a href="./src/gitpod/resources/organizations/policies.py">update</a>(\*\*<a href="src/gitpod/types/organizations/policy_update_params.py">params</a>) -> object</code>
440440

441+
## ScimConfigurations
442+
443+
Types:
444+
445+
```python
446+
from gitpod.types.organizations import (
447+
ScimConfiguration,
448+
ScimConfigurationCreateResponse,
449+
ScimConfigurationRetrieveResponse,
450+
ScimConfigurationUpdateResponse,
451+
ScimConfigurationRegenerateTokenResponse,
452+
)
453+
```
454+
455+
Methods:
456+
457+
- <code title="post /gitpod.v1.OrganizationService/CreateSCIMConfiguration">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">create</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_create_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/scim_configuration_create_response.py">ScimConfigurationCreateResponse</a></code>
458+
- <code title="post /gitpod.v1.OrganizationService/GetSCIMConfiguration">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">retrieve</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/scim_configuration_retrieve_response.py">ScimConfigurationRetrieveResponse</a></code>
459+
- <code title="post /gitpod.v1.OrganizationService/UpdateSCIMConfiguration">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">update</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_update_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/scim_configuration_update_response.py">ScimConfigurationUpdateResponse</a></code>
460+
- <code title="post /gitpod.v1.OrganizationService/ListSCIMConfigurations">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">list</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_list_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/scim_configuration.py">SyncScimConfigurationsPage[ScimConfiguration]</a></code>
461+
- <code title="post /gitpod.v1.OrganizationService/DeleteSCIMConfiguration">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">delete</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_delete_params.py">params</a>) -> object</code>
462+
- <code title="post /gitpod.v1.OrganizationService/RegenerateSCIMToken">client.organizations.scim_configurations.<a href="./src/gitpod/resources/organizations/scim_configurations.py">regenerate_token</a>(\*\*<a href="src/gitpod/types/organizations/scim_configuration_regenerate_token_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/scim_configuration_regenerate_token_response.py">ScimConfigurationRegenerateTokenResponse</a></code>
463+
441464
## SSOConfigurations
442465

443466
Types:

src/gitpod/pagination.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
"RunnersPagePagination",
7979
"SyncRunnersPage",
8080
"AsyncRunnersPage",
81+
"ScimConfigurationsPagePagination",
82+
"SyncScimConfigurationsPage",
83+
"AsyncScimConfigurationsPage",
8184
"SecretsPagePagination",
8285
"SyncSecretsPage",
8386
"AsyncSecretsPage",
@@ -1251,6 +1254,56 @@ def next_page_info(self) -> Optional[PageInfo]:
12511254
return PageInfo(params={"token": next_token})
12521255

12531256

1257+
class ScimConfigurationsPagePagination(BaseModel):
1258+
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)
1259+
1260+
1261+
class SyncScimConfigurationsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
1262+
pagination: Optional[ScimConfigurationsPagePagination] = None
1263+
scim_configurations: List[_T] = FieldInfo(alias="scimConfigurations")
1264+
1265+
@override
1266+
def _get_page_items(self) -> List[_T]:
1267+
scim_configurations = self.scim_configurations
1268+
if not scim_configurations:
1269+
return []
1270+
return scim_configurations
1271+
1272+
@override
1273+
def next_page_info(self) -> Optional[PageInfo]:
1274+
next_token = None
1275+
if self.pagination is not None:
1276+
if self.pagination.next_token is not None:
1277+
next_token = self.pagination.next_token
1278+
if not next_token:
1279+
return None
1280+
1281+
return PageInfo(params={"token": next_token})
1282+
1283+
1284+
class AsyncScimConfigurationsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
1285+
pagination: Optional[ScimConfigurationsPagePagination] = None
1286+
scim_configurations: List[_T] = FieldInfo(alias="scimConfigurations")
1287+
1288+
@override
1289+
def _get_page_items(self) -> List[_T]:
1290+
scim_configurations = self.scim_configurations
1291+
if not scim_configurations:
1292+
return []
1293+
return scim_configurations
1294+
1295+
@override
1296+
def next_page_info(self) -> Optional[PageInfo]:
1297+
next_token = None
1298+
if self.pagination is not None:
1299+
if self.pagination.next_token is not None:
1300+
next_token = self.pagination.next_token
1301+
if not next_token:
1302+
return None
1303+
1304+
return PageInfo(params={"token": next_token})
1305+
1306+
12541307
class SecretsPagePagination(BaseModel):
12551308
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)
12561309

src/gitpod/resources/organizations/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
SSOConfigurationsResourceWithStreamingResponse,
4141
AsyncSSOConfigurationsResourceWithStreamingResponse,
4242
)
43+
from .scim_configurations import (
44+
ScimConfigurationsResource,
45+
AsyncScimConfigurationsResource,
46+
ScimConfigurationsResourceWithRawResponse,
47+
AsyncScimConfigurationsResourceWithRawResponse,
48+
ScimConfigurationsResourceWithStreamingResponse,
49+
AsyncScimConfigurationsResourceWithStreamingResponse,
50+
)
4351
from .domain_verifications import (
4452
DomainVerificationsResource,
4553
AsyncDomainVerificationsResource,
@@ -74,6 +82,12 @@
7482
"AsyncPoliciesResourceWithRawResponse",
7583
"PoliciesResourceWithStreamingResponse",
7684
"AsyncPoliciesResourceWithStreamingResponse",
85+
"ScimConfigurationsResource",
86+
"AsyncScimConfigurationsResource",
87+
"ScimConfigurationsResourceWithRawResponse",
88+
"AsyncScimConfigurationsResourceWithRawResponse",
89+
"ScimConfigurationsResourceWithStreamingResponse",
90+
"AsyncScimConfigurationsResourceWithStreamingResponse",
7791
"SSOConfigurationsResource",
7892
"AsyncSSOConfigurationsResource",
7993
"SSOConfigurationsResourceWithRawResponse",

src/gitpod/resources/organizations/organizations.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
SSOConfigurationsResourceWithStreamingResponse,
6161
AsyncSSOConfigurationsResourceWithStreamingResponse,
6262
)
63+
from .scim_configurations import (
64+
ScimConfigurationsResource,
65+
AsyncScimConfigurationsResource,
66+
ScimConfigurationsResourceWithRawResponse,
67+
AsyncScimConfigurationsResourceWithRawResponse,
68+
ScimConfigurationsResourceWithStreamingResponse,
69+
AsyncScimConfigurationsResourceWithStreamingResponse,
70+
)
6371
from .domain_verifications import (
6472
DomainVerificationsResource,
6573
AsyncDomainVerificationsResource,
@@ -96,6 +104,10 @@ def invites(self) -> InvitesResource:
96104
def policies(self) -> PoliciesResource:
97105
return PoliciesResource(self._client)
98106

107+
@cached_property
108+
def scim_configurations(self) -> ScimConfigurationsResource:
109+
return ScimConfigurationsResource(self._client)
110+
99111
@cached_property
100112
def sso_configurations(self) -> SSOConfigurationsResource:
101113
return SSOConfigurationsResource(self._client)
@@ -682,6 +694,10 @@ def invites(self) -> AsyncInvitesResource:
682694
def policies(self) -> AsyncPoliciesResource:
683695
return AsyncPoliciesResource(self._client)
684696

697+
@cached_property
698+
def scim_configurations(self) -> AsyncScimConfigurationsResource:
699+
return AsyncScimConfigurationsResource(self._client)
700+
685701
@cached_property
686702
def sso_configurations(self) -> AsyncSSOConfigurationsResource:
687703
return AsyncSSOConfigurationsResource(self._client)
@@ -1296,6 +1312,10 @@ def invites(self) -> InvitesResourceWithRawResponse:
12961312
def policies(self) -> PoliciesResourceWithRawResponse:
12971313
return PoliciesResourceWithRawResponse(self._organizations.policies)
12981314

1315+
@cached_property
1316+
def scim_configurations(self) -> ScimConfigurationsResourceWithRawResponse:
1317+
return ScimConfigurationsResourceWithRawResponse(self._organizations.scim_configurations)
1318+
12991319
@cached_property
13001320
def sso_configurations(self) -> SSOConfigurationsResourceWithRawResponse:
13011321
return SSOConfigurationsResourceWithRawResponse(self._organizations.sso_configurations)
@@ -1346,6 +1366,10 @@ def invites(self) -> AsyncInvitesResourceWithRawResponse:
13461366
def policies(self) -> AsyncPoliciesResourceWithRawResponse:
13471367
return AsyncPoliciesResourceWithRawResponse(self._organizations.policies)
13481368

1369+
@cached_property
1370+
def scim_configurations(self) -> AsyncScimConfigurationsResourceWithRawResponse:
1371+
return AsyncScimConfigurationsResourceWithRawResponse(self._organizations.scim_configurations)
1372+
13491373
@cached_property
13501374
def sso_configurations(self) -> AsyncSSOConfigurationsResourceWithRawResponse:
13511375
return AsyncSSOConfigurationsResourceWithRawResponse(self._organizations.sso_configurations)
@@ -1396,6 +1420,10 @@ def invites(self) -> InvitesResourceWithStreamingResponse:
13961420
def policies(self) -> PoliciesResourceWithStreamingResponse:
13971421
return PoliciesResourceWithStreamingResponse(self._organizations.policies)
13981422

1423+
@cached_property
1424+
def scim_configurations(self) -> ScimConfigurationsResourceWithStreamingResponse:
1425+
return ScimConfigurationsResourceWithStreamingResponse(self._organizations.scim_configurations)
1426+
13991427
@cached_property
14001428
def sso_configurations(self) -> SSOConfigurationsResourceWithStreamingResponse:
14011429
return SSOConfigurationsResourceWithStreamingResponse(self._organizations.sso_configurations)
@@ -1446,6 +1474,10 @@ def invites(self) -> AsyncInvitesResourceWithStreamingResponse:
14461474
def policies(self) -> AsyncPoliciesResourceWithStreamingResponse:
14471475
return AsyncPoliciesResourceWithStreamingResponse(self._organizations.policies)
14481476

1477+
@cached_property
1478+
def scim_configurations(self) -> AsyncScimConfigurationsResourceWithStreamingResponse:
1479+
return AsyncScimConfigurationsResourceWithStreamingResponse(self._organizations.scim_configurations)
1480+
14491481
@cached_property
14501482
def sso_configurations(self) -> AsyncSSOConfigurationsResourceWithStreamingResponse:
14511483
return AsyncSSOConfigurationsResourceWithStreamingResponse(self._organizations.sso_configurations)

0 commit comments

Comments
 (0)