@dosgato/templating 0.0.114 → 0.0.116

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.
@@ -171,6 +171,12 @@ export interface APIDataTemplate<DataType extends DataData = any> extends APITem
171
171
  */
172
172
  validate?: (data: DataType, extras: DataExtras) => Promise<ValidationFeedback[]>;
173
173
  migrations?: DataMigration<DataType>[];
174
+ /**
175
+ * Mark this data type as inappropriate for sites. For example, if you have system-wide configuration
176
+ * stored in data, it may be confusing to see the site list when editing that data. Set this
177
+ * true to avoid showing the site list and stop allowing data of this type to be attached to sites.
178
+ */
179
+ global?: boolean;
174
180
  }
175
181
  export type APIAnyTemplate = APIComponentTemplate | APIPageTemplate | APIDataTemplate;
176
182
  /**
package/dist/links.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export interface AssetLink {
7
7
  type: 'asset';
8
- source: string;
8
+ source?: string;
9
9
  id: string;
10
10
  siteId?: string;
11
11
  path?: string;
@@ -18,7 +18,7 @@ export interface AssetLink {
18
18
  */
19
19
  export interface AssetFolderLink {
20
20
  type: 'assetfolder';
21
- source: string;
21
+ source?: string;
22
22
  id: string;
23
23
  siteId?: string;
24
24
  path: string;
package/dist/render.d.ts CHANGED
@@ -146,7 +146,9 @@ export interface APIClient {
146
146
  id?: string;
147
147
  path?: string;
148
148
  link?: string | PageLink;
149
- }) => Promise<PageRecord<PageData> | undefined>;
149
+ }) => Promise<PageRecord<PageData> & {
150
+ title: string;
151
+ } | undefined>;
150
152
  /** Get all ancestor pages of a specific page. First array element will be the pagetree root page. */
151
153
  getAncestors: ({ id, path }: {
152
154
  id?: string;
@@ -169,13 +171,13 @@ export interface APIClient {
169
171
  // If `undefined` you will get back a single element array that
170
172
  // references the `PageForNaviation` of the root page of the pageTree.
171
173
  beneath? string
172
-
174
+
173
175
  // Relative to `beneath` this controls how many levels deep to fetch past
174
176
  // the top level set of results in the array. 0 returns the top level only
175
177
  // while n > 0 traverses n levels of children deep past the top level
176
178
  // results. Leave `undefined` to fetch all.
177
179
  depth?: number
178
-
180
+
179
181
  // Set to true to filter for only pages that are published. Else the default
180
182
  // of false will automatically not filter unpublished pages when in edit or
181
183
  // preview mode but will filter if in published mode.
@@ -183,14 +185,14 @@ export interface APIClient {
183
185
  // If none of the pages in the current pageTree have been published and this is
184
186
  // set to `true` an error will be thrown as there will be no pages to return.
185
187
  published?: boolean
186
-
188
+
187
189
  // Array of strings that specify dot-separated object paths describing page
188
190
  // data not normally fetched within the PageForNavigation results. For example,
189
191
  // ['hideInNav'] would append the page record hideInNav value to the
190
192
  // `PageForNavigation.extra` property as its own sub-property `hideInNav` that
191
193
  // would normally be excluded from the `PageForNavigation` properties.
192
194
  extra?: string[]
193
-
195
+
194
196
  // Whether the href property in the returned records should be an absolute URL.
195
197
  absolute?: boolean
196
198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {