@airtop/sdk 0.0.8 → 0.0.10-a
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/api/index.d.ts +1 -1
- package/api/index.js +1 -1
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +3 -2
- package/api/resources/profiles/client/Client.js +4 -4
- package/api/resources/sessions/client/Client.d.ts +11 -4
- package/api/resources/sessions/client/Client.js +117 -13
- package/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
- package/api/resources/sessions/index.d.ts +1 -0
- package/api/resources/sessions/index.js +1 -0
- package/api/resources/sessions/types/SessionsEventsResponse.d.ts +16 -0
- package/api/resources/sessions/types/SessionsEventsResponseError.d.ts +11 -0
- package/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +11 -0
- package/api/resources/sessions/types/SessionsEventsResponseStatus.js +5 -0
- package/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
- package/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
- package/api/resources/sessions/types/index.d.ts +4 -0
- package/api/resources/sessions/types/index.js +20 -0
- package/api/resources/windows/client/Client.d.ts +1 -1
- package/api/resources/windows/client/Client.js +10 -10
- package/api/types/ErrorMessage.d.ts +11 -0
- package/api/types/ErrorMessage.js +5 -0
- package/api/types/ExternalProfileV1.d.ts +0 -2
- package/api/types/Pagination.d.ts +13 -0
- package/api/types/Pagination.js +5 -0
- package/api/types/SessionsWithPagination.d.ts +10 -0
- package/api/types/SessionsWithPagination.js +5 -0
- package/api/types/{ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts → SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +5 -0
- package/api/types/StatusMessage.d.ts +14 -0
- package/api/types/StatusMessage.js +5 -0
- package/api/types/StatusMessageStatus.d.ts +13 -0
- package/api/types/StatusMessageStatus.js +12 -0
- package/api/types/Window.d.ts +0 -2
- package/api/types/index.d.ts +6 -1
- package/api/types/index.js +6 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/core/streaming-fetcher/Stream.d.ts +48 -0
- package/core/streaming-fetcher/Stream.js +170 -0
- package/core/streaming-fetcher/index.d.ts +1 -0
- package/core/streaming-fetcher/index.js +5 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/profiles/client/Client.js +4 -4
- package/dist/api/resources/sessions/client/Client.d.ts +11 -4
- package/dist/api/resources/sessions/client/Client.js +117 -13
- package/dist/api/resources/sessions/client/requests/SessionsListRequest.d.ts +18 -2
- package/dist/api/resources/sessions/index.d.ts +1 -0
- package/dist/api/resources/sessions/index.js +1 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.d.ts +16 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponse.js +5 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseError.d.ts +11 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseError.js +5 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseStatus.d.ts +11 -0
- package/dist/api/resources/sessions/types/SessionsEventsResponseStatus.js +5 -0
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.d.ts +13 -0
- package/dist/api/resources/sessions/types/SessionsListRequestStatus.js +12 -0
- package/dist/api/resources/sessions/types/index.d.ts +4 -0
- package/dist/api/resources/sessions/types/index.js +20 -0
- package/dist/api/resources/windows/client/Client.d.ts +1 -1
- package/dist/api/resources/windows/client/Client.js +10 -10
- package/dist/api/types/ErrorMessage.d.ts +11 -0
- package/dist/api/types/ErrorMessage.js +5 -0
- package/dist/api/types/ExternalProfileV1.d.ts +0 -2
- package/dist/api/types/Pagination.d.ts +13 -0
- package/dist/api/types/Pagination.js +5 -0
- package/dist/api/types/SessionsWithPagination.d.ts +10 -0
- package/dist/api/types/SessionsWithPagination.js +5 -0
- package/dist/api/types/{ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts → SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts} +2 -2
- package/dist/api/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.js +5 -0
- package/dist/api/types/StatusMessage.d.ts +14 -0
- package/dist/api/types/StatusMessage.js +5 -0
- package/dist/api/types/StatusMessageStatus.d.ts +13 -0
- package/dist/api/types/StatusMessageStatus.js +12 -0
- package/dist/api/types/Window.d.ts +0 -2
- package/dist/api/types/index.d.ts +6 -1
- package/dist/api/types/index.js +6 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/core/streaming-fetcher/Stream.d.ts +48 -0
- package/dist/core/streaming-fetcher/Stream.js +170 -0
- package/dist/core/streaming-fetcher/index.d.ts +1 -0
- package/dist/core/streaming-fetcher/index.js +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +1 -1
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +1 -0
- package/dist/serialization/resources/sessions/index.d.ts +1 -0
- package/dist/serialization/resources/sessions/index.js +1 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +18 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponse.js +41 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +15 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseError.js +36 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +15 -0
- package/dist/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +36 -0
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
- package/dist/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
- package/dist/serialization/resources/sessions/types/index.d.ts +4 -0
- package/dist/serialization/resources/sessions/types/index.js +20 -0
- package/dist/serialization/types/ErrorMessage.d.ts +14 -0
- package/dist/serialization/types/ErrorMessage.js +35 -0
- package/dist/serialization/types/ExternalProfileV1.d.ts +0 -1
- package/dist/serialization/types/ExternalProfileV1.js +0 -1
- package/dist/serialization/types/Pagination.d.ts +19 -0
- package/dist/serialization/types/Pagination.js +40 -0
- package/dist/serialization/types/SessionsWithPagination.d.ts +15 -0
- package/dist/serialization/types/SessionsWithPagination.js +36 -0
- package/dist/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/dist/serialization/types/{ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +4 -4
- package/dist/serialization/types/StatusMessage.d.ts +16 -0
- package/dist/serialization/types/StatusMessage.js +37 -0
- package/dist/serialization/types/StatusMessageStatus.d.ts +10 -0
- package/dist/serialization/types/StatusMessageStatus.js +31 -0
- package/dist/serialization/types/Window.d.ts +0 -1
- package/dist/serialization/types/Window.js +0 -1
- package/dist/serialization/types/index.d.ts +6 -1
- package/dist/serialization/types/index.js +6 -1
- package/dist/wrapper/AirtopClient.d.ts +19 -0
- package/dist/wrapper/AirtopClient.js +32 -0
- package/dist/wrapper/AirtopSessions.d.ts +24 -0
- package/dist/wrapper/AirtopSessions.js +93 -0
- package/dist/wrapper/AirtopWindows.d.ts +18 -0
- package/dist/wrapper/AirtopWindows.js +65 -0
- package/index.d.ts +2 -1
- package/index.js +4 -3
- package/package.json +7 -3
- package/reference.md +71 -5
- package/serialization/index.d.ts +1 -1
- package/serialization/index.js +1 -1
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +1 -0
- package/serialization/resources/sessions/index.d.ts +1 -0
- package/serialization/resources/sessions/index.js +1 -0
- package/serialization/resources/sessions/types/SessionsEventsResponse.d.ts +18 -0
- package/serialization/resources/sessions/types/SessionsEventsResponse.js +41 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseError.d.ts +15 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseError.js +36 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.d.ts +15 -0
- package/serialization/resources/sessions/types/SessionsEventsResponseStatus.js +36 -0
- package/serialization/resources/sessions/types/SessionsListRequestStatus.d.ts +10 -0
- package/serialization/resources/sessions/types/SessionsListRequestStatus.js +31 -0
- package/serialization/resources/sessions/types/index.d.ts +4 -0
- package/serialization/resources/sessions/types/index.js +20 -0
- package/serialization/types/ErrorMessage.d.ts +14 -0
- package/serialization/types/ErrorMessage.js +35 -0
- package/serialization/types/ExternalProfileV1.d.ts +0 -1
- package/serialization/types/ExternalProfileV1.js +0 -1
- package/serialization/types/Pagination.d.ts +19 -0
- package/serialization/types/Pagination.js +40 -0
- package/serialization/types/SessionsWithPagination.d.ts +15 -0
- package/serialization/types/SessionsWithPagination.js +36 -0
- package/serialization/types/SessionsWithPaginationEnvelopeDefaultMetaWrapper.d.ts +18 -0
- package/serialization/types/{ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → SessionsWithPaginationEnvelopeDefaultMetaWrapper.js} +4 -4
- package/serialization/types/StatusMessage.d.ts +16 -0
- package/serialization/types/StatusMessage.js +37 -0
- package/serialization/types/StatusMessageStatus.d.ts +10 -0
- package/serialization/types/StatusMessageStatus.js +31 -0
- package/serialization/types/Window.d.ts +0 -1
- package/serialization/types/Window.js +0 -1
- package/serialization/types/index.d.ts +6 -1
- package/serialization/types/index.js +6 -1
- package/wrapper/AirtopClient.d.ts +19 -0
- package/wrapper/AirtopClient.js +32 -0
- package/wrapper/AirtopSessions.d.ts +24 -0
- package/wrapper/AirtopSessions.js +93 -0
- package/wrapper/AirtopWindows.d.ts +18 -0
- package/wrapper/AirtopWindows.js +65 -0
- package/dist/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- package/serialization/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.d.ts +0 -18
- /package/api/{types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → resources/sessions/types/SessionsEventsResponse.js} +0 -0
- /package/{dist/api/types/ListExternalSessionWithConnectionInfoEnvelopeDefaultMetaWrapper.js → api/resources/sessions/types/SessionsEventsResponseError.js} +0 -0
@@ -0,0 +1,170 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
17
|
+
};
|
18
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
19
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
20
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
21
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
22
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
23
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
24
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
25
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
26
|
+
function fulfill(value) { resume("next", value); }
|
27
|
+
function reject(value) { resume("throw", value); }
|
28
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
29
|
+
};
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
31
|
+
exports.readableStreamAsyncIterable = exports.Stream = void 0;
|
32
|
+
const runtime_1 = require("../runtime");
|
33
|
+
const DATA_PREFIX = "data:";
|
34
|
+
class Stream {
|
35
|
+
constructor({ stream, parse, eventShape, signal }) {
|
36
|
+
this.controller = new AbortController();
|
37
|
+
this.stream = stream;
|
38
|
+
this.parse = parse;
|
39
|
+
if (eventShape.type === "sse") {
|
40
|
+
this.prefix = DATA_PREFIX;
|
41
|
+
this.messageTerminator = "\n";
|
42
|
+
this.streamTerminator = eventShape.streamTerminator;
|
43
|
+
}
|
44
|
+
else {
|
45
|
+
this.messageTerminator = eventShape.messageTerminator;
|
46
|
+
}
|
47
|
+
signal === null || signal === void 0 ? void 0 : signal.addEventListener("abort", () => this.controller.abort());
|
48
|
+
}
|
49
|
+
iterMessages() {
|
50
|
+
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
51
|
+
var e_1, _a;
|
52
|
+
this.controller.signal;
|
53
|
+
const stream = readableStreamAsyncIterable(this.stream);
|
54
|
+
let buf = "";
|
55
|
+
let prefixSeen = false;
|
56
|
+
try {
|
57
|
+
for (var stream_1 = __asyncValues(stream), stream_1_1; stream_1_1 = yield __await(stream_1.next()), !stream_1_1.done;) {
|
58
|
+
const chunk = stream_1_1.value;
|
59
|
+
buf += this.decodeChunk(chunk);
|
60
|
+
let terminatorIndex;
|
61
|
+
// Parse the chunk into as many messages as possible
|
62
|
+
while ((terminatorIndex = buf.indexOf(this.messageTerminator)) >= 0) {
|
63
|
+
// Extract the line from the buffer
|
64
|
+
let line = buf.slice(0, terminatorIndex + 1);
|
65
|
+
buf = buf.slice(terminatorIndex + 1);
|
66
|
+
// Skip empty lines
|
67
|
+
if (line.length === 0) {
|
68
|
+
continue;
|
69
|
+
}
|
70
|
+
// Skip the chunk until the prefix is found
|
71
|
+
if (!prefixSeen && this.prefix != null) {
|
72
|
+
const prefixIndex = line.indexOf(this.prefix);
|
73
|
+
if (prefixIndex === -1) {
|
74
|
+
continue;
|
75
|
+
}
|
76
|
+
prefixSeen = true;
|
77
|
+
line = line.slice(prefixIndex + this.prefix.length);
|
78
|
+
}
|
79
|
+
// If the stream terminator is present, return
|
80
|
+
if (this.streamTerminator != null && line.includes(this.streamTerminator)) {
|
81
|
+
return yield __await(void 0);
|
82
|
+
}
|
83
|
+
// Otherwise, yield message from the prefix to the terminator
|
84
|
+
const message = yield __await(this.parse(JSON.parse(line)));
|
85
|
+
yield yield __await(message);
|
86
|
+
prefixSeen = false;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
91
|
+
finally {
|
92
|
+
try {
|
93
|
+
if (stream_1_1 && !stream_1_1.done && (_a = stream_1.return)) yield __await(_a.call(stream_1));
|
94
|
+
}
|
95
|
+
finally { if (e_1) throw e_1.error; }
|
96
|
+
}
|
97
|
+
});
|
98
|
+
}
|
99
|
+
[Symbol.asyncIterator]() {
|
100
|
+
return __asyncGenerator(this, arguments, function* _a() {
|
101
|
+
var e_2, _b;
|
102
|
+
try {
|
103
|
+
for (var _c = __asyncValues(this.iterMessages()), _d; _d = yield __await(_c.next()), !_d.done;) {
|
104
|
+
const message = _d.value;
|
105
|
+
yield yield __await(message);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
109
|
+
finally {
|
110
|
+
try {
|
111
|
+
if (_d && !_d.done && (_b = _c.return)) yield __await(_b.call(_c));
|
112
|
+
}
|
113
|
+
finally { if (e_2) throw e_2.error; }
|
114
|
+
}
|
115
|
+
});
|
116
|
+
}
|
117
|
+
decodeChunk(chunk) {
|
118
|
+
let decoded = "";
|
119
|
+
// If TextDecoder is present, use it
|
120
|
+
if (typeof TextDecoder !== "undefined") {
|
121
|
+
const decoder = new TextDecoder("utf8");
|
122
|
+
decoded += decoder.decode(chunk);
|
123
|
+
}
|
124
|
+
// Buffer is present in Node.js environment
|
125
|
+
else if (runtime_1.RUNTIME.type === "node" && typeof chunk != "undefined") {
|
126
|
+
decoded += Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
127
|
+
}
|
128
|
+
return decoded;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
exports.Stream = Stream;
|
132
|
+
/**
|
133
|
+
* Browser polyfill for ReadableStream
|
134
|
+
*/
|
135
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
136
|
+
function readableStreamAsyncIterable(stream) {
|
137
|
+
if (stream[Symbol.asyncIterator]) {
|
138
|
+
return stream;
|
139
|
+
}
|
140
|
+
const reader = stream.getReader();
|
141
|
+
return {
|
142
|
+
next() {
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
144
|
+
try {
|
145
|
+
const result = yield reader.read();
|
146
|
+
if (result === null || result === void 0 ? void 0 : result.done) {
|
147
|
+
reader.releaseLock();
|
148
|
+
} // release lock when stream becomes closed
|
149
|
+
return result;
|
150
|
+
}
|
151
|
+
catch (e) {
|
152
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
153
|
+
throw e;
|
154
|
+
}
|
155
|
+
});
|
156
|
+
},
|
157
|
+
return() {
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
159
|
+
const cancelPromise = reader.cancel();
|
160
|
+
reader.releaseLock();
|
161
|
+
yield cancelPromise;
|
162
|
+
return { done: true, value: undefined };
|
163
|
+
});
|
164
|
+
},
|
165
|
+
[Symbol.asyncIterator]() {
|
166
|
+
return this;
|
167
|
+
},
|
168
|
+
};
|
169
|
+
}
|
170
|
+
exports.readableStreamAsyncIterable = readableStreamAsyncIterable;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Stream } from "./Stream";
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * as Airtop from "./api";
|
2
|
-
export
|
2
|
+
export * as Resources from './api/resources';
|
3
3
|
export { AirtopEnvironment } from "./environments";
|
4
4
|
export { AirtopError, AirtopTimeoutError } from "./errors";
|
5
|
+
export { AirtopClient } from './wrapper/AirtopClient';
|
package/dist/index.js
CHANGED
@@ -23,12 +23,13 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
23
|
return result;
|
24
24
|
};
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.
|
26
|
+
exports.AirtopClient = exports.AirtopTimeoutError = exports.AirtopError = exports.AirtopEnvironment = exports.Resources = exports.Airtop = void 0;
|
27
27
|
exports.Airtop = __importStar(require("./api"));
|
28
|
-
|
29
|
-
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return Client_1.AirtopClient; } });
|
28
|
+
exports.Resources = __importStar(require("./api/resources"));
|
30
29
|
var environments_1 = require("./environments");
|
31
30
|
Object.defineProperty(exports, "AirtopEnvironment", { enumerable: true, get: function () { return environments_1.AirtopEnvironment; } });
|
32
31
|
var errors_1 = require("./errors");
|
33
32
|
Object.defineProperty(exports, "AirtopError", { enumerable: true, get: function () { return errors_1.AirtopError; } });
|
34
33
|
Object.defineProperty(exports, "AirtopTimeoutError", { enumerable: true, get: function () { return errors_1.AirtopTimeoutError; } });
|
34
|
+
var AirtopClient_1 = require("./wrapper/AirtopClient");
|
35
|
+
Object.defineProperty(exports, "AirtopClient", { enumerable: true, get: function () { return AirtopClient_1.AirtopClient; } });
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./types"), exports);
|
18
17
|
__exportStar(require("./resources"), exports);
|
18
|
+
__exportStar(require("./types"), exports);
|
@@ -28,6 +28,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
29
29
|
exports.windows = exports.sessions = void 0;
|
30
30
|
exports.sessions = __importStar(require("./sessions"));
|
31
|
+
__exportStar(require("./sessions/types"), exports);
|
31
32
|
__exportStar(require("./sessions/client/requests"), exports);
|
32
33
|
exports.windows = __importStar(require("./windows"));
|
33
34
|
__exportStar(require("./windows/client/requests"), exports);
|
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./types"), exports);
|
17
18
|
__exportStar(require("./client"), exports);
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../index";
|
5
|
+
import * as Airtop from "../../../../api/index";
|
6
|
+
import * as core from "../../../../core";
|
7
|
+
import { SessionsEventsResponseStatus } from "./SessionsEventsResponseStatus";
|
8
|
+
import { SessionsEventsResponseError } from "./SessionsEventsResponseError";
|
9
|
+
export declare const SessionsEventsResponse: core.serialization.Schema<serializers.SessionsEventsResponse.Raw, Airtop.SessionsEventsResponse>;
|
10
|
+
export declare namespace SessionsEventsResponse {
|
11
|
+
type Raw = SessionsEventsResponse.Status | SessionsEventsResponse.Error;
|
12
|
+
interface Status extends SessionsEventsResponseStatus.Raw {
|
13
|
+
event: "status";
|
14
|
+
}
|
15
|
+
interface Error extends SessionsEventsResponseError.Raw {
|
16
|
+
event: "error";
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.SessionsEventsResponse = void 0;
|
30
|
+
const core = __importStar(require("../../../../core"));
|
31
|
+
const SessionsEventsResponseStatus_1 = require("./SessionsEventsResponseStatus");
|
32
|
+
const SessionsEventsResponseError_1 = require("./SessionsEventsResponseError");
|
33
|
+
exports.SessionsEventsResponse = core.serialization
|
34
|
+
.union("event", {
|
35
|
+
status: SessionsEventsResponseStatus_1.SessionsEventsResponseStatus,
|
36
|
+
error: SessionsEventsResponseError_1.SessionsEventsResponseError,
|
37
|
+
})
|
38
|
+
.transform({
|
39
|
+
transform: (value) => value,
|
40
|
+
untransform: (value) => value,
|
41
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../index";
|
5
|
+
import * as Airtop from "../../../../api/index";
|
6
|
+
import * as core from "../../../../core";
|
7
|
+
import { ErrorMessage } from "../../../types/ErrorMessage";
|
8
|
+
export declare const SessionsEventsResponseError: core.serialization.ObjectSchema<serializers.SessionsEventsResponseError.Raw, Airtop.SessionsEventsResponseError>;
|
9
|
+
export declare namespace SessionsEventsResponseError {
|
10
|
+
interface Raw {
|
11
|
+
data: ErrorMessage.Raw;
|
12
|
+
id?: number | null;
|
13
|
+
retry?: number | null;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.SessionsEventsResponseError = void 0;
|
30
|
+
const core = __importStar(require("../../../../core"));
|
31
|
+
const ErrorMessage_1 = require("../../../types/ErrorMessage");
|
32
|
+
exports.SessionsEventsResponseError = core.serialization.object({
|
33
|
+
data: ErrorMessage_1.ErrorMessage,
|
34
|
+
id: core.serialization.number().optional(),
|
35
|
+
retry: core.serialization.number().optional(),
|
36
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../index";
|
5
|
+
import * as Airtop from "../../../../api/index";
|
6
|
+
import * as core from "../../../../core";
|
7
|
+
import { StatusMessage } from "../../../types/StatusMessage";
|
8
|
+
export declare const SessionsEventsResponseStatus: core.serialization.ObjectSchema<serializers.SessionsEventsResponseStatus.Raw, Airtop.SessionsEventsResponseStatus>;
|
9
|
+
export declare namespace SessionsEventsResponseStatus {
|
10
|
+
interface Raw {
|
11
|
+
data: StatusMessage.Raw;
|
12
|
+
id?: number | null;
|
13
|
+
retry?: number | null;
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.SessionsEventsResponseStatus = void 0;
|
30
|
+
const core = __importStar(require("../../../../core"));
|
31
|
+
const StatusMessage_1 = require("../../../types/StatusMessage");
|
32
|
+
exports.SessionsEventsResponseStatus = core.serialization.object({
|
33
|
+
data: StatusMessage_1.StatusMessage,
|
34
|
+
id: core.serialization.number().optional(),
|
35
|
+
retry: core.serialization.number().optional(),
|
36
|
+
});
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../../../index";
|
5
|
+
import * as Airtop from "../../../../api/index";
|
6
|
+
import * as core from "../../../../core";
|
7
|
+
export declare const SessionsListRequestStatus: core.serialization.Schema<serializers.SessionsListRequestStatus.Raw, Airtop.SessionsListRequestStatus>;
|
8
|
+
export declare namespace SessionsListRequestStatus {
|
9
|
+
type Raw = "awaiting_capacity" | "initializing" | "running" | "ended";
|
10
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.SessionsListRequestStatus = void 0;
|
30
|
+
const core = __importStar(require("../../../../core"));
|
31
|
+
exports.SessionsListRequestStatus = core.serialization.enum_(["awaiting_capacity", "initializing", "running", "ended"]);
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./SessionsListRequestStatus"), exports);
|
18
|
+
__exportStar(require("./SessionsEventsResponseStatus"), exports);
|
19
|
+
__exportStar(require("./SessionsEventsResponseError"), exports);
|
20
|
+
__exportStar(require("./SessionsEventsResponse"), exports);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../index";
|
5
|
+
import * as Airtop from "../../api/index";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const ErrorMessage: core.serialization.ObjectSchema<serializers.ErrorMessage.Raw, Airtop.ErrorMessage>;
|
8
|
+
export declare namespace ErrorMessage {
|
9
|
+
interface Raw {
|
10
|
+
code: string;
|
11
|
+
event: string;
|
12
|
+
message: string;
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.ErrorMessage = void 0;
|
30
|
+
const core = __importStar(require("../../core"));
|
31
|
+
exports.ErrorMessage = core.serialization.object({
|
32
|
+
code: core.serialization.string(),
|
33
|
+
event: core.serialization.string(),
|
34
|
+
message: core.serialization.string(),
|
35
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../index";
|
5
|
+
import * as Airtop from "../../api/index";
|
6
|
+
import * as core from "../../core";
|
7
|
+
export declare const Pagination: core.serialization.ObjectSchema<serializers.Pagination.Raw, Airtop.Pagination>;
|
8
|
+
export declare namespace Pagination {
|
9
|
+
interface Raw {
|
10
|
+
currentLimit: number;
|
11
|
+
currentPage: number;
|
12
|
+
finalCount: number;
|
13
|
+
hasMore: boolean;
|
14
|
+
initialCount: number;
|
15
|
+
nextOffset: number;
|
16
|
+
numberOfPages: number;
|
17
|
+
totalItems: number;
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
4
|
+
*/
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
6
|
+
if (k2 === undefined) k2 = k;
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
10
|
+
}
|
11
|
+
Object.defineProperty(o, k2, desc);
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.Pagination = void 0;
|
30
|
+
const core = __importStar(require("../../core"));
|
31
|
+
exports.Pagination = core.serialization.object({
|
32
|
+
currentLimit: core.serialization.number(),
|
33
|
+
currentPage: core.serialization.number(),
|
34
|
+
finalCount: core.serialization.number(),
|
35
|
+
hasMore: core.serialization.boolean(),
|
36
|
+
initialCount: core.serialization.number(),
|
37
|
+
nextOffset: core.serialization.number(),
|
38
|
+
numberOfPages: core.serialization.number(),
|
39
|
+
totalItems: core.serialization.number(),
|
40
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
3
|
+
*/
|
4
|
+
import * as serializers from "../index";
|
5
|
+
import * as Airtop from "../../api/index";
|
6
|
+
import * as core from "../../core";
|
7
|
+
import { Pagination } from "./Pagination";
|
8
|
+
import { ExternalSessionWithConnectionInfo } from "./ExternalSessionWithConnectionInfo";
|
9
|
+
export declare const SessionsWithPagination: core.serialization.ObjectSchema<serializers.SessionsWithPagination.Raw, Airtop.SessionsWithPagination>;
|
10
|
+
export declare namespace SessionsWithPagination {
|
11
|
+
interface Raw {
|
12
|
+
pagination: Pagination.Raw;
|
13
|
+
sessions?: ExternalSessionWithConnectionInfo.Raw[] | null;
|
14
|
+
}
|
15
|
+
}
|