@serve.zone/interfaces 32.113.0 → 32.115.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 +22 -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/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 +15 -0
- package/dist_ts/data/gateway.js +6 -2
- package/dist_ts/data/gatewayarearows.d.ts +17 -11
- package/dist_ts/data/gatewayarearows.js +27 -11
- 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 +3 -0
- package/dist_ts/data/index.js +4 -1
- package/dist_ts/data/preparedimages.d.ts +80 -0
- package/dist_ts/data/preparedimages.js +154 -0
- package/dist_ts/index.d.ts +8 -2
- package/dist_ts/index.js +9 -3
- package/dist_ts/requests/backup.d.ts +1 -1
- package/dist_ts/requests/backup.js +2 -2
- 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 +208 -0
- package/dist_ts/requests/gatewaycertificatestore.js +240 -0
- 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 +105 -1
- package/readme.md +96 -9
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/backup/index.ts +2 -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 +20 -1
- package/ts/data/gatewayarearows.ts +32 -13
- package/ts/data/gatewayareas.ts +15 -3
- package/ts/data/gatewayareas.validation.ts +10 -4
- package/ts/data/index.ts +3 -0
- package/ts/data/preparedimages.ts +231 -0
- package/ts/index.ts +9 -2
- package/ts/requests/backup.ts +1 -1
- 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 +411 -0
- 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
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import type * as plugins from '../plugins.js';
|
|
2
|
+
import type { IControllerPeerSet } from '../data/controller.js';
|
|
3
|
+
import type { IDcStorageFailureDomain, IDcStorageFilesystemIdentity, IDcStorageNode, IDcStorageNodeTelemetryReport, IDcStoragePool, IDcStoragePoolProfile, IDcStorageSessionFence, IDcStorageVolumeAssignment, IDcStorageVolumeStatus, IEnrollDcStorageNodeRequest, IRegisterDcStorageNodeSessionRequest, TDcStorageRefusal } from '../data/dcstorage.js';
|
|
4
|
+
import type { TOutcomeUnknownCode } from '../data/outcomeunknown.js';
|
|
5
|
+
import type { IIdentityCredential } from '../data/user.js';
|
|
6
|
+
import type { IProtocolOffer } from '../protocol.js';
|
|
7
|
+
/**
|
|
8
|
+
* The admin router requires an administrator and fresh sign-in for mutations. The node router
|
|
9
|
+
* accepts bootstrap and registration separately from session-scoped traffic. Either router uses
|
|
10
|
+
* TypedResponseError.errorData ({ code, retryable: false }); readers use readDcStorageRefusalErrorData.
|
|
11
|
+
* A missing mutation answer or outcome-unknown requires inspection before taking further action.
|
|
12
|
+
*/
|
|
13
|
+
interface IDcStorageAdminRequest {
|
|
14
|
+
identity: IIdentityCredential;
|
|
15
|
+
}
|
|
16
|
+
interface IDcStorageAdminMutation extends IDcStorageAdminRequest {
|
|
17
|
+
/** Durable key for recovering the exact admitted intent. Reuse with another body is refused. */
|
|
18
|
+
idempotencyKey: string;
|
|
19
|
+
controllerEpoch: number;
|
|
20
|
+
}
|
|
21
|
+
interface IDcStorageNodeMutation extends IDcStorageAdminMutation {
|
|
22
|
+
nodeId: string;
|
|
23
|
+
nodeRevision: number;
|
|
24
|
+
}
|
|
25
|
+
interface IDcStorageMemberMutation extends IDcStorageAdminMutation {
|
|
26
|
+
poolId: string;
|
|
27
|
+
poolRevision: number;
|
|
28
|
+
slot: number;
|
|
29
|
+
memberGeneration: number;
|
|
30
|
+
}
|
|
31
|
+
interface IDcStorageVolumeReference {
|
|
32
|
+
volumeId: string;
|
|
33
|
+
volumeGeneration: number;
|
|
34
|
+
}
|
|
35
|
+
type TDcStorageType = plugins.typedrequestInterfaces.ITypedRequest;
|
|
36
|
+
/** A durable admission receipt. Read getDcStorageOperation for progress or completion. */
|
|
37
|
+
export interface IDcStorageOperationReceipt {
|
|
38
|
+
operationId: string;
|
|
39
|
+
}
|
|
40
|
+
export type TDcStorageOperationStatus = {
|
|
41
|
+
state: 'accepted' | 'running' | 'completed';
|
|
42
|
+
pool: IDcStoragePool;
|
|
43
|
+
} | {
|
|
44
|
+
state: 'refused';
|
|
45
|
+
reason: Exclude<TDcStorageRefusal, TOutcomeUnknownCode>;
|
|
46
|
+
pool: IDcStoragePool;
|
|
47
|
+
};
|
|
48
|
+
/** Discovery for administrators. The node still negotiates the release and its own capabilities. */
|
|
49
|
+
export interface IReq_Admin_Cloudly_GetDcStorageCapabilities extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_GetDcStorageCapabilities> {
|
|
50
|
+
method: 'getDcStorageCapabilities';
|
|
51
|
+
request: IDcStorageAdminRequest;
|
|
52
|
+
response: {
|
|
53
|
+
controllerEpoch: number;
|
|
54
|
+
protocol: IProtocolOffer;
|
|
55
|
+
nodeEnrollment: boolean;
|
|
56
|
+
filesystemVolumes: boolean;
|
|
57
|
+
poolAdmission: boolean;
|
|
58
|
+
poolDrain: boolean;
|
|
59
|
+
poolReplacement: boolean;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** Creates a pending node. The administrator's enrollment client keeps the random code. */
|
|
63
|
+
export interface IReq_Admin_Cloudly_CreateDcStorageEnrollment extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_CreateDcStorageEnrollment> {
|
|
64
|
+
method: 'createDcStorageEnrollment';
|
|
65
|
+
/** Suppress the request body from logs, including the code verifier. */
|
|
66
|
+
request: IDcStorageAdminMutation & {
|
|
67
|
+
locationId: string;
|
|
68
|
+
failureDomain: IDcStorageFailureDomain;
|
|
69
|
+
pairingCodeSha256: string;
|
|
70
|
+
};
|
|
71
|
+
response: {
|
|
72
|
+
node: IDcStorageNode;
|
|
73
|
+
expiresAt: number;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** Consumes the code and installs the bearer digest atomically. The request carries a secret. */
|
|
77
|
+
export interface IReq_DcStorage_Cloudly_EnrollDcStorageNode extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_DcStorage_Cloudly_EnrollDcStorageNode> {
|
|
78
|
+
method: 'enrollDcStorageNode';
|
|
79
|
+
request: IEnrollDcStorageNodeRequest;
|
|
80
|
+
response: {
|
|
81
|
+
node: IDcStorageNode;
|
|
82
|
+
controller: IControllerPeerSet;
|
|
83
|
+
protocol: IProtocolOffer;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/** Authenticates a node on this socket. The request carries a secret. */
|
|
87
|
+
export interface IReq_DcStorage_Cloudly_RegisterDcStorageNodeSession extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_DcStorage_Cloudly_RegisterDcStorageNodeSession> {
|
|
88
|
+
method: 'registerDcStorageNodeSession';
|
|
89
|
+
request: IRegisterDcStorageNodeSessionRequest;
|
|
90
|
+
response: {
|
|
91
|
+
controller: IControllerPeerSet;
|
|
92
|
+
protocol: IProtocolOffer;
|
|
93
|
+
fence: IDcStorageSessionFence;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** Revokes control identity, closes its sessions and stops issuing grants. Ownership is retained. */
|
|
97
|
+
export interface IReq_Admin_Cloudly_RevokeDcStorageNode extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_RevokeDcStorageNode> {
|
|
98
|
+
method: 'revokeDcStorageNode';
|
|
99
|
+
request: IDcStorageNodeMutation;
|
|
100
|
+
response: IDcStorageNode;
|
|
101
|
+
}
|
|
102
|
+
export interface IReq_Admin_Cloudly_GetDcStorageNode extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_GetDcStorageNode> {
|
|
103
|
+
method: 'getDcStorageNode';
|
|
104
|
+
request: IDcStorageAdminRequest & {
|
|
105
|
+
nodeId: string;
|
|
106
|
+
};
|
|
107
|
+
response: {
|
|
108
|
+
node: IDcStorageNode;
|
|
109
|
+
assignments: IDcStorageVolumeAssignment[];
|
|
110
|
+
/** Last accepted observation. Read freshness from the node record and the session fence. */
|
|
111
|
+
telemetry: IDcStorageNodeTelemetryReport | null;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
/** Reserves an explicitly provisioned identity. Assignment alone gives no write authority. */
|
|
115
|
+
export interface IReq_Admin_Cloudly_AssignDcStorageVolume extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_AssignDcStorageVolume> {
|
|
116
|
+
method: 'assignDcStorageVolume';
|
|
117
|
+
request: IDcStorageNodeMutation & {
|
|
118
|
+
volumeId: string;
|
|
119
|
+
expected: IDcStorageFilesystemIdentity;
|
|
120
|
+
};
|
|
121
|
+
response: {
|
|
122
|
+
assignment: IDcStorageVolumeAssignment;
|
|
123
|
+
nodeRevision: number;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/** Releases only the named generation after dependent members and writers are fenced. */
|
|
127
|
+
export interface IReq_Admin_Cloudly_UnassignDcStorageVolume extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_UnassignDcStorageVolume> {
|
|
128
|
+
method: 'unassignDcStorageVolume';
|
|
129
|
+
request: IDcStorageNodeMutation & IDcStorageVolumeReference;
|
|
130
|
+
response: {
|
|
131
|
+
nodeRevision: number;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/** Fresh private verification on the authenticated owner session. */
|
|
135
|
+
export interface IReq_Admin_Cloudly_VerifyDcStorageVolume extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_VerifyDcStorageVolume> {
|
|
136
|
+
method: 'verifyDcStorageVolume';
|
|
137
|
+
request: IDcStorageAdminRequest & IDcStorageVolumeReference & {
|
|
138
|
+
nodeId: string;
|
|
139
|
+
};
|
|
140
|
+
response: IDcStorageVolumeStatus;
|
|
141
|
+
}
|
|
142
|
+
/** Cloudly requests a read-only probe. The assignment and session fence must match on return. */
|
|
143
|
+
export interface IReq_Cloudly_DcStorage_ProbeDcStorageVolume extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Cloudly_DcStorage_ProbeDcStorageVolume> {
|
|
144
|
+
method: 'probeDcStorageVolume';
|
|
145
|
+
request: {
|
|
146
|
+
assignment: IDcStorageVolumeAssignment;
|
|
147
|
+
fence: IDcStorageSessionFence;
|
|
148
|
+
};
|
|
149
|
+
response: IDcStorageVolumeStatus;
|
|
150
|
+
}
|
|
151
|
+
export interface IReq_Admin_Cloudly_CreateDcStoragePool extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_CreateDcStoragePool> {
|
|
152
|
+
method: 'createDcStoragePool';
|
|
153
|
+
request: IDcStorageAdminMutation & {
|
|
154
|
+
locationId: string;
|
|
155
|
+
profile: IDcStoragePoolProfile;
|
|
156
|
+
};
|
|
157
|
+
response: IDcStoragePool;
|
|
158
|
+
}
|
|
159
|
+
export interface IReq_Admin_Cloudly_GetDcStoragePool extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_GetDcStoragePool> {
|
|
160
|
+
method: 'getDcStoragePool';
|
|
161
|
+
request: IDcStorageAdminRequest & {
|
|
162
|
+
poolId: string;
|
|
163
|
+
};
|
|
164
|
+
response: IDcStoragePool;
|
|
165
|
+
}
|
|
166
|
+
export interface IReq_Admin_Cloudly_AdmitDcStoragePoolMember extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_AdmitDcStoragePoolMember> {
|
|
167
|
+
method: 'admitDcStoragePoolMember';
|
|
168
|
+
request: Omit<IDcStorageMemberMutation, 'memberGeneration'> & IDcStorageVolumeReference & {
|
|
169
|
+
nodeId: string;
|
|
170
|
+
/** Null for a never-allocated slot. Otherwise match the pending slot's current generation. */
|
|
171
|
+
memberGeneration: number | null;
|
|
172
|
+
};
|
|
173
|
+
response: IDcStorageOperationReceipt;
|
|
174
|
+
}
|
|
175
|
+
export interface IReq_Admin_Cloudly_DrainDcStoragePoolMember extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_DrainDcStoragePoolMember> {
|
|
176
|
+
method: 'drainDcStoragePoolMember';
|
|
177
|
+
request: IDcStorageMemberMutation;
|
|
178
|
+
response: IDcStorageOperationReceipt;
|
|
179
|
+
}
|
|
180
|
+
export interface IReq_Admin_Cloudly_ReplaceDcStoragePoolMember extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_ReplaceDcStoragePoolMember> {
|
|
181
|
+
method: 'replaceDcStoragePoolMember';
|
|
182
|
+
request: IDcStorageMemberMutation & {
|
|
183
|
+
replacement: IDcStorageVolumeReference & {
|
|
184
|
+
nodeId: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
response: IDcStorageOperationReceipt;
|
|
188
|
+
}
|
|
189
|
+
export interface IReq_Admin_Cloudly_GetDcStorageOperation extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_Admin_Cloudly_GetDcStorageOperation> {
|
|
190
|
+
method: 'getDcStorageOperation';
|
|
191
|
+
request: IDcStorageAdminRequest & {
|
|
192
|
+
operationId: string;
|
|
193
|
+
};
|
|
194
|
+
response: TDcStorageOperationStatus;
|
|
195
|
+
}
|
|
196
|
+
/** Authenticated reverse session only. Acceptance acknowledges observation, never ownership. */
|
|
197
|
+
export interface IReq_DcStorage_Cloudly_ReportDcStorageNodeTelemetry extends plugins.typedrequestInterfaces.implementsTR<TDcStorageType, IReq_DcStorage_Cloudly_ReportDcStorageNodeTelemetry> {
|
|
198
|
+
method: 'reportDcStorageNodeTelemetry';
|
|
199
|
+
request: IDcStorageNodeTelemetryReport;
|
|
200
|
+
response: {
|
|
201
|
+
acceptedSequence: number;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as plugins from '../plugins.js';
|
|
1
|
+
import type * as plugins from '../plugins.js';
|
|
2
2
|
import type { IGatewayCapabilities, IGatewayClient, IGatewayClientCredential, IGatewayClientProvisioningSpec, IGatewayClientContext, IGatewayClientDnsRecord, IGatewayClientDnsRecordSyncResult, IGatewayClientHostnameOwnership, IGatewayClientOwnership, IGatewayClientRoute, IGatewayDnsRecord, IGatewayDomain, IGatewayIdentity, IGatewayRouteConfig, IGatewayRouteSyncResult, TGatewayRouteDnsMode, TGatewayClientCertificateReleaseResult, TGatewayClientCertificateResult, TGatewayClientProvisioningAction } from '../data/gateway.js';
|
|
3
3
|
import type { IMailOverviewDomain, IMailOverviewEmail } from './mail.js';
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2F0ZXdheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3RzL2dhdGV3YXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { ITypedRequest, implementsTR } from '@api.global/typedrequest-interfaces';
|
|
2
|
+
import type * as plugins from '../plugins.js';
|
|
3
|
+
import type { IIdentityCredential } from '../data/user.js';
|
|
4
|
+
import { type TSha256Digest } from '../data/immutableimage.js';
|
|
5
|
+
type ICert = plugins.tsclass.network.ICert;
|
|
6
|
+
/**
|
|
7
|
+
* A stored legacy selector, never an exact-issuance record. The gateway issues the ID and changes
|
|
8
|
+
* it on recreation. Content revision covers every selected backing document, including secrets;
|
|
9
|
+
* usage revision covers all current consumers and the selection's effects on shared base domains.
|
|
10
|
+
* Neither revision reveals its inputs. Both are compared again inside the gateway's mutation lock.
|
|
11
|
+
*/
|
|
12
|
+
export interface IGatewayCertificateStoreEntry {
|
|
13
|
+
id: string;
|
|
14
|
+
/** Display-safe preview. Export by ID to obtain the original legacy domain string. */
|
|
15
|
+
domainName: string;
|
|
16
|
+
domainNameAltered: boolean;
|
|
17
|
+
backingKinds: ('legacy-acme' | 'proxy')[];
|
|
18
|
+
created: number;
|
|
19
|
+
validUntil: number;
|
|
20
|
+
exportable: boolean;
|
|
21
|
+
contentRevision: TSha256Digest;
|
|
22
|
+
usageRevision: TSha256Digest;
|
|
23
|
+
/** Counts cover the complete consumer set, including members omitted from the display sample. */
|
|
24
|
+
consumerCounts: IGatewayCertificateStoreConsumerCounts;
|
|
25
|
+
consumersTruncated: boolean;
|
|
26
|
+
consumers: IGatewayCertificateStoreConsumer[];
|
|
27
|
+
}
|
|
28
|
+
export interface IGatewayCertificateStoreConsumer {
|
|
29
|
+
kind: 'route' | 'smtp' | 'remoteIngress';
|
|
30
|
+
id: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IGatewayCertificateStoreConsumerCounts {
|
|
33
|
+
routes: number;
|
|
34
|
+
smtp: number;
|
|
35
|
+
remoteIngress: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IGatewayCertificateStorePage {
|
|
38
|
+
entries: IGatewayCertificateStoreEntry[];
|
|
39
|
+
/** The last returned ID, only when a later entry exists. */
|
|
40
|
+
nextAfter?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const gatewayCertificateStoreBounds: Readonly<{
|
|
43
|
+
page: 8;
|
|
44
|
+
/** One extra row from a storage query proves whether another page exists. */
|
|
45
|
+
storageWindow: 9;
|
|
46
|
+
consumersPerEntry: 64;
|
|
47
|
+
domainNamePreview: 253;
|
|
48
|
+
}>;
|
|
49
|
+
/** The boolean flags explicitly acknowledge stored-only effects on the named consumer classes. */
|
|
50
|
+
export interface IGatewayCertificateStoreImpactConfirmation {
|
|
51
|
+
routes: boolean;
|
|
52
|
+
smtp: boolean;
|
|
53
|
+
remoteIngress: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Plain creation has no observed backing. Related creation observes a different legacy selector;
|
|
57
|
+
* exact replacement observes the target itself. The gateway must compare both revisions and
|
|
58
|
+
* complete target-union impact in the same authorizing transaction as its write.
|
|
59
|
+
* The projector validates those three wire forms; keep this published interface extensible.
|
|
60
|
+
*/
|
|
61
|
+
export interface IGatewayCertificateStoreImport {
|
|
62
|
+
certificate: ICert;
|
|
63
|
+
/** Null creates; an observed gateway-issued selector ID replaces. */
|
|
64
|
+
id: string | null;
|
|
65
|
+
/** Related creation only, gated by certificates.storeRelatedImport. */
|
|
66
|
+
relatedSelectorId?: string;
|
|
67
|
+
expectedContentRevision: TSha256Digest | null;
|
|
68
|
+
expectedUsageRevision: TSha256Digest | null;
|
|
69
|
+
confirmImpact: IGatewayCertificateStoreImpactConfirmation;
|
|
70
|
+
}
|
|
71
|
+
export interface IGatewayCertificateStoreTarget {
|
|
72
|
+
id: string;
|
|
73
|
+
expectedContentRevision: TSha256Digest;
|
|
74
|
+
}
|
|
75
|
+
export interface IGatewayCertificateStoreDelete extends IGatewayCertificateStoreTarget {
|
|
76
|
+
expectedUsageRevision: TSha256Digest;
|
|
77
|
+
confirmImpact: IGatewayCertificateStoreImpactConfirmation;
|
|
78
|
+
}
|
|
79
|
+
type TGatewayCertificateStoreCommonRefusal = 'invalid-request' | 'store-unavailable';
|
|
80
|
+
type TGatewayCertificateStoreMutationRefusal = TGatewayCertificateStoreCommonRefusal | 'stale-content' | 'stale-usage' | 'impact-confirmation-required' | 'outcome-unknown';
|
|
81
|
+
type TGatewayCertificateStoreExportRefusal = TGatewayCertificateStoreCommonRefusal | 'not-found' | 'not-exportable' | 'stale-content';
|
|
82
|
+
type TGatewayCertificateStoreAdminRefusal = 'administrator-required' | 'gateway-disconnected' | 'gateway-unavailable' | 'gateway-unsupported';
|
|
83
|
+
export type TGatewayCertificateStoreInventoryRefusal = TGatewayCertificateStoreCommonRefusal;
|
|
84
|
+
export type TGatewayCertificateStoreImportRefusal = TGatewayCertificateStoreMutationRefusal;
|
|
85
|
+
export type TGatewayCertificateStoreDeleteRefusal = TGatewayCertificateStoreMutationRefusal;
|
|
86
|
+
export type TGatewayCertificateStorePrivateExportRefusal = TGatewayCertificateStoreExportRefusal;
|
|
87
|
+
export type TGatewayCertificateStoreAdminInventoryRefusal = TGatewayCertificateStoreInventoryRefusal | TGatewayCertificateStoreAdminRefusal;
|
|
88
|
+
export type TGatewayCertificateStoreAdminMutationRefusal = TGatewayCertificateStoreMutationRefusal | TGatewayCertificateStoreAdminRefusal | 'fresh-sign-in-required';
|
|
89
|
+
export type TGatewayCertificateStoreAdminExportRefusal = TGatewayCertificateStoreExportRefusal | TGatewayCertificateStoreAdminRefusal | 'fresh-sign-in-required';
|
|
90
|
+
export type TGatewayCertificateStoreWriteResult<TRefusal extends string> = {
|
|
91
|
+
ok: true;
|
|
92
|
+
outcome: 'written' | 'unchanged';
|
|
93
|
+
id: string;
|
|
94
|
+
contentRevision: TSha256Digest;
|
|
95
|
+
usageRevision: TSha256Digest;
|
|
96
|
+
} | {
|
|
97
|
+
ok: false;
|
|
98
|
+
reason: TRefusal;
|
|
99
|
+
};
|
|
100
|
+
export type TGatewayCertificateStoreDeleteResult<TRefusal extends string> = {
|
|
101
|
+
ok: true;
|
|
102
|
+
outcome: 'deleted' | 'unchanged';
|
|
103
|
+
} | {
|
|
104
|
+
ok: false;
|
|
105
|
+
reason: TRefusal;
|
|
106
|
+
};
|
|
107
|
+
export type TGatewayCertificateStoreExportResult<TRefusal extends string> = {
|
|
108
|
+
ok: true;
|
|
109
|
+
certificate: ICert;
|
|
110
|
+
} | {
|
|
111
|
+
ok: false;
|
|
112
|
+
reason: TRefusal;
|
|
113
|
+
};
|
|
114
|
+
export type TGatewayCertificateStoreInventoryResult<TRefusal extends string> = {
|
|
115
|
+
ok: true;
|
|
116
|
+
page: IGatewayCertificateStorePage;
|
|
117
|
+
} | {
|
|
118
|
+
ok: false;
|
|
119
|
+
reason: TRefusal;
|
|
120
|
+
};
|
|
121
|
+
interface IAdminTarget {
|
|
122
|
+
gatewayId: string;
|
|
123
|
+
identity: IIdentityCredential;
|
|
124
|
+
}
|
|
125
|
+
/** Only the adopted controller session can inspect the gateway's legacy stores. */
|
|
126
|
+
export interface IReq_Cloudly_Gateway_ReadCertificateStore extends implementsTR<ITypedRequest, IReq_Cloudly_Gateway_ReadCertificateStore> {
|
|
127
|
+
method: 'readGatewayCertificateStore';
|
|
128
|
+
request: {
|
|
129
|
+
after?: string;
|
|
130
|
+
};
|
|
131
|
+
response: TGatewayCertificateStoreInventoryResult<TGatewayCertificateStoreInventoryRefusal>;
|
|
132
|
+
}
|
|
133
|
+
export interface IReq_Admin_Cloudly_GetCertificateStore extends implementsTR<ITypedRequest, IReq_Admin_Cloudly_GetCertificateStore> {
|
|
134
|
+
method: 'getGatewayCertificateStore';
|
|
135
|
+
request: IAdminTarget & {
|
|
136
|
+
after?: string;
|
|
137
|
+
};
|
|
138
|
+
response: TGatewayCertificateStoreInventoryResult<TGatewayCertificateStoreAdminInventoryRefusal>;
|
|
139
|
+
}
|
|
140
|
+
/** Credential-bearing connector request; Cloudly's HTTP leg requires credential-safe transport. */
|
|
141
|
+
export interface IReq_Cloudly_Gateway_ImportStoredCertificate extends implementsTR<ITypedRequest, IReq_Cloudly_Gateway_ImportStoredCertificate> {
|
|
142
|
+
method: 'importGatewayStoredCertificate';
|
|
143
|
+
request: IGatewayCertificateStoreImport;
|
|
144
|
+
response: TGatewayCertificateStoreWriteResult<TGatewayCertificateStoreImportRefusal>;
|
|
145
|
+
}
|
|
146
|
+
export interface IReq_Admin_Cloudly_ImportStoredCertificate extends implementsTR<ITypedRequest, IReq_Admin_Cloudly_ImportStoredCertificate> {
|
|
147
|
+
method: 'importGatewayStoredCertificateForAdmin';
|
|
148
|
+
request: IAdminTarget & IGatewayCertificateStoreImport;
|
|
149
|
+
response: TGatewayCertificateStoreWriteResult<TGatewayCertificateStoreAdminMutationRefusal>;
|
|
150
|
+
}
|
|
151
|
+
/** Credential-bearing answer: never log, cache, or put it into browser storage. */
|
|
152
|
+
export interface IReq_Cloudly_Gateway_ExportStoredCertificate extends implementsTR<ITypedRequest, IReq_Cloudly_Gateway_ExportStoredCertificate> {
|
|
153
|
+
method: 'exportGatewayStoredCertificate';
|
|
154
|
+
request: IGatewayCertificateStoreTarget;
|
|
155
|
+
response: TGatewayCertificateStoreExportResult<TGatewayCertificateStorePrivateExportRefusal>;
|
|
156
|
+
}
|
|
157
|
+
export interface IReq_Admin_Cloudly_ExportStoredCertificate extends implementsTR<ITypedRequest, IReq_Admin_Cloudly_ExportStoredCertificate> {
|
|
158
|
+
method: 'exportGatewayStoredCertificateForAdmin';
|
|
159
|
+
request: IAdminTarget & IGatewayCertificateStoreTarget;
|
|
160
|
+
response: TGatewayCertificateStoreExportResult<TGatewayCertificateStoreAdminExportRefusal>;
|
|
161
|
+
}
|
|
162
|
+
export interface IReq_Cloudly_Gateway_DeleteStoredCertificate extends implementsTR<ITypedRequest, IReq_Cloudly_Gateway_DeleteStoredCertificate> {
|
|
163
|
+
method: 'deleteGatewayStoredCertificate';
|
|
164
|
+
request: IGatewayCertificateStoreDelete;
|
|
165
|
+
response: TGatewayCertificateStoreDeleteResult<TGatewayCertificateStoreDeleteRefusal>;
|
|
166
|
+
}
|
|
167
|
+
export interface IReq_Admin_Cloudly_DeleteStoredCertificate extends implementsTR<ITypedRequest, IReq_Admin_Cloudly_DeleteStoredCertificate> {
|
|
168
|
+
method: 'deleteGatewayStoredCertificateForAdmin';
|
|
169
|
+
request: IAdminTarget & IGatewayCertificateStoreDelete;
|
|
170
|
+
response: TGatewayCertificateStoreDeleteResult<TGatewayCertificateStoreAdminMutationRefusal>;
|
|
171
|
+
}
|
|
172
|
+
/** A legacy domain can be arbitrarily long or contain controls; keep it exportable by ID. */
|
|
173
|
+
export declare const previewLegacyCertificateDomainName: (value: string) => {
|
|
174
|
+
domainName: string;
|
|
175
|
+
domainNameAltered: boolean;
|
|
176
|
+
};
|
|
177
|
+
export declare const isGatewayCertificateStorePageRequest: (value: unknown) => value is {
|
|
178
|
+
after?: string;
|
|
179
|
+
};
|
|
180
|
+
/** Select from a storage query ordered by ID, strictly after the cursor, limited to page + 1. */
|
|
181
|
+
export declare const selectGatewayCertificateStorePage: <T extends {
|
|
182
|
+
id: string;
|
|
183
|
+
}>(storageWindow: readonly T[], request: unknown) => {
|
|
184
|
+
entries: T[];
|
|
185
|
+
nextAfter?: string;
|
|
186
|
+
} | null;
|
|
187
|
+
/** Rebuilds a metadata-only page; unknown members, including a stray PEM or key, refuse whole. */
|
|
188
|
+
export declare const projectGatewayCertificateStorePage: (value: unknown, request: unknown) => IGatewayCertificateStorePage | null;
|
|
189
|
+
/** The old ICert file's required fields are copied without extra fields; legacy PEM checks stay in the gateway. */
|
|
190
|
+
export declare const projectLegacyCertificateFile: (value: unknown) => ICert | null;
|
|
191
|
+
/** The exact legacy backing for raw D; no trim, domain normalization, or preview is involved. */
|
|
192
|
+
export declare const deriveGatewayCertificateStoreRelatedDomainName: (rawDomainName: string) => string | null;
|
|
193
|
+
export declare const projectGatewayCertificateStoreImport: (value: unknown) => IGatewayCertificateStoreImport | null;
|
|
194
|
+
export declare const projectGatewayCertificateStoreTarget: (value: unknown) => IGatewayCertificateStoreTarget | null;
|
|
195
|
+
export declare const projectGatewayCertificateStoreDelete: (value: unknown) => IGatewayCertificateStoreDelete | null;
|
|
196
|
+
/** A revision fence is not a substitute for visible acknowledgement of each affected consumer. */
|
|
197
|
+
export declare const confirmsGatewayCertificateStoreImpact: (counts: IGatewayCertificateStoreConsumerCounts, confirmation: IGatewayCertificateStoreImpactConfirmation) => boolean;
|
|
198
|
+
export declare const isGatewayCertificateStoreInventoryRefusal: (value: unknown) => value is TGatewayCertificateStoreInventoryRefusal;
|
|
199
|
+
export declare const isGatewayCertificateStoreImportRefusal: (value: unknown) => value is TGatewayCertificateStoreImportRefusal;
|
|
200
|
+
export declare const isGatewayCertificateStoreDeleteRefusal: typeof isGatewayCertificateStoreImportRefusal;
|
|
201
|
+
export declare const isGatewayCertificateStorePrivateExportRefusal: (value: unknown) => value is TGatewayCertificateStorePrivateExportRefusal;
|
|
202
|
+
export declare const projectGatewayCertificateStoreInventoryResult: (value: unknown, request: unknown) => TGatewayCertificateStoreInventoryResult<TGatewayCertificateStoreInventoryRefusal> | null;
|
|
203
|
+
/** Read a gateway write verdict without accepting credentials in a refusal. */
|
|
204
|
+
export declare const projectGatewayCertificateStoreWriteResult: (value: unknown) => TGatewayCertificateStoreWriteResult<TGatewayCertificateStoreImportRefusal> | null;
|
|
205
|
+
export declare const projectGatewayCertificateStoreDeleteResult: (value: unknown) => TGatewayCertificateStoreDeleteResult<TGatewayCertificateStoreDeleteRefusal> | null;
|
|
206
|
+
/** Credential-bearing answer: a malformed file or any extra result member is refused whole. */
|
|
207
|
+
export declare const projectGatewayCertificateStoreExportResult: (value: unknown) => TGatewayCertificateStoreExportResult<TGatewayCertificateStorePrivateExportRefusal> | null;
|
|
208
|
+
export {};
|