Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions packages/clients/src/api/mnq/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import randomName from '@scaleway/random-name'
import {
isJSONObject,
resolveOneOf,
unmarshalArrayOfObject,
unmarshalDate,
} from '../../../bridge'
Expand Down Expand Up @@ -181,14 +180,9 @@ export const marshalCreateCredentialRequest = (
): Record<string, unknown> => ({
name: request.name || randomName('mnq'),
namespace_id: request.namespaceId,
...resolveOneOf([
{
param: 'permissions',
value: request.permissions
? marshalPermissions(request.permissions, defaults)
: undefined,
},
]),
permissions: request.permissions
? marshalPermissions(request.permissions, defaults)
: undefined,
})

export const marshalCreateNamespaceRequest = (
Expand All @@ -205,14 +199,9 @@ export const marshalUpdateCredentialRequest = (
defaults: DefaultValues,
): Record<string, unknown> => ({
name: request.name,
...resolveOneOf([
{
param: 'permissions',
value: request.permissions
? marshalPermissions(request.permissions, defaults)
: undefined,
},
]),
permissions: request.permissions
? marshalPermissions(request.permissions, defaults)
: undefined,
})

export const marshalUpdateNamespaceRequest = (
Expand Down
12 changes: 2 additions & 10 deletions packages/clients/src/api/mnq/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,7 @@ export type CreateCredentialRequest = {
namespaceId: string
/** Name of the credentials. */
name?: string
/**
* Permissions associated with these credentials.
*
* One-of ('optionalPermissions'): at most one of 'permissions' could be set.
*/
/** Permissions associated with these credentials. */
permissions?: Permissions
}

Expand Down Expand Up @@ -269,11 +265,7 @@ export type UpdateCredentialRequest = {
credentialId: string
/** Name of the credentials. */
name?: string
/**
* Permissions associated with these credentials.
*
* One-of ('optionalPermissions'): at most one of 'permissions' could be set.
*/
/** Permissions associated with these credentials. */
permissions?: Permissions
}

Expand Down