@guidelytech/sdk-core 0.15.0 → 0.17.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/README.md +4 -1
- package/dist/{chunk-2E2YUQAG.js → chunk-GFLVZRTS.js} +28 -3
- package/dist/chunk-GFLVZRTS.js.map +1 -0
- package/dist/{types-Bkw8ErmO.d.cts → environment-D63OzdWf.d.cts} +172 -5
- package/dist/{types-Dy_uPu6S.d.ts → environment-DAT4iYvZ.d.ts} +172 -5
- package/dist/headless.cjs +27 -1
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +1 -1
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +3 -1
- package/dist/index.cjs +1155 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -10
- package/dist/index.d.ts +71 -10
- package/dist/index.js +1089 -72
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/capture-CgN69Lxq.d.cts +0 -100
- package/dist/capture-Csz721-A.d.ts +0 -100
- package/dist/chunk-2E2YUQAG.js.map +0 -1
- package/dist/chunk-JUSM7J5N.js +0 -376
- package/dist/chunk-JUSM7J5N.js.map +0 -1
- package/dist/chunk-ZAF2KRJA.js +0 -334
- package/dist/chunk-ZAF2KRJA.js.map +0 -1
- package/dist/health-sbP9JwTE.d.cts +0 -90
- package/dist/health-sbP9JwTE.d.ts +0 -90
- package/dist/http-Cb6KYYFv.d.cts +0 -61
- package/dist/http-D047Ngxk.d.ts +0 -61
- package/dist/types-BDlebXrm.d.ts +0 -314
- package/dist/types-Mtlmlj5C.d.cts +0 -314
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as _guidelytech_guide_runtime from '@guidelytech/guide-runtime';
|
|
2
2
|
import { TargetingContext, PublishedGuide, ProjectTheme, SelectorStrategy, AuthoringPick, AppSnapshot } from '@guidelytech/shared';
|
|
3
|
-
export { AgentEventsResponse, AgentOutcome, AgentToolCallInput, AgentTurnInput, AgentTurnRole, AppSnapshot, AutocaptureSettings, ExceptionProperties, GuideConfig, GuideStep, PublishedGuide, SdkConfigResponse, SdkEvent, StackFrame, TargetingContext } from '@guidelytech/shared';
|
|
3
|
+
export { AgentEventsResponse, AgentOutcome, AgentToolCallInput, AgentTurnInput, AgentTurnRole, AppSnapshot, AutocaptureSettings, BugReportInput, BugReportResponse, ExceptionProperties, GuideConfig, GuideStep, PublishedGuide, SdkConfigResponse, SdkEvent, StackFrame, TargetingContext } from '@guidelytech/shared';
|
|
4
4
|
import { FlagsClient, JsonValue, FlagValue, FlagDetails } from '@guidelytech/flags';
|
|
5
5
|
export { Attributes, EvaluationResult, FlagDetails, FlagsBootstrap, FlagsClient, FlagsClientOptions, FlagsPayload, JsonValue } from '@guidelytech/flags';
|
|
6
6
|
import { MessengerTab } from '@guidelytech/guide-runtime/messenger';
|
|
7
|
-
import { AgentTurnInput } from '@guidelytech/shared/runtime';
|
|
8
|
-
export { CAPTURE_PARAM } from '@guidelytech/shared/runtime';
|
|
9
|
-
import {
|
|
10
|
-
export { A as AgentTurnRedactor, E as EventQueue, b as EventQueueOptions,
|
|
7
|
+
import { AgentTurnInput, ErrorLevelName, Breadcrumb, BugReportInput, BugReportResponse } from '@guidelytech/shared/runtime';
|
|
8
|
+
export { Breadcrumb, CAPTURE_PARAM, ErrorFilterPattern, ErrorLevelName, ExceptionDetail } from '@guidelytech/shared/runtime';
|
|
9
|
+
import { n as GuidelyOptions, d as GuidelyEnvironment, c as GuidelyAccount, a as ConsentState, o as CaptureContext, C as ChecklistProgressState, q as GuidelyEvents, e as GuidelyUser, G as GuideLocalState, S as SessionState } from './environment-D63OzdWf.cjs';
|
|
10
|
+
export { A as AgentTurnRedactor, B as BreadcrumbHint, r as ErrorEvent, s as ErrorMonitoringOptions, E as EventQueue, b as EventQueueOptions, t as GuideStepInfo, u as GuidelyEventName, P as PersistedState, T as TraceSpan, v as TracingOptions, w as TransactionEvent, f as areMutuallyExclusive, g as countsTowardThrottle, i as environmentFromKey, j as isExclusiveGuide, k as isFrequencyEligible, l as isThrottleEligible, m as isWithinSchedule, p as pruneLaunches } from './environment-D63OzdWf.cjs';
|
|
11
11
|
export { a as KEYS, K as KeyValueStore, c as StorageKind, d as createStorage } from './health-DjZ2gwYa.cjs';
|
|
12
12
|
export { C as CaptureMarker, a as CaptureOutgoingMessage } from './capture-4EgpjK6Z.cjs';
|
|
13
13
|
import './http-zOI8d2c2.cjs';
|
|
14
14
|
|
|
15
15
|
declare const SDK_NAME = "@guidelytech/sdk-core";
|
|
16
|
-
declare const SDK_VERSION = "0.
|
|
16
|
+
declare const SDK_VERSION = "0.17.0";
|
|
17
17
|
declare const DEFAULT_API_URL = "https://api.guidely.app";
|
|
18
18
|
/**
|
|
19
19
|
* Framework-independent Guidely client. Create one per page with {@link createGuidely} or
|
|
@@ -31,6 +31,8 @@ declare class GuidelyClient {
|
|
|
31
31
|
/** Agent Analytics turns (agentConversation), in their own outbox. */
|
|
32
32
|
private readonly agentTurns;
|
|
33
33
|
private config;
|
|
34
|
+
/** The `environment` option as passed (the resolved one is in `options.environment`). */
|
|
35
|
+
private readonly envOption;
|
|
34
36
|
private etag;
|
|
35
37
|
private anonymousId;
|
|
36
38
|
private user;
|
|
@@ -71,6 +73,11 @@ declare class GuidelyClient {
|
|
|
71
73
|
private readonly exceptionThrottle;
|
|
72
74
|
/** Exceptions seen before the config was loaded (reported once it is known whether the server accepts them). */
|
|
73
75
|
private earlyExceptions;
|
|
76
|
+
/** The last exception this page reported, which bug reports link to by default. */
|
|
77
|
+
private lastExceptionId;
|
|
78
|
+
private bugReportDialog;
|
|
79
|
+
/** Tags, extra, contexts and breadcrumbs sent with every error (`setTag`, `addBreadcrumb`…). */
|
|
80
|
+
private readonly errorScope;
|
|
74
81
|
private initialPageViewSent;
|
|
75
82
|
private pageViewUrl;
|
|
76
83
|
private pageLeft;
|
|
@@ -82,6 +89,8 @@ declare class GuidelyClient {
|
|
|
82
89
|
private locale;
|
|
83
90
|
/** Language each shown guide was rendered in; added to its events as `locale`. */
|
|
84
91
|
private guideLocales;
|
|
92
|
+
/** Performance tracing (`tracing` option + the project's `performance` setting); see tracing.ts. */
|
|
93
|
+
private readonly tracer;
|
|
85
94
|
constructor(options: GuidelyOptions);
|
|
86
95
|
private createFlags;
|
|
87
96
|
/** Loads config (cache first, then network), wires listeners and evaluates triggers. Idempotent. */
|
|
@@ -89,10 +98,15 @@ declare class GuidelyClient {
|
|
|
89
98
|
/** Resolves once the client is ready (alias of `init()`). */
|
|
90
99
|
ready(): Promise<void>;
|
|
91
100
|
private bootstrap;
|
|
101
|
+
/** Environment guides and flags target: the `environment` option, else the one the loaded config names, else a guess from the key. */
|
|
102
|
+
get environment(): GuidelyEnvironment;
|
|
103
|
+
private useConfig;
|
|
92
104
|
private fetchConfig;
|
|
93
105
|
private wireListeners;
|
|
94
106
|
/** Uncaught errors + unhandled rejections; attached before the config loads so boot errors are kept. */
|
|
95
107
|
private wireErrorListeners;
|
|
108
|
+
/** An automatic breadcrumb, unless the `errors.breadcrumbs` option turns its kind off. */
|
|
109
|
+
private autoBreadcrumb;
|
|
96
110
|
/** Re-fetches the published config and re-evaluates triggers. */
|
|
97
111
|
refresh(): Promise<void>;
|
|
98
112
|
/** Re-renders after a config change (refresh, or a config that arrived after start). */
|
|
@@ -112,6 +126,8 @@ declare class GuidelyClient {
|
|
|
112
126
|
/** Updates consent at runtime (`granted` flushes buffered events; `denied` drops them). */
|
|
113
127
|
setConsent(consent: ConsentState): void;
|
|
114
128
|
private analyticsEnabled;
|
|
129
|
+
/** The host app's version (`appVersion` option), sent with every event and recording. */
|
|
130
|
+
private appVersion;
|
|
115
131
|
private collectUrls;
|
|
116
132
|
private enqueue;
|
|
117
133
|
/** Tracks a custom event. Events drive `event` triggers, `advanceOn: "event"` steps and checklist tasks. */
|
|
@@ -154,10 +170,37 @@ declare class GuidelyClient {
|
|
|
154
170
|
private captureGlobalException;
|
|
155
171
|
/**
|
|
156
172
|
* Reports a caught error as an `exception` event (`source: "manual"`, `handled: true`), grouped
|
|
157
|
-
* into an issue on the Errors page.
|
|
158
|
-
*
|
|
173
|
+
* into an issue on the Errors page. The second argument takes Sentry's capture context (`tags`,
|
|
174
|
+
* `extra`, `level`, `fingerprint`, `contexts`, `user`); any other key is attached to the occurrence
|
|
175
|
+
* as a property. Needs the project's error tracking on (plus analytics + consent);
|
|
176
|
+
* `captureErrors: false` does not stop it. Returns the event id (empty when nothing is sent).
|
|
159
177
|
*/
|
|
160
|
-
captureException(error: unknown,
|
|
178
|
+
captureException(error: unknown, hint?: CaptureContext & Record<string, unknown>): string;
|
|
179
|
+
/** Reports a message (default level `info`) as its own issue, grouped by the message. */
|
|
180
|
+
captureMessage(message: string, level?: ErrorLevelName, hint?: CaptureContext): string;
|
|
181
|
+
private captureWith;
|
|
182
|
+
/** The `detail` of an error: scope, breadcrumbs, browser contexts and the `cause` chain. */
|
|
183
|
+
private errorDetail;
|
|
184
|
+
/** Adds a breadcrumb (sent with the next errors; the last 100 are kept). */
|
|
185
|
+
addBreadcrumb(crumb: Breadcrumb): void;
|
|
186
|
+
/** Tags every later error (searchable on the issue page). */
|
|
187
|
+
setTag(key: string, value: string | number | boolean | null | undefined): void;
|
|
188
|
+
setTags(tags: Record<string, string | number | boolean | null | undefined>): void;
|
|
189
|
+
/** Arbitrary data attached to every later error. */
|
|
190
|
+
setExtra(key: string, value: unknown): void;
|
|
191
|
+
setExtras(extras: Record<string, unknown>): void;
|
|
192
|
+
/** A named context (`setContext("cart", { items: 3 })`) on every later error; null removes it. */
|
|
193
|
+
setContext(name: string, context: Record<string, unknown> | null): void;
|
|
194
|
+
/**
|
|
195
|
+
* Sentry's `setUser`: identifies the user by `id` (like `identify`) and keeps `email` / `username`
|
|
196
|
+
* on their errors. `null` forgets the user (`reset()`).
|
|
197
|
+
*/
|
|
198
|
+
setUser(user: {
|
|
199
|
+
id?: string | number;
|
|
200
|
+
email?: string;
|
|
201
|
+
username?: string;
|
|
202
|
+
[trait: string]: unknown;
|
|
203
|
+
} | null): void;
|
|
161
204
|
private sendException;
|
|
162
205
|
private maskSelector;
|
|
163
206
|
private maskAllText;
|
|
@@ -252,6 +295,11 @@ declare class GuidelyClient {
|
|
|
252
295
|
getGuides(): ReadonlyArray<PublishedGuide>;
|
|
253
296
|
isGuideCompleted(idOrKey: string): boolean;
|
|
254
297
|
openResourceCenter(): void;
|
|
298
|
+
/**
|
|
299
|
+
* Opens one help article: in Scout's Help tab when the messenger is on, otherwise in the resource
|
|
300
|
+
* center. Help-article links in guides (`#guidely-article:<id>`) call this.
|
|
301
|
+
*/
|
|
302
|
+
openArticle(articleId: string): void;
|
|
255
303
|
closeResourceCenter(): void;
|
|
256
304
|
/** Opens the Scout messenger (when enabled for the project), optionally on a tab. */
|
|
257
305
|
openMessenger(tab?: MessengerTab): void;
|
|
@@ -272,6 +320,19 @@ declare class GuidelyClient {
|
|
|
272
320
|
* Does nothing when the project hasn't turned on Ideas.
|
|
273
321
|
*/
|
|
274
322
|
openIdeas(requestId?: string): void;
|
|
323
|
+
/**
|
|
324
|
+
* Sends a bug report to Monitor → User feedback (Sentry's `captureFeedback`). It is linked to the visitor,
|
|
325
|
+
* this session's recording and, unless `associatedEventId` says otherwise, the last error this page
|
|
326
|
+
* reported. Resolves with the report's id; rejects when it can't be sent.
|
|
327
|
+
*/
|
|
328
|
+
captureFeedback(input: BugReportInput, source?: "widget" | "api"): Promise<BugReportResponse>;
|
|
329
|
+
/** Opens the "Report a bug" dialog (message, name, email, a screenshot), which sends with captureFeedback. */
|
|
330
|
+
showBugReport(options?: {
|
|
331
|
+
message?: string;
|
|
332
|
+
name?: string;
|
|
333
|
+
email?: string;
|
|
334
|
+
title?: string;
|
|
335
|
+
}): void;
|
|
275
336
|
/** Opens a new messenger conversation, optionally pre-filling the message. */
|
|
276
337
|
showNewMessage(text?: string): void;
|
|
277
338
|
/** Boolean flag value for the current user; `fallback` (default `false`) until loaded or when missing. */
|
|
@@ -507,4 +568,4 @@ declare const Guidely: {
|
|
|
507
568
|
version: string;
|
|
508
569
|
};
|
|
509
570
|
|
|
510
|
-
export { AUTHORING_PARAM, type AuthoringIncomingMessage, type AuthoringOutgoingMessage, ChecklistProgressState, type ClickProperties, ConsentState, type ContextInput, DEFAULT_API_URL, type DeviceInfo, GuideLocalState, Guidely, GuidelyAccount, GuidelyClient, GuidelyEvents, GuidelyOptions, GuidelyUser, HEARTBEAT_MS, PROTOTYPE_CLOSE_MESSAGE, type PageLeaveInfo, SDK_NAME, SDK_VERSION, SessionState, buildContext, captureSnapshot, createGuidely, Guidely as default, detectDevice, isAppUrl, matchPrototypeTestUrl, normalizeAppUrl, watchNavigation };
|
|
571
|
+
export { AUTHORING_PARAM, type AuthoringIncomingMessage, type AuthoringOutgoingMessage, CaptureContext, ChecklistProgressState, type ClickProperties, ConsentState, type ContextInput, DEFAULT_API_URL, type DeviceInfo, GuideLocalState, Guidely, GuidelyAccount, GuidelyClient, GuidelyEnvironment, GuidelyEvents, GuidelyOptions, GuidelyUser, HEARTBEAT_MS, PROTOTYPE_CLOSE_MESSAGE, type PageLeaveInfo, SDK_NAME, SDK_VERSION, SessionState, buildContext, captureSnapshot, createGuidely, Guidely as default, detectDevice, isAppUrl, matchPrototypeTestUrl, normalizeAppUrl, watchNavigation };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import * as _guidelytech_guide_runtime from '@guidelytech/guide-runtime';
|
|
2
2
|
import { TargetingContext, PublishedGuide, ProjectTheme, SelectorStrategy, AuthoringPick, AppSnapshot } from '@guidelytech/shared';
|
|
3
|
-
export { AgentEventsResponse, AgentOutcome, AgentToolCallInput, AgentTurnInput, AgentTurnRole, AppSnapshot, AutocaptureSettings, ExceptionProperties, GuideConfig, GuideStep, PublishedGuide, SdkConfigResponse, SdkEvent, StackFrame, TargetingContext } from '@guidelytech/shared';
|
|
3
|
+
export { AgentEventsResponse, AgentOutcome, AgentToolCallInput, AgentTurnInput, AgentTurnRole, AppSnapshot, AutocaptureSettings, BugReportInput, BugReportResponse, ExceptionProperties, GuideConfig, GuideStep, PublishedGuide, SdkConfigResponse, SdkEvent, StackFrame, TargetingContext } from '@guidelytech/shared';
|
|
4
4
|
import { FlagsClient, JsonValue, FlagValue, FlagDetails } from '@guidelytech/flags';
|
|
5
5
|
export { Attributes, EvaluationResult, FlagDetails, FlagsBootstrap, FlagsClient, FlagsClientOptions, FlagsPayload, JsonValue } from '@guidelytech/flags';
|
|
6
6
|
import { MessengerTab } from '@guidelytech/guide-runtime/messenger';
|
|
7
|
-
import { AgentTurnInput } from '@guidelytech/shared/runtime';
|
|
8
|
-
export { CAPTURE_PARAM } from '@guidelytech/shared/runtime';
|
|
9
|
-
import {
|
|
10
|
-
export { A as AgentTurnRedactor, E as EventQueue, b as EventQueueOptions,
|
|
7
|
+
import { AgentTurnInput, ErrorLevelName, Breadcrumb, BugReportInput, BugReportResponse } from '@guidelytech/shared/runtime';
|
|
8
|
+
export { Breadcrumb, CAPTURE_PARAM, ErrorFilterPattern, ErrorLevelName, ExceptionDetail } from '@guidelytech/shared/runtime';
|
|
9
|
+
import { n as GuidelyOptions, d as GuidelyEnvironment, c as GuidelyAccount, a as ConsentState, o as CaptureContext, C as ChecklistProgressState, q as GuidelyEvents, e as GuidelyUser, G as GuideLocalState, S as SessionState } from './environment-DAT4iYvZ.js';
|
|
10
|
+
export { A as AgentTurnRedactor, B as BreadcrumbHint, r as ErrorEvent, s as ErrorMonitoringOptions, E as EventQueue, b as EventQueueOptions, t as GuideStepInfo, u as GuidelyEventName, P as PersistedState, T as TraceSpan, v as TracingOptions, w as TransactionEvent, f as areMutuallyExclusive, g as countsTowardThrottle, i as environmentFromKey, j as isExclusiveGuide, k as isFrequencyEligible, l as isThrottleEligible, m as isWithinSchedule, p as pruneLaunches } from './environment-DAT4iYvZ.js';
|
|
11
11
|
export { a as KEYS, K as KeyValueStore, c as StorageKind, d as createStorage } from './health-DjZ2gwYa.js';
|
|
12
12
|
export { C as CaptureMarker, a as CaptureOutgoingMessage } from './capture-C-4R56G0.js';
|
|
13
13
|
import './http-BXys2d-j.js';
|
|
14
14
|
|
|
15
15
|
declare const SDK_NAME = "@guidelytech/sdk-core";
|
|
16
|
-
declare const SDK_VERSION = "0.
|
|
16
|
+
declare const SDK_VERSION = "0.17.0";
|
|
17
17
|
declare const DEFAULT_API_URL = "https://api.guidely.app";
|
|
18
18
|
/**
|
|
19
19
|
* Framework-independent Guidely client. Create one per page with {@link createGuidely} or
|
|
@@ -31,6 +31,8 @@ declare class GuidelyClient {
|
|
|
31
31
|
/** Agent Analytics turns (agentConversation), in their own outbox. */
|
|
32
32
|
private readonly agentTurns;
|
|
33
33
|
private config;
|
|
34
|
+
/** The `environment` option as passed (the resolved one is in `options.environment`). */
|
|
35
|
+
private readonly envOption;
|
|
34
36
|
private etag;
|
|
35
37
|
private anonymousId;
|
|
36
38
|
private user;
|
|
@@ -71,6 +73,11 @@ declare class GuidelyClient {
|
|
|
71
73
|
private readonly exceptionThrottle;
|
|
72
74
|
/** Exceptions seen before the config was loaded (reported once it is known whether the server accepts them). */
|
|
73
75
|
private earlyExceptions;
|
|
76
|
+
/** The last exception this page reported, which bug reports link to by default. */
|
|
77
|
+
private lastExceptionId;
|
|
78
|
+
private bugReportDialog;
|
|
79
|
+
/** Tags, extra, contexts and breadcrumbs sent with every error (`setTag`, `addBreadcrumb`…). */
|
|
80
|
+
private readonly errorScope;
|
|
74
81
|
private initialPageViewSent;
|
|
75
82
|
private pageViewUrl;
|
|
76
83
|
private pageLeft;
|
|
@@ -82,6 +89,8 @@ declare class GuidelyClient {
|
|
|
82
89
|
private locale;
|
|
83
90
|
/** Language each shown guide was rendered in; added to its events as `locale`. */
|
|
84
91
|
private guideLocales;
|
|
92
|
+
/** Performance tracing (`tracing` option + the project's `performance` setting); see tracing.ts. */
|
|
93
|
+
private readonly tracer;
|
|
85
94
|
constructor(options: GuidelyOptions);
|
|
86
95
|
private createFlags;
|
|
87
96
|
/** Loads config (cache first, then network), wires listeners and evaluates triggers. Idempotent. */
|
|
@@ -89,10 +98,15 @@ declare class GuidelyClient {
|
|
|
89
98
|
/** Resolves once the client is ready (alias of `init()`). */
|
|
90
99
|
ready(): Promise<void>;
|
|
91
100
|
private bootstrap;
|
|
101
|
+
/** Environment guides and flags target: the `environment` option, else the one the loaded config names, else a guess from the key. */
|
|
102
|
+
get environment(): GuidelyEnvironment;
|
|
103
|
+
private useConfig;
|
|
92
104
|
private fetchConfig;
|
|
93
105
|
private wireListeners;
|
|
94
106
|
/** Uncaught errors + unhandled rejections; attached before the config loads so boot errors are kept. */
|
|
95
107
|
private wireErrorListeners;
|
|
108
|
+
/** An automatic breadcrumb, unless the `errors.breadcrumbs` option turns its kind off. */
|
|
109
|
+
private autoBreadcrumb;
|
|
96
110
|
/** Re-fetches the published config and re-evaluates triggers. */
|
|
97
111
|
refresh(): Promise<void>;
|
|
98
112
|
/** Re-renders after a config change (refresh, or a config that arrived after start). */
|
|
@@ -112,6 +126,8 @@ declare class GuidelyClient {
|
|
|
112
126
|
/** Updates consent at runtime (`granted` flushes buffered events; `denied` drops them). */
|
|
113
127
|
setConsent(consent: ConsentState): void;
|
|
114
128
|
private analyticsEnabled;
|
|
129
|
+
/** The host app's version (`appVersion` option), sent with every event and recording. */
|
|
130
|
+
private appVersion;
|
|
115
131
|
private collectUrls;
|
|
116
132
|
private enqueue;
|
|
117
133
|
/** Tracks a custom event. Events drive `event` triggers, `advanceOn: "event"` steps and checklist tasks. */
|
|
@@ -154,10 +170,37 @@ declare class GuidelyClient {
|
|
|
154
170
|
private captureGlobalException;
|
|
155
171
|
/**
|
|
156
172
|
* Reports a caught error as an `exception` event (`source: "manual"`, `handled: true`), grouped
|
|
157
|
-
* into an issue on the Errors page.
|
|
158
|
-
*
|
|
173
|
+
* into an issue on the Errors page. The second argument takes Sentry's capture context (`tags`,
|
|
174
|
+
* `extra`, `level`, `fingerprint`, `contexts`, `user`); any other key is attached to the occurrence
|
|
175
|
+
* as a property. Needs the project's error tracking on (plus analytics + consent);
|
|
176
|
+
* `captureErrors: false` does not stop it. Returns the event id (empty when nothing is sent).
|
|
159
177
|
*/
|
|
160
|
-
captureException(error: unknown,
|
|
178
|
+
captureException(error: unknown, hint?: CaptureContext & Record<string, unknown>): string;
|
|
179
|
+
/** Reports a message (default level `info`) as its own issue, grouped by the message. */
|
|
180
|
+
captureMessage(message: string, level?: ErrorLevelName, hint?: CaptureContext): string;
|
|
181
|
+
private captureWith;
|
|
182
|
+
/** The `detail` of an error: scope, breadcrumbs, browser contexts and the `cause` chain. */
|
|
183
|
+
private errorDetail;
|
|
184
|
+
/** Adds a breadcrumb (sent with the next errors; the last 100 are kept). */
|
|
185
|
+
addBreadcrumb(crumb: Breadcrumb): void;
|
|
186
|
+
/** Tags every later error (searchable on the issue page). */
|
|
187
|
+
setTag(key: string, value: string | number | boolean | null | undefined): void;
|
|
188
|
+
setTags(tags: Record<string, string | number | boolean | null | undefined>): void;
|
|
189
|
+
/** Arbitrary data attached to every later error. */
|
|
190
|
+
setExtra(key: string, value: unknown): void;
|
|
191
|
+
setExtras(extras: Record<string, unknown>): void;
|
|
192
|
+
/** A named context (`setContext("cart", { items: 3 })`) on every later error; null removes it. */
|
|
193
|
+
setContext(name: string, context: Record<string, unknown> | null): void;
|
|
194
|
+
/**
|
|
195
|
+
* Sentry's `setUser`: identifies the user by `id` (like `identify`) and keeps `email` / `username`
|
|
196
|
+
* on their errors. `null` forgets the user (`reset()`).
|
|
197
|
+
*/
|
|
198
|
+
setUser(user: {
|
|
199
|
+
id?: string | number;
|
|
200
|
+
email?: string;
|
|
201
|
+
username?: string;
|
|
202
|
+
[trait: string]: unknown;
|
|
203
|
+
} | null): void;
|
|
161
204
|
private sendException;
|
|
162
205
|
private maskSelector;
|
|
163
206
|
private maskAllText;
|
|
@@ -252,6 +295,11 @@ declare class GuidelyClient {
|
|
|
252
295
|
getGuides(): ReadonlyArray<PublishedGuide>;
|
|
253
296
|
isGuideCompleted(idOrKey: string): boolean;
|
|
254
297
|
openResourceCenter(): void;
|
|
298
|
+
/**
|
|
299
|
+
* Opens one help article: in Scout's Help tab when the messenger is on, otherwise in the resource
|
|
300
|
+
* center. Help-article links in guides (`#guidely-article:<id>`) call this.
|
|
301
|
+
*/
|
|
302
|
+
openArticle(articleId: string): void;
|
|
255
303
|
closeResourceCenter(): void;
|
|
256
304
|
/** Opens the Scout messenger (when enabled for the project), optionally on a tab. */
|
|
257
305
|
openMessenger(tab?: MessengerTab): void;
|
|
@@ -272,6 +320,19 @@ declare class GuidelyClient {
|
|
|
272
320
|
* Does nothing when the project hasn't turned on Ideas.
|
|
273
321
|
*/
|
|
274
322
|
openIdeas(requestId?: string): void;
|
|
323
|
+
/**
|
|
324
|
+
* Sends a bug report to Monitor → User feedback (Sentry's `captureFeedback`). It is linked to the visitor,
|
|
325
|
+
* this session's recording and, unless `associatedEventId` says otherwise, the last error this page
|
|
326
|
+
* reported. Resolves with the report's id; rejects when it can't be sent.
|
|
327
|
+
*/
|
|
328
|
+
captureFeedback(input: BugReportInput, source?: "widget" | "api"): Promise<BugReportResponse>;
|
|
329
|
+
/** Opens the "Report a bug" dialog (message, name, email, a screenshot), which sends with captureFeedback. */
|
|
330
|
+
showBugReport(options?: {
|
|
331
|
+
message?: string;
|
|
332
|
+
name?: string;
|
|
333
|
+
email?: string;
|
|
334
|
+
title?: string;
|
|
335
|
+
}): void;
|
|
275
336
|
/** Opens a new messenger conversation, optionally pre-filling the message. */
|
|
276
337
|
showNewMessage(text?: string): void;
|
|
277
338
|
/** Boolean flag value for the current user; `fallback` (default `false`) until loaded or when missing. */
|
|
@@ -507,4 +568,4 @@ declare const Guidely: {
|
|
|
507
568
|
version: string;
|
|
508
569
|
};
|
|
509
570
|
|
|
510
|
-
export { AUTHORING_PARAM, type AuthoringIncomingMessage, type AuthoringOutgoingMessage, ChecklistProgressState, type ClickProperties, ConsentState, type ContextInput, DEFAULT_API_URL, type DeviceInfo, GuideLocalState, Guidely, GuidelyAccount, GuidelyClient, GuidelyEvents, GuidelyOptions, GuidelyUser, HEARTBEAT_MS, PROTOTYPE_CLOSE_MESSAGE, type PageLeaveInfo, SDK_NAME, SDK_VERSION, SessionState, buildContext, captureSnapshot, createGuidely, Guidely as default, detectDevice, isAppUrl, matchPrototypeTestUrl, normalizeAppUrl, watchNavigation };
|
|
571
|
+
export { AUTHORING_PARAM, type AuthoringIncomingMessage, type AuthoringOutgoingMessage, CaptureContext, ChecklistProgressState, type ClickProperties, ConsentState, type ContextInput, DEFAULT_API_URL, type DeviceInfo, GuideLocalState, Guidely, GuidelyAccount, GuidelyClient, GuidelyEnvironment, GuidelyEvents, GuidelyOptions, GuidelyUser, HEARTBEAT_MS, PROTOTYPE_CLOSE_MESSAGE, type PageLeaveInfo, SDK_NAME, SDK_VERSION, SessionState, buildContext, captureSnapshot, createGuidely, Guidely as default, detectDevice, isAppUrl, matchPrototypeTestUrl, normalizeAppUrl, watchNavigation };
|