Release 4.0.0 #1

Merged
ulysia merged 31 commits from 4.0.0-develop into master 2026-11-09 13:25:39 +01:00
Owner

Release 4.0.0. The full list of changes, breaking changes and migration notes is in CHANGELOG.md; the wiki's Migrating from 3.x and Handoff pages cover the rest.

Highlights:

  • A method for every operation in the Content Server 26.2 spec, and for every route the core restapi module and the OpenText optional modules of a live 26.1 server register (SAP and Engineering follow in 4.2.0).
  • One API generation per method, named for it (unsuffixed = v2, V1, V3); version gating and detection; normalised response.result for every entity kind with a readable shape.
  • Optional handlers as separate imports (@ulyxie/cs-rest/<module>), ES modules only, Node 20.19+ / Bun / browsers.
  • No runtime dependencies: Node's own http in Node, fetch in Bun and browsers, axios as an opt-in transport; uploads and downloads stream in every runtime, including Large File Upload.
  • Writes in the optional modules checked live against a 26.1 server.

Checks: build, 1200 tests, the declaration check (bundler / nodenext / node10), the generated-files check, coverage 0 remaining.

master and 4.0.0-develop shared no history; d0e0ee3 joins master's 3.x commit as an ancestor without taking anything from it (4.0.0 already carries its two fixes), so this merges as a fast-forward.

Merging and pushing a v4.0.0 tag runs publish.yml, which stages the release on npm; it goes live only when approved with 2FA.

🤖 Generated with Claude Code

Release 4.0.0. The full list of changes, breaking changes and migration notes is in [CHANGELOG.md](https://git.derg.cz/content-server/cs-rest/src/branch/4.0.0-develop/CHANGELOG.md); the wiki's Migrating from 3.x and Handoff pages cover the rest. Highlights: - A method for every operation in the Content Server 26.2 spec, and for every route the core `restapi` module and the OpenText optional modules of a live 26.1 server register (SAP and Engineering follow in 4.2.0). - One API generation per method, named for it (unsuffixed = v2, `V1`, `V3`); version gating and detection; normalised `response.result` for every entity kind with a readable shape. - Optional handlers as separate imports (`@ulyxie/cs-rest/<module>`), ES modules only, Node 20.19+ / Bun / browsers. - No runtime dependencies: Node's own http in Node, fetch in Bun and browsers, axios as an opt-in transport; uploads and downloads stream in every runtime, including Large File Upload. - Writes in the optional modules checked live against a 26.1 server. Checks: build, 1200 tests, the declaration check (bundler / nodenext / node10), the generated-files check, coverage 0 remaining. master and 4.0.0-develop shared no history; `d0e0ee3` joins master's 3.x commit as an ancestor without taking anything from it (4.0.0 already carries its two fixes), so this merges as a fast-forward. Merging and pushing a `v4.0.0` tag runs publish.yml, which **stages** the release on npm; it goes live only when approved with 2FA. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The first batch of operations a live 26.1 server serves that OpenText's
spec leaves out, from the core restapi module:

- nodes: createZip, zipStatus, zipContent, downloadZip (zip-and-download),
  state, descendantSubtypesExist, appContainer, appContainerPage,
  propertiesActionsV1
- versions.listActionsV1
- members: preferences, updatePreferences, myPhotoV1, userPickListV1,
  groupPickListV1
- permissions.check
- server: settings, setting, updateSetting
- forms.memberPreferencesFormV1

They return TUndocumented, a new exported type: the server declares no
schema for them. Their JSDoc says they are undocumented, and names what
is unverified - the zip job type, the preference values and how a setting
value is sent. Four routes are recorded as coverage skips: PUT
/v2/csui/favorites and GET /v1/forms/info, which the server's own source
marks deprecated; GET /v1/forms/nodes/info, the same deprecated action;
and POST /v1/members/{id}, the same update as PUT.

coverage.mjs takes --spec and --by module to measure against the live
list, and no longer reports live-only templates as strays when measuring
against the published spec. Against the live list: 345 of 1366 covered,
17 skipped. QUESTIONS.md Q14 asks which optional modules to cover next.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every operation the core restapi module of a live 26.1 server registers now
has a method: 371 of 377, the other 6 recorded as coverage skips. This batch
covers the remaining 122 routes.

New handlers:
- recman: RM classifications, holds, RSIs, security clearances,
  cross-references, disposition review
- physicalObjects: borrowing, requests, returns, locators, transfers,
  labels, circulation
- classifications, video, wopi
- admin: lladmin, clustermgmt and admin (install, licences, modules, OTDS,
  cluster, database upgrade)

Added to existing handlers: module and widget assignments on members,
nodes.objectShareV1 / releaseObjectShareV1 / addFromTemplateV1,
forms.rmClassificationsFormV1, webreports.parametersByIdV1 and
destinationByNicknameV1. The four v3 routes take a V3 suffix (Q1's first
option): nodes.appContainerV3, appContainerPageV3, server.statusV3,
auth.tokenExpiryV3. The POST form of ModuleAssignmentCounts is a coverage
skip, being the same action as the GET.

Most of these routes dispatch to server actions that declare no fields, so
their writes take a fields object sent as the body parameter, and their
JSDoc says the fields are unverified.

Gating fix: GET /v1/nodes/{id}/parameters and GET
/v1/webreports/{nickname}/destination left the published spec after 20.4
but 26.1 still serves both, so gating refused them on every later release.
generate-capabilities now treats the live route lists as evidence against a
removal.

test/requests.test.mjs checks the method, URL, query and fields each new
method sends, against a fake adapter (134 tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The core - Session, auth, version detection and gating, the normaliser, and
the nodes, versions, members, categories, permissions, volumes, uploads,
search, forms and server handlers - stays at the package root. Everything
else moves to its own subpath, which adds its getter to every Session when
imported once:

  import "@ulyxie/cs-rest/workflow";   // session.workflow

Modules: admin, ai, classifications, perspectives, physical-objects
(session.physicalObjects), recman, reminders, rpc (session.rhcore and
session.rpcClient(), plus RPCClient / RPCError / isRPCError), signatures,
video, viewx, webreports, wopi, workflow.

- Before its import a module's getter throws, naming the import it needs.
- session.use(Handler) returns the Session's instance of any handler; the
  getters go through it.
- registerModule(name, Handler) and the SessionModules interface let a
  third-party handler attach itself the same way. ServiceAbstract is
  exported to build one on.

The build is now tsc alone, one ES module per source file, so the core and
every module share a single Session class and an app's bundler drops what it
does not import. Measured with esbuild from the packed tarball, minified:
core 64 KB (12.7 KB gzip), everything 91 KB (17.0 KB). microbundle and
the CJS build are gone; engines is now >= 20.19, where require() of ES
modules works unflagged.

File paths for uploads and downloads go through a "#platform" import, which
resolves to fs on Node and Bun and to a stub that explains itself in
browsers. The dynamic import("fs") it replaces made esbuild and webpack fail
to bundle the package for the browser at all.

check:dts now compiles test/types/ against the shipped declarations under
bundler and nodenext resolution, strict and with skipLibCheck off. The tests
import through the package's own exports map; test/modules.test.mjs covers
the module mechanics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Session no longer wraps an axios instance. An HttpClient builds each
request - URL, query string, multipart body, ticket - and hands it to a
transport, by default the platform's own fetch, so the package has no
runtime dependencies. Measured with esbuild from the packed tarball,
minified and gzipped, the core goes from 31.8 KB with axios to 13.4 KB.

- Methods resolve with TResponse ({ data, status, statusText, headers });
  data is unchanged.
- Any status outside 2xx rejects with an HTTPError whose response carries
  status and data, as an axios error did, whichever transport was used;
  isHTTPError() tells them apart. The message includes Content Server's own
  error text.
- New Session options: fetch (a fetch to use, e.g. with an undici
  dispatcher for a proxy or a private CA), transport, headers.
- @ulyxie/cs-rest/axios exports axiosTransport(instance), for axios's proxy
  handling, agents and interceptors. It takes the caller's instance and never
  imports axios, which is now an optional peer dependency.
- Username/password Sessions sign in once, shared by concurrent first
  requests; a failed sign-in is retried by the next request.
- "arraybuffer" answers are ArrayBuffers in Node too, and "stream" a web
  ReadableStream; downloadTo() writes either to disk.
- session.axios is gone.

test/http.test.mjs covers URL and query building, body encoding, sign-in,
ticket refresh, decoding, errors, path uploads and downloads, and the axios
transport behaving identically (155 tests). Smoke-tested on Bun 1.1.38.
README, CHANGELOG and QUESTIONS.md (Q15: defaults to review) updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Live testing on the 26.1 dev server showed every upload held in memory,
each runtime for its own reason:

- Node's fetch buffers any request body, FormData or stream, built-in or
  the undici package, with or without a dispatcher;
- Bun's fetch, and Node's FormData encoding, read file parts fully;
- axios in Node copies the body for follow-redirects.

So:

- In Node the default transport is now Node's own http / https
  (http/node-transport.ts, reached only through #platform, so browser
  bundles never see it). A new `agent` option takes an https.Agent for a
  private CA, a proxy or a custom lookup. Bun and browsers keep fetch.
- On Node and Bun, multipart bodies are encoded by the library as a stream
  with an exact Content-Length (http/multipart.ts). Browsers keep their
  native FormData, which they stream from disk.
- The axios transport sends uploads with maxRedirects 0.

A 512 MB upload now costs +0 MB in Node and Bun and +9 MB through axios,
against +529, +515 and +452 MB before. The core browser bundle is
unchanged at 13.5 KB gzipped.

Live tests, not part of npm test, configured by .env (ignored by git):
- test:live (test/live/smoke.mjs): 17/17 on the dev server through the
  default transport, a custom fetch and axios;
- test:live:large (test/live/large.mjs): 512 MB uploads stream and
  download back with matching checksums. Large File Upload's parts and
  completion succeed, but creating the node then fails on that server
  ("Could not close stream cursor"), identically on both transports - a
  server-side fault, noted in the wiki Handoff.
undici is a dev dependency for the live tests' dispatcher.

Unit tests: 162, including the Node transport against a real local server
and every form body decoded by a standard multipart parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- typesVersions maps every subpath (modules, axios) to its declarations,
  so TypeScript's legacy "moduleResolution": "node" (node10), which ignores
  "exports", types a module's getter too. check:dts compiles the consumer
  tests under node10 as well, linking the package into test/types/
  node_modules for it; the cleanup never deletes recursively, since the link
  points at the repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every route of the recman, recmansecurity and physicalobjects modules in
the live 26.1 route list now has a method, on the existing handlers:

- session.recman (+105): RM settings, field and function access, the code
  tables and their imports; record counts, record create info and actions
  on several nodes at once; holds as objects (v1 and v2), hold items and
  maintenance, user holds; RSIs and their retention schedules (create,
  update, delete, stages, approval, history, items); cross-reference types;
  disposition searches, their runs, results and reviewer views; the RM
  processing queue; the RM forms; and security clearances (recmansecurity):
  clearance codes and settings, node clearance levels and supplemental
  markings, and each user's clearance.
- session.physicalObjects (+50): circulation of several items at once
  (borrow, return, request, acknowledge, pickup, labels, locators,
  transfers, boxes, metadata), the v2 circulation lists and the user's
  borrowed and requested items, boxes, locators and transfers, code tables,
  media types, imports, and the PO forms.

Routes that declare their fields are typed (RSIs and schedules, user
holds, user clearance); the rest take `fields`, as before. Imports go as
flat form fields so a File can be sent.

Coverage skips: GET /v2/hold (the same Hold object as GET /v2/holds/{id},
hold()) and PUT /v2/rsischedule (the same RetentionPolicyUpdate object as
PUT /v2/rsischedules/{id}, updateRsi(), with the id in the body).

Every GET was called, read-only, on the 26.1 dev server; the shapes and
required parameters it showed are in the JSDoc. That server has no holds
or RSIs, so single-hold and single-RSI reads were seen only with no id.
No writes were sent. Against the live list: 622 / 1361, 719 remaining.
Tests: 317.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wopi (15 new, on session.wopi): WOPI locks (info, lock, refresh, unlock),
CheckFileInfo, version content, the Office Online prelaunch and launch,
promote, discovery, broker and edit-service set-up, and the Office Editing
Service routes.

officeintegration (16, new module @ulyxie/cs-rest/office, session.office):
saving Outlook items and their folders, copying a document to a OneDrive /
SharePoint drive, creating nodes with content, content-type mapping, SMTP
validation, and the server, subtype, node, category, category-inheritance
and permission lookups of the Office add-ins.

Reads were probed against the 26.1 dev server and their answers folded
into the JSDoc: wopiping answers OK with the module version, oes answers
404 "Not implemented", wopilocks 403 for an unlocked folder; o365srv/server
lists every installed module with its version, subtypes every subtype,
linktemplate is an ASPX template (so linkTemplateV1() asks for text), and
ctmapping is empty with nothing configured. The WOPI set-up routes
(wopi2discovery, wopidiscovery, wopibroker, wopilaunch) and wopipromote are
GETs that configure or act, so they were not called. No writes were sent.

Against the live list: 653 / 1361, 688 remaining; both modules at 0. 349
tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every live-list route outside Extended ECM, SAP and Engineering now has a
method, except othcm (Extended ECM for SAP SuccessFactors) and ual
(ArchiveLink for SAP), left for the SAP batch.

Joining existing handlers:
- workflow: webwork (13) and wfinitiatefromitem (itemWorkflows)
- viewx: viewx (publicationV1, nodeDbStringsV1, settingsV1, tokenV1,
  transformsV1) and the classic docviewer (viewV1)
- signatures: signatureproviders (6) - signing as a workflow step
- perspectives: the v1 perspective object (5)
- classifications: the classification module (5)
- webreports.processorV1, ai.authCheck, office.reprocessProtection (cpmaip),
  physicalObjects.barcode (barcode)
- core, kept small: search (websbroker search-broker reads, 5),
  forms.documentTypeAttributesFormV1, nodes.intelligentFilingOverview and
  setIntelligentFilingOAuth (metadata), auth.logoutTokenV1,
  server.smartUiSettingsV1 and batchV1 (csui)

New modules: sharing (contentsharing, 26), pulse (socialobject +
socialfeed, 19), notifications (messagecenter + webnotify, 15), regulated
(controlledviewing + wlrd + esign/fdausers, 12), wiki (9), email (otemail,
4), forums, syndication (qds), webedit, salesforce (salesforceinterface)
(3 each), sharepoint-archive (enterprisearchivesp, 2).

Coverage skips: GET /v1/search (POST form used), PUT /v2/pulse/members/{id}
(same object as the POST), and the four POST /v2/csapplications/<action>
routes, which server.csApplication(action) reaches through the published
template.

GETs were read on the 26.1 dev server (74 calls, no writes) and the answers
folded into JSDoc. 503 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Extended ECM modules of the live 26.1 route list - xecmpf, xecmgov,
xecmoffice, xgovexpimp and xecmgw, 237 routes - now have methods (221 for
230 routes; 7 coverage skips).

Four new modules:
- @ulyxie/cs-rest/workspaces (session.workspaces, 98): the xecmpf platform -
  workspace documents and dossiers, file upload by document type, workspace
  references, business attachments on workspaces, nodes and business
  objects, external systems, business object types and their policies,
  completeness checks, Extended ECM permissions and members, unique names,
  ECMLink licensing, the web viewer, CMIS, document generation, transports,
  deletion through review workflows, the application-integration workflows
  (xecmpfappintgn), xecmxo records, and the xecmgw gateway.
- @ulyxie/cs-rest/event-action-center (session.eventActionCenter, 14).
- @ulyxie/cs-rest/smart-document-types (session.smartDocumentTypes, 24):
  smart document types, their rules and bots, scheduled bots and jobs, and
  the expression builder.
- @ulyxie/cs-rest/government (session.government, 56): Extended ECM for
  Government (xGov) with its xdomea export and import.
Extended ECM for Microsoft 365 (xecmoffice, 29) joins session.office:
group and Teams associations, content and member sync, Teams archiving,
picker configuration.

Coverage skips: the second registrations of SaveDocument, the workspace
reference update and the three document-deletion objects (under
/v2/othcm/...), and GET / PUT /v2/nodes/{id}/xgovpermissions, which 26.1
registers without a handler.

Every GET that changes nothing was read on the 26.1 dev server (78 calls,
50 answered 200; no writes sent) and the findings are in the JSDoc: dossier
requires group_by, archiveRecord wants ext_record_id or archive_id with
document_id, most workspace reads need a business workspace or business
object configuration, the application-integration reads need Process
Automation configured. Request tests: 733.

The workspaces themselves (GET/POST/PUT /v2/businessworkspaces and their
members, related items and icons) are otsapxecm routes, still to come.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xecmsap, othcm, ual and the xeng* modules are left for a later release, so
coverage counts them apart (245 operations; --all includes them) and
"remaining" is what 4.0.0 still lacks: 46, all otsapxecm, which holds the
core Business Workspaces API and is wrapped next. QUESTIONS.md Q14 records
the decision, and that live writes are allowed when every object created is
reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 46 routes of the otsapxecm module - despite its name Extended ECM's
base, not SAP - join the workspaces handler (now 144 methods), in sections
ahead of the xecmpf ones:

- Workspaces: list, create, createOrUpdate, workspace, workspaceV1,
  workspaceRootV1, createForm, metadataUpdateForm
- Workspace types: types, typeV1, typeWidgetsV1, typesForLocationV1
- Members and roles: workspaceMembers (named apart from members(), which
  lists who has access to any node), memberMembers, roles, role, addRole,
  updateRole, deleteRole, roleMembers, roleMember, addRoleMember,
  removeRoleMember, addableRoles, addRoleToNode
- Related workspaces: relatedItems, relatedItemsPicklist, addRelatedItem,
  removeRelatedItem; icons: addIcon, updateIcon, deleteIcon
- With the business object routes: workspaceOfV1, businessObjects,
  businessObjectTypes, businessObjectTypeById (businessObjectType() finds a
  type by system and name), businessObjectSearchForm;
  addBusinessObjectDocumentV1 with the workspace documents
- Reference numbers, configuration volumes, pickers and the Outlook
  add-in's settings and e-mail saving

GETs read on the 26.1 dev server against a real workspace (no writes):
workspace, members, roles, role members, related items and types answer;
the metadata-update form refuses every where_category_ids format tried,
and the create form and business-object reads need a configured business
object type. Findings are in the JSDoc.

SAP (xecmsap, othcm, ual) and Engineering stay out: left for a release
after 4.0.0. Against the live list everything else is covered: 1083 of
1116, 33 skipped, 0 remaining. 779 tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Records Management writes were tried on the 26.1 dev server, every object
created logged and removed (log kept on the devbox, outside the repo). There,
RM is installed but not enabled for objects and its code tables are empty:
documents have no RM roles, so the per-node routes answer "no role", and
holds and RSIs cannot be created without a hold type / RSI status code. The
multi-node routes and the clearance updates do work.

Fixed, from the server's own answers:
- finalizeRecordsV1 sends a flat `ids` form field (comma-joined, as the UI
  does) and takes the ids; inside `body` the server reported the parameter
  missing.
- queueV1 sends flat form fields; inside `body` the server reported no task.
- updateCodesV1 sends flat fields like the RM UI (not sent to a server: it
  changes a code table).

The fields of the other RM writes are typed and documented from what the
Records Management Smart View UI sends, with the answers seen: the batch
hold, classification and cross-reference routes (counts such as
`XRefAssigned`), hold and RSI creation's required codes, clearance level
and supplemental markings, the disposition qDate format. createRsi now
requires `name`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dev server's Physical Objects module has no media types, so no
physical item can exist there; every write was reached with a scratch
document (logged, deleted and purged) or with ids that do not exist, and
its fields taken from the Physical Objects Smart View bundle and the forms.

- cancelRequested sent `id`; the server wants request ids as repeated `ids`
  query keys ("The list of ID is empty"). It now takes an array.
- borrowManyV1, returnManyV1, boxManyV1 and borrowRequested send flat form
  fields, as Smart View does, so an AddDesktopDoc file can go in.
- The circulation writes take their ids directly and send them as each
  route expects: an array (request, acknowledge, flag for pickup) or
  space-separated (labels, locators, transfers, boxes, metadata,
  properties, media types, history purge, request cancel).
- The borrowed-item member routes type `node_id`, which the server requires
  ("Missing required parameter 'Node ID'"); assignLocatorV1 types
  facility / area / box_locator; generateLabelsForManyV1 requires
  label_type ("Label type is not defined"); synchronizeFromToDatesV1 sends
  no body.
- JSDoc records each route's answer on 26.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exercised against the dev server, logged in /work/cs-rest-live-writes.md and
cleaned up (two test business workspaces, a role, a membership, a relation,
an icon, a document, upload staging folders - all removed and purged; the
server lists its 32 workspaces again).

Verified working and now documented: workspaces.create without a business
object, roles (add, update, delete), role members, related items, icons
(add, replace, delete), addRoleToNode, the deletion check and evaluation,
canRegenerateReferenceNumber, and the upload sequence createUploadTarget-
Folder / previewUpload / deletePreviewUploads (one server session);
government.addAsLatestVersion.

Fixed:
- role permissions are a list of names, not a string (addRole, updateRole,
  addRoleToNode; include_sub_types a list);
- workspaces.createForm takes wksp_type_id and type;
- workspaces.metadataUpdateForm: id lists in braces, plus fields;
- government.createAssignment / updateAssignment send add_assignment /
  update_assignment as one JSON field, validateClose / reopen plain fields,
  as the Government UI does.

Documented as not working or not configured on that server:
updatePermissions (400 "conflict between body and infoBucket" for every
shape), Government assignments on plain documents, print jobs, close
validation and reopen (usage privileges), completeness report (needs
business object configuration), unique names (need a volume-rooted path),
and the required fields the record, gateway, audit and attachment routes
named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked the wiki, forums, Pulse, notifications, sharing, email and
syndication writes against the dev server, every object created logged and
removed (/work/cs-rest-live-writes.md, outside the repo).

- wiki.autosave sent its fields in `body`: answered 200, nothing saved. Now
  flat form fields; autosaved() documented as taking the page id.
- Pulse writes never reached the server ("status" required inside body).
  updateStatusV1(status, { CSID }), commentV1(id, status),
  statusActionV1(id, action) and destroyStatusV1(id) send flat fields; the
  id is the status's feed event id, not the node a status is stored as.
- email.upgradeMetadataV1 sends `items` as a JSON string in a flat field.
- notifications.setWatch and setState(provider) go URL-encoded, and
  syndication.syndicate / consolidate as flat fields with OScript lists,
  as Smart View sends them (unverified: notifications and syndication are
  not set up on that server).
- forums.subscribe, wiki.deleteAutosave, sharing.shareOptionsV1 verified;
  the error answers of the rest are in their JSDoc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The last write-verification run, logged in full on the dev server:

- reminders.add / update send `data` as one JSON form field, as Smart View
  does; inside `body` 26.1 refused it ("value must be a String"). Their
  JSDoc lists the fields the UI sends.
- regulated.reassignControlledCopy sends plain fields with the copy list
  JSON-encoded; inside `body` 26.1 refused controlledCopyDetails.
- wopi.lockV1 / refreshLockV1 send lock_id as a form field; the WOPI module
  does not read `body`. The lock routes still answer 403 to a plain ticket,
  and the csnodes WOPI routes report failure inside a 200 - both documented.
- classifications.addV1 types its fields; update and bulk removal take a
  single integer class_id.
- Verified as they were: nodes.createZip with type "zipanddownload" (the job
  ran, the archive held both documents; status shape and the job's
  lifecycle documented), workflow.createDraft / updateDraft (the draft is a
  node, removed with nodes.delete), office.create and categoryInheritanceV1,
  classifying and unclassifying a document.

QUESTIONS.md Q14 records the zip job type as verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Earlier runs deleted it to the Recycle Bin only, leaving two folders there
(purged since, and recorded in the live write log).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
session.workspaces methods returning workspaces, workspace types, roles,
role members and business object types now carry response.result:

- TWorkspace: the node plus workspace_type_id, workspace_type_name and
  wksp_type_icon - list, workspace, workspaceV1, workspaceRootV1, create,
  relatedItems;
- TWorkspaceType: types, typeV1, typesForLocationV1;
- TWorkspaceRole (members from workspaceMembers): roles, role,
  workspaceMembers;
- TMember: roleMembers, roleMember;
- TBusinessObjectType: businessObjectTypes, businessObjectTypeById.

Shaped by read-only samples from a live 26.1 server: each route puts the
workspace type somewhere else (v2 business_properties, a list's
wnf_wksp_type_id column, v1's root lookup), and v1's single workspace sends
an error text in workspace_type_id, so the id is only ever read as a
number. v1 workspace types use id / name / workspace_type for v2's
wksp_type_id / wksp_type_name, which they are also given. Workspace lists
page with a top-level `paging` object, which readPaging now reads.

The readers are on `normalize`; the types are exported from the root. An
app that does not import the workspaces module does not bundle them (core
browser bundle unchanged at 13.8 KB gzipped). test/normalize-workspaces
.test.mjs covers the readers on synthetic fixtures shaped like the samples,
and every wired method's result through a fake fetch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Readers, measured on a live 26.1 server unless marked spec:

- workflows: one TWorkflow read the same from workflow.byStatus() (wfstatus),
  running() (Work_* / SubWork_* columns), statusInfo() (generalInfo, with
  its steps, comments and audit) and taskList() (wf_details, with step_list);
  canonical process_id, subprocess_id, map_id, wf_name, date_initiated,
  due_date, status_key added, originals kept. TWorkflowActivity
  (activities, processActivities), TWorkflowDefinition (definition) and
  TAssignment (members.assignments).
- TAuditEvent for nodes.audit / auditV1, identical from v1 and v2; v1's
  paging names (total, results_start, results_end) are read too.
- TRendition for the three rendition lists (spec), the keyed-by-version form
  flattened; TPage<TForm> for every forms method; TFollowUp (spec),
  TFavoriteTab (spec), TSearchRegion, TSearchSlice; releases as nodes and
  version categories with the existing readers.
- Modules: WebReports destination and parameters, TPerspectiveEntry,
  classified items, TPulseStatus, Event Action Center plans and definitions
  (flattened from their namespace groups), RM cross-reference types, the
  Microsoft 365 subtype list.

Module readers live in their own files, so a core-only bundle carries only
the core ones: 14.2 KB gzipped (was 13.8). test/normalize-entities.test.mjs
covers the readers on synthetic fixtures (invented values), v1/v2 and
cross-route parity, that no reader throws, and that each wired method
carries `result`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test/gating.test.mjs (28): supports()/assertSupported() for operations
added in a release and removed after one, the two "still served" entries
never refused, unknown operations allowed, "latest" gating nothing,
UnsupportedOperationError's fields and message, gated() URL building
(value count, missing values, path-segment encoding), and detectVersion
against a fake serverinfo: an exact release, one with no spec, newer than
the newest, older than the oldest, no version, a configured release
overridden, an unreachable server, and detection made once for concurrent
first calls.

test/compat.test.mjs (29): every shim in CHANGELOG.md's breaking-changes
tables reaches the generation 3.x used, warns once per method, and
resolves with the shape 3.x code expects.

Fixes the tests exposed:
- workflow.draftprocesses(), draftprocessesUpdate() and draftprocessesPut()
  never warned, though the changelog lists them as deprecated with a
  warning. They now do; workflow.start() and WorkflowInitiator, which used
  them internally, call createDraft / updateDraft /
  forms.draftProcessUpdateV1 instead, so they stay silent and still resolve
  with the body.
- volumes.volumes("v1"), volumeInfo(type, "v2") and browse(type, "v1") sent
  the leftover API version as a query string (?0=v&1=1) on the v2 route. They
  now throw a TypeError naming the method to call, as the changelog says
  such calls do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test/requests.test.mjs now exercises every gated() template in the handlers:
1074 of 1074, up from 737. The 337 missing were the published-spec methods.
Their rows were generated from the handler sources - dummy arguments by
parameter type, the expected URL computed from the template and the values
the code passes into it, never from running the code - then checked and
corrected by hand:

- rows can name the release to gate as, for the 26.2-only ai and viewx
  audit/prepublish routes;
- version content and contentAs are checked on 26.1 (v2) and on 22.4,
  where they fall back to v1;
- the everyday writes assert their bodies too: node create and update,
  custom permissions, search, group members, node lists and actions,
  category apply and apply-down, the zip job, Large File Upload parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- version 4.0.0, changelog dated
- README: the fork note says what 4.0.0 is, and points at infoV1()
- QUESTIONS.md removed: every question is decided, and the decisions live
  in the changelog, the wiki and the code comments that apply them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge: join master's 3.x history into 4.0.0
Some checks failed
CI / build (pull_request) Failing after 8s
d0e0ee3d34
master and 4.0.0-develop share no history (both were squashed to a root
commit), so a pull request between them could not merge. This merge makes
master an ancestor without taking anything from it: 4.0.0 already carries
master's two fixes (the prepare script for git-URL installs and the
version-neutral deprecation notice), and the only master-only files are the
old axios factory and a 2.0.2-era spec, both superseded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci: install yarn explicitly; drop setup-node's yarn cache
All checks were successful
CI / build (pull_request) Successful in 31s
55653f7d6e
The runner image ships no yarn. setup-node's `cache: 'yarn'` looked yarn up
before any step could install it, so the first CI run on the 4.0.0 pull
request failed in 8 seconds ("Unable to locate executable file: yarn"), and
publish.yml would have failed the same way on a release tag. Both now
install yarn 1.22.22 from npm after setting up Node, without the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ulysia merged commit f5c6963bdc into master 2026-11-09 13:25:39 +01:00
ulysia referenced this pull request from a commit 2026-11-09 13:25:41 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
content-server/cs-rest!1
No description provided.