export type EnvianceRestServicesCommonSimpleIdName = {id?: unknown | undefined, name?: string | undefined}; export type EnvianceRestServicesCommonSimpleUserDto = {firstName?: string | undefined, lastName?: string | undefined, isDeleted?: boolean | undefined, id?: unknown | undefined, name?: string | undefined}; export type EnvianceRestServicesVer2ComplianceModelWorkflowRoleOverride = {role: EnvianceRestServicesCommonSimpleIdName, users?: Array | undefined, groups?: Array | undefined}; export type EnvianceRestServicesVer2ComplianceModelWorkflowPoliciesOverride = {workflowType: EnvianceRestServicesCommonSimpleIdName, policies?: Array | undefined}; export type EnvianceRestServicesVer2ComplianceModelWorkflowOverridesInfo = {roleOverrides?: Array | undefined, policiesOverride?: Array | undefined}; export type UpdateOverrides = {overridesInfo?: EnvianceRestServicesVer2ComplianceModelWorkflowOverridesInfo | undefined}; export type PatchApiVer2ComplianceServiceSvcLocationsOverridesLocationIdOrPathArgs = {'EnvApi-Systemid'?: string | undefined, 'EnvApi-Packageid'?: string | undefined, 'EnvApi-Udf-DateTime-Iso-In-CustomFields'?: string | undefined, 'EnvApi-Udf-DateTime-ReadInUserTz'?: string | undefined, 'EnvApi-Udf-Value-Invariant'?: string | undefined, 'EnvApi-Localization-All'?: string | undefined, 'x-client-request-id'?: string | undefined, locationIdOrPath: string, body: UpdateOverrides}; export type PatchApiVer2ComplianceServiceSvcLocationsOverridesLocationIdOrPathOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PATCH /ver2/ComplianceService.svc/locations/overrides/{locationIdOrPath} */ export const patchApiVer2ComplianceServiceSvcLocationsOverridesLocationIdOrPath = async (args: PatchApiVer2ComplianceServiceSvcLocationsOverridesLocationIdOrPathArgs, options: PatchApiVer2ComplianceServiceSvcLocationsOverridesLocationIdOrPathOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args['EnvApi-Systemid'] != null) headers.set("EnvApi-Systemid", String(args['EnvApi-Systemid'])) if (args['EnvApi-Packageid'] != null) headers.set("EnvApi-Packageid", String(args['EnvApi-Packageid'])) if (args['EnvApi-Udf-DateTime-Iso-In-CustomFields'] != null) headers.set("EnvApi-Udf-DateTime-Iso-In-CustomFields", String(args['EnvApi-Udf-DateTime-Iso-In-CustomFields'])) if (args['EnvApi-Udf-DateTime-ReadInUserTz'] != null) headers.set("EnvApi-Udf-DateTime-ReadInUserTz", String(args['EnvApi-Udf-DateTime-ReadInUserTz'])) if (args['EnvApi-Udf-Value-Invariant'] != null) headers.set("EnvApi-Udf-Value-Invariant", String(args['EnvApi-Udf-Value-Invariant'])) if (args['EnvApi-Localization-All'] != null) headers.set("EnvApi-Localization-All", String(args['EnvApi-Localization-All'])) if (args['x-client-request-id'] != null) headers.set("x-client-request-id", String(args['x-client-request-id'])) const url = `${baseUrl.replace(/\/+$/, '')}/ver2/ComplianceService.svc/locations/overrides/${encodeURIComponent(String(args.locationIdOrPath))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", 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 };