@serve.zone/interfaces 6.0.1 → 6.2.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/changelog.md +25 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/hostedapp.d.ts +57 -0
- package/dist_ts/data/hostedapp.js +2 -0
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/data/service.d.ts +2 -0
- package/dist_ts/requests/hostedapp.d.ts +87 -0
- package/dist_ts/requests/hostedapp.js +2 -0
- package/dist_ts/requests/index.d.ts +3 -1
- package/dist_ts/requests/index.js +4 -2
- package/package.json +2 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/hostedapp.ts +87 -0
- package/ts/data/index.ts +1 -0
- package/ts/data/service.ts +2 -0
- package/ts/requests/hostedapp.ts +126 -0
- package/ts/requests/index.ts +3 -0
package/changelog.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
## Pending
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 2026-05-26 - 6.2.0
|
|
7
|
+
|
|
8
|
+
- add hosted app parent upgrade admin contracts (hostedapp)
|
|
9
|
+
- Adds admin-facing TypedRequest contracts for hosted apps to inspect and start parent-managed upgrades without exposing app-control tokens to browsers.
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
- add hosted app parent upgrade admin contracts (hostedapp)
|
|
14
|
+
- Adds getHostedAppParentUpgradeStatus and startHostedAppParentUpgrade TypedRequest interfaces.
|
|
15
|
+
- Includes identity-based requests, optional targetVersion support, hosted availability metadata, and upgrade state responses.
|
|
16
|
+
- Updates @types/node to ^25.9.1.
|
|
17
|
+
|
|
18
|
+
## 2026-05-26 - 6.1.0
|
|
19
|
+
|
|
20
|
+
- add generic hosted app lifecycle contracts (hostedapp)
|
|
21
|
+
- Adds service-scoped runtime identity, lifecycle reporting, bootstrap action, and managed upgrade request interfaces.
|
|
22
|
+
- Adds optional hosted app lifecycle state to service data for host runtimes such as Onebox and Cloudly.
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- add hosted app lifecycle contracts (hostedapp)
|
|
27
|
+
- Add hosted app runtime identity, lifecycle state, bootstrap action, and managed upgrade data contracts
|
|
28
|
+
- Expose typed request interfaces for lifecycle reporting, bootstrap actions, and managed upgrade operations
|
|
29
|
+
- Allow services to include optional hosted app lifecycle state
|
|
30
|
+
|
|
6
31
|
## 2026-05-26 - 6.0.1
|
|
7
32
|
|
|
8
33
|
- add App Store service upgrade contracts (appstore)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '6.0
|
|
6
|
+
version: '6.2.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type THostedAppHostType = 'onebox' | 'cloudly' | string;
|
|
2
|
+
export type THostedAppRuntimeStatus = 'starting' | 'running' | 'setupRequired' | 'degraded' | 'stopped' | 'unknown';
|
|
3
|
+
export type THostedAppBootstrapActionType = 'setupLink' | 'credentials' | 'message';
|
|
4
|
+
export type THostedAppBootstrapActionStatus = 'requested' | 'ready' | 'completed' | 'dismissed' | 'expired';
|
|
5
|
+
export type THostedAppUpgradeStatus = 'unknown' | 'upToDate' | 'available' | 'running' | 'success' | 'failed';
|
|
6
|
+
export interface IHostedAppRuntimeIdentity {
|
|
7
|
+
appInstanceId: string;
|
|
8
|
+
appControlToken: string;
|
|
9
|
+
hostType?: THostedAppHostType;
|
|
10
|
+
}
|
|
11
|
+
export interface IHostedAppBootstrapAction {
|
|
12
|
+
id: string;
|
|
13
|
+
type: THostedAppBootstrapActionType;
|
|
14
|
+
status: THostedAppBootstrapActionStatus;
|
|
15
|
+
label: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
username?: string;
|
|
18
|
+
password?: string;
|
|
19
|
+
message?: string;
|
|
20
|
+
expiresAt?: number;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
updatedAt: number;
|
|
23
|
+
completedAt?: number;
|
|
24
|
+
dismissedAt?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IHostedAppUpgradeState {
|
|
27
|
+
status: THostedAppUpgradeStatus;
|
|
28
|
+
appTemplateId?: string;
|
|
29
|
+
currentVersion?: string;
|
|
30
|
+
latestVersion?: string;
|
|
31
|
+
targetVersion?: string;
|
|
32
|
+
operationId?: string;
|
|
33
|
+
warnings?: string[];
|
|
34
|
+
blockers?: string[];
|
|
35
|
+
error?: string;
|
|
36
|
+
startedAt?: number;
|
|
37
|
+
updatedAt?: number;
|
|
38
|
+
completedAt?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface IHostedAppLifecycleReport {
|
|
41
|
+
appName?: string;
|
|
42
|
+
appVersion?: string;
|
|
43
|
+
publicUrl?: string;
|
|
44
|
+
runtimeStatus?: THostedAppRuntimeStatus;
|
|
45
|
+
statusMessage?: string;
|
|
46
|
+
capabilities?: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface IHostedAppLifecycleState extends IHostedAppLifecycleReport {
|
|
49
|
+
appInstanceId: string;
|
|
50
|
+
hostType: THostedAppHostType;
|
|
51
|
+
reportedAt?: number;
|
|
52
|
+
bootstrapAction?: IHostedAppBootstrapAction;
|
|
53
|
+
upgradeState?: IHostedAppUpgradeState;
|
|
54
|
+
}
|
|
55
|
+
export type IHostedAppBootstrapActionRequest = Omit<IHostedAppBootstrapAction, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'completedAt' | 'dismissedAt'> & {
|
|
56
|
+
id?: string;
|
|
57
|
+
};
|
package/dist_ts/data/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './docker.js';
|
|
|
7
7
|
export * from './domain.js';
|
|
8
8
|
export * from './event.js';
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
|
+
export * from './hostedapp.js';
|
|
10
11
|
export * from './image.js';
|
|
11
12
|
export * from './registry.js';
|
|
12
13
|
export * from './secretbundle.js';
|
package/dist_ts/data/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './docker.js';
|
|
|
7
7
|
export * from './domain.js';
|
|
8
8
|
export * from './event.js';
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
|
+
export * from './hostedapp.js';
|
|
10
11
|
export * from './image.js';
|
|
11
12
|
export * from './registry.js';
|
|
12
13
|
export * from './secretbundle.js';
|
|
@@ -22,4 +23,4 @@ export * from './taskexecution.js';
|
|
|
22
23
|
export * from './traffic.js';
|
|
23
24
|
export * from './user.js';
|
|
24
25
|
export * from './version.js';
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsY0FBYyxDQUFDIn0=
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IServiceRessources } from './docker.js';
|
|
2
2
|
import type { IRegistryTarget } from './registry.js';
|
|
3
3
|
import type { IAppStorePublishedPort } from '../appstore/index.js';
|
|
4
|
+
import type { IHostedAppLifecycleState } from './hostedapp.js';
|
|
4
5
|
export interface IServiceVolume {
|
|
5
6
|
/** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
|
|
6
7
|
name?: string;
|
|
@@ -28,6 +29,7 @@ export interface IService {
|
|
|
28
29
|
appTemplateId?: string;
|
|
29
30
|
appTemplateVersion?: string;
|
|
30
31
|
appStoreUpgradePolicy?: 'manual' | 'notify' | 'auto';
|
|
32
|
+
hostedAppLifecycle?: IHostedAppLifecycleState;
|
|
31
33
|
environment: {
|
|
32
34
|
[key: string]: string;
|
|
33
35
|
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type { IIdentity } from '../data/user.js';
|
|
3
|
+
import type { IHostedAppBootstrapAction, IHostedAppBootstrapActionRequest, IHostedAppLifecycleReport, IHostedAppLifecycleState, IHostedAppRuntimeIdentity, IHostedAppUpgradeState } from '../data/hostedapp.js';
|
|
4
|
+
export interface IReq_HostedApp_ReportLifecycleState extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_ReportLifecycleState> {
|
|
5
|
+
method: 'hostedAppReportLifecycleState';
|
|
6
|
+
request: {
|
|
7
|
+
identity: IHostedAppRuntimeIdentity;
|
|
8
|
+
report: IHostedAppLifecycleReport;
|
|
9
|
+
};
|
|
10
|
+
response: {
|
|
11
|
+
state: IHostedAppLifecycleState;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface IReq_HostedApp_GetLifecycleState extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_GetLifecycleState> {
|
|
15
|
+
method: 'hostedAppGetLifecycleState';
|
|
16
|
+
request: {
|
|
17
|
+
identity: IHostedAppRuntimeIdentity;
|
|
18
|
+
};
|
|
19
|
+
response: {
|
|
20
|
+
state: IHostedAppLifecycleState;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface IReq_HostedApp_RequestBootstrapAction extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_RequestBootstrapAction> {
|
|
24
|
+
method: 'hostedAppRequestBootstrapAction';
|
|
25
|
+
request: {
|
|
26
|
+
identity: IHostedAppRuntimeIdentity;
|
|
27
|
+
action: IHostedAppBootstrapActionRequest;
|
|
28
|
+
};
|
|
29
|
+
response: {
|
|
30
|
+
action: IHostedAppBootstrapAction;
|
|
31
|
+
state: IHostedAppLifecycleState;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface IReq_HostedApp_CompleteBootstrapAction extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_CompleteBootstrapAction> {
|
|
35
|
+
method: 'hostedAppCompleteBootstrapAction';
|
|
36
|
+
request: {
|
|
37
|
+
identity: IHostedAppRuntimeIdentity;
|
|
38
|
+
actionId?: string;
|
|
39
|
+
message?: string;
|
|
40
|
+
};
|
|
41
|
+
response: {
|
|
42
|
+
state: IHostedAppLifecycleState;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface IReq_HostedApp_StartManagedUpgrade extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_StartManagedUpgrade> {
|
|
46
|
+
method: 'hostedAppStartManagedUpgrade';
|
|
47
|
+
request: {
|
|
48
|
+
identity: IHostedAppRuntimeIdentity;
|
|
49
|
+
targetVersion?: string;
|
|
50
|
+
};
|
|
51
|
+
response: {
|
|
52
|
+
upgradeState: IHostedAppUpgradeState;
|
|
53
|
+
state: IHostedAppLifecycleState;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface IReq_HostedApp_GetManagedUpgradeStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_GetManagedUpgradeStatus> {
|
|
57
|
+
method: 'hostedAppGetManagedUpgradeStatus';
|
|
58
|
+
request: {
|
|
59
|
+
identity: IHostedAppRuntimeIdentity;
|
|
60
|
+
};
|
|
61
|
+
response: {
|
|
62
|
+
upgradeState: IHostedAppUpgradeState;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export interface IReq_Admin_GetHostedAppParentUpgradeStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_GetHostedAppParentUpgradeStatus> {
|
|
66
|
+
method: 'getHostedAppParentUpgradeStatus';
|
|
67
|
+
request: {
|
|
68
|
+
identity: IIdentity;
|
|
69
|
+
};
|
|
70
|
+
response: {
|
|
71
|
+
isHosted: boolean;
|
|
72
|
+
unavailableReason?: string;
|
|
73
|
+
upgradeState: IHostedAppUpgradeState;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
export interface IReq_Admin_StartHostedAppParentUpgrade extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_Admin_StartHostedAppParentUpgrade> {
|
|
77
|
+
method: 'startHostedAppParentUpgrade';
|
|
78
|
+
request: {
|
|
79
|
+
identity: IIdentity;
|
|
80
|
+
targetVersion?: string;
|
|
81
|
+
};
|
|
82
|
+
response: {
|
|
83
|
+
isHosted: boolean;
|
|
84
|
+
unavailableReason?: string;
|
|
85
|
+
upgradeState: IHostedAppUpgradeState;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9zdGVkYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvaG9zdGVkYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
|
|
@@ -10,6 +10,7 @@ import * as deploymentRequests from './deployment.js';
|
|
|
10
10
|
import * as dnsRequests from './dns.js';
|
|
11
11
|
import * as domainRequests from './domain.js';
|
|
12
12
|
import * as externalRegistryRequests from './externalregistry.js';
|
|
13
|
+
import * as hostedAppRequests from './hostedapp.js';
|
|
13
14
|
import * as identityRequests from './identity.js';
|
|
14
15
|
import * as imageRequests from './image.js';
|
|
15
16
|
import * as informRequests from './inform.js';
|
|
@@ -26,5 +27,6 @@ import * as settingsRequests from './settings.js';
|
|
|
26
27
|
import * as statusRequests from './status.js';
|
|
27
28
|
import * as taskRequests from './task.js';
|
|
28
29
|
import * as versionRequests from './version.js';
|
|
29
|
-
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, };
|
|
30
|
+
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, };
|
|
30
31
|
export * from './inform.js';
|
|
32
|
+
export * from './hostedapp.js';
|
|
@@ -11,6 +11,7 @@ import * as deploymentRequests from './deployment.js';
|
|
|
11
11
|
import * as dnsRequests from './dns.js';
|
|
12
12
|
import * as domainRequests from './domain.js';
|
|
13
13
|
import * as externalRegistryRequests from './externalregistry.js';
|
|
14
|
+
import * as hostedAppRequests from './hostedapp.js';
|
|
14
15
|
import * as identityRequests from './identity.js';
|
|
15
16
|
import * as imageRequests from './image.js';
|
|
16
17
|
import * as informRequests from './inform.js';
|
|
@@ -27,6 +28,7 @@ import * as settingsRequests from './settings.js';
|
|
|
27
28
|
import * as statusRequests from './status.js';
|
|
28
29
|
import * as taskRequests from './task.js';
|
|
29
30
|
import * as versionRequests from './version.js';
|
|
30
|
-
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, };
|
|
31
|
+
export { adminRequests as admin, appStoreRequests as appstore, baremetalRequests as baremetal, baseOsRequests as baseos, backupRequests as backup, certificateRequests as certificate, clusterRequests as cluster, configRequests as config, deploymentRequests as deployment, dnsRequests as dns, domainRequests as domain, externalRegistryRequests as externalRegistry, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, networkRequests as network, nodeRequests as node, platformRequests as platform, routingRequests as routing, secretBundleRequests as secretbundle, secretGroupRequests as secretgroup, serverRequests as server, serviceRequests as service, settingsRequests as settings, statusRequests as status, taskRequests as task, versionRequests as version, };
|
|
31
32
|
export * from './inform.js';
|
|
32
|
-
|
|
33
|
+
export * from './hostedapp.js';
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssYUFBYSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sZUFBZSxDQUF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SSxPQUFPLEVBQzFCLGdCQUFnQixJQUFJLFFBQVEsRUFDNUIsY0FBYyxJQUFJLE1BQU0sRUFDeEIsWUFBWSxJQUFJLElBQUksRUFDcEIsZUFBZSxJQUFJLE9BQU8sR0FDM0IsQ0FBQztBQUVGLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsZ0JBQWdCLENBQUMifQ==
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/interfaces",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
|
|
6
6
|
"exports": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@git.zone/tsdoc": "^2.0.6",
|
|
20
20
|
"@git.zone/tsrun": "^2.0.4",
|
|
21
21
|
"@git.zone/tstest": "^3.6.6",
|
|
22
|
-
"@types/node": "^25.
|
|
22
|
+
"@types/node": "^25.9.1"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"ts/**/*",
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export type THostedAppHostType = 'onebox' | 'cloudly' | string;
|
|
2
|
+
|
|
3
|
+
export type THostedAppRuntimeStatus =
|
|
4
|
+
| 'starting'
|
|
5
|
+
| 'running'
|
|
6
|
+
| 'setupRequired'
|
|
7
|
+
| 'degraded'
|
|
8
|
+
| 'stopped'
|
|
9
|
+
| 'unknown';
|
|
10
|
+
|
|
11
|
+
export type THostedAppBootstrapActionType = 'setupLink' | 'credentials' | 'message';
|
|
12
|
+
|
|
13
|
+
export type THostedAppBootstrapActionStatus =
|
|
14
|
+
| 'requested'
|
|
15
|
+
| 'ready'
|
|
16
|
+
| 'completed'
|
|
17
|
+
| 'dismissed'
|
|
18
|
+
| 'expired';
|
|
19
|
+
|
|
20
|
+
export type THostedAppUpgradeStatus =
|
|
21
|
+
| 'unknown'
|
|
22
|
+
| 'upToDate'
|
|
23
|
+
| 'available'
|
|
24
|
+
| 'running'
|
|
25
|
+
| 'success'
|
|
26
|
+
| 'failed';
|
|
27
|
+
|
|
28
|
+
export interface IHostedAppRuntimeIdentity {
|
|
29
|
+
appInstanceId: string;
|
|
30
|
+
appControlToken: string;
|
|
31
|
+
hostType?: THostedAppHostType;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface IHostedAppBootstrapAction {
|
|
35
|
+
id: string;
|
|
36
|
+
type: THostedAppBootstrapActionType;
|
|
37
|
+
status: THostedAppBootstrapActionStatus;
|
|
38
|
+
label: string;
|
|
39
|
+
url?: string;
|
|
40
|
+
username?: string;
|
|
41
|
+
password?: string;
|
|
42
|
+
message?: string;
|
|
43
|
+
expiresAt?: number;
|
|
44
|
+
createdAt: number;
|
|
45
|
+
updatedAt: number;
|
|
46
|
+
completedAt?: number;
|
|
47
|
+
dismissedAt?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface IHostedAppUpgradeState {
|
|
51
|
+
status: THostedAppUpgradeStatus;
|
|
52
|
+
appTemplateId?: string;
|
|
53
|
+
currentVersion?: string;
|
|
54
|
+
latestVersion?: string;
|
|
55
|
+
targetVersion?: string;
|
|
56
|
+
operationId?: string;
|
|
57
|
+
warnings?: string[];
|
|
58
|
+
blockers?: string[];
|
|
59
|
+
error?: string;
|
|
60
|
+
startedAt?: number;
|
|
61
|
+
updatedAt?: number;
|
|
62
|
+
completedAt?: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface IHostedAppLifecycleReport {
|
|
66
|
+
appName?: string;
|
|
67
|
+
appVersion?: string;
|
|
68
|
+
publicUrl?: string;
|
|
69
|
+
runtimeStatus?: THostedAppRuntimeStatus;
|
|
70
|
+
statusMessage?: string;
|
|
71
|
+
capabilities?: string[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface IHostedAppLifecycleState extends IHostedAppLifecycleReport {
|
|
75
|
+
appInstanceId: string;
|
|
76
|
+
hostType: THostedAppHostType;
|
|
77
|
+
reportedAt?: number;
|
|
78
|
+
bootstrapAction?: IHostedAppBootstrapAction;
|
|
79
|
+
upgradeState?: IHostedAppUpgradeState;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type IHostedAppBootstrapActionRequest = Omit<
|
|
83
|
+
IHostedAppBootstrapAction,
|
|
84
|
+
'id' | 'status' | 'createdAt' | 'updatedAt' | 'completedAt' | 'dismissedAt'
|
|
85
|
+
> & {
|
|
86
|
+
id?: string;
|
|
87
|
+
};
|
package/ts/data/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './docker.js';
|
|
|
7
7
|
export * from './domain.js';
|
|
8
8
|
export * from './event.js';
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
|
+
export * from './hostedapp.js';
|
|
10
11
|
export * from './image.js';
|
|
11
12
|
export * from './registry.js';
|
|
12
13
|
export * from './secretbundle.js';
|
package/ts/data/service.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IServiceRessources } from './docker.js';
|
|
2
2
|
import type { IRegistryTarget } from './registry.js';
|
|
3
3
|
import type { IAppStorePublishedPort } from '../appstore/index.js';
|
|
4
|
+
import type { IHostedAppLifecycleState } from './hostedapp.js';
|
|
4
5
|
|
|
5
6
|
export interface IServiceVolume {
|
|
6
7
|
/** Stable Docker volume name. If omitted, Coreflow derives one from service id and mount path. */
|
|
@@ -30,6 +31,7 @@ export interface IService {
|
|
|
30
31
|
appTemplateId?: string;
|
|
31
32
|
appTemplateVersion?: string;
|
|
32
33
|
appStoreUpgradePolicy?: 'manual' | 'notify' | 'auto';
|
|
34
|
+
hostedAppLifecycle?: IHostedAppLifecycleState;
|
|
33
35
|
environment: { [key: string]: string };
|
|
34
36
|
/**
|
|
35
37
|
* the main secret bundle id, exclusive to the service
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type { IIdentity } from '../data/user.js';
|
|
3
|
+
import type {
|
|
4
|
+
IHostedAppBootstrapAction,
|
|
5
|
+
IHostedAppBootstrapActionRequest,
|
|
6
|
+
IHostedAppLifecycleReport,
|
|
7
|
+
IHostedAppLifecycleState,
|
|
8
|
+
IHostedAppRuntimeIdentity,
|
|
9
|
+
IHostedAppUpgradeState,
|
|
10
|
+
} from '../data/hostedapp.js';
|
|
11
|
+
|
|
12
|
+
export interface IReq_HostedApp_ReportLifecycleState extends plugins.typedrequestInterfaces.implementsTR<
|
|
13
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
14
|
+
IReq_HostedApp_ReportLifecycleState
|
|
15
|
+
> {
|
|
16
|
+
method: 'hostedAppReportLifecycleState';
|
|
17
|
+
request: {
|
|
18
|
+
identity: IHostedAppRuntimeIdentity;
|
|
19
|
+
report: IHostedAppLifecycleReport;
|
|
20
|
+
};
|
|
21
|
+
response: {
|
|
22
|
+
state: IHostedAppLifecycleState;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface IReq_HostedApp_GetLifecycleState extends plugins.typedrequestInterfaces.implementsTR<
|
|
27
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
28
|
+
IReq_HostedApp_GetLifecycleState
|
|
29
|
+
> {
|
|
30
|
+
method: 'hostedAppGetLifecycleState';
|
|
31
|
+
request: {
|
|
32
|
+
identity: IHostedAppRuntimeIdentity;
|
|
33
|
+
};
|
|
34
|
+
response: {
|
|
35
|
+
state: IHostedAppLifecycleState;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IReq_HostedApp_RequestBootstrapAction extends plugins.typedrequestInterfaces.implementsTR<
|
|
40
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
41
|
+
IReq_HostedApp_RequestBootstrapAction
|
|
42
|
+
> {
|
|
43
|
+
method: 'hostedAppRequestBootstrapAction';
|
|
44
|
+
request: {
|
|
45
|
+
identity: IHostedAppRuntimeIdentity;
|
|
46
|
+
action: IHostedAppBootstrapActionRequest;
|
|
47
|
+
};
|
|
48
|
+
response: {
|
|
49
|
+
action: IHostedAppBootstrapAction;
|
|
50
|
+
state: IHostedAppLifecycleState;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IReq_HostedApp_CompleteBootstrapAction extends plugins.typedrequestInterfaces.implementsTR<
|
|
55
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
56
|
+
IReq_HostedApp_CompleteBootstrapAction
|
|
57
|
+
> {
|
|
58
|
+
method: 'hostedAppCompleteBootstrapAction';
|
|
59
|
+
request: {
|
|
60
|
+
identity: IHostedAppRuntimeIdentity;
|
|
61
|
+
actionId?: string;
|
|
62
|
+
message?: string;
|
|
63
|
+
};
|
|
64
|
+
response: {
|
|
65
|
+
state: IHostedAppLifecycleState;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface IReq_HostedApp_StartManagedUpgrade extends plugins.typedrequestInterfaces.implementsTR<
|
|
70
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
71
|
+
IReq_HostedApp_StartManagedUpgrade
|
|
72
|
+
> {
|
|
73
|
+
method: 'hostedAppStartManagedUpgrade';
|
|
74
|
+
request: {
|
|
75
|
+
identity: IHostedAppRuntimeIdentity;
|
|
76
|
+
targetVersion?: string;
|
|
77
|
+
};
|
|
78
|
+
response: {
|
|
79
|
+
upgradeState: IHostedAppUpgradeState;
|
|
80
|
+
state: IHostedAppLifecycleState;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface IReq_HostedApp_GetManagedUpgradeStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
85
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
86
|
+
IReq_HostedApp_GetManagedUpgradeStatus
|
|
87
|
+
> {
|
|
88
|
+
method: 'hostedAppGetManagedUpgradeStatus';
|
|
89
|
+
request: {
|
|
90
|
+
identity: IHostedAppRuntimeIdentity;
|
|
91
|
+
};
|
|
92
|
+
response: {
|
|
93
|
+
upgradeState: IHostedAppUpgradeState;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface IReq_Admin_GetHostedAppParentUpgradeStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
98
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
99
|
+
IReq_Admin_GetHostedAppParentUpgradeStatus
|
|
100
|
+
> {
|
|
101
|
+
method: 'getHostedAppParentUpgradeStatus';
|
|
102
|
+
request: {
|
|
103
|
+
identity: IIdentity;
|
|
104
|
+
};
|
|
105
|
+
response: {
|
|
106
|
+
isHosted: boolean;
|
|
107
|
+
unavailableReason?: string;
|
|
108
|
+
upgradeState: IHostedAppUpgradeState;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface IReq_Admin_StartHostedAppParentUpgrade extends plugins.typedrequestInterfaces.implementsTR<
|
|
113
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
114
|
+
IReq_Admin_StartHostedAppParentUpgrade
|
|
115
|
+
> {
|
|
116
|
+
method: 'startHostedAppParentUpgrade';
|
|
117
|
+
request: {
|
|
118
|
+
identity: IIdentity;
|
|
119
|
+
targetVersion?: string;
|
|
120
|
+
};
|
|
121
|
+
response: {
|
|
122
|
+
isHosted: boolean;
|
|
123
|
+
unavailableReason?: string;
|
|
124
|
+
upgradeState: IHostedAppUpgradeState;
|
|
125
|
+
};
|
|
126
|
+
}
|
package/ts/requests/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import * as deploymentRequests from './deployment.js';
|
|
|
12
12
|
import * as dnsRequests from './dns.js';
|
|
13
13
|
import * as domainRequests from './domain.js';
|
|
14
14
|
import * as externalRegistryRequests from './externalregistry.js';
|
|
15
|
+
import * as hostedAppRequests from './hostedapp.js';
|
|
15
16
|
import * as identityRequests from './identity.js';
|
|
16
17
|
import * as imageRequests from './image.js';
|
|
17
18
|
import * as informRequests from './inform.js';
|
|
@@ -42,6 +43,7 @@ export {
|
|
|
42
43
|
dnsRequests as dns,
|
|
43
44
|
domainRequests as domain,
|
|
44
45
|
externalRegistryRequests as externalRegistry,
|
|
46
|
+
hostedAppRequests as hostedapp,
|
|
45
47
|
identityRequests as identity,
|
|
46
48
|
imageRequests as image,
|
|
47
49
|
informRequests as inform,
|
|
@@ -61,3 +63,4 @@ export {
|
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
export * from './inform.js';
|
|
66
|
+
export * from './hostedapp.js';
|