@dotcms/types 0.0.1-beta.34 → 0.0.1-beta.35
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 +1 -1
- package/src/lib/page/public.d.ts +73 -42
package/package.json
CHANGED
package/src/lib/page/public.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a map of container identifiers to their container objects
|
|
3
|
+
*
|
|
4
|
+
* @interface DotCMSPageAssetContainers
|
|
5
|
+
* @property {string} [key] - The identifier of the container
|
|
6
|
+
* @property {DotCMSPageAssetContainer} [value] - The container object
|
|
7
|
+
*/
|
|
8
|
+
export interface DotCMSPageAssetContainers {
|
|
9
|
+
[key: string]: DotCMSPageAssetContainer;
|
|
10
|
+
}
|
|
1
11
|
/**
|
|
2
12
|
* Represents a DotCMS page asset that contains all the components and configuration needed to render a page
|
|
3
13
|
*
|
|
@@ -15,17 +25,17 @@
|
|
|
15
25
|
*/
|
|
16
26
|
export interface DotCMSPageAsset {
|
|
17
27
|
canCreateTemplate?: boolean;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
28
|
+
numberContents?: number;
|
|
29
|
+
containers: DotCMSPageAssetContainers;
|
|
21
30
|
layout: DotCMSLayout;
|
|
22
31
|
page: DotCMSPage;
|
|
23
32
|
site: DotCMSSite;
|
|
24
|
-
template: DotCMSTemplate
|
|
33
|
+
template: DotCMSTemplate | Pick<DotCMSTemplate, 'drawed' | 'theme' | 'anonymous' | 'identifier'>;
|
|
25
34
|
viewAs?: DotCMSViewAs;
|
|
26
35
|
vanityUrl?: DotCMSVanityUrl;
|
|
27
36
|
urlContentMap?: DotCMSURLContentMap;
|
|
28
37
|
params?: Record<string, unknown>;
|
|
38
|
+
runningExperimentId?: string;
|
|
29
39
|
}
|
|
30
40
|
/**
|
|
31
41
|
* Represents a URL to content mapping configuration that extends the basic contentlet
|
|
@@ -76,13 +86,15 @@ export interface DotCMSVanityUrl {
|
|
|
76
86
|
pattern: string;
|
|
77
87
|
vanityUrlId: string;
|
|
78
88
|
url: string;
|
|
89
|
+
uri?: string;
|
|
90
|
+
action?: number;
|
|
79
91
|
siteId: string;
|
|
80
92
|
languageId: number;
|
|
81
93
|
forwardTo: string;
|
|
82
94
|
response: number;
|
|
83
95
|
order: number;
|
|
84
|
-
temporaryRedirect
|
|
85
|
-
permanentRedirect
|
|
96
|
+
temporaryRedirect?: boolean;
|
|
97
|
+
permanentRedirect?: boolean;
|
|
86
98
|
forward: boolean;
|
|
87
99
|
}
|
|
88
100
|
/**
|
|
@@ -417,7 +429,7 @@ export interface DotCMSNavigationItem {
|
|
|
417
429
|
* @property {boolean} new - Whether template is new
|
|
418
430
|
* @property {boolean} canEdit - Whether current user can edit template
|
|
419
431
|
*/
|
|
420
|
-
interface DotCMSTemplate {
|
|
432
|
+
export interface DotCMSTemplate {
|
|
421
433
|
iDate: number;
|
|
422
434
|
type: string;
|
|
423
435
|
owner: string;
|
|
@@ -499,7 +511,7 @@ interface DotCMSTemplate {
|
|
|
499
511
|
* @property {string} liveInode - Live version inode
|
|
500
512
|
* @property {string} shortyLive - Short live version ID
|
|
501
513
|
*/
|
|
502
|
-
interface DotCMSPage {
|
|
514
|
+
export interface DotCMSPage {
|
|
503
515
|
template: string;
|
|
504
516
|
modDate: number;
|
|
505
517
|
metadata: string;
|
|
@@ -531,6 +543,8 @@ interface DotCMSPage {
|
|
|
531
543
|
folder: string;
|
|
532
544
|
deleted: boolean;
|
|
533
545
|
sortOrder: number;
|
|
546
|
+
rendered?: string;
|
|
547
|
+
contentType: string;
|
|
534
548
|
modUser: string;
|
|
535
549
|
pageUrl: string;
|
|
536
550
|
workingInode: string;
|
|
@@ -543,31 +557,46 @@ interface DotCMSPage {
|
|
|
543
557
|
lockedByName: string;
|
|
544
558
|
liveInode: string;
|
|
545
559
|
shortyLive: string;
|
|
560
|
+
canSeeRules?: boolean;
|
|
546
561
|
}
|
|
547
562
|
/**
|
|
548
|
-
* Represents
|
|
563
|
+
* Represents the language configuration for a DotCMS page
|
|
549
564
|
*
|
|
550
|
-
* @
|
|
551
|
-
* @
|
|
552
|
-
* @property {number}
|
|
553
|
-
* @property {string}
|
|
554
|
-
* @property {string}
|
|
555
|
-
* @property {string} language
|
|
556
|
-
* @property {string}
|
|
557
|
-
* @property {string} mode - View mode (e.g. PREVIEW_MODE, EDIT_MODE, LIVE)
|
|
565
|
+
* @export
|
|
566
|
+
* @interface DotCMSViewAsLanguage
|
|
567
|
+
* @property {number} id - Unique identifier for the language
|
|
568
|
+
* @property {string} languageCode - ISO 639-1 language code (e.g. 'en', 'es')
|
|
569
|
+
* @property {string} countryCode - ISO 3166-1 country code (e.g. 'US', 'ES')
|
|
570
|
+
* @property {string} language - Full name of the language (e.g. 'English', 'Spanish')
|
|
571
|
+
* @property {string} country - Full name of the country (e.g. 'United States', 'Spain')
|
|
558
572
|
*/
|
|
573
|
+
export interface DotCMSViewAsLanguage {
|
|
574
|
+
id: number;
|
|
575
|
+
languageCode: string;
|
|
576
|
+
countryCode: string;
|
|
577
|
+
language: string;
|
|
578
|
+
country: string;
|
|
579
|
+
}
|
|
559
580
|
/**
|
|
560
|
-
* Represents
|
|
581
|
+
* Represents the persona configuration for a DotCMS page
|
|
561
582
|
*
|
|
562
|
-
* @
|
|
563
|
-
* @
|
|
564
|
-
* @property {number}
|
|
565
|
-
* @property {string}
|
|
566
|
-
* @property {string}
|
|
567
|
-
* @property {string}
|
|
568
|
-
* @property {string}
|
|
569
|
-
* @property {string}
|
|
583
|
+
* @export
|
|
584
|
+
* @interface DotCMSViewAsPersona
|
|
585
|
+
* @property {number} modDate - Last modification date timestamp
|
|
586
|
+
* @property {string} inode - Unique inode identifier
|
|
587
|
+
* @property {string} name - Name of the persona
|
|
588
|
+
* @property {string} identifier - Unique identifier
|
|
589
|
+
* @property {string} keyTag - Key tag for the persona
|
|
590
|
+
* @property {string} photo - Photo of the persona
|
|
570
591
|
*/
|
|
592
|
+
export interface DotCMSViewAsPersona extends DotCMSBasicContentlet {
|
|
593
|
+
name: string;
|
|
594
|
+
keyTag: string;
|
|
595
|
+
personalized?: boolean;
|
|
596
|
+
photo?: {
|
|
597
|
+
versionPath: string;
|
|
598
|
+
};
|
|
599
|
+
}
|
|
571
600
|
/**
|
|
572
601
|
* Represents view configuration settings for preview/editing modes
|
|
573
602
|
*
|
|
@@ -580,15 +609,11 @@ interface DotCMSPage {
|
|
|
580
609
|
* @property {string} language.country - Full name of the country (e.g. 'United States', 'Spain')
|
|
581
610
|
* @property {string} mode - View mode for the page ('PREVIEW_MODE' | 'EDIT_MODE' | 'LIVE')
|
|
582
611
|
*/
|
|
583
|
-
interface DotCMSViewAs {
|
|
584
|
-
language:
|
|
585
|
-
id: number;
|
|
586
|
-
languageCode: string;
|
|
587
|
-
countryCode: string;
|
|
588
|
-
language: string;
|
|
589
|
-
country: string;
|
|
590
|
-
};
|
|
612
|
+
export interface DotCMSViewAs {
|
|
613
|
+
language: DotCMSViewAsLanguage;
|
|
591
614
|
mode: string;
|
|
615
|
+
persona?: DotCMSViewAsPersona;
|
|
616
|
+
variantId?: string;
|
|
592
617
|
}
|
|
593
618
|
/**
|
|
594
619
|
* Represents the layout configuration for a DotCMS page
|
|
@@ -603,7 +628,7 @@ interface DotCMSViewAs {
|
|
|
603
628
|
* @property {DotPageAssetLayoutBody} body - The main content body configuration
|
|
604
629
|
* @property {DotPageAssetLayoutSidebar} sidebar - The sidebar configuration
|
|
605
630
|
*/
|
|
606
|
-
interface DotCMSLayout {
|
|
631
|
+
export interface DotCMSLayout {
|
|
607
632
|
pageWidth: string;
|
|
608
633
|
width: string;
|
|
609
634
|
layout: string;
|
|
@@ -624,7 +649,7 @@ interface DotCMSLayout {
|
|
|
624
649
|
* @property {string} code - Template code for rendering the structure
|
|
625
650
|
* @property {string} contentTypeVar - Variable name of the content type
|
|
626
651
|
*/
|
|
627
|
-
interface DotCMSContainerStructure {
|
|
652
|
+
export interface DotCMSContainerStructure {
|
|
628
653
|
id: string;
|
|
629
654
|
structureId: string;
|
|
630
655
|
containerInode: string;
|
|
@@ -710,7 +735,7 @@ interface DotPageAssetLayoutBody {
|
|
|
710
735
|
* @property {number} sortOrder - Sort order position
|
|
711
736
|
* @property {DotCMSSiteContentType} contentType - Content type configuration
|
|
712
737
|
*/
|
|
713
|
-
interface DotCMSSite {
|
|
738
|
+
export interface DotCMSSite {
|
|
714
739
|
lowIndexPriority: boolean;
|
|
715
740
|
name: string;
|
|
716
741
|
default: boolean;
|
|
@@ -1036,7 +1061,8 @@ interface DotCMSSiteField {
|
|
|
1036
1061
|
* @property {DotCMSLayout} layout - Layout configuration
|
|
1037
1062
|
* @property {DotCMSViewAs} viewAs - View configuration
|
|
1038
1063
|
* @property {DotCMSURLContentMap} urlContentMap - URL to content mapping
|
|
1039
|
-
* @property {
|
|
1064
|
+
* @property {Record<string, unknown>} host - Site information
|
|
1065
|
+
* @property {Record<string, unknown>} vanityUrl - Vanity URL information
|
|
1040
1066
|
* @property {Record<string, unknown>} _map - Additional mapping data
|
|
1041
1067
|
*/
|
|
1042
1068
|
export interface DotCMSGraphQLPage {
|
|
@@ -1076,17 +1102,22 @@ export interface DotCMSGraphQLPage {
|
|
|
1076
1102
|
live: boolean;
|
|
1077
1103
|
isContentlet: boolean;
|
|
1078
1104
|
statusIcons: string;
|
|
1105
|
+
runningExperimentId?: string;
|
|
1106
|
+
canSeeRules?: boolean;
|
|
1079
1107
|
conLanguage: {
|
|
1080
1108
|
id: number;
|
|
1081
1109
|
language: string;
|
|
1082
1110
|
languageCode: string;
|
|
1083
1111
|
};
|
|
1084
|
-
template:
|
|
1112
|
+
template: Pick<DotCMSTemplate, 'drawed' | 'theme' | 'anonymous' | 'identifier'>;
|
|
1085
1113
|
containers: DotCMSGraphQLPageContainer[];
|
|
1086
1114
|
layout: DotCMSLayout;
|
|
1087
1115
|
viewAs: DotCMSViewAs;
|
|
1088
|
-
urlContentMap:
|
|
1089
|
-
|
|
1116
|
+
urlContentMap: {
|
|
1117
|
+
_map: DotCMSURLContentMap;
|
|
1118
|
+
};
|
|
1119
|
+
host: DotCMSSite;
|
|
1120
|
+
vanityUrl: DotCMSVanityUrl;
|
|
1090
1121
|
_map: Record<string, unknown>;
|
|
1091
1122
|
}
|
|
1092
1123
|
/**
|
|
@@ -1142,7 +1173,7 @@ export interface DotCMSGraphQLPageResponse {
|
|
|
1142
1173
|
export interface DotCMSPageResponse {
|
|
1143
1174
|
pageAsset: DotCMSPageAsset;
|
|
1144
1175
|
content?: Record<string, unknown> | unknown;
|
|
1145
|
-
|
|
1176
|
+
error?: DotCMSGraphQLError;
|
|
1146
1177
|
graphql: {
|
|
1147
1178
|
query: string;
|
|
1148
1179
|
variables: Record<string, unknown>;
|