@dosgato/templating 0.0.47 → 0.0.50
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/dist/apitemplate.d.ts +4 -4
- package/dist/links.d.ts +11 -0
- package/dist/render.d.ts +4 -1
- package/package.json +1 -1
package/dist/apitemplate.d.ts
CHANGED
|
@@ -20,10 +20,10 @@ export interface ValidationFeedback {
|
|
|
20
20
|
export interface PageExtras {
|
|
21
21
|
/** A function for executing a graphql query to acquire more information than is already at hand. */
|
|
22
22
|
query: GraphQLQueryFn;
|
|
23
|
-
/** The site id in which the page lives or is being created. */
|
|
24
|
-
siteId
|
|
25
|
-
/** The pagetree id in which the page lives or is being created. */
|
|
26
|
-
pagetreeId
|
|
23
|
+
/** The site id in which the page lives or is being created. Null if we are validating creation of a site. */
|
|
24
|
+
siteId?: string;
|
|
25
|
+
/** The pagetree id in which the page lives or is being created. Null if we are validating creation of a site or pagetree. */
|
|
26
|
+
pagetreeId?: string;
|
|
27
27
|
/** The page id of the page's parent or parent-to-be. Null if it is the root page of a pagetree. */
|
|
28
28
|
parentId?: string;
|
|
29
29
|
/** The page's id, presumably to be used in graphql queries. NOTE: will be null during page creation. */
|
package/dist/links.d.ts
CHANGED
|
@@ -26,9 +26,20 @@ export interface AssetFolderLink {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface PageLink {
|
|
28
28
|
type: 'page';
|
|
29
|
+
siteId: string;
|
|
29
30
|
linkId: string;
|
|
30
31
|
path: string;
|
|
31
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* When looking up a page by linkId, the context matters. For instance, if I'm
|
|
35
|
+
* gathering data to helps render a page that's in the same site as the target
|
|
36
|
+
* page, I want to be sure to get the version of the page from the same pagetree.
|
|
37
|
+
*/
|
|
38
|
+
export interface PageLinkWithContext extends PageLink {
|
|
39
|
+
context?: {
|
|
40
|
+
pagetreeId: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
32
43
|
/**
|
|
33
44
|
* The link format for external webpages. This format seems a little extra since
|
|
34
45
|
* it's just a URL string. Why does it need to be an object with a type? However,
|
package/dist/render.d.ts
CHANGED
|
@@ -46,7 +46,10 @@ export interface APIClient {
|
|
|
46
46
|
* method to convert a link, as input by a user, into a URL suitable for an href, or optionally
|
|
47
47
|
* an absolute URL suitable for a backend http request or non-HTML document like an RSS feed.
|
|
48
48
|
*/
|
|
49
|
-
resolveLink: (
|
|
49
|
+
resolveLink: (lnk: string | LinkDefinition, opts?: {
|
|
50
|
+
absolute?: boolean;
|
|
51
|
+
extension?: string;
|
|
52
|
+
}) => Promise<string>;
|
|
50
53
|
/**
|
|
51
54
|
* This function will be provided by the rendering server and should be used inside your fetch
|
|
52
55
|
* method to prepare editor-provided HTML for rendering. It will do things like find and resolve
|