@@ -21,6 +21,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
2121 * @param customClaims Optional map of claims and their values that will be present in the JWT.
2222 * @param description Optional free text description
2323 * @param permittedIps Optional list of IP addresses or CIDR ranges that are allowed to use this access key.
24+ * @param customAttributes Optional map of custom attributes and their values to associate with this access key.
2425 * @returns A newly created key and its cleartext. Make sure to save the cleartext securely.
2526 */
2627 create : (
@@ -32,6 +33,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
3233 customClaims ?: Record < string , any > ,
3334 description ?: string ,
3435 permittedIps ?: string [ ] ,
36+ customAttributes ?: Record < string , any > ,
3537 ) : Promise < SdkResponse < CreatedAccessKeyResponse > > =>
3638 transformResponse (
3739 httpClient . post ( apiPaths . accessKey . create , {
@@ -43,6 +45,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
4345 customClaims,
4446 description,
4547 permittedIps,
48+ customAttributes,
4649 } ) ,
4750 ) ,
4851 /**
@@ -60,11 +63,24 @@ const withAccessKey = (httpClient: HttpClient) => ({
6063 /**
6164 * Search all access keys
6265 * @param tenantIds Optional tenant ID filter to apply on the search results
66+ * @param boundUserId Optional user ID to which the access key is bound
67+ * @param creatingUser Optional identifier of the user who created the access key
68+ * @param customAttributes Optional custom attributes filter to apply on the search results
6369 * @returns An array of found access keys
6470 */
65- searchAll : ( tenantIds ?: string [ ] ) : Promise < SdkResponse < AccessKey [ ] > > =>
71+ searchAll : (
72+ tenantIds ?: string [ ] ,
73+ boundUserId ?: string ,
74+ creatingUser ?: string ,
75+ customAttributes ?: Record < string , any > ,
76+ ) : Promise < SdkResponse < AccessKey [ ] > > =>
6677 transformResponse < MultipleKeysResponse , AccessKey [ ] > (
67- httpClient . post ( apiPaths . accessKey . search , { tenantIds } ) ,
78+ httpClient . post ( apiPaths . accessKey . search , {
79+ tenantIds,
80+ boundUserId,
81+ creatingUser,
82+ customAttributes,
83+ } ) ,
6884 ( data ) => data . keys ,
6985 ) ,
7086 /**
@@ -76,6 +92,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
7692 * @param tenants Optional associated tenants for this key and its roles for each.
7793 * @param customClaims Optional map of claims and their values that will be present in the JWT.
7894 * @param permittedIps Optional list of IP addresses or CIDR ranges that are allowed to use this access key.
95+ * @param customAttributes Optional map of custom attributes and their values to associate with this access key.
7996 * @returns The updated access key
8097 */
8198 update : (
@@ -86,6 +103,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
86103 tenants ?: AssociatedTenant [ ] ,
87104 customClaims ?: Record < string , any > ,
88105 permittedIps ?: string [ ] ,
106+ customAttributes ?: Record < string , any > ,
89107 ) : Promise < SdkResponse < AccessKey > > =>
90108 transformResponse < SingleKeyResponse , AccessKey > (
91109 httpClient . post ( apiPaths . accessKey . update , {
@@ -96,6 +114,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
96114 keyTenants : tenants ,
97115 customClaims,
98116 permittedIps,
117+ customAttributes,
99118 } ) ,
100119 ( data ) => data . key ,
101120 ) ,
0 commit comments