0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/spec/fixtures/wizard.json

334 Zeilen
8,2 KiB
JSON

{
2020-10-20 01:15:03 +02:00
"id": "super_mega_fun_wizard",
"name": "Super Mega Fun Wizard",
"background": "#333333",
"save_submissions": true,
2020-10-20 01:15:03 +02:00
"after_signup": false,
"prompt_completion": false,
2020-10-20 01:15:03 +02:00
"theme_id": 2,
"steps": [
{
2020-10-20 01:15:03 +02:00
"id": "step_1",
"title": "Text",
"raw_description": "Text inputs!",
"fields": [
{
2020-10-20 01:15:03 +02:00
"id": "step_1_field_1",
"label": "Text",
2020-11-03 01:24:20 +01:00
"description": "Text field description.",
"type": "text",
2020-10-20 01:15:03 +02:00
"min_length": "3",
"prefill": [
{
"type": "assignment",
"output": "I am prefilled",
"output_type": "text",
"output_connector": "set"
}
]
},
{
"id": "step_1_field_2",
"label": "Textarea",
"type": "textarea",
"min_length": ""
},
{
"id": "step_1_field_3",
"label": "Composer",
"type": "composer"
},
{
"id": "step_1_field_4",
"label": "I'm only text",
"description": "",
"type": "text_only"
2019-12-06 10:05:19 +01:00
}
2020-10-20 01:15:03 +02:00
],
"description": "Text inputs!"
2019-12-06 10:05:19 +01:00
},
{
2020-10-20 01:15:03 +02:00
"id": "step_2",
"title": "Values",
"raw_description": "Because I couldn't think of another name for this step :)",
2019-12-06 10:05:19 +01:00
"fields": [
{
2020-10-20 01:15:03 +02:00
"id": "step_2_field_1",
"label": "Date",
"type": "date",
"format": "YYYY-MM-DD"
},
{
"id": "step_2_field_2",
"label": "Time",
"type": "time",
"format": "HH:mm"
},
{
"id": "step_2_field_3",
"label": "Date & Time",
"type": "date_time",
"format": ""
},
{
"id": "step_2_field_4",
"label": "Number",
"type": "number"
},
{
"id": "step_2_field_5",
"label": "Checkbox",
"type": "checkbox"
},
{
"id": "step_2_field_6",
"label": "Url",
"type": "url"
},
2020-10-20 01:15:03 +02:00
{
"id": "step_2_field_7",
"label": "Upload",
"type": "upload",
"file_types": ".jpg,.jpeg,.png"
2020-10-20 01:15:03 +02:00
}
],
"description": "Because I couldn't think of another name for this step :)"
2020-10-20 01:15:03 +02:00
},
{
"id": "step_3",
"title": "Combo-boxes",
"raw_description": "Unfortunately not the edible type :sushi: ",
"fields": [
{
"id": "step_3_field_1",
"label": "Custom Dropdown",
"type": "dropdown",
"content": [
{
"type": "association",
"pairs": [
{
"index": 0,
"key": "choice1",
"key_type": "text",
"value": "Choice 1",
"value_type": "text",
"connector": "equal"
},
{
"index": 1,
"key": "choice2",
"key_type": "text",
"value": "Choice 2",
"value_type": "text",
"connector": "association"
},
{
"index": 2,
"key": "choice3",
"key_type": "text",
"value": "Choice 3",
"value_type": "text",
"connector": "association"
}
]
}
]
},
{
"id": "step_3_field_2",
"label": "Tag",
"type": "tag"
},
{
"id": "step_3_field_3",
"label": "Category",
"type": "category",
"limit": 1,
"property": "id"
},
{
"id": "step_3_field_4",
"label": "Group",
"type": "group"
},
{
"id": "step_3_field_5",
"label": "User Selector",
"description": "",
"type": "user_selector"
}
],
"description": "Unfortunately not the edible type :sushi: "
2020-10-20 01:15:03 +02:00
}
],
"actions": [
{
"id": "action_1",
2020-11-03 01:24:20 +01:00
"run_after": "step_3",
2020-10-20 01:15:03 +02:00
"type": "create_topic",
"skip_redirect": true,
"post": "step_1_field_2",
"title": [
{
"type": "assignment",
"output": "step_1_field_1",
"output_type": "wizard_field",
"output_connector": "set"
}
],
"category": [
{
"type": "assignment",
"output": "step_3_field_3",
"output_type": "wizard_field",
"output_connector": "set"
}
],
"tags": [
{
"type": "assignment",
"output": "step_3_field_2",
"output_type": "wizard_field",
"output_connector": "set"
}
],
"custom_fields": [
{
"type": "association",
"pairs": [
{
"index": 0,
"key": "post_field",
2020-10-20 01:15:03 +02:00
"key_type": "text",
"value": "Post custom field value",
"value_type": "text",
"connector": "association"
},
{
"index": 1,
"key": "topic.topic_field",
"key_type": "text",
"value": "Topic custom field value",
"value_type": "text",
"connector": "association"
},
{
"index": 2,
"key": "topic.topic_json_field{}.key_1",
"key_type": "text",
"value": "Key 1 value",
"value_type": "text",
"connector": "association"
},
{
"index": 3,
"key": "topic.topic_json_field{}.key_2",
"key_type": "text",
"value": "Key 2 value",
"value_type": "text",
2020-10-20 01:15:03 +02:00
"connector": "association"
}
]
}
],
"visible": [
{
"type": "conditional",
"output": "true",
"output_type": "text",
"output_connector": "then",
"pairs": [
{
"index": 0,
"key": "name",
2020-10-20 01:15:03 +02:00
"key_type": "user_field",
"value": "Angus",
"value_type": "text",
"connector": "equal"
}
]
}
]
},
2021-09-07 14:06:13 +02:00
{
"id": "action_5",
"run_after": "step_1",
"type": "watch_categories",
"notification_level": "tracking",
"wizard_user": true,
"categories": [
{
"type": "assignment",
"output": "action_8",
"output_type": "wizard_action",
"output_connector": "set"
}
],
"mute_remainder": [
{
"type": "assignment",
"output": "true",
"output_type": "text",
"output_connector": "set"
}
]
},
2020-10-20 01:15:03 +02:00
{
"id": "action_4",
"run_after": "step_2",
"type": "update_profile",
"profile_updates": [
{
"type": "association",
"pairs": [
{
"index": 0,
"key": "profile_background",
"key_type": "user_field",
"value": "step_2_field_7",
"value_type": "wizard_field",
"connector": "association"
}
]
}
]
},
{
"id": "action_3",
"run_after": "step_2",
"type": "open_composer",
"post_builder": true,
"post_template": "I am interpolating some user fields u{name} u{username} u{email}",
"title": [
{
"type": "assignment",
"output": "Title of the composer topic",
"output_type": "text",
"output_connector": "set"
}
],
"tags": [
{
"type": "assignment",
"output": "tag1",
"output_type": "text",
"output_connector": "set"
}
]
},
{
"id": "action_10",
"run_after": "step_3",
2020-10-20 01:15:03 +02:00
"type": "route_to",
"url": [
{
"type": "assignment",
"output": "https://google.com",
"output_type": "text",
"output_connector": "set"
}
2019-12-06 10:05:19 +01:00
]
}
]
}