@gatewaze/admin-embed 0.1.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 (96) hide show
  1. package/README.md +42 -0
  2. package/dist/AiSkillsPicker-dbFhcanE.js +373 -0
  3. package/dist/ContentAccessPage-D0HRqPFc.js +264 -0
  4. package/dist/DataTable-fe6yRVpF.js +1984 -0
  5. package/dist/DetailPageHeader-D_v7924k.js +69 -0
  6. package/dist/EditionEmail-CyhC8232.js +8382 -0
  7. package/dist/GuideContent-DBXKCu7r.js +7580 -0
  8. package/dist/HostMediaTab-BsIBEQ1v.js +440 -0
  9. package/dist/InboxPage-C8ivCKdx.js +1112 -0
  10. package/dist/NewsletterCanvasEditor--B06apn3.js +11453 -0
  11. package/dist/NewsletterSetupWizard-BqV6-fa5.js +347 -0
  12. package/dist/NewsletterSignup-DRVZIpOs.js +224 -0
  13. package/dist/Page-D3u8IZ2a.js +14 -0
  14. package/dist/Toaster-Cde0i6IA.js +18 -0
  15. package/dist/Tooltip-CqxUlW1d.js +746 -0
  16. package/dist/_collectionSlug_-B3UN6M-Q.js +308 -0
  17. package/dist/_collection_-Qz4k_Qjl.js +139 -0
  18. package/dist/_edition_-DQXwkI_-.js +301 -0
  19. package/dist/_id_-CtT7rT9f.js +257 -0
  20. package/dist/_id_-CzScE4Qn.js +1197 -0
  21. package/dist/_virtual_gatewaze-modules-BeloWlOa.js +991 -0
  22. package/dist/admin-B0Mmrh_O.js +1239 -0
  23. package/dist/admin-CcfoK6vD.js +17 -0
  24. package/dist/admin-embed.js +21844 -0
  25. package/dist/admin.css +2 -0
  26. package/dist/block-editor-vXBShAue.js +226 -0
  27. package/dist/brand-DklYwIeA.js +11 -0
  28. package/dist/brick-editor-CmBitMMK.js +225 -0
  29. package/dist/broadcastService-CBqXNt_N.js +190 -0
  30. package/dist/classnames-uWIYaD6z.js +44 -0
  31. package/dist/contentAccessService-Cs7tdAo-.js +59 -0
  32. package/dist/context-jzuubYRz.js +5 -0
  33. package/dist/createSafeContext-P1pK0sAN.js +17 -0
  34. package/dist/detail-B8SVFJJr.js +26285 -0
  35. package/dist/detail-uFBxRbLF.js +2966 -0
  36. package/dist/dist-DTrOExw8.js +38806 -0
  37. package/dist/edition-slug-CARO24Bs.js +7 -0
  38. package/dist/export-edition-html-C_hdXQu5.js +18893 -0
  39. package/dist/floating-ui.dom-Cyv879E9.js +987 -0
  40. package/dist/hooks-C377EXJG.js +2974 -0
  41. package/dist/img/mlops-logo.png +0 -0
  42. package/dist/img/mlops-logo2.png +0 -0
  43. package/dist/index.d.ts +105 -0
  44. package/dist/jsx-runtime-CjozyJt-.js +180 -0
  45. package/dist/lib-CylJmhlJ.js +828 -0
  46. package/dist/list-C0cz0aQz.js +451 -0
  47. package/dist/list-CIVgIGsU.js +166 -0
  48. package/dist/logo/mlops-alt.png +0 -0
  49. package/dist/logo/mlops-logo.png +0 -0
  50. package/dist/new-r4KWpqa6.js +80 -0
  51. package/dist/outline-DwDYhYcF.js +6538 -0
  52. package/dist/pages-Ersfxcz7.js +216 -0
  53. package/dist/preview/12627f.jpg +0 -0
  54. package/dist/preview/af009d.jpg +0 -0
  55. package/dist/public-api-LD11kMxh.js +238 -0
  56. package/dist/react-DB2tPNit.js +933 -0
  57. package/dist/react-dom-giQNVXng.js +267 -0
  58. package/dist/registry-4XrV9iNG.js +7 -0
  59. package/dist/render-BtUWfMUt.js +59634 -0
  60. package/dist/resolvePeopleByEmail-hivX2l07.js +828 -0
  61. package/dist/runtime-config.js +10 -0
  62. package/dist/sends-BkPO6PG2.js +182 -0
  63. package/dist/server.browser-Pj3QUa7k.js +15227 -0
  64. package/dist/shim-BCerG8nb.js +6681 -0
  65. package/dist/sonnerHostBridge-CXuCMM3R.js +665 -0
  66. package/dist/src-BWDAOzZO.js +799 -0
  67. package/dist/starter-templates-CFs-QUdF.js +3077 -0
  68. package/dist/storage-VDSvnkvR.js +39 -0
  69. package/dist/templateParser-BQ2IsJ6c.js +49 -0
  70. package/dist/templates-rjQjWsRr.js +253 -0
  71. package/dist/theme/gatewaze/android-icon-144x144.png +0 -0
  72. package/dist/theme/gatewaze/android-icon-192x192.png +0 -0
  73. package/dist/theme/gatewaze/android-icon-36x36.png +0 -0
  74. package/dist/theme/gatewaze/android-icon-48x48.png +0 -0
  75. package/dist/theme/gatewaze/android-icon-72x72.png +0 -0
  76. package/dist/theme/gatewaze/android-icon-96x96.png +0 -0
  77. package/dist/theme/gatewaze/favicon-144x144.png +0 -0
  78. package/dist/theme/gatewaze/favicon-16x16.png +0 -0
  79. package/dist/theme/gatewaze/favicon-192x192.png +0 -0
  80. package/dist/theme/gatewaze/favicon-32x32.png +0 -0
  81. package/dist/theme/gatewaze/favicon-96x96.png +0 -0
  82. package/dist/theme/gatewaze/favicon.ico +0 -0
  83. package/dist/theme/gatewaze/gatewaze-icon-512.png +0 -0
  84. package/dist/theme/gatewaze/gatewaze-logo-black.svg +24 -0
  85. package/dist/theme/gatewaze/gatewaze-logo-white.svg +20 -0
  86. package/dist/theme/gatewaze/gatewaze-poweredby-black.svg +25 -0
  87. package/dist/theme/gatewaze/gatewaze-poweredby-white.svg +25 -0
  88. package/dist/theme/gatewaze/logo_black.svg +24 -0
  89. package/dist/theme/gatewaze/logo_white.svg +20 -0
  90. package/dist/theme-D6odw5nx.js +586 -0
  91. package/dist/ui-DRIo9Krs.js +9747 -0
  92. package/dist/upload-DMNfZ6FX.js +505 -0
  93. package/dist/useModuleFeature-DgsFIUpv.js +8 -0
  94. package/dist/utils-BcVvIjaY.js +36 -0
  95. package/dist/with-selector-B8eSdVx_.js +100 -0
  96. package/package.json +33 -0
@@ -0,0 +1,991 @@
1
+ import { c as e, n as t } from "./react-DB2tPNit.js";
2
+ import { t as n } from "./admin-CcfoK6vD.js";
3
+ import { t as r } from "./admin-B0Mmrh_O.js";
4
+ //#region ../../../gatewaze-modules/modules/newsletters/index.ts
5
+ var i = {
6
+ id: "newsletters",
7
+ group: "content",
8
+ type: "feature",
9
+ visibility: "public",
10
+ name: "Newsletters",
11
+ description: "Create, edit, and distribute newsletters with edition management and subscriber tracking",
12
+ version: "1.0.1",
13
+ features: [
14
+ "newsletters",
15
+ "newsletters.editor",
16
+ "newsletters.editions",
17
+ "newsletters.subscribers",
18
+ "newsletters.templates",
19
+ "newsletters.sending"
20
+ ],
21
+ edgeFunctions: [
22
+ "newsletter-signup",
23
+ "newsletter-unsubscribe",
24
+ "newsletter-gdoc-import",
25
+ "email-inbound-parse",
26
+ "reply-send"
27
+ ],
28
+ workers: [
29
+ {
30
+ name: "newsletters:link-reconcile",
31
+ handler: "./workers/link-reconcile.ts"
32
+ },
33
+ {
34
+ name: "newsletters:dispatch-scheduled",
35
+ handler: "./workers/dispatch-scheduled.ts"
36
+ },
37
+ {
38
+ name: "newsletters:list-hygiene",
39
+ handler: "./workers/list-hygiene.ts"
40
+ },
41
+ {
42
+ name: "newsletters:edition-snapshot",
43
+ handler: "./workers/edition-snapshot.ts"
44
+ },
45
+ {
46
+ name: "newsletters:buzzword-replies",
47
+ handler: "./workers/buzzword-replies.ts"
48
+ }
49
+ ],
50
+ crons: [
51
+ {
52
+ name: "newsletter-edition-snapshot",
53
+ queue: "jobs",
54
+ schedule: { every: 3e5 },
55
+ data: { kind: "newsletters:edition-snapshot" }
56
+ },
57
+ {
58
+ name: "newsletter-link-reconcile",
59
+ queue: "jobs",
60
+ schedule: { every: 216e5 },
61
+ data: { kind: "newsletters:link-reconcile" }
62
+ },
63
+ {
64
+ name: "newsletter-dispatch-scheduled",
65
+ queue: "jobs",
66
+ schedule: { every: 6e4 },
67
+ data: { kind: "newsletters:dispatch-scheduled" }
68
+ },
69
+ {
70
+ name: "newsletter-list-hygiene",
71
+ queue: "jobs",
72
+ schedule: { every: 6048e5 },
73
+ data: { kind: "newsletters:list-hygiene" }
74
+ },
75
+ {
76
+ name: "newsletter-buzzword-replies",
77
+ queue: "jobs",
78
+ schedule: { every: 3e5 },
79
+ data: { kind: "newsletters:buzzword-replies" }
80
+ }
81
+ ],
82
+ dependencies: ["content-platform"],
83
+ migrations: /* @__PURE__ */ "migrations/001_newsletters_tables.sql,migrations/002_template_collections_and_sends.sql,migrations/003_brick_block_association.sql,migrations/004_content_category.sql,migrations/005_ai_summary_block.sql,migrations/006_newsletter_types.sql,migrations/007_edition_block_template_fk.sql,migrations/008_add_sort_order_columns.sql,migrations/009_collection_accent_category.sql,migrations/010_setup_complete.sql,migrations/011_require_login.sql,migrations/012_gdoc_import.sql,migrations/013_portal_anon_rls.sql,migrations/014_require_login_rls.sql,migrations/015_replies.sql,migrations/016_triage_adapter.sql,migrations/017_keyword_adapter.sql,migrations/018_register_with_platform.sql,migrations/019_edition_blocks_realtime.sql,migrations/020_link_to_templates_module.sql,migrations/021_copy_to_templates_module.sql,migrations/023_drop_legacy_template_tables.sql,migrations/024_editions_snapshot_columns.sql,migrations/025_register_category_adapter.sql,migrations/026_fix_keyword_trigger_definer.sql,migrations/027_collection_git_provenance.sql,migrations/028_enable_host_registration.sql,migrations/029_can_admin_newsletter_uuid.sql,migrations/030_separate_publish_repo.sql,migrations/031_realtime_sends_and_log.sql,migrations/032_link_tracking.sql,migrations/033_view_online_target.sql,migrations/034_anon_read_edition_bricks.sql,migrations/035_personalised_delivery.sql,migrations/035a_cio_recipient_engagement.sql,migrations/036_edition_engagement_rpc.sql,migrations/037_detection_comparison_rpc.sql,migrations/038_corroborated_engagement_rpc.sql,migrations/039_edition_links_fk_cascade.sql,migrations/040_fanout_newsletter_send_recipients.sql,migrations/041_send_recipient_timezone_breakdown.sql,migrations/042_signup_forms_integration.sql,migrations/043_send_status_cancelling.sql,migrations/044_pause_and_exclude_sent.sql,migrations/045_engagement_human_opens_floor.sql,migrations/046_fanout_large_list_perf.sql,migrations/047_fanout_exclude_uses_sent_at.sql,migrations/048_replies_auto_reply_flag.sql,migrations/045_list_hygiene.sql,migrations/049_geo_engagement_config_and_indexes.sql,migrations/050_geo_engagement_rpcs.sql,migrations/051_geo_rollup_mv.sql,migrations/052_block_effectiveness_rpc.sql,migrations/053_poll_results_rpc.sql,migrations/053_send_engine_batches.sql,migrations/054_fanout_global_send_now.sql,migrations/055_recipient_preview_count.sql,migrations/056_detection_comparison_with_interactions.sql,migrations/057_engagement_unsubscribed_from_list_subscriptions.sql,migrations/058_engagement_read_webhook_stream.sql,migrations/058_email_only_intro_block_def.sql,migrations/059_fanout_set_statement_timeout_proconfig.sql,migrations/060_engagement_rpc_timeout_to_5min.sql,migrations/061_edition_stats_snapshots.sql,migrations/062_poll_results_drop_link_type_ref.sql,migrations/063_geo_rpcs_snapshot_wrappers.sql,migrations/064_newsletter_reply_messages.sql,migrations/065_newsletter_reply_status.sql,migrations/066_newsletter_event_blocks.sql,migrations/067_event_block_defs.sql,migrations/068_fanout_tz_local_roll_forward.sql,migrations/069_edition_safe_save.sql,migrations/070_fanout_default_tz_once.sql,migrations/071_fanout_batch.sql,migrations/072_fanout_send_at_clamp.sql,migrations/073_preview_send_schedule.sql,migrations/074_snapshot_all_but_last_two.sql,migrations/075_preview_security_definer.sql,migrations/076_tz_local_grace_window.sql,migrations/077_claim_recheck_subscription.sql,migrations/078_newsletter_replies_grant.sql,migrations/079_block_member_gating.sql,migrations/080_default_placeholder_signin_cta.sql,migrations/081_block_gating_via_content.sql,migrations/082_edition_member_embargo.sql,migrations/083_engagement_live_not_materialized.sql,migrations/084_snapshot_all_completed_editions.sql,migrations/085_engagement_wrapper_security_definer.sql,migrations/086_snapshot_weekly_catchup.sql".split(","),
84
+ apiRoutes: async (e, t) => {
85
+ let { registerHostMediaConsumer: n } = await import("./registry-4XrV9iNG.js");
86
+ n({
87
+ hostKind: "newsletter",
88
+ enableAlbums: !1,
89
+ enableSponsorTagging: !1,
90
+ enableYouTube: !1,
91
+ enableZipUnpack: !1,
92
+ contentTables: [{
93
+ table: "newsletters_editions",
94
+ staticHostKind: "newsletter",
95
+ hostIdColumn: "newsletter_id",
96
+ contentColumn: "content",
97
+ consumerType: "edition",
98
+ idColumn: "id",
99
+ nameColumn: "subject"
100
+ }]
101
+ });
102
+ try {
103
+ let { registerRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api/register-routes.js"));
104
+ await n(e, t);
105
+ } catch (e) {
106
+ console.warn("[newsletters] publish-to-git route registration failed:", e);
107
+ }
108
+ },
109
+ adminRoutes: [
110
+ {
111
+ path: "newsletters",
112
+ component: () => import("./list-CIVgIGsU.js"),
113
+ requiredFeature: "newsletters",
114
+ guard: "none"
115
+ },
116
+ {
117
+ path: "newsletters/new",
118
+ component: () => import("./NewsletterSetupWizard-BqV6-fa5.js"),
119
+ requiredFeature: "newsletters",
120
+ guard: "none"
121
+ },
122
+ {
123
+ path: "newsletters/:slug",
124
+ component: () => import("./detail-B8SVFJJr.js"),
125
+ requiredFeature: "newsletters",
126
+ guard: "none"
127
+ },
128
+ {
129
+ path: "newsletters/:slug/:tab",
130
+ component: () => import("./detail-B8SVFJJr.js"),
131
+ requiredFeature: "newsletters",
132
+ guard: "none"
133
+ },
134
+ {
135
+ path: "newsletters/:slug/editions/:id",
136
+ component: () => import("./_id_-CzScE4Qn.js"),
137
+ requiredFeature: "newsletters",
138
+ guard: "none"
139
+ },
140
+ {
141
+ path: "newsletters/:slug/editions/:id/:tab",
142
+ component: () => import("./_id_-CzScE4Qn.js"),
143
+ requiredFeature: "newsletters",
144
+ guard: "none"
145
+ },
146
+ {
147
+ path: "newsletters/editor/:id",
148
+ component: () => import("./_id_-CzScE4Qn.js"),
149
+ requiredFeature: "newsletters",
150
+ guard: "none"
151
+ },
152
+ {
153
+ path: "newsletters/editor/:id/:tab",
154
+ component: () => import("./_id_-CzScE4Qn.js"),
155
+ requiredFeature: "newsletters",
156
+ guard: "none"
157
+ },
158
+ {
159
+ path: "newsletters/templates",
160
+ component: () => import("./templates-rjQjWsRr.js"),
161
+ requiredFeature: "newsletters.templates",
162
+ guard: "none"
163
+ },
164
+ {
165
+ path: "newsletters/templates/:collectionSlug",
166
+ component: () => import("./_collectionSlug_-B3UN6M-Q.js"),
167
+ requiredFeature: "newsletters.templates",
168
+ guard: "none"
169
+ },
170
+ {
171
+ path: "newsletters/templates/:collectionSlug/blocks/:blockType",
172
+ component: () => import("./block-editor-vXBShAue.js"),
173
+ requiredFeature: "newsletters.templates",
174
+ guard: "none"
175
+ },
176
+ {
177
+ path: "newsletters/templates/:collectionSlug/bricks/:brickType",
178
+ component: () => import("./brick-editor-CmBitMMK.js"),
179
+ requiredFeature: "newsletters.templates",
180
+ guard: "none"
181
+ },
182
+ {
183
+ path: "newsletters/templates/:collectionSlug/upload",
184
+ component: () => import("./upload-DMNfZ6FX.js"),
185
+ requiredFeature: "newsletters.templates",
186
+ guard: "none"
187
+ },
188
+ {
189
+ path: "newsletters/sends",
190
+ component: () => import("./sends-BkPO6PG2.js"),
191
+ requiredFeature: "newsletters.sending",
192
+ guard: "none"
193
+ },
194
+ {
195
+ path: "newsletters/sends/:id",
196
+ component: () => import("./_id_-CtT7rT9f.js"),
197
+ requiredFeature: "newsletters.sending",
198
+ guard: "none"
199
+ }
200
+ ],
201
+ adminNavItems: [{
202
+ path: "/newsletters",
203
+ label: "Newsletters",
204
+ icon: "Newspaper",
205
+ requiredFeature: "newsletters",
206
+ defaultSection: "Content",
207
+ defaultLocation: "sidebar",
208
+ order: 10
209
+ }],
210
+ portalNav: {
211
+ label: "Newsletters",
212
+ path: "/newsletters",
213
+ icon: "newspaper",
214
+ order: 30
215
+ },
216
+ portalShell: {
217
+ rail: {
218
+ label: "News",
219
+ full: "Newsletters",
220
+ icon: "newspaper",
221
+ order: 30,
222
+ visibility: "public"
223
+ },
224
+ nav: [],
225
+ publicNav: []
226
+ },
227
+ portalRoutes: [
228
+ {
229
+ path: "/newsletters",
230
+ component: () => import("./pages-Ersfxcz7.js")
231
+ },
232
+ {
233
+ path: "/newsletters/:collection/:edition",
234
+ component: () => import("./_edition_-DQXwkI_-.js")
235
+ },
236
+ {
237
+ path: "/newsletters/:collection",
238
+ component: () => import("./_collection_-Qz4k_Qjl.js")
239
+ }
240
+ ],
241
+ publicApiScopes: [{
242
+ action: "read",
243
+ description: "Read published newsletter editions and types"
244
+ }],
245
+ publicApiRoutes: async (e, t) => {
246
+ let { registerPublicApi: n } = await import("./public-api-LD11kMxh.js");
247
+ n(e, t);
248
+ },
249
+ publicApiSchema: {
250
+ tag: {
251
+ name: "Newsletters",
252
+ description: "Newsletter types and published editions"
253
+ },
254
+ paths: {
255
+ "/": { get: {
256
+ summary: "List newsletter types",
257
+ operationId: "listNewsletters",
258
+ parameters: [
259
+ {
260
+ name: "content_category",
261
+ in: "query",
262
+ schema: { type: "string" },
263
+ description: "Filter by category slug (comma-separated for multiple)"
264
+ },
265
+ {
266
+ name: "fields",
267
+ in: "query",
268
+ schema: { type: "string" },
269
+ description: "Comma-separated field allowlist"
270
+ },
271
+ {
272
+ name: "limit",
273
+ in: "query",
274
+ schema: {
275
+ type: "integer",
276
+ default: 25,
277
+ minimum: 1,
278
+ maximum: 100
279
+ }
280
+ },
281
+ {
282
+ name: "offset",
283
+ in: "query",
284
+ schema: {
285
+ type: "integer",
286
+ default: 0,
287
+ minimum: 0
288
+ }
289
+ }
290
+ ],
291
+ responses: { 200: { description: "List of newsletter types" } }
292
+ } },
293
+ "/{slug}": { get: {
294
+ summary: "Get a newsletter type by slug",
295
+ operationId: "getNewsletter",
296
+ parameters: [{
297
+ name: "slug",
298
+ in: "path",
299
+ required: !0,
300
+ schema: { type: "string" }
301
+ }],
302
+ responses: {
303
+ 200: { description: "Newsletter type" },
304
+ 404: { $ref: "#/components/responses/NotFound" }
305
+ }
306
+ } },
307
+ "/{slug}/editions": { get: {
308
+ summary: "List published editions for a newsletter type",
309
+ operationId: "listNewsletterEditions",
310
+ parameters: [
311
+ {
312
+ name: "slug",
313
+ in: "path",
314
+ required: !0,
315
+ schema: { type: "string" }
316
+ },
317
+ {
318
+ name: "from",
319
+ in: "query",
320
+ schema: {
321
+ type: "string",
322
+ format: "date"
323
+ },
324
+ description: "Editions on or after this date"
325
+ },
326
+ {
327
+ name: "to",
328
+ in: "query",
329
+ schema: {
330
+ type: "string",
331
+ format: "date"
332
+ },
333
+ description: "Editions on or before this date"
334
+ },
335
+ {
336
+ name: "content_category",
337
+ in: "query",
338
+ schema: { type: "string" }
339
+ },
340
+ {
341
+ name: "limit",
342
+ in: "query",
343
+ schema: {
344
+ type: "integer",
345
+ default: 25,
346
+ maximum: 100
347
+ }
348
+ },
349
+ {
350
+ name: "offset",
351
+ in: "query",
352
+ schema: {
353
+ type: "integer",
354
+ default: 0
355
+ }
356
+ }
357
+ ],
358
+ responses: { 200: { description: "Published editions" } }
359
+ } },
360
+ "/editions/{id}": { get: {
361
+ summary: "Get a single edition by ID",
362
+ operationId: "getNewsletterEdition",
363
+ parameters: [{
364
+ name: "id",
365
+ in: "path",
366
+ required: !0,
367
+ schema: {
368
+ type: "string",
369
+ format: "uuid"
370
+ }
371
+ }],
372
+ responses: {
373
+ 200: { description: "Edition metadata" },
374
+ 404: { $ref: "#/components/responses/NotFound" }
375
+ }
376
+ } },
377
+ "/editions/{id}/content": { get: {
378
+ summary: "Get full block + brick content for an edition",
379
+ operationId: "getNewsletterEditionContent",
380
+ parameters: [{
381
+ name: "id",
382
+ in: "path",
383
+ required: !0,
384
+ schema: {
385
+ type: "string",
386
+ format: "uuid"
387
+ }
388
+ }],
389
+ responses: { 200: { description: "Edition content with ordered blocks and bricks" } }
390
+ } }
391
+ }
392
+ },
393
+ publicContentSources: [{
394
+ type: "newsletter_edition",
395
+ table: "newsletters_public_editions",
396
+ scope: "newsletters:read",
397
+ fields: {
398
+ id: "id",
399
+ title: "title",
400
+ date: "edition_date",
401
+ summary: "preheader"
402
+ },
403
+ visibilityFilter: [{
404
+ column: "status",
405
+ eq: "published"
406
+ }],
407
+ resourcePath: (e) => `/newsletters/editions/${e.id}`,
408
+ fullFields: [
409
+ "id",
410
+ "title",
411
+ "edition_date",
412
+ "preheader",
413
+ "content_category",
414
+ "collection_id",
415
+ "created_at",
416
+ "updated_at"
417
+ ]
418
+ }],
419
+ configSchema: {
420
+ GOOGLE_CLIENT_ID: {
421
+ key: "GOOGLE_CLIENT_ID",
422
+ type: "string",
423
+ required: !1,
424
+ description: "Google OAuth client ID for Google Docs import (shared with google-sheets module if installed)"
425
+ },
426
+ GOOGLE_CLIENT_SECRET: {
427
+ key: "GOOGLE_CLIENT_SECRET",
428
+ type: "secret",
429
+ required: !1,
430
+ description: "Google OAuth client secret"
431
+ },
432
+ GOOGLE_REFRESH_TOKEN: {
433
+ key: "GOOGLE_REFRESH_TOKEN",
434
+ type: "secret",
435
+ required: !1,
436
+ description: "Google OAuth refresh token with Docs and Drive read scopes"
437
+ },
438
+ ANTHROPIC_API_KEY: {
439
+ key: "ANTHROPIC_API_KEY",
440
+ type: "secret",
441
+ required: !1,
442
+ description: "Claude API key for AI-powered Google Doc section mapping during import"
443
+ }
444
+ },
445
+ onInstall: async () => {
446
+ console.log("[newsletters] Module installed");
447
+ },
448
+ onEnable: async () => {
449
+ console.log("[newsletters] Module enabled");
450
+ },
451
+ onDisable: async () => {
452
+ console.log("[newsletters] Module disabled");
453
+ }
454
+ }, a = {
455
+ id: "content-platform",
456
+ group: "content",
457
+ type: "feature",
458
+ visibility: "hidden",
459
+ name: "Content Platform",
460
+ description: "Cross-content-type publishing, categorization, source tracking, and the unified Content Inbox.",
461
+ version: "1.0.0",
462
+ features: [
463
+ "content-platform",
464
+ "content-platform.inbox",
465
+ "content-platform.admin"
466
+ ],
467
+ apiRoutes: async (e, t) => {
468
+ let { registerRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api"));
469
+ n(e, t);
470
+ },
471
+ workers: [{
472
+ name: "content-platform:verdict-handler",
473
+ handler: "./workers/verdict-handler.js",
474
+ concurrency: 1
475
+ }],
476
+ crons: [{
477
+ name: "content-platform-verdict-tick",
478
+ queue: "jobs",
479
+ schedule: { every: 5e3 },
480
+ data: { kind: "content-platform:verdict-handler" }
481
+ }],
482
+ migrations: [
483
+ "migrations/001_publish_adapter_registry.sql",
484
+ "migrations/002_category_adapter_registry.sql",
485
+ "migrations/003_content_sources.sql",
486
+ "migrations/004_inbox_cache.sql",
487
+ "migrations/005_fix_verdict_triage_priority.sql",
488
+ "migrations/006_fix_inbox_cache_preview_call.sql",
489
+ "migrations/007_inbox_cache_enrichment.sql",
490
+ "migrations/008_content_access_registry.sql",
491
+ "migrations/009_content_access_action_email.sql",
492
+ "migrations/010_content_access_allowed_tiers.sql"
493
+ ],
494
+ adminRoutes: [{
495
+ path: "inbox",
496
+ component: () => import("./InboxPage-C8ivCKdx.js"),
497
+ requiredFeature: "content-platform.inbox",
498
+ guard: "none"
499
+ }, {
500
+ path: "content-access",
501
+ component: () => import("./ContentAccessPage-D0HRqPFc.js"),
502
+ guard: "none"
503
+ }],
504
+ adminNavItems: [{
505
+ path: "/content-access",
506
+ label: "Content Access",
507
+ icon: "ShieldCheck",
508
+ defaultSection: "Content",
509
+ defaultLocation: "sidebar",
510
+ order: 90
511
+ }]
512
+ }, o = {
513
+ id: "host-media",
514
+ group: "content",
515
+ type: "feature",
516
+ visibility: "public",
517
+ name: "Host Media",
518
+ description: "Shared media management — table, API, admin tab, upload pipeline (Sharp variants, YouTube delegation, ZIP unpack, chunked upload), reference tracking, quotas. Consumed by sites/events/newsletters/blog/podcasts via the hostMediaConsumer registry block.",
519
+ version: "0.1.1",
520
+ features: [
521
+ "host-media",
522
+ "host-media.albums",
523
+ "host-media.youtube",
524
+ "host-media.zip-unpack",
525
+ "host-media.chunked-upload"
526
+ ],
527
+ dependencies: [],
528
+ migrations: [
529
+ "migrations/001_host_media.sql",
530
+ "migrations/002_host_media_albums.sql",
531
+ "migrations/004_host_media_zip_uploads.sql",
532
+ "migrations/005_host_media_quotas.sql",
533
+ "migrations/006_host_media_used_in_rpcs.sql",
534
+ "migrations/008_host_media_rls_dispatch.sql",
535
+ "migrations/009_host_media_signed_url_log.sql",
536
+ "migrations/010_host_media_chunked_uploads.sql",
537
+ "migrations/011_host_media_sync_refs_fn.sql"
538
+ ],
539
+ workers: [
540
+ {
541
+ name: "host-media:used-in-rebuild",
542
+ handler: "./workers/used-in-rebuild-cron.ts"
543
+ },
544
+ {
545
+ name: "host-media:youtube-poll",
546
+ handler: "./workers/youtube-poll.ts"
547
+ },
548
+ {
549
+ name: "host-media:chunked-cleanup",
550
+ handler: "./workers/chunked-cleanup-cron.ts"
551
+ }
552
+ ],
553
+ crons: [
554
+ {
555
+ name: "host-media:used-in-rebuild",
556
+ cron: "0 3 * * *",
557
+ data: { kind: "host-media:used-in-rebuild" }
558
+ },
559
+ {
560
+ name: "host-media:youtube-poll",
561
+ cron: "*/5 * * * *",
562
+ data: { kind: "host-media:youtube-poll" }
563
+ },
564
+ {
565
+ name: "host-media:chunked-cleanup",
566
+ cron: "0 * * * *",
567
+ data: { kind: "host-media:chunked-cleanup" }
568
+ }
569
+ ],
570
+ apiRoutes: async (e, t) => {
571
+ let { registerRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api/register-routes.js"));
572
+ n(e, t);
573
+ },
574
+ adminSlots: [{
575
+ slotName: "host-media:tab",
576
+ component: () => import("./HostMediaTab-BsIBEQ1v.js").then((e) => e.n),
577
+ order: 100
578
+ }],
579
+ onEnable: async (e) => {
580
+ e?.logger.info("host-media module enabled");
581
+ }
582
+ }, s = {
583
+ id: "templates",
584
+ group: "sites",
585
+ type: "feature",
586
+ visibility: "public",
587
+ name: "Templates",
588
+ description: "Shared block/wrapper authoring: marker grammar, parser, source ingest, A/B engine, version pinning. Consumed by newsletters, sites, and future content modules.",
589
+ version: "0.1.0",
590
+ features: [
591
+ "templates",
592
+ "templates.editor",
593
+ "templates.git-sources",
594
+ "templates.ab.builtin"
595
+ ],
596
+ dependencies: [],
597
+ migrations: /* @__PURE__ */ "migrations/001_templates_libraries_and_definitions.sql,migrations/002_templates_sources.sql,migrations/003_templates_ab.sql,migrations/004_templates_helpers.sql,migrations/005_templates_rls.sql,migrations/006_templates_apply_source.sql,migrations/007_templates_ab_helpers.sql,migrations/008_templates_theme_kinds.sql,migrations/009_templates_content_schemas.sql,migrations/010_fix_can_admin_fn_dispatcher.sql,migrations/011_writes_via_host.sql,migrations/012_fix_select_policies_and_grants.sql,migrations/013_rename_theme_kinds.sql,migrations/014_block_defs_columns.sql,migrations/015_wrappers_role.sql,migrations/016_canvas_block_def_columns.sql,migrations/017_unify_theme_kinds.sql,migrations/018_block_def_render_kind.sql,migrations/019_grant_table_privileges.sql,migrations/020_fix_apply_source_unassigned_record.sql,migrations/021_brick_def_render_kind.sql,migrations/022_block_def_declarative_render_kind.sql,migrations/023_anon_read_defs_for_public_newsletters.sql,migrations/024_prune_absent_block_defs.sql,migrations/025_brick_def_is_current.sql,migrations/026_apply_source_declarative_render_kind.sql,migrations/027_block_def_ownership.sql".split(","),
598
+ apiRoutes: async (e, t) => {
599
+ let { registerRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api/register-routes.js"));
600
+ n(e, t);
601
+ },
602
+ workers: [{
603
+ name: "templates:check-source-updates",
604
+ handler: "./workers/cron-dispatchers.ts"
605
+ }],
606
+ crons: [{
607
+ name: "templates-check-source-updates",
608
+ queue: "jobs",
609
+ schedule: { every: 9e5 },
610
+ data: { kind: "templates:check-source-updates" }
611
+ }],
612
+ adminRoutes: [],
613
+ adminNavItems: [],
614
+ configSchema: {
615
+ git_check_interval_ms: {
616
+ key: "git_check_interval_ms",
617
+ type: "number",
618
+ label: "Git source check interval (ms)",
619
+ required: !1,
620
+ default: "900000",
621
+ description: "How often the drift-monitor worker polls git sources.",
622
+ min: 6e4,
623
+ max: 864e5
624
+ },
625
+ parser_timeout_ms: {
626
+ key: "parser_timeout_ms",
627
+ type: "number",
628
+ label: "Parser timeout (ms)",
629
+ required: !1,
630
+ default: "30000",
631
+ description: "Per-source parser timeout. Spec §9.1.",
632
+ min: 1e3,
633
+ max: 6e5
634
+ },
635
+ parser_max_files_per_source: {
636
+ key: "parser_max_files_per_source",
637
+ type: "number",
638
+ label: "Max files per source",
639
+ required: !1,
640
+ default: "50",
641
+ description: "Maximum number of files the parser will process from one source.",
642
+ min: 1,
643
+ max: 1e3
644
+ },
645
+ parser_max_bytes_per_file: {
646
+ key: "parser_max_bytes_per_file",
647
+ type: "number",
648
+ label: "Max bytes per file",
649
+ required: !1,
650
+ default: "1048576",
651
+ description: "Per-file byte cap (default 1 MiB).",
652
+ min: 1024,
653
+ max: 10485760
654
+ }
655
+ },
656
+ onInstall: async () => {
657
+ console.log("[templates] Module installed (v0.1.0)");
658
+ },
659
+ onEnable: async () => {
660
+ console.log("[templates] Module enabled");
661
+ },
662
+ onDisable: async () => {
663
+ console.log("[templates] Module disabled — note: dependent modules (newsletters, sites) may break");
664
+ }
665
+ }, c = {
666
+ id: "editor-ai-copilot",
667
+ group: "editor",
668
+ type: "feature",
669
+ visibility: "premium",
670
+ name: "Editor AI Copilot",
671
+ description: "Generates and revises Puck-editor pages (sites + newsletter editions) from a natural-language prompt, optionally grounded in uploaded documents or public URLs. Strictly constrained to the brand's template library — designers control look & feel, marketing controls content.",
672
+ version: "1.0.0",
673
+ features: ["editor-ai-copilot"],
674
+ dependencies: [
675
+ "sites",
676
+ "newsletters",
677
+ "templates"
678
+ ],
679
+ adminRoutes: [],
680
+ adminNavItems: [],
681
+ adminSlots: [{
682
+ slotName: "newsletter-detail:settings",
683
+ component: () => import("./AiSkillsPicker-dbFhcanE.js"),
684
+ order: 200,
685
+ requiredFeature: "editor-ai-copilot",
686
+ meta: {
687
+ label: "AI Skills",
688
+ icon: "sparkles"
689
+ }
690
+ }, {
691
+ slotName: "site-detail:settings",
692
+ component: () => import("./AiSkillsPicker-dbFhcanE.js"),
693
+ order: 200,
694
+ requiredFeature: "editor-ai-copilot",
695
+ meta: {
696
+ label: "AI Skills",
697
+ icon: "sparkles"
698
+ }
699
+ }],
700
+ migrations: [
701
+ "migrations/001_canvas_ai_audit_log.sql",
702
+ "migrations/002_canvas_ai_documents.sql",
703
+ "migrations/003_ai_skills.sql",
704
+ "migrations/004_canvas_ai_web_tools.sql",
705
+ "migrations/005_active_skill_ids_inherit.sql"
706
+ ],
707
+ apiRoutes: async (e, t) => {
708
+ let { registerEditorAiCopilotRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api/register-routes.js"));
709
+ await n(e, t);
710
+ },
711
+ crons: [{
712
+ name: "editor-ai-copilot:sweep-expired-documents",
713
+ queue: "jobs",
714
+ schedule: { pattern: "*/15 * * * *" },
715
+ data: { kind: "editor-ai-copilot.sweep-expired-documents" }
716
+ }],
717
+ workers: [{
718
+ name: "editor-ai-copilot.sweep-expired-documents",
719
+ handler: "workers/sweep-expired-documents.js"
720
+ }],
721
+ configSchema: {
722
+ enabled: {
723
+ key: "enabled",
724
+ type: "boolean",
725
+ label: "Enabled",
726
+ required: !1,
727
+ description: "When true, the sidebar AI pane is shown in the Puck editor for sites + newsletter editions. Requires at least one of ANTHROPIC_API_KEY / OPENAI_API_KEY to be set on the API process.",
728
+ default: "true"
729
+ },
730
+ provider: {
731
+ key: "provider",
732
+ type: "select",
733
+ label: "Preferred LLM provider",
734
+ required: !1,
735
+ description: "\"anthropic\" or \"openai\". When neither key is set, the feature is hard-disabled regardless of this value.",
736
+ default: "anthropic",
737
+ options: [{
738
+ label: "Anthropic (Claude)",
739
+ value: "anthropic"
740
+ }, {
741
+ label: "OpenAI (GPT)",
742
+ value: "openai"
743
+ }]
744
+ },
745
+ perUserPerMin: {
746
+ key: "perUserPerMin",
747
+ type: "number",
748
+ label: "Generations per user per minute",
749
+ required: !1,
750
+ description: "Rate limit (in-memory, resets on API restart).",
751
+ default: "10",
752
+ min: 1,
753
+ max: 1e3
754
+ },
755
+ perSitePerMin: {
756
+ key: "perSitePerMin",
757
+ type: "number",
758
+ label: "Generations per site per minute",
759
+ required: !1,
760
+ description: "Rate limit (in-memory, resets on API restart).",
761
+ default: "30",
762
+ min: 1,
763
+ max: 1e4
764
+ },
765
+ perUserPerDay: {
766
+ key: "perUserPerDay",
767
+ type: "number",
768
+ label: "Generations per user per day",
769
+ required: !1,
770
+ description: "Rate limit (persisted via canvas_ai_audit_log row counts; survives API restarts).",
771
+ default: "100",
772
+ min: 1,
773
+ max: 1e5
774
+ },
775
+ maxDocsPerRequest: {
776
+ key: "maxDocsPerRequest",
777
+ type: "number",
778
+ label: "Max source documents per generation",
779
+ required: !1,
780
+ description: "Phase F. Combined extracted text budget (all docs) is enforced separately at 50k tokens.",
781
+ default: "5",
782
+ min: 1,
783
+ max: 20
784
+ }
785
+ }
786
+ }, l = {
787
+ id: "broadcasts",
788
+ group: "communications",
789
+ type: "feature",
790
+ visibility: "public",
791
+ name: "Broadcasts",
792
+ description: "Send a single scheduled, timezone-aware email to a segment, with an AI segment copilot",
793
+ version: "0.2.0",
794
+ features: [
795
+ "broadcasts",
796
+ "broadcasts.send",
797
+ "broadcasts.copilot"
798
+ ],
799
+ dependencies: [
800
+ "ai",
801
+ "bulk-emailing",
802
+ "segments"
803
+ ],
804
+ edgeFunctions: ["broadcast-send", "broadcast-unsubscribe"],
805
+ apiRoutes: async (e, t) => {
806
+ try {
807
+ let { registerBroadcastsRoutes: n } = await Promise.reject(/* @__PURE__ */ Error("[gatewaze-modules] server-only path stubbed in admin bundle: ./api/register-routes.js"));
808
+ await n(e, t);
809
+ } catch (e) {
810
+ console.warn("[broadcasts] API route registration failed:", e);
811
+ }
812
+ },
813
+ workers: [
814
+ {
815
+ name: "broadcasts:dispatch-scheduled",
816
+ handler: "./workers/dispatch-scheduled.ts"
817
+ },
818
+ {
819
+ name: "broadcasts:draft-from-recap",
820
+ handler: "./workers/draft-from-recap.ts"
821
+ },
822
+ {
823
+ name: "broadcasts:dispatch-plays-send",
824
+ handler: "./workers/dispatch-plays-send.ts"
825
+ },
826
+ {
827
+ name: "broadcasts:engagement-snapshot",
828
+ handler: "./workers/engagement-snapshot.ts"
829
+ }
830
+ ],
831
+ crons: [
832
+ {
833
+ name: "broadcast-dispatch-scheduled",
834
+ queue: "jobs",
835
+ schedule: { every: 6e4 },
836
+ data: { kind: "broadcasts:dispatch-scheduled" }
837
+ },
838
+ {
839
+ name: "plays-dispatch-send",
840
+ queue: "jobs",
841
+ schedule: { every: 6e4 },
842
+ data: { kind: "broadcasts:dispatch-plays-send" }
843
+ },
844
+ {
845
+ name: "broadcast-engagement-snapshot",
846
+ queue: "jobs",
847
+ schedule: { every: 3e5 },
848
+ data: { kind: "broadcasts:engagement-snapshot" }
849
+ }
850
+ ],
851
+ migrations: [
852
+ "migrations/001_broadcasts_tables.sql",
853
+ "migrations/002_broadcasts_fanout_claim.sql",
854
+ "migrations/003_segments_copilot_use_case.sql",
855
+ "migrations/004_send_engine_batches.sql",
856
+ "migrations/005_broadcasts_category_list.sql",
857
+ "migrations/006_broadcasts_parent.sql",
858
+ "migrations/007_broadcast_recipient_preview_count.sql",
859
+ "migrations/008_broadcast_event_link.sql",
860
+ "migrations/009_broadcast_replies.sql",
861
+ "migrations/010_broadcast_list_intersection.sql",
862
+ "migrations/011_broadcast_reply_messages.sql",
863
+ "migrations/012_broadcast_reply_status.sql",
864
+ "migrations/013_broadcast_engagement.sql",
865
+ "migrations/014_broadcast_prospect_gating.sql",
866
+ "migrations/015_broadcast_type.sql",
867
+ "migrations/016_broadcast_blocks.sql",
868
+ "migrations/017_broadcast_links.sql",
869
+ "migrations/018_broadcast_block_effectiveness.sql",
870
+ "migrations/019_fanout_batch.sql",
871
+ "migrations/020_preview_send_schedule.sql",
872
+ "migrations/021_tz_local_grace_window.sql",
873
+ "migrations/022_default_sender_enforcement.sql",
874
+ "migrations/023_broadcast_engagement_cache.sql",
875
+ "migrations/024_engagement_snapshot_refresh.sql"
876
+ ],
877
+ adminRoutes: [
878
+ {
879
+ path: "broadcasts",
880
+ component: () => import("./list-C0cz0aQz.js"),
881
+ requiredFeature: "broadcasts",
882
+ guard: "none"
883
+ },
884
+ {
885
+ path: "broadcasts/new",
886
+ component: () => import("./new-r4KWpqa6.js"),
887
+ requiredFeature: "broadcasts",
888
+ guard: "none"
889
+ },
890
+ {
891
+ path: "broadcasts/:id",
892
+ component: () => import("./detail-uFBxRbLF.js"),
893
+ requiredFeature: "broadcasts",
894
+ guard: "none"
895
+ },
896
+ {
897
+ path: "broadcasts/:id/:tab",
898
+ component: () => import("./detail-uFBxRbLF.js"),
899
+ requiredFeature: "broadcasts",
900
+ guard: "none"
901
+ }
902
+ ],
903
+ adminNavItems: [{
904
+ path: "/broadcasts",
905
+ label: "Broadcasts",
906
+ icon: "Mail",
907
+ requiredFeature: "broadcasts",
908
+ defaultSection: "Communications",
909
+ defaultLocation: "sidebar",
910
+ order: 20
911
+ }],
912
+ configSchema: {
913
+ BULK_EMAIL_FROM_ADDRESS: {
914
+ key: "BULK_EMAIL_FROM_ADDRESS",
915
+ type: "string",
916
+ required: !1,
917
+ description: "Default From address for broadcast sends (shared with bulk-emailing)."
918
+ },
919
+ BULK_EMAIL_FROM_NAME: {
920
+ key: "BULK_EMAIL_FROM_NAME",
921
+ type: "string",
922
+ required: !1,
923
+ description: "Default From display name for broadcast sends."
924
+ }
925
+ },
926
+ onInstall: async () => {
927
+ console.log("[broadcasts] Module installed");
928
+ },
929
+ onEnable: async () => {
930
+ console.log("[broadcasts] Module enabled");
931
+ },
932
+ onDisable: async () => {
933
+ console.log("[broadcasts] Module disabled");
934
+ }
935
+ }, u = /* @__PURE__ */ t(((e, t) => {
936
+ t.exports = {};
937
+ })), d = /* @__PURE__ */ t(((e, t) => {
938
+ t.exports = {};
939
+ })), f = /* @__PURE__ */ t(((e, t) => {
940
+ t.exports = {};
941
+ })), p = /* @__PURE__ */ t(((e, t) => {
942
+ t.exports = {};
943
+ })), m = /* @__PURE__ */ t(((e, t) => {
944
+ t.exports = {};
945
+ })), h = /* @__PURE__ */ t(((e, t) => {
946
+ t.exports = {};
947
+ })), g = /* @__PURE__ */ e(u()), _ = /* @__PURE__ */ e(d()), v = /* @__PURE__ */ e(f()), y = /* @__PURE__ */ e(p()), b = /* @__PURE__ */ e(m()), x = /* @__PURE__ */ e(h());
948
+ i.guide = g.default, a.guide = _.default, o.guide = v.default, s.guide = y.default, c.guide = b.default, l.guide = x.default, i.__identity = {
949
+ sourceSlug: "gatewaze-modules",
950
+ qualifiedId: "gatewaze-modules/newsletters",
951
+ firstParty: !0,
952
+ routeBase: ""
953
+ }, a.__identity = {
954
+ sourceSlug: "gatewaze-modules",
955
+ qualifiedId: "gatewaze-modules/content-platform",
956
+ firstParty: !0,
957
+ routeBase: ""
958
+ }, o.__identity = {
959
+ sourceSlug: "gatewaze-modules",
960
+ qualifiedId: "gatewaze-modules/host-media",
961
+ firstParty: !0,
962
+ routeBase: ""
963
+ }, s.__identity = {
964
+ sourceSlug: "gatewaze-modules",
965
+ qualifiedId: "gatewaze-modules/templates",
966
+ firstParty: !0,
967
+ routeBase: ""
968
+ }, c.__identity = {
969
+ sourceSlug: "gatewaze-modules",
970
+ qualifiedId: "gatewaze-modules/editor-ai-copilot",
971
+ firstParty: !0,
972
+ routeBase: ""
973
+ }, l.__identity = {
974
+ sourceSlug: "gatewaze-modules",
975
+ qualifiedId: "gatewaze-modules/broadcasts",
976
+ firstParty: !0,
977
+ routeBase: ""
978
+ }, globalThis.__GW_ADMIN_BOOT__ = {
979
+ admBoot_2: n,
980
+ admBoot_4: r
981
+ };
982
+ var S = [
983
+ i,
984
+ a,
985
+ o,
986
+ s,
987
+ c,
988
+ l
989
+ ];
990
+ //#endregion
991
+ export { S as t };