@@ -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 /**
@@ -62,9 +65,19 @@ const withAccessKey = (httpClient: HttpClient) => ({
6265 * @param tenantIds Optional tenant ID filter to apply on the search results
6366 * @returns An array of found access keys
6467 */
65- searchAll : ( tenantIds ?: string [ ] ) : Promise < SdkResponse < AccessKey [ ] > > =>
68+ searchAll : (
69+ tenantIds ?: string [ ] ,
70+ boundUserId ?: string ,
71+ creatingUser ?: string ,
72+ customAttributes ?: Record < string , any > ,
73+ ) : Promise < SdkResponse < AccessKey [ ] > > =>
6674 transformResponse < MultipleKeysResponse , AccessKey [ ] > (
67- httpClient . post ( apiPaths . accessKey . search , { tenantIds } ) ,
75+ httpClient . post ( apiPaths . accessKey . search , {
76+ tenantIds,
77+ boundUserId,
78+ creatingUser,
79+ customAttributes,
80+ } ) ,
6881 ( data ) => data . keys ,
6982 ) ,
7083 /**
@@ -76,6 +89,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
7689 * @param tenants Optional associated tenants for this key and its roles for each.
7790 * @param customClaims Optional map of claims and their values that will be present in the JWT.
7891 * @param permittedIps Optional list of IP addresses or CIDR ranges that are allowed to use this access key.
92+ * @param customAttributes Optional map of custom attributes and their values to associate with this access key.
7993 * @returns The updated access key
8094 */
8195 update : (
@@ -86,6 +100,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
86100 tenants ?: AssociatedTenant [ ] ,
87101 customClaims ?: Record < string , any > ,
88102 permittedIps ?: string [ ] ,
103+ customAttributes ?: Record < string , any > ,
89104 ) : Promise < SdkResponse < AccessKey > > =>
90105 transformResponse < SingleKeyResponse , AccessKey > (
91106 httpClient . post ( apiPaths . accessKey . update , {
@@ -96,6 +111,7 @@ const withAccessKey = (httpClient: HttpClient) => ({
96111 keyTenants : tenants ,
97112 customClaims,
98113 permittedIps,
114+ customAttributes,
99115 } ) ,
100116 ( data ) => data . key ,
101117 ) ,
0 commit comments