@oddington/sdk 0.1.78 → 0.1.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -903,8 +903,10 @@ if (next) await general.records.query({
903
903
  ```
904
904
 
905
905
  `collections.schema(name)` includes an optional `display.title` list of one or
906
- two ordered scalar field names when the collection declares a short Record
907
- title. It is presentation metadata; `$ref` remains the Record identity.
906
+ two ordered singular scalar or link field names when the collection declares a
907
+ short Record title. A link contributes its target Record's declared scalar
908
+ title on surfaces that resolve presentation. It is presentation metadata;
909
+ `$ref` remains the Record identity.
908
910
 
909
911
  Binding is inert. Each operation resolves current workspace, endpoint and
910
912
  short-lived authority from the trusted app host or managed routine context.
package/dist/browser.js CHANGED
@@ -5574,7 +5574,7 @@ var RecordSelectionError = class extends InboxContractError {
5574
5574
  constructor(problem, source2) {
5575
5575
  let collection = `${source2.collection.repository}/${source2.collection.name}`, messages = {
5576
5576
  collection_unavailable: `The ${collection} collection is unavailable. Check the collection name and its schema.`,
5577
- display_fields_invalid: "display" in source2 ? `The label fields for ${collection} must be scalar fields in its schema. Check display.labelFields.` : `The ${collection} schema must declare one or two scalar title fields. Check display.title.`,
5577
+ display_fields_invalid: "display" in source2 ? `The label fields for ${collection} must be scalar fields in its schema. Check display.labelFields.` : `The ${collection} schema must declare one or two singular scalar or link title fields. Check display.title.`,
5578
5578
  filter_fields_invalid: `The filters for ${collection} must use scalar schema fields and matching values. Check the Question\u2019s where fields.`,
5579
5579
  ref_prefix_invalid: `The record reference prefix does not belong to ${collection}. Check refPrefix against the collection\u2019s record references.`,
5580
5580
  suggestion_unavailable: `A suggested record is missing or isn\u2019t eligible for ${collection}. Update the suggestions and try again.`,
@@ -7404,12 +7404,12 @@ function parseRecordDisplay(value, definitions2, fail8 = invalid7) {
7404
7404
  if (value === void 0) return;
7405
7405
  if (!value || typeof value != "object" || Array.isArray(value)) return fail8("Expected a field mapping");
7406
7406
  let row = value;
7407
- if (Object.keys(row).some((key) => key !== "title") || !Object.hasOwn(row, "title") || !Array.isArray(row.title) || row.title.length < 1 || row.title.length > 2 || row.title.some((name2) => typeof name2 != "string" || !NAME.test(name2)) || new Set(row.title).size !== row.title.length) return fail8("Display title requires one or two distinct scalar fields");
7407
+ if (Object.keys(row).some((key) => key !== "title") || !Object.hasOwn(row, "title") || !Array.isArray(row.title) || row.title.length < 1 || row.title.length > 2 || row.title.some((name2) => typeof name2 != "string" || !NAME.test(name2)) || new Set(row.title).size !== row.title.length) return fail8("Display title requires one or two distinct singular scalar or link fields");
7408
7408
  let title = row.title;
7409
7409
  return title.some((name2) => {
7410
7410
  let field = definitions2.find((candidate) => candidate.name === name2);
7411
- return !field || field.many || ["link", "object", "map"].includes(field.kind);
7412
- }) ? fail8("Display title requires one or two distinct scalar fields") : { title };
7411
+ return !field || field.many || ["object", "map"].includes(field.kind);
7412
+ }) ? fail8("Display title requires one or two distinct singular scalar or link fields") : { title };
7413
7413
  }
7414
7414
 
7415
7415
  var RecordValidationError = class extends Error {