{
"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": "6The WeekWonder Wedding Routine", // [no default]
"image": "some_imagewonder-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 "exdef1image": {
"behaviourabs": 1, // [default:1]"default"]
"titledesc": "CruchesAerobic Basic Movement", // [no default:null]
"videobreakDuration": "01-Crunches.mp4",5, // // [no default:10]
"imageappStoreId7MW": "absworkout01", // StoreKit product id [default:"default"]null]
"desclocked": "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 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]
false, // For server use [default:false]
"MWI": 0.54, // [default:0.5]
"exercises": [ // [no default]
{
"subtitleid": "exdef1"Target, your// abs[no fordefault]
a balanced set of stomach muscles.", // [default:null] "calPerSecduration": 5,20 // [no default:0]
"skill": 0.2, // [default:0.5]
},
"strength": 0.7, // [default:0.5] {
"cardio": 0.1, // [default:0.5] "epocid": 0.4, // [default:0.5]"exdef2",
"metabolicduration": 0.4, // [default:0.5] 15
"upper": 0.5 },
// [default:0.5] "core": 0.5, // [default:0.5] {
"lower": 0.5, // [default:0.5] "id": "needsHalfwaySwapexdef3":,
false // [default:false] }, "exdef2duration": 10
{ "behaviour": 1},
"title": "Squats", {
"video": "02-Squats.mp4", "imageid": "absexdef4",
"descduration": "Squats5
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",
"skill": 0.2, "strengthduration": 0.6, 10
"cardio": 0.3, }
"epoc": 0.4, ],
"metabolic": 0.6, "upperadaptiveStress": 0.5, {
"corestrength": 0.52, // [default:1]
"lower": 0.5, "needsHalfwaySwapcardio": true
0.9, // [default:1]
} }, "workoutDefsmetabolic": {0.6, // Clients[default:1]
listen here permanently for ChildAdded, ChildChanged and ChildRemoved "wktdef1epoc": {0.6 // [default:1]
"type": 1},
// [default:1] "titlemuscleStress": "Aerobic", // [no default] {
"imageupper": "abs"10, // [default:"default"]1]
"desclower": "Aerobic Basic Movement"10, // [default:null]1]
"breakDurationcore": 5, //10 // [default:101]
"appStoreId7MW: "workout01", // StoreKit product id [default:null]
}
"in7MW": true, // For server}
use [default:false] }
"inAfterburner": false, // For server use}
[default:false] },
"exercisesexerciseDefs": [{ // [noClients default]listen here permanently for ChildAdded, ChildChanged and ChildRemoved
{ "exdef1": {
"idbehaviour": "exdef1"1, // [no default:1]
"duration": 20 "title": "Cruches", // [no default]
}"video": "01-Crunches.mp4", // {
[no default]
"idimage": "exdef2abs", // [default:"default"]
"durationdesc": 15"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 can be behind or beside the neck or crossed over "id": "exdef3",
"duration": 10
the chest. Injury can be caused by pushing against the head or neck with hands.", // [default:null]
},
{
"subtitle": "Target your abs for a balanced set of stomach muscles.", // [default:null]
"idcalPerSec": "exdef4"5, // [default:0]
"durationskill": 5
0.2, // [default:0.5]
}"strength": 0.7, // [default:0.5]
{
"cardio": 0.1, // [default:0.5]
"idepoc": "exdef5"0.4, // [default:0.5]
"durationmetabolic": 10
0.4, // [default:0.5]
}
"upper": 0.5, // [default:0.5]
],
"adaptiveStress"core": {
"strength": 0.25, // [default:10.5]
"cardiolower": 0.95, // [default:10.5]
"metabolicneedsHalfwaySwap": 0.6,false // [default:1false]
},
"epocexdef2": 0.6 // [default:1]{
"behaviour": }1,
"muscleStresstitle": {
"Squats",
"uppervideo": 10, // [default:1]"02-Squats.mp4",
"lowerimage": 10"abs",
// [default:1] "desc": "Squats are an "core": 10 // [default:1]
}
},excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks.",
"wktdef2subtitle": { "Train your lower body and core.",
"typecalPerSec": 14,
"titleskill": "Thai Boxing"0.2,
"imagestrength": "abs"0.6,
"desccardio": "Boxing With Kicking"0.3,
"breakDurationepoc": 0.4,
"appStoreId7MW: "", // StoreKit product id
"metabolic": 0.6,
"in7MWupper": false, // For server use0.5,
"inAfterburnercore": true, // For server use0.5,
"exerciseslower": [0.5,
"needsHalfwaySwap": true
{ }
"id": "exdef5"},
"journeyTriggers": {
"durationforAfterburner": 15{
"trigger01": {
}, {
"category": "achievement",
"idtriggerType": "exdef3activeDaysInWeeks",
"durationcondition1": 104, // 4 active days
}, "condition2": 8, // every week for 8 {
weeks
"idactions": "exdef1",[
{"duration": 5
actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
{"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
], ]
"stress": { },
"strengthtrigger02": 0.2,{
"cardiocategory": 0.9"education",
"metabolictriggerType": 0.6"totalActivities",
"epoccondition1": 0.6
10, // 10 activities
}, "condition2": 0, // "muscleStress": {Not used
"upperactions": [
10, "lower": 10,
{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
"core": 10]
}
}
,
}, "for7MW"journeyTriggers: {
"forAfterburnertrigger01": {
"trigger01": {
"category": "achievement",
"triggerType": "activeDaysInWeeks",
"condition1": 4, // 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": {
"category": "education",
"triggerType": "totalActivities",
"condition1": 10, // 10 activities
"condition2": 0, // Not used
"actions": [
{"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
]
}
},
}
"for7MWtimedNotifs": {
"trigger01forAfterburner": {
"categorynotif01": "achievement",{
"triggerTypedeltaHours": "activeDaysInWeeks"24, // Delta after APN token reg that the notif is "condition1": 4, // 4 active daysdelivered [no default]
"condition2seqVersion": 80, // Sequence everyversion weekto forallow 8future weeksupdates without flooding existing users [default:0]
"actions": [ {"actionType"title":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
"Title of notification", // [default:""]
{"actionTypebody":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
]
},
"trigger02": { "Body of notification" // [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]
}
}
}
},
} |