-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsessionReplay.d.ts
More file actions
1879 lines (1879 loc) · 55.1 KB
/
Copy pathsessionReplay.d.ts
File metadata and controls
1879 lines (1879 loc) · 55.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* DO NOT MODIFY IT BY HAND. Run `yarn generate` instead.
*/
/**
* Schema of all properties of Session Replay
*/
export type SessionReplay = Segment & SegmentMetadata & Record & FullSnapshotRecord & IncrementalSnapshotRecord & IncrementalData & MutationData & MutationPayload;
/**
* Schema of a Session Replay data Segment.
*/
export type Segment = BrowserSegment | MobileSegment;
/**
* Browser-specific. Schema of a Session Replay data Segment.
*/
export type BrowserSegment = BrowserSegmentMetadata & {
/**
* The records contained by this Segment.
*/
readonly records: BrowserRecord[];
};
/**
* Browser-specific. Schema of a Session Replay Segment metadata.
*/
export type BrowserSegmentMetadata = SegmentContext & CommonSegmentMetadataSchema & {
/**
* The source of this record
*/
source: 'browser';
creation_reason: CreationReason;
};
/**
* The reason this Segment was created. For mobile there is only one possible value for this, which is always the default value.
*/
export type CreationReason = 'init' | 'segment_duration_limit' | 'segment_bytes_limit' | 'view_change' | 'before_unload' | 'visibility_hidden' | 'page_frozen';
/**
* Browser-specific. Schema of a Session Replay Record.
*/
export type BrowserRecord = BrowserFullSnapshotRecord | BrowserIncrementalSnapshotRecord | MetaRecord | FocusRecord | ViewEndRecord | VisualViewportRecord | FrustrationRecord | BrowserChangeRecord;
/**
* Browser-specific. Schema of a Record type which contains a full snapshot of a document.
*/
export type BrowserFullSnapshotRecord = BrowserFullSnapshotV1Record | BrowserFullSnapshotChangeRecord;
/**
* Browser-specific. Schema of a Record type which contains a full snapshot of a document in V1 format.
*/
export type BrowserFullSnapshotV1Record = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 2;
readonly format?: SnapshotFormatV1;
data: BrowserNode;
};
/**
* Schema of common properties for a Record event type that is supported by slots.
*/
export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
/**
* Unique ID of the slot that generated this record.
*/
readonly slotId?: string;
};
/**
* The V1 snapshot format.
*/
export type SnapshotFormatV1 = 0;
/**
* Serialized node contained by this Record.
*/
export type SerializedNodeWithId = {
id: number;
} & SerializedNode;
/**
* Serialized node contained by this Record.
*/
export type SerializedNode = DocumentNode | DocumentFragmentNode | DocumentTypeNode | ElementNode | TextNode | CDataNode;
/**
* Browser-specific. Schema of a Record type which contains a full snapshot of a document in Change format.
*/
export type BrowserFullSnapshotChangeRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 2;
readonly format: SnapshotFormatChange;
data: Change[];
};
/**
* The Change snapshot format.
*/
export type SnapshotFormatChange = 1;
/**
* Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
*/
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]] | [11, ...AddStringNamespaceChange[]] | [12, ...AddNamespacedStringChange[]];
/**
* Browser-specific. Schema representing the addition of a string to the default string namespace.
*/
export type AddStringChange = string;
/**
* Browser-specific. Schema representing the addition of a new node to the document.
*/
export type AddNodeChange = AddCDataSectionNodeChange | AddDocTypeNodeChange | AddDocumentNodeChange | AddDocumentFragmentNodeChange | AddElementNodeChange | AddShadowRootNodeChange | AddTextNodeChange;
/**
* Schema representing the addition of a new #cdata-section node.
*
* @minItems 2
*/
export type AddCDataSectionNodeChange = [InsertionPoint, '#cdata-section' | StringReference];
/**
* Browser-specific. Schema representing the insertion point of a node which is being added to the document.
*/
export type InsertionPoint = AppendChildInsertionPoint | InsertAfterPreviousInsertionPoint | InsertBeforeInsertionPoint | RootInsertionPoint;
/**
* A positive integer insertion point. Inserting a node at positive integer N indicates that the new node's parent is the node with an id N lower than the new node, and that we should insert the new node at the end of its parent's child list, as if the DOM method appendChild() was being used.
*/
export type AppendChildInsertionPoint = number;
/**
* A zero insertion point. Inserting a node at zero indicates that the new node should be inserted after the node with an id one lower than the new node, as if the DOM method after() is being used. Using a zero insertion point repeatedly is thus a quick way to insert a sequence of sibling elements.
*/
export type InsertAfterPreviousInsertionPoint = 0;
/**
* A negative integer insertion point. Inserting a node at negative integer -N indicates that the new node's next sibling is the node with an id N lower than the new node, and that we should insert the new node before its next sibling, as if the DOM method insertBefore() was being used.
*/
export type InsertBeforeInsertionPoint = number;
/**
* A null insertion point, indicating that the node should be inserted at the root of the document.
*/
export type RootInsertionPoint = null;
/**
* Browser-specific. Schema representing a string, expressed as an index into the string table.
*/
export type StringReference = number;
/**
* Schema representing the addition of a new #doctype node, using the format [#doctype, name, public ID, system ID].
*
* @minItems 5
*/
export type AddDocTypeNodeChange = [
InsertionPoint,
'#doctype' | StringReference,
StringOrStringReference,
StringOrStringReference,
StringOrStringReference
];
/**
* Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string namespace, or as an index into the string table.
*/
export type StringOrStringReference = StringLiteral | NamespacedStringLiteral | StringReference;
/**
* Browser-specific. Schema representing a string, expressed as a literal.
*/
export type StringLiteral = string;
/**
* Browser-specific. Schema representing a string namespace, either expressed as a literal name or as a numeric reference.
*/
export type StringNamespaceOrStringNamespaceReference = StringNamespaceName | StringNamespaceReference;
/**
* Browser-specific. Schema representing a string namespace, expressed as a literal name.
*/
export type StringNamespaceName = string;
/**
* Browser-specific. Schema representing a string namespace, expressed as a numeric reference. The reference 0 refers to the default string namespace; higher values refer to each additional string namespace, in the order they were created.
*/
export type StringNamespaceReference = number;
/**
* Schema representing the addition of a new #document node.
*
* @minItems 2
*/
export type AddDocumentNodeChange = [InsertionPoint, '#document' | StringReference];
/**
* Schema representing the addition of a new #document-fragment node.
*
* @minItems 2
*/
export type AddDocumentFragmentNodeChange = [InsertionPoint, '#document-fragment' | StringReference];
/**
* Schema representing the addition of a new element node.
*
* @minItems 2
*/
export type AddElementNodeChange = [InsertionPoint, string | StringReference, ...AttributeAssignment[]];
/**
* Schema representing an assignment of a value to an attribute. The format is [name, value].
*
* @minItems 2
*/
export type AttributeAssignment = [StringOrStringReference, StringOrStringReference];
/**
* Schema representing the addition of a new #shadow-root node.
*
* @minItems 2
*/
export type AddShadowRootNodeChange = [InsertionPoint, '#shadow-root' | StringReference];
/**
* Schema representing the addition of a new #text node.
*
* @minItems 3
*/
export type AddTextNodeChange = [InsertionPoint, '#text' | StringReference, StringOrStringReference];
/**
* Browser-specific. Schema representing the removal of a node from the document.
*/
export type RemoveNodeChange = number;
/**
* Browser-specific. Schema representing a change to an node's attributes.
*
* @minItems 1
*/
export type AttributeChange = [NodeId, ...AttributeAssignmentOrDeletion[]];
/**
* Browser-specific. Schema representing the ID of a DOM node.
*/
export type NodeId = number;
/**
* Schema representing a change to an attribute, either by assignment of a new value or by deletion of the attribute.
*/
export type AttributeAssignmentOrDeletion = AttributeAssignment | AttributeDeletion;
/**
* Schema representing the deletion of an attribute.
*
* @minItems 1
*/
export type AttributeDeletion = [StringOrStringReference];
/**
* Browser-specific. Schema representing a change to the text content of a #text node.
*
* @minItems 2
*/
export type TextChange = [NodeId, StringOrStringReference];
/**
* Browser-specific. Schema representing a change in an element's size.
*
* @minItems 3
*/
export type SizeChange = [NodeId, number, number];
/**
* Browser-specific. Schema representing a scroll position change.
*
* @minItems 3
*/
export type ScrollPositionChange = [NodeId, number, number];
/**
* Browser-specific. Schema representing the addition of a new stylesheet to the document.
*/
export type AddStyleSheetChange = StyleSheetSnapshot;
/**
* Schema representing a snapshot of a CSS stylesheet.
*
* @minItems 1
*/
export type StyleSheetSnapshot = [
StyleSheetRules
] | [StyleSheetRules, StyleSheetMediaList] | [StyleSheetRules, StyleSheetMediaList, boolean];
/**
* Schema representing a CSS stylesheet's rules, encoded either as a single string or as an array containing a separate string for each rule.
*/
export type StyleSheetRules = StringOrStringReference | StringOrStringReference[];
/**
* If non-empty, the list of medias for which this stylesheet is active. Defaults to the empty list if not present.
*/
export type StyleSheetMediaList = StringOrStringReference[];
/**
* Browser-specific. Schema representing a change to the stylesheets attached to a DOM node. For <link> or <style> elements, which use classic CSSOM APIs, at most one stylesheet can be attached. For #document, #document-fragment, or #shadow-root nodes, which use the `adoptedStyleSheets` API, any number of stylesheets can be attached.
*
* @minItems 1
*/
export type AttachedStyleSheetsChange = [NodeId, ...StyleSheetId[]];
/**
* Browser-specific. Schema representing the ID of a stylesheet.
*/
export type StyleSheetId = number;
/**
* Browser-specific. Schema representing a change to the playback state of the media associated with an <audio> or <video> element.
*
* @minItems 2
*/
export type MediaPlaybackStateChange = [NodeId, PlaybackStatePlaying | PlaybackStatePaused];
/**
* A playback state indicating that the associated media is playing.
*/
export type PlaybackStatePlaying = 0;
/**
* A playback state indicating that the associated media is paused.
*/
export type PlaybackStatePaused = 1;
/**
* Browser-specific. Schema representing a change to the visual viewport, defined in terms of the web platform VisualViewport API.
*
* @minItems 7
*/
export type VisualViewportChange = [
VisualViewportOffsetLeft,
VisualViewportOffsetTop,
VisualViewportPageLeft,
VisualViewportPageTop,
VisualViewportWidth,
VisualViewportHeight,
VisualViewportScale
];
/**
* The offset of the left edge of the visual viewport from the left edge of the layout viewport in CSS pixels.
*/
export type VisualViewportOffsetLeft = number;
/**
* The offset of the top edge of the visual viewport from the top edge of the layout viewport in CSS pixels.
*/
export type VisualViewportOffsetTop = number;
/**
* The x coordinate of the visual viewport relative to the initial containing block origin of the top edge in CSS pixels.
*/
export type VisualViewportPageLeft = number;
/**
* The y coordinate of the visual viewport relative to the initial containing block origin of the top edge in CSS pixels.
*/
export type VisualViewportPageTop = number;
/**
* The width of the visual viewport in CSS pixels.
*/
export type VisualViewportWidth = number;
/**
* The height of the visual viewport in CSS pixels.
*/
export type VisualViewportHeight = number;
/**
* The pinch-zoom scaling factor applied to the visual viewport.
*/
export type VisualViewportScale = number;
/**
* Browser-specific. Schema representing the addition of a new string namespace, identified by name.
*/
export type AddStringNamespaceChange = StringNamespaceName;
/**
* Browser-specific. Schema representing the addition of a sequence of strings to a string namespace.
*
* @minItems 1
*/
export type AddNamespacedStringChange = [StringNamespaceOrStringNamespaceReference, ...StringLiteral[]];
/**
* Browser-specific. Schema of a Record type which contains mutations of a screen.
*/
export type BrowserIncrementalSnapshotRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 3;
data: BrowserIncrementalData;
id?: number;
};
/**
* Browser-specific. Schema of a Session Replay IncrementalData type.
*/
export type BrowserIncrementalData = BrowserMutationData | MousemoveData | MouseInteractionData | ScrollData | InputData | MediaInteractionData | StyleSheetRuleData | ViewportResizeData | PointerInteractionData;
/**
* Browser-specific. Schema of a MutationData.
*/
export type BrowserMutationData = {
/**
* The source of this type of incremental data.
*/
readonly source: 0;
} & BrowserMutationPayload;
/**
* Browser-specific. Schema of a MutationPayload.
*/
export type BrowserMutationPayload = {
/**
* Contains the newly added nodes.
*/
adds: AddedNodeMutation[];
/**
* Contains the removed nodes.
*/
removes: RemovedNodeMutation[];
/**
* Contains the updated attribute mutations.
*/
attributes: AttributeMutation[];
/**
* Contains the updated text mutations.
*/
texts: TextMutation[];
};
/**
* Browser-specific. Schema of a MouseInteractionData.
*/
export type MouseInteractionData = {
/**
* The source of this type of incremental data.
*/
readonly source: 2;
} & MouseInteraction;
/**
* Browser-specific. Schema of a MouseInteraction.
*/
export type MouseInteraction = {
/**
* The type of MouseInteraction: 0=mouseup, 1=mousedown, 2=click, 3=contextmenu, 4=dblclick, 7=touchstart, 9=touchend
*/
readonly type: 0 | 1 | 2 | 3 | 4 | 7 | 9;
/**
* Id for the target node for this MouseInteraction.
*/
id: number;
/**
* X-axis coordinate for this MouseInteraction.
*/
x: number;
/**
* Y-axis coordinate for this MouseInteraction.
*/
y: number;
} | {
/**
* The type of MouseInteraction: 5=focus, 6=blur
*/
readonly type: 5 | 6;
/**
* Id for the target node for this MouseInteraction.
*/
id: number;
};
/**
* Browser-specific. Schema of a ScrollData.
*/
export type ScrollData = {
/**
* The source of this type of incremental data.
*/
readonly source: 3;
} & ScrollPosition;
/**
* Browser-specific. Schema of an InputData.
*/
export type InputData = {
/**
* The source of this type of incremental data.
*/
readonly source: 5;
/**
* Id for the target node for this InputData.
*/
id: number;
} & InputState;
/**
* Browser-specific. Schema of an InputState.
*/
export type InputState = {
/**
* Text value for this InputState.
*/
text: string;
} | {
/**
* Checked state for this InputState.
*/
isChecked: boolean;
};
/**
* Browser-specific. Schema of a MediaInteractionData.
*/
export type MediaInteractionData = {
/**
* The source of this type of incremental data.
*/
readonly source: 7;
} & MediaInteraction;
/**
* Browser-specific. Schema of a StyleSheetRuleData.
*/
export type StyleSheetRuleData = {
/**
* The source of this type of incremental data.
*/
readonly source: 8;
} & StyleSheetRule;
/**
* Schema of a ViewportResizeData.
*/
export type ViewportResizeData = {
/**
* The source of this type of incremental data.
*/
readonly source: 4;
} & ViewportResizeDimension;
/**
* Schema of a PointerInteractionData.
*/
export type PointerInteractionData = {
/**
* The source of this type of incremental data.
*/
readonly source: 9;
} & PointerInteraction;
/**
* Schema of a Record which contains the screen properties.
*/
export type MetaRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 4;
/**
* The data contained by this record.
*/
data: {
/**
* The width of the screen in pixels, normalized based on the device pixels per inch density (DPI). Example: if a device has a DPI = 2, the normalized width is the current width divided by 2.
*/
width: number;
/**
* The height of the screen in pixels, normalized based on the device pixels per inch density (DPI). Example: if a device has a DPI = 2, the normalized height is the current height divided by 2.
*/
height: number;
/**
* Browser-specific. URL of the view described by this record.
*/
href?: string;
};
};
/**
* Schema of a Record type which contains focus information.
*/
export type FocusRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 6;
data: {
/**
* Whether this screen has a focus or not. For now it will always be true for mobile.
*/
readonly has_focus: boolean;
};
};
/**
* Schema of a Record which signifies that view lifecycle ended.
*/
export type ViewEndRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 7;
};
/**
* Schema of a Record which signifies that the viewport properties have changed.
*/
export type VisualViewportRecord = SlotSupportedCommonRecordSchema & {
data: {
height: number;
offsetLeft: number;
offsetTop: number;
pageLeft: number;
pageTop: number;
scale: number;
width: number;
};
/**
* The type of this Record.
*/
readonly type: 8;
};
/**
* Schema of a Record which signifies a collection of frustration signals.
*/
export type FrustrationRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 9;
/**
* Schema of a Session Replay FrustrationRecord data structure type.
*/
data: {
/**
* Collection of frustration signal types.
*/
frustrationTypes: ('rage_click' | 'error_click' | 'dead_click')[];
/**
* Collection of frustration signal event IDs.
*/
recordIds: number[];
};
};
/**
* Browser-specific. Schema of a record type which represents changes using a compact encoding. (Experimental; subject to change.)
*/
export type BrowserChangeRecord = SlotSupportedCommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 12;
data: Change[];
id?: number;
};
/**
* Mobile-specific. Schema of a Session Replay data Segment.
*/
export type MobileSegment = MobileSegmentMetadata & {
/**
* The records contained by this Segment.
*/
readonly records: MobileRecord[];
};
/**
* Mobile-specific. Schema of a Session Replay Segment metadata.
*/
export type MobileSegmentMetadata = SegmentContext & CommonSegmentMetadataSchema & {
/**
* The source of this record
*/
source: 'android' | 'ios' | 'flutter' | 'react-native' | 'kotlin-multiplatform' | 'maui';
};
/**
* Mobile-specific. Schema of a Session Replay Record.
*/
export type MobileRecord = MobileFullSnapshotRecord | MobileIncrementalSnapshotRecord | MetaRecord | FocusRecord | ViewEndRecord | VisualViewportRecord;
/**
* Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.
*/
export type MobileFullSnapshotRecord = CommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 10;
readonly data: {
/**
* The Wireframes contained by this Record.
*/
readonly wireframes: Wireframe[];
readonly compositionTree?: CompositionTree;
};
/**
* Unique ID of the slot that generated this record.
*/
readonly slotId?: string;
};
/**
* Schema of a Wireframe type.
*/
export type Wireframe = ShapeWireframe | TextWireframe | ImageWireframe | PlaceholderWireframe | WebviewWireframe | EmbeddedContentWireframe;
/**
* Schema of all properties of a ShapeWireframe.
*/
export type ShapeWireframe = CommonShapeWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'shape';
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* Schema of common properties for ShapeWireframe events type and all its sub - types.
*/
export type CommonShapeWireframe = CommonWireframe & {
shapeStyle?: ShapeStyle;
border?: ShapeBorder;
};
/**
* The style of this wireframe.
*/
export type ShapeStyle = {
/**
* The background color for this wireframe as a String hexadecimal. Follows the #RRGGBBAA color format with the alpha value as optional. The default value is #FFFFFF00.
*/
readonly backgroundColor?: string;
/**
* The background gradient for this wireframe.
*/
readonly backgroundGradient?: ShapeGradient;
/**
* The opacity of this wireframe. Takes values from 0 to 1, default value is 1.
*/
readonly opacity?: number;
/**
* The corner(border) radius of this wireframe in pixels. The default value is 0.
*/
readonly cornerRadius?: number;
};
/**
* A background gradient for a shape wireframe. When backgroundColor is also present, the background color is painted first and the gradient is painted over it. The gradient is clipped to the wireframe shape, the border is painted afterward, and shape opacity applies to the combined result.
*/
export type ShapeGradient = ShapeLinearGradient;
/**
* The border properties of this wireframe. The default value is null (no-border).
*/
export type ShapeBorder = {
/**
* The border color as a String hexadecimal. Follows the #RRGGBBAA color format with the alpha value as optional.
*/
readonly color: string;
/**
* The width of the border in pixels.
*/
readonly width: number;
};
/**
* Schema of all properties of a TextWireframe.
*/
export type TextWireframe = CommonShapeWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'text';
/**
* The text value of the wireframe.
*/
text: string;
textStyle: TextStyle;
textPosition?: TextPosition;
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* Schema of all properties of a TextStyle.
*/
export type TextStyle = {
/**
* The preferred font family collection, ordered by preference and formatted as a String list: e.g. Century Gothic, Verdana, sans-serif
*/
readonly family: string;
/**
* The font size in pixels.
*/
readonly size: number;
/**
* The font color as a string hexadecimal. Follows the #RRGGBBAA color format with the alpha value as optional.
*/
readonly color: string;
/**
* Defines how text should be truncated when it exceeds the wireframe bounds. If omitted, text wraps naturally.
*/
readonly truncationMode?: 'clip' | 'head' | 'tail' | 'middle';
};
/**
* Schema of all properties of a TextPosition.
*/
export type TextPosition = {
readonly padding?: {
/**
* The top padding in pixels. The default value is 0.
*/
readonly top?: number;
/**
* The bottom padding in pixels. The default value is 0.
*/
readonly bottom?: number;
/**
* The left padding in pixels. The default value is 0.
*/
readonly left?: number;
/**
* The right padding in pixels. The default value is 0.
*/
readonly right?: number;
};
readonly alignment?: {
/**
* The horizontal text alignment. The default value is `left`.
*/
readonly horizontal?: 'left' | 'right' | 'center';
/**
* The vertical text alignment. The default value is `top`.
*/
readonly vertical?: 'top' | 'bottom' | 'center';
};
};
/**
* Schema of all properties of a ImageWireframe.
*/
export type ImageWireframe = CommonShapeWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'image';
/**
* base64 representation of the image. Not required as the ImageWireframe can be initialised without any base64
*/
base64?: string;
/**
* Unique identifier of the image resource
*/
resourceId?: string;
/**
* MIME type of the image file
*/
mimeType?: string;
/**
* Flag describing an image wireframe that should render an empty state placeholder
*/
isEmpty?: boolean;
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* Schema of all properties of a PlaceholderWireframe.
*/
export type PlaceholderWireframe = CommonWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'placeholder';
/**
* Label of the placeholder
*/
label?: string;
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* Schema of all properties of a WebviewWireframe.
*/
export type WebviewWireframe = CommonShapeWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'webview';
/**
* Unique Id of the slot containing this webview.
*/
readonly slotId: string;
/**
* Whether this webview is visible or not.
*/
readonly isVisible?: boolean;
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* Schema of all properties of an EmbeddedContentWireframe.
*/
export type EmbeddedContentWireframe = CommonShapeWireframe & {
/**
* The type of the wireframe.
*/
readonly type: 'embedded_content';
/**
* Unique Id of the slot containing this embedded content.
*/
readonly slotId: string;
/**
* Whether this embedded content is visible or not.
*/
readonly isVisible?: boolean;
/**
* A globally unique and stable identifier for this UI element, computed as the hash of the element's path. Used to correlate wireframes with RUM action events.
*/
readonly permanentId?: string;
};
/**
* A rendering modifier applied to the composed layer output.
*/
export type CompositionLayerModifier = CompositionLayerClipModifier | CompositionLayerOpacityModifier | CompositionLayerColorMatrixModifier | CompositionLayerGaussianBlurModifier | CompositionLayerShadowModifier | CompositionLayerBrightnessBiasModifier | CompositionLayerSaturateModifier | CompositionLayerMaskImageModifier;
/**
* Mobile-specific. Schema of a Record type which contains mutations of a screen.
*/
export type MobileIncrementalSnapshotRecord = CommonRecordSchema & {
/**
* The type of this Record.
*/
readonly type: 11;
data: MobileIncrementalData;
/**
* Unique ID of the slot that generated this record.
*/
readonly slotId?: string;
};
/**
* Mobile-specific. Schema of a Session Replay IncrementalData type.
*/
export type MobileIncrementalData = MobileMutationData | TouchData | ViewportResizeData | PointerInteractionData | CompositionTreeMutationData;
/**
* Mobile-specific. Schema of a MutationData.
*/
export type MobileMutationData = {
/**
* The source of this type of incremental data.
*/
readonly source: 0;
} & MobileMutationPayload;
/**
* Schema of a WireframeUpdateMutation type.
*/
export type WireframeUpdateMutation = TextWireframeUpdate | ShapeWireframeUpdate | ImageWireframeUpdate | PlaceholderWireframeUpdate | WebviewWireframeUpdate | EmbeddedContentWireframeUpdate;
/**
* Schema of all properties of a TextWireframeUpdate.
*/
export type TextWireframeUpdate = CommonShapeWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'text';
/**
* The text value of the wireframe.
*/
text?: string;
textStyle?: TextStyle;
textPosition?: TextPosition;
};
/**
* Schema of common properties for ShapeWireframeUpdate events type and all its sub - types.
*/
export type CommonShapeWireframeUpdate = CommonWireframeUpdate & {
shapeStyle?: ShapeStyle;
border?: ShapeBorder;
};
/**
* Schema of a ShapeWireframeUpdate.
*/
export type ShapeWireframeUpdate = CommonShapeWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'shape';
};
/**
* Schema of all properties of a ImageWireframeUpdate.
*/
export type ImageWireframeUpdate = CommonShapeWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'image';
/**
* base64 representation of the image. Not required as the ImageWireframe can be initialised without any base64
*/
base64?: string;
/**
* Unique identifier of the image resource
*/
resourceId?: string;
/**
* MIME type of the image file
*/
mimeType?: string;
/**
* Flag describing an image wireframe that should render an empty state placeholder
*/
isEmpty?: boolean;
};
/**
* Schema of all properties of a PlaceholderWireframe.
*/
export type PlaceholderWireframeUpdate = CommonWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'placeholder';
/**
* Label of the placeholder
*/
label?: string;
};
/**
* Schema of all properties of a WebviewWireframeUpdate.
*/
export type WebviewWireframeUpdate = CommonShapeWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'webview';
/**
* Unique Id of the slot containing this webview.
*/
readonly slotId: string;
/**
* Whether this webview is visible or not.
*/
readonly isVisible?: boolean;
};
/**
* Schema of all properties of an EmbeddedContentWireframeUpdate.
*/
export type EmbeddedContentWireframeUpdate = CommonShapeWireframeUpdate & {
/**
* The type of the wireframe.
*/
readonly type: 'embedded_content';
/**
* Unique Id of the slot containing this embedded content.
*/
readonly slotId: string;
/**
* Whether this embedded content is visible or not.
*/
readonly isVisible?: boolean;
};
/**