export type DeleteApiV3beta1EnterpriseSnapshotSetupBlueprintsBlueprintIdFilesFileIdArgs = {blueprint_id: string, file_id: string}; export type DeleteApiV3beta1EnterpriseSnapshotSetupBlueprintsBlueprintIdFilesFileIdOptions = {baseUrl: string, bearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an enterprise blueprint file * * DELETE /v3beta1/enterprise/snapshot-setup/blueprints/{blueprint_id}/files/{file_id} */ export const deleteApiV3beta1EnterpriseSnapshotSetupBlueprintsBlueprintIdFilesFileId = async (args: DeleteApiV3beta1EnterpriseSnapshotSetupBlueprintsBlueprintIdFilesFileIdArgs, options: DeleteApiV3beta1EnterpriseSnapshotSetupBlueprintsBlueprintIdFilesFileIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, bearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (bearerAuth !== undefined) headers.set('authorization', `Bearer ${bearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v3beta1/enterprise/snapshot-setup/blueprints/${encodeURIComponent(String(args.blueprint_id))}/files/${encodeURIComponent(String(args.file_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };