Skip to content

Commit f9b2707

Browse files
feat: add email search to list organization identities endpoint
1 parent 56e2df5 commit f9b2707

6 files changed

Lines changed: 31 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: 106
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-c753b5846734341b7c92262feb1f7098470c8c0f02a8d79e93a121898a128242.yml
3-
openapi_spec_hash: fba09085e254f03512e5201d23b00669
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/keycard%2Fkeycard-api-d1ec2be127ae8cd75ee4a4656da915596ef337ab2d69c6d0aef1c7f8eb510bc6.yml
3+
openapi_spec_hash: 91893395f0df489c4d31b69581b6d789
44
config_hash: 8fdc6a9c1185417459f79052b1222ff0

src/keycardai_api/resources/organizations/organizations.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def list_identities(
329329
before: str | Omit = omit,
330330
expand: List[Literal["permissions"]] | Omit = omit,
331331
limit: int | Omit = omit,
332+
query_email: str | Omit = omit,
332333
role: OrganizationRole | Omit = omit,
333334
x_client_request_id: str | Omit = omit,
334335
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -353,6 +354,8 @@ def list_identities(
353354
354355
limit: Maximum number of identities to return
355356
357+
query_email: Search identities by email substring (case-insensitive)
358+
356359
role: Filter identities by role
357360
358361
extra_headers: Send extra headers
@@ -379,6 +382,7 @@ def list_identities(
379382
"before": before,
380383
"expand": expand,
381384
"limit": limit,
385+
"query_email": query_email,
382386
"role": role,
383387
},
384388
organization_list_identities_params.OrganizationListIdentitiesParams,
@@ -711,6 +715,7 @@ async def list_identities(
711715
before: str | Omit = omit,
712716
expand: List[Literal["permissions"]] | Omit = omit,
713717
limit: int | Omit = omit,
718+
query_email: str | Omit = omit,
714719
role: OrganizationRole | Omit = omit,
715720
x_client_request_id: str | Omit = omit,
716721
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -735,6 +740,8 @@ async def list_identities(
735740
736741
limit: Maximum number of identities to return
737742
743+
query_email: Search identities by email substring (case-insensitive)
744+
738745
role: Filter identities by role
739746
740747
extra_headers: Send extra headers
@@ -761,6 +768,7 @@ async def list_identities(
761768
"before": before,
762769
"expand": expand,
763770
"limit": limit,
771+
"query_email": query_email,
764772
"role": role,
765773
},
766774
organization_list_identities_params.OrganizationListIdentitiesParams,

src/keycardai_api/types/organization_list_identities_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class OrganizationListIdentitiesParams(TypedDict, total=False):
2828
limit: int
2929
"""Maximum number of identities to return"""
3030

31+
query_email: Annotated[str, PropertyInfo(alias="query[email]")]
32+
"""Search identities by email substring (case-insensitive)"""
33+
3134
role: OrganizationRole
3235
"""Filter identities by role"""
3336

src/keycardai_api/types/zones/policies/policy_version.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from typing import Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from ...._models import BaseModel
78

@@ -15,6 +16,13 @@ class PolicyVersion(BaseModel):
1516

1617
created_by: str
1718

19+
owner_type: Literal["platform", "customer"]
20+
"""Who manages this policy version:
21+
22+
- `"platform"` — managed by the Keycard platform (system policy versions).
23+
- `"customer"` — managed by the tenant (custom policy versions).
24+
"""
25+
1826
policy_id: str
1927

2028
schema_version: str

src/keycardai_api/types/zones/policy_sets/policy_set_version.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from typing import Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from ...._models import BaseModel
78
from ..policy_set_manifest import PolicySetManifest
@@ -22,6 +23,13 @@ class PolicySetVersion(BaseModel):
2223
manifest_sha: str
2324
"""Hex-encoded SHA-256 of the canonicalized manifest"""
2425

26+
owner_type: Literal["platform", "customer"]
27+
"""Who manages this policy set version:
28+
29+
- `"platform"` — managed by the Keycard platform (system policy set versions).
30+
- `"customer"` — managed by the tenant (custom policy set versions).
31+
"""
32+
2533
policy_set_id: str
2634

2735
schema_version: str

tests/api_resources/test_organizations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ def test_method_list_identities_with_all_params(self, client: KeycardAPI) -> Non
272272
before="x",
273273
expand=["permissions"],
274274
limit=1,
275+
query_email="x",
275276
role="org_admin",
276277
x_client_request_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
277278
)
@@ -619,6 +620,7 @@ async def test_method_list_identities_with_all_params(self, async_client: AsyncK
619620
before="x",
620621
expand=["permissions"],
621622
limit=1,
623+
query_email="x",
622624
role="org_admin",
623625
x_client_request_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
624626
)

0 commit comments

Comments
 (0)