@api-client/core 0.6.16 → 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 (102) hide show
  1. package/build/src/amf/ApiSchemaGenerator.d.ts +5 -5
  2. package/build/src/amf/ApiSchemaGenerator.js.map +1 -1
  3. package/build/src/amf/ApiSchemaValues.d.ts +6 -0
  4. package/build/src/amf/ApiSchemaValues.js +31 -0
  5. package/build/src/amf/ApiSchemaValues.js.map +1 -1
  6. package/build/src/amf/Parsing.d.ts +46 -0
  7. package/build/src/amf/Parsing.js +2 -0
  8. package/build/src/amf/Parsing.js.map +1 -0
  9. package/build/src/amf/shape/ShapeBase.d.ts +3 -3
  10. package/build/src/amf/shape/ShapeBase.js +3 -0
  11. package/build/src/amf/shape/ShapeBase.js.map +1 -1
  12. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +4 -1
  13. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +1 -1
  14. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +1 -1
  15. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +1 -1
  16. package/build/src/events/EventTypes.d.ts +6 -0
  17. package/build/src/events/EventTypes.js +2 -0
  18. package/build/src/events/EventTypes.js.map +1 -1
  19. package/build/src/events/Events.d.ts +5 -3
  20. package/build/src/events/Events.js +2 -0
  21. package/build/src/events/Events.js.map +1 -1
  22. package/build/src/events/amf/AmfEventTypes.d.ts +6 -0
  23. package/build/src/events/amf/AmfEventTypes.js +7 -0
  24. package/build/src/events/amf/AmfEventTypes.js.map +1 -0
  25. package/build/src/events/amf/AmfEvents.d.ts +34 -0
  26. package/build/src/events/amf/AmfEvents.js +59 -0
  27. package/build/src/events/amf/AmfEvents.js.map +1 -0
  28. package/build/src/events/authorization/AuthorizationEvents.d.ts +8 -8
  29. package/build/src/events/authorization/AuthorizationEvents.js +8 -8
  30. package/build/src/events/authorization/AuthorizationEvents.js.map +1 -1
  31. package/build/src/events/cookies/CookieEvents.d.ts +8 -8
  32. package/build/src/events/cookies/CookieEvents.js +8 -8
  33. package/build/src/events/cookies/CookieEvents.js.map +1 -1
  34. package/build/src/events/encryption/EncryptionEvents.d.ts +4 -4
  35. package/build/src/events/encryption/EncryptionEvents.js +4 -4
  36. package/build/src/events/encryption/EncryptionEvents.js.map +1 -1
  37. package/build/src/events/environment/EnvironmentEvents.d.ts +2 -2
  38. package/build/src/events/environment/EnvironmentEvents.js +2 -2
  39. package/build/src/events/environment/EnvironmentEvents.js.map +1 -1
  40. package/build/src/events/models/ClientCertificateEvents.d.ts +11 -11
  41. package/build/src/events/models/ClientCertificateEvents.js +11 -11
  42. package/build/src/events/models/ClientCertificateEvents.js.map +1 -1
  43. package/build/src/events/process/ProcessEvents.d.ts +6 -6
  44. package/build/src/events/process/ProcessEvents.js +6 -6
  45. package/build/src/events/process/ProcessEvents.js.map +1 -1
  46. package/build/src/events/reporting/ReportingEvents.d.ts +2 -2
  47. package/build/src/events/reporting/ReportingEvents.js +2 -2
  48. package/build/src/events/reporting/ReportingEvents.js.map +1 -1
  49. package/build/src/events/telemetry/TelemetryEvents.d.ts +6 -6
  50. package/build/src/events/telemetry/TelemetryEvents.js +6 -6
  51. package/build/src/events/telemetry/TelemetryEvents.js.map +1 -1
  52. package/build/src/events/transport/TransportEvents.d.ts +3 -3
  53. package/build/src/events/transport/TransportEvents.js +3 -3
  54. package/build/src/events/transport/TransportEvents.js.map +1 -1
  55. package/build/src/models/data/DataAssociation.d.ts +4 -0
  56. package/build/src/models/data/DataAssociation.js +8 -0
  57. package/build/src/models/data/DataAssociation.js.map +1 -1
  58. package/build/src/models/data/DataEntity.d.ts +16 -12
  59. package/build/src/models/data/DataEntity.js +54 -50
  60. package/build/src/models/data/DataEntity.js.map +1 -1
  61. package/build/src/models/data/DataNamespace.d.ts +14 -0
  62. package/build/src/models/data/DataNamespace.js +50 -0
  63. package/build/src/models/data/DataNamespace.js.map +1 -1
  64. package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js +2 -2
  65. package/build/src/runtime/actions/runnable/DeleteCookieRunnable.js.map +1 -1
  66. package/build/src/runtime/actions/runnable/SetCookieRunnable.js +1 -1
  67. package/build/src/runtime/actions/runnable/SetCookieRunnable.js.map +1 -1
  68. package/build/src/runtime/actions/runnable/SetVariableRunnable.js +1 -1
  69. package/build/src/runtime/actions/runnable/SetVariableRunnable.js.map +1 -1
  70. package/build/src/runtime/modules/RequestCookies.js +2 -2
  71. package/build/src/runtime/modules/RequestCookies.js.map +1 -1
  72. package/package.json +1 -1
  73. package/src/amf/ApiSchemaGenerator.ts +5 -5
  74. package/src/amf/ApiSchemaValues.ts +32 -0
  75. package/src/amf/Parsing.ts +49 -0
  76. package/src/amf/shape/ShapeBase.ts +6 -3
  77. package/src/amf/shape/ShapeJsonSchemaGenerator.ts +4 -1
  78. package/src/amf/shape/ShapeXmlSchemaGenerator.ts +1 -1
  79. package/src/events/EventTypes.ts +2 -0
  80. package/src/events/Events.ts +2 -0
  81. package/src/events/amf/AmfEventTypes.ts +6 -0
  82. package/src/events/amf/AmfEvents.ts +63 -0
  83. package/src/events/authorization/AuthorizationEvents.ts +8 -8
  84. package/src/events/cookies/CookieEvents.ts +8 -8
  85. package/src/events/encryption/EncryptionEvents.ts +4 -4
  86. package/src/events/environment/EnvironmentEvents.ts +2 -2
  87. package/src/events/models/ClientCertificateEvents.ts +11 -11
  88. package/src/events/process/ProcessEvents.ts +6 -6
  89. package/src/events/reporting/ReportingEvents.ts +2 -2
  90. package/src/events/telemetry/TelemetryEvents.ts +6 -6
  91. package/src/events/transport/TransportEvents.ts +3 -3
  92. package/src/models/data/DataAssociation.ts +9 -0
  93. package/src/models/data/DataEntity.ts +56 -53
  94. package/src/models/data/DataNamespace.ts +54 -0
  95. package/src/runtime/actions/runnable/DeleteCookieRunnable.ts +2 -2
  96. package/src/runtime/actions/runnable/SetCookieRunnable.ts +1 -1
  97. package/src/runtime/actions/runnable/SetVariableRunnable.ts +1 -1
  98. package/src/runtime/modules/RequestCookies.ts +2 -2
  99. package/build/src/models/data/DataAssociationSchema.d.ts +0 -68
  100. package/build/src/models/data/DataAssociationSchema.js +0 -2
  101. package/build/src/models/data/DataAssociationSchema.js.map +0 -1
  102. package/src/models/data/DataAssociationSchema.ts +0 -70
@@ -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,CA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}
@@ -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,C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;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,MAA2B,EAAE,SAAsB,MAAM;QAChF,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"}
@@ -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,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAuBhJ,MAAM,OAAO,YAAY;IACvB;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAmB;QACtC,MAAM,MAAM,GAAgD,EAAE,CAAC;QAC/D,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE;YAClD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,IAAI;YAChB,MAAM;SACP,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAmB,EAAE,MAAc;QACzD,MAAM,MAAM,GAA4B,EAAE,MAAM,EAAE,CAAC;QACnD,MAAM,CAAC,GAAG,IAAI,YAAY,CAAyC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACxG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAmB,EAAE,GAAW;QACnD,MAAM,MAAM,GAAyB,EAAE,GAAG,EAAE,CAAC;QAC7C,MAAM,CAAC,GAAG,IAAI,YAAY,CAAsC,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAClG,MAA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AI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,EAAE,MAAM,EAAE;SACnB,CAAC,CAAC;QACH,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,MAAwC,EAAE,SAAsB,MAAM;QAClF,MAAM,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,C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AAY,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"}
@@ -4,35 +4,35 @@ export declare class ClientCertificateEvents {
4
4
  /**
5
5
  * Dispatches an event handled by the data store to read the client certificate.
6
6
  *
7
- * @param target A node on which to dispatch the event.
8
7
  * @param id The id of the client certificate
8
+ * @param target A node on which to dispatch the event.
9
9
  * @returns Promise resolved to a client certificate model.
10
10
  */
11
- static read(target: EventTarget, id: string): Promise<HttpCertificate | undefined>;
11
+ static read(id: string, target?: EventTarget): Promise<HttpCertificate | undefined>;
12
12
  /**
13
13
  * Dispatches an event to list the client certificates data.
14
14
  *
15
- * @param target A node on which to dispatch the event.
16
15
  * @param opts Query options.
16
+ * @param target A node on which to dispatch the event.
17
17
  * @returns The list result.
18
18
  */
19
- static list(target: EventTarget, opts?: ContextListOptions): Promise<ContextListResult<HttpCertificate> | undefined>;
19
+ static list(opts?: ContextListOptions, target?: EventTarget): Promise<ContextListResult<HttpCertificate> | undefined>;
20
20
  /**
21
21
  * Dispatches an event handled by the data store to delete a client certificate
22
22
  *
23
- * @param target A node on which to dispatch the event.
24
23
  * @param id The id of the project to delete.
24
+ * @param target A node on which to dispatch the event.
25
25
  * @returns Promise resolved to a new revision after delete.
26
26
  */
27
- static delete(target: EventTarget, id: string): Promise<ContextDeleteRecord | undefined>;
27
+ static delete(id: string, target?: EventTarget): Promise<ContextDeleteRecord | undefined>;
28
28
  /**
29
29
  * Dispatches an event handled by the data store to insert a new client certificate.
30
30
  *
31
- * @param target A node on which to dispatch the event.
32
31
  * @param item The certificate object.
32
+ * @param target A node on which to dispatch the event.
33
33
  * @returns Promise resolved to the change record
34
34
  */
35
- static insert(target: EventTarget, item: ICertificateCreateOptions): Promise<ContextChangeRecord<HttpCertificate> | undefined>;
35
+ static insert(item: ICertificateCreateOptions, target?: EventTarget): Promise<ContextChangeRecord<HttpCertificate> | undefined>;
36
36
  static get State(): typeof StateEvents;
37
37
  }
38
38
  declare class StateEvents {
@@ -42,13 +42,13 @@ declare class StateEvents {
42
42
  * @param target A node on which to dispatch the event.
43
43
  * @param record Change record
44
44
  */
45
- static update(target: EventTarget, record: ContextChangeRecord<HttpCertificate>): void;
45
+ static update(record: ContextChangeRecord<HttpCertificate>, target?: EventTarget): void;
46
46
  /**
47
47
  * Dispatches an event after a client certificate was deleted
48
48
  *
49
- * @param target A node on which to dispatch the event.
50
49
  * @param record The context store delete record
50
+ * @param target A node on which to dispatch the event.
51
51
  */
52
- static delete(target: EventTarget, record: ContextDeleteRecord): void;
52
+ static delete(record: ContextDeleteRecord, target?: EventTarget): void;
53
53
  }
54
54
  export {};
@@ -4,11 +4,11 @@ export class ClientCertificateEvents {
4
4
  /**
5
5
  * Dispatches an event handled by the data store to read the client certificate.
6
6
  *
7
- * @param target A node on which to dispatch the event.
8
7
  * @param id The id of the client certificate
8
+ * @param target A node on which to dispatch the event.
9
9
  * @returns Promise resolved to a client certificate model.
10
10
  */
11
- static async read(target, id) {
11
+ static async read(id, target = window) {
12
12
  const e = new ContextReadEvent(ModelEventTypes.ClientCertificate.read, id);
13
13
  target.dispatchEvent(e);
14
14
  return e.detail.result;
@@ -16,11 +16,11 @@ export class ClientCertificateEvents {
16
16
  /**
17
17
  * Dispatches an event to list the client certificates data.
18
18
  *
19
- * @param target A node on which to dispatch the event.
20
19
  * @param opts Query options.
20
+ * @param target A node on which to dispatch the event.
21
21
  * @returns The list result.
22
22
  */
23
- static async list(target, opts) {
23
+ static async list(opts, target = window) {
24
24
  const e = new ContextListEvent(ModelEventTypes.ClientCertificate.list, opts);
25
25
  target.dispatchEvent(e);
26
26
  return e.detail.result;
@@ -28,11 +28,11 @@ export class ClientCertificateEvents {
28
28
  /**
29
29
  * Dispatches an event handled by the data store to delete a client certificate
30
30
  *
31
- * @param target A node on which to dispatch the event.
32
31
  * @param id The id of the project to delete.
32
+ * @param target A node on which to dispatch the event.
33
33
  * @returns Promise resolved to a new revision after delete.
34
34
  */
35
- static async delete(target, id) {
35
+ static async delete(id, target = window) {
36
36
  const e = new ContextDeleteEvent(ModelEventTypes.ClientCertificate.delete, id, undefined);
37
37
  target.dispatchEvent(e);
38
38
  return e.detail.result;
@@ -40,11 +40,11 @@ export class ClientCertificateEvents {
40
40
  /**
41
41
  * Dispatches an event handled by the data store to insert a new client certificate.
42
42
  *
43
- * @param target A node on which to dispatch the event.
44
43
  * @param item The certificate object.
44
+ * @param target A node on which to dispatch the event.
45
45
  * @returns Promise resolved to the change record
46
46
  */
47
- static async insert(target, item) {
47
+ static async insert(item, target = window) {
48
48
  const e = new ContextUpdateEvent(ModelEventTypes.ClientCertificate.insert, { item, });
49
49
  target.dispatchEvent(e);
50
50
  return e.detail.result;
@@ -60,17 +60,17 @@ class StateEvents {
60
60
  * @param target A node on which to dispatch the event.
61
61
  * @param record Change record
62
62
  */
63
- static update(target, record) {
63
+ static update(record, target = window) {
64
64
  const e = new ContextStateUpdateEvent(ModelEventTypes.ClientCertificate.State.update, record);
65
65
  target.dispatchEvent(e);
66
66
  }
67
67
  /**
68
68
  * Dispatches an event after a client certificate was deleted
69
69
  *
70
- * @param target A node on which to dispatch the event.
71
70
  * @param record The context store delete record
71
+ * @param target A node on which to dispatch the event.
72
72
  */
73
- static delete(target, record) {
73
+ static delete(record, target = window) {
74
74
  const e = new ContextStateDeleteEvent(ModelEventTypes.ClientCertificate.State.delete, record);
75
75
  target.dispatchEvent(e);
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ClientCertificateEvents.js","sourceRoot":"","sources":["../../../../src/events/models/ClientCertificateEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAyC,kBAAkB,EAAuB,kBAAkB,EAAuB,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AACjP,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,OAAO,uBAAuB;IAClC;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAmB,EAAE,EAAU;QAC/C,MAAM,CAAC,GAAG,IAAI,gBAAgB,CAAkB,eAAe,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC5F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAmB,EAAE,IAAyB;QAC9D,MAAM,CAAC,GAAG,IAAI,gBAAgB,CAAkB,eAAe,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAmB,EAAE,EAAU;QACjD,MAAM,CAAC,GAAG,IAAI,kBAAkB,CAAC,eAAe,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC,CAAC;QAC1F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAmB,EAAE,IAA+B;QACtE,MAAM,CAAC,GAAG,IAAI,kBAAkB,CAA6C,eAAe,CAAC,iBAAiB,CAAC,MAAM,EAAE,EAAE,IAAI,GAAG,CAAC,CAAC;QAClI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACxB,OAAO,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,MAAM,KAAK,KAAK;QACd,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAED,MAAM,WAAW;IACf;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,MAAmB,EAAE,MAA4C;QAC7E,MAAM,CAAC,GAAG,IAAI,uBAAuB,CAAkB,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/G,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,MAAmB,EAAE,MAA2B;QAC5D,MAAM,CAAC,GAAG,IAAI,uBAAuB,CAAC,eAAe,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9F,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;CACF"}
1
+ {"version":3,"file":"ClientCertificateEvents.js","sourceRoot":"","sources":["../../../../src/events/models/ClientCertificateEvents.ts"],"names":[],"mappings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