@dotcms/client 0.0.1-beta.2 → 0.0.1-beta.21

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.
Files changed (47) hide show
  1. package/README.md +164 -36
  2. package/index.cjs.js +102 -1238
  3. package/index.esm.js +86 -1221
  4. package/next.cjs.d.ts +1 -0
  5. package/next.cjs.default.js +1 -0
  6. package/next.cjs.js +575 -0
  7. package/next.cjs.mjs +2 -0
  8. package/next.esm.d.ts +1 -0
  9. package/next.esm.js +573 -0
  10. package/package.json +32 -7
  11. package/src/index.d.ts +6 -6
  12. package/src/lib/client/client.d.ts +84 -0
  13. package/src/lib/client/content/builders/collection/collection.d.ts +1 -1
  14. package/src/lib/client/content/content-api.d.ts +1 -1
  15. package/src/lib/client/content/shared/types.d.ts +2 -2
  16. package/src/lib/client/models/types.d.ts +573 -10
  17. package/src/lib/client/navigation/navigation-api.d.ts +31 -0
  18. package/src/lib/client/page/page-api.d.ts +172 -0
  19. package/src/lib/client/page/utils.d.ts +41 -0
  20. package/src/lib/{editor → deprecated/editor}/models/client.model.d.ts +13 -0
  21. package/src/lib/{editor → deprecated/editor}/sdk-editor.d.ts +1 -1
  22. package/src/lib/{client → deprecated}/sdk-js-client.d.ts +1 -1
  23. package/src/lib/utils/page/common-utils.d.ts +1 -1
  24. package/src/next.d.ts +1 -0
  25. package/src/types.d.ts +2 -0
  26. package/transforms.cjs.js +1149 -0
  27. package/transforms.esm.js +1143 -0
  28. package/types.cjs.d.ts +1 -0
  29. package/types.cjs.default.js +1 -0
  30. package/types.cjs.js +2 -0
  31. package/types.cjs.mjs +2 -0
  32. package/types.esm.d.ts +1 -0
  33. package/types.esm.js +1 -0
  34. /package/src/lib/{query-builder → client/content/builders/query}/lucene-syntax/Equals.d.ts +0 -0
  35. /package/src/lib/{query-builder → client/content/builders/query}/lucene-syntax/Field.d.ts +0 -0
  36. /package/src/lib/{query-builder → client/content/builders/query}/lucene-syntax/NotOperand.d.ts +0 -0
  37. /package/src/lib/{query-builder → client/content/builders/query}/lucene-syntax/Operand.d.ts +0 -0
  38. /package/src/lib/{query-builder → client/content/builders/query}/lucene-syntax/index.d.ts +0 -0
  39. /package/src/lib/{query-builder/sdk-query-builder.d.ts → client/content/builders/query/query.d.ts} +0 -0
  40. /package/src/lib/{query-builder → client/content/builders/query}/utils/index.d.ts +0 -0
  41. /package/src/lib/{editor → deprecated/editor}/listeners/listeners.d.ts +0 -0
  42. /package/src/lib/{editor → deprecated/editor}/models/editor.model.d.ts +0 -0
  43. /package/src/lib/{editor → deprecated/editor}/models/inline-event.model.d.ts +0 -0
  44. /package/src/lib/{editor → deprecated/editor}/models/listeners.model.d.ts +0 -0
  45. /package/src/lib/{editor → deprecated/editor}/sdk-editor-vtl.d.ts +0 -0
  46. /package/src/lib/{editor → deprecated/editor}/utils/editor.utils.d.ts +0 -0
  47. /package/src/lib/{editor → deprecated/editor}/utils/traditional-vtl.utils.d.ts +0 -0
@@ -0,0 +1,84 @@
1
+ import { Content } from './content/content-api';
2
+ import { NavigationClient } from './navigation/navigation-api';
3
+ import { PageClient } from './page/page-api';
4
+ /**
5
+ * Options for configuring fetch requests, excluding body and method properties.
6
+ */
7
+ export type RequestOptions = Omit<RequestInit, 'body' | 'method'>;
8
+ /**
9
+ * Configuration options for the DotCMS client.
10
+ */
11
+ export interface DotCMSClientConfig {
12
+ /**
13
+ * The URL of the dotCMS instance.
14
+ * Ensure to include the protocol (http or https).
15
+ * @example `https://demo.dotcms.com`
16
+ */
17
+ dotcmsUrl: string;
18
+ /**
19
+ * The authentication token for requests.
20
+ * Obtainable from the dotCMS UI.
21
+ */
22
+ authToken: string;
23
+ /**
24
+ * The id of the site you want to interact with. Defaults to the default site if not provided.
25
+ */
26
+ siteId?: string;
27
+ /**
28
+ * Additional options for the fetch request.
29
+ * @example `{ headers: { 'Content-Type': 'application/json' } }`
30
+ */
31
+ requestOptions?: RequestOptions;
32
+ }
33
+ /**
34
+ * Client for interacting with the DotCMS REST API.
35
+ * Provides access to content, page, and navigation functionality.
36
+ */
37
+ declare class DotCMSClient {
38
+ private config;
39
+ private requestOptions;
40
+ /**
41
+ * Client for content-related operations.
42
+ */
43
+ content: Content;
44
+ /**
45
+ * Client for page-related operations.
46
+ */
47
+ page: PageClient;
48
+ /**
49
+ * Client for navigation-related operations.
50
+ */
51
+ nav: NavigationClient;
52
+ /**
53
+ * Creates a new DotCMS client instance.
54
+ *
55
+ * @param config - Configuration options for the client
56
+ * @throws Warning if dotcmsUrl is invalid or authToken is missing
57
+ */
58
+ constructor(config?: DotCMSClientConfig);
59
+ /**
60
+ * Creates request options with authentication headers.
61
+ *
62
+ * @param config - The client configuration
63
+ * @returns Request options with authorization headers
64
+ */
65
+ private createAuthenticatedRequestOptions;
66
+ }
67
+ /**
68
+ * Creates and returns a new DotCMS client instance.
69
+ *
70
+ * @param config - Configuration options for the client
71
+ * @returns A configured DotCMS client instance
72
+ * @example
73
+ * ```typescript
74
+ * const client = dotCMSCreateClient({
75
+ * dotcmsUrl: 'https://demo.dotcms.com',
76
+ * authToken: 'your-auth-token'
77
+ * });
78
+ *
79
+ * // Use the client to fetch content
80
+ * const pages = await client.page.get('/about-us');
81
+ * ```
82
+ */
83
+ export declare const createDotCMSClient: (clientConfig: DotCMSClientConfig) => DotCMSClient;
84
+ export {};
@@ -1,4 +1,4 @@
1
- import { ClientOptions } from '../../../sdk-js-client';
1
+ import { ClientOptions } from '../../../../deprecated/sdk-js-client';
2
2
  import { GetCollectionResponse, BuildQuery, SortBy, GetCollectionError, OnFullfilled, OnRejected } from '../../shared/types';
3
3
  /**
4
4
  * Creates a Builder to filter and fetch content from the content API for a specific content type.
@@ -1,5 +1,5 @@
1
1
  import { CollectionBuilder } from './builders/collection/collection';
2
- import { ClientOptions } from '../sdk-js-client';
2
+ import { ClientOptions } from '../../deprecated/sdk-js-client';
3
3
  /**
4
4
  * Creates a builder to filter and fetch a collection of content items.
5
5
  * @param contentType - The content type to retrieve.
@@ -1,5 +1,5 @@
1
- import { Equals } from '../../../query-builder/lucene-syntax';
2
- import { QueryBuilder } from '../../../query-builder/sdk-query-builder';
1
+ import { Equals } from '../builders/query/lucene-syntax';
2
+ import { QueryBuilder } from '../builders/query/query';
3
3
  /**
4
4
  * Model to sort by fields.
5
5
  */
@@ -1,13 +1,576 @@
1
+ import { Contentlet } from '../content/shared/types';
1
2
  /**
2
- * Represents a listener for DotcmsClientListener.
3
+ * Represents a DotCMS page asset with its associated data and configurations
3
4
  *
4
- * @typedef {Object} DotcmsClientListener
5
- * @property {string} action - The action that triggers the event.
6
- * @property {string} event - The name of the event.
7
- * @property {function(...args: any[]): void} callback - The callback function to handle the event.
5
+ * @template T - Type parameter for URL content mapping, defaults to unknown
6
+ * @interface DotCMSPageAsset
7
+ *
8
+ * @example
9
+ * // Using DotCMSPageAsset without urlContentMap type
10
+ *
11
+ * const basicPageAsset: DotCMSPageAsset = {
12
+ * canCreateTemplate: true,
13
+ * containers: {},
14
+ * layout: {...},
15
+ * page: {...},
16
+ * site: {...},
17
+ * template: {...},
18
+ * ...
19
+ * };
20
+ *
21
+ * @example
22
+ * // Using DotCMSPageAsset with urlContentMap type
23
+ * interface SomeContentlet {
24
+ * urlContentMap: {
25
+ * slug: string;
26
+ * category: string;
27
+ * }
28
+ * }
29
+ *
30
+ * const pageWithUrlMap: DotCMSPageAsset<{ urlContentMap: SomeContentlet }> = {
31
+ * containers: {},
32
+ * layout: {...},
33
+ * page: {...},
34
+ * site: {...},
35
+ * template: {...},
36
+ * // This is the contentlet SomeContentlet type
37
+ * urlContentMap: {
38
+ * slug: "/blog/post-1",
39
+ * category: "blog"
40
+ * }
41
+ * };
42
+ */
43
+ export interface DotCMSPageAsset<T = unknown> {
44
+ /** Whether a template can be created for this page */
45
+ canCreateTemplate?: boolean;
46
+ /** Map of containers on the page indexed by container ID */
47
+ containers: {
48
+ [key: string]: DotCMSPageAssetContainer;
49
+ };
50
+ /** Layout configuration for the page */
51
+ layout: DotCMSLayout;
52
+ /** Page metadata and properties */
53
+ page: DotCMSPage;
54
+ /** Site information */
55
+ site: DotCMSSite;
56
+ /** Template configuration */
57
+ template: DotCMSTemplate;
58
+ /** View configuration */
59
+ viewAs?: DotCMSViewAs;
60
+ /** Vanity URL configuration if applicable */
61
+ vanityUrl?: DotCMSVanityUrl;
62
+ /** Content mapping for the page URL */
63
+ urlContentMap?: T extends {
64
+ urlContentMap: infer U;
65
+ } ? Contentlet<U> : Contentlet<T>;
66
+ /** The parameters used to fetch the page */
67
+ params?: Record<string, unknown>;
68
+ }
69
+ export interface DotPageAssetLayoutRow {
70
+ identifier: number;
71
+ value?: string;
72
+ id?: string;
73
+ columns: DotPageAssetLayoutColumn[];
74
+ styleClass?: string;
75
+ }
76
+ export interface DotCMSVanityUrl {
77
+ pattern: string;
78
+ vanityUrlId: string;
79
+ url: string;
80
+ siteId: string;
81
+ languageId: number;
82
+ forwardTo: string;
83
+ response: number;
84
+ order: number;
85
+ temporaryRedirect: boolean;
86
+ permanentRedirect: boolean;
87
+ forward: boolean;
88
+ }
89
+ export interface DotPageAssetLayoutColumn {
90
+ preview: boolean;
91
+ containers: DotCMSColumnContainer[];
92
+ widthPercent: number;
93
+ width: number;
94
+ leftOffset: number;
95
+ left: number;
96
+ styleClass?: string;
97
+ }
98
+ export interface DotCMSColumnContainer {
99
+ identifier: string;
100
+ uuid: string;
101
+ historyUUIDs: string[];
102
+ }
103
+ export interface DotCMSPageAssetContainer {
104
+ container: DotCMSContainer;
105
+ containerStructures: DotCMSContainerStructure[];
106
+ contentlets: {
107
+ [key: string]: DotCMSContentlet[];
108
+ };
109
+ }
110
+ export interface DotCMSContainer {
111
+ identifier: string;
112
+ uuid: string;
113
+ iDate: number;
114
+ type: string;
115
+ owner?: string;
116
+ inode: string;
117
+ source: string;
118
+ title: string;
119
+ friendlyName: string;
120
+ modDate: number;
121
+ modUser: string;
122
+ sortOrder: number;
123
+ showOnMenu: boolean;
124
+ code?: string;
125
+ maxContentlets: number;
126
+ useDiv: boolean;
127
+ sortContentletsBy?: string;
128
+ preLoop: string;
129
+ postLoop: string;
130
+ staticify: boolean;
131
+ luceneQuery?: string;
132
+ notes: string;
133
+ languageId?: number;
134
+ path?: string;
135
+ live: boolean;
136
+ locked: boolean;
137
+ working: boolean;
138
+ deleted: boolean;
139
+ name: string;
140
+ archived: boolean;
141
+ permissionId: string;
142
+ versionId: string;
143
+ versionType: string;
144
+ permissionType: string;
145
+ categoryId: string;
146
+ idate: number;
147
+ new: boolean;
148
+ acceptTypes: string;
149
+ contentlets: DotCMSContentlet[];
150
+ parentPermissionable: DotCMSSiteParentPermissionable;
151
+ }
152
+ export interface DotCMSContentlet {
153
+ archived: boolean;
154
+ baseType: string;
155
+ deleted?: boolean;
156
+ binary?: string;
157
+ binaryContentAsset?: string;
158
+ binaryVersion?: string;
159
+ contentType: string;
160
+ file?: string;
161
+ folder: string;
162
+ hasLiveVersion?: boolean;
163
+ hasTitleImage: boolean;
164
+ host: string;
165
+ hostName: string;
166
+ identifier: string;
167
+ inode: string;
168
+ image?: any;
169
+ languageId: number;
170
+ language?: string;
171
+ live: boolean;
172
+ locked: boolean;
173
+ mimeType?: string;
174
+ modDate: string;
175
+ modUser: string;
176
+ modUserName: string;
177
+ owner: string;
178
+ sortOrder: number;
179
+ stInode: string;
180
+ title: string;
181
+ titleImage: string;
182
+ text?: string;
183
+ url: string;
184
+ working: boolean;
185
+ body?: string;
186
+ contentTypeIcon?: string;
187
+ variant?: string;
188
+ __icon__?: string;
189
+ [key: string]: any;
190
+ }
191
+ export interface DotcmsNavigationItem {
192
+ code?: any;
193
+ folder: string;
194
+ children?: DotcmsNavigationItem[];
195
+ host: string;
196
+ languageId: number;
197
+ href: string;
198
+ title: string;
199
+ type: string;
200
+ hash: number;
201
+ target: string;
202
+ order: number;
203
+ }
204
+ interface DotCMSTemplate {
205
+ iDate: number;
206
+ type: string;
207
+ owner: string;
208
+ inode: string;
209
+ identifier: string;
210
+ source: string;
211
+ title: string;
212
+ friendlyName: string;
213
+ modDate: number;
214
+ modUser: string;
215
+ sortOrder: number;
216
+ showOnMenu: boolean;
217
+ image: string;
218
+ drawed: boolean;
219
+ drawedBody: string;
220
+ theme: string;
221
+ anonymous: boolean;
222
+ template: boolean;
223
+ name: string;
224
+ live: boolean;
225
+ archived: boolean;
226
+ locked: boolean;
227
+ working: boolean;
228
+ permissionId: string;
229
+ versionId: string;
230
+ versionType: string;
231
+ deleted: boolean;
232
+ permissionType: string;
233
+ categoryId: string;
234
+ idate: number;
235
+ new: boolean;
236
+ canEdit: boolean;
237
+ }
238
+ interface DotCMSPage {
239
+ template: string;
240
+ modDate: number;
241
+ metadata: string;
242
+ cachettl: string;
243
+ pageURI: string;
244
+ title: string;
245
+ type: string;
246
+ showOnMenu: string;
247
+ httpsRequired: boolean;
248
+ inode: string;
249
+ disabledWYSIWYG: any[];
250
+ seokeywords: string;
251
+ host: string;
252
+ lastReview: number;
253
+ working: boolean;
254
+ locked: boolean;
255
+ stInode: string;
256
+ friendlyName: string;
257
+ live: boolean;
258
+ owner: string;
259
+ identifier: string;
260
+ nullProperties: any[];
261
+ friendlyname: string;
262
+ pagemetadata: string;
263
+ languageId: number;
264
+ url: string;
265
+ seodescription: string;
266
+ modUserName: string;
267
+ folder: string;
268
+ deleted: boolean;
269
+ sortOrder: number;
270
+ modUser: string;
271
+ pageUrl: string;
272
+ workingInode: string;
273
+ shortyWorking: string;
274
+ canEdit: boolean;
275
+ canRead: boolean;
276
+ canLock: boolean;
277
+ lockedOn: number;
278
+ lockedBy: string;
279
+ lockedByName: string;
280
+ liveInode: string;
281
+ shortyLive: string;
282
+ }
283
+ interface DotCMSViewAs {
284
+ language: {
285
+ id: number;
286
+ languageCode: string;
287
+ countryCode: string;
288
+ language: string;
289
+ country: string;
290
+ };
291
+ mode: string;
292
+ }
293
+ interface DotCMSLayout {
294
+ pageWidth: string;
295
+ width: string;
296
+ layout: string;
297
+ title: string;
298
+ header: boolean;
299
+ footer: boolean;
300
+ body: DotPageAssetLayoutBody;
301
+ sidebar: DotPageAssetLayoutSidebar;
302
+ }
303
+ interface DotCMSContainerStructure {
304
+ id: string;
305
+ structureId: string;
306
+ containerInode: string;
307
+ containerId: string;
308
+ code: string;
309
+ contentTypeVar: string;
310
+ }
311
+ interface DotPageAssetLayoutSidebar {
312
+ preview: boolean;
313
+ containers: DotCMSContainer[];
314
+ location: string;
315
+ widthPercent: number;
316
+ width: string;
317
+ }
318
+ interface DotPageAssetLayoutBody {
319
+ rows: DotPageAssetLayoutRow[];
320
+ }
321
+ interface DotCMSSite {
322
+ lowIndexPriority: boolean;
323
+ name: string;
324
+ default: boolean;
325
+ aliases: string;
326
+ parent: boolean;
327
+ tagStorage: string;
328
+ systemHost: boolean;
329
+ inode: string;
330
+ versionType: string;
331
+ structureInode: string;
332
+ hostname: string;
333
+ hostThumbnail?: any;
334
+ owner: string;
335
+ permissionId: string;
336
+ permissionType: string;
337
+ type: string;
338
+ identifier: string;
339
+ modDate: number;
340
+ host: string;
341
+ live: boolean;
342
+ indexPolicy: string;
343
+ categoryId: string;
344
+ actionId?: any;
345
+ new: boolean;
346
+ archived: boolean;
347
+ locked: boolean;
348
+ disabledWysiwyg: any[];
349
+ modUser: string;
350
+ working: boolean;
351
+ titleImage: {
352
+ present: boolean;
353
+ };
354
+ folder: string;
355
+ htmlpage: boolean;
356
+ fileAsset: boolean;
357
+ vanityUrl: boolean;
358
+ keyValue: boolean;
359
+ structure?: DotCMSSiteStructure;
360
+ title: string;
361
+ languageId: number;
362
+ indexPolicyDependencies: string;
363
+ contentTypeId: string;
364
+ versionId: string;
365
+ lastReview: number;
366
+ nextReview?: any;
367
+ reviewInterval?: any;
368
+ sortOrder: number;
369
+ contentType: DotCMSSiteContentType;
370
+ }
371
+ interface DotCMSSiteContentType {
372
+ owner?: any;
373
+ parentPermissionable: DotCMSSiteParentPermissionable;
374
+ permissionId: string;
375
+ permissionType: string;
376
+ }
377
+ export interface DotCMSSiteParentPermissionable {
378
+ Inode: string;
379
+ Identifier: string;
380
+ permissionByIdentifier: boolean;
381
+ type: string;
382
+ owner?: any;
383
+ identifier: string;
384
+ permissionId: string;
385
+ parentPermissionable?: any;
386
+ permissionType: string;
387
+ inode: string;
388
+ childrenPermissionable?: any;
389
+ variantId?: string;
390
+ }
391
+ interface DotCMSSiteStructure {
392
+ iDate: number;
393
+ type: string;
394
+ owner?: any;
395
+ inode: string;
396
+ identifier: string;
397
+ name: string;
398
+ description: string;
399
+ defaultStructure: boolean;
400
+ reviewInterval?: any;
401
+ reviewerRole?: any;
402
+ pagedetail?: any;
403
+ structureType: number;
404
+ fixed: boolean;
405
+ system: boolean;
406
+ velocityVarName: string;
407
+ urlMapPattern?: any;
408
+ host: string;
409
+ folder: string;
410
+ publishDateVar?: any;
411
+ expireDateVar?: any;
412
+ modDate: number;
413
+ fields: DotCMSSiteField[];
414
+ widget: boolean;
415
+ detailPage?: any;
416
+ fieldsBySortOrder: DotCMSSiteField[];
417
+ form: boolean;
418
+ htmlpageAsset: boolean;
419
+ content: boolean;
420
+ fileAsset: boolean;
421
+ persona: boolean;
422
+ permissionId: string;
423
+ permissionType: string;
424
+ live: boolean;
425
+ categoryId: string;
426
+ idate: number;
427
+ new: boolean;
428
+ archived: boolean;
429
+ locked: boolean;
430
+ modUser: string;
431
+ working: boolean;
432
+ title: string;
433
+ versionId: string;
434
+ versionType: string;
435
+ }
436
+ interface DotCMSSiteField {
437
+ iDate: number;
438
+ type: string;
439
+ owner?: any;
440
+ inode: string;
441
+ identifier: string;
442
+ structureInode: string;
443
+ fieldName: string;
444
+ fieldType: string;
445
+ fieldRelationType?: any;
446
+ fieldContentlet: string;
447
+ required: boolean;
448
+ velocityVarName: string;
449
+ sortOrder: number;
450
+ values?: any;
451
+ regexCheck?: any;
452
+ hint?: any;
453
+ defaultValue?: any;
454
+ indexed: boolean;
455
+ listed: boolean;
456
+ fixed: boolean;
457
+ readOnly: boolean;
458
+ searchable: boolean;
459
+ unique: boolean;
460
+ modDate: number;
461
+ dataType: string;
462
+ live: boolean;
463
+ categoryId: string;
464
+ idate: number;
465
+ new: boolean;
466
+ archived: boolean;
467
+ locked: boolean;
468
+ modUser: string;
469
+ working: boolean;
470
+ permissionId: string;
471
+ parentPermissionable?: any;
472
+ permissionType: string;
473
+ title: string;
474
+ versionId: string;
475
+ versionType: string;
476
+ }
477
+ /**
478
+ * Represents a basic page structure returned from GraphQL queries
479
+ */
480
+ export interface DotCMSBasicGraphQLPage {
481
+ publishDate: string;
482
+ type: string;
483
+ httpsRequired: boolean;
484
+ inode: string;
485
+ path: string;
486
+ identifier: string;
487
+ hasTitleImage: boolean;
488
+ sortOrder: number;
489
+ extension: string;
490
+ canRead: boolean;
491
+ pageURI: string;
492
+ canEdit: boolean;
493
+ archived: boolean;
494
+ friendlyName: string;
495
+ workingInode: string;
496
+ url: string;
497
+ hasLiveVersion: boolean;
498
+ deleted: boolean;
499
+ pageUrl: string;
500
+ shortyWorking: string;
501
+ mimeType: string;
502
+ locked: boolean;
503
+ stInode: string;
504
+ contentType: string;
505
+ creationDate: string;
506
+ liveInode: string;
507
+ name: string;
508
+ shortyLive: string;
509
+ modDate: string;
510
+ title: string;
511
+ baseType: string;
512
+ working: boolean;
513
+ canLock: boolean;
514
+ live: boolean;
515
+ isContentlet: boolean;
516
+ statusIcons: string;
517
+ conLanguage: {
518
+ id: number;
519
+ language: string;
520
+ languageCode: string;
521
+ };
522
+ template: {
523
+ drawed: boolean;
524
+ };
525
+ containers: {
526
+ path?: string;
527
+ identifier: string;
528
+ maxContentlets?: number;
529
+ containerStructures?: {
530
+ contentTypeVar: string;
531
+ }[];
532
+ containerContentlets?: {
533
+ uuid: string;
534
+ contentlets: DotCMSContentlet[];
535
+ }[];
536
+ };
537
+ layout: DotCMSLayout;
538
+ viewAs: DotCMSViewAs;
539
+ }
540
+ export interface DotCMSPageGraphQLContainer {
541
+ path: string;
542
+ identifier: string;
543
+ maxContentlets?: number;
544
+ containerStructures: DotCMSContainerStructure[];
545
+ containerContentlets: DotCMSPageContainerContentlets[];
546
+ }
547
+ export interface DotCMSPageContainerContentlets {
548
+ uuid: string;
549
+ contentlets: DotCMSContentlet[];
550
+ }
551
+ export interface DotCMSGraphQLError {
552
+ message: string;
553
+ locations: {
554
+ line: number;
555
+ column: number;
556
+ }[];
557
+ extensions: {
558
+ classification: string;
559
+ };
560
+ }
561
+ /**
562
+ * Represents the complete response from a GraphQL page query
563
+ *
564
+ * @template TContent - The type of the content data
565
+ * @template TNav - The type of the navigation data
8
566
  */
9
- export type DotcmsClientListener = {
10
- action: string;
11
- event: string;
12
- callback: (...args: any[]) => void;
13
- };
567
+ export interface DotCMSGraphQLPageResponse<TContent = Record<string, any>> {
568
+ page: DotCMSBasicGraphQLPage;
569
+ content?: TContent;
570
+ errors?: DotCMSGraphQLError;
571
+ graphql: {
572
+ query: string;
573
+ variables: Record<string, unknown>;
574
+ };
575
+ }
576
+ export {};