@hintergrund/worker 0.3.17 → 0.3.19

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 (181) hide show
  1. package/dist/api/appointments/admin.d.ts +171 -0
  2. package/dist/api/appointments/admin.d.ts.map +1 -0
  3. package/dist/api/appointments/admin.js +275 -0
  4. package/dist/api/appointments/core.d.ts +114 -0
  5. package/dist/api/appointments/core.d.ts.map +1 -0
  6. package/dist/api/appointments/core.js +208 -0
  7. package/dist/api/appointments/cron.d.ts +9 -0
  8. package/dist/api/appointments/cron.d.ts.map +1 -0
  9. package/dist/api/appointments/cron.js +71 -0
  10. package/dist/api/appointments/emails.d.ts +5 -0
  11. package/dist/api/appointments/emails.d.ts.map +1 -0
  12. package/dist/api/appointments/emails.js +53 -0
  13. package/dist/api/appointments/public.d.ts +104 -0
  14. package/dist/api/appointments/public.d.ts.map +1 -0
  15. package/dist/api/appointments/public.js +129 -0
  16. package/dist/api/appointments/routes.d.ts +7 -0
  17. package/dist/api/appointments/routes.d.ts.map +1 -0
  18. package/dist/api/appointments/routes.js +28 -0
  19. package/dist/api/cms/handlers/agent-provider.handler.d.ts +1 -0
  20. package/dist/api/cms/handlers/agent-provider.handler.d.ts.map +1 -1
  21. package/dist/api/cms/handlers/agent-provider.handler.js +13 -23
  22. package/dist/api/cms/handlers/github-secrets.handler.d.ts.map +1 -1
  23. package/dist/api/cms/handlers/github-secrets.handler.js +3 -18
  24. package/dist/api/cms/handlers/integrations.handler.d.ts +2 -2
  25. package/dist/api/cms/handlers/integrations.handler.d.ts.map +1 -1
  26. package/dist/api/cms/handlers/integrations.handler.js +5 -11
  27. package/dist/api/cms/handlers/runtime.handler.d.ts +6 -0
  28. package/dist/api/cms/handlers/runtime.handler.d.ts.map +1 -0
  29. package/dist/api/cms/handlers/runtime.handler.js +42 -0
  30. package/dist/api/cms/handlers/website-repo.handler.d.ts +2 -0
  31. package/dist/api/cms/handlers/website-repo.handler.d.ts.map +1 -1
  32. package/dist/api/cms/handlers/website-repo.handler.js +31 -14
  33. package/dist/api/cms/routes/index.d.ts.map +1 -1
  34. package/dist/api/cms/routes/index.js +6 -6
  35. package/dist/api/emails/handlers/campaigns.handler.d.ts +10 -6
  36. package/dist/api/emails/handlers/campaigns.handler.d.ts.map +1 -1
  37. package/dist/api/emails/handlers/campaigns.handler.js +127 -30
  38. package/dist/api/emails/handlers/public.handler.d.ts +0 -2
  39. package/dist/api/emails/handlers/public.handler.d.ts.map +1 -1
  40. package/dist/api/emails/handlers/public.handler.js +32 -77
  41. package/dist/api/emails/handlers/send.handler.js +2 -2
  42. package/dist/api/emails/handlers/settings.handler.d.ts +1 -3
  43. package/dist/api/emails/handlers/settings.handler.d.ts.map +1 -1
  44. package/dist/api/emails/handlers/settings.handler.js +1 -6
  45. package/dist/api/emails/handlers/subscribers.handler.d.ts.map +1 -1
  46. package/dist/api/emails/handlers/subscribers.handler.js +9 -0
  47. package/dist/api/emails/routes/admin.routes.d.ts.map +1 -1
  48. package/dist/api/emails/routes/admin.routes.js +3 -1
  49. package/dist/api/emails/routes/mail.routes.d.ts.map +1 -1
  50. package/dist/api/emails/routes/mail.routes.js +19 -17
  51. package/dist/api/emails/routes/public.routes.d.ts.map +1 -1
  52. package/dist/api/emails/routes/public.routes.js +1 -2
  53. package/dist/api/enquiries/routes.d.ts +7 -0
  54. package/dist/api/enquiries/routes.d.ts.map +1 -0
  55. package/dist/api/enquiries/routes.js +73 -0
  56. package/dist/api/members/handlers.d.ts +36 -0
  57. package/dist/api/members/handlers.d.ts.map +1 -0
  58. package/dist/api/members/handlers.js +322 -0
  59. package/dist/api/members/routes.d.ts +5 -0
  60. package/dist/api/members/routes.d.ts.map +1 -0
  61. package/dist/api/members/routes.js +20 -0
  62. package/dist/api/reservations/core.d.ts +25 -0
  63. package/dist/api/reservations/core.d.ts.map +1 -0
  64. package/dist/api/reservations/core.js +59 -0
  65. package/dist/api/reservations/mail.d.ts +7 -0
  66. package/dist/api/reservations/mail.d.ts.map +1 -0
  67. package/dist/api/reservations/mail.js +63 -0
  68. package/dist/api/reservations/routes.d.ts +7 -0
  69. package/dist/api/reservations/routes.d.ts.map +1 -0
  70. package/dist/api/reservations/routes.js +186 -0
  71. package/dist/api/shop/handlers/products.handler.d.ts +1 -1
  72. package/dist/api/shop/handlers/products.handler.d.ts.map +1 -1
  73. package/dist/api/shop/handlers/products.handler.js +3 -3
  74. package/dist/api/shop/handlers/public.handler.d.ts +3 -3
  75. package/dist/api/shop/handlers/public.handler.d.ts.map +1 -1
  76. package/dist/api/shop/handlers/public.handler.js +25 -28
  77. package/dist/api/shop/routes.d.ts +2 -4
  78. package/dist/api/shop/routes.d.ts.map +1 -1
  79. package/dist/api/shop/routes.js +8 -11
  80. package/dist/api/stays/actions.d.ts +13 -0
  81. package/dist/api/stays/actions.d.ts.map +1 -0
  82. package/dist/api/stays/actions.js +28 -0
  83. package/dist/api/stays/admin.d.ts +209 -0
  84. package/dist/api/stays/admin.d.ts.map +1 -0
  85. package/dist/api/stays/admin.js +228 -0
  86. package/dist/api/stays/bookings.d.ts +113 -0
  87. package/dist/api/stays/bookings.d.ts.map +1 -0
  88. package/dist/api/stays/bookings.js +254 -0
  89. package/dist/api/stays/core.d.ts +214 -0
  90. package/dist/api/stays/core.d.ts.map +1 -0
  91. package/dist/api/stays/core.js +361 -0
  92. package/dist/api/stays/cron.d.ts +7 -0
  93. package/dist/api/stays/cron.d.ts.map +1 -0
  94. package/dist/api/stays/cron.js +56 -0
  95. package/dist/api/stays/mail.d.ts +8 -0
  96. package/dist/api/stays/mail.d.ts.map +1 -0
  97. package/dist/api/stays/mail.js +50 -0
  98. package/dist/api/stays/offers.d.ts +27 -0
  99. package/dist/api/stays/offers.d.ts.map +1 -0
  100. package/dist/api/stays/offers.js +56 -0
  101. package/dist/api/stays/payments.d.ts +47 -0
  102. package/dist/api/stays/payments.d.ts.map +1 -0
  103. package/dist/api/stays/payments.js +148 -0
  104. package/dist/api/stays/public.d.ts +207 -0
  105. package/dist/api/stays/public.d.ts.map +1 -0
  106. package/dist/api/stays/public.js +137 -0
  107. package/dist/api/stays/routes.d.ts +7 -0
  108. package/dist/api/stays/routes.d.ts.map +1 -0
  109. package/dist/api/stays/routes.js +39 -0
  110. package/dist/api/stripe/webhook.d.ts +5 -0
  111. package/dist/api/stripe/webhook.d.ts.map +1 -0
  112. package/dist/api/stripe/webhook.js +45 -0
  113. package/dist/api/tickets/core.d.ts +40 -0
  114. package/dist/api/tickets/core.d.ts.map +1 -0
  115. package/dist/api/tickets/core.js +115 -0
  116. package/dist/api/tickets/routes.d.ts +5 -0
  117. package/dist/api/tickets/routes.d.ts.map +1 -0
  118. package/dist/api/tickets/routes.js +70 -0
  119. package/dist/index.d.ts +16 -10
  120. package/dist/index.d.ts.map +1 -1
  121. package/dist/index.js +40 -27
  122. package/dist/lib/appointments-schema.d.ts +6 -0
  123. package/dist/lib/appointments-schema.d.ts.map +1 -0
  124. package/dist/lib/appointments-schema.js +96 -0
  125. package/dist/lib/config.js +4 -4
  126. package/dist/lib/email-template.d.ts +2 -2
  127. package/dist/lib/email-template.d.ts.map +1 -1
  128. package/dist/lib/email-template.js +3 -3
  129. package/dist/lib/email.d.ts.map +1 -1
  130. package/dist/lib/email.js +12 -3
  131. package/dist/lib/features.d.ts +13 -0
  132. package/dist/lib/features.d.ts.map +1 -0
  133. package/dist/lib/features.js +19 -0
  134. package/dist/lib/invoice.js +3 -3
  135. package/dist/lib/mail-schema.d.ts +1 -1
  136. package/dist/lib/mail-schema.d.ts.map +1 -1
  137. package/dist/lib/mail-schema.js +0 -1
  138. package/dist/lib/mail.d.ts +23 -3
  139. package/dist/lib/mail.d.ts.map +1 -1
  140. package/dist/lib/mail.js +69 -23
  141. package/dist/lib/members.d.ts +41 -0
  142. package/dist/lib/members.d.ts.map +1 -0
  143. package/dist/lib/members.js +92 -0
  144. package/dist/lib/project-db.d.ts +1 -1
  145. package/dist/lib/project-db.d.ts.map +1 -1
  146. package/dist/lib/project-db.js +67 -8
  147. package/dist/lib/reservations-schema.d.ts +3 -0
  148. package/dist/lib/reservations-schema.d.ts.map +1 -0
  149. package/dist/lib/reservations-schema.js +35 -0
  150. package/dist/lib/stays-schema.d.ts +3 -0
  151. package/dist/lib/stays-schema.d.ts.map +1 -0
  152. package/dist/lib/stays-schema.js +247 -0
  153. package/dist/lib/stripe.d.ts +6 -0
  154. package/dist/lib/stripe.d.ts.map +1 -0
  155. package/dist/lib/stripe.js +9 -0
  156. package/dist/lib/template.d.ts +2 -1
  157. package/dist/lib/template.d.ts.map +1 -1
  158. package/dist/lib/template.js +4 -82
  159. package/dist/lib/user-recovery.d.ts.map +1 -1
  160. package/dist/lib/user-recovery.js +4 -2
  161. package/dist/lib/website-i18n.d.ts +17 -0
  162. package/dist/lib/website-i18n.d.ts.map +1 -1
  163. package/dist/lib/website-i18n.js +90 -19
  164. package/dist/middleware/auth.d.ts.map +1 -1
  165. package/dist/middleware/auth.js +8 -1
  166. package/dist/version.d.ts +2 -0
  167. package/dist/version.d.ts.map +1 -0
  168. package/dist/version.js +1 -0
  169. package/package.json +2 -2
  170. package/dist/api/cms/handlers/setup.handler.d.ts +0 -8
  171. package/dist/api/cms/handlers/setup.handler.d.ts.map +0 -1
  172. package/dist/api/cms/handlers/setup.handler.js +0 -291
  173. package/dist/api/emails/handlers/invoice.handler.d.ts +0 -9
  174. package/dist/api/emails/handlers/invoice.handler.d.ts.map +0 -1
  175. package/dist/api/emails/handlers/invoice.handler.js +0 -154
  176. package/dist/lib/brand.d.ts +0 -6
  177. package/dist/lib/brand.d.ts.map +0 -1
  178. package/dist/lib/brand.js +0 -31
  179. package/dist/lib/integration-health.d.ts +0 -18
  180. package/dist/lib/integration-health.d.ts.map +0 -1
  181. package/dist/lib/integration-health.js +0 -51
@@ -0,0 +1,28 @@
1
+ import { Hono } from 'hono';
2
+ import { authMiddleware, requirePermission } from '../../middleware/auth';
3
+ import { requireFeature } from '../../lib/features';
4
+ import { book, cancel, listOfferings, listSessions, listSlots, manage } from './public';
5
+ import { bookingAction, calendar, cancelSession, createEntity, deleteEntity, deletePass, getConfig, grantPass, listPasses, manualBooking, putSettings, series, updateEntity } from './admin';
6
+ const appointmentRoutes = new Hono();
7
+ const feature = requireFeature('appointments');
8
+ appointmentRoutes.get('/offerings', feature, listOfferings);
9
+ appointmentRoutes.get('/slots', feature, listSlots);
10
+ appointmentRoutes.get('/sessions', feature, listSessions);
11
+ appointmentRoutes.post('/book', feature, book);
12
+ appointmentRoutes.get('/manage/:token', feature, manage);
13
+ appointmentRoutes.post('/manage/:token/cancel', feature, cancel);
14
+ appointmentRoutes.use('/admin/*', authMiddleware, requirePermission('appointments'));
15
+ appointmentRoutes.get('/admin/config', getConfig);
16
+ appointmentRoutes.put('/admin/settings', putSettings);
17
+ appointmentRoutes.get('/admin/calendar', calendar);
18
+ appointmentRoutes.post('/admin/bookings', manualBooking);
19
+ appointmentRoutes.post('/admin/bookings/:id/action', bookingAction);
20
+ appointmentRoutes.post('/admin/sessions/:id/cancel', cancelSession);
21
+ appointmentRoutes.post('/admin/series', series);
22
+ appointmentRoutes.get('/admin/passes', listPasses);
23
+ appointmentRoutes.post('/admin/passes', grantPass);
24
+ appointmentRoutes.delete('/admin/passes/:id', deletePass);
25
+ appointmentRoutes.post('/admin/entities/:entity', createEntity);
26
+ appointmentRoutes.put('/admin/entities/:entity/:id', updateEntity);
27
+ appointmentRoutes.delete('/admin/entities/:entity/:id', deleteEntity);
28
+ export default appointmentRoutes;
@@ -1,6 +1,7 @@
1
1
  import type { Context } from 'hono';
2
2
  import { type AgentProviderName } from '@hintergrund/runtime-contracts';
3
3
  import type { Bindings, HonoEnv } from '../../../index';
4
+ export declare function providerKey(env: Bindings, provider: AgentProviderName): string | undefined;
4
5
  /** The provider to use, in declaration order, for projects that configure several. */
5
6
  export declare function activeAgentProvider(env: Bindings): AgentProviderName | null;
6
7
  export declare function getAgentConfig(c: Context<HonoEnv>): Promise<Response>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-provider.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/agent-provider.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAA2C,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACjH,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA4BxD,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,iBAAiB,GAAG,IAAI,CAE3E;AAED,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE3E;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8B9E"}
1
+ {"version":3,"file":"agent-provider.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/agent-provider.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAqF,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC3J,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAExD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAK1F;AAED,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,QAAQ,GAAG,iBAAiB,GAAG,IAAI,CAE3E;AAED,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAE3E;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkC9E"}
@@ -1,25 +1,10 @@
1
- import { AGENT_PROVIDERS, AGENT_PROVIDER_SECRETS } from '@hintergrund/runtime-contracts';
2
- /**
3
- * Where each provider's requests go, and how its key is presented. Provider keys
4
- * are Worker secrets and never reach the browser: the admin agents run in the
5
- * client and call `/api/admin/agent/llm/*`, which attaches the key here.
6
- */
7
- const PROVIDER_ENDPOINTS = {
8
- google: {
9
- baseUrl: 'https://generativelanguage.googleapis.com/v1beta',
10
- authorize: (headers, key) => headers.set('x-goog-api-key', key),
11
- },
12
- deepseek: {
13
- baseUrl: 'https://api.deepseek.com',
14
- authorize: (headers, key) => headers.set('authorization', `Bearer ${key}`),
15
- },
16
- };
17
- function providerKey(env, provider) {
1
+ import { AGENT_PROVIDERS, AGENT_PROVIDER_CONFIG, AGENT_PROVIDER_SECRETS, authorizeProvider } from '@hintergrund/runtime-contracts';
2
+ export function providerKey(env, provider) {
18
3
  const value = env[AGENT_PROVIDER_SECRETS[provider]];
19
4
  if (typeof value !== 'string')
20
5
  return undefined;
21
6
  const key = value.trim();
22
- return key && key !== 'NOT_CONFIGURED' ? key : undefined;
7
+ return key || undefined;
23
8
  }
24
9
  /** The provider to use, in declaration order, for projects that configure several. */
25
10
  export function activeAgentProvider(env) {
@@ -36,21 +21,26 @@ export async function proxyAgentRequest(c) {
36
21
  const provider = activeAgentProvider(c.env);
37
22
  if (!provider)
38
23
  return c.json({ error: 'No AI provider is configured for this project.' }, 503);
39
- const { baseUrl, authorize } = PROVIDER_ENDPOINTS[provider];
24
+ const { baseUrl } = AGENT_PROVIDER_CONFIG[provider];
40
25
  const headers = new Headers();
41
26
  for (const name of ['content-type', 'accept']) {
42
27
  const value = c.req.header(name);
43
28
  if (value)
44
29
  headers.set(name, value);
45
30
  }
46
- authorize(headers, providerKey(c.env, provider));
31
+ // Provider protocol headers the SDK sets (e.g. anthropic-version, anthropic-beta) travel with the request.
32
+ for (const [name, value] of c.req.raw.headers) {
33
+ if (name.startsWith('anthropic-') && name !== 'anthropic-dangerous-direct-browser-access')
34
+ headers.set(name, value);
35
+ }
36
+ authorizeProvider(headers, provider, providerKey(c.env, provider));
47
37
  const { search } = new URL(c.req.url);
38
+ const hasBody = !['GET', 'HEAD'].includes(c.req.method);
39
+ const requestBody = hasBody ? await c.req.raw.arrayBuffer() : undefined;
48
40
  const upstream = await fetch(`${baseUrl}/${c.req.param('path')}${search}`, {
49
41
  method: c.req.method,
50
42
  headers,
51
- body: c.req.raw.body,
52
- // The Workers runtime requires this when forwarding a streaming request body.
53
- duplex: 'half',
43
+ body: requestBody,
54
44
  signal: c.req.raw.signal,
55
45
  });
56
46
  // Pass the upstream body straight through so tokens reach the UI as they arrive.
@@ -1 +1 @@
1
- {"version":3,"file":"github-secrets.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/github-secrets.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA6C9C,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAI9E;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuB/E;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAe/E;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"github-secrets.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/github-secrets.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA8B9C,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAI9E;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuB/E;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAe/E;AAED,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -1,28 +1,13 @@
1
1
  import { getGitHubConfig } from '../../../lib/config';
2
2
  import { createGitHubClient } from '../../../lib/github';
3
- import { checkIntegrationKey, INTEGRATION_SECRETS } from '../../../lib/integration-health';
3
+ import { checkIntegrationKey, INTEGRATION_SECRETS } from '@hintergrund/runtime-contracts';
4
4
  const SECRET_NAME = /^[A-Z_][A-Z0-9_]*$/;
5
5
  const MAX_SECRET_BYTES = 64 * 1024;
6
6
  // These are the only Actions secrets consumed by the generated deployment
7
7
  // workflow. Arbitrary repository secrets must not be presented as Worker
8
8
  // configuration because they would never reach the deployed Worker.
9
- const DEPLOYABLE_ACTION_SECRET_NAMES = new Set([
10
- 'SECRET',
11
- 'APP_PRIVATE_KEY',
12
- 'STRIPE_SECRET_KEY',
13
- 'STRIPE_WEBHOOK_SECRET',
14
- 'API_KEY',
15
- 'SETUP_TOKEN',
16
- 'GEMINI_API_KEY',
17
- 'DEEPSEEK_API_KEY',
18
- ]);
19
- const DELETABLE_ACTION_SECRET_NAMES = new Set([
20
- 'STRIPE_SECRET_KEY',
21
- 'STRIPE_WEBHOOK_SECRET',
22
- 'API_KEY',
23
- 'GEMINI_API_KEY',
24
- 'DEEPSEEK_API_KEY',
25
- ]);
9
+ const DELETABLE_ACTION_SECRET_NAMES = new Set([...Object.values(INTEGRATION_SECRETS), 'STRIPE_WEBHOOK_SECRET']);
10
+ const DEPLOYABLE_ACTION_SECRET_NAMES = new Set(['SECRET', 'APP_PRIVATE_KEY', ...DELETABLE_ACTION_SECRET_NAMES]);
26
11
  function secretName(value) {
27
12
  const name = value.trim();
28
13
  return SECRET_NAME.test(name) ? name : null;
@@ -1,5 +1,5 @@
1
1
  import type { Context } from 'hono';
2
2
  import type { HonoEnv } from '../../../index';
3
- export declare const testSetupIntegration: (c: Context<HonoEnv>) => Promise<Response>;
4
- export declare const testIntegration: (c: Context<HonoEnv>) => Promise<Response>;
3
+ /** Checks a key typed into Settings, or the one stored when none is given. */
4
+ export declare function testIntegration(c: Context<HonoEnv>): Promise<Response>;
5
5
  //# sourceMappingURL=integrations.handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/integrations.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAoB9C,eAAO,MAAM,oBAAoB,GAAI,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAmB,CAAC;AAC5E,eAAO,MAAM,eAAe,GAAI,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAoB,CAAC"}
1
+ {"version":3,"file":"integrations.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/integrations.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,8EAA8E;AAC9E,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAW5E"}
@@ -1,6 +1,6 @@
1
- import { checkIntegrationKey, INTEGRATION_SECRETS, isIntegrationProvider } from '../../../lib/integration-health';
2
- import { hasValidSetupToken, projectNeedsSetup } from './setup.handler';
3
- async function check(c, setup) {
1
+ import { checkIntegrationKey, INTEGRATION_SECRETS, isIntegrationProvider } from '@hintergrund/runtime-contracts';
2
+ /** Checks a key typed into Settings, or the one stored when none is given. */
3
+ export async function testIntegration(c) {
4
4
  c.header('Cache-Control', 'no-store');
5
5
  const origin = c.req.header('origin');
6
6
  if (origin && origin !== new URL(c.req.url).origin)
@@ -8,17 +8,11 @@ async function check(c, setup) {
8
8
  const body = await c.req.json().catch(() => null);
9
9
  if (!body)
10
10
  return c.json({ error: 'Invalid request.' }, 400);
11
- if (setup && (!(await hasValidSetupToken(c.env, body.setupToken)) || !(await projectNeedsSetup(c)))) {
12
- return c.json({ error: 'Invalid or expired setup link.' }, 403);
13
- }
14
11
  const provider = c.req.param('provider') ?? '';
15
12
  if (!isIntegrationProvider(provider))
16
13
  return c.json({ error: 'Unsupported integration.' }, 400);
17
14
  if (body.key !== undefined && typeof body.key !== 'string')
18
15
  return c.json({ error: 'Invalid key.' }, 400);
19
- const stored = provider === 'plunk' ? c.env.API_KEY || c.env.PLUNK_SECRET_KEY : c.env[INTEGRATION_SECRETS[provider]];
20
- const key = typeof body.key === 'string' ? body.key : setup ? '' : stored ?? '';
21
- return c.json(await checkIntegrationKey(provider, key));
16
+ const stored = c.env[INTEGRATION_SECRETS[provider]];
17
+ return c.json(await checkIntegrationKey(provider, typeof body.key === 'string' ? body.key : stored ?? ''));
22
18
  }
23
- export const testSetupIntegration = (c) => check(c, true);
24
- export const testIntegration = (c) => check(c, false);
@@ -0,0 +1,6 @@
1
+ import type { Context } from 'hono';
2
+ import type { HonoEnv } from '../../../index';
3
+ export declare function getRuntime(c: Context<HonoEnv>): Promise<Response>;
4
+ /** Commits the newer runtime to the project's package.json; the push deploys it. */
5
+ export declare function updateRuntime(c: Context<HonoEnv>): Promise<Response>;
6
+ //# sourceMappingURL=runtime.handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/runtime.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA2B9C,wBAAsB,UAAU,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAEvE;AAED,oFAAoF;AACpF,wBAAsB,aAAa,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAc1E"}
@@ -0,0 +1,42 @@
1
+ import { getGitHubConfig } from '../../../lib/config';
2
+ import { createGitHubClient } from '../../../lib/github';
3
+ import { RUNTIME_VERSION } from '../../../version';
4
+ const PACKAGE = '@hintergrund/worker';
5
+ /** The newest published runtime; the registry's answer is cached for a day. */
6
+ async function latestVersion() {
7
+ const response = await fetch(`https://registry.npmjs.org/${PACKAGE}/latest`, { cf: { cacheTtl: 86400, cacheEverything: true } });
8
+ if (!response.ok)
9
+ return null;
10
+ const { version } = await response.json();
11
+ return typeof version === 'string' && /^\d+\.\d+\.\d+$/.test(version) ? version : null;
12
+ }
13
+ function isNewer(candidate, current) {
14
+ const a = candidate.split('.').map(Number);
15
+ const b = current.split('.').map(Number);
16
+ const index = a.findIndex((part, i) => part !== b[i]);
17
+ return index !== -1 && a[index] > b[index];
18
+ }
19
+ async function availableUpdate() {
20
+ const latest = await latestVersion().catch(() => null);
21
+ return latest && isNewer(latest, RUNTIME_VERSION) ? latest : null;
22
+ }
23
+ export async function getRuntime(c) {
24
+ return c.json({ current: RUNTIME_VERSION, update: await availableUpdate() });
25
+ }
26
+ /** Commits the newer runtime to the project's package.json; the push deploys it. */
27
+ export async function updateRuntime(c) {
28
+ const update = await availableUpdate();
29
+ if (!update)
30
+ return c.json({ error: 'Already up to date.' }, 409);
31
+ const client = createGitHubClient(getGitHubConfig(c.env));
32
+ const file = await client.readFile('package.json');
33
+ if (!file)
34
+ return c.json({ error: 'package.json not found in the repository.' }, 404);
35
+ const pkg = JSON.parse(file.content);
36
+ // Committed earlier and still deploying.
37
+ if (pkg.dependencies?.[PACKAGE] === update)
38
+ return c.json({ version: update });
39
+ pkg.dependencies = { ...pkg.dependencies, [PACKAGE]: update };
40
+ await client.writeFilesAtomic([{ path: 'package.json', content: `${JSON.stringify(pkg, null, 2)}\n` }], `Update Hintergrund to ${update}`);
41
+ return c.json({ version: update });
42
+ }
@@ -18,4 +18,6 @@ export declare function commitWebsiteRepo(c: Context<HonoEnv>): Promise<Response
18
18
  * stages the result in the working copy like any other edit, so the owner reviews it before saving.
19
19
  */
20
20
  export declare function translateWebsiteMessages(c: Context<HonoEnv>): Promise<Response>;
21
+ /** Proposals for texts elsewhere on the website that follow from the edited ones; nothing is written to Git. */
22
+ export declare function proposeRelatedChanges(c: Context<HonoEnv>): Promise<Response>;
21
23
  //# sourceMappingURL=website-repo.handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"website-repo.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/website-repo.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAwC9C,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,yFAAyF;AACzF,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6B5E;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAG5E;AAED,8FAA8F;AAC9F,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAK/E;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiB5E;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqD9E;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAerF"}
1
+ {"version":3,"file":"website-repo.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/handlers/website-repo.handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAwC9C,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,yFAAyF;AACzF,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CA6B5E;AAED,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAG5E;AAED,8FAA8F;AAC9F,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAK/E;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiB5E;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqD9E;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAerF;AAED,gHAAgH;AAChH,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAalF"}
@@ -1,8 +1,8 @@
1
1
  import { getGitHubConfig } from '../../../lib/config';
2
2
  import { createGitHubClient } from '../../../lib/github';
3
- import { CONFIG_PATH, EMAIL_CAMPAIGNS_DIR, EMAILS_DIR, SHOP_DIR, STATIC_DIR, isDisabledFeaturePath, isWebsitePath, normalizeProjectConfig } from '@hintergrund/runtime-contracts';
3
+ import { CONFIG_PATH, EMAILS_DIR, SHOP_DIR, STATIC_DIR, isWebsitePath, normalizeProjectConfig } from '@hintergrund/runtime-contracts';
4
4
  import { WEBSITE_LANGUAGES } from '@hintergrund/runtime-contracts';
5
- import { translateAll } from '../../../lib/website-i18n';
5
+ import { proposeRelated, translateAll } from '../../../lib/website-i18n';
6
6
  const STATIC_MIME_TYPES = {
7
7
  '.jpg': 'image/jpeg',
8
8
  '.jpeg': 'image/jpeg',
@@ -119,7 +119,7 @@ export async function commitWebsiteRepo(c) {
119
119
  // One commit endpoint serves three workspaces, so each path must belong to an area the user holds.
120
120
  const held = c.get('user')?.permissions ?? [];
121
121
  // The shared email files hold both the order and the signup emails, so either area may edit them.
122
- const areasOf = (path) => path.startsWith(SHOP_DIR) ? ['shop'] : path.startsWith(EMAIL_CAMPAIGNS_DIR) ? ['newsletter'] : path.startsWith(EMAILS_DIR) ? ['shop', 'newsletter'] : ['website'];
122
+ const areasOf = (path) => path.startsWith(SHOP_DIR) ? ['shop'] : path.startsWith(EMAILS_DIR) ? ['shop', 'newsletter'] : ['website'];
123
123
  const forbidden = [...files.map((file) => file.path), ...deletions].find((path) => !held.includes('settings') && !areasOf(path).some((area) => held.includes(area)));
124
124
  if (forbidden)
125
125
  return c.json({ error: `You do not have access to edit ${forbidden}` }, 403);
@@ -127,21 +127,20 @@ export async function commitWebsiteRepo(c) {
127
127
  if (invalidPath) {
128
128
  return c.json({ error: `Path is not allowed for website sync: ${invalidPath}` }, 400);
129
129
  }
130
- // Features are fixed at setup. Refuse writes that would reintroduce a disabled
131
- // feature's code, so the repository keeps matching what the project actually does.
132
- const configEntry = files.find((file) => file.path === CONFIG_PATH);
133
- const configRaw = configEntry?.content ?? (await createGitHubClient(getGitHubConfig(c.env)).readFile(CONFIG_PATH))?.content;
134
- if (configRaw) {
135
- let features;
130
+ // Features hintergrund locked at release stay as released: neither their switch nor the lock may change.
131
+ const nextConfig = files.find((file) => file.path === CONFIG_PATH);
132
+ if (nextConfig || deletions.includes(CONFIG_PATH)) {
133
+ const current = normalizeProjectConfig(JSON.parse((await createGitHubClient(getGitHubConfig(c.env)).readFile(CONFIG_PATH))?.content ?? '{}'));
134
+ let next;
136
135
  try {
137
- features = normalizeProjectConfig(JSON.parse(configRaw)).features;
136
+ next = normalizeProjectConfig(JSON.parse(nextConfig?.content ?? '{}'));
138
137
  }
139
138
  catch {
140
- features = undefined;
139
+ return c.json({ error: 'website/config.json is not valid JSON' }, 400);
140
+ }
141
+ if (next.lockedFeatures.join() !== current.lockedFeatures.join() || current.lockedFeatures.some((feature) => next.features[feature] !== current.features[feature])) {
142
+ return c.json({ error: 'Features locked by hintergrund cannot be changed.' }, 422);
141
143
  }
142
- const blocked = features && files.map((file) => file.path).find((path) => isDisabledFeaturePath(path, features));
143
- if (blocked)
144
- return c.json({ error: `This project does not use the feature that owns ${blocked}.` }, 422);
145
144
  }
146
145
  const writtenPaths = new Set(files.map((file) => file.path));
147
146
  if (deletions.some((path) => writtenPaths.has(path))) {
@@ -183,3 +182,21 @@ export async function translateWebsiteMessages(c) {
183
182
  return c.json({ error: error instanceof Error ? error.message : 'Translation failed.' }, 422);
184
183
  }
185
184
  }
185
+ /** Proposals for texts elsewhere on the website that follow from the edited ones; nothing is written to Git. */
186
+ export async function proposeRelatedChanges(c) {
187
+ const body = await c.req.json().catch(() => ({}));
188
+ const list = (value, keys) => (Array.isArray(value) ? value : []).map((item) => Object.fromEntries(keys.map((key) => [key, String(item?.[key] ?? '').slice(0, 16000)])));
189
+ const changes = list(body.changes, ['id', 'from', 'to']);
190
+ // An empty text is a field of an edited page that was never written (a search description): it may be filled.
191
+ const candidates = list(body.candidates, ['id', 'text']).filter((candidate) => candidate.id);
192
+ if (!changes.length || changes.length > 50 || !candidates.length || candidates.length > 400)
193
+ return c.json({ error: 'Send up to 50 changes and 400 candidate texts.' }, 400);
194
+ if ([...changes, ...candidates].reduce((sum, item) => sum + JSON.stringify(item).length, 0) > 200_000)
195
+ return c.json({ error: 'Too much text in one request.' }, 413);
196
+ try {
197
+ return c.json({ proposals: await proposeRelated(c.env, changes, candidates) });
198
+ }
199
+ catch (error) {
200
+ return c.json({ error: error instanceof Error ? error.message : 'Finding related changes failed.' }, 422);
201
+ }
202
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAe5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,QAAA,MAAM,SAAS,sDAAsB,CAAC;AAqCtC,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/cms/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAc5B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI9C,QAAA,MAAM,SAAS,sDAAsB,CAAC;AAqCtC,eAAe,SAAS,CAAC"}
@@ -4,18 +4,15 @@ import { authMiddleware, requirePermission } from '../../../middleware/auth';
4
4
  import authRoutes from './auth.routes';
5
5
  import { createAdminUser, deleteAdminUser, listAdminUsers, patchAdminUser, sendUserRecovery } from '../handlers/admin-users.handler';
6
6
  import { getAgentConfig, proxyAgentRequest } from '../handlers/agent-provider.handler';
7
- import { commitWebsiteRepo, getWebsiteAsset, headWebsiteRepo, historyWebsiteRepo, syncWebsiteRepo, translateWebsiteMessages } from '../handlers/website-repo.handler';
7
+ import { commitWebsiteRepo, getWebsiteAsset, headWebsiteRepo, historyWebsiteRepo, syncWebsiteRepo, translateWebsiteMessages, proposeRelatedChanges } from '../handlers/website-repo.handler';
8
8
  import { deleteGitHubSecret, listGitHubSecrets, upsertGitHubSecret } from '../handlers/github-secrets.handler';
9
- import { setupContext, setupProject } from '../handlers/setup.handler';
10
- import { testIntegration, testSetupIntegration } from '../handlers/integrations.handler';
9
+ import { testIntegration } from '../handlers/integrations.handler';
10
+ import { getRuntime, updateRuntime } from '../handlers/runtime.handler';
11
11
  const cmsRoutes = new Hono();
12
12
  // Dashboard route (protected)
13
13
  cmsRoutes.get('/', authMiddleware, getDashboard);
14
14
  // Auth routes (public)
15
15
  cmsRoutes.route('/', authRoutes);
16
- cmsRoutes.get('/setup', setupContext);
17
- cmsRoutes.post('/setup', setupProject);
18
- cmsRoutes.post('/setup/integrations/:provider/test', testSetupIntegration);
19
16
  // Protected routes
20
17
  cmsRoutes.use('/*', authMiddleware);
21
18
  // Website commits are shared by the site, shop and emails workspaces; the handler checks each path's own area.
@@ -36,8 +33,11 @@ cmsRoutes.post('/website/repo/sync', syncWebsiteRepo);
36
33
  cmsRoutes.get('/website/repo/history', historyWebsiteRepo);
37
34
  cmsRoutes.put('/website/repo/commit', commitWebsiteRepo);
38
35
  cmsRoutes.post('/website/i18n/translate', translateWebsiteMessages);
36
+ cmsRoutes.post('/website/related', proposeRelatedChanges);
39
37
  cmsRoutes.get('/website/repo/assets/:path{.+}', getWebsiteAsset);
40
38
  cmsRoutes.post('/integrations/:provider/test', testIntegration);
39
+ cmsRoutes.get('/runtime', requirePermission('settings'), getRuntime);
40
+ cmsRoutes.post('/runtime/update', requirePermission('settings'), updateRuntime);
41
41
  cmsRoutes.get('/github/secrets', listGitHubSecrets);
42
42
  cmsRoutes.put('/github/secrets/:name', upsertGitHubSecret);
43
43
  cmsRoutes.delete('/github/secrets/:name', deleteGitHubSecret);
@@ -1,13 +1,17 @@
1
1
  /**
2
- * Campaigns are authored in the repository (`emails/campaigns/<id>.json`) and published
3
- * like any other edit. Sending reads the published draft, records exactly what went out
4
- * in D1, and removes the draft: a sent campaign is history, not something to edit.
2
+ * Campaigns (both drafts and sent records) live in D1 (`campaigns`).
3
+ * Each campaign stores its message fragment (`body_html`) and outer shell (`layout_html`),
4
+ * seeded from the latest campaign (or `emails/layout.html` when none exists yet).
5
5
  */
6
6
  import { Context } from 'hono';
7
- /** GET /api/email/admin/campaigns — every campaign that was sent, newest first. */
7
+ /** GET /api/email/admin/campaigns — drafts first, then sent campaigns newest first. */
8
8
  export declare function getCampaigns(c: Context): Promise<Response>;
9
- /** POST /api/email/admin/campaigns/:id/send — sends the published draft to every subscriber, or to one segment when the body names it. */
9
+ /** PUT /api/email/admin/campaigns/:id — create or update an unsent campaign draft in D1. */
10
+ export declare function saveCampaign(c: Context): Promise<Response>;
11
+ /** DELETE /api/email/admin/campaigns/:id — delete an unsent campaign draft. */
12
+ export declare function deleteCampaign(c: Context): Promise<Response>;
13
+ /** POST /api/email/admin/campaigns/:id/send — sends the draft to every subscriber, or to one segment and/or audience (all, free, paid) when the body names it. */
10
14
  export declare function sendCampaign(c: Context): Promise<Response>;
11
- /** POST /api/email/admin/campaigns/test — sends the copy being edited, published or not. */
15
+ /** POST /api/email/admin/campaigns/test — sends the copy being edited. */
12
16
  export declare function testCampaign(c: Context): Promise<Response>;
13
17
  //# sourceMappingURL=campaigns.handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/emails/handlers/campaigns.handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AA4B/B,mFAAmF;AACnF,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAUhE;AAED,0IAA0I;AAC1I,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkDhE;AAED,4FAA4F;AAC5F,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiBhE"}
1
+ {"version":3,"file":"campaigns.handler.d.ts","sourceRoot":"","sources":["../../../../src/api/emails/handlers/campaigns.handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAoC/B,uFAAuF;AACvF,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAWhE;AAED,4FAA4F;AAC5F,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAuChE;AAED,+EAA+E;AAC/E,wBAAsB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAelE;AAED,kKAAkK;AAClK,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAgFhE;AAED,0EAA0E;AAC1E,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkBhE"}