export type DeleteApiV2PartitionPartitionIdSecuritySecurityIdArgs = {partitionId: string, securityId: string}; export type DeleteApiV2PartitionPartitionIdSecuritySecurityIdOptions = {baseUrl?: string | undefined, XAuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Security Role * * DELETE /v2/partition/{partitionId}/security/{securityId} */ export const deleteApiV2PartitionPartitionIdSecuritySecurityId = async (args: DeleteApiV2PartitionPartitionIdSecuritySecurityIdArgs, options?: DeleteApiV2PartitionPartitionIdSecuritySecurityIdOptions) => { const {baseUrl = "https://api.alianza.com", fetch: fetchFn = fetch, XAuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (XAuthToken !== undefined) headers.set("X-AUTH-TOKEN", XAuthToken) const url = `${baseUrl.replace(/\/+$/, '')}/v2/partition/${encodeURIComponent(String(args.partitionId))}/security/${encodeURIComponent(String(args.securityId))}${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 };