Skip to content

Commit c0011f9

Browse files
authored
fix(sr): preserve Android snapshot argument ordering (#424)
1 parent 45083b4 commit c0011f9

6 files changed

Lines changed: 62 additions & 20 deletions

File tree

lib/cjs/generated/mobileSessionReplay.d.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type MobileRecord = MobileFullSnapshotRecord | MobileIncrementalSnapshotR
2626
/**
2727
* Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.
2828
*/
29-
export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
29+
export type MobileFullSnapshotRecord = CommonRecordSchema & {
3030
/**
3131
* The type of this Record.
3232
*/
@@ -38,11 +38,6 @@ export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
3838
readonly wireframes: Wireframe[];
3939
readonly compositionTree?: CompositionTree;
4040
};
41-
};
42-
/**
43-
* Schema of common properties for a Record event type that is supported by slots.
44-
*/
45-
export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
4641
/**
4742
* Unique ID of the slot that generated this record.
4843
*/
@@ -278,12 +273,16 @@ export type CompositionLayerModifier = CompositionLayerClipModifier | Compositio
278273
/**
279274
* Mobile-specific. Schema of a Record type which contains mutations of a screen.
280275
*/
281-
export type MobileIncrementalSnapshotRecord = SlotSupportedCommonRecordSchema & {
276+
export type MobileIncrementalSnapshotRecord = CommonRecordSchema & {
282277
/**
283278
* The type of this Record.
284279
*/
285280
readonly type: 11;
286281
data: MobileIncrementalData;
282+
/**
283+
* Unique ID of the slot that generated this record.
284+
*/
285+
readonly slotId?: string;
287286
};
288287
/**
289288
* Mobile-specific. Schema of a Session Replay IncrementalData type.
@@ -479,6 +478,15 @@ export type MetaRecord = SlotSupportedCommonRecordSchema & {
479478
href?: string;
480479
};
481480
};
481+
/**
482+
* Schema of common properties for a Record event type that is supported by slots.
483+
*/
484+
export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
485+
/**
486+
* Unique ID of the slot that generated this record.
487+
*/
488+
readonly slotId?: string;
489+
};
482490
/**
483491
* Schema of a Record type which contains focus information.
484492
*/

lib/cjs/generated/sessionReplay.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export type MobileRecord = MobileFullSnapshotRecord | MobileIncrementalSnapshotR
593593
/**
594594
* Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.
595595
*/
596-
export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
596+
export type MobileFullSnapshotRecord = CommonRecordSchema & {
597597
/**
598598
* The type of this Record.
599599
*/
@@ -605,6 +605,10 @@ export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
605605
readonly wireframes: Wireframe[];
606606
readonly compositionTree?: CompositionTree;
607607
};
608+
/**
609+
* Unique ID of the slot that generated this record.
610+
*/
611+
readonly slotId?: string;
608612
};
609613
/**
610614
* Schema of a Wireframe type.
@@ -836,12 +840,16 @@ export type CompositionLayerModifier = CompositionLayerClipModifier | Compositio
836840
/**
837841
* Mobile-specific. Schema of a Record type which contains mutations of a screen.
838842
*/
839-
export type MobileIncrementalSnapshotRecord = SlotSupportedCommonRecordSchema & {
843+
export type MobileIncrementalSnapshotRecord = CommonRecordSchema & {
840844
/**
841845
* The type of this Record.
842846
*/
843847
readonly type: 11;
844848
data: MobileIncrementalData;
849+
/**
850+
* Unique ID of the slot that generated this record.
851+
*/
852+
readonly slotId?: string;
845853
};
846854
/**
847855
* Mobile-specific. Schema of a Session Replay IncrementalData type.

lib/esm/generated/mobileSessionReplay.d.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export type MobileRecord = MobileFullSnapshotRecord | MobileIncrementalSnapshotR
2626
/**
2727
* Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.
2828
*/
29-
export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
29+
export type MobileFullSnapshotRecord = CommonRecordSchema & {
3030
/**
3131
* The type of this Record.
3232
*/
@@ -38,11 +38,6 @@ export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
3838
readonly wireframes: Wireframe[];
3939
readonly compositionTree?: CompositionTree;
4040
};
41-
};
42-
/**
43-
* Schema of common properties for a Record event type that is supported by slots.
44-
*/
45-
export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
4641
/**
4742
* Unique ID of the slot that generated this record.
4843
*/
@@ -278,12 +273,16 @@ export type CompositionLayerModifier = CompositionLayerClipModifier | Compositio
278273
/**
279274
* Mobile-specific. Schema of a Record type which contains mutations of a screen.
280275
*/
281-
export type MobileIncrementalSnapshotRecord = SlotSupportedCommonRecordSchema & {
276+
export type MobileIncrementalSnapshotRecord = CommonRecordSchema & {
282277
/**
283278
* The type of this Record.
284279
*/
285280
readonly type: 11;
286281
data: MobileIncrementalData;
282+
/**
283+
* Unique ID of the slot that generated this record.
284+
*/
285+
readonly slotId?: string;
287286
};
288287
/**
289288
* Mobile-specific. Schema of a Session Replay IncrementalData type.
@@ -479,6 +478,15 @@ export type MetaRecord = SlotSupportedCommonRecordSchema & {
479478
href?: string;
480479
};
481480
};
481+
/**
482+
* Schema of common properties for a Record event type that is supported by slots.
483+
*/
484+
export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
485+
/**
486+
* Unique ID of the slot that generated this record.
487+
*/
488+
readonly slotId?: string;
489+
};
482490
/**
483491
* Schema of a Record type which contains focus information.
484492
*/

lib/esm/generated/sessionReplay.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export type MobileRecord = MobileFullSnapshotRecord | MobileIncrementalSnapshotR
593593
/**
594594
* Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.
595595
*/
596-
export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
596+
export type MobileFullSnapshotRecord = CommonRecordSchema & {
597597
/**
598598
* The type of this Record.
599599
*/
@@ -605,6 +605,10 @@ export type MobileFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
605605
readonly wireframes: Wireframe[];
606606
readonly compositionTree?: CompositionTree;
607607
};
608+
/**
609+
* Unique ID of the slot that generated this record.
610+
*/
611+
readonly slotId?: string;
608612
};
609613
/**
610614
* Schema of a Wireframe type.
@@ -836,12 +840,16 @@ export type CompositionLayerModifier = CompositionLayerClipModifier | Compositio
836840
/**
837841
* Mobile-specific. Schema of a Record type which contains mutations of a screen.
838842
*/
839-
export type MobileIncrementalSnapshotRecord = SlotSupportedCommonRecordSchema & {
843+
export type MobileIncrementalSnapshotRecord = CommonRecordSchema & {
840844
/**
841845
* The type of this Record.
842846
*/
843847
readonly type: 11;
844848
data: MobileIncrementalData;
849+
/**
850+
* Unique ID of the slot that generated this record.
851+
*/
852+
readonly slotId?: string;
845853
};
846854
/**
847855
* Mobile-specific. Schema of a Session Replay IncrementalData type.

schemas/session-replay/mobile/full-snapshot-record-schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"description": "Mobile-specific. Schema of a Record type which contains the full snapshot of a screen.",
77
"allOf": [
88
{
9-
"$ref": "../common/_slot-supported-common-record-schema.json"
9+
"$ref": "../common/_common-record-schema.json"
1010
},
1111
{
1212
"required": ["type", "data"],
@@ -36,6 +36,11 @@
3636
"readOnly": true
3737
}
3838
}
39+
},
40+
"slotId": {
41+
"type": "string",
42+
"description": "Unique ID of the slot that generated this record.",
43+
"readOnly": true
3944
}
4045
}
4146
}

schemas/session-replay/mobile/incremental-snapshot-record-schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"description": "Mobile-specific. Schema of a Record type which contains mutations of a screen.",
77
"allOf": [
88
{
9-
"$ref": "../common/_slot-supported-common-record-schema.json"
9+
"$ref": "../common/_common-record-schema.json"
1010
},
1111
{
1212
"required": ["type", "data"],
@@ -19,6 +19,11 @@
1919
},
2020
"data": {
2121
"$ref": "incremental-data-schema.json"
22+
},
23+
"slotId": {
24+
"type": "string",
25+
"description": "Unique ID of the slot that generated this record.",
26+
"readOnly": true
2227
}
2328
}
2429
}

0 commit comments

Comments
 (0)