import { $Fetch } from 'ofetch'; import { PeoplePackArtifactEntry, PeoplePackAuditEntry, PeoplePackAuditQuery, PeoplePackConflictEntry, PeoplePackConflictPreview, PeoplePackHealth, PeoplePackImpact, PeoplePackPreflight, PeoplePackPreflightQuery, PeoplePackStatus, PeoplePackSyncLog, PeoplePackUpgradeCheck, PeoplePackOpsRegistry } from './packops.type'; export interface IPeoplePackOpsServiceOptions { /** The CMS `$Fetch` instance (one of `sdk.apis`). */ api: $Fetch; } /** FEAT-015 — pack-operation reads (projections) + engine pack mutations. */ export interface IPeoplePackOpsService { /** `GET /people/pack-ops/registry` — CMS packs + template catalog. */ registry(): Promise; /** `GET /people/pack-ops/preflight?slug=&source=&ref=` — no install. */ preflight(query: PeoplePackPreflightQuery): Promise; /** `GET /people/pack-ops/{slug}/upgrade-check` — installed vs branch. */ upgradeCheck(slug: string): Promise; /** `GET /people/pack-ops/{slug}/impact?ref=` — read-only target preview. */ impact(slug: string, ref: string): Promise; /** `GET /packs/audit-log` — every pack transition with actor (US7). */ auditLog(query?: PeoplePackAuditQuery): Promise; /** `POST /packs/{slug}/install?ref=` — E8a gates run server-side. */ install(slug: string, ref?: string): Promise>; /** `POST /packs` — register a pack (git remote + metadata) before install * (registry-catalog entries have no CMS row yet; 409 when the slug * exists — treat as registered and continue to preflight/install). */ register(params: { slug: string; name?: string; source: string; branch?: string; }): Promise>; /** `POST /packs/{slug}/rollback?to_version=` — 202 accepted. */ rollback(slug: string, toVersion?: string): Promise>; /** * `DELETE /packs/{slug}` (archive = uninstall) — engine belt rejects 409 * `PEOPLE_PACK_REFERENCED_CONTENT` while CTs still own content unless * `force: true` (purge flow, two-layer confirm portal-side). The escape * hatch rides the JSON body `{"force": true}` — never a query parameter. */ uninstall(slug: string, force?: boolean): Promise; /** * `PUT /packs/{slug}` — metadata update. `metadata` REPLACES the complete * object server-side (no deep-merge), so this reads the current pack row * first and preserves the engine-owned install pins (`installedRef` / * `installedRequestedRef`) before adding the People disable flag * (`people.pack.disabled`): soft-off, instantly reversible. */ updateMetadata(slug: string, patch: { disabled?: boolean; metadata?: Record; }): Promise>; /** `GET /packs/{slug}/conflicts` — git-vs-DB drift per artifact. */ conflicts(slug: string): Promise; /** `GET /packs/{slug}/conflicts/{artifact_id}/preview` — 3-way merge. */ conflictPreview(slug: string, artifactId: number): Promise; /** * `POST /packs/{slug}/conflicts/{conflict_id}/resolve` — human decision. * `merge_manual` flags the artifact for human merge; neither side is * force-overwritten (US6: conflict → surface for human). */ resolveConflict(slug: string, conflictId: number, resolution: 'git_wins' | 'db_wins' | 'merge_manual'): Promise<{ conflict_id: number; resolution: string; resolved: boolean; }>; /** `GET /packs/{slug}/sync-log` — cursor-paginated sync history. */ syncLog(slug: string, query?: { cursor?: string; limit?: number; }): Promise; /** `GET /packs/{slug}/sync-jobs/{job_id}` — one job's detail. */ syncJob(slug: string, jobId: string): Promise>; /** * `POST /packs/{slug}/git_push` — operator/publisher API (§8.1): * generated-pack publishers or CI commit/push source BEFORE an * install@ref. NOT a People Pack Management UI action — the portal * never calls this. */ gitPush(slug: string): Promise>; /** `GET /packs/{slug}/status` — live install state (`.state`). */ status(slug: string): Promise; /** `GET /packs/{slug}/health` — install/runtime health report. */ health(slug: string): Promise; /** `GET /packs/{slug}/artifacts` — hash-tracked artifact inventory. */ artifacts(slug: string): Promise; } export declare function createPeoplePackOpsService(opts: IPeoplePackOpsServiceOptions): IPeoplePackOpsService; //# sourceMappingURL=index.d.ts.map