@qwanyx/stack 0.2.96 → 0.2.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.d.ts +67 -1
- package/dist/client/GraphClient.d.ts +11 -0
- package/dist/components/VoiceTextEditor.d.ts +12 -1
- package/dist/index.cjs.js +33 -33
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +5794 -5499
- package/package.json +1 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -39,6 +39,41 @@ export interface AuthServiceConfig {
|
|
|
39
39
|
onLogin?: (user: AuthUser) => void;
|
|
40
40
|
onLogout?: () => void;
|
|
41
41
|
}
|
|
42
|
+
export interface SystemUser {
|
|
43
|
+
_id: string;
|
|
44
|
+
id: string;
|
|
45
|
+
email: string;
|
|
46
|
+
firstName?: string;
|
|
47
|
+
lastName?: string;
|
|
48
|
+
phone?: string;
|
|
49
|
+
role: string;
|
|
50
|
+
membershipRole: string;
|
|
51
|
+
status: string;
|
|
52
|
+
created: number;
|
|
53
|
+
modified: number;
|
|
54
|
+
lastLogin?: number;
|
|
55
|
+
isDigitalHuman: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ListUsersResult {
|
|
58
|
+
success: boolean;
|
|
59
|
+
users?: SystemUser[];
|
|
60
|
+
total?: number;
|
|
61
|
+
error?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UserOperationResult {
|
|
64
|
+
success: boolean;
|
|
65
|
+
error?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface UserSystemEntry {
|
|
68
|
+
system_id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
role: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ListUserSystemsResult {
|
|
73
|
+
success: boolean;
|
|
74
|
+
systems?: UserSystemEntry[];
|
|
75
|
+
error?: string;
|
|
76
|
+
}
|
|
42
77
|
export declare class AuthManager {
|
|
43
78
|
/**
|
|
44
79
|
* Store authentication token
|
|
@@ -91,6 +126,7 @@ export declare class AuthService {
|
|
|
91
126
|
/**
|
|
92
127
|
* Register a new user with email and password
|
|
93
128
|
* Sends verification code to email
|
|
129
|
+
* Automatically adds user as member of the configured system
|
|
94
130
|
*/
|
|
95
131
|
register(email: string, password: string, options?: {
|
|
96
132
|
firstName?: string;
|
|
@@ -114,7 +150,7 @@ export declare class AuthService {
|
|
|
114
150
|
/**
|
|
115
151
|
* Login with email and password
|
|
116
152
|
* Uses system coprocessor for authentication
|
|
117
|
-
*
|
|
153
|
+
* Auto-adds user as member of configured system on first login
|
|
118
154
|
*/
|
|
119
155
|
login(email: string, password: string): Promise<LoginResult>;
|
|
120
156
|
/**
|
|
@@ -142,6 +178,36 @@ export declare class AuthService {
|
|
|
142
178
|
* Check if user is authenticated
|
|
143
179
|
*/
|
|
144
180
|
isAuthenticated(): boolean;
|
|
181
|
+
/**
|
|
182
|
+
* List all users in the platform (from system.db)
|
|
183
|
+
*/
|
|
184
|
+
listAllUsers(options?: {
|
|
185
|
+
limit?: number;
|
|
186
|
+
offset?: number;
|
|
187
|
+
}): Promise<ListUsersResult>;
|
|
188
|
+
/**
|
|
189
|
+
* List all users in the current system
|
|
190
|
+
*/
|
|
191
|
+
listSystemUsers(options?: {
|
|
192
|
+
limit?: number;
|
|
193
|
+
offset?: number;
|
|
194
|
+
}): Promise<ListUsersResult>;
|
|
195
|
+
/**
|
|
196
|
+
* Add a user to the current system
|
|
197
|
+
*/
|
|
198
|
+
addUserToSystem(userId: string, role?: string): Promise<UserOperationResult>;
|
|
199
|
+
/**
|
|
200
|
+
* Update a user's membership role in the current system
|
|
201
|
+
*/
|
|
202
|
+
updateMembershipRole(userId: string, newRole: string): Promise<UserOperationResult>;
|
|
203
|
+
/**
|
|
204
|
+
* List all systems a user belongs to
|
|
205
|
+
*/
|
|
206
|
+
listUserSystems(userId: string): Promise<ListUserSystemsResult>;
|
|
207
|
+
/**
|
|
208
|
+
* Remove a user from the current system
|
|
209
|
+
*/
|
|
210
|
+
removeUserFromSystem(userId: string): Promise<UserOperationResult>;
|
|
145
211
|
}
|
|
146
212
|
/**
|
|
147
213
|
* Initialize the auth service
|
|
@@ -57,6 +57,17 @@ export declare class GraphClient {
|
|
|
57
57
|
deleted: boolean;
|
|
58
58
|
count: number;
|
|
59
59
|
}>;
|
|
60
|
+
/**
|
|
61
|
+
* Update an edge's data
|
|
62
|
+
* @param sourceId - Source node ID (null for edges without source)
|
|
63
|
+
* @param targetId - Target node ID
|
|
64
|
+
* @param edgeType - The type of edge to update
|
|
65
|
+
* @param data - New data for the edge
|
|
66
|
+
*/
|
|
67
|
+
updateEdge(sourceId: string | null, targetId: string, edgeType: string, data: Record<string, any>): Promise<{
|
|
68
|
+
success: boolean;
|
|
69
|
+
updated?: number;
|
|
70
|
+
}>;
|
|
60
71
|
/**
|
|
61
72
|
* Get edges from a source node
|
|
62
73
|
* @param sourceId - Source node ID (null for edges without source)
|
|
@@ -51,5 +51,16 @@ export interface VoiceTextEditorProps {
|
|
|
51
51
|
voice?: TTSVoice;
|
|
52
52
|
/** Called when voice selection changes */
|
|
53
53
|
onVoiceChange?: (voice: TTSVoice) => void;
|
|
54
|
+
/** Shows a generate button on the left of toolbar */
|
|
55
|
+
generateButton?: {
|
|
56
|
+
label: string;
|
|
57
|
+
icon?: string;
|
|
58
|
+
};
|
|
59
|
+
/** System prompt for generation (uses llmClient internally) */
|
|
60
|
+
generatePrompt?: string;
|
|
61
|
+
/** Source text for generation (e.g., description to transform into exposé) */
|
|
62
|
+
generateSourceText?: string;
|
|
63
|
+
/** Error message to show if source text is empty */
|
|
64
|
+
generateSourceError?: string;
|
|
54
65
|
}
|
|
55
|
-
export declare function VoiceTextEditor({ label, value, onChange, onTranscribe, onAIAction, onAIPrompt, placeholder, className, rows, llmClient, graphClient, nodeId, audioFilename, existingAudio, existingVoice, onAudioGenerated, onGenerateTTS, audioUrl, voice, onVoiceChange }: VoiceTextEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
export declare function VoiceTextEditor({ label, value, onChange, onTranscribe, onAIAction, onAIPrompt, placeholder, className, rows, llmClient, graphClient, nodeId, audioFilename, existingAudio, existingVoice, onAudioGenerated, onGenerateTTS, audioUrl, voice, onVoiceChange, generateButton, generatePrompt, generateSourceText, generateSourceError }: VoiceTextEditorProps): import("react/jsx-runtime").JSX.Element;
|