@uniformdev/canvas-next 19.179.1-alpha.1 → 19.180.0
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/project-map/index.d.mts +26 -73
- package/dist/project-map/index.d.ts +26 -73
- package/dist/route/index.d.mts +17 -402
- package/dist/route/index.d.ts +17 -402
- package/dist/slug/index.d.mts +22 -51
- package/dist/slug/index.d.ts +22 -51
- package/package.json +10 -10
package/dist/route/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import { GetServerSidePropsContext, GetServerSidePropsResult, GetServerSideProps
|
|
|
3
3
|
import { a as UniformPreviewData } from '../models-CupnCqnn.js';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
+
import * as _uniformdev_canvas from '@uniformdev/canvas';
|
|
6
7
|
import { RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, RouteClient, RouteGetParameters, RootComponentInstance } from '@uniformdev/canvas';
|
|
7
|
-
import { ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
|
+
import { ProjectMapNodeGetRequest, ProjectMapNodeGetResponse, ProjectMapClient } from '@uniformdev/project-map';
|
|
8
9
|
import { RedirectClient } from '@uniformdev/redirect';
|
|
9
10
|
import { GetStaticPropsContext as GetStaticPropsContext$1, GetServerSidePropsContext as GetServerSidePropsContext$1 } from 'next/types';
|
|
10
11
|
import '@uniformdev/canvas-react';
|
|
@@ -45,43 +46,25 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
45
46
|
[key: string]: any;
|
|
46
47
|
} = {
|
|
47
48
|
data: RootComponentInstance;
|
|
48
|
-
}>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>
|
|
49
|
+
}>(options?: RouteHandlerOptions<GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>, GetServerSidePropsResult<never>, GetServerSidePropsResult<TProps>>) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
49
50
|
|
|
50
51
|
declare const withUniformGetStaticPaths: (options?: {
|
|
51
|
-
projectMapId?: string
|
|
52
|
+
projectMapId?: string;
|
|
52
53
|
/** Starting path to fetch nodes from */
|
|
53
|
-
rootPath?: string
|
|
54
|
+
rootPath?: string;
|
|
54
55
|
/** 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 */
|
|
55
|
-
prefix?: string
|
|
56
|
+
prefix?: string;
|
|
56
57
|
/** Set to true if you want to include draft compositions */
|
|
57
|
-
preview?: boolean
|
|
58
|
+
preview?: boolean;
|
|
58
59
|
/** Way to override getNodes request params */
|
|
59
|
-
requestOptions?: Partial<
|
|
60
|
-
projectMapId?: string | undefined;
|
|
61
|
-
projectId: string;
|
|
62
|
-
releaseId?: string | undefined;
|
|
63
|
-
id?: string | undefined;
|
|
64
|
-
path?: string | undefined;
|
|
65
|
-
compositionId?: string | undefined;
|
|
66
|
-
limit?: number | undefined;
|
|
67
|
-
offset?: number | undefined;
|
|
68
|
-
depth?: number | undefined;
|
|
69
|
-
state?: number | undefined;
|
|
70
|
-
tree?: boolean | undefined;
|
|
71
|
-
search?: string | undefined;
|
|
72
|
-
includeAncestors?: boolean | undefined;
|
|
73
|
-
expanded?: boolean | undefined;
|
|
74
|
-
withCompositionData?: boolean | undefined;
|
|
75
|
-
withCompositionUIStatus?: boolean | undefined;
|
|
76
|
-
withRedirectData?: boolean | undefined;
|
|
77
|
-
}> | undefined;
|
|
60
|
+
requestOptions?: Partial<ProjectMapNodeGetRequest>;
|
|
78
61
|
/** Way to modify list of nodes before building array of paths */
|
|
79
|
-
callback?: (
|
|
62
|
+
callback?: (nodes: ProjectMapNodeGetResponse["nodes"]) => Promise<ProjectMapNodeGetResponse["nodes"]>;
|
|
80
63
|
/** If you need to override the default client, you can pass it here */
|
|
81
|
-
client?: ProjectMapClient
|
|
64
|
+
client?: ProjectMapClient;
|
|
82
65
|
/** If you need to override the default redirect client, you can pass it here */
|
|
83
|
-
redirectClient?: RedirectClient
|
|
84
|
-
}
|
|
66
|
+
redirectClient?: RedirectClient;
|
|
67
|
+
}) => () => Promise<{
|
|
85
68
|
paths: string[];
|
|
86
69
|
fallback: boolean;
|
|
87
70
|
}>;
|
|
@@ -95,10 +78,10 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
95
78
|
[key: string]: any;
|
|
96
79
|
} = {
|
|
97
80
|
data: RootComponentInstance;
|
|
98
|
-
}>(options?:
|
|
81
|
+
}>(options?: RouteHandlerOptions<GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>, GetStaticPropsResult<never>, GetStaticPropsResult<TProps>> & {
|
|
99
82
|
/** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
|
|
100
|
-
param?: string
|
|
101
|
-
})
|
|
83
|
+
param?: string;
|
|
84
|
+
}) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
102
85
|
|
|
103
86
|
/**
|
|
104
87
|
* Prepends correct locale to the path before sending it to Uniform Route API.
|
|
@@ -117,191 +100,7 @@ declare const prependLocale: (path: string, { locale, defaultLocale, locales }:
|
|
|
117
100
|
* export getServerSideProps = withUniformGetServerSideProps({ ... });
|
|
118
101
|
*/
|
|
119
102
|
declare const getServerSideProps: next.GetServerSideProps<{
|
|
120
|
-
data:
|
|
121
|
-
type: string;
|
|
122
|
-
parameters?: {
|
|
123
|
-
[key: string]: {
|
|
124
|
-
value?: unknown;
|
|
125
|
-
type: string;
|
|
126
|
-
connectedData?: {
|
|
127
|
-
pointer: string;
|
|
128
|
-
syntax: "jptr";
|
|
129
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
130
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
131
|
-
failureDefault?: string | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
locales?: {
|
|
134
|
-
[key: string]: unknown;
|
|
135
|
-
} | undefined;
|
|
136
|
-
};
|
|
137
|
-
} | undefined;
|
|
138
|
-
variant?: string | undefined;
|
|
139
|
-
projectMapNodes?: {
|
|
140
|
-
id: string;
|
|
141
|
-
path: string;
|
|
142
|
-
projectMapId: string;
|
|
143
|
-
data?: {
|
|
144
|
-
isSearchHit?: boolean | undefined;
|
|
145
|
-
queryStrings?: {
|
|
146
|
-
name: string;
|
|
147
|
-
value?: string | undefined;
|
|
148
|
-
helpText?: string | undefined;
|
|
149
|
-
}[] | undefined;
|
|
150
|
-
previewValue?: string | undefined;
|
|
151
|
-
} | undefined;
|
|
152
|
-
locales?: {
|
|
153
|
-
[key: string]: {
|
|
154
|
-
path: string;
|
|
155
|
-
inherited: boolean;
|
|
156
|
-
};
|
|
157
|
-
} | undefined;
|
|
158
|
-
}[] | undefined;
|
|
159
|
-
slots?: {
|
|
160
|
-
[key: string]: {
|
|
161
|
-
type: string;
|
|
162
|
-
parameters?: {
|
|
163
|
-
[key: string]: {
|
|
164
|
-
value?: unknown;
|
|
165
|
-
type: string;
|
|
166
|
-
connectedData?: {
|
|
167
|
-
pointer: string;
|
|
168
|
-
syntax: "jptr";
|
|
169
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
170
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
171
|
-
failureDefault?: string | undefined;
|
|
172
|
-
} | undefined;
|
|
173
|
-
locales?: {
|
|
174
|
-
[key: string]: unknown;
|
|
175
|
-
} | undefined;
|
|
176
|
-
};
|
|
177
|
-
} | undefined;
|
|
178
|
-
variant?: string | undefined;
|
|
179
|
-
slots?: {
|
|
180
|
-
[key: string]: any[];
|
|
181
|
-
} | undefined;
|
|
182
|
-
_id?: string | undefined;
|
|
183
|
-
_pattern?: string | undefined;
|
|
184
|
-
_dataResources?: {
|
|
185
|
-
[key: string]: {
|
|
186
|
-
type: string;
|
|
187
|
-
isPatternParameter?: boolean | undefined;
|
|
188
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
189
|
-
optionalPatternParameter?: boolean | undefined;
|
|
190
|
-
variables?: {
|
|
191
|
-
[key: string]: string;
|
|
192
|
-
} | undefined;
|
|
193
|
-
};
|
|
194
|
-
} | undefined;
|
|
195
|
-
_patternDataResources?: {
|
|
196
|
-
[key: string]: {
|
|
197
|
-
type: string;
|
|
198
|
-
isPatternParameter?: boolean | undefined;
|
|
199
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
200
|
-
optionalPatternParameter?: boolean | undefined;
|
|
201
|
-
variables?: {
|
|
202
|
-
[key: string]: string;
|
|
203
|
-
} | undefined;
|
|
204
|
-
};
|
|
205
|
-
} | undefined;
|
|
206
|
-
_patternError?: "NOTFOUND" | "CYCLIC" | undefined;
|
|
207
|
-
_overrides?: {
|
|
208
|
-
[key: string]: {
|
|
209
|
-
parameters?: {
|
|
210
|
-
[key: string]: {
|
|
211
|
-
value?: unknown;
|
|
212
|
-
type: string;
|
|
213
|
-
connectedData?: {
|
|
214
|
-
pointer: string;
|
|
215
|
-
syntax: "jptr";
|
|
216
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
217
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
218
|
-
failureDefault?: string | undefined;
|
|
219
|
-
} | undefined;
|
|
220
|
-
locales?: {
|
|
221
|
-
[key: string]: unknown;
|
|
222
|
-
} | undefined;
|
|
223
|
-
};
|
|
224
|
-
} | undefined;
|
|
225
|
-
slots?: {
|
|
226
|
-
[key: string]: any[];
|
|
227
|
-
} | undefined;
|
|
228
|
-
variant?: string | undefined;
|
|
229
|
-
};
|
|
230
|
-
} | undefined;
|
|
231
|
-
_overridability?: {
|
|
232
|
-
parameters?: {
|
|
233
|
-
[key: string]: "yes" | "no";
|
|
234
|
-
} | undefined;
|
|
235
|
-
variants?: boolean | undefined;
|
|
236
|
-
hideLockedParameters?: boolean | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
_locales?: string[] | undefined;
|
|
239
|
-
}[];
|
|
240
|
-
} | undefined;
|
|
241
|
-
_id: string;
|
|
242
|
-
_slug?: string | null | undefined;
|
|
243
|
-
_name: string;
|
|
244
|
-
_author?: string | undefined;
|
|
245
|
-
_authorSubject?: string | undefined;
|
|
246
|
-
_creator?: string | undefined;
|
|
247
|
-
_creatorSubject?: string | undefined;
|
|
248
|
-
_pattern?: string | undefined;
|
|
249
|
-
_patternDataResources?: {
|
|
250
|
-
[key: string]: {
|
|
251
|
-
type: string;
|
|
252
|
-
isPatternParameter?: boolean | undefined;
|
|
253
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
254
|
-
optionalPatternParameter?: boolean | undefined;
|
|
255
|
-
variables?: {
|
|
256
|
-
[key: string]: string;
|
|
257
|
-
} | undefined;
|
|
258
|
-
};
|
|
259
|
-
} | undefined;
|
|
260
|
-
_dataResources?: {
|
|
261
|
-
[key: string]: {
|
|
262
|
-
type: string;
|
|
263
|
-
isPatternParameter?: boolean | undefined;
|
|
264
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
265
|
-
optionalPatternParameter?: boolean | undefined;
|
|
266
|
-
variables?: {
|
|
267
|
-
[key: string]: string;
|
|
268
|
-
} | undefined;
|
|
269
|
-
};
|
|
270
|
-
} | undefined;
|
|
271
|
-
_patternError?: "NOTFOUND" | "CYCLIC" | undefined;
|
|
272
|
-
_overrides?: {
|
|
273
|
-
[key: string]: {
|
|
274
|
-
parameters?: {
|
|
275
|
-
[key: string]: {
|
|
276
|
-
value?: unknown;
|
|
277
|
-
type: string;
|
|
278
|
-
connectedData?: {
|
|
279
|
-
pointer: string;
|
|
280
|
-
syntax: "jptr";
|
|
281
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
282
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
283
|
-
failureDefault?: string | undefined;
|
|
284
|
-
} | undefined;
|
|
285
|
-
locales?: {
|
|
286
|
-
[key: string]: unknown;
|
|
287
|
-
} | undefined;
|
|
288
|
-
};
|
|
289
|
-
} | undefined;
|
|
290
|
-
slots?: {
|
|
291
|
-
[key: string]: any[];
|
|
292
|
-
} | undefined;
|
|
293
|
-
variant?: string | undefined;
|
|
294
|
-
};
|
|
295
|
-
} | undefined;
|
|
296
|
-
_overridability?: {
|
|
297
|
-
parameters?: {
|
|
298
|
-
[key: string]: "yes" | "no";
|
|
299
|
-
} | undefined;
|
|
300
|
-
variants?: boolean | undefined;
|
|
301
|
-
hideLockedParameters?: boolean | undefined;
|
|
302
|
-
} | undefined;
|
|
303
|
-
_locales?: string[] | undefined;
|
|
304
|
-
};
|
|
103
|
+
data: _uniformdev_canvas.RootComponentInstance;
|
|
305
104
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
306
105
|
/**
|
|
307
106
|
* Default implementation of getStaticProps with routes
|
|
@@ -309,191 +108,7 @@ declare const getServerSideProps: next.GetServerSideProps<{
|
|
|
309
108
|
* export getStaticProps = withUniformGetStaticProps({ ... });
|
|
310
109
|
*/
|
|
311
110
|
declare const getStaticProps: next.GetStaticProps<{
|
|
312
|
-
data:
|
|
313
|
-
type: string;
|
|
314
|
-
parameters?: {
|
|
315
|
-
[key: string]: {
|
|
316
|
-
value?: unknown;
|
|
317
|
-
type: string;
|
|
318
|
-
connectedData?: {
|
|
319
|
-
pointer: string;
|
|
320
|
-
syntax: "jptr";
|
|
321
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
322
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
323
|
-
failureDefault?: string | undefined;
|
|
324
|
-
} | undefined;
|
|
325
|
-
locales?: {
|
|
326
|
-
[key: string]: unknown;
|
|
327
|
-
} | undefined;
|
|
328
|
-
};
|
|
329
|
-
} | undefined;
|
|
330
|
-
variant?: string | undefined;
|
|
331
|
-
projectMapNodes?: {
|
|
332
|
-
id: string;
|
|
333
|
-
path: string;
|
|
334
|
-
projectMapId: string;
|
|
335
|
-
data?: {
|
|
336
|
-
isSearchHit?: boolean | undefined;
|
|
337
|
-
queryStrings?: {
|
|
338
|
-
name: string;
|
|
339
|
-
value?: string | undefined;
|
|
340
|
-
helpText?: string | undefined;
|
|
341
|
-
}[] | undefined;
|
|
342
|
-
previewValue?: string | undefined;
|
|
343
|
-
} | undefined;
|
|
344
|
-
locales?: {
|
|
345
|
-
[key: string]: {
|
|
346
|
-
path: string;
|
|
347
|
-
inherited: boolean;
|
|
348
|
-
};
|
|
349
|
-
} | undefined;
|
|
350
|
-
}[] | undefined;
|
|
351
|
-
slots?: {
|
|
352
|
-
[key: string]: {
|
|
353
|
-
type: string;
|
|
354
|
-
parameters?: {
|
|
355
|
-
[key: string]: {
|
|
356
|
-
value?: unknown;
|
|
357
|
-
type: string;
|
|
358
|
-
connectedData?: {
|
|
359
|
-
pointer: string;
|
|
360
|
-
syntax: "jptr";
|
|
361
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
362
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
363
|
-
failureDefault?: string | undefined;
|
|
364
|
-
} | undefined;
|
|
365
|
-
locales?: {
|
|
366
|
-
[key: string]: unknown;
|
|
367
|
-
} | undefined;
|
|
368
|
-
};
|
|
369
|
-
} | undefined;
|
|
370
|
-
variant?: string | undefined;
|
|
371
|
-
slots?: {
|
|
372
|
-
[key: string]: any[];
|
|
373
|
-
} | undefined;
|
|
374
|
-
_id?: string | undefined;
|
|
375
|
-
_pattern?: string | undefined;
|
|
376
|
-
_dataResources?: {
|
|
377
|
-
[key: string]: {
|
|
378
|
-
type: string;
|
|
379
|
-
isPatternParameter?: boolean | undefined;
|
|
380
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
381
|
-
optionalPatternParameter?: boolean | undefined;
|
|
382
|
-
variables?: {
|
|
383
|
-
[key: string]: string;
|
|
384
|
-
} | undefined;
|
|
385
|
-
};
|
|
386
|
-
} | undefined;
|
|
387
|
-
_patternDataResources?: {
|
|
388
|
-
[key: string]: {
|
|
389
|
-
type: string;
|
|
390
|
-
isPatternParameter?: boolean | undefined;
|
|
391
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
392
|
-
optionalPatternParameter?: boolean | undefined;
|
|
393
|
-
variables?: {
|
|
394
|
-
[key: string]: string;
|
|
395
|
-
} | undefined;
|
|
396
|
-
};
|
|
397
|
-
} | undefined;
|
|
398
|
-
_patternError?: "NOTFOUND" | "CYCLIC" | undefined;
|
|
399
|
-
_overrides?: {
|
|
400
|
-
[key: string]: {
|
|
401
|
-
parameters?: {
|
|
402
|
-
[key: string]: {
|
|
403
|
-
value?: unknown;
|
|
404
|
-
type: string;
|
|
405
|
-
connectedData?: {
|
|
406
|
-
pointer: string;
|
|
407
|
-
syntax: "jptr";
|
|
408
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
409
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
410
|
-
failureDefault?: string | undefined;
|
|
411
|
-
} | undefined;
|
|
412
|
-
locales?: {
|
|
413
|
-
[key: string]: unknown;
|
|
414
|
-
} | undefined;
|
|
415
|
-
};
|
|
416
|
-
} | undefined;
|
|
417
|
-
slots?: {
|
|
418
|
-
[key: string]: any[];
|
|
419
|
-
} | undefined;
|
|
420
|
-
variant?: string | undefined;
|
|
421
|
-
};
|
|
422
|
-
} | undefined;
|
|
423
|
-
_overridability?: {
|
|
424
|
-
parameters?: {
|
|
425
|
-
[key: string]: "yes" | "no";
|
|
426
|
-
} | undefined;
|
|
427
|
-
variants?: boolean | undefined;
|
|
428
|
-
hideLockedParameters?: boolean | undefined;
|
|
429
|
-
} | undefined;
|
|
430
|
-
_locales?: string[] | undefined;
|
|
431
|
-
}[];
|
|
432
|
-
} | undefined;
|
|
433
|
-
_id: string;
|
|
434
|
-
_slug?: string | null | undefined;
|
|
435
|
-
_name: string;
|
|
436
|
-
_author?: string | undefined;
|
|
437
|
-
_authorSubject?: string | undefined;
|
|
438
|
-
_creator?: string | undefined;
|
|
439
|
-
_creatorSubject?: string | undefined;
|
|
440
|
-
_pattern?: string | undefined;
|
|
441
|
-
_patternDataResources?: {
|
|
442
|
-
[key: string]: {
|
|
443
|
-
type: string;
|
|
444
|
-
isPatternParameter?: boolean | undefined;
|
|
445
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
446
|
-
optionalPatternParameter?: boolean | undefined;
|
|
447
|
-
variables?: {
|
|
448
|
-
[key: string]: string;
|
|
449
|
-
} | undefined;
|
|
450
|
-
};
|
|
451
|
-
} | undefined;
|
|
452
|
-
_dataResources?: {
|
|
453
|
-
[key: string]: {
|
|
454
|
-
type: string;
|
|
455
|
-
isPatternParameter?: boolean | undefined;
|
|
456
|
-
ignorePatternParameterDefault?: boolean | undefined;
|
|
457
|
-
optionalPatternParameter?: boolean | undefined;
|
|
458
|
-
variables?: {
|
|
459
|
-
[key: string]: string;
|
|
460
|
-
} | undefined;
|
|
461
|
-
};
|
|
462
|
-
} | undefined;
|
|
463
|
-
_patternError?: "NOTFOUND" | "CYCLIC" | undefined;
|
|
464
|
-
_overrides?: {
|
|
465
|
-
[key: string]: {
|
|
466
|
-
parameters?: {
|
|
467
|
-
[key: string]: {
|
|
468
|
-
value?: unknown;
|
|
469
|
-
type: string;
|
|
470
|
-
connectedData?: {
|
|
471
|
-
pointer: string;
|
|
472
|
-
syntax: "jptr";
|
|
473
|
-
failureAction?: "t" | "p" | "c" | "a" | undefined;
|
|
474
|
-
failureLogLevel?: "e" | "w" | "i" | undefined;
|
|
475
|
-
failureDefault?: string | undefined;
|
|
476
|
-
} | undefined;
|
|
477
|
-
locales?: {
|
|
478
|
-
[key: string]: unknown;
|
|
479
|
-
} | undefined;
|
|
480
|
-
};
|
|
481
|
-
} | undefined;
|
|
482
|
-
slots?: {
|
|
483
|
-
[key: string]: any[];
|
|
484
|
-
} | undefined;
|
|
485
|
-
variant?: string | undefined;
|
|
486
|
-
};
|
|
487
|
-
} | undefined;
|
|
488
|
-
_overridability?: {
|
|
489
|
-
parameters?: {
|
|
490
|
-
[key: string]: "yes" | "no";
|
|
491
|
-
} | undefined;
|
|
492
|
-
variants?: boolean | undefined;
|
|
493
|
-
hideLockedParameters?: boolean | undefined;
|
|
494
|
-
} | undefined;
|
|
495
|
-
_locales?: string[] | undefined;
|
|
496
|
-
};
|
|
111
|
+
data: _uniformdev_canvas.RootComponentInstance;
|
|
497
112
|
}, querystring.ParsedUrlQuery, UniformPreviewData>;
|
|
498
113
|
/**
|
|
499
114
|
* Default implementation of getStaticPaths with routes
|
package/dist/slug/index.d.mts
CHANGED
|
@@ -3,8 +3,7 @@ import { GetServerSidePropsContext, GetServerSideProps, GetStaticPropsContext, G
|
|
|
3
3
|
import { a as UniformPreviewData, c as UniformGetServerSideProps, b as UniformGetStaticProps } from '../models-CupnCqnn.mjs';
|
|
4
4
|
import * as querystring from 'querystring';
|
|
5
5
|
import { ParsedUrlQuery } from 'querystring';
|
|
6
|
-
import
|
|
7
|
-
import { CanvasClient, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
6
|
+
import { CanvasClient, CompositionGetBySlugParameters, DataResolutionOption, CompositionGetParameters, CompositionGetResponse } from '@uniformdev/canvas';
|
|
8
7
|
import '@uniformdev/canvas-react';
|
|
9
8
|
|
|
10
9
|
declare const withUniformGetServerSideProps: <TProps extends {
|
|
@@ -13,46 +12,32 @@ declare const withUniformGetServerSideProps: <TProps extends {
|
|
|
13
12
|
[key: string]: any;
|
|
14
13
|
}>(options?: {
|
|
15
14
|
/** 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 slug structure */
|
|
16
|
-
prefix?: string
|
|
15
|
+
prefix?: string;
|
|
17
16
|
/** Useful when you need to modify the slug passed to the API */
|
|
18
|
-
modifySlug?: (
|
|
17
|
+
modifySlug?: (slug: string, context: GetServerSidePropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
19
18
|
/** Set to true if you want to include draft compositions */
|
|
20
|
-
preview?: boolean
|
|
19
|
+
preview?: boolean;
|
|
21
20
|
/** If you need to override the default client, you can pass it here */
|
|
22
|
-
client?: CanvasClient
|
|
23
|
-
requestOptions?: Omit<Partial<
|
|
24
|
-
|
|
25
|
-
skipEnhance?: boolean | undefined;
|
|
26
|
-
skipPatternResolution?: boolean | undefined;
|
|
27
|
-
skipOverridesResolution?: boolean | undefined;
|
|
28
|
-
state?: number | undefined;
|
|
29
|
-
withComponentIDs?: boolean | undefined;
|
|
30
|
-
withTotalCount?: boolean | undefined;
|
|
31
|
-
withUIStatus?: boolean | undefined;
|
|
32
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
33
|
-
withProjectMapNodes?: boolean | undefined;
|
|
34
|
-
withContentSourceMap?: boolean | undefined;
|
|
35
|
-
locale?: string | undefined;
|
|
36
|
-
releaseId?: string | undefined;
|
|
37
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "slug">> & DataResolutionOption>, "state"> | undefined;
|
|
38
|
-
callback?: UniformGetServerSideProps<TProps> | undefined;
|
|
21
|
+
client?: CanvasClient;
|
|
22
|
+
requestOptions?: Omit<Partial<CompositionGetBySlugParameters & DataResolutionOption>, "state">;
|
|
23
|
+
callback?: UniformGetServerSideProps<TProps>;
|
|
39
24
|
/** Disables logging of response information and timings */
|
|
40
|
-
silent?: boolean
|
|
41
|
-
}
|
|
25
|
+
silent?: boolean;
|
|
26
|
+
}) => GetServerSideProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
42
27
|
|
|
43
28
|
declare const withUniformGetStaticPaths: (options?: {
|
|
44
|
-
projectMapId?: string
|
|
29
|
+
projectMapId?: string;
|
|
45
30
|
/** A string that you want prepended to slugs returned by Canvas. Useful when calling from a nested folder which is not part of your slug structure */
|
|
46
|
-
prefix?: string
|
|
31
|
+
prefix?: string;
|
|
47
32
|
/** Set to true if you want to include draft compositions */
|
|
48
|
-
preview?: boolean
|
|
33
|
+
preview?: boolean;
|
|
49
34
|
/** Way to override getCompositionList request params */
|
|
50
|
-
requestOptions?: Partial<CompositionGetParameters
|
|
35
|
+
requestOptions?: Partial<CompositionGetParameters>;
|
|
51
36
|
/** Way to modify list of slugs before building array of paths */
|
|
52
|
-
callback?: (
|
|
37
|
+
callback?: (compositions: CompositionGetResponse[]) => Promise<CompositionGetResponse[]>;
|
|
53
38
|
/** If you need to override the default client, you can pass it here */
|
|
54
|
-
client?: CanvasClient
|
|
55
|
-
}
|
|
39
|
+
client?: CanvasClient;
|
|
40
|
+
}) => () => Promise<{
|
|
56
41
|
paths: string[];
|
|
57
42
|
fallback: boolean;
|
|
58
43
|
}>;
|
|
@@ -65,31 +50,17 @@ declare const withUniformGetStaticProps: <TProps extends {
|
|
|
65
50
|
/** Name of dynamic parameter coming from getStaticPath, usually specified in page file name (e.g. [...slug].jsx will have param = 'slug' */
|
|
66
51
|
param: string;
|
|
67
52
|
/** Useful when you need to modify the slug passed to the API */
|
|
68
|
-
modifySlug?: (
|
|
53
|
+
modifySlug?: (slug: string, context: GetStaticPropsContext<ParsedUrlQuery, UniformPreviewData>) => string;
|
|
69
54
|
/** Set to true if you want to include draft compositions */
|
|
70
|
-
preview?: boolean
|
|
55
|
+
preview?: boolean;
|
|
71
56
|
/** If you need to override the default client, you can pass it here */
|
|
72
|
-
client?: CanvasClient
|
|
57
|
+
client?: CanvasClient;
|
|
73
58
|
/** Way to override getCompositionBySlug request params */
|
|
74
|
-
requestOptions?: Omit<Partial<
|
|
75
|
-
versionId?: string | undefined;
|
|
76
|
-
skipEnhance?: boolean | undefined;
|
|
77
|
-
skipPatternResolution?: boolean | undefined;
|
|
78
|
-
skipOverridesResolution?: boolean | undefined;
|
|
79
|
-
state?: number | undefined;
|
|
80
|
-
withComponentIDs?: boolean | undefined;
|
|
81
|
-
withTotalCount?: boolean | undefined;
|
|
82
|
-
withUIStatus?: boolean | undefined;
|
|
83
|
-
withWorkflowDefinition?: boolean | undefined;
|
|
84
|
-
withProjectMapNodes?: boolean | undefined;
|
|
85
|
-
withContentSourceMap?: boolean | undefined;
|
|
86
|
-
locale?: string | undefined;
|
|
87
|
-
releaseId?: string | undefined;
|
|
88
|
-
} & Required<Pick<_uniformdev_canvas.CompositionGetParameters, "slug">> & DataResolutionOption>, "state"> | undefined;
|
|
59
|
+
requestOptions?: Omit<Partial<CompositionGetBySlugParameters & DataResolutionOption>, "state">;
|
|
89
60
|
/** Custom handler to specify return value and modify composition - e.g. enhance with CMS data */
|
|
90
|
-
callback?: UniformGetStaticProps<TProps
|
|
61
|
+
callback?: UniformGetStaticProps<TProps>;
|
|
91
62
|
/** Disables logging of response information and timings */
|
|
92
|
-
silent?: boolean
|
|
63
|
+
silent?: boolean;
|
|
93
64
|
}) => GetStaticProps<TProps, ParsedUrlQuery, UniformPreviewData>;
|
|
94
65
|
|
|
95
66
|
declare const getServerSideProps: next.GetServerSideProps<{
|