@sockethub/client 5.0.0-beta.1 → 5.0.0-beta.3

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/README.md CHANGED
@@ -150,7 +150,8 @@ See the [Client Guide](../../docs/client-guide.md) for detailed usage and exampl
150
150
  - **`sc.validateActivity(activity)`** - Validate against registered schemas
151
151
  - **`sc.socket.emit(event, data, callback)`** - Send messages (queued until ready)
152
152
  - **`sc.socket.on(event, handler)`** - Listen for messages
153
- - **`sc.clearCredentials()`** - Clear stored credentials
153
+ - **`sc.clearCredentials()`** - Clear stored and queued credentials. Pass
154
+ `{ platform, actorId }` to clear one account and its connection/join replay.
154
155
 
155
156
  Send a full `actor` object on each `credentials` and `message` event.
156
157
 
@@ -175,6 +176,10 @@ sc.socket.emit("message", {
175
176
  });
176
177
  ```
177
178
 
179
+ Before a job is queued, a failure result contains `error` and omits the
180
+ activity you submitted. The shape is described in the
181
+ [client guide](../../docs/client-guide.md#message-limits).
182
+
178
183
  Also listen for ongoing platform events:
179
184
 
180
185
  ```javascript
@@ -18,6 +18,11 @@ export declare function hasActorId(obj: ActivityStream): obj is ActivityStream;
18
18
  * and `target` the new one.
19
19
  */
20
20
  export declare function isActorRename(activity: ActivityStream): boolean;
21
+ /** Match normalized or queued account credentials without requiring initialization. */
22
+ export declare function matchesAccount(content: unknown, scope: {
23
+ platform: string;
24
+ actorId: string;
25
+ }): boolean;
21
26
  /**
22
27
  * In-memory storage for client state that should be replayed on reconnection.
23
28
  *
@@ -26,6 +31,10 @@ export declare function isActorRename(activity: ActivityStream): boolean;
26
31
  */
27
32
  export declare class ReplayStore {
28
33
  readonly events: EventMapping;
34
+ clearCredentials(scope?: {
35
+ platform: string;
36
+ actorId: string;
37
+ }): void;
29
38
  recordCredentials(content: ActivityStream): void;
30
39
  /**
31
40
  * Stores connect/join commands and drops them again on