NSCv3: allow missing eventType
This commit is contained in:
parent
438f384c67
commit
f5d2f739a9
|
@ -45,7 +45,7 @@ internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
|||
subject = this.subject,
|
||||
isReadOnly = this.isReadOnly ?: false,
|
||||
isValid = this.isValid ?: true,
|
||||
eventType = this.eventType,
|
||||
eventType = this.eventType ?: EventType.MEAL_BOLUS,
|
||||
notes = this.notes,
|
||||
pumpId = this.pumpId,
|
||||
endId = this.endId,
|
||||
|
@ -68,7 +68,7 @@ internal fun RemoteTreatment.toTreatment(): NSTreatment? {
|
|||
subject = this.subject,
|
||||
isReadOnly = this.isReadOnly ?: false,
|
||||
isValid = this.isValid ?: true,
|
||||
eventType = this.eventType,
|
||||
eventType = this.eventType ?: EventType.CARBS_CORRECTION,
|
||||
notes = this.notes,
|
||||
pumpId = this.pumpId,
|
||||
endId = this.endId,
|
||||
|
|
|
@ -29,7 +29,7 @@ internal data class RemoteTreatment(
|
|||
@SerializedName("modifiedBy") val modifiedBy: String? = null, // string Name of the security subject (within Nightscout scope) which has patched or deleted the document for the last time. This field is automatically set by the server.
|
||||
@SerializedName("isValid") val isValid: Boolean? = null, // boolean A flag set by the server only for deleted documents. This field appears only within history operation and for documents which were deleted by API v3 (and they always have a false value)
|
||||
@SerializedName("isReadOnly") val isReadOnly: Boolean? = null, // boolean A flag set by client that locks the document from any changes. Every document marked with isReadOnly=true is forever immutable and cannot even be deleted.
|
||||
@SerializedName("eventType") val eventType: EventType, // string "BG Check", "Snack Bolus", "Meal Bolus", "Correction Bolus", "Carb Correction", "Combo Bolus", "Announcement", "Note", "Question", "Exercise", "Site Change", "Sensor Start", "Sensor Change", "Pump Battery Change", "Insulin Change", "Temp Basal", "Profile Switch", "D.A.D. Alert", "Temporary Target", "OpenAPS Offline", "Bolus Wizard"
|
||||
@SerializedName("eventType") val eventType: EventType?, // string "BG Check", "Snack Bolus", "Meal Bolus", "Correction Bolus", "Carb Correction", "Combo Bolus", "Announcement", "Note", "Question", "Exercise", "Site Change", "Sensor Start", "Sensor Change", "Pump Battery Change", "Insulin Change", "Temp Basal", "Profile Switch", "D.A.D. Alert", "Temporary Target", "OpenAPS Offline", "Bolus Wizard"
|
||||
@SerializedName("glucose") val glucose: Double? = null, // double Current glucose
|
||||
@SerializedName("glucoseType") val glucoseType: String? = null, // string example: "Sensor", "Finger", "Manual"
|
||||
@SerializedName("units") val units: String? = null, // string The units for the glucose value, mg/dl or mmol/l. It is strongly recommended to fill in this field.
|
||||
|
|
Loading…
Reference in a new issue