@api-client/core 0.6.18 → 0.6.19

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.
Files changed (69) hide show
  1. package/build/src/amf/Parsing.d.ts +46 -0
  2. package/build/src/amf/Parsing.js +2 -0
  3. package/build/src/amf/Parsing.js.map +1 -0
  4. package/build/src/events/EventTypes.d.ts +6 -0
  5. package/build/src/events/EventTypes.js +2 -0
  6. package/build/src/events/EventTypes.js.map +1 -1
  7. package/build/src/events/Events.d.ts +5 -3
  8. package/build/src/events/Events.js +2 -0
  9. package/build/src/events/Events.js.map +1 -1
  10. package/build/src/events/amf/AmfEventTypes.d.ts +6 -0
  11. package/build/src/events/amf/AmfEventTypes.js +7 -0
  12. package/build/src/events/amf/AmfEventTypes.js.map +1 -0
  13. package/build/src/events/amf/AmfEvents.d.ts +34 -0
  14. package/build/src/events/amf/AmfEvents.js +59 -0
  15. package/build/src/events/amf/AmfEvents.js.map +1 -0
  16. package/build/src/events/authorization/AuthorizationEvents.d.ts +8 -8
  17. package/build/src/events/authorization/AuthorizationEvents.js +8 -8
  18. package/build/src/events/authorization/AuthorizationEvents.js.map +1 -1
  19. package/build/src/events/cookies/CookieEvents.d.ts +8 -8
  20. package/build/src/events/cookies/CookieEvents.js +8 -8
  21. package/build/src/events/cookies/CookieEvents.js.map +1 -1
  22. package/build/src/events/encryption/EncryptionEvents.d.ts +4 -4
  23. package/build/src/events/encryption/EncryptionEvents.js +4 -4
  24. package/build/src/events/encryption/EncryptionEvents.js.map +1 -1
  25. package/build/src/events/environment/EnvironmentEvents.d.ts +2 -2
  26. package/build/src/events/environment/EnvironmentEvents.js +2 -2
  27. package/build/src/events/environment/EnvironmentEvents.js.map +1 -1
  28. package/build/src/events/models/ClientCertificateEvents.d.ts +11 -11
  29. package/build/src/events/models/ClientCertificateEvents.js +11 -11
  30. package/build/src/events/models/ClientCertificateEvents.js.map +1 -1
  31. package/build/src/events/process/ProcessEvents.d.ts +6 -6
  32. package/build/src/events/process/ProcessEvents.js +6 -6
  33. package/build/src/events/process/ProcessEvents.js.map +1 -1
  34. package/build/src/events/reporting/ReportingEvents.d.ts +2 -2
  35. package/build/src/events/reporting/ReportingEvents.js +2 -2
  36. package/build/src/events/reporting/ReportingEvents.js.map +1 -1
  37. package/build/src/events/telemetry/TelemetryEvents.d.ts +6 -6
  38. package/build/src/events/telemetry/TelemetryEvents.js +6 -6
  39. package/build/src/events/telemetry/TelemetryEvents.js.map +1 -1
  40. package/build/src/events/transport/TransportEvents.d.ts +3 -3
  41. package/build/src/events/transport/TransportEvents.js +3 -3
  42. package/build/src/events/transport/TransportEvents.js.map +1 -1
  43. package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js +2 -2
  44. package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js.map +1 -1
  45. package/build/src/runtime/actions/runnable/SetCookieRunnable.js +1 -1
  46. package/build/src/runtime/actions/runnable/SetCookieRunnable.js.map +1 -1
  47. package/build/src/runtime/actions/runnable/SetVariableRunnable.js +1 -1
  48. package/build/src/runtime/actions/runnable/SetVariableRunnable.js.map +1 -1
  49. package/build/src/runtime/modules/RequestCookies.js +2 -2
  50. package/build/src/runtime/modules/RequestCookies.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/amf/Parsing.ts +49 -0
  53. package/src/events/EventTypes.ts +2 -0
  54. package/src/events/Events.ts +2 -0
  55. package/src/events/amf/AmfEventTypes.ts +6 -0
  56. package/src/events/amf/AmfEvents.ts +63 -0
  57. package/src/events/authorization/AuthorizationEvents.ts +8 -8
  58. package/src/events/cookies/CookieEvents.ts +8 -8
  59. package/src/events/encryption/EncryptionEvents.ts +4 -4
  60. package/src/events/environment/EnvironmentEvents.ts +2 -2
  61. package/src/events/models/ClientCertificateEvents.ts +11 -11
  62. package/src/events/process/ProcessEvents.ts +6 -6
  63. package/src/events/reporting/ReportingEvents.ts +2 -2
  64. package/src/events/telemetry/TelemetryEvents.ts +6 -6
  65. package/src/events/transport/TransportEvents.ts +3 -3
  66. package/src/runtime/actions/runnable/DeleteCookieRunnable.ts +2 -2
  67. package/src/runtime/actions/runnable/SetCookieRunnable.ts +1 -1
  68. package/src/runtime/actions/runnable/SetVariableRunnable.ts +1 -1
  69. package/src/runtime/modules/RequestCookies.ts +2 -2
@@ -0,0 +1,46 @@
1
+ export interface AmfServiceProcessingOptions {
2
+ /**
3
+ * When true it treats the source as a zip data. Files are unzipped to a temporary location before processing.
4
+ */
5
+ zip?: boolean;
6
+ /**
7
+ * When true it validates the API when parsing.
8
+ *
9
+ * Validation is made in the `parse` phase and results (as string) are stored in the `validationResult` property of the service.
10
+ */
11
+ validate?: boolean;
12
+ /**
13
+ * The main file to use, if known
14
+ */
15
+ mainFile?: string;
16
+ }
17
+ export interface ApiSearchCandidate {
18
+ /**
19
+ * Absolute path to the file
20
+ */
21
+ absolute: string;
22
+ /**
23
+ * Relative path to the file
24
+ */
25
+ relative: string;
26
+ }
27
+ export interface ApiSearchTypeResult {
28
+ /**
29
+ * API type
30
+ */
31
+ type: string;
32
+ /**
33
+ * File media type
34
+ */
35
+ contentType: string;
36
+ }
37
+ export interface ApiParseResult {
38
+ /**
39
+ * The parsed API
40
+ */
41
+ model: string;
42
+ /**
43
+ * Api type info
44
+ */
45
+ type: ApiSearchTypeResult;
46
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Parsing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Parsing.js","sourceRoot":"","sources":["../../../src/amf/Parsing.ts"],"names":[],"mappings":""}
@@ -1,4 +1,10 @@
1
1
  export declare const EventTypes: Readonly<{
2
+ Amf: Readonly<{
3
+ processApiLink: string;
4
+ processBuffer: string;
5
+ processApiFile: string;
6
+ selectApiMainFile: string;
7
+ }>;
2
8
  Authorization: Readonly<{
3
9
  OAuth2: Readonly<{
4
10
  authorize: string;
@@ -7,7 +7,9 @@ import { ReportingEventTypes } from './reporting/ReportingEventTypes.js';
7
7
  import { TelemetryEventTypes } from './telemetry/TelemetryEventTypes.js';
8
8
  import { EnvironmentEventTypes } from './environment/EnvironmentEventTypes.js';
9
9
  import { TransportEventTypes } from './transport/TransportEventTypes.js';
10
+ import { AmfEventTypes } from './amf/AmfEventTypes.js';
10
11
  export const EventTypes = Object.freeze({
12
+ Amf: AmfEventTypes,
11
13
  Authorization: AuthorizationEventTypes,
12
14
  Cookie: CookieEventTypes,
13
15
  Encryption: EncryptionEventTypes,
@@ -1 +1 @@
1
- {"version":3,"file":"EventTypes.js","sourceRoot":"","sources":["../../../src/events/EventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,uBAAuB;IACtC,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE,oBAAoB;IAChC,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,qBAAqB;CACnC,CAAC,CAAC"}
1
+ {"version":3,"file":"EventTypes.js","sourceRoot":"","sources":["../../../src/events/EventTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,aAAa;IAClB,aAAa,EAAE,uBAAuB;IACtC,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE,oBAAoB;IAChC,KAAK,EAAE,eAAe;IACtB,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,mBAAmB;IAC9B,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,qBAAqB;CACnC,CAAC,CAAC"}
@@ -5,7 +5,9 @@ import { ProcessEvents } from './process/ProcessEvents.js';
5
5
  import { ReportingEvents } from './reporting/ReportingEvents.js';
6
6
  import { TelemetryEvents } from './telemetry/TelemetryEvents.js';
7
7
  import { EnvironmentEvents } from './environment/EnvironmentEvents.js';
8
+ import { AmfEvents } from './amf/AmfEvents.js';
8
9
  export declare const Events: Readonly<{
10
+ Amf: typeof AmfEvents;
9
11
  Authorization: typeof AuthorizationEvents;
10
12
  Cookie: typeof CookieEvents;
11
13
  Encryption: typeof EncryptionEvents;
@@ -17,13 +19,13 @@ export declare const Events: Readonly<{
17
19
  Telemetry: typeof TelemetryEvents;
18
20
  Transport: Readonly<{
19
21
  Core: Readonly<{
20
- send: (target: EventTarget, request: import("../models/HttpRequest.js").IHttpRequest, authorization?: import("../models/RequestAuthorization.js").IRequestAuthorization[] | undefined, config?: import("../models/RequestConfig.js").IRequestBaseConfig | undefined) => Promise<import("../models/RequestLog.js").IRequestLog | undefined>;
22
+ send: (request: import("../models/HttpRequest.js").IHttpRequest, authorization?: import("../models/RequestAuthorization.js").IRequestAuthorization[] | undefined, config?: import("../models/RequestConfig.js").IRequestBaseConfig | undefined, target?: EventTarget) => Promise<import("../models/RequestLog.js").IRequestLog | undefined>;
21
23
  }>;
22
24
  Http: Readonly<{
23
- send: (target: EventTarget, request: import("../models/HttpRequest.js").IHttpRequest, init?: RequestInit | undefined) => Promise<Response | undefined>;
25
+ send: (request: import("../models/HttpRequest.js").IHttpRequest, init?: RequestInit | undefined, target?: EventTarget) => Promise<Response | undefined>;
24
26
  }>;
25
27
  Project: Readonly<{
26
- send: (target: EventTarget, project: string | import("../models/HttpProject.js").HttpProject, opts: import("../../index.js").IProjectRunnerOptions) => Promise<import("../../index.js").IProjectExecutionLog | undefined>;
28
+ send: (project: string | import("../models/HttpProject.js").HttpProject, opts: import("../../index.js").IProjectRunnerOptions, target?: EventTarget) => Promise<import("../../index.js").IProjectExecutionLog | undefined>;
27
29
  }>;
28
30
  Ws: Readonly<{
29
31
  connect: (target: EventTarget) => Promise<any>;
@@ -7,7 +7,9 @@ import { ReportingEvents } from './reporting/ReportingEvents.js';
7
7
  import { TelemetryEvents } from './telemetry/TelemetryEvents.js';
8
8
  import { TransportEvent } from './transport/TransportEvents.js';
9
9
  import { EnvironmentEvents } from './environment/EnvironmentEvents.js';
10
+ import { AmfEvents } from './amf/AmfEvents.js';
10
11
  export const Events = Object.freeze({
12
+ Amf: AmfEvents,
11
13
  Authorization: AuthorizationEvents,
12
14
  Cookie: CookieEvents,
13
15
  Encryption: EncryptionEvents,
@@ -1 +1 @@
1
- {"version":3,"file":"Events.js","sourceRoot":"","sources":["../../../src/events/Events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,aAAa,EAAE,mBAAmB;IAClC,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,gBAAgB;IAC5B,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,cAAc;IACzB,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CAAC"}
1
+ {"version":3,"file":"Events.js","sourceRoot":"","sources":["../../../src/events/Events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,GAAG,EAAE,SAAS;IACd,aAAa,EAAE,mBAAmB;IAClC,MAAM,EAAE,YAAY;IACpB,UAAU,EAAE,gBAAgB;IAC5B,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,aAAa;IACtB,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,eAAe;IAC1B,SAAS,EAAE,cAAc;IACzB,WAAW,EAAE,iBAAiB;CAC/B,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const AmfEventTypes: Readonly<{
2
+ processApiLink: string;
3
+ processBuffer: string;
4
+ processApiFile: string;
5
+ selectApiMainFile: string;
6
+ }>;
@@ -0,0 +1,7 @@
1
+ export const AmfEventTypes = Object.freeze({
2
+ processApiLink: 'amfprocessapilink',
3
+ processBuffer: 'amfprocessbuffer',
4
+ processApiFile: 'amfprocessapifile',
5
+ selectApiMainFile: 'amfselectapimainfile',
6
+ });
7
+ //# sourceMappingURL=AmfEventTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmfEventTypes.js","sourceRoot":"","sources":["../../../../src/events/amf/AmfEventTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,cAAc,EAAE,mBAAmB;IACnC,aAAa,EAAE,kBAAkB;IACjC,cAAc,EAAE,mBAAmB;IACnC,iBAAiB,EAAE,sBAAsB;CAC1C,CAAC,CAAC"}
@@ -0,0 +1,34 @@
1
+ /// <reference types="node" />
2
+ import { ApiParseResult, AmfServiceProcessingOptions } from "../../amf/Parsing.js";
3
+ export declare class AmfEvents {
4
+ /**
5
+ * Downloads the file and processes it as a zipped API project.
6
+ *
7
+ * @param url API remote location.
8
+ * @param mainFile API main file. If not set the program will try to find the best match.
9
+ * @param md5 When set it will test data integrity with the MD5 hash
10
+ * @param packaging Default to `zip`.
11
+ * @returns Promise resolved to the AMF json-ld model.
12
+ */
13
+ static processApiLink(url: string, mainFile?: string, md5?: string, packaging?: string, target?: EventTarget): Promise<ApiParseResult>;
14
+ /**
15
+ * Parses API data to AMF model.
16
+ * @param buffer Buffer created from API file.
17
+ * @param opts Processing options
18
+ * @returns Promise resolved to the AMF json-ld model
19
+ */
20
+ static processBuffer(buffer: Buffer, opts?: AmfServiceProcessingOptions, target?: EventTarget): Promise<ApiParseResult>;
21
+ /**
22
+ * Processes file data.
23
+ * If the blob is a type of `application/zip` it processes the file as a
24
+ * zip file. Otherwise it processes it as a file.
25
+ *
26
+ * @param file File to process.
27
+ * @returns Promise resolved to the AMF json-ld model
28
+ */
29
+ static processApiFile(file: File | Blob, target?: EventTarget): Promise<ApiParseResult>;
30
+ /**
31
+ * Informs the UI to select a single file from the list of API entry point candidates.
32
+ */
33
+ static selectApiMainFile(candidates: string[], target?: EventTarget): Promise<string | undefined>;
34
+ }
@@ -0,0 +1,59 @@
1
+ import { ContextEvent } from "../BaseEvents.js";
2
+ import { AmfEventTypes } from './AmfEventTypes.js';
3
+ export class AmfEvents {
4
+ /**
5
+ * Downloads the file and processes it as a zipped API project.
6
+ *
7
+ * @param url API remote location.
8
+ * @param mainFile API main file. If not set the program will try to find the best match.
9
+ * @param md5 When set it will test data integrity with the MD5 hash
10
+ * @param packaging Default to `zip`.
11
+ * @returns Promise resolved to the AMF json-ld model.
12
+ */
13
+ static async processApiLink(url, mainFile, md5, packaging, target = window) {
14
+ const e = new ContextEvent(AmfEventTypes.processApiLink, {
15
+ url, mainFile, md5, packaging,
16
+ });
17
+ target.dispatchEvent(e);
18
+ return e.detail.result;
19
+ }
20
+ /**
21
+ * Parses API data to AMF model.
22
+ * @param buffer Buffer created from API file.
23
+ * @param opts Processing options
24
+ * @returns Promise resolved to the AMF json-ld model
25
+ */
26
+ static async processBuffer(buffer, opts, target = window) {
27
+ const e = new ContextEvent(AmfEventTypes.processBuffer, {
28
+ buffer, opts,
29
+ });
30
+ target.dispatchEvent(e);
31
+ return e.detail.result;
32
+ }
33
+ /**
34
+ * Processes file data.
35
+ * If the blob is a type of `application/zip` it processes the file as a
36
+ * zip file. Otherwise it processes it as a file.
37
+ *
38
+ * @param file File to process.
39
+ * @returns Promise resolved to the AMF json-ld model
40
+ */
41
+ static async processApiFile(file, target = window) {
42
+ const e = new ContextEvent(AmfEventTypes.processApiFile, {
43
+ file,
44
+ });
45
+ target.dispatchEvent(e);
46
+ return e.detail.result;
47
+ }
48
+ /**
49
+ * Informs the UI to select a single file from the list of API entry point candidates.
50
+ */
51
+ static async selectApiMainFile(candidates, target = window) {
52
+ const e = new ContextEvent(AmfEventTypes.selectApiMainFile, {
53
+ candidates,
54
+ });
55
+ target.dispatchEvent(e);
56
+ return e.detail.result;
57
+ }
58
+ }
59
+ //# sourceMappingURL=AmfEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AmfEvents.js","sourceRoot":"","sources":["../../../../src/events/amf/AmfEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,OAAO,SAAS;IACpB;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,QAAiB,EAAE,GAAY,EAAE,SAAkB,EAAE,SAAsB,MAAM;QACxH,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,cAAc,EAAE;YACvD,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS;SAC9B,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAQ,CAAC,CAAC,MAAM,CAAC,MAA6C,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,MAAc,EAAE,IAAkC,EAAE,SAAsB,MAAM;QACzG,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,aAAa,EAAE;YACtD,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAQ,CAAC,CAAC,MAAM,CAAC,MAA6C,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAiB,EAAE,SAAsB,MAAM;QACzE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,cAAc,EAAE;YACvD,IAAI;SACL,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAQ,CAAC,CAAC,MAAM,CAAC,MAA6C,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,UAAoB,EAAE,SAAsB,MAAM;QAC/E,MAAM,CAAC,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,iBAAiB,EAAE;YAC1D,UAAU;SACX,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAqC,CAAC;IACxD,CAAC;CACF"}
@@ -5,30 +5,30 @@ export declare class AuthorizationEvents {
5
5
  }
6
6
  declare class OAuth2Events {
7
7
  /**
8
- * @param target A node on which to dispatch the event.
9
8
  * @param config Authorization options.
9
+ * @param target A node on which to dispatch the event.
10
10
  * @returns Promise resolved with authorization result
11
11
  */
12
- static authorize(target: EventTarget, config: IOAuth2Authorization): Promise<ITokenInfo | undefined>;
12
+ static authorize(config: IOAuth2Authorization, target?: EventTarget): Promise<ITokenInfo | undefined>;
13
13
  /**
14
- * @param target A node on which to dispatch the event.
15
14
  * @param config Authorization options.
15
+ * @param target A node on which to dispatch the event.
16
16
  * @returns Promise resolved when the token is removed
17
17
  */
18
- static removeToken(target: EventTarget, config: ITokenRemoveOptions): Promise<void>;
18
+ static removeToken(config: ITokenRemoveOptions, target?: EventTarget): Promise<void>;
19
19
  }
20
20
  declare class OidcEvents {
21
21
  /**
22
- * @param target A node on which to dispatch the event.
23
22
  * @param config Authorization options.
23
+ * @param target A node on which to dispatch the event.
24
24
  * @returns Promise resolved with authorization result
25
25
  */
26
- static authorize(target: EventTarget, config: IOAuth2Authorization): Promise<(IOidcTokenInfo | IOidcTokenError)[] | undefined>;
26
+ static authorize(config: IOAuth2Authorization, target?: EventTarget): Promise<(IOidcTokenInfo | IOidcTokenError)[] | undefined>;
27
27
  /**
28
- * @param target A node on which to dispatch the event.
29
28
  * @param config Authorization options.
29
+ * @param target A node on which to dispatch the event.
30
30
  * @returns Promise resolved when the token is removed
31
31
  */
32
- static removeToken(target: EventTarget, config: ITokenRemoveOptions): Promise<void>;
32
+ static removeToken(config: ITokenRemoveOptions, target?: EventTarget): Promise<void>;
33
33
  }
34
34
  export {};
@@ -10,21 +10,21 @@ export class AuthorizationEvents {
10
10
  }
11
11
  class OAuth2Events {
12
12
  /**
13
- * @param target A node on which to dispatch the event.
14
13
  * @param config Authorization options.
14
+ * @param target A node on which to dispatch the event.
15
15
  * @returns Promise resolved with authorization result
16
16
  */
17
- static async authorize(target, config) {
17
+ static async authorize(config, target = window) {
18
18
  const e = new ContextEvent(AuthorizationEventTypes.OAuth2.authorize, config);
19
19
  target.dispatchEvent(e);
20
20
  return e.detail.result;
21
21
  }
22
22
  /**
23
- * @param target A node on which to dispatch the event.
24
23
  * @param config Authorization options.
24
+ * @param target A node on which to dispatch the event.
25
25
  * @returns Promise resolved when the token is removed
26
26
  */
27
- static async removeToken(target, config) {
27
+ static async removeToken(config, target = window) {
28
28
  const e = new ContextEvent(AuthorizationEventTypes.OAuth2.removeToken, config);
29
29
  target.dispatchEvent(e);
30
30
  return e.detail.result;
@@ -32,21 +32,21 @@ class OAuth2Events {
32
32
  }
33
33
  class OidcEvents {
34
34
  /**
35
- * @param target A node on which to dispatch the event.
36
35
  * @param config Authorization options.
36
+ * @param target A node on which to dispatch the event.
37
37
  * @returns Promise resolved with authorization result
38
38
  */
39
- static async authorize(target, config) {
39
+ static async authorize(config, target = window) {
40
40
  const e = new ContextEvent(AuthorizationEventTypes.Oidc.authorize, config);
41
41
  target.dispatchEvent(e);
42
42
  return e.detail.result;
43
43
  }
44
44
  /**
45
- * @param target A node on which to dispatch the event.
46
45
  * @param config Authorization options.
46
+ * @param target A node on which to dispatch the event.
47
47
  * @returns Promise resolved when the token is removed
48
48
  */
49
- static async removeToken(target, config) {
49
+ static async removeToken(config, target = window) {
50
50
  const e = new ContextEvent(AuthorizationEventTypes.Oidc.removeTokens, config);
51
51
  target.dispatchEvent(e);
52
52
  return e.detail.result;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthorizationEvents.js","sourceRoot":"","sources":["../../../../src/events/authorization/AuthorizationEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,OAAO,mBAAmB;IAC9B,MAAM,KAAK,MAAM;QACf,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,KAAK,IAAI;QACb,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAED,MAAM,YAAY;IAChB;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAmB,EAAE,MAA4B;QACtE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAmC,uBAAuB,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC/G,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAmB,EAAE,MAA2B;QACvE,MAAM,CAAC,GAAG,IAAI,YAAY,CAA4B,uBAAuB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC1G,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF;AAED,MAAM,UAAU;IACd;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAmB,EAAE,MAA4B;QACtE,MAAM,CAAC,GAAG,IAAI,YAAY,CAA2D,uBAAuB,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACrI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAAmB,EAAE,MAA2B;QACvE,MAAM,CAAC,GAAG,IAAI,YAAY,CAA4B,uBAAuB,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACzG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"AuthorizationEvents.js","sourceRoot":"","sources":["../../../../src/events/authorization/AuthorizationEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,OAAO,mBAAmB;IAC9B,MAAM,KAAK,MAAM;QACf,OAAO,YAAY,CAAC;IAC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C,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
@@ -30,20 +30,20 @@ export declare class CookieEvents {
30
30
  * @param domain The cookie domain
31
31
  * @returns The list of project index objects.
32
32
  */
33
- static listDomain(target: EventTarget, domain: string): Promise<IHttpCookie[] | undefined>;
33
+ static listDomain(domain: string, target?: EventTarget): Promise<IHttpCookie[] | undefined>;
34
34
  /**
35
35
  * @param target The target on which to dispatch the event
36
36
  * @param url The cookie URL
37
37
  * @returns The list of project index objects.
38
38
  */
39
- static listUrl(target: EventTarget, url: string): Promise<IHttpCookie[] | undefined>;
39
+ static listUrl(url: string, target?: EventTarget): Promise<IHttpCookie[] | undefined>;
40
40
  /**
41
41
  * Deletes cookies from the store.
42
42
  *
43
43
  * @param target The target on which to dispatch the event
44
44
  * @param cookies The list of cookies to remove
45
45
  */
46
- static delete(target: EventTarget, cookies: IHttpCookie[]): Promise<void>;
46
+ static delete(cookies: IHttpCookie[], target?: EventTarget): Promise<void>;
47
47
  /**
48
48
  * Deletes cookies from the store.
49
49
  *
@@ -51,7 +51,7 @@ export declare class CookieEvents {
51
51
  * @param url The url associated with the cookie. Depending on the session mechanism the URL or the domain and the path is used.
52
52
  * @param name The name of the cookie to remove. When not set all cookies are removed for the given URL.
53
53
  */
54
- static deleteUrl(target: EventTarget, url: string, name?: string): Promise<void>;
54
+ static deleteUrl(url: string, name?: string, target?: EventTarget): Promise<void>;
55
55
  /**
56
56
  * Updates a cookie in the store.
57
57
  *
@@ -59,7 +59,7 @@ export declare class CookieEvents {
59
59
  * @param cookie A cookie to update
60
60
  * @returns The change record of the updated cookie.
61
61
  */
62
- static update(target: EventTarget, cookie: IHttpCookie): Promise<ContextChangeRecord<IHttpCookie> | undefined>;
62
+ static update(cookie: IHttpCookie, target?: EventTarget): Promise<ContextChangeRecord<IHttpCookie> | undefined>;
63
63
  /**
64
64
  * Updates a cookie in the store in a bulk operation.
65
65
  *
@@ -67,7 +67,7 @@ export declare class CookieEvents {
67
67
  * @param cookies A list of cookies to update
68
68
  * @returns The change record of the updated cookie.
69
69
  */
70
- static updateBulk(target: EventTarget, cookies: IHttpCookie[]): Promise<void>;
70
+ static updateBulk(cookies: IHttpCookie[], target?: EventTarget): Promise<void>;
71
71
  /**
72
72
  * Events related to a state of a cookie store.
73
73
  */
@@ -79,12 +79,12 @@ declare class StateEvents {
79
79
  * @param target The target on which to dispatch the event
80
80
  * @param cookie The schema of the removed cookie
81
81
  */
82
- static delete(target: EventTarget, cookie: IHttpCookie): void;
82
+ static delete(cookie: IHttpCookie, target?: EventTarget): void;
83
83
  /**
84
84
  * Event dispatched when a cookie was deleted from the context store
85
85
  * @param target The target on which to dispatch the event
86
86
  * @param record The change record.
87
87
  */
88
- static update(target: EventTarget, record: ContextChangeRecord<IHttpCookie>): void;
88
+ static update(record: ContextChangeRecord<IHttpCookie>, target?: EventTarget): void;
89
89
  }
90
90
  export {};
@@ -24,7 +24,7 @@ export class CookieEvents {
24
24
  * @param domain The cookie domain
25
25
  * @returns The list of project index objects.
26
26
  */
27
- static async listDomain(target, domain) {
27
+ static async listDomain(domain, target = window) {
28
28
  const detail = { domain };
29
29
  const e = new ContextEvent(CookieEventTypes.listDomain, detail);
30
30
  target.dispatchEvent(e);
@@ -35,7 +35,7 @@ export class CookieEvents {
35
35
  * @param url The cookie URL
36
36
  * @returns The list of project index objects.
37
37
  */
38
- static async listUrl(target, url) {
38
+ static async listUrl(url, target = window) {
39
39
  const detail = { url };
40
40
  const e = new ContextEvent(CookieEventTypes.listUrl, detail);
41
41
  target.dispatchEvent(e);
@@ -47,7 +47,7 @@ export class CookieEvents {
47
47
  * @param target The target on which to dispatch the event
48
48
  * @param cookies The list of cookies to remove
49
49
  */
50
- static async delete(target, cookies) {
50
+ static async delete(cookies, target = window) {
51
51
  const detail = { cookies };
52
52
  const e = new ContextEvent(CookieEventTypes.delete, detail);
53
53
  target.dispatchEvent(e);
@@ -60,7 +60,7 @@ export class CookieEvents {
60
60
  * @param url The url associated with the cookie. Depending on the session mechanism the URL or the domain and the path is used.
61
61
  * @param name The name of the cookie to remove. When not set all cookies are removed for the given URL.
62
62
  */
63
- static async deleteUrl(target, url, name) {
63
+ static async deleteUrl(url, name, target = window) {
64
64
  const detail = { url, name };
65
65
  const e = new ContextEvent(CookieEventTypes.deleteUrl, detail);
66
66
  target.dispatchEvent(e);
@@ -73,7 +73,7 @@ export class CookieEvents {
73
73
  * @param cookie A cookie to update
74
74
  * @returns The change record of the updated cookie.
75
75
  */
76
- static async update(target, cookie) {
76
+ static async update(cookie, target = window) {
77
77
  const e = new ContextUpdateEvent(CookieEventTypes.update, { item: cookie });
78
78
  target.dispatchEvent(e);
79
79
  return e.detail.result;
@@ -85,7 +85,7 @@ export class CookieEvents {
85
85
  * @param cookies A list of cookies to update
86
86
  * @returns The change record of the updated cookie.
87
87
  */
88
- static async updateBulk(target, cookies) {
88
+ static async updateBulk(cookies, target = window) {
89
89
  const detail = { cookies };
90
90
  const e = new ContextEvent(CookieEventTypes.updateBulk, detail);
91
91
  target.dispatchEvent(e);
@@ -104,7 +104,7 @@ class StateEvents {
104
104
  * @param target The target on which to dispatch the event
105
105
  * @param cookie The schema of the removed cookie
106
106
  */
107
- static delete(target, cookie) {
107
+ static delete(cookie, target = window) {
108
108
  const e = new CustomEvent(CookieEventTypes.State.delete, {
109
109
  bubbles: true,
110
110
  composed: true,
@@ -118,7 +118,7 @@ class StateEvents {
118
118
  * @param target The target on which to dispatch the event
119
119
  * @param record The change record.
120
120
  */
121
- static update(target, record) {
121
+ static update(record, target = window) {
122
122
  const e = new ContextStateUpdateEvent(CookieEventTypes.State.update, record);
123
123
  target.dispatchEvent(e);
124
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CookieEvents.js","sourceRoot":"","sources":["../../../../src/events/cookies/CookieEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAgC,YAAY,EAAuB,kBAAkB,EAAE,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CAAC,GAAG,IAAI,uBAAuB,CAAc,gBAAgB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -16,21 +16,21 @@ export declare class EncryptionEvents {
16
16
  /**
17
17
  * Dispatches an event handled by the encryption module to encrypt the data
18
18
  *
19
- * @param target A node on which to dispatch the event.
20
19
  * @param data The data to encrypt
21
20
  * @param passphrase The passphrase to use in 2-way data encryption
22
21
  * @param method Encryption method to use
22
+ * @param target A node on which to dispatch the event.
23
23
  * @returns Promise resolved to the encryption result
24
24
  */
25
- static encrypt(target: EventTarget, data: any, passphrase: string, method: string): Promise<string | undefined>;
25
+ static encrypt(data: any, passphrase: string, method: string, target?: EventTarget): Promise<string | undefined>;
26
26
  /**
27
27
  * Dispatches an event handled by the encryption module to decrypt the data
28
28
  *
29
- * @param target A node on which to dispatch the event.
30
29
  * @param data The data to decrypt
31
30
  * @param passphrase The passphrase to use to decrypt the data
32
31
  * @param method Method used to encrypt the data
32
+ * @param target A node on which to dispatch the event.
33
33
  * @returns Promise resolved to the decrypted result
34
34
  */
35
- static decrypt(target: EventTarget, data: any, passphrase: string, method: string): Promise<string | undefined>;
35
+ static decrypt(data: any, passphrase: string, method: string, target?: EventTarget): Promise<string | undefined>;
36
36
  }
@@ -4,13 +4,13 @@ export class EncryptionEvents {
4
4
  /**
5
5
  * Dispatches an event handled by the encryption module to encrypt the data
6
6
  *
7
- * @param target A node on which to dispatch the event.
8
7
  * @param data The data to encrypt
9
8
  * @param passphrase The passphrase to use in 2-way data encryption
10
9
  * @param method Encryption method to use
10
+ * @param target A node on which to dispatch the event.
11
11
  * @returns Promise resolved to the encryption result
12
12
  */
13
- static async encrypt(target, data, passphrase, method) {
13
+ static async encrypt(data, passphrase, method, target = window) {
14
14
  const config = { data, passphrase, method };
15
15
  const e = new ContextEvent(EncryptionEventTypes.encrypt, config);
16
16
  target.dispatchEvent(e);
@@ -19,13 +19,13 @@ export class EncryptionEvents {
19
19
  /**
20
20
  * Dispatches an event handled by the encryption module to decrypt the data
21
21
  *
22
- * @param target A node on which to dispatch the event.
23
22
  * @param data The data to decrypt
24
23
  * @param passphrase The passphrase to use to decrypt the data
25
24
  * @param method Method used to encrypt the data
25
+ * @param target A node on which to dispatch the event.
26
26
  * @returns Promise resolved to the decrypted result
27
27
  */
28
- static async decrypt(target, data, passphrase, method) {
28
+ static async decrypt(data, passphrase, method, target = window) {
29
29
  const config = { data, passphrase, method };
30
30
  const e = new ContextEvent(EncryptionEventTypes.decrypt, config);
31
31
  target.dispatchEvent(e);
@@ -1 +1 @@
1
- {"version":3,"file":"EncryptionEvents.js","sourceRoot":"","sources":["../../../../src/events/encryption/EncryptionEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAiBhD,MAAM,OAAO,gBAAgB;IAC3B;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAmB,EAAE,IAAS,EAAE,UAAkB,EAAE,MAAc;QACrF,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAiC,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAmB,EAAE,IAAS,EAAE,UAAkB,EAAE,MAAc;QACrF,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAiC,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"EncryptionEvents.js","sourceRoot":"","sources":["../../../../src/events/encryption/EncryptionEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAiBhD,MAAM,OAAO,gBAAgB;IAC3B;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAS,EAAE,UAAkB,EAAE,MAAc,EAAE,SAAsB,MAAM;QAC9F,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAiC,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAS,EAAE,UAAkB,EAAE,MAAc,EAAE,SAAsB,MAAM;QAC9F,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;QACpE,MAAM,CAAC,GAAG,IAAI,YAAY,CAAiC,oBAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACjG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
@@ -6,10 +6,10 @@ export declare class EnvironmentEvents {
6
6
  /**
7
7
  * An event dispatched to set a variable in the current environment.
8
8
  *
9
- * @param target A node on which to dispatch the event.
10
9
  * @param name Variable name
11
10
  * @param value Variable value
11
+ * @param target A node on which to dispatch the event.
12
12
  * @returns Nothing. The promise resolves when the variable is set.
13
13
  */
14
- static set(target: EventTarget, name: string, value: string): Promise<void>;
14
+ static set(name: string, value: string, target?: EventTarget): Promise<void>;
15
15
  }
@@ -4,12 +4,12 @@ export class EnvironmentEvents {
4
4
  /**
5
5
  * An event dispatched to set a variable in the current environment.
6
6
  *
7
- * @param target A node on which to dispatch the event.
8
7
  * @param name Variable name
9
8
  * @param value Variable value
9
+ * @param target A node on which to dispatch the event.
10
10
  * @returns Nothing. The promise resolves when the variable is set.
11
11
  */
12
- static async set(target, name, value) {
12
+ static async set(name, value, target = window) {
13
13
  const detail = { name, value };
14
14
  const e = new ContextEvent(EnvironmentEventTypes.set, detail);
15
15
  target.dispatchEvent(e);
@@ -1 +1 @@
1
- {"version":3,"file":"EnvironmentEvents.js","sourceRoot":"","sources":["../../../../src/events/environment/EnvironmentEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,MAAM,OAAO,iBAAiB;IAC5B;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAmB,EAAE,IAAY,EAAE,KAAa;QAC/D,MAAM,MAAM,GAAuB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,IAAI,YAAY,CAA2B,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACxF,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}
1
+ {"version":3,"file":"EnvironmentEvents.js","sourceRoot":"","sources":["../../../../src/events/environment/EnvironmentEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOhD,MAAM,OAAO,iBAAiB;IAC5B;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,SAAsB,MAAM;QACxE,MAAM,MAAM,GAAuB,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,IAAI,YAAY,CAA2B,qBAAqB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACxF,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;CACF"}