@uniformdev/canvas-next 19.135.1-alpha.10 → 19.135.1-alpha.11
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/dist/{models-IAhm-va2.d.mts → models-CupnCqnn.d.mts} +6 -1
- package/dist/{models-IAhm-va2.d.ts → models-CupnCqnn.d.ts} +6 -1
- package/dist/project-map/index.d.mts +27 -74
- package/dist/project-map/index.d.ts +27 -74
- package/dist/route/index.d.mts +18 -395
- package/dist/route/index.d.ts +18 -395
- package/dist/route/index.js +1 -2
- package/dist/route/index.mjs +1 -2
- package/dist/slug/index.d.mts +23 -52
- package/dist/slug/index.d.ts +23 -52
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RichTextRendererComponent, RenderRichTextComponentResolver, UniformRichText as UniformRichText$1, UniformRichTextNode as UniformRichTextNode$1 } from '@uniformdev/canvas-react';
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
-
export { U as UniformCompositionNextPage, c as UniformGetServerSideProps, b as UniformGetStaticProps, a as UniformPreviewData } from './models-
|
|
3
|
+
export { U as UniformCompositionNextPage, c as UniformGetServerSideProps, b as UniformGetStaticProps, a as UniformPreviewData } from './models-CupnCqnn.mjs';
|
|
4
4
|
import { NextApiHandler, NextApiRequest } from 'next';
|
|
5
5
|
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
6
6
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RichTextRendererComponent, RenderRichTextComponentResolver, UniformRichText as UniformRichText$1, UniformRichTextNode as UniformRichTextNode$1 } from '@uniformdev/canvas-react';
|
|
2
2
|
import { ParsedUrlQuery } from 'querystring';
|
|
3
|
-
export { U as UniformCompositionNextPage, c as UniformGetServerSideProps, b as UniformGetStaticProps, a as UniformPreviewData } from './models-
|
|
3
|
+
export { U as UniformCompositionNextPage, c as UniformGetServerSideProps, b as UniformGetStaticProps, a as UniformPreviewData } from './models-CupnCqnn.js';
|
|
4
4
|
import { NextApiHandler, NextApiRequest } from 'next';
|
|
5
5
|
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
6
6
|
|
package/dist/index.esm.js
CHANGED
|
@@ -125,7 +125,8 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
125
125
|
compositionSlug: slug,
|
|
126
126
|
compositionPath: path,
|
|
127
127
|
locale,
|
|
128
|
-
isPlayground
|
|
128
|
+
isPlayground,
|
|
129
|
+
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
132
|
// By default the preview cookies stays as long as the tab is open. And in contextual editing mode, people tend to open Canvas editor (one tab) and another tab to see published changes.
|
package/dist/index.js
CHANGED
|
@@ -167,7 +167,8 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
167
167
|
compositionSlug: slug,
|
|
168
168
|
compositionPath: path,
|
|
169
169
|
locale,
|
|
170
|
-
isPlayground
|
|
170
|
+
isPlayground,
|
|
171
|
+
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
171
172
|
},
|
|
172
173
|
{
|
|
173
174
|
// By default the preview cookies stays as long as the tab is open. And in contextual editing mode, people tend to open Canvas editor (one tab) and another tab to see published changes.
|
package/dist/index.mjs
CHANGED
|
@@ -125,7 +125,8 @@ var createPreviewHandlerGet = ({ secret, resolveFullPath = resolveFullPathDefaul
|
|
|
125
125
|
compositionSlug: slug,
|
|
126
126
|
compositionPath: path,
|
|
127
127
|
locale,
|
|
128
|
-
isPlayground
|
|
128
|
+
isPlayground,
|
|
129
|
+
patternType: !isPlayground ? void 0 : getQueryParam(req, "patternType")
|
|
129
130
|
},
|
|
130
131
|
{
|
|
131
132
|
// By default the preview cookies stays as long as the tab is open. And in contextual editing mode, people tend to open Canvas editor (one tab) and another tab to see published changes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
1
|
+
import { CompositionGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import { UniformCompositionProps } from '@uniformdev/canvas-react';
|
|
3
3
|
import { NextPage, PreviewData, GetStaticPropsContext, GetStaticPropsResult, GetServerSidePropsContext, GetServerSidePropsResult } from 'next';
|
|
4
4
|
import { ParsedUrlQuery } from 'querystring';
|
|
@@ -11,6 +11,11 @@ type UniformPreviewData = PreviewData & {
|
|
|
11
11
|
compositionPath?: string;
|
|
12
12
|
locale?: string;
|
|
13
13
|
isPlayground?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The type of pattern being previewed in Canvas editor. This value is only set when `isPlayground` is `true`.
|
|
16
|
+
* "component" for component patterns, and "composition" for composition patterns
|
|
17
|
+
*/
|
|
18
|
+
patternType?: Exclude<CompositionGetParameters['patternType'], 'all'>;
|
|
14
19
|
};
|
|
15
20
|
type UniformGetStaticProps<P extends {
|
|
16
21
|
[key: string]: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RootComponentInstance } from '@uniformdev/canvas';
|
|
1
|
+
import { CompositionGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
2
2
|
import { UniformCompositionProps } from '@uniformdev/canvas-react';
|
|
3
3
|
import { NextPage, PreviewData, GetStaticPropsContext, GetStaticPropsResult, GetServerSidePropsContext, GetServerSidePropsResult } from 'next';
|
|
4
4
|
import { ParsedUrlQuery } from 'querystring';
|
|
@@ -11,6 +11,11 @@ type UniformPreviewData = PreviewData & {
|
|
|
11
11
|
compositionPath?: string;
|
|
12
12
|
locale?: string;
|
|
13
13
|
isPlayground?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The type of pattern being previewed in Canvas editor. This value is only set when `isPlayground` is `true`.
|
|
16
|
+
* "component" for component patterns, and "composition" for composition patterns
|
|
17
|
+
*/
|
|
18
|
+
patternType?: Exclude<CompositionGetParameters['patternType'], 'all'>;
|
|
14
19
|
};
|
|
15
20
|
type UniformGetStaticProps<P extends {
|
|
16
21
|
[key: string]: any;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-
|
|
3
|
+
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-CupnCqnn.mjs';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
6
|
+
import { CanvasClient, CompositionGetByNodePathParameters, DataResolutionOption } from '@uniformdev/canvas';
|
|
7
|
+
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
9
8
|
import '@uniformdev/canvas-react';
|
|
10
9
|
|
|
11
10
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -14,69 +13,37 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
14
13
|
[key: string]: any;
|
|
15
14
|
}>(options?: {
|
|
16
15
|
/** If you need to override the default client, you can pass it here */
|
|
17
|
-
client?: CanvasClient
|
|
16
|
+
client?: CanvasClient;
|
|
18
17
|
/** A string that you want to strip from the resolved context.resolvedUrl. Useful when calling from a nested folder which is not part of your project map structure */
|
|
19
|
-
prefix?: string
|
|
18
|
+
prefix?: string;
|
|
20
19
|
/** Useful when you need to modify the path passed to the API */
|
|
21
|
-
modifyPath?: (
|
|
20
|
+
modifyPath?: (path: string, context: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>) => string;
|
|
22
21
|
/** Set to true if you want to include draft compositions */
|
|
23
|
-
preview?: boolean
|
|
24
|
-
projectMapId?: string
|
|
22
|
+
preview?: boolean;
|
|
23
|
+
projectMapId?: string;
|
|
25
24
|
/** Way to override getCompositionByNodePath request params */
|
|
26
|
-
requestOptions?: Omit<Partial<
|
|
27
|
-
versionId?: string | undefined;
|
|
28
|
-
skipEnhance?: boolean | undefined;
|
|
29
|
-
skipPatternResolution?: boolean | undefined;
|
|
30
|
-
skipOverridesResolution?: boolean | undefined;
|
|
31
|
-
state?: number | undefined;
|
|
32
|
-
withComponentIDs?: boolean | undefined;
|
|
33
|
-
withTotalCount?: boolean | undefined;
|
|
34
|
-
withUIStatus?: boolean | undefined;
|
|
35
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
36
|
-
withProjectMapNodes?: boolean | undefined;
|
|
37
|
-
withContentSourceMap?: boolean | undefined;
|
|
38
|
-
locale?: string | undefined;
|
|
39
|
-
releaseId?: string | undefined;
|
|
40
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "projectMapNodePath">> & _uniformdev_canvas.SpecificProjectMap & DataResolutionOption>, "state"> | undefined;
|
|
25
|
+
requestOptions?: Omit<Partial<CompositionGetByNodePathParameters & DataResolutionOption>, "state">;
|
|
41
26
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
42
|
-
callback?: UniformGetServerSideProps<TProps
|
|
27
|
+
callback?: UniformGetServerSideProps<TProps>;
|
|
43
28
|
/** Disables logging of response information and timings */
|
|
44
|
-
silent?: boolean
|
|
45
|
-
}
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
}) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
46
31
|
|
|
47
32
|
declare const withUniformGetStaticPaths: (options?: {
|
|
48
|
-
projectMapId?: string
|
|
33
|
+
projectMapId?: string;
|
|
49
34
|
/** Starting path to fetch nodes from */
|
|
50
|
-
rootPath?: string
|
|
35
|
+
rootPath?: string;
|
|
51
36
|
/** A string that you want prepended to paths returned by your project map. Useful when calling from a nested folder which is not part of your project map structure */
|
|
52
|
-
prefix?: string
|
|
37
|
+
prefix?: string;
|
|
53
38
|
/** Set to true if you want to include draft compositions */
|
|
54
|
-
preview?: boolean
|
|
39
|
+
preview?: boolean;
|
|
55
40
|
/** Way to override getNodes request params */
|
|
56
|
-
requestOptions?: Partial<
|
|
57
|
-
projectMapId?: string | undefined;
|
|
58
|
-
projectId: string;
|
|
59
|
-
releaseId?: string | undefined;
|
|
60
|
-
id?: string | undefined;
|
|
61
|
-
path?: string | undefined;
|
|
62
|
-
compositionId?: string | undefined;
|
|
63
|
-
limit?: number | undefined;
|
|
64
|
-
offset?: number | undefined;
|
|
65
|
-
depth?: number | undefined;
|
|
66
|
-
state?: number | undefined;
|
|
67
|
-
tree?: boolean | undefined;
|
|
68
|
-
search?: string | undefined;
|
|
69
|
-
includeAncestors?: boolean | undefined;
|
|
70
|
-
expanded?: boolean | undefined;
|
|
71
|
-
withCompositionData?: boolean | undefined;
|
|
72
|
-
withCompositionUIStatus?: boolean | undefined;
|
|
73
|
-
withRedirectData?: boolean | undefined;
|
|
74
|
-
}> | undefined;
|
|
41
|
+
requestOptions?: Partial<ProjectMapNodeGetRequest>;
|
|
75
42
|
/** Way to modify list of nodes before building array of paths */
|
|
76
|
-
callback?: (
|
|
43
|
+
callback?: (nodes: ProjectMapNodeGetResponse["nodes"]) => Promise<ProjectMapNodeGetResponse["nodes"]>;
|
|
77
44
|
/** If you need to override the default client, you can pass it here */
|
|
78
|
-
client?: ProjectMapClient
|
|
79
|
-
}
|
|
45
|
+
client?: ProjectMapClient;
|
|
46
|
+
}) => () => Promise<{
|
|
80
47
|
paths: string[] | undefined;
|
|
81
48
|
fallback: boolean;
|
|
82
49
|
}>;
|
|
@@ -86,35 +53,21 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
86
53
|
} = {
|
|
87
54
|
[key: string]: any;
|
|
88
55
|
}>(options: {
|
|
89
|
-
projectMapId?: string
|
|
56
|
+
projectMapId?: string;
|
|
90
57
|
/** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
|
|
91
58
|
param: string;
|
|
92
59
|
/** Useful when you need to modify the path passed to the API */
|
|
93
|
-
modifyPath?: (
|
|
60
|
+
modifyPath?: (path: string, context: GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
94
61
|
/** Set to true if you want to include draft compositions */
|
|
95
|
-
preview?: boolean
|
|
62
|
+
preview?: boolean;
|
|
96
63
|
/** If you need to override the default client, you can pass it here */
|
|
97
|
-
client?: CanvasClient
|
|
64
|
+
client?: CanvasClient;
|
|
98
65
|
/** Way to override getCompositionByNodePath request params */
|
|
99
|
-
requestOptions?: Omit<Partial<
|
|
100
|
-
versionId?: string | undefined;
|
|
101
|
-
skipEnhance?: boolean | undefined;
|
|
102
|
-
skipPatternResolution?: boolean | undefined;
|
|
103
|
-
skipOverridesResolution?: boolean | undefined;
|
|
104
|
-
state?: number | undefined;
|
|
105
|
-
withComponentIDs?: boolean | undefined;
|
|
106
|
-
withTotalCount?: boolean | undefined;
|
|
107
|
-
withUIStatus?: boolean | undefined;
|
|
108
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
109
|
-
withProjectMapNodes?: boolean | undefined;
|
|
110
|
-
withContentSourceMap?: boolean | undefined;
|
|
111
|
-
locale?: string | undefined;
|
|
112
|
-
releaseId?: string | undefined;
|
|
113
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "projectMapNodePath">> & _uniformdev_canvas.SpecificProjectMap & DataResolutionOption>, "state"> | undefined;
|
|
66
|
+
requestOptions?: Omit<Partial<CompositionGetByNodePathParameters & DataResolutionOption>, "state">;
|
|
114
67
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
115
|
-
callback?: UniformGetStaticProps<TProps
|
|
68
|
+
callback?: UniformGetStaticProps<TProps>;
|
|
116
69
|
/** Disables logging of response information and timings */
|
|
117
|
-
silent?: boolean
|
|
70
|
+
silent?: boolean;
|
|
118
71
|
}) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
119
72
|
|
|
120
73
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as next from 'next';
|
|
2
2
|
import { GetServerSidePropsContext, PreviewData, GetServerSideProps, GetStaticPropsContext, GetStaticProps } from 'next';
|
|
3
|
-
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-
|
|
3
|
+
import { c as UniformGetServerSideProps, a as UniformPreviewData, b as UniformGetStaticProps } from '../models-CupnCqnn.js';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
6
|
+
import { CanvasClient, CompositionGetByNodePathParameters, DataResolutionOption } from '@uniformdev/canvas';
|
|
7
|
+
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
9
8
|
import '@uniformdev/canvas-react';
|
|
10
9
|
|
|
11
10
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -14,69 +13,37 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
14
13
|
[key: string]: any;
|
|
15
14
|
}>(options?: {
|
|
16
15
|
/** If you need to override the default client, you can pass it here */
|
|
17
|
-
client?: CanvasClient
|
|
16
|
+
client?: CanvasClient;
|
|
18
17
|
/** A string that you want to strip from the resolved context.resolvedUrl. Useful when calling from a nested folder which is not part of your project map structure */
|
|
19
|
-
prefix?: string
|
|
18
|
+
prefix?: string;
|
|
20
19
|
/** Useful when you need to modify the path passed to the API */
|
|
21
|
-
modifyPath?: (
|
|
20
|
+
modifyPath?: (path: string, context: GetServerSidePropsContext<ParsedUrlQuery, PreviewData>) => string;
|
|
22
21
|
/** Set to true if you want to include draft compositions */
|
|
23
|
-
preview?: boolean
|
|
24
|
-
projectMapId?: string
|
|
22
|
+
preview?: boolean;
|
|
23
|
+
projectMapId?: string;
|
|
25
24
|
/** Way to override getCompositionByNodePath request params */
|
|
26
|
-
requestOptions?: Omit<Partial<
|
|
27
|
-
versionId?: string | undefined;
|
|
28
|
-
skipEnhance?: boolean | undefined;
|
|
29
|
-
skipPatternResolution?: boolean | undefined;
|
|
30
|
-
skipOverridesResolution?: boolean | undefined;
|
|
31
|
-
state?: number | undefined;
|
|
32
|
-
withComponentIDs?: boolean | undefined;
|
|
33
|
-
withTotalCount?: boolean | undefined;
|
|
34
|
-
withUIStatus?: boolean | undefined;
|
|
35
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
36
|
-
withProjectMapNodes?: boolean | undefined;
|
|
37
|
-
withContentSourceMap?: boolean | undefined;
|
|
38
|
-
locale?: string | undefined;
|
|
39
|
-
releaseId?: string | undefined;
|
|
40
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "projectMapNodePath">> & _uniformdev_canvas.SpecificProjectMap & DataResolutionOption>, "state"> | undefined;
|
|
25
|
+
requestOptions?: Omit<Partial<CompositionGetByNodePathParameters & DataResolutionOption>, "state">;
|
|
41
26
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
42
|
-
callback?: UniformGetServerSideProps<TProps
|
|
27
|
+
callback?: UniformGetServerSideProps<TProps>;
|
|
43
28
|
/** Disables logging of response information and timings */
|
|
44
|
-
silent?: boolean
|
|
45
|
-
}
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
}) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
46
31
|
|
|
47
32
|
declare const withUniformGetStaticPaths: (options?: {
|
|
48
|
-
projectMapId?: string
|
|
33
|
+
projectMapId?: string;
|
|
49
34
|
/** Starting path to fetch nodes from */
|
|
50
|
-
rootPath?: string
|
|
35
|
+
rootPath?: string;
|
|
51
36
|
/** A string that you want prepended to paths returned by your project map. Useful when calling from a nested folder which is not part of your project map structure */
|
|
52
|
-
prefix?: string
|
|
37
|
+
prefix?: string;
|
|
53
38
|
/** Set to true if you want to include draft compositions */
|
|
54
|
-
preview?: boolean
|
|
39
|
+
preview?: boolean;
|
|
55
40
|
/** Way to override getNodes request params */
|
|
56
|
-
requestOptions?: Partial<
|
|
57
|
-
projectMapId?: string | undefined;
|
|
58
|
-
projectId: string;
|
|
59
|
-
releaseId?: string | undefined;
|
|
60
|
-
id?: string | undefined;
|
|
61
|
-
path?: string | undefined;
|
|
62
|
-
compositionId?: string | undefined;
|
|
63
|
-
limit?: number | undefined;
|
|
64
|
-
offset?: number | undefined;
|
|
65
|
-
depth?: number | undefined;
|
|
66
|
-
state?: number | undefined;
|
|
67
|
-
tree?: boolean | undefined;
|
|
68
|
-
search?: string | undefined;
|
|
69
|
-
includeAncestors?: boolean | undefined;
|
|
70
|
-
expanded?: boolean | undefined;
|
|
71
|
-
withCompositionData?: boolean | undefined;
|
|
72
|
-
withCompositionUIStatus?: boolean | undefined;
|
|
73
|
-
withRedirectData?: boolean | undefined;
|
|
74
|
-
}> | undefined;
|
|
41
|
+
requestOptions?: Partial<ProjectMapNodeGetRequest>;
|
|
75
42
|
/** Way to modify list of nodes before building array of paths */
|
|
76
|
-
callback?: (
|
|
43
|
+
callback?: (nodes: ProjectMapNodeGetResponse["nodes"]) => Promise<ProjectMapNodeGetResponse["nodes"]>;
|
|
77
44
|
/** If you need to override the default client, you can pass it here */
|
|
78
|
-
client?: ProjectMapClient
|
|
79
|
-
}
|
|
45
|
+
client?: ProjectMapClient;
|
|
46
|
+
}) => () => Promise<{
|
|
80
47
|
paths: string[] | undefined;
|
|
81
48
|
fallback: boolean;
|
|
82
49
|
}>;
|
|
@@ -86,35 +53,21 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
86
53
|
} = {
|
|
87
54
|
[key: string]: any;
|
|
88
55
|
}>(options: {
|
|
89
|
-
projectMapId?: string
|
|
56
|
+
projectMapId?: string;
|
|
90
57
|
/** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
|
|
91
58
|
param: string;
|
|
92
59
|
/** Useful when you need to modify the path passed to the API */
|
|
93
|
-
modifyPath?: (
|
|
60
|
+
modifyPath?: (path: string, context: GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
94
61
|
/** Set to true if you want to include draft compositions */
|
|
95
|
-
preview?: boolean
|
|
62
|
+
preview?: boolean;
|
|
96
63
|
/** If you need to override the default client, you can pass it here */
|
|
97
|
-
client?: CanvasClient
|
|
64
|
+
client?: CanvasClient;
|
|
98
65
|
/** Way to override getCompositionByNodePath request params */
|
|
99
|
-
requestOptions?: Omit<Partial<
|
|
100
|
-
versionId?: string | undefined;
|
|
101
|
-
skipEnhance?: boolean | undefined;
|
|
102
|
-
skipPatternResolution?: boolean | undefined;
|
|
103
|
-
skipOverridesResolution?: boolean | undefined;
|
|
104
|
-
state?: number | undefined;
|
|
105
|
-
withComponentIDs?: boolean | undefined;
|
|
106
|
-
withTotalCount?: boolean | undefined;
|
|
107
|
-
withUIStatus?: boolean | undefined;
|
|
108
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
109
|
-
withProjectMapNodes?: boolean | undefined;
|
|
110
|
-
withContentSourceMap?: boolean | undefined;
|
|
111
|
-
locale?: string | undefined;
|
|
112
|
-
releaseId?: string | undefined;
|
|
113
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "projectMapNodePath">> & _uniformdev_canvas.SpecificProjectMap & DataResolutionOption>, "state"> | undefined;
|
|
66
|
+
requestOptions?: Omit<Partial<CompositionGetByNodePathParameters & DataResolutionOption>, "state">;
|
|
114
67
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
115
|
-
callback?: UniformGetStaticProps<TProps
|
|
68
|
+
callback?: UniformGetStaticProps<TProps>;
|
|
116
69
|
/** Disables logging of response information and timings */
|
|
117
|
-
silent?: boolean
|
|
70
|
+
silent?: boolean;
|
|
118
71
|
}) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
119
72
|
|
|
120
73
|
declare const getServerSideProps: next.GetServerSideProps<{
|