@dosgato/templating 0.0.43 → 0.0.44

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.
Files changed (2) hide show
  1. package/dist/render.d.ts +7 -6
  2. package/package.json +1 -1
package/dist/render.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ContextBase, DataData, PageData, PageRecord } from './component.js';
2
- import { AssetLink, DataFolderLink, DataLink, LinkDefinition } from './links.js';
2
+ import { AssetLink, DataFolderLink, DataLink, LinkDefinition, PageLink } from './links.js';
3
3
  export declare function printHeader(ctx: ContextBase, content: string): string;
4
4
  export declare function advanceHeader(ctx: ContextBase, content?: string): {
5
5
  headerLevel: number;
@@ -69,20 +69,21 @@ export interface APIClient {
69
69
  *
70
70
  * Will be dataloaded.
71
71
  */
72
- getPageData: ({ id, path }: {
72
+ getPage: ({ id, path, link }: {
73
73
  id?: string;
74
74
  path?: string;
75
- }) => Promise<PageData>;
75
+ link?: string | PageLink;
76
+ }) => Promise<PageRecord<PageData>>;
76
77
  /** Get all ancestor pages of a specific page. First array element will be the pagetree root page. */
77
78
  getAncestors: ({ id, path }: {
78
79
  id?: string;
79
80
  path?: string;
80
- }) => Promise<PageRecord[]>;
81
+ }) => Promise<PageRecord<PageData>[]>;
81
82
  /** Get the pagetree root page from which the specified page descends. */
82
- getRootPageData: ({ id, path }: {
83
+ getRootPage: ({ id, path }: {
83
84
  id?: string;
84
85
  path?: string;
85
- }) => Promise<PageData>;
86
+ }) => Promise<PageRecord<PageData>>;
86
87
  /**
87
88
  * Get data entries by link or folder link
88
89
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.43",
3
+ "version": "0.0.44",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {