(0.0.1)

Download OpenAPI specification:

AdminService

AdminService holds the RPCs that only admins may call. Keeping them out of the resource services keeps them out of the app's service clients, and lets a gateway restrict the whole admin surface by the /v1/admin/ prefix or by this service's name. Each RPC still checks that the caller has the ADMIN role.

AdminService_RegisterTekomis

Registers factory devices and their claim codes. Registering a serial again replaces its claim code.

Request Body schema: application/json
required
required
Array of objects (api.admin.RegisterTekomisRequest_Device)

At most 500 devices per call.

Responses

Request samples

Content type
application/json
{
  • "devices": [
    ]
}

Response samples

Content type
application/json
{
  • "count": 0
}

AdminService_ListUsers

Lists all users.

Responses

Response samples

Content type
application/json
{
  • "users": [
    ]
}

FaqService

FaqService_ListFaqs

Lists FAQs, ordered by created_at desc by default. Requires auth (global middleware).

query Parameters
pageSize
integer <int32>
pageToken
string

Responses

Response samples

Content type
application/json
{
  • "faqs": [
    ],
  • "nextPageToken": "string"
}

FeedbackService

FeedbackService_ListMyFeedback

List feedback for a user (owner-only). Supports alias "me".

query Parameters
userId
string
pageSize
integer <int32>
pageToken
string

Responses

Response samples

Content type
application/json
{
  • "feedback": [
    ],
  • "nextPageToken": "string"
}

FeedbackService_CreateFeedback

Create feedback as the authenticated user. The user_id is inferred from auth; request body user_id is ignored.

Request Body schema: application/json
required
id
string
userId
string
category
string
subject
string
message
string
status
string
createdAt
string <date-time>
updatedAt
string <date-time>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "category": "string",
  • "subject": "string",
  • "message": "string",
  • "status": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "category": "string",
  • "subject": "string",
  • "message": "string",
  • "status": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

FeedbackService_GetFeedback

Get a single feedback (owner-only for now).

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "userId": "string",
  • "category": "string",
  • "subject": "string",
  • "message": "string",
  • "status": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

FeedbackService_ListMyFeedback

List feedback for a user (owner-only). Supports alias "me".

path Parameters
userId
required
string
query Parameters
pageSize
integer <int32>
pageToken
string

Responses

Response samples

Content type
application/json
{
  • "feedback": [
    ],
  • "nextPageToken": "string"
}

SupportService

SupportService is the scripted support chat. The bot asks a question with a fixed set of options; the user answers by choosing one, and the bot replies with the next question. A question without options ends the conversation.

SupportService_AnswerQuestion

Answers the latest question and returns the answer and the bot's reply.

Request Body schema: application/json
required
questionId
required
string

ID of the question being answered. Must be the latest bot message.

optionId
required
string

One of the question's options.

Responses

Request samples

Content type
application/json
{
  • "questionId": "string",
  • "optionId": "string"
}

Response samples

Content type
application/json
{
  • "messages": [
    ]
}

SupportService_StartConversation

Starts a new conversation: a greeting followed by the first question. Calling it again starts over.

Request Body schema: application/json
required
object (api.support.StartConversationRequest)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "messages": [
    ]
}

SupportService_ListMessages

Lists the caller's messages, newest first.

query Parameters
pageSize
integer <int32>
pageToken
string

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ],
  • "nextPageToken": "string"
}

TekomiService

TekomiService_ListTekomis

Responses

Response samples

Content type
application/json
{
  • "tekomis": [
    ]
}

TekomiService_ListHistories

path Parameters
DeviceID
required
string
query Parameters
since
string
limit
string
status
integer <enum>

Responses

Response samples

Content type
application/json
{
  • "histories": [
    ]
}

TekomiService_GetHistoryStats

Returns aggregated statistics for histories of a device.

path Parameters
deviceId
required
string

The device whose histories to aggregate.

Responses

Response samples

Content type
application/json
{
  • "runCount": 0,
  • "producedWeightKg": 0.1,
  • "collectedWeightKg": 0.1,
  • "usedAtHomeWeightKg": 0.1
}

TekomiService_GetTekomi

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "sessionId": "string",
  • "version": "string",
  • "control": {
    },
  • "networkType": 0,
  • "remainingTime": "string",
  • "serial": "string",
  • "status": "string",
  • "workMode": "string",
  • "signal": 0,
  • "wifiSsid": "string",
  • "errors": [
    ],
  • "lastSeen": "2019-08-24T14:15:22Z"
}

TekomiService_ReleaseTekomi

Unpairs the caller's device so it can be claimed again.

path Parameters
id
required
string
Request Body schema: application/json
required
id
required
string

Responses

Request samples

Content type
application/json
{
  • "id": "string"
}

Response samples

Content type
application/json
{ }

TekomiService_ClaimTekomi

Pairs the device with the caller. The claim code is printed on the device label; a device already paired with someone else is refused.

Request Body schema: application/json
required
serial
required
string

Serial printed on the device.

claimCode
required
string

Claim code printed on the device label. Case, spaces and dashes are ignored.

Responses

Request samples

Content type
application/json
{
  • "serial": "string",
  • "claimCode": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "sessionId": "string",
  • "version": "string",
  • "control": {
    },
  • "networkType": 0,
  • "remainingTime": "string",
  • "serial": "string",
  • "status": "string",
  • "workMode": "string",
  • "signal": 0,
  • "wifiSsid": "string",
  • "errors": [
    ],
  • "lastSeen": "2019-08-24T14:15:22Z"
}

UserService

UserService_GetUser

path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "phoneNumber": "string",
  • "email": "string",
  • "fullName": "string",
  • "dateOfBirth": "2019-08-24T14:15:22Z",
  • "city": "string",
  • "address": "string",
  • "photoUrl": "string",
  • "status": 0,
  • "emailVerified": true,
  • "phoneNumberVerified": true,
  • "role": 0
}

UserService_UpdateUser

path Parameters
user.id
required
string
query Parameters
updateMask
string <field-mask>

The list of fields to update.

Request Body schema: application/json
required
id
string
phoneNumber
string
email
string
fullName
string
dateOfBirth
string <date-time>
city
string
address
string
photoUrl
string
status
integer <enum>
emailVerified
boolean
phoneNumberVerified
boolean
role
integer <enum>

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "phoneNumber": "string",
  • "email": "string",
  • "fullName": "string",
  • "dateOfBirth": "2019-08-24T14:15:22Z",
  • "city": "string",
  • "address": "string",
  • "photoUrl": "string",
  • "status": 0,
  • "emailVerified": true,
  • "phoneNumberVerified": true,
  • "role": 0
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "phoneNumber": "string",
  • "email": "string",
  • "fullName": "string",
  • "dateOfBirth": "2019-08-24T14:15:22Z",
  • "city": "string",
  • "address": "string",
  • "photoUrl": "string",
  • "status": 0,
  • "emailVerified": true,
  • "phoneNumberVerified": true,
  • "role": 0
}

UserService_ListUserNotifications

Lists notifications for a user.

path Parameters
user
required
string

The user id.

query Parameters
pageSize
integer <int32>
pageToken
string

Responses

Response samples

Content type
application/json
{
  • "notifications": [
    ],
  • "nextPageToken": "string"
}

UserService_BatchUpdateUserNotifications

Batch updates the read status of notifications for a user.

path Parameters
user
required
string

The user id.

Request Body schema: application/json
required
parent
required
string
notificationIds
required
Array of strings
read
boolean

Responses

Request samples

Content type
application/json
{
  • "parent": "string",
  • "notificationIds": [
    ],
  • "read": true
}

Response samples

Content type
application/json
{
  • "updatedCount": "string"
}

UserService_GetUnreadNotificationCount

Returns the number of unread notifications for a user (the app badge).

path Parameters
user
required
string

The user id.

Responses

Response samples

Content type
application/json
{
  • "unreadCount": "string"
}