Skip to content

v0.0.47

jktalk-console-proto

jktalk/console/v1/base.proto

CommandState

CommandState.Error

Error

Media

Message

Page

FieldTypeLabelDescription
sizeint32每頁筆數
numberint32第幾頁
total_countint64總資料筆數

Ternary

User

User.Setting

FieldTypeLabelDescription
uidint64要設定的用戶的pan uid
is_dangerTernary.Option設定「用戶是否為風險帳號」
disable_receive_messageTernary.Option設定「用戶可否接收訊息」
danger_reasonstring設定為風險帳號的理由,is_danger為True時才需要提供

CommandState.Error.Code

NameNumberDescription
NONE0
FAILED1001

Error.Code

NameNumberDescription
NONE0
MEMBER_NOT_FOUND2001該成員不存在
MEMBER_NOT_OFFICIAL2002該成員不是官方帳號
MEMBER_IS_PROCESSING2003該成員的相關task尚在執行中
IDENTIFIED_DISPLAY_NAME_DUPLICATED2004識別帳號暱稱已被使用

Media.Status

NameNumberDescription
Pending0尚未處理完成
Done1處理完成
Failed2處理失敗
Expired3檔案過期

Message.Type

NameNumberDescription
Default0
TidyBlack1
JPointsTransfer2
Action3
Images4
Audio6
ProductInfo7
AudioTalk8
Media9
Announce100

Ternary.Option

NameNumberDescription
OptionNone0無動作
OptionTrue1設定為true
OptionFalse2設定為false

jktalk/console/v1/health.proto

HealthCheckRequest

FieldTypeLabelDescription
servicestring

HealthCheckResponse

FieldTypeLabelDescription
statusHealthCheckResponse.ServingStatus

HealthCheckResponse.ServingStatus

NameNumberDescription
SERVING_STATUS_UNSPECIFIED0
SERVING_STATUS_SERVING1
SERVING_STATUS_NOT_SERVING2
SERVING_STATUS_SERVICE_UNKNOWN3Used only by the Watch method.

HealthService

Method NameRequest TypeResponse TypeDescription
CheckHealthCheckRequestHealthCheckResponse
WatchHealthCheckRequestHealthCheckResponse stream

jktalk/console/v1/message/query.proto

GetFileStatusAnswer

FieldTypeLabelDescription
statusjktalk.console.v1.Media.Status檔案當前狀態

GetFileStatusPayload

FieldTypeLabelDescription
file_idstring檔案識別id

QueryError

SearchMessageAnswer

FieldTypeLabelDescription
recordsSearchMessageAnswer.Recordrepeated

SearchMessageAnswer.Record

FieldTypeLabelDescription
receiver_hashed_uidstring
receiver_uidint64
receiver_display_namestring
sender_hashed_uidstring
sender_uidint64
sender_display_namestring
room_idstring
message_idstring
typejktalk.console.v1.Message.Type
textstring
image_urlsstringrepeated
video_urlsstringrepeated
createdgoogle.protobuf.Timestamp
is_friendbool
send_time_is_friendjktalk.console.v1.Ternary.Option
receiver_is_blockedbool
receiver_is_officialbool
receiver_is_starbool

SearchMessagePayload

FieldTypeLabelDescription
admin_tokenstring
sender_uidint64optional,如果是0,會使用sender_hashed_uid
sender_hashed_uidstringoptional,如果sender_uid是0、且sender_hashed_uid是空字串,會用room_id查
room_idstringoptional,如果sender_uid、sender_hashed_uid、room_id皆為空,會查全部用戶的聊天記錄
searchstringoptional
start_aftergoogle.protobuf.Timestamp如果start_after和end_before皆為空,則為第一頁,目前查詢結果只支援DESC
end_beforegoogle.protobuf.Timestamp若start_after為空,會採用end_before查前一頁
page_sizeint64

QueryError.Code

NameNumberDescription
None0
FileNotExist2001檔案不存在

Query

Method NameRequest TypeResponse TypeDescription
GetFileStatusGetFileStatusPayloadGetFileStatusAnswer查詢檔案上傳狀態(firestore FileAll)
SearchMessageSearchMessagePayloadSearchMessageAnswer查詢 JKTALK 用戶對話紀錄

jktalk/console/v1/official/command.proto

AddToOfficialAnswer

AddToOfficialPayload

FieldTypeLabelDescription
admin_tokenstring
uidint64要指定為官方帳號的uid
display_namestringoptional,官方帳號皆為認證帳號,如果遇到暱稱重複,可透過此欄位重新指定

CancelOfficialAnswer

CancelOfficialPayload

FieldTypeLabelDescription
admin_tokenstring
uidint64要取消官方帳號資格的uid

UpdateWelcomeMessageAnswer

UpdateWelcomeMessagePayload

FieldTypeLabelDescription
admin_tokenstring
uidint64要更新歡迎訊息的官方帳號的uid
textstring新的歡迎訊息
enabledbool是否啟用歡迎訊息

Command

Method NameRequest TypeResponse TypeDescription
AddToOfficialAddToOfficialPayloadAddToOfficialAnswer將指定的uid設定為官方帳號
CancelOfficialCancelOfficialPayloadCancelOfficialAnswer移除指定uid的官方帳號身份
UpdateWelcomeMessageUpdateWelcomeMessagePayloadUpdateWelcomeMessageAnswer更新指定官方帳號的歡迎訊息

jktalk/console/v1/official/query.proto

OfficialListAnswer

FieldTypeLabelDescription
recordsOfficialListAnswer.Recordrepeated
pagejktalk.console.v1.Page分頁資訊

OfficialListAnswer.Record

FieldTypeLabelDescription
uidint64pan的uid
hashed_uidstringpan的hashed uid
display_namestringpan的暱稱

OfficialListPayload

FieldTypeLabelDescription
admin_tokenstring
uidint64
hashed_uidstring如果uid是0,則使用hashed_uid查詢
pagejktalk.console.v1.Page

WelcomeMessageInfoAnswer

FieldTypeLabelDescription
enabledbool是否啟用歡迎訊息
textstring歡迎訊息內容

WelcomeMessageInfoPayload

FieldTypeLabelDescription
admin_tokenstring
uidint64required

Query

Method NameRequest TypeResponse TypeDescription
OfficialListOfficialListPayloadOfficialListAnswer官方帳號列表
WelcomeMessageInfoWelcomeMessageInfoPayloadWelcomeMessageInfoAnswer歡迎訊息相關資訊

jktalk/console/v1/user.proto

BanMessagePayload

FieldTypeLabelDescription
admin_tokenstringdotdot的admin token
uid_listint64repeatedpan 的 uid
reasonstring禁言理由

GetDangerUsersAnswer

FieldTypeLabelDescription
recordsGetDangerUsersAnswer.Recordrepeated
pagePage

GetDangerUsersAnswer.Record

FieldTypeLabelDescription
uidint64pan的uid
display_namestring用戶的顯示名稱
danger_reasonstring被設定為風險帳號的理由
set_bystring將該用戶設定為風險帳號的後台帳號
created_atgoogle.protobuf.Timestamp用戶開始使用talk的時間

GetDangerUsersPayload

FieldTypeLabelDescription
admin_tokenstring
search_uidint64要指定查詢的pan uid,完全比對
pagePage

GetReportedAbusesAnswer

FieldTypeLabelDescription
recordsReportedAbuseRecordrepeated

GetReportedAbusesPayload

FieldTypeLabelDescription
admin_tokenstring
limitint32查詢筆數上限,1~100
started_atgoogle.protobuf.Timestamp查詢起始時間,unix timestamp
ended_atgoogle.protobuf.Timestamp查詢結束時間,unix timestamp

GetUserPluBannedMessageAnswer

FieldTypeLabelDescription
resultUserBannedMessagerepeated
next_page_tokenstring查詢下一頁用的token
previous_page_tokenstring查詢上一頁用的token
total_countuint64符合條件資料的總筆數

GetUserPluBannedMessageAnswer.Error

GetUserPluBannedMessagePayload

FieldTypeLabelDescription
admin_tokenstringdotdot的admin token
page_tokenstring可查詢前一頁或下一頁,如果為空,則會返回結果集的第一頁
search_uidstring如果為空,則查詢所有用戶
page_sizestring指定每頁筆數,page_token為空時才有用

ReportedAbuseRecord

FieldTypeLabelDescription
uidint64pan的uid
display_namestring用戶的顯示名稱
reasonstring檢舉理由
created_atgoogle.protobuf.Timestamp檢舉的時間
from_uidstring檢舉人的uid

UnbanMessagePayload

FieldTypeLabelDescription
admin_tokenstringdotdot的admin token
uidint64pan的hashed uid

UpdateUsersAnswer

UpdateUsersPayload

FieldTypeLabelDescription
admin_tokenstring
user_settingsUser.Settingrepeated

UserBannedMessage

FieldTypeLabelDescription
uidint64pan的uid
app_idstring目前只會有空字串
reasonstring被禁言理由
created_atgoogle.protobuf.Timestamp被禁言的時間點
display_namestringpan的顯示名稱
operator_emailstring禁言該用戶的人的email

GetUserPluBannedMessageAnswer.Error.Code

NameNumberDescription
NONE0
NOT_FOUND1

ManageUser

Method NameRequest TypeResponse TypeDescription
BanMessageBanMessagePayloadCommandState禁言指定用戶,如果已是禁言狀態會報錯,如果操作者沒有dotdot權限會報錯
UnbanMessageUnbanMessagePayloadCommandState取消指定用戶的禁言狀態,如果操作者沒有dotdot權限會報錯
GetUserPluBannedMessageGetUserPluBannedMessagePayloadGetUserPluBannedMessageAnswer查詢指定用戶中被禁言者,以被禁言的時間倒序排列,如果操作者沒有dotdot權限會報錯
UpdateUsersUpdateUsersPayloadUpdateUsersAnswer更新用戶狀態
GetDangerUsersGetDangerUsersPayloadGetDangerUsersAnswer查詢所有風險帳號,requires: page size 1~100,page number > 0
GetReportedAbusesGetReportedAbusesPayloadGetReportedAbusesAnswer查詢檢舉回報資料

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)