@madewithremy/admin 0.1.57 → 0.1.59
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 +12 -0
- package/README.md +1 -1
- package/dist/client.d.ts +199 -0
- package/dist/config.d.ts +8 -0
- package/dist/ctx.d.ts +36 -0
- package/dist/errors.d.ts +68 -0
- package/dist/http.d.ts +68 -0
- package/dist/index.d.ts +7 -9442
- package/dist/index.js +6 -14
- package/dist/index.js.map +7 -1
- package/dist/ops/agent.d.ts +44 -0
- package/dist/ops/analytics.d.ts +285 -0
- package/dist/ops/apps.d.ts +33 -0
- package/dist/ops/crashes.d.ts +86 -0
- package/dist/ops/cron.d.ts +40 -0
- package/dist/ops/data.d.ts +68 -0
- package/dist/ops/dataSourceConnectors.d.ts +80 -0
- package/dist/ops/dataSourceEvals.d.ts +208 -0
- package/dist/ops/dataSourceJobs.d.ts +141 -0
- package/dist/ops/dataSourceMappers.d.ts +125 -0
- package/dist/ops/dataSources.d.ts +654 -0
- package/dist/ops/db.d.ts +81 -0
- package/dist/ops/diagnostics.d.ts +42 -0
- package/dist/ops/domains.d.ts +250 -0
- package/dist/ops/email.d.ts +305 -0
- package/dist/ops/events.d.ts +56 -0
- package/dist/ops/feedback.d.ts +24 -0
- package/dist/ops/files.d.ts +166 -0
- package/dist/ops/infra.d.ts +163 -0
- package/dist/ops/issues.d.ts +160 -0
- package/dist/ops/jewels.d.ts +249 -0
- package/dist/ops/methods.d.ts +60 -0
- package/dist/ops/prerender.d.ts +74 -0
- package/dist/ops/previews.d.ts +52 -0
- package/dist/ops/qaRecordings.d.ts +68 -0
- package/dist/ops/releases.d.ts +193 -0
- package/dist/ops/requests.d.ts +73 -0
- package/dist/ops/secrets.d.ts +61 -0
- package/dist/ops/settings.d.ts +45 -0
- package/dist/ops/tasks.d.ts +47 -0
- package/dist/ops/usage.d.ts +40 -0
- package/dist/ops/users.d.ts +59 -0
- package/dist/ops/voice.d.ts +178 -0
- package/dist/output.d.ts +19 -0
- package/dist/parseJsonConfig.d.ts +41 -0
- package/dist/poll.d.ts +38 -0
- package/dist/prod.js +39 -55
- package/dist/runningMethod.d.ts +25 -0
- package/dist/sleep.d.ts +12 -0
- package/dist/types/agent.d.ts +95 -0
- package/dist/types/analytics.d.ts +225 -0
- package/dist/types/apps.d.ts +39 -0
- package/dist/types/crashes.d.ts +81 -0
- package/dist/types/cron.d.ts +68 -0
- package/dist/types/data.d.ts +38 -0
- package/dist/types/dataSourceConnectors.d.ts +59 -0
- package/dist/types/dataSourceEvals.d.ts +225 -0
- package/dist/types/dataSourceJobs.d.ts +283 -0
- package/dist/types/dataSourceMappers.d.ts +204 -0
- package/dist/types/dataSourceReaders.d.ts +102 -0
- package/dist/types/dataSources.d.ts +627 -0
- package/dist/types/db.d.ts +63 -0
- package/dist/types/diagnostics.d.ts +96 -0
- package/dist/types/domains.d.ts +277 -0
- package/dist/types/email.d.ts +400 -0
- package/dist/types/events.d.ts +54 -0
- package/dist/types/feedback.d.ts +11 -0
- package/dist/types/files.d.ts +150 -0
- package/dist/types/index.d.ts +37 -0
- package/dist/types/infra.d.ts +188 -0
- package/dist/types/issues.d.ts +106 -0
- package/dist/types/jewels.d.ts +336 -0
- package/dist/types/methods.d.ts +34 -0
- package/dist/types/prerender.d.ts +59 -0
- package/dist/types/previews.d.ts +39 -0
- package/dist/types/progress.d.ts +31 -0
- package/dist/types/qaRecordings.d.ts +51 -0
- package/dist/types/releases.d.ts +233 -0
- package/dist/types/requests.d.ts +114 -0
- package/dist/types/secrets.d.ts +42 -0
- package/dist/types/settings.d.ts +79 -0
- package/dist/types/tasks.d.ts +99 -0
- package/dist/types/usage.d.ts +29 -0
- package/dist/types/users.d.ts +61 -0
- package/dist/types/voice.d.ts +197 -0
- package/dist/upload.d.ts +11 -0
- package/package.json +7 -10
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response shapes for the email command group — transcribed from the api
|
|
3
|
+
* (apps/api/src).
|
|
4
|
+
*
|
|
5
|
+
* Sources:
|
|
6
|
+
* roles/http/routes/Apps/manage/outboundEmail.ts
|
|
7
|
+
* roles/http/routes/Apps/manage/outboundEmailDomains.ts
|
|
8
|
+
* roles/http/routes/_helpers/outboundEmailDomainView.ts
|
|
9
|
+
* roles/http/routes/Apps/manage/emailDomains.ts
|
|
10
|
+
* roles/http/routes/Apps/manage/requestLog.ts (inbox route only)
|
|
11
|
+
* customerApps/AppOutboundEmail/dao/EmailMessagesDao.ts
|
|
12
|
+
* customerApps/AppOutboundEmail/dao/EmailBatchesDao.ts
|
|
13
|
+
* customerApps/AppOutboundEmail/dao/EmailTenantStateDao.ts
|
|
14
|
+
* customerApps/AppOutboundEmail/dao/AppEmailSuppressionsDao.ts
|
|
15
|
+
* customerApps/AppOutboundEmail/batchView.ts
|
|
16
|
+
* core/EmailTransport/drivers/index.ts
|
|
17
|
+
*/
|
|
18
|
+
import type { BoughtDomain, RegisteredDomainRecords } from './domains.js';
|
|
19
|
+
/** Per-recipient outbound delivery status. */
|
|
20
|
+
export type EmailMessageStatus = 'suppressed' | 'failed' | 'sent' | 'delivered' | 'blocked' | 'bounced' | 'complained' | 'delayed' | 'rejected';
|
|
21
|
+
/** Origin of the outbound message. */
|
|
22
|
+
export type EmailMessageKind = 'method' | 'auth';
|
|
23
|
+
/** How the address ended up suppressed. */
|
|
24
|
+
export type SuppressionSource = 'one_click' | 'link' | 'owner' | 'complaint';
|
|
25
|
+
/** Full row from v2_email_messages (V2EmailMessagesDao.get / .list). */
|
|
26
|
+
export interface V2EmailMessage {
|
|
27
|
+
id: string;
|
|
28
|
+
appId: string;
|
|
29
|
+
recipient: string;
|
|
30
|
+
sesMessageId: string | null;
|
|
31
|
+
status: EmailMessageStatus;
|
|
32
|
+
category: string;
|
|
33
|
+
kind: EmailMessageKind;
|
|
34
|
+
subject: string | null;
|
|
35
|
+
fromAddress: string | null;
|
|
36
|
+
methodId: string | null;
|
|
37
|
+
requestLogId: string | null;
|
|
38
|
+
/** Blast this row belongs to; null for sign-in codes and pre-batch rows. */
|
|
39
|
+
batchId: string | null;
|
|
40
|
+
diagnostic: Record<string, unknown> | null;
|
|
41
|
+
sentAt: string | null;
|
|
42
|
+
deliveredAt: string | null;
|
|
43
|
+
bouncedAt: string | null;
|
|
44
|
+
complainedAt: string | null;
|
|
45
|
+
delayedAt: string | null;
|
|
46
|
+
rejectedAt: string | null;
|
|
47
|
+
failedAt: string | null;
|
|
48
|
+
createdAt: string;
|
|
49
|
+
}
|
|
50
|
+
/** Aggregate stats over a time window (V2EmailMessagesDao.summary). */
|
|
51
|
+
export interface EmailSummary {
|
|
52
|
+
counts: Record<EmailMessageStatus, number>;
|
|
53
|
+
/** Messages SES accepted — the denominator for every rate below. */
|
|
54
|
+
accepted: number;
|
|
55
|
+
rates: {
|
|
56
|
+
bounceRate: number;
|
|
57
|
+
complaintRate: number;
|
|
58
|
+
deliveredRate: number;
|
|
59
|
+
};
|
|
60
|
+
byKind: Record<EmailMessageKind, number>;
|
|
61
|
+
series: Array<{
|
|
62
|
+
t: string;
|
|
63
|
+
counts: Record<string, number>;
|
|
64
|
+
}>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Lifecycle of a QUEUED send (batchView.ts / V2EmailBatchesDao). Large or
|
|
68
|
+
* marketing sends are accepted immediately and delivered by a worker in
|
|
69
|
+
* chunks, so a blast can legitimately be observed mid-flight.
|
|
70
|
+
*
|
|
71
|
+
* accepted queued, nothing delivered yet
|
|
72
|
+
* sending chunks are draining
|
|
73
|
+
* completed every recipient was handed to the provider
|
|
74
|
+
* partial finished, but some recipients were not sent to
|
|
75
|
+
* failed finished and nothing was sent
|
|
76
|
+
*/
|
|
77
|
+
export type EmailBatchLifecycle = 'accepted' | 'sending' | 'completed' | 'partial' | 'failed';
|
|
78
|
+
/**
|
|
79
|
+
* One fan-out blast, aggregated (batchView.ts — the per-recipient aggregate
|
|
80
|
+
* enriched with the queued-send lifecycle where one exists).
|
|
81
|
+
* `recipients` is every row in the blast including ones that never reached SES;
|
|
82
|
+
* `accepted` is only those SES took and is the denominator for any rate.
|
|
83
|
+
*/
|
|
84
|
+
export interface EmailBatchSummary {
|
|
85
|
+
batchId: string;
|
|
86
|
+
subject: string | null;
|
|
87
|
+
startedAt: string;
|
|
88
|
+
recipients: number;
|
|
89
|
+
accepted: number;
|
|
90
|
+
counts: Record<EmailMessageStatus, number>;
|
|
91
|
+
/**
|
|
92
|
+
* Lifecycle of the send, when it was QUEUED. `null` for a send delivered
|
|
93
|
+
* inline (small transactional) and for blasts predating the send queue —
|
|
94
|
+
* that is a normal, finished send with no in-flight state, NOT an error.
|
|
95
|
+
*/
|
|
96
|
+
status: EmailBatchLifecycle | null;
|
|
97
|
+
/** Delivery-chunk progress, when queued. Null otherwise. */
|
|
98
|
+
chunksTotal: number | null;
|
|
99
|
+
chunksDone: number | null;
|
|
100
|
+
/** Recipients not yet attempted, when queued. Null otherwise. */
|
|
101
|
+
pending: number | null;
|
|
102
|
+
}
|
|
103
|
+
/** One row from app_email_suppressions (AppEmailSuppressionsDao). */
|
|
104
|
+
export interface AppEmailSuppression {
|
|
105
|
+
id: string;
|
|
106
|
+
appId: string;
|
|
107
|
+
email: string;
|
|
108
|
+
source: SuppressionSource;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The email provider's account-level suppression entry (on SES, its account
|
|
113
|
+
* suppression list). Non-null means this address stays blocked even after
|
|
114
|
+
* removing the app-level row — the provider's list is account-wide and is
|
|
115
|
+
* never cleared by the CLI. Always null where the provider keeps none.
|
|
116
|
+
*/
|
|
117
|
+
export interface PlatformSuppression {
|
|
118
|
+
/** SES-reported reason, e.g. 'BOUNCE' or 'COMPLAINT'. */
|
|
119
|
+
reason: string;
|
|
120
|
+
at: string | null;
|
|
121
|
+
}
|
|
122
|
+
/** One row from the email inbox view (RequestLogDao.listInbox). */
|
|
123
|
+
export interface InboxEmailPreview {
|
|
124
|
+
/** Also the request-log id; open detail with `requests get <id>`. */
|
|
125
|
+
id: string;
|
|
126
|
+
from: string;
|
|
127
|
+
fromName: string | null;
|
|
128
|
+
fromAddress: string;
|
|
129
|
+
to: string;
|
|
130
|
+
subject: string;
|
|
131
|
+
snippet: string;
|
|
132
|
+
receivedAt: string;
|
|
133
|
+
success: boolean;
|
|
134
|
+
hasAttachments: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Minimum fields shared by both sending and inbound domain views.
|
|
138
|
+
* Used by the `resolveDomainId` helper, which reads `id` and `domain` from
|
|
139
|
+
* either list response.
|
|
140
|
+
*/
|
|
141
|
+
export interface EmailDomainBase {
|
|
142
|
+
id: string;
|
|
143
|
+
domain: string;
|
|
144
|
+
}
|
|
145
|
+
/** Visual verification status on the outbound-domains settings UI. */
|
|
146
|
+
export type OutboundEmailDomainUiStatus = 'verified' | 'action_needed' | 'pending';
|
|
147
|
+
/** One DNS record to create at the customer's DNS host. */
|
|
148
|
+
export interface OutboundDnsRecord {
|
|
149
|
+
type: 'CNAME' | 'TXT' | 'MX';
|
|
150
|
+
/** Fully qualified. */
|
|
151
|
+
name: string;
|
|
152
|
+
value: string;
|
|
153
|
+
/** MX records only. */
|
|
154
|
+
priority?: number;
|
|
155
|
+
/** False for a record verification doesn't wait on (an SPF include, a return path). */
|
|
156
|
+
required: boolean;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* DNS records to create at the customer's DNS host for outbound sending:
|
|
160
|
+
* whatever the deployment's email provider issues (on SES, three DKIM CNAMEs,
|
|
161
|
+
* all required, then the bounce domain's MX and SPF TXT on
|
|
162
|
+
* `bounces.<domain>`, recommended).
|
|
163
|
+
*/
|
|
164
|
+
export interface OutboundDnsInstructions {
|
|
165
|
+
records: OutboundDnsRecord[];
|
|
166
|
+
}
|
|
167
|
+
/** Outbound (sending) domain view shape (outboundEmailDomains.ts toView). */
|
|
168
|
+
export interface OutboundEmailDomainView extends EmailDomainBase {
|
|
169
|
+
verifiedAt: string | null;
|
|
170
|
+
sesVerificationStatus: string | null;
|
|
171
|
+
uiStatus: OutboundEmailDomainUiStatus;
|
|
172
|
+
/**
|
|
173
|
+
* Where the domain's bounce domain stands (`pending` until its MX is found),
|
|
174
|
+
* null where the provider has none of its own. Never part of `uiStatus`:
|
|
175
|
+
* the domain sends without it, from the provider's own bounce address.
|
|
176
|
+
*/
|
|
177
|
+
returnPathStatus: 'pending' | 'verified' | 'failed' | null;
|
|
178
|
+
verificationErrors: unknown[] | null;
|
|
179
|
+
createdAt: string;
|
|
180
|
+
dnsInstructions: OutboundDnsInstructions;
|
|
181
|
+
}
|
|
182
|
+
/** Visual verification status on the inbound-domains settings UI. */
|
|
183
|
+
export type InboundEmailDomainUiStatus = 'verified' | 'action_needed' | 'pending';
|
|
184
|
+
/** DNS records to create at the customer's DNS host for inbound mail routing. */
|
|
185
|
+
export interface InboundDnsInstructions {
|
|
186
|
+
mxRecord: {
|
|
187
|
+
name: string;
|
|
188
|
+
priority: number;
|
|
189
|
+
target: string;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Present when the claim owes ownership proof: the domain was already aimed
|
|
193
|
+
* at the platform (or another app held it) before this claim, so it verifies
|
|
194
|
+
* only once this TXT record is published beside the MX.
|
|
195
|
+
*/
|
|
196
|
+
ownershipTxt?: {
|
|
197
|
+
name: string;
|
|
198
|
+
value: string;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
/** Inbound domain view shape (emailDomains.ts toView). */
|
|
202
|
+
export interface InboundEmailDomainView extends EmailDomainBase {
|
|
203
|
+
verifiedAt: string | null;
|
|
204
|
+
lastSyncedAt: string | null;
|
|
205
|
+
verificationErrors: unknown[] | null;
|
|
206
|
+
createdAt: string;
|
|
207
|
+
uiStatus: InboundEmailDomainUiStatus;
|
|
208
|
+
dnsInstructions: InboundDnsInstructions;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Which rung of the sender fallback chain won. `app_domain` / `org_domain` /
|
|
212
|
+
* `subdomain` / `default` / `deployment` are the no-`from` default-sender
|
|
213
|
+
* tiers (`deployment` is the deployment's own address, where its email
|
|
214
|
+
* transport has one); `custom_from` is a caller-supplied handle on an owned
|
|
215
|
+
* domain; `sendgrid` is the v1 path. (OutboundSenderTier in the api's
|
|
216
|
+
* customerApps/AppOutboundEmail/resolveOutboundFromAddress.ts.)
|
|
217
|
+
*/
|
|
218
|
+
export type EmailSenderTier = 'app_domain' | 'org_domain' | 'subdomain' | 'default' | 'deployment' | 'custom_from' | 'sendgrid';
|
|
219
|
+
/** Effective sender resolved from the fallback chain (outbound-email-domains list). */
|
|
220
|
+
export interface EmailEffectiveSender {
|
|
221
|
+
address: string;
|
|
222
|
+
tier: EmailSenderTier;
|
|
223
|
+
/** Null for the `default` platform tier. */
|
|
224
|
+
domain: string | null;
|
|
225
|
+
/**
|
|
226
|
+
* Whether the app can mail any address. False on the shared platform address
|
|
227
|
+
* (the `default` tier), which only mails the app's verified users and its
|
|
228
|
+
* workspace's members and refuses anyone else with `unverified_recipients`; a
|
|
229
|
+
* subdomain or a verified sending domain lifts it.
|
|
230
|
+
*/
|
|
231
|
+
anyRecipient: boolean;
|
|
232
|
+
}
|
|
233
|
+
/** email list → GET /outbound-email/messages */
|
|
234
|
+
export interface EmailListResult {
|
|
235
|
+
messages: V2EmailMessage[];
|
|
236
|
+
nextCursor: string | null;
|
|
237
|
+
}
|
|
238
|
+
/** email get → GET /outbound-email/messages/:messageId */
|
|
239
|
+
export type EmailMessageResult = V2EmailMessage;
|
|
240
|
+
/** email stats → GET /outbound-email/summary */
|
|
241
|
+
export type EmailStatsResult = EmailSummary;
|
|
242
|
+
/** email batches → GET /outbound-email/batches */
|
|
243
|
+
export interface EmailBatchesResult {
|
|
244
|
+
batches: EmailBatchSummary[];
|
|
245
|
+
total: number;
|
|
246
|
+
}
|
|
247
|
+
/** email batch → GET /outbound-email/batches/:batchId */
|
|
248
|
+
export type EmailBatchResult = EmailBatchSummary;
|
|
249
|
+
/** email suppressions → GET /outbound-email/suppressions */
|
|
250
|
+
export interface EmailSuppressionsResult {
|
|
251
|
+
suppressions: AppEmailSuppression[];
|
|
252
|
+
nextCursor: string | null;
|
|
253
|
+
total: number;
|
|
254
|
+
}
|
|
255
|
+
/** email suppress → POST /outbound-email/suppressions/add */
|
|
256
|
+
export interface EmailSuppressResult {
|
|
257
|
+
ok: true;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* email unsuppress → POST /outbound-email/suppressions/remove
|
|
261
|
+
*
|
|
262
|
+
* Three independent outcomes, and only the tenant entry decides deliverability:
|
|
263
|
+
* removed this app's own suppression row is gone
|
|
264
|
+
* tenantEntryRemoved the app's SES TENANT suppression entry (a prior hard
|
|
265
|
+
* bounce or spam report against THIS app) is gone — this
|
|
266
|
+
* is what actually unblocks mail
|
|
267
|
+
* platformSuppression non-null = still on SES's ACCOUNT-wide list, which is
|
|
268
|
+
* never cleared; removal changed nothing about delivery
|
|
269
|
+
*/
|
|
270
|
+
export interface EmailUnsuppressResult {
|
|
271
|
+
ok: true;
|
|
272
|
+
removed: boolean;
|
|
273
|
+
tenantEntryRemoved: boolean;
|
|
274
|
+
platformSuppression: PlatformSuppression | null;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* email status → GET /outbound-email/status
|
|
278
|
+
*
|
|
279
|
+
* Whether this app can send right now, and up to what. Two independent
|
|
280
|
+
* verdicts, deliberately not collapsed: `ses` is Amazon's view of the app's
|
|
281
|
+
* tenant and `enforcement` is the platform's own. The fields that decide what
|
|
282
|
+
* to tell the owner:
|
|
283
|
+
*
|
|
284
|
+
* sending.source 'ses' = AMAZON paused it (we cannot lift it; it
|
|
285
|
+
* clears when the finding clears); 'platform' = we did
|
|
286
|
+
* enforcement.origin 'operator' = a person placed the hold — it will NOT
|
|
287
|
+
* lift itself when rates recover; 'platform' = the
|
|
288
|
+
* automatic sweep, which steps down on its own
|
|
289
|
+
* ses.status 'REINSTATED' still sends — it means "resuming with
|
|
290
|
+
* findings open" and returns to ENABLED on recovery
|
|
291
|
+
*/
|
|
292
|
+
export interface EmailSendingStatusResult {
|
|
293
|
+
sending: {
|
|
294
|
+
allowed: boolean;
|
|
295
|
+
reason: string | null;
|
|
296
|
+
source: 'ses' | 'platform' | null;
|
|
297
|
+
};
|
|
298
|
+
enforcement: {
|
|
299
|
+
level: 'none' | 'throttled' | 'paused';
|
|
300
|
+
origin: 'platform' | 'operator' | null;
|
|
301
|
+
reason: string | null;
|
|
302
|
+
at: string | null;
|
|
303
|
+
};
|
|
304
|
+
ses: {
|
|
305
|
+
status: 'ENABLED' | 'DISABLED' | 'REINSTATED' | null;
|
|
306
|
+
origin: 'CUSTOMER_MANAGED' | 'AWS_SES_MANAGED' | null;
|
|
307
|
+
cause: string | null;
|
|
308
|
+
at: string | null;
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* The enforcement sweep's last measurement, with its denominator — a rate
|
|
312
|
+
* without `accepted` is unreadable (1 bounce in 10 sends is "10%" and means
|
|
313
|
+
* nothing). All null until the sweep has evaluated this app.
|
|
314
|
+
*/
|
|
315
|
+
evaluation: {
|
|
316
|
+
accepted: number | null;
|
|
317
|
+
bounceRate: number | null;
|
|
318
|
+
complaintRate: number | null;
|
|
319
|
+
at: string | null;
|
|
320
|
+
};
|
|
321
|
+
quota: {
|
|
322
|
+
unit: string;
|
|
323
|
+
window: 'day' | 'month' | 'total';
|
|
324
|
+
/** `null` = unlimited. */
|
|
325
|
+
limit: number | null;
|
|
326
|
+
used: number;
|
|
327
|
+
remaining: number | null;
|
|
328
|
+
resetsAt: string | null;
|
|
329
|
+
/**
|
|
330
|
+
* Where the limit came from: 'platform' is the default; 'app'/'org'/'plan'
|
|
331
|
+
* is an override — support-granted, or the sweep's automatic throttle.
|
|
332
|
+
*/
|
|
333
|
+
source: 'app' | 'org' | 'plan' | 'platform';
|
|
334
|
+
/** When an override lapses and the limit reverts. */
|
|
335
|
+
expiresAt: string | null;
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
/** email inbox → GET /inbox */
|
|
339
|
+
export interface EmailInboxResult {
|
|
340
|
+
emails: InboxEmailPreview[];
|
|
341
|
+
nextCursor: string | null;
|
|
342
|
+
}
|
|
343
|
+
/** email domains list → GET /settings/outbound-email-domains */
|
|
344
|
+
export interface OutboundEmailDomainsListResult {
|
|
345
|
+
/** `boughtDomain`: the domain the workspace bought that this one is on, whose records the platform writes. */
|
|
346
|
+
domains: Array<OutboundEmailDomainView & {
|
|
347
|
+
boughtDomain: BoughtDomain | null;
|
|
348
|
+
}>;
|
|
349
|
+
/** Null where the deployment sends no email (`emailConfigured` false). */
|
|
350
|
+
effectiveSender: EmailEffectiveSender | null;
|
|
351
|
+
emailConfigured: boolean;
|
|
352
|
+
/** False where every app sends from the deployment's address, so there's no domain to add. */
|
|
353
|
+
sendingDomainsAvailable: boolean;
|
|
354
|
+
}
|
|
355
|
+
/** email domains check → POST /settings/outbound-email-domains/check-domain */
|
|
356
|
+
export interface OutboundEmailDomainCheckResult {
|
|
357
|
+
valid: boolean;
|
|
358
|
+
errorMessage?: string;
|
|
359
|
+
}
|
|
360
|
+
/** email domains add → POST /settings/outbound-email-domains */
|
|
361
|
+
export interface OutboundEmailDomainAddResult {
|
|
362
|
+
domain: OutboundEmailDomainView;
|
|
363
|
+
/** Set on add when the domain is one the workspace bought: the records the platform wrote. */
|
|
364
|
+
registeredDomain?: RegisteredDomainRecords | null;
|
|
365
|
+
}
|
|
366
|
+
/** email domains verify → POST /settings/outbound-email-domains/:id/retry */
|
|
367
|
+
export type OutboundEmailDomainVerifyResult = OutboundEmailDomainAddResult;
|
|
368
|
+
/** email domains remove → POST /settings/outbound-email-domains/:id/delete */
|
|
369
|
+
export interface OutboundEmailDomainDeleteResult {
|
|
370
|
+
ok: true;
|
|
371
|
+
}
|
|
372
|
+
/** email inbound-domains list → GET /settings/email-domains */
|
|
373
|
+
export interface InboundEmailDomainsListResult {
|
|
374
|
+
/** `boughtDomain`: the domain the workspace bought that this one is on, whose records the platform writes. */
|
|
375
|
+
domains: Array<InboundEmailDomainView & {
|
|
376
|
+
boughtDomain: BoughtDomain | null;
|
|
377
|
+
}>;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* email inbound-domains check → POST /settings/email-domains/check-domain
|
|
381
|
+
* `dnsInstructions` is included when `valid` is true — the MX record is known
|
|
382
|
+
* without registering and can be given to the customer up front.
|
|
383
|
+
*/
|
|
384
|
+
export interface InboundEmailDomainCheckResult {
|
|
385
|
+
valid: boolean;
|
|
386
|
+
errorMessage?: string;
|
|
387
|
+
dnsInstructions?: InboundDnsInstructions;
|
|
388
|
+
}
|
|
389
|
+
/** email inbound-domains add → POST /settings/email-domains */
|
|
390
|
+
export interface InboundEmailDomainAddResult {
|
|
391
|
+
domain: InboundEmailDomainView;
|
|
392
|
+
/** Set on add when the domain is one the workspace bought: the records the platform wrote. */
|
|
393
|
+
registeredDomain?: RegisteredDomainRecords | null;
|
|
394
|
+
}
|
|
395
|
+
/** email inbound-domains verify → POST /settings/email-domains/:id/retry */
|
|
396
|
+
export type InboundEmailDomainVerifyResult = InboundEmailDomainAddResult;
|
|
397
|
+
/** email inbound-domains remove → POST /settings/email-domains/:id/delete */
|
|
398
|
+
export interface InboundEmailDomainDeleteResult {
|
|
399
|
+
ok: true;
|
|
400
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response types for the v2 app-events observability endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Transcribed from the api (apps/api/src/):
|
|
5
|
+
* roles/http/routes/Apps/manage/appEvents.ts — routes
|
|
6
|
+
* customerApps/AppEvents/activity.ts — ChannelActivityRow
|
|
7
|
+
* customerApps/AppEvents/publish.ts — delivered semantics
|
|
8
|
+
*/
|
|
9
|
+
/** One channel's recent activity, from the channels view. */
|
|
10
|
+
export interface EventChannelActivity {
|
|
11
|
+
channel: string;
|
|
12
|
+
/** Last publish naming this channel (ms since epoch), if any in 24h. */
|
|
13
|
+
lastPublishAt?: number;
|
|
14
|
+
/** Last subscription naming this channel (ms since epoch), if any in 24h. */
|
|
15
|
+
lastSubscribeAt?: number;
|
|
16
|
+
/** Live subscriber connections right now. */
|
|
17
|
+
subscribers: number;
|
|
18
|
+
}
|
|
19
|
+
/** GET /_internal/v2/apps/:appId/events/channels */
|
|
20
|
+
export interface EventsChannelsListResult {
|
|
21
|
+
/** The environment scope inspected: `live` | `preview:<id>` | `dev:<id>`. */
|
|
22
|
+
scope: string;
|
|
23
|
+
/** Recency-sorted, capped at 200 rows, 24h window. */
|
|
24
|
+
channels: EventChannelActivity[];
|
|
25
|
+
}
|
|
26
|
+
/** POST /_internal/v2/apps/:appId/events/publish */
|
|
27
|
+
export interface EventsPublishResult {
|
|
28
|
+
/**
|
|
29
|
+
* Live subscriber connections counted across the published channels.
|
|
30
|
+
* `0` means nobody is listening right now — normal for a nudge, not an
|
|
31
|
+
* error.
|
|
32
|
+
*/
|
|
33
|
+
delivered: number;
|
|
34
|
+
/**
|
|
35
|
+
* The platform-stamped publish id — the same id arrives on every delivered
|
|
36
|
+
* frame, so it correlates a test publish with `events tail` output.
|
|
37
|
+
*/
|
|
38
|
+
id: string;
|
|
39
|
+
scope: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* One frame printed by `events tail` (also the subscribe stream's shape).
|
|
43
|
+
* A slow reader may also see `{ type: 'events_dropped', count, ts }` — the
|
|
44
|
+
* platform drops rather than buffers when a consumer falls behind, and says
|
|
45
|
+
* how many frames it dropped once the stream drains.
|
|
46
|
+
*/
|
|
47
|
+
export interface EventsTailFrame {
|
|
48
|
+
/** Platform-stamped publish id (consumer dedupe key: `id` + `channel`). */
|
|
49
|
+
id: string;
|
|
50
|
+
channel: string;
|
|
51
|
+
data: unknown;
|
|
52
|
+
/** Publish time, ms since epoch. */
|
|
53
|
+
ts: number;
|
|
54
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response shapes for the feedback command group — transcribed from the api.
|
|
3
|
+
*
|
|
4
|
+
* Sources (apps/api/src/):
|
|
5
|
+
* roles/http/routes/Apps/develop/feedback.ts
|
|
6
|
+
*/
|
|
7
|
+
/** POST /_internal/v2/apps/:appId/feedback-draft */
|
|
8
|
+
export interface FeedbackDraftResult {
|
|
9
|
+
/** The draft went to the person's open editors on this app. */
|
|
10
|
+
status: 'sent_to_editor';
|
|
11
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response types for the file-storage management API.
|
|
3
|
+
*
|
|
4
|
+
* Transcribed from the api (apps/api/src/):
|
|
5
|
+
* roles/http/routes/Apps/manage/files.ts
|
|
6
|
+
* platform/Storage/AppFilesService.ts
|
|
7
|
+
*
|
|
8
|
+
* 204/empty responses surface as `{ ok: true; status: number }` (readBody in api.ts).
|
|
9
|
+
*/
|
|
10
|
+
/** Shared file metadata — store-relative key, size, content type, last modified. */
|
|
11
|
+
export interface FilesFileMeta {
|
|
12
|
+
store: string;
|
|
13
|
+
key: string;
|
|
14
|
+
size?: number;
|
|
15
|
+
contentType?: string;
|
|
16
|
+
/** ISO-8601 last-modified timestamp. */
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* POST /file-storage/upload-url — presigned S3 POST for a direct upload.
|
|
21
|
+
*
|
|
22
|
+
* createUploadPost returns `{ key, uploadUrl, uploadFields }`, and the route adds
|
|
23
|
+
* the permanent on-domain `url` the object will be readable at once uploaded.
|
|
24
|
+
*/
|
|
25
|
+
export interface FilesUploadUrlResult {
|
|
26
|
+
key: string;
|
|
27
|
+
uploadUrl: string;
|
|
28
|
+
uploadFields: Record<string, string>;
|
|
29
|
+
/** Permanent on-domain URL for the uploaded object (e.g. `https://<app>/_/files/public/<store>/<key>`). */
|
|
30
|
+
url: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* GET /file-storage/url — read link for one object.
|
|
34
|
+
*
|
|
35
|
+
* Private → short-lived signed URL with `expiresAt` (ttl clamped to [60s, 7d];
|
|
36
|
+
* a storage presign, off the private CDN, lasts three hours at most).
|
|
37
|
+
* Public → permanent on-domain URL, no expiry field.
|
|
38
|
+
*/
|
|
39
|
+
export interface FilesUrlResult {
|
|
40
|
+
url: string;
|
|
41
|
+
/** ISO-8601 expiry timestamp; present for private objects only. */
|
|
42
|
+
expiresAt?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Scan badge on one object — absent for objects that predate the scan pipeline. */
|
|
45
|
+
export interface FilesScanBadge {
|
|
46
|
+
avStatus: string;
|
|
47
|
+
avScannedAt: string | null;
|
|
48
|
+
avSignature: string | null;
|
|
49
|
+
/** Provider-specific AV detail blob. */
|
|
50
|
+
avDetail: unknown;
|
|
51
|
+
piiStatus: string;
|
|
52
|
+
piiScannedAt: string | null;
|
|
53
|
+
/** Provider-specific PII entities blob. */
|
|
54
|
+
piiEntities: unknown;
|
|
55
|
+
/** Provider-specific PII detail blob. */
|
|
56
|
+
piiDetail: unknown;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* GET /file-storage/metadata — object metadata without downloading.
|
|
60
|
+
*
|
|
61
|
+
* Extends FilesFileMeta (etag is surfaced as `checksum`). AV-flagged files
|
|
62
|
+
* return `thumbnailUrl: null` and no `previewUrl`.
|
|
63
|
+
*/
|
|
64
|
+
export interface FilesStatResult extends FilesFileMeta {
|
|
65
|
+
/** S3 ETag with quotes stripped — the dashboard's copyable checksum. */
|
|
66
|
+
checksum?: string;
|
|
67
|
+
thumbnailUrl: string | null;
|
|
68
|
+
/** Presigned (private) or permanent on-domain (public) URL for the preview pane. Absent for flagged files. */
|
|
69
|
+
previewUrl?: string;
|
|
70
|
+
scan?: FilesScanBadge;
|
|
71
|
+
/** Inline UTF-8 for text-like types under the 256KB preview cap. */
|
|
72
|
+
textPreview?: string;
|
|
73
|
+
truncated?: boolean;
|
|
74
|
+
}
|
|
75
|
+
/** One entry in a GET /file-storage listing page. */
|
|
76
|
+
export interface FilesListEntry extends FilesFileMeta {
|
|
77
|
+
/** Scan badges; absent for objects that predate the scan pipeline. */
|
|
78
|
+
scan?: {
|
|
79
|
+
avStatus: string;
|
|
80
|
+
piiStatus: string;
|
|
81
|
+
};
|
|
82
|
+
thumbnailUrl?: string;
|
|
83
|
+
/** Public stores only — permanent on-domain URL (zero-round-trip "Copy link"). */
|
|
84
|
+
url?: string;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* GET /file-storage — paginated object listing for one store.
|
|
88
|
+
*
|
|
89
|
+
* Flat by default; `folders` is only present when `--delimiter` was passed
|
|
90
|
+
* (folder-at-a-time mode). `q` mode (substring search) never returns `folders`.
|
|
91
|
+
*/
|
|
92
|
+
export interface FilesLsResult {
|
|
93
|
+
files: FilesListEntry[];
|
|
94
|
+
/** Folder mode only — store-relative sub-prefixes (each carries a trailing slash). */
|
|
95
|
+
folders?: {
|
|
96
|
+
prefix: string;
|
|
97
|
+
}[];
|
|
98
|
+
cursor?: string;
|
|
99
|
+
}
|
|
100
|
+
/** Per-store object count and total bytes in the summary. */
|
|
101
|
+
export interface FilesStoreSummaryEntry {
|
|
102
|
+
store: string;
|
|
103
|
+
access: 'public' | 'private';
|
|
104
|
+
objectCount: number;
|
|
105
|
+
totalBytes: number;
|
|
106
|
+
}
|
|
107
|
+
/** Scan counts per store — one GROUP BY per bucket in the summary. */
|
|
108
|
+
export interface FilesScanStore {
|
|
109
|
+
store: string;
|
|
110
|
+
access: 'public' | 'private';
|
|
111
|
+
/** AV status → count. */
|
|
112
|
+
av: Record<string, number>;
|
|
113
|
+
/** PII status → count. */
|
|
114
|
+
pii: Record<string, number>;
|
|
115
|
+
}
|
|
116
|
+
/** One AV-flagged object in the summary's flagged list. */
|
|
117
|
+
export interface FilesScanFlagged {
|
|
118
|
+
store: string;
|
|
119
|
+
access: 'public' | 'private';
|
|
120
|
+
key: string;
|
|
121
|
+
avSignature: string | null;
|
|
122
|
+
avScannedAt: string | null;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* GET /file-storage/summary — store-level usage and scan rollup.
|
|
126
|
+
*
|
|
127
|
+
* Extends AppFilesSummary with a `scans` sub-object containing per-store
|
|
128
|
+
* AV/PII histograms and up to five freshest flagged entries.
|
|
129
|
+
*/
|
|
130
|
+
export interface FilesListResult {
|
|
131
|
+
/** Per-(store, access) object counts and bytes. Internal (_-prefixed) stores excluded. */
|
|
132
|
+
stores: FilesStoreSummaryEntry[];
|
|
133
|
+
totalObjects: number;
|
|
134
|
+
totalBytes: number;
|
|
135
|
+
scans: {
|
|
136
|
+
/** AV/PII status histograms per (store, access). */
|
|
137
|
+
stores: FilesScanStore[];
|
|
138
|
+
/** Up to five most-recently-scanned flagged objects across all stores. */
|
|
139
|
+
flagged: FilesScanFlagged[];
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* POST /file-storage/delete — always responds 204 (empty body).
|
|
144
|
+
*
|
|
145
|
+
* Surfaces as `{ ok: true; status: number }` via readBody in api.ts.
|
|
146
|
+
*/
|
|
147
|
+
export interface FilesDeleteResult {
|
|
148
|
+
ok: true;
|
|
149
|
+
status: number;
|
|
150
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel for the response types — one file per domain, each hand-transcribed
|
|
3
|
+
* from its route in the api (source paths in each file's header). Re-exported
|
|
4
|
+
* from the package root so importing callers get the full typed surface.
|
|
5
|
+
*/
|
|
6
|
+
export * from './agent.js';
|
|
7
|
+
export * from './tasks.js';
|
|
8
|
+
export * from './usage.js';
|
|
9
|
+
export * from './analytics.js';
|
|
10
|
+
export * from './apps.js';
|
|
11
|
+
export * from './crashes.js';
|
|
12
|
+
export * from './cron.js';
|
|
13
|
+
export * from './data.js';
|
|
14
|
+
export * from './dataSources.js';
|
|
15
|
+
export * from './dataSourceJobs.js';
|
|
16
|
+
export * from './dataSourceConnectors.js';
|
|
17
|
+
export * from './dataSourceEvals.js';
|
|
18
|
+
export * from './dataSourceMappers.js';
|
|
19
|
+
export * from './dataSourceReaders.js';
|
|
20
|
+
export * from './db.js';
|
|
21
|
+
export * from './diagnostics.js';
|
|
22
|
+
export * from './domains.js';
|
|
23
|
+
export * from './email.js';
|
|
24
|
+
export * from './events.js';
|
|
25
|
+
export * from './files.js';
|
|
26
|
+
export * from './issues.js';
|
|
27
|
+
export * from './jewels.js';
|
|
28
|
+
export * from './methods.js';
|
|
29
|
+
export * from './prerender.js';
|
|
30
|
+
export * from './previews.js';
|
|
31
|
+
export * from './progress.js';
|
|
32
|
+
export * from './releases.js';
|
|
33
|
+
export * from './requests.js';
|
|
34
|
+
export * from './secrets.js';
|
|
35
|
+
export * from './settings.js';
|
|
36
|
+
export * from './users.js';
|
|
37
|
+
export * from './voice.js';
|