2022-12-21 17:23:52 +01:00
const getWizard = {
wizard _list : [
{ id : "this_is_testing_wizard" , name : "This is testing wizard" } ,
2023-05-11 07:44:23 +02:00
{ id : "another_wizard" , name : "another wizard" } ,
2023-05-26 06:35:01 +02:00
{ id : "unique_wizard" , name : "Unique wizard for testing" } ,
2022-12-21 17:23:52 +01:00
] ,
field _types : {
text : {
min _length : null ,
max _length : null ,
prefill : null ,
char _counter : null ,
validations : null ,
placeholder : null ,
} ,
textarea : {
min _length : null ,
max _length : null ,
prefill : null ,
char _counter : null ,
placeholder : null ,
} ,
composer : {
min _length : null ,
max _length : null ,
char _counter : null ,
placeholder : null ,
} ,
text _only : { } ,
composer _preview : { preview _template : null } ,
date : { format : "YYYY-MM-DD" } ,
time : { format : "HH:mm" } ,
date _time : { format : "" } ,
number : { } ,
checkbox : { } ,
url : { min _length : null } ,
upload : { file _types : ".jpg,.jpeg,.png" } ,
dropdown : { prefill : null , content : null } ,
tag : { limit : null , prefill : null , content : null , tag _groups : null } ,
category : { limit : 1 , property : "id" , prefill : null , content : null } ,
group : { prefill : null , content : null } ,
user _selector : { } ,
} ,
realtime _validations : {
similar _topics : {
types : [ "text" ] ,
component : "similar-topics-validator" ,
backend : true ,
required _params : [ ] ,
} ,
} ,
custom _fields : [
{
id : "external" ,
klass : "category" ,
name : "require_topic_approval" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "require_reply_approval" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "num_auto_bump_daily" ,
type : "integer" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "has_chat_enabled" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "post" ,
name : "missing uploads" ,
type : "json" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "post" ,
name : "missing uploads ignored" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "post" ,
name : "notice" ,
type : "json" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "post" ,
name : "local_dates" ,
type : "json" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "post" ,
name : "has_polls" ,
type : "boolean" ,
serializers : null ,
} ,
] ,
} ;
const getUnsubscribedAdminWizards = {
subscribed : false ,
subscription _type : "none" ,
subscription _attributes : {
wizard : {
required : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
restart _on _revisit : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
step : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
required _data : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted _params : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
field : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [
"text" ,
"textarea" ,
"text_only" ,
"date" ,
"time" ,
"date_time" ,
"number" ,
"checkbox" ,
"dropdown" ,
"upload" ,
] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
realtime _validations : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
action : {
type : {
none : [ "create_topic" , "update_profile" , "open_composer" , "route_to" ] ,
standard : [
"create_topic" ,
"update_profile" ,
"open_composer" ,
"route_to" ,
"send_message" ,
"watch_categories" ,
"add_to_group" ,
] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
custom _field : {
klass : {
none : [ "topic" , "post" ] ,
standard : [ "topic" , "post" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [ "string" , "boolean" , "integer" ] ,
standard : [ "string" , "boolean" , "integer" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
api : {
all : { none : [ ] , standard : [ ] , business : [ "*" ] , community : [ "*" ] } ,
} ,
} ,
} ;
const getCustomFields = {
custom _fields : [
{
id : "external" ,
klass : "category" ,
name : "require_topic_approval" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "require_reply_approval" ,
type : "boolean" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "num_auto_bump_daily" ,
type : "integer" ,
serializers : null ,
} ,
{
id : "external" ,
klass : "category" ,
name : "has_chat_enabled" ,
type : "boolean" ,
serializers : null ,
} ,
] ,
} ;
const getWizardTestingLog = {
wizard : {
id : "this_is_testing_wizard" ,
name : "This is testing wizard" ,
} ,
logs : [
{
date : "2022-12-13T05:32:38.906-04:00" ,
action : "create_topic" ,
username : "christin" ,
message : "success: created topic - id: 119" ,
user : {
id : 55 ,
username : "christin" ,
name : "Sybil Ratke" ,
avatar _template : "" ,
} ,
} ,
{
date : "2022-12-12T09:41:57.888-04:00" ,
action : "create_topic" ,
username : "someuser" ,
message :
"error: invalid topic params - title: ; post: creating a text for this text area that is being displayed here." ,
user : {
id : 1 ,
username : "someuser" ,
name : null ,
avatar _template : "" ,
} ,
} ,
] ,
total : 2 ,
} ;
const getWizardSubmissions = {
wizard : {
id : "this_is_testing_wizard" ,
name : "This is testing wizard" ,
} ,
submissions : [
{
id : "1" ,
fields : {
step _1 _field _1 : {
value :
"creating a text for this text area that is being displayed here." ,
type : "textarea" ,
label : "label field" ,
} ,
} ,
submitted _at : "2022-12-12T09:41:57-04:00" ,
user : {
id : 1 ,
username : "someuser" ,
name : null ,
avatar _template : "" ,
} ,
} ,
] ,
total : 1 ,
} ;
2023-05-11 07:44:23 +02:00
const getAnotherWizardSubmission = {
wizard : { id : "another_wizard" , name : "another wizard" } ,
submissions : [
{
id : "00925bcd58366d07fb698dc5" ,
fields : {
step _1 _field _1 : {
value : "More content here by user" ,
type : "text" ,
label : "Content to be inserted" ,
} ,
step _2 _field _1 : {
value : "body of the content created by the user" ,
type : "textarea" ,
label : "Step 2 content" ,
} ,
} ,
submitted _at : "2023-05-10T20:58:11-04:00" ,
user : {
id : 29 ,
username : "anotheruser" ,
name : null ,
avatar _template : "" ,
} ,
} ,
{
id : "dc094efcd4873d6da4666c1a" ,
fields : {
step _1 _field _1 : {
value : "Title for the content being created" ,
type : "text" ,
label : "Content to be inserted" ,
} ,
step _2 _field _1 : {
value : "THis is the body of the content that will be created" ,
type : "textarea" ,
label : "Step 2 content" ,
} ,
} ,
submitted _at : "2023-05-10T20:56:14-04:00" ,
user : {
id : 1 ,
username : "someuser" ,
name : null ,
avatar _template : "" ,
} ,
} ,
] ,
total : 2 ,
} ;
2022-12-21 17:23:52 +01:00
const getBusinessAdminWizard = {
subscribed : true ,
subscription _type : "business" ,
subscription _attributes : {
wizard : {
required : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
restart _on _revisit : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
step : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
required _data : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted _params : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
field : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [
"text" ,
"textarea" ,
"text_only" ,
"date" ,
"time" ,
"date_time" ,
"number" ,
"checkbox" ,
"dropdown" ,
"upload" ,
] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
realtime _validations : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
action : {
type : {
none : [ "create_topic" , "update_profile" , "open_composer" , "route_to" ] ,
standard : [
"create_topic" ,
"update_profile" ,
"open_composer" ,
"route_to" ,
"send_message" ,
"watch_categories" ,
"add_to_group" ,
] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
custom _field : {
klass : {
none : [ "topic" , "post" ] ,
standard : [ "topic" , "post" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [ "string" , "boolean" , "integer" ] ,
standard : [ "string" , "boolean" , "integer" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
api : {
all : { none : [ ] , standard : [ ] , business : [ "*" ] , community : [ "*" ] } ,
} ,
} ,
} ;
const getStandardAdminWizard = {
subscribed : true ,
subscription _type : "standard" ,
subscription _attributes : {
wizard : {
required : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
restart _on _revisit : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
step : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
required _data : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
permitted _params : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
field : {
condition : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [
"text" ,
"textarea" ,
"text_only" ,
"date" ,
"time" ,
"date_time" ,
"number" ,
"checkbox" ,
"dropdown" ,
"upload" ,
] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
realtime _validations : {
none : [ ] ,
standard : [ "*" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
action : {
type : {
none : [ "create_topic" , "update_profile" , "open_composer" , "route_to" ] ,
standard : [
"create_topic" ,
"update_profile" ,
"open_composer" ,
"route_to" ,
"send_message" ,
"watch_categories" ,
"add_to_group" ,
] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
custom _field : {
klass : {
none : [ "topic" , "post" ] ,
standard : [ "topic" , "post" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
type : {
none : [ "string" , "boolean" , "integer" ] ,
standard : [ "string" , "boolean" , "integer" ] ,
business : [ "*" ] ,
community : [ "*" ] ,
} ,
} ,
api : {
all : { none : [ ] , standard : [ ] , business : [ "*" ] , community : [ "*" ] } ,
} ,
} ,
} ;
const getAdminTestingWizard = {
id : "this_is_testing_wizard" ,
name : "This is testing wizard" ,
save _submissions : true ,
after _time : false ,
after _time _scheduled : "2022-12-12T13:45:00.000Z" ,
prompt _completion : true ,
steps : [
{
id : "step_1" ,
title : "step 1" ,
raw _description : "This is a description for step 1 sads" ,
fields : [
{
id : "step_1_field_1" ,
label : "label field" ,
description : "this is the label description" ,
type : "textarea" ,
placeholder : "insert a textarea text here." ,
} ,
] ,
description : "This is a description for step 1 sads" ,
} ,
] ,
actions : [
{
id : "action_1" ,
run _after : "wizard_completion" ,
type : "create_topic" ,
skip _redirect : false ,
post : "step_1_field_1" ,
post _builder : false ,
title : [
{
type : "assignment" ,
output : "Testing title" ,
output _type : "text" ,
output _connector : "set" ,
pairs : [ ] ,
} ,
] ,
category : [
{
type : "assignment" ,
output _type : "category" ,
output _connector : "set" ,
output : [ 30 ] ,
} ,
] ,
} ,
] ,
} ;
const getCreatedWizard = {
id : "new_wizard_for_testing" ,
2023-05-26 06:35:01 +02:00
name : "New wizard for testing" ,
2022-12-21 17:23:52 +01:00
save _submissions : true ,
2023-05-26 06:35:01 +02:00
multiple _submissions : false ,
after _signup : false ,
prompt _completion : false ,
2022-12-21 17:23:52 +01:00
steps : [
{
id : "step_1" ,
2023-05-26 06:35:01 +02:00
title : "step title" ,
raw _description :
'Input in step description composer\n\n**Bold text**\n\n*emphasized text*\n\n\u003e Blockqoute text\n\n```\n code text\n \n```\n\n* List item\n* List item\n\n1. List item\n1. List item\n\n[Google](https://google.com)[date=2023-05-25 timezone="America/La_Paz"]' ,
2022-12-21 17:23:52 +01:00
fields : [
{
id : "step_1_field_1" ,
2023-05-26 06:35:01 +02:00
label : "field title" ,
description : "First step field description" ,
2022-12-21 17:23:52 +01:00
type : "text" ,
2023-05-26 06:35:01 +02:00
min _length : "1" ,
placeholder : "Insert text here" ,
validations : { similar _topics : { } } ,
2022-12-21 17:23:52 +01:00
} ,
] ,
2023-05-26 06:35:01 +02:00
description :
'Input in step description composer\n\n**Bold text**\n\n*emphasized text*\n\n\u003e Blockqoute text\n\n```\n code text\n \n```\n\n* List item\n* List item\n\n1. List item\n1. List item\n\n[Google](https://google.com)[date=2023-05-25 timezone="America/La_Paz"]' ,
2022-12-21 17:23:52 +01:00
} ,
] ,
actions : [
{
id : "action_1" ,
run _after : "wizard_completion" ,
type : "create_topic" ,
2023-05-26 06:35:01 +02:00
post _builder : false ,
post _template : "Wizard Fields w{step_1_field_1}" ,
title : [
{
type : "conditional" ,
output : "Result text" ,
output _type : "text" ,
output _connector : "then" ,
pairs : [
{
index : 0 ,
key : "Action title" ,
key _type : "text" ,
value : "Some value" ,
value _type : "text" ,
connector : "equal" ,
} ,
] ,
} ,
] ,
category : [
{
type : "assignment" ,
output _type : "category" ,
output _connector : "set" ,
output : [ 10 ] ,
} ,
] ,
tags : [
{
type : "assignment" ,
output _type : "tag" ,
output _connector : "set" ,
pairs : [ ] ,
output : [ "gazelle" ] ,
} ,
] ,
visible : [
{
type : "conditional" ,
output : "Result text" ,
output _type : "text" ,
output _connector : "then" ,
pairs : [
{
index : 0 ,
key : "Action title" ,
key _type : "text" ,
value : "Some value" ,
value _type : "text" ,
connector : "equal" ,
} ,
] ,
} ,
] ,
} ,
] ,
} ;
const getUniqueWizard = {
id : "unique_wizard" ,
name : "Unique wizard for testing" ,
save _submissions : true ,
multiple _submissions : false ,
after _signup : false ,
prompt _completion : false ,
steps : [
{
id : "step_1" ,
title : "step title" ,
raw _description :
'Input in step description composer\n\n**Bold text**\n\n*emphasized text*\n\n\u003e Blockqoute text\n\n```\n code text\n \n```\n\n* List item\n* List item\n\n1. List item\n1. List item\n\n[Google](https://google.com)[date=2023-05-25 timezone="America/La_Paz"]' ,
fields : [
{
id : "step_1_field_1" ,
label : "field title" ,
description : "First step field description" ,
type : "text" ,
min _length : "1" ,
placeholder : "Insert text here" ,
validations : { similar _topics : { } } ,
} ,
] ,
description :
'Input in step description composer\n\n**Bold text**\n\n*emphasized text*\n\n\u003e Blockqoute text\n\n```\n code text\n \n```\n\n* List item\n* List item\n\n1. List item\n1. List item\n\n[Google](https://google.com)[date=2023-05-25 timezone="America/La_Paz"]' ,
} ,
{
id : "step_2" ,
title : "step title two" ,
raw _description : "Input in step description composer" ,
fields : [
{
id : "step_2_field_1" ,
label : "step 2 field title" ,
description : "First step field description" ,
type : "textarea" ,
min _length : "1" ,
placeholder : "Insert text here" ,
validations : { similar _topics : { } } ,
} ,
{
id : "step_2_field_2" ,
label : "step 2 field two title" ,
description : "Second Step field two field description" ,
type : "text" ,
min _length : "1" ,
placeholder : "Insert more text here" ,
validations : { similar _topics : { } } ,
} ,
] ,
description : "Input in step description composer" ,
} ,
] ,
actions : [
{
id : "action_1" ,
run _after : "wizard_completion" ,
type : "create_topic" ,
post _builder : false ,
post _template : "Wizard Fields w{step_1_field_1}" ,
title : [
{
type : "conditional" ,
output : "Result text" ,
output _type : "text" ,
output _connector : "then" ,
pairs : [
{
index : 0 ,
key : "Action title" ,
key _type : "text" ,
value : "Some value" ,
value _type : "text" ,
connector : "equal" ,
} ,
] ,
} ,
] ,
category : [
{
type : "assignment" ,
output _type : "category" ,
output _connector : "set" ,
output : [ 10 ] ,
} ,
] ,
tags : [
{
type : "assignment" ,
output _type : "tag" ,
output _connector : "set" ,
pairs : [ ] ,
output : [ "gazelle" ] ,
} ,
] ,
visible : [
{
type : "conditional" ,
output : "Result text" ,
output _type : "text" ,
output _connector : "then" ,
pairs : [
{
index : 0 ,
key : "Action title" ,
key _type : "text" ,
value : "Some value" ,
value _type : "text" ,
connector : "equal" ,
} ,
] ,
} ,
] ,
2022-12-21 17:23:52 +01:00
} ,
] ,
} ;
2023-05-26 06:35:01 +02:00
2023-03-21 09:48:46 +01:00
const getNewApi = {
name : "new_api" ,
title : "new API" ,
authorization : {
auth _type : "basic" ,
auth _url : null ,
token _url : null ,
client _id : null ,
client _secret : null ,
authorized : null ,
auth _params : [ ] ,
access _token : null ,
refresh _token : null ,
token _expires _at : null ,
token _refresh _at : null ,
code : null ,
username : "some_username" ,
password : "some_password" ,
} ,
endpoints : [
{
id : "8371de" ,
name : "endpoint_name" ,
method : "POST" ,
url : "https://test.api.com" ,
content _type : "application/json" ,
success _codes : [ 200 , 100 ] ,
} ,
] ,
log : [ ] ,
} ;
2023-03-21 09:56:48 +01:00
const putNewApi = {
success : "OK" ,
api : {
name : "new_api" ,
title : "new API" ,
authorization : {
auth _type : "basic" ,
auth _url : null ,
token _url : null ,
client _id : null ,
client _secret : null ,
authorized : null ,
auth _params : [ ] ,
access _token : null ,
refresh _token : null ,
token _expires _at : null ,
token _refresh _at : null ,
code : null ,
username : "some_username" ,
password : "some_password" ,
} ,
endpoints : [
{
id : "8371de" ,
name : "endpoint_name" ,
method : "POST" ,
url : "https://test.api.com" ,
content _type : "application/json" ,
success _codes : [ 200 , 100 ] ,
} ,
] ,
log : [ ] ,
} ,
} ;
2023-09-25 16:41:01 +02:00
2023-09-24 19:22:39 +02:00
const getSuppliers = {
2023-09-25 17:10:15 +02:00
suppliers : [
2023-09-25 16:41:01 +02:00
{
2023-09-25 17:10:15 +02:00
id : 1 ,
name : "Pavilion" ,
authorized : false ,
authorized _at : null ,
user : null ,
} ,
] ,
2023-09-24 19:22:39 +02:00
} ;
2023-09-25 16:41:01 +02:00
2023-10-06 17:30:54 +02:00
const getSuppliersAuthorized = {
suppliers : [
{
id : 1 ,
name : "Pavilion" ,
authorized : true ,
authorized _at : null ,
user : null ,
} ,
] ,
} ;
2022-12-21 17:23:52 +01:00
export {
getWizard ,
getUnsubscribedAdminWizards ,
getCustomFields ,
getWizardTestingLog ,
getWizardSubmissions ,
getBusinessAdminWizard ,
getStandardAdminWizard ,
getAdminTestingWizard ,
getCreatedWizard ,
2023-03-21 09:48:46 +01:00
getNewApi ,
2023-03-21 09:56:48 +01:00
putNewApi ,
2023-05-11 07:44:23 +02:00
getAnotherWizardSubmission ,
2023-05-26 06:35:01 +02:00
getUniqueWizard ,
2023-09-24 19:22:39 +02:00
getSuppliers ,
2023-10-06 17:30:54 +02:00
getSuppliersAuthorized ,
2022-12-21 17:23:52 +01:00
} ;