@meltingspot/core 1.1.0 → 1.3.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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "MeltingSpot Core SDK",
4
4
  "homepage": "https://meltingspot.io",
5
5
  "license": "BSD-3-Clause",
6
- "version": "1.1.0",
6
+ "version": "1.3.0",
7
7
  "main": "./index.umd.js",
8
8
  "module": "./index.mjs",
9
9
  "typings": "./index.d.ts",
@@ -36,6 +36,7 @@ export interface AccessiblePlaybookIntentOutput {
36
36
  widgetId: string;
37
37
  location: PlaybookHotspotLocation;
38
38
  cssSelector: Nullable<string>;
39
+ highlighted: boolean;
39
40
  mode: PlaybookIntentWidgetMode;
40
41
  widgetMetadata: WidgetContentMetadata[];
41
42
  }
@@ -1,3 +1,21 @@
1
+ import { Result } from 'neverthrow';
2
+ /**
3
+ * Request passed to an injected stream transport (SSE endpoints).
4
+ * `endpoint` is the raw API path — the transport resolves the base URL and
5
+ * authentication itself (e.g. a browser-extension service worker).
6
+ */
7
+ export interface StreamTransportRequest {
8
+ endpoint: string;
9
+ body?: unknown;
10
+ signal?: AbortSignal;
11
+ }
12
+ /**
13
+ * Optional override for the SSE streaming transport. When set, `MeltingSpotApi.stream`
14
+ * delegates to it instead of a direct `fetch`, so an integrator can route the
15
+ * stream through its own channel (e.g. a service-worker Port) while the calling
16
+ * code keeps consuming a `ReadableStream` unchanged.
17
+ */
18
+ export type StreamTransport = (request: StreamTransportRequest) => Promise<Result<ReadableStream<Uint8Array>, Error>>;
1
19
  /**
2
20
  * Low-level SDK configuration. API URLs (msApiBaseUrl, msCommunityWebBaseUrl) are
3
21
  * infrastructure settings that must be set via Configuration.setConfiguration() before
@@ -11,6 +29,8 @@ export interface MeltingSpotConfiguration {
11
29
  domain?: string;
12
30
  autoJoin?: boolean;
13
31
  rootDocument: Document;
32
+ iframelyApiKey?: string;
33
+ streamTransport?: StreamTransport;
14
34
  }
15
35
  export declare class ConfigurationService {
16
36
  private configuration;
@@ -34,6 +34,9 @@ export interface SimplifiedElementNode {
34
34
  value?: string;
35
35
  firstName?: string;
36
36
  lastName?: string;
37
+ options?: {
38
+ url?: string;
39
+ };
37
40
  }
38
41
  export type SimplifiedRichTextNode = SimplifiedElementNode | SimplifiedRichText;
39
42
  export type SimplifiedRichTextData = SimplifiedElementNode[];