@serve.zone/interfaces 1.0.18 → 1.0.20
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.js +1 -1
- package/dist_ts/data/cluster.d.ts +10 -7
- package/dist_ts/requests/cluster.d.ts +13 -4
- package/dist_ts/requests/config.d.ts +4 -4
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/cluster.ts +13 -8
- package/ts/requests/cluster.ts +17 -4
- package/ts/requests/config.ts +4 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.20',
|
|
7
7
|
description: 'interfaces for working with containers'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHdDQUF3QztDQUN0RCxDQUFBIn0=
|
|
@@ -4,12 +4,16 @@ export interface IClusterIdentifier {
|
|
|
4
4
|
clusterName: string;
|
|
5
5
|
secretKey: string;
|
|
6
6
|
}
|
|
7
|
-
export interface
|
|
7
|
+
export interface ICluster {
|
|
8
8
|
id: string;
|
|
9
9
|
data: {
|
|
10
10
|
name: string;
|
|
11
11
|
secretKey: string;
|
|
12
12
|
jumpCode: string;
|
|
13
|
+
/**
|
|
14
|
+
* when was the jump code used
|
|
15
|
+
* avoid replay attacks
|
|
16
|
+
*/
|
|
13
17
|
jumpCodeUsedAt: number;
|
|
14
18
|
/**
|
|
15
19
|
* how can the cluster reach cloudly
|
|
@@ -20,20 +24,19 @@ export interface IClusterConfig {
|
|
|
20
24
|
*/
|
|
21
25
|
servers: IServerConfig[];
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
24
|
-
*/
|
|
25
|
-
containers: IClusterConfigContainer[];
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
27
|
+
* ACME info. This is used to get SSL certificates.
|
|
28
28
|
*/
|
|
29
29
|
acmeInfo: {
|
|
30
30
|
serverAddress: string;
|
|
31
31
|
serverSecret: string;
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Where to get the images from
|
|
35
|
+
*/
|
|
33
36
|
registryInfo: IDockerRegistryInfo;
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
|
-
export interface
|
|
39
|
+
export interface IService {
|
|
37
40
|
name: string;
|
|
38
41
|
image: string;
|
|
39
42
|
ports: {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ICluster } from '../data/cluster.js';
|
|
2
2
|
import * as plugins from '../plugins.js';
|
|
3
|
+
export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_GetAllClusters> {
|
|
4
|
+
method: 'getAllClusters';
|
|
5
|
+
request: {
|
|
6
|
+
jwt: string;
|
|
7
|
+
};
|
|
8
|
+
response: {
|
|
9
|
+
clusters: ICluster[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
3
12
|
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_CreateCluster> {
|
|
4
13
|
method: 'createCluster';
|
|
5
14
|
request: {
|
|
@@ -7,16 +16,16 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
|
|
|
7
16
|
clusterName: string;
|
|
8
17
|
};
|
|
9
18
|
response: {
|
|
10
|
-
clusterConfig:
|
|
19
|
+
clusterConfig: ICluster;
|
|
11
20
|
};
|
|
12
21
|
}
|
|
13
22
|
export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_UpdateCluster> {
|
|
14
23
|
method: 'updateCluster';
|
|
15
24
|
request: {
|
|
16
25
|
jwt: string;
|
|
17
|
-
clusterConfig:
|
|
26
|
+
clusterConfig: ICluster;
|
|
18
27
|
};
|
|
19
28
|
response: {
|
|
20
|
-
clusterConfig:
|
|
29
|
+
clusterConfig: ICluster;
|
|
21
30
|
};
|
|
22
31
|
}
|
|
@@ -16,21 +16,21 @@ export interface IRequest_Any_Cloudly_GetClusterConfig extends plugins.typedrequ
|
|
|
16
16
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
17
17
|
};
|
|
18
18
|
response: {
|
|
19
|
-
configData: clusterInterfaces.
|
|
19
|
+
configData: clusterInterfaces.ICluster;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
export interface IRequest_Cloudly_Coreflow_PushClusterConfig extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Cloudly_Coreflow_PushClusterConfig> {
|
|
23
23
|
method: 'pushClusterConfig';
|
|
24
24
|
request: {
|
|
25
|
-
configData: clusterInterfaces.
|
|
25
|
+
configData: clusterInterfaces.ICluster;
|
|
26
26
|
};
|
|
27
27
|
response: {};
|
|
28
28
|
}
|
|
29
29
|
export interface IRequest_Cloudly_Coreflow_PushContainerUpdate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Cloudly_Coreflow_PushContainerUpdate> {
|
|
30
30
|
method: 'pushContainerUpdate';
|
|
31
31
|
request: {
|
|
32
|
-
configData: clusterInterfaces.
|
|
33
|
-
specificContainerConfigToUpdate: clusterInterfaces.
|
|
32
|
+
configData: clusterInterfaces.ICluster;
|
|
33
|
+
specificContainerConfigToUpdate: clusterInterfaces.IService;
|
|
34
34
|
};
|
|
35
35
|
response: {};
|
|
36
36
|
}
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/cluster.ts
CHANGED
|
@@ -6,13 +6,19 @@ export interface IClusterIdentifier {
|
|
|
6
6
|
secretKey: string;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface ICluster {
|
|
10
10
|
id: string;
|
|
11
11
|
data: {
|
|
12
12
|
name: string;
|
|
13
13
|
secretKey: string;
|
|
14
14
|
jumpCode: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* when was the jump code used
|
|
18
|
+
* avoid replay attacks
|
|
19
|
+
*/
|
|
15
20
|
jumpCodeUsedAt: number;
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* how can the cluster reach cloudly
|
|
18
24
|
*/
|
|
@@ -24,22 +30,21 @@ export interface IClusterConfig {
|
|
|
24
30
|
servers: IServerConfig[];
|
|
25
31
|
|
|
26
32
|
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
containers: IClusterConfigContainer[];
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
+
* ACME info. This is used to get SSL certificates.
|
|
33
34
|
*/
|
|
34
35
|
acmeInfo: {
|
|
35
36
|
serverAddress: string;
|
|
36
37
|
serverSecret: string;
|
|
37
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Where to get the images from
|
|
42
|
+
*/
|
|
38
43
|
registryInfo: IDockerRegistryInfo;
|
|
39
44
|
};
|
|
40
45
|
}
|
|
41
46
|
|
|
42
|
-
export interface
|
|
47
|
+
export interface IService {
|
|
43
48
|
name: string;
|
|
44
49
|
image: string;
|
|
45
50
|
ports: {
|
package/ts/requests/cluster.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ICluster } from '../data/cluster.js';
|
|
2
2
|
import * as plugins from '../plugins.js';
|
|
3
3
|
|
|
4
|
+
export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.implementsTR<
|
|
5
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
6
|
+
IRequest_GetAllClusters
|
|
7
|
+
> {
|
|
8
|
+
method: 'getAllClusters';
|
|
9
|
+
request: {
|
|
10
|
+
jwt: string;
|
|
11
|
+
};
|
|
12
|
+
response: {
|
|
13
|
+
clusters: ICluster[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
5
18
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
6
19
|
IRequest_CreateCluster
|
|
@@ -11,7 +24,7 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
|
|
|
11
24
|
clusterName: string;
|
|
12
25
|
};
|
|
13
26
|
response: {
|
|
14
|
-
clusterConfig:
|
|
27
|
+
clusterConfig: ICluster;
|
|
15
28
|
};
|
|
16
29
|
}
|
|
17
30
|
|
|
@@ -22,9 +35,9 @@ export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.i
|
|
|
22
35
|
method: 'updateCluster';
|
|
23
36
|
request: {
|
|
24
37
|
jwt: string;
|
|
25
|
-
clusterConfig:
|
|
38
|
+
clusterConfig: ICluster;
|
|
26
39
|
};
|
|
27
40
|
response: {
|
|
28
|
-
clusterConfig:
|
|
41
|
+
clusterConfig: ICluster;
|
|
29
42
|
};
|
|
30
43
|
}
|
package/ts/requests/config.ts
CHANGED
|
@@ -26,7 +26,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
26
26
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
|
27
27
|
};
|
|
28
28
|
response: {
|
|
29
|
-
configData: clusterInterfaces.
|
|
29
|
+
configData: clusterInterfaces.ICluster;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -37,7 +37,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
37
37
|
> {
|
|
38
38
|
method: 'pushClusterConfig';
|
|
39
39
|
request: {
|
|
40
|
-
configData: clusterInterfaces.
|
|
40
|
+
configData: clusterInterfaces.ICluster;
|
|
41
41
|
};
|
|
42
42
|
response: {};
|
|
43
43
|
}
|
|
@@ -49,8 +49,8 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
49
49
|
> {
|
|
50
50
|
method: 'pushContainerUpdate'
|
|
51
51
|
request: {
|
|
52
|
-
configData: clusterInterfaces.
|
|
53
|
-
specificContainerConfigToUpdate: clusterInterfaces.
|
|
52
|
+
configData: clusterInterfaces.ICluster;
|
|
53
|
+
specificContainerConfigToUpdate: clusterInterfaces.IService;
|
|
54
54
|
};
|
|
55
55
|
response: {}
|
|
56
56
|
}
|