@serve.zone/interfaces 7.3.0 → 7.4.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
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-06-09 - 7.4.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add gateway-specific identity contract for gateway requests (gateway)
|
|
8
|
+
- Introduces IGatewayIdentity with open gateway role and type fields.
|
|
9
|
+
- Updates gateway request identity payloads to use IGatewayIdentity while remaining structurally compatible with platform identities.
|
|
10
|
+
|
|
3
11
|
## 2026-06-09 - 7.3.0
|
|
4
12
|
|
|
5
13
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '7.
|
|
6
|
+
version: '7.4.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=
|
|
@@ -3,6 +3,19 @@ import type { TDnsRecordType } from './dns.js';
|
|
|
3
3
|
* Type of platform acting as a gateway client against a gateway (dcrouter).
|
|
4
4
|
*/
|
|
5
5
|
export type TGatewayClientType = 'onebox' | 'cloudly' | 'custom';
|
|
6
|
+
/**
|
|
7
|
+
* Identity attached to gateway requests. Gateways run their own user/auth
|
|
8
|
+
* domain (e.g. dcrouter operator accounts), so role/type stay open strings;
|
|
9
|
+
* platform identities (IIdentity) are structurally assignable to this shape.
|
|
10
|
+
*/
|
|
11
|
+
export interface IGatewayIdentity {
|
|
12
|
+
jwt: string;
|
|
13
|
+
userId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
expiresAt: number;
|
|
16
|
+
role?: string;
|
|
17
|
+
type?: string;
|
|
18
|
+
}
|
|
6
19
|
/**
|
|
7
20
|
* Role resolved for a gateway API token or identity.
|
|
8
21
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type { IGatewayCapabilities, IGatewayClientContext, IGatewayClientOwnership, IGatewayDnsRecord, IGatewayDomain, IGatewayRouteConfig, IGatewayRouteSyncResult } from '../data/gateway.js';
|
|
2
|
+
import type { IGatewayCapabilities, IGatewayClientContext, IGatewayClientOwnership, IGatewayDnsRecord, IGatewayDomain, IGatewayIdentity, IGatewayRouteConfig, IGatewayRouteSyncResult } from '../data/gateway.js';
|
|
4
3
|
/**
|
|
5
4
|
* Gateway client contracts: the machine-facing API a gateway (dcrouter)
|
|
6
5
|
* serves to gateway clients (Onebox, Cloudly/Coreflow).
|
|
@@ -14,7 +13,7 @@ import type { IGatewayCapabilities, IGatewayClientContext, IGatewayClientOwnersh
|
|
|
14
13
|
export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayCapabilities> {
|
|
15
14
|
method: 'getGatewayCapabilities';
|
|
16
15
|
request: {
|
|
17
|
-
identity?:
|
|
16
|
+
identity?: IGatewayIdentity;
|
|
18
17
|
apiToken?: string;
|
|
19
18
|
};
|
|
20
19
|
response: {
|
|
@@ -24,7 +23,7 @@ export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfa
|
|
|
24
23
|
export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientContext> {
|
|
25
24
|
method: 'getGatewayClientContext';
|
|
26
25
|
request: {
|
|
27
|
-
identity?:
|
|
26
|
+
identity?: IGatewayIdentity;
|
|
28
27
|
apiToken?: string;
|
|
29
28
|
};
|
|
30
29
|
response: {
|
|
@@ -35,7 +34,7 @@ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterf
|
|
|
35
34
|
export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientDomains> {
|
|
36
35
|
method: 'getGatewayClientDomains';
|
|
37
36
|
request: {
|
|
38
|
-
identity?:
|
|
37
|
+
identity?: IGatewayIdentity;
|
|
39
38
|
apiToken?: string;
|
|
40
39
|
gatewayClientId?: string;
|
|
41
40
|
};
|
|
@@ -46,7 +45,7 @@ export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterf
|
|
|
46
45
|
export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientDnsRecords> {
|
|
47
46
|
method: 'getGatewayClientDnsRecords';
|
|
48
47
|
request: {
|
|
49
|
-
identity?:
|
|
48
|
+
identity?: IGatewayIdentity;
|
|
50
49
|
apiToken?: string;
|
|
51
50
|
gatewayClientId?: string;
|
|
52
51
|
};
|
|
@@ -57,7 +56,7 @@ export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInt
|
|
|
57
56
|
export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SyncGatewayClientRoute> {
|
|
58
57
|
method: 'syncGatewayClientRoute';
|
|
59
58
|
request: {
|
|
60
|
-
identity?:
|
|
59
|
+
identity?: IGatewayIdentity;
|
|
61
60
|
apiToken?: string;
|
|
62
61
|
ownership: IGatewayClientOwnership;
|
|
63
62
|
route?: IGatewayRouteConfig;
|
|
@@ -69,7 +68,7 @@ export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfa
|
|
|
69
68
|
export interface IReq_ExportCertificate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ExportCertificate> {
|
|
70
69
|
method: 'exportCertificate';
|
|
71
70
|
request: {
|
|
72
|
-
identity?:
|
|
71
|
+
identity?: IGatewayIdentity;
|
|
73
72
|
apiToken?: string;
|
|
74
73
|
domain: string;
|
|
75
74
|
};
|
|
@@ -82,7 +81,7 @@ export interface IReq_ExportCertificate extends plugins.typedrequestInterfaces.i
|
|
|
82
81
|
export interface IReq_ImportCertificate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ImportCertificate> {
|
|
83
82
|
method: 'importCertificate';
|
|
84
83
|
request: {
|
|
85
|
-
identity?:
|
|
84
|
+
identity?: IGatewayIdentity;
|
|
86
85
|
apiToken?: string;
|
|
87
86
|
cert: plugins.tsclass.network.ICert;
|
|
88
87
|
};
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/gateway.ts
CHANGED
|
@@ -5,6 +5,20 @@ import type { TDnsRecordType } from './dns.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export type TGatewayClientType = 'onebox' | 'cloudly' | 'custom';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Identity attached to gateway requests. Gateways run their own user/auth
|
|
10
|
+
* domain (e.g. dcrouter operator accounts), so role/type stay open strings;
|
|
11
|
+
* platform identities (IIdentity) are structurally assignable to this shape.
|
|
12
|
+
*/
|
|
13
|
+
export interface IGatewayIdentity {
|
|
14
|
+
jwt: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
name: string;
|
|
17
|
+
expiresAt: number;
|
|
18
|
+
role?: string;
|
|
19
|
+
type?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
8
22
|
/**
|
|
9
23
|
* Role resolved for a gateway API token or identity.
|
|
10
24
|
*/
|
package/ts/requests/gateway.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as plugins from '../plugins.js';
|
|
2
|
-
import type { IIdentity } from '../data/user.js';
|
|
3
2
|
import type {
|
|
4
3
|
IGatewayCapabilities,
|
|
5
4
|
IGatewayClientContext,
|
|
6
5
|
IGatewayClientOwnership,
|
|
7
6
|
IGatewayDnsRecord,
|
|
8
7
|
IGatewayDomain,
|
|
8
|
+
IGatewayIdentity,
|
|
9
9
|
IGatewayRouteConfig,
|
|
10
10
|
IGatewayRouteSyncResult,
|
|
11
11
|
} from '../data/gateway.js';
|
|
@@ -27,7 +27,7 @@ export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfa
|
|
|
27
27
|
> {
|
|
28
28
|
method: 'getGatewayCapabilities';
|
|
29
29
|
request: {
|
|
30
|
-
identity?:
|
|
30
|
+
identity?: IGatewayIdentity;
|
|
31
31
|
apiToken?: string;
|
|
32
32
|
};
|
|
33
33
|
response: {
|
|
@@ -41,7 +41,7 @@ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterf
|
|
|
41
41
|
> {
|
|
42
42
|
method: 'getGatewayClientContext';
|
|
43
43
|
request: {
|
|
44
|
-
identity?:
|
|
44
|
+
identity?: IGatewayIdentity;
|
|
45
45
|
apiToken?: string;
|
|
46
46
|
};
|
|
47
47
|
response: {
|
|
@@ -56,7 +56,7 @@ export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterf
|
|
|
56
56
|
> {
|
|
57
57
|
method: 'getGatewayClientDomains';
|
|
58
58
|
request: {
|
|
59
|
-
identity?:
|
|
59
|
+
identity?: IGatewayIdentity;
|
|
60
60
|
apiToken?: string;
|
|
61
61
|
gatewayClientId?: string;
|
|
62
62
|
};
|
|
@@ -71,7 +71,7 @@ export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInt
|
|
|
71
71
|
> {
|
|
72
72
|
method: 'getGatewayClientDnsRecords';
|
|
73
73
|
request: {
|
|
74
|
-
identity?:
|
|
74
|
+
identity?: IGatewayIdentity;
|
|
75
75
|
apiToken?: string;
|
|
76
76
|
gatewayClientId?: string;
|
|
77
77
|
};
|
|
@@ -86,7 +86,7 @@ export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfa
|
|
|
86
86
|
> {
|
|
87
87
|
method: 'syncGatewayClientRoute';
|
|
88
88
|
request: {
|
|
89
|
-
identity?:
|
|
89
|
+
identity?: IGatewayIdentity;
|
|
90
90
|
apiToken?: string;
|
|
91
91
|
ownership: IGatewayClientOwnership;
|
|
92
92
|
route?: IGatewayRouteConfig;
|
|
@@ -102,7 +102,7 @@ export interface IReq_ExportCertificate extends plugins.typedrequestInterfaces.i
|
|
|
102
102
|
> {
|
|
103
103
|
method: 'exportCertificate';
|
|
104
104
|
request: {
|
|
105
|
-
identity?:
|
|
105
|
+
identity?: IGatewayIdentity;
|
|
106
106
|
apiToken?: string;
|
|
107
107
|
domain: string;
|
|
108
108
|
};
|
|
@@ -119,7 +119,7 @@ export interface IReq_ImportCertificate extends plugins.typedrequestInterfaces.i
|
|
|
119
119
|
> {
|
|
120
120
|
method: 'importCertificate';
|
|
121
121
|
request: {
|
|
122
|
-
identity?:
|
|
122
|
+
identity?: IGatewayIdentity;
|
|
123
123
|
apiToken?: string;
|
|
124
124
|
cert: plugins.tsclass.network.ICert;
|
|
125
125
|
};
|