@serve.zone/interfaces 20.2.0 → 21.0.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 +10 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/coremail.d.ts +37 -0
- package/dist_ts/data/coremail.js +15 -1
- package/dist_ts/data/coremail.runtime.d.ts +31 -0
- package/dist_ts/data/coremail.runtime.js +419 -0
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/requests/coremail.d.ts +2 -0
- package/package.json +1 -1
- package/readme.md +34 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/coremail.runtime.ts +675 -0
- package/ts/data/coremail.ts +41 -0
- package/ts/data/index.ts +1 -0
- package/ts/requests/coremail.ts +2 -0
package/ts/data/coremail.ts
CHANGED
|
@@ -12,6 +12,7 @@ export type TCoreMailSha256 = `sha256:${string}`;
|
|
|
12
12
|
export type TCoreMailCapability = 'outbound' | 'inbound';
|
|
13
13
|
export type TCoreMailBindingState = 'active' | 'disabled';
|
|
14
14
|
export type TCoreMailCredentialState = 'current' | 'retiring';
|
|
15
|
+
export type TCoreMailCredentialVerifierFormat = 'argon2id-v1';
|
|
15
16
|
export type TCoreMailPartKind = 'text' | 'html' | 'attachment';
|
|
16
17
|
export type TCoreMailTransferMethod = 'PUT' | 'GET';
|
|
17
18
|
export type TCoreMailSubmissionState =
|
|
@@ -163,6 +164,8 @@ export interface ICoreMailBindingCredentialVerifier {
|
|
|
163
164
|
credentialId: string;
|
|
164
165
|
version: number;
|
|
165
166
|
state: TCoreMailCredentialState;
|
|
167
|
+
/** Versioned verifier contract. CoreMail currently accepts only argon2id-v1. */
|
|
168
|
+
format: TCoreMailCredentialVerifierFormat;
|
|
166
169
|
/** Password-verifier string only. Plaintext credential material is never part of desired state. */
|
|
167
170
|
verificationHash: string;
|
|
168
171
|
acceptUntil?: number;
|
|
@@ -195,6 +198,28 @@ export interface ICoreMailGatewayDesiredState {
|
|
|
195
198
|
credentialSecretKey: string;
|
|
196
199
|
}
|
|
197
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Bootstrap authority installed in CoreMail before Coreflow can reconcile
|
|
203
|
+
* ordinary desired state. The verifier payload is safe to deliver as runtime
|
|
204
|
+
* configuration; the matching plaintext is delivered only to Coreflow.
|
|
205
|
+
*/
|
|
206
|
+
export interface ICoreMailControlBootstrap {
|
|
207
|
+
schemaVersion: 1;
|
|
208
|
+
coreMailServiceId: string;
|
|
209
|
+
credentials: ICoreMailBindingCredentialVerifier[];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* dcrouter-owned desired state for one authenticated CoreMail gateway peer.
|
|
214
|
+
* transferOrigin is authoritative control-plane data, never peer supplied.
|
|
215
|
+
*/
|
|
216
|
+
export interface ICoreMailGatewayPeerDesiredState {
|
|
217
|
+
schemaVersion: 1;
|
|
218
|
+
coreMailServiceId: string;
|
|
219
|
+
transferOrigin: string;
|
|
220
|
+
credentials: ICoreMailBindingCredentialVerifier[];
|
|
221
|
+
}
|
|
222
|
+
|
|
198
223
|
export interface ICoreMailDesiredState {
|
|
199
224
|
schemaVersion: 1;
|
|
200
225
|
configEpoch: number;
|
|
@@ -275,3 +300,19 @@ export const coreMailLimits = Object.freeze({
|
|
|
275
300
|
transferIdleTimeoutMs: 15 * 1000,
|
|
276
301
|
transferOverallTimeoutMs: 2 * 60 * 1000,
|
|
277
302
|
} as const);
|
|
303
|
+
|
|
304
|
+
export const coreMailCredentialVerifierPolicy = Object.freeze({
|
|
305
|
+
format: 'argon2id-v1' as const,
|
|
306
|
+
version: 19,
|
|
307
|
+
memoryCost: 65_536,
|
|
308
|
+
timeCost: 3,
|
|
309
|
+
parallelism: 1,
|
|
310
|
+
saltLengthBytes: 16,
|
|
311
|
+
hashLengthBytes: 32,
|
|
312
|
+
} as const);
|
|
313
|
+
|
|
314
|
+
export const coreMailRuntimeKeys = Object.freeze({
|
|
315
|
+
controlBootstrap: 'COREMAIL_CONTROL_BOOTSTRAP',
|
|
316
|
+
controlCredentialSecret: 'COREMAIL_CONTROL_CREDENTIAL_SECRET',
|
|
317
|
+
gatewayCredentialSecret: 'COREMAIL_GATEWAY_CREDENTIAL',
|
|
318
|
+
} as const);
|
package/ts/data/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './cloudlyconfig.js';
|
|
|
2
2
|
export * from './cluster.js';
|
|
3
3
|
export * from './config.js';
|
|
4
4
|
export * from './coremail.js';
|
|
5
|
+
export * from './coremail.runtime.js';
|
|
5
6
|
export * from './deployment.js';
|
|
6
7
|
export * from './deploymentadoption.js';
|
|
7
8
|
export * from './deploymentoperation.js';
|
package/ts/requests/coremail.ts
CHANGED
|
@@ -242,6 +242,8 @@ export interface IReq_CoreMailGatewayAuthenticate extends plugins.typedrequestIn
|
|
|
242
242
|
response: {
|
|
243
243
|
authenticated: true;
|
|
244
244
|
credentialVersion: number;
|
|
245
|
+
/** dcrouter's authoritative, control-plane-bound origin for CoreMail transfer paths. */
|
|
246
|
+
coreMailTransferOrigin: string;
|
|
245
247
|
};
|
|
246
248
|
}
|
|
247
249
|
|