@guidelytech/guide-runtime 0.8.0 → 0.10.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/dist/capture.cjs +160 -34
- package/dist/capture.cjs.map +1 -1
- package/dist/capture.js +9 -14
- package/dist/capture.js.map +1 -1
- package/dist/chunk-GUH2PQJ7.js +462 -0
- package/dist/chunk-GUH2PQJ7.js.map +1 -0
- package/dist/chunk-KJRXCITD.js +515 -0
- package/dist/chunk-KJRXCITD.js.map +1 -0
- package/dist/chunk-PG7CMBHD.js +330 -0
- package/dist/chunk-PG7CMBHD.js.map +1 -0
- package/dist/chunk-VNJPNGZ4.js +301 -0
- package/dist/chunk-VNJPNGZ4.js.map +1 -0
- package/dist/index.cjs +356 -64
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -8
- package/dist/index.d.ts +62 -8
- package/dist/index.js +107 -23
- package/dist/index.js.map +1 -1
- package/dist/messenger.cjs +586 -35
- package/dist/messenger.cjs.map +1 -1
- package/dist/messenger.d.cts +21 -1
- package/dist/messenger.d.ts +21 -1
- package/dist/messenger.js +527 -23
- package/dist/messenger.js.map +1 -1
- package/package.json +5 -5
package/dist/messenger.d.cts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import { MessengerConversation, ConversationMessagesResponse, MessengerMessage, SdkArticlesResponse, ResourceCenterArticle, SdkHowTosResponse, SdkHowTo, MessengerPageContent, MessengerConfig, ResourceCenterConfig } from '@guidelytech/shared';
|
|
1
|
+
import { MessengerConversation, ConversationMessagesResponse, MessengerMessage, SdkArticlesResponse, ResourceCenterArticle, SdkHowTosResponse, SdkHowTo, MessengerPageContent, FileComplaintResponse, MessengerConfig, ResourceCenterConfig } from '@guidelytech/shared';
|
|
2
2
|
import { H as HelpGuideRef } from './help-view-B4oPbhpO.cjs';
|
|
3
3
|
|
|
4
|
+
/** What the messenger sends to file a complaint (the transport adds the visitor and page). */
|
|
5
|
+
interface ComplaintInput {
|
|
6
|
+
categoryId: string;
|
|
7
|
+
description: string;
|
|
8
|
+
answers: Record<string, string>;
|
|
9
|
+
email?: string | null;
|
|
10
|
+
/** File it in this conversation (Scout offered the form there). */
|
|
11
|
+
conversationId?: string | null;
|
|
12
|
+
attachment?: {
|
|
13
|
+
fileName: string;
|
|
14
|
+
data: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
/** Callbacks the transport invokes while a message is sent and Scout replies. */
|
|
5
19
|
interface MessengerStreamHandlers {
|
|
6
20
|
/** A new conversation was created (first message only). */
|
|
@@ -26,6 +40,8 @@ interface MessengerApi {
|
|
|
26
40
|
getHowTo?(id: string): Promise<SdkHowTo | null>;
|
|
27
41
|
/** Page-matched how-tos, articles and common questions (servers before the personalised home lack it). */
|
|
28
42
|
pageContent?(path: string): Promise<MessengerPageContent>;
|
|
43
|
+
/** Files a complaint (transports before complaints lack it; the messenger then hides the form). */
|
|
44
|
+
fileComplaint?(input: ComplaintInput): Promise<FileComplaintResponse>;
|
|
29
45
|
}
|
|
30
46
|
type MessengerTab = "home" | "messages" | "help" | "news";
|
|
31
47
|
/** A guide the visitor started and didn't finish. */
|
|
@@ -59,6 +75,8 @@ interface MessengerNewsItem {
|
|
|
59
75
|
/** What the SDK knows about the visitor right now, read each time the messenger renders. */
|
|
60
76
|
interface MessengerVisitor {
|
|
61
77
|
firstName: string | null;
|
|
78
|
+
/** The app identified the visitor (`identify()`); false for anonymous visitors. Unknown counts as identified. */
|
|
79
|
+
identified?: boolean;
|
|
62
80
|
/** Current page path (no query or fragment); null when unknown. */
|
|
63
81
|
path: string | null;
|
|
64
82
|
/** Live guides targeted at this page that the visitor can start. */
|
|
@@ -108,6 +126,8 @@ interface MessengerWidget {
|
|
|
108
126
|
/** Opens a new conversation, optionally pre-filling the composer. */
|
|
109
127
|
showNewMessage(text?: string): void;
|
|
110
128
|
openArticle(id: string): void;
|
|
129
|
+
/** Opens the complaint form, optionally with a category picked (when the project takes complaints). */
|
|
130
|
+
openComplaint(categoryId?: string): void;
|
|
111
131
|
/** Re-reads the visitor (page changed, progress made) and re-renders what is showing. */
|
|
112
132
|
refresh(): void;
|
|
113
133
|
destroy(): void;
|
package/dist/messenger.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import { MessengerConversation, ConversationMessagesResponse, MessengerMessage, SdkArticlesResponse, ResourceCenterArticle, SdkHowTosResponse, SdkHowTo, MessengerPageContent, MessengerConfig, ResourceCenterConfig } from '@guidelytech/shared';
|
|
1
|
+
import { MessengerConversation, ConversationMessagesResponse, MessengerMessage, SdkArticlesResponse, ResourceCenterArticle, SdkHowTosResponse, SdkHowTo, MessengerPageContent, FileComplaintResponse, MessengerConfig, ResourceCenterConfig } from '@guidelytech/shared';
|
|
2
2
|
import { H as HelpGuideRef } from './help-view-B4oPbhpO.js';
|
|
3
3
|
|
|
4
|
+
/** What the messenger sends to file a complaint (the transport adds the visitor and page). */
|
|
5
|
+
interface ComplaintInput {
|
|
6
|
+
categoryId: string;
|
|
7
|
+
description: string;
|
|
8
|
+
answers: Record<string, string>;
|
|
9
|
+
email?: string | null;
|
|
10
|
+
/** File it in this conversation (Scout offered the form there). */
|
|
11
|
+
conversationId?: string | null;
|
|
12
|
+
attachment?: {
|
|
13
|
+
fileName: string;
|
|
14
|
+
data: string;
|
|
15
|
+
} | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
/** Callbacks the transport invokes while a message is sent and Scout replies. */
|
|
5
19
|
interface MessengerStreamHandlers {
|
|
6
20
|
/** A new conversation was created (first message only). */
|
|
@@ -26,6 +40,8 @@ interface MessengerApi {
|
|
|
26
40
|
getHowTo?(id: string): Promise<SdkHowTo | null>;
|
|
27
41
|
/** Page-matched how-tos, articles and common questions (servers before the personalised home lack it). */
|
|
28
42
|
pageContent?(path: string): Promise<MessengerPageContent>;
|
|
43
|
+
/** Files a complaint (transports before complaints lack it; the messenger then hides the form). */
|
|
44
|
+
fileComplaint?(input: ComplaintInput): Promise<FileComplaintResponse>;
|
|
29
45
|
}
|
|
30
46
|
type MessengerTab = "home" | "messages" | "help" | "news";
|
|
31
47
|
/** A guide the visitor started and didn't finish. */
|
|
@@ -59,6 +75,8 @@ interface MessengerNewsItem {
|
|
|
59
75
|
/** What the SDK knows about the visitor right now, read each time the messenger renders. */
|
|
60
76
|
interface MessengerVisitor {
|
|
61
77
|
firstName: string | null;
|
|
78
|
+
/** The app identified the visitor (`identify()`); false for anonymous visitors. Unknown counts as identified. */
|
|
79
|
+
identified?: boolean;
|
|
62
80
|
/** Current page path (no query or fragment); null when unknown. */
|
|
63
81
|
path: string | null;
|
|
64
82
|
/** Live guides targeted at this page that the visitor can start. */
|
|
@@ -108,6 +126,8 @@ interface MessengerWidget {
|
|
|
108
126
|
/** Opens a new conversation, optionally pre-filling the composer. */
|
|
109
127
|
showNewMessage(text?: string): void;
|
|
110
128
|
openArticle(id: string): void;
|
|
129
|
+
/** Opens the complaint form, optionally with a category picked (when the project takes complaints). */
|
|
130
|
+
openComplaint(categoryId?: string): void;
|
|
111
131
|
/** Re-reads the visitor (page changed, progress made) and re-renders what is showing. */
|
|
112
132
|
refresh(): void;
|
|
113
133
|
destroy(): void;
|