export type VoloAbpFeatureManagementUpdateFeatureDto = {name?: (string | null) | undefined, value?: (string | null) | undefined}; export type VoloAbpFeatureManagementUpdateFeaturesDto = {features?: (Array | null) | undefined}; export type UpdateApiApiFeatureManagementFeaturesArgs = {providerName?: string | undefined, providerKey?: string | undefined, body: VoloAbpFeatureManagementUpdateFeaturesDto}; export type UpdateApiApiFeatureManagementFeaturesOptions = {baseUrl: string, oauth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * PUT /api/feature-management/features */ export const updateApiApiFeatureManagementFeatures = async (args: UpdateApiApiFeatureManagementFeaturesArgs, options: UpdateApiApiFeatureManagementFeaturesOptions) => { const {baseUrl, fetch: fetchFn = fetch, oauth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.providerName != null) query.append("providerName", String(args.providerName)) if (args.providerKey != null) query.append("providerKey", String(args.providerKey)) if (oauth2 !== undefined) headers.set('authorization', `Bearer ${oauth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/feature-management/features${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };