/** * Update Project Command Handler - Set a customer project's displayed version * (and other registry-sync metadata) directly on the platform. * * Usage: * newo update-project [--version ] \ * [--force-update] \ * [--auto-update ] \ * [--registry-item-version ] \ * [--title ] [--description ] \ * [--customer ] [--json] * * --force-update fires the Builder's "Force Update Project" action * (POST .../by-id/{id}/force-update), re-syncing the project's content from its * registry. It runs BEFORE the version PATCH, so an explicit --version still wins * the displayed label. At least one of --version (/other fields) or --force-update * must be passed. * * The displayed project `version` in the Builder is governed by the `version` * field on the project object, NOT by content push (`newo push` never writes it) * and NOT by `registry_item_version`. This command sets it via a full-object * PATCH to `/api/v1/designer/projects/by-id/{id}`. * * IMPORTANT: that PATCH is NOT a true partial — omitting a field resets it to a * default (an empty body flips is_auto_update_enabled to false). So we GET the * current meta, overlay only the requested changes, and PATCH the full object * back — exactly what the Builder's "Manage → update to " does. */ import type { AxiosInstance } from 'axios'; import type { MultiCustomerConfig, CliArgs, ProjectMeta } from '../../types.js'; /** The full mutable field set the PATCH endpoint accepts. */ export interface ProjectUpdateBody { idn: string; title: string; description: string | null; version: string | null; is_auto_update_enabled: boolean; registry_idn: string; registry_item_idn: string | null; registry_item_version: string | null; } /** Overrides the caller wants applied on top of the current project meta. */ export interface ProjectUpdateOverrides { version?: string; is_auto_update_enabled?: boolean; registry_item_version?: string | null; title?: string; description?: string | null; } /** * Pure merge: take the current project meta and overlay the requested changes, * producing the FULL body the PATCH endpoint requires. Untouched fields are * carried over verbatim so the PATCH does not reset them to defaults. */ export declare function buildProjectUpdateBody(meta: ProjectMeta, overrides: ProjectUpdateOverrides): ProjectUpdateBody; /** * GET the current project meta, overlay the overrides, PATCH the full object, * then re-GET and return the effective meta. Single PATCH call → never partial. */ export declare function applyProjectUpdate(client: AxiosInstance, projectId: string, overrides: ProjectUpdateOverrides): Promise<{ before: ProjectMeta; body: ProjectUpdateBody; after: ProjectMeta; }>; export declare function handleUpdateProjectCommand(customerConfig: MultiCustomerConfig, args: CliArgs, verbose?: boolean): Promise; //# sourceMappingURL=update-project.d.ts.map