# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: "" version: 0.0.1 paths: /apis/v2/user/alarm-clock/delete: get: tags: - AlarmClock description: 删除闹钟 operationId: AlarmClock_DeleteAlarmClock parameters: - name: id in: query description: 闹钟ID schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeleteAlarmClockResponse' /apis/v2/userctx/user/alarm-clock/create: post: tags: - AlarmClock description: 创建闹钟 operationId: AlarmClock_CreateAlarmClock requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateAlarmClockRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateAlarmClockResponse' /apis/v2/userctx/user/alarm-clock/getall: get: tags: - AlarmClock description: 获取闹钟 operationId: AlarmClock_GetAlarmClock parameters: - name: cid in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetAlarmClockResponse' /apis/v2/userctx/user/alarm-clock/update: post: tags: - AlarmClock description: 修改闹钟 operationId: AlarmClock_UpdateAlarmClock requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateAlarmClockRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateAlarmClockResponse' /apis/v2/userctx/user/child/contacts/create: post: tags: - Contacts description: 创建联系人 operationId: Contacts_CreateContactPerson requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateContactPersonRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateContactPersonResponse' /apis/v2/userctx/user/child/contacts/delete: get: tags: - Contacts description: 删除联系人 operationId: Contacts_DeleteContactPerson parameters: - name: id in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeleteContactPersonResponse' /apis/v2/userctx/user/child/contacts/firend/add: post: tags: - Contacts description: 添加好友 operationId: Contacts_AddFirend requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.AddFirendRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.AddFirendResponse' /apis/v2/userctx/user/child/contacts/firend/delete: delete: tags: - Contacts description: 删除好友 operationId: Contacts_DeleteFirend parameters: - name: id in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeleteFirendResponse' /apis/v2/userctx/user/child/contacts/firend/generate-code: post: tags: - Contacts description: 生成好友码 operationId: Contacts_GenerateFirendCode requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GenerateFirendCodeRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GenerateFirendCodeResponse' /apis/v2/userctx/user/child/contacts/firend/get: get: tags: - Contacts description: 好友列表 operationId: Contacts_GetFirend parameters: - name: ticket in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetFirendResponse' /apis/v2/userctx/user/child/contacts/get: get: tags: - Contacts description: 获取联系人 operationId: Contacts_GetContactPerson parameters: - name: cid in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetContactPersonResponse' /apis/v2/userctx/user/child/contacts/update: post: tags: - Contacts description: 更新联系人 operationId: Contacts_UpdateContactPerson requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateContactPersonRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateContactPersonResponse' /apis/v2/userctx/user/child/contacts/wristwatch/get: get: tags: - Contacts description: 手表获取联系人 operationId: Contacts_GetWristwatchContactPerson parameters: - name: ticket in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetWristwatchContactPersonResponse' /apis/v2/userctx/user/child/create: post: tags: - Child description: 创建新的小孩 operationId: Child_CreateChild requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateChildRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateChildResponse' /apis/v2/userctx/user/child/delete: get: tags: - Child description: 删除小孩 operationId: Child_DeleteChild parameters: - name: cid in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeleteChildResponse' /apis/v2/userctx/user/child/device/bind: post: tags: - Device description: 绑定设备 operationId: Device_DeviceBind requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceBindRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceBindResponse' /apis/v2/userctx/user/child/device/binding: get: tags: - Device description: 获取设备绑定状态 operationId: Device_DeviceBinding parameters: - name: ticket in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceBindingResponse' /apis/v2/userctx/user/child/device/exchange: get: tags: - Device description: 交换三码 operationId: Device_DeviceExchange parameters: - name: hc in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceExchangeResponse' /apis/v2/userctx/user/child/device/unbind: post: tags: - Device description: 解绑设备 operationId: Device_DeviceUnbind requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceUnbindRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeviceUnbindResponse' /apis/v2/userctx/user/child/get: get: tags: - Child description: 获取用户自己的小孩列表 operationId: Child_GetChild responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetChildResponse' /apis/v2/userctx/user/child/school-disable/create: post: tags: - SchoolDisable description: 创建上课禁用 operationId: SchoolDisable_CreateSchoolDisable requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateSchoolDisableRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.CreateSchoolDisableResponse' /apis/v2/userctx/user/child/school-disable/delete: get: tags: - SchoolDisable description: 删除上课禁用 operationId: SchoolDisable_DeleteSchoolDisable parameters: - name: id in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.DeleteSchoolDisableResponse' /apis/v2/userctx/user/child/school-disable/get: get: tags: - SchoolDisable description: 获取上课禁用 operationId: SchoolDisable_GetSchoolDisable parameters: - name: cid in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetSchoolDisableResponse' /apis/v2/userctx/user/child/school-disable/update: post: tags: - SchoolDisable description: 更新上课禁用 operationId: SchoolDisable_UpdateSchoolDisable requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateSchoolDisableRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateSchoolDisableResponse' /apis/v2/userctx/user/child/school-disable/wristwatch/get: get: tags: - SchoolDisable description: 手表获取上课禁用 operationId: SchoolDisable_GetWristwatchSchoolDisable parameters: - name: ticket in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetWristwatchSchoolDisableResponse' /apis/v2/userctx/user/child/update: post: tags: - Child description: 更新小孩信息 operationId: Child_UpdateChild requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateChildRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UpdateChildResponse' /apis/v2/userctx/user/reset-password: post: tags: - User description: 重设密码 operationId: User_ResetPassword requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.ResetPasswordRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.ResetPasswordResponse' /apis/v2/userctx/user/retrieve-password: post: tags: - User description: 找回密码 operationId: User_RetrievePassword requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.RetrievePasswordRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.RetrievePasswordResponse' /apis/v2/userctx/user/sign-in: post: tags: - User description: 登录 operationId: User_SignIn requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SignInRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SignInResponse' /apis/v2/userctx/user/sign-up: post: tags: - User description: 注册 operationId: User_SignUp requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SignUpRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SignUpResponse' /apis/v2/userctx/user/sms-code: post: tags: - User description: 短信验证码 operationId: User_SMSCode requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SMSCodeRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.SMSCodeResponse' /apis/v2/userctx/user/unregister: post: tags: - User description: 注销 operationId: User_Unregister requestBody: content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UnregisterRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.UnregisterResponse' /apis/v2/userctx/user/wristwatch/alarm-clock/get: get: tags: - AlarmClock description: 手表获取闹钟 operationId: AlarmClock_GetWristwatchAlarmClock parameters: - name: ticket in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/api.user.v2.GetWristwatchAlarmClockResponse' components: schemas: api.user.v2.AddFirendRequest: type: object properties: code: type: string description: 添加好友 Request api.user.v2.AddFirendResponse: type: object properties: {} description: 添加好友 Response api.user.v2.CreateAlarmClockRequest: type: object properties: cid: type: string description: 小孩ID label: type: string description: 闹钟标签 repeats: type: string description: '重复天 eg: 1000000 周一开启 1111100 工作日开启' time: type: string description: 'Time 闹钟时间 格式: HH:mm' onceTime: type: string description: 仅一次时间戳 status: type: boolean description: 是否开启 description: 创建闹钟 Request api.user.v2.CreateAlarmClockResponse: type: object properties: {} description: 创建闹钟 Response api.user.v2.CreateChildRequest: type: object properties: name: type: string description: 小孩姓名 phoneNumber: type: string description: 小孩电话 areaCode: type: string description: 小孩电话区号 avatar: type: string description: 小孩头像 birthday: type: string description: 小孩生日 appellation: type: string description: 小孩对自己的称谓 gender: type: integer description: 小孩性别 format: enum weight: type: integer description: 小孩体重 format: int32 height: type: integer description: 小孩身高 format: int32 api.user.v2.CreateChildResponse: type: object properties: cid: type: string api.user.v2.CreateContactPersonRequest: type: object properties: avatar: type: string phoneNumber: type: string areaCode: type: string appellation: type: string description: 小孩对自己的称谓 role: type: integer format: enum cid: type: string description: 创建联系人 Request api.user.v2.CreateContactPersonResponse: type: object properties: {} description: 创建联系人 Response api.user.v2.CreateSchoolDisableRequest: type: object properties: cid: type: string repeats: type: string startTime: type: string endTime: type: string status: type: boolean description: 创建上课禁用 Request api.user.v2.CreateSchoolDisableResponse: type: object properties: id: type: string description: 创建上课禁用 Response api.user.v2.DeleteAlarmClockResponse: type: object properties: {} description: 删除闹钟 Response api.user.v2.DeleteChildResponse: type: object properties: {} api.user.v2.DeleteContactPersonResponse: type: object properties: {} description: 删除联系人 Response api.user.v2.DeleteFirendResponse: type: object properties: {} description: 删除好友 Response api.user.v2.DeleteSchoolDisableResponse: type: object properties: {} description: 删除上课禁用 Response api.user.v2.DeviceBindRequest: type: object properties: cid: type: string ticket: type: string description: 绑定设备 Request api.user.v2.DeviceBindResponse: type: object properties: {} description: 绑定设备 Response api.user.v2.DeviceBindingResponse: type: object properties: isBind: type: boolean description: 是否被绑定 cid: type: string description: 被绑定的小孩ID token: type: string description: |- 设备的 accessToken 后续接口需要通过这个来进行交互 weight: type: integer description: 体重 format: int32 height: type: integer description: 身高 format: int32 description: 获取设备绑定状态 Response api.user.v2.DeviceExchangeResponse: type: object properties: ticket: type: string description: |- ticket 用于生成设备绑定二维码使用 在连接 temp websocket 时也会用到 aseKey: type: string hc: type: string activationTime: type: string description: 设备激活时间 api.user.v2.DeviceUnbindRequest: type: object properties: cid: type: string ticket: type: string description: 解绑设备 api.user.v2.DeviceUnbindResponse: type: object properties: {} description: 解绑设备 api.user.v2.GenerateFirendCodeRequest: type: object properties: ticket: type: string description: 生成好友码 Request api.user.v2.GenerateFirendCodeResponse: type: object properties: code: type: string description: 生成好友码 Response api.user.v2.GetAlarmClockResponse: type: object properties: alarmClocks: type: array items: $ref: '#/components/schemas/api.user.v2.GetAlarmClockResponse_AlarmClock' description: 获取闹钟 Response api.user.v2.GetAlarmClockResponse_AlarmClock: type: object properties: cid: type: string label: type: string repeats: type: string time: type: string onceTime: type: string id: type: string status: type: boolean api.user.v2.GetChildResponse: type: object properties: childList: type: array items: $ref: '#/components/schemas/api.user.v2.GetChildResponse_Child' api.user.v2.GetChildResponse_Child: type: object properties: cid: type: string description: 小孩ID stepCount: type: integer format: int32 name: type: string avatar: type: string device: allOf: - $ref: '#/components/schemas/api.user.v2.GetChildResponse_Device' description: 绑定的设备 lastLocation: allOf: - $ref: '#/components/schemas/api.user.v2.GetChildResponse_Location' description: 最后一次位置 api.user.v2.GetChildResponse_Device: type: object properties: did: type: string battery: type: integer format: int32 signal: type: integer format: int32 signalMax: type: integer format: int32 ticket: type: string api.user.v2.GetChildResponse_Location: type: object properties: latitude: type: string longitude: type: string positionTime: type: string radius: type: integer format: int32 pointType: type: integer format: enum api.user.v2.GetContactPersonResponse: type: object properties: persons: type: array items: $ref: '#/components/schemas/api.user.v2.GetContactPersonResponse_Person' description: 获取联系人 Response api.user.v2.GetContactPersonResponse_Person: type: object properties: id: type: string avatar: type: string phoneNumber: type: string areaCode: type: string appellation: type: string role: type: integer format: enum api.user.v2.GetFirendResponse: type: object properties: firends: type: array items: $ref: '#/components/schemas/api.user.v2.GetFirendResponse_Firend' description: 好友列表 Response api.user.v2.GetFirendResponse_Firend: type: object properties: id: type: string ticket: type: string name: type: string api.user.v2.GetSchoolDisableResponse: type: object properties: schoolDisables: type: array items: $ref: '#/components/schemas/api.user.v2.GetSchoolDisableResponse_SchoolDisable' description: 获取上课禁用 Response api.user.v2.GetSchoolDisableResponse_SchoolDisable: type: object properties: cid: type: string repeats: type: string startTime: type: string endTime: type: string status: type: boolean id: type: string api.user.v2.GetWristwatchAlarmClockResponse: type: object properties: alarmClocks: type: array items: $ref: '#/components/schemas/api.user.v2.GetWristwatchAlarmClockResponse_AlarmClock' description: 手表获取闹钟 Response api.user.v2.GetWristwatchAlarmClockResponse_AlarmClock: type: object properties: cid: type: string label: type: string repeats: type: string time: type: string onceTime: type: string id: type: string status: type: boolean api.user.v2.GetWristwatchContactPersonResponse: type: object properties: persons: type: array items: $ref: '#/components/schemas/api.user.v2.GetWristwatchContactPersonResponse_Person' description: 手表获取联系人 Response api.user.v2.GetWristwatchContactPersonResponse_Person: type: object properties: id: type: string userId: type: string phoneNumber: type: string areaCode: type: string appellation: type: string role: type: integer format: enum isChat: type: boolean isSos: type: boolean isAddedByWristwatch: type: boolean api.user.v2.GetWristwatchSchoolDisableResponse: type: object properties: schoolDisables: type: array items: $ref: '#/components/schemas/api.user.v2.GetWristwatchSchoolDisableResponse_SchoolDisable' description: 手表获取上课禁用 Response api.user.v2.GetWristwatchSchoolDisableResponse_SchoolDisable: type: object properties: cid: type: string repeats: type: string startTime: type: string endTime: type: string status: type: boolean id: type: string api.user.v2.ResetPasswordRequest: type: object properties: oldPassword: type: string description: 旧密码 newPassword: type: string description: 新密码 description: 重设密码 Request api.user.v2.ResetPasswordResponse: type: object properties: {} description: 重设密码 Response api.user.v2.RetrievePasswordRequest: type: object properties: email: type: string description: 邮箱 password: type: string description: 新密码 description: 找回密码 Request api.user.v2.RetrievePasswordResponse: type: object properties: {} description: 找回密码 Response api.user.v2.SMSCodeRequest: type: object properties: phone: type: string description: 手机号 areaCode: type: string description: 国家码 api.user.v2.SMSCodeResponse: type: object properties: {} api.user.v2.SignInRequest: type: object properties: phone: type: string description: 手机号 areaCode: type: string description: 国家码 password: type: string description: 密码 email: type: string description: 邮箱 captcha: type: string description: 验证码 description: 登录 Request api.user.v2.SignInResponse: type: object properties: token: type: string description: 当前登录的 AccessToken uid: type: string description: 当前登录的用户 childList: type: array items: $ref: '#/components/schemas/api.user.v2.SignInResponse_Child' description: 绑定的小孩列表 description: 登录 Response api.user.v2.SignInResponse_Child: type: object properties: cid: type: string description: 小孩ID stepCount: type: integer format: int32 name: type: string avatar: type: string device: allOf: - $ref: '#/components/schemas/api.user.v2.SignInResponse_Device' description: 绑定的设备 lastLocation: allOf: - $ref: '#/components/schemas/api.user.v2.SignInResponse_Location' description: 最后一次位置 api.user.v2.SignInResponse_Device: type: object properties: did: type: string battery: type: integer format: int32 signal: type: integer format: int32 signalMax: type: integer format: int32 ticket: type: string api.user.v2.SignInResponse_Location: type: object properties: latitude: type: string longitude: type: string positionTime: type: string radius: type: integer format: int32 pointType: type: integer format: enum api.user.v2.SignUpRequest: type: object properties: phone: type: string description: 手机号 areaCode: type: string description: 国家码 password: type: string description: 密码 email: type: string description: 邮箱 captcha: type: string description: 验证码 api.user.v2.SignUpResponse: type: object properties: {} api.user.v2.UnregisterRequest: type: object properties: password: type: string description: 密码 description: 注销账号 Request api.user.v2.UnregisterResponse: type: object properties: {} description: 注销账号 Response api.user.v2.UpdateAlarmClockRequest: type: object properties: cid: type: string description: 小孩ID label: type: string description: 闹钟标签 repeats: type: string description: '重复天 eg: 1000000 周一开启 1111100 工作日开启' time: type: string description: 'Time 闹钟时间 格式: HH:mm' onceTime: type: string description: 仅一次时间戳 id: type: string description: 闹钟ID status: type: boolean description: 是否开启 description: 修改闹钟 Request api.user.v2.UpdateAlarmClockResponse: type: object properties: {} description: 修改闹钟 Response api.user.v2.UpdateChildRequest: type: object properties: name: type: string description: 小孩姓名 phoneNumber: type: string description: 小孩电话 areaCode: type: string description: 小孩电话区号 avatar: type: string description: 小孩头像 birthday: type: string description: 小孩生日 appellation: type: string description: 小孩对自己的称谓 gender: type: integer description: 小孩性别 format: enum weight: type: integer description: 小孩体重 format: int32 height: type: integer description: 小孩身高 format: int32 cid: type: string description: 小孩ID api.user.v2.UpdateChildResponse: type: object properties: {} api.user.v2.UpdateContactPersonRequest: type: object properties: id: type: string avatar: type: string phoneNumber: type: string areaCode: type: string appellation: type: string role: type: integer format: enum uid: type: string description: 更新联系人 Request api.user.v2.UpdateContactPersonResponse: type: object properties: {} description: 更新联系人 Response api.user.v2.UpdateSchoolDisableRequest: type: object properties: id: type: string cid: type: string repeats: type: string startTime: type: string endTime: type: string status: type: boolean description: 更新上课禁用 Request api.user.v2.UpdateSchoolDisableResponse: type: object properties: {} description: 更新上课禁用 Response tags: - name: AlarmClock - name: Child - name: Contacts - name: Device description: |- 设备服务 - 绑定设备 - 解绑设备 - 查询设备绑定状态 - 设备交换三码 - name: SchoolDisable - name: User