@alwaysmeticulous/api 2.114.0 → 2.122.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/dist/index.d.ts +2 -1
- package/dist/sdk-bundle-api/sdk-to-bundle/session-data.d.ts +1 -19
- package/dist/sdk-bundle-api/sdk-to-bundle/websocket-data.d.ts +53 -0
- package/dist/sdk-bundle-api/sdk-to-bundle/websocket-data.js +3 -0
- package/dist/sdk-bundle-api/sdk-to-bundle/websocket-data.js.map +1 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export { TestCase, TestCaseReplayOptions, TestRunStatus, TestCaseResult, TestCas
|
|
|
5
5
|
export { TestRunEnvironment, TestRunGitHubContext, TestRunGitHubPullRequestContext, TestRunGitHubPushContext, TestRunGitHubWorkflowDispatchContext, TestRunGitLabContext, TestRunGitLabMergeRequestContext, TestRunGitLabPushContext, } from "./sdk-bundle-api/sdk-to-bundle/test-run-environment";
|
|
6
6
|
export { ReplayableEvent } from "./sdk-bundle-api/bidirectional/replayable-event";
|
|
7
7
|
export { HarEntry, HarLog, HarRequest, HarResponse, } from "./sdk-bundle-api/sdk-to-bundle/har-log";
|
|
8
|
-
export { Cookie, SessionData, UrlHistoryEvent, WindowData, ApplicationSpecificData, StorageEntry, EarlyRequest,
|
|
8
|
+
export { Cookie, SessionData, UrlHistoryEvent, WindowData, ApplicationSpecificData, StorageEntry, EarlyRequest, } from "./sdk-bundle-api/sdk-to-bundle/session-data";
|
|
9
|
+
export { SequenceNumber, WebSocketConnectionData, WebSocketConnectionEvent, WebSocketConnectionCreatedEvent, WebSocketConnectionOpenedEvent, EncodedArrayBuffer, EncodedBlob, WebSocketConnectionMessageEvent, WebSocketConnectionErrorEvent, WebSocketConnectionClosedEvent, } from "./sdk-bundle-api/sdk-to-bundle/websocket-data";
|
|
9
10
|
export { Replay } from "./replay/replay.types";
|
|
10
11
|
export { ScreenshotAssertionsOptions, ScreenshotAssertionsEnabledOptions, ScreenshottingEnabledOptions, StoryboardOptions, ScreenshotDiffOptions, ElementToIgnore, CSSSelectorToIgnore, } from "./sdk-bundle-api/sdk-to-bundle/screenshotting-options";
|
|
11
12
|
export { NetworkStubbingMode, StubAllRequests, StubNonSSRRequests, NoStubbing, CustomStubbing, RequestFilter, } from "./sdk-bundle-api/sdk-to-bundle/network-stubbing";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReplayableEvent } from "../bidirectional/replayable-event";
|
|
2
2
|
import { HarLog } from "./har-log";
|
|
3
|
+
import { WebSocketConnectionData } from "./websocket-data";
|
|
3
4
|
export interface SessionData {
|
|
4
5
|
userEvents: {
|
|
5
6
|
window: WindowData;
|
|
@@ -91,22 +92,3 @@ export interface EarlyRequest {
|
|
|
91
92
|
startTime: number;
|
|
92
93
|
duration: number;
|
|
93
94
|
}
|
|
94
|
-
export type SequenceNumber = number;
|
|
95
|
-
export interface WebSocketConnectionData {
|
|
96
|
-
id: SequenceNumber;
|
|
97
|
-
url: string;
|
|
98
|
-
events: WebSocketConnectionEvent[];
|
|
99
|
-
}
|
|
100
|
-
export interface WebSocketConnectionEvent {
|
|
101
|
-
/**
|
|
102
|
-
* The time in milliseconds since the start of the session.
|
|
103
|
-
*
|
|
104
|
-
* During simulations, we consider the "created" event to have been replayed whenever the browser calls
|
|
105
|
-
* `new WebSocket()` and all other events are replayed at a time relative to the "created" event's timestamp.
|
|
106
|
-
*
|
|
107
|
-
* E.g. the "opened" event is replayed at ("opened".timestamp - "created".timestamp) milliseconds after the browser calls `new WebSocket()`.
|
|
108
|
-
*/
|
|
109
|
-
timestamp: number;
|
|
110
|
-
type: "created" | "opened" | "message-sent" | "message-received" | "closed" | "error";
|
|
111
|
-
data?: string;
|
|
112
|
-
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface WebSocketConnectionData {
|
|
2
|
+
id: SequenceNumber;
|
|
3
|
+
url: string;
|
|
4
|
+
events: WebSocketConnectionEvent[];
|
|
5
|
+
}
|
|
6
|
+
export type SequenceNumber = number;
|
|
7
|
+
export type WebSocketConnectionEvent = WebSocketConnectionCreatedEvent | WebSocketConnectionOpenedEvent | WebSocketConnectionMessageEvent | WebSocketConnectionErrorEvent | WebSocketConnectionClosedEvent;
|
|
8
|
+
export interface WebSocketConnectionGenericEvent {
|
|
9
|
+
/**
|
|
10
|
+
* The time in milliseconds since the start of the session.
|
|
11
|
+
*
|
|
12
|
+
* During simulations, we consider the "created" event to have been replayed whenever the browser calls
|
|
13
|
+
* `new WebSocket()` and all other events are replayed at a time relative to the "created" event's timestamp.
|
|
14
|
+
*
|
|
15
|
+
* E.g. the "opened" event is replayed at ("opened".timestamp - "created".timestamp) milliseconds after the browser calls `new WebSocket()`.
|
|
16
|
+
*/
|
|
17
|
+
timestamp: number;
|
|
18
|
+
type: unknown;
|
|
19
|
+
data?: unknown;
|
|
20
|
+
}
|
|
21
|
+
export interface WebSocketConnectionCreatedEvent extends WebSocketConnectionGenericEvent {
|
|
22
|
+
type: "created";
|
|
23
|
+
}
|
|
24
|
+
export interface WebSocketConnectionOpenedEvent extends WebSocketConnectionGenericEvent {
|
|
25
|
+
type: "opened";
|
|
26
|
+
}
|
|
27
|
+
export interface EncodedArrayBuffer {
|
|
28
|
+
binaryType: "arraybuffer";
|
|
29
|
+
/** Base 64 encoded binary from an array buffer */
|
|
30
|
+
encodedData: string;
|
|
31
|
+
}
|
|
32
|
+
export interface EncodedBlob {
|
|
33
|
+
binaryType: "blob";
|
|
34
|
+
/** Base 64 encoded binary from a blob */
|
|
35
|
+
encodedData: string;
|
|
36
|
+
/** https://developer.mozilla.org/en-US/docs/Web/API/Blob/type */
|
|
37
|
+
mimeType: string;
|
|
38
|
+
}
|
|
39
|
+
export interface WebSocketConnectionMessageEvent extends WebSocketConnectionGenericEvent {
|
|
40
|
+
type: "message-sent" | "message-received";
|
|
41
|
+
data: string | EncodedArrayBuffer | EncodedBlob;
|
|
42
|
+
}
|
|
43
|
+
export interface WebSocketConnectionErrorEvent extends WebSocketConnectionGenericEvent {
|
|
44
|
+
type: "error";
|
|
45
|
+
}
|
|
46
|
+
export interface WebSocketConnectionClosedEvent extends WebSocketConnectionGenericEvent {
|
|
47
|
+
type: "closed";
|
|
48
|
+
data: {
|
|
49
|
+
code: number;
|
|
50
|
+
reason: string;
|
|
51
|
+
wasClean: boolean;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket-data.js","sourceRoot":"","sources":["../../../src/sdk-bundle-api/sdk-to-bundle/websocket-data.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.122.0",
|
|
4
4
|
"description": "Meticulous API types",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/alwaysmeticulous/meticulous-sdk/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c245030f5ccd8ecaa05cb7e9d039f42959a771c3"
|
|
39
39
|
}
|