@serve.zone/interfaces 6.2.1 → 6.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 +13 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/index.d.ts +1 -0
- package/dist_ts/data/index.js +2 -1
- package/dist_ts/data/mail.d.ts +291 -0
- package/dist_ts/data/mail.js +2 -0
- package/dist_ts/requests/index.d.ts +3 -1
- package/dist_ts/requests/index.js +4 -2
- package/dist_ts/requests/mail.d.ts +201 -0
- package/dist_ts/requests/mail.js +2 -0
- package/package.json +1 -1
- package/readme.md +7 -2
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/index.ts +1 -0
- package/ts/data/mail.ts +354 -0
- package/ts/requests/index.ts +3 -0
- package/ts/requests/mail.ts +290 -0
package/changelog.md
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 2026-06-05 - 6.3.0
|
|
4
4
|
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- add mail interfaces and request contracts (mail)
|
|
8
|
+
- Define mail data models for resource owners, address patterns, domain authorities, bindings, credentials, spool items, delivery status, journal events, and message payloads.
|
|
9
|
+
- Add typed request contracts for mail authority and binding management, credential rotation, recipient resolution, inbound delivery, spool inspection, delivery journals, and outbound enqueueing.
|
|
10
|
+
- Export mail data and request modules and validate the mail request namespace in tests.
|
|
11
|
+
|
|
12
|
+
### Fixes
|
|
13
|
+
|
|
14
|
+
- update public API documentation for appstore and mail contracts (readme)
|
|
15
|
+
- Document the appstore root namespace and request group.
|
|
16
|
+
- List hostedapp and mail request groups plus mail gateway data contracts.
|
|
5
17
|
|
|
6
18
|
## 2026-05-28 - 6.2.1
|
|
7
19
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '6.
|
|
6
|
+
version: '6.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=
|
package/dist_ts/data/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './event.js';
|
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
10
|
export * from './hostedapp.js';
|
|
11
11
|
export * from './image.js';
|
|
12
|
+
export * from './mail.js';
|
|
12
13
|
export * from './registry.js';
|
|
13
14
|
export * from './secretbundle.js';
|
|
14
15
|
export * from './secretgroup.js';
|
package/dist_ts/data/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from './event.js';
|
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
10
|
export * from './hostedapp.js';
|
|
11
11
|
export * from './image.js';
|
|
12
|
+
export * from './mail.js';
|
|
12
13
|
export * from './registry.js';
|
|
13
14
|
export * from './secretbundle.js';
|
|
14
15
|
export * from './secretgroup.js';
|
|
@@ -23,4 +24,4 @@ export * from './taskexecution.js';
|
|
|
23
24
|
export * from './traffic.js';
|
|
24
25
|
export * from './user.js';
|
|
25
26
|
export * from './version.js';
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0JBQW9CLENBQUM7QUFDbkMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLFVBQVUsQ0FBQztBQUN6QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLFlBQVksQ0FBQztBQUMzQixjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsV0FBVyxDQUFDO0FBQzFCLGNBQWMsY0FBYyxDQUFDIn0=
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
export type TMailGatewayClientType = 'onebox' | 'cloudly' | 'custom' | (string & {});
|
|
2
|
+
export type TMailAddressPatternType = 'exactAddress' | 'domainWildcard' | 'localPartPattern';
|
|
3
|
+
export type TMailInboundTargetType = 'webhook' | 'smtpForward' | 'typedEndpoint' | 'discard' | 'reject';
|
|
4
|
+
export type TMailRecipientPolicyMode = 'acceptAll' | 'staticList' | 'cachedResolver' | 'appResolver';
|
|
5
|
+
export type TMailCredentialType = 'smtp' | 'api';
|
|
6
|
+
export type TMailCredentialStatus = 'active' | 'disabled' | 'rotated' | 'revoked';
|
|
7
|
+
export type TMailResourceStatus = 'active' | 'disabled' | 'pending' | 'failed';
|
|
8
|
+
export type TMailSpoolDirection = 'inbound' | 'outbound';
|
|
9
|
+
export type TMailSpoolStatus = 'accepted' | 'queued' | 'delivering' | 'delivered' | 'deferred' | 'failed' | 'deadLettered' | 'rejected';
|
|
10
|
+
export type TMailDeliveryTargetType = 'webhook' | 'smtpForward' | 'typedEndpoint' | 'mtaRelay' | 'discard' | 'reject';
|
|
11
|
+
export type TMailBounceType = 'hard' | 'soft' | 'complaint' | 'unknown';
|
|
12
|
+
export type TMailInboundProtocol = 'smtp' | 'submission' | 'api';
|
|
13
|
+
export type TMailRecipientResolutionAction = 'accept' | 'reject' | 'defer';
|
|
14
|
+
export type TMailDeliveryJournalEventType = 'accepted' | 'queued' | 'deliveryStarted' | 'deliverySucceeded' | 'deliveryDeferred' | 'deliveryFailed' | 'deadLettered' | 'rejected' | 'bounced' | 'complaint';
|
|
15
|
+
/**
|
|
16
|
+
* Runtime owner of a mail resource. `appInstanceId` is the deployed WorkApp or service
|
|
17
|
+
* instance, not an App Store template id.
|
|
18
|
+
*/
|
|
19
|
+
export interface IMailResourceOwner {
|
|
20
|
+
gatewayClientType: TMailGatewayClientType;
|
|
21
|
+
gatewayClientId: string;
|
|
22
|
+
appInstanceId?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IMailAddressPattern {
|
|
25
|
+
type: TMailAddressPatternType;
|
|
26
|
+
domain: string;
|
|
27
|
+
localPart?: string;
|
|
28
|
+
localPartPattern?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IMailWebhookTarget {
|
|
31
|
+
url: string;
|
|
32
|
+
signingSecretRef?: string;
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
maxInlineBytes?: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IMailSmtpForwardTarget {
|
|
38
|
+
host: string;
|
|
39
|
+
port: number;
|
|
40
|
+
credentialRef?: string;
|
|
41
|
+
preserveHeaders?: boolean;
|
|
42
|
+
addHeaders?: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
export interface IMailTypedEndpointTarget {
|
|
45
|
+
serviceRef?: string;
|
|
46
|
+
method: string;
|
|
47
|
+
queueName?: string;
|
|
48
|
+
timeoutMs?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface IMailInboundTarget {
|
|
51
|
+
type: TMailInboundTargetType;
|
|
52
|
+
webhook?: IMailWebhookTarget;
|
|
53
|
+
smtpForward?: IMailSmtpForwardTarget;
|
|
54
|
+
typedEndpoint?: IMailTypedEndpointTarget;
|
|
55
|
+
reject?: {
|
|
56
|
+
smtpCode: number;
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export interface IMailRecipientResolverTarget {
|
|
61
|
+
type: 'webhook' | 'typedEndpoint';
|
|
62
|
+
webhook?: IMailWebhookTarget;
|
|
63
|
+
typedEndpoint?: IMailTypedEndpointTarget;
|
|
64
|
+
}
|
|
65
|
+
export interface IMailRecipientPolicy {
|
|
66
|
+
mode: TMailRecipientPolicyMode;
|
|
67
|
+
staticRecipients?: string[];
|
|
68
|
+
resolver?: IMailRecipientResolverTarget;
|
|
69
|
+
cacheTtlMs?: number;
|
|
70
|
+
unavailableResponse?: {
|
|
71
|
+
smtpCode: number;
|
|
72
|
+
message: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export interface IMailSpoolPolicy {
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
maxRetryAgeMs?: number;
|
|
78
|
+
retentionMs?: number;
|
|
79
|
+
maxQueuedMessages?: number;
|
|
80
|
+
maxQueuedBytes?: number;
|
|
81
|
+
initialRetryDelayMs?: number;
|
|
82
|
+
maxRetryDelayMs?: number;
|
|
83
|
+
deadLetterOnExpiry?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export interface IMailRateLimits {
|
|
86
|
+
messagesPerMinute?: number;
|
|
87
|
+
messagesPerHour?: number;
|
|
88
|
+
messagesPerDay?: number;
|
|
89
|
+
recipientsPerMessage?: number;
|
|
90
|
+
}
|
|
91
|
+
export interface IMailDomainAuthority {
|
|
92
|
+
id: string;
|
|
93
|
+
owner: IMailResourceOwner;
|
|
94
|
+
domain: string;
|
|
95
|
+
addressPattern: IMailAddressPattern;
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
status: TMailResourceStatus;
|
|
98
|
+
inboundTarget?: IMailInboundTarget;
|
|
99
|
+
outboundPolicy?: {
|
|
100
|
+
allowedFromPatterns: IMailAddressPattern[];
|
|
101
|
+
dkimSelector?: string;
|
|
102
|
+
rateLimits?: IMailRateLimits;
|
|
103
|
+
};
|
|
104
|
+
recipientPolicy: IMailRecipientPolicy;
|
|
105
|
+
spoolPolicy?: IMailSpoolPolicy;
|
|
106
|
+
createdAt: number;
|
|
107
|
+
updatedAt: number;
|
|
108
|
+
createdBy?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface IMailAddressBinding {
|
|
111
|
+
id: string;
|
|
112
|
+
owner: IMailResourceOwner;
|
|
113
|
+
address: string;
|
|
114
|
+
localPart: string;
|
|
115
|
+
domain: string;
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
status: TMailResourceStatus;
|
|
118
|
+
inboundTarget?: IMailInboundTarget;
|
|
119
|
+
outboundIdentityId?: string;
|
|
120
|
+
recipientPolicy?: IMailRecipientPolicy;
|
|
121
|
+
spoolPolicy?: IMailSpoolPolicy;
|
|
122
|
+
createdAt: number;
|
|
123
|
+
updatedAt: number;
|
|
124
|
+
createdBy?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface IMailCredentialPublic {
|
|
127
|
+
id: string;
|
|
128
|
+
type: TMailCredentialType;
|
|
129
|
+
status: TMailCredentialStatus;
|
|
130
|
+
username?: string;
|
|
131
|
+
scopes?: string[];
|
|
132
|
+
createdAt: number;
|
|
133
|
+
updatedAt: number;
|
|
134
|
+
lastRotatedAt?: number;
|
|
135
|
+
}
|
|
136
|
+
export interface IMailCredentialOneTimeSecret {
|
|
137
|
+
credential: IMailCredentialPublic;
|
|
138
|
+
secret: string;
|
|
139
|
+
secretShownOnce: true;
|
|
140
|
+
}
|
|
141
|
+
export interface IMailOutboundIdentity {
|
|
142
|
+
id: string;
|
|
143
|
+
owner: IMailResourceOwner;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
status: TMailResourceStatus;
|
|
146
|
+
allowedFromPatterns: IMailAddressPattern[];
|
|
147
|
+
defaultFrom?: string;
|
|
148
|
+
domain?: string;
|
|
149
|
+
dkimSelector?: string;
|
|
150
|
+
credential?: IMailCredentialPublic;
|
|
151
|
+
rateLimits?: IMailRateLimits;
|
|
152
|
+
createdAt: number;
|
|
153
|
+
updatedAt: number;
|
|
154
|
+
createdBy?: string;
|
|
155
|
+
}
|
|
156
|
+
export interface IWorkAppMailBinding {
|
|
157
|
+
id: string;
|
|
158
|
+
owner: IMailResourceOwner & {
|
|
159
|
+
appInstanceId: string;
|
|
160
|
+
};
|
|
161
|
+
enabled: boolean;
|
|
162
|
+
status: TMailResourceStatus;
|
|
163
|
+
domainAuthorityIds?: string[];
|
|
164
|
+
addressBindingIds?: string[];
|
|
165
|
+
outboundIdentityIds?: string[];
|
|
166
|
+
defaultFrom?: string;
|
|
167
|
+
inboundTarget?: IMailInboundTarget;
|
|
168
|
+
createdAt: number;
|
|
169
|
+
updatedAt: number;
|
|
170
|
+
createdBy?: string;
|
|
171
|
+
}
|
|
172
|
+
export interface IMailEnvelope {
|
|
173
|
+
mailFrom: string;
|
|
174
|
+
rcptTo: string[];
|
|
175
|
+
}
|
|
176
|
+
export interface IMailDeliveryTargetSummary {
|
|
177
|
+
type: TMailDeliveryTargetType;
|
|
178
|
+
label?: string;
|
|
179
|
+
address?: string;
|
|
180
|
+
url?: string;
|
|
181
|
+
host?: string;
|
|
182
|
+
port?: number;
|
|
183
|
+
serviceRef?: string;
|
|
184
|
+
method?: string;
|
|
185
|
+
queueName?: string;
|
|
186
|
+
}
|
|
187
|
+
export interface IMailConnectionInfo {
|
|
188
|
+
protocol: TMailInboundProtocol;
|
|
189
|
+
remoteAddress?: string;
|
|
190
|
+
proxyAddress?: string;
|
|
191
|
+
heloName?: string;
|
|
192
|
+
tls?: boolean;
|
|
193
|
+
authUsername?: string;
|
|
194
|
+
authenticatedCredentialId?: string;
|
|
195
|
+
}
|
|
196
|
+
export interface IMailRecipientResolution {
|
|
197
|
+
recipient: string;
|
|
198
|
+
action: TMailRecipientResolutionAction;
|
|
199
|
+
owner?: IMailResourceOwner;
|
|
200
|
+
domainAuthorityId?: string;
|
|
201
|
+
addressBindingId?: string;
|
|
202
|
+
target?: IMailInboundTarget;
|
|
203
|
+
smtpCode?: number;
|
|
204
|
+
message?: string;
|
|
205
|
+
cacheTtlMs?: number;
|
|
206
|
+
}
|
|
207
|
+
export interface IMailSpoolItem {
|
|
208
|
+
id: string;
|
|
209
|
+
owner?: IMailResourceOwner;
|
|
210
|
+
direction: TMailSpoolDirection;
|
|
211
|
+
status: TMailSpoolStatus;
|
|
212
|
+
envelope: IMailEnvelope;
|
|
213
|
+
messageId?: string;
|
|
214
|
+
subject?: string;
|
|
215
|
+
target?: IMailDeliveryTargetSummary;
|
|
216
|
+
attempts: number;
|
|
217
|
+
nextAttemptAt?: number;
|
|
218
|
+
lastError?: string;
|
|
219
|
+
rawAvailableUntil?: number;
|
|
220
|
+
createdAt: number;
|
|
221
|
+
updatedAt: number;
|
|
222
|
+
}
|
|
223
|
+
export interface IMailDeliveryAttempt {
|
|
224
|
+
id: string;
|
|
225
|
+
spoolItemId: string;
|
|
226
|
+
target: IMailDeliveryTargetSummary;
|
|
227
|
+
status: TMailSpoolStatus;
|
|
228
|
+
startedAt: number;
|
|
229
|
+
completedAt?: number;
|
|
230
|
+
smtpCode?: number;
|
|
231
|
+
response?: string;
|
|
232
|
+
error?: string;
|
|
233
|
+
}
|
|
234
|
+
export interface IMailBounceEvent {
|
|
235
|
+
id: string;
|
|
236
|
+
spoolItemId?: string;
|
|
237
|
+
owner?: IMailResourceOwner;
|
|
238
|
+
recipient: string;
|
|
239
|
+
bounceType: TMailBounceType;
|
|
240
|
+
diagnosticCode?: string;
|
|
241
|
+
receivedAt: number;
|
|
242
|
+
}
|
|
243
|
+
export interface IMailDeliveryStatus {
|
|
244
|
+
spoolItem?: IMailSpoolItem;
|
|
245
|
+
attempts: IMailDeliveryAttempt[];
|
|
246
|
+
bounceEvents?: IMailBounceEvent[];
|
|
247
|
+
}
|
|
248
|
+
export interface IMailDeliveryJournalEvent {
|
|
249
|
+
id: string;
|
|
250
|
+
spoolItemId: string;
|
|
251
|
+
owner?: IMailResourceOwner;
|
|
252
|
+
direction: TMailSpoolDirection;
|
|
253
|
+
type: TMailDeliveryJournalEventType;
|
|
254
|
+
status: TMailSpoolStatus;
|
|
255
|
+
envelope?: IMailEnvelope;
|
|
256
|
+
target?: IMailDeliveryTargetSummary;
|
|
257
|
+
attemptId?: string;
|
|
258
|
+
smtpCode?: number;
|
|
259
|
+
response?: string;
|
|
260
|
+
error?: string;
|
|
261
|
+
message?: string;
|
|
262
|
+
createdAt: number;
|
|
263
|
+
}
|
|
264
|
+
export interface IMailInboundMessagePayload {
|
|
265
|
+
spoolItemId: string;
|
|
266
|
+
owner?: IMailResourceOwner;
|
|
267
|
+
envelope: IMailEnvelope;
|
|
268
|
+
rawMessage: string;
|
|
269
|
+
sizeBytes?: number;
|
|
270
|
+
messageId?: string;
|
|
271
|
+
subject?: string;
|
|
272
|
+
headers?: Record<string, string | string[]>;
|
|
273
|
+
source?: IMailConnectionInfo;
|
|
274
|
+
receivedAt: number;
|
|
275
|
+
}
|
|
276
|
+
export interface IMailOutboundAttachmentPayload {
|
|
277
|
+
filename: string;
|
|
278
|
+
contentType?: string;
|
|
279
|
+
binaryAttachmentString: string;
|
|
280
|
+
}
|
|
281
|
+
export interface IMailOutboundMessagePayload {
|
|
282
|
+
from: string;
|
|
283
|
+
to: string[];
|
|
284
|
+
cc?: string[];
|
|
285
|
+
bcc?: string[];
|
|
286
|
+
subject: string;
|
|
287
|
+
text?: string;
|
|
288
|
+
html?: string;
|
|
289
|
+
headers?: Record<string, string>;
|
|
290
|
+
attachments?: IMailOutboundAttachmentPayload[];
|
|
291
|
+
}
|
|
@@ -15,6 +15,7 @@ import * as identityRequests from './identity.js';
|
|
|
15
15
|
import * as imageRequests from './image.js';
|
|
16
16
|
import * as informRequests from './inform.js';
|
|
17
17
|
import * as logRequests from './log.js';
|
|
18
|
+
import * as mailRequests from './mail.js';
|
|
18
19
|
import * as networkRequests from './network.js';
|
|
19
20
|
import * as nodeRequests from './node.js';
|
|
20
21
|
import * as platformRequests from './platform.js';
|
|
@@ -27,6 +28,7 @@ import * as settingsRequests from './settings.js';
|
|
|
27
28
|
import * as statusRequests from './status.js';
|
|
28
29
|
import * as taskRequests from './task.js';
|
|
29
30
|
import * as versionRequests from './version.js';
|
|
30
|
-
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, 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, };
|
|
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, };
|
|
31
32
|
export * from './inform.js';
|
|
32
33
|
export * from './hostedapp.js';
|
|
34
|
+
export * from './mail.js';
|
|
@@ -16,6 +16,7 @@ import * as identityRequests from './identity.js';
|
|
|
16
16
|
import * as imageRequests from './image.js';
|
|
17
17
|
import * as informRequests from './inform.js';
|
|
18
18
|
import * as logRequests from './log.js';
|
|
19
|
+
import * as mailRequests from './mail.js';
|
|
19
20
|
import * as networkRequests from './network.js';
|
|
20
21
|
import * as nodeRequests from './node.js';
|
|
21
22
|
import * as platformRequests from './platform.js';
|
|
@@ -28,7 +29,8 @@ 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, 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, 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';
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUV6QyxPQUFPLEtBQUssYUFBYSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sS0FBSyxpQkFBaUIsTUFBTSxnQkFBZ0IsQ0FBQztBQUNwRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGtCQUFrQixNQUFNLGlCQUFpQixDQUFDO0FBQ3RELE9BQU8sS0FBSyxXQUFXLE1BQU0sVUFBVSxDQUFDO0FBQ3hDLE9BQU8sS0FBSyxjQUFjLE1BQU0sYUFBYSxDQUFDO0FBQzlDLE9BQU8sS0FBSyx3QkFBd0IsTUFBTSx1QkFBdUIsQ0FBQztBQUNsRSxPQUFPLEtBQUssaUJBQWlCLE1BQU0sZ0JBQWdCLENBQUM7QUFDcEQsT0FBTyxLQUFLLGdCQUFnQixNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEtBQUssYUFBYSxNQUFNLFlBQVksQ0FBQztBQUM1QyxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssV0FBVyxNQUFNLFVBQVUsQ0FBQztBQUN4QyxPQUFPLEtBQUssWUFBWSxNQUFNLFdBQVcsQ0FBQztBQUMxQyxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUNoRCxPQUFPLEtBQUssWUFBWSxNQUFNLFdBQVcsQ0FBQztBQUMxQyxPQUFPLEtBQUssZ0JBQWdCLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sS0FBSyxlQUFlLE1BQU0sY0FBYyxDQUFDO0FBQ2hELE9BQU8sS0FBSyxvQkFBb0IsTUFBTSxtQkFBbUIsQ0FBQztBQUMxRCxPQUFPLEtBQUssbUJBQW1CLE1BQU0sa0JBQWtCLENBQUM7QUFDeEQsT0FBTyxLQUFLLGNBQWMsTUFBTSxhQUFhLENBQUM7QUFDOUMsT0FBTyxLQUFLLGVBQWUsTUFBTSxjQUFjLENBQUM7QUFDaEQsT0FBTyxLQUFLLGdCQUFnQixNQUFNLGVBQWUsQ0FBQztBQUNsRCxPQUFPLEtBQUssY0FBYyxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEtBQUssWUFBWSxNQUFNLFdBQVcsQ0FBQztBQUMxQyxPQUFPLEtBQUssZUFBZSxNQUFNLGNBQWMsQ0FBQztBQUVoRCxPQUFPLEVBQ0wsYUFBYSxJQUFJLEtBQUssRUFDdEIsZ0JBQWdCLElBQUksUUFBUSxFQUM1QixpQkFBaUIsSUFBSSxTQUFTLEVBQzlCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLG1CQUFtQixJQUFJLFdBQVcsRUFDbEMsZUFBZSxJQUFJLE9BQU8sRUFDMUIsY0FBYyxJQUFJLE1BQU0sRUFDeEIsa0JBQWtCLElBQUksVUFBVSxFQUNoQyxXQUFXLElBQUksR0FBRyxFQUNsQixjQUFjLElBQUksTUFBTSxFQUN4Qix3QkFBd0IsSUFBSSxnQkFBZ0IsRUFDNUMsaUJBQWlCLElBQUksU0FBUyxFQUM5QixnQkFBZ0IsSUFBSSxRQUFRLEVBQzVCLGFBQWEsSUFBSSxLQUFLLEVBQ3RCLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLFdBQVcsSUFBSSxHQUFHLEVBQ2xCLFlBQVksSUFBSSxJQUFJLEVBQ3BCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLFlBQVksSUFBSSxJQUFJLEVBQ3BCLGdCQUFnQixJQUFJLFFBQVEsRUFDNUIsZUFBZSxJQUFJLE9BQU8sRUFDMUIsb0JBQW9CLElBQUksWUFBWSxFQUNwQyxtQkFBbUIsSUFBSSxXQUFXLEVBQ2xDLGNBQWMsSUFBSSxNQUFNLEVBQ3hCLGVBQWUsSUFBSSxPQUFPLEVBQzFCLGdCQUFnQixJQUFJLFFBQVEsRUFDNUIsY0FBYyxJQUFJLE1BQU0sRUFDeEIsWUFBWSxJQUFJLElBQUksRUFDcEIsZUFBZSxJQUFJLE9BQU8sR0FDM0IsQ0FBQztBQUVGLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxXQUFXLENBQUMifQ==
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type { IIdentity } from '../data/user.js';
|
|
3
|
+
import type { IMailAddressBinding, IMailCredentialOneTimeSecret, IMailConnectionInfo, IMailDeliveryJournalEvent, IMailDeliveryStatus, IMailDomainAuthority, IMailEnvelope, IMailInboundMessagePayload, IMailOutboundIdentity, IMailOutboundMessagePayload, IMailRecipientResolution, IMailResourceOwner, IMailSpoolItem, IWorkAppMailBinding } from '../data/mail.js';
|
|
4
|
+
export interface IMailControlRequestAuth {
|
|
5
|
+
identity?: IIdentity;
|
|
6
|
+
apiToken?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IMailSubmissionRequestAuth extends IMailControlRequestAuth {
|
|
9
|
+
credentialId?: string;
|
|
10
|
+
credentialSecret?: string;
|
|
11
|
+
}
|
|
12
|
+
export type TMailDomainAuthoritySync = Omit<IMailDomainAuthority, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'> & {
|
|
13
|
+
id?: string;
|
|
14
|
+
};
|
|
15
|
+
export type TMailAddressBindingSync = Omit<IMailAddressBinding, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'> & {
|
|
16
|
+
id?: string;
|
|
17
|
+
};
|
|
18
|
+
export type TWorkAppMailBindingSync = Omit<IWorkAppMailBinding, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'> & {
|
|
19
|
+
id?: string;
|
|
20
|
+
};
|
|
21
|
+
export interface IReq_ListMailDomainAuthorities extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListMailDomainAuthorities> {
|
|
22
|
+
method: 'listMailDomainAuthorities';
|
|
23
|
+
request: {
|
|
24
|
+
auth: IMailControlRequestAuth;
|
|
25
|
+
owner?: Partial<IMailResourceOwner>;
|
|
26
|
+
domain?: string;
|
|
27
|
+
};
|
|
28
|
+
response: {
|
|
29
|
+
authorities: IMailDomainAuthority[];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface IReq_SyncMailDomainAuthority extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SyncMailDomainAuthority> {
|
|
33
|
+
method: 'syncMailDomainAuthority';
|
|
34
|
+
request: {
|
|
35
|
+
auth: IMailControlRequestAuth;
|
|
36
|
+
authority: TMailDomainAuthoritySync;
|
|
37
|
+
};
|
|
38
|
+
response: {
|
|
39
|
+
success: boolean;
|
|
40
|
+
authority?: IMailDomainAuthority;
|
|
41
|
+
message?: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface IReq_DeleteMailDomainAuthority extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_DeleteMailDomainAuthority> {
|
|
45
|
+
method: 'deleteMailDomainAuthority';
|
|
46
|
+
request: {
|
|
47
|
+
auth: IMailControlRequestAuth;
|
|
48
|
+
id: string;
|
|
49
|
+
};
|
|
50
|
+
response: {
|
|
51
|
+
success: boolean;
|
|
52
|
+
message?: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface IReq_ListMailAddressBindings extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListMailAddressBindings> {
|
|
56
|
+
method: 'listMailAddressBindings';
|
|
57
|
+
request: {
|
|
58
|
+
auth: IMailControlRequestAuth;
|
|
59
|
+
owner?: Partial<IMailResourceOwner>;
|
|
60
|
+
domain?: string;
|
|
61
|
+
address?: string;
|
|
62
|
+
};
|
|
63
|
+
response: {
|
|
64
|
+
bindings: IMailAddressBinding[];
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface IReq_SyncMailAddressBinding extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SyncMailAddressBinding> {
|
|
68
|
+
method: 'syncMailAddressBinding';
|
|
69
|
+
request: {
|
|
70
|
+
auth: IMailControlRequestAuth;
|
|
71
|
+
binding: TMailAddressBindingSync;
|
|
72
|
+
};
|
|
73
|
+
response: {
|
|
74
|
+
success: boolean;
|
|
75
|
+
binding?: IMailAddressBinding;
|
|
76
|
+
message?: string;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface IReq_DeleteMailAddressBinding extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_DeleteMailAddressBinding> {
|
|
80
|
+
method: 'deleteMailAddressBinding';
|
|
81
|
+
request: {
|
|
82
|
+
auth: IMailControlRequestAuth;
|
|
83
|
+
id: string;
|
|
84
|
+
};
|
|
85
|
+
response: {
|
|
86
|
+
success: boolean;
|
|
87
|
+
message?: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export interface IReq_ListWorkAppMailBindings extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListWorkAppMailBindings> {
|
|
91
|
+
method: 'listWorkAppMailBindings';
|
|
92
|
+
request: {
|
|
93
|
+
auth: IMailControlRequestAuth;
|
|
94
|
+
owner?: Partial<IMailResourceOwner>;
|
|
95
|
+
};
|
|
96
|
+
response: {
|
|
97
|
+
bindings: IWorkAppMailBinding[];
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export interface IReq_SyncWorkAppMailBinding extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_SyncWorkAppMailBinding> {
|
|
101
|
+
method: 'syncWorkAppMailBinding';
|
|
102
|
+
request: {
|
|
103
|
+
auth: IMailControlRequestAuth;
|
|
104
|
+
binding: TWorkAppMailBindingSync;
|
|
105
|
+
};
|
|
106
|
+
response: {
|
|
107
|
+
success: boolean;
|
|
108
|
+
binding?: IWorkAppMailBinding;
|
|
109
|
+
credentials?: IMailCredentialOneTimeSecret[];
|
|
110
|
+
message?: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export interface IReq_RotateMailCredential extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_RotateMailCredential> {
|
|
114
|
+
method: 'rotateMailCredential';
|
|
115
|
+
request: {
|
|
116
|
+
auth: IMailControlRequestAuth;
|
|
117
|
+
credentialId: string;
|
|
118
|
+
};
|
|
119
|
+
response: {
|
|
120
|
+
success: boolean;
|
|
121
|
+
credential?: IMailCredentialOneTimeSecret;
|
|
122
|
+
message?: string;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface IReq_ResolveMailRecipients extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ResolveMailRecipients> {
|
|
126
|
+
method: 'resolveMailRecipients';
|
|
127
|
+
request: {
|
|
128
|
+
auth: IMailControlRequestAuth;
|
|
129
|
+
owner: IMailResourceOwner;
|
|
130
|
+
domainAuthorityId?: string;
|
|
131
|
+
envelope: IMailEnvelope;
|
|
132
|
+
recipients: string[];
|
|
133
|
+
source?: IMailConnectionInfo;
|
|
134
|
+
};
|
|
135
|
+
response: {
|
|
136
|
+
resolutions: IMailRecipientResolution[];
|
|
137
|
+
cacheTtlMs?: number;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export interface IReq_DeliverInboundMail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_DeliverInboundMail> {
|
|
141
|
+
method: 'deliverInboundMail';
|
|
142
|
+
request: {
|
|
143
|
+
auth: IMailControlRequestAuth;
|
|
144
|
+
delivery: IMailInboundMessagePayload;
|
|
145
|
+
};
|
|
146
|
+
response: {
|
|
147
|
+
accepted: boolean;
|
|
148
|
+
workAppMessageId?: string;
|
|
149
|
+
message?: string;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export interface IReq_GetMailDeliveryStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetMailDeliveryStatus> {
|
|
153
|
+
method: 'getMailDeliveryStatus';
|
|
154
|
+
request: {
|
|
155
|
+
auth: IMailControlRequestAuth;
|
|
156
|
+
spoolItemId: string;
|
|
157
|
+
};
|
|
158
|
+
response: IMailDeliveryStatus;
|
|
159
|
+
}
|
|
160
|
+
export interface IReq_ListMailSpoolItems extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListMailSpoolItems> {
|
|
161
|
+
method: 'listMailSpoolItems';
|
|
162
|
+
request: {
|
|
163
|
+
auth: IMailControlRequestAuth;
|
|
164
|
+
owner?: Partial<IMailResourceOwner>;
|
|
165
|
+
status?: IMailSpoolItem['status'];
|
|
166
|
+
direction?: IMailSpoolItem['direction'];
|
|
167
|
+
limit?: number;
|
|
168
|
+
};
|
|
169
|
+
response: {
|
|
170
|
+
spoolItems: IMailSpoolItem[];
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export interface IReq_ListMailDeliveryJournal extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_ListMailDeliveryJournal> {
|
|
174
|
+
method: 'listMailDeliveryJournal';
|
|
175
|
+
request: {
|
|
176
|
+
auth: IMailControlRequestAuth;
|
|
177
|
+
owner?: Partial<IMailResourceOwner>;
|
|
178
|
+
spoolItemId?: string;
|
|
179
|
+
direction?: IMailSpoolItem['direction'];
|
|
180
|
+
status?: IMailSpoolItem['status'];
|
|
181
|
+
type?: IMailDeliveryJournalEvent['type'];
|
|
182
|
+
limit?: number;
|
|
183
|
+
};
|
|
184
|
+
response: {
|
|
185
|
+
events: IMailDeliveryJournalEvent[];
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export interface IReq_EnqueueMail extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_EnqueueMail> {
|
|
189
|
+
method: 'enqueueMail';
|
|
190
|
+
request: {
|
|
191
|
+
auth: IMailSubmissionRequestAuth;
|
|
192
|
+
outboundIdentityId?: string;
|
|
193
|
+
message: IMailOutboundMessagePayload;
|
|
194
|
+
};
|
|
195
|
+
response: {
|
|
196
|
+
accepted: boolean;
|
|
197
|
+
spoolItemId?: string;
|
|
198
|
+
outboundIdentity?: IMailOutboundIdentity;
|
|
199
|
+
message?: string;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3RzL21haWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -14,14 +14,15 @@ pnpm add @serve.zone/interfaces
|
|
|
14
14
|
|
|
15
15
|
## Public API
|
|
16
16
|
|
|
17
|
-
The root export exposes
|
|
17
|
+
The root export exposes five namespaces:
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import { data, platform, platformservice, requests } from '@serve.zone/interfaces';
|
|
20
|
+
import { appstore, data, platform, platformservice, requests } from '@serve.zone/interfaces';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
| Namespace | Purpose |
|
|
24
24
|
| --- | --- |
|
|
25
|
+
| `appstore` | App Store catalog, manifest, service requirement, and upgrade contracts. |
|
|
25
26
|
| `data` | Durable platform object shapes such as clusters, services, deployments, images, domains, DNS entries, secrets, users, status, settings, backups, registries, BaseOS metadata, and task executions. |
|
|
26
27
|
| `requests` | TypedRequest contracts for Cloudly and serve.zone control-plane RPC methods. |
|
|
27
28
|
| `platform` | Current platform-service contracts for email, SMS, push notifications, letters, AI, databases, object storage, logging, backups, and SIP. |
|
|
@@ -71,6 +72,7 @@ Common data contracts include:
|
|
|
71
72
|
- `IService`, `IDeployment`, `IImage`, `IRegistryTarget`, and `IExternalRegistry` for workload delivery.
|
|
72
73
|
- `IDomain`, `IDnsEntry`, and traffic contracts for routing and DNS management.
|
|
73
74
|
- `ISecretBundle` and `ISecretGroup` for secret ownership and shared secret groups.
|
|
75
|
+
- Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, credentials, spool items, delivery journals, and inbound/outbound message payloads.
|
|
74
76
|
- `IUser`, `IIdentity`, and token-related contracts for authentication context.
|
|
75
77
|
- `ICloudlyConfig`, `ICloudlySettings`, status, server, bare-metal, BaseOS, backup, and task execution interfaces for control-plane state.
|
|
76
78
|
|
|
@@ -99,6 +101,7 @@ interface IExampleRequest {
|
|
|
99
101
|
Request groups are exported by product area:
|
|
100
102
|
|
|
101
103
|
- `requests.admin`
|
|
104
|
+
- `requests.appstore`
|
|
102
105
|
- `requests.baremetal`
|
|
103
106
|
- `requests.baseos`
|
|
104
107
|
- `requests.backup`
|
|
@@ -109,10 +112,12 @@ Request groups are exported by product area:
|
|
|
109
112
|
- `requests.dns`
|
|
110
113
|
- `requests.domain`
|
|
111
114
|
- `requests.externalRegistry`
|
|
115
|
+
- `requests.hostedapp`
|
|
112
116
|
- `requests.identity`
|
|
113
117
|
- `requests.image`
|
|
114
118
|
- `requests.inform`
|
|
115
119
|
- `requests.log`
|
|
120
|
+
- `requests.mail`
|
|
116
121
|
- `requests.network`
|
|
117
122
|
- `requests.node`
|
|
118
123
|
- `requests.platform`
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './event.js';
|
|
|
9
9
|
export * from './externalregistry.js';
|
|
10
10
|
export * from './hostedapp.js';
|
|
11
11
|
export * from './image.js';
|
|
12
|
+
export * from './mail.js';
|
|
12
13
|
export * from './registry.js';
|
|
13
14
|
export * from './secretbundle.js';
|
|
14
15
|
export * from './secretgroup.js';
|
package/ts/data/mail.ts
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
export type TMailGatewayClientType = 'onebox' | 'cloudly' | 'custom' | (string & {});
|
|
2
|
+
|
|
3
|
+
export type TMailAddressPatternType = 'exactAddress' | 'domainWildcard' | 'localPartPattern';
|
|
4
|
+
|
|
5
|
+
export type TMailInboundTargetType = 'webhook' | 'smtpForward' | 'typedEndpoint' | 'discard' | 'reject';
|
|
6
|
+
|
|
7
|
+
export type TMailRecipientPolicyMode = 'acceptAll' | 'staticList' | 'cachedResolver' | 'appResolver';
|
|
8
|
+
|
|
9
|
+
export type TMailCredentialType = 'smtp' | 'api';
|
|
10
|
+
|
|
11
|
+
export type TMailCredentialStatus = 'active' | 'disabled' | 'rotated' | 'revoked';
|
|
12
|
+
|
|
13
|
+
export type TMailResourceStatus = 'active' | 'disabled' | 'pending' | 'failed';
|
|
14
|
+
|
|
15
|
+
export type TMailSpoolDirection = 'inbound' | 'outbound';
|
|
16
|
+
|
|
17
|
+
export type TMailSpoolStatus =
|
|
18
|
+
| 'accepted'
|
|
19
|
+
| 'queued'
|
|
20
|
+
| 'delivering'
|
|
21
|
+
| 'delivered'
|
|
22
|
+
| 'deferred'
|
|
23
|
+
| 'failed'
|
|
24
|
+
| 'deadLettered'
|
|
25
|
+
| 'rejected';
|
|
26
|
+
|
|
27
|
+
export type TMailDeliveryTargetType =
|
|
28
|
+
| 'webhook'
|
|
29
|
+
| 'smtpForward'
|
|
30
|
+
| 'typedEndpoint'
|
|
31
|
+
| 'mtaRelay'
|
|
32
|
+
| 'discard'
|
|
33
|
+
| 'reject';
|
|
34
|
+
|
|
35
|
+
export type TMailBounceType = 'hard' | 'soft' | 'complaint' | 'unknown';
|
|
36
|
+
|
|
37
|
+
export type TMailInboundProtocol = 'smtp' | 'submission' | 'api';
|
|
38
|
+
|
|
39
|
+
export type TMailRecipientResolutionAction = 'accept' | 'reject' | 'defer';
|
|
40
|
+
|
|
41
|
+
export type TMailDeliveryJournalEventType =
|
|
42
|
+
| 'accepted'
|
|
43
|
+
| 'queued'
|
|
44
|
+
| 'deliveryStarted'
|
|
45
|
+
| 'deliverySucceeded'
|
|
46
|
+
| 'deliveryDeferred'
|
|
47
|
+
| 'deliveryFailed'
|
|
48
|
+
| 'deadLettered'
|
|
49
|
+
| 'rejected'
|
|
50
|
+
| 'bounced'
|
|
51
|
+
| 'complaint';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Runtime owner of a mail resource. `appInstanceId` is the deployed WorkApp or service
|
|
55
|
+
* instance, not an App Store template id.
|
|
56
|
+
*/
|
|
57
|
+
export interface IMailResourceOwner {
|
|
58
|
+
gatewayClientType: TMailGatewayClientType;
|
|
59
|
+
gatewayClientId: string;
|
|
60
|
+
appInstanceId?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface IMailAddressPattern {
|
|
64
|
+
type: TMailAddressPatternType;
|
|
65
|
+
domain: string;
|
|
66
|
+
localPart?: string;
|
|
67
|
+
localPartPattern?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface IMailWebhookTarget {
|
|
71
|
+
url: string;
|
|
72
|
+
signingSecretRef?: string;
|
|
73
|
+
timeoutMs?: number;
|
|
74
|
+
headers?: Record<string, string>;
|
|
75
|
+
maxInlineBytes?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface IMailSmtpForwardTarget {
|
|
79
|
+
host: string;
|
|
80
|
+
port: number;
|
|
81
|
+
credentialRef?: string;
|
|
82
|
+
preserveHeaders?: boolean;
|
|
83
|
+
addHeaders?: Record<string, string>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface IMailTypedEndpointTarget {
|
|
87
|
+
serviceRef?: string;
|
|
88
|
+
method: string;
|
|
89
|
+
queueName?: string;
|
|
90
|
+
timeoutMs?: number;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface IMailInboundTarget {
|
|
94
|
+
type: TMailInboundTargetType;
|
|
95
|
+
webhook?: IMailWebhookTarget;
|
|
96
|
+
smtpForward?: IMailSmtpForwardTarget;
|
|
97
|
+
typedEndpoint?: IMailTypedEndpointTarget;
|
|
98
|
+
reject?: {
|
|
99
|
+
smtpCode: number;
|
|
100
|
+
message: string;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface IMailRecipientResolverTarget {
|
|
105
|
+
type: 'webhook' | 'typedEndpoint';
|
|
106
|
+
webhook?: IMailWebhookTarget;
|
|
107
|
+
typedEndpoint?: IMailTypedEndpointTarget;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface IMailRecipientPolicy {
|
|
111
|
+
mode: TMailRecipientPolicyMode;
|
|
112
|
+
staticRecipients?: string[];
|
|
113
|
+
resolver?: IMailRecipientResolverTarget;
|
|
114
|
+
cacheTtlMs?: number;
|
|
115
|
+
unavailableResponse?: {
|
|
116
|
+
smtpCode: number;
|
|
117
|
+
message: string;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface IMailSpoolPolicy {
|
|
122
|
+
enabled: boolean;
|
|
123
|
+
maxRetryAgeMs?: number;
|
|
124
|
+
retentionMs?: number;
|
|
125
|
+
maxQueuedMessages?: number;
|
|
126
|
+
maxQueuedBytes?: number;
|
|
127
|
+
initialRetryDelayMs?: number;
|
|
128
|
+
maxRetryDelayMs?: number;
|
|
129
|
+
deadLetterOnExpiry?: boolean;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface IMailRateLimits {
|
|
133
|
+
messagesPerMinute?: number;
|
|
134
|
+
messagesPerHour?: number;
|
|
135
|
+
messagesPerDay?: number;
|
|
136
|
+
recipientsPerMessage?: number;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface IMailDomainAuthority {
|
|
140
|
+
id: string;
|
|
141
|
+
owner: IMailResourceOwner;
|
|
142
|
+
domain: string;
|
|
143
|
+
addressPattern: IMailAddressPattern;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
status: TMailResourceStatus;
|
|
146
|
+
inboundTarget?: IMailInboundTarget;
|
|
147
|
+
outboundPolicy?: {
|
|
148
|
+
allowedFromPatterns: IMailAddressPattern[];
|
|
149
|
+
dkimSelector?: string;
|
|
150
|
+
rateLimits?: IMailRateLimits;
|
|
151
|
+
};
|
|
152
|
+
recipientPolicy: IMailRecipientPolicy;
|
|
153
|
+
spoolPolicy?: IMailSpoolPolicy;
|
|
154
|
+
createdAt: number;
|
|
155
|
+
updatedAt: number;
|
|
156
|
+
createdBy?: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface IMailAddressBinding {
|
|
160
|
+
id: string;
|
|
161
|
+
owner: IMailResourceOwner;
|
|
162
|
+
address: string;
|
|
163
|
+
localPart: string;
|
|
164
|
+
domain: string;
|
|
165
|
+
enabled: boolean;
|
|
166
|
+
status: TMailResourceStatus;
|
|
167
|
+
inboundTarget?: IMailInboundTarget;
|
|
168
|
+
outboundIdentityId?: string;
|
|
169
|
+
recipientPolicy?: IMailRecipientPolicy;
|
|
170
|
+
spoolPolicy?: IMailSpoolPolicy;
|
|
171
|
+
createdAt: number;
|
|
172
|
+
updatedAt: number;
|
|
173
|
+
createdBy?: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface IMailCredentialPublic {
|
|
177
|
+
id: string;
|
|
178
|
+
type: TMailCredentialType;
|
|
179
|
+
status: TMailCredentialStatus;
|
|
180
|
+
username?: string;
|
|
181
|
+
scopes?: string[];
|
|
182
|
+
createdAt: number;
|
|
183
|
+
updatedAt: number;
|
|
184
|
+
lastRotatedAt?: number;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface IMailCredentialOneTimeSecret {
|
|
188
|
+
credential: IMailCredentialPublic;
|
|
189
|
+
secret: string;
|
|
190
|
+
secretShownOnce: true;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface IMailOutboundIdentity {
|
|
194
|
+
id: string;
|
|
195
|
+
owner: IMailResourceOwner;
|
|
196
|
+
enabled: boolean;
|
|
197
|
+
status: TMailResourceStatus;
|
|
198
|
+
allowedFromPatterns: IMailAddressPattern[];
|
|
199
|
+
defaultFrom?: string;
|
|
200
|
+
domain?: string;
|
|
201
|
+
dkimSelector?: string;
|
|
202
|
+
credential?: IMailCredentialPublic;
|
|
203
|
+
rateLimits?: IMailRateLimits;
|
|
204
|
+
createdAt: number;
|
|
205
|
+
updatedAt: number;
|
|
206
|
+
createdBy?: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface IWorkAppMailBinding {
|
|
210
|
+
id: string;
|
|
211
|
+
owner: IMailResourceOwner & { appInstanceId: string };
|
|
212
|
+
enabled: boolean;
|
|
213
|
+
status: TMailResourceStatus;
|
|
214
|
+
domainAuthorityIds?: string[];
|
|
215
|
+
addressBindingIds?: string[];
|
|
216
|
+
outboundIdentityIds?: string[];
|
|
217
|
+
defaultFrom?: string;
|
|
218
|
+
inboundTarget?: IMailInboundTarget;
|
|
219
|
+
createdAt: number;
|
|
220
|
+
updatedAt: number;
|
|
221
|
+
createdBy?: string;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface IMailEnvelope {
|
|
225
|
+
mailFrom: string;
|
|
226
|
+
rcptTo: string[];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface IMailDeliveryTargetSummary {
|
|
230
|
+
type: TMailDeliveryTargetType;
|
|
231
|
+
label?: string;
|
|
232
|
+
address?: string;
|
|
233
|
+
url?: string;
|
|
234
|
+
host?: string;
|
|
235
|
+
port?: number;
|
|
236
|
+
serviceRef?: string;
|
|
237
|
+
method?: string;
|
|
238
|
+
queueName?: string;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface IMailConnectionInfo {
|
|
242
|
+
protocol: TMailInboundProtocol;
|
|
243
|
+
remoteAddress?: string;
|
|
244
|
+
proxyAddress?: string;
|
|
245
|
+
heloName?: string;
|
|
246
|
+
tls?: boolean;
|
|
247
|
+
authUsername?: string;
|
|
248
|
+
authenticatedCredentialId?: string;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface IMailRecipientResolution {
|
|
252
|
+
recipient: string;
|
|
253
|
+
action: TMailRecipientResolutionAction;
|
|
254
|
+
owner?: IMailResourceOwner;
|
|
255
|
+
domainAuthorityId?: string;
|
|
256
|
+
addressBindingId?: string;
|
|
257
|
+
target?: IMailInboundTarget;
|
|
258
|
+
smtpCode?: number;
|
|
259
|
+
message?: string;
|
|
260
|
+
cacheTtlMs?: number;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface IMailSpoolItem {
|
|
264
|
+
id: string;
|
|
265
|
+
owner?: IMailResourceOwner;
|
|
266
|
+
direction: TMailSpoolDirection;
|
|
267
|
+
status: TMailSpoolStatus;
|
|
268
|
+
envelope: IMailEnvelope;
|
|
269
|
+
messageId?: string;
|
|
270
|
+
subject?: string;
|
|
271
|
+
target?: IMailDeliveryTargetSummary;
|
|
272
|
+
attempts: number;
|
|
273
|
+
nextAttemptAt?: number;
|
|
274
|
+
lastError?: string;
|
|
275
|
+
rawAvailableUntil?: number;
|
|
276
|
+
createdAt: number;
|
|
277
|
+
updatedAt: number;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface IMailDeliveryAttempt {
|
|
281
|
+
id: string;
|
|
282
|
+
spoolItemId: string;
|
|
283
|
+
target: IMailDeliveryTargetSummary;
|
|
284
|
+
status: TMailSpoolStatus;
|
|
285
|
+
startedAt: number;
|
|
286
|
+
completedAt?: number;
|
|
287
|
+
smtpCode?: number;
|
|
288
|
+
response?: string;
|
|
289
|
+
error?: string;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface IMailBounceEvent {
|
|
293
|
+
id: string;
|
|
294
|
+
spoolItemId?: string;
|
|
295
|
+
owner?: IMailResourceOwner;
|
|
296
|
+
recipient: string;
|
|
297
|
+
bounceType: TMailBounceType;
|
|
298
|
+
diagnosticCode?: string;
|
|
299
|
+
receivedAt: number;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface IMailDeliveryStatus {
|
|
303
|
+
spoolItem?: IMailSpoolItem;
|
|
304
|
+
attempts: IMailDeliveryAttempt[];
|
|
305
|
+
bounceEvents?: IMailBounceEvent[];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
export interface IMailDeliveryJournalEvent {
|
|
309
|
+
id: string;
|
|
310
|
+
spoolItemId: string;
|
|
311
|
+
owner?: IMailResourceOwner;
|
|
312
|
+
direction: TMailSpoolDirection;
|
|
313
|
+
type: TMailDeliveryJournalEventType;
|
|
314
|
+
status: TMailSpoolStatus;
|
|
315
|
+
envelope?: IMailEnvelope;
|
|
316
|
+
target?: IMailDeliveryTargetSummary;
|
|
317
|
+
attemptId?: string;
|
|
318
|
+
smtpCode?: number;
|
|
319
|
+
response?: string;
|
|
320
|
+
error?: string;
|
|
321
|
+
message?: string;
|
|
322
|
+
createdAt: number;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface IMailInboundMessagePayload {
|
|
326
|
+
spoolItemId: string;
|
|
327
|
+
owner?: IMailResourceOwner;
|
|
328
|
+
envelope: IMailEnvelope;
|
|
329
|
+
rawMessage: string;
|
|
330
|
+
sizeBytes?: number;
|
|
331
|
+
messageId?: string;
|
|
332
|
+
subject?: string;
|
|
333
|
+
headers?: Record<string, string | string[]>;
|
|
334
|
+
source?: IMailConnectionInfo;
|
|
335
|
+
receivedAt: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface IMailOutboundAttachmentPayload {
|
|
339
|
+
filename: string;
|
|
340
|
+
contentType?: string;
|
|
341
|
+
binaryAttachmentString: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface IMailOutboundMessagePayload {
|
|
345
|
+
from: string;
|
|
346
|
+
to: string[];
|
|
347
|
+
cc?: string[];
|
|
348
|
+
bcc?: string[];
|
|
349
|
+
subject: string;
|
|
350
|
+
text?: string;
|
|
351
|
+
html?: string;
|
|
352
|
+
headers?: Record<string, string>;
|
|
353
|
+
attachments?: IMailOutboundAttachmentPayload[];
|
|
354
|
+
}
|
package/ts/requests/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ import * as identityRequests from './identity.js';
|
|
|
17
17
|
import * as imageRequests from './image.js';
|
|
18
18
|
import * as informRequests from './inform.js';
|
|
19
19
|
import * as logRequests from './log.js';
|
|
20
|
+
import * as mailRequests from './mail.js';
|
|
20
21
|
import * as networkRequests from './network.js';
|
|
21
22
|
import * as nodeRequests from './node.js';
|
|
22
23
|
import * as platformRequests from './platform.js';
|
|
@@ -48,6 +49,7 @@ export {
|
|
|
48
49
|
imageRequests as image,
|
|
49
50
|
informRequests as inform,
|
|
50
51
|
logRequests as log,
|
|
52
|
+
mailRequests as mail,
|
|
51
53
|
networkRequests as network,
|
|
52
54
|
nodeRequests as node,
|
|
53
55
|
platformRequests as platform,
|
|
@@ -64,3 +66,4 @@ export {
|
|
|
64
66
|
|
|
65
67
|
export * from './inform.js';
|
|
66
68
|
export * from './hostedapp.js';
|
|
69
|
+
export * from './mail.js';
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import * as plugins from '../plugins.js';
|
|
2
|
+
import type { IIdentity } from '../data/user.js';
|
|
3
|
+
import type {
|
|
4
|
+
IMailAddressBinding,
|
|
5
|
+
IMailCredentialOneTimeSecret,
|
|
6
|
+
IMailConnectionInfo,
|
|
7
|
+
IMailDeliveryJournalEvent,
|
|
8
|
+
IMailDeliveryStatus,
|
|
9
|
+
IMailDomainAuthority,
|
|
10
|
+
IMailEnvelope,
|
|
11
|
+
IMailInboundMessagePayload,
|
|
12
|
+
IMailOutboundIdentity,
|
|
13
|
+
IMailOutboundMessagePayload,
|
|
14
|
+
IMailRecipientResolution,
|
|
15
|
+
IMailResourceOwner,
|
|
16
|
+
IMailSpoolItem,
|
|
17
|
+
IWorkAppMailBinding,
|
|
18
|
+
} from '../data/mail.js';
|
|
19
|
+
|
|
20
|
+
export interface IMailControlRequestAuth {
|
|
21
|
+
identity?: IIdentity;
|
|
22
|
+
apiToken?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IMailSubmissionRequestAuth extends IMailControlRequestAuth {
|
|
26
|
+
credentialId?: string;
|
|
27
|
+
credentialSecret?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type TMailDomainAuthoritySync = Omit<
|
|
31
|
+
IMailDomainAuthority,
|
|
32
|
+
'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'
|
|
33
|
+
> & {
|
|
34
|
+
id?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type TMailAddressBindingSync = Omit<
|
|
38
|
+
IMailAddressBinding,
|
|
39
|
+
'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'
|
|
40
|
+
> & {
|
|
41
|
+
id?: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export type TWorkAppMailBindingSync = Omit<
|
|
45
|
+
IWorkAppMailBinding,
|
|
46
|
+
'id' | 'status' | 'createdAt' | 'updatedAt' | 'createdBy'
|
|
47
|
+
> & {
|
|
48
|
+
id?: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export interface IReq_ListMailDomainAuthorities extends plugins.typedrequestInterfaces.implementsTR<
|
|
52
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
53
|
+
IReq_ListMailDomainAuthorities
|
|
54
|
+
> {
|
|
55
|
+
method: 'listMailDomainAuthorities';
|
|
56
|
+
request: {
|
|
57
|
+
auth: IMailControlRequestAuth;
|
|
58
|
+
owner?: Partial<IMailResourceOwner>;
|
|
59
|
+
domain?: string;
|
|
60
|
+
};
|
|
61
|
+
response: {
|
|
62
|
+
authorities: IMailDomainAuthority[];
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface IReq_SyncMailDomainAuthority extends plugins.typedrequestInterfaces.implementsTR<
|
|
67
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
68
|
+
IReq_SyncMailDomainAuthority
|
|
69
|
+
> {
|
|
70
|
+
method: 'syncMailDomainAuthority';
|
|
71
|
+
request: {
|
|
72
|
+
auth: IMailControlRequestAuth;
|
|
73
|
+
authority: TMailDomainAuthoritySync;
|
|
74
|
+
};
|
|
75
|
+
response: {
|
|
76
|
+
success: boolean;
|
|
77
|
+
authority?: IMailDomainAuthority;
|
|
78
|
+
message?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface IReq_DeleteMailDomainAuthority extends plugins.typedrequestInterfaces.implementsTR<
|
|
83
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
84
|
+
IReq_DeleteMailDomainAuthority
|
|
85
|
+
> {
|
|
86
|
+
method: 'deleteMailDomainAuthority';
|
|
87
|
+
request: {
|
|
88
|
+
auth: IMailControlRequestAuth;
|
|
89
|
+
id: string;
|
|
90
|
+
};
|
|
91
|
+
response: {
|
|
92
|
+
success: boolean;
|
|
93
|
+
message?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface IReq_ListMailAddressBindings extends plugins.typedrequestInterfaces.implementsTR<
|
|
98
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
99
|
+
IReq_ListMailAddressBindings
|
|
100
|
+
> {
|
|
101
|
+
method: 'listMailAddressBindings';
|
|
102
|
+
request: {
|
|
103
|
+
auth: IMailControlRequestAuth;
|
|
104
|
+
owner?: Partial<IMailResourceOwner>;
|
|
105
|
+
domain?: string;
|
|
106
|
+
address?: string;
|
|
107
|
+
};
|
|
108
|
+
response: {
|
|
109
|
+
bindings: IMailAddressBinding[];
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface IReq_SyncMailAddressBinding extends plugins.typedrequestInterfaces.implementsTR<
|
|
114
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
115
|
+
IReq_SyncMailAddressBinding
|
|
116
|
+
> {
|
|
117
|
+
method: 'syncMailAddressBinding';
|
|
118
|
+
request: {
|
|
119
|
+
auth: IMailControlRequestAuth;
|
|
120
|
+
binding: TMailAddressBindingSync;
|
|
121
|
+
};
|
|
122
|
+
response: {
|
|
123
|
+
success: boolean;
|
|
124
|
+
binding?: IMailAddressBinding;
|
|
125
|
+
message?: string;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface IReq_DeleteMailAddressBinding extends plugins.typedrequestInterfaces.implementsTR<
|
|
130
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
131
|
+
IReq_DeleteMailAddressBinding
|
|
132
|
+
> {
|
|
133
|
+
method: 'deleteMailAddressBinding';
|
|
134
|
+
request: {
|
|
135
|
+
auth: IMailControlRequestAuth;
|
|
136
|
+
id: string;
|
|
137
|
+
};
|
|
138
|
+
response: {
|
|
139
|
+
success: boolean;
|
|
140
|
+
message?: string;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface IReq_ListWorkAppMailBindings extends plugins.typedrequestInterfaces.implementsTR<
|
|
145
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
146
|
+
IReq_ListWorkAppMailBindings
|
|
147
|
+
> {
|
|
148
|
+
method: 'listWorkAppMailBindings';
|
|
149
|
+
request: {
|
|
150
|
+
auth: IMailControlRequestAuth;
|
|
151
|
+
owner?: Partial<IMailResourceOwner>;
|
|
152
|
+
};
|
|
153
|
+
response: {
|
|
154
|
+
bindings: IWorkAppMailBinding[];
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface IReq_SyncWorkAppMailBinding extends plugins.typedrequestInterfaces.implementsTR<
|
|
159
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
160
|
+
IReq_SyncWorkAppMailBinding
|
|
161
|
+
> {
|
|
162
|
+
method: 'syncWorkAppMailBinding';
|
|
163
|
+
request: {
|
|
164
|
+
auth: IMailControlRequestAuth;
|
|
165
|
+
binding: TWorkAppMailBindingSync;
|
|
166
|
+
};
|
|
167
|
+
response: {
|
|
168
|
+
success: boolean;
|
|
169
|
+
binding?: IWorkAppMailBinding;
|
|
170
|
+
credentials?: IMailCredentialOneTimeSecret[];
|
|
171
|
+
message?: string;
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface IReq_RotateMailCredential extends plugins.typedrequestInterfaces.implementsTR<
|
|
176
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
177
|
+
IReq_RotateMailCredential
|
|
178
|
+
> {
|
|
179
|
+
method: 'rotateMailCredential';
|
|
180
|
+
request: {
|
|
181
|
+
auth: IMailControlRequestAuth;
|
|
182
|
+
credentialId: string;
|
|
183
|
+
};
|
|
184
|
+
response: {
|
|
185
|
+
success: boolean;
|
|
186
|
+
credential?: IMailCredentialOneTimeSecret;
|
|
187
|
+
message?: string;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface IReq_ResolveMailRecipients extends plugins.typedrequestInterfaces.implementsTR<
|
|
192
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
193
|
+
IReq_ResolveMailRecipients
|
|
194
|
+
> {
|
|
195
|
+
method: 'resolveMailRecipients';
|
|
196
|
+
request: {
|
|
197
|
+
auth: IMailControlRequestAuth;
|
|
198
|
+
owner: IMailResourceOwner;
|
|
199
|
+
domainAuthorityId?: string;
|
|
200
|
+
envelope: IMailEnvelope;
|
|
201
|
+
recipients: string[];
|
|
202
|
+
source?: IMailConnectionInfo;
|
|
203
|
+
};
|
|
204
|
+
response: {
|
|
205
|
+
resolutions: IMailRecipientResolution[];
|
|
206
|
+
cacheTtlMs?: number;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface IReq_DeliverInboundMail extends plugins.typedrequestInterfaces.implementsTR<
|
|
211
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
212
|
+
IReq_DeliverInboundMail
|
|
213
|
+
> {
|
|
214
|
+
method: 'deliverInboundMail';
|
|
215
|
+
request: {
|
|
216
|
+
auth: IMailControlRequestAuth;
|
|
217
|
+
delivery: IMailInboundMessagePayload;
|
|
218
|
+
};
|
|
219
|
+
response: {
|
|
220
|
+
accepted: boolean;
|
|
221
|
+
workAppMessageId?: string;
|
|
222
|
+
message?: string;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface IReq_GetMailDeliveryStatus extends plugins.typedrequestInterfaces.implementsTR<
|
|
227
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
228
|
+
IReq_GetMailDeliveryStatus
|
|
229
|
+
> {
|
|
230
|
+
method: 'getMailDeliveryStatus';
|
|
231
|
+
request: {
|
|
232
|
+
auth: IMailControlRequestAuth;
|
|
233
|
+
spoolItemId: string;
|
|
234
|
+
};
|
|
235
|
+
response: IMailDeliveryStatus;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface IReq_ListMailSpoolItems extends plugins.typedrequestInterfaces.implementsTR<
|
|
239
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
240
|
+
IReq_ListMailSpoolItems
|
|
241
|
+
> {
|
|
242
|
+
method: 'listMailSpoolItems';
|
|
243
|
+
request: {
|
|
244
|
+
auth: IMailControlRequestAuth;
|
|
245
|
+
owner?: Partial<IMailResourceOwner>;
|
|
246
|
+
status?: IMailSpoolItem['status'];
|
|
247
|
+
direction?: IMailSpoolItem['direction'];
|
|
248
|
+
limit?: number;
|
|
249
|
+
};
|
|
250
|
+
response: {
|
|
251
|
+
spoolItems: IMailSpoolItem[];
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface IReq_ListMailDeliveryJournal extends plugins.typedrequestInterfaces.implementsTR<
|
|
256
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
257
|
+
IReq_ListMailDeliveryJournal
|
|
258
|
+
> {
|
|
259
|
+
method: 'listMailDeliveryJournal';
|
|
260
|
+
request: {
|
|
261
|
+
auth: IMailControlRequestAuth;
|
|
262
|
+
owner?: Partial<IMailResourceOwner>;
|
|
263
|
+
spoolItemId?: string;
|
|
264
|
+
direction?: IMailSpoolItem['direction'];
|
|
265
|
+
status?: IMailSpoolItem['status'];
|
|
266
|
+
type?: IMailDeliveryJournalEvent['type'];
|
|
267
|
+
limit?: number;
|
|
268
|
+
};
|
|
269
|
+
response: {
|
|
270
|
+
events: IMailDeliveryJournalEvent[];
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface IReq_EnqueueMail extends plugins.typedrequestInterfaces.implementsTR<
|
|
275
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
276
|
+
IReq_EnqueueMail
|
|
277
|
+
> {
|
|
278
|
+
method: 'enqueueMail';
|
|
279
|
+
request: {
|
|
280
|
+
auth: IMailSubmissionRequestAuth;
|
|
281
|
+
outboundIdentityId?: string;
|
|
282
|
+
message: IMailOutboundMessagePayload;
|
|
283
|
+
};
|
|
284
|
+
response: {
|
|
285
|
+
accepted: boolean;
|
|
286
|
+
spoolItemId?: string;
|
|
287
|
+
outboundIdentity?: IMailOutboundIdentity;
|
|
288
|
+
message?: string;
|
|
289
|
+
};
|
|
290
|
+
}
|