@airtop/sdk 1.0.0-alpha2.14 → 1.0.0-alpha2.16
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.cjs +35 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +35 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
9
9
|
module.exports = {
|
10
10
|
name: "@airtop/sdk",
|
11
11
|
description: "Airtop SDK for TypeScript",
|
12
|
-
version: "1.0.0-alpha2.
|
12
|
+
version: "1.0.0-alpha2.16",
|
13
13
|
type: "module",
|
14
14
|
main: "./dist/index.cjs",
|
15
15
|
module: "./dist/index.js",
|
@@ -121,6 +121,9 @@ var AirtopBase = class {
|
|
121
121
|
this.client = config.client;
|
122
122
|
this.outputJsonAdapter = config.outputSchemaAdapter;
|
123
123
|
this.jobId = config.jobId;
|
124
|
+
if (config.agentEventPublisher) {
|
125
|
+
this.agentEventPublisher = config.agentEventPublisher;
|
126
|
+
}
|
124
127
|
}
|
125
128
|
/**
|
126
129
|
* Sets the publisher for sending agent events. Internal use only.
|
@@ -193,7 +196,9 @@ var AirtopBase = class {
|
|
193
196
|
return {
|
194
197
|
client: this.client,
|
195
198
|
log: this.log,
|
196
|
-
jobId: this.jobId
|
199
|
+
jobId: this.jobId,
|
200
|
+
outputSchemaAdapter: this.outputJsonAdapter,
|
201
|
+
agentEventPublisher: this.agentEventPublisher
|
197
202
|
};
|
198
203
|
}
|
199
204
|
/**
|
@@ -513,6 +518,19 @@ var AirtopWindowClient = class extends AirtopBase {
|
|
513
518
|
});
|
514
519
|
this.windowId = windowId;
|
515
520
|
this.sessionId = sessionId;
|
521
|
+
this.client.windows.get(
|
522
|
+
this.windowId,
|
523
|
+
{
|
524
|
+
sessionId: this.sessionId
|
525
|
+
},
|
526
|
+
this.resolveRequestOptions()
|
527
|
+
).then((results) => {
|
528
|
+
this._sendAgentPayload("LiveViewUrl", {
|
529
|
+
liveViewUrl: results.data.liveViewUrl,
|
530
|
+
windowId: this.windowId,
|
531
|
+
sessionId: this.sessionId
|
532
|
+
});
|
533
|
+
});
|
516
534
|
}
|
517
535
|
/**
|
518
536
|
* Gets the window ID.
|
@@ -541,11 +559,6 @@ var AirtopWindowClient = class extends AirtopBase {
|
|
541
559
|
},
|
542
560
|
this.resolveRequestOptions(requestOptions)
|
543
561
|
);
|
544
|
-
this._sendAgentPayload("LiveViewUrl", {
|
545
|
-
liveViewUrl: results.data.liveViewUrl,
|
546
|
-
windowId: this.windowId,
|
547
|
-
sessionId: this.sessionId
|
548
|
-
});
|
549
562
|
return new AirtopWindow(this.getCommonConfig(), this.sessionId, results);
|
550
563
|
}
|
551
564
|
/**
|
@@ -1119,6 +1132,19 @@ var AirtopSessionClient = class extends AirtopBase {
|
|
1119
1132
|
},
|
1120
1133
|
this.resolveRequestOptions(requestOptions)
|
1121
1134
|
);
|
1135
|
+
this.client.windows.get(
|
1136
|
+
results.data.windowId,
|
1137
|
+
{
|
1138
|
+
sessionId: this.sessionId
|
1139
|
+
},
|
1140
|
+
this.resolveRequestOptions()
|
1141
|
+
).then((windowResults) => {
|
1142
|
+
this._sendAgentPayload("LiveViewUrl", {
|
1143
|
+
liveViewUrl: windowResults.data.liveViewUrl,
|
1144
|
+
windowId: results.data.windowId,
|
1145
|
+
sessionId: this.sessionId
|
1146
|
+
});
|
1147
|
+
});
|
1122
1148
|
return new AirtopWindow(this.getCommonConfig(), this.sessionId, results);
|
1123
1149
|
}
|
1124
1150
|
/**
|
@@ -1228,7 +1254,8 @@ var AirtopClient = class extends AirtopBase {
|
|
1228
1254
|
metadataFieldName: "metadata"
|
1229
1255
|
}),
|
1230
1256
|
outputSchemaAdapter: config.outputSchemaAdapter,
|
1231
|
-
jobId: config.jobId
|
1257
|
+
jobId: config.jobId,
|
1258
|
+
agentEventPublisher: config.agentEventPublisher
|
1232
1259
|
});
|
1233
1260
|
this.log.withPrefix("[Airtop SDK]");
|
1234
1261
|
this.client.logLevel = config.logLevel;
|