@serve.zone/interfaces 7.2.0 → 7.3.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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-06-09 - 7.3.0
4
+
5
+ ### Features
6
+
7
+ - add gateway client data models and request contracts (gateway)
8
+ - Add gateway capability, domain, DNS record, route, and token context interfaces
9
+ - Add TypedRequest contracts for gateway capabilities, client context, domains, DNS records, route sync, and certificate import/export
10
+ - Export gateway data and request modules through existing barrels
11
+
3
12
  ## 2026-06-09 - 7.2.0
4
13
 
5
14
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.2.0',
6
+ version: '7.3.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,219 @@
1
+ import type { TDnsRecordType } from './dns.js';
2
+ /**
3
+ * Type of platform acting as a gateway client against a gateway (dcrouter).
4
+ */
5
+ export type TGatewayClientType = 'onebox' | 'cloudly' | 'custom';
6
+ /**
7
+ * Role resolved for a gateway API token or identity.
8
+ */
9
+ export type TGatewayTokenRole = 'admin' | 'gatewayClient' | 'operator';
10
+ /**
11
+ * Feature surface a gateway exposes to connected gateway clients.
12
+ */
13
+ export interface IGatewayCapabilities {
14
+ routes: {
15
+ read: boolean;
16
+ write: boolean;
17
+ idempotentSync: boolean;
18
+ };
19
+ domains: {
20
+ read: boolean;
21
+ write: boolean;
22
+ };
23
+ certificates: {
24
+ read: boolean;
25
+ export: boolean;
26
+ forceRenew: boolean;
27
+ };
28
+ email: {
29
+ domains: boolean;
30
+ inbound: boolean;
31
+ outbound: boolean;
32
+ };
33
+ remoteIngress: {
34
+ enabled: boolean;
35
+ };
36
+ dns: {
37
+ authoritative: boolean;
38
+ providerManaged: boolean;
39
+ };
40
+ http3: {
41
+ enabled: boolean;
42
+ };
43
+ }
44
+ /**
45
+ * Capability flags granted to a gateway client token.
46
+ */
47
+ export interface IGatewayTokenCapabilities {
48
+ readDomains?: boolean;
49
+ readDnsRecords?: boolean;
50
+ syncRoutes?: boolean;
51
+ syncDnsRecords?: boolean;
52
+ requestCertificates?: boolean;
53
+ }
54
+ /**
55
+ * A host/ports combination a gateway client is allowed to route traffic to.
56
+ */
57
+ export interface IGatewayRouteTargetAllowance {
58
+ host: string;
59
+ ports: number[];
60
+ }
61
+ /**
62
+ * Resolved auth context for a gateway client token, as reported by the gateway.
63
+ * Scopes are gateway-defined strings; the closed scope list lives in the gateway.
64
+ */
65
+ export interface IGatewayClientContext {
66
+ role: TGatewayTokenRole;
67
+ scopes: string[];
68
+ gatewayClient?: {
69
+ type: TGatewayClientType;
70
+ id: string;
71
+ };
72
+ hostnamePatterns: string[];
73
+ allowedRouteTargets: IGatewayRouteTargetAllowance[];
74
+ capabilities: IGatewayTokenCapabilities;
75
+ }
76
+ /**
77
+ * Where a gateway-managed domain is sourced from.
78
+ *
79
+ * - 'dcrouter' → the gateway itself is the authoritative DNS server.
80
+ * - 'provider' → the domain is managed through an external DNS provider.
81
+ */
82
+ export type TGatewayDomainSource = 'dcrouter' | 'provider';
83
+ /**
84
+ * What a gateway client may do with a gateway-exposed domain.
85
+ */
86
+ export interface IGatewayDomainCapabilities {
87
+ canCreateSubdomains: boolean;
88
+ canManageDnsRecords: boolean;
89
+ canIssueCertificates: boolean;
90
+ canHostEmail: boolean;
91
+ }
92
+ /**
93
+ * A domain a gateway exposes to gateway clients for app hosting.
94
+ */
95
+ export interface IGatewayDomain {
96
+ id: string;
97
+ /** Fully qualified domain name (e.g. 'example.com'). */
98
+ name: string;
99
+ source: TGatewayDomainSource;
100
+ /** Gateway-internal DNS provider id — only set when source === 'provider'. */
101
+ providerId?: string;
102
+ /** True when the gateway is the authoritative DNS server for this domain. */
103
+ authoritative: boolean;
104
+ nameservers?: string[];
105
+ /** Provider's internal zone identifier — only set when source === 'provider'. */
106
+ externalZoneId?: string;
107
+ /** Last time records were synced from the provider — only set when source === 'provider'. */
108
+ lastSyncedAt?: number;
109
+ description?: string;
110
+ createdAt: number;
111
+ updatedAt: number;
112
+ createdBy: string;
113
+ capabilities: IGatewayDomainCapabilities;
114
+ /** Number of gateway-client services currently using this domain. */
115
+ serviceCount?: number;
116
+ /** Gateway UI path for managing this domain. */
117
+ managePath?: string;
118
+ }
119
+ /**
120
+ * DNS record view for gateway-client app hostnames.
121
+ * Records with status 'missing' describe expected-but-absent records and
122
+ * use type 'MISSING' placeholders where applicable.
123
+ */
124
+ export interface IGatewayDnsRecord {
125
+ id: string;
126
+ /** Id of the parent gateway domain. */
127
+ domainId: string;
128
+ domainName?: string;
129
+ /** Fully qualified record name (e.g. 'www.example.com'). */
130
+ name: string;
131
+ type: TDnsRecordType | 'MISSING';
132
+ value: string;
133
+ /** TTL in seconds. */
134
+ ttl: number;
135
+ /** Provider-specific: whether the record is proxied (e.g. Cloudflare). */
136
+ proxied?: boolean;
137
+ source: 'local' | 'synced';
138
+ /** Provider's internal record id — only set for provider records. */
139
+ providerRecordId?: string;
140
+ createdAt: number;
141
+ updatedAt: number;
142
+ createdBy: string;
143
+ status: 'active' | 'missing';
144
+ gatewayClientType: TGatewayClientType;
145
+ gatewayClientId: string;
146
+ /** App identifier within the owning gateway client platform. */
147
+ appId: string;
148
+ hostname: string;
149
+ routeId?: string;
150
+ serviceName?: string;
151
+ /** Gateway UI path for managing this record. */
152
+ managePath?: string;
153
+ }
154
+ /**
155
+ * Ownership of a gateway-client-synced route: which platform, which platform
156
+ * instance, and which app/hostname the route belongs to.
157
+ */
158
+ export interface IGatewayClientOwnership {
159
+ gatewayClientType?: TGatewayClientType;
160
+ gatewayClientId?: string;
161
+ /** App identifier within the owning gateway client platform. */
162
+ appId: string;
163
+ hostname: string;
164
+ }
165
+ /**
166
+ * A single forward target of a gateway route.
167
+ */
168
+ export interface IGatewayRouteTarget {
169
+ host: string;
170
+ port: number;
171
+ }
172
+ /**
173
+ * Match condition for a gateway route.
174
+ */
175
+ export interface IGatewayRouteMatch {
176
+ ports: number[];
177
+ domains: string[];
178
+ path?: string;
179
+ }
180
+ /**
181
+ * TLS handling for a gateway route. 'terminate' with certificate 'auto'
182
+ * requests gateway-managed ACME certificates.
183
+ */
184
+ export interface IGatewayRouteTls {
185
+ mode: 'terminate' | 'passthrough' | 'terminate-and-reencrypt';
186
+ certificate?: 'auto';
187
+ }
188
+ /**
189
+ * Forward action of a gateway route.
190
+ */
191
+ export interface IGatewayRouteAction {
192
+ type: 'forward';
193
+ targets: IGatewayRouteTarget[];
194
+ tls?: IGatewayRouteTls;
195
+ websocket?: {
196
+ enabled: boolean;
197
+ };
198
+ }
199
+ /**
200
+ * Platform-neutral desired state for one gateway route.
201
+ *
202
+ * This is deliberately narrower than the gateway's internal route config:
203
+ * control planes express route intent with this shape and the gateway maps
204
+ * it onto its own proxy configuration.
205
+ */
206
+ export interface IGatewayRouteConfig {
207
+ name: string;
208
+ match: IGatewayRouteMatch;
209
+ action: IGatewayRouteAction;
210
+ }
211
+ /**
212
+ * Result of an idempotent gateway route sync.
213
+ */
214
+ export interface IGatewayRouteSyncResult {
215
+ success: boolean;
216
+ action?: 'created' | 'updated' | 'deleted' | 'unchanged';
217
+ routeId?: string;
218
+ message?: string;
219
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F0ZXdheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvZ2F0ZXdheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -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 './gateway.js';
10
11
  export * from './hostedapp.js';
11
12
  export * from './image.js';
12
13
  export * from './mail.js';
@@ -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 './gateway.js';
10
11
  export * from './hostedapp.js';
11
12
  export * from './image.js';
12
13
  export * from './mail.js';
@@ -24,4 +25,4 @@ export * from './taskexecution.js';
24
25
  export * from './traffic.js';
25
26
  export * from './user.js';
26
27
  export * from './version.js';
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxZQUFZLENBQUM7QUF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FrQixDQUFDO0FBQ2pDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsY0FBYyxDQUFDIn0=
@@ -0,0 +1,93 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type { IIdentity } from '../data/user.js';
3
+ import type { IGatewayCapabilities, IGatewayClientContext, IGatewayClientOwnership, IGatewayDnsRecord, IGatewayDomain, IGatewayRouteConfig, IGatewayRouteSyncResult } from '../data/gateway.js';
4
+ /**
5
+ * Gateway client contracts: the machine-facing API a gateway (dcrouter)
6
+ * serves to gateway clients (Onebox, Cloudly/Coreflow).
7
+ *
8
+ * Wire note: these methods are already deployed; auth fields stay top-level
9
+ * (identity?/apiToken?) for wire compatibility, unlike the nested auth
10
+ * envelope used by the newer mail contracts. The method strings
11
+ * 'exportCertificate' and 'importCertificate' likewise keep their deployed
12
+ * names and deliberately lack a gateway prefix.
13
+ */
14
+ export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayCapabilities> {
15
+ method: 'getGatewayCapabilities';
16
+ request: {
17
+ identity?: IIdentity;
18
+ apiToken?: string;
19
+ };
20
+ response: {
21
+ capabilities: IGatewayCapabilities;
22
+ };
23
+ }
24
+ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientContext> {
25
+ method: 'getGatewayClientContext';
26
+ request: {
27
+ identity?: IIdentity;
28
+ apiToken?: string;
29
+ };
30
+ response: {
31
+ context: IGatewayClientContext;
32
+ capabilities: IGatewayCapabilities;
33
+ };
34
+ }
35
+ export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientDomains> {
36
+ method: 'getGatewayClientDomains';
37
+ request: {
38
+ identity?: IIdentity;
39
+ apiToken?: string;
40
+ gatewayClientId?: string;
41
+ };
42
+ response: {
43
+ domains: IGatewayDomain[];
44
+ };
45
+ }
46
+ export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetGatewayClientDnsRecords> {
47
+ method: 'getGatewayClientDnsRecords';
48
+ request: {
49
+ identity?: IIdentity;
50
+ apiToken?: string;
51
+ gatewayClientId?: string;
52
+ };
53
+ response: {
54
+ records: IGatewayDnsRecord[];
55
+ };
56
+ }
57
+ export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SyncGatewayClientRoute> {
58
+ method: 'syncGatewayClientRoute';
59
+ request: {
60
+ identity?: IIdentity;
61
+ apiToken?: string;
62
+ ownership: IGatewayClientOwnership;
63
+ route?: IGatewayRouteConfig;
64
+ enabled?: boolean;
65
+ delete?: boolean;
66
+ };
67
+ response: IGatewayRouteSyncResult;
68
+ }
69
+ export interface IReq_ExportCertificate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ExportCertificate> {
70
+ method: 'exportCertificate';
71
+ request: {
72
+ identity?: IIdentity;
73
+ apiToken?: string;
74
+ domain: string;
75
+ };
76
+ response: {
77
+ success: boolean;
78
+ cert?: plugins.tsclass.network.ICert;
79
+ message?: string;
80
+ };
81
+ }
82
+ export interface IReq_ImportCertificate extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ImportCertificate> {
83
+ method: 'importCertificate';
84
+ request: {
85
+ identity?: IIdentity;
86
+ apiToken?: string;
87
+ cert: plugins.tsclass.network.ICert;
88
+ };
89
+ response: {
90
+ success: boolean;
91
+ message?: string;
92
+ };
93
+ }
@@ -0,0 +1,2 @@
1
+ import * as plugins from '../plugins.js';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F0ZXdheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3RzL2dhdGV3YXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
@@ -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 gatewayRequests from './gateway.js';
13
14
  import * as hostedAppRequests from './hostedapp.js';
14
15
  import * as identityRequests from './identity.js';
15
16
  import * as imageRequests from './image.js';
@@ -28,7 +29,7 @@ import * as settingsRequests from './settings.js';
28
29
  import * as statusRequests from './status.js';
29
30
  import * as taskRequests from './task.js';
30
31
  import * as versionRequests from './version.js';
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, mailRequests as mail, 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, };
32
+ 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, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, 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, };
32
33
  export * from './inform.js';
33
34
  export * from './hostedapp.js';
34
35
  export * from './mail.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 gatewayRequests from './gateway.js';
14
15
  import * as hostedAppRequests from './hostedapp.js';
15
16
  import * as identityRequests from './identity.js';
16
17
  import * as imageRequests from './image.js';
@@ -29,8 +30,8 @@ import * as settingsRequests from './settings.js';
29
30
  import * as statusRequests from './status.js';
30
31
  import * as taskRequests from './task.js';
31
32
  import * as versionRequests from './version.js';
32
- 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, mailRequests as mail, 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, };
33
+ 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, gatewayRequests as gateway, hostedAppRequests as hostedapp, identityRequests as identity, imageRequests as image, informRequests as inform, logRequests as log, mailRequests as mail, 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, };
33
34
  export * from './inform.js';
34
35
  export * from './hostedapp.js';
35
36
  export * from './mail.js';
36
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssYUFBYSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxnQkFBZ0IsQ0FBQztBQUNwRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGtCQUFrQixNQUFNLGlCQUFpQixDQUFDO0FBQ3RELE9BQU8sS0FBSyxXQUFXLE1BQU0sVUFBVSxDQUFDO0FBQ3hDLE9BQU8sS0FBSyxjQUFjLE1BQU0sYUFBYSxDQ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FLLEVBQ3RCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLFdBQVcsSUFBSSxHQUFHLEVBQ2xCLFlBQVksSUFBSSxJQUFJLEVBQ3BCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLFlBQVksSUFBSSxJQUFJLEVBQ3BCLGdCQUFnQixJQUFJLFFBQVEsRUFDNUIsZUFBZSxJQUFJLE9BQU8sRUFDMUIsb0JBQW9CLElBQUksWUFBWSxFQUNwQyxtQkFBbUIsSUFBSSxXQUFXLEVBQ2xDLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGdCQUFnQixJQUFJLFFBQVEsRUFDNUIsY0FBYyxJQUFJLE1BQU0sRUFDeEIsWUFBWSxJQUFJLElBQUksRUFDcEIsZUFBZSxJQUFJLE9BQU8sR0FDM0IsQ0FBQztBQUVGLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxXQUFXLENBQUMifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serve.zone/interfaces",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '7.2.0',
6
+ version: '7.3.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
@@ -0,0 +1,236 @@
1
+ import type { TDnsRecordType } from './dns.js';
2
+
3
+ /**
4
+ * Type of platform acting as a gateway client against a gateway (dcrouter).
5
+ */
6
+ export type TGatewayClientType = 'onebox' | 'cloudly' | 'custom';
7
+
8
+ /**
9
+ * Role resolved for a gateway API token or identity.
10
+ */
11
+ export type TGatewayTokenRole = 'admin' | 'gatewayClient' | 'operator';
12
+
13
+ /**
14
+ * Feature surface a gateway exposes to connected gateway clients.
15
+ */
16
+ export interface IGatewayCapabilities {
17
+ routes: {
18
+ read: boolean;
19
+ write: boolean;
20
+ idempotentSync: boolean;
21
+ };
22
+ domains: {
23
+ read: boolean;
24
+ write: boolean;
25
+ };
26
+ certificates: {
27
+ read: boolean;
28
+ export: boolean;
29
+ forceRenew: boolean;
30
+ };
31
+ email: {
32
+ domains: boolean;
33
+ inbound: boolean;
34
+ outbound: boolean;
35
+ };
36
+ remoteIngress: {
37
+ enabled: boolean;
38
+ };
39
+ dns: {
40
+ authoritative: boolean;
41
+ providerManaged: boolean;
42
+ };
43
+ http3: {
44
+ enabled: boolean;
45
+ };
46
+ }
47
+
48
+ /**
49
+ * Capability flags granted to a gateway client token.
50
+ */
51
+ export interface IGatewayTokenCapabilities {
52
+ readDomains?: boolean;
53
+ readDnsRecords?: boolean;
54
+ syncRoutes?: boolean;
55
+ syncDnsRecords?: boolean;
56
+ requestCertificates?: boolean;
57
+ }
58
+
59
+ /**
60
+ * A host/ports combination a gateway client is allowed to route traffic to.
61
+ */
62
+ export interface IGatewayRouteTargetAllowance {
63
+ host: string;
64
+ ports: number[];
65
+ }
66
+
67
+ /**
68
+ * Resolved auth context for a gateway client token, as reported by the gateway.
69
+ * Scopes are gateway-defined strings; the closed scope list lives in the gateway.
70
+ */
71
+ export interface IGatewayClientContext {
72
+ role: TGatewayTokenRole;
73
+ scopes: string[];
74
+ gatewayClient?: {
75
+ type: TGatewayClientType;
76
+ id: string;
77
+ };
78
+ hostnamePatterns: string[];
79
+ allowedRouteTargets: IGatewayRouteTargetAllowance[];
80
+ capabilities: IGatewayTokenCapabilities;
81
+ }
82
+
83
+ /**
84
+ * Where a gateway-managed domain is sourced from.
85
+ *
86
+ * - 'dcrouter' → the gateway itself is the authoritative DNS server.
87
+ * - 'provider' → the domain is managed through an external DNS provider.
88
+ */
89
+ export type TGatewayDomainSource = 'dcrouter' | 'provider';
90
+
91
+ /**
92
+ * What a gateway client may do with a gateway-exposed domain.
93
+ */
94
+ export interface IGatewayDomainCapabilities {
95
+ canCreateSubdomains: boolean;
96
+ canManageDnsRecords: boolean;
97
+ canIssueCertificates: boolean;
98
+ canHostEmail: boolean;
99
+ }
100
+
101
+ /**
102
+ * A domain a gateway exposes to gateway clients for app hosting.
103
+ */
104
+ export interface IGatewayDomain {
105
+ id: string;
106
+ /** Fully qualified domain name (e.g. 'example.com'). */
107
+ name: string;
108
+ source: TGatewayDomainSource;
109
+ /** Gateway-internal DNS provider id — only set when source === 'provider'. */
110
+ providerId?: string;
111
+ /** True when the gateway is the authoritative DNS server for this domain. */
112
+ authoritative: boolean;
113
+ nameservers?: string[];
114
+ /** Provider's internal zone identifier — only set when source === 'provider'. */
115
+ externalZoneId?: string;
116
+ /** Last time records were synced from the provider — only set when source === 'provider'. */
117
+ lastSyncedAt?: number;
118
+ description?: string;
119
+ createdAt: number;
120
+ updatedAt: number;
121
+ createdBy: string;
122
+ capabilities: IGatewayDomainCapabilities;
123
+ /** Number of gateway-client services currently using this domain. */
124
+ serviceCount?: number;
125
+ /** Gateway UI path for managing this domain. */
126
+ managePath?: string;
127
+ }
128
+
129
+ /**
130
+ * DNS record view for gateway-client app hostnames.
131
+ * Records with status 'missing' describe expected-but-absent records and
132
+ * use type 'MISSING' placeholders where applicable.
133
+ */
134
+ export interface IGatewayDnsRecord {
135
+ id: string;
136
+ /** Id of the parent gateway domain. */
137
+ domainId: string;
138
+ domainName?: string;
139
+ /** Fully qualified record name (e.g. 'www.example.com'). */
140
+ name: string;
141
+ type: TDnsRecordType | 'MISSING';
142
+ value: string;
143
+ /** TTL in seconds. */
144
+ ttl: number;
145
+ /** Provider-specific: whether the record is proxied (e.g. Cloudflare). */
146
+ proxied?: boolean;
147
+ source: 'local' | 'synced';
148
+ /** Provider's internal record id — only set for provider records. */
149
+ providerRecordId?: string;
150
+ createdAt: number;
151
+ updatedAt: number;
152
+ createdBy: string;
153
+ status: 'active' | 'missing';
154
+ gatewayClientType: TGatewayClientType;
155
+ gatewayClientId: string;
156
+ /** App identifier within the owning gateway client platform. */
157
+ appId: string;
158
+ hostname: string;
159
+ routeId?: string;
160
+ serviceName?: string;
161
+ /** Gateway UI path for managing this record. */
162
+ managePath?: string;
163
+ }
164
+
165
+ /**
166
+ * Ownership of a gateway-client-synced route: which platform, which platform
167
+ * instance, and which app/hostname the route belongs to.
168
+ */
169
+ export interface IGatewayClientOwnership {
170
+ gatewayClientType?: TGatewayClientType;
171
+ gatewayClientId?: string;
172
+ /** App identifier within the owning gateway client platform. */
173
+ appId: string;
174
+ hostname: string;
175
+ }
176
+
177
+ /**
178
+ * A single forward target of a gateway route.
179
+ */
180
+ export interface IGatewayRouteTarget {
181
+ host: string;
182
+ port: number;
183
+ }
184
+
185
+ /**
186
+ * Match condition for a gateway route.
187
+ */
188
+ export interface IGatewayRouteMatch {
189
+ ports: number[];
190
+ domains: string[];
191
+ path?: string;
192
+ }
193
+
194
+ /**
195
+ * TLS handling for a gateway route. 'terminate' with certificate 'auto'
196
+ * requests gateway-managed ACME certificates.
197
+ */
198
+ export interface IGatewayRouteTls {
199
+ mode: 'terminate' | 'passthrough' | 'terminate-and-reencrypt';
200
+ certificate?: 'auto';
201
+ }
202
+
203
+ /**
204
+ * Forward action of a gateway route.
205
+ */
206
+ export interface IGatewayRouteAction {
207
+ type: 'forward';
208
+ targets: IGatewayRouteTarget[];
209
+ tls?: IGatewayRouteTls;
210
+ websocket?: {
211
+ enabled: boolean;
212
+ };
213
+ }
214
+
215
+ /**
216
+ * Platform-neutral desired state for one gateway route.
217
+ *
218
+ * This is deliberately narrower than the gateway's internal route config:
219
+ * control planes express route intent with this shape and the gateway maps
220
+ * it onto its own proxy configuration.
221
+ */
222
+ export interface IGatewayRouteConfig {
223
+ name: string;
224
+ match: IGatewayRouteMatch;
225
+ action: IGatewayRouteAction;
226
+ }
227
+
228
+ /**
229
+ * Result of an idempotent gateway route sync.
230
+ */
231
+ export interface IGatewayRouteSyncResult {
232
+ success: boolean;
233
+ action?: 'created' | 'updated' | 'deleted' | 'unchanged';
234
+ routeId?: string;
235
+ message?: string;
236
+ }
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 './gateway.js';
10
11
  export * from './hostedapp.js';
11
12
  export * from './image.js';
12
13
  export * from './mail.js';
@@ -0,0 +1,130 @@
1
+ import * as plugins from '../plugins.js';
2
+ import type { IIdentity } from '../data/user.js';
3
+ import type {
4
+ IGatewayCapabilities,
5
+ IGatewayClientContext,
6
+ IGatewayClientOwnership,
7
+ IGatewayDnsRecord,
8
+ IGatewayDomain,
9
+ IGatewayRouteConfig,
10
+ IGatewayRouteSyncResult,
11
+ } from '../data/gateway.js';
12
+
13
+ /**
14
+ * Gateway client contracts: the machine-facing API a gateway (dcrouter)
15
+ * serves to gateway clients (Onebox, Cloudly/Coreflow).
16
+ *
17
+ * Wire note: these methods are already deployed; auth fields stay top-level
18
+ * (identity?/apiToken?) for wire compatibility, unlike the nested auth
19
+ * envelope used by the newer mail contracts. The method strings
20
+ * 'exportCertificate' and 'importCertificate' likewise keep their deployed
21
+ * names and deliberately lack a gateway prefix.
22
+ */
23
+
24
+ export interface IReq_GetGatewayCapabilities extends plugins.typedrequestInterfaces.implementsTR<
25
+ plugins.typedrequestInterfaces.ITypedRequest,
26
+ IReq_GetGatewayCapabilities
27
+ > {
28
+ method: 'getGatewayCapabilities';
29
+ request: {
30
+ identity?: IIdentity;
31
+ apiToken?: string;
32
+ };
33
+ response: {
34
+ capabilities: IGatewayCapabilities;
35
+ };
36
+ }
37
+
38
+ export interface IReq_GetGatewayClientContext extends plugins.typedrequestInterfaces.implementsTR<
39
+ plugins.typedrequestInterfaces.ITypedRequest,
40
+ IReq_GetGatewayClientContext
41
+ > {
42
+ method: 'getGatewayClientContext';
43
+ request: {
44
+ identity?: IIdentity;
45
+ apiToken?: string;
46
+ };
47
+ response: {
48
+ context: IGatewayClientContext;
49
+ capabilities: IGatewayCapabilities;
50
+ };
51
+ }
52
+
53
+ export interface IReq_GetGatewayClientDomains extends plugins.typedrequestInterfaces.implementsTR<
54
+ plugins.typedrequestInterfaces.ITypedRequest,
55
+ IReq_GetGatewayClientDomains
56
+ > {
57
+ method: 'getGatewayClientDomains';
58
+ request: {
59
+ identity?: IIdentity;
60
+ apiToken?: string;
61
+ gatewayClientId?: string;
62
+ };
63
+ response: {
64
+ domains: IGatewayDomain[];
65
+ };
66
+ }
67
+
68
+ export interface IReq_GetGatewayClientDnsRecords extends plugins.typedrequestInterfaces.implementsTR<
69
+ plugins.typedrequestInterfaces.ITypedRequest,
70
+ IReq_GetGatewayClientDnsRecords
71
+ > {
72
+ method: 'getGatewayClientDnsRecords';
73
+ request: {
74
+ identity?: IIdentity;
75
+ apiToken?: string;
76
+ gatewayClientId?: string;
77
+ };
78
+ response: {
79
+ records: IGatewayDnsRecord[];
80
+ };
81
+ }
82
+
83
+ export interface IReq_SyncGatewayClientRoute extends plugins.typedrequestInterfaces.implementsTR<
84
+ plugins.typedrequestInterfaces.ITypedRequest,
85
+ IReq_SyncGatewayClientRoute
86
+ > {
87
+ method: 'syncGatewayClientRoute';
88
+ request: {
89
+ identity?: IIdentity;
90
+ apiToken?: string;
91
+ ownership: IGatewayClientOwnership;
92
+ route?: IGatewayRouteConfig;
93
+ enabled?: boolean;
94
+ delete?: boolean;
95
+ };
96
+ response: IGatewayRouteSyncResult;
97
+ }
98
+
99
+ export interface IReq_ExportCertificate extends plugins.typedrequestInterfaces.implementsTR<
100
+ plugins.typedrequestInterfaces.ITypedRequest,
101
+ IReq_ExportCertificate
102
+ > {
103
+ method: 'exportCertificate';
104
+ request: {
105
+ identity?: IIdentity;
106
+ apiToken?: string;
107
+ domain: string;
108
+ };
109
+ response: {
110
+ success: boolean;
111
+ cert?: plugins.tsclass.network.ICert;
112
+ message?: string;
113
+ };
114
+ }
115
+
116
+ export interface IReq_ImportCertificate extends plugins.typedrequestInterfaces.implementsTR<
117
+ plugins.typedrequestInterfaces.ITypedRequest,
118
+ IReq_ImportCertificate
119
+ > {
120
+ method: 'importCertificate';
121
+ request: {
122
+ identity?: IIdentity;
123
+ apiToken?: string;
124
+ cert: plugins.tsclass.network.ICert;
125
+ };
126
+ response: {
127
+ success: boolean;
128
+ message?: string;
129
+ };
130
+ }
@@ -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 gatewayRequests from './gateway.js';
15
16
  import * as hostedAppRequests from './hostedapp.js';
16
17
  import * as identityRequests from './identity.js';
17
18
  import * as imageRequests from './image.js';
@@ -44,6 +45,7 @@ export {
44
45
  dnsRequests as dns,
45
46
  domainRequests as domain,
46
47
  externalRegistryRequests as externalRegistry,
48
+ gatewayRequests as gateway,
47
49
  hostedAppRequests as hostedapp,
48
50
  identityRequests as identity,
49
51
  imageRequests as image,