Response payloads for the dispatcher-served packages.* lifecycle routes —
the ADR-0067 commit timeline, the ADR-0033 draft batch doors, the ADR-0070
export / adopt / duplicate family — ruled on 2026-08-27 (#12038,
1C · 2C · 3A · 4A · 5A).
Every schema here is a DESCRIBE-ONLY TRANSCRIPTION of the return type its
producer already declares inline (@objectstack/metadata-protocolprotocol.ts, except where a schema's own docblock says otherwise) —
authoring one changes no wire byte. All of these routes are served by the
runtime dispatcher ONLY (no REST twin — #12038 survey §1b), which answers
through the { success, data } envelope (http-dispatcher.ts), so each
schema declares the data payload, envelope-free — the same convention as
PublishPackageDraftsResponseSchema and its ledger row.
One pair is the exception: ImportUnmanagedPackageRequestSchema /
ImportUnmanagedPackageResponseSchema (ADR-0131 D6) declare a protocol verb
no route serves yet, and the request half is parsed by its producer rather
than transcribed — see their own docblocks.
packages.publish's contract is NOT here: its producer
(MetadataManager.publishPackage) already has an exact published schema,
PackagePublishResultSchema in @objectstack/spec/system — re-exported
below into this /api namespace (ruling 5A: re-export, never a second
copy) because the route-ledger resolver looks names up only in the API
protocol's entries — @objectstack/spec/api, and /api-assembled for the
declarations that embed the assembled package body (#18576).
The retired PackageRollbackResponseSchema and its
PackageApiContracts.rollbackPackage binding (see ./package-api-assembled.zod.ts)
declared a VERSION rollback against the live COMMIT-rollback path;
RollbackToPackageCommitResponseSchema below is the true contract,
authored after that retirement per the ruling's sequencing (3A).
The package to import: ONE package's assembled body, flattened — its manifest fields beside its metadata collections (objects, views, …), the shape the install door hands the manifest service. An artifact carrying packages is refused: import each package body on its own.
targetPackageId
string
optional
Id of the NEW writable base the items are written into, in reverse-domain form. It must differ from the source id and name no installed package. Defaults to <manifest.id>-copy.
targetName
string
optional
Display name of the new base. Defaults to the source package's name.