Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

396 lines
8.5 KiB

{
items: [
{
id: Guid_1,
name: pages,
properties: {
label: Pages,
validateOnPublish: false
},
isPublished: true,
version: 7,
scripts: {
create:
var data = ctx.data;
if (data.title && data.title.iv) {
data.slug = { iv: slugify(data.title.iv) };
replace(data);
},
update:
var data = ctx.data;
if (data.title && data.title.iv) {
data.slug = { iv: slugify(data.title.iv) };
replace(data);
}
},
fields: [
{
fieldId: 1,
name: title,
isHidden: false,
isLocked: false,
isDisabled: false,
partitioning: invariant,
properties: {
fieldType: String,
maxLength: 100,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
label: Title,
hints: The title of the page.,
isRequired: true,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
disable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
},
{
fieldId: 2,
name: text,
isHidden: false,
isLocked: false,
isDisabled: false,
partitioning: invariant,
properties: {
fieldType: String,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
editor: RichText,
label: Text,
hints: The text of the page.,
isRequired: true,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
disable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
},
{
fieldId: 3,
name: slug,
isHidden: false,
isLocked: false,
isDisabled: true,
partitioning: invariant,
properties: {
fieldType: String,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
label: Slug (Autogenerated),
hints: Autogenerated slug that can be used to identity the page.,
isRequired: false,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
enable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
}
],
_links: {
contents: {
method: GET
},
contents/create: {
method: POST
},
contents/create/publish: {
method: POST
},
delete: {
method: DELETE
},
fields/add: {
method: POST
},
fields/order: {
method: PUT
},
fields/ui: {
method: PUT
},
self: {
method: GET
},
unpublish: {
method: PUT
},
update: {
method: PUT
},
update/category: {
method: PUT
},
update/rules: {
method: PUT
},
update/scripts: {
method: PUT
},
update/sync: {
method: PUT
},
update/urls: {
method: PUT
}
}
},
{
id: Guid_2,
name: posts,
properties: {
label: Posts,
validateOnPublish: false
},
isPublished: true,
version: 7,
scripts: {
create:
var data = ctx.data;
if (data.title && data.title.iv) {
data.slug = { iv: slugify(data.title.iv) };
replace(data);
},
update:
var data = ctx.data;
if (data.title && data.title.iv) {
data.slug = { iv: slugify(data.title.iv) };
replace(data);
}
},
fields: [
{
fieldId: 1,
name: title,
isHidden: false,
isLocked: false,
isDisabled: false,
partitioning: invariant,
properties: {
fieldType: String,
maxLength: 100,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
label: Title,
hints: The title of the post.,
isRequired: true,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
disable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
},
{
fieldId: 2,
name: text,
isHidden: false,
isLocked: false,
isDisabled: false,
partitioning: invariant,
properties: {
fieldType: String,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
editor: RichText,
label: Text,
hints: The text of the post.,
isRequired: true,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
disable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
},
{
fieldId: 3,
name: slug,
isHidden: false,
isLocked: false,
isDisabled: true,
partitioning: invariant,
properties: {
fieldType: String,
isUnique: false,
isEmbeddable: false,
inlineEditable: false,
createEnum: false,
label: Slug (Autogenerated),
hints: Autogenerated slug that can be used to identity the post.,
isRequired: false,
isRequiredOnPublish: false,
isHalfWidth: false
},
_links: {
delete: {
method: DELETE
},
enable: {
method: PUT
},
hide: {
method: PUT
},
lock: {
method: PUT
},
update: {
method: PUT
}
}
}
],
_links: {
contents: {
method: GET
},
contents/create: {
method: POST
},
contents/create/publish: {
method: POST
},
delete: {
method: DELETE
},
fields/add: {
method: POST
},
fields/order: {
method: PUT
},
fields/ui: {
method: PUT
},
self: {
method: GET
},
unpublish: {
method: PUT
},
update: {
method: PUT
},
update/category: {
method: PUT
},
update/rules: {
method: PUT
},
update/scripts: {
method: PUT
},
update/sync: {
method: PUT
},
update/urls: {
method: PUT
}
}
}
],
_links: {
create: {
method: POST
},
self: {
method: GET
}
}
}