When saving a log, you send it to the saveJEditor
mutation, where the rows
param is an array of JEditorSaveRow
. That type of object can come in any of these variations:
{ newExercise:"the name of the new exercise"}
{ bw:76, lb:0 }
bw
the bodyweight of the user. Anumber
lb
The bw comes in as the user typed it. This prop is used to know in what unit that was, being 1 = Pounds or 0=kilograms. If it is undefined the default weight unit of the current user will be used to guess it.
{ delete:true }
Indicates that the day in which this was used should be deleted.
A tag indicating what was done on a particular day...
{ on:"YYYY-MM-DD", did:[ <DayToken> ] }
{ tag:"User typed tag name", type:"TAG ID", value:"..." }
tag
string typed by the usertype
string, a key of tag typesvalue
string, a serialized value generated by the tag itself in the frontend. See link above.
{ text:"some user typed text" }
{ eid:number, erows:[ <Set> ] }
eid
Number, id of an exercise.erows
Array of<Set>
the sets done on that execise.
w
Can be an array of this object also or just this object {...}v
value. Number, the weight used.lb
optionalboolean
indicating if weight was typed as Pounds (lb=1) or Kilograms (lb=0)usebw
optional0 | 1
If this is1
thenv
will be the weight added to the bodyweight and the bodyweight for the day will be used to calculate the total weight usedbw + v
r
number, reps.s
number, sets done.c
string. User typed comment.t
Optional time in milliseconds.d
Optional distance done in centimeters * 100.distance_unit
Units of the distance used one of('cm','m','km','in','ft','yd','mi')
rpe
Array of numbers or a number.type
A type value of SET_TYPES which indicates how the data of this set wil be intrpreted.