@serve.zone/interfaces 32.114.0 → 32.116.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 +20 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/backup/index.d.ts +2 -0
- package/dist_ts/data/backup/index.js +3 -0
- package/dist_ts/data/controlledtakeover.d.ts +125 -0
- package/dist_ts/data/controlledtakeover.js +217 -0
- package/dist_ts/data/coremail/index.d.ts +2 -0
- package/dist_ts/data/coremail/index.js +3 -0
- package/dist_ts/data/corestorereplication.d.ts +90 -0
- package/dist_ts/data/corestorereplication.js +129 -0
- package/dist_ts/data/dcstorage.d.ts +206 -0
- package/dist_ts/data/dcstorage.js +322 -0
- package/dist_ts/data/delegatedadmintoken.d.ts +4 -2
- package/dist_ts/data/delegatedadmintoken.js +9 -3
- package/dist_ts/data/gateway.d.ts +13 -0
- package/dist_ts/data/gateway.js +6 -2
- package/dist_ts/data/gatewayarearows.d.ts +30 -14
- package/dist_ts/data/gatewayarearows.js +54 -21
- package/dist_ts/data/gatewayareas.d.ts +12 -2
- package/dist_ts/data/gatewayareas.js +5 -2
- package/dist_ts/data/gatewayareas.validation.js +11 -5
- package/dist_ts/data/index.d.ts +4 -0
- package/dist_ts/data/index.js +5 -1
- package/dist_ts/data/preparedimages.d.ts +80 -0
- package/dist_ts/data/preparedimages.js +154 -0
- package/dist_ts/index.d.ts +10 -2
- package/dist_ts/index.js +11 -3
- package/dist_ts/requests/backup.d.ts +1 -1
- package/dist_ts/requests/backup.js +2 -2
- package/dist_ts/requests/controlledtakeover.d.ts +50 -0
- package/dist_ts/requests/controlledtakeover.js +18 -0
- package/dist_ts/requests/corestore.d.ts +1 -1
- package/dist_ts/requests/corestore.js +1 -2
- package/dist_ts/requests/corestorereplication.d.ts +108 -0
- package/dist_ts/requests/corestorereplication.js +2 -0
- package/dist_ts/requests/dcstorage.d.ts +204 -0
- package/dist_ts/requests/dcstorage.js +2 -0
- package/dist_ts/requests/gateway.d.ts +1 -1
- package/dist_ts/requests/gateway.js +2 -2
- package/dist_ts/requests/gatewaycertificatestore.d.ts +10 -0
- package/dist_ts/requests/gatewaycertificatestore.js +27 -10
- package/dist_ts/requests/gatewayconnector.d.ts +1 -1
- package/dist_ts/requests/gatewayconnector.js +2 -2
- package/dist_ts/requests/gatewayhealth.d.ts +65 -0
- package/dist_ts/requests/gatewayhealth.js +72 -0
- package/dist_ts/requests/gatewayremoteingress.d.ts +10 -2
- package/dist_ts/requests/gatewayremoteingress.js +7 -2
- package/dist_ts/requests/index.d.ts +5 -0
- package/dist_ts/requests/index.js +6 -1
- package/dist_ts/requests/mail.d.ts +1 -1
- package/dist_ts/requests/mail.js +2 -2
- package/dist_ts/requests/preparedimages.d.ts +24 -0
- package/dist_ts/requests/preparedimages.js +2 -0
- package/package.json +113 -1
- package/readme.md +120 -10
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/backup/index.ts +2 -0
- package/ts/data/controlledtakeover.ts +338 -0
- package/ts/data/coremail/index.ts +2 -0
- package/ts/data/corestorereplication.ts +223 -0
- package/ts/data/dcstorage.ts +505 -0
- package/ts/data/delegatedadmintoken.ts +9 -3
- package/ts/data/gateway.ts +18 -1
- package/ts/data/gatewayarearows.ts +76 -26
- package/ts/data/gatewayareas.ts +15 -3
- package/ts/data/gatewayareas.validation.ts +10 -4
- package/ts/data/index.ts +4 -0
- package/ts/data/preparedimages.ts +231 -0
- package/ts/index.ts +11 -2
- package/ts/requests/backup.ts +1 -1
- package/ts/requests/controlledtakeover.ts +108 -0
- package/ts/requests/corestore.ts +1 -1
- package/ts/requests/corestorereplication.ts +123 -0
- package/ts/requests/dcstorage.ts +208 -0
- package/ts/requests/gateway.ts +1 -1
- package/ts/requests/gatewaycertificatestore.ts +34 -9
- package/ts/requests/gatewayconnector.ts +1 -1
- package/ts/requests/gatewayhealth.ts +135 -0
- package/ts/requests/gatewayremoteingress.ts +15 -3
- package/ts/requests/index.ts +5 -0
- package/ts/requests/mail.ts +1 -1
- package/ts/requests/preparedimages.ts +39 -0
|
@@ -2,6 +2,7 @@ import type { ITypedRequest, implementsTR } from '@api.global/typedrequest-inter
|
|
|
2
2
|
import { gatewayAreaContentContract, isGatewayAreaRowId } from '../data/gatewayareas.js';
|
|
3
3
|
import type { IIdentityCredential } from '../data/user.js';
|
|
4
4
|
import { compareWireTokens } from '../private/canonicaljson.js';
|
|
5
|
+
import { readDataProperty } from '../private/dataproperties.js';
|
|
5
6
|
|
|
6
7
|
export interface IGatewayRemoteIngressStatusPageRequest {
|
|
7
8
|
after?: string;
|
|
@@ -18,6 +19,8 @@ export interface IGatewayRemoteIngressConnection {
|
|
|
18
19
|
rejectedStreams: number;
|
|
19
20
|
activeUdpSessions: number;
|
|
20
21
|
droppedDatagrams: number;
|
|
22
|
+
/** The credential slot used by this connection. Omitted by older gateways. */
|
|
23
|
+
credentialSlot?: 'active' | 'staged';
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export interface IGatewayRemoteIngressEdge {
|
|
@@ -61,14 +64,20 @@ export const copyGatewayRemoteIngressConnectionTokenMethod = 'copyGatewayRemoteI
|
|
|
61
64
|
|
|
62
65
|
type TRemoteIngressConnectionTokenResult = { ok: true; token: string } | { ok: false; reason: 'token-unavailable' };
|
|
63
66
|
|
|
64
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Credential-bearing read served only on the registered controller connector. Returns the staged
|
|
69
|
+
* token once the hub acknowledges the staged credential, otherwise returns the active token.
|
|
70
|
+
*/
|
|
65
71
|
export interface IReq_Cloudly_Gateway_ReadGatewayRemoteIngressConnectionToken extends implementsTR<ITypedRequest, IReq_Cloudly_Gateway_ReadGatewayRemoteIngressConnectionToken> {
|
|
66
72
|
method: typeof readGatewayRemoteIngressConnectionTokenMethod;
|
|
67
73
|
request: { edgeId: string };
|
|
68
74
|
response: TRemoteIngressConnectionTokenResult;
|
|
69
75
|
}
|
|
70
76
|
|
|
71
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* A fresh human administrator explicitly copies one edge's staged token once the hub acknowledges
|
|
79
|
+
* the staged credential, or its active token otherwise.
|
|
80
|
+
*/
|
|
72
81
|
export interface IReq_Admin_Cloudly_CopyGatewayRemoteIngressConnectionToken extends implementsTR<ITypedRequest, IReq_Admin_Cloudly_CopyGatewayRemoteIngressConnectionToken> {
|
|
73
82
|
method: typeof copyGatewayRemoteIngressConnectionTokenMethod;
|
|
74
83
|
request: { identity: IIdentityCredential; gatewayId: string; edgeId: string };
|
|
@@ -141,8 +150,11 @@ const projectConnection = (value: unknown): IGatewayRemoteIngressConnection | nu
|
|
|
141
150
|
if (typeof fallbackUsed !== 'boolean' || typeof egressEnabled !== 'boolean' || !isTimestamp(connectedAt)
|
|
142
151
|
|| !isCounter(activeStreams) || !isCounter(bytesIn) || !isCounter(bytesOut) || !isCounter(rejectedStreams)
|
|
143
152
|
|| !isCounter(activeUdpSessions) || !isCounter(droppedDatagrams)) return null;
|
|
153
|
+
const credentialSlot = readDataProperty(value, 'credentialSlot')?.value;
|
|
154
|
+
if ('credentialSlot' in value && credentialSlot !== 'active' && credentialSlot !== 'staged') return null;
|
|
144
155
|
return { transport, fallbackUsed, connectedAt, activeStreams, egressEnabled, bytesIn, bytesOut,
|
|
145
|
-
rejectedStreams, activeUdpSessions, droppedDatagrams
|
|
156
|
+
rejectedStreams, activeUdpSessions, droppedDatagrams,
|
|
157
|
+
...(credentialSlot === 'active' || credentialSlot === 'staged' ? { credentialSlot } : {}) };
|
|
146
158
|
};
|
|
147
159
|
|
|
148
160
|
/** Rebuilds the wire value at both boundaries and checks progress from the requested cursor. */
|
package/ts/requests/index.ts
CHANGED
|
@@ -99,6 +99,7 @@ export * from './hostedapp.js';
|
|
|
99
99
|
export * from './mail.js';
|
|
100
100
|
export * from './webpush.js';
|
|
101
101
|
export * as gatewaynetwork from './gatewaynetwork.js';
|
|
102
|
+
export * as gatewayhealth from './gatewayhealth.js';
|
|
102
103
|
export * as gatewayoperations from './gatewayoperations.js';
|
|
103
104
|
export * as gatewayevents from './gatewayevents.js';
|
|
104
105
|
export * as gatewaydnsoperations from './gatewaydnsoperations.js';
|
|
@@ -106,3 +107,7 @@ export * as gatewayremoteingress from './gatewayremoteingress.js';
|
|
|
106
107
|
export * as gatewaysmtpaccounts from './gatewaysmtpaccounts.js';
|
|
107
108
|
export * as gatewayopstokens from './gatewayopstokens.js';
|
|
108
109
|
export * as gatewaycertificatestore from './gatewaycertificatestore.js';
|
|
110
|
+
export * as dcstorage from './dcstorage.js';
|
|
111
|
+
export * as preparedimages from './preparedimages.js';
|
|
112
|
+
export * as corestorereplication from './corestorereplication.js';
|
|
113
|
+
export * as controlledtakeover from './controlledtakeover.js';
|
package/ts/requests/mail.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type * as plugins from '../plugins.js';
|
|
2
|
+
import type {
|
|
3
|
+
IGetPreparedImagePullCredentialRequest,
|
|
4
|
+
IGetPreparedImagePullCredentialResponse,
|
|
5
|
+
IReportPreparedImagesRequest,
|
|
6
|
+
ISyncPreparedImagesRequest,
|
|
7
|
+
ISyncPreparedImagesResponse,
|
|
8
|
+
} from '../data/preparedimages.js';
|
|
9
|
+
|
|
10
|
+
/** Authenticated runtime-session push. Compare the binding against the live session at admission. */
|
|
11
|
+
export interface IReq_Controller_Pallet_SyncPreparedImages extends plugins.typedrequestInterfaces.implementsTR<
|
|
12
|
+
plugins.typedrequestInterfaces.ITypedRequest, IReq_Controller_Pallet_SyncPreparedImages
|
|
13
|
+
> {
|
|
14
|
+
method: 'syncPreparedImages';
|
|
15
|
+
request: ISyncPreparedImagesRequest;
|
|
16
|
+
response: ISyncPreparedImagesResponse;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Value-free observation from the live node session. Compare it to the node's current list. */
|
|
20
|
+
export interface IReq_Pallet_Controller_ReportPreparedImages extends plugins.typedrequestInterfaces.implementsTR<
|
|
21
|
+
plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_ReportPreparedImages
|
|
22
|
+
> {
|
|
23
|
+
method: 'reportPreparedImages';
|
|
24
|
+
request: IReportPreparedImagesRequest;
|
|
25
|
+
response: Record<string, never>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Resolve at attempt time over the authenticated runtime session. The controller matches its live
|
|
30
|
+
* peer and the exact revision and target it stated for that node. Pallet uses the credential for
|
|
31
|
+
* that attempt only. Assignment credentials, secret delivery and slots have separate contracts.
|
|
32
|
+
*/
|
|
33
|
+
export interface IReq_Pallet_Controller_GetPreparedImagePullCredential extends plugins.typedrequestInterfaces.implementsTR<
|
|
34
|
+
plugins.typedrequestInterfaces.ITypedRequest, IReq_Pallet_Controller_GetPreparedImagePullCredential
|
|
35
|
+
> {
|
|
36
|
+
method: 'getPreparedImagePullCredential';
|
|
37
|
+
request: IGetPreparedImagePullCredentialRequest;
|
|
38
|
+
response: IGetPreparedImagePullCredentialResponse;
|
|
39
|
+
}
|