@glasshome/sync-layer 0.3.2 → 0.5.0

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.
@@ -53,18 +53,18 @@ export interface OAuthOptions {
53
53
  * Authenticate using OAuth flow
54
54
  *
55
55
  * This function uses `getAuth` from `home-assistant-js-websocket` which:
56
- * 1. Opens Home Assistant authorization page in a popup
56
+ * 1. Redirects the whole page to the Home Assistant authorization page
57
57
  * 2. Waits for user authorization
58
- * 3. Exchanges authorization code for tokens
59
- * 4. Returns authenticated Auth object
58
+ * 3. On return, HA redirects back to the app URL with `?auth_callback=1&code=…`
59
+ * 4. Exchanges the authorization code for tokens and returns an Auth object
60
60
  *
61
61
  * Note: For a complete OAuth flow, you typically need to:
62
62
  * - Set up a redirect URI endpoint in your app
63
63
  * - Handle the OAuth callback with the authorization code
64
64
  * - Use `getAuthCode` callback to provide the code
65
65
  *
66
- * Alternatively, `getAuth` can automatically handle the flow in browser environments
67
- * by opening a popup and listening for the callback.
66
+ * In browser environments `getAuth` handles this automatically via a full-page
67
+ * redirect (not a popup); native platforms supply `getAuthCode` instead.
68
68
  *
69
69
  * @param options - OAuth options
70
70
  * @returns Authenticated Auth object
@@ -7,7 +7,6 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  import type { HAEvent } from "@glasshome/ha-types";
10
- import type { Fixtures } from "../testing/types";
11
10
  /**
12
11
  * Unified connection interface for Home Assistant connections
13
12
  *
@@ -149,13 +148,4 @@ export interface SyncLayerConnection {
149
148
  * ```
150
149
  */
151
150
  addEventListener(handler: (message: any) => void): () => void;
152
- /**
153
- * Get fixtures (MockConnection only)
154
- *
155
- * Returns the fixture data for mock connections. SyncLayer uses this
156
- * to load fixtures into its store during connection setup.
157
- *
158
- * @returns Fixture data (entities, registries, etc.)
159
- */
160
- getFixtures?(): Fixtures;
161
151
  }