export type ScenarioSharedViewConfig = {customColumnNames?: Array | undefined, columnWidths?: {[key: string]: number} | undefined, type?: ('ALL_CHANGES_GROUPED' | 'CREATE' | 'HIRE' | 'DELETE' | 'DEPART' | 'COMP' | 'UPDATE' | 'MOVE') | undefined, updateId?: string | undefined, updateAt?: string | undefined}; export type CreateApiV1OrgOrgIdScenarioScenarioIdUpdateSharedViewArgs = {orgId: string, scenarioId: string, body: ScenarioSharedViewConfig}; export type CreateApiV1OrgOrgIdScenarioScenarioIdUpdateSharedViewOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update a scenario view config * * POST /v1/org/{orgId}/scenario/{scenarioId}/update-shared-view */ export const createApiV1OrgOrgIdScenarioScenarioIdUpdateSharedView = async (args: CreateApiV1OrgOrgIdScenarioScenarioIdUpdateSharedViewArgs, options?: CreateApiV1OrgOrgIdScenarioScenarioIdUpdateSharedViewOptions) => { const {baseUrl = "https://localhost", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v1/org/${encodeURIComponent(String(args.orgId))}/scenario/${encodeURIComponent(String(args.scenarioId))}/update-shared-view${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 };