@pithy-sh/email 0.6.0 → 0.8.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.
Files changed (59) hide show
  1. package/README.md +8 -0
  2. package/dist/capability.d.ts +2 -2
  3. package/dist/capability.d.ts.map +1 -1
  4. package/dist/capability.js +23 -2
  5. package/dist/consent/consent.d.ts +57 -0
  6. package/dist/consent/consent.d.ts.map +1 -0
  7. package/dist/consent/consent.js +135 -0
  8. package/dist/data/emailEvent.d.ts +1 -1
  9. package/dist/data/emailEvent.d.ts.map +1 -1
  10. package/dist/data/emailEvent.js +2 -1
  11. package/dist/data/emailJob.d.ts +6 -2
  12. package/dist/data/emailJob.d.ts.map +1 -1
  13. package/dist/data/emailJob.js +8 -3
  14. package/dist/data/emailSuppression.d.ts +1 -1
  15. package/dist/data/emailSuppression.d.ts.map +1 -1
  16. package/dist/data/emailSuppression.js +2 -1
  17. package/dist/data/tables.d.ts +4 -4
  18. package/dist/http/guards.d.ts +2 -2
  19. package/dist/http/guards.d.ts.map +1 -1
  20. package/dist/http/guards.js +12 -0
  21. package/dist/processing/activities.d.ts +9 -0
  22. package/dist/processing/activities.d.ts.map +1 -0
  23. package/dist/processing/activities.js +40 -0
  24. package/dist/purge/contribution.d.ts +27 -0
  25. package/dist/purge/contribution.d.ts.map +1 -0
  26. package/dist/purge/contribution.js +67 -0
  27. package/dist/send/enqueue.d.ts +26 -7
  28. package/dist/send/enqueue.d.ts.map +1 -1
  29. package/dist/send/enqueue.js +36 -13
  30. package/dist/templates/messages.d.ts +1 -2
  31. package/dist/templates/messages.d.ts.map +1 -1
  32. package/dist/templates/messages.es.d.ts.map +1 -1
  33. package/dist/templates/messages.es.js +28 -0
  34. package/dist/templates/messages.js +35 -10
  35. package/dist/templates/precompiled.generated.d.ts +124 -0
  36. package/dist/templates/precompiled.generated.d.ts.map +1 -1
  37. package/dist/templates/precompiled.generated.js +1618 -0
  38. package/dist/templates/registry.d.ts.map +1 -1
  39. package/dist/templates/registry.js +106 -0
  40. package/dist/templates/samples.d.ts.map +1 -1
  41. package/dist/templates/samples.js +28 -0
  42. package/dist/version.generated.d.ts +1 -1
  43. package/dist/version.generated.js +1 -1
  44. package/package.json +3 -3
  45. package/src/capability.ts +33 -7
  46. package/src/consent/consent.ts +183 -0
  47. package/src/data/emailEvent.ts +2 -1
  48. package/src/data/emailJob.ts +21 -8
  49. package/src/data/emailSuppression.ts +2 -1
  50. package/src/http/guards.ts +14 -2
  51. package/src/processing/activities.ts +41 -0
  52. package/src/purge/contribution.ts +83 -0
  53. package/src/send/enqueue.ts +62 -24
  54. package/src/templates/messages.es.ts +41 -0
  55. package/src/templates/messages.ts +52 -11
  56. package/src/templates/precompiled.generated.ts +551 -0
  57. package/src/templates/registry.ts +159 -0
  58. package/src/templates/samples.ts +11 -0
  59. package/src/version.generated.ts +1 -1
@@ -0,0 +1,27 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import { type RetainingPurgeContribution } from "@pithy-sh/core/src/capability/purge";
4
+ /**
5
+ * What a person's purge means for `@pithy-sh/email` (#814): **nothing is erased, and the export says so and why.**
6
+ *
7
+ * A suppression has to outlive the person. It is the record that an address bounced, complained or asked not to be
8
+ * mailed, and the list is checked before every send: erase the row and the next send — a newsletter to an address
9
+ * that unsubscribed — goes out, because nothing remembers that it should not. So this contribution **retains**, and
10
+ * the log of mail sent to the address stays beside it as the delivery record a bounce or a complaint is read
11
+ * against. The purge records the step as retained with the basis below, and erases no row.
12
+ *
13
+ * **Found by address.** Email stores no user id: the suppression list and the log are keyed by the address, in
14
+ * `normalizeAddress`'s form. The step reads the account's address (`PurgeContext.address`); with none to read there
15
+ * is nothing to find.
16
+ *
17
+ * **Never a message's payload, and never a tracked link.** A job's payload is the template's variables, and a sign-in
18
+ * mail's variables are the link that signs the person in; a click event's URL can be that link. The export carries
19
+ * what was sent, when and how it went, and leaves both out.
20
+ */
21
+ /** The one sentence the purge records with this step. */
22
+ export declare const EMAIL_PURGE_SUMMARY = "Keeps the user's address on the suppression list, and the log of mail sent to it.";
23
+ /** Why, in the sentence the person is told. */
24
+ export declare const EMAIL_RETENTION_BASIS = "Kept so your unsubscribe holds: the address stays on the list of addresses not to mail, with the record of what was sent to it.";
25
+ /** The user contribution `email()` declares, over its two D1 bindings. */
26
+ export declare function emailUserPurge(database?: string, suppressions?: string): RetainingPurgeContribution;
27
+ //# sourceMappingURL=contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contribution.d.ts","sourceRoot":"","sources":["../../src/purge/contribution.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4B,KAAK,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAMhH;;;;;;;;;;;;;;;;GAgBG;AAEH,yDAAyD;AACzD,eAAO,MAAM,mBAAmB,sFAAsF,CAAC;AAEvH,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB,oIACiG,CAAC;AAEpI,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,QAAQ,SAAO,EAAE,YAAY,SAAuB,GAAG,0BAA0B,CA6C/G"}
@@ -0,0 +1,67 @@
1
+ // SPDX-FileCopyrightText: 2026 Pithy
2
+ // SPDX-License-Identifier: MIT
3
+ import { EmailEvent } from "../data/emailEvent.js";
4
+ import { EmailJob } from "../data/emailJob.js";
5
+ import { EmailSuppression } from "../data/emailSuppression.js";
6
+ import { emailDatabase, emailSuppressionDatabase } from "../data/tables.js";
7
+ import { normalizeAddress } from "@pithy-sh/core/src/address/address";
8
+ import { exportRows, purgeBinding } from "@pithy-sh/core/src/capability/purge";
9
+ //#region src/purge/contribution.ts
10
+ /**
11
+ * What a person's purge means for `@pithy-sh/email` (#814): **nothing is erased, and the export says so and why.**
12
+ *
13
+ * A suppression has to outlive the person. It is the record that an address bounced, complained or asked not to be
14
+ * mailed, and the list is checked before every send: erase the row and the next send — a newsletter to an address
15
+ * that unsubscribed — goes out, because nothing remembers that it should not. So this contribution **retains**, and
16
+ * the log of mail sent to the address stays beside it as the delivery record a bounce or a complaint is read
17
+ * against. The purge records the step as retained with the basis below, and erases no row.
18
+ *
19
+ * **Found by address.** Email stores no user id: the suppression list and the log are keyed by the address, in
20
+ * `normalizeAddress`'s form. The step reads the account's address (`PurgeContext.address`); with none to read there
21
+ * is nothing to find.
22
+ *
23
+ * **Never a message's payload, and never a tracked link.** A job's payload is the template's variables, and a sign-in
24
+ * mail's variables are the link that signs the person in; a click event's URL can be that link. The export carries
25
+ * what was sent, when and how it went, and leaves both out.
26
+ */
27
+ /** The one sentence the purge records with this step. */
28
+ const EMAIL_PURGE_SUMMARY = "Keeps the user's address on the suppression list, and the log of mail sent to it.";
29
+ /** Why, in the sentence the person is told. */
30
+ const EMAIL_RETENTION_BASIS = "Kept so your unsubscribe holds: the address stays on the list of addresses not to mail, with the record of what was sent to it.";
31
+ /** The user contribution `email()` declares, over its two D1 bindings. */
32
+ function emailUserPurge(database = "DB", suppressions = "EMAIL_SUPPRESSIONS") {
33
+ return {
34
+ subject: "user",
35
+ summary: EMAIL_PURGE_SUMMARY,
36
+ retain: { basis: EMAIL_RETENTION_BASIS },
37
+ export: async (context) => {
38
+ const read = await context.address?.();
39
+ if (!read) return {
40
+ suppressions: [],
41
+ jobs: [],
42
+ events: []
43
+ };
44
+ const address = normalizeAddress(read);
45
+ const log = emailDatabase(purgeBinding(context.env, database, "email"));
46
+ const list = emailSuppressionDatabase(purgeBinding(context.env, suppressions, "email"));
47
+ const [suppressed, jobs, events] = await Promise.all([
48
+ list.selectFrom("pithyEmailSuppressions").selectAll().where("email", "=", address).execute(),
49
+ log.selectFrom("pithyEmailJobs").selectAll().where("recipientKey", "=", address).orderBy("createdAt").orderBy("id").execute(),
50
+ log.selectFrom("pithyEmailEvents").selectAll().where("recipient", "=", address).orderBy("createdAt").orderBy("id").execute()
51
+ ]);
52
+ return {
53
+ suppressions: exportRows(suppressed.map((row) => EmailSuppression.parse(row))),
54
+ jobs: exportRows(jobs.map((row) => {
55
+ const { payload: _variables, ...job } = EmailJob.parse(row);
56
+ return job;
57
+ })),
58
+ events: exportRows(events.map((row) => {
59
+ const { linkUrl: _link, ...event } = EmailEvent.parse(row);
60
+ return event;
61
+ }))
62
+ };
63
+ }
64
+ };
65
+ }
66
+ //#endregion
67
+ export { EMAIL_PURGE_SUMMARY, EMAIL_RETENTION_BASIS, emailUserPurge };
@@ -1,5 +1,6 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
+ import type { ConsentReader, ConsentSubject } from "@pithy-sh/core/src/consent/reader";
3
4
  import type { MeterCharge, MeterSubject } from "@pithy-sh/core/src/entitlement/meter";
4
5
  import type { EmailJobStatus, SendMode, SuppressionReason } from "../data/enums";
5
6
  import type { EmailDatabase, EmailSuppressionDatabase } from "../data/tables";
@@ -11,7 +12,7 @@ import type { EmailTheme } from "../templates/theme";
11
12
  * `scheduled` and `timezone` jobs are left for the every-minute scheduler to pick up. The payload is
12
13
  * validated against the template schema here, so a bad call fails at enqueue, not mid-send.
13
14
  *
14
- * **Suppression is consulted here too, and no caller asks for it** (pithy-sh/pithy#355). A blocked
15
+ * **Suppression is consulted here too, and no caller asks for it**. A blocked
15
16
  * recipient never becomes a queued send: the row is born `suppressed`, no Workflow is started, and the
16
17
  * reason comes back on the result. The point is not a second gate — `runSend` is and stays the
17
18
  * authority, because whether an address is blocked is a question about the instant of sending and a
@@ -29,7 +30,7 @@ import type { EmailTheme } from "../templates/theme";
29
30
  * The Workflow binding used to start a send (Cloudflare `Workflow.create`). At enqueue it sends a batch
30
31
  * of one; the scheduler's fan-out starts one instance per batch through the same binding.
31
32
  *
32
- * `id` names the instance being created, and **every dispatcher passes one** (pithy-sh/pithy#342): the
33
+ * `id` names the instance being created, and **every dispatcher passes one**: the
33
34
  * scheduler passes its batch's, an enqueue passes the one it just stamped on the row, and a retry passes
34
35
  * the one it minted to replace the failed batch's. It is optional here only because the platform allows
35
36
  * omitting it, and omitting it is what made an immediate send unattributable to any instance — so the
@@ -79,7 +80,7 @@ export interface EnqueueInput {
79
80
  /**
80
81
  * What this message is *about*, when the template id does not say it on its own.
81
82
  *
82
- * The discriminator for a template that carries more than one kind of message (pithy-sh/pithy#382).
83
+ * The discriminator for a template that carries more than one kind of message.
83
84
  * `sentSince` matches on it, so a caller deciding whether to send — or whether to send a *correction* —
84
85
  * can tell two messages apart that share a template and a recipient. Opaque: nothing here parses it,
85
86
  * renders it, or puts it on a header or a link.
@@ -123,6 +124,14 @@ export interface EnqueueInput {
123
124
  * enqueue past the period's quota throws `payments/quota_exceeded` and writes no job.
124
125
  */
125
126
  subject?: MeterSubject;
127
+ /**
128
+ * Whose consent this message is sent under, when `@pithy-sh/consent` is composed: the recipient's account,
129
+ * or the visitor id they consented under. A `marketing` template is sent only to a subject consenting to
130
+ * `email.marketing`, and opens and clicks are tracked only for one consenting to `email.tracking`. Omitted, a
131
+ * marketing message is withheld and nothing is tracked, because nobody's consent can be shown. Transactional mail
132
+ * is never gated, and without consent composed this is ignored.
133
+ */
134
+ consentSubject?: ConsentSubject;
126
135
  }
127
136
  /** Dependencies enqueue needs: the database, the from identity, optional send-Workflow binding, time, ids. */
128
137
  export interface EnqueueDeps {
@@ -155,12 +164,16 @@ export interface EnqueueDeps {
155
164
  * request's env. Absent when no provider is composed, and then nothing is counted.
156
165
  */
157
166
  meter?: (charge: MeterCharge) => Promise<void>;
167
+ /**
168
+ * The composed consent reader, or absent when no consent capability is composed — and then nothing is
169
+ * gated.
170
+ */
171
+ consent?: ConsentReader | null;
158
172
  now: Date;
159
173
  /** Generate a job id (a UUID in production). */
160
174
  newId: () => string;
161
175
  /**
162
- * Mint the id of the batch this enqueue dispatches — **the send Workflow instance's id**
163
- * (pithy-sh/pithy#342). Defaults to {@link mintBatchId}; injected only so a test can name it.
176
+ * Mint the id of the batch this enqueue dispatches — **the send Workflow instance's id**. Defaults to {@link mintBatchId}; injected only so a test can name it.
164
177
  */
165
178
  newBatchId?: () => string;
166
179
  }
@@ -172,7 +185,7 @@ export interface EnqueueResult {
172
185
  *
173
186
  * `pending` and `scheduled` both mean a send is on its way. `suppressed` means the address is
174
187
  * blocked. **`undispatched` means this composition binds no send Workflow**, so nothing was started
175
- * and nothing is coming while it stays that way (pithy-sh/pithy#410): a caller that renders "check
188
+ * and nothing is coming while it stays that way: a caller that renders "check
176
189
  * your inbox" off it is reporting a delivery that cannot happen. It is the one status here that
177
190
  * describes the *deployment* rather than the message — and the scheduler drains those rows once a
178
191
  * host exists, so it is not the end of the job.
@@ -187,9 +200,15 @@ export interface EnqueueResult {
187
200
  * operator's next move depends on.
188
201
  */
189
202
  suppressionReason?: SuppressionReason;
203
+ /**
204
+ * The consent purpose that withheld this message, when consent is composed and the subject does not hold it —
205
+ * `email.marketing`. The row is born `suppressed` and nothing is sent. Absent for every message consent
206
+ * did not withhold.
207
+ */
208
+ consentWithheld?: string;
190
209
  /**
191
210
  * The **enqueue-time** render — the sentence this call wrote to `pithy_email_jobs.subject`, in the
192
- * recipient's language, and the value the row is born with (pithy-sh/pithy#443).
211
+ * recipient's language, and the value the row is born with.
193
212
  *
194
213
  * **For the caller that has to say what it queued.** Enqueuing is what a surface does; auditing it is
195
214
  * what a surface with an administrative trail also does. Without this, that caller had to render the
@@ -1 +1 @@
1
- {"version":3,"file":"enqueue.d.ts","sourceRoot":"","sources":["../../src/send/enqueue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAItF,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAG9E,OAAO,EAAE,KAAK,kBAAkB,EAAmC,MAAM,uBAAuB,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD;;;;;;;;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"../data/emailJob.js";
3
+ import { EmailJob, personalAddress } from "../data/emailJob.js";
4
4
  import { recordEvent } from "./events.js";
5
5
  import { blockingSuppression } from "./suppression.js";
6
+ import { consentGate } from "../consent/consent.js";
6
7
  import { EmailInvalidPayloadError } from "../error/errors.js";
7
8
  import { emailTranslator, kitEmailLayers } from "../templates/messages.js";
8
9
  import { getTemplate, renderSubject, templateKind } from "../templates/engine.js";
@@ -47,11 +48,20 @@ async function enqueueEmail(deps, input) {
47
48
  * agreeing is what makes a hard bounce withhold an invitation while an unsubscribe does not. A caller
48
49
  * cannot influence this and is not asked to: it is the template's own declaration.
49
50
  */
50
- const blocked = deps.suppressionDb ? await blockingSuppression(deps.suppressionDb, input.to, deps.now, templateKind(input.template)) : null;
51
+ const suppressed = deps.suppressionDb ? await blockingSuppression(deps.suppressionDb, input.to, deps.now, templateKind(input.template)) : null;
52
+ /**
53
+ * What consent allows, when it is composed: a marketing message to a subject not consenting to it is
54
+ * withheld like a suppressed one, and tracking runs only for a subject consenting to it. Transactional mail is
55
+ * never withheld. With no consent composed the gate passes everything.
56
+ */
57
+ const marketing = template.category === "marketing";
58
+ const gate = await consentGate(deps.consent, input.consentSubject, marketing);
59
+ const withheld = suppressed === null ? gate.withheld : null;
60
+ const blocked = suppressed !== null || withheld !== null;
51
61
  const recipient = normalizeAddress(input.to);
52
62
  const sender = !blocked && mode === "immediate" ? deps.sender : void 0;
53
63
  /**
54
- * An immediate job with nothing to dispatch it on (pithy-sh/pithy#410).
64
+ * An immediate job with nothing to dispatch it on.
55
65
  *
56
66
  * A missing binding is a **configuration fact known at compose time**, not a transient failure, and
57
67
  * the two used to be recorded identically: both left the row `pending` and told the caller "on its
@@ -74,7 +84,7 @@ async function enqueueEmail(deps, input) {
74
84
  const status = blocked ? "suppressed" : undispatchable ? "undispatched" : scheduled;
75
85
  /**
76
86
  * The batch this enqueue is about to start — named here, before the row exists, because the row has to
77
- * carry it (pithy-sh/pithy#342).
87
+ * carry it.
78
88
  *
79
89
  * Without it the row is born naming nobody, and a row naming nobody is stranded by definition: the
80
90
  * scheduler's safety net claims any `pending` job older than `graceMs` and starts a *second* send
@@ -103,11 +113,10 @@ async function enqueueEmail(deps, input) {
103
113
  amount: 1,
104
114
  now: deps.now
105
115
  });
106
- const marketing = template.category === "marketing";
107
116
  const job = {
108
117
  id: deps.newId(),
109
- toAddress: input.to,
110
- recipientKey: recipient,
118
+ toAddress: personalAddress(input.to),
119
+ recipientKey: personalAddress(recipient),
111
120
  fromAddress: deps.fromAddress,
112
121
  fromName: deps.fromName,
113
122
  subject,
@@ -125,10 +134,10 @@ async function enqueueEmail(deps, input) {
125
134
  campaignId: input.campaignId ?? null,
126
135
  locale: isLocale(input.locale ?? "") ? input.locale ?? null : null,
127
136
  correlation: input.correlation ?? null,
128
- openTracking: input.openTracking ?? marketing,
129
- clickTracking: input.clickTracking ?? marketing,
137
+ openTracking: (input.openTracking ?? marketing) && gate.tracking,
138
+ clickTracking: (input.clickTracking ?? marketing) && gate.tracking,
130
139
  messageId: null,
131
- error: blocked ? `recipient suppressed: ${blocked}` : undispatchable ? "no EMAIL_SENDER binding: this composition can start no send Workflow" : null,
140
+ error: suppressed ? `recipient suppressed: ${suppressed}` : withheld ? `no consent: ${withheld}` : undispatchable ? "no EMAIL_SENDER binding: this composition can start no send Workflow" : null,
132
141
  bounceCode: null,
133
142
  bounceType: null,
134
143
  replyTo: input.replyTo ?? null,
@@ -139,18 +148,32 @@ async function enqueueEmail(deps, input) {
139
148
  sentAt: null
140
149
  };
141
150
  await deps.db.insertInto("pithyEmailJobs").values(EmailJob.encode(job)).execute();
142
- if (blocked) {
151
+ if (suppressed) {
152
+ await recordEvent(deps.db, {
153
+ jobId: job.id,
154
+ recipient,
155
+ type: "suppressed",
156
+ detail: suppressed
157
+ }, deps.now);
158
+ return {
159
+ jobId: job.id,
160
+ status,
161
+ subject,
162
+ suppressionReason: suppressed
163
+ };
164
+ }
165
+ if (withheld) {
143
166
  await recordEvent(deps.db, {
144
167
  jobId: job.id,
145
168
  recipient,
146
169
  type: "suppressed",
147
- detail: blocked
170
+ detail: `consent:${withheld}`
148
171
  }, deps.now);
149
172
  return {
150
173
  jobId: job.id,
151
174
  status,
152
175
  subject,
153
- suppressionReason: blocked
176
+ consentWithheld: withheld
154
177
  };
155
178
  }
156
179
  if (sender && batchId) try {
@@ -6,8 +6,7 @@ import { type Translator } from "@pithy-sh/core/src/i18n/translator";
6
6
  * Every language this capability's own copy is written in.
7
7
  *
8
8
  * **Bundled, not stamped.** The send Worker is deployed with this map inside it, so adding a language
9
- * to the kit costs an adopter a package upgrade and no configuration at all — which is the whole of
10
- * #442. What still travels as a variable is the adopter's diff against this: usually nothing, and at
9
+ * to the kit costs an adopter a package upgrade and no configuration at all. What still travels as a variable is the adopter's diff against this: usually nothing, and at
11
10
  * most the sentences they changed.
12
11
  */
13
12
  export declare const EMAIL_MESSAGES: LocaleCatalogs;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/templates/messages.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtF,OAAO,EAAoC,KAAK,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAoKvG;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,cAA+C,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;AAE7F,iHAAiH;AACjH,eAAO,MAAM,cAAc,EAAE,kBAA+D,CAAC;AAsB7F;;;;;;;GAOG;AACH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;GAQG;AACH,wBAA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,wBAAgB,aAAa,CAAC,QAAQ,EAAE,cAAc,GAAG,kBAAkB,CAa1E;AA2BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,kBAAkB,GAAG,UAAU,CAG5G"}
@@ -1 +1 @@
1
- {"version":3,"file":"messages.es.d.ts","sourceRoot":"","sources":["../../src/templates/messages.es.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ,EAAE,cA+GtB,CAAC"}
1
+ {"version":3,"file":"messages.es.d.ts","sourceRoot":"","sources":["../../src/templates/messages.es.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ,EAAE,cAwJtB,CAAC"}
@@ -100,6 +100,34 @@ const EMAIL_ES = {
100
100
  "email/deletion_complete.body": "tu cuenta de {app} y sus datos se borraron el {purgedOn}. No se puede deshacer.",
101
101
  "email/deletion_complete.text_body": "Tu cuenta de {app} y sus datos se borraron el {purgedOn}. No se puede deshacer.",
102
102
  "email/deletion_complete.last": "Es el último correo que recibirá esta cuenta.",
103
+ "email/organization_member_added.subject": "Te han añadido a {organization}",
104
+ "email/organization_member_added.heading": "Te han añadido a una organización",
105
+ "email/organization_member_added.body": "te han añadido a {organization} en {app}, con la función {role}.",
106
+ "email/organization_member_added.text_body": "Te han añadido a {organization} en {app}, con la función {role}.",
107
+ "email/organization_member_removed.subject": "Te han quitado de {organization}",
108
+ "email/organization_member_removed.heading": "Te han quitado de una organización",
109
+ "email/organization_member_removed.body": "te han quitado de {organization} en {app}. Ya no puedes actuar en ella.",
110
+ "email/organization_member_removed.text_body": "Te han quitado de {organization} en {app}. Ya no puedes actuar en ella.",
111
+ "email/organization_ownership_transferred.subject": "Ahora eres titular de {organization}",
112
+ "email/organization_ownership_transferred.heading": "Ahora eres titular de una organización",
113
+ "email/organization_ownership_transferred.body": "ahora eres titular de {organization} en {app}. La administras y respondes por ella.",
114
+ "email/organization_ownership_transferred.text_body": "Ahora eres titular de {organization} en {app}. La administras y respondes por ella.",
115
+ "email/organization_member.contact": "Si no lo esperabas, responde a este correo.",
116
+ "email/organization_suspended.subject": "{organization} está suspendida",
117
+ "email/organization_suspended.heading": "Tu organización está suspendida",
118
+ "email/organization_suspended.body": "{organization} en {app} está suspendida. Nadie puede actuar en ella hasta que se restablezca. Tu propia cuenta no se ve afectada.",
119
+ "email/organization_suspended.text_body": "{organization} en {app} está suspendida. Nadie puede actuar en ella hasta que se restablezca. Tu propia cuenta no se ve afectada.",
120
+ "email/organization_suspended.reason": "El motivo indicado: {reason}",
121
+ "email/organization_suspended.until": "Termina el {until}.",
122
+ "email/organization_reinstated.subject": "{organization} está restablecida",
123
+ "email/organization_reinstated.heading": "Tu organización está restablecida",
124
+ "email/organization_reinstated.body": "{organization} en {app} está restablecida. Sus miembros pueden volver a actuar en ella.",
125
+ "email/organization_reinstated.text_body": "{organization} en {app} está restablecida. Sus miembros pueden volver a actuar en ella.",
126
+ "email/organization_deletion_scheduled.subject": "{organization} está eliminada",
127
+ "email/organization_deletion_scheduled.heading": "Tu organización está eliminada",
128
+ "email/organization_deletion_scheduled.body": "{organization} en {app} está eliminada. Nadie puede actuar en ella, y sus datos se borrarán el {purgeOn}.",
129
+ "email/organization_deletion_scheduled.text_body": "{organization} en {app} está eliminada. Nadie puede actuar en ella, y sus datos se borrarán el {purgeOn}.",
130
+ "email/organization_deletion_scheduled.contact": "Para conservarla, responde a este correo antes del {purgeOn}.",
103
131
  "email/lead_capture.subject": "Tu descarga: {asset}",
104
132
  "email/lead_capture.heading": "Tu descarga está lista",
105
133
  "email/lead_capture.ready": "Tu copia de {asset} ya está lista.",
@@ -43,13 +43,13 @@ import { DEFAULT_LOCALE, createTranslator } from "@pithy-sh/core/src/i18n/transl
43
43
  *
44
44
  * ## Only the kit's own copy
45
45
  *
46
- * Eleven templates are here. The five whose words arrive as payload — `testerNudge`, `supportReply`,
46
+ * Seventeen templates are here. The five whose words arrive as payload — `testerNudge`, `supportReply`,
47
47
  * `operationalNotice`, `newsletter`, `marketingCampaign` — are the adopter's copy, chosen by a human
48
48
  * for one message, and a catalog cannot translate a sentence it has never seen. Their **shell** still
49
49
  * follows the job's locale (the severity word, the footer, the document's `lang` and `dir`), so a
50
50
  * notice at locale `es` reads its severity in Spanish and its summary in whatever the caller wrote.
51
51
  */
52
- /** The kit's English for every string the eleven kit-authored templates and the shared shell render. */
52
+ /** The kit's English for every string the seventeen kit-authored templates and the shared shell render. */
53
53
  const EMAIL_EN = {
54
54
  "email/shell.greeting": "Hi,",
55
55
  "email/shell.greeting_named": "Hi {name},",
@@ -123,6 +123,34 @@ const EMAIL_EN = {
123
123
  "email/deletion_complete.body": "your {app} account and its data were erased on {purgedOn}. This cannot be undone.",
124
124
  "email/deletion_complete.text_body": "Your {app} account and its data were erased on {purgedOn}. This cannot be undone.",
125
125
  "email/deletion_complete.last": "This is the last email this account will receive.",
126
+ "email/organization_member_added.subject": "You were added to {organization}",
127
+ "email/organization_member_added.heading": "You were added to an organization",
128
+ "email/organization_member_added.body": "you were added to {organization} on {app}, as {role}.",
129
+ "email/organization_member_added.text_body": "You were added to {organization} on {app}, as {role}.",
130
+ "email/organization_member_removed.subject": "You were removed from {organization}",
131
+ "email/organization_member_removed.heading": "You were removed from an organization",
132
+ "email/organization_member_removed.body": "you were removed from {organization} on {app}. You can no longer act in it.",
133
+ "email/organization_member_removed.text_body": "You were removed from {organization} on {app}. You can no longer act in it.",
134
+ "email/organization_ownership_transferred.subject": "You now own {organization}",
135
+ "email/organization_ownership_transferred.heading": "You now own an organization",
136
+ "email/organization_ownership_transferred.body": "you are now the owner of {organization} on {app}. You administer it, and you answer for it.",
137
+ "email/organization_ownership_transferred.text_body": "You are now the owner of {organization} on {app}. You administer it, and you answer for it.",
138
+ "email/organization_member.contact": "If you did not expect this, reply to this email.",
139
+ "email/organization_suspended.subject": "{organization} is suspended",
140
+ "email/organization_suspended.heading": "Your organization is suspended",
141
+ "email/organization_suspended.body": "{organization} on {app} is suspended. Nobody can act in it until it is reinstated. Your own account is not affected.",
142
+ "email/organization_suspended.text_body": "{organization} on {app} is suspended. Nobody can act in it until it is reinstated. Your own account is not affected.",
143
+ "email/organization_suspended.reason": "The reason given: {reason}",
144
+ "email/organization_suspended.until": "It ends on {until}.",
145
+ "email/organization_reinstated.subject": "{organization} is reinstated",
146
+ "email/organization_reinstated.heading": "Your organization is reinstated",
147
+ "email/organization_reinstated.body": "{organization} on {app} is reinstated. Its members can act in it again.",
148
+ "email/organization_reinstated.text_body": "{organization} on {app} is reinstated. Its members can act in it again.",
149
+ "email/organization_deletion_scheduled.subject": "{organization} is deleted",
150
+ "email/organization_deletion_scheduled.heading": "Your organization is deleted",
151
+ "email/organization_deletion_scheduled.body": "{organization} on {app} is deleted. Nobody can act in it, and its data will be erased on {purgeOn}.",
152
+ "email/organization_deletion_scheduled.text_body": "{organization} on {app} is deleted. Nobody can act in it, and its data will be erased on {purgeOn}.",
153
+ "email/organization_deletion_scheduled.contact": "To keep it, reply to this email before {purgeOn}.",
126
154
  "email/lead_capture.subject": "Your download: {asset}",
127
155
  "email/lead_capture.heading": "Your download is ready",
128
156
  "email/lead_capture.ready": "Your copy of {asset} is ready.",
@@ -133,8 +161,7 @@ const EMAIL_EN = {
133
161
  * Every language this capability's own copy is written in.
134
162
  *
135
163
  * **Bundled, not stamped.** The send Worker is deployed with this map inside it, so adding a language
136
- * to the kit costs an adopter a package upgrade and no configuration at all — which is the whole of
137
- * #442. What still travels as a variable is the adopter's diff against this: usually nothing, and at
164
+ * to the kit costs an adopter a package upgrade and no configuration at all. What still travels as a variable is the adopter's diff against this: usually nothing, and at
138
165
  * most the sentences they changed.
139
166
  */
140
167
  const EMAIL_MESSAGES = {
@@ -150,12 +177,10 @@ function languageOf(tag) {
150
177
  /**
151
178
  * This package's own copy for `locale`, reduced to the language when the region was not written for.
152
179
  *
153
- * **The reduction has to happen here too, and not only over the stamped catalogs.** It did not, and
154
- * that was a regression the moment #442 bundled the kit's translations: the stamped catalog used to
155
- * *be* the kit's Spanish, so reducing `es-AR` to `es` over it found the words. With the kit's copy
156
- * bundled here instead, the stamped catalog is empty for a project that overrode nothing, and an
157
- * exact-tag lookup on `es-AR` answered `undefined` — so a reader whose `pithy_auth_users.locale` is
158
- * `es-AR` or `es-MX` got an English letter from a project that ships Spanish.
180
+ * **The reduction has to happen here too, and not only over the stamped catalogs.** With the kit's copy
181
+ * bundled here, the stamped catalog is empty for a project that overrode nothing, so an exact-tag
182
+ * lookup on `es-AR` alone would send a reader whose `pithy_auth_users.locale` is `es-AR` or `es-MX` an
183
+ * English letter from a project that ships Spanish.
159
184
  */
160
185
  function bundledFor(locale) {
161
186
  const language = languageOf(locale);
@@ -248,6 +248,130 @@ export declare const precompiledTemplates: {
248
248
  main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
249
249
  useData: boolean;
250
250
  };
251
+ "organizationMemberAdded:subject": {
252
+ compiler: (string | number)[];
253
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
254
+ useData: boolean;
255
+ };
256
+ "organizationMemberAdded:html": {
257
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
258
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
259
+ compiler: (string | number)[];
260
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
261
+ usePartial: boolean;
262
+ useData: boolean;
263
+ };
264
+ "organizationMemberAdded:text": {
265
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
266
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
267
+ compiler: (string | number)[];
268
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
269
+ useData: boolean;
270
+ };
271
+ "organizationMemberRemoved:subject": {
272
+ compiler: (string | number)[];
273
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
274
+ useData: boolean;
275
+ };
276
+ "organizationMemberRemoved:html": {
277
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
278
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
279
+ compiler: (string | number)[];
280
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
281
+ usePartial: boolean;
282
+ useData: boolean;
283
+ };
284
+ "organizationMemberRemoved:text": {
285
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
286
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
287
+ compiler: (string | number)[];
288
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
289
+ useData: boolean;
290
+ };
291
+ "organizationOwnershipTransferred:subject": {
292
+ compiler: (string | number)[];
293
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
294
+ useData: boolean;
295
+ };
296
+ "organizationOwnershipTransferred:html": {
297
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
298
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
299
+ compiler: (string | number)[];
300
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
301
+ usePartial: boolean;
302
+ useData: boolean;
303
+ };
304
+ "organizationOwnershipTransferred:text": {
305
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
306
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
307
+ compiler: (string | number)[];
308
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
309
+ useData: boolean;
310
+ };
311
+ "organizationSuspended:subject": {
312
+ compiler: (string | number)[];
313
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
314
+ useData: boolean;
315
+ };
316
+ "organizationSuspended:html": {
317
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
318
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
319
+ "2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
320
+ "3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
321
+ compiler: (string | number)[];
322
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
323
+ usePartial: boolean;
324
+ useData: boolean;
325
+ };
326
+ "organizationSuspended:text": {
327
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
328
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
329
+ "2": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
330
+ "3": (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
331
+ compiler: (string | number)[];
332
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
333
+ useData: boolean;
334
+ };
335
+ "organizationReinstated:subject": {
336
+ compiler: (string | number)[];
337
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
338
+ useData: boolean;
339
+ };
340
+ "organizationReinstated:html": {
341
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
342
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
343
+ compiler: (string | number)[];
344
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
345
+ usePartial: boolean;
346
+ useData: boolean;
347
+ };
348
+ "organizationReinstated:text": {
349
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
350
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
351
+ compiler: (string | number)[];
352
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
353
+ useData: boolean;
354
+ };
355
+ "organizationDeletionScheduled:subject": {
356
+ compiler: (string | number)[];
357
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
358
+ useData: boolean;
359
+ };
360
+ "organizationDeletionScheduled:html": {
361
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
362
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
363
+ compiler: (string | number)[];
364
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
365
+ usePartial: boolean;
366
+ useData: boolean;
367
+ };
368
+ "organizationDeletionScheduled:text": {
369
+ "0": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
370
+ "1": (container: any, depth0: any, helpers: any, partials: any, data: any) => any;
371
+ compiler: (string | number)[];
372
+ main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
373
+ useData: boolean;
374
+ };
251
375
  "operationalNotice:subject": {
252
376
  compiler: (string | number)[];
253
377
  main: (container: any, depth0: any, helpers: any, partials: any, data: any) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"precompiled.generated.d.ts","sourceRoot":"","sources":["../../src/templates/precompiled.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;CAmL/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkiDhC,CAAC"}
1
+ {"version":3,"file":"precompiled.generated.d.ts","sourceRoot":"","sources":["../../src/templates/precompiled.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;CAmL/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;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