{
"config": { // All clients listen here permanently
"articleBaseUrl": "http://cloud-storage.com/articles/",
"legalsUrl": "http://impossible.am/legalstuff/",
"for7MW": {
"facebookPage": "",
"facebookGroup": "",
"instagramUser": "",
"faqsUrl": ""
},
"forAfterburner": {
"facebookPage": "",
"facebookGroup": "",
"instagramUser": "",
"faqsUrl": ""
}
},
"users": {
"user_id_01": { // Clients listen here permanently
"username": "user", // [default:null]
"email": "user@somewhere.com", // [default:null]
"fitnessLevel": 10, // [default:10]
"fitnessBias": 1, // [default:1]
"created": 987654345, // Unix timestamp (seconds) [default:0]
"maxImpactCredit": 3, // [default:0]
"impactCredit": 0.9, // [default:0]
"updatedIC": 987654345, // Unix timestamp (seconds) [default:0]
"triggersFired": { "triggerId_01": true, "triggerId_02": true }, // [default:null]
"sessions": {
"for7MW": 2, // [default:0]
"forAfterburner": 0 // [default:0]
},
"totalActivities": 2, // [default:0]
"totalActivities7MW": 1, // [default:0]
"totalActivitiesAF": 1, // [default:0]
"firstActivity7MW": 987654345, // Unix timestamp (seconds) [default:0]
"firstActivityAF": 987654345, // Unix timestamp (seconds) [default:0]
} }, "visiblestimedNotifSeqVersion": {0, // Version of timed "workoutDefs": { // Workout defs that are visible to the usernotif sequence user is on (server use) [default:0]
"user_id_01testMode": {false, // Puts the app in 'test mode' for this "for7MWuser [default:false]
"notifTokens": { // 7MW clients listen here permanentlyAPN tokens for ChildAdded, ChildChanged and ChildRemovedthe user's devices [default:null]
"for7MW": { "wktdef1apn_token": {
true }, // Where 'api_token' is the actual token string
"recommendedforAfterburner": { "apn_token",: //true Not}
recommended, just visible // [default:null] }
}
},
"lockedvisibles": true,{
// Not available to user (unlocked via IAP and/or journey trigger) [default:false]
"workoutDefs": { // Workout defs that are visible to the user
"lockStringuser_id_01": {
"Finish 6 more workouts before Thurs 9th June","for7MW": { // Displayed7MW toclients user [default:null]
listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"MWI": 0.54, // [default:0.5]
"breakdown"wktdef1": {
"epocrecommended": 0.1"", // Not recommended, just visible // [default:0.25null]
"cardiolocked": 0.1true, // [default:0.25]
"metabolic": 0.1, // [default:0.25]
Not available to user (unlocked via IAP and/or journey trigger) [default:false]
"lockString": "Finish 6 more workouts before Thurs 9th June", // Displayed to user [default:null]
"strengthMWI": 0.154, // [default:0.255]
}"breakdown": {
}, "epoc": 0.1, "wktdef2": {// [default:0.25]
"recommendedcardio": "You need to work on your abs", // Recommended and reason for this to be shown to user0.1, // [default:0.25]
"locked"metabolic": false0.1, // Available to user[default:0.25]
"lockStringstrength": "",
0.1 // [default:0.25]
"MWI": 0.54, }
"breakdown": { },
"epocwktdef2": 0.1,{
"cardiorecommended": 0.1,
"metabolic": 0.1,
"You need to work on your abs", // Recommended and reason for this to be shown to user
"strengthlocked": 0.1
false, // Available to user
} "lockString": "",
} "MWI": 0.54,
}, "forAfterburnerbreakdown": {
// Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "epoc": 0.1,
"wktdef1 "cardio": {0.1,
"recommendedmetabolic": ""0.1,
// Not recommended, just visible "lockedstrength": false, // Available to user0.1
}
"lockString": "", }
"MWI": 0.54, },
"breakdownforAfterburner": { // Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"epocwktdef1": 0.1,{
"cardiorecommended": 0.1"", // Not recommended, just visible
"metaboliclocked": 0.1false, // Available to user
"strengthlockString": 0.1"",
}
"MWI": 0.54,
}, "wktdef2"breakdown": {
"recommendedepoc": 0.1,
"You need to work on your abs", // Recommended and reason for this to be shown to user"cardio": 0.1,
"lockedmetabolic": false0.1,
// Available to user "lockStringstrength": "", 0.1
}
"MWI": 0.54, },
"breakdownwktdef2": {
"epocrecommended": 0.1,
"cardio": 0.1,
"You need to work on your abs", // Recommended and reason for this to be shown to user
"metaboliclocked": 0.1,
false, // Available to user
"strengthlockString": 0.1"",
}
"MWI": 0.54,
} "breakdown": {
} } "epoc": },0.1,
"routines": { "user_id_01cardio": {0.1,
"for7MW": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved"metabolic": 0.1,
"routine_id_01strength": {0.1
"locked": true, // Not available to user (unlocked via IAP and/or journey trigger) [default:false]
}
}
}
}
},
"lockStringroutines": "Finish{
6 more workouts before Thurs 9th June" // Displayed to user [default:null]
}, "user_id_01": {
"for7MW": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"routine_id_0201": {
"locked": true, // Not available to user (unlocked via IAP and/or journey trigger) [default:false]
"lockString": "" // No lock string, so only unlocked via IAPFinish 6 more workouts before Thurs 9th June" // Displayed to user [default:null]
},
"routine_id_0302": {
"locked": falsetrue, // Available
"lockString": "" // No lock string, so only unlocked via IAP [default:null]
} },
"forAfterburnerroutine_id_03": {
// 7MW clients listen here permanently for "locked": false, // Available
"lockString": ""
}
},
"forAfterburner": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"routine_id_03": {
"locked": false, // Available
"lockString": ""
}
}
}
}
},
"workouts": {
"activities": {
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"workout_id_01": { // Clients post new activity to here with auto id, server listens
"workoutDefId": "wktdef1", // [no default]
"finish": 987654345, // Unix timestamp (seconds) [default:0]
"iterations": 1.5, // Number of times it was performed [default:1]
"exertion": 0.5, // [default:0.5]
"finalHeartRateBPM": 160, // [default:140]
"finalHeartRateDelay": 0, // Length of delay (in secs) after the workout before the HR was measured (0 if they didn't press the 'start again' button) [default:0]
"app": "7MW" // Short code of the app the activity was performed in: 7MW, AF, etc [default:null]
}
}
},
"results": {
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"workout_id_01": { // Server posts workout results here
"workoutDefId": "wktdef1", // [no default]
"finish": 987654345, // Unix timestamp (seconds) // [no default]
"AWI": 0.1, // [default:0.5]
"responseDuration": 3456, // [default: 0]
"intensity": 0.9, // [default:0.5]
"app": "7MW", // Short code of the app the activity was performed in: 7MW, AF, etc [no default]
"responses": { // [no default]
"cardio": {
"stress": 43,
"magnitudeProduct": 0.6,
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
},
"strength": {
"stress": 43,
"magnitudeProduct": 0.6,
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
},
"epoc": {
"stress": 43,
"magnitudeProduct": 0.6,
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
},
"metabolic": {
"stress": 43,
"magnitudeProduct": 0.6,
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
}
},
"muscleGroups": {
"upper": 0.3, // [default: 0.3]
"lower": 0.3, // [default: 0.3]
"core": 0.4 // [default: 0.3]
}
}
}
}
},
"afterburn": {
"user_id_01": { // Clients listen here permanently
"start": 345678987, // Unix timestamp (seconds) // [no default]
"response": { // [default:null]
"resolution": 600, // Secs
"epoc": [0.6,0.5,0.3,0.2,0.1,0.0],
"cardio": [0.6,0.5,0.3,0.2,0.1,0.0],
"strength": [0.6,0.5,0.3,0.2,0.1,0.0],
"metabolic": [0.6,0.5,0.3,0.2,0.1,0.0]
},
"impactCredit": { // [default:null]
"resolution": 600, // Secs
"futureCredit": 0.9,
"pending": [0.0,0.1,0.2,0.3,0.4,0.5]
},
"messages": [ // Messages displayed below the radar chart [default:null]
{"t":0,"body":"Restoring body temperature", "detail": ""},
{"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
],
"notifications": [ // [default:null]
{"t":6000,"body":"Great workout! You're still burning calories and building strength."},
{"t":14400,"body":"Fitness test unlocked! You're ready to take another fitness test."}
]
}
},
"timelineArticles": {
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"article_id_01": {
"date": 4567890987, // Unix timestamp (seconds) // [no default]
"title": "Post title", // [no default]
"read": false, // [default:true]
"location": "post/location.html", // [no default]
"icon": "default", // [default:"default"]
"appMask": "7MW,AF", // [default: all apps]
} "promptRating": true // [default:false]
}
}
},
"definitions": {
"routines": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"routine_id_01": {
"title": "The Wonder Routine", // [no default]
"image": "wonder-routine", // [default:"default-routine"]
"desc": "Big long description", // [default:null]
"appStoreId7MW": "routine01", // StoreKit product id [default:null]
"in7MW": true, // For server use [default:false]
"inAfterburner": false, // For server use [default:false]
"workoutDefslockedIn7MW": [false, // For server use [no default:false]
"lockedInAfterburner": false, {// For server use [default:false]
"idvideo": "wktDef01", // [no default:null]
"minFitnessLevel": 4, },
// [default:1]
"workoutDefs": { // [no default]
"idwktdef1": "wktDef02"
{
} "type": 1, // [default:1]
}
}, "exerciseDefstitle": {"Aerobic", // Clients[no listendefault]
here permanently for ChildAdded, ChildChanged and ChildRemoved "image": "exdef1": {abs", // [default:"default"]
"behaviourdesc": 1 "Aerobic Basic Movement", // [default:1null]
"titlebreakDuration": "Cruches",5, // // [no default:10]
"videoappStoreId7MW": "01-Crunches.mp4workout01", // [no default]StoreKit product id [default:null]
"imagelocked": "abs"false, // For server use [default:false]
"MWI": 0.54, // [default:"default"]0.5]
"descexercises": "A[ crunch// begins[no withdefault]
lying face up on the floor with knees bent. The movement begins by curling the{
shoulders towards the pelvis. The hands can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands."id": "exdef1", // [no default:null]
"subtitle": "Target your abs for a balanced set of stomach muscles.","duration": 20 // [no default:null]
"calPerSec": 5 },
// [default:0] "skill": 0.2, // [default:0.5] {
"strength": 0.7, // [default:0.5]
"cardioid": 0.1, // [default:0.5]"exdef2",
"epocduration": 0.4, // [default:0.5] 15
"metabolic": 0.4 },
// [default:0.5] "upper": 0.5, // [default:0.5] {
"core": 0.5, // [default:0.5]
"lowerid": 0.5, // [default:0.5]"exdef3",
"needsHalfwaySwapduration": 10
false // [default:false] }, },
"exdef2": { "behaviour": 1, {
"title": "Squats", "videoid": "02-Squats.mp4exdef4",
"image": "abs",
"descduration": 5
"Squats are an excellent exercise for training the lower body and core muscles, if done},
regularly they help to define thighs and buttocks.", {
"subtitle": "Train your lower body and core.", "calPerSecid": 4,"exdef5",
"skillduration": 0.2,10
"strength": 0.6, }
"cardio": 0.3, ],
"epoc": 0.4, "metabolicadaptiveStress": 0.6, {
"upperstrength": 0.5,2, // [default:1]
"corecardio": 0.59, // [default:1]
"lower": 0.5, "needsHalfwaySwapmetabolic": true
0.6, // [default:1]
} }, "workoutDefsepoc": {0.6 // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved[default:1]
},
"wktdef1muscleStress": {
"typeupper": 110, // [default:1]
"titlelower": "Aerobic"10, // [no default:1]
"imagecore": "abs",10 // [default:"default"1]
"desc": "Aerobic Basic Movement", // [default:null]}
"breakDuration": 5, // // [default:10]
"appStoreId7MW: "workout01", // StoreKit product id [default:null] }
}
}
},
"in7MWexerciseDefs": true,{ // For server use [default:false] Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"exdef1": {
"inAfterburnerbehaviour": false1, // For server use [default:false1]
"exercisestitle": ["Cruches", // [no default]
{
"id"video": "exdef101-Crunches.mp4", // [no default]
"durationimage": 20"abs", // [no default:"default"]
"desc": "A },crunch begins with lying face up on the floor with knees {bent. The movement begins by curling the shoulders towards the pelvis. The hands "id": "exdef2",
"duration": 15
},
can be behind or beside the neck or crossed over the chest. Injury can be caused by pushing against the head or neck with hands.", // [default:null]
{
"id": "exdef3",
"subtitle": "Target your abs for a balanced set of stomach muscles.", // [default:null]
"durationcalPerSec": 5, 10
// [default:0]
}"skill": 0.2, // [default:0.5]
{
"strength": 0.7, // [default:0.5]
"idcardio": "exdef4"0.1, // [default:0.5]
"durationepoc": 0.4, // [default:0.5]
}"metabolic": 0.4, // [default:0.5]
{
"upper": 0.5, // [default:0.5]
"idcore": "exdef5"0.5, // [default:0.5]
"durationlower": 10
0.5, // [default:0.5]
"needsHalfwaySwap": }false // [default:false]
]},
"adaptiveStressexdef2": {
"strengthbehaviour": 0.2, // [default:1]
1,
"cardiotitle": 0.9, // [default:1]
"Squats",
"metabolicvideo": 0.6, // [default:1]
"02-Squats.mp4",
"image": "abs",
"epocdesc": 0.6 // [default:1]
},
"muscleStress": {
"Squats are an excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks.",
"uppersubtitle": "Train 10,your // [default:1]
lower body and core.",
"lowercalPerSec": 104,
// [default:1]
"skill": 0.2,
"corestrength": 0.6,
10 // [default:1] "cardio": 0.3,
} },"epoc": 0.4,
"wktdef2metabolic": {0.6,
"typeupper": 10.5,
"titlecore": "Thai Boxing"0.5,
"imagelower": "abs"0.5,
"descneedsHalfwaySwap": true
"Boxing With Kicking", }
"breakDuration": 4},
"appStoreId7MW: "", // StoreKit product id"journeyTriggers": {
"in7MWforAfterburner": false, // For server use{
"inAfterburnertrigger01": true,{
// For server use "exercisescategory": ["achievement",
{
"triggerType": "activeDaysInWeeks",
"idcondition1": "exdef5",
4, // 4 active days
"durationcondition2": 158, // every week for 8 weeks
}, "actions": [
{ "id": "exdef3"{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
"duration": 10
{"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
]
},
"trigger02": {
"idcategory": "exdef1education",
"durationtriggerType": 5"totalActivities",
}
"condition1": 10, // 10 activities
], "condition2": 0, "stress": {// Not used
"strengthactions": 0.2, [
"cardio": 0.9,
{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
"metabolic": 0.6, ]
}
"epoc": 0.6 },
"muscleStressfor7MW": {
"uppertrigger01": 10,{
"lowercategory": 10"achievement",
"coretriggerType": "activeDaysInWeeks",
10 } "condition1": 4, // 4 active days
} }, "journeyTriggerscondition2": {8, // every week for 8 weeks
"forAfterburner": { "trigger01actions": [
{ {"categoryactionType": "achievementpostArticle",
"triggerType"articleId": "activeDaysInWeeksarticle_id_01","data":"e.g. url parameters"},
"condition1": 4, // 4 active days {"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
"condition2": 8, // every week for 8 weeks
]
},
"actionstrigger02": [
{
{"actionTypecategory": "postArticleeducation","articleId":"article_id_01","data":"e.g. url parameters"},
"triggerType": "totalActivities",
{"actionTypecondition1":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
10, // 10 activities
] "condition2": 0, // Not used
}, "trigger02actions": [
{ "category {"actionType":"postArticle","articleId": "educationarticle_id_01","data":"e.g. url parameters"}
"triggerType": "totalActivities", ]
}
"condition1": 10, // 10 activities }
}
"condition2timedNotifs": {
0, // Not used "forAfterburner": {
"actionsnotif01": [
{
{"actionTypedeltaHours":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
] 24, // Delta after APN token reg that the notif is delivered [no default]
}
},
"for7MW": {"seqVersion": 0, // Sequence version to allow future updates without flooding existing users [default:0]
"trigger01title": {"Title of notification", "category": "achievement",// [default:""]
"triggerTypebody": "activeDaysInWeeks",
"condition1": 4,Body of notification" // 4 active days
"condition2": 8, // every week for 8 weeks
"actions": [
{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
{"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
]
},
"trigger02": {[no default]
},
"category": "education", },
"triggerTypefor7MW": "totalActivities",
{
"condition1notif01": 10, // 10 activities{
"condition2deltaHours": 024, // Not used
"actionsseqVersion": [0,
{"actionTypetitle": "postArticle","articleId":"article_id_01","data":"e.g. url parameters"}Title of notification",
"body": "Body of ]notification"
},
}
}
},
"receipts": {
"user_id_01": {
"receipt_auto_id_01": {
"receipt": "receipt_data", // Written by the client after an IAP purchase
"validation": { // Written by the server after the receipt has been processed
"validationDate": 3456789, // Timestamp [default:0]
"isValid": true [default:false]
}
}
}
},
} |