@griddo/api-types 1.0.31 → 1.1.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,5 @@
1
+ export interface ContentPresence {
2
+ presenceType: 'page-specific' | 'page-custom' | 'page-manual' | 'all';
3
+ relatedPages: Array<number> | null;
4
+ }
5
+ export type ContentBodyPosition = 'start' | 'end';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ import type { PageIntegration } from 'src/pages';
2
+ export type Integration = Pick<PageIntegration, 'name' | 'description' | 'site' | 'contentHead' | 'contentBody' | 'contentBodyPosition' | 'contentPresence' | 'active' | 'type'>;
3
+ export interface DataPackSiteConfigDataDTO {
4
+ defaultParent?: null | number;
5
+ modifiableOnPage?: boolean;
6
+ indexDefault?: boolean;
7
+ defaultTemplate?: null;
8
+ defaultHeader?: null | number;
9
+ defaultFooter?: null | number;
10
+ import?: Record<string, unknown>[];
11
+ templates?: {
12
+ [templateName: string]: {
13
+ integrations: Integration[];
14
+ };
15
+ };
16
+ }
17
+ export interface DataPackSiteDTO {
18
+ id?: number | null;
19
+ siteId: number;
20
+ dataPackId: string;
21
+ config?: DataPackSiteConfigDataDTO | null;
22
+ deleted: boolean | 1 | 0;
23
+ }
24
+ export type DataPackSiteUpdateParamsDTO = Omit<DataPackSiteDTO, 'deleted' | 'id'>;
25
+ export interface DataPackConfigConfigParams {
26
+ id: string;
27
+ site: string;
28
+ }
29
+ export type DataPackConfigRequest = DataPackSiteConfigDataDTO;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './config';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./config"), exports);
package/dist/index.d.ts CHANGED
@@ -1,2 +1,8 @@
1
1
  export * from './common';
2
2
  export * from './logs';
3
+ export * from './schemas';
4
+ export * from './dataPack';
5
+ export * from './site';
6
+ export * from './redirects';
7
+ export * from './add-ons';
8
+ export * from './pages';
package/dist/index.js CHANGED
@@ -16,3 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
18
  __exportStar(require("./logs"), exports);
19
+ __exportStar(require("./schemas"), exports);
20
+ __exportStar(require("./dataPack"), exports);
21
+ __exportStar(require("./site"), exports);
22
+ __exportStar(require("./redirects"), exports);
23
+ __exportStar(require("./add-ons"), exports);
24
+ __exportStar(require("./pages"), exports);
@@ -0,0 +1,14 @@
1
+ import type { ContentBodyPosition, ContentPresence } from 'src/add-ons';
2
+ export type PageIntegrationType = 'addon' | 'analytics' | 'datalayer';
3
+ export interface PageIntegration {
4
+ id: number;
5
+ name: string;
6
+ description: string;
7
+ site: number;
8
+ contentHead: string | null;
9
+ contentBody: string | null;
10
+ contentBodyPosition: ContentBodyPosition;
11
+ contentPresence: ContentPresence;
12
+ active: boolean;
13
+ type: PageIntegrationType;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface CleanCorruptedPagesResponse {
2
+ deletedPages: number;
3
+ deletedStructuredData: number;
4
+ liveStatusStructuredDataUpdate: number;
5
+ unpublishedStructuredDataUpdate: number;
6
+ orphanStructureDataDelete: number;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './add-ons';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./add-ons"), exports);
@@ -0,0 +1,7 @@
1
+ export interface RedirectDTO {
2
+ pageId: number;
3
+ siteId: number;
4
+ languageId: number;
5
+ slug: string;
6
+ parentSlug: string | null;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from './select';
2
+ export * from './schemas';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./select"), exports);
18
+ __exportStar(require("./schemas"), exports);
@@ -0,0 +1,209 @@
1
+ export interface SchemaConfig {
2
+ menus: SchemaMenu[];
3
+ themes: SchemaTheme[];
4
+ subthemes: string[];
5
+ languages: Record<string, SchemaLanguage>;
6
+ menuItems: SchemaMenuItems;
7
+ moduleCategories: SchemaCategory[];
8
+ richTextConfig: SchemaRichTextConfig;
9
+ }
10
+ export interface SchemaMenu {
11
+ key: string;
12
+ display: string;
13
+ }
14
+ export interface SchemaTheme {
15
+ default?: boolean;
16
+ label: string;
17
+ value: string;
18
+ elements?: {
19
+ include: {
20
+ datapacks: string[];
21
+ modules: string[];
22
+ };
23
+ };
24
+ }
25
+ export interface SchemaLanguage {
26
+ name: string;
27
+ label: string;
28
+ }
29
+ export interface SchemaMenuItems {
30
+ link: SchemaMenuItemConfig;
31
+ group: SchemaMenuItemConfig;
32
+ }
33
+ export interface SchemaMenuItemConfig {
34
+ fields: SchemaField[];
35
+ }
36
+ export interface SchemaCategory {
37
+ label: string;
38
+ value: string;
39
+ featured?: boolean;
40
+ }
41
+ export interface SchemaRichTextConfig {
42
+ paragraphStyles: SchemaStyleConfig[];
43
+ tableStyles: SchemaStyleConfig[];
44
+ tableCellStyles: SchemaStyleConfig[];
45
+ editorLangs: SchemaEditorLang[];
46
+ }
47
+ export interface SchemaStyleConfig {
48
+ label: string;
49
+ className: string;
50
+ }
51
+ export interface SchemaEditorLang {
52
+ name: string;
53
+ iso: string;
54
+ featured?: boolean;
55
+ }
56
+ export interface SchemaField {
57
+ title?: string;
58
+ type: string;
59
+ key: string;
60
+ placeholder?: string;
61
+ options?: SchemaOption[];
62
+ auxText?: string;
63
+ helptext?: string;
64
+ background?: boolean;
65
+ default?: SchemaHeadingDefault;
66
+ advanced?: boolean;
67
+ hideable?: boolean;
68
+ isMockup?: boolean;
69
+ mandatory?: boolean;
70
+ humanReadable?: boolean;
71
+ full?: boolean;
72
+ whiteList?: string[];
73
+ contentType?: string;
74
+ maxItems?: number;
75
+ prefix?: string;
76
+ columns?: number;
77
+ filled?: boolean;
78
+ categories?: string[];
79
+ fields?: SchemaField[];
80
+ overwrite?: boolean;
81
+ }
82
+ export interface SchemaOption {
83
+ value: string;
84
+ label?: string;
85
+ name?: string;
86
+ title?: string;
87
+ img?: string;
88
+ theme?: string;
89
+ options?: SchemaOption[];
90
+ }
91
+ export interface SchemaHeadingDefault {
92
+ content: string;
93
+ tag: string;
94
+ }
95
+ export interface SchemaComponent {
96
+ schemaType: string;
97
+ component: string;
98
+ displayName: string;
99
+ configTabs?: SchemaConfigTab[];
100
+ default: SchemaComponentDefault;
101
+ thumbnails: SchemaThumbnails;
102
+ category?: string;
103
+ }
104
+ export interface SchemaConfigTab {
105
+ title: string;
106
+ fields: SchemaField[];
107
+ }
108
+ export interface SchemaComponentDefault {
109
+ component: string;
110
+ [key: string]: any;
111
+ }
112
+ export interface SchemaThumbnails {
113
+ '1x': string;
114
+ '2x': string;
115
+ }
116
+ export interface SchemaModule extends SchemaComponent {
117
+ category: string;
118
+ }
119
+ export interface SchemaTemplate {
120
+ schemaType: string;
121
+ displayName: string;
122
+ component: string;
123
+ type: SchemaTemplateType;
124
+ dimensions: any[];
125
+ content: SchemaField[];
126
+ default: SchemaTemplateDefault;
127
+ thumbnails: SchemaThumbnails;
128
+ }
129
+ export interface SchemaTemplateType {
130
+ label: string;
131
+ value: string;
132
+ }
133
+ export interface SchemaTemplateDefault {
134
+ type: string;
135
+ templateType: string;
136
+ [key: string]: any;
137
+ }
138
+ export interface SchemaUI {
139
+ components: Record<string, SchemaComponent>;
140
+ modules: Record<string, SchemaModule>;
141
+ templates: Record<string, SchemaTemplate>;
142
+ }
143
+ export interface SchemaContentTypes {
144
+ dataPacks: Record<string, SchemaDataPack>;
145
+ dataPacksCategories: Record<string, SchemaDataPackCategory>;
146
+ structuredData: Record<string, SchemaStructuredData>;
147
+ }
148
+ export interface SchemaDataPack {
149
+ title: string;
150
+ category: string;
151
+ description: string;
152
+ image: string;
153
+ }
154
+ export interface SchemaDataPackCategory {
155
+ title: string;
156
+ }
157
+ export interface SchemaStructuredData {
158
+ dataPacks: string[];
159
+ title: string;
160
+ local: boolean;
161
+ translate: boolean;
162
+ taxonomy: boolean;
163
+ fromPage: boolean;
164
+ }
165
+ export interface SchemaForms {
166
+ templates: Record<string, SchemaFormTemplate>;
167
+ fields: Record<string, SchemaFormField>;
168
+ categories: SchemaCategory[];
169
+ templateCategories: SchemaCategory[];
170
+ }
171
+ export interface SchemaFormTemplate {
172
+ schemaType: string;
173
+ displayName: string;
174
+ component: string;
175
+ category?: string;
176
+ content: SchemaField[];
177
+ config: SchemaField[];
178
+ default: SchemaFormTemplateDefault;
179
+ thumbnails: SchemaThumbnails;
180
+ }
181
+ export interface SchemaFormTemplateDefault {
182
+ type: string;
183
+ templateType: string;
184
+ [key: string]: any;
185
+ }
186
+ export interface SchemaFormField {
187
+ schemaType: string;
188
+ component: string;
189
+ displayName: string;
190
+ configTabs: SchemaConfigTab[];
191
+ default: SchemaComponentDefault;
192
+ }
193
+ export interface SchemaLanguageDefinition {
194
+ id: number;
195
+ locale: string;
196
+ language: string;
197
+ label: string;
198
+ isDefault: boolean;
199
+ }
200
+ export interface SchemaRootConfig {
201
+ config: SchemaConfig;
202
+ ui: SchemaUI;
203
+ contentTypes: SchemaContentTypes;
204
+ forms: SchemaForms;
205
+ languagesDefinition: Record<string, SchemaLanguage>;
206
+ version: string;
207
+ languages: SchemaLanguageDefinition[];
208
+ defaultLanguage: SchemaLanguageDefinition;
209
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ declare enum TemplateTypeKeyEnum {
2
+ LABEL = "label",
3
+ VALUE = "value",
4
+ MODE = "mode",
5
+ SPECIAL = "special"
6
+ }
7
+ declare enum TemplateModeTypeEnum {
8
+ DETAIL = "detail",
9
+ LIST = "list",
10
+ PAGINATED_DATA = "paginated-data",
11
+ VIRTUAL_LIST = "virtual-list"
12
+ }
13
+ declare enum TemplateBasicTypeEnum {
14
+ STATIC = "static",
15
+ LIST = "list",
16
+ PAGINATED_DATA = "paginated-data",
17
+ VIRTUAL_LIST = "virtual-list"
18
+ }
19
+ declare enum TemplateSpecialTypeEnum {
20
+ NOT_FOUND = "404",
21
+ SITEMAP = "sitemap"
22
+ }
23
+ export { TemplateTypeKeyEnum, TemplateModeTypeEnum, TemplateBasicTypeEnum, TemplateSpecialTypeEnum, };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TemplateSpecialTypeEnum = exports.TemplateBasicTypeEnum = exports.TemplateModeTypeEnum = exports.TemplateTypeKeyEnum = void 0;
4
+ var TemplateTypeKeyEnum;
5
+ (function (TemplateTypeKeyEnum) {
6
+ TemplateTypeKeyEnum["LABEL"] = "label";
7
+ TemplateTypeKeyEnum["VALUE"] = "value";
8
+ TemplateTypeKeyEnum["MODE"] = "mode";
9
+ TemplateTypeKeyEnum["SPECIAL"] = "special";
10
+ })(TemplateTypeKeyEnum || (exports.TemplateTypeKeyEnum = TemplateTypeKeyEnum = {}));
11
+ var TemplateModeTypeEnum;
12
+ (function (TemplateModeTypeEnum) {
13
+ TemplateModeTypeEnum["DETAIL"] = "detail";
14
+ TemplateModeTypeEnum["LIST"] = "list";
15
+ TemplateModeTypeEnum["PAGINATED_DATA"] = "paginated-data";
16
+ TemplateModeTypeEnum["VIRTUAL_LIST"] = "virtual-list";
17
+ })(TemplateModeTypeEnum || (exports.TemplateModeTypeEnum = TemplateModeTypeEnum = {}));
18
+ var TemplateBasicTypeEnum;
19
+ (function (TemplateBasicTypeEnum) {
20
+ TemplateBasicTypeEnum["STATIC"] = "static";
21
+ TemplateBasicTypeEnum["LIST"] = "list";
22
+ TemplateBasicTypeEnum["PAGINATED_DATA"] = "paginated-data";
23
+ TemplateBasicTypeEnum["VIRTUAL_LIST"] = "virtual-list";
24
+ })(TemplateBasicTypeEnum || (exports.TemplateBasicTypeEnum = TemplateBasicTypeEnum = {}));
25
+ var TemplateSpecialTypeEnum;
26
+ (function (TemplateSpecialTypeEnum) {
27
+ TemplateSpecialTypeEnum["NOT_FOUND"] = "404";
28
+ TemplateSpecialTypeEnum["SITEMAP"] = "sitemap";
29
+ })(TemplateSpecialTypeEnum || (exports.TemplateSpecialTypeEnum = TemplateSpecialTypeEnum = {}));
@@ -0,0 +1 @@
1
+ export * from './languages';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./languages"), exports);
@@ -0,0 +1,8 @@
1
+ export interface LanguageSiteDTO {
2
+ id?: number | null;
3
+ languageId: number;
4
+ siteId: number;
5
+ path?: string | null;
6
+ defaultField?: 0 | 1;
7
+ domainId: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@griddo/api-types",
3
- "version": "1.0.31",
3
+ "version": "1.1.1",
4
4
  "description": "Tipos públicos de la API de Griddo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",