@serve.zone/interfaces 20.1.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 +20 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/coremail.d.ts +253 -0
- package/dist_ts/data/coremail.js +38 -0
- 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 +2 -0
- package/dist_ts/data/index.js +3 -1
- package/dist_ts/requests/coremail.d.ts +250 -0
- package/dist_ts/requests/coremail.js +2 -0
- package/dist_ts/requests/index.d.ts +2 -1
- package/dist_ts/requests/index.js +3 -2
- package/package.json +2 -2
- package/readme.md +64 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/coremail.runtime.ts +675 -0
- package/ts/data/coremail.ts +318 -0
- package/ts/data/index.ts +2 -0
- package/ts/requests/coremail.ts +348 -0
- package/ts/requests/index.ts +2 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-29 - 21.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- harden runtime contracts with canonical digests and transfer-origin binding (coremail)
|
|
8
|
+
- Add strict CoreMail runtime normalization, canonicalization, desired-state digest creation, and digest verification helpers.
|
|
9
|
+
- Require versioned argon2id-v1 verifier format on CoreMail credential DTOs and expose the verifier policy/runtime keys.
|
|
10
|
+
- Add control bootstrap and gateway peer desired-state contracts for verifier metadata and authoritative transfer origins.
|
|
11
|
+
- Return dcrouter-bound CoreMail transfer origin from gateway authentication responses.
|
|
12
|
+
|
|
13
|
+
## 2026-07-29 - 20.2.0
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- add CoreMail data and request contracts (coremail)
|
|
18
|
+
- Export CoreMail shared data models, transfer grants, desired-state structures, reconciliation status, and limits
|
|
19
|
+
- Add CoreMail TypedRequest interfaces for workload authentication, outbound submissions, inbound delivery handling, reconciliation, and gateway handoffs
|
|
20
|
+
- Document CoreMail authority, transfer, and desired-state constraints with contract coverage
|
|
21
|
+
- Bump @api.global/typedrequest-interfaces to ^4.0.0
|
|
22
|
+
|
|
3
23
|
## 2026-07-29 - 20.1.0
|
|
4
24
|
|
|
5
25
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '21.0.0',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CoreMail contracts.
|
|
3
|
+
*
|
|
4
|
+
* Workload authority is always derived from an authenticated transport
|
|
5
|
+
* session. Application-facing request DTOs therefore carry message or
|
|
6
|
+
* delivery identifiers only and never caller-selected tenant, service, or
|
|
7
|
+
* binding authority.
|
|
8
|
+
*/
|
|
9
|
+
export type TCoreMailSha256 = `sha256:${string}`;
|
|
10
|
+
export type TCoreMailCapability = 'outbound' | 'inbound';
|
|
11
|
+
export type TCoreMailBindingState = 'active' | 'disabled';
|
|
12
|
+
export type TCoreMailCredentialState = 'current' | 'retiring';
|
|
13
|
+
export type TCoreMailCredentialVerifierFormat = 'argon2id-v1';
|
|
14
|
+
export type TCoreMailPartKind = 'text' | 'html' | 'attachment';
|
|
15
|
+
export type TCoreMailTransferMethod = 'PUT' | 'GET';
|
|
16
|
+
export type TCoreMailSubmissionState = 'preparing' | 'uploading' | 'ready' | 'accepted' | 'queued' | 'delivering' | 'delivered' | 'deferred' | 'failed' | 'deadLettered';
|
|
17
|
+
export type TCoreMailInboundDeliveryState = 'pending' | 'fetching' | 'fetched' | 'acknowledged';
|
|
18
|
+
export type TCoreMailInboundAckOutcome = 'processed' | 'discarded';
|
|
19
|
+
export type TCoreMailRecipientAction = 'accept' | 'reject' | 'defer';
|
|
20
|
+
export type TCoreMailReconciliationState = 'applying' | 'ready' | 'failed';
|
|
21
|
+
export type TCoreMailErrorCode = 'AUTHENTICATION_FAILED' | 'AUTHENTICATION_EXPIRED' | 'AUTHORITY_REVOKED' | 'CAPABILITY_DENIED' | 'NOT_FOUND' | 'INVALID_REQUEST' | 'INVALID_MAILBOX' | 'INVALID_SENDER' | 'INVALID_RECIPIENT' | 'INVALID_HEADER' | 'PAYLOAD_LIMIT_EXCEEDED' | 'IDEMPOTENCY_CONFLICT' | 'STATE_CONFLICT' | 'TRANSFER_GRANT_EXPIRED' | 'TRANSFER_GRANT_REPLAYED' | 'TRANSFER_LENGTH_MISMATCH' | 'TRANSFER_DIGEST_MISMATCH' | 'TRANSFER_ENCODING_UNSUPPORTED' | 'OBJECT_INTEGRITY_CONFLICT' | 'DELIVERY_NOT_FETCHED' | 'GATEWAY_UNAVAILABLE' | 'RECONCILIATION_FENCE_MISMATCH';
|
|
22
|
+
export interface ICoreMailErrorData {
|
|
23
|
+
code: TCoreMailErrorCode;
|
|
24
|
+
retryable: boolean;
|
|
25
|
+
retryAfterMs?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface ICoreMailMailbox {
|
|
28
|
+
address: string;
|
|
29
|
+
displayName?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ICoreMailEnvelope {
|
|
32
|
+
mailFrom: string;
|
|
33
|
+
rcptTo: string[];
|
|
34
|
+
}
|
|
35
|
+
export interface ICoreMailHeader {
|
|
36
|
+
name: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ICoreMailContentDescriptor {
|
|
40
|
+
partId: string;
|
|
41
|
+
kind: TCoreMailPartKind;
|
|
42
|
+
contentType: string;
|
|
43
|
+
filename?: string;
|
|
44
|
+
contentId?: string;
|
|
45
|
+
sha256: TCoreMailSha256;
|
|
46
|
+
lengthBytes: number;
|
|
47
|
+
}
|
|
48
|
+
export interface ICoreMailOutboundMessageDescriptor {
|
|
49
|
+
sender: ICoreMailMailbox;
|
|
50
|
+
recipients: {
|
|
51
|
+
to: ICoreMailMailbox[];
|
|
52
|
+
cc?: ICoreMailMailbox[];
|
|
53
|
+
bcc?: ICoreMailMailbox[];
|
|
54
|
+
};
|
|
55
|
+
replyTo?: ICoreMailMailbox;
|
|
56
|
+
subject: string;
|
|
57
|
+
/** Ordered headers. Transport-owned MIME headers are not accepted here. */
|
|
58
|
+
headers?: ICoreMailHeader[];
|
|
59
|
+
/** Ordered body and attachment descriptors. Bytes move through bounded HTTP transfers. */
|
|
60
|
+
parts: ICoreMailContentDescriptor[];
|
|
61
|
+
}
|
|
62
|
+
export interface ICoreMailTransferGrant {
|
|
63
|
+
grantId: string;
|
|
64
|
+
method: TCoreMailTransferMethod;
|
|
65
|
+
/** Same-origin path. Callers use the authenticated CoreMail or gateway endpoint they already hold. */
|
|
66
|
+
path: string;
|
|
67
|
+
/** One-time bearer capability. It must never be logged or persisted by a consumer. */
|
|
68
|
+
bearerToken: string;
|
|
69
|
+
sha256: TCoreMailSha256;
|
|
70
|
+
lengthBytes: number;
|
|
71
|
+
contentType: string;
|
|
72
|
+
expiresAt: number;
|
|
73
|
+
}
|
|
74
|
+
export interface ICoreMailUploadGrant extends ICoreMailTransferGrant {
|
|
75
|
+
method: 'PUT';
|
|
76
|
+
}
|
|
77
|
+
export interface ICoreMailDownloadGrant extends ICoreMailTransferGrant {
|
|
78
|
+
method: 'GET';
|
|
79
|
+
}
|
|
80
|
+
export interface ICoreMailPartStatus {
|
|
81
|
+
partId: string;
|
|
82
|
+
state: 'missing' | 'uploading' | 'complete' | 'failed';
|
|
83
|
+
sha256: TCoreMailSha256;
|
|
84
|
+
lengthBytes: number;
|
|
85
|
+
}
|
|
86
|
+
export interface ICoreMailSubmission {
|
|
87
|
+
submissionId: string;
|
|
88
|
+
idempotencyKey: string;
|
|
89
|
+
submissionDigest: TCoreMailSha256;
|
|
90
|
+
state: TCoreMailSubmissionState;
|
|
91
|
+
parts: ICoreMailPartStatus[];
|
|
92
|
+
transportMessageId?: string;
|
|
93
|
+
attempts: number;
|
|
94
|
+
nextAttemptAt?: number;
|
|
95
|
+
acceptedAt?: number;
|
|
96
|
+
deliveredAt?: number;
|
|
97
|
+
createdAt: number;
|
|
98
|
+
updatedAt: number;
|
|
99
|
+
}
|
|
100
|
+
export interface ICoreMailInboundDelivery {
|
|
101
|
+
deliveryId: string;
|
|
102
|
+
transportDeliveryId: string;
|
|
103
|
+
state: TCoreMailInboundDeliveryState;
|
|
104
|
+
envelope: ICoreMailEnvelope;
|
|
105
|
+
rawMime: {
|
|
106
|
+
sha256: TCoreMailSha256;
|
|
107
|
+
lengthBytes: number;
|
|
108
|
+
contentType: 'message/rfc822';
|
|
109
|
+
};
|
|
110
|
+
messageId?: string;
|
|
111
|
+
subject?: string;
|
|
112
|
+
receivedAt: number;
|
|
113
|
+
updatedAt: number;
|
|
114
|
+
}
|
|
115
|
+
export interface ICoreMailBindingCredentialVerifier {
|
|
116
|
+
credentialId: string;
|
|
117
|
+
version: number;
|
|
118
|
+
state: TCoreMailCredentialState;
|
|
119
|
+
/** Versioned verifier contract. CoreMail currently accepts only argon2id-v1. */
|
|
120
|
+
format: TCoreMailCredentialVerifierFormat;
|
|
121
|
+
/** Password-verifier string only. Plaintext credential material is never part of desired state. */
|
|
122
|
+
verificationHash: string;
|
|
123
|
+
acceptUntil?: number;
|
|
124
|
+
}
|
|
125
|
+
export interface ICoreMailBindingDesiredState {
|
|
126
|
+
schemaVersion: 1;
|
|
127
|
+
bindingId: string;
|
|
128
|
+
serviceId: string;
|
|
129
|
+
tenantId: string;
|
|
130
|
+
revision: number;
|
|
131
|
+
state: TCoreMailBindingState;
|
|
132
|
+
capabilities: TCoreMailCapability[];
|
|
133
|
+
credentials: ICoreMailBindingCredentialVerifier[];
|
|
134
|
+
allowedSenders: string[];
|
|
135
|
+
inboundRecipients: string[];
|
|
136
|
+
defaultSender?: string;
|
|
137
|
+
limits?: {
|
|
138
|
+
messagesPerMinute?: number;
|
|
139
|
+
messagesPerDay?: number;
|
|
140
|
+
maxPendingInbound?: number;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export interface ICoreMailGatewayDesiredState {
|
|
144
|
+
endpointUrl: string;
|
|
145
|
+
credentialId: string;
|
|
146
|
+
credentialVersion: number;
|
|
147
|
+
/** Key in CoreMail's resolved runtime secret material, never a plaintext value. */
|
|
148
|
+
credentialSecretKey: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Bootstrap authority installed in CoreMail before Coreflow can reconcile
|
|
152
|
+
* ordinary desired state. The verifier payload is safe to deliver as runtime
|
|
153
|
+
* configuration; the matching plaintext is delivered only to Coreflow.
|
|
154
|
+
*/
|
|
155
|
+
export interface ICoreMailControlBootstrap {
|
|
156
|
+
schemaVersion: 1;
|
|
157
|
+
coreMailServiceId: string;
|
|
158
|
+
credentials: ICoreMailBindingCredentialVerifier[];
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* dcrouter-owned desired state for one authenticated CoreMail gateway peer.
|
|
162
|
+
* transferOrigin is authoritative control-plane data, never peer supplied.
|
|
163
|
+
*/
|
|
164
|
+
export interface ICoreMailGatewayPeerDesiredState {
|
|
165
|
+
schemaVersion: 1;
|
|
166
|
+
coreMailServiceId: string;
|
|
167
|
+
transferOrigin: string;
|
|
168
|
+
credentials: ICoreMailBindingCredentialVerifier[];
|
|
169
|
+
}
|
|
170
|
+
export interface ICoreMailDesiredState {
|
|
171
|
+
schemaVersion: 1;
|
|
172
|
+
configEpoch: number;
|
|
173
|
+
bindings: ICoreMailBindingDesiredState[];
|
|
174
|
+
gateway: ICoreMailGatewayDesiredState;
|
|
175
|
+
}
|
|
176
|
+
export interface ICoreMailReplicaIdentity {
|
|
177
|
+
taskId: string;
|
|
178
|
+
serviceId: string;
|
|
179
|
+
rolloutId: string;
|
|
180
|
+
rolloutGeneration: number;
|
|
181
|
+
imageDigest: TCoreMailSha256;
|
|
182
|
+
}
|
|
183
|
+
export interface ICoreMailBindingReconciliationStatus {
|
|
184
|
+
bindingId: string;
|
|
185
|
+
revision: number;
|
|
186
|
+
state: TCoreMailBindingState;
|
|
187
|
+
activeSessionsByCredentialVersion: Array<{
|
|
188
|
+
version: number;
|
|
189
|
+
count: number;
|
|
190
|
+
}>;
|
|
191
|
+
}
|
|
192
|
+
export interface ICoreMailReconciliationStatus {
|
|
193
|
+
replica: ICoreMailReplicaIdentity;
|
|
194
|
+
state: TCoreMailReconciliationState;
|
|
195
|
+
appliedConfigEpoch: number;
|
|
196
|
+
appliedDesiredStateDigest: TCoreMailSha256;
|
|
197
|
+
bindings: ICoreMailBindingReconciliationStatus[];
|
|
198
|
+
updatedAt: number;
|
|
199
|
+
errorCode?: TCoreMailErrorCode;
|
|
200
|
+
}
|
|
201
|
+
export interface ICoreMailRecipientResolution {
|
|
202
|
+
recipient: string;
|
|
203
|
+
action: TCoreMailRecipientAction;
|
|
204
|
+
/** Opaque, short-lived handle returned only for accepted recipients. */
|
|
205
|
+
routingHandle?: string;
|
|
206
|
+
smtpCode?: number;
|
|
207
|
+
message?: string;
|
|
208
|
+
}
|
|
209
|
+
export interface ICoreMailGatewayMessageDescriptor {
|
|
210
|
+
envelope: ICoreMailEnvelope;
|
|
211
|
+
rawMime: {
|
|
212
|
+
sha256: TCoreMailSha256;
|
|
213
|
+
lengthBytes: number;
|
|
214
|
+
contentType: 'message/rfc822';
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export interface ICoreMailGatewayOutboundStatus {
|
|
218
|
+
transportMessageId: string;
|
|
219
|
+
state: Extract<TCoreMailSubmissionState, 'accepted' | 'queued' | 'delivering' | 'delivered' | 'deferred' | 'failed' | 'deadLettered'>;
|
|
220
|
+
attempts: number;
|
|
221
|
+
nextAttemptAt?: number;
|
|
222
|
+
smtpCode?: number;
|
|
223
|
+
updatedAt: number;
|
|
224
|
+
}
|
|
225
|
+
export declare const coreMailLimits: Readonly<{
|
|
226
|
+
readonly controlMessageBytes: number;
|
|
227
|
+
readonly desiredStateBytes: number;
|
|
228
|
+
readonly textPartBytes: number;
|
|
229
|
+
readonly htmlPartBytes: number;
|
|
230
|
+
readonly attachmentCount: 16;
|
|
231
|
+
readonly attachmentBytes: number;
|
|
232
|
+
readonly aggregateAttachmentBytes: number;
|
|
233
|
+
readonly mimeFramingBytes: number;
|
|
234
|
+
readonly serializedMimeBytes: number;
|
|
235
|
+
readonly transferGrantTtlMs: number;
|
|
236
|
+
readonly transferHeaderTimeoutMs: number;
|
|
237
|
+
readonly transferIdleTimeoutMs: number;
|
|
238
|
+
readonly transferOverallTimeoutMs: number;
|
|
239
|
+
}>;
|
|
240
|
+
export declare const coreMailCredentialVerifierPolicy: Readonly<{
|
|
241
|
+
readonly format: "argon2id-v1";
|
|
242
|
+
readonly version: 19;
|
|
243
|
+
readonly memoryCost: 65536;
|
|
244
|
+
readonly timeCost: 3;
|
|
245
|
+
readonly parallelism: 1;
|
|
246
|
+
readonly saltLengthBytes: 16;
|
|
247
|
+
readonly hashLengthBytes: 32;
|
|
248
|
+
}>;
|
|
249
|
+
export declare const coreMailRuntimeKeys: Readonly<{
|
|
250
|
+
readonly controlBootstrap: "COREMAIL_CONTROL_BOOTSTRAP";
|
|
251
|
+
readonly controlCredentialSecret: "COREMAIL_CONTROL_CREDENTIAL_SECRET";
|
|
252
|
+
readonly gatewayCredentialSecret: "COREMAIL_GATEWAY_CREDENTIAL";
|
|
253
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CoreMail contracts.
|
|
3
|
+
*
|
|
4
|
+
* Workload authority is always derived from an authenticated transport
|
|
5
|
+
* session. Application-facing request DTOs therefore carry message or
|
|
6
|
+
* delivery identifiers only and never caller-selected tenant, service, or
|
|
7
|
+
* binding authority.
|
|
8
|
+
*/
|
|
9
|
+
export const coreMailLimits = Object.freeze({
|
|
10
|
+
controlMessageBytes: 64 * 1024,
|
|
11
|
+
desiredStateBytes: 8 * 1024 * 1024,
|
|
12
|
+
textPartBytes: 1 * 1024 * 1024,
|
|
13
|
+
htmlPartBytes: 2 * 1024 * 1024,
|
|
14
|
+
attachmentCount: 16,
|
|
15
|
+
attachmentBytes: 10 * 1024 * 1024,
|
|
16
|
+
aggregateAttachmentBytes: 17 * 1024 * 1024,
|
|
17
|
+
mimeFramingBytes: 512 * 1024,
|
|
18
|
+
serializedMimeBytes: 30 * 1024 * 1024,
|
|
19
|
+
transferGrantTtlMs: 5 * 60 * 1000,
|
|
20
|
+
transferHeaderTimeoutMs: 10 * 1000,
|
|
21
|
+
transferIdleTimeoutMs: 15 * 1000,
|
|
22
|
+
transferOverallTimeoutMs: 2 * 60 * 1000,
|
|
23
|
+
});
|
|
24
|
+
export const coreMailCredentialVerifierPolicy = Object.freeze({
|
|
25
|
+
format: 'argon2id-v1',
|
|
26
|
+
version: 19,
|
|
27
|
+
memoryCost: 65_536,
|
|
28
|
+
timeCost: 3,
|
|
29
|
+
parallelism: 1,
|
|
30
|
+
saltLengthBytes: 16,
|
|
31
|
+
hashLengthBytes: 32,
|
|
32
|
+
});
|
|
33
|
+
export const coreMailRuntimeKeys = Object.freeze({
|
|
34
|
+
controlBootstrap: 'COREMAIL_CONTROL_BOOTSTRAP',
|
|
35
|
+
controlCredentialSecret: 'COREMAIL_CONTROL_CREDENTIAL_SECRET',
|
|
36
|
+
gatewayCredentialSecret: 'COREMAIL_GATEWAY_CREDENTIAL',
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZW1haWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2NvcmVtYWlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7O0dBT0c7QUF3UkgsTUFBTSxDQUFDLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDMUMsbUJBQW1CLEVBQUUsRUFBRSxHQUFHLElBQUk7SUFDOUIsaUJBQWlCLEVBQUUsQ0FBQyxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2xDLGFBQWEsRUFBRSxDQUFDLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDOUIsYUFBYSxFQUFFLENBQUMsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUM5QixlQUFlLEVBQUUsRUFBRTtJQUNuQixlQUFlLEVBQUUsRUFBRSxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2pDLHdCQUF3QixFQUFFLEVBQUUsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUMxQyxnQkFBZ0IsRUFBRSxHQUFHLEdBQUcsSUFBSTtJQUM1QixtQkFBbUIsRUFBRSxFQUFFLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDckMsa0JBQWtCLEVBQUUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxJQUFJO0lBQ2pDLHVCQUF1QixFQUFFLEVBQUUsR0FBRyxJQUFJO0lBQ2xDLHFCQUFxQixFQUFFLEVBQUUsR0FBRyxJQUFJO0lBQ2hDLHdCQUF3QixFQUFFLENBQUMsR0FBRyxFQUFFLEdBQUcsSUFBSTtDQUMvQixDQUFDLENBQUM7QUFFWixNQUFNLENBQUMsTUFBTSxnQ0FBZ0MsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDO0lBQzVELE1BQU0sRUFBRSxhQUFzQjtJQUM5QixPQUFPLEVBQUUsRUFBRTtJQUNYLFVBQVUsRUFBRSxNQUFNO0lBQ2xCLFFBQVEsRUFBRSxDQUFDO0lBQ1gsV0FBVyxFQUFFLENBQUM7SUFDZCxlQUFlLEVBQUUsRUFBRTtJQUNuQixlQUFlLEVBQUUsRUFBRTtDQUNYLENBQUMsQ0FBQztBQUVaLE1BQU0sQ0FBQyxNQUFNLG1CQUFtQixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDL0MsZ0JBQWdCLEVBQUUsNEJBQTRCO0lBQzlDLHVCQUF1QixFQUFFLG9DQUFvQztJQUM3RCx1QkFBdUIsRUFBRSw2QkFBNkI7Q0FDOUMsQ0FBQyxDQUFDIn0=
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ICoreMailBindingCredentialVerifier, type ICoreMailControlBootstrap, type ICoreMailDesiredState, type ICoreMailGatewayPeerDesiredState, type TCoreMailSha256 } from './coremail.js';
|
|
2
|
+
export declare const coreMailCanonicalJsonRules: Readonly<{
|
|
3
|
+
version: 1;
|
|
4
|
+
encoding: "utf-8";
|
|
5
|
+
objectKeyOrdering: "utf-16-code-unit-ascending";
|
|
6
|
+
arrayOrdering: "preserved-dense";
|
|
7
|
+
unicodeNormalization: "preserved";
|
|
8
|
+
numberEncoding: "safe-integer-json-no-negative-zero";
|
|
9
|
+
digest: "sha256-lowercase-hex";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const coreMailContractLimits: Readonly<{
|
|
12
|
+
readonly maximumIdentifierBytes: 128;
|
|
13
|
+
readonly maximumEnvironmentKeyBytes: 128;
|
|
14
|
+
readonly maximumEndpointBytes: 2048;
|
|
15
|
+
readonly maximumMailboxBytes: 254;
|
|
16
|
+
readonly maximumBindings: 10000;
|
|
17
|
+
readonly maximumCredentialsPerAuthority: 16;
|
|
18
|
+
readonly maximumAllowedSendersPerBinding: 1000;
|
|
19
|
+
readonly maximumInboundRecipientsPerBinding: 10000;
|
|
20
|
+
}>;
|
|
21
|
+
export declare class CoreMailContractError extends Error {
|
|
22
|
+
constructor(reasonArg: string);
|
|
23
|
+
}
|
|
24
|
+
export declare const normalizeCoreMailSha256: (valueArg: unknown, pathArg?: string) => TCoreMailSha256;
|
|
25
|
+
export declare const normalizeCoreMailCredentialVerifier: (valueArg: unknown, pathArg?: string) => ICoreMailBindingCredentialVerifier;
|
|
26
|
+
export declare const normalizeCoreMailDesiredState: (valueArg: unknown) => ICoreMailDesiredState;
|
|
27
|
+
export declare const canonicalizeCoreMailDesiredState: (valueArg: unknown) => string;
|
|
28
|
+
export declare const createCoreMailDesiredStateDigest: (valueArg: unknown) => Promise<TCoreMailSha256>;
|
|
29
|
+
export declare const verifyCoreMailDesiredStateDigest: (valueArg: unknown, digestArg: unknown) => Promise<boolean>;
|
|
30
|
+
export declare const normalizeCoreMailControlBootstrap: (valueArg: unknown) => ICoreMailControlBootstrap;
|
|
31
|
+
export declare const normalizeCoreMailGatewayPeerDesiredState: (valueArg: unknown) => ICoreMailGatewayPeerDesiredState;
|