@mrrocket/sdk 0.8.0 → 0.9.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 +13 -0
- package/README.md +35 -1
- package/dist/api-client.d.ts +213 -0
- package/dist/api-client.js +67 -0
- package/dist/api-client.js.map +1 -0
- package/dist/api.d.ts +2 -122
- package/dist/api.js +2 -61
- package/dist/api.js.map +1 -1
- package/dist/browser/mrrocket-messenger.js +313 -0
- package/dist/browser/mrrocket-replay.js +3 -3
- package/dist/browser/mrrocket.js +1 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.js +3 -0
- package/dist/browser.js.map +1 -1
- package/dist/capture.d.ts +1 -13
- package/dist/capture.js +1 -22
- package/dist/capture.js.map +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/feedback.js +5 -2
- package/dist/feedback.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/messenger-ui.d.ts +47 -0
- package/dist/messenger-ui.js +583 -0
- package/dist/messenger-ui.js.map +1 -0
- package/dist/messenger.d.ts +37 -0
- package/dist/messenger.js +69 -0
- package/dist/messenger.js.map +1 -0
- package/dist/rage.d.ts +14 -0
- package/dist/rage.js +27 -0
- package/dist/rage.js.map +1 -0
- package/dist/react-native/index.d.cts +339 -4
- package/dist/react-native/index.d.ts +339 -4
- package/dist/react-native/index.js +1191 -31
- package/dist/react-native/index.js.map +1 -1
- package/dist/styles-css.d.ts +6 -0
- package/dist/styles-css.js +327 -0
- package/dist/styles-css.js.map +1 -0
- package/dist/styles.d.ts +1 -2
- package/dist/styles.js +3 -237
- package/dist/styles.js.map +1 -1
- package/package.json +13 -5
|
@@ -1,6 +1,214 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The SDK's fetch client and the shapes it reads, without React, so the script tag's widgets (src/script) use it too.
|
|
6
|
+
* `./api` re-exports all of it with the `useApi` hook.
|
|
7
|
+
*/
|
|
8
|
+
type PostStatus = "review" | "planned" | "progress" | "shipped";
|
|
9
|
+
interface FeedbackBoardInfo {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
interface FeedbackPost {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
body: string;
|
|
17
|
+
board: string;
|
|
18
|
+
status: PostStatus;
|
|
19
|
+
votes: number;
|
|
20
|
+
comments: number;
|
|
21
|
+
voted: boolean;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
/** "Lena K.", "Anonymous" or "Team". Missing from servers before SDK 0.6. */
|
|
24
|
+
author?: string;
|
|
25
|
+
}
|
|
26
|
+
/** The product's public face for the board's header. */
|
|
27
|
+
interface FeedbackProduct {
|
|
28
|
+
name: string;
|
|
29
|
+
logo: string | null;
|
|
30
|
+
/** The domain's favicon, tried when `logo` does not load. Older servers leave it out. */
|
|
31
|
+
logoFallback?: string | null;
|
|
32
|
+
}
|
|
33
|
+
interface FeedbackList {
|
|
34
|
+
boards: FeedbackBoardInfo[];
|
|
35
|
+
posts: FeedbackPost[];
|
|
36
|
+
product?: FeedbackProduct;
|
|
37
|
+
}
|
|
38
|
+
interface FeedbackRoadmap {
|
|
39
|
+
/** `review` (Backlog) comes from servers of SDK 0.6 on. */
|
|
40
|
+
columns: {
|
|
41
|
+
review?: FeedbackPost[];
|
|
42
|
+
planned: FeedbackPost[];
|
|
43
|
+
progress: FeedbackPost[];
|
|
44
|
+
shipped: FeedbackPost[];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
interface ChangelogEntry {
|
|
48
|
+
id: string;
|
|
49
|
+
title: string;
|
|
50
|
+
body: string;
|
|
51
|
+
publishedAt: string;
|
|
52
|
+
}
|
|
53
|
+
interface FeedbackComment {
|
|
54
|
+
id: string;
|
|
55
|
+
body: string;
|
|
56
|
+
author: string;
|
|
57
|
+
isTeam: boolean;
|
|
58
|
+
postedAt: string;
|
|
59
|
+
}
|
|
60
|
+
type SurveyQuestionKind = "nps" | "rating" | "single" | "multi" | "text";
|
|
61
|
+
interface SurveyQuestion {
|
|
62
|
+
key: string;
|
|
63
|
+
kind: SurveyQuestionKind;
|
|
64
|
+
title: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
required: boolean;
|
|
67
|
+
options?: string[];
|
|
68
|
+
scale?: number;
|
|
69
|
+
low?: string;
|
|
70
|
+
high?: string;
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
}
|
|
73
|
+
interface SurveyDefinition {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
type: string;
|
|
77
|
+
thanks: string;
|
|
78
|
+
questions: SurveyQuestion[];
|
|
79
|
+
}
|
|
80
|
+
type SurveyAnswer = number | string | string[];
|
|
81
|
+
/** One message of the messenger's chat. "visitor" is the person on the site; the rest come from the product's team. */
|
|
82
|
+
interface ChatMessage {
|
|
83
|
+
id: string;
|
|
84
|
+
from: "visitor" | "team" | "ai" | "auto";
|
|
85
|
+
body: string;
|
|
86
|
+
at: string;
|
|
87
|
+
/** Help articles an answer drew on (servers from SDK 0.9 on). */
|
|
88
|
+
articles?: {
|
|
89
|
+
id: string;
|
|
90
|
+
title: string;
|
|
91
|
+
}[];
|
|
92
|
+
}
|
|
93
|
+
/** A published help article in a list (the messenger's Help tab). */
|
|
94
|
+
interface ArticleSummary {
|
|
95
|
+
id: string;
|
|
96
|
+
title: string;
|
|
97
|
+
collection: string;
|
|
98
|
+
excerpt: string;
|
|
99
|
+
updatedAt: string;
|
|
100
|
+
}
|
|
101
|
+
/** A run of text inside an article block. Links are http(s), mailto or tel only. */
|
|
102
|
+
interface ArticleSpan {
|
|
103
|
+
text: string;
|
|
104
|
+
href?: string;
|
|
105
|
+
bold?: boolean;
|
|
106
|
+
italic?: boolean;
|
|
107
|
+
code?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** An article's content as blocks, written with textContent (never parsed as HTML). */
|
|
110
|
+
type ArticleBlock = {
|
|
111
|
+
type: "h2" | "h3" | "p" | "quote";
|
|
112
|
+
spans: ArticleSpan[];
|
|
113
|
+
} | {
|
|
114
|
+
type: "ul" | "ol";
|
|
115
|
+
items: ArticleSpan[][];
|
|
116
|
+
} | {
|
|
117
|
+
type: "code";
|
|
118
|
+
text: string;
|
|
119
|
+
} | {
|
|
120
|
+
type: "hr";
|
|
121
|
+
};
|
|
122
|
+
interface Article {
|
|
123
|
+
id: string;
|
|
124
|
+
title: string;
|
|
125
|
+
collection: string;
|
|
126
|
+
updatedAt: string;
|
|
127
|
+
blocks: ArticleBlock[];
|
|
128
|
+
}
|
|
129
|
+
/** The messenger's look and texts as set in MRRocket › Support › Messenger (servers from SDK 0.9 on). */
|
|
130
|
+
interface MessengerLook {
|
|
131
|
+
accent: string;
|
|
132
|
+
theme: "light" | "dark" | "auto";
|
|
133
|
+
position: "bottom-right" | "bottom-left";
|
|
134
|
+
title: string;
|
|
135
|
+
greeting: string;
|
|
136
|
+
label: string;
|
|
137
|
+
help: boolean;
|
|
138
|
+
sound: boolean;
|
|
139
|
+
preview: boolean;
|
|
140
|
+
askEmail: boolean;
|
|
141
|
+
}
|
|
142
|
+
/** The visitor's newest chat (open or closed) and its messages. */
|
|
143
|
+
interface ChatThread {
|
|
144
|
+
conversation: {
|
|
145
|
+
id: string;
|
|
146
|
+
status: "open" | "solved";
|
|
147
|
+
} | null;
|
|
148
|
+
messages: ChatMessage[];
|
|
149
|
+
/** The visitor gave an email already: the messenger stops asking. */
|
|
150
|
+
hasEmail: boolean;
|
|
151
|
+
}
|
|
152
|
+
interface Conn {
|
|
153
|
+
host: string;
|
|
154
|
+
apiKey: string;
|
|
155
|
+
distinctId: string;
|
|
156
|
+
user?: {
|
|
157
|
+
id?: string;
|
|
158
|
+
[key: string]: unknown;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/** The small fetch client behind the widgets. Every read takes an AbortSignal so unmounting cancels it. */
|
|
162
|
+
declare const createApi: (c: Conn) => {
|
|
163
|
+
list: (o: {
|
|
164
|
+
board?: string;
|
|
165
|
+
sort?: "top" | "new";
|
|
166
|
+
q?: string;
|
|
167
|
+
}, signal?: AbortSignal) => Promise<FeedbackList>;
|
|
168
|
+
post: (id: string, signal?: AbortSignal) => Promise<FeedbackPost>;
|
|
169
|
+
roadmap: (signal?: AbortSignal) => Promise<FeedbackRoadmap>;
|
|
170
|
+
changelog: (signal?: AbortSignal) => Promise<{
|
|
171
|
+
entries: ChangelogEntry[];
|
|
172
|
+
}>;
|
|
173
|
+
submit: (p: {
|
|
174
|
+
title: string;
|
|
175
|
+
body?: string;
|
|
176
|
+
board: string;
|
|
177
|
+
}) => Promise<FeedbackPost>;
|
|
178
|
+
vote: (id: string) => Promise<{
|
|
179
|
+
voted: boolean;
|
|
180
|
+
votes: number;
|
|
181
|
+
}>;
|
|
182
|
+
comments: (id: string, signal?: AbortSignal) => Promise<{
|
|
183
|
+
comments: FeedbackComment[];
|
|
184
|
+
}>;
|
|
185
|
+
comment: (id: string, body: string) => Promise<FeedbackComment>;
|
|
186
|
+
survey: (url: string, signal?: AbortSignal) => Promise<{
|
|
187
|
+
survey: SurveyDefinition | null;
|
|
188
|
+
}>;
|
|
189
|
+
seen: (id: string) => Promise<unknown>;
|
|
190
|
+
respond: (id: string, r: {
|
|
191
|
+
answers: Record<string, SurveyAnswer>;
|
|
192
|
+
completed: boolean;
|
|
193
|
+
seconds: number;
|
|
194
|
+
}) => Promise<unknown>;
|
|
195
|
+
chat: (signal?: AbortSignal) => Promise<ChatThread>;
|
|
196
|
+
sendChat: (m: {
|
|
197
|
+
body: string;
|
|
198
|
+
email?: string;
|
|
199
|
+
url?: string;
|
|
200
|
+
}) => Promise<ChatThread>;
|
|
201
|
+
articles: (q?: string, signal?: AbortSignal) => Promise<{
|
|
202
|
+
articles: ArticleSummary[];
|
|
203
|
+
}>;
|
|
204
|
+
article: (id: string, signal?: AbortSignal) => Promise<Article>;
|
|
205
|
+
messengerLook: (signal?: AbortSignal) => Promise<MessengerLook>;
|
|
206
|
+
rateArticle: (id: string, helpful: boolean) => Promise<{
|
|
207
|
+
counted: boolean;
|
|
208
|
+
}>;
|
|
209
|
+
};
|
|
210
|
+
type Api = ReturnType<typeof createApi>;
|
|
211
|
+
|
|
4
212
|
/**
|
|
5
213
|
* The cancel flow, onboarding and in-app messages (SDK 0.7.0): what MRRocket's config and `GET /api/sdk/inapp` serve,
|
|
6
214
|
* and one controller that decides what shows when and records what the person did. No DOM and no React: the web
|
|
@@ -183,7 +391,7 @@ interface FlowsController {
|
|
|
183
391
|
|
|
184
392
|
type VariantId = string;
|
|
185
393
|
/** This build of the SDK. Sent with the config request so MRRocket knows what the site runs (error tracking, flags). */
|
|
186
|
-
declare const SDK_VERSION = "0.
|
|
394
|
+
declare const SDK_VERSION = "0.9.0";
|
|
187
395
|
/** One variant of an experiment. `changes` replaces texts that the page marks with `<Text id>`. */
|
|
188
396
|
interface VariantConfig {
|
|
189
397
|
id: VariantId;
|
|
@@ -322,6 +530,14 @@ interface AppContext {
|
|
|
322
530
|
locale?: string;
|
|
323
531
|
}
|
|
324
532
|
|
|
533
|
+
/**
|
|
534
|
+
* The React Native client without React: the event queue (batched, persisted for offline use, retried with backoff),
|
|
535
|
+
* the app lifecycle (`$app_open`, `$app_background`, a new session after 30 minutes away), screens, identity and
|
|
536
|
+
* consent, the cached config for flags and experiments, install attribution from the first open's deep link, and error
|
|
537
|
+
* capture. Everything the platform gives (storage, AppState, ErrorUtils, device info, fetch) comes in as `deps`, so
|
|
538
|
+
* it runs in tests without React Native; `platform.ts` builds the real ones.
|
|
539
|
+
*/
|
|
540
|
+
|
|
325
541
|
/**
|
|
326
542
|
* What the app may send and store.
|
|
327
543
|
* - "anonymous" (default): no id is stored on the device. Events go without a person id until `identify()` (MRRocket
|
|
@@ -353,6 +569,14 @@ interface MRRocketOptions {
|
|
|
353
569
|
debug?: boolean;
|
|
354
570
|
/** Onboarding flows start on their own when the person does their trigger (default true). False: only `startOnboarding()`. */
|
|
355
571
|
onboarding?: boolean;
|
|
572
|
+
/** Taps go to Heatmaps as clicks on the screen they happened on (default true; `MRRocketProvider` captures them). */
|
|
573
|
+
heatmaps?: boolean;
|
|
574
|
+
/**
|
|
575
|
+
* The person agreed to session recordings (default false; ask them first). Needs `react-native-view-shot` and the
|
|
576
|
+
* product's recordings switched on in MRRocket. No frame while the keyboard is open; wrap private views in
|
|
577
|
+
* `<MRRocketMask>`. Change it later with `setReplay`.
|
|
578
|
+
*/
|
|
579
|
+
replay?: boolean;
|
|
356
580
|
}
|
|
357
581
|
/** AsyncStorage's shape. */
|
|
358
582
|
interface KeyValueStorage {
|
|
@@ -379,6 +603,10 @@ interface MRRocketClient {
|
|
|
379
603
|
track(event: string, props?: Record<string, unknown>): void;
|
|
380
604
|
/** A screen view: a route name ("Settings") or an Expo Router path ("/settings"). */
|
|
381
605
|
screen(name: string, props?: Record<string, unknown>): void;
|
|
606
|
+
/** A tap at screen points (x, y) for Heatmaps, on the current screen; `MRRocketProvider` calls it. */
|
|
607
|
+
tap(x: number, y: number): void;
|
|
608
|
+
/** The person's answer to session recordings (`replay` in the options); false stops and forgets what was not sent. */
|
|
609
|
+
setReplay(on: boolean): void;
|
|
382
610
|
identify(id: string, props?: Record<string, unknown>): void;
|
|
383
611
|
/** Forgets the signed-in person (sign-out): a new anonymous id and a new session. */
|
|
384
612
|
reset(): void;
|
|
@@ -428,6 +656,23 @@ interface MRRocketClient {
|
|
|
428
656
|
isReady(): boolean;
|
|
429
657
|
getDistinctId(): string;
|
|
430
658
|
getConsent(): NativeConsent;
|
|
659
|
+
/**
|
|
660
|
+
* The client of the SDK's widget API (surveys, feedback, the messenger) for the person now: their id, and the name and
|
|
661
|
+
* email given to identify (or `as`, typed into a widget). Null while the consent is off or without a key.
|
|
662
|
+
*/
|
|
663
|
+
api(as?: {
|
|
664
|
+
name?: string;
|
|
665
|
+
email?: string;
|
|
666
|
+
}): Api | null;
|
|
667
|
+
/** The signed-in person (identify): their id, and the name and email given there. Undefined before identify. */
|
|
668
|
+
getUser(): {
|
|
669
|
+
id: string;
|
|
670
|
+
name?: string;
|
|
671
|
+
email?: string;
|
|
672
|
+
} | undefined;
|
|
673
|
+
/** Surveys answered or closed on this device: not shown again (kept on the device only with "persistent"). */
|
|
674
|
+
isSurveyDone(id: string): boolean;
|
|
675
|
+
markSurveyDone(id: string): void;
|
|
431
676
|
getConfig(): CockpitConfig | null;
|
|
432
677
|
/** For React: called after every change flags, variants or the consent depend on. Returns the unsubscribe. */
|
|
433
678
|
subscribe(listener: () => void): () => void;
|
|
@@ -450,6 +695,84 @@ declare const MRRocketFlows: ({ flows, appearance }: {
|
|
|
450
695
|
appearance?: NativeAppearance;
|
|
451
696
|
}) => react.FunctionComponentElement<Record<string, unknown>> | null;
|
|
452
697
|
|
|
698
|
+
interface Palette {
|
|
699
|
+
accent: string;
|
|
700
|
+
bg: string;
|
|
701
|
+
fg: string;
|
|
702
|
+
muted: string;
|
|
703
|
+
soft: string;
|
|
704
|
+
line: string;
|
|
705
|
+
danger: string;
|
|
706
|
+
}
|
|
707
|
+
/** Asks the person the survey MRRocket picks for them, a few seconds after start and again for a new person. */
|
|
708
|
+
declare const MRRocketSurveys: ({ client, appearance }: {
|
|
709
|
+
client: MRRocketClient;
|
|
710
|
+
appearance?: NativeAppearance;
|
|
711
|
+
}) => react.FunctionComponentElement<{
|
|
712
|
+
survey: SurveyDefinition;
|
|
713
|
+
api: Api;
|
|
714
|
+
p: Palette;
|
|
715
|
+
onDone: () => void;
|
|
716
|
+
}> | null;
|
|
717
|
+
/** Opens the feedback sheet: the top requests with votes, and a form to suggest one. */
|
|
718
|
+
declare const useFeedback: () => {
|
|
719
|
+
open: () => void;
|
|
720
|
+
close: () => void;
|
|
721
|
+
};
|
|
722
|
+
interface NativeFeedbackOptions {
|
|
723
|
+
/** The sheet's title. Default "Feedback". */
|
|
724
|
+
title?: string;
|
|
725
|
+
}
|
|
726
|
+
declare const MRRocketFeedback: ({ client, appearance, options }: {
|
|
727
|
+
client: MRRocketClient;
|
|
728
|
+
appearance?: NativeAppearance;
|
|
729
|
+
options?: NativeFeedbackOptions;
|
|
730
|
+
}) => react.FunctionComponentElement<{
|
|
731
|
+
client: MRRocketClient;
|
|
732
|
+
p: Palette;
|
|
733
|
+
title: string;
|
|
734
|
+
}> | null;
|
|
735
|
+
type MsgView = "home" | "messages" | "help" | {
|
|
736
|
+
article: string;
|
|
737
|
+
};
|
|
738
|
+
/** Opens (on Home, a tab or `{ article: id }`), closes or toggles the messenger. */
|
|
739
|
+
declare const useMessenger: () => {
|
|
740
|
+
open: (view?: MsgView) => void;
|
|
741
|
+
close: () => void;
|
|
742
|
+
toggle: () => void;
|
|
743
|
+
};
|
|
744
|
+
interface NativeMessengerOptions {
|
|
745
|
+
/** A round chat button bottom right (default false: open it with `useMessenger().open()` from your own button). */
|
|
746
|
+
launcher?: boolean;
|
|
747
|
+
title?: string;
|
|
748
|
+
/** The big line on Home and the first line of an empty chat. */
|
|
749
|
+
greeting?: string;
|
|
750
|
+
/** Ask people the app did not identify with an email for an email (optional for them). Default true. */
|
|
751
|
+
askEmail?: boolean;
|
|
752
|
+
/** The Help tab with your published help articles (default true; hidden while there are none). */
|
|
753
|
+
help?: boolean;
|
|
754
|
+
/** A banner at the top when an answer arrives while the messenger is closed (default true). */
|
|
755
|
+
preview?: boolean;
|
|
756
|
+
/** A light haptic when an answer arrives (default true; needs expo-haptics). */
|
|
757
|
+
haptics?: boolean;
|
|
758
|
+
}
|
|
759
|
+
declare const MRRocketMessenger: ({ client, appearance, options: given }: {
|
|
760
|
+
client: MRRocketClient;
|
|
761
|
+
appearance?: NativeAppearance;
|
|
762
|
+
options?: NativeMessengerOptions;
|
|
763
|
+
}) => react.FunctionComponentElement<Record<string, unknown>> | null;
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* Hides what it wraps in session recordings: its area is painted black on every frame before the frame is stored. Use
|
|
767
|
+
* it for anything private on screen (balances, addresses, messages). Text fields need no wrapper: nothing is recorded
|
|
768
|
+
* while the keyboard is open.
|
|
769
|
+
*
|
|
770
|
+
* <MRRocketMask><Text>{iban}</Text></MRRocketMask>
|
|
771
|
+
*/
|
|
772
|
+
declare const MRRocketMask: ({ children, style }: {
|
|
773
|
+
children?: ReactNode;
|
|
774
|
+
style?: unknown;
|
|
775
|
+
}) => react.FunctionComponentElement<Record<string, unknown>>;
|
|
453
776
|
/**
|
|
454
777
|
* The SDK's client outside React (a background task, a store, an API layer): the one the provider made, or a new one.
|
|
455
778
|
* One client per app; a second call returns the first.
|
|
@@ -471,8 +794,19 @@ interface MRRocketProviderProps extends Partial<MRRocketOptions> {
|
|
|
471
794
|
* place `<MRRocketFlows flows={client.flows} />` where you want it.
|
|
472
795
|
*/
|
|
473
796
|
flows?: boolean;
|
|
474
|
-
/** The look of those dialogs: `{ theme: "light" | "dark" | "auto", accent: "#0f766e" }`. */
|
|
797
|
+
/** The look of those dialogs and the widgets: `{ theme: "light" | "dark" | "auto", accent: "#0f766e" }`. */
|
|
475
798
|
appearance?: NativeAppearance;
|
|
799
|
+
/** Show the live in-app survey MRRocket picks for the person, a few seconds after start (default true). */
|
|
800
|
+
surveys?: boolean;
|
|
801
|
+
/** The chat with your team, opened with `useMessenger().open()`; `{ launcher: true }` adds a round button. False: none. */
|
|
802
|
+
messenger?: NativeMessengerOptions | false;
|
|
803
|
+
/** The feedback sheet opened with `useFeedback().open()` (`{ title }`). False: none. */
|
|
804
|
+
feedback?: NativeFeedbackOptions | false;
|
|
805
|
+
/**
|
|
806
|
+
* Taps for Heatmaps (default true). The provider then wraps the app in one `View` with `flex: 1` to see them; false
|
|
807
|
+
* leaves the app as it is.
|
|
808
|
+
*/
|
|
809
|
+
heatmaps?: boolean;
|
|
476
810
|
children?: ReactNode;
|
|
477
811
|
}
|
|
478
812
|
/**
|
|
@@ -480,7 +814,7 @@ interface MRRocketProviderProps extends Partial<MRRocketOptions> {
|
|
|
480
814
|
* starts the SDK: lifecycle events, the event queue, flags and experiments, error capture. Changing `consent` later
|
|
481
815
|
* calls setConsent.
|
|
482
816
|
*/
|
|
483
|
-
declare const MRRocketProvider: ({ client: given, children, consent, flows, appearance, ...options }: MRRocketProviderProps) => react.FunctionComponentElement<react.ProviderProps<MRRocketClient | null>>;
|
|
817
|
+
declare const MRRocketProvider: ({ client: given, children, consent, flows, appearance, surveys, messenger, feedback, heatmaps, ...options }: MRRocketProviderProps) => react.FunctionComponentElement<react.ProviderProps<MRRocketClient | null>>;
|
|
484
818
|
/**
|
|
485
819
|
* `track`, `screen`, `identify`, `reset`, `setConsent`, `captureError`, `flush`, the visitor id, the consent and whether
|
|
486
820
|
* flags and experiments have loaded.
|
|
@@ -491,6 +825,7 @@ declare const useMRRocket: () => {
|
|
|
491
825
|
identify: (id: string, props?: Record<string, unknown>) => void;
|
|
492
826
|
reset: () => void;
|
|
493
827
|
setConsent: (consent: NativeConsent) => void;
|
|
828
|
+
setReplay: (on: boolean) => void;
|
|
494
829
|
captureError: (error: unknown) => void;
|
|
495
830
|
flush: () => Promise<void>;
|
|
496
831
|
distinctId: string;
|
|
@@ -558,4 +893,4 @@ declare const useExpoRouterTracking: () => void;
|
|
|
558
893
|
*/
|
|
559
894
|
declare const useNavigationTracking: () => (state: unknown) => void;
|
|
560
895
|
|
|
561
|
-
export { type AppContext, type CancelFlowConfig, type CancelFlowOptions, type CancelFlowResult, type CancelOffer, type CockpitConfig, type FlagConfig, type FlowView, type InAppMessage, type KeyValueStorage, type MRRocketClient, MRRocketFlows, type MRRocketOptions, MRRocketProvider, type MRRocketProviderProps, type NativeAppearance, type NativeConsent, type NativePushResult, type NativePushStatus, type OnboardingFlow, type OnboardingStep, type RegisterForPushOptions, SDK_VERSION, type VariantId, activeRouteName, createMRRocket, getMRRocket, useCancelFlow, useExpoRouterTracking, useFlag, useFlagVariant, useMRRocket, useNavigationTracking, useOnboarding, usePush, useText, useVariant };
|
|
896
|
+
export { type AppContext, type CancelFlowConfig, type CancelFlowOptions, type CancelFlowResult, type CancelOffer, type ChatMessage, type ChatThread, type CockpitConfig, type FeedbackPost, type FlagConfig, type FlowView, type InAppMessage, type KeyValueStorage, type MRRocketClient, MRRocketFeedback, MRRocketFlows, MRRocketMask, MRRocketMessenger, type MRRocketOptions, MRRocketProvider, type MRRocketProviderProps, MRRocketSurveys, type NativeAppearance, type NativeConsent, type NativeFeedbackOptions, type NativeMessengerOptions, type NativePushResult, type NativePushStatus, type OnboardingFlow, type OnboardingStep, type RegisterForPushOptions, SDK_VERSION, type SurveyDefinition, type VariantId, activeRouteName, createMRRocket, getMRRocket, useCancelFlow, useExpoRouterTracking, useFeedback, useFlag, useFlagVariant, useMRRocket, useMessenger, useNavigationTracking, useOnboarding, usePush, useText, useVariant };
|