export type GetApiTransformGroupTransformGroupIdRevisionArgs = {limit?: number | undefined, transform_group_id: string}; export type GetApiTransformGroupTransformGroupIdRevisionOptions = {baseUrl?: string | undefined, PipelineServiceKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * GET /transform-group/{transform_group_id}/revision */ export const getApiTransformGroupTransformGroupIdRevision = async (args: GetApiTransformGroupTransformGroupIdRevisionArgs, options?: GetApiTransformGroupTransformGroupIdRevisionOptions) => { const {baseUrl = "https://api.mezmo.com/v3", fetch: fetchFn = fetch, PipelineServiceKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.limit != null) query.append("limit", String(args.limit)) if (PipelineServiceKey !== undefined) headers.set("Authorization", PipelineServiceKey) const url = `${baseUrl.replace(/\/+$/, '')}/transform-group/${encodeURIComponent(String(args.transform_group_id))}/revision${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };