@api-client/core 0.6.19 → 0.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +2 -0
- package/build/browser.js +2 -0
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/legacy.d.ts +39 -0
- package/build/legacy.js +40 -0
- package/build/legacy.js.map +1 -0
- package/build/src/mocking/lib/Url.js +1 -1
- package/build/src/models/AuthorizationData.d.ts +2 -0
- package/build/src/models/AuthorizationData.js +10 -3
- package/build/src/models/AuthorizationData.js.map +1 -1
- package/build/src/models/ClientCertificate.js +1 -1
- package/build/src/models/ClientCertificate.js.map +1 -1
- package/build/src/models/HostRule.d.ts +8 -0
- package/build/src/models/HostRule.js +10 -1
- package/build/src/models/HostRule.js.map +1 -1
- package/build/src/models/HttpProject.js +3 -0
- package/build/src/models/HttpProject.js.map +1 -1
- package/build/src/models/Url.d.ts +4 -4
- package/build/src/models/Url.js +6 -6
- package/build/src/models/Url.js.map +1 -1
- package/build/src/models/arc/ArcHttpRequest.d.ts +39 -0
- package/build/src/models/arc/ArcHttpRequest.js +106 -0
- package/build/src/models/arc/ArcHttpRequest.js.map +1 -0
- package/build/src/models/arc/ArcProject.d.ts +628 -0
- package/build/src/models/arc/ArcProject.js +1273 -0
- package/build/src/models/arc/ArcProject.js.map +1 -0
- package/build/src/models/legacy/DataExport.d.ts +5 -0
- package/build/src/models/transformers/ArcPouchTransformer.d.ts +0 -1
- package/build/src/models/transformers/ArcPouchTransformer.js +8 -7
- package/build/src/models/transformers/ArcPouchTransformer.js.map +1 -1
- package/build/src/models/transformers/LegacyDataExportToApiProject.js +1 -0
- package/build/src/models/transformers/LegacyDataExportToApiProject.js.map +1 -1
- package/build/src/models/transformers/LegacyExportProcessor.js.map +1 -1
- package/legacy.ts +41 -0
- package/package.json +3 -3
- package/src/mocking/lib/Url.ts +1 -1
- package/src/models/AuthorizationData.ts +10 -2
- package/src/models/ClientCertificate.ts +2 -2
- package/src/models/HostRule.ts +17 -1
- package/src/models/HttpProject.ts +3 -0
- package/src/models/Url.ts +10 -10
- package/src/models/arc/ArcHttpRequest.ts +121 -0
- package/src/models/arc/ArcProject.ts +1638 -0
- package/src/models/arc/readme.md +3 -0
- package/src/models/legacy/DataExport.ts +5 -0
- package/src/models/transformers/ArcPouchTransformer.ts +8 -7
- package/src/models/transformers/LegacyDataExportToApiProject.ts +1 -0
- package/src/models/transformers/LegacyExportProcessor.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Url.js","sourceRoot":"","sources":["../../../src/models/Url.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,OAAO,GAAG;IACd;;OAEG;IACH,GAAG,GAAG,CAAC,CAAC;IACR;;OAEG;IACH,IAAI,
|
|
1
|
+
{"version":3,"file":"Url.js","sourceRoot":"","sources":["../../../src/models/Url.ts"],"names":[],"mappings":"AAoBA;;;GAGG;AACH,MAAM,OAAO,GAAG;IACd;;OAEG;IACH,GAAG,GAAG,CAAC,CAAC;IACR;;OAEG;IACH,IAAI,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B;;OAEG;IACH,GAAG,GAAG,EAAE,CAAC;IACT;;OAEG;IACH,QAAQ,CAAU;IAElB;;OAEG;IACH,YAAY,KAAoB;QAC9B,IAAI,IAAU,CAAC;QACf,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1B;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACpC,IAAI,GAAG,KAAK,CAAC;SACd;aAAM;YACL,IAAI,GAAG;gBACL,GAAG,EAAE,CAAC;gBACN,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE;gBAChB,GAAG,EAAE,EAAE;aACR,CAAC;SACH;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,IAAU;QACZ,MAAM,EAAE,GAAG,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAChE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;SAC1B;aAAM;YACL,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;YACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;SAC7B;IACH,CAAC;IAED,MAAM;QACJ,MAAM,MAAM,GAAS;YACnB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { IRequest, Request } from "../Request.js";
|
|
2
|
+
import { IHttpRequest } from "../HttpRequest.js";
|
|
3
|
+
export declare const Kind = "Arc#ArcRequest";
|
|
4
|
+
export interface IArcHttpRequest extends IRequest {
|
|
5
|
+
kind: typeof Kind;
|
|
6
|
+
key: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class ArcHttpRequest extends Request {
|
|
9
|
+
kind: string;
|
|
10
|
+
/**
|
|
11
|
+
* The identifier of the request.
|
|
12
|
+
*/
|
|
13
|
+
key: string;
|
|
14
|
+
/**
|
|
15
|
+
* Creates a project request from an URL.
|
|
16
|
+
*
|
|
17
|
+
* @param url The Request URL. This is required.
|
|
18
|
+
*/
|
|
19
|
+
static fromUrl(url: string): ArcHttpRequest;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a project request from a name.
|
|
22
|
+
*
|
|
23
|
+
* @param name The Request name.
|
|
24
|
+
*/
|
|
25
|
+
static fromName(name: string): ArcHttpRequest;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a request from an HttpRequest definition.
|
|
28
|
+
*
|
|
29
|
+
* @param info The request data.
|
|
30
|
+
*/
|
|
31
|
+
static fromHttpRequest(info: IHttpRequest): ArcHttpRequest;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a request for a schema of a Request.
|
|
34
|
+
*/
|
|
35
|
+
static fromRequest(request: IArcHttpRequest): ArcHttpRequest;
|
|
36
|
+
constructor(input?: string | IArcHttpRequest);
|
|
37
|
+
new(init: IArcHttpRequest): void;
|
|
38
|
+
toJSON(): IArcHttpRequest;
|
|
39
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Request } from "../Request.js";
|
|
2
|
+
import v4 from "../../lib/uuid.js";
|
|
3
|
+
import { HttpRequest } from "../HttpRequest.js";
|
|
4
|
+
import { Thing } from "../Thing.js";
|
|
5
|
+
export const Kind = 'Arc#ArcRequest';
|
|
6
|
+
export class ArcHttpRequest extends Request {
|
|
7
|
+
kind = Kind;
|
|
8
|
+
/**
|
|
9
|
+
* The identifier of the request.
|
|
10
|
+
*/
|
|
11
|
+
key = '';
|
|
12
|
+
/**
|
|
13
|
+
* Creates a project request from an URL.
|
|
14
|
+
*
|
|
15
|
+
* @param url The Request URL. This is required.
|
|
16
|
+
*/
|
|
17
|
+
static fromUrl(url) {
|
|
18
|
+
const now = Date.now();
|
|
19
|
+
const request = new ArcHttpRequest({
|
|
20
|
+
key: v4(),
|
|
21
|
+
kind: Kind,
|
|
22
|
+
created: now,
|
|
23
|
+
updated: now,
|
|
24
|
+
expects: HttpRequest.fromBaseValues({ url, method: 'GET' }).toJSON(),
|
|
25
|
+
info: Thing.fromName(url).toJSON(),
|
|
26
|
+
});
|
|
27
|
+
return request;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates a project request from a name.
|
|
31
|
+
*
|
|
32
|
+
* @param name The Request name.
|
|
33
|
+
*/
|
|
34
|
+
static fromName(name) {
|
|
35
|
+
const now = Date.now();
|
|
36
|
+
const request = new ArcHttpRequest({
|
|
37
|
+
key: v4(),
|
|
38
|
+
kind: Kind,
|
|
39
|
+
created: now,
|
|
40
|
+
updated: now,
|
|
41
|
+
expects: new HttpRequest().toJSON(),
|
|
42
|
+
info: Thing.fromName(name).toJSON(),
|
|
43
|
+
});
|
|
44
|
+
return request;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Creates a request from an HttpRequest definition.
|
|
48
|
+
*
|
|
49
|
+
* @param info The request data.
|
|
50
|
+
*/
|
|
51
|
+
static fromHttpRequest(info) {
|
|
52
|
+
const now = Date.now();
|
|
53
|
+
const request = new ArcHttpRequest({
|
|
54
|
+
key: v4(),
|
|
55
|
+
kind: Kind,
|
|
56
|
+
created: now,
|
|
57
|
+
updated: now,
|
|
58
|
+
expects: HttpRequest.fromBaseValues({ method: info.method, url: info.url, headers: info.headers, payload: info.payload }).toJSON(),
|
|
59
|
+
info: Thing.fromName(info.url).toJSON(),
|
|
60
|
+
});
|
|
61
|
+
return request;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Creates a request for a schema of a Request.
|
|
65
|
+
*/
|
|
66
|
+
static fromRequest(request) {
|
|
67
|
+
const key = v4();
|
|
68
|
+
const init = {
|
|
69
|
+
...request,
|
|
70
|
+
key,
|
|
71
|
+
kind: Kind
|
|
72
|
+
};
|
|
73
|
+
const result = new ArcHttpRequest(init);
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
constructor(input) {
|
|
77
|
+
super(input);
|
|
78
|
+
let init;
|
|
79
|
+
if (typeof input === 'string') {
|
|
80
|
+
init = JSON.parse(input);
|
|
81
|
+
}
|
|
82
|
+
else if (typeof input === 'object') {
|
|
83
|
+
init = input;
|
|
84
|
+
}
|
|
85
|
+
if (init) {
|
|
86
|
+
this.key = init.key || v4();
|
|
87
|
+
}
|
|
88
|
+
this.kind = Kind;
|
|
89
|
+
}
|
|
90
|
+
new(init) {
|
|
91
|
+
super.new(init);
|
|
92
|
+
const { key } = init;
|
|
93
|
+
this.key = key || v4();
|
|
94
|
+
this.kind = Kind;
|
|
95
|
+
}
|
|
96
|
+
toJSON() {
|
|
97
|
+
const request = super.toJSON();
|
|
98
|
+
const result = {
|
|
99
|
+
...request,
|
|
100
|
+
key: this.key,
|
|
101
|
+
kind: Kind
|
|
102
|
+
};
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=ArcHttpRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArcHttpRequest.js","sourceRoot":"","sources":["../../../../src/models/arc/ArcHttpRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAOrC,MAAM,OAAO,cAAe,SAAQ,OAAO;IACzC,IAAI,GAAG,IAAI,CAAC;IAEZ;;OAEG;IACH,GAAG,GAAG,EAAE,CAAC;IAET;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,GAAW;QACxB,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC;YACjC,G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