@api-client/core 0.6.25 → 0.6.28
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/src/events/BaseEvents.d.ts +15 -5
- package/build/src/events/BaseEvents.js.map +1 -1
- package/build/src/mocking/ProjectMock.d.ts +4 -0
- package/build/src/mocking/ProjectMock.js +6 -0
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/lib/Certificates.d.ts +24 -0
- package/build/src/mocking/lib/Certificates.js +49 -0
- package/build/src/mocking/lib/Certificates.js.map +1 -0
- package/build/src/mocking/lib/HostRules.d.ts +19 -0
- package/build/src/mocking/lib/HostRules.js +38 -0
- package/build/src/mocking/lib/HostRules.js.map +1 -0
- package/build/src/mocking/lib/Url.d.ts +11 -5
- package/build/src/mocking/lib/Url.js +17 -10
- package/build/src/mocking/lib/Url.js.map +1 -1
- package/package.json +1 -1
- package/src/events/BaseEvents.ts +16 -5
- package/src/mocking/ProjectMock.ts +6 -0
- package/src/mocking/lib/Certificates.ts +57 -0
- package/src/mocking/lib/HostRules.ts +42 -0
- package/src/mocking/lib/Url.ts +20 -13
|
@@ -50,7 +50,7 @@ export interface ContextReadBulkEventDetail {
|
|
|
50
50
|
/**
|
|
51
51
|
* An event to be used to read a list of object from the API store.
|
|
52
52
|
*/
|
|
53
|
-
export declare class ContextReadBulkEvent<T> extends ContextEvent<ContextReadBulkEventDetail, T> {
|
|
53
|
+
export declare class ContextReadBulkEvent<T> extends ContextEvent<ContextReadBulkEventDetail, T[]> {
|
|
54
54
|
/**
|
|
55
55
|
* @param type The type of the event
|
|
56
56
|
* @param ids The list of domain ids to read. These must be of the same domain type.
|
|
@@ -115,7 +115,7 @@ export declare class ContextDeleteEvent extends ContextEvent<ContextDeleteEventD
|
|
|
115
115
|
/**
|
|
116
116
|
* An event to be used to delete a number of entities in the context provider.
|
|
117
117
|
*/
|
|
118
|
-
export declare class ContextDeleteBulkEvent extends ContextEvent<ContextDeleteBulkEventDetail, ContextDeleteRecord> {
|
|
118
|
+
export declare class ContextDeleteBulkEvent extends ContextEvent<ContextDeleteBulkEventDetail, ContextDeleteRecord[]> {
|
|
119
119
|
/**
|
|
120
120
|
* An event to be used to delete a number of entities in the context provider.
|
|
121
121
|
* @param type The type of the event to dispatch.
|
|
@@ -142,7 +142,7 @@ export interface ContextDeleteRecord {
|
|
|
142
142
|
/**
|
|
143
143
|
* An event dispatched to the context store to restore previously deleted items.
|
|
144
144
|
*/
|
|
145
|
-
export declare class ContextRestoreEvent<T> extends ContextEvent<ContextDeleteRecord[], ContextChangeRecord<T
|
|
145
|
+
export declare class ContextRestoreEvent<T> extends ContextEvent<ContextDeleteRecord[], ContextChangeRecord<T>[]> {
|
|
146
146
|
/**
|
|
147
147
|
* An event dispatched to the context store to restore previously deleted items.
|
|
148
148
|
*
|
|
@@ -186,6 +186,16 @@ export interface ContextUpdateEventDetail<T> {
|
|
|
186
186
|
*/
|
|
187
187
|
parent?: string;
|
|
188
188
|
}
|
|
189
|
+
export interface ContextUpdateBulkEventDetail<T> {
|
|
190
|
+
/**
|
|
191
|
+
* The list of context store objects to be updated by the context provider.
|
|
192
|
+
*/
|
|
193
|
+
items: T[];
|
|
194
|
+
/**
|
|
195
|
+
* The id of the parent object, if applicable.
|
|
196
|
+
*/
|
|
197
|
+
parent?: string;
|
|
198
|
+
}
|
|
189
199
|
/**
|
|
190
200
|
* An event that is dispatched to update the entire object in the store.
|
|
191
201
|
* This is equivalent to PUT operation in REST HTTP.
|
|
@@ -212,7 +222,7 @@ export declare class ContextUpdateEvent<T extends object, U = T> extends Context
|
|
|
212
222
|
* @template T The object that is being updated.
|
|
213
223
|
* @template U The object that is returned by the context store after updating. By default it is the `T`.
|
|
214
224
|
*/
|
|
215
|
-
export declare class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<
|
|
225
|
+
export declare class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<ContextUpdateBulkEventDetail<T>, ContextChangeRecord<U>[]> {
|
|
216
226
|
/**
|
|
217
227
|
* An event that is dispatched to update the entire object in the store.
|
|
218
228
|
* This is equivalent to PUT operation in REST HTTP.
|
|
@@ -220,7 +230,7 @@ export declare class ContextUpdateBulkEvent<T extends object, U = T> extends Con
|
|
|
220
230
|
* @param type The type of the event to dispatch
|
|
221
231
|
* @param updateInfo The update information.
|
|
222
232
|
*/
|
|
223
|
-
constructor(type: string, updateInfo:
|
|
233
|
+
constructor(type: string, updateInfo: ContextUpdateBulkEventDetail<T>);
|
|
224
234
|
}
|
|
225
235
|
/**
|
|
226
236
|
* Data store query result object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseEvents.js","sourceRoot":"","sources":["../../../src/events/BaseEvents.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAc3C;;GAEG;AACH,MAAM,OAAO,YAAkC,SAAQ,WAAgD;IACrG;;;OAGG;IACH,YAAY,IAAY,EAAE,MAAS;QACjC,KAAK,CAAC,IAAI,EAAE;YACV,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE;gBACN,MAAM,EAAE,SAAS;gBACjB,GAAG,MAAM;aACV;SACF,CAAC,CAAC;IACL,CAAC;CACF;AAaD;;GAEG;AACH,MAAM,OAAO,gBAAoB,SAAQ,YAAuC;IAC9E;;;;OAIG;IACH,YAAY,IAAY,EAAE,EAAU,EAAE,MAAe;QACnD,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF;AASD;;GAEG;AACH,MAAM,OAAO,oBAAwB,SAAQ,
|
|
1
|
+
{"version":3,"file":"BaseEvents.js","sourceRoot":"","sources":["../../../src/events/BaseEvents.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAc3C;;GAEG;AACH,MAAM,OAAO,YAAkC,SAAQ,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js';
|
|
5
5
|
import { History } from './lib/History.js';
|
|
6
6
|
import { Url } from './lib/Url.js';
|
|
7
|
+
import { Certificates } from './lib/Certificates.js';
|
|
8
|
+
import { HostRules } from './lib/HostRules.js';
|
|
7
9
|
export { IRequestLogInit } from './lib/Request.js';
|
|
8
10
|
export { IResponseInit } from './lib/Response.js';
|
|
9
11
|
export { IUserInit } from './lib/User.js';
|
|
@@ -14,6 +16,8 @@ export declare class ProjectMock extends DataMock {
|
|
|
14
16
|
user: User;
|
|
15
17
|
history: History;
|
|
16
18
|
url: Url;
|
|
19
|
+
certificates: Certificates;
|
|
20
|
+
hostRules: HostRules;
|
|
17
21
|
/**
|
|
18
22
|
* @param init The library init options.
|
|
19
23
|
*/
|
|
@@ -4,12 +4,16 @@ import { Response } from './lib/Response.js';
|
|
|
4
4
|
import { User } from './lib/User.js';
|
|
5
5
|
import { History } from './lib/History.js';
|
|
6
6
|
import { Url } from './lib/Url.js';
|
|
7
|
+
import { Certificates } from './lib/Certificates.js';
|
|
8
|
+
import { HostRules } from './lib/HostRules.js';
|
|
7
9
|
export class ProjectMock extends DataMock {
|
|
8
10
|
projectRequest;
|
|
9
11
|
response;
|
|
10
12
|
user;
|
|
11
13
|
history;
|
|
12
14
|
url;
|
|
15
|
+
certificates;
|
|
16
|
+
hostRules;
|
|
13
17
|
/**
|
|
14
18
|
* @param init The library init options.
|
|
15
19
|
*/
|
|
@@ -20,6 +24,8 @@ export class ProjectMock extends DataMock {
|
|
|
20
24
|
this.user = new User(init);
|
|
21
25
|
this.history = new History(init);
|
|
22
26
|
this.url = new Url(init);
|
|
27
|
+
this.certificates = new Certificates(init);
|
|
28
|
+
this.hostRules = new HostRules(init);
|
|
23
29
|
}
|
|
24
30
|
}
|
|
25
31
|
//# sourceMappingURL=ProjectMock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectMock.js","sourceRoot":"","sources":["../../../src/mocking/ProjectMock.ts"],"names":[],"mappings":"AAAA,OA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AC3B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IDataMockInit, Lorem, Random, Types } from '@pawel-up/data-mock';
|
|
2
|
+
import { HttpCertificate } from '../../models/ClientCertificate.js';
|
|
3
|
+
export declare interface CertificateCreateInit {
|
|
4
|
+
binary?: boolean;
|
|
5
|
+
noPassphrase?: boolean;
|
|
6
|
+
type?: 'p12' | 'pem';
|
|
7
|
+
}
|
|
8
|
+
export declare class Certificates {
|
|
9
|
+
lorem: Lorem;
|
|
10
|
+
types: Types;
|
|
11
|
+
random: Random;
|
|
12
|
+
constructor(init?: IDataMockInit);
|
|
13
|
+
/**
|
|
14
|
+
* Creates a certificate definition.
|
|
15
|
+
*/
|
|
16
|
+
certificate(opts?: CertificateCreateInit): HttpCertificate;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a list of ClientCertificate objects that are used to create a new certificates.
|
|
19
|
+
*
|
|
20
|
+
* @param size The number of certificates to generate.
|
|
21
|
+
* @param opts Create options
|
|
22
|
+
*/
|
|
23
|
+
certificates(size?: number, opts?: CertificateCreateInit): HttpCertificate[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Lorem, Random, Types, Utils } from '@pawel-up/data-mock';
|
|
2
|
+
import { Certificate } from '../../models/ClientCertificate.js';
|
|
3
|
+
export class Certificates {
|
|
4
|
+
lorem;
|
|
5
|
+
types;
|
|
6
|
+
random;
|
|
7
|
+
constructor(init = {}) {
|
|
8
|
+
this.lorem = new Lorem(init);
|
|
9
|
+
this.types = new Types(init.seed);
|
|
10
|
+
this.random = new Random(init.seed);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates a certificate definition.
|
|
14
|
+
*/
|
|
15
|
+
certificate(opts = {}) {
|
|
16
|
+
const type = opts.type ? opts.type : this.random.pickOne(['p12', 'pem']);
|
|
17
|
+
const data = this.lorem.paragraph();
|
|
18
|
+
const cert = opts.binary ? Utils.strToBuffer(data) : data;
|
|
19
|
+
let instance;
|
|
20
|
+
if (type === 'p12') {
|
|
21
|
+
instance = Certificate.fromP12(cert, this.lorem.word());
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
instance = Certificate.fromPem(cert, '', this.lorem.word());
|
|
25
|
+
}
|
|
26
|
+
if (!opts.noPassphrase) {
|
|
27
|
+
instance.cert.passphrase = this.lorem.word();
|
|
28
|
+
if (type === 'pem') {
|
|
29
|
+
const key = instance.certKey;
|
|
30
|
+
key.passphrase = this.lorem.word();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return instance.toJSON();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates a list of ClientCertificate objects that are used to create a new certificates.
|
|
37
|
+
*
|
|
38
|
+
* @param size The number of certificates to generate.
|
|
39
|
+
* @param opts Create options
|
|
40
|
+
*/
|
|
41
|
+
certificates(size = 15, opts = {}) {
|
|
42
|
+
const result = [];
|
|
43
|
+
for (let i = 0; i < size; i++) {
|
|
44
|
+
result[result.length] = this.certificate(opts);
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Certificates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Certificates.js","sourceRoot":"","sources":["../../../../src/mocking/lib/Certificates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAmB,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AAK,KAAK,EAAE;gBAClB,MAAM,GAAG,GAAG,QAAQ,CAAC,OAA2B,CAAC;gBACjD,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;aACpC;SACF;QACD,OAAO,QAAQ,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACF,YAAY,CAAC,IAAI,GAAG,EAAE,EAAE,OAA8B,EAAE;QACvD,MAAM,MAAM,GAAsB,EAAE,CAAC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAChD;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Lorem, Types, Internet, IDataMockInit } from '@pawel-up/data-mock';
|
|
2
|
+
import { IHostRule } from '../../models/HostRule.js';
|
|
3
|
+
export declare class HostRules {
|
|
4
|
+
types: Types;
|
|
5
|
+
lorem: Lorem;
|
|
6
|
+
internet: Internet;
|
|
7
|
+
constructor(init?: IDataMockInit);
|
|
8
|
+
/**
|
|
9
|
+
* Generates random host rule data object.
|
|
10
|
+
*/
|
|
11
|
+
rule(): IHostRule;
|
|
12
|
+
/**
|
|
13
|
+
* Generates a list of host rules.
|
|
14
|
+
*
|
|
15
|
+
* @param size Number of items to generate. Default to 25.
|
|
16
|
+
* @return List of datastore entries.
|
|
17
|
+
*/
|
|
18
|
+
rules(size?: number): IHostRule[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Lorem, Types, Internet } from '@pawel-up/data-mock';
|
|
2
|
+
export class HostRules {
|
|
3
|
+
types;
|
|
4
|
+
lorem;
|
|
5
|
+
internet;
|
|
6
|
+
constructor(init = {}) {
|
|
7
|
+
this.types = new Types(init.seed);
|
|
8
|
+
this.lorem = new Lorem(init);
|
|
9
|
+
this.internet = new Internet(init);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Generates random host rule data object.
|
|
13
|
+
*/
|
|
14
|
+
rule() {
|
|
15
|
+
const result = {
|
|
16
|
+
key: this.types.uuid(),
|
|
17
|
+
from: this.internet.uri(),
|
|
18
|
+
to: this.internet.uri(),
|
|
19
|
+
enabled: this.types.boolean(),
|
|
20
|
+
comment: this.lorem.paragraph(),
|
|
21
|
+
};
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Generates a list of host rules.
|
|
26
|
+
*
|
|
27
|
+
* @param size Number of items to generate. Default to 25.
|
|
28
|
+
* @return List of datastore entries.
|
|
29
|
+
*/
|
|
30
|
+
rules(size = 25) {
|
|
31
|
+
const result = [];
|
|
32
|
+
for (let i = 0; i < size; i++) {
|
|
33
|
+
result.push(this.rule());
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=HostRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HostRules.js","sourceRoot":"","sources":["../../../../src/mocking/lib/HostRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAiB,MAAM,qBAAqB,CAAC;AAG5E,MAAM,OAAO,SAAS;IACpB,KAAK,CAAQ;IACb,KAAK,CAAQ;IACb,QAAQ,CAAW;IAEnB,YAAY,OAAsB,EAAE;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAI;QACF,MAAM,MAAM,GAAc;YACxB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YACtB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACzB,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACvB,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;YAC7B,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;SAChC,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,GAAG,EAAE;QACb,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;SAC1B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IUrl } from
|
|
3
|
-
/**
|
|
4
|
-
* Mocks the URL data.
|
|
5
|
-
*/
|
|
1
|
+
import { Internet, Types, Time, IDataMockInit } from '@pawel-up/data-mock';
|
|
2
|
+
import { IUrl } from '../../models/Url.js';
|
|
6
3
|
export declare class Url {
|
|
7
4
|
types: Types;
|
|
8
5
|
internet: Internet;
|
|
6
|
+
time: Time;
|
|
9
7
|
constructor(init?: IDataMockInit);
|
|
8
|
+
/**
|
|
9
|
+
* Generates a single ARC URL model item.
|
|
10
|
+
*/
|
|
10
11
|
url(): IUrl;
|
|
12
|
+
/**
|
|
13
|
+
* Generates list of ARC URL models.
|
|
14
|
+
*
|
|
15
|
+
* @returns List of datastore entries.
|
|
16
|
+
*/
|
|
11
17
|
urls(size?: number): IUrl[];
|
|
12
18
|
}
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
import { Internet, Types } from
|
|
2
|
-
/**
|
|
3
|
-
* Mocks the URL data.
|
|
4
|
-
*/
|
|
1
|
+
import { Internet, Types, Time } from '@pawel-up/data-mock';
|
|
5
2
|
export class Url {
|
|
6
3
|
types;
|
|
7
4
|
internet;
|
|
5
|
+
time;
|
|
8
6
|
constructor(init = {}) {
|
|
9
7
|
this.types = new Types(init.seed);
|
|
10
8
|
this.internet = new Internet(init);
|
|
9
|
+
this.time = new Time(init);
|
|
11
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Generates a single ARC URL model item.
|
|
13
|
+
*/
|
|
12
14
|
url() {
|
|
13
|
-
const
|
|
15
|
+
const url = this.internet.uri();
|
|
16
|
+
const time = this.types.datetime().getTime();
|
|
14
17
|
const result = {
|
|
15
|
-
|
|
16
|
-
cnt: this.types.number({ min:
|
|
17
|
-
|
|
18
|
+
time,
|
|
19
|
+
cnt: this.types.number({ min: 100, max: 1000 }),
|
|
20
|
+
key: url,
|
|
21
|
+
midnight: this.time.midnight(time),
|
|
18
22
|
};
|
|
19
|
-
date.setHours(0, 0, 0, 0);
|
|
20
|
-
result.midnight = date.getTime();
|
|
21
23
|
return result;
|
|
22
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Generates list of ARC URL models.
|
|
27
|
+
*
|
|
28
|
+
* @returns List of datastore entries.
|
|
29
|
+
*/
|
|
23
30
|
urls(size = 25) {
|
|
24
31
|
const result = [];
|
|
25
32
|
for (let i = 0; i < size; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Url.js","sourceRoot":"","sources":["../../../../src/mocking/lib/Url.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Url.js","sourceRoot":"","sources":["../../../../src/mocking/lib/Url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAiB,MAAM,qBAAqB,CAAC;AAG3E,MAAM,OAAO,GAAG;IACd,KAAK,CAAQ;IACb,QAAQ,CAAW;IACnB,IAAI,CAAO;IAEX,YAAY,OAAoB,EAAE;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,GAAG;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7C,MAAM,MAAM,GAAS;YACnB,IAAI;YACJ,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;YAC/C,GAAG,EAAE,GAAG;YACR,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;SACnC,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,IAAI,CAAC,IAAI,GAAG,EAAE;QACZ,MAAM,MAAM,GAAW,EAAE,CAAC;QAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;SACzB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
package/package.json
CHANGED
package/src/events/BaseEvents.ts
CHANGED
|
@@ -68,7 +68,7 @@ export interface ContextReadBulkEventDetail {
|
|
|
68
68
|
/**
|
|
69
69
|
* An event to be used to read a list of object from the API store.
|
|
70
70
|
*/
|
|
71
|
-
export class ContextReadBulkEvent<T> extends ContextEvent<ContextReadBulkEventDetail, T> {
|
|
71
|
+
export class ContextReadBulkEvent<T> extends ContextEvent<ContextReadBulkEventDetail, T[]> {
|
|
72
72
|
/**
|
|
73
73
|
* @param type The type of the event
|
|
74
74
|
* @param ids The list of domain ids to read. These must be of the same domain type.
|
|
@@ -142,7 +142,7 @@ export class ContextDeleteEvent extends ContextEvent<ContextDeleteEventDetail, C
|
|
|
142
142
|
/**
|
|
143
143
|
* An event to be used to delete a number of entities in the context provider.
|
|
144
144
|
*/
|
|
145
|
-
export class ContextDeleteBulkEvent extends ContextEvent<ContextDeleteBulkEventDetail, ContextDeleteRecord> {
|
|
145
|
+
export class ContextDeleteBulkEvent extends ContextEvent<ContextDeleteBulkEventDetail, ContextDeleteRecord[]> {
|
|
146
146
|
/**
|
|
147
147
|
* An event to be used to delete a number of entities in the context provider.
|
|
148
148
|
* @param type The type of the event to dispatch.
|
|
@@ -173,7 +173,7 @@ export interface ContextDeleteRecord {
|
|
|
173
173
|
/**
|
|
174
174
|
* An event dispatched to the context store to restore previously deleted items.
|
|
175
175
|
*/
|
|
176
|
-
export class ContextRestoreEvent<T> extends ContextEvent<ContextDeleteRecord[], ContextChangeRecord<T
|
|
176
|
+
export class ContextRestoreEvent<T> extends ContextEvent<ContextDeleteRecord[], ContextChangeRecord<T>[]> {
|
|
177
177
|
/**
|
|
178
178
|
* An event dispatched to the context store to restore previously deleted items.
|
|
179
179
|
*
|
|
@@ -237,6 +237,17 @@ export interface ContextUpdateEventDetail<T> {
|
|
|
237
237
|
parent?: string;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
export interface ContextUpdateBulkEventDetail<T> {
|
|
241
|
+
/**
|
|
242
|
+
* The list of context store objects to be updated by the context provider.
|
|
243
|
+
*/
|
|
244
|
+
items: T[];
|
|
245
|
+
/**
|
|
246
|
+
* The id of the parent object, if applicable.
|
|
247
|
+
*/
|
|
248
|
+
parent?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
240
251
|
/**
|
|
241
252
|
* An event that is dispatched to update the entire object in the store.
|
|
242
253
|
* This is equivalent to PUT operation in REST HTTP.
|
|
@@ -266,7 +277,7 @@ export class ContextUpdateEvent<T extends object, U = T> extends ContextEvent<Co
|
|
|
266
277
|
* @template T The object that is being updated.
|
|
267
278
|
* @template U The object that is returned by the context store after updating. By default it is the `T`.
|
|
268
279
|
*/
|
|
269
|
-
export class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<
|
|
280
|
+
export class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEvent<ContextUpdateBulkEventDetail<T>, ContextChangeRecord<U>[]> {
|
|
270
281
|
/**
|
|
271
282
|
* An event that is dispatched to update the entire object in the store.
|
|
272
283
|
* This is equivalent to PUT operation in REST HTTP.
|
|
@@ -274,7 +285,7 @@ export class ContextUpdateBulkEvent<T extends object, U = T> extends ContextEven
|
|
|
274
285
|
* @param type The type of the event to dispatch
|
|
275
286
|
* @param updateInfo The update information.
|
|
276
287
|
*/
|
|
277
|
-
constructor(type: string, updateInfo:
|
|
288
|
+
constructor(type: string, updateInfo: ContextUpdateBulkEventDetail<T>) {
|
|
278
289
|
super(type, updateInfo);
|
|
279
290
|
}
|
|
280
291
|
}
|
|
@@ -4,6 +4,8 @@ import { Response } from './lib/Response.js';
|
|
|
4
4
|
import { User } from './lib/User.js';
|
|
5
5
|
import { History } from './lib/History.js';
|
|
6
6
|
import { Url } from './lib/Url.js';
|
|
7
|
+
import { Certificates } from './lib/Certificates.js';
|
|
8
|
+
import { HostRules } from './lib/HostRules.js';
|
|
7
9
|
|
|
8
10
|
export { IRequestLogInit } from './lib/Request.js';
|
|
9
11
|
export { IResponseInit } from './lib/Response.js';
|
|
@@ -16,6 +18,8 @@ export class ProjectMock extends DataMock {
|
|
|
16
18
|
user: User;
|
|
17
19
|
history: History;
|
|
18
20
|
url: Url;
|
|
21
|
+
certificates: Certificates;
|
|
22
|
+
hostRules: HostRules;
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
25
|
* @param init The library init options.
|
|
@@ -27,5 +31,7 @@ export class ProjectMock extends DataMock {
|
|
|
27
31
|
this.user = new User(init);
|
|
28
32
|
this.history = new History(init);
|
|
29
33
|
this.url = new Url(init);
|
|
34
|
+
this.certificates = new Certificates(init);
|
|
35
|
+
this.hostRules = new HostRules(init);
|
|
30
36
|
}
|
|
31
37
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IDataMockInit, Lorem, Random, Types, Utils } from '@pawel-up/data-mock';
|
|
2
|
+
import { HttpCertificate, Certificate, ICertificateData } from '../../models/ClientCertificate.js';
|
|
3
|
+
|
|
4
|
+
export declare interface CertificateCreateInit {
|
|
5
|
+
binary?: boolean;
|
|
6
|
+
noPassphrase?: boolean;
|
|
7
|
+
type?: 'p12' | 'pem';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class Certificates {
|
|
11
|
+
lorem: Lorem;
|
|
12
|
+
types: Types;
|
|
13
|
+
random: Random;
|
|
14
|
+
|
|
15
|
+
constructor(init: IDataMockInit={}) {
|
|
16
|
+
this.lorem = new Lorem(init);
|
|
17
|
+
this.types = new Types(init.seed);
|
|
18
|
+
this.random = new Random(init.seed);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates a certificate definition.
|
|
23
|
+
*/
|
|
24
|
+
certificate(opts: CertificateCreateInit = {}): HttpCertificate {
|
|
25
|
+
const type = opts.type ? opts.type : this.random.pickOne(['p12', 'pem']);
|
|
26
|
+
const data = this.lorem.paragraph();
|
|
27
|
+
const cert = opts.binary ? Utils.strToBuffer(data) : data;
|
|
28
|
+
let instance: Certificate;
|
|
29
|
+
if (type === 'p12') {
|
|
30
|
+
instance = Certificate.fromP12(cert, this.lorem.word());
|
|
31
|
+
} else {
|
|
32
|
+
instance = Certificate.fromPem(cert, '', this.lorem.word());
|
|
33
|
+
}
|
|
34
|
+
if (!opts.noPassphrase) {
|
|
35
|
+
instance.cert.passphrase = this.lorem.word();
|
|
36
|
+
if (type === 'pem') {
|
|
37
|
+
const key = instance.certKey as ICertificateData;
|
|
38
|
+
key.passphrase = this.lorem.word();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return instance.toJSON();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Creates a list of ClientCertificate objects that are used to create a new certificates.
|
|
46
|
+
*
|
|
47
|
+
* @param size The number of certificates to generate.
|
|
48
|
+
* @param opts Create options
|
|
49
|
+
*/
|
|
50
|
+
certificates(size = 15, opts: CertificateCreateInit = {}): HttpCertificate[] {
|
|
51
|
+
const result: HttpCertificate[] = [];
|
|
52
|
+
for (let i = 0; i < size; i++) {
|
|
53
|
+
result[result.length] = this.certificate(opts);
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Lorem, Types, Internet, IDataMockInit } from '@pawel-up/data-mock';
|
|
2
|
+
import { IHostRule } from '../../models/HostRule.js';
|
|
3
|
+
|
|
4
|
+
export class HostRules {
|
|
5
|
+
types: Types;
|
|
6
|
+
lorem: Lorem;
|
|
7
|
+
internet: Internet;
|
|
8
|
+
|
|
9
|
+
constructor(init: IDataMockInit = {}) {
|
|
10
|
+
this.types = new Types(init.seed);
|
|
11
|
+
this.lorem = new Lorem(init);
|
|
12
|
+
this.internet = new Internet(init);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Generates random host rule data object.
|
|
17
|
+
*/
|
|
18
|
+
rule(): IHostRule {
|
|
19
|
+
const result: IHostRule = {
|
|
20
|
+
key: this.types.uuid(),
|
|
21
|
+
from: this.internet.uri(),
|
|
22
|
+
to: this.internet.uri(),
|
|
23
|
+
enabled: this.types.boolean(),
|
|
24
|
+
comment: this.lorem.paragraph(),
|
|
25
|
+
};
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Generates a list of host rules.
|
|
31
|
+
*
|
|
32
|
+
* @param size Number of items to generate. Default to 25.
|
|
33
|
+
* @return List of datastore entries.
|
|
34
|
+
*/
|
|
35
|
+
rules(size = 25): IHostRule[] {
|
|
36
|
+
const result = [];
|
|
37
|
+
for (let i = 0; i < size; i++) {
|
|
38
|
+
result.push(this.rule());
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/src/mocking/lib/Url.ts
CHANGED
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IUrl } from
|
|
1
|
+
import { Internet, Types, Time, IDataMockInit } from '@pawel-up/data-mock';
|
|
2
|
+
import { IUrl } from '../../models/Url.js';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Mocks the URL data.
|
|
6
|
-
*/
|
|
7
4
|
export class Url {
|
|
8
5
|
types: Types;
|
|
9
6
|
internet: Internet;
|
|
10
|
-
|
|
7
|
+
time: Time;
|
|
8
|
+
|
|
11
9
|
constructor(init: IDataMockInit={}) {
|
|
12
10
|
this.types = new Types(init.seed);
|
|
13
11
|
this.internet = new Internet(init);
|
|
12
|
+
this.time = new Time(init);
|
|
14
13
|
}
|
|
15
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Generates a single ARC URL model item.
|
|
17
|
+
*/
|
|
16
18
|
url(): IUrl {
|
|
17
|
-
const
|
|
19
|
+
const url = this.internet.uri();
|
|
20
|
+
const time = this.types.datetime().getTime();
|
|
18
21
|
const result: IUrl = {
|
|
19
|
-
|
|
20
|
-
cnt: this.types.number({ min:
|
|
21
|
-
|
|
22
|
+
time,
|
|
23
|
+
cnt: this.types.number({ min: 100, max: 1000 }),
|
|
24
|
+
key: url,
|
|
25
|
+
midnight: this.time.midnight(time),
|
|
22
26
|
};
|
|
23
|
-
date.setHours(0, 0, 0, 0);
|
|
24
|
-
result.midnight = date.getTime();
|
|
25
27
|
return result;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Generates list of ARC URL models.
|
|
32
|
+
*
|
|
33
|
+
* @returns List of datastore entries.
|
|
34
|
+
*/
|
|
35
|
+
urls(size = 25): IUrl[] {
|
|
29
36
|
const result: IUrl[] = [];
|
|
30
37
|
for (let i = 0; i < size; i++) {
|
|
31
38
|
result.push(this.url());
|