@camstack/sdk 0.1.43 → 0.1.45
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/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/system.d.ts +12 -1
- package/package.json +1 -1
package/dist/system.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import type { BackendConnectionState } from './types.js';
|
|
|
22
22
|
export interface UserInfo {
|
|
23
23
|
readonly id: string;
|
|
24
24
|
readonly username: string;
|
|
25
|
-
readonly
|
|
25
|
+
readonly isAdmin: boolean;
|
|
26
26
|
readonly permissions?: {
|
|
27
27
|
readonly allowedAddons?: ReadonlyArray<string> | '*';
|
|
28
28
|
readonly allowedDevices?: Readonly<Record<string, ReadonlyArray<string> | '*'>>;
|
|
@@ -183,6 +183,17 @@ export declare class System {
|
|
|
183
183
|
private disposeMirror;
|
|
184
184
|
login(username: string, password: string): Promise<{
|
|
185
185
|
token: string;
|
|
186
|
+
requiresTotp?: boolean;
|
|
187
|
+
}>;
|
|
188
|
+
/**
|
|
189
|
+
* Second leg of the 2FA login. The caller passes the challenge
|
|
190
|
+
* token returned by `login` (when `requiresTotp: true`) plus the
|
|
191
|
+
* 6-digit code from the user's authenticator app. On success the
|
|
192
|
+
* server mints the real session JWT, which we set as the active
|
|
193
|
+
* token on this client.
|
|
194
|
+
*/
|
|
195
|
+
loginVerifyTotp(challengeToken: string, code: string): Promise<{
|
|
196
|
+
token: string;
|
|
186
197
|
}>;
|
|
187
198
|
logout(): Promise<void>;
|
|
188
199
|
getMe(): Promise<UserInfo>;
|