export type CreateApiV1GovernanceActorMappingsActorIdPseudonymizeArgs = {'X-Request-Id'?: string | undefined, actorId: string, 'X-Idempotency-Key'?: string | undefined}; export type CreateApiV1GovernanceActorMappingsActorIdPseudonymizeOptions = {baseUrl?: string | undefined, BearerAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Pseudonymize an actor * * POST /v1/governance/actor-mappings/{actorId}/pseudonymize */ export const createApiV1GovernanceActorMappingsActorIdPseudonymize = async (args: CreateApiV1GovernanceActorMappingsActorIdPseudonymizeArgs, options?: CreateApiV1GovernanceActorMappingsActorIdPseudonymizeOptions) => { const {baseUrl = "https://identity.sandbox.lerian.net", fetch: fetchFn = fetch, BearerAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Request-Id'] != null) headers.set("X-Request-Id", String(args['X-Request-Id'])) if (args['X-Idempotency-Key'] != null) headers.set("X-Idempotency-Key", String(args['X-Idempotency-Key'])) if (BearerAuth !== undefined) headers.set('authorization', `Bearer ${BearerAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/governance/actor-mappings/${encodeURIComponent(String(args.actorId))}/pseudonymize${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };