@serve.zone/interfaces 4.12.1 → 5.0.0
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_interfaces/data/secretbundle.d.ts +7 -3
- package/dist_ts_interfaces/data/service.d.ts +8 -0
- package/dist_ts_interfaces/platformservice/mta.d.ts +20 -2
- package/dist_ts_interfaces/requests/service.d.ts +17 -47
- package/package.json +2 -2
- package/ts_interfaces/data/secretbundle.ts +10 -4
- package/ts_interfaces/data/service.ts +8 -0
- package/ts_interfaces/platformservice/mta.ts +30 -4
- package/ts_interfaces/requests/service.ts +21 -39
|
@@ -19,21 +19,25 @@ export interface ISecretBundle {
|
|
|
19
19
|
* the bundle is a secret bundle that is used by an external service
|
|
20
20
|
*/
|
|
21
21
|
type: 'service' | 'npmci' | 'gitzone' | 'external';
|
|
22
|
+
/**
|
|
23
|
+
* set this if the secretBundle belongs to a service
|
|
24
|
+
*/
|
|
25
|
+
serviceId?: string;
|
|
22
26
|
/**
|
|
23
27
|
* You can add specific secret groups using this
|
|
24
28
|
*/
|
|
25
29
|
includedSecretGroupIds: string[];
|
|
26
30
|
/**
|
|
27
|
-
*
|
|
31
|
+
* access to this secretBundle also grants access to resources with matching tags
|
|
28
32
|
*/
|
|
29
33
|
includedTags: {
|
|
30
34
|
key: string;
|
|
31
35
|
value?: string;
|
|
32
36
|
}[];
|
|
33
37
|
/**
|
|
34
|
-
*
|
|
38
|
+
* access to this secretBundle also grants access to the images
|
|
35
39
|
*/
|
|
36
|
-
|
|
40
|
+
imageClaims: {
|
|
37
41
|
imageId: string;
|
|
38
42
|
permissions: ('read' | 'write')[];
|
|
39
43
|
}[];
|
|
@@ -9,7 +9,15 @@ export interface IService {
|
|
|
9
9
|
environment: {
|
|
10
10
|
[key: string]: string;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* the main secret bundle id, exclusive to the service
|
|
14
|
+
*/
|
|
12
15
|
secretBundleId: string;
|
|
16
|
+
/**
|
|
17
|
+
* those secret bundle ids do not belong to the service itself
|
|
18
|
+
* and thus live past the service lifecycle
|
|
19
|
+
*/
|
|
20
|
+
additionalSecretBundleIds?: string[];
|
|
13
21
|
scaleFactor: number;
|
|
14
22
|
balancingStrategy: 'round-robin' | 'least-connections';
|
|
15
23
|
ports: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
|
3
|
-
export interface
|
|
3
|
+
export interface IReq_SendEmail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SendEmail> {
|
|
4
4
|
method: 'sendEmail';
|
|
5
5
|
request: {
|
|
6
6
|
title: string;
|
|
@@ -19,7 +19,7 @@ export interface IRequest_SendEmail extends plugins.typedrequestInterfaces.imple
|
|
|
19
19
|
responseId: string;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
22
|
+
export interface IReq_RegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RegisterRecipient> {
|
|
23
23
|
method: 'registerRecepient';
|
|
24
24
|
request: {
|
|
25
25
|
emailAddress: string;
|
|
@@ -28,3 +28,21 @@ export interface IRequestRegisterRecipient extends plugins.typedrequestInterface
|
|
|
28
28
|
status: 'ok' | 'not ok';
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
export interface IReq_CheckEmailStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CheckEmailStatus> {
|
|
32
|
+
method: 'checkEmailStatus';
|
|
33
|
+
request: {
|
|
34
|
+
emailId: string;
|
|
35
|
+
};
|
|
36
|
+
response: {
|
|
37
|
+
status: 'ok' | 'not ok';
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface IReq_GetEMailStats extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetEMailStats> {
|
|
41
|
+
method: 'getEmailStats';
|
|
42
|
+
request: {
|
|
43
|
+
jwt: string;
|
|
44
|
+
};
|
|
45
|
+
response: {
|
|
46
|
+
status: {};
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
2
|
import type { IService } from '../data/service.js';
|
|
3
3
|
import type { IIdentity } from '../data/user.js';
|
|
4
|
-
import type { IServiceRessources } from '../data/docker.js';
|
|
5
4
|
export interface IRequest_Any_Cloudly_GetServiceById extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetServiceById> {
|
|
6
5
|
method: 'getServiceById';
|
|
7
6
|
request: {
|
|
@@ -25,28 +24,7 @@ export interface IRequest_Any_Cloudly_CreateService extends plugins.typedrequest
|
|
|
25
24
|
method: 'createService';
|
|
26
25
|
request: {
|
|
27
26
|
identity: IIdentity;
|
|
28
|
-
|
|
29
|
-
description: string;
|
|
30
|
-
imageId: string;
|
|
31
|
-
imageVersion: string;
|
|
32
|
-
environment: {
|
|
33
|
-
[key: string]: string;
|
|
34
|
-
};
|
|
35
|
-
secretBundleId: string;
|
|
36
|
-
scaleFactor: number;
|
|
37
|
-
balancingStrategy: 'round-robin' | 'least-connections';
|
|
38
|
-
ports: {
|
|
39
|
-
web: number;
|
|
40
|
-
custom?: {
|
|
41
|
-
[domain: string]: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
resources?: IServiceRessources;
|
|
45
|
-
domains: {
|
|
46
|
-
name: string;
|
|
47
|
-
port?: number;
|
|
48
|
-
protocol?: 'http' | 'https' | 'ssh';
|
|
49
|
-
}[];
|
|
27
|
+
serviceData: IService['data'];
|
|
50
28
|
};
|
|
51
29
|
response: {
|
|
52
30
|
service: IService;
|
|
@@ -57,35 +35,14 @@ export interface IRequest_Any_Cloudly_UpdateService extends plugins.typedrequest
|
|
|
57
35
|
request: {
|
|
58
36
|
identity: IIdentity;
|
|
59
37
|
serviceId: string;
|
|
60
|
-
|
|
61
|
-
description: string;
|
|
62
|
-
imageId: string;
|
|
63
|
-
imageVersion: string;
|
|
64
|
-
environment: {
|
|
65
|
-
[key: string]: string;
|
|
66
|
-
};
|
|
67
|
-
secretBundleId: string;
|
|
68
|
-
scaleFactor: number;
|
|
69
|
-
balancingStrategy: 'round-robin' | 'least-connections';
|
|
70
|
-
ports: {
|
|
71
|
-
web: number;
|
|
72
|
-
custom?: {
|
|
73
|
-
[domain: string]: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
resources?: IServiceRessources;
|
|
77
|
-
domains: {
|
|
78
|
-
name: string;
|
|
79
|
-
port?: number;
|
|
80
|
-
protocol?: 'http' | 'https' | 'ssh';
|
|
81
|
-
}[];
|
|
38
|
+
serviceData: IService['data'];
|
|
82
39
|
};
|
|
83
40
|
response: {
|
|
84
41
|
service: IService;
|
|
85
42
|
};
|
|
86
43
|
}
|
|
87
|
-
export interface
|
|
88
|
-
method: '
|
|
44
|
+
export interface IRequest_Any_Cloudly_DeleteServiceById extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_DeleteServiceById> {
|
|
45
|
+
method: 'deleteServiceById';
|
|
89
46
|
request: {
|
|
90
47
|
identity: IIdentity;
|
|
91
48
|
serviceId: string;
|
|
@@ -94,3 +51,16 @@ export interface IRequest_Any_Cloudly_DeleteService extends plugins.typedrequest
|
|
|
94
51
|
success: boolean;
|
|
95
52
|
};
|
|
96
53
|
}
|
|
54
|
+
export interface IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject> {
|
|
55
|
+
method: 'getServiceSecretBundlesAsFlatObject';
|
|
56
|
+
request: {
|
|
57
|
+
identity: IIdentity;
|
|
58
|
+
serviceId: string;
|
|
59
|
+
environment: string;
|
|
60
|
+
};
|
|
61
|
+
response: {
|
|
62
|
+
flatKeyValueObject: {
|
|
63
|
+
[key: string]: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/interfaces",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"exports": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@api.global/typedrequest-interfaces": "^3.0.19",
|
|
13
13
|
"@push.rocks/smartlog-interfaces": "^3.0.2",
|
|
14
|
-
"@tsclass/tsclass": "^
|
|
14
|
+
"@tsclass/tsclass": "^9.0.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@git.zone/tsbuild": "2.1.67"
|
|
@@ -21,13 +21,19 @@ export interface ISecretBundle {
|
|
|
21
21
|
*/
|
|
22
22
|
type: 'service' | 'npmci' | 'gitzone' | 'external';
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* set this if the secretBundle belongs to a service
|
|
27
|
+
*/
|
|
28
|
+
serviceId?: string;
|
|
29
|
+
|
|
24
30
|
/**
|
|
25
31
|
* You can add specific secret groups using this
|
|
26
32
|
*/
|
|
27
33
|
includedSecretGroupIds: string[];
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
|
-
*
|
|
36
|
+
* access to this secretBundle also grants access to resources with matching tags
|
|
31
37
|
*/
|
|
32
38
|
includedTags: {
|
|
33
39
|
key: string;
|
|
@@ -35,12 +41,12 @@ export interface ISecretBundle {
|
|
|
35
41
|
}[];
|
|
36
42
|
|
|
37
43
|
/**
|
|
38
|
-
*
|
|
44
|
+
* access to this secretBundle also grants access to the images
|
|
39
45
|
*/
|
|
40
|
-
|
|
46
|
+
imageClaims: {
|
|
41
47
|
imageId: string;
|
|
42
48
|
permissions: ('read' | 'write')[];
|
|
43
|
-
}[];
|
|
49
|
+
}[];
|
|
44
50
|
|
|
45
51
|
/**
|
|
46
52
|
* authrozations select a specific environment of a config bundle
|
|
@@ -8,7 +8,15 @@ export interface IService {
|
|
|
8
8
|
imageId: string;
|
|
9
9
|
imageVersion: string;
|
|
10
10
|
environment: { [key: string]: string };
|
|
11
|
+
/**
|
|
12
|
+
* the main secret bundle id, exclusive to the service
|
|
13
|
+
*/
|
|
11
14
|
secretBundleId: string;
|
|
15
|
+
/**
|
|
16
|
+
* those secret bundle ids do not belong to the service itself
|
|
17
|
+
* and thus live past the service lifecycle
|
|
18
|
+
*/
|
|
19
|
+
additionalSecretBundleIds?: string[];
|
|
12
20
|
scaleFactor: number;
|
|
13
21
|
balancingStrategy: 'round-robin' | 'least-connections';
|
|
14
22
|
ports: {
|
|
@@ -2,9 +2,9 @@ import * as plugins from '../plugins.js';
|
|
|
2
2
|
|
|
3
3
|
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
|
4
4
|
|
|
5
|
-
export interface
|
|
5
|
+
export interface IReq_SendEmail extends plugins.typedrequestInterfaces.implementsTR<
|
|
6
6
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
7
|
-
|
|
7
|
+
IReq_SendEmail
|
|
8
8
|
> {
|
|
9
9
|
method: 'sendEmail';
|
|
10
10
|
request: {
|
|
@@ -25,9 +25,9 @@ export interface IRequest_SendEmail extends plugins.typedrequestInterfaces.imple
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface
|
|
28
|
+
export interface IReq_RegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<
|
|
29
29
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
30
|
-
|
|
30
|
+
IReq_RegisterRecipient
|
|
31
31
|
> {
|
|
32
32
|
method: 'registerRecepient';
|
|
33
33
|
request: {
|
|
@@ -37,3 +37,29 @@ export interface IRequestRegisterRecipient extends plugins.typedrequestInterface
|
|
|
37
37
|
status: 'ok' | 'not ok';
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
export interface IReq_CheckEmailStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
42
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
43
|
+
IReq_CheckEmailStatus
|
|
44
|
+
> {
|
|
45
|
+
method: 'checkEmailStatus';
|
|
46
|
+
request: {
|
|
47
|
+
emailId: string;
|
|
48
|
+
};
|
|
49
|
+
response: {
|
|
50
|
+
status: 'ok' | 'not ok';
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IReq_GetEMailStats extends plugins.typedrequestInterfaces.implementsTR<
|
|
55
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
56
|
+
IReq_GetEMailStats
|
|
57
|
+
> {
|
|
58
|
+
method: 'getEmailStats';
|
|
59
|
+
request: {
|
|
60
|
+
jwt: string;
|
|
61
|
+
};
|
|
62
|
+
response: {
|
|
63
|
+
status: {};
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -40,24 +40,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
40
40
|
method: 'createService';
|
|
41
41
|
request: {
|
|
42
42
|
identity: IIdentity;
|
|
43
|
-
|
|
44
|
-
description: string;
|
|
45
|
-
imageId: string;
|
|
46
|
-
imageVersion: string;
|
|
47
|
-
environment: { [key: string]: string };
|
|
48
|
-
secretBundleId: string;
|
|
49
|
-
scaleFactor: number;
|
|
50
|
-
balancingStrategy: 'round-robin' | 'least-connections';
|
|
51
|
-
ports: {
|
|
52
|
-
web: number;
|
|
53
|
-
custom?: { [domain: string]: string };
|
|
54
|
-
};
|
|
55
|
-
resources?: IServiceRessources;
|
|
56
|
-
domains: {
|
|
57
|
-
name: string;
|
|
58
|
-
port?: number;
|
|
59
|
-
protocol?: 'http' | 'https' | 'ssh';
|
|
60
|
-
}[];
|
|
43
|
+
serviceData: IService['data'];
|
|
61
44
|
};
|
|
62
45
|
response: {
|
|
63
46
|
service: IService;
|
|
@@ -73,36 +56,19 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
73
56
|
request: {
|
|
74
57
|
identity: IIdentity;
|
|
75
58
|
serviceId: string;
|
|
76
|
-
|
|
77
|
-
description: string;
|
|
78
|
-
imageId: string;
|
|
79
|
-
imageVersion: string;
|
|
80
|
-
environment: { [key: string]: string };
|
|
81
|
-
secretBundleId: string;
|
|
82
|
-
scaleFactor: number;
|
|
83
|
-
balancingStrategy: 'round-robin' | 'least-connections';
|
|
84
|
-
ports: {
|
|
85
|
-
web: number;
|
|
86
|
-
custom?: { [domain: string]: string };
|
|
87
|
-
};
|
|
88
|
-
resources?: IServiceRessources;
|
|
89
|
-
domains: {
|
|
90
|
-
name: string;
|
|
91
|
-
port?: number;
|
|
92
|
-
protocol?: 'http' | 'https' | 'ssh';
|
|
93
|
-
}[];
|
|
59
|
+
serviceData: IService['data'];
|
|
94
60
|
};
|
|
95
61
|
response: {
|
|
96
62
|
service: IService;
|
|
97
63
|
};
|
|
98
64
|
}
|
|
99
65
|
|
|
100
|
-
export interface
|
|
66
|
+
export interface IRequest_Any_Cloudly_DeleteServiceById
|
|
101
67
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
102
68
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
103
|
-
|
|
69
|
+
IRequest_Any_Cloudly_DeleteServiceById
|
|
104
70
|
> {
|
|
105
|
-
method: '
|
|
71
|
+
method: 'deleteServiceById';
|
|
106
72
|
request: {
|
|
107
73
|
identity: IIdentity;
|
|
108
74
|
serviceId: string;
|
|
@@ -111,3 +77,19 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|
|
111
77
|
success: boolean;
|
|
112
78
|
};
|
|
113
79
|
}
|
|
80
|
+
|
|
81
|
+
export interface IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
|
|
82
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
83
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
84
|
+
IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
|
|
85
|
+
> {
|
|
86
|
+
method: 'getServiceSecretBundlesAsFlatObject';
|
|
87
|
+
request: {
|
|
88
|
+
identity: IIdentity;
|
|
89
|
+
serviceId: string;
|
|
90
|
+
environment: string;
|
|
91
|
+
};
|
|
92
|
+
response: {
|
|
93
|
+
flatKeyValueObject: {[key: string]: string};
|
|
94
|
+
};
|
|
95
|
+
}
|