v0.0.92
jktalk-api-proto
jktalk/talk/v3/base/token.proto
Token
| Field | Type | Label | Description |
|---|---|---|---|
| token_type | TokenType | ||
| value | string |
TokenType
| Name | Number | Description |
|---|---|---|
| PanAccessToken | 0 | pan access token |
| InternalAccessToken | 1 | |
| ServiceAccessToken | 2 | |
| AppToken | 3 | pan app token |
| AdminToken | 4 | pan dot dot token |
| JkTalkToken | 5 |
jktalk/talk/v3/base/receiver.proto
Receiver
| Field | Type | Label | Description |
|---|---|---|---|
| receiver_type | Receiver.Type | ||
| receiver_id | string | 若receiver_type是Room,應該放room_id。若receiver_type是User,應該放pan hashed uid |
Receiver.Type
| Name | Number | Description |
|---|---|---|
| Room | 0 | |
| User | 1 |
jktalk/talk/v3/anan/command.proto
CommandError
DeleteScheduledMessageAnswer
DeleteScheduledMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| schedule_id | string | 要刪除的排程的id,不可為空 |
PrepareScheduledImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareScheduledImageAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_to_upload | string | 檔案上傳的bucket path | |
| display_filename | string | 顯示的檔案名稱 | |
| image_id | string | 圖檔的id,會寫在Message.ImageIds,可用於監聽檔案處理的狀態 |
PrepareScheduledImageAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareScheduledImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| file_info | string | 檔案的mime type | |
| file_ext | string | 檔案的extension |
ScheduleMessageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| schedule_id | string | 已創建的排程的id |
ScheduleMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| text | string | 公告文字。上限1500字,text和image_urls不可皆為空 | |
| image_urls | string | repeated | 圖片的url,由PrepareScheduledImage獲得 (policy中的key) |
| send_time | google.protobuf.Timestamp | 要指定的公告發送時間,不可在15min以內、不可超過一個月後 |
SendMessageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| anan_message_id | string |
SendMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| text | string | ||
| image_ids | string | repeated |
UpdateScheduledMessageAnswer
UpdateScheduledMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| schedule_id | string | 要更新的排程的id,不可為空 | |
| text | string | 要更新的文字。上限1500字,text和image_urls不可皆為空 | |
| image_urls | string | repeated | 要更新的圖檔url |
| send_time | google.protobuf.Timestamp | 要更新的公告發送時間,不可在15min以內、不可超過一個月後 |
CommandError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| ScheduledAnanOverLimit | 2001 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| PrepareScheduledImage | PrepareScheduledImagePayload | PrepareScheduledImageAnswer | 獲取anan image的GCS signed url 只限官方帳號可使用 |
| SendMessage | SendMessagePayload | SendMessageAnswer | 尚未開發 |
| ScheduleMessage | ScheduleMessagePayload | ScheduleMessageAnswer | 發送公告排程 只限官方帳號可使用 總計「已排程且尚未發送的公告」不可超過五則 圖片在上,文字在下 |
| UpdateScheduledMessage | UpdateScheduledMessagePayload | UpdateScheduledMessageAnswer | 更新已排程但尚未發送的公告 只限官方帳號可使用 既有發送時間在一小時內的公告不可被修改 |
| DeleteScheduledMessage | DeleteScheduledMessagePayload | DeleteScheduledMessageAnswer | 刪除已排程的公告 只限官方帳號可使用, |
jktalk/talk/v3/base/action.proto
Action
Action.Button
| Field | Type | Label | Description |
|---|---|---|---|
| type | int32 | ||
| text | string | ||
| url | string | ||
| open_mode | string |
jktalk/talk/v3/base/base.proto
Attr
| Field | Type | Label | Description |
|---|---|---|---|
| name | string | ||
| value | string |
Device
ID
| Field | Type | Label | Description |
|---|---|---|---|
| type | ID.Type | ||
| hashed_uid | string | ||
| uid | int64 |
Media
Message
Message.Setting
| Field | Type | Label | Description |
|---|---|---|---|
| silent_mode | bool | 靜音模式,若為true則不更新RoomParticipant的LastReadableRef和LastReadableTime | |
| disable_receiver_read | bool | 收訊方不可見,若為true則該訊息只有發送方可見 | |
| disable_forward | bool | 禁止轉發,若為true則該則訊息不可被轉發 | |
| disable_notify | bool | 停用推播通知 |
Page
| Field | Type | Label | Description |
|---|---|---|---|
| size | int32 | 每頁筆數 | |
| number | int32 | 第幾頁 | |
| total_count | int64 | 總資料筆數 |
Pub
UserStatus
| Field | Type | Label | Description |
|---|---|---|---|
| huid | string | pan的hashed uid | |
| danger_status | int64 | 用戶當前風險狀態 | |
| ban_message | int64 | 用戶是否被禁言 |
Device.Platform
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| IOS | 1 | |
| Android | 2 | |
| Web | 3 |
ID.Type
| Name | Number | Description |
|---|---|---|
| HASHED_UID | 0 | |
| UID | 1 |
Media.Status
| Name | Number | Description |
|---|---|---|
| Pending | 0 | 尚未處理完成 |
| Done | 1 | 處理完成 |
| Failed | 2 | 處理失敗 |
| Expired | 3 | 檔案過期 |
Message.Category
| Name | Number | Description |
|---|---|---|
| DirectMessage | 0 | Mode = "dm" 的room |
| GroupMessage | 1 | Mode = "group" 的room |
| AnanMessage | 2 | Business/<user_id>/AnaAll 的訊息 |
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 |
Pub.Action
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| PanValidatePhone | 1 | |
| Transfer | 2 | |
| MoreTransferInfo | 3 | |
| FriendConfirmed | 4 | 同意好友邀請 |
| FriendInvited | 5 | 發出好友邀請 |
| FriendCancelInvite | 6 | 邀請方取消已發出的好友邀請 |
| FriendRejected | 7 | 收邀方拒絕好友邀請 |
| OfficialTagPending | 8 | |
| OfficialTagProcessing | 9 | |
| OfficialTagClosed | 10 |
jktalk/talk/v3/base/error.proto
Error
Error.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| PanAccessTokenInvalid | 1001 | |
| InternalAccessTokenInvalid | 1002 | |
| ServiceAccessTokenInvalid | 1003 | |
| AppTokenInvalid | 1004 | |
| PanMemberOnly | 1005 | 只限pan用戶可操作(ex: 只可透過pan access token使用) |
| InvalidFileFormat | 1006 | 不合規的檔案格式 |
| RoomNotFound | 1007 | 查無該頻道 |
| MessageNotFound | 1008 | 查無該訊息 |
| TextLengthOverLimit | 1009 | 訊息長度超過上限(1500字) |
| OfficialOnly | 1010 | 只限官方帳號可操作 |
| MemberNotFound | 1011 | 查無用戶 |
| SendTimeInvalid | 1012 | 不合規的指定發送時間 |
| NearSendTime | 1013 | 已接近公告發送時間,不可修改 |
| ScheduleNotFound | 1014 | 查無指定的公告排程 |
| DisabledReceiving | 1015 | 收訊方已關閉接收訊息 |
| FailedToFindFriendSetting | 1016 | 好友設定資料有誤 |
| FailedToCreateRoom | 1017 | 創建頻道資料失敗 |
| FailedToCreateParticipant | 1018 | 創建頻道參與者資料失敗 |
| ReplyTargetNotFound | 1019 | 指定回覆的訊息不存在 |
| ForwardSourceNotFound | 1020 | 指定轉發的訊息不存在 |
| FailedToWriteMessage | 1021 | 寫入新訊息失敗 |
| SenderOnly | 1022 | 僅發送者可執行此操作 |
| OperandOverLimit | 1023 | 單次操作筆數超過上限 |
| JkTalkTokenInvalid | 1024 |
jktalk/talk/v3/base/official.proto
Official
Official.Tag
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| Pending | 3 | 待處理 |
| Processing | 4 | 處理中 |
| Closed | 5 | 已結案 |
jktalk/talk/v3/base/transfer.proto
Transfer
Transfer.Status
| Name | Number | Description |
|---|---|---|
| Created | 0 | 建立交易請求 |
| Received | 1 | 接受交易 |
| Canceled | 2 | 取消交易 |
| Immediately | 3 | 立即交易 |
| Freeze | 4 | 此交易被凍結 |
| Unfreeze | 5 | 此交易被解除凍結 |
| AdminCanceled | 6 | 管理者取消 |
| AdminCanceledFrozen | 7 | 管理者取消凍結 |
| NearOverdue | 8 | 轉點即將過期 |
| ReturnToReceivableStatus | 9 | 恢復為可收點狀態 |
| Scheduled | 100 |
jktalk/talk/v3/base/user.proto
User
User.Type
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| General | 1 | 無使用 |
| Business | 2 | 無使用 |
| Official | 3 | 官方帳號 |
| Superstar | 4 | JvidModel, Lady, Actress |
jktalk/talk/v3/batch/command.proto
BatchRecord
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 訊息的room id | |
| receiver_id | jktalk.talk.v3.base.ID | 收訊方的pan hashed uid or uid | |
| message_id | string | 訊息的id,若發送失敗的話會是空 |
PrepareSendImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareSendImageAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_to_upload | string | 檔案上傳的bucket path | |
| display_filename | string | 顯示的檔案名稱 | |
| image_id | string | 圖檔的id,會寫在FileAll/<file_id>,可用於監聽檔案處理的狀態 |
PrepareSendImageAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareSendImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| file_info | string | 檔案的mime type | |
| file_ext | string | 檔案extension. support for jpg, jpeg, png, svg, gif |
PrepareSendVideoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareSendVideoAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_for_video | string | 檔案上傳的bucket path | |
| url_for_image | string | 暫時沒用 | |
| display_filename | string | 顯示的檔案名稱 | |
| video_id | string | 影片檔的id,會寫在Message.VideoIds。可用於監聽轉檔狀態 |
PrepareSendVideoAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareSendVideoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| file_info | string | 檔案的mime type | |
| file_ext | string | 檔案extension. support for jpg, jpeg, png, svg, gif |
SendActionAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendActionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| title | string | 標題 | |
| text | string | 文字內容,不可超過40個utf8字符 | |
| isolated_buttons | jktalk.talk.v3.base.Action.Button | repeated | 上限2個。isolated_buttons和content_buttons不可皆為空 |
| content_buttons | jktalk.talk.v3.base.Action.Button | repeated | 上限1個 |
| images | string | repeated | 要夾帶的圖檔urls |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendAudioTalkAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendAudioTalkPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| avatar_uid | string | 要顯示頭像的pan用戶的uid,不可為空 | |
| avatar_url | string | 大頭貼url,不可為空 | |
| audio_url | string | 音檔url,不可為空 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| image_urls | string | repeated | 要發送的圖檔urls,由PrepareSendImage獲得(policy的key) |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendMediaAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendMediaPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| video_urls | string | repeated | 影片檔的url,由PrepareSendVideo獲得(policy的key) |
| image_urls | string | repeated | 圖檔的url,由PrepareSendImage獲得 (policy的key) |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendProductInfoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendProductInfoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| product_info_id | string | 產品行銷訊息 ID,不可為空 | |
| caption | string | 小標,不可為空 | |
| title | string | 主標題,不可為空 | |
| link | string | 點擊後連結的網址,不可為空 | |
| open_mode | string | 點擊後的開啟方式 | |
| image_url | string | 圖片網址,不可為空 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendTextAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | BatchRecord | repeated | 發送結果,如果提供的room_id或receiver_id有錯,會直接跳過,不會在records中 |
SendTextPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | jktalk.talk.v3.base.ID | ||
| receivers | jktalk.talk.v3.base.ID | repeated | jktalk-talk-api limit 100, jktalk-console-api limit 1000 |
| text | string | 訊息文字,不可超過1500字 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| SendText | SendTextPayload | SendTextAnswer | 批量發送文字訊息 |
| SendAction | SendActionPayload | SendActionAnswer | 批量發送動作訊息 |
| SendAudioTalk | SendAudioTalkPayload | SendAudioTalkAnswer | 批量發送語音訊息(含頭像) |
| SendProductInfo | SendProductInfoPayload | SendProductInfoAnswer | 批量發送產品行銷訊息 |
| PrepareSendImage | PrepareSendImagePayload | PrepareSendImageAnswer | 獲取批量發送圖檔的GCS signed url |
會在UserAll下創建doc,監聽doc的file process status成功後,再call SendImage | | SendImage | SendImagePayload | SendImageAnswer | 批量發送圖檔訊息 | | PrepareSendVideo | PrepareSendVideoPayload | PrepareSendVideoAnswer | | | SendMedia | SendMediaPayload | SendMediaAnswer | |
jktalk/talk/v3/friend/command.proto
BlockAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
BlockPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要封鎖的好友pan hashed uid |
HideAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
HidePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要隱藏的好友pan hashed uid |
PinAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
PinPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要釘選的好友pan hashed uid |
Result
| Field | Type | Label | Description |
|---|---|---|---|
| hashed_uid | string | 操作對象的pan hashed uid | |
| success | bool | 操作結果是否成功 | |
| reason | string | 失敗理由。若success = true則reason為空 |
UnBlockAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
UnBlockPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要解除封鎖的好友pan hashed uid |
UnHideAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
UnHidePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要解除隱藏的好友pan hashed uid |
UnPinAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | Result | repeated | |
| all_success | bool | 全部操作皆成功 |
UnPinPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要解除釘選的好友pan hashed uid |
FriendCommand
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Pin | PinPayload | PinAnswer | 釘選好友 累計不可超過20個釘選,會同時解除hide |
| UnPin | UnPinPayload | UnPinAnswer | 解除釘選好友 單次操作最多20筆 |
| Block | BlockPayload | BlockAnswer | 封鎖好友 單次操作最多20筆,會同時解除pin並且hide |
| UnBlock | UnBlockPayload | UnBlockAnswer | 解除封鎖好友 單次操作最多20筆,會同時解除hide |
| Hide | HidePayload | HideAnswer | 隱藏好友 單次操作最多20筆,會解除pin |
| UnHide | UnHidePayload | UnHideAnswer | 解除隱藏好友 單次操作最多20筆 |
jktalk/talk/v3/friend/query.proto
BlockedListAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| friends | Friend | repeated | |
| page | jktalk.talk.v3.base.Page |
BlockedListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| page | jktalk.talk.v3.base.Page | page和size不可小於1 |
Friend
| Field | Type | Label | Description |
|---|---|---|---|
| hashed_uid | string | pan的hashed uid | |
| uid | int64 | pan的uid | |
| display_name | string | pan的display name | |
| avatar | string | pan的大頭貼url | |
| type | jktalk.talk.v3.base.User.Type | repeated | 該用戶擁有的身份 |
| is_friend | bool | 和查詢者是好友 | |
| is_pinned | bool | 被查詢者釘選 | |
| is_blocked | bool | 被查詢者封鎖 | |
| is_hidden | bool | 被查詢者隱藏 | |
| is_official | bool | 是否為官方帳號 | |
| member_identified | bool | 是否為認證帳號 |
FriendListAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| uid_match_friend | Friend | payload中page number是1且search是uid才會有值 | |
| friends | Friend | repeated | |
| page | jktalk.talk.v3.base.Page |
FriendListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| page | jktalk.talk.v3.base.Page | page和size不可小於1 | |
| search | string | 部分比對display_name。如果page = 1,會同時作為uid來完全比對,uid查詢結果為uid_match_friend | |
| start_after_huid | string | 若不為空則優先於page | |
| end_before_huid | string | 分頁用,start_after_huid和end_before_huid不可同時存在 |
HiddenListAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| friends | Friend | repeated | |
| page | jktalk.talk.v3.base.Page |
HiddenListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| page | jktalk.talk.v3.base.Page | page和size不可小於1 |
UserInfosAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| friends | Friend | repeated |
UserInfosPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| hashed_uids | string | repeated | 上限100,如果為空則是查自己 |
FriendQuery
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| FriendList | FriendListPayload | FriendListAnswer | 查詢好友列表 有釘選的先置頂。被釘選的好友中,官方帳號會置頂。其餘非釘選帳號中,官方帳號也會置頂。 |
| BlockedList | BlockedListPayload | BlockedListAnswer | 查詢已封鎖用戶列表 |
| HiddenList | HiddenListPayload | HiddenListAnswer | 查詢已隱藏好友列表 |
| UserInfos | UserInfosPayload | UserInfosAnswer | 查詢指定用戶的「好友狀態」和「身份」 |
查是否為好友 |
jktalk/talk/v3/group/command.proto
CommandError
CreateGroupAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | string | 創建的群組的id ( = room_id) |
CreateGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| title | string | 群組名稱,不可為空 | |
| avatar_url | string | 群組頭像url | |
| target_hashed_uids | string | repeated | 指定的群組初始成員(除了自己),limit 20,只限好友 |
ForwardAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | ForwardAnswer.Result | repeated | |
| all_success | bool | 全部操作皆成功 |
ForwardAnswer.Result
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | string | 被操作的group id | |
| success | bool | 操作結果是否成功 | |
| reason | string | 失敗原因,如果是success則為空 |
ForwardPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_ids | string | repeated | 要將訊息轉發過去的group ids,單次轉發上限20筆,不可為空 |
| room_id | string | 被轉發的訊息的room_id (如果是anan則留空) | |
| message_id | string | 被轉發的訊息的message_id | |
| forward_source | jktalk.talk.v3.base.Message.Category | 被轉發的訊息的類型 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
InviteToGroupAnswer
InviteToGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 要邀請加入的群組,不可為空 | |
| target_hashed_uids | string | repeated | 要邀請加入群組的用戶,limit 20,只限好友 |
LeaveGroupAnswer
LeaveGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 要離開的群組的id,不可為空 |
PrepareGroupAvatarAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareGroupAvatarAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_to_upload | string | 檔案上傳的bucket path(會包含/group/avatar/這個folder path,作為圖檔處理的識別) | |
| display_filename | string | 顯示的檔案名稱 | |
| avatar_id | string | 圖檔的id,會寫在Message.ImageIds,可用於監聽檔案處理的狀態 |
PrepareGroupAvatarAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareGroupAvatarPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| file_info | string | 檔案的mime type | |
| file_ext | string | 檔案extension. support for jpg, jpeg, png, svg, gif |
RemoveFromGroupAnswer
RemoveFromGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 指定群組id,不可為空 | |
| target_hashed_uids | string | repeated | 要踢出群組的用戶,limit 20,不可為空 |
SendImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | string | ||
| message_id | string |
SendImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 要發送的group_id,不可為空 | |
| image_urls | string | repeated | 要發送的image urls,可由message command PrepareSendImage獲得,不可為空 |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendTextAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | string | 新發送訊息的group_id | |
| message_id | string | 新發送訊息的id |
SendTextPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 要發送訊息的group id,不可為空 | |
| text | string | 訊息文字,上限1500字,不可為空 | |
| reply_to | string | 要回覆的訊息的message id | |
| reply_target | jktalk.talk.v3.base.Message.Category | 被回覆的訊息類別 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendTidyBlackAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| group_id | string | 新發送訊息的group_id | |
| message_id | string | 新發送訊息的id |
SendTidyBlackPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan app jktalk token可調用 | |
| sender_id | string | ||
| group_id | string | 要發送的group_id,不可為空 | |
| pub_text | string | 小黑黑文字,不可為空 | |
| pub_action | jktalk.talk.v3.base.Pub.Action | 小黑黑類型 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
UpdateGroupAnswer
UpdateGroupPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| group_id | string | 要更新的群組的id,不可為空 | |
| title | string | 要更新的群組名稱,不可為空 | |
| avatar_url | string | 要更新的群組頭像的url |
CommandError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| OperatorNotGroupMember | 2001 | 操作者非群組成員 |
| TargetNotGroupMember | 2002 | 指定用戶非群組成員 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| PrepareGroupAvatar | PrepareGroupAvatarPayload | PrepareGroupAvatarAnswer | 獲取群組頭像的GCS signed url |
| CreateGroup | CreateGroupPayload | CreateGroupAnswer | 創建群組 |
| UpdateGroup | UpdateGroupPayload | UpdateGroupAnswer | 更新群組 操作者需為群組成員 |
| InviteToGroup | InviteToGroupPayload | InviteToGroupAnswer | 將其他用戶加入群組 操作者需為群組成員 |
| LeaveGroup | LeaveGroupPayload | LeaveGroupAnswer | 離開群組 操作者需為群組成員 |
| RemoveFromGroup | RemoveFromGroupPayload | RemoveFromGroupAnswer | 將其他用戶踢出群組 操作者需為群組成員 |
| SendText | SendTextPayload | SendTextAnswer | 發送文字訊息 操作者需為群組成員 |
| SendTidyBlack | SendTidyBlackPayload | SendTidyBlackAnswer | 發送小黑黑 操作者需為群組成員 |
| SendImage | SendImagePayload | SendImageAnswer | 發送圖檔訊息 操作者需為群組成員 |
| Forward | ForwardPayload | ForwardAnswer | 轉發訊息 操作者需為群組成員 支援轉發的message type -> Text, Image, Media 支援轉發的原始訊息為「dm, anan, group」,轉發的標的固定為group |
jktalk/talk/v3/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/talk/v3/message/command.proto
CommandError
ForwardAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| results | ForwardAnswer.Result | repeated | |
| all_success | bool | 全部轉發皆成功 |
ForwardAnswer.Result
| Field | Type | Label | Description |
|---|---|---|---|
| receiver | jktalk.talk.v3.base.Receiver | 訊息轉發目的地(dm room id or hashed uid),不可為空,上限20筆 | |
| success | bool | 轉發是否成功 | |
| reason | string | 失敗原因。如果轉發成功則為空 |
ForwardPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receivers | jktalk.talk.v3.base.Receiver | repeated | 接收者(dm room id or hashed uid),單次轉發上限20筆,不可為空 |
| room_id | string | 要轉發的訊息的room id | |
| message_id | string | 要轉發的訊息的message id | |
| forward_source | jktalk.talk.v3.base.Message.Category | 要轉發的訊息的類型 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
PrepareSendImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareSendImageAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_to_upload | string | 檔案上傳的bucket path | |
| display_filename | string | 顯示的檔案名稱 | |
| image_id | string | 圖檔的id,會寫在Message.ImageIds,可用於監聽檔案處理的狀態 |
PrepareSendImageAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareSendImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| file_info | string | 圖檔的mime type | |
| file_ext | string | 圖檔的extension,support for jpg, jpeg, png, svg, gif |
PrepareSendVideoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| signed_post_policy | PrepareSendVideoAnswer.SignedPostPolicyEntry | repeated | post to GCS需要的參數 |
| url_for_video | string | 檔案上傳的bucket path | |
| url_for_image | string | 暫時沒用 | |
| display_filename | string | 顯示的檔案名稱 | |
| video_id | string | 影片檔的id,會寫在Message.VideoIds。可用於監聽轉檔狀態 |
PrepareSendVideoAnswer.SignedPostPolicyEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | string |
PrepareSendVideoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| file_info | string | 影片檔的mime type | |
| file_ext | string | 影片檔的extension |
ReadMessageAnswer
ReadMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要讀取訊息的room ids |
SendActionAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendActionPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| title | string | 標題 | |
| text | string | 文字內容,不可超過40個utf8字符 | |
| isolated_buttons | jktalk.talk.v3.base.Action.Button | repeated | 上限2個。isolated_buttons和content_buttons不可皆為空 |
| content_buttons | jktalk.talk.v3.base.Action.Button | repeated | 上限1個 |
| images | string | repeated | 要夾帶的圖檔urls |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendAudioAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendAudioPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| image_url | string | ||
| audio_url | string | ||
| audio_type | SendAudioPayload.AudioType | ||
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendAudioTalkAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendAudioTalkPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| avatar_uid | string | 要顯示頭像的pan用戶的uid,不可為空 | |
| avatar_url | string | 大頭貼url,不可為空 | |
| audio_url | string | 音檔url,不可為空 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendImageAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendImagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| image_urls | string | repeated | |
| preview_images_id | string | deprecated | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendJPointsTransferAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendJPointsTransferPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan app jktalk token可調用 | |
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| trans_id | int64 | 轉移id | |
| trans_point | int64 | 轉移幾點 | |
| trans_status | jktalk.talk.v3.base.Transfer.Status | 點數轉移狀態 | |
| trans_time | google.protobuf.Timestamp | 點數轉移時間 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendMediaAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendMediaPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| video_urls | string | repeated | 影片檔的url,由PrepareSendVideo獲得(policy的key) |
| image_urls | string | repeated | 圖檔的url,由PrepareSendImage獲得 (policy的key) |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendProductInfoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendProductInfoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| product_info_id | string | 產品行銷訊息 ID,不可為空 | |
| caption | string | 小標,不可為空 | |
| title | string | 主標題,不可為空 | |
| link | string | 點擊後連結的網址,不可為空 | |
| open_mode | string | 點擊後的開啟方式 | |
| image_url | string | 圖片網址,不可為空 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendTextAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendTextPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| text | string | 訊息文字,不可超過1500字,不可為空 | |
| reply_to | string | 被回覆的訊息的message id | |
| reply_target | jktalk.talk.v3.base.Message.Category | 被回覆的訊息的類型 | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendTidyBlackAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendTidyBlackPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan app jktalk token可調用 | |
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| pub_text | string | 小黑黑文字,不可超過1500字 | |
| pub_action | jktalk.talk.v3.base.Pub.Action | 小黑黑類型 | |
| source_id | string | 小黑黑指向的原始訊息的message id | |
| sub_type | int64 | 次級識別。例:若pub_action = MoreTransferInfo,則sub_type即為jpoints的TransferStatus | |
| num_args | int64 | repeated | 用於pub_text中的整數參數。用來給前端、app組i18n pub_text |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
SendWelcomeAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
SendWelcomePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan app jktalk token可調用 | |
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| setting | jktalk.talk.v3.base.Message.Setting | 訊息設定 |
TakeBackAnswer
TakeBackPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可調用 | |
| sender_id | string | ||
| room_id | string | 要收回的訊息的room id,不可為空 | |
| message_id | string | 要收回的訊息的message id,不可為空 |
UpdateJPointsTransferAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 新發送訊息的room id | |
| message_id | string | 新發送訊息的message id |
UpdateJPointsTransferPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| trans_id | int64 | jpoints transfer id | |
| trans_status | jktalk.talk.v3.base.Transfer.Status | jpoints transfer status |
CommandError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| FailedToSend | 2001 | 發送失敗 |
| InvalidSender | 2002 | 不合法的訊息發送者 |
| InvalidReceiver | 2003 | 不合法的訊息接收者 |
| ReceiverShouldNotBeActress | 2004 | 訊息接收者不可為女優 |
| SenderShouldBeStar | 2005 | 訊息發送者應為女優或女郎 |
| UserNotAllowedToSendMessage | 2006 | 該用戶不可發送訊息 |
| NotAllowedToForward | 2007 | 該訊息不可轉發 |
| ProductInfoDuplicated | 2008 | 商品行銷訊息重複 |
| WelcomeMessageDisabled | 2009 | 已停用歡迎訊息 |
SendAudioPayload.AudioType
| Name | Number | Description |
|---|---|---|
| Default | 0 |
Command
jktalk/talk/v3/message/query.proto
GetAnanUnreadCountAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetAnanUnreadCountAnswer.Record | repeated |
GetAnanUnreadCountAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | ||
| unread_count | int64 |
GetAnanUnreadCountPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要查詢的room。不可為空,上限100筆,對方是official才會回傳 |
GetLinkMetaAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| metadata | GetLinkMetaAnswer.Data | repeated |
GetLinkMetaAnswer.Data
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| attrs | jktalk.talk.v3.base.Attr | repeated |
GetLinkMetaPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| link_url | string | prefix只限http |
GetTotalUnreadCountAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| unread_count | int64 |
GetTotalUnreadCountPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string |
GetUnreadCountAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetUnreadCountAnswer.Record | repeated |
GetUnreadCountAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | ||
| unread_count | int64 |
GetUnreadCountPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要查詢的room。不可為空,上限100筆 |
SearchAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | SearchAnswer.Record | repeated | |
| total_count | int64 | 資料總筆數 |
SearchAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| message_id | string | ||
| room_id | string | ||
| sender_id | string | ||
| type | jktalk.talk.v3.base.Message.Type | ||
| text | string | ||
| created_at | google.protobuf.Timestamp |
SearchPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_id | string | 若空則查詢所有room | |
| official_tag | jktalk.talk.v3.base.Official.Tag | 要限制查詢的客服標籤 | |
| search | string | 要查詢的substring,不可為空 | |
| endAt | google.protobuf.Timestamp | start from specified created time in descending order | |
| page_size | int64 | 每頁筆數 |
SearchWithRoomAggregationAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | SearchWithRoomAggregationAnswer.Record | repeated | |
| total_count | int64 | 資料總筆數,只有查詢「第一頁」時會提供 |
SearchWithRoomAggregationAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | ||
| matched_message_count | int64 | 該room中符合查詢條件的訊息數 |
SearchWithRoomAggregationPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| official_tag | jktalk.talk.v3.base.Official.Tag | 要限制查詢的客服標籤 | |
| search | string | 要查詢的substring,不可為空 | |
| start_after_room | string | 需填入room_id。若為空則為第一頁,若有值,會查詢room_id > <provided_room_id> | |
| page_size | int64 | 每頁筆數 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetUnreadCount | GetUnreadCountPayload | GetUnreadCountAnswer | 查指定的room的自己的未讀數 (dm or group) |
| GetAnanUnreadCount | GetAnanUnreadCountPayload | GetAnanUnreadCountAnswer | 查指定的anan room的自己的公告未讀數 (dm only) 需要對方是official,只會返回對方發布的公告中、自己尚未讀取的數量 |
| GetTotalUnreadCount | GetTotalUnreadCountPayload | GetTotalUnreadCountAnswer | 查自己的總計未讀數 (dm & group & anan) |
| GetLinkMeta | GetLinkMetaPayload | GetLinkMetaAnswer | 查詢連結的metadata |
| Search | SearchPayload | SearchAnswer | 查詢包含指定文字的訊息 |
| SearchWithRoomAggregation | SearchWithRoomAggregationPayload | SearchWithRoomAggregationAnswer | 查詢包含指定文字的訊息的DM頻道 |
jktalk/talk/v3/official/command.proto
CreateQuickReplyAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| quick_reply_id | int64 | 快速回覆id |
CreateQuickReplyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token且為official可操作 | |
| sender_id | string | ||
| title | string | 標題,不可為空,不可超過20 byte | |
| text | string | 內容,不可為空,不可超過1500字 |
DeleteQuickReplyAnswer
DeleteQuickReplyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token且為official可操作 | |
| sender_id | string | ||
| quick_reply_ids | int64 | repeated | 要刪除的快速回覆id,不可為空,若非回覆的創建者不可刪除 |
OfficialCommandError
UpdateOfficialTagAnswer
UpdateOfficialTagPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限official可操作 | |
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) | |
| official_tag | jktalk.talk.v3.base.Official.Tag | 要更新的official tag |
UpdateQuickReplyAnswer
UpdateQuickReplyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token且為official且為該回覆的創建者可操作 | |
| sender_id | string | ||
| quick_reply_id | int64 | 要更新的快速回覆id | |
| title | string | ||
| text | string |
UpdateWelcomeMessageAnswer
UpdateWelcomeMessagePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限official可操作 | |
| sender_id | string | ||
| text | string | 不可超過1500字 | |
| enable | bool | 是否開啟歡迎訊息 |
OfficialCommandError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| TitleOverLimit | 2001 | 標題字數超過上限 |
| ReplyCountOverLimit | 2002 | 快速回覆超過可存儲上限 |
| OperandOverLimit | 2003 | 操作數量超過上限 |
| OperatorNotCreator | 2004 | 資料操作者非資料創建者 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| CreateQuickReply | CreateQuickReplyPayload | CreateQuickReplyAnswer | 建立快速回覆 累計不可超過100則 |
| UpdateQuickReply | UpdateQuickReplyPayload | UpdateQuickReplyAnswer | 更新快速回覆 |
| DeleteQuickReply | DeleteQuickReplyPayload | DeleteQuickReplyAnswer | 刪除快速回覆 |
| UpdateWelcomeMessage | UpdateWelcomeMessagePayload | UpdateWelcomeMessageAnswer | 更新歡迎訊息 |
| UpdateOfficialTag | UpdateOfficialTagPayload | UpdateOfficialTagAnswer | 更新指定room的official tag |
jktalk/talk/v3/official/query.proto
FindAllQuickReplyAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| replies | FindAllQuickReplyAnswer.Reply | repeated |
FindAllQuickReplyAnswer.Reply
| Field | Type | Label | Description |
|---|---|---|---|
| quick_reply_id | int64 | 快速回覆id | |
| title | string | 標題 | |
| text | string | 內容 |
FindAllQuickReplyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string |
GetOfficialListAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| hashed_uids | string | repeated |
GetOfficialListPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| FindAllQuickReply | FindAllQuickReplyPayload | FindAllQuickReplyAnswer | |
| GetOfficialList | GetOfficialListPayload | GetOfficialListAnswer |
jktalk/talk/v3/room/command.proto
CommandError
DeleteRoomAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| deleted_room_ids | string | repeated | 已刪除的room ids |
DeleteRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string | ||
| room_ids | string | repeated | 要刪除的room ids,不可為空,單次上限10 |
EnableRoomNotifyAnswer
EnableRoomNotifyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| fcm_token | string | web = hashed uid, app = firebase fcm token,用來識別裝置,不可為空 | |
| room_id | string | 要開關通知的頻道,不可為空 | |
| enable_notify | bool | 是否開啟 |
FindOrCreateRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| receiver | jktalk.talk.v3.base.Receiver | 接收者(dm room id or hashed uid) |
FindOrCreateRoomPayloadAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 查詢到或新創建的room id |
HideRoomAnswer
HideRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要隱藏的room ids,不可為空,累計隱藏上限20 |
PinRoomAnswer
PinRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要釘選的room ids,不可為空,累計釘選上限20 |
UnHideRoomAnswer
UnHideRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要解除隱藏的room ids,不可為空,單次上限20 |
UnPinRoomAnswer
UnPinRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| room_ids | string | repeated | 要解除釘選的room ids,不可為空,單次上限20 |
CommandError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| RoomNotFoundOrMemberNotMatch | 2001 | 查無該用戶或頻道 |
| PinnedRoomOverLimit | 2002 | 釘選頻道超過上限 |
| DeviceNotFound | 2003 | 查無裝置紀錄 |
| OperandOverLimit | 2004 | 單次操作量超過上限 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| FindOrCreateRoom | FindOrCreateRoomPayload | FindOrCreateRoomPayloadAnswer | 查詢或創建頻道 |
| DeleteRoom | DeleteRoomPayload | DeleteRoomAnswer | 刪除頻道 上限10 |
| PinRoom | PinRoomPayload | PinRoomAnswer | 釘選頻道 上限20個 |
| UnPinRoom | UnPinRoomPayload | UnPinRoomAnswer | 解除釘選頻道 單次操作上限20筆 |
| HideRoom | HideRoomPayload | HideRoomAnswer | 隱藏頻道 單次操作上限20筆 |
| UnHideRoom | UnHideRoomPayload | UnHideRoomAnswer | 解除隱藏頻道 單次操作上限20筆 |
| EnableRoomNotify | EnableRoomNotifyPayload | EnableRoomNotifyAnswer | 設定指定裝置上是否開啟指定頻道的通知 |
jktalk/talk/v3/room/query.proto
NotifyRoomInfoAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | NotifyRoomInfoAnswer.Record | repeated |
NotifyRoomInfoAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | ||
| enabled | bool | 是否開啟通知 |
NotifyRoomInfoPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| fcm_token | string | 指定裝置。web = hashed uid, app = firebase fcm token | |
| room_ids | string | repeated | 要查詢通知開關狀態的room ids |
QueryError
SearchUnreadRoomAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | SearchUnreadRoomAnswer.Record | repeated |
SearchUnreadRoomAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| room_id | string | 結果會是用room_id排序,因為modified_at只是同步未讀數的時間、都會很接近而且沒什麼參考價值 | |
| unread_count | int64 | ||
| modified_at | google.protobuf.Timestamp |
SearchUnreadRoomPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| start_after | string | 給空就是第一頁 | |
| size | int64 | > 0, max 100 |
QueryError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| RoomNotFoundOrMemberNotMatch | 2001 | 查無頻道或用戶 |
| PinnedRoomOverLimit | 2002 | 釘選頻道超過上限 |
| DeviceNotFound | 2003 | 查無裝置紀錄 |
| OperandOverLimit | 2004 | 單次操作量超過上限 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| NotifyRoomInfo | NotifyRoomInfoPayload | NotifyRoomInfoAnswer | 查詢指定裝置上,是否有開啟指定頻道的通知 |
| SearchUnreadRoom | SearchUnreadRoomPayload | SearchUnreadRoomAnswer | 查詢有未讀訊息的頻道 |
jktalk/talk/v3/user/command.proto
EnableUserNotifyAnswer
EnableUserNotifyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string | ||
| enable | bool | 是否開啟通知 |
GetFirebaseTokenAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| firebase_token | string |
GetFirebaseTokenPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string |
GetJkTalkTokenAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| jktalk_token | string |
GetJkTalkTokenPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string |
NotifyOnlineAnswer
NotifyOnlinePayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string |
RegisterDeviceNotifyAnswer
RegisterDeviceNotifyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string | ||
| fcm_token | string | 要註冊的裝置識別。web = hashed uid, app = firebase fcm token,不可為空 | |
| platform | jktalk.talk.v3.base.Device.Platform | 要註冊的平台識別 |
ReportAbuseUserAnswer
ReportAbuseUserPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string | ||
| target_hashed_uid | string | 要檢舉的用戶的pan hashed uid,不可為空 | |
| reason | string | 檢舉原因 |
ResetUnreadCountAnswer
ResetUnreadCountPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | ||
| sender_id | string |
UnregisterDeviceNotifyAnswer
UnregisterDeviceNotifyPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | jktalk.talk.v3.base.Token | 只限pan access token可操作 | |
| sender_id | string | ||
| fcm_token | string | 要取消註冊的裝置識別。web = hashed uid, app = firebase fcm token,不可為空 |
Command
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| GetFirebaseToken | GetFirebaseTokenPayload | GetFirebaseTokenAnswer | 獲取firebase token |
| EnableUserNotify | EnableUserNotifyPayload | EnableUserNotifyAnswer | 開啟用戶通知(全局設定,不論裝置和頻道) |
| NotifyOnline | NotifyOnlinePayload | NotifyOnlineAnswer | 通知上限 |
| ReportAbuseUser | ReportAbuseUserPayload | ReportAbuseUserAnswer | 檢舉用戶 |
| RegisterDeviceNotify | RegisterDeviceNotifyPayload | RegisterDeviceNotifyAnswer | 註冊裝置至通知設定 |
| UnregisterDeviceNotify | UnregisterDeviceNotifyPayload | UnregisterDeviceNotifyAnswer | 取消註冊裝置至通知設定 |
| ResetUnreadCount | ResetUnreadCountPayload | ResetUnreadCountAnswer | 清空未讀數 |
| GetJkTalkToken | GetJkTalkTokenPayload | GetJkTalkTokenAnswer | 換取jktalk token |
jktalk/talk/v3/user/query.proto
GetOnlineStatusAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| records | GetOnlineStatusAnswer.Record | repeated |
GetOnlineStatusAnswer.Record
| Field | Type | Label | Description |
|---|---|---|---|
| hashed_uid | string | pan hashed uid | |
| is_online | bool | 是否在線中 |
GetOnlineStatusPayload
| Field | Type | Label | Description |
|---|---|---|---|
| token | base.Token | ||
| sender_id | string | ||
| target_hashed_uids | string | repeated | 要查詢的用戶的pan hashed uid,不可為空,上限100個 |
UserStatusAnswer
| Field | Type | Label | Description |
|---|---|---|---|
| user_status_map | UserStatusAnswer.UserStatusMapEntry | repeated |
UserStatusAnswer.Error
UserStatusAnswer.UserError
| Field | Type | Label | Description |
|---|---|---|---|
| code | UserStatusAnswer.UserError.Code | ||
| huid | string | ||
| description | string |
UserStatusAnswer.UserStatusMapEntry
| Field | Type | Label | Description |
|---|---|---|---|
| key | string | ||
| value | base.UserStatus |
UserStatusPayload
| Field | Type | Label | Description |
|---|---|---|---|
| huid_pl | string | repeated | 要查詢的user的hashed uid list |
| pan_access_token | string | 目前沒用 |
UserStatusAnswer.Error.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| Failed | 1001 | 有一個以上的用戶查詢不到 |
UserStatusAnswer.UserError.Code
| Name | Number | Description |
|---|---|---|
| None | 0 | |
| NotFound | 1001 | 查無用戶 |
| Failed | 1002 |
Query
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| Status | UserStatusPayload | UserStatusAnswer | 查詢指定用戶當前的風險、禁言狀態 |
| GetOnlineStatus | GetOnlineStatusPayload | GetOnlineStatusAnswer | 查詢指定用戶的上線狀態 單次查詢上限100筆 |