@meltingspot/core 1.12.0 → 1.14.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.12.0",
6
+ "version": "1.14.0",
7
7
  "main": "./index.umd.js",
8
8
  "module": "./index.mjs",
9
9
  "typings": "./index.d.ts",
@@ -5,6 +5,7 @@ import { Playbook } from '../../../types/widget/playbook/playbook';
5
5
  import { PlaybookHotspot } from '../../../types/widget/playbook/playbookHotspot';
6
6
  import { PlaybookHotspotLocation } from '../../../types/widget/playbook/playbookHotspotLocation';
7
7
  import { PlaybookIntent } from '../../../types/widget/playbook/playbookIntent';
8
+ import { PlaybookIntentActionSummary } from '../../../types/widget/playbook/playbookIntentActionSummary';
8
9
  import { PlaybookIntentWidgetMode } from '../../../types/widget/playbook/playbookIntentWidgetMode';
9
10
  import { PlaybookPage } from '../../../types/widget/playbook/playbookPage';
10
11
  export interface ListPlaybooksOutput {
@@ -51,6 +52,7 @@ export interface AccessiblePlaybookIntentCandidateOutput {
51
52
  mode: PlaybookIntentWidgetMode;
52
53
  widgetMetadata: WidgetContentMetadata[];
53
54
  displayConfig?: MeltyDisplayConfig;
55
+ action?: PlaybookIntentActionSummary;
54
56
  }
55
57
  export interface AccessiblePlaybookHotspotOutput {
56
58
  hotspotId: string;
@@ -1,5 +1,6 @@
1
1
  import { Result } from 'neverthrow';
2
2
  import { ListSpotsForMeOutput } from './spot.api.output';
3
+ export declare const LIST_SPOTS_LIMIT = 50;
3
4
  export declare class SpotApiService {
4
5
  private readonly meltingSpotApi;
5
6
  private static instance;
@@ -7,5 +8,9 @@ export declare class SpotApiService {
7
8
  private constructor();
8
9
  listSpotsForMe(query?: {
9
10
  spotMemberRole?: string;
11
+ id?: string;
12
+ name?: string;
13
+ page?: number;
14
+ limit?: number;
10
15
  }): Promise<Result<ListSpotsForMeOutput, Error>>;
11
16
  }
@@ -33,5 +33,6 @@ export declare class HttpService {
33
33
  post<TResponse>(input: HttpPostInput): Promise<Result<TResponse, HttpError>>;
34
34
  delete<TResponse>(input: HttpDeleteInput): Promise<Result<TResponse, HttpError>>;
35
35
  patch<TResponse>(input: HttpPatchInput): Promise<Result<TResponse, HttpError>>;
36
+ private static parseBody;
36
37
  private serializeQuery;
37
38
  }
@@ -2,6 +2,7 @@ import { Nullable } from '../nullable';
2
2
  import { MeltyHandoffReason } from './meltyHandoffReason';
3
3
  import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
4
4
  import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
5
+ import { MessageIntentAction } from './messageIntentAction';
5
6
  import { RenderableWidgetAction } from './renderableWidgetAction';
6
7
  export interface ConversationMessage {
7
8
  id: string;
@@ -16,6 +17,7 @@ export interface ConversationMessage {
16
17
  reason?: Nullable<MeltyMessageFeedbackReason>;
17
18
  };
18
19
  feedbackEligible?: boolean;
20
+ intentAction?: MessageIntentAction;
19
21
  createdAt: string;
20
22
  }
21
23
  export declare enum ConversationMessageRole {
@@ -5,6 +5,7 @@ import { MeltyHandoffReason } from './meltyHandoffReason';
5
5
  import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
6
6
  import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
7
7
  import { MeltyWidgetAction } from './meltyWidgetAction';
8
+ import { MessageIntentAction } from './messageIntentAction';
8
9
  /**
9
10
  * Raw payload of GET /melty/conversations/:id/messages. It differs from the SDK
10
11
  * `Conversation`: the id is `conversationId`, and per-message widget actions are
@@ -20,6 +21,7 @@ export interface GetConversationMessageResponse {
20
21
  handoff?: {
21
22
  reason: MeltyHandoffReason;
22
23
  };
24
+ intentAction?: MessageIntentAction;
23
25
  }>;
24
26
  feedback?: {
25
27
  signal: MeltyMessageFeedbackSignal;
@@ -31,6 +33,7 @@ export interface GetConversationMessageResponse {
31
33
  export interface GetConversationMessagesResponse {
32
34
  conversationId: string;
33
35
  status: ConversationStatus;
36
+ intentId?: Nullable<string>;
34
37
  createdAt: string;
35
38
  messages: GetConversationMessageResponse[];
36
39
  }
@@ -9,6 +9,7 @@ export * from './meltyHandoffReason';
9
9
  export * from './meltyMessageFeedbackReason';
10
10
  export * from './meltyMessageFeedbackSignal';
11
11
  export * from './meltyWidgetAction';
12
+ export * from './messageIntentAction';
12
13
  export * from './renderableWidgetAction';
13
14
  export * from './proactiveCheckResponse';
14
15
  export * from './triggerType';
@@ -0,0 +1,10 @@
1
+ import { PlaybookIntentActionType } from '../widget/playbook/playbookIntentActionType';
2
+ export interface MessageIntentAction {
3
+ actionId: string;
4
+ intentId: string;
5
+ type: PlaybookIntentActionType;
6
+ targetHotspotId?: string;
7
+ url?: string;
8
+ openInNewTab?: boolean;
9
+ clickedAt?: string;
10
+ }
@@ -2,6 +2,8 @@ export * from './playbook';
2
2
  export * from './playbookHotspot';
3
3
  export * from './playbookHotspotLocation';
4
4
  export * from './playbookIntent';
5
+ export * from './playbookIntentActionSummary';
6
+ export * from './playbookIntentActionType';
5
7
  export * from './playbookIntentStatus';
6
8
  export * from './playbookIntentWidgetMode';
7
9
  export * from './playbookMatchingRules';
@@ -0,0 +1,6 @@
1
+ import { PlaybookIntentActionType } from './playbookIntentActionType';
2
+ export interface PlaybookIntentActionSummary {
3
+ id: string;
4
+ type: PlaybookIntentActionType;
5
+ targetHotspotId?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum PlaybookIntentActionType {
2
+ CustomText = "CustomText",
3
+ Hotspot = "Hotspot",
4
+ Url = "Url"
5
+ }