Skip to content

Commit

Permalink
RUM-2162: Update build and generated types
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Boutaib committed Nov 14, 2023
1 parent 8884a09 commit 7b0a2c8
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 35 deletions.
42 changes: 38 additions & 4 deletions lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export declare type RumEvent = RumActionEvent | RumErrorEvent | RumLongTaskEvent
/**
* Schema of all properties of an Action event
*/
export declare type RumActionEvent = CommonProperties & {
export declare type RumActionEvent = CommonProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -150,7 +150,7 @@ export declare type RumActionEvent = CommonProperties & {
/**
* Schema of all properties of an Error event
*/
export declare type RumErrorEvent = CommonProperties & ActionChildProperties & {
export declare type RumErrorEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -280,7 +280,7 @@ export declare type RumErrorEvent = CommonProperties & ActionChildProperties & {
/**
* Schema of all properties of a Long Task event
*/
export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties & {
export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -318,7 +318,7 @@ export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties
/**
* Schema of all properties of a Resource event
*/
export declare type RumResourceEvent = CommonProperties & ActionChildProperties & {
export declare type RumResourceEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -725,6 +725,20 @@ export declare type RumViewEvent = CommonProperties & {
js_refresh_rate?: RumPerfMetric;
[k: string]: unknown;
};
/**
* Parent view properties (view wrapping the current view)
*/
readonly parent_view?: {
/**
* ID of the parent view
*/
readonly id: string;
/**
* Source of the parent view
*/
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku';
[k: string]: unknown;
};
/**
* Session properties
*/
Expand Down Expand Up @@ -1103,6 +1117,26 @@ export interface CommonProperties {
};
[k: string]: unknown;
}
/**
* Parent view schema for views that are nested (webviews in mobile)
*/
export interface ParentViewSchema {
/**
* Parent view properties (view wrapping the current view)
*/
readonly parent_view?: {
/**
* ID of the parent view
*/
readonly id: string;
/**
* Source of the parent view
*/
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku';
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
* Schema of all properties of events that can have parent actions
*/
Expand Down
42 changes: 38 additions & 4 deletions lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export declare type RumEvent = RumActionEvent | RumErrorEvent | RumLongTaskEvent
/**
* Schema of all properties of an Action event
*/
export declare type RumActionEvent = CommonProperties & {
export declare type RumActionEvent = CommonProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -150,7 +150,7 @@ export declare type RumActionEvent = CommonProperties & {
/**
* Schema of all properties of an Error event
*/
export declare type RumErrorEvent = CommonProperties & ActionChildProperties & {
export declare type RumErrorEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -280,7 +280,7 @@ export declare type RumErrorEvent = CommonProperties & ActionChildProperties & {
/**
* Schema of all properties of a Long Task event
*/
export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties & {
export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -318,7 +318,7 @@ export declare type RumLongTaskEvent = CommonProperties & ActionChildProperties
/**
* Schema of all properties of a Resource event
*/
export declare type RumResourceEvent = CommonProperties & ActionChildProperties & {
export declare type RumResourceEvent = CommonProperties & ActionChildProperties & ParentViewSchema & {
/**
* RUM event type
*/
Expand Down Expand Up @@ -725,6 +725,20 @@ export declare type RumViewEvent = CommonProperties & {
js_refresh_rate?: RumPerfMetric;
[k: string]: unknown;
};
/**
* Parent view properties (view wrapping the current view)
*/
readonly parent_view?: {
/**
* ID of the parent view
*/
readonly id: string;
/**
* Source of the parent view
*/
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku';
[k: string]: unknown;
};
/**
* Session properties
*/
Expand Down Expand Up @@ -1103,6 +1117,26 @@ export interface CommonProperties {
};
[k: string]: unknown;
}
/**
* Parent view schema for views that are nested (webviews in mobile)
*/
export interface ParentViewSchema {
/**
* Parent view properties (view wrapping the current view)
*/
readonly parent_view?: {
/**
* ID of the parent view
*/
readonly id: string;
/**
* Source of the parent view
*/
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku';
[k: string]: unknown;
};
[k: string]: unknown;
}
/**
* Schema of all properties of events that can have parent actions
*/
Expand Down
51 changes: 25 additions & 26 deletions schemas/rum/_parent-view-schema.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "rum/_parent-view-schema.json",
"title": "ParentViewSchema",
"type": "object",
"description": "Parent view schema for views that are nested (webviews in mobile)",
"properties": {
"parent_view": {
"type": "object",
"description": "Parent view properties (view wrapping the current view)",
"required": ["id", "source"],
"properties": {
"id": {
"type": "string",
"description": "ID of the parent view",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"readOnly": true
},
"source": {
"type": "string",
"description": "Source of the parent view",
"enum": ["android", "ios", "browser", "flutter", "react-native", "roku"],
"readOnly": true
}
},
"readOnly": true
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "rum/_parent-view-schema.json",
"title": "ParentViewSchema",
"type": "object",
"description": "Parent view schema for views that are nested (webviews in mobile)",
"properties": {
"parent_view": {
"type": "object",
"description": "Parent view properties (view wrapping the current view)",
"required": ["id", "source"],
"properties": {
"id": {
"type": "string",
"description": "ID of the parent view",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"readOnly": true
},
"source": {
"type": "string",
"description": "Source of the parent view",
"enum": ["android", "ios", "browser", "flutter", "react-native", "roku"],
"readOnly": true
}
},
"readOnly": true
}
}
}

2 changes: 1 addition & 1 deletion schemas/rum/view-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
"id": {
"type": "string",
"description": "ID of the parent view",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$",
"readOnly": true
},
"source": {
Expand Down

0 comments on commit 7b0a2c8

Please sign in to comment.