@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.
@@ -1,5 +1,6 @@
1
1
  import { type QualifiedRecordRef, type InboxBlock } from './inbox-contract.js';
2
2
  import type { CollectionSchema, SelectedRecord } from './data-contract.js';
3
+ import { type RecordDisplayLinkTitle } from './record-display.js';
3
4
  export type InboxRecord = QualifiedRecordRef & {
4
5
  record: SelectedRecord | null;
5
6
  schema: CollectionSchema | null;
@@ -26,5 +27,5 @@ export declare const recordKey: ({ repository, ref }: QualifiedRecordRef) => str
26
27
  /** Only authored Record blocks disclose bootstrap hydration destinations. */
27
28
  export declare function authoredInboxRecordRefs(body: InboxBlock[]): QualifiedRecordRef[];
28
29
  /** Inbox's existing title policy, shared by full Records and immediate summaries. */
29
- export declare function inboxRecordTitle(entry: InboxRecord): string;
30
+ export declare function inboxRecordTitle(entry: InboxRecord, linkedTitle?: RecordDisplayLinkTitle): string;
30
31
  export declare function parseInboxRecords(value: unknown, maximumRecords?: number): InboxRecords;
@@ -4,8 +4,9 @@ type DisplayField = {
4
4
  readonly kind: string;
5
5
  readonly many: boolean;
6
6
  };
7
+ export type RecordDisplayLinkTitle = (ref: string) => string | undefined;
7
8
  type InvalidDisplay = (message: string) => never;
8
9
  export declare function parseRecordDisplay(value: unknown, definitions: readonly DisplayField[], fail?: InvalidDisplay): RecordDisplay | undefined;
9
10
  /** Resolve the schema-owned short presentation title without changing Record identity. */
10
- export declare function recordDisplayTitle(record: Record<string, unknown>, display?: Readonly<RecordDisplay>): string | undefined;
11
+ export declare function recordDisplayTitle(record: Record<string, unknown>, display: Readonly<RecordDisplay> | undefined, definitions: readonly DisplayField[], linkedTitle?: RecordDisplayLinkTitle): string | undefined;
11
12
  export {};
@@ -0,0 +1,6 @@
1
+ export type RecordLink = {
2
+ ref: string;
3
+ fragment?: string;
4
+ };
5
+ export declare function parseRecordLink(value: unknown): RecordLink | undefined;
6
+ export declare function parseStoredRecordLink(value: unknown): RecordLink | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oddington/sdk",
3
- "version": "0.1.78",
3
+ "version": "0.1.79",
4
4
  "description": "OS routine and response-handler SDK",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",