export type ObjectStatus = 'Active' | 'Inactive'; export type OverrideType = 'Active' | 'Inactive'; export type LookupRangeMode = 'None' | 'Threshold' | 'Progressive'; export type LookupValue = {id?: number | undefined, status?: ObjectStatus | undefined, created?: string | undefined, updated?: string | undefined, key: string, value: string, valueLocalizations?: ({[key: string]: string | null} | null) | undefined, rangeValue?: (number | null) | undefined, overrideType?: OverrideType | undefined}; export type LookupSet = {id?: number | undefined, status?: ObjectStatus | undefined, created?: string | undefined, updated?: string | undefined, name: string, nameLocalizations?: ({[key: string]: string | null} | null) | undefined, description?: (string | null) | undefined, descriptionLocalizations?: ({[key: string]: string | null} | null) | undefined, overrideType?: OverrideType | undefined, rangeMode?: LookupRangeMode | undefined, rangeSize?: (number | null) | undefined, attributes?: ({[key: string]: unknown} | null) | undefined, values: Array}; export type CreateApiApiTenantsTenantIdRegulationsRegulationIdLookupsSetsArgs = {tenantId: number, regulationId: number, body: Array}; export type CreateApiApiTenantsTenantIdRegulationsRegulationIdLookupsSetsOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * POST /api/tenants/{tenantId}/regulations/{regulationId}/lookups/sets */ export const createApiApiTenantsTenantIdRegulationsRegulationIdLookupsSets = async (args: CreateApiApiTenantsTenantIdRegulationsRegulationIdLookupsSetsArgs, options: CreateApiApiTenantsTenantIdRegulationsRegulationIdLookupsSetsOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/tenants/${encodeURIComponent(String(args.tenantId))}/regulations/${encodeURIComponent(String(args.regulationId))}/lookups/sets${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", 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 };