@coasys/ad4m-connect 0.11.0 → 0.11.2-dev-multi-user

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.
@@ -0,0 +1,13 @@
1
+ type ConnectionOverviewProps = {
2
+ localDetected: boolean;
3
+ multiUserConfigured: boolean;
4
+ backendUrl?: string;
5
+ configuredUrl?: string;
6
+ isMobile: boolean;
7
+ onConnectLocal: () => void;
8
+ onConnectRemote: () => void;
9
+ onScanQR: () => void;
10
+ onDownloadAd4m: () => void;
11
+ };
12
+ export default function ConnectionOverview({ localDetected, multiUserConfigured, backendUrl, configuredUrl, isMobile, onConnectLocal, onConnectRemote, onScanQR, onDownloadAd4m, }: ConnectionOverviewProps): import("lit").TemplateResult<1>;
13
+ export {};
@@ -0,0 +1,15 @@
1
+ type MultiUserAuthProps = {
2
+ email: string;
3
+ password: string;
4
+ error: string | null;
5
+ isLoading: boolean;
6
+ backendUrl?: string;
7
+ changeEmail: (email: string) => void;
8
+ changePassword: (password: string) => void;
9
+ onLogin: () => void;
10
+ onSignup: () => void;
11
+ activeTab: "login" | "signup";
12
+ setActiveTab: (tab: "login" | "signup") => void;
13
+ };
14
+ export default function MultiUserAuth({ email, password, error, isLoading, backendUrl, changeEmail, changePassword, onLogin, onSignup, activeTab, setActiveTab, }: MultiUserAuthProps): import("lit").TemplateResult<1>;
15
+ export {};
@@ -0,0 +1,13 @@
1
+ type RemoteConnectionProps = {
2
+ initialUrl?: string;
3
+ detecting: boolean;
4
+ multiUserDetected: boolean | null;
5
+ error: string | null;
6
+ onBack: () => void;
7
+ onUrlChange: (url: string) => void;
8
+ onConnect: () => void;
9
+ onMultiUserAuth: () => void;
10
+ onRequestCapability: () => void;
11
+ };
12
+ export default function RemoteConnection({ initialUrl, detecting, multiUserDetected, error, onBack, onUrlChange, onConnect, onMultiUserAuth, onRequestCapability, }: RemoteConnectionProps): import("lit").TemplateResult<1>;
13
+ export {};
package/dist/core.d.ts CHANGED
@@ -14,6 +14,10 @@ export type Ad4mConnectOptions = {
14
14
  url?: string;
15
15
  hosting?: boolean;
16
16
  mobile?: boolean;
17
+ multiUser?: boolean;
18
+ backendUrl?: string;
19
+ userEmail?: string;
20
+ userPassword?: string;
17
21
  };
18
22
  export type AuthStates = "authenticated" | "locked" | "unauthenticated";
19
23
  export type Event = "authstatechange" | "connectionstatechange" | "configstatechange";
@@ -38,8 +42,9 @@ export default class Ad4mConnect {
38
42
  appIconPath: string;
39
43
  appUrl?: string;
40
44
  isHosting: boolean;
45
+ options: Ad4mConnectOptions;
41
46
  listeners: Record<Event, Function[]>;
42
- constructor({ appName, appDesc, appIconPath, appUrl, appDomain, capabilities, port, token, url, hosting }: Ad4mConnectOptions);
47
+ constructor(options: Ad4mConnectOptions);
43
48
  private notifyConfigChange;
44
49
  private notifyConnectionChange;
45
50
  private notifyAuthChange;
@@ -47,7 +52,9 @@ export default class Ad4mConnect {
47
52
  setUrl(url: string): void;
48
53
  setToken(token: string): void;
49
54
  on(event: Event, cb: Function): void;
55
+ buildTempClient(url: string): Ad4mClient;
50
56
  connect(url?: string): Promise<Ad4mClient>;
57
+ connectMultiUser(): Promise<Ad4mClient>;
51
58
  loginToHosting(email: string, password: string): Promise<void>;
52
59
  checkEmail(email: string): Promise<boolean>;
53
60
  connectToPort(port?: number): Promise<Ad4mClient>;