{
"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"",
"updatedICfaqsUrl": 987654345,""
// Unix timestamp (seconds) }
},
"triggersFiredusers": { "triggerId_01": true, "triggerId_02
"user_id_01": true{ },// Clients listen "sessions": {
here permanently
"for7MWusername": 2"user", // [default:null]
"forAfterburneremail": 0
"user@somewhere.com", // [default:null]
},
"totalActivitiesfitnessLevel": 210, // [default:10]
"totalActivities7MWfitnessBias": 1, "totalActivitiesAF": 1,// [default:1]
"firstActivity7MWcreated": 987654345, // Unix timestamp (seconds) [default:0]
"firstActivityAFmaxImpactCredit": 9876543453, // Unix timestamp (seconds)
}[default:0]
}, "visibleWorkoutDefsimpactCredit": {0.9, // Workout[default:0]
defs that are visible to the user
"user_id_01": {"updatedIC": 987654345, // Unix timestamp (seconds) [default:0]
"for7MWtriggersFired": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"triggerId_01": true, "triggerId_02": true }, // [default:null]
"wktdef1sessions": {
"recommendedfor7MW": ""2, // Not recommended, just visible
[default:0]
"lockedforAfterburner": true,0 // Not available to user (unlocked via IAP and/or journey trigger)
"lockString": "Finish 6 more workouts before Thurs 9th June", // Displayed to user[default:0]
},
"totalActivities": 2, // [default:0]
"totalActivities7MW": 1, // [default:0]
"MWItotalActivitiesAF": 0.541, // [default:0]
"breakdownfirstActivity7MW": {987654345, // Unix timestamp (seconds) [default:0]
"epocfirstActivityAF": 0.1987654345, // Unix timestamp (seconds) [default:0]
"cardiotimedNotifSeqVersion": 0.1, // Version of timed notif sequence user is on (server "metabolic": 0.1,use) [default:0]
"testMode": false, // Puts the "strength": 0.1
app in 'test mode' for this user [default:false]
}"notifTokens": { // APN tokens for the user's },devices [default:null]
"wktdef2for7MW": { "apn_token": true }, // Where 'api_token' is the actual token string
"recommended": "You need to work on your abs"forAfterburner",: // Recommended and reason for this to be shown to user
"locked": false, // Available to user
"lockString": "",{ "apn_token": true }
}
}
},
"visibles": {
"workoutDefs": { // Workout defs that "MWI": 0.54,
are visible to the user
"breakdownuser_id_01": {
"epocfor7MW": 0.1,
{ // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"cardiowktdef1": 0.1,{
"metabolicrecommended": 0.1"", // Not recommended, just visible // [default:null]
"strength": 0.1 "locked": true, // Not available }to user (unlocked via IAP and/or journey trigger) [default:false]
} }, "forAfterburnerlockString": {"Finish //6 Afterburnermore clientsworkouts listenbefore hereThurs permanently for ChildAdded9th June", ChildChanged// andDisplayed ChildRemovedto user [default:null]
"wktdef1": { "recommendedMWI": ""0.54, // Not recommended, just visible
[default:0.5]
"lockedbreakdown": false,{
// Available to user "lockString": "", "MWI"epoc": 0.541, // [default:0.25]
"breakdown": { "epoc"cardio": 0.1, "cardio": 0.1,// [default:0.25]
"metabolic": 0.1, // [default:0.25]
"strength": 0.1 // [default:0.25]
}
},
"wktdef2": {
"recommended": "You need to work on your abs", // Recommended and reason for this to be shown to user
"locked": false, // Available to user
"lockString": "",
"MWI": 0.54,
"breakdown": {
"epoc": 0.1,
"cardio": 0.1,
"metabolic": 0.1,
"strength": 0.1
} }
} }
} } },
"workouts": { "activities": {
"user_id_01forAfterburner": { // Afterburner Clientsclients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"workout_id_01 "wktdef1": {
// Clients post new activity to here with auto id, server listens "recommended": "", // Not recommended, just visible
"workoutDefIdlocked": "wktdef1",
false, // Available to user
"finishlockString": 987654345"",
// Unix timestamp (seconds) "exertionMWI": 0.554,
"finalHeartRateBPMbreakdown": {
160, "finalHeartRateDelayepoc": 0.1,
// 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 "cardio": 0.1,
"metabolic": 0.1,
"strength": 0.1
}
} },
"results": { "user_id_01"wktdef2": {
// Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "recommended": "You need to work on your "workout_id_01": { abs", // ServerRecommended postsand workoutreason resultsfor herethis to be shown to user
"workoutDefId": "wktdef1",
"finishlocked": 987654345false, // UnixAvailable to user
timestamp (seconds) "AWIlockString": 0.1"",
"responseDurationMWI": 34560.54,
"intensitybreakdown": 0.9,
{
"app": "7MW", // Short code of the app the activity was performed in"epoc": 7MW0.1,
AF, etc "responses": { "cardio": {0.1,
"stressmetabolic": 430.1,
"magnitudeProductstrength": 0.6,1
}
"halflifeProduct": 0.3, }
"duration": 5678, }
}
},
"volumeroutines": 3456{
"user_id_01": {
}, "for7MW": { // 7MW clients listen here permanently "strength": {
for ChildAdded, ChildChanged and ChildRemoved
"stressroutine_id_01": 43,{
"magnitudeProductlocked": 0.6true, // Not available to user (unlocked via IAP and/or journey trigger) [default:false]
"halflifeProduct": 0.3,
"durationlockString": 5678,"Finish 6 more workouts before Thurs 9th June" // Displayed to "volume": 3456user [default:null]
},
"epoc"routine_id_02": {
"stresslocked": 43true,
"lockString": "magnitudeProduct": 0.6,
" // No lock string, so only unlocked via IAP [default:null]
"halflifeProduct": 0.3 },
"routine_id_03": {
"duration "locked": 5678false, // Available
"volumelockString": ""
3456 }
}, },
"metabolicforAfterburner": { // 7MW clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"stress "routine_id_03": 43,{
"magnitudeProductlocked": 0.6false, // Available
"halflifeProductlockString": 0.3,""
}
}
"duration": 5678, }
}
},
"volumeworkouts": 3456{
"activities": {
}
},
"user_id_01": { // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"muscleGroupsworkout_id_01": { // Clients post new activity to here with "upper": 0.3auto id, server listens
"lowerworkoutDefId": 0.3"wktdef1", // [no default]
"corefinish": 0.4
987654345, // Unix timestamp (seconds) [default:0]
} "iterations": 1.5, // Number }of times it was }performed [default:1]
} }, "afterburnexertion": {
0.5, // [default:0.5]
"user_id_01": { // Clients listen here permanently
"startfinalHeartRateBPM": 345678987160, // Unix timestamp (seconds)[default:140]
"responsefinalHeartRateDelay": {
"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]
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]
}
}
},
"impactCreditresults": {
"resolutionuser_id_01": 600,{ // Clients Secslisten here permanently for ChildAdded, ChildChanged and ChildRemoved
"futureCredit": 0.9, "workout_id_01": { "pending": [0.0,0.1,0.2,0.3,0.4,0.5]
// Server posts workout results here
}, "messagesworkoutDefId": ["wktdef1", // Messages displayed below the radar chart[no default]
{"tfinish":0,"body":"Restoring body temperature", "detail": ""},
987654345, // Unix timestamp (seconds) // [no default]
{"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
"AWI": 0.1, // [default:0.5]
], "notificationsresponseDuration": 3456, // [default: 0]
{ "tintensity":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 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": {
"article_id_01stress": { 43,
"datemagnitudeProduct": 45678909870.6,
// Unix timestamp (seconds) "titlehalflifeProduct": "Post title"0.3,
"read": false, "duration": 5678,
"location": "post/location.html", "icon": "default", "appMaskvolume": "7MW,AF"3456
} },
}, "journeyTriggers: { "forAfterburnerstrength": {
"trigger01": {
"category": "achievement", "triggerTypestress": "activeDaysInWeeks"43,
"condition1": 4, // 4 active days "condition2magnitudeProduct": 80.6,
// every week for 8 weeks "actions": [ {"actionTypehalflifeProduct":"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"}
]
}
} 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
}
},
"definitions": { "version": 1, "exerciseDefsmuscleGroups": {
// Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved "upper": 0.3, "exdef1": {// [default: 0.3]
"behaviourlower": 10.3, // [default: 0.3]
"title": "Cruches", "core": 0.4 "video"// [default: "01-Crunches.mp4",0.3]
"image": "abs", }
"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.",
"subtitle": "Target your abs for a balanced set of stomach muscles.", }
}
}
},
"afterburn": {
"user_id_01": { // Clients listen here permanently
"start": 345678987, // Unix timestamp (seconds) // [no default]
"response": { // [default:null]
"calPerSecresolution": 5600, // Secs
"skillepoc": [0.6,0.5,0.3,0.2,
"strength": 0.7,0.1,0.0],
"cardio": [0.6,0.5,0.3,0.2,0.1,0.0],
"epocstrength": [0.46,0.5,0.3,0.2,0.1,0.0],
"metabolic": [0.6,0.5,0.3,0.4,2,0.1,0.0]
"upper": 0.5,
},
"coreimpactCredit": 0.5,
{ // [default:null]
"lowerresolution": 0.5
600, // Secs
}, "exdef2futureCredit": {0.9,
"behaviourpending": [0.0,0.1,0.2,0.3,0.4,0.5]
"title": "Squats",
},
"videomessages": "02-Squats.mp4",
"image": "abs",[ // Messages displayed below the radar chart [default:null]
{"t":0,"body":"Restoring body temperature"desc, "detail": "Squats"},
are an excellent exercise for training the lower body and core muscles, if done regularly they help to define thighs and buttocks." {"t":120,"body":"Replenishing glycogen stores", "detail": "detail/glycogen"}
],
"subtitlenotifications": "Train[ your lower body and core.",// [default:null]
{"calPerSect": 4,
"skill": 0.26000,"body":"Great workout! You're still burning calories and building strength."},
{"strengtht": 0.6,
"cardio": 0.3,
14400,"body":"Fitness test unlocked! You're ready to take another fitness test."}
]
}
"epoc": 0.4 },
"timelineArticles": {
"metabolicuser_id_01": 0.6,
"upper": 0.5,{ // Clients listen here permanently for ChildAdded, ChildChanged and ChildRemoved
"core"article_id_01": 0.5,{
"lowerdate": 0.5
}4567890987, // Unix timestamp (seconds) // [no default]
}, "workoutDefstitle": { "Post title", // Clients[no listendefault]
here permanently for ChildAdded, ChildChanged and ChildRemoved "read": false, "wktdef1": {// [default:true]
"typelocation": 1"post/location.html", // [no "titledefault]
"icon": "Aerobicdefault", // [default:"default"]
"imageappMask": "abs7MW,AF", "desc": "Aerobic Basic Movement",// [default: all apps]
"breakDurationpromptRating": 5,
"appStoreId: "workout01",true // StoreKit[default:false]
product id }
"in7MW": true, // For server use }
},
"definitions": {
"inAfterburnerroutines": false,{ // ForClients serverlisten usehere permanently for ChildAdded, ChildChanged and ChildRemoved
"exercises": [ "routine_id_01": {
{ "title": "The Wonder Routine", // [no default]
"idimage": "exdef1wonder-routine", // [default:"default-routine"]
"durationdesc": 20"Big long description", // [default:null]
}, "appStoreId7MW": "routine01", // StoreKit product id [default:null]
{ "in7MW": true, // For server use "id": "exdef2",[default:false]
"inAfterburner": false, // For "duration": 15server use [default:false]
"lockedIn7MW": false, // },For server use [default:false]
"lockedInAfterburner": false, {// For server use [default:false]
"idvideo": "exdef3", // [default:null]
"minFitnessLevel": 4, "duration": 10// [default:1]
"workoutDefs": { },// [no default]
"wktdef1": {
"idtype": "exdef4"1, // [default:1]
"durationtitle": 5
"Aerobic", // [no default]
}, "image": "abs", // [default:"default"]
{ "iddesc": "exdef5Aerobic Basic Movement", // [default:null]
"durationbreakDuration": 5, // // [default:10]
} "appStoreId7MW": "workout01", // StoreKit product id [default:null],
"adaptiveStress": { "locked": false, // For server use "strength[default:false]
"MWI": 0.254, // [default:0.5]
"cardio "exercises": 0.9, [ // [no default]
"metabolic": 0.6, {
"epoc": 0.6 }"id": "exdef1", // [no default]
"muscleStress": { "upperduration": 10, 20 // [no default]
"lower": 10, },
"core": 10 {
} }, "wktdef2id": {
"exdef2",
"type": 1, "titleduration": "Thai15
Boxing", "image": "abs", },
"desc": "Boxing With Kicking", {
"breakDuration": 4, "appStoreId: "", // StoreKit product id "in7MWid": false, // For server use"exdef3",
"inAfterburnerduration": 10
true, // For server use "exercises": [ },
{
"id": "exdef5exdef4",
"duration": 155
},
{
"id": "exdef3exdef5",
"duration": 10
}, }
{],
"idadaptiveStress": "exdef1",{
"durationstrength": 5
0.2, // [default:1]
} "cardio": 0.9, // [default:1],
"stress": {
"strengthmetabolic": 0.26, // [default:1]
"cardio": 0.9,
"metabolicepoc": 0.6, // [default:1]
"epoc": 0.6 },
}, "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]
}
}
}
},
} |