@serve.zone/interfaces 5.4.6 → 5.8.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/.smartconfig.json +22 -7
- package/changelog.md +30 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/backup.d.ts +72 -0
- package/dist_ts/data/backup.js +2 -0
- package/dist_ts/data/baseos.d.ts +122 -0
- package/dist_ts/data/baseos.js +2 -0
- package/dist_ts/data/index.d.ts +2 -0
- package/dist_ts/data/index.js +3 -1
- package/dist_ts/data/service.d.ts +16 -0
- package/dist_ts/data/settings.d.ts +4 -0
- package/dist_ts/requests/backup.d.ts +137 -0
- package/dist_ts/requests/backup.js +2 -0
- package/dist_ts/requests/baseos.d.ts +76 -0
- package/dist_ts/requests/baseos.js +2 -0
- package/dist_ts/requests/cluster.d.ts +1 -0
- package/dist_ts/requests/index.d.ts +3 -1
- package/dist_ts/requests/index.js +4 -2
- package/package.json +5 -5
- package/readme.md +50 -57
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/backup.ts +96 -0
- package/ts/data/baseos.ts +144 -0
- package/ts/data/index.ts +2 -0
- package/ts/data/service.ts +17 -0
- package/ts/data/settings.ts +9 -1
- package/ts/requests/backup.ts +198 -0
- package/ts/requests/baseos.ts +93 -0
- package/ts/requests/cluster.ts +1 -0
- package/ts/requests/index.ts +4 -0
package/readme.md
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
# @serve.zone/interfaces
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
`@serve.zone/interfaces` is the contract package used by Cloudly, Spark, Coreflow, Coretraffic, Platformclient, CLI clients, and external integrators. It contains only public data shapes and typed RPC request definitions, so services can evolve independently while speaking the same language.
|
|
3
|
+
`@serve.zone/interfaces` is the shared TypeScript contract package for the serve.zone ecosystem. It contains the public data shapes and TypedRequest interfaces used by Cloudly, Coreflow, Spark, Coretraffic, platform clients, SDKs, and external integrations to exchange infrastructure state without duplicating DTOs.
|
|
6
4
|
|
|
7
5
|
## Issue Reporting and Security
|
|
8
6
|
|
|
9
7
|
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
|
|
10
8
|
|
|
11
|
-
## What This Package Provides
|
|
12
|
-
|
|
13
|
-
- `data` contains persistent platform shapes such as clusters, cluster nodes, deployments, services, images, DNS records, domains, secrets, users, identities, settings, status, traffic, server metadata, bare-metal inventory, and task executions.
|
|
14
|
-
- `requests` contains `@api.global/typedrequest-interfaces` contracts for Cloudly and platform RPC methods. Each request defines its method name, request payload, and response payload.
|
|
15
|
-
- `platform` contains current platform-service contracts for email, SMS, push notifications, letters, AI, backups, databases, logging, object storage, and SIP.
|
|
16
|
-
- `platformservice` contains legacy compatibility contracts used by older platform-service clients.
|
|
17
|
-
|
|
18
|
-
The package intentionally has no service implementation logic. It is a stable shared vocabulary for the rest of serve.zone.
|
|
19
|
-
|
|
20
9
|
## Install
|
|
21
10
|
|
|
22
11
|
```bash
|
|
@@ -25,24 +14,24 @@ pnpm add @serve.zone/interfaces
|
|
|
25
14
|
|
|
26
15
|
## Public API
|
|
27
16
|
|
|
17
|
+
The root export exposes four namespaces:
|
|
18
|
+
|
|
28
19
|
```typescript
|
|
29
20
|
import { data, platform, platformservice, requests } from '@serve.zone/interfaces';
|
|
30
21
|
```
|
|
31
22
|
|
|
32
|
-
|
|
23
|
+
| Namespace | Purpose |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `data` | Durable platform object shapes such as clusters, services, deployments, images, domains, DNS entries, secrets, users, status, settings, backups, registries, BaseOS metadata, and task executions. |
|
|
26
|
+
| `requests` | TypedRequest contracts for Cloudly and serve.zone control-plane RPC methods. |
|
|
27
|
+
| `platform` | Current platform-service contracts for email, SMS, push notifications, letters, AI, databases, object storage, logging, backups, and SIP. |
|
|
28
|
+
| `platformservice` | Legacy platform-service namespace kept for older consumers that still depend on the previous layout. |
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
export {
|
|
36
|
-
data,
|
|
37
|
-
platform,
|
|
38
|
-
platformservice,
|
|
39
|
-
requests,
|
|
40
|
-
};
|
|
41
|
-
```
|
|
30
|
+
This package intentionally has no service implementation logic. It is a stable vocabulary for services that need to agree on payload shape, method names, and response types.
|
|
42
31
|
|
|
43
|
-
## Data
|
|
32
|
+
## Data Contracts
|
|
44
33
|
|
|
45
|
-
Use `data` when you need
|
|
34
|
+
Use `data` when you need object shapes that are persisted, exchanged between services, or exposed through the Cloudly API.
|
|
46
35
|
|
|
47
36
|
```typescript
|
|
48
37
|
import { data } from '@serve.zone/interfaces';
|
|
@@ -78,16 +67,16 @@ const service: data.IService = {
|
|
|
78
67
|
|
|
79
68
|
Common data contracts include:
|
|
80
69
|
|
|
81
|
-
- `ICluster` and `IClusterNode` for cluster membership and provisioning
|
|
82
|
-
- `IService`, `IDeployment`, and `
|
|
83
|
-
- `
|
|
84
|
-
- `ISecretBundle` and `ISecretGroup` for secret ownership and
|
|
85
|
-
- `IUser`, `IIdentity`, and token-related
|
|
86
|
-
- `ICloudlyConfig`,
|
|
70
|
+
- `ICluster` and `IClusterNode` for cluster membership and provisioning state.
|
|
71
|
+
- `IService`, `IDeployment`, `IImage`, `IRegistryTarget`, and `IExternalRegistry` for workload delivery.
|
|
72
|
+
- `IDomain`, `IDnsEntry`, and traffic contracts for routing and DNS management.
|
|
73
|
+
- `ISecretBundle` and `ISecretGroup` for secret ownership and shared secret groups.
|
|
74
|
+
- `IUser`, `IIdentity`, and token-related contracts for authentication context.
|
|
75
|
+
- `ICloudlyConfig`, `ICloudlySettings`, status, server, bare-metal, BaseOS, backup, and task execution interfaces for control-plane state.
|
|
87
76
|
|
|
88
77
|
## TypedRequest Contracts
|
|
89
78
|
|
|
90
|
-
Use `requests` when registering handlers
|
|
79
|
+
Use `requests` when registering handlers with `@api.global/typedrequest` or when creating typed requests through a TypedSocket client.
|
|
91
80
|
|
|
92
81
|
```typescript
|
|
93
82
|
import { requests } from '@serve.zone/interfaces';
|
|
@@ -97,7 +86,7 @@ type GetClustersRequest = requests.cluster.IReq_Any_Cloudly_GetClusters;
|
|
|
97
86
|
const methodName: GetClustersRequest['method'] = 'getClusters';
|
|
98
87
|
```
|
|
99
88
|
|
|
100
|
-
Each request interface follows the same
|
|
89
|
+
Each request interface follows the same pattern:
|
|
101
90
|
|
|
102
91
|
```typescript
|
|
103
92
|
interface IExampleRequest {
|
|
@@ -107,10 +96,12 @@ interface IExampleRequest {
|
|
|
107
96
|
}
|
|
108
97
|
```
|
|
109
98
|
|
|
110
|
-
Request groups are exported by
|
|
99
|
+
Request groups are exported by product area:
|
|
111
100
|
|
|
112
101
|
- `requests.admin`
|
|
113
102
|
- `requests.baremetal`
|
|
103
|
+
- `requests.baseos`
|
|
104
|
+
- `requests.backup`
|
|
114
105
|
- `requests.certificate`
|
|
115
106
|
- `requests.cluster`
|
|
116
107
|
- `requests.config`
|
|
@@ -124,6 +115,7 @@ Request groups are exported by domain:
|
|
|
124
115
|
- `requests.log`
|
|
125
116
|
- `requests.network`
|
|
126
117
|
- `requests.node`
|
|
118
|
+
- `requests.platform`
|
|
127
119
|
- `requests.routing`
|
|
128
120
|
- `requests.secretbundle`
|
|
129
121
|
- `requests.secretgroup`
|
|
@@ -136,25 +128,25 @@ Request groups are exported by domain:
|
|
|
136
128
|
|
|
137
129
|
## Platform Contracts
|
|
138
130
|
|
|
139
|
-
Use `platform` for current
|
|
131
|
+
Use `platform` for current platform-service capabilities and application-facing platform RPCs.
|
|
140
132
|
|
|
141
133
|
```typescript
|
|
142
134
|
import { platform } from '@serve.zone/interfaces';
|
|
143
135
|
|
|
144
136
|
type SendEmailRequest = platform.email.IReq_SendEmail;
|
|
137
|
+
type PlatformBinding = platform.IPlatformBinding;
|
|
145
138
|
|
|
146
139
|
const sendEmailMethod: SendEmailRequest['method'] = 'sendEmail';
|
|
147
140
|
```
|
|
148
141
|
|
|
149
142
|
Available platform modules:
|
|
150
143
|
|
|
151
|
-
- `platform.email` for email
|
|
152
|
-
- `platform.sms` for SMS delivery
|
|
153
|
-
- `platform.pushnotification` for push-notification
|
|
144
|
+
- `platform.email` for transactional email, recipient registration, email status, and email stats.
|
|
145
|
+
- `platform.sms` for SMS delivery and verification-code delivery.
|
|
146
|
+
- `platform.pushnotification` for push-notification delivery.
|
|
154
147
|
- `platform.letter` for physical letter workflows.
|
|
155
|
-
- `platform.ai` for
|
|
156
|
-
- `platform.
|
|
157
|
-
- `platform.types` for shared platform service metadata.
|
|
148
|
+
- `platform.ai`, `platform.database`, `platform.objectstorage`, `platform.logging`, `platform.backup`, and `platform.sip` for infrastructure and application capabilities.
|
|
149
|
+
- `platform.types` plus root re-exports for shared capability, provider, binding, credential, and endpoint metadata.
|
|
158
150
|
|
|
159
151
|
## Legacy Platformservice Contracts
|
|
160
152
|
|
|
@@ -166,33 +158,34 @@ import { platformservice } from '@serve.zone/interfaces';
|
|
|
166
158
|
type LegacySendEmailRequest = platformservice.mta.IRequest_SendEmail;
|
|
167
159
|
```
|
|
168
160
|
|
|
169
|
-
New code should prefer
|
|
170
|
-
|
|
171
|
-
## Development
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
pnpm install
|
|
175
|
-
pnpm run build
|
|
176
|
-
pnpm test
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
This package is built with `tsbuild` and tested with `@git.zone/tstest`.
|
|
161
|
+
New code should prefer `platform` unless it must remain compatible with an active legacy consumer.
|
|
180
162
|
|
|
181
|
-
## Ownership
|
|
163
|
+
## Contract Ownership
|
|
182
164
|
|
|
183
|
-
Only ecosystem-wide public contracts belong in this package. Cloudly-internal implementation details, service-private DTOs, and temporary migration helpers should stay in
|
|
165
|
+
Only ecosystem-wide public contracts belong in this package. Cloudly-internal implementation details, service-private DTOs, and temporary migration helpers should stay in their owning service until they become real shared contracts.
|
|
184
166
|
|
|
185
167
|
Good candidates for this package:
|
|
186
168
|
|
|
187
169
|
- Types persisted or exchanged across multiple serve.zone services.
|
|
188
170
|
- TypedRequest contracts used by more than one project.
|
|
189
|
-
-
|
|
171
|
+
- SDK-facing interfaces that external consumers should be able to rely on.
|
|
190
172
|
|
|
191
173
|
Poor candidates for this package:
|
|
192
174
|
|
|
193
|
-
- Private implementation details of
|
|
194
|
-
-
|
|
195
|
-
-
|
|
175
|
+
- Private implementation details of one service.
|
|
176
|
+
- Runtime helpers or convenience wrappers.
|
|
177
|
+
- Compatibility aliases without an active consumer.
|
|
178
|
+
|
|
179
|
+
## Development
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
pnpm install
|
|
183
|
+
pnpm run build
|
|
184
|
+
pnpm test
|
|
185
|
+
pnpm run buildDocs
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
The package is authored as ESM TypeScript and built with `tsbuild tsfolders --allowimplicitany`.
|
|
196
189
|
|
|
197
190
|
## License and Legal Information
|
|
198
191
|
|
|
@@ -208,7 +201,7 @@ Use of these trademarks must comply with Task Venture Capital GmbH's Trademark G
|
|
|
208
201
|
|
|
209
202
|
### Company Information
|
|
210
203
|
|
|
211
|
-
Task Venture Capital GmbH
|
|
204
|
+
Task Venture Capital GmbH
|
|
212
205
|
Registered at District Court Bremen HRB 35230 HB, Germany
|
|
213
206
|
|
|
214
207
|
For any legal inquiries or further information, please contact us via email at hello@task.vc.
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export type TBackupStatus =
|
|
2
|
+
| 'pending'
|
|
3
|
+
| 'running'
|
|
4
|
+
| 'replicating'
|
|
5
|
+
| 'replicated'
|
|
6
|
+
| 'ready'
|
|
7
|
+
| 'failed'
|
|
8
|
+
| 'restoring'
|
|
9
|
+
| 'restored';
|
|
10
|
+
|
|
11
|
+
export type TBackupTrigger = 'manual' | 'scheduled';
|
|
12
|
+
|
|
13
|
+
export type TBackupResourceType = 'volume' | 'database' | 'objectstorage';
|
|
14
|
+
|
|
15
|
+
export interface IBackupSnapshotBase {
|
|
16
|
+
type: TBackupResourceType;
|
|
17
|
+
snapshotId: string;
|
|
18
|
+
snapshotName?: string;
|
|
19
|
+
originalSize: number;
|
|
20
|
+
storedSize: number;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
tags?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IBackupVolumeSnapshot extends IBackupSnapshotBase {
|
|
26
|
+
type: 'volume';
|
|
27
|
+
volumeName: string;
|
|
28
|
+
mountPath: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface IBackupDatabaseSnapshot extends IBackupSnapshotBase {
|
|
32
|
+
type: 'database';
|
|
33
|
+
resourceName: string;
|
|
34
|
+
databaseName: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IBackupObjectStorageSnapshot extends IBackupSnapshotBase {
|
|
38
|
+
type: 'objectstorage';
|
|
39
|
+
resourceName: string;
|
|
40
|
+
bucketName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type TBackupSnapshot =
|
|
44
|
+
| IBackupVolumeSnapshot
|
|
45
|
+
| IBackupDatabaseSnapshot
|
|
46
|
+
| IBackupObjectStorageSnapshot;
|
|
47
|
+
|
|
48
|
+
export type TBackupReplicationTargetType = 's3' | 'smb';
|
|
49
|
+
|
|
50
|
+
export interface IBackupArchiveObject {
|
|
51
|
+
path: string;
|
|
52
|
+
size: number;
|
|
53
|
+
sha256: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface IBackupArchiveManifest {
|
|
57
|
+
version: 1;
|
|
58
|
+
backupId: string;
|
|
59
|
+
createdAt: number;
|
|
60
|
+
objects: IBackupArchiveObject[];
|
|
61
|
+
totalSize: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface IBackupReplicationResult {
|
|
65
|
+
targetType: TBackupReplicationTargetType;
|
|
66
|
+
targetPath: string;
|
|
67
|
+
manifestPath: string;
|
|
68
|
+
manifestSha256: string;
|
|
69
|
+
objectCount: number;
|
|
70
|
+
totalSize: number;
|
|
71
|
+
completedAt: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface IBackupRestoreEvent {
|
|
75
|
+
restoredAt: number;
|
|
76
|
+
status: 'restored' | 'failed';
|
|
77
|
+
errorText?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface IBackupRecord {
|
|
81
|
+
id: string;
|
|
82
|
+
serviceId: string;
|
|
83
|
+
serviceName?: string;
|
|
84
|
+
clusterId?: string;
|
|
85
|
+
status: TBackupStatus;
|
|
86
|
+
trigger: TBackupTrigger;
|
|
87
|
+
snapshots: TBackupSnapshot[];
|
|
88
|
+
replication?: IBackupReplicationResult;
|
|
89
|
+
createdAt: number;
|
|
90
|
+
updatedAt: number;
|
|
91
|
+
completedAt?: number;
|
|
92
|
+
requestedBy?: string;
|
|
93
|
+
errorText?: string;
|
|
94
|
+
restoreHistory?: IBackupRestoreEvent[];
|
|
95
|
+
tags?: Record<string, string>;
|
|
96
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
export type TBaseOsRuntimeLevel = 'app-layer' | 'host-os' | 'target-state';
|
|
2
|
+
|
|
3
|
+
export type TBaseOsCloudlyConnectionStatus =
|
|
4
|
+
| 'not-configured'
|
|
5
|
+
| 'connecting'
|
|
6
|
+
| 'connected'
|
|
7
|
+
| 'failed';
|
|
8
|
+
|
|
9
|
+
export interface IBalenaDeviceState {
|
|
10
|
+
api_port?: number;
|
|
11
|
+
ip_address?: string;
|
|
12
|
+
mac_address?: string;
|
|
13
|
+
commit?: string;
|
|
14
|
+
status?: string;
|
|
15
|
+
os_version?: string;
|
|
16
|
+
supervisor_version?: string;
|
|
17
|
+
update_pending?: boolean;
|
|
18
|
+
update_downloaded?: boolean;
|
|
19
|
+
update_failed?: boolean;
|
|
20
|
+
download_progress?: number | null;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface IBalenaStateStatus {
|
|
25
|
+
status?: string;
|
|
26
|
+
appState?: string;
|
|
27
|
+
overallDownloadProgress?: number | null;
|
|
28
|
+
release?: string;
|
|
29
|
+
containers?: Array<Record<string, unknown>>;
|
|
30
|
+
images?: Array<Record<string, unknown>>;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IBaseOsRuntimeInfo {
|
|
35
|
+
runtime: 'baseos';
|
|
36
|
+
runtimeLevel: TBaseOsRuntimeLevel;
|
|
37
|
+
nodeId: string;
|
|
38
|
+
cloudlyUrl?: string;
|
|
39
|
+
cloudlyConnectionStatus: TBaseOsCloudlyConnectionStatus;
|
|
40
|
+
supervisorAvailable: boolean;
|
|
41
|
+
supervisorAddress?: string;
|
|
42
|
+
deviceState?: IBalenaDeviceState;
|
|
43
|
+
stateStatus?: IBalenaStateStatus;
|
|
44
|
+
checkedAt: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface IBaseOsDesiredState {
|
|
48
|
+
release?: string;
|
|
49
|
+
targetState?: Record<string, unknown>;
|
|
50
|
+
updatedAt?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface IBaseOsNode {
|
|
54
|
+
id: string;
|
|
55
|
+
data: {
|
|
56
|
+
runtimeInfo: IBaseOsRuntimeInfo;
|
|
57
|
+
desiredState?: IBaseOsDesiredState;
|
|
58
|
+
createdAt: number;
|
|
59
|
+
updatedAt: number;
|
|
60
|
+
lastHeartbeatAt?: number;
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type TBaseOsImageArchitecture = 'amd64' | 'arm64' | 'rpi';
|
|
65
|
+
export type TBaseOsImageKind = 'ubuntu-iso' | 'balena-raw';
|
|
66
|
+
export type TBaseOsImageSourcePreset =
|
|
67
|
+
| 'balena-generic-amd64'
|
|
68
|
+
| 'balena-generic-aarch64'
|
|
69
|
+
| 'balena-raspberrypi4-64';
|
|
70
|
+
|
|
71
|
+
export type TBaseOsImageBuildStatus = 'queued' | 'building' | 'ready' | 'failed' | 'cancelled';
|
|
72
|
+
|
|
73
|
+
export interface IBaseOsWifiConfig {
|
|
74
|
+
ssid: string;
|
|
75
|
+
password?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IBaseOsImageArtifact {
|
|
79
|
+
bucketName: string;
|
|
80
|
+
key: string;
|
|
81
|
+
filename: string;
|
|
82
|
+
contentType: string;
|
|
83
|
+
size: number;
|
|
84
|
+
sha256: string;
|
|
85
|
+
createdAt: number;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface IBaseOsImageBuild {
|
|
89
|
+
id: string;
|
|
90
|
+
data: {
|
|
91
|
+
status: TBaseOsImageBuildStatus;
|
|
92
|
+
architecture: TBaseOsImageArchitecture;
|
|
93
|
+
imageKind?: TBaseOsImageKind;
|
|
94
|
+
cloudlyUrl: string;
|
|
95
|
+
sourceImageUrl?: string;
|
|
96
|
+
sourceImagePreset?: TBaseOsImageSourcePreset;
|
|
97
|
+
balenaOsVersion?: string;
|
|
98
|
+
ubuntuVersion?: string;
|
|
99
|
+
hostname?: string;
|
|
100
|
+
wifiSsid?: string;
|
|
101
|
+
sshPublicKey?: string;
|
|
102
|
+
artifact?: IBaseOsImageArtifact;
|
|
103
|
+
errorText?: string;
|
|
104
|
+
logs: string[];
|
|
105
|
+
createdAt: number;
|
|
106
|
+
updatedAt: number;
|
|
107
|
+
startedAt?: number;
|
|
108
|
+
completedAt?: number;
|
|
109
|
+
expiresAt?: number;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface IBaseOsImageBuildRequest {
|
|
114
|
+
architecture: TBaseOsImageArchitecture;
|
|
115
|
+
imageKind?: TBaseOsImageKind;
|
|
116
|
+
cloudlyUrl?: string;
|
|
117
|
+
sourceImageUrl?: string;
|
|
118
|
+
sourceImagePreset?: TBaseOsImageSourcePreset;
|
|
119
|
+
balenaOsVersion?: string;
|
|
120
|
+
ubuntuVersion?: string;
|
|
121
|
+
hostname?: string;
|
|
122
|
+
wifi?: IBaseOsWifiConfig;
|
|
123
|
+
sshPublicKey?: string;
|
|
124
|
+
artifactRetentionMs?: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface IBaseOsImageDownloadUrl {
|
|
128
|
+
url: string;
|
|
129
|
+
expiresAt: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface IBaseOsRegisterResult {
|
|
133
|
+
nodeId?: string;
|
|
134
|
+
nodeToken?: string;
|
|
135
|
+
accepted: boolean;
|
|
136
|
+
message?: string;
|
|
137
|
+
desiredState?: IBaseOsDesiredState;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface IBaseOsHeartbeatResult {
|
|
141
|
+
accepted: boolean;
|
|
142
|
+
message?: string;
|
|
143
|
+
desiredState?: IBaseOsDesiredState;
|
|
144
|
+
}
|
package/ts/data/index.ts
CHANGED
|
@@ -12,6 +12,8 @@ export * from './registry.js';
|
|
|
12
12
|
export * from './secretbundle.js';
|
|
13
13
|
export * from './secretgroup.js';
|
|
14
14
|
export * from './baremetal.js';
|
|
15
|
+
export * from './baseos.js';
|
|
16
|
+
export * from './backup.js';
|
|
15
17
|
export * from './clusternode.js';
|
|
16
18
|
export * from './settings.js';
|
|
17
19
|
export * from './service.js';
|
package/ts/data/service.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import type { IServiceRessources } from './docker.js';
|
|
2
2
|
import type { IRegistryTarget } from './registry.js';
|
|
3
3
|
|
|
4
|
+
export interface IServiceVolume {
|
|
5
|
+
/** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Alias for name when a volume is shared intentionally across services. */
|
|
8
|
+
source?: string;
|
|
9
|
+
/** Container path where the volume is mounted. */
|
|
10
|
+
mountPath: string;
|
|
11
|
+
/** Docker volume driver. Defaults to corestore. */
|
|
12
|
+
driver?: 'corestore' | 'local' | string;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
/** Whether backup orchestration should snapshot this volume. Defaults to true. */
|
|
15
|
+
backup?: boolean;
|
|
16
|
+
/** Driver-specific options forwarded to Docker's VolumeDriver.Create request. */
|
|
17
|
+
options?: Record<string, string>;
|
|
18
|
+
}
|
|
19
|
+
|
|
4
20
|
export interface IService {
|
|
5
21
|
id: string;
|
|
6
22
|
data: {
|
|
@@ -55,6 +71,7 @@ export interface IService {
|
|
|
55
71
|
web: number;
|
|
56
72
|
custom?: { [domain: string]: string };
|
|
57
73
|
};
|
|
74
|
+
volumes?: IServiceVolume[];
|
|
58
75
|
resources?: IServiceRessources;
|
|
59
76
|
domains: {
|
|
60
77
|
/**
|
package/ts/data/settings.ts
CHANGED
|
@@ -8,6 +8,14 @@ export interface ICloudlySettings {
|
|
|
8
8
|
// Cloud Provider Tokens
|
|
9
9
|
hetznerToken?: string;
|
|
10
10
|
cloudflareToken?: string;
|
|
11
|
+
|
|
12
|
+
// BaseOS enrollment
|
|
13
|
+
baseosJoinToken?: string;
|
|
14
|
+
|
|
15
|
+
// CoreBuild worker used for image generation
|
|
16
|
+
corebuildWorkerUrl?: string;
|
|
17
|
+
corebuildWorkerToken?: string;
|
|
18
|
+
corebuildWorkersJson?: string;
|
|
11
19
|
|
|
12
20
|
// AWS Credentials
|
|
13
21
|
awsAccessKey?: string;
|
|
@@ -53,4 +61,4 @@ export interface ICloudlySettings {
|
|
|
53
61
|
*/
|
|
54
62
|
export type ICloudlySettingsMasked = {
|
|
55
63
|
[K in keyof ICloudlySettings]: string | undefined;
|
|
56
|
-
};
|
|
64
|
+
};
|