Skip to content

Commit

Permalink
feat(iam): add more filtering options for listAPIKeys (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Feb 14, 2023
1 parent 31685d2 commit e0fd34f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
5 changes: 5 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,12 @@ export class API extends ParentAPI {
method: 'GET',
path: `/iam/v1alpha1/api-keys`,
urlParams: urlParams(
['access_key', request.accessKey],
['bearer_id', request.bearerId],
['bearer_type', request.bearerType ?? 'unknown_bearer_type'],
['description', request.description],
['editable', request.editable],
['expirable', request.expirable],
['order_by', request.orderBy ?? 'created_at_asc'],
[
'organization_id',
Expand Down
1 change: 1 addition & 0 deletions packages/clients/src/api/iam/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export type {
GetUserRequest,
Group,
ListAPIKeysRequest,
ListAPIKeysRequestBearerType,
ListAPIKeysRequestOrderBy,
ListAPIKeysResponse,
ListApplicationsRequest,
Expand Down
23 changes: 19 additions & 4 deletions packages/clients/src/api/iam/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.

export type ListAPIKeysRequestBearerType =
| 'unknown_bearer_type'
| 'user'
| 'application'

export type ListAPIKeysRequestOrderBy =
| 'created_at_asc'
| 'created_at_desc'
Expand Down Expand Up @@ -731,19 +736,29 @@ export type ListAPIKeysRequest = {
/** ID of organization */
organizationId?: string
/**
* ID of an application bearer.
* @deprecated ID of an application bearer.
*
* One-of ('bearer'): at most one of 'applicationId', 'userId' could be set.
* One-of ('bearer'): at most one of 'applicationId', 'userId' could be set.
*/
applicationId?: string
/**
* ID of a user bearer.
* @deprecated ID of a user bearer.
*
* One-of ('bearer'): at most one of 'applicationId', 'userId' could be set.
* One-of ('bearer'): at most one of 'applicationId', 'userId' could be set.
*/
userId?: string
/** Filter out editable API keys or not */
editable?: boolean
/** Filter out expirable API keys or not */
expirable?: boolean
/** Filter out by access key */
accessKey?: string
/** Filter out by description */
description?: string
/** Filter out by bearer ID */
bearerId?: string
/** Filter out by type of bearer */
bearerType?: ListAPIKeysRequestBearerType
}

export type CreateAPIKeyRequest = {
Expand Down
3 changes: 3 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/validation-rules.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export const CreateSSHKeyRequest = {
}

export const ListAPIKeysRequest = {
description: {
maxLength: 200,
},
page: {
greaterThanOrEqual: 1,
},
Expand Down

0 comments on commit e0fd34f

Please sign in to comment.