Skip to content

Commit 4434686

Browse files
feat(secrets): add ServiceAccountSecret entity with full support
1 parent 585d189 commit 4434686

6 files changed

Lines changed: 14 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 160
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-504fab16d01ad7f81914542fd0523f4dfefce87813891da391b97b1b0a70f563.yml
3-
openapi_spec_hash: 84d9d652cac365c646e01111cee89afc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-8a0189eebf423961bd98075dab28db4377c3a939da1dcf237d1b3958724e6dcf.yml
3+
openapi_spec_hash: 48004e7605cf720584e822ec11a2eb8b
44
config_hash: acfe8cf5d6e4b26387e4fefa3bff8409

src/gitpod/types/secret_scope.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ class SecretScope(BaseModel):
1616
project_id: Optional[str] = FieldInfo(alias="projectId", default=None)
1717
"""project_id is the Project ID this Secret belongs to"""
1818

19+
service_account_id: Optional[str] = FieldInfo(alias="serviceAccountId", default=None)
20+
"""service_account_id is the Service Account ID this Secret belongs to"""
21+
1922
user_id: Optional[str] = FieldInfo(alias="userId", default=None)
2023
"""user_id is the User ID this Secret belongs to"""

src/gitpod/types/secret_scope_param.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ class SecretScopeParam(TypedDict, total=False):
1616
project_id: Annotated[str, PropertyInfo(alias="projectId")]
1717
"""project_id is the Project ID this Secret belongs to"""
1818

19+
service_account_id: Annotated[str, PropertyInfo(alias="serviceAccountId")]
20+
"""service_account_id is the Service Account ID this Secret belongs to"""
21+
1922
user_id: Annotated[str, PropertyInfo(alias="userId")]
2023
"""user_id is the User ID this Secret belongs to"""

src/gitpod/types/shared/resource_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@
4949
"RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED",
5050
"RESOURCE_TYPE_WEBHOOK",
5151
"RESOURCE_TYPE_SCIM_CONFIGURATION",
52+
"RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET",
5253
]

src/gitpod/types/shared_params/resource_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@
5151
"RESOURCE_TYPE_GROUP_MEMBERSHIP_CHANGED",
5252
"RESOURCE_TYPE_WEBHOOK",
5353
"RESOURCE_TYPE_SCIM_CONFIGURATION",
54+
"RESOURCE_TYPE_SERVICE_ACCOUNT_SECRET",
5455
]

tests/api_resources/test_secrets.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None:
4141
scope={
4242
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4343
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
44+
"service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4445
"user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
4546
},
4647
value="postgresql://user:pass@localhost:5432/db",
@@ -86,6 +87,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None:
8687
"scope": {
8788
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
8889
"project_id": "b0e12f6c-4c67-429d-a4a6-d9838b5da047",
90+
"service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
8991
"user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
9092
},
9193
},
@@ -252,6 +254,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) ->
252254
scope={
253255
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
254256
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
257+
"service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
255258
"user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
256259
},
257260
value="postgresql://user:pass@localhost:5432/db",
@@ -297,6 +300,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N
297300
"scope": {
298301
"organization_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
299302
"project_id": "b0e12f6c-4c67-429d-a4a6-d9838b5da047",
303+
"service_account_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
300304
"user_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
301305
},
302306
},

0 commit comments

Comments
 (0)