export type ActivityLogEntry = {note: string, user?: string | undefined, timestamp?: string | undefined}; export type CreateApiV1SubjectRightsActionItemsActionItemIdActivityLogArgs = {actionItemId: number, body: ActivityLogEntry}; export type CreateApiV1SubjectRightsActionItemsActionItemIdActivityLogOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Create Activity Log Entry * * POST /v1/subject-rights/action-items/{actionItemId}/activity-log */ export const createApiV1SubjectRightsActionItemsActionItemIdActivityLog = async (args: CreateApiV1SubjectRightsActionItemsActionItemIdActivityLogArgs, options?: CreateApiV1SubjectRightsActionItemsActionItemIdActivityLogOptions) => { const {baseUrl = "https://api.osano.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (ApiKeyAuth !== undefined) headers.set("x-osano-api-key", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/subject-rights/action-items/${encodeURIComponent(String(args.actionItemId))}/activity-log${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 };