0.1.0 • Published 3 months ago

terra-capacitor v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

terra-capacitor

Wrap TerraiOS and TerraAndroid for capacitor projects

Install

npm install terra-capacitor
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


initTerra(...)

initTerra(options: { devId: string; referenceId: string | null; }) => Promise<SuccessMessage>
ParamType
options{ devId: string; referenceId: string | null; }

Returns: Promise<SuccessMessage>


initConnection(...)

initConnection(options: { connection: Connections; token: string; schedulerOn: boolean; customPermissions: CustomPermissions[]; startIntent: string | null; }) => Promise<any>
ParamType
options{ connection: Connections; token: string; schedulerOn: boolean; customPermissions: CustomPermissions[]; startIntent: string | null; }

Returns: Promise<any>


getUserId(...)

getUserId(options: { connection: Connections; }) => Promise<GetUserId>
ParamType
options{ connection: Connections; }

Returns: Promise<GetUserId>


getBody(...)

getBody(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getActivity(...)

getActivity(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getDaily(...)

getDaily(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getNutrition(...)

getNutrition(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getMenstruation(...)

getMenstruation(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getSleep(...)

getSleep(options: { connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; startDate: Date; endDate: Date; toWebhook: boolean; }

Returns: Promise<DataMessage>


getAthlete(...)

getAthlete(options: { connection: Connections; toWebhook: boolean; }) => Promise<DataMessage>
ParamType
options{ connection: Connections; toWebhook: boolean; }

Returns: Promise<DataMessage>


activateSensor()

activateSensor() => Promise<DataMessage>

Returns: Promise<DataMessage>


readGlucoseData()

readGlucoseData() => Promise<DataMessage>

Returns: Promise<DataMessage>


Interfaces

Object

Provides functionality common to all JavaScript objects.

PropTypeDescription
constructorFunctionThe initial value of Object.prototype.constructor is the standard built-in Object constructor.
MethodSignatureDescription
toString() => stringReturns a string representation of an object.
toLocaleString() => stringReturns a date converted to a string using the current locale.
valueOf() => ObjectReturns the primitive value of the specified object.
hasOwnProperty(v: PropertyKey) => booleanDetermines whether an object has a property with the specified name.
isPrototypeOf(v: Object) => booleanDetermines whether an object exists in another object's prototype chain.
propertyIsEnumerable(v: PropertyKey) => booleanDetermines whether a specified property is enumerable.

Function

Creates a new function.

PropType
prototypeany
lengthnumber
argumentsany
callerFunction
MethodSignatureDescription
apply(this: Function, thisArg: any, argArray?: any) => anyCalls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
call(this: Function, thisArg: any, ...argArray: any[]) => anyCalls a method of an object, substituting another object for the current object.
bind(this: Function, thisArg: any, ...argArray: any[]) => anyFor a given function, creates a bound function that has the same body as the original function. The this object of the bound function is associated with the specified object, and has the specified initial parameters.
toString() => stringReturns a string representation of a function.

Date

Enables basic storage and retrieval of dates and times.

MethodSignatureDescription
toString() => stringReturns a string representation of a date. The format of the string depends on the locale.
toDateString() => stringReturns a date as a string value.
toTimeString() => stringReturns a time as a string value.
toLocaleString() => stringReturns a value as a string value appropriate to the host environment's current locale.
toLocaleDateString() => stringReturns a date as a string value appropriate to the host environment's current locale.
toLocaleTimeString() => stringReturns a time as a string value appropriate to the host environment's current locale.
valueOf() => numberReturns the stored time value in milliseconds since midnight, January 1, 1970 UTC.
getTime() => numberGets the time value in milliseconds.
getFullYear() => numberGets the year, using local time.
getUTCFullYear() => numberGets the year using Universal Coordinated Time (UTC).
getMonth() => numberGets the month, using local time.
getUTCMonth() => numberGets the month of a Date object using Universal Coordinated Time (UTC).
getDate() => numberGets the day-of-the-month, using local time.
getUTCDate() => numberGets the day-of-the-month, using Universal Coordinated Time (UTC).
getDay() => numberGets the day of the week, using local time.
getUTCDay() => numberGets the day of the week using Universal Coordinated Time (UTC).
getHours() => numberGets the hours in a date, using local time.
getUTCHours() => numberGets the hours value in a Date object using Universal Coordinated Time (UTC).
getMinutes() => numberGets the minutes of a Date object, using local time.
getUTCMinutes() => numberGets the minutes of a Date object using Universal Coordinated Time (UTC).
getSeconds() => numberGets the seconds of a Date object, using local time.
getUTCSeconds() => numberGets the seconds of a Date object using Universal Coordinated Time (UTC).
getMilliseconds() => numberGets the milliseconds of a Date, using local time.
getUTCMilliseconds() => numberGets the milliseconds of a Date object using Universal Coordinated Time (UTC).
getTimezoneOffset() => numberGets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).
setTime(time: number) => numberSets the date and time value in the Date object.
setMilliseconds(ms: number) => numberSets the milliseconds value in the Date object using local time.
setUTCMilliseconds(ms: number) => numberSets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
setSeconds(sec: number, ms?: number | undefined) => numberSets the seconds value in the Date object using local time.
setUTCSeconds(sec: number, ms?: number | undefined) => numberSets the seconds value in the Date object using Universal Coordinated Time (UTC).
setMinutes(min: number, sec?: number | undefined, ms?: number | undefined) => numberSets the minutes value in the Date object using local time.
setUTCMinutes(min: number, sec?: number | undefined, ms?: number | undefined) => numberSets the minutes value in the Date object using Universal Coordinated Time (UTC).
setHours(hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => numberSets the hour value in the Date object using local time.
setUTCHours(hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => numberSets the hours value in the Date object using Universal Coordinated Time (UTC).
setDate(date: number) => numberSets the numeric day-of-the-month value of the Date object using local time.
setUTCDate(date: number) => numberSets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
setMonth(month: number, date?: number | undefined) => numberSets the month value in the Date object using local time.
setUTCMonth(month: number, date?: number | undefined) => numberSets the month value in the Date object using Universal Coordinated Time (UTC).
setFullYear(year: number, month?: number | undefined, date?: number | undefined) => numberSets the year of the Date object using local time.
setUTCFullYear(year: number, month?: number | undefined, date?: number | undefined) => numberSets the year value in the Date object using Universal Coordinated Time (UTC).
toUTCString() => stringReturns a date converted to a string using Universal Coordinated Time (UTC).
toISOString() => stringReturns a date as a string value in ISO format.
toJSON(key?: any) => stringUsed by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.

Type Aliases

SuccessMessage

{ success: boolean; error: string | null; }

GetUserId

{ success: boolean; userId: string | null; }

DataMessage

{ success: boolean; data: Object; error: string | null; }

PropertyKey

string | number | symbol

Enums

Connections

MembersValue
'APPLE_HEALTH''APPLE_HEALTH'
'FREESTYLE_LIBRE''FREESTYLE_LIBRE'
'GOOGLE''GOOGLE'
'SAMSUNG''SAMSUNG'

CustomPermissions

MembersValue
'WORKOUT_TYPES''WORKOUT_TYPES'
'ACTIVITY_SUMMARY''ACTIVITY_SUMMARY'
'LOCATION''LOCATION'
'CALORIES''CALORIES'
'STEPS''STEPS'
'HEART_RATE''HEART_RATE'
'HEART_RATE_VARIABILITY''HEART_RATE_VARIABILITY'
'VO2MAX''VO2MAX'
'HEIGHT''HEIGHT'
'ACTIVE_DURATIONS''ACTIVE_DURATIONS'
'WEIGHT''WEIGHT'
'FLIGHTS_CLIMBED''FLIGHTS_CLIMBED'
'BMI''BMI'
'BODY_FAT''BODY_FAT'
'EXERCISE_DISTANCE''EXERCISE_DISTANCE'
'GENDER''GENDER'
'DATE_OF_BIRTH''DATE_OF_BIRTH'
'BASAL_ENERGY_BURNED''BASAL_ENERGY_BURNED'
'SWIMMING_SUMMARY''SWIMMING_SUMMARY'
'RESTING_HEART_RATE''RESTING_HEART_RATE'
'BLOOD_PRESSURE''BLOOD_PRESSURE'
'BLOOD_GLUCOSE''BLOOD_GLUCOSE'
'BODY_TEMPERATURE''BODY_TEMPERATURE'
'MINDFULNESS''MINDFULNESS'
'LEAN_BODY_MASS''LEAN_BODY_MASS'
'OXYGEN_SATURATION''OXYGEN_SATURATION'
'SLEEP_ANALYSIS''SLEEP_ANALYSIS'
'RESPIRATORY_RATE''RESPIRATORY_RATE'
'NUTRITION_SODIUM''NUTRITION_SODIUM'
'NUTRITION_PROTEIN''NUTRITION_PROTEIN'
'NUTRITION_CARBOHYDRATES''NUTRITION_CARBOHYDRATES'
'NUTRITION_FIBRE''NUTRITION_FIBRE'
'NUTRITION_FAT_TOTAL''NUTRITION_FAT_TOTAL'
'NUTRITION_SUGAR''NUTRITION_SUGAR'
'NUTRITION_VITAMIN_C''NUTRITION_VITAMIN_C'
'NUTRITION_VITAMIN_A''NUTRITION_VITAMIN_A'
'NUTRITION_CALORIES''NUTRITION_CALORIES'
'NUTRITION_WATER''NUTRITION_WATER'
'NUTRITION_CHOLESTEROL''NUTRITION_CHOLESTEROL'
0.1.0

3 months ago

0.0.7

4 months ago

0.0.5

10 months ago

0.0.4

11 months ago

0.0.6

8 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago