fix(integration-ever-works): docs placement narrows without strictNullChecks (API image build)

Merged
EV
10d ago
+8-6

Integration queue item I4, item 0 (build safety; plan 06 G-P3 docs sync).

Why

The API image compiles plugins with the root non-strict tsconfig.json (via apps/api/tsconfig.app.json). Without strictNullChecks, a placement && 'privateFolder' in placement guard does not narrow the union, so ever-works-docs.service.ts fails with TS2345 ร—2 (DocsPlacement | { privateFolder } โ†’ DocsPlacement). The same class of error broke develop's API build once (#10839).

Change

EverWorksDocsService.pushPage checks each placement case on its own and returns: no placement (unlink, skipped), private folder (unlink, skipped), waiting folder (deferred). The outcomes are the same as before, because the cases never overlap.

Verification

  • Red on develop 390eb26035: tsc --noEmit with apps/api/tsconfig.app.json options over packages/plugins/integration-ever-works/src (no specs) reports 2 errors, both in ever-works-docs.service.ts.
  • Green on this branch: 0 errors.
  • The same non-strict compile over all of apps/api/src plus the inbox and email-provider plugins finds 2 errors, both outside this plugin, so this PR leaves them alone:
    • plugin-order order.service.ts:215 TS2345. Lane 8d15ee9b (gauzy-pr-pass) is batching that fix.
    • integration-plane readSessionTokenFromCookieHeader. This comes from the shared local install's stale @ever-gauzy/plugin-integration-plane-api.
  • Static gates: 30/30 passed. cspell is clean.

๐Ÿค– Generated with Claude Code


Summary by cubic

Fixes the Ever Works docs placement handling so the API image compiles without strictNullChecks.

The API image builds plugins with the root non-strict tsconfig.json, where a combined placement && 'privateFolder' in placement guard doesn't narrow the union and raises two TS2345 errors in ever-works-docs.service.ts (the same error class that broke develop once, #10839). Each placement case (none, private folder, waiting folder) now returns on its own, preserving the existing outcomes.