@meltingspot/core 1.5.1 → 1.6.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/CHANGELOG.md +12 -0
- package/index.d.ts +3 -1
- package/index.mjs +1524 -1483
- package/index.umd.js +6 -6
- package/package.json +1 -1
- package/playbookEditor/index.d.ts +6 -1
- package/services/api/spotMember/spotMember.api.output.d.ts +12 -0
- package/services/api/spotMember/spotMember.api.service.d.ts +12 -1
- package/services/api/spotMemberAuth/spotMemberAuth.api.output.d.ts +4 -0
- package/services/api/spotMemberAuth/spotMemberAuth.api.service.d.ts +10 -0
- package/types/conversation/conversationMessage.d.ts +8 -0
- package/types/conversation/conversationSseEvent.d.ts +1 -0
- package/types/conversation/getConversationMessagesResponse.d.ts +7 -0
- package/types/conversation/index.d.ts +2 -0
- package/types/conversation/meltyMessageFeedbackReason.d.ts +9 -0
- package/types/conversation/meltyMessageFeedbackSignal.d.ts +4 -0
- package/utils/index.d.ts +1 -1
- package/utils/playbookEditor/bridge.d.ts +4 -0
package/package.json
CHANGED
|
@@ -5,5 +5,10 @@
|
|
|
5
5
|
* Publishing it from the SDK's main entry would let any host app force-pause
|
|
6
6
|
* Coach SDK instances on the page; gating it behind this sub-path keeps the
|
|
7
7
|
* writer extension-only while leaving the read API on the public surface.
|
|
8
|
+
*
|
|
9
|
+
* `setEditorPauseExempt` belongs to the same takeover mechanism (Story 3.3 —
|
|
10
|
+
* preview): the extension marks its own injected coach exempt from the editor
|
|
11
|
+
* pause so it survives the takeover. Same extension-only régime — writer here,
|
|
12
|
+
* reader on the public surface.
|
|
8
13
|
*/
|
|
9
|
-
export { setPlaybookEditorActive } from '../utils/playbookEditor/bridge';
|
|
14
|
+
export { setEditorPauseExempt, setPlaybookEditorActive, } from '../utils/playbookEditor/bridge';
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import { Nullable } from '../../../types/nullable';
|
|
2
|
+
export interface SpotMemberForAdminOutput {
|
|
3
|
+
id: string;
|
|
4
|
+
firstname: string;
|
|
5
|
+
lastname: string;
|
|
6
|
+
email: string;
|
|
7
|
+
role: string;
|
|
8
|
+
avatarUrl: Nullable<string>;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchSpotMembersOutput {
|
|
11
|
+
items: SpotMemberForAdminOutput[];
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
2
14
|
export interface SpotMemberOutput {
|
|
3
15
|
id: string;
|
|
4
16
|
spotId: string;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Result } from 'neverthrow';
|
|
2
|
-
import { SpotMemberOutput } from './spotMember.api.output';
|
|
2
|
+
import { SearchSpotMembersOutput, SpotMemberOutput } from './spotMember.api.output';
|
|
3
|
+
export interface SearchSpotMembersInput {
|
|
4
|
+
page: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
search?: string;
|
|
7
|
+
}
|
|
3
8
|
export declare class SpotMemberApiService {
|
|
4
9
|
private readonly meltingSpotApi;
|
|
5
10
|
private static instance;
|
|
@@ -9,6 +14,12 @@ export declare class SpotMemberApiService {
|
|
|
9
14
|
* Get the current user's SpotMember.
|
|
10
15
|
*/
|
|
11
16
|
getSpotMemberForMe(): Promise<Result<SpotMemberOutput, Error>>;
|
|
17
|
+
/**
|
|
18
|
+
* Search the members of the spot from an admin session (owner or admin only,
|
|
19
|
+
* enforced server-side). Returns the reduced member shape a picker needs. The
|
|
20
|
+
* caller is never part of the results.
|
|
21
|
+
*/
|
|
22
|
+
searchSpotMembers(input: SearchSpotMembersInput): Promise<Result<SearchSpotMembersOutput, Error>>;
|
|
12
23
|
/**
|
|
13
24
|
* Join and validate the current user on the spot from an SSO token.
|
|
14
25
|
* Authenticated call — the server re-validates the token and sources the
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { Result } from 'neverthrow';
|
|
2
|
+
import { PreviewAccessKeyApiOutput } from './spotMemberAuth.api.output';
|
|
3
|
+
export interface GeneratePreviewAccessKeyInput {
|
|
4
|
+
targetSpotMemberId: string;
|
|
5
|
+
}
|
|
2
6
|
export declare class SpotMemberAuthApiService {
|
|
3
7
|
private readonly meltingSpotApi;
|
|
4
8
|
private static instance;
|
|
@@ -8,4 +12,10 @@ export declare class SpotMemberAuthApiService {
|
|
|
8
12
|
* Generate a new SSO token for the current user.
|
|
9
13
|
*/
|
|
10
14
|
generateSsoToken(): Promise<Result<string, Error>>;
|
|
15
|
+
/**
|
|
16
|
+
* Mint a short-lived access-key that impersonates another member of the spot.
|
|
17
|
+
* Admin/owner only (enforced server-side). The key is not refreshable: the
|
|
18
|
+
* caller re-mints before `expiresAt`.
|
|
19
|
+
*/
|
|
20
|
+
generatePreviewAccessKey(input: GeneratePreviewAccessKeyInput): Promise<Result<PreviewAccessKeyApiOutput, Error>>;
|
|
11
21
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Nullable } from '../nullable';
|
|
1
2
|
import { MeltyHandoffReason } from './meltyHandoffReason';
|
|
3
|
+
import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
|
|
4
|
+
import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
|
|
2
5
|
import { RenderableWidgetAction } from './renderableWidgetAction';
|
|
3
6
|
export interface ConversationMessage {
|
|
4
7
|
id: string;
|
|
@@ -8,6 +11,11 @@ export interface ConversationMessage {
|
|
|
8
11
|
handoff?: {
|
|
9
12
|
reason: MeltyHandoffReason;
|
|
10
13
|
};
|
|
14
|
+
feedback?: {
|
|
15
|
+
signal: MeltyMessageFeedbackSignal;
|
|
16
|
+
reason?: Nullable<MeltyMessageFeedbackReason>;
|
|
17
|
+
};
|
|
18
|
+
feedbackEligible?: boolean;
|
|
11
19
|
createdAt: string;
|
|
12
20
|
}
|
|
13
21
|
export declare enum ConversationMessageRole {
|
|
@@ -2,6 +2,8 @@ import { Nullable } from '../nullable';
|
|
|
2
2
|
import { ConversationStatus } from './conversation';
|
|
3
3
|
import { ConversationMessageRole } from './conversationMessage';
|
|
4
4
|
import { MeltyHandoffReason } from './meltyHandoffReason';
|
|
5
|
+
import { MeltyMessageFeedbackReason } from './meltyMessageFeedbackReason';
|
|
6
|
+
import { MeltyMessageFeedbackSignal } from './meltyMessageFeedbackSignal';
|
|
5
7
|
import { MeltyWidgetAction } from './meltyWidgetAction';
|
|
6
8
|
/**
|
|
7
9
|
* Raw payload of GET /melty/conversations/:id/messages. It differs from the SDK
|
|
@@ -19,6 +21,11 @@ export interface GetConversationMessageResponse {
|
|
|
19
21
|
reason: MeltyHandoffReason;
|
|
20
22
|
};
|
|
21
23
|
}>;
|
|
24
|
+
feedback?: {
|
|
25
|
+
signal: MeltyMessageFeedbackSignal;
|
|
26
|
+
reason?: Nullable<MeltyMessageFeedbackReason>;
|
|
27
|
+
};
|
|
28
|
+
feedbackEligible?: boolean;
|
|
22
29
|
createdAt: string;
|
|
23
30
|
}
|
|
24
31
|
export interface GetConversationMessagesResponse {
|
|
@@ -6,6 +6,8 @@ export * from './createConversationResponse';
|
|
|
6
6
|
export * from './getConversationMessagesResponse';
|
|
7
7
|
export * from './listConversationsResponse';
|
|
8
8
|
export * from './meltyHandoffReason';
|
|
9
|
+
export * from './meltyMessageFeedbackReason';
|
|
10
|
+
export * from './meltyMessageFeedbackSignal';
|
|
9
11
|
export * from './meltyWidgetAction';
|
|
10
12
|
export * from './renderableWidgetAction';
|
|
11
13
|
export * from './proactiveCheckResponse';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum MeltyMessageFeedbackReason {
|
|
2
|
+
PoorExplanation = "poor_explanation",
|
|
3
|
+
FalseInformation = "false_information",
|
|
4
|
+
NotFollowingRequest = "not_following_request",
|
|
5
|
+
IncompleteResponse = "incomplete_response",
|
|
6
|
+
ChatHistoryIssue = "chat_history_issue",
|
|
7
|
+
PersonalizationIssue = "personalization_issue",
|
|
8
|
+
Other = "other"
|
|
9
|
+
}
|
package/utils/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export * from './date/date';
|
|
|
9
9
|
export * from './date/formatDate';
|
|
10
10
|
export * from './date/types';
|
|
11
11
|
export * from './playbook/testUrlMatching';
|
|
12
|
-
export { PLAYBOOK_EDITOR_ACTIVE_EVENT, isPlaybookEditorActive, } from './playbookEditor/bridge';
|
|
12
|
+
export { PLAYBOOK_EDITOR_ACTIVE_EVENT, isEditorPauseExempt, isPlaybookEditorActive, } from './playbookEditor/bridge';
|
|
13
13
|
export type { PlaybookEditorActiveEventDetail } from './playbookEditor/bridge';
|
|
14
14
|
export { PlaybookEditorAwareLifecycle } from './playbookEditor/lifecycle';
|
|
15
15
|
export type { PlaybookEditorAwareCallbacks } from './playbookEditor/lifecycle';
|
|
@@ -20,3 +20,7 @@ export declare const isPlaybookEditorActive: () => boolean;
|
|
|
20
20
|
* churn on repeated set calls.
|
|
21
21
|
*/
|
|
22
22
|
export declare const setPlaybookEditorActive: (active: boolean) => void;
|
|
23
|
+
/** Read whether this realm's Coach is exempt from the editor pause. */
|
|
24
|
+
export declare const isEditorPauseExempt: () => boolean;
|
|
25
|
+
/** Set this realm's editor-pause exemption (extension-only, via the sub-path). */
|
|
26
|
+
export declare const setEditorPauseExempt: (exempt: boolean) => void;
|