// This file is auto-generated by @hey-api/openapi-ts import type { Options as ClientOptions, TDataShape, Client } from "./client"; import type { ListVolumesData, ListVolumesResponses, CreateVolumeData, CreateVolumeResponses, TestConnectionData, TestConnectionResponses, DeleteVolumeData, DeleteVolumeResponses, } from "./types.gen"; import { client as _heyApiClient } from "./client.gen"; export type Options = ClientOptions< TData, ThrowOnError > & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a * custom client. */ client?: Client; /** * You can pass arbitrary values through the `meta` object. This can be * used to access values that aren't defined as part of the SDK function. */ meta?: Record; }; /** * List all volumes */ export const listVolumes = (options?: Options) => { return (options?.client ?? _heyApiClient).get({ url: "/api/v1/volumes", ...options, }); }; /** * Create a new volume */ export const createVolume = ( options?: Options, ) => { return (options?.client ?? _heyApiClient).post({ url: "/api/v1/volumes", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); }; /** * Test connection to backend */ export const testConnection = ( options?: Options, ) => { return (options?.client ?? _heyApiClient).post({ url: "/api/v1/volumes/test-connection", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, }); }; /** * Delete a volume */ export const deleteVolume = ( options: Options, ) => { return (options.client ?? _heyApiClient).delete({ url: "/api/v1/volumes/{name}", ...options, }); };