@dotcms/types 0.0.1-beta.31 → 0.0.1-beta.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/types",
3
- "version": "0.0.1-beta.31",
3
+ "version": "0.0.1-beta.33",
4
4
  "keywords": [
5
5
  "dotCMS",
6
6
  "CMS",
@@ -1,7 +1,35 @@
1
+ import { UVE_MODE } from '../editor/public';
1
2
  /**
2
- * The parameters for the Page API.
3
+ * The GraphQL parameters for a page request.
3
4
  * @public
4
5
  */
6
+ export interface DotCMSGraphQLParams {
7
+ /**
8
+ * The GraphQL query for the page.
9
+ * @property {string} page - The GraphQL query for the page.
10
+ */
11
+ page?: string;
12
+ /**
13
+ * A record of GraphQL queries for content.
14
+ * @property {Record<string, string>} content - A record of GraphQL queries for content.
15
+ */
16
+ content?: Record<string, string>;
17
+ /**
18
+ * Variables for the GraphQL queries.
19
+ * @property {Record<string, string>} variables - Variables for the GraphQL queries.
20
+ */
21
+ variables?: Record<string, string>;
22
+ /**
23
+ * An array of GraphQL fragment strings.
24
+ * @property {string[]} fragments - An array of GraphQL fragment strings.
25
+ */
26
+ fragments?: string[];
27
+ }
28
+ /**
29
+ * Parameters for making a page request to DotCMS.
30
+ * @public
31
+ * @interface DotCMSPageRequestParams
32
+ */
5
33
  export interface DotCMSPageRequestParams {
6
34
  /**
7
35
  * The id of the site you want to interact with. Defaults to the one from the config if not provided.
@@ -10,7 +38,7 @@ export interface DotCMSPageRequestParams {
10
38
  /**
11
39
  * The mode of the page you want to retrieve. Defaults to the site's default mode if not provided.
12
40
  */
13
- mode?: 'EDIT_MODE' | 'PREVIEW_MODE' | 'LIVE';
41
+ mode?: keyof typeof UVE_MODE;
14
42
  /**
15
43
  * The language id of the page you want to retrieve. Defaults to the site's default language if not provided.
16
44
  */
@@ -38,12 +66,7 @@ export interface DotCMSPageRequestParams {
38
66
  /**
39
67
  * The GraphQL options for the page.
40
68
  */
41
- graphql?: {
42
- page?: string;
43
- content?: Record<string, string>;
44
- variables?: Record<string, string>;
45
- fragments?: string[];
46
- };
69
+ graphql?: DotCMSGraphQLParams;
47
70
  }
48
71
  /**
49
72
  * Options for configuring fetch requests, excluding body and method properties.
@@ -197,14 +197,3 @@ export interface EditableContainerData {
197
197
  maxContentlets: number;
198
198
  variantId?: string;
199
199
  }
200
- /**
201
- * Configuration for the UVE
202
- * @interface DotCMSUVEConfig
203
- */
204
- export interface DotCMSUVEConfig {
205
- graphql?: {
206
- query: string;
207
- variables: Record<string, unknown>;
208
- };
209
- params?: Record<string, unknown>;
210
- }
@@ -341,7 +341,7 @@ export interface DotCMSBasicContentlet {
341
341
  title: string;
342
342
  titleImage: string;
343
343
  text?: string;
344
- url: string;
344
+ url?: string;
345
345
  working: boolean;
346
346
  body?: string;
347
347
  contentTypeIcon?: string;
@@ -349,15 +349,15 @@ export interface DotCMSBasicContentlet {
349
349
  widgetTitle?: string;
350
350
  onNumberOfPages?: string;
351
351
  __icon__?: string;
352
- [key: string]: any;
352
+ _map?: Record<string, unknown>;
353
353
  }
354
354
  /**
355
355
  * Represents a navigation item in the DotCMS navigation structure
356
356
  *
357
- * @interface DotcmsNavigationItem
357
+ * @interface DotCMSNavigationItem
358
358
  * @property {string} [code] - Optional unique code identifier for the navigation item
359
359
  * @property {string} folder - The folder path where this navigation item is located
360
- * @property {DotcmsNavigationItem[]} [children] - Optional array of child navigation items
360
+ * @property {DotCMSNavigationItem[]} [children] - Optional array of child navigation items
361
361
  * @property {string} host - The host/site this navigation item belongs to
362
362
  * @property {number} languageId - The language ID for this navigation item
363
363
  * @property {string} href - The URL/link that this navigation item points to
@@ -367,10 +367,10 @@ export interface DotCMSBasicContentlet {
367
367
  * @property {string} target - The target attribute for the link (e.g. "_blank", "_self")
368
368
  * @property {number} order - The sort order position of this item in the navigation
369
369
  */
370
- export interface DotcmsNavigationItem {
370
+ export interface DotCMSNavigationItem {
371
371
  code?: string;
372
372
  folder: string;
373
- children?: DotcmsNavigationItem[];
373
+ children?: DotCMSNavigationItem[];
374
374
  host: string;
375
375
  languageId: number;
376
376
  href: string;