{
"config": { // All clients listen here permanently
"articleBaseUrl": "http://cloud-storage.com/articles/",
}, "userslegalsUrl": {"http://impossible.am/legalstuff/",
"user_id_01for7MW": {
// Clients listen here permanently"facebookPage": "",
"usernamefacebookGroup": "user",
"emailinstagramUser": "user@somewhere.com",
"fitnessLevelfaqsUrl": ""
10, },
"fitnessBiasforAfterburner": 1,{
"createdfacebookPage": 987654345"",
// Unix timestamp (seconds) "facebookGroup": "maxImpactCredit": 3,
"impactCreditinstagramUser": 0.9,
"updatedIC": 987654345, // Unix timestamp (seconds)
"triggersFiredfaqsUrl": ["triggerId_01","triggerId_02"]
}
},
"visibleWorkoutDefsusers": { // Workout defs that are visible to the user
"user_id_01": { // Clients listen here permanently
"visibleIn7MWusername": {"user", // 7MW[default:null]
clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"email": "user@somewhere.com", // [default:null]
"wktdef1fitnessLevel": {10, // [default:10]
"recommendedfitnessBias": ""1, // Not recommended, just visible
[default:1]
"lockedcreated": true987654345, // NotUnix availabletimestamp to user (unlocked via IAP and/or journey trigger)
"lockString": "Finish 6 more workouts before Thurs 9th June"(seconds) [default:0]
"maxImpactCredit": 3, // Displayed to user[default:0]
"MWIimpactCredit": 0.549, // [default:0]
"breakdownupdatedIC": {987654345, // Unix timestamp (seconds) [default:0]
"triggersFired": { "epoctriggerId_01": 0.1true, "triggerId_02": true }, // [default:null]
"cardiosessions": 0.1,{
"metabolicfor7MW": 0.12, // [default:0]
"strengthforAfterburner": 0.1 // [default:0]
},
}"totalActivities": 2, // [default:0]
"wktdef2totalActivities7MW": {1, // [default:0]
"recommendedtotalActivitiesAF": "You need to work on your abs"1, // [default:0]
"firstActivity7MW": 987654345, // RecommendedUnix andtimestamp reason for this to be shown to user
"locked": false(seconds) [default:0]
"firstActivityAF": 987654345, // AvailableUnix totimestamp user
"lockString": "",(seconds) [default:0]
"MWItimedNotifSeqVersion": 0.54, // Version of timed notif sequence user is on (server "breakdown": {use) [default:0]
"epoc"testMode": 0.1false, // Puts the app in 'test mode' for this user [default:false]
"cardio": 0.1, "notifTokens": { // APN tokens for the user's devices "metabolic": 0.1,
[default:null]
"strengthfor7MW": 0.1
}{ "apn_token": true }, // Where 'api_token' is the actual token string
"forAfterburner": { "apn_token": true }
},
}
},
"visibleInAfterburnervisibles": {
// Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"workoutDefs": { // Workout defs that are visible to the user
"wktdef1user_id_01": {
"recommendedfor7MW": "",{ // 7MW Notclients recommended,listen justhere visiblepermanently for ChildAdded, ChildChanged and ChildRemoved
"locked": false, // Available to user
"lockStringwktdef1": "",{
"MWIrecommended": 0.54"", // Not recommended, just visible "breakdown": {// [default:null]
"epoclocked": 0.1true, // Not available to user (unlocked via IAP and/or journey "cardio": 0.1,
trigger) [default:false]
"metaboliclockString": 0.1,
"strength": 0.1"Finish 6 more workouts before Thurs 9th June", // Displayed to user [default:null]
} "MWI": 0.54, // [default:0.5]
}, "wktdef2breakdown": {
"recommendedepoc": "You need to work on your abs", // Recommended and reason for this to be shown to user
"locked": false0.1, // [default:0.25]
"cardio": 0.1, // Available to user
"lockString": "",[default:0.25]
"MWImetabolic": 0.541, // [default:0.25]
"breakdown": { "strength": 0.1 // [default:0.25]
"epoc": 0.1, }
"cardio": 0.1, },
"metabolicwktdef2": 0.1,{
"strengthrecommended": 0.1
}
"You need to work on your abs", // Recommended and reason for this to be shown to user
} }
}"locked": false, // Available to user
}, "workouts": { "activitieslockString": {"",
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved"MWI": 0.54,
"workout_id_01breakdown": {
// Clients post new activity to here with auto id, server listens "epoc": 0.1,
"workoutDefId": "wktdef1", "finishcardio": 9876543450.1,
// Unix timestamp (seconds) "exertionmetabolic": 0.51,
"finalHeartRateBPMstrength": 160,0.1
}
"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)
"app": "7MW" // Short code of the app the activity was performed in: 7MW, AF, etc }
},
"forAfterburner": { // Afterburner clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"wktdef1": }{
}
}, "resultsrecommended": {
"user_id_01": {", // ClientsNot listenrecommended, herejust permanentlyvisible
for ChildAdded, ChildChanged and ChildRemoved
"workout_id_01locked": {false, // ServerAvailable poststo workoutuser
results here "workoutDefIdlockString": "wktdef1",
"finishMWI": 9876543450.54,
// Unix timestamp (seconds) "AWIbreakdown": 0.1,{
"responseDuration": 3456, "intensity"epoc": 0.91,
"responses": { "cardio": {0.1,
"stressmetabolic": 430.1,
"magnitudeProductstrength": 0.6,1
}
"halflifeProduct": 0.3, },
"durationwktdef2": 5678,{
"volumerecommended": 3456"You need to work on your abs", // Recommended and reason for },this to be shown to user
"strengthlocked": false, {// Available to user
"stresslockString": 43"",
"magnitudeProductMWI": 0.654,
"halflifeProductbreakdown": 0.3,{
"durationepoc": 56780.1,
"volumecardio": 34560.1,
}"metabolic": 0.1,
"epocstrength": {0.1
}
"stress": 43, }
"magnitudeProduct": 0.6, }
}
"halflifeProduct": 0.3},
"routines": {
"duration"user_id_01": 5678,{
"volumefor7MW": 3456{ // 7MW clients listen here permanently for ChildAdded, ChildChanged },
and ChildRemoved
"metabolicroutine_id_01": {
"stresslocked": 43true, // Not available to user (unlocked via IAP and/or journey "magnitudeProduct": 0.6,trigger) [default:false]
"lockString": "Finish 6 "halflifeProduct": 0.3,
more workouts before Thurs 9th June" // Displayed to user [default:null]
"duration": 5678, },
"volumeroutine_id_02": 3456{
}
"locked": true,
}, "lockString": "" // No lock string, so only "muscleGroups": {
unlocked via IAP [default:null]
"upper": 0.3,
},
"lowerroutine_id_03": 0.3,{
"corelocked": 0.4
false, // Available
} "lockString": ""
} }
} },
"afterburn": { "user_id_01forAfterburner": { // 7MW Clientsclients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"start": 345678987, // Unix timestamp (seconds)
"responseroutine_id_03": {
"resolutionlocked": 600false, // Available
Secs "epoc": [0.6,0.5,0.3,0.2,0.1,0.0],
lockString": ""
}
"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], }
},
"metabolicworkouts": [0.6,0.5,0.3,0.2,0.1,0.0]{
"activities": {
}, "impactCredituser_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged "resolution": 600, // Secsand ChildRemoved
"futureCreditworkout_id_01": 0.9,
"pending": [0.0,0.1,0.2,0.3,0.4,0.5]
{ // Clients post new activity to here with auto id, server listens
}, "messagesworkoutDefId": [ "wktdef1", // Messages[no displayeddefault]
below the radar chart
{"tfinish":0,"body":"Restoring body temperature", "detail": ""}, 987654345, // Unix timestamp (seconds) [default:0]
{"t":120,"body"iterations":"Replenishing glycogen stores", "detail": "detail/glycogen"}
], 1.5, // Number of times it was performed [default:1]
"notificationsexertion": 0.5, // [default:0.5]
{"tfinalHeartRateBPM":6000,"body":"Great workout! You're still burning calories and building strength."}, 160, // [default:140]
{"tfinalHeartRateDelay":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": { 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]
}
"date": 4567890987, // Unix timestamp}
(seconds) },
"titleresults": "Post title",{
"read"user_id_01": false,{ // Clients listen here permanently for ChildAdded, ChildChanged "location": "post/location.html",
"icon": "default",and ChildRemoved
"appMaskworkout_id_01": "7MW,AF"
}{ // Server posts workout results here
} }, "workoutDefId": "journeyTriggers: {"wktdef1", // [no default]
"forAfterburner": { "trigger01finish": 987654345, {// Unix timestamp (seconds) "category": "achievement",
// [no default]
"triggerType": "activeDaysInPeriod", "condition1AWI": 70.1, // 7 activities
[default:0.5]
"condition2responseDuration": 73456, // in 7 days[default: 0]
"appMaskintensity": "7MW,AF"0.9, "actions": [
// [default:0.5]
{"actionTypeapp": "postArticle","articleId":"article_id_01","data":"e.g. url parameters"},
{"actionType":"unlockWorkout","workoutDefId":"workoutDef_id_01","articleId":"article_id_02","data":""}
]
},
"trigger02": {
"category": "education",
7MW", // Short code of the app the activity was performed in: 7MW, AF, etc [no default]
"triggerTyperesponses": "totalActivities",
{ // [no default]
"condition1cardio": 10, // 10 activities
{
"condition2stress": 043,
// Not used "appMaskmagnitudeProduct": "7MW,AF",
0.6,
"actions": [ {"actionTypehalflifeProduct":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"}
0.3,
] }
"duration": 5678,
}, "for7MW": { "trigger01volume": {3456
"category": "achievement", "triggerType": "activeDaysInPeriod" },
"condition1": 7, // 7 activities "condition2strength": {
7, // in 7 days "appMaskstress": "7MW,AF",
43,
"actions": [ {"actionTypemagnitudeProduct":"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 0.6,
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
},
"epoc": {
"appMaskstress": "7MW43,AF",
"actions": [ {"actionType":"postArticle","articleId":"article_id_01","data":"e.g. url parameters"} ]
"magnitudeProduct": 0.6,
} } }, "definitions": { "versionhalflifeProduct": 10.3,
"exerciseDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved"duration": 5678,
"exdef1volume": 3456
{ "behaviour": 1},
"titlemetabolic": "Cruches",{
"videostress": "01-Crunches.mp4",43,
"imagemagnitudeProduct": "abs"0.6,
"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 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.",
"halflifeProduct": 0.3,
"duration": 5678,
"volume": 3456
}
"subtitle": "Target your abs for},
a balanced set of stomach muscles.", "muscleGroups": {
"calPerSec": 5, "skillupper": 0.23, // [default: 0.3]
"strength": 0.7, "cardiolower": 0.13, // [default: 0.3]
"epoc": 0.4, "metaboliccore": 0.4, // [default: 0.3]
"upper": 0.5, }
"core": 0.5, }
"lower": 0.5 }
}
},
"afterburn": {
"exdef2user_id_01": { // Clients listen here permanently
"behaviourstart": 1345678987, // Unix timestamp (seconds) // [no default]
"titleresponse": "Squats", { // [default:null]
"videoresolution": "02-Squats.mp4",
600, // Secs
"imageepoc": "abs"[0.6,0.5,0.3,0.2,0.1,0.0],
"desccardio": "Squats are an excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks."[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],
"subtitlemetabolic": "Train your lower body and core.",
[0.6,0.5,0.3,0.2,0.1,0.0]
},
"calPerSecimpactCredit": 4, { // [default:null]
"skillresolution": 0.2600, // Secs
"strengthfutureCredit": 0.69,
"cardiopending": [0.3,
"epoc": 0,0.1,0.2,0.3,0.4,0.5]
"metabolic": 0.6},
"uppermessages": 0.5,
"core": 0.5,[ // Messages displayed below the radar chart [default:null]
{"lowert": 0.5
0,"body":"Restoring body temperature", "detail": ""},
} },
"workoutDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved{"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
],
"wktdef1notifications": {[ "type": 1,// [default:null]
{"titlet": "Aerobic",
"image": "abs"6000,"body":"Great workout! You're still burning calories and building strength."},
"desc{"t":14400,"body": "AerobicFitness Basic Movement",
"breakDuration": 5,
"appStoreId: "workout01", // StoreKit product id
"in7MW": true, // For server use
"inAfterburner": false, // For server usetest unlocked! You're ready to take another fitness test."}
]
}
},
"timelineArticles": {
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"exercises"article_id_01": {
[ "date": 4567890987, // Unix {timestamp (seconds) // [no default]
"idtitle": "exdef1Post title", // [no default]
"durationread": 20
false, // [default:true]
}"location": "post/location.html", // [no default]
"icon": "default", // [default:"default"]
{ "id"appMask": "exdef27MW,AF", // [default: all apps]
"durationpromptRating": 15true // [default:false]
}
}, }
},
"definitions": {
"routines": { // Clients listen here permanently "id": "exdef3"for ChildAdded, ChildChanged and ChildRemoved
"durationroutine_id_01": {
10 "title": "The Wonder }Routine", // [no default]
{ "image": "wonder-routine", // [default:"default-routine"]
"iddesc": "exdef4Big long description", // [default:null]
"durationappStoreId7MW": 5
"routine01", // StoreKit product id [default:null]
}, "in7MW": true, // For server use [default:false]
{ "idinAfterburner": "exdef5"false, // For server use [default:false]
"durationlockedIn7MW": 10false, // For server use [default:false]
} "lockedInAfterburner": false, // For server use [default:false],
"adaptiveStressvideo": {"", // [default:null]
"strengthminFitnessLevel": 0.24, // [default:1]
"cardioworkoutDefs": 0.9, { // [no default]
"metabolicwktdef1": 0.6, {
"epoctype": 0.6
1, // [default:1]
}, "title": "muscleStressAerobic":, {// [no default]
"upper "image": 10"abs", // [default:"default"]
"lowerdesc": 10,"Aerobic Basic Movement", // [default:null]
"core": 10 "breakDuration": 5, // }// [default:10]
}, "wktdef2appStoreId7MW": {
"workout01", // StoreKit product id [default:null]
"type": 1, "titlelocked": "Thai Boxing"false, // For server use [default:false]
"MWI": 0.54, "image": "abs",// [default:0.5]
"descexercises": "Boxing With Kicking",[ // [no default]
"breakDuration": 4, "appStoreId: "", // StoreKit product{
id "in7MW": false, // For server use "id": "exdef1", // [no default]
"inAfterburnerduration": true,20 // For server use [no default]
},
"exercises": [ {
"id": "exdef5exdef2",
"duration": 15
},
{
"id": "exdef3",
"duration": 10
},
{ {
"id": "exdef1exdef4",
"duration": 5
},
], {
"stress": { "strengthid": 0.2,"exdef5",
"cardioduration": 0.9,10
"metabolic": 0.6, }
"epoc": 0.6 ],
}, "muscleStressadaptiveStress": {
"upperstrength": 100.2, // [default:1]
"lower "cardio": 100.9, // [default:1]
"core": 10 "metabolic": 0.6, // [default:1]
"epoc": 0.6 // [default:1]
},
} }"muscleStress": {
}
} "upper": 10, // [default:1]
"lower": 10, // [default:1]
"core": 10 // [default:1]
}
}
}
}
},
"exerciseDefs": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"exdef1": {
"behaviour": 1, // [default:1]
"title": "Cruches", // [no default]
"video": "01-Crunches.mp4", // [no default]
"image": "abs", // [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 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]
"subtitle": "Target your abs for a balanced set of stomach muscles.", // [default:null]
"calPerSec": 5, // [default:0]
"skill": 0.2, // [default:0.5]
"strength": 0.7, // [default:0.5]
"cardio": 0.1, // [default:0.5]
"epoc": 0.4, // [default:0.5]
"metabolic": 0.4, // [default:0.5]
"upper": 0.5, // [default:0.5]
"core": 0.5, // [default:0.5]
"lower": 0.5, // [default:0.5]
"needsHalfwaySwap": false // [default:false]
},
"exdef2": {
"behaviour": 1,
"title": "Squats",
"video": "02-Squats.mp4",
"image": "abs",
"desc": "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.",
"calPerSec": 4,
"skill": 0.2,
"strength": 0.6,
"cardio": 0.3,
"epoc": 0.4,
"metabolic": 0.6,
"upper": 0.5,
"core": 0.5,
"lower": 0.5,
"needsHalfwaySwap": true
}
},
"journeyTriggers": {
"forAfterburner": {
"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"}
]
}
},
"for7MW": {
"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"}
]
}
}
}
"timedNotifs": {
"forAfterburner": {
"notif01": {
"deltaHours": 24, // Delta after APN token reg that the notif is delivered [no default]
"seqVersion": 0, // Sequence version to allow future updates without flooding existing users [default:0]
"title": "Title of notification", // [default:""]
"body": "Body of notification" // [no default]
},
},
"for7MW": {
"notif01": {
"deltaHours": 24,
"seqVersion": 0,
"title": "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]
}
}
}
},
} |