Regen JS client for Field Definition Admin endpoints (PRD 6.3.A)#49
Merged
Conversation
Regenerates v2 client + swagger snapshot to pick up the 7 admin endpoints introduced by site-api-repository PR for US #666940 (CreateFieldDefinition, UpdateFieldDefinition, DeleteFieldDefinition, GetFieldListValues, ReplaceFieldListValues, GetFieldContainingTemplates, GetFieldAssignedEntryCount) plus the 5 additive writable flags on FieldDefinition (IsIndexed, IsIndexedForReporting, WarnIfBlank, HideListValues, AutoExtract) and the new DTOs (CreateFieldDefinitionRequest, UpdateFieldDefinitionRequest, ReplaceListValuesRequest, ListValuesResponse, AssignedEntryCountResponse). Adds FieldDefinitionAdmin.test.ts mirroring the dotnet integration tests: CRUD lifecycle, list-values round-trip, GetContainingTemplates empty, GetAssignedEntryCount zero.
Codex pre-PR review flagged that the test asserted only on the PUT response body. Same-request reads can mask a missing Save() on the server's RA SetItemList path (Trap 4 in the add-v2-endpoint skill). Adds a fresh getFieldListValues call after each replaceFieldListValues, mirroring the dotnet client-side change.
…rties
Picks up the 2 new admin endpoints on the server (PRD 6.3.A
REQ-ADMIN-004B): getFieldProperties / updateFieldProperties on
IFieldDefinitionsClient, plus the new optional properties field on
CreateFieldDefinitionRequest. The bag holds the WebDAV keys the
Cloud admin UI uses for list-field sort/add-blank/add-Other/display-as.
Adds "Extended properties — create / get / update round-trip" integration
test: create with initial properties, getFieldProperties to verify,
updateFieldProperties { set, remove }, independent getFieldProperties
to confirm the partial update persisted.
5/5 vitest cases pass against the local server.
…trip Mirrors the three dotnet coverage tests added during pre-PR review: - All FieldTypes — create / describe / update round-trip: iterates over all 8 non-Blob FieldType enum values; per-type create with appropriate flags, independent GET, PATCH description, verify. - GetFieldProperties — fresh field documents LFS-internal entries: surfaces what GetFieldProperties returns for a field with no caller-set properties. dev-CA returned 0 entries — closes Codex round-3 finding #4 with empirical evidence. - Validation — round-trips as 400 problemDetails: server-side validations (length<1, listValues on non-list, properties empty key, duplicate set+remove) surface as rejections with status 400 through the JS client. 8/8 vitest cases pass against the local server.
alexgomezlf
reviewed
May 28, 2026
The 6.3.A regen was run against the local dev server, baking http://localhost:11211/repository into the committed swagger `servers` and every generated client's default baseUrl. Restore the production URL https://api.laserfiche.com/repository to match origin/main and prior releases. Context: the dotnet client bakes no URL at all (baseUrl is factory- supplied at runtime); the JS NSwag generator derives the constructor default from swagger.servers[0], so the regen source environment leaked into the published artifact. API surface is unchanged — only the fallback baseUrl string and the swagger `servers` entry. Addresses review comments on #49 (swagger.json servers, index.ts baseUrl).
alexgomezlf
approved these changes
May 29, 2026
bzajzon-laserfiche
added a commit
that referenced
this pull request
May 30, 2026
…onsolidated) Single regen off the deployed swagger bringing the JS client up to the full V2 surface, superseding the conflicting per-batch client PRs. 6.3.A (#49) already on main. Surface added since main: - Field Definition destructive ops (MergeFields, ChangeFieldType) — PRD 6.3.B - Template Definition admin (CRUD + Properties + Field management) — PRD 6.3.C - Entry introspection on GET Entry: opt-in includeChildInfo (flat childInfo object { hasChildren, childCount, folderCount, documentCount, shortcutCount }) + includeTotalSize — REQ-DOC-002 Committed swagger.json + index.ts normalized to production URLs (api.laserfiche.com / signin.laserfiche.com). Integration tests for 6.3.B/6.3.C/REQ-DOC-002 brought onto this branch; the childInfo test asserts the flat single-object shape. Entry discriminator override applied (Trap 1); multipart tests stay SKIP_UNDER_JSDOM-gated (Trap 3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regenerates
@laserfiche/lf-repository-api-client-v2to pick up the 9 new Field Definition Admin endpoints introduced by the server PR for PRD §6.3.A (REQ-ADMIN-001..004 + REQ-ADMIN-004B). Companion PR for site-api-repository (TFS), US #666940.New surface on
IFieldDefinitionsClient:createFieldDefinition/updateFieldDefinition/deleteFieldDefinitiongetFieldListValues/replaceFieldListValuesgetFieldContainingTemplates/getFieldAssignedEntryCountgetFieldProperties/updateFieldPropertiesPlus new DTOs:
CreateFieldDefinitionRequest/UpdateFieldDefinitionRequestReplaceListValuesRequest/ListValuesResponseAssignedEntryCountResponseFieldPropertiesResponse/UpdateFieldPropertiesRequestFive additive writable flags on
FieldDefinition:isIndexed,isIndexedForReporting,warnIfBlank,hideListValues,autoExtract.Test plan
npm run build)tsc --noEmit -p tsconfig.json)FieldDefinitionAdmin.test.ts):FieldTypeenum values round-trippedstatus: 400Notes for reviewers
.envAPISERVER_REPOSITORY_API_BASE_URLmust have no trailing slash (per Trap 2 in.claude/skills/regen-js-client/SKILL.md); session-level discoverylf-cli-test-key1-style keys for the integration tests work fine.Related: PRD
notes/PRD - Repository REST API V2 Surface Expansion.md§6.3.A, TFS US #666940