@api-client/core 0.5.10 → 0.5.11
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/build/browser.d.ts +2 -0
- package/build/browser.js +2 -0
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/src/lib/calculators/DataCalculator.d.ts +3 -3
- package/build/src/lib/calculators/DataCalculator.js +3 -3
- package/build/src/lib/calculators/DataCalculator.js.map +1 -1
- package/build/src/lib/events/Utils.d.ts +1 -0
- package/build/src/lib/events/Utils.js +6 -0
- package/build/src/lib/events/Utils.js.map +1 -0
- package/build/src/lib/parsers/UriTemplate.d.ts +94 -0
- package/build/src/lib/parsers/UriTemplate.js +419 -0
- package/build/src/lib/parsers/UriTemplate.js.map +1 -0
- package/build/src/lib/parsers/UrlEncoder.d.ts +5 -0
- package/build/src/lib/parsers/UrlEncoder.js +49 -0
- package/build/src/lib/parsers/UrlEncoder.js.map +1 -1
- package/build/src/models/HttpProject.d.ts +4 -1
- package/build/src/models/HttpProject.js +9 -6
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/ProjectParent.d.ts +9 -0
- package/build/src/models/ProjectParent.js +25 -0
- package/build/src/models/ProjectParent.js.map +1 -1
- package/build/src/models/Property.d.ts +8 -0
- package/build/src/models/Property.js +17 -0
- package/build/src/models/Property.js.map +1 -1
- package/build/src/models/Server.d.ts +14 -1
- package/build/src/models/Server.js +31 -1
- package/build/src/models/Server.js.map +1 -1
- package/build/src/runtime/actions/runnable/DeleteCookieRunnable.d.ts +1 -1
- package/build/src/runtime/actions/runnable/SetCookieRunnable.d.ts +1 -1
- package/build/src/runtime/actions/runnable/SetVariableRunnable.d.ts +1 -1
- package/build/src/runtime/http-engine/CoreEngine.d.ts +1 -1
- package/build/src/runtime/store/FilesSdk.d.ts +8 -0
- package/build/src/runtime/store/FilesSdk.js +15 -0
- package/build/src/runtime/store/FilesSdk.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/calculators/DataCalculator.ts +3 -3
- package/src/lib/events/Utils.ts +5 -0
- package/src/lib/parsers/UriTemplate.ts +494 -0
- package/src/lib/parsers/UrlEncoder.ts +51 -0
- package/src/models/HttpProject.ts +10 -7
- package/src/models/ProjectParent.ts +27 -0
- package/src/models/Property.ts +18 -0
- package/src/models/Server.ts +32 -1
- package/src/runtime/actions/runnable/DeleteCookieRunnable.ts +1 -1
- package/src/runtime/actions/runnable/SetCookieRunnable.ts +1 -1
- package/src/runtime/actions/runnable/SetVariableRunnable.ts +1 -1
- package/src/runtime/http-engine/CoreEngine.ts +1 -1
- package/src/runtime/store/FilesSdk.ts +16 -0
|
@@ -3,7 +3,7 @@ import { ActionRunnable } from './ActionRunnable.js';
|
|
|
3
3
|
import { ISetVariableAction } from '../../../models/actions/runnable/SetVariableAction.js';
|
|
4
4
|
import { Events } from '../../../events/Events.js';
|
|
5
5
|
import { RequestDataExtractor } from '../../../data/RequestDataExtractor.js';
|
|
6
|
-
import { IRequestLog } from '
|
|
6
|
+
import { IRequestLog } from '../../../models/RequestLog.js';
|
|
7
7
|
|
|
8
8
|
export class SetVariableRunnable extends ActionRunnable {
|
|
9
9
|
async request(request: IHttpRequest): Promise<void> {
|
|
@@ -3,7 +3,7 @@ import tls from 'tls';
|
|
|
3
3
|
import http from 'http';
|
|
4
4
|
import https from 'https';
|
|
5
5
|
import { HttpEngine, HttpEngineOptions, HeadersReceivedDetail } from './HttpEngine.js';
|
|
6
|
-
import { IRequestLog } from '
|
|
6
|
+
import { IRequestLog } from '../../models/RequestLog.js';
|
|
7
7
|
import { IHttpRequest } from '../../models/HttpRequest.js';
|
|
8
8
|
import { Response } from '../../models/Response.js';
|
|
9
9
|
import { SerializableError } from '../../models/SerializableError.js';
|
|
@@ -338,4 +338,20 @@ export class FilesSdk extends SdkBase {
|
|
|
338
338
|
const url = this.sdk.getUrl(RouteBuilder.files());
|
|
339
339
|
return this.sdk.ws.createAndConnect(url.toString(), token);
|
|
340
340
|
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Creates a WS client that listens to the file events.
|
|
344
|
+
*
|
|
345
|
+
* @param key The file key to observe
|
|
346
|
+
* @param media Whether to observe changes to the file media instead of meta.
|
|
347
|
+
* @param request Optional request options.
|
|
348
|
+
*/
|
|
349
|
+
async observeFile(key: string, media?: boolean, request: ISdkRequestOptions = {}): Promise<WebSocketNode | WebSocket> {
|
|
350
|
+
const token = request.token || this.sdk.token;
|
|
351
|
+
const url = this.sdk.getUrl(RouteBuilder.file(key));
|
|
352
|
+
if (media) {
|
|
353
|
+
url.searchParams.set('alt', 'media');
|
|
354
|
+
}
|
|
355
|
+
return this.sdk.ws.createAndConnect(url.toString(), token);
|
|
356
|
+
}
|
|
341
357
|
}
|