@plexuslabs/simmail 0.0.0-stage → 0.1.1

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/enums.js ADDED
@@ -0,0 +1,863 @@
1
+ // Generated by sdk/tools/gen_enums.py from GET /api/schema (version 1). Do not edit by hand.
2
+ //
3
+ // Named values for every setting with a fixed set of choices. Each constant is the
4
+ // API's plain string, so a method takes either: Temperament.Skeptical === "skeptical".
5
+ // EnumInfo has each value's label, description and plan feature.
6
+
7
+ const e = o => Object.freeze(o);
8
+
9
+ /** How a person tends to answer. */
10
+ export const Temperament = e({ Responsive: "responsive", Busy: "busy", Procedural: "procedural", Skeptical: "skeptical", Flaky: "flaky", Difficult: "difficult", Ghost: "ghost" });
11
+ /** How much a person knows about their case. */
12
+ export const Knows = e({ All: "all", Some: "some", Little: "little" });
13
+ /** Whose hours a person's replies keep. */
14
+ export const Life = e({ Work: "work", Personal: "personal", Both: "both" });
15
+ /** How long a person writes. */
16
+ export const Length = e({ Short: "short", Medium: "medium", Long: "long" });
17
+ /** How formally a person writes. */
18
+ export const Formality = e({ Casual: "casual", Neutral: "neutral", Formal: "formal" });
19
+ /** A person's mail program: how their mail looks. */
20
+ export const MailClient = e({ Gmail: "gmail", Outlook: "outlook", Apple: "apple", IPhone: "iphone", Android: "android", Plain: "plain" });
21
+ /** Whether a person clicks links in mail. */
22
+ export const LinkHabit = e({ Usual: "usual", Curious: "curious", Wary: "wary", Never: "never" });
23
+ /** A person's provider's spam filter. */
24
+ export const SpamFilter = e({ Strict: "strict", Normal: "normal", Lenient: "lenient", None: "none" });
25
+ /** How a person takes in mail. */
26
+ export const Access = e({ ScreenReader: "screen_reader", LowVision: "low_vision" });
27
+ /** How a person feels about a sender (it follows the conversation). */
28
+ export const Stance = e({ Warm: "warm", Neutral: "neutral", Wary: "wary", Annoyed: "annoyed", Done: "done" });
29
+ /** What a bad address does. */
30
+ export const BadKind = e({ Blocked: "blocked", Disabled: "disabled", Domain: "domain", Full: "full", Unknown: "unknown" });
31
+ /** When a bad address fails. */
32
+ export const FailAt = e({ Dsn: "dsn", Rcpt: "rcpt" });
33
+ /** Who is behind a never-seen address. */
34
+ export const Stranger = e({ Off: "off", Basic: "basic", Ai: "ai" });
35
+ /** A fixed outcome for one address as a recipient (ok clears it). */
36
+ export const MailboxStatus = e({ Ok: "ok", Blocked: "blocked", Disabled: "disabled", Domain: "domain", Full: "full", Unknown: "unknown" });
37
+ /** What a fault rule does. */
38
+ export const FaultKind = e({ Error: "error", Greylist: "greylist", Rate: "rate", Drop: "drop" });
39
+ /** When in the SMTP conversation a fault rule acts. */
40
+ export const FaultStage = e({ Mail: "mail", Rcpt: "rcpt", Data: "data" });
41
+ /** Real providers' failures, ready made. */
42
+ export const FaultScenario = e({ GmailUnauthenticated: "gmail-unauthenticated", GmailRate: "gmail-rate", GmailNoUser: "gmail-no-user", GmailOverQuota: "gmail-over-quota", MicrosoftBusy: "microsoft-busy", MicrosoftBlocked: "microsoft-blocked", MicrosoftAccessDenied: "microsoft-access-denied", YahooDeferred: "yahoo-deferred", YahooPolicy: "yahoo-policy", Greylisting: "greylisting", RateLimit: "rate-limit", Drop: "drop", Slow: "slow", MailboxFull: "mailbox-full" });
43
+ /** When a sender's website does not exist. */
44
+ export const MissingSite = e({ Imagine: "imagine", Notice: "notice" });
45
+ /** Links to your own machine or network. */
46
+ export const LocalLinks = e({ Ignore: "ignore", Broken: "broken" });
47
+ /** What an inbound stream of the World sends. */
48
+ export const StreamKind = e({ Lead: "lead", Support: "support", Vendor: "vendor", Partner: "partner", Customer: "customer", Newsletter: "newsletter", Spam: "spam", Phishing: "phishing", Custom: "custom" });
49
+ /** AI writing on or off. */
50
+ export const AiMode = e({ On: "on", Off: "off" });
51
+ /** Event types, for waits, the event stream and webhooks (a name ending in * matches a prefix). */
52
+ export const EventType = e({ MailDelivered: "mail.delivered", MailRetried: "mail.retried", MailDeleted: "mail.deleted", PersonaReceived: "persona.received", PersonaSent: "persona.sent", PersonaIgnored: "persona.ignored", PersonaBatched: "persona.batched", PersonaJunked: "persona.junked", PersonaRescued: "persona.rescued", PersonaBounced: "persona.bounced", PersonaPromised: "persona.promised", PersonaWaiting: "persona.waiting", PersonaCreated: "persona.created", PersonaUpdated: "persona.updated", PersonaMemory: "persona.memory", LinkOpened: "link.opened", LinkSkipped: "link.skipped", LinkFailed: "link.failed", LinkSender: "link.sender", InspectScored: "inspect.scored", InspectLinks: "inspect.links", WorldMail: "world.mail", WorldUpdated: "world.updated", JobScheduled: "job.scheduled", JobUpdated: "job.updated", JobDone: "job.done", JobSkipped: "job.skipped", JobFailed: "job.failed", CaseUpdated: "case.updated", Clock: "clock", Pace: "pace", FaultsUpdated: "faults.updated", JunkSettings: "junk.settings", NetworkUpdated: "network.updated", RetentionPruned: "retention.pruned", WebhookFailed: "webhook.failed", WriterFallback: "writer.fallback", AiMode: "ai.mode", AuthOk: "auth.ok", AuthFailed: "auth.failed", CheckReceived: "check.received", CheckDone: "check.done", CheckRefused: "check.refused" });
53
+ /** What a planned job is. */
54
+ export const JobKind = e({ Reply: "reply", Followup: "followup", Correction: "correction", OutOfOffice: "ooo", Bounce: "bounce", Initiate: "initiate", Deliver: "deliver", Nudge: "nudge", Dsn: "dsn", World: "world", Visit: "visit" });
55
+ /** Where a job stands. */
56
+ export const JobState = e({ Pending: "pending", Done: "done", Skipped: "skipped", Failed: "failed" });
57
+ /** Common folders (any folder name works too). */
58
+ export const Folder = e({ Inbox: "INBOX", Sent: "Sent", Drafts: "Drafts", Archive: "Archive", Trash: "Trash", Junk: "Junk" });
59
+ /** Which protocol a login test tries. */
60
+ export const Protocol = e({ Smtp: "smtp", Imap: "imap" });
61
+ /** A role in a universe. */
62
+ export const Role = e({ Viewer: "viewer", Member: "member", Admin: "admin", Owner: "owner" });
63
+ /** Where a persona came from. */
64
+ export const PersonaSource = e({ Api: "api", Case: "case", Stranger: "stranger", World: "world", Mail: "mail", Config: "config" });
65
+ /** Who wrote a case's story. */
66
+ export const StoryBy = e({ Ai: "ai", Template: "template", Edited: "edited" });
67
+ /** Friendlier names the event wait accepts for common events. */
68
+ export const EventAlias = e({ Delivered: "delivered", Received: "received", Replied: "replied", Sent: "sent", Declined: "declined", Ignored: "ignored", Junked: "junked", Bounced: "bounced", Clicked: "clicked", OpenedLink: "opened_link", Promised: "promised", Rescued: "rescued" });
69
+ /** The code every error answer carries. */
70
+ export const ErrorCode = e({ BadRequest: "bad_request", InvalidValue: "invalid_value", InvalidRegex: "invalid_regex", Unauthorized: "unauthorized", NotInPlan: "not_in_plan", Forbidden: "forbidden", NotFound: "not_found", MethodNotAllowed: "method_not_allowed", Timeout: "timeout", WaitTimeout: "wait_timeout", Conflict: "conflict", UnexpectedEmail: "unexpected_email", TooLarge: "too_large", Unprocessable: "unprocessable", IdempotencyMismatch: "idempotency_mismatch", RateLimited: "rate_limited", InternalError: "internal_error", BadGateway: "bad_gateway", Unavailable: "unavailable" });
71
+
72
+ /** Each enum value's label, description and plan feature: EnumInfo.Temperament.skeptical.label. */
73
+ export const EnumInfo = e({
74
+ "Temperament": {
75
+ "responsive": {
76
+ "label": "Responsive",
77
+ "description": "Answers promptly and fully. Friendly, organised, answers every question asked. (replies 95% of the time, typically after 12m0s)"
78
+ },
79
+ "busy": {
80
+ "label": "Busy",
81
+ "description": "Answers late and briefly, often only part of the question. Short sentences, no pleasantries, sometimes from a phone. (replies 85% of the time, typically after 1h15m0s)"
82
+ },
83
+ "procedural": {
84
+ "label": "Procedural",
85
+ "description": "Polite and correct, and wants the right paperwork, forms or reference numbers before doing anything. (replies 90% of the time, typically after 45m0s)"
86
+ },
87
+ "skeptical": {
88
+ "label": "Skeptical",
89
+ "description": "Questions the premise, wants proof, and does not take claims at face value. (replies 80% of the time, typically after 1h0m0s)"
90
+ },
91
+ "flaky": {
92
+ "label": "Flaky",
93
+ "description": "Agrees readily, then goes quiet or forgets; needs reminding; sometimes contradicts an earlier message. (replies 60% of the time, typically after 3h0m0s)"
94
+ },
95
+ "difficult": {
96
+ "label": "Difficult",
97
+ "description": "Pushes back, negotiates hard, takes offence easily, and escalates. (replies 75% of the time, typically after 1h30m0s)"
98
+ },
99
+ "ghost": {
100
+ "label": "Ghost",
101
+ "description": "Rarely replies at all; when they do, it is one line, days later. (replies 15% of the time, typically after 24h0m0s)"
102
+ }
103
+ },
104
+ "Knows": {
105
+ "all": {
106
+ "label": "All",
107
+ "description": "Everything about their case"
108
+ },
109
+ "some": {
110
+ "label": "Some",
111
+ "description": "Some of it"
112
+ },
113
+ "little": {
114
+ "label": "Little",
115
+ "description": "Very little"
116
+ }
117
+ },
118
+ "Life": {
119
+ "work": {
120
+ "label": "Work",
121
+ "description": "Keeps working hours"
122
+ },
123
+ "personal": {
124
+ "label": "Personal",
125
+ "description": "Answers on their own time"
126
+ },
127
+ "both": {
128
+ "label": "Both",
129
+ "description": "Personal-looking mail on their own time, the rest in working hours"
130
+ }
131
+ },
132
+ "Length": {
133
+ "short": {
134
+ "label": "Short"
135
+ },
136
+ "medium": {
137
+ "label": "Medium"
138
+ },
139
+ "long": {
140
+ "label": "Long"
141
+ }
142
+ },
143
+ "Formality": {
144
+ "casual": {
145
+ "label": "Casual"
146
+ },
147
+ "neutral": {
148
+ "label": "Neutral"
149
+ },
150
+ "formal": {
151
+ "label": "Formal"
152
+ }
153
+ },
154
+ "MailClient": {
155
+ "gmail": {
156
+ "label": "Gmail (HTML)"
157
+ },
158
+ "outlook": {
159
+ "label": "Outlook (HTML)"
160
+ },
161
+ "apple": {
162
+ "label": "Apple Mail (HTML)"
163
+ },
164
+ "iphone": {
165
+ "label": "iPhone Mail (mobile)"
166
+ },
167
+ "android": {
168
+ "label": "Gmail on Android (mobile)"
169
+ },
170
+ "plain": {
171
+ "label": "plain-text client"
172
+ }
173
+ },
174
+ "LinkHabit": {
175
+ "usual": {
176
+ "label": "Usual",
177
+ "description": "Clicks what seems relevant"
178
+ },
179
+ "curious": {
180
+ "label": "Curious",
181
+ "description": "Clicks readily"
182
+ },
183
+ "wary": {
184
+ "label": "Wary",
185
+ "description": "Rarely clicks"
186
+ },
187
+ "never": {
188
+ "label": "Never",
189
+ "description": "Never clicks"
190
+ }
191
+ },
192
+ "SpamFilter": {
193
+ "strict": {
194
+ "label": "Strict"
195
+ },
196
+ "normal": {
197
+ "label": "Normal"
198
+ },
199
+ "lenient": {
200
+ "label": "Lenient"
201
+ },
202
+ "none": {
203
+ "label": "None"
204
+ }
205
+ },
206
+ "Access": {
207
+ "screen_reader": {
208
+ "label": "Screen reader",
209
+ "description": "Hears the email through a screen reader"
210
+ },
211
+ "low_vision": {
212
+ "label": "Low vision",
213
+ "description": "Zooms in; small or low-contrast text is hard to read"
214
+ }
215
+ },
216
+ "Stance": {
217
+ "warm": {
218
+ "label": "Warm"
219
+ },
220
+ "neutral": {
221
+ "label": "Neutral"
222
+ },
223
+ "wary": {
224
+ "label": "Wary"
225
+ },
226
+ "annoyed": {
227
+ "label": "Annoyed"
228
+ },
229
+ "done": {
230
+ "label": "Done"
231
+ }
232
+ },
233
+ "BadKind": {
234
+ "blocked": {
235
+ "label": "Blocked",
236
+ "description": "Blocked as spam (554 5.7.1)"
237
+ },
238
+ "disabled": {
239
+ "label": "Disabled",
240
+ "description": "Mailbox disabled (550 5.2.1)"
241
+ },
242
+ "domain": {
243
+ "label": "Domain",
244
+ "description": "No such domain (550 5.1.2)"
245
+ },
246
+ "full": {
247
+ "label": "Full",
248
+ "description": "Mailbox full (552 5.2.2)"
249
+ },
250
+ "unknown": {
251
+ "label": "Unknown",
252
+ "description": "No such user (550 5.1.1)"
253
+ }
254
+ },
255
+ "FailAt": {
256
+ "dsn": {
257
+ "label": "Dsn",
258
+ "description": "Accept, then a bounce notice arrives later"
259
+ },
260
+ "rcpt": {
261
+ "label": "Rcpt",
262
+ "description": "Refused at once during SMTP"
263
+ }
264
+ },
265
+ "Stranger": {
266
+ "off": {
267
+ "label": "Off",
268
+ "description": "Nobody is behind a new address"
269
+ },
270
+ "basic": {
271
+ "label": "Basic",
272
+ "description": "A person is made from the address"
273
+ },
274
+ "ai": {
275
+ "label": "Ai",
276
+ "description": "The AI invents who they are from the first email"
277
+ }
278
+ },
279
+ "MailboxStatus": {
280
+ "ok": {
281
+ "label": "Ok"
282
+ },
283
+ "blocked": {
284
+ "label": "Blocked"
285
+ },
286
+ "disabled": {
287
+ "label": "Disabled"
288
+ },
289
+ "domain": {
290
+ "label": "Domain"
291
+ },
292
+ "full": {
293
+ "label": "Full"
294
+ },
295
+ "unknown": {
296
+ "label": "Unknown"
297
+ }
298
+ },
299
+ "FaultKind": {
300
+ "error": {
301
+ "label": "Error",
302
+ "description": "Refuse or delay with a code"
303
+ },
304
+ "greylist": {
305
+ "label": "Greylist",
306
+ "description": "Defer the first attempt, accept a retry",
307
+ "feature": "chaos_profiles"
308
+ },
309
+ "rate": {
310
+ "label": "Rate limit",
311
+ "description": "Defer above a rate",
312
+ "feature": "chaos_profiles"
313
+ },
314
+ "drop": {
315
+ "label": "Drop",
316
+ "description": "Close the connection without answering",
317
+ "feature": "chaos_profiles"
318
+ }
319
+ },
320
+ "FaultStage": {
321
+ "mail": {
322
+ "label": "Mail",
323
+ "description": "At MAIL FROM"
324
+ },
325
+ "rcpt": {
326
+ "label": "Rcpt",
327
+ "description": "At RCPT TO"
328
+ },
329
+ "data": {
330
+ "label": "Data",
331
+ "description": "After DATA"
332
+ }
333
+ },
334
+ "FaultScenario": {
335
+ "gmail-unauthenticated": {
336
+ "label": "Gmail: Rejects unauthenticated mail",
337
+ "description": "Gmail refuses mail that passes neither SPF nor DKIM.",
338
+ "feature": "chaos_profiles"
339
+ },
340
+ "gmail-rate": {
341
+ "label": "Gmail: Rate-limits your IP",
342
+ "description": "Too much mail too fast: Gmail defers with 421 4.7.28.",
343
+ "feature": "chaos_profiles"
344
+ },
345
+ "gmail-no-user": {
346
+ "label": "Gmail: Mailbox does not exist",
347
+ "description": "A Gmail address that was never created or was deleted.",
348
+ "feature": "chaos_profiles"
349
+ },
350
+ "gmail-over-quota": {
351
+ "label": "Gmail: Recipient over quota",
352
+ "description": "The recipient's storage is full; a temporary failure.",
353
+ "feature": "chaos_profiles"
354
+ },
355
+ "microsoft-busy": {
356
+ "label": "Microsoft (Outlook, Hotmail, 365): Server busy",
357
+ "description": "Outlook.com and Exchange Online defer under load: retry later.",
358
+ "feature": "chaos_profiles"
359
+ },
360
+ "microsoft-blocked": {
361
+ "label": "Microsoft (Outlook, Hotmail, 365): Sending IP blocked",
362
+ "description": "Your IP is on a blocklist Microsoft uses.",
363
+ "feature": "chaos_profiles"
364
+ },
365
+ "microsoft-access-denied": {
366
+ "label": "Microsoft (Outlook, Hotmail, 365): Recipient rejects you",
367
+ "description": "The recipient's organisation does not accept your mail.",
368
+ "feature": "chaos_profiles"
369
+ },
370
+ "yahoo-deferred": {
371
+ "label": "Yahoo / AOL: Deferred for volume or complaints",
372
+ "description": "Yahoo's TSS04: too much volume or too many complaints; slow down.",
373
+ "feature": "chaos_profiles"
374
+ },
375
+ "yahoo-policy": {
376
+ "label": "Yahoo / AOL: Not accepted for policy reasons",
377
+ "description": "Content or reputation fails Yahoo's policy.",
378
+ "feature": "chaos_profiles"
379
+ },
380
+ "greylisting": {
381
+ "label": "Any server: Greylisting",
382
+ "description": "First attempt for each sender and recipient is deferred; a retry a little later succeeds. Tests that the app retries.",
383
+ "feature": "chaos_profiles"
384
+ },
385
+ "rate-limit": {
386
+ "label": "Any server: Rate limit",
387
+ "description": "More than 20 messages a minute are deferred with 421.",
388
+ "feature": "chaos_profiles"
389
+ },
390
+ "drop": {
391
+ "label": "Any server: Dropped connection",
392
+ "description": "The server hangs up in the middle of sending the message.",
393
+ "feature": "chaos_profiles"
394
+ },
395
+ "slow": {
396
+ "label": "Any server: Slow server",
397
+ "description": "Every message takes 20 seconds to be accepted: tests timeouts.",
398
+ "feature": "chaos_profiles"
399
+ },
400
+ "mailbox-full": {
401
+ "label": "Any server: Mailbox full",
402
+ "description": "Some recipients' mailboxes are full (permanent).",
403
+ "feature": "chaos_profiles"
404
+ }
405
+ },
406
+ "MissingSite": {
407
+ "imagine": {
408
+ "label": "Imagine",
409
+ "description": "The AI imagines what they find"
410
+ },
411
+ "notice": {
412
+ "label": "Notice",
413
+ "description": "They see there is no site"
414
+ }
415
+ },
416
+ "LocalLinks": {
417
+ "ignore": {
418
+ "label": "Ignore",
419
+ "description": "Treated as testing links"
420
+ },
421
+ "broken": {
422
+ "label": "Broken",
423
+ "description": "Clicked and found broken, as in production"
424
+ }
425
+ },
426
+ "StreamKind": {
427
+ "lead": {
428
+ "label": "Lead"
429
+ },
430
+ "support": {
431
+ "label": "Support"
432
+ },
433
+ "vendor": {
434
+ "label": "Vendor"
435
+ },
436
+ "partner": {
437
+ "label": "Partner"
438
+ },
439
+ "customer": {
440
+ "label": "Customer"
441
+ },
442
+ "newsletter": {
443
+ "label": "Newsletter"
444
+ },
445
+ "spam": {
446
+ "label": "Spam"
447
+ },
448
+ "phishing": {
449
+ "label": "Phishing"
450
+ },
451
+ "custom": {
452
+ "label": "Custom"
453
+ }
454
+ },
455
+ "AiMode": {
456
+ "on": {
457
+ "label": "On",
458
+ "description": "People write with the AI"
459
+ },
460
+ "off": {
461
+ "label": "Off",
462
+ "description": "Templates and rules: instant, repeatable, free"
463
+ }
464
+ },
465
+ "EventType": {
466
+ "mail.delivered": {
467
+ "description": "Mail your app sent was delivered to its recipients"
468
+ },
469
+ "mail.retried": {
470
+ "description": "A message was handed to people again (POST /api/retry)"
471
+ },
472
+ "mail.deleted": {
473
+ "description": "Mail was deleted (DELETE /api/messages)"
474
+ },
475
+ "persona.received": {
476
+ "description": "A person received an email and read it"
477
+ },
478
+ "persona.sent": {
479
+ "description": "A person sent an email: a reply, a follow-up or a forward"
480
+ },
481
+ "persona.ignored": {
482
+ "description": "A person decided not to answer (or their AI is off)"
483
+ },
484
+ "persona.batched": {
485
+ "description": "A person will answer several emails together"
486
+ },
487
+ "persona.junked": {
488
+ "description": "A person's provider filed your email as spam; they never saw it",
489
+ "feature": "junk_consequences"
490
+ },
491
+ "persona.rescued": {
492
+ "description": "An email was moved from Junk to a person's inbox"
493
+ },
494
+ "persona.bounced": {
495
+ "description": "An address bounced (dead, full, blocked)"
496
+ },
497
+ "persona.promised": {
498
+ "description": "A person promised to do something",
499
+ "feature": "living_world"
500
+ },
501
+ "persona.waiting": {
502
+ "description": "A person is waiting on something you promised",
503
+ "feature": "living_world"
504
+ },
505
+ "persona.created": {
506
+ "description": "A person was added"
507
+ },
508
+ "persona.updated": {
509
+ "description": "A person was changed"
510
+ },
511
+ "persona.memory": {
512
+ "description": "Something was added to a person's memory"
513
+ },
514
+ "link.opened": {
515
+ "description": "A person clicked a link in an email",
516
+ "feature": "living_world"
517
+ },
518
+ "link.skipped": {
519
+ "description": "A person chose not to open a link",
520
+ "feature": "living_world"
521
+ },
522
+ "link.failed": {
523
+ "description": "A person clicked a link and it failed",
524
+ "feature": "living_world"
525
+ },
526
+ "link.sender": {
527
+ "description": "A person looked up a sender's website",
528
+ "feature": "living_world"
529
+ },
530
+ "inspect.scored": {
531
+ "description": "An email your app sent was inspected and scored"
532
+ },
533
+ "inspect.links": {
534
+ "description": "The links of an email your app sent were checked"
535
+ },
536
+ "world.mail": {
537
+ "description": "Mail arrived on its own from the World"
538
+ },
539
+ "world.updated": {
540
+ "description": "The World was changed"
541
+ },
542
+ "job.scheduled": {
543
+ "description": "Something was scheduled: a reply, a follow-up, a bounce"
544
+ },
545
+ "job.updated": {
546
+ "description": "A scheduled job was changed"
547
+ },
548
+ "job.done": {
549
+ "description": "A scheduled job ran"
550
+ },
551
+ "job.skipped": {
552
+ "description": "A scheduled job was skipped"
553
+ },
554
+ "job.failed": {
555
+ "description": "A scheduled job failed"
556
+ },
557
+ "case.updated": {
558
+ "description": "A case was created or changed"
559
+ },
560
+ "clock": {
561
+ "description": "The simulated clock changed speed, froze or moved"
562
+ },
563
+ "pace": {
564
+ "description": "The pace changed"
565
+ },
566
+ "faults.updated": {
567
+ "description": "Fault rules changed"
568
+ },
569
+ "junk.settings": {
570
+ "description": "Junk settings changed"
571
+ },
572
+ "network.updated": {
573
+ "description": "Network settings changed"
574
+ },
575
+ "retention.pruned": {
576
+ "description": "Old mail and events were deleted"
577
+ },
578
+ "webhook.failed": {
579
+ "description": "A webhook could not be delivered"
580
+ },
581
+ "writer.fallback": {
582
+ "description": "A reply was written from a template because the AI was unavailable"
583
+ },
584
+ "ai.mode": {
585
+ "description": "The universe's AI was switched on or off"
586
+ },
587
+ "auth.ok": {
588
+ "description": "A sign-in succeeded (SMTP, IMAP or dashboard)"
589
+ },
590
+ "auth.failed": {
591
+ "description": "A sign-in failed"
592
+ },
593
+ "check.received": {
594
+ "description": "The deliverability checker received a test email"
595
+ },
596
+ "check.done": {
597
+ "description": "The deliverability checker finished a report"
598
+ },
599
+ "check.refused": {
600
+ "description": "The deliverability checker refused a message"
601
+ }
602
+ },
603
+ "JobKind": {
604
+ "reply": {
605
+ "description": "A reply to an email they received"
606
+ },
607
+ "followup": {
608
+ "description": "A follow-up when you have not answered"
609
+ },
610
+ "correction": {
611
+ "description": "A correction to something they said"
612
+ },
613
+ "ooo": {
614
+ "description": "An out-of-office answer"
615
+ },
616
+ "bounce": {
617
+ "description": "A bounce notice instead of a reply"
618
+ },
619
+ "initiate": {
620
+ "description": "An email they start (a case's first contact)"
621
+ },
622
+ "deliver": {
623
+ "description": "Delivery of mail that was delayed"
624
+ },
625
+ "nudge": {
626
+ "description": "A reminder about something you promised"
627
+ },
628
+ "dsn": {
629
+ "description": "A delivery status notice for a dead address"
630
+ },
631
+ "world": {
632
+ "description": "Mail that arrives on its own from the World"
633
+ },
634
+ "visit": {
635
+ "description": "A visit to a link or a website"
636
+ }
637
+ },
638
+ "JobState": {
639
+ "pending": {
640
+ "label": "Pending"
641
+ },
642
+ "done": {
643
+ "label": "Done"
644
+ },
645
+ "skipped": {
646
+ "label": "Skipped"
647
+ },
648
+ "failed": {
649
+ "label": "Failed"
650
+ }
651
+ },
652
+ "Folder": {
653
+ "INBOX": {
654
+ "label": "Inbox"
655
+ },
656
+ "Sent": {
657
+ "label": "Sent"
658
+ },
659
+ "Drafts": {
660
+ "label": "Drafts"
661
+ },
662
+ "Archive": {
663
+ "label": "Archive"
664
+ },
665
+ "Trash": {
666
+ "label": "Trash"
667
+ },
668
+ "Junk": {
669
+ "label": "Junk"
670
+ }
671
+ },
672
+ "Protocol": {
673
+ "smtp": {
674
+ "label": "SMTP"
675
+ },
676
+ "imap": {
677
+ "label": "IMAP"
678
+ }
679
+ },
680
+ "Role": {
681
+ "viewer": {
682
+ "label": "Viewer",
683
+ "description": "Reads"
684
+ },
685
+ "member": {
686
+ "label": "Member",
687
+ "description": "Reads and writes"
688
+ },
689
+ "admin": {
690
+ "label": "Admin",
691
+ "description": "Also settings and logins"
692
+ },
693
+ "owner": {
694
+ "label": "Owner",
695
+ "description": "Also deletes the universe"
696
+ }
697
+ },
698
+ "PersonaSource": {
699
+ "api": {
700
+ "label": "API"
701
+ },
702
+ "case": {
703
+ "label": "Case"
704
+ },
705
+ "stranger": {
706
+ "label": "Stranger"
707
+ },
708
+ "world": {
709
+ "label": "World"
710
+ },
711
+ "mail": {
712
+ "label": "Learned from mail"
713
+ },
714
+ "config": {
715
+ "label": "Configuration file"
716
+ }
717
+ },
718
+ "StoryBy": {
719
+ "ai": {
720
+ "label": "AI"
721
+ },
722
+ "template": {
723
+ "label": "Template"
724
+ },
725
+ "edited": {
726
+ "label": "Edited by hand"
727
+ }
728
+ },
729
+ "EventAlias": {
730
+ "delivered": {
731
+ "label": "Delivered",
732
+ "description": "mail.delivered"
733
+ },
734
+ "received": {
735
+ "label": "Received",
736
+ "description": "persona.received"
737
+ },
738
+ "replied": {
739
+ "label": "Replied",
740
+ "description": "persona.sent"
741
+ },
742
+ "sent": {
743
+ "label": "Sent",
744
+ "description": "persona.sent"
745
+ },
746
+ "declined": {
747
+ "label": "Declined",
748
+ "description": "persona.ignored"
749
+ },
750
+ "ignored": {
751
+ "label": "Ignored",
752
+ "description": "persona.ignored"
753
+ },
754
+ "junked": {
755
+ "label": "Junked",
756
+ "description": "persona.junked"
757
+ },
758
+ "bounced": {
759
+ "label": "Bounced",
760
+ "description": "persona.bounced"
761
+ },
762
+ "clicked": {
763
+ "label": "Clicked",
764
+ "description": "link.opened"
765
+ },
766
+ "opened_link": {
767
+ "label": "Opened a link",
768
+ "description": "link.opened"
769
+ },
770
+ "promised": {
771
+ "label": "Promised",
772
+ "description": "persona.promised"
773
+ },
774
+ "rescued": {
775
+ "label": "Rescued",
776
+ "description": "persona.rescued"
777
+ }
778
+ },
779
+ "ErrorCode": {
780
+ "bad_request": {
781
+ "label": "Bad request",
782
+ "description": "400"
783
+ },
784
+ "invalid_value": {
785
+ "label": "Invalid value",
786
+ "description": "400: a field's value is not allowed (see allowed)"
787
+ },
788
+ "invalid_regex": {
789
+ "label": "Invalid regular expression",
790
+ "description": "400"
791
+ },
792
+ "unauthorized": {
793
+ "label": "Unauthorized",
794
+ "description": "401"
795
+ },
796
+ "not_in_plan": {
797
+ "label": "Not in the plan",
798
+ "description": "402"
799
+ },
800
+ "forbidden": {
801
+ "label": "Forbidden",
802
+ "description": "403"
803
+ },
804
+ "not_found": {
805
+ "label": "Not found",
806
+ "description": "404"
807
+ },
808
+ "method_not_allowed": {
809
+ "label": "Method not allowed",
810
+ "description": "405"
811
+ },
812
+ "timeout": {
813
+ "label": "Timeout",
814
+ "description": "408"
815
+ },
816
+ "wait_timeout": {
817
+ "label": "Wait timed out",
818
+ "description": "408: nothing matched (see near_misses)"
819
+ },
820
+ "conflict": {
821
+ "label": "Conflict",
822
+ "description": "409"
823
+ },
824
+ "unexpected_email": {
825
+ "label": "Unexpected email",
826
+ "description": "409: an email arrived where none was expected"
827
+ },
828
+ "too_large": {
829
+ "label": "Too large",
830
+ "description": "413"
831
+ },
832
+ "unprocessable": {
833
+ "label": "Unprocessable",
834
+ "description": "422"
835
+ },
836
+ "idempotency_mismatch": {
837
+ "label": "Idempotency key reused",
838
+ "description": "422: the key was used for a different request"
839
+ },
840
+ "rate_limited": {
841
+ "label": "Rate limited",
842
+ "description": "429"
843
+ },
844
+ "internal_error": {
845
+ "label": "Internal error",
846
+ "description": "500"
847
+ },
848
+ "bad_gateway": {
849
+ "label": "Bad gateway",
850
+ "description": "502"
851
+ },
852
+ "unavailable": {
853
+ "label": "Unavailable",
854
+ "description": "503"
855
+ }
856
+ }
857
+ });
858
+
859
+ /** The label of a value, such as describe("Temperament", "skeptical") → "Skeptical". */
860
+ export function describe(enumName, value) {
861
+ const i = (EnumInfo[enumName] || {})[value];
862
+ return i ? i.label || String(value) : String(value);
863
+ }