export type UpdateApiRestApiV1AccountsAccountIdMasanielloMasanielloFeatureIdResetArgs = {accountId: string, masanielloFeatureId: string, symbol?: string | undefined}; export type UpdateApiRestApiV1AccountsAccountIdMasanielloMasanielloFeatureIdResetOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Reset Masaniello series * * PUT /rest/api/v1/accounts/{accountId}/masaniello/{masanielloFeatureId}/reset */ export const updateApiRestApiV1AccountsAccountIdMasanielloMasanielloFeatureIdReset = async (args: UpdateApiRestApiV1AccountsAccountIdMasanielloMasanielloFeatureIdResetArgs, options?: UpdateApiRestApiV1AccountsAccountIdMasanielloMasanielloFeatureIdResetOptions) => { const {baseUrl = "https://api.metacopier.io", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.symbol != null) query.append("symbol", String(args.symbol)) if (ApiKeyAuth !== undefined) headers.set("X-API-KEY", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/rest/api/v1/accounts/${encodeURIComponent(String(args.accountId))}/masaniello/${encodeURIComponent(String(args.masanielloFeatureId))}/reset${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };