export type DeleteApiRunnersVariablesVariableSetsVariableSetIdArgs = {variableSetId: string}; export type DeleteApiRunnersVariablesVariableSetsVariableSetIdOptions = {baseUrl?: string | undefined, JWTAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a variable set * * DELETE /runners/variables/variable-sets/{variableSetId} */ export const deleteApiRunnersVariablesVariableSetsVariableSetId = async (args: DeleteApiRunnersVariablesVariableSetsVariableSetIdArgs, options?: DeleteApiRunnersVariablesVariableSetsVariableSetIdOptions) => { const {baseUrl = "https://api.firefly.ai/v2", fetch: fetchFn = fetch, JWTAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JWTAuth !== undefined) headers.set('authorization', `Bearer ${JWTAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/runners/variables/variable-sets/${encodeURIComponent(String(args.variableSetId))}${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 };