@enonic-types/lib-schema 7.11.0-B1
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/README.md +106 -0
- package/package.json +32 -0
- package/schema.d.ts +398 -0
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Enonic XP lib-schema TS types
|
|
2
|
+
|
|
3
|
+
> TypeScript definitions for `lib-schema` library of Enonic XP
|
|
4
|
+
## Install
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npm i --save-dev @enonic/lib-schema
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Use
|
|
11
|
+
|
|
12
|
+
Add the corresponding types to your `tsconfig.json` file that is used for application's server-side TypeScript code.
|
|
13
|
+
|
|
14
|
+
`tsconfig.json`
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"compilerOptions": {
|
|
18
|
+
"types": [
|
|
19
|
+
"@enonic-types/lib-schema"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Require and custom imports
|
|
26
|
+
|
|
27
|
+
To make `require` work out of box, you must install and add the `@enonic-types/global` types. Aside from providing definitions for XP global objects, e.g. `log`, `app`, `__`, etc, requiring library by the default path will return typed object.
|
|
28
|
+
|
|
29
|
+
`tsconfig.json`
|
|
30
|
+
```diff
|
|
31
|
+
{
|
|
32
|
+
"compilerOptions": {
|
|
33
|
+
"types": [
|
|
34
|
+
+ "@enonic-types/global"
|
|
35
|
+
"@enonic-types/lib-schema"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`example.ts`
|
|
42
|
+
```ts
|
|
43
|
+
const {
|
|
44
|
+
createSchema,
|
|
45
|
+
createComponent,
|
|
46
|
+
createStyles,
|
|
47
|
+
getSchema,
|
|
48
|
+
getComponent,
|
|
49
|
+
getSite,
|
|
50
|
+
getStyles,
|
|
51
|
+
deleteSchema,
|
|
52
|
+
deleteComponent,
|
|
53
|
+
deleteStyles,
|
|
54
|
+
updateSchema,
|
|
55
|
+
updateComponent,
|
|
56
|
+
updateSite,
|
|
57
|
+
updateStyles,
|
|
58
|
+
listComponents,
|
|
59
|
+
listSchemas
|
|
60
|
+
} = require('/lib/xp/schema');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
More detailed explanation on how it works and how to type custom import function can be found [here](https://github.com/enonic/xp/tree/master/modules/lib/typescript/README.md).
|
|
64
|
+
|
|
65
|
+
### ES6-style import
|
|
66
|
+
|
|
67
|
+
If you are planning to use `import` in your code and transpile it with the default `tsc` TypeScript compiler, you'll need to add proper types mapping to your configuration.
|
|
68
|
+
|
|
69
|
+
`tsconfig.json`
|
|
70
|
+
```diff
|
|
71
|
+
{
|
|
72
|
+
"compilerOptions": {
|
|
73
|
+
"types": [
|
|
74
|
+
"@enonic-types/lib-schema"
|
|
75
|
+
]
|
|
76
|
+
+ "baseUrl": "./",
|
|
77
|
+
+ "paths": {
|
|
78
|
+
+ "/lib/xp/schema": ["node_modules/@enonic-types/lib-schema"],
|
|
79
|
+
+ }
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`example.ts`
|
|
85
|
+
```ts
|
|
86
|
+
import {
|
|
87
|
+
createSchema,
|
|
88
|
+
createComponent,
|
|
89
|
+
createStyles,
|
|
90
|
+
getSchema,
|
|
91
|
+
getComponent,
|
|
92
|
+
getSite,
|
|
93
|
+
getStyles,
|
|
94
|
+
deleteSchema,
|
|
95
|
+
deleteComponent,
|
|
96
|
+
deleteStyles,
|
|
97
|
+
updateSchema,
|
|
98
|
+
updateComponent,
|
|
99
|
+
updateSite,
|
|
100
|
+
updateStyles,
|
|
101
|
+
listComponents,
|
|
102
|
+
listSchemas
|
|
103
|
+
} from '/lib/xp/schema';
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Setting `baseUrl` and `paths` will allow the `tsc` to keep the valid paths in the resulting JavaScript files.
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@enonic-types/lib-schema",
|
|
3
|
+
"version": "7.11.0-B1",
|
|
4
|
+
"description": "Type definitions for lib-schema.",
|
|
5
|
+
"types": "schema.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"schema.d.ts"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/enonic/xp.git#master"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"enonic",
|
|
15
|
+
"enonic-xp",
|
|
16
|
+
"lib-schema",
|
|
17
|
+
"schema",
|
|
18
|
+
"types",
|
|
19
|
+
"typescript"
|
|
20
|
+
],
|
|
21
|
+
"contributors": [
|
|
22
|
+
"Mikita Taukachou <edloidas@gmail.com> (https://edloidas.github.io/)"
|
|
23
|
+
],
|
|
24
|
+
"license": "Apache-2.0",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/enonic/xp/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/enonic/xp/tree/master#readme",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|
package/schema.d.ts
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic schema related functions.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* var schema = require('/lib/xp/schema');
|
|
6
|
+
*
|
|
7
|
+
* @module schema
|
|
8
|
+
*/
|
|
9
|
+
declare global {
|
|
10
|
+
interface XpLibraries {
|
|
11
|
+
'/lib/xp/schema': typeof import('./schema');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface Icon {
|
|
15
|
+
data: unknown;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
modifiedTime: string;
|
|
18
|
+
}
|
|
19
|
+
export declare type InputType = 'Time' | 'DateTime' | 'CheckBox' | 'ComboBox' | 'Long' | 'Double' | 'RadioButton' | 'TextArea' | 'ContentTypeFilter' | 'GeoPoint' | 'TextLine' | 'Tag' | 'CustomSelector' | 'AttachmentUploader' | 'ContentSelector' | 'MediaSelector' | 'ImageSelector' | 'Date' | 'MediaUploader' | 'SiteConfigurator' | 'HtmlArea';
|
|
20
|
+
export interface FormItemSet {
|
|
21
|
+
formItemType: 'ItemSet';
|
|
22
|
+
name: string;
|
|
23
|
+
label: string;
|
|
24
|
+
customText: string;
|
|
25
|
+
helpText: string;
|
|
26
|
+
maximize: boolean;
|
|
27
|
+
inputType: InputType;
|
|
28
|
+
occurrences: {
|
|
29
|
+
maximum: number;
|
|
30
|
+
minimum: number;
|
|
31
|
+
};
|
|
32
|
+
items: FormItem[];
|
|
33
|
+
}
|
|
34
|
+
export interface FormItemLayout {
|
|
35
|
+
formItemType: 'Layout';
|
|
36
|
+
name: string;
|
|
37
|
+
label: string;
|
|
38
|
+
items: FormItem[];
|
|
39
|
+
}
|
|
40
|
+
export declare type ValueType = 'BinaryReference' | 'Boolean' | 'DateTime' | 'Double' | 'GeoPoint' | 'Link' | 'LocalDateTime' | 'LocalDate' | 'LocalTime' | 'Long' | 'PropertySet' | 'Reference' | 'String' | 'Xml';
|
|
41
|
+
export interface FormItemInput {
|
|
42
|
+
formItemType: 'Input';
|
|
43
|
+
name: string;
|
|
44
|
+
label: string;
|
|
45
|
+
customText: string;
|
|
46
|
+
helpText: string;
|
|
47
|
+
validationRegexp: string;
|
|
48
|
+
maximize: boolean;
|
|
49
|
+
inputType: InputType;
|
|
50
|
+
occurrences: {
|
|
51
|
+
maximum: number;
|
|
52
|
+
minimum: number;
|
|
53
|
+
};
|
|
54
|
+
default: {
|
|
55
|
+
value: string;
|
|
56
|
+
type: ValueType;
|
|
57
|
+
};
|
|
58
|
+
config: {
|
|
59
|
+
[configName: string]: {
|
|
60
|
+
[attributeKey: string]: string;
|
|
61
|
+
value: string;
|
|
62
|
+
}[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface FormItemOptionSet {
|
|
66
|
+
formItemType: 'OptionSet';
|
|
67
|
+
name: string;
|
|
68
|
+
label: string;
|
|
69
|
+
expanded: boolean;
|
|
70
|
+
helpText: string;
|
|
71
|
+
occurrences: {
|
|
72
|
+
maximum: number;
|
|
73
|
+
minimum: number;
|
|
74
|
+
};
|
|
75
|
+
selection: {
|
|
76
|
+
maximum: number;
|
|
77
|
+
minimum: number;
|
|
78
|
+
};
|
|
79
|
+
options: {
|
|
80
|
+
name: string;
|
|
81
|
+
label: string;
|
|
82
|
+
helpText: string;
|
|
83
|
+
default: boolean;
|
|
84
|
+
items: FormItem[];
|
|
85
|
+
}[];
|
|
86
|
+
}
|
|
87
|
+
export interface FormItemInlineMixin {
|
|
88
|
+
formItemType: 'InlineMixin';
|
|
89
|
+
name: string;
|
|
90
|
+
}
|
|
91
|
+
export declare type FormItem = FormItemSet | FormItemLayout | FormItemOptionSet | FormItemInput | FormItemInlineMixin;
|
|
92
|
+
export interface CreateDynamicContentSchemaParams {
|
|
93
|
+
name: string;
|
|
94
|
+
type: string;
|
|
95
|
+
resource?: string | null;
|
|
96
|
+
}
|
|
97
|
+
export declare type ContentSchemaType = 'CONTENT_TYPE' | 'MIXIN' | 'XDATA';
|
|
98
|
+
export interface Schema {
|
|
99
|
+
name: string;
|
|
100
|
+
displayName: string;
|
|
101
|
+
displayNameI18nKey: string;
|
|
102
|
+
description: string;
|
|
103
|
+
descriptionI18nKey: string;
|
|
104
|
+
createdTime: string;
|
|
105
|
+
creator: string;
|
|
106
|
+
modifiedTime: string;
|
|
107
|
+
modifier: string;
|
|
108
|
+
resource: string;
|
|
109
|
+
type: ContentSchemaType;
|
|
110
|
+
icon?: Icon;
|
|
111
|
+
}
|
|
112
|
+
export interface ContentTypeSchema extends Schema {
|
|
113
|
+
form: FormItem[];
|
|
114
|
+
config: {
|
|
115
|
+
[configName: string]: {
|
|
116
|
+
[attributeKey: string]: string;
|
|
117
|
+
value: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
xDataNames?: string[];
|
|
121
|
+
}
|
|
122
|
+
export interface MixinSchema extends Schema {
|
|
123
|
+
form: FormItem[];
|
|
124
|
+
}
|
|
125
|
+
export interface XDataSchema extends Schema {
|
|
126
|
+
form: FormItem[];
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Creates dynamic content schema resource.
|
|
130
|
+
*
|
|
131
|
+
* @param {object} params JSON with the parameters.
|
|
132
|
+
* @param {string} params.name Schema resource name.
|
|
133
|
+
* @param {string} params.type Schema type.
|
|
134
|
+
* @param {string} [params.resource] Schema resource value.
|
|
135
|
+
*
|
|
136
|
+
* @returns {ContentTypeSchema | MixinSchema | XDataSchema} created resource.
|
|
137
|
+
*/
|
|
138
|
+
export declare function createSchema(params: CreateDynamicContentSchemaParams): ContentTypeSchema | MixinSchema | XDataSchema;
|
|
139
|
+
export declare type ComponentDescriptorType = 'PAGE' | 'LAYOUT' | 'PART';
|
|
140
|
+
export interface CreateDynamicComponentParams {
|
|
141
|
+
key: string;
|
|
142
|
+
type: ComponentDescriptorType;
|
|
143
|
+
resource: string;
|
|
144
|
+
}
|
|
145
|
+
export interface ComponentDescriptor {
|
|
146
|
+
key: string;
|
|
147
|
+
displayName: string;
|
|
148
|
+
displayNameI18nKey: string;
|
|
149
|
+
description: string;
|
|
150
|
+
descriptionI18nKey: string;
|
|
151
|
+
componentPath: string;
|
|
152
|
+
modifiedTime: string;
|
|
153
|
+
resource: string;
|
|
154
|
+
type: ComponentDescriptorType;
|
|
155
|
+
form: FormItem[];
|
|
156
|
+
config: {
|
|
157
|
+
[configName: string]: {
|
|
158
|
+
[attributeKey: string]: string;
|
|
159
|
+
value: string;
|
|
160
|
+
}[];
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
export interface LayoutDescriptor extends ComponentDescriptor {
|
|
164
|
+
regions?: string[] | null;
|
|
165
|
+
}
|
|
166
|
+
export interface PageDescriptor extends ComponentDescriptor {
|
|
167
|
+
regions?: string[] | null;
|
|
168
|
+
}
|
|
169
|
+
export interface PartDescriptor extends ComponentDescriptor {
|
|
170
|
+
icon?: Icon | null;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Creates dynamic component resource.
|
|
174
|
+
*
|
|
175
|
+
* @param {object} params JSON with the parameters.
|
|
176
|
+
* @param {string} params.key Component resource descriptor key.
|
|
177
|
+
* @param {string} params.type Component type.
|
|
178
|
+
* @param {string} [params.resource] Component resource value.
|
|
179
|
+
*
|
|
180
|
+
* @returns {string} created resource.
|
|
181
|
+
*/
|
|
182
|
+
export declare function createComponent(params: CreateDynamicComponentParams): LayoutDescriptor | PageDescriptor | PartDescriptor;
|
|
183
|
+
export interface CreateDynamicStylesParams {
|
|
184
|
+
application: string;
|
|
185
|
+
resource: string;
|
|
186
|
+
}
|
|
187
|
+
export interface StyleDescriptor {
|
|
188
|
+
application: string;
|
|
189
|
+
cssPath: string;
|
|
190
|
+
modifiedTime: string;
|
|
191
|
+
resource: string;
|
|
192
|
+
elements?: {
|
|
193
|
+
element: string;
|
|
194
|
+
displayName: string;
|
|
195
|
+
name: string;
|
|
196
|
+
}[];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Creates dynamic styles schema resource.
|
|
200
|
+
*
|
|
201
|
+
* @param {object} params JSON with the parameters.
|
|
202
|
+
* @param {string} params.application Application key.
|
|
203
|
+
* @param {string} [params.resource] Styles resource value.
|
|
204
|
+
*
|
|
205
|
+
* @returns {StyleDescriptor} created resource.
|
|
206
|
+
*/
|
|
207
|
+
export declare function createStyles(params: CreateDynamicStylesParams): StyleDescriptor;
|
|
208
|
+
export interface GetDynamicContentSchemaParams {
|
|
209
|
+
name: string;
|
|
210
|
+
type: ContentSchemaType;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Fetches dynamic content schema resource.
|
|
214
|
+
*
|
|
215
|
+
* @param {object} params JSON with the parameters.
|
|
216
|
+
* @param {string} params.name Content schema resource name.
|
|
217
|
+
* @param {string} params.type Content schema type.
|
|
218
|
+
*
|
|
219
|
+
* @returns {ContentTypeSchema | MixinSchema | XDataSchema} fetched resource.
|
|
220
|
+
*/
|
|
221
|
+
export declare function getSchema(params: GetDynamicContentSchemaParams): ContentTypeSchema | MixinSchema | XDataSchema;
|
|
222
|
+
export interface GetDynamicComponentParams {
|
|
223
|
+
key: string;
|
|
224
|
+
type: ComponentDescriptorType;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Fetches dynamic component resource.
|
|
228
|
+
*
|
|
229
|
+
* @param {object} params JSON with the parameters.
|
|
230
|
+
* @param {string} params.key Component resource descriptor key.
|
|
231
|
+
* @param {string} params.type Component type.
|
|
232
|
+
*
|
|
233
|
+
* @returns {string} fetched resource.
|
|
234
|
+
*/
|
|
235
|
+
export declare function getComponent(params: GetDynamicComponentParams): unknown;
|
|
236
|
+
export interface SiteDescriptor {
|
|
237
|
+
application: string;
|
|
238
|
+
resource: string;
|
|
239
|
+
modifiedTime: string;
|
|
240
|
+
form: FormItem[];
|
|
241
|
+
xDataMappings?: {
|
|
242
|
+
name: string;
|
|
243
|
+
optional: boolean;
|
|
244
|
+
allowContentTypes: string;
|
|
245
|
+
}[];
|
|
246
|
+
}
|
|
247
|
+
export interface GetDynamicSiteParams {
|
|
248
|
+
application: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Fetches dynamic site schema resource.
|
|
252
|
+
*
|
|
253
|
+
* @param {object} params JSON with the parameters.
|
|
254
|
+
* @param {string} params.application Application key.
|
|
255
|
+
*
|
|
256
|
+
* @returns {SiteDescriptor} fetched resource.
|
|
257
|
+
*/
|
|
258
|
+
export declare function getSite(params: GetDynamicSiteParams): SiteDescriptor | null;
|
|
259
|
+
export interface GetDynamicStylesParams {
|
|
260
|
+
application: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Fetches dynamic styles schema resource.
|
|
264
|
+
*
|
|
265
|
+
* @param {object} params JSON with the parameters.
|
|
266
|
+
* @param {string} params.application application key.
|
|
267
|
+
*
|
|
268
|
+
* @returns {StyleDescriptor} fetched resource.
|
|
269
|
+
*/
|
|
270
|
+
export declare function getStyles(params: GetDynamicStylesParams): StyleDescriptor | null;
|
|
271
|
+
export interface DeleteDynamicContentSchemaParams {
|
|
272
|
+
name: string;
|
|
273
|
+
type: ContentSchemaType;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Removes dynamic schema resource.
|
|
277
|
+
*
|
|
278
|
+
* @param {object} params JSON with the parameters.
|
|
279
|
+
* @param {string} params.name Content schema resource name.
|
|
280
|
+
* @param {string} params.type Content schema type.
|
|
281
|
+
*
|
|
282
|
+
* @returns {boolean} true if succeeded, false otherwise.
|
|
283
|
+
*/
|
|
284
|
+
export declare function deleteSchema(params: DeleteDynamicContentSchemaParams): boolean;
|
|
285
|
+
export interface DeleteDynamicComponentParams {
|
|
286
|
+
key: string;
|
|
287
|
+
type: ComponentDescriptorType;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Removes dynamic component resource.
|
|
291
|
+
*
|
|
292
|
+
* @param {object} params JSON with the parameters.
|
|
293
|
+
* @param {string} params.key Component resource descriptor key.
|
|
294
|
+
* @param {string} params.type Component type.
|
|
295
|
+
*
|
|
296
|
+
* @returns {boolean} true if succeeded, false otherwise.
|
|
297
|
+
*/
|
|
298
|
+
export declare function deleteComponent(params: DeleteDynamicComponentParams): boolean;
|
|
299
|
+
export interface DeleteDynamicStylesParams {
|
|
300
|
+
application: string;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Removes dynamic styles schema resource.
|
|
304
|
+
*
|
|
305
|
+
* @param {object} params JSON with the parameters.
|
|
306
|
+
* @param {string} params.application Application key.
|
|
307
|
+
*
|
|
308
|
+
* @returns {boolean} true if succeeded, false otherwise.
|
|
309
|
+
*/
|
|
310
|
+
export declare function deleteStyles(params: DeleteDynamicStylesParams): boolean;
|
|
311
|
+
export interface UpdateDynamicContentSchemaParams {
|
|
312
|
+
name: string;
|
|
313
|
+
type: ContentSchemaType;
|
|
314
|
+
resource: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Updates dynamic content schema resource.
|
|
318
|
+
*
|
|
319
|
+
* @param {object} params JSON with the parameters.
|
|
320
|
+
* @param {string} params.name Content schema resource name.
|
|
321
|
+
* @param {string} params.type Content schema type.
|
|
322
|
+
* @param {string} [params.resource] Schema resource value.
|
|
323
|
+
*
|
|
324
|
+
* @returns {ContentTypeSchema | MixinSchema | XDataSchema} created resource.
|
|
325
|
+
*/
|
|
326
|
+
export declare function updateSchema(params: UpdateDynamicContentSchemaParams): ContentTypeSchema | MixinSchema | XDataSchema;
|
|
327
|
+
export interface UpdateDynamicComponentParams {
|
|
328
|
+
key: string;
|
|
329
|
+
type: ComponentDescriptorType;
|
|
330
|
+
resource: string;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Updates dynamic component resource.
|
|
334
|
+
*
|
|
335
|
+
* @param {object} params JSON with the parameters.
|
|
336
|
+
* @param {string} params.key Component resource descriptor key.
|
|
337
|
+
* @param {string} params.type Component type.
|
|
338
|
+
* @param {string} [params.resource] Component resource value.
|
|
339
|
+
*
|
|
340
|
+
* @returns {LayoutDescriptor | PageDescriptor | PartDescriptor} created resource.
|
|
341
|
+
*/
|
|
342
|
+
export declare function updateComponent(params: UpdateDynamicComponentParams): LayoutDescriptor | PageDescriptor | PartDescriptor;
|
|
343
|
+
export interface UpdateDynamicSiteParams {
|
|
344
|
+
application: string;
|
|
345
|
+
resource: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Updates dynamic site schema resource.
|
|
349
|
+
*
|
|
350
|
+
* @param {object} params JSON with the parameters.
|
|
351
|
+
* @param {string} params.application Application key.
|
|
352
|
+
* @param {string} [params.resource] Site schema resource value.
|
|
353
|
+
*
|
|
354
|
+
* @returns {string} created resource.
|
|
355
|
+
*/
|
|
356
|
+
export declare function updateSite(params: UpdateDynamicSiteParams): SiteDescriptor;
|
|
357
|
+
export interface UpdateDynamicStylesParams {
|
|
358
|
+
application: string;
|
|
359
|
+
resource: string;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Updates dynamic styles schema resource.
|
|
363
|
+
*
|
|
364
|
+
* @param {object} params JSON with the parameters.
|
|
365
|
+
* @param {string} params.application Application key.
|
|
366
|
+
* @param {string} [params.resource] Styles schema resource value.
|
|
367
|
+
*
|
|
368
|
+
* @returns {string} created resource.
|
|
369
|
+
*/
|
|
370
|
+
export declare function updateStyles(params: UpdateDynamicStylesParams): StyleDescriptor;
|
|
371
|
+
export interface ListDynamicComponentsParams {
|
|
372
|
+
application: string;
|
|
373
|
+
type: ComponentDescriptorType;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Fetches dynamic component resources.
|
|
377
|
+
*
|
|
378
|
+
* @param {object} params JSON with the parameters.
|
|
379
|
+
* @param {string} params.application Application key.
|
|
380
|
+
* @param {string} params.type Component type.
|
|
381
|
+
*
|
|
382
|
+
* @returns {PartDescriptor[] | LayoutDescriptor[] | PageDescriptor[]} fetched resources.
|
|
383
|
+
*/
|
|
384
|
+
export declare function listComponents(params: ListDynamicComponentsParams): PartDescriptor[] | LayoutDescriptor[] | PageDescriptor[];
|
|
385
|
+
export interface ListDynamicSchemasParams {
|
|
386
|
+
application: string;
|
|
387
|
+
type: ContentSchemaType;
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Fetches dynamic content schemas resources.
|
|
391
|
+
*
|
|
392
|
+
* @param {object} params JSON with the parameters.
|
|
393
|
+
* @param {string} params.application Application key.
|
|
394
|
+
* @param {string} params.type Content schema type.
|
|
395
|
+
*
|
|
396
|
+
* @returns {ContentSchemaType[] | MixinSchema[] | XDataSchema[]} fetched resources.
|
|
397
|
+
*/
|
|
398
|
+
export declare function listSchemas(params: ListDynamicSchemasParams): ContentSchemaType[] | MixinSchema[] | XDataSchema[];
|