@conradsix/c4m-client 0.0.0-stage → 0.1.0-preview.1

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.
@@ -0,0 +1,973 @@
1
+ export declare enum ListPagesStatus {
2
+ NotArchived = 0,
3
+ Published = 1,
4
+ Unpublished = 2,
5
+ Archived = 3,
6
+ All = 4
7
+ }
8
+ export declare enum ListPagesStringFilterType {
9
+ Contains = 0,
10
+ StartsWith = 1,
11
+ EndsWith = 2,
12
+ Regex = 3
13
+ }
14
+ export declare enum ListPagesSort {
15
+ SlugAsc = 0,
16
+ SlugDesc = 1,
17
+ PathAsc = 2,
18
+ PathDesc = 3,
19
+ CreatedAtAsc = 4,
20
+ CreatedAtDesc = 5,
21
+ UpdatedAtAsc = 6,
22
+ UpdatedAtDesc = 7,
23
+ SeoTitleAsc = 8,
24
+ SeoTitleDesc = 9,
25
+ PublishedAsc = 10,
26
+ PublishedDesc = 11,
27
+ StatusAsc = 12,
28
+ StatusDesc = 13,
29
+ LinksInAsc = 14,
30
+ LinksInDesc = 15
31
+ }
32
+ export declare enum PagePathAvailability {
33
+ Available = 0,
34
+ Taken = 1,
35
+ Restricted = 2,
36
+ ParentNotFound = 3,
37
+ CircularParent = 4
38
+ }
39
+ export interface PageLifecycleConflict {
40
+ code: string;
41
+ message: string;
42
+ /** @format int32 */
43
+ totalPages: number;
44
+ pages: PageLifecycleConflictPage[];
45
+ /** @format int32 */
46
+ totalMenus: number;
47
+ menus?: UnpublishMenuReference[] | null;
48
+ }
49
+ export interface PageLifecycleConflictPage {
50
+ /** @format uuid */
51
+ pageId: string;
52
+ path: string;
53
+ }
54
+ export interface UnpublishMenuReference {
55
+ /** @format uuid */
56
+ menuId: string;
57
+ name: string;
58
+ itemTitle: string;
59
+ }
60
+ export interface CreatePageResponse {
61
+ /** @format uuid */
62
+ id: string;
63
+ }
64
+ /** @example {"parentId":null,"slug":"about-us","blocks":[{"blockTypeId":"87654321-4321-4321-4321-210987654321","blockData":"{\"title\": \"About Us\", \"content\": \"Welcome to our website\"}","instanceId":null}],"seo":{"title":"About us","description":"Learn who we are and what we do.","socialImageId":null,"index":true,"follow":true},"publish":true,"navigationMenuId":null} */
65
+ export interface CreatePageRequest {
66
+ /**
67
+ * @format uuid
68
+ * @example null
69
+ */
70
+ parentId?: string | null;
71
+ /**
72
+ * @minLength 1
73
+ * @example "about-us"
74
+ */
75
+ slug: string;
76
+ /** @example [{"blockTypeId":"87654321-4321-4321-4321-210987654321","blockData":"{\"title\": \"About Us\", \"content\": \"Welcome to our website\"}","instanceId":null}] */
77
+ blocks: CreatePageBlock[];
78
+ /** @example {"title":"About us","description":"Learn who we are and what we do.","socialImageId":null,"index":true,"follow":true} */
79
+ seo?: PageSeoRequest | null;
80
+ /** @example true */
81
+ publish: boolean;
82
+ /**
83
+ * @format uuid
84
+ * @example null
85
+ */
86
+ navigationMenuId?: string | null;
87
+ }
88
+ export interface CreatePageBlock {
89
+ /**
90
+ * @format uuid
91
+ * @minLength 1
92
+ */
93
+ blockTypeId: string;
94
+ /** @minLength 1 */
95
+ blockData: string;
96
+ /** @format uuid */
97
+ instanceId?: string | null;
98
+ }
99
+ export interface PageSeoRequest {
100
+ /**
101
+ * @minLength 0
102
+ * @maxLength 60
103
+ */
104
+ title?: string | null;
105
+ /**
106
+ * @minLength 0
107
+ * @maxLength 160
108
+ */
109
+ description?: string | null;
110
+ /** @format uuid */
111
+ socialImageId?: string | null;
112
+ index: boolean;
113
+ follow: boolean;
114
+ }
115
+ /** the dto used to send an error response to the client */
116
+ export interface ErrorResponse {
117
+ /**
118
+ * the http status code sent to the client. default is 400.
119
+ * @format int32
120
+ * @default 400
121
+ */
122
+ statusCode: number;
123
+ /**
124
+ * the message for the error response
125
+ * @default "One or more errors occurred!"
126
+ */
127
+ message: string;
128
+ /** the collection of errors for the current context */
129
+ errors: Record<string, string[]>;
130
+ }
131
+ export interface GetPageResponse {
132
+ /** @format uuid */
133
+ pageId: string;
134
+ /** @format uuid */
135
+ pageVersionId: string;
136
+ /** @format uuid */
137
+ parentId?: string | null;
138
+ /** @format uuid */
139
+ navigationMenuId?: string | null;
140
+ /** @format uuid */
141
+ effectiveNavigationMenuId?: string | null;
142
+ slug: string;
143
+ path: string;
144
+ version: number;
145
+ seo: PageSeoResponse;
146
+ blocks: GetPageResponseBlock[];
147
+ /** @format date-time */
148
+ createdAt: string;
149
+ /** @format date-time */
150
+ updatedAt: string;
151
+ breadcrumbs?: PageBreadcrumbItem[] | null;
152
+ isPublished: boolean;
153
+ /** @format uuid */
154
+ currentPageVersionId?: string | null;
155
+ /** @format uuid */
156
+ latestPageVersionId?: string | null;
157
+ /** @format date-time */
158
+ archivedAt?: string | null;
159
+ references?: PageReferenceResponse[] | null;
160
+ }
161
+ export interface PageSeoResponse {
162
+ title?: string | null;
163
+ description?: string | null;
164
+ socialImage?: GetPageResponseBlockImage | null;
165
+ index: boolean;
166
+ follow: boolean;
167
+ }
168
+ export interface GetPageResponseBlockImage {
169
+ /** @format uuid */
170
+ id: string;
171
+ /** @format int32 */
172
+ width: number;
173
+ /** @format int32 */
174
+ height: number;
175
+ imageUrl: string;
176
+ altText: string;
177
+ }
178
+ export interface GetPageResponseBlock {
179
+ /** @format uuid */
180
+ id: string;
181
+ /** @format uuid */
182
+ blockTypeId: string;
183
+ blockName: string;
184
+ blockVersion: string;
185
+ blockData: string;
186
+ images: GetPageResponseBlockImage[];
187
+ pages: GetPageResponseBlockPage[];
188
+ /** @format uuid */
189
+ instanceId: string;
190
+ }
191
+ export interface GetPageResponseBlockPage {
192
+ /** @format uuid */
193
+ id: string;
194
+ slug: string;
195
+ path: string;
196
+ title: string;
197
+ heroImage?: GetPageResponseBlockImage | null;
198
+ }
199
+ export interface PageBreadcrumbItem {
200
+ /** @format uuid */
201
+ pageId: string;
202
+ slug: string;
203
+ path: string;
204
+ }
205
+ export interface PageReferenceResponse {
206
+ kind: string;
207
+ /** @format uuid */
208
+ targetId: string;
209
+ }
210
+ export type GetPageRequest = object;
211
+ export type GetPageByPathRequest = object;
212
+ export type GetPageByVersionRequest = object;
213
+ export interface GetPageHistoryResponse {
214
+ versions: GetPageHistoryResponseItem[];
215
+ page?: PageHistoryMetadata | null;
216
+ }
217
+ export interface GetPageHistoryResponseItem {
218
+ /** @format uuid */
219
+ pageVersionId: string;
220
+ isCurrent: boolean;
221
+ changeSummary: PageVersionChangeSummary;
222
+ /** @format date-time */
223
+ createdAt: string;
224
+ }
225
+ export interface PageVersionChangeSummary {
226
+ /** @format int32 */
227
+ schemaVersion: number;
228
+ headline: string;
229
+ changes: string[];
230
+ }
231
+ export interface PageHistoryMetadata {
232
+ /** @format uuid */
233
+ pageId: string;
234
+ /** @format uuid */
235
+ parentId?: string | null;
236
+ slug: string;
237
+ path: string;
238
+ /** @format uuid */
239
+ navigationMenuId?: string | null;
240
+ /** @format date-time */
241
+ createdAt: string;
242
+ /** @format date-time */
243
+ archivedAt?: string | null;
244
+ navigationMenuName?: string | null;
245
+ }
246
+ export type GetPageHistoryRequest = object;
247
+ export interface GetPagePathResponse {
248
+ path: string;
249
+ }
250
+ export interface GetPagePathAvailabilityResponse {
251
+ path?: string | null;
252
+ status: PagePathAvailability;
253
+ }
254
+ export type GetPagePathAvailabilityRequest = object;
255
+ export interface ListPagesResponse {
256
+ /** @format int32 */
257
+ total: number;
258
+ /** @format int32 */
259
+ limit: number;
260
+ /** @format int32 */
261
+ nextOffset?: number | null;
262
+ pages: ListPagesResponseItem[];
263
+ }
264
+ export interface ListPagesResponseItem {
265
+ /** @format uuid */
266
+ pageId: string;
267
+ /** @format uuid */
268
+ parentPageId?: string | null;
269
+ /** @format uuid */
270
+ currentPageVersionId?: string | null;
271
+ slug: string;
272
+ path: string;
273
+ /** @format int32 */
274
+ versionCount: number;
275
+ /** @format date-time */
276
+ createdAt: string;
277
+ /** @format date-time */
278
+ updatedAt: string;
279
+ isPublished: boolean;
280
+ seoTitle?: string | null;
281
+ /** @format date-time */
282
+ archivedAt?: string | null;
283
+ /** @format int32 */
284
+ linksFromPages: number;
285
+ /** @format int32 */
286
+ linksFromMenus: number;
287
+ }
288
+ export type ListPagesRequest = object;
289
+ export interface PagePublicationRequest {
290
+ /** @format uuid */
291
+ expectedCurrentPageVersionId?: string | null;
292
+ expectedIsPublished: boolean;
293
+ }
294
+ export interface ReparentPageChildrenResponse {
295
+ /** @format int32 */
296
+ movedPages: number;
297
+ }
298
+ export interface ReparentPageChildrenRequest {
299
+ /** @format uuid */
300
+ parentId?: string | null;
301
+ }
302
+ export interface UnpublishPageConflict {
303
+ code: string;
304
+ message: string;
305
+ /** @format int32 */
306
+ totalPages: number;
307
+ pages: UnpublishPageReference[];
308
+ /** @format int32 */
309
+ totalMenus: number;
310
+ menus: UnpublishMenuReference[];
311
+ }
312
+ export interface UnpublishPageReference {
313
+ /** @format uuid */
314
+ pageId: string;
315
+ /** @format uuid */
316
+ pageVersionId: string;
317
+ path: string;
318
+ reason: string;
319
+ }
320
+ export interface UpdateCurrentPageVersionResponse {
321
+ /** @format uuid */
322
+ previousPageVersionId: string;
323
+ }
324
+ export interface PageDraftConflict {
325
+ /** @format uuid */
326
+ latestPageVersionId?: string | null;
327
+ }
328
+ export interface UpdatePageResponse {
329
+ /** @format uuid */
330
+ pageVersionId: string;
331
+ }
332
+ export interface UpdatePageRequest {
333
+ /**
334
+ * @format uuid
335
+ * @minLength 1
336
+ */
337
+ expectedLatestPageVersionId: string;
338
+ newBlocks: UpdatePageNewBlock[];
339
+ existingBlocks: UpdatePageExistingBlock[];
340
+ seo?: PageSeoRequest | null;
341
+ }
342
+ export interface UpdatePageNewBlock {
343
+ /** @format uuid */
344
+ blockTypeId: string;
345
+ /**
346
+ * @format int32
347
+ * @min 0
348
+ */
349
+ sortOrder: number;
350
+ blockData: string;
351
+ /** @format uuid */
352
+ instanceId?: string | null;
353
+ }
354
+ export interface UpdatePageExistingBlock {
355
+ /** @format uuid */
356
+ blockId: string;
357
+ /**
358
+ * @format int32
359
+ * @min 0
360
+ */
361
+ sortOrder: number;
362
+ }
363
+ export interface ConflictResponse {
364
+ /** @format uuid */
365
+ id: string;
366
+ version: number;
367
+ /** @format date-time */
368
+ updatedAt: string;
369
+ }
370
+ export interface UpdatePageDetailsRequest {
371
+ /** @format uuid */
372
+ parentId?: string | null;
373
+ /** @minLength 1 */
374
+ slug: string;
375
+ version: number;
376
+ /** @format uuid */
377
+ navigationMenuId?: string | null;
378
+ }
379
+ export interface NavigationSettingsResponse {
380
+ /** @format uuid */
381
+ defaultMenuId?: string | null;
382
+ /** @format uuid */
383
+ footerMenuId?: string | null;
384
+ version: number;
385
+ }
386
+ export interface UpdateNavigationSettingsRequest {
387
+ /** @format uuid */
388
+ defaultMenuId?: string | null;
389
+ /** @format uuid */
390
+ footerMenuId?: string | null;
391
+ version: number;
392
+ }
393
+ export interface CreateCmsTypeDescriptorResponse {
394
+ /** @format uuid */
395
+ id: string;
396
+ }
397
+ /** @example {"name":"hero-section","version":1,"jsonSchema":"{\"type\": \"object\", \"properties\": {\"title\": {\"type\": \"string\"}, \"subtitle\": {\"type\": \"string\"}}}"} */
398
+ export interface CreateCmsTypeDescriptorRequest {
399
+ /**
400
+ * @minLength 1
401
+ * @pattern ^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$
402
+ * @example "hero-section"
403
+ */
404
+ name: string;
405
+ /**
406
+ * @format int32
407
+ * @min 0
408
+ * @exclusiveMin true
409
+ * @example 1
410
+ */
411
+ version: number;
412
+ /**
413
+ * @minLength 1
414
+ * @example "{"type": "object", "properties": {"title": {"type": "string"}, "subtitle": {"type": "string"}}}"
415
+ */
416
+ jsonSchema: string;
417
+ }
418
+ export interface CmsTypeDescriptor {
419
+ /** @format uuid */
420
+ id: string;
421
+ name: string;
422
+ /** @format int32 */
423
+ version: number;
424
+ jsonSchema: string;
425
+ /** @format date-time */
426
+ createdAt: string;
427
+ isRetired: boolean;
428
+ }
429
+ export type GetMenuActionTypeRequest = object;
430
+ export type GetMenuActionTypeByNameRequest = object;
431
+ export interface ListMenuActionTypesResponse {
432
+ items: CmsTypeDescriptor[];
433
+ }
434
+ export interface CreateMenuResponse {
435
+ /** @format uuid */
436
+ id: string;
437
+ }
438
+ /** @example {"name":"main-navigation","rootItems":[{"title":"Home","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000000\"}","children":null}]} */
439
+ export interface CreateMenuRequest {
440
+ /**
441
+ * @minLength 1
442
+ * @pattern ^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$
443
+ * @example "main-navigation"
444
+ */
445
+ name: string;
446
+ /** @example [{"title":"Home","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000000\"}","children":null}] */
447
+ rootItems?: MenuItem[] | null;
448
+ }
449
+ export interface MenuItem {
450
+ /**
451
+ * @minLength 0
452
+ * @maxLength 200
453
+ */
454
+ title: string;
455
+ /**
456
+ * @format uuid
457
+ * @minLength 1
458
+ */
459
+ actionTypeId: string;
460
+ /** @minLength 1 */
461
+ actionData: string;
462
+ children?: MenuItem[] | null;
463
+ }
464
+ export interface GetMenuResponse {
465
+ /** @format uuid */
466
+ id: string;
467
+ name: string;
468
+ version: number;
469
+ /** @format date-time */
470
+ createdAt: string;
471
+ /** @format date-time */
472
+ updatedAt: string;
473
+ rootItems: GetMenuRequestMenuItem[];
474
+ pages: GetMenuResponsePage[];
475
+ }
476
+ export interface GetMenuRequestMenuItem {
477
+ /** @format uuid */
478
+ id: string;
479
+ title: string;
480
+ actionTypeName: string;
481
+ /** @format int32 */
482
+ actionTypeVersion: number;
483
+ actionData: string;
484
+ children: GetMenuRequestMenuItem[];
485
+ }
486
+ export interface GetMenuResponsePage {
487
+ /** @format uuid */
488
+ id: string;
489
+ slug: string;
490
+ path: string;
491
+ }
492
+ export type GetMenuRequest = object;
493
+ export interface ListMenusResponse {
494
+ items: ListMenusMenuItem[];
495
+ /** @format int32 */
496
+ totalCount: number;
497
+ /** @format int32 */
498
+ limit: number;
499
+ /** @format int32 */
500
+ offset: number;
501
+ }
502
+ export interface ListMenusMenuItem {
503
+ /** @format uuid */
504
+ id: string;
505
+ name: string;
506
+ /** @format date-time */
507
+ createdAt: string;
508
+ /** @format date-time */
509
+ updatedAt: string;
510
+ }
511
+ export type ListMenusRequest = object;
512
+ /** @example {"version":1,"rootItems":[{"title":"Home","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000000\"}","children":[{"title":"About","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000001\"}","children":null}]}]} */
513
+ export interface UpdateMenuRequest {
514
+ /** @example 1 */
515
+ version: number;
516
+ /** @example [{"title":"Home","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000000\"}","children":[{"title":"About","actionTypeId":"0e1d6f2a-3b4c-4d5e-8f60-718293a4b5c6","actionData":"{\"pageId\": \"00000000-0000-0000-0000-000000000001\"}","children":null}]}] */
517
+ rootItems?: MenuItem[] | null;
518
+ }
519
+ export type GetBlockTypeRequest = object;
520
+ export type GetBlockTypeByNameRequest = object;
521
+ export interface ListBlockTypesResponse {
522
+ items: CmsTypeDescriptor[];
523
+ /** @format int32 */
524
+ total: number;
525
+ /** @format int32 */
526
+ nextOffset?: number | null;
527
+ /** @format int32 */
528
+ limit: number;
529
+ }
530
+ export type ListBlockTypesRequest = object;
531
+ export type QueryParamsType = Record<string | number, any>;
532
+ export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
533
+ export interface FullRequestParams extends Omit<RequestInit, "body"> {
534
+ /** set parameter to `true` for call `securityWorker` for this request */
535
+ secure?: boolean;
536
+ /** request path */
537
+ path: string;
538
+ /** content type of request body */
539
+ type?: ContentType;
540
+ /** query params */
541
+ query?: QueryParamsType;
542
+ /** format of response (i.e. response.json() -> format: "json") */
543
+ format?: ResponseFormat;
544
+ /** request body */
545
+ body?: unknown;
546
+ /** base url */
547
+ baseUrl?: string;
548
+ /** request cancellation token */
549
+ cancelToken?: CancelToken;
550
+ }
551
+ export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
552
+ export interface ApiConfig<SecurityDataType = unknown> {
553
+ baseUrl?: string;
554
+ baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
555
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
556
+ customFetch?: typeof fetch;
557
+ }
558
+ export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
559
+ data: D;
560
+ error: E;
561
+ }
562
+ type CancelToken = Symbol | string | number;
563
+ export declare enum ContentType {
564
+ Json = "application/json",
565
+ JsonApi = "application/vnd.api+json",
566
+ FormData = "multipart/form-data",
567
+ UrlEncoded = "application/x-www-form-urlencoded",
568
+ Text = "text/plain"
569
+ }
570
+ export declare class HttpClient<SecurityDataType = unknown> {
571
+ baseUrl: string;
572
+ private securityData;
573
+ private securityWorker?;
574
+ private abortControllers;
575
+ private customFetch;
576
+ private baseApiParams;
577
+ constructor(apiConfig?: ApiConfig<SecurityDataType>);
578
+ setSecurityData: (data: SecurityDataType | null) => void;
579
+ protected encodeQueryParam(key: string, value: any): string;
580
+ protected addQueryParam(query: QueryParamsType, key: string): string;
581
+ protected addArrayQueryParam(query: QueryParamsType, key: string): any;
582
+ protected toQueryString(rawQuery?: QueryParamsType): string;
583
+ protected addQueryParams(rawQuery?: QueryParamsType): string;
584
+ private contentFormatters;
585
+ protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
586
+ protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
587
+ abortRequest: (cancelToken: CancelToken) => void;
588
+ request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
589
+ }
590
+ /**
591
+ * @title C4M
592
+ * @version v1
593
+ *
594
+ * The C4M engine's endpoints: pages and their versions, block and menu action types, and menus.
595
+ */
596
+ export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
597
+ pages: {
598
+ /**
599
+ * No description
600
+ *
601
+ * @tags Pages
602
+ * @name ArchivePage
603
+ * @summary Archives an unpublished page with no unarchived children, retaining its content and history.
604
+ * @request POST:/pages/{id}/archive
605
+ */
606
+ archivePage: (id: string, params?: RequestParams) => Promise<HttpResponse<void, void | PageLifecycleConflict>>;
607
+ /**
608
+ * @description Creates a new page with the specified content blocks, optionally leaving its initial version as a draft.
609
+ *
610
+ * @tags Pages
611
+ * @name CreatePage
612
+ * @summary Creates a new page.
613
+ * @request POST:/pages
614
+ */
615
+ createPage: (data: CreatePageRequest, params?: RequestParams) => Promise<HttpResponse<CreatePageResponse, void | ErrorResponse>>;
616
+ /**
617
+ * @description Retrieves a paginated list of pages with support for sorting, searching by SEO title or path, and filtering by slug, path, and creation/update dates.
618
+ *
619
+ * @tags Pages
620
+ * @name ListPages
621
+ * @summary Lists pages with pagination, sorting, and filtering.
622
+ * @request GET:/pages
623
+ */
624
+ listPages: (query?: {
625
+ /**
626
+ * @format int32
627
+ * @default 20
628
+ */
629
+ limit?: number;
630
+ /**
631
+ * @format int32
632
+ * @default 0
633
+ */
634
+ offset?: number;
635
+ /** @default 0 */
636
+ sort?: ListPagesSort;
637
+ slugFilter?: string | null;
638
+ /** @default 0 */
639
+ slugFilterType?: ListPagesStringFilterType;
640
+ pathFilter?: string | null;
641
+ /** @default 0 */
642
+ pathFilterType?: ListPagesStringFilterType;
643
+ /** @format date-time */
644
+ createdAfter?: string | null;
645
+ /** @format date-time */
646
+ createdBefore?: string | null;
647
+ /** @format date-time */
648
+ updatedAfter?: string | null;
649
+ /** @format date-time */
650
+ updatedBefore?: string | null;
651
+ search?: string | null;
652
+ /** @format uuid */
653
+ parentId?: string | null;
654
+ /** @default false */
655
+ publishedOnly?: boolean;
656
+ /** @default 0 */
657
+ status?: ListPagesStatus;
658
+ }, params?: RequestParams) => Promise<HttpResponse<ListPagesResponse, void>>;
659
+ /**
660
+ * @description Retrieves a specific page by its unique identifier including all related blocks. Optionally specify a version ID to get a specific version, otherwise returns the current version.
661
+ *
662
+ * @tags Pages
663
+ * @name GetPage
664
+ * @summary Gets a page by ID.
665
+ * @request GET:/pages/{id}
666
+ */
667
+ getPage: (id: string, query?: {
668
+ /** @default false */
669
+ latest?: boolean;
670
+ /** @default false */
671
+ includeBreadcrumbs?: boolean;
672
+ /** @default false */
673
+ includeArchived?: boolean;
674
+ }, params?: RequestParams) => Promise<HttpResponse<GetPageResponse, ErrorResponse>>;
675
+ /**
676
+ * No description
677
+ *
678
+ * @tags Pages
679
+ * @name UpdatePage
680
+ * @summary Creates a content and SEO draft without changing page details or publication.
681
+ * @request PUT:/pages/{id}
682
+ */
683
+ updatePage: (id: string, data: UpdatePageRequest, params?: RequestParams) => Promise<HttpResponse<UpdatePageResponse, ErrorResponse | PageDraftConflict>>;
684
+ /**
685
+ * @description Retrieves a specific page by path including all related blocks. Returns the current version of the page.
686
+ *
687
+ * @tags Pages
688
+ * @name GetPageByPath
689
+ * @summary Gets a page by path.
690
+ * @request GET:/pages/by-path
691
+ */
692
+ getPageByPath: (query: {
693
+ path: string;
694
+ }, params?: RequestParams) => Promise<HttpResponse<GetPageResponse, ErrorResponse>>;
695
+ /**
696
+ * @description Retrieves a specific page by its version identifier including all related blocks.
697
+ *
698
+ * @tags Pages
699
+ * @name GetPageByVersion
700
+ * @summary Gets a page by version.
701
+ * @request GET:/pages/by-version/{id}
702
+ */
703
+ getPageByVersion: (id: string, query?: {
704
+ /** @default false */
705
+ includeBreadcrumbs?: boolean;
706
+ /** @default false */
707
+ includeArchived?: boolean;
708
+ }, params?: RequestParams) => Promise<HttpResponse<GetPageResponse, ErrorResponse>>;
709
+ /**
710
+ * @description Sets the specified page version as the current version and unsets the previous current version.
711
+ *
712
+ * @tags Pages
713
+ * @name UpdateCurrentPageVersion
714
+ * @summary Sets a page version as current.
715
+ * @request PUT:/pages/by-version/{id}
716
+ */
717
+ updateCurrentPageVersion: (id: string, data: PagePublicationRequest, params?: RequestParams) => Promise<HttpResponse<UpdateCurrentPageVersionResponse, ErrorResponse>>;
718
+ /**
719
+ * @description Retrieves the complete version history for a specific page, including high-level change summaries.
720
+ *
721
+ * @tags Pages
722
+ * @name GetPageHistory
723
+ * @summary Gets page version history by page ID.
724
+ * @request GET:/pages/{id}/history
725
+ */
726
+ getPageHistory: (id: string, query?: {
727
+ /** @default false */
728
+ includeArchived?: boolean;
729
+ }, params?: RequestParams) => Promise<HttpResponse<GetPageHistoryResponse, ErrorResponse>>;
730
+ /**
731
+ * @description Retrieves just the path of a specific page by its unique identifier. This is a performance-optimized endpoint that returns only the path without loading the full page data.
732
+ *
733
+ * @tags Pages
734
+ * @name GetPagePath
735
+ * @summary Gets a page path by ID.
736
+ * @request GET:/pages/{id}/path
737
+ */
738
+ getPagePath: (id: string, params?: RequestParams) => Promise<HttpResponse<GetPagePathResponse, ErrorResponse>>;
739
+ /**
740
+ * @description Resolves the path a page would have with the given parent and slug, and reports whether that path can be used. Pass the ID of a page being edited to exclude it from the check.
741
+ *
742
+ * @tags Pages
743
+ * @name GetPagePathAvailability
744
+ * @summary Checks whether a page path is available.
745
+ * @request GET:/pages/path-availability
746
+ */
747
+ getPagePathAvailability: (query: {
748
+ slug: string;
749
+ /** @format uuid */
750
+ parentId?: string | null;
751
+ /** @format uuid */
752
+ pageId?: string | null;
753
+ }, params?: RequestParams) => Promise<HttpResponse<GetPagePathAvailabilityResponse, void>>;
754
+ /**
755
+ * No description
756
+ *
757
+ * @tags Pages
758
+ * @name PublishPage
759
+ * @summary Publishes the saved Current version of a page.
760
+ * @request POST:/pages/{id}/publish
761
+ */
762
+ publishPage: (id: string, data: PagePublicationRequest, params?: RequestParams) => Promise<HttpResponse<void, void>>;
763
+ /**
764
+ * No description
765
+ *
766
+ * @tags Pages
767
+ * @name ReparentPageChildren
768
+ * @summary Moves all unarchived direct children and their subtrees to another parent or the top level.
769
+ * @request POST:/pages/{id}/reparent-children
770
+ */
771
+ reparentPageChildren: (id: string, data: ReparentPageChildrenRequest, params?: RequestParams) => Promise<HttpResponse<ReparentPageChildrenResponse, void | PageLifecycleConflict>>;
772
+ /**
773
+ * No description
774
+ *
775
+ * @tags Pages
776
+ * @name UnpublishPage
777
+ * @summary Unpublishes a page unless published pages or menus reference it.
778
+ * @request POST:/pages/{id}/unpublish
779
+ */
780
+ unpublishPage: (id: string, data: PagePublicationRequest, params?: RequestParams) => Promise<HttpResponse<void, void | UnpublishPageConflict>>;
781
+ /**
782
+ * No description
783
+ *
784
+ * @tags Pages
785
+ * @name UpdatePageDetails
786
+ * @summary Updates unversioned page details without creating a content version.
787
+ * @request PUT:/pages/{id}/details
788
+ */
789
+ updatePageDetails: (id: string, data: UpdatePageDetailsRequest, params?: RequestParams) => Promise<HttpResponse<GetPageResponse, ConflictResponse | ErrorResponse>>;
790
+ };
791
+ navigationSettings: {
792
+ /**
793
+ * @description Retrieves the default navigation and footer menu selections.
794
+ *
795
+ * @tags Navigation-Settings
796
+ * @name GetNavigationSettings
797
+ * @summary Gets navigation settings.
798
+ * @request GET:/navigation-settings
799
+ */
800
+ getNavigationSettings: (params?: RequestParams) => Promise<HttpResponse<NavigationSettingsResponse, any>>;
801
+ /**
802
+ * @description Changes the default navigation and footer menus immediately.
803
+ *
804
+ * @tags Navigation-Settings
805
+ * @name UpdateNavigationSettings
806
+ * @summary Updates navigation settings.
807
+ * @request PUT:/navigation-settings
808
+ */
809
+ updateNavigationSettings: (data: UpdateNavigationSettingsRequest, params?: RequestParams) => Promise<HttpResponse<NavigationSettingsResponse, ConflictResponse | ErrorResponse>>;
810
+ };
811
+ menuActionTypes: {
812
+ /**
813
+ * @description Adds a new menu action type to the system.
814
+ *
815
+ * @tags Menu-Action-Types
816
+ * @name CreateMenuActionType
817
+ * @summary Creates a new menu action type.
818
+ * @request POST:/menu-action-types
819
+ */
820
+ createMenuActionType: (data: CreateCmsTypeDescriptorRequest, params?: RequestParams) => Promise<HttpResponse<CreateCmsTypeDescriptorResponse, void | ErrorResponse>>;
821
+ /**
822
+ * @description Retrieves all available menu action types with their schemas.
823
+ *
824
+ * @tags Menu-Action-Types
825
+ * @name ListMenuActionTypes
826
+ * @summary Lists all menu action types.
827
+ * @request GET:/menu-action-types
828
+ */
829
+ listMenuActionTypes: (params?: RequestParams) => Promise<HttpResponse<ListMenuActionTypesResponse, any>>;
830
+ /**
831
+ * @description Retrieves a menu action type including its JSON schema for validation.
832
+ *
833
+ * @tags Menu-Action-Types
834
+ * @name GetMenuActionType
835
+ * @summary Gets a menu action type by ID.
836
+ * @request GET:/menu-action-types/{id}
837
+ */
838
+ getMenuActionType: (id: string, params?: RequestParams) => Promise<HttpResponse<CmsTypeDescriptor, ErrorResponse>>;
839
+ /**
840
+ * @description Retrieves a specific menu action type from the system by its name. If version is not specified, returns the latest version.
841
+ *
842
+ * @tags Menu-Action-Types
843
+ * @name GetMenuActionTypeByName
844
+ * @summary Gets a menu action type by name.
845
+ * @request GET:/menu-action-types/by-name/{name}
846
+ */
847
+ getMenuActionTypeByName: (name: string, query?: {
848
+ /** @format int32 */
849
+ version?: number | null;
850
+ }, params?: RequestParams) => Promise<HttpResponse<CmsTypeDescriptor, void>>;
851
+ };
852
+ menus: {
853
+ /**
854
+ * @description Adds a new menu with optional menu items to the system.
855
+ *
856
+ * @tags Menus
857
+ * @name CreateMenu
858
+ * @summary Creates a new menu.
859
+ * @request POST:/menus
860
+ */
861
+ createMenu: (data: CreateMenuRequest, params?: RequestParams) => Promise<HttpResponse<CreateMenuResponse, void | ErrorResponse>>;
862
+ /**
863
+ * @description Retrieves a paginated list of menus.
864
+ *
865
+ * @tags Menus
866
+ * @name ListMenus
867
+ * @summary Lists menus.
868
+ * @request GET:/menus
869
+ */
870
+ listMenus: (query?: {
871
+ /**
872
+ * @format int32
873
+ * @default 20
874
+ */
875
+ limit?: number;
876
+ /**
877
+ * @format int32
878
+ * @default 0
879
+ */
880
+ offset?: number;
881
+ }, params?: RequestParams) => Promise<HttpResponse<ListMenusResponse, ErrorResponse>>;
882
+ /**
883
+ * @description Retrieves the menu configured as the site-wide navigation fallback.
884
+ *
885
+ * @tags Menus
886
+ * @name GetDefaultMenu
887
+ * @summary Gets the default navigation menu.
888
+ * @request GET:/menus/default
889
+ */
890
+ getDefaultMenu: (params?: RequestParams) => Promise<HttpResponse<GetMenuResponse, ErrorResponse>>;
891
+ /**
892
+ * @description Retrieves the menu configured for the site-wide footer.
893
+ *
894
+ * @tags Menus
895
+ * @name GetFooterMenu
896
+ * @summary Gets the footer menu.
897
+ * @request GET:/menus/footer
898
+ */
899
+ getFooterMenu: (params?: RequestParams) => Promise<HttpResponse<GetMenuResponse, ErrorResponse>>;
900
+ /**
901
+ * @description Retrieves a menu with its hierarchical structure of menu items.
902
+ *
903
+ * @tags Menus
904
+ * @name GetMenu
905
+ * @summary Gets a menu by ID.
906
+ * @request GET:/menus/{id}
907
+ */
908
+ getMenu: (id: string, params?: RequestParams) => Promise<HttpResponse<GetMenuResponse, ErrorResponse>>;
909
+ /**
910
+ * @description Replaces all menu items with the provided tree structure.
911
+ *
912
+ * @tags Menus
913
+ * @name UpdateMenu
914
+ * @summary Updates an existing menu.
915
+ * @request PUT:/menus/{menuId}
916
+ */
917
+ updateMenu: (menuId: string, data: UpdateMenuRequest, params?: RequestParams) => Promise<HttpResponse<void, void | ErrorResponse>>;
918
+ };
919
+ blockTypes: {
920
+ /**
921
+ * @description Adds a new block type to the system.
922
+ *
923
+ * @tags Block-Types
924
+ * @name CreateBlockType
925
+ * @summary Creates a new block type.
926
+ * @request POST:/block-types
927
+ */
928
+ createBlockType: (data: CreateCmsTypeDescriptorRequest, params?: RequestParams) => Promise<HttpResponse<CreateCmsTypeDescriptorResponse, void | ErrorResponse>>;
929
+ /**
930
+ * @description Retrieves a paginated list of block types grouped by name. All versions of each block type are included together.
931
+ *
932
+ * @tags Block-Types
933
+ * @name ListBlockTypes
934
+ * @summary Lists block types with pagination.
935
+ * @request GET:/block-types
936
+ */
937
+ listBlockTypes: (query?: {
938
+ /**
939
+ * @format int32
940
+ * @default 0
941
+ */
942
+ offset?: number;
943
+ /**
944
+ * @format int32
945
+ * @default 50
946
+ */
947
+ limit?: number;
948
+ }, params?: RequestParams) => Promise<HttpResponse<ListBlockTypesResponse, void>>;
949
+ /**
950
+ * @description Retrieves a specific block type from the system.
951
+ *
952
+ * @tags Block-Types
953
+ * @name GetBlockType
954
+ * @summary Gets a block type by ID.
955
+ * @request GET:/block-types/{id}
956
+ */
957
+ getBlockType: (id: string, params?: RequestParams) => Promise<HttpResponse<CmsTypeDescriptor, void>>;
958
+ /**
959
+ * @description Retrieves a specific block type from the system by its name. If version is not specified, returns the latest version.
960
+ *
961
+ * @tags Block-Types
962
+ * @name GetBlockTypeByName
963
+ * @summary Gets a block type by name.
964
+ * @request GET:/block-types/by-name/{name}
965
+ */
966
+ getBlockTypeByName: (name: string, query?: {
967
+ /** @format int32 */
968
+ version?: number | null;
969
+ }, params?: RequestParams) => Promise<HttpResponse<CmsTypeDescriptor, void>>;
970
+ };
971
+ }
972
+ export {};
973
+ //# sourceMappingURL=index.d.ts.map