@base44-preview/sdk 0.8.49-pr.289.cceffb2 → 0.8.49-pr.289.e36026d

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.
@@ -140,43 +140,35 @@ export interface ActorClient<N extends string = string> {
140
140
  (instanceId: string): ActorRef<N>;
141
141
  }
142
142
  /**
143
- * Provides access to actors and their shared, live sessions.
143
+ * Use `base44.actors` to connect your frontend to [actor sessions](/developers/backend/resources/actors/overview),
144
+ * shared live backend processes where clients can exchange messages in realtime.
144
145
  *
145
- * Use `base44.actors` to connect clients to a running actor session. The actors
146
- * client lets you:
146
+ * With the Actors SDK module you can:
147
147
  *
148
- * - Subscribe to messages the actor sends — either broadcast to all connected
149
- * clients or sent to your client directly.
150
- * - Send messages to the actor from the client.
148
+ * - Connect to a session with `base44.actors.<ActorName>(sessionId).connect()`.
149
+ * - Subscribe to messages the actor sends using [Connection.subscribe](#subscribe),
150
+ * either broadcast to all clients or sent directly to your client.
151
+ * - Send messages to the actor with [Connection.send](#send).
151
152
  * - Share a session across multiple clients: any clients with the same actor
152
153
  * name and session ID connect to the same session.
153
154
  * - Type your messages using [ActorRegistry](#actorregistry) for autocomplete
154
155
  * and compile-time safety.
155
156
  *
156
- * The client works in the browser and in Node.js.
157
- *
158
- * ## Connection flow
159
- *
160
- * - Connect to a session with `base44.actors.<ActorName>(sessionId).connect()`.
161
- * - Subscribe to outgoing messages with [Connection.subscribe](#subscribe).
162
- * - Send incoming messages with [Connection.send](#send).
163
- * - Close the connection with [Connection.close](#close).
164
- *
165
- * See [Actors Overview](/developers/backend/resources/actors/overview)
166
- * for actor concepts and terminology, [Actor Class Reference](/developers/backend/resources/actors/reference)
167
- * for the backend class API, and [Sample Flows](/developers/backend/resources/actors/samples)
168
- * for common patterns.
157
+ * Learn more about [actors](/developers/backend/resources/actors/overview).
169
158
  *
170
159
  * ## Authentication modes
171
160
  *
172
- * This module is available in anonymous or user authentication mode
173
- * (`base44.actors`). It isn't available with service role authentication. Apps that
174
- * require login can reject anonymous connections in the actor's `handleConnect()` method.
175
- * See [Manage client connections](/developers/backend/resources/actors/samples#manage-client-connections)
176
- * for a sample flow.
177
- *
161
+ * This module is available in anonymous or user authentication mode.
162
+ * Apps that require login can reject anonymous connections in the actor's `handleConnect()` method.
163
+ * Learn more about [managing client connections](/developers/backend/resources/actors/samples#manage-client-connections).
164
+
165
+
178
166
  * @example
167
+ *
168
+ * The following example displays the general lifecycle of a client connected to an actor named `Chat`:
169
+ *
179
170
  * ```typescript
171
+ * Example
180
172
  * const conn = base44.actors.Chat("session-1").connect({ id: "tab-1" });
181
173
  * const sub = conn.subscribe((msg) => console.log(msg));
182
174
  * conn.send({ type: "message", text: "hi" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.49-pr.289.cceffb2",
3
+ "version": "0.8.49-pr.289.e36026d",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",