feat(chat): add support action cards and live entitlements
Docker Image / Build and Push Docker Image (push) Successful in 2m2s
Docker Image / Build and Push Docker Image (push) Successful in 2m2s
This commit is contained in:
@@ -11,6 +11,10 @@ import {
|
||||
ChatPreviewsResponseSchema,
|
||||
ChatSendResponse,
|
||||
ChatSendResponseSchema,
|
||||
ChatActionEventRequest,
|
||||
ChatActionEventRequestSchema,
|
||||
ChatActionEventResponse,
|
||||
ChatActionEventResponseSchema,
|
||||
OpeningMessageRequest,
|
||||
OpeningMessageResponse,
|
||||
OpeningMessageResponseSchema,
|
||||
@@ -42,6 +46,21 @@ export class ChatApi {
|
||||
return ChatSendResponseSchema.parse(unwrap(env) as Record<string, unknown>);
|
||||
}
|
||||
|
||||
/** 上报白名单聊天操作卡事件;eventId 用于安全重试。 */
|
||||
async recordActionEvent(
|
||||
body: ChatActionEventRequest,
|
||||
): Promise<ChatActionEventResponse> {
|
||||
const request = ChatActionEventRequestSchema.parse(body);
|
||||
const env = await httpClient<ApiEnvelope<unknown>>(
|
||||
ApiPath.chatActionEvents,
|
||||
{
|
||||
method: "POST",
|
||||
body: request,
|
||||
},
|
||||
);
|
||||
return ChatActionEventResponseSchema.parse(unwrap(env));
|
||||
}
|
||||
|
||||
/** 幂等保存当前角色的首次开场白。 */
|
||||
async saveOpeningMessage(
|
||||
body: OpeningMessageRequest,
|
||||
|
||||
Reference in New Issue
Block a user