File tree Expand file tree Collapse file tree
adminforth/types/adapters Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import type { AdminUser } from "../Common.js" ;
2- import type { IAdminForth } from "../Back.js" ;
3-
41export type ChatSurfaceRequestContext = {
52 body : unknown ;
63 headers : Record < string , unknown > ;
@@ -19,6 +16,12 @@ export type ChatSurfaceIncomingMessage = {
1916 metadata ?: Record < string , unknown > ;
2017} ;
2118
19+ export type ChatSurfaceConnectAction = {
20+ type : "url" ;
21+ label : string ;
22+ url : string ;
23+ } ;
24+
2225export type ChatSurfaceEvent =
2326 | {
2427 type : "text_delta" ;
@@ -74,11 +77,10 @@ export interface ChatSurfaceAdapter {
7477 ) : ChatSurfaceEventSink | Promise < ChatSurfaceEventSink > ;
7578
7679 /**
77- * Maps an external surface user to an authorized AdminForth admin user.
78- * Return null to reject the incoming chat message .
80+ * Creates a platform-specific action that lets a logged-in AdminForth user link
81+ * their account to this external chat surface .
7982 */
80- resolveAdminUser ( input : {
81- adminforth : IAdminForth ;
82- incoming : ChatSurfaceIncomingMessage ;
83- } ) : AdminUser | null | Promise < AdminUser | null > ;
83+ createConnectAction ?( input : {
84+ token : string ;
85+ } ) : ChatSurfaceConnectAction | Promise < ChatSurfaceConnectAction > ;
8486}
You can’t perform that action at this time.
0 commit comments