v0.0.47
jktalk-console-proto
jktalk/console/v1/base.proto
CommandState
CommandState.Error
Error
Media
Message
Page
| Field | Type | Label | Description |
|---|---|---|---|
| size | int32 | 每頁筆數 | |
| number | int32 | 第幾頁 | |
| total_count | int64 | 總資料筆數 |
Ternary
User
User.Setting
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | 要設定的用戶的pan uid | |
| is_danger | Ternary.Option | 設定「用戶是否為風險帳號」 | |
| disable_receive_message | Ternary.Option | 設定「用戶可否接收訊息」 | |
| danger_reason | string | 設定為風險帳號的理由,is_danger為True時才需要提供 |
CommandState.Error.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| FAILED | 1001 |
Error.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| MEMBER_NOT_FOUND | 2001 | 該成員不存在 |
| MEMBER_NOT_OFFICIAL | 2002 | 該成員不是官方帳號 |
| MEMBER_IS_PROCESSING | 2003 | 該成員的相關task尚在執行中 |
| IDENTIFIED_DISPLAY_NAME_DUPLICATED | 2004 | 識別帳號暱稱已被使用 |
Media.Status
| Name | Number | Description |
|---|---|---|
| Pending | 0 | 尚未處理完成 |
| Done | 1 | 處理完成 |
| Failed | 2 | 處理失敗 |
| Expired | 3 | 檔案過期 |
Message.Type
| Name | Number | Description |
|---|---|---|
| Default | 0 | |
| TidyBlack | 1 | |
| JPointsTransfer | 2 | |
| Action | 3 | |
| Images | 4 | |
| Audio | 6 | |
| ProductInfo | 7 | |
| AudioTalk | 8 | |
| Media | 9 | |
| Announce | 100 |
Ternary.Option
| Name | Number | Description |
|---|---|---|
| OptionNone | 0 | 無動作 |
| OptionTrue | 1 | 設定為true |
| OptionFalse | 2 | 設定為false |
jktalk/console/v1/health.proto
HealthCheckRequest
| Field | Type | Label | Description |
|---|---|---|---|
| service | string |
HealthCheckResponse
| Field | Type | Label | Description |
|---|---|---|---|
| status | HealthCheckResponse.ServingStatus |
HealthCheckResponse.ServingStatus
| Name | Number | Description |
|---|---|---|
| SERVING_STATUS_UNSPECIFIED | 0 | |
| SERVING_STATUS_SERVING | 1 | |
| SERVING_STATUS_NOT_SERVING | 2 | |
| SERVING_STATUS_SERVICE_UNKNOWN | 3 | Used only by the Watch method. |
HealthService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Check | HealthCheckRequest | HealthCheckResponse | |
| Watch | HealthCheckRequest | HealthCheckResponse stream |
jktalk/console/v1/message/query.proto
GetFileStatusAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| status | jktalk.console.v1.Media.Status | 檔案當前狀態 |
GetFileStatusPayload
| Field | Type | Label | Description |
|---|---|---|---|
| file_id | string | 檔案識別id |
QueryError
SearchMessageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | SearchMessageAnswer.Record | repeated |
SearchMessageAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| receiver_hashed_uid | string | ||
| receiver_uid | int64 | ||
| receiver_display_name | string | ||
| sender_hashed_uid | string | ||
| sender_uid | int64 | ||
| sender_display_name | string | ||
| room_id | string | ||
| message_id | string | ||
| type | jktalk.console.v1.Message.Type | ||
| text | string | ||
| image_urls | string | repeated | |
| video_urls | string | repeated | |
| created | google.protobuf.Timestamp | ||
| is_friend | bool | ||
| send_time_is_friend | jktalk.console.v1.Ternary.Option | ||
| receiver_is_blocked | bool | ||
| receiver_is_official | bool | ||
| receiver_is_star | bool |
SearchMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| sender_uid | int64 | optional,如果是0,會使用sender_hashed_uid | |
| sender_hashed_uid | string | optional,如果sender_uid是0、且sender_hashed_uid是空字串,會用room_id查 | |
| room_id | string | optional,如果sender_uid、sender_hashed_uid、room_id皆為空,會查全部用戶的聊天記錄 | |
| search | string | optional | |
| start_after | google.protobuf.Timestamp | 如果start_after和end_before皆為空,則為第一頁,目前查詢結果只支援DESC | |
| end_before | google.protobuf.Timestamp | 若start_after為空,會採用end_before查前一頁 | |
| page_size | int64 |
QueryError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| FileNotExist | 2001 | 檔案不存在 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetFileStatus | GetFileStatusPayload | GetFileStatusAnswer | 查詢檔案上傳狀態(firestore FileAll) |
| SearchMessage | SearchMessagePayload | SearchMessageAnswer | 查詢 JKTALK 用戶對話紀錄 |
jktalk/console/v1/official/command.proto
AddToOfficialAnswer
AddToOfficialPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | 要指定為官方帳號的uid | |
| display_name | string | optional,官方帳號皆為認證帳號,如果遇到暱稱重複,可透過此欄位重新指定 |
CancelOfficialAnswer
CancelOfficialPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | 要取消官方帳號資格的uid |
UpdateWelcomeMessageAnswer
UpdateWelcomeMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | 要更新歡迎訊息的官方帳號的uid | |
| text | string | 新的歡迎訊息 | |
| enabled | bool | 是否啟用歡迎訊息 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| AddToOfficial | AddToOfficialPayload | AddToOfficialAnswer | 將指定的uid設定為官方帳號 |
| CancelOfficial | CancelOfficialPayload | CancelOfficialAnswer | 移除指定uid的官方帳號身份 |
| UpdateWelcomeMessage | UpdateWelcomeMessagePayload | UpdateWelcomeMessageAnswer | 更新指定官方帳號的歡迎訊息 |
jktalk/console/v1/official/query.proto
OfficialListAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | OfficialListAnswer.Record | repeated | |
| page | jktalk.console.v1.Page | 分頁資訊 |
OfficialListAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | pan的uid | |
| hashed_uid | string | pan的hashed uid | |
| display_name | string | pan的暱稱 |
OfficialListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | ||
| hashed_uid | string | 如果uid是0,則使用hashed_uid查詢 | |
| page | jktalk.console.v1.Page |
WelcomeMessageInfoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| enabled | bool | 是否啟用歡迎訊息 | |
| text | string | 歡迎訊息內容 |
WelcomeMessageInfoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| uid | int64 | required |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| OfficialList | OfficialListPayload | OfficialListAnswer | 官方帳號列表 |
| WelcomeMessageInfo | WelcomeMessageInfoPayload | WelcomeMessageInfoAnswer | 歡迎訊息相關資訊 |
jktalk/console/v1/user.proto
BanMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | dotdot的admin token | |
| uid_list | int64 | repeated | pan 的 uid |
| reason | string | 禁言理由 |
GetDangerUsersAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetDangerUsersAnswer.Record | repeated | |
| page | Page |
GetDangerUsersAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | pan的uid | |
| display_name | string | 用戶的顯示名稱 | |
| danger_reason | string | 被設定為風險帳號的理由 | |
| set_by | string | 將該用戶設定為風險帳號的後台帳號 | |
| created_at | google.protobuf.Timestamp | 用戶開始使用talk的時間 |
GetDangerUsersPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| search_uid | int64 | 要指定查詢的pan uid,完全比對 | |
| page | Page |
GetReportedAbusesAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | ReportedAbuseRecord | repeated |
GetReportedAbusesPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| limit | int32 | 查詢筆數上限,1~100 | |
| started_at | google.protobuf.Timestamp | 查詢起始時間,unix timestamp | |
| ended_at | google.protobuf.Timestamp | 查詢結束時間,unix timestamp |
GetUserPluBannedMessageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| result | UserBannedMessage | repeated | |
| next_page_token | string | 查詢下一頁用的token | |
| previous_page_token | string | 查詢上一頁用的token | |
| total_count | uint64 | 符合條件資料的總筆數 |
GetUserPluBannedMessageAnswer.Error
GetUserPluBannedMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | dotdot的admin token | |
| page_token | string | 可查詢前一頁或下一頁,如果為空,則會返回結果集的第一頁 | |
| search_uid | string | 如果為空,則查詢所有用戶 | |
| page_size | string | 指定每頁筆數,page_token為空時才有用 |
ReportedAbuseRecord
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | pan的uid | |
| display_name | string | 用戶的顯示名稱 | |
| reason | string | 檢舉理由 | |
| created_at | google.protobuf.Timestamp | 檢舉的時間 | |
| from_uid | string | 檢舉人的uid |
UnbanMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | dotdot的admin token | |
| uid | int64 | pan的hashed uid |
UpdateUsersAnswer
UpdateUsersPayload
| Field | Type | Label | Description |
|---|---|---|---|
| admin_token | string | ||
| user_settings | User.Setting | repeated |
UserBannedMessage
| Field | Type | Label | Description |
|---|---|---|---|
| uid | int64 | pan的uid | |
| app_id | string | 目前只會有空字串 | |
| reason | string | 被禁言理由 | |
| created_at | google.protobuf.Timestamp | 被禁言的時間點 | |
| display_name | string | pan的顯示名稱 | |
| operator_email | string | 禁言該用戶的人的email |
GetUserPluBannedMessageAnswer.Error.Code
| Name | Number | Description |
|---|---|---|
| NONE | 0 | |
| NOT_FOUND | 1 |
ManageUser
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| BanMessage | BanMessagePayload | CommandState | 禁言指定用戶,如果已是禁言狀態會報錯,如果操作者沒有dotdot權限會報錯 |
| UnbanMessage | UnbanMessagePayload | CommandState | 取消指定用戶的禁言狀態,如果操作者沒有dotdot權限會報錯 |
| GetUserPluBannedMessage | GetUserPluBannedMessagePayload | GetUserPluBannedMessageAnswer | 查詢指定用戶中被禁言者,以被禁言的時間倒序排列,如果操作者沒有dotdot權限會報錯 |
| UpdateUsers | UpdateUsersPayload | UpdateUsersAnswer | 更新用戶狀態 |
| GetDangerUsers | GetDangerUsersPayload | GetDangerUsersAnswer | 查詢所有風險帳號,requires: page size 1~100,page number > 0 |
| GetReportedAbuses | GetReportedAbusesPayload | GetReportedAbusesAnswer | 查詢檢舉回報資料 |