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
2 changes: 1 addition & 1 deletion packages/clients/src/api/block/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class API extends ParentAPI {
* @param request - The request {@link CreateVolumeRequest}
* @returns A Promise of Volume
*/
createVolume = (request: Readonly<CreateVolumeRequest>) =>
createVolume = (request: Readonly<CreateVolumeRequest> = {}) =>
this.client.fetch<Volume>(
{
body: JSON.stringify(
Expand Down
5 changes: 3 additions & 2 deletions packages/clients/src/api/block/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
import randomName from '@scaleway/random-name'
import {
isJSONObject,
resolveOneOf,
Expand Down Expand Up @@ -190,7 +191,7 @@ export const marshalCreateSnapshotRequest = (
request: CreateSnapshotRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
name: request.name,
name: request.name || randomName('snp'),
project_id: request.projectId ?? defaults.defaultProjectId,
tags: request.tags,
volume_id: request.volumeId,
Expand All @@ -215,7 +216,7 @@ export const marshalCreateVolumeRequest = (
request: CreateVolumeRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
name: request.name,
name: request.name || randomName('vol'),
project_id: request.projectId ?? defaults.defaultProjectId,
tags: request.tags,
...resolveOneOf([
Expand Down
4 changes: 2 additions & 2 deletions packages/clients/src/api/block/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export type CreateSnapshotRequest = {
/** UUID of the volume to snapshot. */
volumeId: string
/** Name of the snapshot. */
name: string
name?: string
/** UUID of the project to which the volume and the snapshot belong. */
projectId?: string
/** List of tags assigned to the snapshot. */
Expand All @@ -202,7 +202,7 @@ export type CreateVolumeRequest = {
/** Zone to target. If none is passed will use default zone from the config. */
zone?: Zone
/** Name of the volume. */
name: string
name?: string
/**
* The maximum IO/s expected, according to the different options available in
* stock (`5000 | 15000`).
Expand Down
Loading