Skip to content

Instantly share code, notes, and snippets.

@azizpunjani
Created February 22, 2024 23:07
Show Gist options
  • Save azizpunjani/2cc2096cb2fa579891945d2afa74423b to your computer and use it in GitHub Desktop.
Save azizpunjani/2cc2096cb2fa579891945d2afa74423b to your computer and use it in GitHub Desktop.
PUT payload to set view state
{
"pagedesigner": {
"create": true,
"pageDesign": {
"settings": {
"pitch": {
"items": [],
"content_blocks": []
},
"kind": "DigitalRoom"
},
"bands": [
{
"kind": "Content",
"settings": {
"id": "3v5sdqe2a3",
"layout": {
"flow": "new-row"
},
"display": {
"kind": "grid"
},
"name": "content_block_1",
"source": {
"kind": "items",
"items": [
{
"id": "65cbb8a4f1f2a3ab9db94f77",
"completion": {
"range": {
"kind": "all"
}
},
"autoUpdated": false,
"forceAutoUpdate": false,
"forceSnapshot": false,
"preventAutoUpdateChanges": false,
"actions": {
"view": "view_item:65cbb8a4f1f2a3ab9db94f77",
"download": ""
}
}
],
"inline": []
},
"internal_name": null
}
},
{
"kind": "Dynamic",
"settings": {
"id": "pfda2t2uxn",
"layout": {
"flow": "new-row"
},
"name": "page_heading_block_1",
"band_item_id": "65cbab30f1f2a3ab9db94095",
"properties": [
{
"title": "Header Type",
"name": "header_type",
"type": "choice",
"tooltip": "Choose a Type to pick the layout and style for this block.",
"pitch_tooltip": "",
"when_shown": "",
"container": "",
"settings": {
"choices": {
"choices": [
{
"value": "text",
"display_name": "Text"
},
{
"value": "text_bg",
"display_name": "Text + Background"
},
{
"value": "text_divider",
"display_name": "Text + Divider"
}
],
"default_value": "text"
}
},
"section": "Style",
"edit_in_pitch": false
},
{
"title": "Heading Text",
"name": "text",
"type": "text",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "",
"settings": {
"default_value": "",
"placeholder": "Enter a heading",
"required": true
},
"section": "Content",
"edit_in_pitch": false
},
{
"title": "Heading Level",
"name": "heading_level",
"type": "choice",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "formatting_group",
"settings": {
"choices": {
"choices": [
{
"value": "h1",
"display_name": "Heading 1"
},
{
"value": "h2",
"display_name": "Heading 2"
},
{
"value": "h3",
"display_name": "Heading 3"
},
{
"value": "h4",
"display_name": "Heading 4"
}
],
"default_value": "h2"
}
},
"section": "Properties"
},
{
"title": "Text Alignment",
"name": "text_align",
"type": "buttongroup",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "formatting_group",
"settings": {
"buttongroup": {
"kind": "textalign",
"enabled_values": [
"left",
"center",
"right"
],
"default_value": "center"
}
},
"section": ""
},
{
"title": "Font Color",
"name": "textbg_font_color",
"type": "csscolor",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "formatting_group",
"settings": {
"allow_opacity": false,
"default_value": [
255,
255,
255
]
},
"section": "Properties"
},
{
"title": "Background",
"name": "background_color",
"type": "csscolor",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "background_group",
"settings": {
"allow_opacity": false,
"default_value": [
"action-primary"
]
},
"section": "Properties",
"edit_in_pitch": false
},
{
"title": "Border Color",
"name": "border_color",
"type": "csscolor",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "background_group",
"settings": {
"allow_opacity": false,
"default_value": []
},
"section": "Properties"
},
{
"title": "Corners",
"name": "corners",
"type": "buttongroup",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "background_group",
"settings": {
"buttongroup": {
"kind": "corners",
"enabled_values": [
"sharp",
"soft",
"round"
],
"default_value": "sharp"
}
},
"section": "Properties"
},
{
"title": "Height",
"name": "height",
"type": "buttongroup",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "background_group",
"settings": {
"buttongroup": {
"kind": "heights",
"enabled_values": [
"short",
"medium",
"tall"
],
"default_value": "short"
}
},
"section": "Properties"
},
{
"title": "Content Formatting",
"name": "formatting_group",
"type": "group",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "",
"settings": {},
"section": "Properties"
},
{
"title": "Font Color",
"name": "font_color",
"type": "csscolor",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text\"",
"container": "formatting_group",
"settings": {
"allow_opacity": false,
"default_value": [
"action-primary"
]
},
"section": "Formatting"
},
{
"title": "Background",
"name": "background_group",
"type": "group",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_bg\"",
"container": "",
"settings": {},
"section": "Properties"
},
{
"title": "Divider",
"name": "divider_group",
"type": "group",
"edit_in_pitch": false,
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_divider\"",
"container": "",
"settings": {},
"section": "Properties"
},
{
"title": "Options",
"name": "options",
"type": "buttongroup",
"edit_in_pitch": false,
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_divider\"",
"container": "divider_group",
"settings": {
"buttongroup": {
"kind": "linerules",
"default_value": "bottom",
"enabled_values": [
"bottom",
"both"
]
}
},
"section": "Properties"
},
{
"title": "Divider Color",
"name": "line_color",
"type": "csscolor",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "divider_group",
"settings": {
"allow_opacity": false,
"default_value": [
"action-light"
]
},
"section": "Properties",
"edit_in_pitch": false
},
{
"title": "Weight",
"name": "line_weight",
"type": "buttongroup",
"tooltip": "The thickness of the divider",
"pitch_tooltip": "",
"when_shown": "",
"container": "divider_group",
"settings": {
"buttongroup": {
"kind": "weights",
"enabled_values": [
"thin",
"medium",
"thick"
],
"default_value": "thin"
}
},
"section": ""
},
{
"title": "Ends",
"name": "line_ends",
"type": "buttongroup",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "divider_group",
"settings": {
"buttongroup": {
"kind": "corners",
"default_value": "sharp",
"enabled_values": [
"sharp",
"round"
]
}
},
"section": "Properties",
"edit_in_pitch": false
},
{
"title": "Width",
"name": "line_width",
"type": "buttongroup",
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "",
"container": "divider_group",
"settings": {
"buttongroup": {
"kind": "widths",
"enabled_values": [
"percent25",
"percent50",
"percent75",
"percent100"
],
"default_value": "percent100"
}
},
"section": ""
},
{
"title": "Font Color",
"name": "textdiv_font_color",
"type": "csscolor",
"edit_in_pitch": false,
"tooltip": "",
"pitch_tooltip": "",
"when_shown": "block.header_type==\"text_divider\"",
"container": "formatting_group",
"settings": {
"allow_opacity": false,
"default_value": [
32,
32,
32
]
},
"section": "Properties"
}
],
"metadata": {
"name": "Header",
"validation_category": "",
"description": "Header Blocks are ideal for adding simple, mobile responsive text content to a SmartPage.",
"icon": "icon-header",
"css_mappings": {},
"availability": "ga",
"position": 3,
"category": ""
},
"icon": {
"id": "band-65cbab30f1f2a3ab9db94095-icon-header",
"svg": " <svg xmlns=\"http://www.w3.org/2000/svg\">\n <symbol id=\"band-65cbab30f1f2a3ab9db94095-icon-header\" viewbox=\"0 0 512 512\">\n <path d=\"m512 466l0-421c0-24-20-45-45-45l-421 0c-25 0-46 20-46 45 0 0 0 0 0 0l0 421c0 25 20 46 45 46l421 0c25 0 46-20 46-45 0-1 0-1 0-1z m-466 15c-9 0-16-6-16-15l0-421c0-8 7-15 15-15 0 0 0 0 1 0l421 0c8 0 15 7 15 15l0 421c0 9-7 15-15 15z m23-409l373 0 0 97-373 0z m350 160l0 191-327 0 0-191 327 0m23-23l-373 0 0 237 373 0 0-237z\"></path>\n </symbol>\n</svg> "
},
"values": {
"prospect_logo": "",
"hero_image": "",
"title": "",
"text_color": [
"anchor"
],
"heading_size": "h1",
"horz_align": "left",
"background": [
"action-primary"
],
"heading_type": "text",
"vert_align": "center",
"header_type": "text",
"text": ""
}
}
}
],
"sections": [],
"id": "65d61c17f1f2a3fcccc0035e"
},
"title": "",
"createDigitalRoom": true,
"templateId": "65d61bf1f1f2a3fcf60809d8"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment