@griddo/cx 10.4.16 → 10.4.18

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 (104) hide show
  1. package/build/index.js +2 -2
  2. package/build/run-start-render.js +2 -2
  3. package/build/start-render.js +2 -2
  4. package/cx.config.d.ts +1 -1
  5. package/cx.config.js +2 -2
  6. package/{src → exporter}/adapters/gatsby/index.ts +12 -19
  7. package/{src → exporter}/utils/temp-utils.ts +4 -3
  8. package/{ssg/gatsby/gatsby-config.ts → gatsby-config.ts} +2 -1
  9. package/{ssg/gatsby/gatsby-node.ts → gatsby-node.ts} +15 -13
  10. package/package.json +20 -13
  11. package/{ssg/gatsby/src → src}/components/Head.tsx +1 -1
  12. package/{ssg/gatsby/src → src}/components/template.tsx +2 -1
  13. package/{ssg/gatsby/src → src}/gatsby-node-utils.ts +4 -3
  14. package/{ssg/gatsby/src → src}/types.ts +6 -6
  15. package/build/adapters/gatsby/index.d.ts +0 -2
  16. package/build/adapters/gatsby/utils.d.ts +0 -26
  17. package/build/adapters/index.d.ts +0 -3
  18. package/build/browser/index.d.ts +0 -5
  19. package/build/build-complete.d.ts +0 -18
  20. package/build/index.d.ts +0 -29
  21. package/build/move-assets.d.ts +0 -1
  22. package/build/react/index.d.ts +0 -2
  23. package/build/reset-render.d.ts +0 -1
  24. package/build/run-start-render.d.ts +0 -1
  25. package/build/services/auth.d.ts +0 -21
  26. package/build/services/distributors.d.ts +0 -45
  27. package/build/services/domains.d.ts +0 -8
  28. package/build/services/navigation.d.ts +0 -77
  29. package/build/services/robots.d.ts +0 -21
  30. package/build/services/settings.d.ts +0 -23
  31. package/build/services/sites.d.ts +0 -42
  32. package/build/services/store.d.ts +0 -6
  33. package/build/start-render.d.ts +0 -3
  34. package/build/types/api.d.ts +0 -130
  35. package/build/types/global.d.ts +0 -78
  36. package/build/types/navigation.d.ts +0 -28
  37. package/build/types/pages.d.ts +0 -128
  38. package/build/types/sites.d.ts +0 -43
  39. package/build/types/templates.d.ts +0 -8
  40. package/build/utils/api.d.ts +0 -23
  41. package/build/utils/cache.d.ts +0 -35
  42. package/build/utils/create-build-data.d.ts +0 -8
  43. package/build/utils/domains.d.ts +0 -5
  44. package/build/utils/folders.d.ts +0 -48
  45. package/build/utils/health-checks.d.ts +0 -7
  46. package/build/utils/instance.d.ts +0 -21
  47. package/build/utils/messages.d.ts +0 -2
  48. package/build/utils/pages.d.ts +0 -34
  49. package/build/utils/searches.d.ts +0 -14
  50. package/build/utils/shared.d.ts +0 -109
  51. package/build/utils/sites.d.ts +0 -36
  52. package/build/utils/store.d.ts +0 -63
  53. package/build/utils/temp-utils.d.ts +0 -10
  54. package/ssg/README.md +0 -1
  55. package/ssg/astro/.gitkeep +0 -0
  56. package/ssg/gatsby/.eslintrc.json +0 -51
  57. package/ssg/gatsby/.prettierignore +0 -6
  58. package/ssg/gatsby/.prettierrc.json +0 -3
  59. package/ssg/gatsby/package.json +0 -12
  60. package/ssg/gatsby/tsconfig.json +0 -15
  61. /package/{src → exporter}/adapters/gatsby/utils.ts +0 -0
  62. /package/{src → exporter}/adapters/index.ts +0 -0
  63. /package/{src → exporter}/browser/README.md +0 -0
  64. /package/{src → exporter}/browser/index.ts +0 -0
  65. /package/{src → exporter}/build-complete.ts +0 -0
  66. /package/{src → exporter}/index.ts +0 -0
  67. /package/{src → exporter}/move-assets.ts +0 -0
  68. /package/{src → exporter}/react/index.ts +0 -0
  69. /package/{src → exporter}/reset-render.ts +0 -0
  70. /package/{src → exporter}/run-start-render.ts +0 -0
  71. /package/{src → exporter}/services/auth.ts +0 -0
  72. /package/{src → exporter}/services/distributors.ts +0 -0
  73. /package/{src → exporter}/services/domains.ts +0 -0
  74. /package/{src → exporter}/services/navigation.ts +0 -0
  75. /package/{src → exporter}/services/robots.ts +0 -0
  76. /package/{src → exporter}/services/settings.ts +0 -0
  77. /package/{src → exporter}/services/sites.ts +0 -0
  78. /package/{src → exporter}/services/store.ts +0 -0
  79. /package/{src → exporter}/start-render.ts +0 -0
  80. /package/{src → exporter}/types/api.ts +0 -0
  81. /package/{src → exporter}/types/global.ts +0 -0
  82. /package/{src → exporter}/types/navigation.ts +0 -0
  83. /package/{src → exporter}/types/pages.ts +0 -0
  84. /package/{src → exporter}/types/sites.ts +0 -0
  85. /package/{src → exporter}/types/templates.ts +0 -0
  86. /package/{src → exporter}/utils/api.ts +0 -0
  87. /package/{src → exporter}/utils/cache.ts +0 -0
  88. /package/{src → exporter}/utils/create-build-data.ts +0 -0
  89. /package/{src → exporter}/utils/domains.ts +0 -0
  90. /package/{src → exporter}/utils/folders.ts +0 -0
  91. /package/{src → exporter}/utils/health-checks.ts +0 -0
  92. /package/{src → exporter}/utils/instance.ts +0 -0
  93. /package/{src → exporter}/utils/messages.ts +0 -0
  94. /package/{src → exporter}/utils/pages.ts +0 -0
  95. /package/{src → exporter}/utils/searches.ts +0 -0
  96. /package/{src → exporter}/utils/shared.ts +0 -0
  97. /package/{src → exporter}/utils/sites.ts +0 -0
  98. /package/{src → exporter}/utils/store.ts +0 -0
  99. /package/{ssg/gatsby/gatsby-browser.tsx → gatsby-browser.tsx} +0 -0
  100. /package/{ssg/gatsby/gatsby-ssr.tsx → gatsby-ssr.tsx} +0 -0
  101. /package/{ssg/gatsby/global.d.ts → global.d.ts} +0 -0
  102. /package/{ssg/gatsby/src → src}/README.md +0 -0
  103. /package/{ssg/gatsby/src → src}/html.tsx +0 -0
  104. /package/{ssg/gatsby/src → src}/utils.ts +0 -0
@@ -1,18 +0,0 @@
1
- type Report = {
2
- authControl: {
3
- Authorization: string;
4
- "Cache-Control": string;
5
- lang?: string | undefined;
6
- } | undefined;
7
- sites: Array<{
8
- siteId: number;
9
- publishHashes: Array<string>;
10
- siteHash: string | null;
11
- unpublishHashes: Array<string>;
12
- }>;
13
- };
14
- /**
15
- * Informa a la API del estado de publicación de los sites: published y unpublished.
16
- */
17
- export declare function buildComplete(report: Report): Promise<void>;
18
- export {};
package/build/index.d.ts DELETED
@@ -1,29 +0,0 @@
1
- /**
2
- *
3
- * Griddo CX library main export file.
4
- *
5
- * This file exports functions to use in both: adapters and SSG's frameworks.
6
- * Turning CX basically in a javascript library.
7
- *
8
- * # Browser context.
9
- * There is another export in the `/browser` directory to use exclusivelly in
10
- * the browser context where nodejs (path, fs, etc..) is not available.
11
- *
12
- * # Render script (bin)
13
- * The binary file of the package is `run-start-render.ts`.
14
- *
15
- * # Separate scripts.
16
- * There are some separate .ts files as build-complete.ts or reset-render.ts
17
- * that are intended to be used by infra via npm script like `npm run
18
- * build-complete`
19
- *
20
- */
21
- import type { SocialsResponse } from "./types/api";
22
- import type { AdditionalInfo, GriddoListPage, GriddoMultiPage, GriddoPageObject, GriddoSinglePage } from "./types/pages";
23
- import type { Site } from "./types/sites";
24
- import { startRender } from "./start-render";
25
- import { IS_COMPONENT_LIBRARY, PROJECT_ALIASES, resolveComponentsPath } from "./utils/instance";
26
- import { logInfo, logPageSize } from "./utils/shared";
27
- import { getBuildPages } from "./utils/store";
28
- import { getConfig } from "./utils/temp-utils";
29
- export { AdditionalInfo, GriddoListPage, GriddoMultiPage, GriddoPageObject, GriddoSinglePage, IS_COMPONENT_LIBRARY, PROJECT_ALIASES, Site, SocialsResponse, getBuildPages, getConfig, logInfo, logPageSize, resolveComponentsPath, startRender, };
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- declare function Foo(): null;
2
- export { Foo };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,21 +0,0 @@
1
- /**
2
- * Service for authentication in the Griddo Private API
3
- */
4
- declare class AuthService {
5
- user: string | undefined;
6
- password: string | undefined;
7
- baseUrl: string | undefined;
8
- headers: {
9
- Authorization: string;
10
- "Cache-Control": string;
11
- lang?: string;
12
- } | undefined;
13
- constructor();
14
- login(): Promise<{
15
- Authorization: string;
16
- "Cache-Control": string;
17
- lang?: string | undefined;
18
- } | undefined>;
19
- }
20
- declare const authService: AuthService;
21
- export { authService as AuthService };
@@ -1,45 +0,0 @@
1
- import type { FetchDataProps } from "../types/global";
2
- import type { APIPageObject } from "../types/pages";
3
- import type { Core, Fields } from "@griddo/core";
4
- /**
5
- * Service to work with distributors.
6
- */
7
- declare class DistributorService {
8
- /**
9
- * Get the body data from a ReferenceField.
10
- * `auto`, `manual` or `navigation` mode.
11
- *
12
- * @param data The ReferenceField props.
13
- * @returns The props for one of the ReferenceField mode.
14
- */
15
- static getBody(data: Fields.Reference<unknown>, page: Core.Page): Fields.Reference<unknown>;
16
- /**
17
- * Gets ContentType data from API
18
- *
19
- * @param props
20
- * @param props.page The Page object
21
- * @param props.component.data The ReferenceField, always in the data prop.
22
- * @param props.cacheKey A cache key to manage cached files or using fetch
23
- * @returns The ContentType data.
24
- */
25
- static fetchContentTypeData(props: FetchDataProps): Promise<import("../types/api").DistributorResponse>;
26
- /**
27
- * Compose the queriedItems prop from a distributor data of a page.
28
- *
29
- * @param props
30
- * @param props.page The APIPage object
31
- * @param props.cacheKey A cache key to manage cached files or using fetch
32
- */
33
- static getDistributorData({ page, cacheKey, }: {
34
- page: APIPageObject;
35
- /** Reference id to manage cache between renders. */
36
- cacheKey: string;
37
- }): Promise<{
38
- [key: string]: any;
39
- type: "template";
40
- templateType: string;
41
- activeSectionSlug: string;
42
- activeSectionBase: string;
43
- }>;
44
- }
45
- export { DistributorService };
@@ -1,8 +0,0 @@
1
- import type { Domains } from "../types/global";
2
- /**
3
- * Get an array of domains availables.
4
- */
5
- declare class DomainsService {
6
- static getAll(): Promise<Domains>;
7
- }
8
- export { DomainsService };
@@ -1,77 +0,0 @@
1
- import type { Footer, Header } from "../types/navigation";
2
- import type { APIPageObject } from "../types/pages";
3
- /**
4
- * TODO: JSDoc
5
- */
6
- declare class NavigationService {
7
- private _defaultHeaders;
8
- private _defaultFooters;
9
- private _navigations;
10
- constructor();
11
- /**
12
- * TODO: JSDoc
13
- */
14
- set navigations(navigations: {
15
- headers: Header[];
16
- footers: Footer[];
17
- });
18
- /**
19
- * TODO: JSDoc
20
- */
21
- get navigations(): {
22
- headers: Header[];
23
- footers: Footer[];
24
- };
25
- /**
26
- * TODO: JSDoc
27
- */
28
- getDefaultFooters(): {};
29
- /**
30
- * TODO: JSDoc
31
- */
32
- getDefaultHeaders(): {};
33
- /**
34
- * TODO: JSDoc
35
- */
36
- getRightLanguage(list: Array<{
37
- language: number;
38
- navigationLanguages: Array<{
39
- navigationId: number;
40
- }>;
41
- id: number;
42
- }>, id: number, language: number): {
43
- language: number;
44
- navigationLanguages: Array<{
45
- navigationId: number;
46
- }>;
47
- id: number;
48
- } | null;
49
- /**
50
- * TODO: JSDoc
51
- */
52
- getPageHeader(id: number, language: number): {
53
- language: number;
54
- navigationLanguages: {
55
- navigationId: number;
56
- }[];
57
- id: number;
58
- } | null;
59
- /**
60
- * TODO: JSDoc
61
- */
62
- getPageFooter(id: number, language: number): {
63
- language: number;
64
- navigationLanguages: {
65
- navigationId: number;
66
- }[];
67
- id: number;
68
- } | null;
69
- /**
70
- * TODO: JSDoc
71
- */
72
- getPageNavigations(page: APIPageObject): {
73
- header: Header;
74
- footer: Footer;
75
- };
76
- }
77
- export { NavigationService };
@@ -1,21 +0,0 @@
1
- import type { Robots } from "../types/global";
2
- /**
3
- * TODO: JSDoc
4
- */
5
- declare class RobotsService {
6
- robots: Robots;
7
- baseURL: string | undefined;
8
- settings: Record<string, unknown>;
9
- endpoint: string;
10
- constructor();
11
- /**
12
- * TODO: JSDoc
13
- */
14
- private getRobots;
15
- /**
16
- * Write robots.txt files for the current rendering domain.
17
- */
18
- writeFiles(domain: string): Promise<void>;
19
- }
20
- declare const robotsService: RobotsService;
21
- export { robotsService as RobotsService };
@@ -1,23 +0,0 @@
1
- import type { Settings } from "../types/global";
2
- /**
3
- * TODO: JSDoc
4
- */
5
- declare class SettingsService {
6
- baseURL?: string;
7
- settings: Settings;
8
- ENDPOINTS: {
9
- settings: string;
10
- resetRender: string;
11
- };
12
- constructor();
13
- /**
14
- * Get settings for a full domain render.
15
- */
16
- getAll(): Promise<void>;
17
- /**
18
- * TODO: JSDoc
19
- */
20
- resetRender(): Promise<void>;
21
- }
22
- declare const settingsService: SettingsService;
23
- export { settingsService as SettingsService };
@@ -1,42 +0,0 @@
1
- import type { AllSitesReponse, DistributorBody, DistributorResponse, EndPageInfoResponse, EndSiteRenderBody, LanguagesResponse, SitemapAPIResponse, SocialsResponse, StartPageRenderResponse } from "../types/api";
2
- import type { Site } from "../types/sites";
3
- import type { Core } from "@griddo/core";
4
- /**
5
- * TODO: JSDoc
6
- */
7
- declare class SitesService {
8
- static getAll(): Promise<AllSitesReponse>;
9
- /**
10
- * Fetch a page object from API.
11
- */
12
- static getPage(id: number, cacheKey: string): Promise<import("../types/pages").APIPageObject>;
13
- /**
14
- * Get site info
15
- */
16
- static getInfo(id: number, cacheKey?: string): Promise<Site>;
17
- /**
18
- * TODO: JSDoc
19
- */
20
- static getLanguages(id: number, cacheKey?: string): Promise<LanguagesResponse>;
21
- /**
22
- * TODO: JSDoc
23
- */
24
- static startSiteRender(id: number): Promise<StartPageRenderResponse>;
25
- /**
26
- * Send the end signal to API for a render site.
27
- */
28
- static endSiteRender(id: number, body: EndSiteRenderBody): Promise<EndPageInfoResponse>;
29
- /**
30
- * TODO: JSDoc
31
- */
32
- static getDistributorData(page: Core.Page, body: DistributorBody, cacheKey: string, dataSiteId?: number, dataLangID?: number): Promise<DistributorResponse>;
33
- /**
34
- * TODO: JSDoc
35
- */
36
- static getSitemap(id: number): Promise<SitemapAPIResponse>;
37
- /**
38
- * TODO: JSDoc
39
- */
40
- static getSocials(id: number, cacheKey?: string): Promise<SocialsResponse>;
41
- }
42
- export { SitesService };
@@ -1,6 +0,0 @@
1
- /**
2
- * Fetch, process and save object pages and sites data into the file system to
3
- * be consumed by other services (Griddo itself, Adapters, etc.)
4
- */
5
- declare function createStore(storeDir: string, domain: string): Promise<void>;
6
- export { createStore };
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- declare function startRender(): Promise<void>;
3
- export { startRender };
@@ -1,130 +0,0 @@
1
- import type { Domains, Robots, Settings } from "./global";
2
- import type { APIPageObject } from "./pages";
3
- import type { Site } from "./sites";
4
- import type { Core, Fields } from "@griddo/core";
5
- /** EndSiteRender Body */
6
- export type EndSiteRenderBody = {
7
- /** Site hashes to publish. */
8
- publishHashes: Array<string>;
9
- /** Current site hash. */
10
- siteHash: string | null;
11
- /** Site hashes to unpublish. */
12
- unpublishHashes: Array<string>;
13
- };
14
- /** Distributor Body */
15
- export interface DistributorBody {
16
- mode?: "auto" | "manual" | "navigation";
17
- order?: string;
18
- sources?: Array<Fields.Source<unknown>>;
19
- quantity?: number;
20
- filter?: Array<unknown>;
21
- fullRelations?: boolean;
22
- allLanguages?: boolean;
23
- fixed?: Array<number>;
24
- referenceId?: number;
25
- }
26
- /** Describes an item in a sitemap. */
27
- interface SitemapItem {
28
- /** The URL of the page. */
29
- loc: string;
30
- /** The date the page was last modified. */
31
- lastmod: string;
32
- /** The priority of the page. */
33
- priority: number;
34
- }
35
- /** Describes a URL. */
36
- interface URL {
37
- /** The path of the URL. */
38
- path: string;
39
- /** The domain of the URL. */
40
- domain: string;
41
- /** The home of the URL. */
42
- home: string;
43
- }
44
- /** Describes the items returned by a sitemap response. */
45
- export type SitemapItems = Record<string, Array<SitemapItem>>;
46
- /** Describes the response object returned by a Griddo distributor. */
47
- export type DistributorResponse = Fields.QueriedData<unknown>;
48
- /** Describes the response object returned by socials from Griddo. */
49
- export type SocialsResponse = Record<Core.SocialName, string>;
50
- /** Describes the response object returned by post search info post. */
51
- export type PostSearchInfoResponse = {
52
- code: number;
53
- message: string;
54
- };
55
- /** Describes the response object returned by a sitemap. */
56
- export interface SitemapAPIResponse {
57
- /** Number of items */
58
- totalItems: number;
59
- /** Page id */
60
- page: number;
61
- /** Item response by API */
62
- items: SitemapItems;
63
- /** Url */
64
- url: URL;
65
- }
66
- /** Descripbes Language responses from Griddo API. */
67
- export interface LanguagesResponse {
68
- /** Total of languages */
69
- totalItems: number;
70
- /** Array of languages objects */
71
- items: Array<Core.SiteLanguage>;
72
- }
73
- /** Describes common props for api responses. */
74
- export interface APIRequest {
75
- /** The URL of the API endpoint. */
76
- endpoint: string;
77
- /** The parameters to be sent in the request body. */
78
- body?: unknown;
79
- /** Reference id to manage cache between renders. */
80
- cacheKey?: string;
81
- /** Number of connection attempts (in case it fails on the first attempt). */
82
- attempt?: number;
83
- /** Headers for the post api fetch */
84
- headers?: Record<string, unknown>;
85
- }
86
- /** Type with the POST request properties. */
87
- export interface PostAPI extends Omit<APIRequest, "headers"> {
88
- headers?: {
89
- lang?: number;
90
- } & Record<string, unknown>;
91
- }
92
- /** Type with the GET request properties. */
93
- export type GetAPI = APIRequest;
94
- /** Type with the PUT request properties. */
95
- export type PutAPI = APIRequest;
96
- /** Response type for the start render API call */
97
- export interface StartPageRenderResponse {
98
- /** Site hashes to publish */
99
- publishIds: Array<number>;
100
- /** Current site hash */
101
- siteHash: string | null;
102
- /** Site hashes to unpublish */
103
- unpublishHashes: Array<string>;
104
- }
105
- /** Response type for the end render API call */
106
- export interface EndPageInfoResponse {
107
- /** Response code */
108
- code: number;
109
- /** Response message */
110
- message: string;
111
- }
112
- /** Describes a response type for GET all sites */
113
- export type AllSitesReponse = Array<Site>;
114
- /** Describes a response type for GET one page */
115
- export type PageResponse = APIPageObject;
116
- /** All types for the API response used in the api functions get, put, post */
117
- export type APIResponses = Domains | Robots | Settings | AllSitesReponse | Site | LanguagesResponse | StartPageRenderResponse | SitemapAPIResponse | SocialsResponse | PageResponse | EndPageInfoResponse | DistributorResponse | PostSearchInfoResponse;
118
- export interface ShowApiErrorOptions {
119
- callInfo: {
120
- endpoint?: string;
121
- body?: unknown;
122
- headers?: unknown;
123
- };
124
- }
125
- export interface BuildMetaData {
126
- buildProcessData: Record<string, EndSiteRenderBody>;
127
- createdPages: Array<number>;
128
- sitesToPublish: Array<Site>;
129
- }
130
- export {};
@@ -1,78 +0,0 @@
1
- import type { EndSiteRenderBody } from "./api";
2
- import type { Core, Fields } from "@griddo/core";
3
- import { Site } from "./sites";
4
- interface Settings {
5
- apiVersion?: string;
6
- avoidCanonicalsOnSitemaps?: boolean;
7
- avoidDebugMetas?: boolean;
8
- avoidHrefLangsOnCanonicals?: boolean;
9
- avoidHrefLangXDefault?: boolean;
10
- avoidSelfReferenceCanonicals?: boolean;
11
- cloudinaryName?: string;
12
- forceMenuLinksLanguage?: boolean;
13
- globalLogoBig?: string;
14
- globalLogoMini?: string;
15
- lastDBCheckVersion?: string;
16
- schemasTimestamp?: string;
17
- schemasVersion?: string;
18
- showBasicMetaRobots?: boolean;
19
- siteLogoBig?: string;
20
- siteLogoMini?: string;
21
- skipReviewOnPublish?: boolean;
22
- useMetaTitle?: boolean;
23
- useMetaKeywords?: boolean;
24
- welcomeText1?: string;
25
- welcomeText2?: string;
26
- }
27
- type Petition = Record<string, unknown>;
28
- interface PostSearchInfoProps {
29
- title?: string;
30
- description: string | null | undefined;
31
- image: string | null | undefined;
32
- pageId?: number;
33
- siteId: number;
34
- content: string;
35
- languageId?: number;
36
- template?: string | null | number;
37
- url?: string;
38
- }
39
- interface FetchDataProps {
40
- page: Core.Page;
41
- component: {
42
- data?: Fields.Reference<unknown>;
43
- };
44
- /** Reference id to manage cache between renders. */
45
- cacheKey: string;
46
- }
47
- type Domains = Array<{
48
- id: number;
49
- slug: string;
50
- url: string;
51
- }>;
52
- /** Describes the type of build process data object. */
53
- type BuildProcessData = Record<string, EndSiteRenderBody>;
54
- type Robot = {
55
- path: string;
56
- content: string;
57
- };
58
- type Robots = Array<Robot>;
59
- interface RenderInfo {
60
- buildProcessData: BuildProcessData;
61
- createdPages: Array<number>;
62
- sitesToPublish: Array<Site>;
63
- }
64
- type LifeCyclesNames = "Prepare" | "Restore" | "Data" | "SSG" | "Relocation" | "Meta" | "Archive" | "Clean" | "__DEBUG__";
65
- type CXDir = "__exports" | "__caches" | "__cx" | "__ssg" | "__components" | "__root";
66
- interface CXConfig {
67
- proDomain: string;
68
- CXDir: {
69
- EXPORTS: "__exports";
70
- CACHE: "__caches";
71
- CX: "__cx";
72
- SSG: "__ssg";
73
- COMPONENTS: "__components";
74
- ROOT: "__root";
75
- };
76
- dirs: (domain?: string) => Record<CXDir, string>;
77
- }
78
- export { BuildProcessData, CXConfig, CXDir, Domains, FetchDataProps, LifeCyclesNames, Petition, PostSearchInfoProps, RenderInfo, Robot, Robots, Settings, };
@@ -1,28 +0,0 @@
1
- /** Describes a Griddo Header */
2
- export type Header = {
3
- component: "Header";
4
- id: number;
5
- isDefault: boolean;
6
- language: number;
7
- navigationLanguages: Array<{
8
- navigationId: number;
9
- }>;
10
- setAsDefault: boolean;
11
- theme: null | string;
12
- title: string;
13
- type: "header";
14
- };
15
- /** Describes a Griddo Footer */
16
- export type Footer = {
17
- component: "Footer";
18
- id: number;
19
- isDefault: boolean;
20
- language: number;
21
- navigationLanguages: Array<{
22
- navigationId: number;
23
- }>;
24
- setAsDefault: boolean;
25
- theme: null | string;
26
- title: string;
27
- type: "header";
28
- };
@@ -1,128 +0,0 @@
1
- import type { SocialsResponse } from "./api";
2
- import type { Settings } from "./global";
3
- import type { Site } from "./sites";
4
- import type { Core, Fields } from "@griddo/core";
5
- export type APIPageObject = Core.Page & {
6
- id: number;
7
- } & {
8
- header: number | null;
9
- footer: number | null;
10
- };
11
- export type CleanPage = Core.Page & {
12
- isRoot: boolean;
13
- defaultLang?: Core.SiteLanguage | undefined;
14
- };
15
- export type RenderPage = Core.Page & {
16
- isRoot?: boolean;
17
- multiPageElements: MultiPageElements;
18
- defaultLang?: Core.SiteLanguage;
19
- header: number;
20
- footer: number;
21
- id: number;
22
- path: string;
23
- component: "Page";
24
- template_id: string;
25
- mode: "list";
26
- };
27
- export type GriddoSinglePage = Core.Page & {
28
- defaultLang?: Core.SiteLanguage;
29
- };
30
- export type GriddoListPage = Core.Page & {
31
- page: APIPageObject;
32
- pages: Array<Array<Fields.QueriedDataItem>>;
33
- isRoot?: boolean;
34
- defaultLang?: Core.SiteLanguage;
35
- template: {
36
- [key: string]: unknown;
37
- type: "template";
38
- templateType: string;
39
- activeSectionSlug: string;
40
- activeSectionBase: string;
41
- };
42
- totalQueriedItems: Array<Fields.QueriedDataItem>;
43
- };
44
- export type GriddoMultiPage = Core.Page & {
45
- header: number | null;
46
- footer: number | null;
47
- isRoot?: boolean;
48
- multiPageElements: MultiPageElements;
49
- defaultLang?: Core.SiteLanguage | undefined;
50
- };
51
- export interface AdditionalInfo {
52
- baseUrl: string;
53
- cloudinaryName?: string;
54
- griddoVersion: string;
55
- instance?: string;
56
- publicBaseUrl: string;
57
- siteLangs: Array<Core.SiteLanguage>;
58
- siteMetadata: Site["siteMetadata"];
59
- siteSlug: string;
60
- socials: SocialsResponse;
61
- siteOptions: Pick<Settings, "useMetaTitle" | "useMetaKeywords" | "showBasicMetaRobots" | "avoidHrefLangsOnCanonicals" | "avoidSelfReferenceCanonicals" | "avoidHrefLangXDefault" | "avoidDebugMetas">;
62
- siteScript: string;
63
- theme: string;
64
- }
65
- export interface PageAdditionalInfo extends AdditionalInfo {
66
- navigations: {
67
- header: Record<string, unknown> | null;
68
- footer: Record<string, unknown> | null;
69
- };
70
- }
71
- export type MultiPageElement = {
72
- component: string;
73
- title: string | Required<Fields.Heading>;
74
- elements: Array<Record<string, unknown>>;
75
- componentModules: Array<Record<string, unknown>>;
76
- sectionSlug: string;
77
- metaTitle: string;
78
- metaDescription: string;
79
- };
80
- export type MultiPageElements = Array<MultiPageElement>;
81
- /**
82
- * Gatsby page object format.
83
- */
84
- export type GriddoPageObject = {
85
- matchPath?: string;
86
- path: string;
87
- /** Page size in bytes */
88
- size?: number;
89
- context: {
90
- cloudinaryName?: string;
91
- footer: Record<string, unknown> | null;
92
- fullPath: Core.Page["fullPath"];
93
- griddoVersion: string;
94
- renderDate: string;
95
- header: Record<string, unknown> | null;
96
- id?: number;
97
- languageId: number;
98
- locale?: string;
99
- openGraph: {
100
- description?: string;
101
- image?: string | null;
102
- title?: string;
103
- twitterImage?: string | null;
104
- type: "website";
105
- };
106
- pageMetadata: {
107
- canonical?: string | undefined;
108
- description?: string;
109
- follow?: "follow" | "nofollow";
110
- index: "index" | "noindex";
111
- locale?: string;
112
- metaKeywords?: string;
113
- metasAdvanced?: string;
114
- pageLanguages?: Core.Page["pageLanguages"];
115
- title?: string;
116
- translate?: "notranslate" | "";
117
- url?: string;
118
- };
119
- siteMetadata: Site["siteMetadata"];
120
- theme: string;
121
- title: string;
122
- siteLangs: Array<Core.SiteLanguage>;
123
- siteOptions: AdditionalInfo["siteOptions"];
124
- siteScript: string;
125
- socials: SocialsResponse;
126
- page: GriddoSinglePage | GriddoListPage | GriddoMultiPage;
127
- };
128
- };