@serve.zone/interfaces 25.0.0 → 25.1.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 +12 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/requests/hostedapp.d.ts +80 -0
- package/dist_ts/requests/hostedapp.js +1 -1
- package/package.json +2 -2
- package/readme.md +2 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/requests/hostedapp.ts +104 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-08-07 - 25.1.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add shared hosted-app authorization RPC contracts (hostedapp)
|
|
8
|
+
- Export Cloudly's access configuration, role assignment, platform OIDC enablement, and authorization completion contracts with full `IIdentity` context.
|
|
9
|
+
|
|
10
|
+
### Maintenance
|
|
11
|
+
|
|
12
|
+
- refresh release and test tooling
|
|
13
|
+
- Update tstest to 4.0.0; retain mature pnpm and Node.js type versions under the configured minimum-release-age policy.
|
|
14
|
+
|
|
3
15
|
## 2026-08-01 - 25.0.0
|
|
4
16
|
|
|
5
17
|
### Breaking Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '25.
|
|
6
|
+
version: '25.1.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -1,6 +1,86 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as data from '../data/index.js';
|
|
2
3
|
import type { IIdentity, IIdentityCredential } from '../data/user.js';
|
|
3
4
|
import type { IHostedAppBootstrapAction, IHostedAppBootstrapActionRequest, IHostedAppLifecycleReport, IHostedAppLifecycleState, IHostedAppUpgradeState } from '../data/hostedapp.js';
|
|
5
|
+
export interface IReq_GetHostedAppAccessConfiguration extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetHostedAppAccessConfiguration> {
|
|
6
|
+
method: 'getHostedAppAccessConfiguration';
|
|
7
|
+
request: {
|
|
8
|
+
identity: data.IIdentity;
|
|
9
|
+
};
|
|
10
|
+
response: {
|
|
11
|
+
users: Array<{
|
|
12
|
+
userId: string;
|
|
13
|
+
username: string;
|
|
14
|
+
role: 'admin' | 'user';
|
|
15
|
+
platformOidcIssuer?: string;
|
|
16
|
+
}>;
|
|
17
|
+
assignments: data.IHostedAppRoleAssignment[];
|
|
18
|
+
apps: Array<{
|
|
19
|
+
serviceId: string;
|
|
20
|
+
appInstanceId: string;
|
|
21
|
+
displayName: string;
|
|
22
|
+
roles: data.IHostedAppRoleDefinition[];
|
|
23
|
+
platformOidcSupported: boolean;
|
|
24
|
+
platformOidcRegistration?: data.IHostedAppPlatformOidcRegistration;
|
|
25
|
+
}>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface IReq_SetHostedAppRoleAssignment extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SetHostedAppRoleAssignment> {
|
|
29
|
+
method: 'setHostedAppRoleAssignment';
|
|
30
|
+
request: {
|
|
31
|
+
identity: data.IIdentity;
|
|
32
|
+
userId: string;
|
|
33
|
+
appInstanceId: string;
|
|
34
|
+
roleIds: string[];
|
|
35
|
+
};
|
|
36
|
+
response: {
|
|
37
|
+
assignment: data.IHostedAppRoleAssignment | null;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface IReq_SetHostedAppPlatformOidc extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SetHostedAppPlatformOidc> {
|
|
41
|
+
method: 'setHostedAppPlatformOidc';
|
|
42
|
+
request: {
|
|
43
|
+
identity: data.IIdentity;
|
|
44
|
+
appInstanceId: string;
|
|
45
|
+
enabled: boolean;
|
|
46
|
+
};
|
|
47
|
+
response: {
|
|
48
|
+
registration: data.IHostedAppPlatformOidcRegistration;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface IReq_GetHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetHostedAppOidcAuthorization> {
|
|
52
|
+
method: 'getHostedAppOidcAuthorization';
|
|
53
|
+
request: {
|
|
54
|
+
identity: data.IIdentity;
|
|
55
|
+
requestId: string;
|
|
56
|
+
};
|
|
57
|
+
response: {
|
|
58
|
+
appInstanceId: string;
|
|
59
|
+
appName: string;
|
|
60
|
+
roleIds: string[];
|
|
61
|
+
expiresAt: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface IReq_CompleteHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CompleteHostedAppOidcAuthorization> {
|
|
65
|
+
method: 'completeHostedAppOidcAuthorization';
|
|
66
|
+
request: {
|
|
67
|
+
identity: data.IIdentity;
|
|
68
|
+
requestId: string;
|
|
69
|
+
};
|
|
70
|
+
response: {
|
|
71
|
+
redirectUrl: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface IReq_CancelHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_CancelHostedAppOidcAuthorization> {
|
|
75
|
+
method: 'cancelHostedAppOidcAuthorization';
|
|
76
|
+
request: {
|
|
77
|
+
identity: data.IIdentity;
|
|
78
|
+
requestId: string;
|
|
79
|
+
};
|
|
80
|
+
response: {
|
|
81
|
+
redirectUrl: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
4
84
|
export interface IReq_HostedApp_ReportLifecycleState extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_HostedApp_ReportLifecycleState> {
|
|
5
85
|
method: 'hostedAppReportLifecycleState';
|
|
6
86
|
request: {
|
|
@@ -36,4 +36,4 @@ export const validateHostedAppCompleteBootstrapActionRequest = (requestArg) => {
|
|
|
36
36
|
}
|
|
37
37
|
return errors;
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9zdGVkYXBwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvaG9zdGVkYXBwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBNkt6QyxNQUFNLENBQUMsTUFBTSwrQ0FBK0MsR0FBRyxDQUM3RCxVQUFtQixFQUNULEVBQUU7SUFDWixJQUFJLENBQUMsVUFBVSxJQUFJLE9BQU8sVUFBVSxLQUFLLFFBQVEsSUFBSSxLQUFLLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxFQUFFLENBQUM7UUFDL0UsT0FBTyxDQUFDLG1EQUFtRCxDQUFDLENBQUM7SUFDL0QsQ0FBQztJQUNEL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M7UUFDcEQsTUFBTSxDQUFDLElBQUksQ0FBQywyREFBMkQsQ0FBQyxDQUFDO0lBQzNFLENBQUM7SUFDRCxJQUFJLE9BQU8sQ0FBQyxvQkFBb0IsS0FBSyxPQUFPLEVBQUUsQ0FBQztRQUM3QyxNQUFNLENBQUMsSUFBSSxDQUFDLHlEQUF5RCxDQUFDLENBQUM7SUFDekUsQ0FBQztJQUNELElBQUksT0FBTyxDQUFDLE9BQU8sS0FBSyxTQUFTO1dBQzVCLENBQUMsT0FBTyxPQUFPLENBQUMsT0FBTyxLQUFLLFFBQVEsSUFBSSxPQUFPLENBQUMsT0FBTyxDQUFDLE1BQU0sR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDO1FBQzVFLE1BQU0sQ0FBQyxJQUFJLENBQUMseURBQXlELENBQUMsQ0FBQztJQUN6RSxDQUFDO0lBQ0QsT0FBTyxNQUFNLENBQUM7QUFDaEIsQ0FBQyxDQUFDIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/interfaces",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
|
|
6
6
|
"exports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@git.zone/tsbuild": "^4.4.2",
|
|
27
27
|
"@git.zone/tsdoc": "^2.1.1",
|
|
28
28
|
"@git.zone/tsrun": "^2.0.6",
|
|
29
|
-
"@git.zone/tstest": "^
|
|
29
|
+
"@git.zone/tstest": "^4.0.0",
|
|
30
30
|
"@types/node": "^26.1.1"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
package/readme.md
CHANGED
|
@@ -522,6 +522,8 @@ const config: appstore.IAppStoreVersionConfig = {
|
|
|
522
522
|
|
|
523
523
|
`data.IHostedAppRoleAssignment` binds a stable user subject to an immutable `appInstanceId`. That same app instance is the OIDC `client_id`, the ID-token `aud`, and the `servezone_app_instance_id` claim. Tokens include only the assigned roles for that audience; `preferred_username` is display metadata and must not be treated as identity authority.
|
|
524
524
|
|
|
525
|
+
`requests.hostedapp` exports the shared authorization RPCs used by a host dashboard. `getHostedAppAccessConfiguration` returns human user summaries, role assignments, and hosted-app summaries. `setHostedAppRoleAssignment` returns the assignment or `null` when it is removed, while `setHostedAppPlatformOidc` returns the current registration state. `getHostedAppOidcAuthorization` returns the app and role summary for a pending request; `completeHostedAppOidcAuthorization` and `cancelHostedAppOidcAuthorization` return the redirect URL. All six requests require a full `data.IIdentity`.
|
|
526
|
+
|
|
525
527
|
Validate untrusted manifests, registrations, and claims with:
|
|
526
528
|
|
|
527
529
|
- `data.validateHostedAppRoleDefinitions`
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/requests/hostedapp.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
+
import type * as data from '../data/index.js';
|
|
2
3
|
import type { IIdentity, IIdentityCredential } from '../data/user.js';
|
|
3
4
|
import type {
|
|
4
5
|
IHostedAppBootstrapAction,
|
|
@@ -8,6 +9,109 @@ import type {
|
|
|
8
9
|
IHostedAppUpgradeState,
|
|
9
10
|
} from '../data/hostedapp.js';
|
|
10
11
|
|
|
12
|
+
export interface IReq_GetHostedAppAccessConfiguration extends plugins.typedrequestInterfaces.implementsTR<
|
|
13
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
14
|
+
IReq_GetHostedAppAccessConfiguration
|
|
15
|
+
> {
|
|
16
|
+
method: 'getHostedAppAccessConfiguration';
|
|
17
|
+
request: {
|
|
18
|
+
identity: data.IIdentity;
|
|
19
|
+
};
|
|
20
|
+
response: {
|
|
21
|
+
users: Array<{
|
|
22
|
+
userId: string;
|
|
23
|
+
username: string;
|
|
24
|
+
role: 'admin' | 'user';
|
|
25
|
+
platformOidcIssuer?: string;
|
|
26
|
+
}>;
|
|
27
|
+
assignments: data.IHostedAppRoleAssignment[];
|
|
28
|
+
apps: Array<{
|
|
29
|
+
serviceId: string;
|
|
30
|
+
appInstanceId: string;
|
|
31
|
+
displayName: string;
|
|
32
|
+
roles: data.IHostedAppRoleDefinition[];
|
|
33
|
+
platformOidcSupported: boolean;
|
|
34
|
+
platformOidcRegistration?: data.IHostedAppPlatformOidcRegistration;
|
|
35
|
+
}>;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface IReq_SetHostedAppRoleAssignment extends plugins.typedrequestInterfaces.implementsTR<
|
|
40
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
41
|
+
IReq_SetHostedAppRoleAssignment
|
|
42
|
+
> {
|
|
43
|
+
method: 'setHostedAppRoleAssignment';
|
|
44
|
+
request: {
|
|
45
|
+
identity: data.IIdentity;
|
|
46
|
+
userId: string;
|
|
47
|
+
appInstanceId: string;
|
|
48
|
+
roleIds: string[];
|
|
49
|
+
};
|
|
50
|
+
response: {
|
|
51
|
+
assignment: data.IHostedAppRoleAssignment | null;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface IReq_SetHostedAppPlatformOidc extends plugins.typedrequestInterfaces.implementsTR<
|
|
56
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
57
|
+
IReq_SetHostedAppPlatformOidc
|
|
58
|
+
> {
|
|
59
|
+
method: 'setHostedAppPlatformOidc';
|
|
60
|
+
request: {
|
|
61
|
+
identity: data.IIdentity;
|
|
62
|
+
appInstanceId: string;
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
};
|
|
65
|
+
response: {
|
|
66
|
+
registration: data.IHostedAppPlatformOidcRegistration;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IReq_GetHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<
|
|
71
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
72
|
+
IReq_GetHostedAppOidcAuthorization
|
|
73
|
+
> {
|
|
74
|
+
method: 'getHostedAppOidcAuthorization';
|
|
75
|
+
request: {
|
|
76
|
+
identity: data.IIdentity;
|
|
77
|
+
requestId: string;
|
|
78
|
+
};
|
|
79
|
+
response: {
|
|
80
|
+
appInstanceId: string;
|
|
81
|
+
appName: string;
|
|
82
|
+
roleIds: string[];
|
|
83
|
+
expiresAt: number;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface IReq_CompleteHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<
|
|
88
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
89
|
+
IReq_CompleteHostedAppOidcAuthorization
|
|
90
|
+
> {
|
|
91
|
+
method: 'completeHostedAppOidcAuthorization';
|
|
92
|
+
request: {
|
|
93
|
+
identity: data.IIdentity;
|
|
94
|
+
requestId: string;
|
|
95
|
+
};
|
|
96
|
+
response: {
|
|
97
|
+
redirectUrl: string;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface IReq_CancelHostedAppOidcAuthorization extends plugins.typedrequestInterfaces.implementsTR<
|
|
102
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
103
|
+
IReq_CancelHostedAppOidcAuthorization
|
|
104
|
+
> {
|
|
105
|
+
method: 'cancelHostedAppOidcAuthorization';
|
|
106
|
+
request: {
|
|
107
|
+
identity: data.IIdentity;
|
|
108
|
+
requestId: string;
|
|
109
|
+
};
|
|
110
|
+
response: {
|
|
111
|
+
redirectUrl: string;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
11
115
|
export interface IReq_HostedApp_ReportLifecycleState extends plugins.typedrequestInterfaces.implementsTR<
|
|
12
116
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
13
117
|
IReq_HostedApp_ReportLifecycleState
|