@serve.zone/interfaces 1.0.74 → 1.0.76
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/dist_ts/00_commitinfo_data.d.ts +1 -1
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/data/cluster.d.ts +6 -7
- package/dist_ts/data/user.d.ts +22 -2
- package/dist_ts/requests/cluster.d.ts +10 -9
- package/dist_ts/requests/cluster.js +3 -1
- package/dist_ts/requests/config.d.ts +3 -3
- package/dist_ts/requests/config.js +2 -1
- package/dist_ts/requests/identity.d.ts +2 -2
- package/dist_ts/requests/identity.js +2 -2
- package/dist_ts/requests/image.d.ts +7 -6
- package/dist_ts/requests/image.js +2 -1
- package/dist_ts/requests/secret.d.ts +6 -5
- package/dist_ts/requests/secret.js +2 -1
- package/dist_ts/requests/status.d.ts +2 -2
- package/dist_ts/requests/status.js +2 -2
- package/package.json +1 -1
- package/readme.hints.md +0 -0
- package/ts/00_commitinfo_data.ts +2 -2
- package/ts/data/cluster.ts +7 -8
- package/ts/data/user.ts +24 -2
- package/ts/requests/cluster.ts +10 -9
- package/ts/requests/config.ts +3 -3
- package/ts/requests/identity.ts +2 -2
- package/ts/requests/image.ts +7 -6
- package/ts/requests/secret.ts +6 -5
- package/ts/requests/status.ts +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* autocreated commitinfo by @
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.76',
|
|
7
7
|
description: 'interfaces for working with containers'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHdDQUF3QztDQUN0RCxDQUFBIn0=
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import type { IServer } from './server.js';
|
|
3
|
-
export interface IClusterIdentifier {
|
|
4
|
-
clusterId: string;
|
|
5
|
-
clusterName: string;
|
|
6
|
-
jwt: string;
|
|
7
|
-
}
|
|
8
3
|
export interface ICluster {
|
|
9
4
|
id: string;
|
|
10
5
|
data: {
|
|
11
6
|
name: string;
|
|
12
|
-
|
|
7
|
+
initialJumpToken: string;
|
|
8
|
+
/**
|
|
9
|
+
* a cluster has a machine user that governs access rights.
|
|
10
|
+
*/
|
|
11
|
+
userId: string;
|
|
13
12
|
/**
|
|
14
13
|
* when was the jump code used
|
|
15
14
|
* avoid replay attacks
|
|
16
15
|
*/
|
|
17
|
-
|
|
16
|
+
initialJumpTokenUsedAt?: number;
|
|
18
17
|
/**
|
|
19
18
|
* how can the cluster reach cloudly
|
|
20
19
|
*/
|
package/dist_ts/data/user.d.ts
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
export interface IToken {
|
|
2
|
+
token: string;
|
|
3
|
+
expiresAt: number;
|
|
4
|
+
assignedRoles: string[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* an identity is assumed by authentication as a user
|
|
8
|
+
* an identity is ephemeral and has to be renewed regularly
|
|
9
|
+
*/
|
|
10
|
+
export interface IIdentity {
|
|
11
|
+
name: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
type: 'machine' | 'human';
|
|
14
|
+
role: 'admin' | 'user' | 'api' | 'cluster';
|
|
15
|
+
expiresAt: number;
|
|
16
|
+
/** the jwt token should contain above data for verification */
|
|
17
|
+
jwt: string;
|
|
18
|
+
}
|
|
1
19
|
export interface IUser {
|
|
2
20
|
id: string;
|
|
3
21
|
data: {
|
|
22
|
+
type: 'machine' | 'human';
|
|
4
23
|
role: 'admin' | 'user' | 'api' | 'cluster';
|
|
5
|
-
username
|
|
6
|
-
password
|
|
24
|
+
username?: string;
|
|
25
|
+
password?: string;
|
|
26
|
+
tokens?: IToken[];
|
|
7
27
|
};
|
|
8
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
|
+
import * as clusterInterfaces from '../data/cluster.js';
|
|
2
3
|
import * as plugins from '../plugins.js';
|
|
3
4
|
/**
|
|
4
5
|
* get all clusters
|
|
@@ -6,20 +7,20 @@ import * as plugins from '../plugins.js';
|
|
|
6
7
|
export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_GetAllClusters> {
|
|
7
8
|
method: 'getAllClusters';
|
|
8
9
|
request: {
|
|
9
|
-
|
|
10
|
+
identity: userInterfaces.IIdentity;
|
|
10
11
|
};
|
|
11
12
|
response: {
|
|
12
|
-
clusters: ICluster[];
|
|
13
|
+
clusters: clusterInterfaces.ICluster[];
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_CreateCluster> {
|
|
16
17
|
method: 'createCluster';
|
|
17
18
|
request: {
|
|
18
|
-
|
|
19
|
+
identity: userInterfaces.IIdentity;
|
|
19
20
|
clusterName: string;
|
|
20
21
|
};
|
|
21
22
|
response: {
|
|
22
|
-
clusterConfig: ICluster;
|
|
23
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
@@ -28,11 +29,11 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
|
|
|
28
29
|
export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_UpdateCluster> {
|
|
29
30
|
method: 'updateCluster';
|
|
30
31
|
request: {
|
|
31
|
-
|
|
32
|
-
clusterConfig: ICluster;
|
|
32
|
+
identity: userInterfaces.IIdentity;
|
|
33
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
33
34
|
};
|
|
34
35
|
response: {
|
|
35
|
-
clusterConfig: ICluster;
|
|
36
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
36
37
|
};
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
@@ -41,7 +42,7 @@ export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.i
|
|
|
41
42
|
export interface IRequest_DeleteCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_DeleteCluster> {
|
|
42
43
|
method: 'deleteCluster';
|
|
43
44
|
request: {
|
|
44
|
-
|
|
45
|
+
identity: userInterfaces.IIdentity;
|
|
45
46
|
clusterId: string;
|
|
46
47
|
};
|
|
47
48
|
response: {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
|
+
import * as clusterInterfaces from '../data/cluster.js';
|
|
1
3
|
import * as plugins from '../plugins.js';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3RzL2NsdXN0ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLGNBQWMsTUFBTSxpQkFBaUIsQ0FBQztBQUNsRCxPQUFPLEtBQUssaUJBQWlCLE1BQU0sb0JBQW9CLENBQUM7QUFDeEQsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
3
|
import * as serverInterfaces from '../data/server.js';
|
|
4
|
+
import * as userInterfaces from '../data/user.js';
|
|
4
5
|
import type { IDeploymentDirective } from '../data/deploymentdirective.js';
|
|
5
6
|
export interface IRequest_Any_Cloudly_GetServerConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetServerConfig> {
|
|
6
7
|
method: 'getServerConfig';
|
|
7
8
|
request: {
|
|
8
|
-
|
|
9
|
+
identity: userInterfaces.IIdentity;
|
|
9
10
|
serverId: string;
|
|
10
11
|
};
|
|
11
12
|
response: {
|
|
@@ -15,8 +16,7 @@ export interface IRequest_Any_Cloudly_GetServerConfig extends plugins.typedreque
|
|
|
15
16
|
export interface IRequest_Any_Cloudly_GetClusterConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetClusterConfig> {
|
|
16
17
|
method: 'getClusterConfig';
|
|
17
18
|
request: {
|
|
18
|
-
|
|
19
|
-
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
19
|
+
identity: userInterfaces.IIdentity;
|
|
20
20
|
};
|
|
21
21
|
response: {
|
|
22
22
|
configData: clusterInterfaces.ICluster;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
3
|
import * as serverInterfaces from '../data/server.js';
|
|
4
|
-
|
|
4
|
+
import * as userInterfaces from '../data/user.js';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxvQkFBb0IsQ0FBQztBQUN4RCxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sbUJBQW1CLENBQUM7QUFDdEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxpQkFBaUIsQ0FBQyJ9
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
import * as
|
|
2
|
+
import * as userInterfaces from '../data/user.js';
|
|
3
3
|
/**
|
|
4
4
|
* get the identity that then will be used to get the config
|
|
5
5
|
*/
|
|
@@ -9,6 +9,6 @@ export interface IRequest_Any_Cloudly_CoreflowManager_GetIdentityByJumpCode exte
|
|
|
9
9
|
jumpCode: string;
|
|
10
10
|
};
|
|
11
11
|
response: {
|
|
12
|
-
clusterIdentifier:
|
|
12
|
+
clusterIdentifier: userInterfaces.IIdentity;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
import * as
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
import * as userInterfaces from '../data/user.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpdHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pZGVudGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEtBQUssY0FBYyxNQUFNLGlCQUFpQixDQUFBIn0=
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
3
|
import type { IImage } from '../data/index.js';
|
|
3
4
|
export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_GetAllImages> {
|
|
4
5
|
method: 'getAllImages';
|
|
5
6
|
request: {
|
|
6
|
-
|
|
7
|
+
identity: userInterfaces.IIdentity;
|
|
7
8
|
};
|
|
8
9
|
response: {
|
|
9
10
|
images: IImage[];
|
|
@@ -15,7 +16,7 @@ export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.im
|
|
|
15
16
|
export interface IRequest_GetImageMetadata extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_GetImageMetadata> {
|
|
16
17
|
method: 'getImageMetadata';
|
|
17
18
|
request: {
|
|
18
|
-
|
|
19
|
+
identity: userInterfaces.IIdentity;
|
|
19
20
|
imageId: string;
|
|
20
21
|
};
|
|
21
22
|
response: {
|
|
@@ -25,7 +26,7 @@ export interface IRequest_GetImageMetadata extends plugins.typedrequestInterface
|
|
|
25
26
|
export interface IRequest_CreateImage extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_CreateImage> {
|
|
26
27
|
method: 'createImage';
|
|
27
28
|
request: {
|
|
28
|
-
|
|
29
|
+
identity: userInterfaces.IIdentity;
|
|
29
30
|
name: string;
|
|
30
31
|
description: string;
|
|
31
32
|
};
|
|
@@ -36,7 +37,7 @@ export interface IRequest_CreateImage extends plugins.typedrequestInterfaces.imp
|
|
|
36
37
|
export interface IRequest_PushImageVersion extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_PushImageVersion> {
|
|
37
38
|
method: 'pushImageVersion';
|
|
38
39
|
request: {
|
|
39
|
-
|
|
40
|
+
identity: userInterfaces.IIdentity;
|
|
40
41
|
imageId: string;
|
|
41
42
|
versionString: string;
|
|
42
43
|
imageStream: plugins.typedrequestInterfaces.IVirtualStream;
|
|
@@ -48,7 +49,7 @@ export interface IRequest_PushImageVersion extends plugins.typedrequestInterface
|
|
|
48
49
|
export interface IRequest_PullImageVersion extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_PullImageVersion> {
|
|
49
50
|
method: 'pullImageVersion';
|
|
50
51
|
request: {
|
|
51
|
-
|
|
52
|
+
identity: userInterfaces.IIdentity;
|
|
52
53
|
imageId: string;
|
|
53
54
|
versionString: string;
|
|
54
55
|
};
|
|
@@ -59,7 +60,7 @@ export interface IRequest_PullImageVersion extends plugins.typedrequestInterface
|
|
|
59
60
|
export interface IRequest_DeleteImage extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_DeleteImage> {
|
|
60
61
|
method: 'deleteImage';
|
|
61
62
|
request: {
|
|
62
|
-
|
|
63
|
+
identity: userInterfaces.IIdentity;
|
|
63
64
|
imageId: string;
|
|
64
65
|
};
|
|
65
66
|
response: {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
|
|
2
|
+
import * as userInterfaces from '../data/user.js';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1hZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbWFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEtBQUssY0FBYyxNQUFNLGlCQUFpQixDQUFDIn0=
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as data from '../data/index.js';
|
|
3
|
+
import * as userInterfaces from '../data/user.js';
|
|
3
4
|
export interface IReq_GetEnvBundle extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetEnvBundle> {
|
|
4
5
|
method: 'getEnvBundle';
|
|
5
6
|
request: {
|
|
@@ -20,13 +21,13 @@ export interface IReq_Admin_LoginWithUsernameAndPassword extends plugins.typedre
|
|
|
20
21
|
password: string;
|
|
21
22
|
};
|
|
22
23
|
response: {
|
|
23
|
-
|
|
24
|
+
identity: userInterfaces.IIdentity;
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
27
|
export interface IReq_Admin_GetConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_GetConfigBundlesAndSecretGroups> {
|
|
27
28
|
method: 'adminGetConfigBundlesAndSecretGroups';
|
|
28
29
|
request: {
|
|
29
|
-
|
|
30
|
+
identity: userInterfaces.IIdentity;
|
|
30
31
|
};
|
|
31
32
|
response: {
|
|
32
33
|
secretBundles: data.ISecretBundle[];
|
|
@@ -36,7 +37,7 @@ export interface IReq_Admin_GetConfigBundlesAndSecretGroups extends plugins.type
|
|
|
36
37
|
export interface IReq_Admin_CreateConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_CreateConfigBundlesAndSecretGroups> {
|
|
37
38
|
method: 'adminCreateConfigBundlesAndSecretGroups';
|
|
38
39
|
request: {
|
|
39
|
-
|
|
40
|
+
identity: userInterfaces.IIdentity;
|
|
40
41
|
secretBundles: data.ISecretBundle[];
|
|
41
42
|
secretGroups: data.ISecretGroup[];
|
|
42
43
|
};
|
|
@@ -47,7 +48,7 @@ export interface IReq_Admin_CreateConfigBundlesAndSecretGroups extends plugins.t
|
|
|
47
48
|
export interface IReq_Admin_UpdateConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_UpdateConfigBundlesAndSecretGroups> {
|
|
48
49
|
method: 'adminUpdateConfigBundlesAndSecretGroups';
|
|
49
50
|
request: {
|
|
50
|
-
|
|
51
|
+
identity: userInterfaces.IIdentity;
|
|
51
52
|
configBundles: data.ISecretBundle[];
|
|
52
53
|
secretGroups: data.ISecretGroup[];
|
|
53
54
|
};
|
|
@@ -58,7 +59,7 @@ export interface IReq_Admin_UpdateConfigBundlesAndSecretGroups extends plugins.t
|
|
|
58
59
|
export interface IReq_Admin_DeleteConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_DeleteConfigBundlesAndSecretGroups> {
|
|
59
60
|
method: 'adminDeleteConfigBundlesAndSecretGroups';
|
|
60
61
|
request: {
|
|
61
|
-
|
|
62
|
+
identity: userInterfaces.IIdentity;
|
|
62
63
|
secretBundleIds: string[];
|
|
63
64
|
secretGroupIds: string[];
|
|
64
65
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as data from '../data/index.js';
|
|
3
|
-
|
|
3
|
+
import * as userInterfaces from '../data/user.js';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VjcmV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvc2VjcmV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUM7QUFDekMsT0FBTyxLQUFLLGNBQWMsTUFBTSxpQkFBaUIsQ0FBQyJ9
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
2
|
/**
|
|
3
3
|
* a status update dashboard
|
|
4
4
|
*/
|
|
5
5
|
export interface IRequest_Coreflow_Cloudly_CoreflowManagerStatusupdate {
|
|
6
6
|
method: 'cloudlyStatus';
|
|
7
7
|
request: {
|
|
8
|
-
|
|
8
|
+
identity: userInterfaces.IIdentity;
|
|
9
9
|
};
|
|
10
10
|
response: {};
|
|
11
11
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdHVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvc3RhdHVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxjQUFjLE1BQU0saUJBQWlCLENBQUMifQ==
|
package/package.json
CHANGED
package/readme.hints.md
ADDED
|
File without changes
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* autocreated commitinfo by @
|
|
2
|
+
* autocreated commitinfo by @push.rocks/commitinfo
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.76',
|
|
7
7
|
description: 'interfaces for working with containers'
|
|
8
8
|
}
|
package/ts/data/cluster.ts
CHANGED
|
@@ -3,23 +3,22 @@ import * as plugins from '../plugins.js';
|
|
|
3
3
|
import { type IDockerRegistryInfo } from '../data/docker.js';
|
|
4
4
|
import type { IServer } from './server.js';
|
|
5
5
|
|
|
6
|
-
export interface IClusterIdentifier {
|
|
7
|
-
clusterId: string;
|
|
8
|
-
clusterName: string;
|
|
9
|
-
jwt: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
6
|
export interface ICluster {
|
|
13
7
|
id: string;
|
|
14
8
|
data: {
|
|
15
9
|
name: string;
|
|
16
|
-
|
|
10
|
+
initialJumpToken: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* a cluster has a machine user that governs access rights.
|
|
14
|
+
*/
|
|
15
|
+
userId: string;
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* when was the jump code used
|
|
20
19
|
* avoid replay attacks
|
|
21
20
|
*/
|
|
22
|
-
|
|
21
|
+
initialJumpTokenUsedAt?: number;
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* how can the cluster reach cloudly
|
package/ts/data/user.ts
CHANGED
|
@@ -1,8 +1,30 @@
|
|
|
1
|
+
export interface IToken {
|
|
2
|
+
token: string;
|
|
3
|
+
expiresAt: number;
|
|
4
|
+
assignedRoles: string[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* an identity is assumed by authentication as a user
|
|
9
|
+
* an identity is ephemeral and has to be renewed regularly
|
|
10
|
+
*/
|
|
11
|
+
export interface IIdentity {
|
|
12
|
+
name: string;
|
|
13
|
+
userId: string;
|
|
14
|
+
type: 'machine' | 'human';
|
|
15
|
+
role: 'admin' | 'user' | 'api' | 'cluster';
|
|
16
|
+
expiresAt: number;
|
|
17
|
+
/** the jwt token should contain above data for verification */
|
|
18
|
+
jwt: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
1
21
|
export interface IUser {
|
|
2
22
|
id: string;
|
|
3
23
|
data: {
|
|
24
|
+
type: 'machine' | 'human';
|
|
4
25
|
role: 'admin' | 'user' | 'api' | 'cluster';
|
|
5
|
-
username
|
|
6
|
-
password
|
|
26
|
+
username?: string;
|
|
27
|
+
password?: string;
|
|
28
|
+
tokens?: IToken[];
|
|
7
29
|
}
|
|
8
30
|
}
|
package/ts/requests/cluster.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
|
+
import * as clusterInterfaces from '../data/cluster.js';
|
|
2
3
|
import * as plugins from '../plugins.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -10,10 +11,10 @@ export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.
|
|
|
10
11
|
> {
|
|
11
12
|
method: 'getAllClusters';
|
|
12
13
|
request: {
|
|
13
|
-
|
|
14
|
+
identity: userInterfaces.IIdentity;
|
|
14
15
|
};
|
|
15
16
|
response: {
|
|
16
|
-
clusters: ICluster[];
|
|
17
|
+
clusters: clusterInterfaces.ICluster[];
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -23,11 +24,11 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
|
|
|
23
24
|
> {
|
|
24
25
|
method: 'createCluster';
|
|
25
26
|
request: {
|
|
26
|
-
|
|
27
|
+
identity: userInterfaces.IIdentity;
|
|
27
28
|
clusterName: string;
|
|
28
29
|
};
|
|
29
30
|
response: {
|
|
30
|
-
clusterConfig: ICluster;
|
|
31
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -40,11 +41,11 @@ export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.i
|
|
|
40
41
|
> {
|
|
41
42
|
method: 'updateCluster';
|
|
42
43
|
request: {
|
|
43
|
-
|
|
44
|
-
clusterConfig: ICluster;
|
|
44
|
+
identity: userInterfaces.IIdentity;
|
|
45
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
45
46
|
};
|
|
46
47
|
response: {
|
|
47
|
-
clusterConfig: ICluster;
|
|
48
|
+
clusterConfig: clusterInterfaces.ICluster;
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -57,7 +58,7 @@ export interface IRequest_DeleteCluster extends plugins.typedrequestInterfaces.i
|
|
|
57
58
|
> {
|
|
58
59
|
method: 'deleteCluster';
|
|
59
60
|
request: {
|
|
60
|
-
|
|
61
|
+
identity: userInterfaces.IIdentity;
|
|
61
62
|
clusterId: string;
|
|
62
63
|
};
|
|
63
64
|
response: {
|
package/ts/requests/config.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
3
3
|
import * as serverInterfaces from '../data/server.js';
|
|
4
|
+
import * as userInterfaces from '../data/user.js';
|
|
4
5
|
import type { IService } from '../data/service.js';
|
|
5
6
|
import type { IDeploymentDirective } from '../data/deploymentdirective.js';
|
|
6
7
|
|
|
@@ -11,7 +12,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
11
12
|
> {
|
|
12
13
|
method: 'getServerConfig';
|
|
13
14
|
request: {
|
|
14
|
-
|
|
15
|
+
identity: userInterfaces.IIdentity;
|
|
15
16
|
serverId: string;
|
|
16
17
|
};
|
|
17
18
|
response: {
|
|
@@ -26,8 +27,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
26
27
|
> {
|
|
27
28
|
method: 'getClusterConfig';
|
|
28
29
|
request: {
|
|
29
|
-
|
|
30
|
-
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
30
|
+
identity: userInterfaces.IIdentity;
|
|
31
31
|
};
|
|
32
32
|
response: {
|
|
33
33
|
configData: clusterInterfaces.ICluster;
|
package/ts/requests/identity.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
import * as
|
|
2
|
+
import * as userInterfaces from '../data/user.js'
|
|
3
3
|
|
|
4
4
|
// ========
|
|
5
5
|
// IDENTITY
|
|
@@ -18,6 +18,6 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
18
18
|
jumpCode: string;
|
|
19
19
|
};
|
|
20
20
|
response: {
|
|
21
|
-
clusterIdentifier:
|
|
21
|
+
clusterIdentifier: userInterfaces.IIdentity;
|
|
22
22
|
};
|
|
23
23
|
}
|
package/ts/requests/image.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
3
|
|
|
3
4
|
import type { IImage } from '../data/index.js';
|
|
4
5
|
|
|
@@ -8,7 +9,7 @@ export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.im
|
|
|
8
9
|
> {
|
|
9
10
|
method: 'getAllImages';
|
|
10
11
|
request: {
|
|
11
|
-
|
|
12
|
+
identity: userInterfaces.IIdentity;
|
|
12
13
|
};
|
|
13
14
|
response: {
|
|
14
15
|
images: IImage[];
|
|
@@ -24,7 +25,7 @@ export interface IRequest_GetImageMetadata extends plugins.typedrequestInterface
|
|
|
24
25
|
> {
|
|
25
26
|
method: 'getImageMetadata';
|
|
26
27
|
request: {
|
|
27
|
-
|
|
28
|
+
identity: userInterfaces.IIdentity;
|
|
28
29
|
imageId: string;
|
|
29
30
|
};
|
|
30
31
|
response: {
|
|
@@ -38,7 +39,7 @@ export interface IRequest_CreateImage extends plugins.typedrequestInterfaces.imp
|
|
|
38
39
|
> {
|
|
39
40
|
method: 'createImage';
|
|
40
41
|
request: {
|
|
41
|
-
|
|
42
|
+
identity: userInterfaces.IIdentity;
|
|
42
43
|
name: string;
|
|
43
44
|
description: string;
|
|
44
45
|
};
|
|
@@ -54,7 +55,7 @@ export interface IRequest_PushImageVersion extends plugins.typedrequestInterface
|
|
|
54
55
|
> {
|
|
55
56
|
method: 'pushImageVersion';
|
|
56
57
|
request: {
|
|
57
|
-
|
|
58
|
+
identity: userInterfaces.IIdentity;
|
|
58
59
|
imageId: string;
|
|
59
60
|
versionString: string;
|
|
60
61
|
imageStream: plugins.typedrequestInterfaces.IVirtualStream;
|
|
@@ -70,7 +71,7 @@ export interface IRequest_PullImageVersion extends plugins.typedrequestInterface
|
|
|
70
71
|
> {
|
|
71
72
|
method: 'pullImageVersion';
|
|
72
73
|
request: {
|
|
73
|
-
|
|
74
|
+
identity: userInterfaces.IIdentity;
|
|
74
75
|
imageId: string;
|
|
75
76
|
versionString: string;
|
|
76
77
|
};
|
|
@@ -85,7 +86,7 @@ export interface IRequest_DeleteImage extends plugins.typedrequestInterfaces.imp
|
|
|
85
86
|
> {
|
|
86
87
|
method: 'deleteImage';
|
|
87
88
|
request: {
|
|
88
|
-
|
|
89
|
+
identity: userInterfaces.IIdentity;
|
|
89
90
|
imageId: string;
|
|
90
91
|
};
|
|
91
92
|
response: {
|
package/ts/requests/secret.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import * as data from '../data/index.js';
|
|
3
|
+
import * as userInterfaces from '../data/user.js';
|
|
3
4
|
|
|
4
5
|
export interface IReq_GetEnvBundle extends plugins.typedrequestInterfaces.implementsTR<
|
|
5
6
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
@@ -28,7 +29,7 @@ export interface IReq_Admin_LoginWithUsernameAndPassword extends plugins.typedre
|
|
|
28
29
|
password: string;
|
|
29
30
|
};
|
|
30
31
|
response: {
|
|
31
|
-
|
|
32
|
+
identity: userInterfaces.IIdentity;
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -38,7 +39,7 @@ export interface IReq_Admin_GetConfigBundlesAndSecretGroups extends plugins.type
|
|
|
38
39
|
> {
|
|
39
40
|
method: 'adminGetConfigBundlesAndSecretGroups';
|
|
40
41
|
request: {
|
|
41
|
-
|
|
42
|
+
identity: userInterfaces.IIdentity;
|
|
42
43
|
};
|
|
43
44
|
response: {
|
|
44
45
|
secretBundles: data.ISecretBundle[];
|
|
@@ -53,7 +54,7 @@ export interface IReq_Admin_CreateConfigBundlesAndSecretGroups extends plugins.t
|
|
|
53
54
|
> {
|
|
54
55
|
method: 'adminCreateConfigBundlesAndSecretGroups';
|
|
55
56
|
request: {
|
|
56
|
-
|
|
57
|
+
identity: userInterfaces.IIdentity;
|
|
57
58
|
secretBundles: data.ISecretBundle[];
|
|
58
59
|
secretGroups: data.ISecretGroup[];
|
|
59
60
|
};
|
|
@@ -68,7 +69,7 @@ export interface IReq_Admin_UpdateConfigBundlesAndSecretGroups extends plugins.t
|
|
|
68
69
|
> {
|
|
69
70
|
method: 'adminUpdateConfigBundlesAndSecretGroups';
|
|
70
71
|
request: {
|
|
71
|
-
|
|
72
|
+
identity: userInterfaces.IIdentity;
|
|
72
73
|
configBundles: data.ISecretBundle[];
|
|
73
74
|
secretGroups: data.ISecretGroup[];
|
|
74
75
|
};
|
|
@@ -83,7 +84,7 @@ export interface IReq_Admin_DeleteConfigBundlesAndSecretGroups extends plugins.t
|
|
|
83
84
|
> {
|
|
84
85
|
method: 'adminDeleteConfigBundlesAndSecretGroups';
|
|
85
86
|
request: {
|
|
86
|
-
|
|
87
|
+
identity: userInterfaces.IIdentity;
|
|
87
88
|
secretBundleIds: string[];
|
|
88
89
|
secretGroupIds: string[];
|
|
89
90
|
};
|
package/ts/requests/status.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as userInterfaces from '../data/user.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* a status update dashboard
|
|
@@ -6,7 +6,7 @@ import * as clusterInterfaces from '../data/cluster.js';
|
|
|
6
6
|
export interface IRequest_Coreflow_Cloudly_CoreflowManagerStatusupdate {
|
|
7
7
|
method: 'cloudlyStatus';
|
|
8
8
|
request: {
|
|
9
|
-
|
|
9
|
+
identity: userInterfaces.IIdentity;
|
|
10
10
|
};
|
|
11
11
|
response: {};
|
|
12
12
|
}
|