export type DeleteApiApiV1Id4nsId4nPropertiesArgs = {id4n: string, organizationId: string, body: Array}; export type DeleteApiApiV1Id4nsId4nPropertiesOptions = {baseUrl: string, Authorization?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete ID4n properties * * DELETE /api/v1/id4ns/{id4n}/properties */ export const deleteApiApiV1Id4nsId4nProperties = async (args: DeleteApiApiV1Id4nsId4nPropertiesArgs, options: DeleteApiApiV1Id4nsId4nPropertiesOptions) => { const {baseUrl, fetch: fetchFn = fetch, Authorization} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.organizationId != null) query.append("organizationId", String(args.organizationId)) if (Authorization !== undefined) headers.set("Authorization", Authorization) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/id4ns/${encodeURIComponent(String(args.id4n))}/properties${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", 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 };