@sprig-technologies/sprig-bundled 1.1.3 → 1.1.5

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/index.d.ts CHANGED
@@ -27,6 +27,7 @@ type elementNode = {
27
27
  childNodes: serializedNodeWithId[];
28
28
  isSVG?: true;
29
29
  needBlock?: boolean;
30
+ isCustom?: true;
30
31
  };
31
32
  type textNode = {
32
33
  type: NodeType.Text;
@@ -98,7 +99,7 @@ type DataURLOptions = Partial<{
98
99
  type: string;
99
100
  quality: number;
100
101
  }>;
101
- type MaskTextFn = (text: string) => string;
102
+ type MaskTextFn = (text: string, element: HTMLElement | null) => string;
102
103
  type MaskInputFn = (text: string, element: HTMLElement) => string;
103
104
 
104
105
  declare class Mirror$1 implements IMirror<Node> {
@@ -185,7 +186,8 @@ declare enum IncrementalSource {
185
186
  Drag = 12,
186
187
  StyleDeclaration = 13,
187
188
  Selection = 14,
188
- AdoptedStyleSheet = 15
189
+ AdoptedStyleSheet = 15,
190
+ CustomElement = 16
189
191
  }
190
192
  type mutationData = {
191
193
  source: IncrementalSource.Mutation;
@@ -228,7 +230,10 @@ type selectionData = {
228
230
  type adoptedStyleSheetData = {
229
231
  source: IncrementalSource.AdoptedStyleSheet;
230
232
  } & adoptedStyleSheetParam;
231
- type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData;
233
+ type customElementData = {
234
+ source: IncrementalSource.CustomElement;
235
+ } & customElementParam;
236
+ type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
232
237
  type event = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
233
238
  type eventWithTime = event & {
234
239
  timestamp: number;
@@ -280,6 +285,7 @@ type hooksParam = {
280
285
  canvasMutation?: canvasMutationCallback;
281
286
  font?: fontCallback;
282
287
  selection?: selectionCallback;
288
+ customElement?: customElementCallback;
283
289
  };
284
290
  type textMutation = {
285
291
  id: number;
@@ -347,8 +353,8 @@ declare enum CanvasContext {
347
353
  type mouseInteractionParam = {
348
354
  type: MouseInteractions;
349
355
  id: number;
350
- x: number;
351
- y: number;
356
+ x?: number;
357
+ y?: number;
352
358
  pointerType?: PointerTypes;
353
359
  };
354
360
  type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
@@ -443,6 +449,7 @@ type mediaInteractionParam = {
443
449
  currentTime?: number;
444
450
  volume?: number;
445
451
  muted?: boolean;
452
+ loop?: boolean;
446
453
  playbackRate?: number;
447
454
  };
448
455
  type mediaInteractionCallback = (p: mediaInteractionParam) => void;
@@ -462,6 +469,12 @@ type selectionParam = {
462
469
  ranges: Array<SelectionRange>;
463
470
  };
464
471
  type selectionCallback = (p: selectionParam) => void;
472
+ type customElementParam = {
473
+ define?: {
474
+ name: string;
475
+ };
476
+ };
477
+ type customElementCallback = (c: customElementParam) => void;
465
478
  type DeprecatedMirror = {
466
479
  map: {
467
480
  [key: number]: INode;
@@ -822,6 +835,7 @@ declare const RRMediaElement_base: {
822
835
  paused?: boolean | undefined;
823
836
  muted?: boolean | undefined;
824
837
  playbackRate?: number | undefined;
838
+ loop?: boolean | undefined;
825
839
  attachShadow(_init: ShadowRootInit): IRRElement;
826
840
  play(): void;
827
841
  pause(): void;
@@ -1442,14 +1456,6 @@ interface XhrHeaders {
1442
1456
  [key: string]: string;
1443
1457
  }
1444
1458
 
1445
- declare const isValidChunkSize: (chunkSize: any, { minChunkSize, maxChunkSize, }?: {
1446
- minChunkSize?: number | undefined;
1447
- maxChunkSize?: number | undefined;
1448
- }) => chunkSize is number | null | undefined;
1449
- declare const getChunkSizeError: (chunkSize: any, { minChunkSize, maxChunkSize, }?: {
1450
- minChunkSize?: number | undefined;
1451
- maxChunkSize?: number | undefined;
1452
- }) => TypeError;
1453
1459
  declare type ChunkedStreamIterableOptions = {
1454
1460
  defaultChunkSize?: number;
1455
1461
  minChunkSize?: number;
@@ -1555,19 +1561,7 @@ declare class UpChunk {
1555
1561
  */
1556
1562
  private sendChunks;
1557
1563
  }
1558
- declare function createUpload$1(options: UpChunkOptions): UpChunk;
1559
-
1560
- type _mux_upchunk_ChunkedStreamIterable = ChunkedStreamIterable;
1561
- declare const _mux_upchunk_ChunkedStreamIterable: typeof ChunkedStreamIterable;
1562
- type _mux_upchunk_ChunkedStreamIterableOptions = ChunkedStreamIterableOptions;
1563
- type _mux_upchunk_UpChunk = UpChunk;
1564
- declare const _mux_upchunk_UpChunk: typeof UpChunk;
1565
- type _mux_upchunk_UpChunkOptions = UpChunkOptions;
1566
- declare const _mux_upchunk_getChunkSizeError: typeof getChunkSizeError;
1567
- declare const _mux_upchunk_isValidChunkSize: typeof isValidChunkSize;
1568
- declare namespace _mux_upchunk {
1569
- export { _mux_upchunk_ChunkedStreamIterable as ChunkedStreamIterable, type _mux_upchunk_ChunkedStreamIterableOptions as ChunkedStreamIterableOptions, _mux_upchunk_UpChunk as UpChunk, type _mux_upchunk_UpChunkOptions as UpChunkOptions, createUpload$1 as createUpload, _mux_upchunk_getChunkSizeError as getChunkSizeError, _mux_upchunk_isValidChunkSize as isValidChunkSize };
1570
- }
1564
+ declare const createUpload: typeof UpChunk.createUpload;
1571
1565
 
1572
1566
  declare enum NOTIFICATION_TYPES {
1573
1567
  ACTIVATE = "ACTIVATE:experiment, user_id,attributes, variation, event",
@@ -1815,41 +1809,8 @@ declare class Emitter<Events extends EventMap> {
1815
1809
  rawListeners<EventName extends keyof Events>(eventName: EventName): Array<Listener<Events[EventName]>>;
1816
1810
  }
1817
1811
 
1818
- declare const enum MediaType {
1819
- Video = "video",
1820
- Audio = "audio",
1821
- Screen = "screen"
1822
- }
1823
- declare const enum SprigRecordingEvent {
1824
- PermissionStatus = "permission.status",
1825
- AvPermission = "av.permission",
1826
- ScreenPermission = "screen.permission",
1827
- BeginRecording = "begin.recording",
1828
- StartTask = "start.task",
1829
- FinishTask = "finish.task"
1830
- }
1831
- declare const enum TaskStatus {
1832
- Abandoned = "abandoned",
1833
- GivenUp = "given.up",
1834
- Completed = "completed"
1835
- }
1836
- declare const enum SprigRecordingEventData {
1837
- ScreenPermissionRequested = "screen.permission.requested",
1838
- PermissionDescriptors = "permission.descriptors",
1839
- PermissionStatusCallback = "permission.status.callback",
1840
- StreamReadyCallback = "stream.ready.callback",
1841
- StreamCanceledCallback = "stream.canceled.callback",
1842
- TaskCompleteCallback = "task.complete.callback",
1843
- TaskResponse = "task.response",
1844
- TaskStatus = "task.status",
1845
- RecordingMediaTypes = "recording.media.types",
1846
- StartRecordingCallback = "start.recording.callback",
1847
- PassthroughData = "passthrough.data",
1848
- CurrentIndex = "current.index",
1849
- UploadCallback = "upload.callback",
1850
- ProgressCallback = "progress.callback",
1851
- BeginCallback = "begin.callback"
1852
- }
1812
+ type MediaType = "video" | "audio" | "screen";
1813
+ type TaskStatus = "abandoned" | "given.up" | "completed";
1853
1814
  interface PassthroughData {
1854
1815
  questionId: number;
1855
1816
  surveyId: number;
@@ -1862,51 +1823,23 @@ interface RecordedTaskResponseValueType {
1862
1823
  taskDurationMillisecond?: number;
1863
1824
  taskStatus: TaskStatus;
1864
1825
  }
1865
- declare enum BooleanOperator {
1866
- And = 1,
1867
- Or = 2
1868
- }
1826
+ declare const BOOLEAN_OPERATOR: {
1827
+ readonly And: 1;
1828
+ readonly Or: 2;
1829
+ };
1830
+ type BooleanOperator = (typeof BOOLEAN_OPERATOR)[keyof typeof BOOLEAN_OPERATOR];
1869
1831
 
1870
- declare const enum CardType {
1871
- ConsentLegal = "consentlegal",
1872
- Likert = "likert",
1873
- Matrix = "matrix",
1874
- MultipleChoice = "multiplechoice",
1875
- MultipleSelect = "multipleselect",
1876
- NPS = "nps",
1877
- Open = "open",
1878
- RecordedTask = "recordedtask",
1879
- TextUrlPrompt = "texturlprompt",
1880
- Thanks = "thanks",
1881
- Uploading = "uploading",
1882
- VideoVoice = "videovoice"
1883
- }
1832
+ type CardType = "consentlegal" | "likert" | "matrix" | "multiplechoice" | "multipleselect" | "nps" | "open" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
1884
1833
  type ConceptUrl = string | null;
1885
1834
  interface BaseCard {
1886
1835
  name: number;
1887
1836
  surveyId: number;
1888
1837
  updatedAt: string;
1889
1838
  value?: unknown;
1839
+ type: CardType;
1890
1840
  }
1891
- declare const enum Comparator {
1892
- Answered = "answered",
1893
- Contains = "contains",
1894
- DoesNotContain = "notcontains",
1895
- DoesNotInclude = "list_dni",
1896
- Equal = "eq",
1897
- GivenUp = "given_up",
1898
- GreaterThan = "gt",
1899
- GreaterThanOrEqual = "gte",
1900
- LessThan = "lt",
1901
- LessThanOrEqual = "lte",
1902
- ListAll = "list_all",
1903
- ListAtLeastOne = "list_alo",
1904
- ListExact = "list_exact",
1905
- NotEqual = "neq",
1906
- Partial = "partial",
1907
- Skipped = "skipped"
1908
- }
1909
- type DefaultComparator = Comparator.Answered | Comparator.Skipped;
1841
+ type Comparator = "answered" | "contains" | "notcontains" | "list_dni" | "eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "list_all" | "list_alo" | "list_exact" | "neq" | "partial" | "skipped";
1842
+ type DefaultComparator = Extract<Comparator, "answered" | "skipped">;
1910
1843
  type RoutingOption<C extends Comparator = DefaultComparator> = OldRoutingOption<C> | GroupRoutingOption;
1911
1844
  type OldRoutingOption<C extends Comparator = DefaultComparator> = {
1912
1845
  comparator: C;
@@ -1928,10 +1861,7 @@ type RoutingGroupOption = {
1928
1861
  type RoutingOptions<C extends Comparator = DefaultComparator> = RoutingOption<C | DefaultComparator>[] | null;
1929
1862
  /** @example <p>Body</p> */
1930
1863
  type RichTextBody = string;
1931
- declare const enum PromptActionType {
1932
- Continue = "CONTINUE",
1933
- External = "EXTERNAL"
1934
- }
1864
+ type PromptActionType = "CONTINUE" | "EXTERNAL";
1935
1865
  interface TextUrlPromptCard extends BaseCard {
1936
1866
  props: {
1937
1867
  message: string;
@@ -1948,13 +1878,9 @@ interface TextUrlPromptCard extends BaseCard {
1948
1878
  };
1949
1879
  routingOptions: RoutingOptions;
1950
1880
  };
1951
- type: CardType.TextUrlPrompt;
1952
- }
1953
- declare const enum AvPermission {
1954
- Camera = "camera",
1955
- Microphone = "microphone",
1956
- Screen = "screen"
1881
+ type: "texturlprompt";
1957
1882
  }
1883
+ type AvPermission = "camera" | "microphone" | "screen";
1958
1884
  interface ConsentLegalCard extends BaseCard {
1959
1885
  props: {
1960
1886
  message: string;
@@ -1977,18 +1903,14 @@ interface ConsentLegalCard extends BaseCard {
1977
1903
  };
1978
1904
  routingOptions: RoutingOptions;
1979
1905
  };
1980
- type: CardType.ConsentLegal;
1906
+ type: "consentlegal";
1981
1907
  }
1982
1908
  interface BaseTaskPage {
1983
1909
  buttonText: string;
1984
1910
  headline: string;
1911
+ type: RecordedTaskPageType;
1985
1912
  }
1986
- declare const enum RecordedTaskPageType {
1987
- AvPermission = "av_permission",
1988
- ScreenPermission = "screen_permission",
1989
- StartTask = "start_task",
1990
- CompleteTask = "complete_task"
1991
- }
1913
+ type RecordedTaskPageType = "av_permission" | "screen_permission" | "start_task" | "complete_task";
1992
1914
  interface PermissionTaskPage extends BaseTaskPage {
1993
1915
  captionText: string;
1994
1916
  headline: string;
@@ -2000,7 +1922,7 @@ interface PermissionTaskPage extends BaseTaskPage {
2000
1922
  skipButtonText?: string;
2001
1923
  svg: string;
2002
1924
  tryAgainButtonText: string;
2003
- type: RecordedTaskPageType.AvPermission;
1925
+ type: "av_permission";
2004
1926
  }
2005
1927
  interface ScreenTaskPage extends BaseTaskPage {
2006
1928
  captionText: string;
@@ -2008,19 +1930,19 @@ interface ScreenTaskPage extends BaseTaskPage {
2008
1930
  permissionDeniedHeadline: string;
2009
1931
  selectTabText: string;
2010
1932
  skipButtonText: string;
2011
- type: RecordedTaskPageType.ScreenPermission;
1933
+ type: "screen_permission";
2012
1934
  }
2013
1935
  interface StartTaskPage extends BaseTaskPage {
2014
1936
  captionText?: string;
2015
1937
  skipButtonText: string;
2016
1938
  taskDetail: string;
2017
- type: RecordedTaskPageType.StartTask;
1939
+ type: "start_task";
2018
1940
  }
2019
1941
  interface CompleteTaskPage extends BaseTaskPage {
2020
1942
  captionText?: string;
2021
1943
  skipButtonText: string;
2022
1944
  taskDetail: string;
2023
- type: RecordedTaskPageType.CompleteTask;
1945
+ type: "complete_task";
2024
1946
  }
2025
1947
  type RecordedTaskPage = PermissionTaskPage | ScreenTaskPage | StartTaskPage | CompleteTaskPage;
2026
1948
  interface RecordedTaskCardProperties {
@@ -2036,9 +1958,9 @@ interface RecordedTaskCard extends BaseCard {
2036
1958
  message: string;
2037
1959
  options: [];
2038
1960
  properties: RecordedTaskCardProperties;
2039
- routingOptions: RoutingOptions<Comparator.GivenUp>;
1961
+ routingOptions: RoutingOptions<"given_up">;
2040
1962
  };
2041
- type: CardType.RecordedTask;
1963
+ type: "recordedtask";
2042
1964
  }
2043
1965
  interface Labels {
2044
1966
  left: string;
@@ -2048,11 +1970,7 @@ interface RatingIcon {
2048
1970
  idx?: number;
2049
1971
  svg: string;
2050
1972
  }
2051
- declare enum ScaleLabelType {
2052
- Number = "number",
2053
- Smiley = "smiley",
2054
- Star = "star"
2055
- }
1973
+ type ScaleLabelType = "number" | "smiley" | "star";
2056
1974
  interface LikertCard extends BaseCard {
2057
1975
  props: {
2058
1976
  labels: Labels;
@@ -2068,9 +1986,9 @@ interface LikertCard extends BaseCard {
2068
1986
  scaleLabelType: ScaleLabelType;
2069
1987
  required: boolean;
2070
1988
  };
2071
- routingOptions: RoutingOptions<Comparator.Equal | Comparator.GivenUp | Comparator.GreaterThan | Comparator.GreaterThanOrEqual | Comparator.LessThan | Comparator.LessThanOrEqual | Comparator.NotEqual>;
1989
+ routingOptions: RoutingOptions<"eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "neq">;
2072
1990
  };
2073
- type: CardType.Likert;
1991
+ type: "likert";
2074
1992
  }
2075
1993
  interface OpenTextCard extends BaseCard {
2076
1994
  props: {
@@ -2081,14 +1999,15 @@ interface OpenTextCard extends BaseCard {
2081
1999
  buttonText?: string;
2082
2000
  captionText?: string;
2083
2001
  conceptUrl: ConceptUrl;
2002
+ footerHtml?: string;
2084
2003
  openTextPlaceholder?: string;
2085
2004
  required: boolean;
2086
2005
  richTextBody: RichTextBody;
2087
2006
  skipButtonText?: string;
2088
2007
  };
2089
- routingOptions: RoutingOptions<Comparator.Contains | Comparator.DoesNotContain>;
2008
+ routingOptions: RoutingOptions<"contains" | "notcontains">;
2090
2009
  };
2091
- type: CardType.Open;
2010
+ type: "open";
2092
2011
  }
2093
2012
  interface MultipleChoiceOption {
2094
2013
  createdAt: string;
@@ -2114,6 +2033,15 @@ interface CommonMultipleChoiceProps {
2114
2033
  buttonText?: string;
2115
2034
  captionText: string;
2116
2035
  conceptUrl: ConceptUrl;
2036
+ isDropdown?: boolean;
2037
+ /**
2038
+ * Placeholder text on the dropdown button when no items are selected
2039
+ */
2040
+ dropdownPlaceholderText?: string;
2041
+ /**
2042
+ * Text when multiple items are selected, such as "2 items selected" / "3 items selected"
2043
+ */
2044
+ dropdownMultiselectedText?: string;
2117
2045
  randomize: "none" | "all";
2118
2046
  required: boolean;
2119
2047
  };
@@ -2123,17 +2051,17 @@ interface MultiChoiceCard<C extends Comparator = DefaultComparator> extends Base
2123
2051
  routingOptions: RoutingOptions<C>;
2124
2052
  };
2125
2053
  }
2126
- interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<Comparator.Equal | Comparator.NotEqual | Comparator.ListAtLeastOne | Comparator.DoesNotInclude> {
2127
- type: CardType.MultipleChoice;
2054
+ interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<"eq" | "neq" | "list_alo" | "list_dni"> {
2055
+ type: "multiplechoice";
2128
2056
  }
2129
- interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<Comparator.ListAll | Comparator.ListAtLeastOne | Comparator.ListExact | Comparator.DoesNotInclude> {
2130
- type: CardType.MultipleSelect;
2057
+ interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<"list_all" | "list_alo" | "list_exact" | "list_dni"> {
2058
+ type: "multipleselect";
2131
2059
  }
2132
2060
  interface MatrixCard extends BaseCard {
2133
2061
  props: {
2134
2062
  options: MultipleChoiceOption[];
2135
2063
  message: string;
2136
- routingOptions: RoutingOptions<Comparator.Skipped | Comparator.Partial | Comparator.Answered>;
2064
+ routingOptions: RoutingOptions<"skipped" | "partial" | "answered">;
2137
2065
  properties: {
2138
2066
  buttonText?: string;
2139
2067
  captionText: string;
@@ -2146,7 +2074,7 @@ interface MatrixCard extends BaseCard {
2146
2074
  required: boolean;
2147
2075
  };
2148
2076
  };
2149
- type: CardType.Matrix;
2077
+ type: "matrix";
2150
2078
  }
2151
2079
  interface NPSCard extends BaseCard {
2152
2080
  props: {
@@ -2166,9 +2094,9 @@ interface NPSCard extends BaseCard {
2166
2094
  };
2167
2095
  required: boolean;
2168
2096
  };
2169
- routingOptions: RoutingOptions<Comparator.Equal | Comparator.GreaterThan | Comparator.GreaterThanOrEqual | Comparator.LessThan | Comparator.LessThanOrEqual | Comparator.NotEqual>;
2097
+ routingOptions: RoutingOptions<"eq" | "gt" | "gte" | "lt" | "lte" | "neq">;
2170
2098
  };
2171
- type: CardType.NPS;
2099
+ type: "nps";
2172
2100
  }
2173
2101
  interface VideoVoiceCard extends BaseCard {
2174
2102
  props: {
@@ -2178,6 +2106,7 @@ interface VideoVoiceCard extends BaseCard {
2178
2106
  buttonText: string;
2179
2107
  captionText: string;
2180
2108
  conceptUrl: null;
2109
+ hideRecordedPrompt?: boolean;
2181
2110
  mediaType: "video" | "audio";
2182
2111
  required: boolean;
2183
2112
  skipButtonText: string;
@@ -2186,14 +2115,15 @@ interface VideoVoiceCard extends BaseCard {
2186
2115
  };
2187
2116
  routingOptions: RoutingOptions;
2188
2117
  };
2189
- type: CardType.VideoVoice;
2118
+ type: "videovoice";
2190
2119
  }
2191
2120
  type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
2192
2121
 
2193
- type MatchType = "exactly" | "legacy";
2122
+ type InteractiveMatchType = "exactly" | "legacy";
2123
+ type PageUrlMatchType = "contains" | "exactly" | "legacy" | "notContains" | "regex" | "startsWith";
2194
2124
  interface InteractiveEvent {
2195
2125
  id: number;
2196
- matchType: MatchType;
2126
+ matchType: InteractiveMatchType;
2197
2127
  name: string;
2198
2128
  pattern: string;
2199
2129
  properties: {
@@ -2204,19 +2134,22 @@ interface InteractiveEvent {
2204
2134
  }
2205
2135
  interface PageUrlEvent {
2206
2136
  id: number;
2207
- matchType: MatchType | "contains" | "notContains" | "regex" | "startsWith";
2137
+ matchType: PageUrlMatchType;
2208
2138
  pattern: string;
2209
2139
  }
2210
2140
 
2211
2141
  declare enum DismissReason {
2212
- Closed = "close.click",
2213
- Complete = "survey.completed",
2214
- PageChange = "page.change",
2215
- API = "api",
2142
+ Closed = "close.click",// user clicked the close button
2143
+ Complete = "survey.completed",// user answered all questions
2144
+ FeedbackClosed = "feedback.closed",// user either clicked on feedback button or close button
2145
+ PageChange = "page.change",// productConfig.dismissOnPageChange == true and we detected a page change (excludes hash/query param changes)
2146
+ API = "api",// JS called Sprig('dismissActiveSurvey')
2216
2147
  Override = "override"
2217
2148
  }
2149
+ type StudyType = "feedbackButton" | "inProductSurvey";
2218
2150
  declare enum SprigEvent {
2219
2151
  ReplayCapture = "replay.capture",
2152
+ FeedbackButtonLoaded = "feedback.button.loaded",
2220
2153
  SDKReady = "sdk.ready",
2221
2154
  SurveyAppeared = "survey.appeared",
2222
2155
  SurveyClosed = "survey.closed",
@@ -2232,10 +2165,8 @@ declare enum SprigEvent {
2232
2165
  VisitorIDUpdated = "visitor.id.updated",
2233
2166
  QuestionAnswered = "question.answered"
2234
2167
  }
2235
- declare enum SprigEventData {
2236
- SurveyId = "survey.id"
2237
- }
2238
2168
  declare const EVENTS: {
2169
+ FEEDBACK_BUTTON_LOADED: SprigEvent;
2239
2170
  SDK_READY: SprigEvent;
2240
2171
  SURVEY_APPEARED: SprigEvent;
2241
2172
  SURVEY_CLOSED: SprigEvent;
@@ -2259,22 +2190,16 @@ declare const EVENTS: {
2259
2190
  PAGE_CHANGE: DismissReason;
2260
2191
  OVERRIDE: DismissReason;
2261
2192
  };
2262
- SURVEY_ID: SprigEventData;
2193
+ SURVEY_ID: string;
2263
2194
  };
2264
2195
  };
2265
- declare const enum InternalEventName {
2266
- VerifyViewVersion = "verify.view.version",
2267
- CurrentQuestion = "survey.question",
2268
- ViewPrototypeClick = "question.prototype.click",
2269
- ViewAgreementClick = "question.agreement.click",
2270
- RecordedTaskStart = "recorded.task.start",
2271
- RecordedTaskPermissionScreen = "recorded.task.permission.screen",
2272
- SurveyComplete = "survey.complete"
2273
- }
2274
- declare const enum InternalEventData {
2275
- ViewVersion = "view.version",
2276
- QuestionId = "qid",
2277
- Props = "props"
2196
+
2197
+ type Metric = "sdk_event_queue_latency_seconds" | "sdk_replay_add_event_batch_seconds" | "sdk_replay_cleanup_seconds" | "sdk_replay_compression_seconds" | "sdk_replay_get_events_between_seconds" | "sdk_replay_snapshot_seconds" | "sdk_mutations_nodes_added" | "sdk_mutations_nodes_removed" | "sdk_mutations_attributes_changed" | "sdk_mutations_character_data" | "sdk_dom_nodes_count" | "sdk_page_html_characters";
2198
+ type ThresholdType = "max" | "min";
2199
+ interface MetricThreshold {
2200
+ metric: Metric;
2201
+ type: ThresholdType;
2202
+ value: number;
2278
2203
  }
2279
2204
 
2280
2205
  interface RecordedTaskResponseType {
@@ -2283,41 +2208,13 @@ interface RecordedTaskResponseType {
2283
2208
  value: RecordedTaskResponseValueType;
2284
2209
  }
2285
2210
 
2286
- declare enum ReplayDurationType {
2287
- After = "after",
2288
- Before = "before",
2289
- BeforeAndAfter = "beforeAndAfter"
2290
- }
2291
- declare enum ReplayEventType {
2292
- Click = "Sprig_Click",
2293
- Event = "Sprig_TrackEvent",
2294
- PageView = "Sprig_PageView",
2295
- SurveyShown = "Sprig_ShowSurvey",
2296
- SurveySubmitted = "Sprig_SubmitSurvey",
2297
- Noop = "Sprig_Noop"
2298
- }
2299
- type EventDigest = {
2300
- timestamp: number;
2301
- type: ReplayEventType.Click;
2302
- } | {
2303
- timestamp: number;
2304
- name: string;
2305
- type: ReplayEventType.Event;
2306
- } | {
2307
- timestamp: number;
2308
- type: ReplayEventType.PageView;
2309
- url: string;
2310
- } | {
2311
- timestamp: number;
2312
- surveyId: string;
2313
- type: ReplayEventType.SurveyShown;
2314
- } | {
2315
- timestamp: number;
2316
- surveyId: string;
2317
- type: ReplayEventType.SurveySubmitted;
2318
- };
2211
+ type SurveyState = "ready" | "no survey";
2212
+ type ReplayDurationType = "after" | "before" | "beforeAndAfter";
2319
2213
 
2320
2214
  interface MobileReplayConfig {
2215
+ mobileMetricsReportingEnabled?: boolean;
2216
+ metricsReportingInterval?: number;
2217
+ metricsThresholds?: MetricThreshold[];
2321
2218
  maxMobileReplayDurationSeconds?: number;
2322
2219
  mobileReplaySettings?: {
2323
2220
  hideAllFormContents: boolean;
@@ -2326,26 +2223,32 @@ interface MobileReplayConfig {
2326
2223
  };
2327
2224
  }
2328
2225
  type SprigEventMap = {
2329
- [InternalEventName.CurrentQuestion]: [
2226
+ "survey.question": [
2330
2227
  {
2331
- [InternalEventData.QuestionId]: number;
2332
- [InternalEventData.Props]: unknown;
2228
+ qid: number;
2229
+ props: unknown;
2333
2230
  }
2334
2231
  ];
2335
- [InternalEventName.RecordedTaskPermissionScreen]: [];
2336
- [InternalEventName.RecordedTaskStart]: [];
2337
- [InternalEventName.SurveyComplete]: [];
2338
- [InternalEventName.VerifyViewVersion]: [
2232
+ "recorded.task.permission.screen": [];
2233
+ "recorded.task.start": [];
2234
+ "survey.complete": [number];
2235
+ "verify.view.version": [
2339
2236
  {
2340
- [InternalEventData.ViewVersion]: string;
2237
+ "view.version": string;
2341
2238
  }
2342
2239
  ];
2343
2240
  [SprigEvent.CloseSurveyOnOverlayClick]: [];
2241
+ [SprigEvent.FeedbackButtonLoaded]: [
2242
+ {
2243
+ name: string;
2244
+ "survey.id"?: number;
2245
+ }
2246
+ ];
2344
2247
  [SprigEvent.SDKReady]: [MobileReplayConfig];
2345
2248
  [SprigEvent.SurveyAppeared]: [
2346
2249
  {
2347
2250
  name: string;
2348
- [SprigEventData.SurveyId]: number;
2251
+ "survey.id": number;
2349
2252
  }
2350
2253
  ];
2351
2254
  [SprigEvent.SurveyDimensions]: [
@@ -2359,6 +2262,7 @@ type SprigEventMap = {
2359
2262
  {
2360
2263
  initiator?: string;
2361
2264
  name: string;
2265
+ studyType?: StudyType;
2362
2266
  }
2363
2267
  ];
2364
2268
  [SprigEvent.SurveyFadingOut]: [];
@@ -2380,19 +2284,20 @@ type SprigEventMap = {
2380
2284
  [SprigEvent.SurveyPresented]: [
2381
2285
  {
2382
2286
  name: string;
2383
- [SprigEventData.SurveyId]: number;
2287
+ "survey.id": number;
2384
2288
  }
2385
2289
  ];
2386
2290
  [SprigEvent.SurveyWillClose]: [
2387
2291
  {
2388
2292
  initiator: DismissReason;
2389
2293
  name?: string;
2294
+ studyType?: StudyType;
2390
2295
  }
2391
2296
  ];
2392
2297
  [SprigEvent.SurveyWillPresent]: [
2393
2298
  {
2394
2299
  name: string;
2395
- [SprigEventData.SurveyId]: number;
2300
+ "survey.id": number;
2396
2301
  }
2397
2302
  ];
2398
2303
  [SprigEvent.VisitorIDUpdated]: [{
@@ -2412,47 +2317,56 @@ type SprigEventMap = {
2412
2317
  uploadId: string;
2413
2318
  seconds: number;
2414
2319
  replayType: ReplayDurationType;
2415
- generateVideoUploadUrlPayload: object;
2320
+ generateVideoUploadUrlPayload: {
2321
+ isReplay: boolean;
2322
+ mediaRecordingUid: string;
2323
+ mediaType: MediaType;
2324
+ questionId: number;
2325
+ responseGroupUid: string;
2326
+ surveyId: number;
2327
+ updatedAt: string;
2328
+ visitorId: string | null;
2329
+ };
2416
2330
  surveyId: number;
2417
2331
  }
2418
2332
  ];
2419
- [SprigRecordingEvent.AvPermission]: [
2333
+ "av.permission": [
2420
2334
  {
2421
- [SprigRecordingEventData.StreamReadyCallback]: (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
2422
- [SprigRecordingEventData.PermissionDescriptors]: AvPermission[];
2335
+ "stream.ready": (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
2336
+ "permission.descriptors": AvPermission[];
2423
2337
  }
2424
2338
  ];
2425
- [SprigRecordingEvent.BeginRecording]: [
2339
+ "begin.recording": [
2426
2340
  {
2427
- [SprigRecordingEventData.RecordingMediaTypes]: MediaType[];
2428
- [SprigRecordingEventData.StartRecordingCallback]: (mediaRecordingUids: UUID[]) => void;
2341
+ "recording.media.types": MediaType[];
2342
+ "start.recording.callback": (mediaRecordingUids: UUID[]) => void;
2429
2343
  }
2430
2344
  ];
2431
- [SprigRecordingEvent.FinishTask]: [
2345
+ "finish.task": [
2432
2346
  {
2433
- [SprigRecordingEventData.BeginCallback]: (mediaRecordingUid: UUID) => void;
2434
- [SprigRecordingEventData.CurrentIndex]: number;
2435
- [SprigRecordingEventData.PassthroughData]: PassthroughData;
2436
- [SprigRecordingEventData.ProgressCallback]: (mediaRecordingUid: UUID, data: {
2347
+ "begin.callback": (mediaRecordingUid: UUID) => void;
2348
+ "current.index": number;
2349
+ "passthrough.data": PassthroughData;
2350
+ "progress.callback": (mediaRecordingUid: UUID, data: {
2437
2351
  detail: number;
2438
2352
  }) => void;
2439
- [SprigRecordingEventData.TaskCompleteCallback]: (taskDurationMillisecond: number) => void;
2440
- [SprigRecordingEventData.TaskResponse]: RecordedTaskResponseType;
2441
- [SprigRecordingEventData.UploadCallback]: (mediaRecordingUid: UUID | null, successOrError: true | unknown) => void;
2353
+ "task.complete.callback": (taskDurationMillisecond: number) => void;
2354
+ "task.response": RecordedTaskResponseType;
2355
+ "upload.callback": (mediaRecordingUid: UUID | null, successOrError: true | unknown) => void;
2442
2356
  }
2443
2357
  ];
2444
- [SprigRecordingEvent.PermissionStatus]: [
2358
+ "permission.status": [
2445
2359
  {
2446
- [SprigRecordingEventData.PermissionStatusCallback]: (avStream: MediaStream | undefined, hasVideoPermission: boolean, hasScreenPermission: boolean, captureStream: MediaStream | undefined) => void;
2360
+ "permission.status.callback": (avStream: MediaStream | undefined, hasVideoPermission: boolean, hasScreenPermission: boolean, captureStream: MediaStream | undefined) => void;
2447
2361
  }
2448
2362
  ];
2449
- [SprigRecordingEvent.ScreenPermission]: [
2363
+ "screen.permission": [
2450
2364
  {
2451
- [SprigRecordingEventData.ScreenPermissionRequested]?: (data: boolean) => void;
2452
- [SprigRecordingEventData.StreamReadyCallback]: (avStream: MediaStream | null, captureStream: MediaStream | null) => void;
2365
+ "screen.permission.requested"?: (data: boolean) => void;
2366
+ "stream.ready.callback": (avStream: MediaStream | null, captureStream: MediaStream | null) => void;
2453
2367
  }
2454
2368
  ];
2455
- [SprigRecordingEvent.StartTask]: [];
2369
+ "start.task": [];
2456
2370
  };
2457
2371
  declare const eventEmitter: Emitter<SprigEventMap>;
2458
2372
  type SprigEventEmitter = typeof eventEmitter;
@@ -2465,42 +2379,20 @@ declare const LogLevels: {
2465
2379
  };
2466
2380
  type LogLevel = (typeof LogLevels)[keyof typeof LogLevels];
2467
2381
 
2468
- declare const enum FramePosition {
2469
- BottomLeft = "bottomLeft",
2470
- BottomRight = "bottomRight",
2471
- Center = "center",
2472
- TopLeft = "topLeft",
2473
- TopRight = "topRight"
2474
- }
2475
- declare const enum HttpHeader {
2476
- Error = "x-ul-error",
2477
- EnvironmentID = "x-ul-environment-id",
2478
- InstallationMethod = "x-ul-installation-method",
2479
- PartnerAnonymousId = "x-ul-anonymous-id",
2480
- Platform = "userleap-platform",
2481
- PreviewMode = "x-ul-preview-mode",
2482
- UserID = "x-ul-user-id",
2483
- VisitorID = "x-ul-visitor-id"
2484
- }
2485
- declare const enum Platform {
2486
- Email = "email",
2487
- Link = "link",
2488
- Web = "web"
2489
- }
2490
- declare const enum InstallationMethod {
2491
- Npm = "web-npm",
2492
- NpmBundled = "web-npm-bundled",
2493
- Gtm = "web-gtm",
2494
- Segment = "web-segment",
2495
- SegmentAndroid = "android-segment",
2496
- SegmentReactNative = "react-native-segment",
2497
- SegmentIOS = "ios-segment",
2498
- Snippet = "web-snippet"
2499
- }
2382
+ type FramePosition = "bottomLeft" | "bottomRight" | "center" | "topLeft" | "topRight";
2383
+ type Platform = "email" | "link" | "web";
2384
+ type InstallationMethod = "web-npm" | "web-npm-bundled" | "web-gtm" | "web-segment" | "android-segment" | "react-native-segment" | "ios-segment" | "web-snippet";
2500
2385
  interface Answer {
2501
2386
  questionId: number;
2502
2387
  value: unknown;
2503
2388
  }
2389
+ type FeedbackPlacement = "center-left" | "center-right" | "bottom-left" | "bottom-right";
2390
+ type FeedbackDesktopDisplay = "center-modal" | "slider";
2391
+ interface AppProductConfig {
2392
+ framePosition?: FramePosition;
2393
+ desktopDisplay?: FeedbackDesktopDisplay;
2394
+ placement?: FeedbackPlacement;
2395
+ }
2504
2396
  interface Config extends MobileReplayConfig {
2505
2397
  allResponses: unknown[];
2506
2398
  answers?: Answer[];
@@ -2519,7 +2411,7 @@ interface Config extends MobileReplayConfig {
2519
2411
  };
2520
2412
  };
2521
2413
  customMetadata?: Record<string, unknown>;
2522
- customStyles: string;
2414
+ customStyles?: string;
2523
2415
  dismissOnPageChange: boolean;
2524
2416
  forceBrandedLogo?: boolean;
2525
2417
  endCard?: {
@@ -2544,23 +2436,26 @@ interface Config extends MobileReplayConfig {
2544
2436
  "accept-language"?: string;
2545
2437
  /** @example "Bearer 123" */
2546
2438
  Authorization?: string;
2547
- "Content-Type": string;
2548
- "userleap-platform": Platform;
2439
+ "Content-Type"?: string;
2440
+ "userleap-platform": Platform | "ios" | "android" | "video_recorder";
2441
+ "sprig-modules"?: string;
2549
2442
  /** @example "SJcVfq-7QQ" */
2550
- [HttpHeader.EnvironmentID]?: string;
2551
- [HttpHeader.InstallationMethod]: InstallationMethod;
2552
- [HttpHeader.PartnerAnonymousId]?: string;
2553
- [HttpHeader.PreviewMode]?: string;
2443
+ "x-ul-environment-id"?: string;
2444
+ "x-ul-installation-method": InstallationMethod;
2445
+ "x-ul-anonymous-id"?: string;
2446
+ "x-ul-error"?: string;
2447
+ "x-ul-preview-mode"?: string;
2554
2448
  /** @example "2.18.0" */
2555
- "x-ul-sdk-version": string;
2449
+ "x-ul-sdk-version"?: string;
2556
2450
  /** For web-bundled sdk */
2557
2451
  "x-ul-package-version"?: string;
2558
- [HttpHeader.UserID]?: string;
2559
- [HttpHeader.VisitorID]?: UUID;
2452
+ "x-ul-user-id"?: string;
2453
+ "x-ul-visitor-id"?: string;
2560
2454
  };
2561
2455
  installationMethod?: InstallationMethod;
2562
2456
  interactiveEvents: InteractiveEvent[];
2563
2457
  interactiveEventsHandler?: (e: MouseEvent) => void;
2458
+ isOnQuestionsTab?: boolean;
2564
2459
  isPreview?: boolean;
2565
2460
  launchDarklyEnabled?: boolean;
2566
2461
  locale: string;
@@ -2583,7 +2478,8 @@ interface Config extends MobileReplayConfig {
2583
2478
  path?: string;
2584
2479
  platform?: Platform;
2585
2480
  previewKey?: string | null;
2586
- previewLanguage?: string;
2481
+ previewMode?: boolean;
2482
+ productConfig?: AppProductConfig;
2587
2483
  replayNonce?: string;
2588
2484
  replaySettings?: object;
2589
2485
  requireUserIdForTracking: boolean;
@@ -2593,10 +2489,13 @@ interface Config extends MobileReplayConfig {
2593
2489
  slugName: null;
2594
2490
  startingQuestionIdx?: number | null;
2595
2491
  styleNonce?: string;
2492
+ studyType?: StudyType;
2596
2493
  surveyId: number;
2597
2494
  tabTitle: string;
2495
+ trackPageViewUrl?: string;
2598
2496
  ulEvents: typeof SprigEvent;
2599
2497
  UpChunk: Window["UpChunk"];
2498
+ upchunkLibraryURL?: string;
2600
2499
  useDesktopPrototype?: boolean;
2601
2500
  useMobileStyling: boolean;
2602
2501
  userId: UUID | null;
@@ -2632,10 +2531,26 @@ declare class SprigQueue {
2632
2531
  empty(): void;
2633
2532
  }
2634
2533
 
2635
- declare enum SurveyState {
2636
- Ready = "ready",
2637
- NoSurvey = "no survey"
2638
- }
2534
+ type EventDigest = {
2535
+ timestamp: number;
2536
+ type: "Sprig_Click";
2537
+ } | {
2538
+ timestamp: number;
2539
+ name: string;
2540
+ type: "Sprig_TrackEvent";
2541
+ } | {
2542
+ timestamp: number;
2543
+ type: "Sprig_PageView";
2544
+ url: string;
2545
+ } | {
2546
+ timestamp: number;
2547
+ surveyId: string;
2548
+ type: "Sprig_ShowSurvey";
2549
+ } | {
2550
+ timestamp: number;
2551
+ surveyId: string;
2552
+ type: "Sprig_SubmitSurvey";
2553
+ };
2639
2554
 
2640
2555
  declare namespace optimizely {
2641
2556
  interface Optimizely {
@@ -2679,6 +2594,7 @@ declare namespace optimizely {
2679
2594
  declare namespace sprigConfig {
2680
2595
  type IdentifyResult = Promise<
2681
2596
  | {
2597
+ error?: Error;
2682
2598
  success: boolean;
2683
2599
  message?: string;
2684
2600
  surveyState?: SurveyState;
@@ -2716,10 +2632,12 @@ declare namespace sprigConfig {
2716
2632
  }) => Promise<string | null>;
2717
2633
  _previewSurvey: (surveyTemplateId: UUID) => void;
2718
2634
  _reviewSurvey: (surveyId: number) => void;
2635
+ _reportMetric: (name: Metric, value: number) => void;
2719
2636
 
2720
2637
  // external apis
2721
2638
  addListener: (event: SprigEvent, listener: SprigListener) => Promise<void>;
2722
2639
  addSurveyListener: (listener: SprigListener) => Promise<void>;
2640
+ applyFeedbackStyles: (styles: { button?: string; view?: string }) => void;
2723
2641
  applyStyles: (styleString: string) => void;
2724
2642
  dismissActiveSurvey: (reason?: DismissReason) => void;
2725
2643
  displaySurvey: (surveyId: number) => IdentifyResult;
@@ -2778,6 +2696,7 @@ declare namespace sprigConfig {
2778
2696
  url: string,
2779
2697
  properties?: SprigProperties,
2780
2698
  showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
2699
+ calledFromApi?: boolean,
2781
2700
  ) => void;
2782
2701
  unmute: () => void;
2783
2702
  }
@@ -2792,7 +2711,10 @@ declare namespace sprigConfig {
2792
2711
  SprigAPIActions &
2793
2712
  SprigCommands & {
2794
2713
  _API_URL: string;
2795
- _config: Config;
2714
+ _config: Config & {
2715
+ desktopDisplay?: string;
2716
+ previewLanguage?: string;
2717
+ };
2796
2718
  _gtm: unknown; // TODO: determine if boolean?
2797
2719
  _queue: SprigQueue;
2798
2720
  _segment: unknown; // TODO: determine if boolean?
@@ -2804,7 +2726,9 @@ declare namespace sprigConfig {
2804
2726
  email?: string | null;
2805
2727
  envId: string;
2806
2728
  error?: Error;
2729
+ feedbackCustomStyles?: string;
2807
2730
  frameId: string;
2731
+ isMobileSDK?: boolean;
2808
2732
  loaded: boolean;
2809
2733
  locale?: string;
2810
2734
  maxHeight?: number | string;
@@ -2812,10 +2736,12 @@ declare namespace sprigConfig {
2812
2736
  mobileHeadersJSON?: string;
2813
2737
  nonce?: string;
2814
2738
  partnerAnonymousId: string | null;
2739
+ replayLibraryURL?: string;
2815
2740
  replayNonce?: string;
2816
- reportError: (name: string, err: Error, extraInfo?: object) => void;
2741
+ reportError: (name: string, err: Error, extraInfo?: object, bodyInfo?: object) => void;
2817
2742
  sampleRate?: number;
2818
2743
  token: string | null;
2744
+ upchunkLibraryURL?: string;
2819
2745
  UPDATES: typeof EVENTS;
2820
2746
  viewSDKURL?: string;
2821
2747
  windowDimensions?: {
@@ -2829,9 +2755,9 @@ type ArgumentType<T> = T extends (arg1: infer U, ...args: unknown[]) => unknown
2829
2755
  ? U
2830
2756
  : unknown;
2831
2757
  type PublicOf<T> = { [K in keyof T]: T[K] };
2832
- type createUpload = (typeof _mux_upchunk)["createUpload"];
2833
2758
  type rrwebRecord = (typeof rrweb)["record"];
2834
2759
  type rrwebCustomEvent = (typeof rrweb)["record"]["addCustomEvent"];
2760
+ type rrwebFullSnapshot = (typeof rrweb)["record"]["takeFullSnapshot"];
2835
2761
  declare global {
2836
2762
  interface Window {
2837
2763
  __cfg: Config;
@@ -2847,9 +2773,7 @@ declare global {
2847
2773
  optimizelyDatafile?: object;
2848
2774
  previewMode?: unknown;
2849
2775
  UpChunk: {
2850
- createUpload: (
2851
- ...args: ArgumentTypes<createUpload>
2852
- ) => PublicOf<ReturnType<createUpload>>;
2776
+ createUpload: typeof createUpload;
2853
2777
  };
2854
2778
  _Sprig?: sprigConfig.WindowSprig;
2855
2779
  Sprig: sprigConfig.WindowSprig;
@@ -2858,6 +2782,9 @@ declare global {
2858
2782
  addCustomEvent: (
2859
2783
  ...args: ArgumentTypes<rrwebCustomEvent>
2860
2784
  ) => PublicOf<ReturnType<rrwebCustomEvent>>;
2785
+ takeFullSnapshot: (
2786
+ ...args: ArgumentTypes<rrwebFullSnapshot>
2787
+ ) => PublicOf<ReturnType<rrwebFullSnapshot>>;
2861
2788
  } & ((
2862
2789
  arg: Omit<ArgumentType<rrwebRecord>, "hooks">,
2863
2790
  ) => PublicOf<ReturnType<rrwebRecord>>);
@@ -2867,7 +2794,13 @@ declare global {
2867
2794
  type WindowSprig = sprigConfig.WindowSprig;
2868
2795
  type SprigAttributes = Record<string, boolean | number | string>;
2869
2796
  type SprigListener = Listener<unknown[]>;
2870
- type SprigMetadata = Record<string, unknown>;
2797
+ type SprigMetadata = {
2798
+ url?: string;
2799
+ trackPageView?: boolean;
2800
+ optimizelyExperiments?: object;
2801
+ launchDarklyFlags?: object;
2802
+ eventProperties?: SprigProperties;
2803
+ };
2871
2804
  type SprigProperties = Record<string, unknown>;
2872
2805
  type SprigAPIActions = sprigConfig.SprigAPIActions;
2873
2806
  type TrackPayload = sprigConfig.TrackPayload;
@@ -2882,13 +2815,17 @@ declare class SprigAPI {
2882
2815
  * Include external events emitted from Sprig
2883
2816
  */
2884
2817
  UPDATES: {
2818
+ FEEDBACK_BUTTON_LOADED: SprigEvent;
2885
2819
  SDK_READY: SprigEvent;
2886
2820
  SURVEY_APPEARED: SprigEvent;
2887
2821
  SURVEY_CLOSED: SprigEvent;
2888
2822
  SURVEY_DIMENSIONS: SprigEvent;
2889
2823
  SURVEY_FADING_OUT: SprigEvent;
2890
2824
  SURVEY_HEIGHT: SprigEvent;
2891
- SURVEY_WIDTH: SprigEvent;
2825
+ SURVEY_WIDTH: SprigEvent; /**
2826
+ * Track an event to show survey if eligible
2827
+ * @param eventName name of event to track
2828
+ */
2892
2829
  SURVEY_PRESENTED: SprigEvent;
2893
2830
  SURVEY_LIFE_CYCLE: SprigEvent;
2894
2831
  SURVEY_WILL_CLOSE: SprigEvent;
@@ -2905,7 +2842,7 @@ declare class SprigAPI {
2905
2842
  PAGE_CHANGE: DismissReason;
2906
2843
  OVERRIDE: DismissReason;
2907
2844
  };
2908
- SURVEY_ID: SprigEventData;
2845
+ SURVEY_ID: string;
2909
2846
  };
2910
2847
  };
2911
2848
  /**