@cosmicdrift/kumiko-samples 0.412.0 → 0.413.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/package.json +1 -1
  2. package/packages/bundled-features/package.json +13 -13
  3. package/packages/bundled-features/src/admin-shell/feature.ts +1 -1
  4. package/packages/bundled-features/src/agent-tools/api-docs/anchors.ts +1 -1
  5. package/packages/bundled-features/src/auth-email-password/boot-rules.ts +9 -0
  6. package/packages/bundled-features/src/auth-email-password/feature.ts +6 -19
  7. package/packages/bundled-features/src/auth-email-password/validate-options.ts +20 -0
  8. package/packages/bundled-features/src/billing-foundation/boot-rules.ts +26 -0
  9. package/packages/bundled-features/src/billing-foundation/validate-options.ts +59 -46
  10. package/packages/bundled-features/src/cap-overview/boot-rules.ts +14 -0
  11. package/packages/bundled-features/src/cap-overview/feature.ts +12 -5
  12. package/packages/bundled-features/src/data-retention/changes.json +6 -0
  13. package/packages/bundled-features/src/data-retention/feature.ts +3 -2
  14. package/packages/bundled-features/src/documents/boot-rules.ts +14 -0
  15. package/packages/bundled-features/src/documents/feature.ts +8 -4
  16. package/packages/bundled-features/src/file-derivatives/boot-rules.ts +9 -0
  17. package/packages/bundled-features/src/file-derivatives/feature.ts +6 -3
  18. package/packages/bundled-features/src/folders/boot-rules.ts +9 -0
  19. package/packages/bundled-features/src/folders/feature.ts +6 -3
  20. package/packages/bundled-features/src/helpdesk/boot-rules.ts +9 -0
  21. package/packages/bundled-features/src/{contact → helpdesk}/challenge.ts +2 -2
  22. package/packages/bundled-features/src/{contact → helpdesk}/changes.json +18 -0
  23. package/packages/bundled-features/src/{contact/client/contact-client-source.ts → helpdesk/client/helpdesk-client-source.ts} +4 -4
  24. package/packages/bundled-features/src/helpdesk/client/helpdesk-website-client.ts +29 -0
  25. package/packages/bundled-features/src/helpdesk/client/index.ts +9 -0
  26. package/packages/bundled-features/src/{contact → helpdesk}/entity.ts +35 -31
  27. package/packages/bundled-features/src/{contact → helpdesk}/feature.ts +56 -52
  28. package/packages/bundled-features/src/{contact → helpdesk}/handlers/attempts.ts +3 -3
  29. package/packages/bundled-features/src/{contact → helpdesk}/handlers/challenge.query.ts +10 -10
  30. package/packages/bundled-features/src/{contact → helpdesk}/handlers/forward-request.write.ts +25 -23
  31. package/packages/bundled-features/src/{contact → helpdesk}/handlers/mark-done.write.ts +11 -11
  32. package/packages/bundled-features/src/{contact → helpdesk}/handlers/notify-reporter-in-app.write.ts +14 -14
  33. package/packages/bundled-features/src/{contact → helpdesk}/handlers/open-count.query.ts +4 -4
  34. package/packages/bundled-features/src/{contact → helpdesk}/handlers/open-count.ts +2 -2
  35. package/packages/bundled-features/src/{contact → helpdesk}/handlers/replies.query.ts +6 -6
  36. package/packages/bundled-features/src/{contact → helpdesk}/handlers/reply.write.ts +30 -30
  37. package/packages/bundled-features/src/{contact → helpdesk}/handlers/report.write.ts +29 -29
  38. package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-delivery.query.ts +40 -40
  39. package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-detail.query.ts +15 -15
  40. package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-list.query.ts +2 -2
  41. package/packages/bundled-features/src/{contact → helpdesk}/handlers/send-reply-mail.write.ts +24 -24
  42. package/packages/bundled-features/src/{contact → helpdesk}/handlers/send-test.write.ts +18 -14
  43. package/packages/bundled-features/src/{contact → helpdesk}/handlers/submit.write.ts +32 -31
  44. package/packages/bundled-features/src/{contact → helpdesk}/handlers/take-over-uploads.ts +5 -5
  45. package/packages/bundled-features/src/{contact → helpdesk}/i18n.ts +78 -75
  46. package/packages/bundled-features/src/helpdesk/index.ts +29 -0
  47. package/packages/bundled-features/src/{contact → helpdesk}/lib.ts +32 -28
  48. package/packages/bundled-features/src/{contact → helpdesk}/mail.ts +56 -56
  49. package/packages/bundled-features/src/{contact → helpdesk}/options.ts +18 -16
  50. package/packages/bundled-features/src/helpdesk/panels.ts +28 -0
  51. package/packages/bundled-features/src/{contact → helpdesk}/payloads.ts +33 -33
  52. package/packages/bundled-features/src/{contact → helpdesk}/screens.ts +104 -104
  53. package/packages/bundled-features/src/{contact → helpdesk}/subject.ts +3 -3
  54. package/packages/bundled-features/src/{contact → helpdesk}/user-data-hooks.ts +17 -17
  55. package/packages/bundled-features/src/helpdesk/web/constants.ts +160 -0
  56. package/packages/bundled-features/src/helpdesk/web/index.ts +29 -0
  57. package/packages/bundled-features/src/host-routing/boot-rules.ts +27 -0
  58. package/packages/bundled-features/src/host-routing/validate-options.ts +36 -27
  59. package/packages/bundled-features/src/jobs/boot-rules.ts +9 -0
  60. package/packages/bundled-features/src/jobs/feature.ts +9 -4
  61. package/packages/bundled-features/src/legal-pages/boot-rules.ts +19 -0
  62. package/packages/bundled-features/src/legal-pages/feature.ts +6 -3
  63. package/packages/bundled-features/src/legal-pages/lib/validate-routes.ts +11 -5
  64. package/packages/bundled-features/src/metrics/boot-rules.ts +15 -0
  65. package/packages/bundled-features/src/metrics/validate.ts +8 -2
  66. package/packages/bundled-features/src/notes-history/boot-rules.ts +9 -0
  67. package/packages/bundled-features/src/notes-history/feature.ts +6 -3
  68. package/packages/bundled-features/src/personal-access-tokens/boot-rules.ts +9 -0
  69. package/packages/bundled-features/src/personal-access-tokens/scope-events-check.ts +6 -3
  70. package/packages/bundled-features/src/presence/boot-rules.ts +9 -0
  71. package/packages/bundled-features/src/presence/options.ts +5 -1
  72. package/packages/bundled-features/src/readiness/boot-rules.ts +14 -0
  73. package/packages/bundled-features/src/readiness/probe-boot-check.ts +8 -6
  74. package/packages/bundled-features/src/shared/assert-no-where-rule-in-ownership-write.ts +6 -4
  75. package/packages/bundled-features/src/shared/boot-rules.ts +9 -0
  76. package/packages/bundled-features/src/subscription-mollie/boot-rules.ts +19 -0
  77. package/packages/bundled-features/src/subscription-mollie/feature.ts +18 -10
  78. package/packages/bundled-features/src/tags/boot-rules.ts +9 -0
  79. package/packages/bundled-features/src/tags/feature.ts +6 -3
  80. package/packages/bundled-features/src/template-resolver/boot-rules.ts +19 -0
  81. package/packages/bundled-features/src/template-resolver/feature.ts +14 -10
  82. package/packages/bundled-features/src/tenant/boot-rules.ts +9 -0
  83. package/packages/bundled-features/src/tenant/feature.ts +5 -3
  84. package/samples/apps/marketing-demo/README.md +1 -1
  85. package/samples/apps/marketing-demo/playwright.config.ts +1 -1
  86. package/samples/apps/marketing-demo/src/app/client.tsx +3 -3
  87. package/samples/apps/marketing-demo/src/app/seed-data.ts +1 -1
  88. package/samples/apps/marketing-demo/src/app/seed.ts +4 -4
  89. package/samples/apps/marketing-demo/src/app/server.ts +3 -3
  90. package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/feature.ts +15 -12
  91. package/samples/apps/marketing-demo/src/features/ticketing/i18n.ts +100 -0
  92. package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/schema/ticket.ts +4 -4
  93. package/samples/apps/marketing-demo/src/features/ticketing/web/index.ts +7 -0
  94. package/samples/apps/use-all-bundled/feature-manifest.json +67 -67
  95. package/samples/apps/use-all-bundled/kumiko/migrations/0064_helpdesk-rename.rebuild.json +4 -0
  96. package/samples/apps/use-all-bundled/package.json +1 -1
  97. package/samples/apps/use-all-bundled/src/app/client.tsx +1 -1
  98. package/samples/apps/use-all-bundled/src/app/screens-feature.ts +10 -10
  99. package/samples/apps/use-all-bundled/src/run-config.ts +6 -6
  100. package/samples/recipes/api-docs/README.md +3 -3
  101. package/samples/recipes/api-docs/api-docs/de/events.md +14 -14
  102. package/samples/recipes/api-docs/api-docs/de/overview.md +3 -3
  103. package/samples/recipes/api-docs/api-docs/de/reference/tickets.md +10 -10
  104. package/samples/recipes/api-docs/api-docs/de/tokens.md +4 -4
  105. package/samples/recipes/api-docs/api-docs/en/events.md +14 -14
  106. package/samples/recipes/api-docs/api-docs/en/overview.md +3 -3
  107. package/samples/recipes/api-docs/api-docs/en/reference/tickets.md +10 -10
  108. package/samples/recipes/api-docs/api-docs/en/tokens.md +4 -4
  109. package/samples/recipes/api-docs/api-docs/index.json +22 -22
  110. package/samples/recipes/api-docs/api-docs/openapi.json +67 -67
  111. package/samples/recipes/api-docs/api-examples/ticket-close.json +1 -1
  112. package/samples/recipes/api-docs/api-examples/ticket-create.json +1 -1
  113. package/samples/recipes/api-docs/api-examples/ticket-detail.json +1 -1
  114. package/samples/recipes/api-docs/api-examples/ticket-list.json +1 -1
  115. package/samples/recipes/api-docs/api-examples/ticket-update.json +1 -1
  116. package/samples/recipes/api-docs/api-examples/webhooks/ticket-closed.json +1 -1
  117. package/samples/recipes/api-docs/kumiko.config.ts +4 -4
  118. package/samples/recipes/api-docs/src/feature.ts +44 -44
  119. package/samples/recipes/golden-path/src/feature.ts +1 -1
  120. package/samples/recipes/helpdesk/README.md +56 -0
  121. package/samples/recipes/{contact → helpdesk}/package.json +2 -2
  122. package/samples/recipes/{contact → helpdesk}/src/feature.ts +11 -8
  123. package/packages/bundled-features/src/contact/client/contact-website-client.ts +0 -29
  124. package/packages/bundled-features/src/contact/client/index.ts +0 -9
  125. package/packages/bundled-features/src/contact/index.ts +0 -29
  126. package/packages/bundled-features/src/contact/panels.ts +0 -28
  127. package/packages/bundled-features/src/contact/web/constants.ts +0 -160
  128. package/packages/bundled-features/src/contact/web/index.ts +0 -29
  129. package/samples/apps/marketing-demo/src/features/helpdesk/i18n.ts +0 -100
  130. package/samples/apps/marketing-demo/src/features/helpdesk/web/index.ts +0 -7
  131. package/samples/recipes/contact/README.md +0 -52
  132. /package/packages/bundled-features/src/{contact → helpdesk}/handlers/access.ts +0 -0
  133. /package/packages/bundled-features/src/{contact → helpdesk}/pow.ts +0 -0
  134. /package/packages/bundled-features/src/{contact → helpdesk}/user-agent.ts +0 -0
  135. /package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/schema/index.ts +0 -0
@@ -1,100 +0,0 @@
1
- // Helpdesk-Feature i18n-Bundle. Gleiche Convention wie assets/.
2
-
3
- import type { TranslationsByLocale } from "@cosmicdrift/kumiko-renderer";
4
-
5
- export const helpdeskTranslations: TranslationsByLocale = {
6
- de: {
7
- "helpdesk:nav.list": "Helpdesk",
8
- "helpdesk:nav.new": "Neues Ticket",
9
- "helpdesk:actions.edit": "Bearbeiten",
10
-
11
- "screen:ticket-list.title": "Helpdesk",
12
- "screen:ticket-edit.title": "Ticket bearbeiten",
13
-
14
- "helpdesk:entity:ticket:field:title": "Titel",
15
- "helpdesk:entity:ticket:field:description": "Beschreibung",
16
- "helpdesk:entity:ticket:field:category": "Kategorie",
17
- "helpdesk:entity:ticket:field:severity": "Schweregrad",
18
- "helpdesk:entity:ticket:field:status": "Status",
19
- "helpdesk:entity:ticket:field:department": "Abteilung",
20
- "helpdesk:entity:ticket:field:assignee": "Zugewiesen an",
21
- "helpdesk:entity:ticket:field:reporter": "Gemeldet von",
22
- "helpdesk:entity:ticket:field:dueDate": "Fällig am",
23
- "helpdesk:entity:ticket:field:spentMinutes": "Aufwand (Min.)",
24
-
25
- "helpdesk:entity:ticket:field:severity:option:low": "Niedrig",
26
- "helpdesk:entity:ticket:field:severity:option:medium": "Mittel",
27
- "helpdesk:entity:ticket:field:severity:option:high": "Hoch",
28
- "helpdesk:entity:ticket:field:severity:option:critical": "Kritisch",
29
-
30
- "helpdesk:entity:ticket:field:status:option:open": "Offen",
31
- "helpdesk:entity:ticket:field:status:option:investigating": "In Bearbeitung",
32
- "helpdesk:entity:ticket:field:status:option:resolved": "Gelöst",
33
- "helpdesk:entity:ticket:field:status:option:closed": "Geschlossen",
34
-
35
- "helpdesk:entity:ticket:field:category:option:hardware": "Hardware",
36
- "helpdesk:entity:ticket:field:category:option:software": "Software",
37
- "helpdesk:entity:ticket:field:category:option:account": "Account",
38
- "helpdesk:entity:ticket:field:category:option:network": "Netzwerk",
39
- "helpdesk:entity:ticket:field:category:option:license": "Lizenz",
40
- "helpdesk:entity:ticket:field:category:option:other": "Sonstiges",
41
-
42
- "helpdesk:entity:ticket:field:department:option:it": "IT",
43
- "helpdesk:entity:ticket:field:department:option:marketing": "Marketing",
44
- "helpdesk:entity:ticket:field:department:option:sales": "Vertrieb",
45
- "helpdesk:entity:ticket:field:department:option:engineering": "Entwicklung",
46
- "helpdesk:entity:ticket:field:department:option:finance": "Finanzen",
47
- "helpdesk:entity:ticket:field:department:option:hr": "Personal",
48
-
49
- "helpdesk:section.ticket": "Ticket",
50
- "helpdesk:section.people": "Personen",
51
- "helpdesk:section.tracking": "Tracking",
52
- },
53
- en: {
54
- "helpdesk:nav.list": "Helpdesk",
55
- "helpdesk:nav.new": "New ticket",
56
- "helpdesk:actions.edit": "Edit",
57
-
58
- "screen:ticket-list.title": "Helpdesk",
59
- "screen:ticket-edit.title": "Edit ticket",
60
-
61
- "helpdesk:entity:ticket:field:title": "Title",
62
- "helpdesk:entity:ticket:field:description": "Description",
63
- "helpdesk:entity:ticket:field:category": "Category",
64
- "helpdesk:entity:ticket:field:severity": "Severity",
65
- "helpdesk:entity:ticket:field:status": "Status",
66
- "helpdesk:entity:ticket:field:department": "Department",
67
- "helpdesk:entity:ticket:field:assignee": "Assignee",
68
- "helpdesk:entity:ticket:field:reporter": "Reporter",
69
- "helpdesk:entity:ticket:field:dueDate": "Due date",
70
- "helpdesk:entity:ticket:field:spentMinutes": "Time spent (min)",
71
-
72
- "helpdesk:entity:ticket:field:severity:option:low": "Low",
73
- "helpdesk:entity:ticket:field:severity:option:medium": "Medium",
74
- "helpdesk:entity:ticket:field:severity:option:high": "High",
75
- "helpdesk:entity:ticket:field:severity:option:critical": "Critical",
76
-
77
- "helpdesk:entity:ticket:field:status:option:open": "Open",
78
- "helpdesk:entity:ticket:field:status:option:investigating": "Investigating",
79
- "helpdesk:entity:ticket:field:status:option:resolved": "Resolved",
80
- "helpdesk:entity:ticket:field:status:option:closed": "Closed",
81
-
82
- "helpdesk:entity:ticket:field:category:option:hardware": "Hardware",
83
- "helpdesk:entity:ticket:field:category:option:software": "Software",
84
- "helpdesk:entity:ticket:field:category:option:account": "Account",
85
- "helpdesk:entity:ticket:field:category:option:network": "Network",
86
- "helpdesk:entity:ticket:field:category:option:license": "License",
87
- "helpdesk:entity:ticket:field:category:option:other": "Other",
88
-
89
- "helpdesk:entity:ticket:field:department:option:it": "IT",
90
- "helpdesk:entity:ticket:field:department:option:marketing": "Marketing",
91
- "helpdesk:entity:ticket:field:department:option:sales": "Sales",
92
- "helpdesk:entity:ticket:field:department:option:engineering": "Engineering",
93
- "helpdesk:entity:ticket:field:department:option:finance": "Finance",
94
- "helpdesk:entity:ticket:field:department:option:hr": "HR",
95
-
96
- "helpdesk:section.ticket": "Ticket",
97
- "helpdesk:section.people": "People",
98
- "helpdesk:section.tracking": "Tracking",
99
- },
100
- };
@@ -1,7 +0,0 @@
1
- import type { ClientFeatureDefinition } from "@cosmicdrift/kumiko-renderer/web";
2
- import { helpdeskTranslations } from "../i18n";
3
-
4
- export const helpdeskClient: ClientFeatureDefinition = {
5
- name: "helpdesk",
6
- translations: helpdeskTranslations,
7
- };
@@ -1,52 +0,0 @@
1
- # Recipe: contact
2
-
3
- Public contact form backend. The `contact` bundled feature stores questions, contact
4
- requests and problem reports from website visitors and notifies every SystemAdmin (mail,
5
- Telegram only when the app turns it on). The notification names only the kind, the app and a link into the inbox:
6
- no name, address, phone, subject or message. Telegram is a third party where nothing can be
7
- shredded or recalled, so it gets the same minimal text. Website senders get a fixed
8
- acknowledgement that repeats nothing they typed; signed-in admin reports get a copy.
9
- SystemAdmins reply from the admin. Phone is off and Telegram is not mounted unless the app
10
- turns them on (`fields.phone`, `telegram: true`).
11
-
12
- **What the recipe demonstrates:**
13
- - Mounting `createContactFeature` with its companions (delivery, user-data-rights, files)
14
- - The anonymous flow: `contact:query:challenge` hands out a proof-of-work challenge,
15
- `contact:write:submit` verifies it; spam gets the same 200 body and stores nothing
16
- - The browser client at `GET /contact/client.js` (`window.KumikoContact.load()` / `submit()`)
17
-
18
- ## Layout
19
-
20
- ```
21
- samples/recipes/contact/
22
- ├── package.json
23
- ├── README.md
24
- └── src/
25
- ├── feature.ts # createContactFeature options
26
- └── __tests__/
27
- └── feature.integration.test.ts # challenge query + client route
28
- ```
29
-
30
- The behavior (submit, silent drops, replies, Telegram, GDPR export and erasure, retention) is
31
- covered by the integration tests next to the feature in
32
- `packages/bundled-features/src/contact/__tests__/`.
33
-
34
- ## Run tests
35
-
36
- ```bash
37
- bun test --config=bunfig.integration.toml samples/recipes/contact
38
- ```
39
-
40
- ## Integration into a real app
41
-
42
- 1. Mount `createContactFeature({ appName })` plus delivery, a mail channel, `user-data-rights`,
43
- `files` with a file provider and `config`.
44
- 2. Run `kumiko schema generate` (new tables, plus the delivery `idempotency_key` column).
45
- 3. SystemAdmins set `contact:config:reply-to` in the admin.
46
- 4. Embed `/contact/client.js` on the website; the form is yours. A website served by another
47
- server can serve the same script from `CONTACT_CLIENT_SOURCE` and type its calls with
48
- `ContactWebsiteClient`, both from `@cosmicdrift/kumiko-bundled-features/contact/client`.
49
-
50
- Telegram is optional and off by default: notifications go by mail to SystemAdmins only. An app
51
- that turns it on (`telegram: true`) also mounts `channel-telegram` and `secrets` for the bot
52
- token, and SystemAdmins set `contact:config:telegram-chat`.