@api-client/core 0.3.10 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/browser.d.ts +2 -0
- package/build/browser.js +1 -3
- package/build/browser.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/src/models/Application.d.ts +19 -0
- package/build/src/models/Application.js +2 -0
- package/build/src/models/Application.js.map +1 -0
- package/build/src/models/HttpHistory.d.ts +96 -0
- package/build/src/models/HttpHistory.js +162 -0
- package/build/src/models/HttpHistory.js.map +1 -0
- package/package.json +1 -1
- package/src/models/Application.ts +19 -0
- package/src/models/HttpHistory.ts +197 -0
package/build/browser.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { IApplication } from './src/models/Application.js';
|
|
1
2
|
export { ArcResponse, IArcResponse, Kind as ArcResponseKind } from './src/models/ArcResponse.js';
|
|
2
3
|
export { IAuthorizationSettingsUnion, IApiKeyAuthorization, IAuthorizationParams, IBasicAuthorization, IBearerAuthorization, ICCAuthorization, IDigestAuthorization, INtlmAuthorization, IOAuth1Authorization, IOAuth2Authorization, IOAuth2AuthorizationRequestCustomData, IOAuth2CustomData, IOAuth2CustomParameter, IOAuth2TokenRequestCustomData, IOauth2GrantType, IOauth2ResponseType, IOidcAuthorization, IOidcTokenError, IOidcTokenInfo, IPassThroughAuthorization, IRamlCustomAuthorization, ITokenError, ITokenInfo, ITokenRemoveOptions, OAuth2DeliveryMethod } from './src/models/Authorization.js';
|
|
3
4
|
export { AuthorizationData, IAuthorizationData } from './src/models/AuthorizationData.js';
|
|
@@ -9,6 +10,7 @@ export { HistoryIndex, IHistoryIndex } from './src/models/HistoryIndex.js';
|
|
|
9
10
|
export { HistoryRequest, Kind as HistoryRequestKind } from './src/models/HistoryRequest.js';
|
|
10
11
|
export { IHostRule, HostRule, Kind as HostRuleKind } from './src/models/HostRule.js';
|
|
11
12
|
export { IHttpCookie, HttpCookie, CookieChangeReason, CookieSameSiteType } from './src/models/HttpCookie.js';
|
|
13
|
+
export { IHttpHistory, HttpHistory } from './src/models/HttpHistory.js';
|
|
12
14
|
export { HttpProject, IHttpProject, Kind as HttpProjectKind, IFolderCreateOptions, IFolderDeleteOptions, IFolderSearchOptions, IProjectMoveOptions, IRequestAddOptions, IRequestDeleteOptions, IRequestSearchOptions } from './src/models/HttpProject.js';
|
|
13
15
|
export { IHttpProjectListItem, Kind as HttpProjectListItemKind } from './src/models/HttpProjectListItem.js';
|
|
14
16
|
export { IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './src/models/HttpRequest.js';
|
package/build/browser.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// all exports that are save for web browser processing.
|
|
2
|
-
//
|
|
3
|
-
// Models
|
|
4
|
-
//
|
|
5
2
|
export { ArcResponse, Kind as ArcResponseKind } from './src/models/ArcResponse.js';
|
|
6
3
|
export { AuthorizationData } from './src/models/AuthorizationData.js';
|
|
7
4
|
export { Environment, Kind as EnvironmentKind } from './src/models/Environment.js';
|
|
@@ -10,6 +7,7 @@ export { HistoryIndex } from './src/models/HistoryIndex.js';
|
|
|
10
7
|
export { HistoryRequest, Kind as HistoryRequestKind } from './src/models/HistoryRequest.js';
|
|
11
8
|
export { HostRule, Kind as HostRuleKind } from './src/models/HostRule.js';
|
|
12
9
|
export { HttpCookie } from './src/models/HttpCookie.js';
|
|
10
|
+
export { HttpHistory } from './src/models/HttpHistory.js';
|
|
13
11
|
export { HttpProject, Kind as HttpProjectKind } from './src/models/HttpProject.js';
|
|
14
12
|
export { Kind as HttpProjectListItemKind } from './src/models/HttpProjectListItem.js';
|
|
15
13
|
export { HttpRequest, Kind as HttpRequestKind } from './src/models/HttpRequest.js';
|
package/build/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../browser.ts"],"names":[],"mappings":"AAAA,wDAAwD;
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CAAC;AAE3G,GAAG;AACH,0BAA0B;AAC1B,GAAG;AACH,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { IApplication } from './src/models/Application.js';
|
|
1
2
|
export { ArcResponse, IArcResponse, Kind as ArcResponseKind } from './src/models/ArcResponse.js';
|
|
2
3
|
export { IAuthorizationSettingsUnion, IApiKeyAuthorization, IAuthorizationParams, IBasicAuthorization, IBearerAuthorization, ICCAuthorization, IDigestAuthorization, INtlmAuthorization, IOAuth1Authorization, IOAuth2Authorization, IOAuth2AuthorizationRequestCustomData, IOAuth2CustomData, IOAuth2CustomParameter, IOAuth2TokenRequestCustomData, IOauth2GrantType, IOauth2ResponseType, IOidcAuthorization, IOidcTokenError, IOidcTokenInfo, IPassThroughAuthorization, IRamlCustomAuthorization, ITokenError, ITokenInfo, ITokenRemoveOptions, OAuth2DeliveryMethod } from './src/models/Authorization.js';
|
|
3
4
|
export { AuthorizationData, IAuthorizationData } from './src/models/AuthorizationData.js';
|
|
@@ -9,6 +10,7 @@ export { HistoryIndex, IHistoryIndex } from './src/models/HistoryIndex.js';
|
|
|
9
10
|
export { HistoryRequest, Kind as HistoryRequestKind } from './src/models/HistoryRequest.js';
|
|
10
11
|
export { IHostRule, HostRule, Kind as HostRuleKind } from './src/models/HostRule.js';
|
|
11
12
|
export { IHttpCookie, HttpCookie, CookieChangeReason, CookieSameSiteType } from './src/models/HttpCookie.js';
|
|
13
|
+
export { IHttpHistory, HttpHistory } from './src/models/HttpHistory.js';
|
|
12
14
|
export { HttpProject, IHttpProject, Kind as HttpProjectKind, IFolderCreateOptions, IFolderDeleteOptions, IFolderSearchOptions, IProjectMoveOptions, IRequestAddOptions, IRequestDeleteOptions, IRequestSearchOptions } from './src/models/HttpProject.js';
|
|
13
15
|
export { IHttpProjectListItem, Kind as HttpProjectListItemKind } from './src/models/HttpProjectListItem.js';
|
|
14
16
|
export { IHttpRequest, HttpRequest, Kind as HttpRequestKind } from './src/models/HttpRequest.js';
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
// all exports that are save for NodeJS process processing.
|
|
2
|
-
//
|
|
3
|
-
// Models
|
|
4
|
-
//
|
|
5
2
|
export { ArcResponse, Kind as ArcResponseKind } from './src/models/ArcResponse.js';
|
|
6
3
|
export { AuthorizationData } from './src/models/AuthorizationData.js';
|
|
7
4
|
export { Environment, Kind as EnvironmentKind } from './src/models/Environment.js';
|
|
@@ -10,6 +7,7 @@ export { HistoryIndex } from './src/models/HistoryIndex.js';
|
|
|
10
7
|
export { HistoryRequest, Kind as HistoryRequestKind } from './src/models/HistoryRequest.js';
|
|
11
8
|
export { HostRule, Kind as HostRuleKind } from './src/models/HostRule.js';
|
|
12
9
|
export { HttpCookie } from './src/models/HttpCookie.js';
|
|
10
|
+
export { HttpHistory } from './src/models/HttpHistory.js';
|
|
13
11
|
export { HttpProject, Kind as HttpProjectKind } from './src/models/HttpProject.js';
|
|
14
12
|
export { Kind as HttpProjectListItemKind } from './src/models/HttpProjectListItem.js';
|
|
15
13
|
export { HttpRequest, Kind as HttpRequestKind } from './src/models/HttpRequest.js';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,2DAA2D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAM3D,OAAO,EAAE,WAAW,EAAgB,IAAI,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAEjG,OAAO,EAAE,iBAAiB,EAAsB,MAAM,mCAAmC,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAgB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B,GAAG;AACH,OAAO,EAAE,MAAM,EAAW,IAAI,IAAI,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAc,IAAI,IAAI,aAAa,EAAe,MAAM,mCAAmC,CAAC;AAC9G,OAAO,EAAE,cAAc,EAAmB,IAAI,IAAI,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACrH,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAa,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAuB,MAAM,qDAAqD,CAAC;AAC9G,OAAO,EAAoB,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACrG,OAAO,EAAsB,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,GAAG;AACH,kBAAkB;AAClB,GAAG;AACH,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAwF,MAAM,0CAA0C,CAAC;AACrL,OAAO,KAAK,oBAAoB,MAAO,yCAAyC,CAAC;AACjF,OAAO,KAAK,0BAA0B,MAAO,+CAA+C,CAAC;AAC7F,GAAG;AACH,0BAA0B;AAC1B,GAAG;AACH,OAAO,EAAE,4BAA4B,EAAE,MAAM,2DAA2D,CAAC;AACzG,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A definition if an application.
|
|
3
|
+
*/
|
|
4
|
+
export interface IApplication {
|
|
5
|
+
/**
|
|
6
|
+
* The unique code identifying the application in the ecosystem.
|
|
7
|
+
* For example, `api-client` application has its own code reported through this property.
|
|
8
|
+
* This is not generated per instance but per application.
|
|
9
|
+
*/
|
|
10
|
+
code: string;
|
|
11
|
+
/**
|
|
12
|
+
* Application display name.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The current version of the application.
|
|
17
|
+
*/
|
|
18
|
+
version: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../src/models/Application.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { IRequestLog, RequestLog } from './RequestLog.js';
|
|
2
|
+
export declare const Kind = "ARC#HttpHistory";
|
|
3
|
+
export declare const createdSymbol: unique symbol;
|
|
4
|
+
export declare const midnightSymbol: unique symbol;
|
|
5
|
+
export interface IHttpHistory {
|
|
6
|
+
kind: typeof Kind;
|
|
7
|
+
/**
|
|
8
|
+
* The application code. The same as used in `Application#code`.
|
|
9
|
+
* Optional.
|
|
10
|
+
*/
|
|
11
|
+
app?: string;
|
|
12
|
+
/**
|
|
13
|
+
* The user project the request belongs to.
|
|
14
|
+
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
15
|
+
*/
|
|
16
|
+
project?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The optional user id that made that request.
|
|
19
|
+
*/
|
|
20
|
+
user?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The optional request id in the project that generated this log.
|
|
23
|
+
*/
|
|
24
|
+
request?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The request log.
|
|
27
|
+
*/
|
|
28
|
+
log: IRequestLog;
|
|
29
|
+
/**
|
|
30
|
+
* The timestamp when this history request has been created.
|
|
31
|
+
*/
|
|
32
|
+
created: number;
|
|
33
|
+
/**
|
|
34
|
+
* A timestamp of the midnight when the object was created
|
|
35
|
+
*/
|
|
36
|
+
midnight?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* An HTTP history is an object containing an information of a request and response
|
|
40
|
+
* made with the application.
|
|
41
|
+
* It consist of the RequestLog and optional information about the application that made that request and the HTTP project
|
|
42
|
+
* the request belongs to as well as the id of the request.
|
|
43
|
+
* However, this object may not contain these information for general purpose of the history store.
|
|
44
|
+
*
|
|
45
|
+
* Note, history object are not mutable. Can only be created or deleted.
|
|
46
|
+
*/
|
|
47
|
+
export declare class HttpHistory {
|
|
48
|
+
[createdSymbol]: number;
|
|
49
|
+
[midnightSymbol]: number;
|
|
50
|
+
kind: string;
|
|
51
|
+
/**
|
|
52
|
+
* The application code. The same as used in `Application#code`.
|
|
53
|
+
* Optional.
|
|
54
|
+
*/
|
|
55
|
+
app?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The user project the request belongs to.
|
|
58
|
+
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
59
|
+
*/
|
|
60
|
+
project?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The optional user id that made that request.
|
|
63
|
+
*/
|
|
64
|
+
user?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The optional request id in the project that generated this log.
|
|
67
|
+
*/
|
|
68
|
+
request?: string;
|
|
69
|
+
/**
|
|
70
|
+
* The execution log of the HTTP request with a response.
|
|
71
|
+
*/
|
|
72
|
+
log: RequestLog;
|
|
73
|
+
/**
|
|
74
|
+
* @param value The timestamp when the request was created.
|
|
75
|
+
*/
|
|
76
|
+
set created(value: number | undefined);
|
|
77
|
+
/**
|
|
78
|
+
* @returns The timestamp when the request was created.
|
|
79
|
+
*/
|
|
80
|
+
get created(): number;
|
|
81
|
+
/**
|
|
82
|
+
* @param value The timestamp of the midnight when the request object was updated
|
|
83
|
+
*/
|
|
84
|
+
set midnight(value: number | undefined);
|
|
85
|
+
/**
|
|
86
|
+
* @returns The timestamp of the midnight when the request object was updated
|
|
87
|
+
*/
|
|
88
|
+
get midnight(): number;
|
|
89
|
+
constructor(input?: string | IHttpHistory);
|
|
90
|
+
new(init: IHttpHistory): void;
|
|
91
|
+
toJSON(): IHttpHistory;
|
|
92
|
+
/**
|
|
93
|
+
* @returns The default value for the midnight when the request was last updated.
|
|
94
|
+
*/
|
|
95
|
+
defaultMidnight(): number;
|
|
96
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { RequestLog, Kind as RequestLogKind } from './RequestLog.js';
|
|
2
|
+
export const Kind = 'ARC#HttpHistory';
|
|
3
|
+
export const createdSymbol = Symbol('created');
|
|
4
|
+
export const midnightSymbol = Symbol('midnight');
|
|
5
|
+
/**
|
|
6
|
+
* An HTTP history is an object containing an information of a request and response
|
|
7
|
+
* made with the application.
|
|
8
|
+
* It consist of the RequestLog and optional information about the application that made that request and the HTTP project
|
|
9
|
+
* the request belongs to as well as the id of the request.
|
|
10
|
+
* However, this object may not contain these information for general purpose of the history store.
|
|
11
|
+
*
|
|
12
|
+
* Note, history object are not mutable. Can only be created or deleted.
|
|
13
|
+
*/
|
|
14
|
+
export class HttpHistory {
|
|
15
|
+
[createdSymbol];
|
|
16
|
+
[midnightSymbol];
|
|
17
|
+
kind = Kind;
|
|
18
|
+
/**
|
|
19
|
+
* The application code. The same as used in `Application#code`.
|
|
20
|
+
* Optional.
|
|
21
|
+
*/
|
|
22
|
+
app;
|
|
23
|
+
/**
|
|
24
|
+
* The user project the request belongs to.
|
|
25
|
+
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
26
|
+
*/
|
|
27
|
+
project;
|
|
28
|
+
/**
|
|
29
|
+
* The optional user id that made that request.
|
|
30
|
+
*/
|
|
31
|
+
user;
|
|
32
|
+
/**
|
|
33
|
+
* The optional request id in the project that generated this log.
|
|
34
|
+
*/
|
|
35
|
+
request;
|
|
36
|
+
/**
|
|
37
|
+
* The execution log of the HTTP request with a response.
|
|
38
|
+
*/
|
|
39
|
+
log = new RequestLog();
|
|
40
|
+
/**
|
|
41
|
+
* @param value The timestamp when the request was created.
|
|
42
|
+
*/
|
|
43
|
+
set created(value) {
|
|
44
|
+
if (!value) {
|
|
45
|
+
this[createdSymbol] = Date.now();
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this[createdSymbol] = value;
|
|
49
|
+
}
|
|
50
|
+
const d = new Date(this[createdSymbol]);
|
|
51
|
+
d.setHours(0, 0, 0, 0);
|
|
52
|
+
this[midnightSymbol] = d.getTime();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @returns The timestamp when the request was created.
|
|
56
|
+
*/
|
|
57
|
+
get created() {
|
|
58
|
+
return this[createdSymbol] || Date.now();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @param value The timestamp of the midnight when the request object was updated
|
|
62
|
+
*/
|
|
63
|
+
set midnight(value) {
|
|
64
|
+
if (!value) {
|
|
65
|
+
this[midnightSymbol] = this.defaultMidnight();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this[midnightSymbol] = value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @returns The timestamp of the midnight when the request object was updated
|
|
73
|
+
*/
|
|
74
|
+
get midnight() {
|
|
75
|
+
if (this[midnightSymbol]) {
|
|
76
|
+
return this[midnightSymbol];
|
|
77
|
+
}
|
|
78
|
+
return this.defaultMidnight();
|
|
79
|
+
}
|
|
80
|
+
constructor(input) {
|
|
81
|
+
let init;
|
|
82
|
+
if (typeof input === 'string') {
|
|
83
|
+
init = JSON.parse(input);
|
|
84
|
+
}
|
|
85
|
+
else if (typeof input === 'object') {
|
|
86
|
+
init = input;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const now = Date.now();
|
|
90
|
+
init = {
|
|
91
|
+
kind: Kind,
|
|
92
|
+
created: now,
|
|
93
|
+
log: {
|
|
94
|
+
kind: RequestLogKind,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
this.new(init);
|
|
99
|
+
}
|
|
100
|
+
new(init) {
|
|
101
|
+
const { log, created = Date.now(), midnight, app, project, request, user } = init;
|
|
102
|
+
this.log = new RequestLog(log);
|
|
103
|
+
this.created = created;
|
|
104
|
+
if (midnight) {
|
|
105
|
+
this.midnight = midnight;
|
|
106
|
+
}
|
|
107
|
+
if (app) {
|
|
108
|
+
this.app = app;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
this.app = undefined;
|
|
112
|
+
}
|
|
113
|
+
if (project) {
|
|
114
|
+
this.project = project;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.project = undefined;
|
|
118
|
+
}
|
|
119
|
+
if (request) {
|
|
120
|
+
this.request = request;
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this.request = undefined;
|
|
124
|
+
}
|
|
125
|
+
if (user) {
|
|
126
|
+
this.user = user;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
this.user = undefined;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
toJSON() {
|
|
133
|
+
const result = {
|
|
134
|
+
kind: Kind,
|
|
135
|
+
created: this.created,
|
|
136
|
+
midnight: this.midnight,
|
|
137
|
+
log: this.log.toJSON(),
|
|
138
|
+
};
|
|
139
|
+
if (this.app) {
|
|
140
|
+
result.app = this.app;
|
|
141
|
+
}
|
|
142
|
+
if (this.project) {
|
|
143
|
+
result.project = this.project;
|
|
144
|
+
}
|
|
145
|
+
if (this.request) {
|
|
146
|
+
result.request = this.request;
|
|
147
|
+
}
|
|
148
|
+
if (this.user) {
|
|
149
|
+
result.user = this.user;
|
|
150
|
+
}
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @returns The default value for the midnight when the request was last updated.
|
|
155
|
+
*/
|
|
156
|
+
defaultMidnight() {
|
|
157
|
+
const d = new Date(this.created);
|
|
158
|
+
d.setHours(0, 0, 0, 0);
|
|
159
|
+
return d.getTime();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=HttpHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpHistory.js","sourceRoot":"","sources":["../../../src/models/HttpHistory.ts"],"names":[],"m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AAO,EAAE,CAAC;IACrB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A definition if an application.
|
|
3
|
+
*/
|
|
4
|
+
export interface IApplication {
|
|
5
|
+
/**
|
|
6
|
+
* The unique code identifying the application in the ecosystem.
|
|
7
|
+
* For example, `api-client` application has its own code reported through this property.
|
|
8
|
+
* This is not generated per instance but per application.
|
|
9
|
+
*/
|
|
10
|
+
code: string;
|
|
11
|
+
/**
|
|
12
|
+
* Application display name.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The current version of the application.
|
|
17
|
+
*/
|
|
18
|
+
version: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { IRequestLog, RequestLog, Kind as RequestLogKind } from './RequestLog.js';
|
|
2
|
+
|
|
3
|
+
export const Kind = 'ARC#HttpHistory';
|
|
4
|
+
export const createdSymbol = Symbol('created');
|
|
5
|
+
export const midnightSymbol = Symbol('midnight');
|
|
6
|
+
|
|
7
|
+
export interface IHttpHistory {
|
|
8
|
+
kind: typeof Kind;
|
|
9
|
+
/**
|
|
10
|
+
* The application code. The same as used in `Application#code`.
|
|
11
|
+
* Optional.
|
|
12
|
+
*/
|
|
13
|
+
app?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The user project the request belongs to.
|
|
16
|
+
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
17
|
+
*/
|
|
18
|
+
project?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The optional user id that made that request.
|
|
21
|
+
*/
|
|
22
|
+
user?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The optional request id in the project that generated this log.
|
|
25
|
+
*/
|
|
26
|
+
request?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The request log.
|
|
29
|
+
*/
|
|
30
|
+
log: IRequestLog;
|
|
31
|
+
/**
|
|
32
|
+
* The timestamp when this history request has been created.
|
|
33
|
+
*/
|
|
34
|
+
created: number;
|
|
35
|
+
/**
|
|
36
|
+
* A timestamp of the midnight when the object was created
|
|
37
|
+
*/
|
|
38
|
+
midnight?: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An HTTP history is an object containing an information of a request and response
|
|
43
|
+
* made with the application.
|
|
44
|
+
* It consist of the RequestLog and optional information about the application that made that request and the HTTP project
|
|
45
|
+
* the request belongs to as well as the id of the request.
|
|
46
|
+
* However, this object may not contain these information for general purpose of the history store.
|
|
47
|
+
*
|
|
48
|
+
* Note, history object are not mutable. Can only be created or deleted.
|
|
49
|
+
*/
|
|
50
|
+
export class HttpHistory {
|
|
51
|
+
[createdSymbol]: number;
|
|
52
|
+
[midnightSymbol]: number;
|
|
53
|
+
kind = Kind;
|
|
54
|
+
/**
|
|
55
|
+
* The application code. The same as used in `Application#code`.
|
|
56
|
+
* Optional.
|
|
57
|
+
*/
|
|
58
|
+
app?: string;
|
|
59
|
+
/**
|
|
60
|
+
* The user project the request belongs to.
|
|
61
|
+
* Optional. Also note, the project may not exist anymore in the store or the request has been removed from the project.
|
|
62
|
+
*/
|
|
63
|
+
project?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The optional user id that made that request.
|
|
66
|
+
*/
|
|
67
|
+
user?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The optional request id in the project that generated this log.
|
|
70
|
+
*/
|
|
71
|
+
request?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The execution log of the HTTP request with a response.
|
|
74
|
+
*/
|
|
75
|
+
log: RequestLog = new RequestLog();
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @param value The timestamp when the request was created.
|
|
79
|
+
*/
|
|
80
|
+
set created(value: number | undefined) {
|
|
81
|
+
if (!value) {
|
|
82
|
+
this[createdSymbol] = Date.now();
|
|
83
|
+
} else {
|
|
84
|
+
this[createdSymbol] = value;
|
|
85
|
+
}
|
|
86
|
+
const d = new Date(this[createdSymbol]);
|
|
87
|
+
d.setHours(0, 0, 0, 0)
|
|
88
|
+
this[midnightSymbol] = d.getTime();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @returns The timestamp when the request was created.
|
|
93
|
+
*/
|
|
94
|
+
get created(): number {
|
|
95
|
+
return this[createdSymbol] || Date.now();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @param value The timestamp of the midnight when the request object was updated
|
|
100
|
+
*/
|
|
101
|
+
set midnight(value: number | undefined) {
|
|
102
|
+
if (!value) {
|
|
103
|
+
this[midnightSymbol] = this.defaultMidnight();
|
|
104
|
+
} else {
|
|
105
|
+
this[midnightSymbol] = value;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @returns The timestamp of the midnight when the request object was updated
|
|
111
|
+
*/
|
|
112
|
+
get midnight(): number {
|
|
113
|
+
if (this[midnightSymbol]) {
|
|
114
|
+
return this[midnightSymbol];
|
|
115
|
+
}
|
|
116
|
+
return this.defaultMidnight();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
constructor(input?: string|IHttpHistory) {
|
|
120
|
+
let init: IHttpHistory;
|
|
121
|
+
if (typeof input === 'string') {
|
|
122
|
+
init = JSON.parse(input);
|
|
123
|
+
} else if (typeof input === 'object') {
|
|
124
|
+
init = input;
|
|
125
|
+
} else {
|
|
126
|
+
const now:number = Date.now();
|
|
127
|
+
init = {
|
|
128
|
+
kind: Kind,
|
|
129
|
+
created: now,
|
|
130
|
+
log: {
|
|
131
|
+
kind: RequestLogKind,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
this.new(init);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
new(init: IHttpHistory): void {
|
|
139
|
+
const { log, created = Date.now(), midnight, app, project, request, user } = init;
|
|
140
|
+
this.log = new RequestLog(log);
|
|
141
|
+
this.created = created;
|
|
142
|
+
if (midnight) {
|
|
143
|
+
this.midnight = midnight;
|
|
144
|
+
}
|
|
145
|
+
if (app) {
|
|
146
|
+
this.app = app;
|
|
147
|
+
} else {
|
|
148
|
+
this.app = undefined;
|
|
149
|
+
}
|
|
150
|
+
if (project) {
|
|
151
|
+
this.project = project;
|
|
152
|
+
} else {
|
|
153
|
+
this.project = undefined;
|
|
154
|
+
}
|
|
155
|
+
if (request) {
|
|
156
|
+
this.request = request;
|
|
157
|
+
} else {
|
|
158
|
+
this.request = undefined;
|
|
159
|
+
}
|
|
160
|
+
if (user) {
|
|
161
|
+
this.user = user;
|
|
162
|
+
} else {
|
|
163
|
+
this.user = undefined;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
toJSON(): IHttpHistory {
|
|
168
|
+
const result: IHttpHistory = {
|
|
169
|
+
kind: Kind,
|
|
170
|
+
created: this.created,
|
|
171
|
+
midnight: this.midnight,
|
|
172
|
+
log: this.log.toJSON(),
|
|
173
|
+
};
|
|
174
|
+
if (this.app) {
|
|
175
|
+
result.app = this.app;
|
|
176
|
+
}
|
|
177
|
+
if (this.project) {
|
|
178
|
+
result.project = this.project;
|
|
179
|
+
}
|
|
180
|
+
if (this.request) {
|
|
181
|
+
result.request = this.request;
|
|
182
|
+
}
|
|
183
|
+
if (this.user) {
|
|
184
|
+
result.user = this.user;
|
|
185
|
+
}
|
|
186
|
+
return result;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @returns The default value for the midnight when the request was last updated.
|
|
191
|
+
*/
|
|
192
|
+
defaultMidnight(): number {
|
|
193
|
+
const d = new Date(this.created);
|
|
194
|
+
d.setHours(0, 0, 0, 0);
|
|
195
|
+
return d.getTime();
|
|
196
|
+
}
|
|
197
|
+
}
|