@cosmicdrift/kumiko-bundled-features 0.412.0 → 0.413.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 (166) hide show
  1. package/dist/admin-shell/feature.d.ts +1 -1
  2. package/dist/agent-tools/api-docs/anchors.js +1 -1
  3. package/dist/auth-email-password/boot-rules.d.ts +7 -0
  4. package/dist/auth-email-password/boot-rules.js +7 -0
  5. package/dist/auth-email-password/feature.js +6 -13
  6. package/dist/auth-email-password/validate-options.d.ts +5 -0
  7. package/dist/auth-email-password/validate-options.js +15 -0
  8. package/dist/billing-foundation/boot-rules.d.ts +22 -0
  9. package/dist/billing-foundation/boot-rules.js +22 -0
  10. package/dist/billing-foundation/validate-options.js +56 -18
  11. package/dist/cap-overview/boot-rules.d.ts +12 -0
  12. package/dist/cap-overview/boot-rules.js +12 -0
  13. package/dist/cap-overview/feature.js +8 -3
  14. package/dist/documents/boot-rules.d.ts +12 -0
  15. package/dist/documents/boot-rules.js +12 -0
  16. package/dist/documents/feature.js +8 -3
  17. package/dist/file-derivatives/boot-rules.d.ts +7 -0
  18. package/dist/file-derivatives/boot-rules.js +7 -0
  19. package/dist/file-derivatives/feature.js +5 -2
  20. package/dist/folders/boot-rules.d.ts +7 -0
  21. package/dist/folders/boot-rules.js +7 -0
  22. package/dist/folders/feature.js +8 -5
  23. package/dist/helpdesk/boot-rules.d.ts +7 -0
  24. package/dist/helpdesk/boot-rules.js +7 -0
  25. package/dist/{contact → helpdesk}/challenge.js +2 -2
  26. package/dist/helpdesk/client/helpdesk-client-source.d.ts +1 -0
  27. package/dist/{contact/client/contact-client-source.js → helpdesk/client/helpdesk-client-source.js} +4 -4
  28. package/dist/helpdesk/client/helpdesk-website-client.d.ts +26 -0
  29. package/dist/helpdesk/client/index.d.ts +2 -0
  30. package/dist/helpdesk/client/index.js +1 -0
  31. package/dist/{contact → helpdesk}/entity.d.ts +6 -6
  32. package/dist/{contact → helpdesk}/entity.js +31 -27
  33. package/dist/helpdesk/feature.d.ts +3 -0
  34. package/dist/{contact → helpdesk}/feature.js +43 -39
  35. package/dist/{contact → helpdesk}/handlers/attempts.d.ts +2 -2
  36. package/dist/helpdesk/handlers/challenge.query.d.ts +9 -0
  37. package/dist/{contact → helpdesk}/handlers/challenge.query.js +5 -5
  38. package/dist/helpdesk/handlers/forward-request.write.d.ts +9 -0
  39. package/dist/{contact → helpdesk}/handlers/forward-request.write.js +17 -15
  40. package/dist/{contact → helpdesk}/handlers/mark-done.write.d.ts +2 -2
  41. package/dist/{contact → helpdesk}/handlers/mark-done.write.js +8 -8
  42. package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.d.ts +2 -2
  43. package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.js +11 -11
  44. package/dist/{contact → helpdesk}/handlers/open-count.js +2 -2
  45. package/dist/{contact → helpdesk}/handlers/open-count.query.js +4 -4
  46. package/dist/{contact → helpdesk}/handlers/replies.query.js +6 -6
  47. package/dist/{contact → helpdesk}/handlers/reply.write.d.ts +4 -4
  48. package/dist/{contact → helpdesk}/handlers/reply.write.js +16 -16
  49. package/dist/helpdesk/handlers/report.write.d.ts +16 -0
  50. package/dist/{contact → helpdesk}/handlers/report.write.js +17 -17
  51. package/dist/helpdesk/handlers/request-delivery.query.d.ts +16 -0
  52. package/dist/{contact → helpdesk}/handlers/request-delivery.query.js +24 -24
  53. package/dist/{contact → helpdesk}/handlers/request-detail.query.d.ts +3 -3
  54. package/dist/{contact → helpdesk}/handlers/request-detail.query.js +10 -10
  55. package/dist/{contact → helpdesk}/handlers/request-list.query.js +2 -2
  56. package/dist/helpdesk/handlers/send-reply-mail.write.d.ts +8 -0
  57. package/dist/{contact → helpdesk}/handlers/send-reply-mail.write.js +15 -15
  58. package/dist/helpdesk/handlers/send-test.write.d.ts +5 -0
  59. package/dist/{contact → helpdesk}/handlers/send-test.write.js +10 -10
  60. package/dist/{contact → helpdesk}/handlers/submit.write.d.ts +4 -4
  61. package/dist/{contact → helpdesk}/handlers/submit.write.js +17 -17
  62. package/dist/{contact → helpdesk}/handlers/take-over-uploads.js +5 -5
  63. package/dist/{contact → helpdesk}/i18n.d.ts +1 -1
  64. package/dist/{contact → helpdesk}/i18n.js +78 -75
  65. package/dist/helpdesk/index.d.ts +5 -0
  66. package/dist/helpdesk/index.js +4 -0
  67. package/dist/{contact → helpdesk}/lib.d.ts +5 -5
  68. package/dist/{contact → helpdesk}/lib.js +16 -16
  69. package/dist/{contact → helpdesk}/mail.d.ts +20 -20
  70. package/dist/{contact → helpdesk}/mail.js +47 -47
  71. package/dist/{contact → helpdesk}/options.d.ts +6 -6
  72. package/dist/helpdesk/options.js +36 -0
  73. package/dist/helpdesk/panels.d.ts +2 -0
  74. package/dist/helpdesk/panels.js +21 -0
  75. package/dist/{contact → helpdesk}/payloads.d.ts +11 -11
  76. package/dist/{contact → helpdesk}/payloads.js +28 -28
  77. package/dist/helpdesk/screens.d.ts +5 -0
  78. package/dist/{contact → helpdesk}/screens.js +87 -87
  79. package/dist/{contact → helpdesk}/subject.js +3 -3
  80. package/dist/helpdesk/user-data-hooks.d.ts +3 -0
  81. package/dist/{contact → helpdesk}/user-data-hooks.js +15 -15
  82. package/dist/helpdesk/web/constants.d.ts +127 -0
  83. package/dist/helpdesk/web/constants.js +126 -0
  84. package/dist/helpdesk/web/index.d.ts +1 -0
  85. package/dist/helpdesk/web/index.js +1 -0
  86. package/dist/host-routing/boot-rules.d.ts +22 -0
  87. package/dist/host-routing/boot-rules.js +22 -0
  88. package/dist/host-routing/validate-options.js +35 -11
  89. package/dist/jobs/boot-rules.d.ts +7 -0
  90. package/dist/jobs/boot-rules.js +7 -0
  91. package/dist/jobs/feature.js +5 -2
  92. package/dist/legal-pages/boot-rules.d.ts +17 -0
  93. package/dist/legal-pages/boot-rules.js +17 -0
  94. package/dist/legal-pages/feature.js +5 -2
  95. package/dist/legal-pages/lib/validate-routes.js +11 -3
  96. package/dist/metrics/boot-rules.d.ts +12 -0
  97. package/dist/metrics/boot-rules.js +12 -0
  98. package/dist/metrics/validate.js +8 -2
  99. package/dist/notes-history/boot-rules.d.ts +7 -0
  100. package/dist/notes-history/boot-rules.js +7 -0
  101. package/dist/notes-history/feature.js +7 -4
  102. package/dist/personal-access-tokens/boot-rules.d.ts +7 -0
  103. package/dist/personal-access-tokens/boot-rules.js +7 -0
  104. package/dist/personal-access-tokens/scope-events-check.js +7 -4
  105. package/dist/presence/boot-rules.d.ts +7 -0
  106. package/dist/presence/boot-rules.js +7 -0
  107. package/dist/presence/options.js +5 -1
  108. package/dist/readiness/boot-rules.d.ts +12 -0
  109. package/dist/readiness/boot-rules.js +12 -0
  110. package/dist/readiness/probe-boot-check.js +8 -3
  111. package/dist/shared/assert-no-where-rule-in-ownership-write.d.ts +1 -1
  112. package/dist/shared/assert-no-where-rule-in-ownership-write.js +11 -7
  113. package/dist/shared/boot-rules.d.ts +7 -0
  114. package/dist/shared/boot-rules.js +7 -0
  115. package/dist/subscription-mollie/boot-rules.d.ts +17 -0
  116. package/dist/subscription-mollie/boot-rules.js +17 -0
  117. package/dist/subscription-mollie/feature.js +13 -6
  118. package/dist/tags/boot-rules.d.ts +7 -0
  119. package/dist/tags/boot-rules.js +7 -0
  120. package/dist/tags/feature.js +8 -5
  121. package/dist/template-resolver/boot-rules.d.ts +17 -0
  122. package/dist/template-resolver/boot-rules.js +17 -0
  123. package/dist/template-resolver/feature.js +14 -5
  124. package/dist/tenant/boot-rules.d.ts +7 -0
  125. package/dist/tenant/boot-rules.js +7 -0
  126. package/dist/tenant/feature.js +5 -2
  127. package/kumiko-es-tables.json +4 -4
  128. package/package.json +29 -29
  129. package/src/{contact → helpdesk}/changes.json +6 -0
  130. package/dist/contact/client/contact-client-source.d.ts +0 -1
  131. package/dist/contact/client/contact-website-client.d.ts +0 -26
  132. package/dist/contact/client/index.d.ts +0 -2
  133. package/dist/contact/client/index.js +0 -1
  134. package/dist/contact/feature.d.ts +0 -3
  135. package/dist/contact/handlers/challenge.query.d.ts +0 -9
  136. package/dist/contact/handlers/forward-request.write.d.ts +0 -9
  137. package/dist/contact/handlers/report.write.d.ts +0 -16
  138. package/dist/contact/handlers/request-delivery.query.d.ts +0 -16
  139. package/dist/contact/handlers/send-reply-mail.write.d.ts +0 -8
  140. package/dist/contact/handlers/send-test.write.d.ts +0 -5
  141. package/dist/contact/index.d.ts +0 -5
  142. package/dist/contact/index.js +0 -4
  143. package/dist/contact/options.js +0 -32
  144. package/dist/contact/panels.d.ts +0 -2
  145. package/dist/contact/panels.js +0 -21
  146. package/dist/contact/screens.d.ts +0 -5
  147. package/dist/contact/user-data-hooks.d.ts +0 -3
  148. package/dist/contact/web/constants.d.ts +0 -127
  149. package/dist/contact/web/constants.js +0 -126
  150. package/dist/contact/web/index.d.ts +0 -1
  151. package/dist/contact/web/index.js +0 -1
  152. /package/dist/{contact → helpdesk}/challenge.d.ts +0 -0
  153. /package/dist/{contact/client/contact-website-client.js → helpdesk/client/helpdesk-website-client.js} +0 -0
  154. /package/dist/{contact → helpdesk}/handlers/access.d.ts +0 -0
  155. /package/dist/{contact → helpdesk}/handlers/access.js +0 -0
  156. /package/dist/{contact → helpdesk}/handlers/attempts.js +0 -0
  157. /package/dist/{contact → helpdesk}/handlers/open-count.d.ts +0 -0
  158. /package/dist/{contact → helpdesk}/handlers/open-count.query.d.ts +0 -0
  159. /package/dist/{contact → helpdesk}/handlers/replies.query.d.ts +0 -0
  160. /package/dist/{contact → helpdesk}/handlers/request-list.query.d.ts +0 -0
  161. /package/dist/{contact → helpdesk}/handlers/take-over-uploads.d.ts +0 -0
  162. /package/dist/{contact → helpdesk}/pow.d.ts +0 -0
  163. /package/dist/{contact → helpdesk}/pow.js +0 -0
  164. /package/dist/{contact → helpdesk}/subject.d.ts +0 -0
  165. /package/dist/{contact → helpdesk}/user-agent.d.ts +0 -0
  166. /package/dist/{contact → helpdesk}/user-agent.js +0 -0
@@ -4,14 +4,14 @@ import { InternalError, isKumikoError, UnprocessableError, writeFailure, } from
4
4
  import { normalizePayloadBucketValue } from "@cosmicdrift/kumiko-framework/pipeline";
5
5
  import { generateId } from "@cosmicdrift/kumiko-framework/utils";
6
6
  import { consumeChallenge } from "../challenge.js";
7
- import { contactDb, normalizeEmail, phoneProblem, platformActor, requestExecutor, sendBestEffort, } from "../lib.js";
8
- import { contactAcknowledgementVariables, resolveContactMailLocale } from "../mail.js";
7
+ import { helpdeskDb, normalizeEmail, phoneProblem, platformActor, requestExecutor, sendBestEffort, } from "../lib.js";
8
+ import { helpdeskAcknowledgementVariables, resolveHelpdeskMailLocale } from "../mail.js";
9
9
  import { DEFAULT_SUBMIT_EMAIL_RATE_LIMITS, DEFAULT_SUBMIT_RATE_LIMIT, } from "../options.js";
10
- import { ContactSubmitSchema } from "../payloads.js";
10
+ import { HelpdeskSubmitSchema } from "../payloads.js";
11
11
  import { verifyProofOfWork } from "../pow.js";
12
12
  import { deriveSubjectFromMessage } from "../subject.js";
13
13
  import { summarizeUserAgent } from "../user-agent.js";
14
- import { CONTACT_NOTIFICATION_TYPES, CONTACT_SOURCE, CONTACT_STATUS, ContactHandlers, contactIdempotencyKeys, } from "../web/constants.js";
14
+ import { HELPDESK_NOTIFICATION_TYPES, HELPDESK_SOURCE, HELPDESK_STATUS, HelpdeskHandlers, helpdeskIdempotencyKeys, } from "../web/constants.js";
15
15
  import { SUBMIT_ROLES } from "./access.js";
16
16
  // Identical body for stored and silently dropped submits, so a bot learns nothing from it.
17
17
  const SUBMITTED = {
@@ -31,7 +31,7 @@ async function findDropReason(payload, ctx, settings) {
31
31
  const redis = ctx.services.redis;
32
32
  if (!redis) {
33
33
  throw new InternalError({
34
- message: "contact:submit requires ctx.services.redis for the challenge store",
34
+ message: "helpdesk:submit requires ctx.services.redis for the challenge store",
35
35
  });
36
36
  }
37
37
  const issued = await consumeChallenge(redis, payload.challenge);
@@ -53,11 +53,11 @@ async function enforceEmailLimits(ctx, payload, limits) {
53
53
  const { rateLimit } = ctx.services;
54
54
  if (!rateLimit || !ctx.rateLimitDigest) {
55
55
  throw new InternalError({
56
- message: "contact:submit declares an email rate limit but no rate limiter or digest is wired",
56
+ message: "helpdesk:submit declares an email rate limit but no rate limiter or digest is wired",
57
57
  });
58
58
  }
59
59
  const requests = limits.map(({ per, limit, windowSeconds, cost, normalize }) => ({
60
- bucket: `contact-submit:${per.payloadField}:${ctx.rateLimitDigest?.(normalizePayloadBucketValue(payload.email, normalize))}`,
60
+ bucket: `helpdesk-submit:${per.payloadField}:${ctx.rateLimitDigest?.(normalizePayloadBucketValue(payload.email, normalize))}`,
61
61
  config: { limit, windowSeconds, ...(cost !== undefined && { cost }) },
62
62
  }));
63
63
  try {
@@ -74,7 +74,7 @@ export function createSubmitHandler(opts, settings) {
74
74
  const emailRateLimits = opts.emailRateLimits ?? DEFAULT_SUBMIT_EMAIL_RATE_LIMITS;
75
75
  return defineWriteHandler({
76
76
  name: "submit",
77
- schema: ContactSubmitSchema,
77
+ schema: HelpdeskSubmitSchema,
78
78
  access: { roles: SUBMIT_ROLES, personalData: "public-intake", anySignedIn: true },
79
79
  rateLimit: opts.rateLimit ?? DEFAULT_SUBMIT_RATE_LIMIT,
80
80
  agent: { expose: false },
@@ -83,7 +83,7 @@ export function createSubmitHandler(opts, settings) {
83
83
  const payload = event.payload;
84
84
  const dropReason = await findDropReason(payload, ctx, settings);
85
85
  if (dropReason !== null) {
86
- ctx.obs.log?.info("[contact:submit] dropped", { reason: dropReason });
86
+ ctx.obs.log?.info("[helpdesk:submit] dropped", { reason: dropReason });
87
87
  return SUBMITTED;
88
88
  }
89
89
  // Before the email limit, so a mistyped phone number does not use up the sender's quota.
@@ -99,8 +99,8 @@ export function createSubmitHandler(opts, settings) {
99
99
  const created = await requestExecutor.create({
100
100
  id: requestId,
101
101
  kind: payload.kind,
102
- status: CONTACT_STATUS.Open,
103
- source: CONTACT_SOURCE.Website,
102
+ status: HELPDESK_STATUS.Open,
103
+ source: HELPDESK_SOURCE.Website,
104
104
  subject: deriveSubjectFromMessage(payload.message),
105
105
  message: payload.message,
106
106
  name: payload.name,
@@ -112,24 +112,24 @@ export function createSubmitHandler(opts, settings) {
112
112
  submittedAt: ctx.tz.now(),
113
113
  fileCount: 0,
114
114
  replyCount: 0,
115
- }, platformActor(), contactDb(ctx));
115
+ }, platformActor(), helpdeskDb(ctx));
116
116
  if (!created.isSuccess)
117
117
  return created;
118
118
  await sendBestEffort(ctx, "forward request", async () => {
119
- const forwarded = await ctx.dispatch.writeAs(platformActor(), ContactHandlers.forwardRequest, { requestId });
119
+ const forwarded = await ctx.dispatch.writeAs(platformActor(), HelpdeskHandlers.forwardRequest, { requestId });
120
120
  if (!forwarded.isSuccess)
121
121
  throw new Error(forwarded.error.message);
122
122
  });
123
- await sendBestEffort(ctx, "confirmation mail", (notify) => notify(CONTACT_NOTIFICATION_TYPES.acknowledgement, {
123
+ await sendBestEffort(ctx, "confirmation mail", (notify) => notify(HELPDESK_NOTIFICATION_TYPES.acknowledgement, {
124
124
  route: { email },
125
125
  recipientId: requestId,
126
- data: contactAcknowledgementVariables({
126
+ data: helpdeskAcknowledgementVariables({
127
127
  appName: opts.appName,
128
128
  locale: payload.locale,
129
129
  }),
130
- idempotencyKey: contactIdempotencyKeys.confirmation(requestId),
130
+ idempotencyKey: helpdeskIdempotencyKeys.confirmation(requestId),
131
131
  priority: "normal",
132
- locale: resolveContactMailLocale(payload.locale),
132
+ locale: resolveHelpdeskMailLocale(payload.locale),
133
133
  }));
134
134
  return SUBMITTED;
135
135
  },
@@ -1,13 +1,13 @@
1
1
  import { SYSTEM_TENANT_ID, } from "@cosmicdrift/kumiko-framework/engine";
2
2
  import { copyPendingFileRefsToTenant } from "@cosmicdrift/kumiko-framework/files";
3
3
  import { fileContextForTenant } from "../../file-foundation/index.js";
4
- import { contactDb, platformActor } from "../lib.js";
5
- import { CONTACT_UPLOAD_FIELD } from "../web/constants.js";
4
+ import { helpdeskDb, platformActor } from "../lib.js";
5
+ import { HELPDESK_UPLOAD_FIELD } from "../web/constants.js";
6
6
  // The form uploads into the submitter's tenant; the request or reply lives in the system tenant.
7
7
  export async function takeOverUploads(ctx, args) {
8
8
  if (args.fileIds.length === 0)
9
9
  return { isSuccess: true, data: [] };
10
- const db = contactDb(ctx);
10
+ const db = helpdeskDb(ctx);
11
11
  const submitterTenantId = args.user.tenantId;
12
12
  return copyPendingFileRefsToTenant({
13
13
  source: {
@@ -15,7 +15,7 @@ export async function takeOverUploads(ctx, args) {
15
15
  user: args.user,
16
16
  files: fileContextForTenant(ctx, submitterTenantId, submitterTenantId),
17
17
  entityType: args.screen,
18
- fieldName: CONTACT_UPLOAD_FIELD,
18
+ fieldName: HELPDESK_UPLOAD_FIELD,
19
19
  },
20
20
  target: {
21
21
  db,
@@ -24,7 +24,7 @@ export async function takeOverUploads(ctx, args) {
24
24
  files: fileContextForTenant(ctx, submitterTenantId, SYSTEM_TENANT_ID),
25
25
  attachTo: {
26
26
  entityType: args.entityType,
27
- fieldName: CONTACT_UPLOAD_FIELD,
27
+ fieldName: HELPDESK_UPLOAD_FIELD,
28
28
  entityId: args.entityId,
29
29
  },
30
30
  },
@@ -2,5 +2,5 @@ type LocalizedString = {
2
2
  readonly en: string;
3
3
  readonly de: string;
4
4
  };
5
- export declare function createContactI18n(): Readonly<Record<string, LocalizedString>>;
5
+ export declare function createHelpdeskI18n(): Readonly<Record<string, LocalizedString>>;
6
6
  export {};
@@ -1,52 +1,52 @@
1
- const DELIVERY_FIELD = "contact:entity:contact-delivery:field";
2
- const REQUEST_FIELD = "contact:entity:contact-request:field";
3
- const REPLY_ENTITY_FIELD = "contact:entity:contact-reply:field";
1
+ const DELIVERY_FIELD = "helpdesk:entity:helpdesk-delivery:field";
2
+ const REQUEST_FIELD = "helpdesk:entity:helpdesk-request:field";
3
+ const REPLY_ENTITY_FIELD = "helpdesk:entity:helpdesk-reply:field";
4
4
  // Option labels of an actionForm select resolve against the renderer's pseudo-entity, not a real one.
5
- const FORM_FIELD = "contact:entity:__action-form__:field";
6
- export function createContactI18n() {
5
+ const FORM_FIELD = "helpdesk:entity:__action-form__:field";
6
+ export function createHelpdeskI18n() {
7
7
  return {
8
- "contact:feature.label": { en: "Contact", de: "Kontakt" },
9
- "contact:notify.new-request.label": { en: "New contact request", de: "Neue Meldung" },
10
- "contact:notify.confirmation.label": {
8
+ "helpdesk:feature.label": { en: "Contact", de: "Kontakt" },
9
+ "helpdesk:notify.new-request.label": { en: "New contact request", de: "Neue Meldung" },
10
+ "helpdesk:notify.confirmation.label": {
11
11
  en: "Contact confirmation",
12
12
  de: "Bestätigung der Meldung",
13
13
  },
14
- "contact:notify.acknowledgement.label": {
14
+ "helpdesk:notify.acknowledgement.label": {
15
15
  en: "Contact acknowledgement",
16
16
  de: "Eingangsbestätigung der Meldung",
17
17
  },
18
- "contact:notify.reply.label": {
18
+ "helpdesk:notify.reply.label": {
19
19
  en: "Reply to a contact request",
20
20
  de: "Antwort auf eine Meldung",
21
21
  },
22
- "contact:notify.reply-in-app.label": {
22
+ "helpdesk:notify.reply-in-app.label": {
23
23
  en: "Reply note in the app",
24
24
  de: "Hinweis auf eine Antwort in der App",
25
25
  },
26
- "contact:notify.test.label": { en: "Contact test message", de: "Testnachricht Kontakt" },
27
- "contact:report.submit": { en: "Send report", de: "Meldung senden" },
28
- "contact:reply.submit": { en: "Send reply", de: "Antwort senden" },
29
- "contact:overview.open": { en: "Open requests", de: "Offene Meldungen" },
30
- "contact:filter.open": { en: "Open", de: "Offen" },
31
- "contact:config.reply-to.label": { en: "Reply-To address", de: "Antwortadresse" },
32
- "contact:config.telegram-chat.label": { en: "Chat id or @channel", de: "Chat-ID oder @Kanal" },
33
- "contact:entity:contact-request:field:kind": { en: "Kind", de: "Art" },
34
- "contact:entity:contact-request:field:status": { en: "Status", de: "Status" },
35
- "contact:entity:contact-request:field:source": { en: "Source", de: "Quelle" },
36
- "contact:entity:contact-request:field:subject": { en: "Subject", de: "Betreff" },
37
- "contact:entity:contact-request:field:message": { en: "Message", de: "Nachricht" },
38
- "contact:entity:contact-request:field:name": { en: "Name", de: "Name" },
39
- "contact:entity:contact-request:field:email": { en: "Email", de: "E-Mail" },
40
- "contact:entity:contact-request:field:phone": { en: "Phone", de: "Telefon" },
41
- "contact:entity:contact-request:field:submittedAt": { en: "Received", de: "Eingang" },
42
- "contact:entity:contact-request:field:answeredAt": { en: "Answered", de: "Beantwortet" },
43
- "contact:entity:contact-request:field:closedAt": { en: "Closed", de: "Abgeschlossen" },
44
- "contact:entity:contact-request:field:replyCount": { en: "Replies", de: "Antworten" },
45
- "contact:report.hint": {
26
+ "helpdesk:notify.test.label": { en: "Contact test message", de: "Testnachricht Kontakt" },
27
+ "helpdesk:report.submit": { en: "Send report", de: "Meldung senden" },
28
+ "helpdesk:reply.submit": { en: "Send reply", de: "Antwort senden" },
29
+ "helpdesk:overview.open": { en: "Open requests", de: "Offene Meldungen" },
30
+ "helpdesk:filter.open": { en: "Open", de: "Offen" },
31
+ "helpdesk:config.reply-to.label": { en: "Reply-To address", de: "Antwortadresse" },
32
+ "helpdesk:config.telegram-chat.label": { en: "Chat id or @channel", de: "Chat-ID oder @Kanal" },
33
+ "helpdesk:entity:helpdesk-request:field:kind": { en: "Kind", de: "Art" },
34
+ "helpdesk:entity:helpdesk-request:field:status": { en: "Status", de: "Status" },
35
+ "helpdesk:entity:helpdesk-request:field:source": { en: "Source", de: "Quelle" },
36
+ "helpdesk:entity:helpdesk-request:field:subject": { en: "Subject", de: "Betreff" },
37
+ "helpdesk:entity:helpdesk-request:field:message": { en: "Message", de: "Nachricht" },
38
+ "helpdesk:entity:helpdesk-request:field:name": { en: "Name", de: "Name" },
39
+ "helpdesk:entity:helpdesk-request:field:email": { en: "Email", de: "E-Mail" },
40
+ "helpdesk:entity:helpdesk-request:field:phone": { en: "Phone", de: "Telefon" },
41
+ "helpdesk:entity:helpdesk-request:field:submittedAt": { en: "Received", de: "Eingang" },
42
+ "helpdesk:entity:helpdesk-request:field:answeredAt": { en: "Answered", de: "Beantwortet" },
43
+ "helpdesk:entity:helpdesk-request:field:closedAt": { en: "Closed", de: "Abgeschlossen" },
44
+ "helpdesk:entity:helpdesk-request:field:replyCount": { en: "Replies", de: "Antworten" },
45
+ "helpdesk:report.hint": {
46
46
  en: "Goes straight to the {appName} team",
47
47
  de: "Geht direkt an das Team von {appName}",
48
48
  },
49
- "contact:config.send-test.description": {
49
+ "helpdesk:config.send-test.description": {
50
50
  en: "Now sends a test message to the chat.",
51
51
  de: "Schickt jetzt eine Testnachricht an den Chat.",
52
52
  },
@@ -56,24 +56,24 @@ export function createContactI18n() {
56
56
  "screen:reply.title": { en: "Reply", de: "Antworten" },
57
57
  "screen:reply-mail.title": { en: "Reply", de: "Antworten" },
58
58
  "screen:forwarding.title": { en: "Forwarding of requests", de: "Weiterleitung von Meldungen" },
59
- "contact:report.summary": {
59
+ "helpdesk:report.summary": {
60
60
  en: "The answer comes by email to your account address, usually the same working day.",
61
61
  de: "Die Antwort kommt per Mail an die Adresse deines Kontos, meist am selben Werktag.",
62
62
  },
63
- "contact:report.section": { en: "Your report", de: "Deine Meldung" },
64
- "contact:report.section.description": {
63
+ "helpdesk:report.section": { en: "Your report", de: "Deine Meldung" },
64
+ "helpdesk:report.section.description": {
65
65
  en: "We attach account, tenant, app version and browser automatically.",
66
66
  de: "Konto, Mandant, App-Version und Browser hängen wir automatisch an.",
67
67
  },
68
- "contact:report.success": {
68
+ "helpdesk:report.success": {
69
69
  en: "Thanks, your report has arrived. The answer comes by email.",
70
70
  de: "Danke, deine Meldung ist angekommen. Die Antwort kommt per Mail.",
71
71
  },
72
- "contact:report.field.kind": { en: "Kind", de: "Art" },
73
- "contact:report.field.phone": { en: "Phone", de: "Telefon" },
74
- "contact:report.field.subject": { en: "Subject", de: "Betreff" },
75
- "contact:report.field.message": { en: "What happened?", de: "Was ist passiert?" },
76
- "contact:report.field.files": { en: "Files", de: "Dateien" },
72
+ "helpdesk:report.field.kind": { en: "Kind", de: "Art" },
73
+ "helpdesk:report.field.phone": { en: "Phone", de: "Telefon" },
74
+ "helpdesk:report.field.subject": { en: "Subject", de: "Betreff" },
75
+ "helpdesk:report.field.message": { en: "What happened?", de: "Was ist passiert?" },
76
+ "helpdesk:report.field.files": { en: "Files", de: "Dateien" },
77
77
  [`${FORM_FIELD}:name`]: { en: "Reporter", de: "Absender" },
78
78
  [`${FORM_FIELD}:email`]: { en: "Email", de: "E-Mail" },
79
79
  [`${FORM_FIELD}:replyTo`]: { en: "Replies go to", de: "Rückantworten an" },
@@ -81,40 +81,40 @@ export function createContactI18n() {
81
81
  [`${FORM_FIELD}:kind:option:question`]: { en: "Question", de: "Frage" },
82
82
  [`${FORM_FIELD}:kind:option:bug`]: { en: "Bug", de: "Fehler" },
83
83
  [`${FORM_FIELD}:kind:option:wish`]: { en: "Wish", de: "Wunsch" },
84
- "contact:reply.title": { en: "To {name}", de: "An {name}" },
85
- "contact:reply.summary.in-app": {
84
+ "helpdesk:reply.title": { en: "To {name}", de: "An {name}" },
85
+ "helpdesk:reply.summary.in-app": {
86
86
  en: "By email to {email} and in the app. Replies go to {replyTo}.",
87
87
  de: "Per E-Mail an {email} und in der App. Rückantworten gehen an {replyTo}.",
88
88
  },
89
- "contact:reply.summary.mail": {
89
+ "helpdesk:reply.summary.mail": {
90
90
  en: "By email to {email}. Replies go to {replyTo}.",
91
91
  de: "Per E-Mail an {email}. Rückantworten gehen an {replyTo}.",
92
92
  },
93
- "contact:reply.section": { en: "Reply", de: "Antwort" },
94
- "contact:reply.section.description": {
93
+ "helpdesk:reply.section": { en: "Reply", de: "Antwort" },
94
+ "helpdesk:reply.section.description": {
95
95
  en: "The request is quoted below in the mail.",
96
96
  de: "Die Meldung wird unten in der Mail zitiert.",
97
97
  },
98
- "contact:reply.field.message": { en: "Message", de: "Nachricht" },
99
- "contact:reply.field.files": { en: "Files", de: "Dateien" },
100
- "contact:reply.field.mark-done": {
98
+ "helpdesk:reply.field.message": { en: "Message", de: "Nachricht" },
99
+ "helpdesk:reply.field.files": { en: "Files", de: "Dateien" },
100
+ "helpdesk:reply.field.mark-done": {
101
101
  en: "Mark the request as done afterwards",
102
102
  de: "Meldung danach als erledigt markieren",
103
103
  },
104
- "contact:filter.all": { en: "All", de: "Alle" },
105
- "contact:list.from": { en: "From", de: "Von" },
106
- "contact:action.open": { en: "Open", de: "Öffnen" },
107
- "contact:action.mark-done": { en: "Mark as done", de: "Als erledigt markieren" },
108
- "contact:action.reply": { en: "Reply", de: "Antworten" },
109
- "contact:detail.attachments": { en: "Attachments", de: "Anhänge" },
110
- "contact:detail.section.message": { en: "Request", de: "Anliegen" },
111
- "contact:detail.section.replies": { en: "Replies", de: "Antworten" },
112
- "contact:detail.section.files": { en: "Files", de: "Dateien" },
113
- "contact:detail.section.sender": { en: "Sender", de: "Absender" },
114
- "contact:detail.section.origin": { en: "Origin", de: "Herkunft" },
115
- "contact:detail.section.delivery": { en: "Delivery", de: "Zustellung" },
116
- "contact:detail.delivery-log": { en: "Delivery log", de: "Zustellprotokoll" },
117
- "contact:detail.section.notes": { en: "Notes", de: "Notizen" },
104
+ "helpdesk:filter.all": { en: "All", de: "Alle" },
105
+ "helpdesk:list.from": { en: "From", de: "Von" },
106
+ "helpdesk:action.open": { en: "Open", de: "Öffnen" },
107
+ "helpdesk:action.mark-done": { en: "Mark as done", de: "Als erledigt markieren" },
108
+ "helpdesk:action.reply": { en: "Reply", de: "Antworten" },
109
+ "helpdesk:detail.attachments": { en: "Attachments", de: "Anhänge" },
110
+ "helpdesk:detail.section.message": { en: "Request", de: "Anliegen" },
111
+ "helpdesk:detail.section.replies": { en: "Replies", de: "Antworten" },
112
+ "helpdesk:detail.section.files": { en: "Files", de: "Dateien" },
113
+ "helpdesk:detail.section.sender": { en: "Sender", de: "Absender" },
114
+ "helpdesk:detail.section.origin": { en: "Origin", de: "Herkunft" },
115
+ "helpdesk:detail.section.delivery": { en: "Delivery", de: "Zustellung" },
116
+ "helpdesk:detail.delivery-log": { en: "Delivery log", de: "Zustellprotokoll" },
117
+ "helpdesk:detail.section.notes": { en: "Notes", de: "Notizen" },
118
118
  [`${REQUEST_FIELD}:reporterTenantName`]: { en: "Tenant", de: "Mandant" },
119
119
  [`${REQUEST_FIELD}:reporterTenantPlan`]: { en: "Tenant plan", de: "Plan des Mandanten" },
120
120
  [`${REQUEST_FIELD}:fileCount`]: { en: "Files", de: "Dateien" },
@@ -134,33 +134,36 @@ export function createContactI18n() {
134
134
  [`${REPLY_ENTITY_FIELD}:sentAt`]: { en: "Sent", de: "Gesendet" },
135
135
  [`${REPLY_ENTITY_FIELD}:authorName`]: { en: "From", de: "Von" },
136
136
  [`${REPLY_ENTITY_FIELD}:message`]: { en: "Message", de: "Nachricht" },
137
- "contact:forwarding.email": { en: "Email", de: "E-Mail" },
138
- "contact:forwarding.email.description": {
137
+ "helpdesk:forwarding.email": { en: "Email", de: "E-Mail" },
138
+ "helpdesk:forwarding.email.description": {
139
139
  en: "Every new request goes by email to all SystemAdmins of this app. Turning it off per person goes through delivery; there is no screen for that yet.",
140
140
  de: "Jede neue Meldung geht per Mail an alle SystemAdmins dieser App. Abschalten pro Person geht über die Zustellung, eine Maske dafür gibt es noch nicht.",
141
141
  },
142
- "contact:forwarding.telegram": { en: "Telegram", de: "Telegram" },
143
- "contact:forwarding.telegram.description": {
142
+ "helpdesk:forwarding.telegram": { en: "Telegram", de: "Telegram" },
143
+ "helpdesk:forwarding.telegram.description": {
144
144
  en: "Optional. Requests also go as a message to a Telegram chat or channel.",
145
145
  de: "Optional. Meldungen gehen zusätzlich als Nachricht in einen Telegram-Chat oder Kanal.",
146
146
  },
147
- "contact:forwarding.submit": { en: "Save", de: "Speichern" },
148
- "contact:config.reply-to.description": {
147
+ "helpdesk:forwarding.submit": { en: "Save", de: "Speichern" },
148
+ "helpdesk:config.reply-to.description": {
149
149
  en: "Used as Reply-To in every answer. Empty means the address of the SystemAdmin who replies.",
150
150
  de: "Steht als Reply-To in jeder Antwort. Leer heißt: Adresse des SystemAdmins, der antwortet.",
151
151
  },
152
- "contact:config.telegram-chat.description": {
152
+ "helpdesk:config.telegram-chat.description": {
153
153
  en: "Leave empty to not use Telegram.",
154
154
  de: "Leer lassen, um Telegram nicht zu nutzen.",
155
155
  },
156
- "contact:config.bot-token.label": { en: "Bot token", de: "Bot-Token" },
157
- "contact:config.bot-token.description": {
156
+ "helpdesk:config.bot-token.label": { en: "Bot token", de: "Bot-Token" },
157
+ "helpdesk:config.bot-token.description": {
158
158
  en: "From @BotFather. Stored encrypted and never shown again.",
159
159
  de: "Von @BotFather. Wird verschlüsselt gespeichert und nie wieder angezeigt.",
160
160
  },
161
- "contact:config.send-test.label": { en: "Test message", de: "Testnachricht" },
162
- "contact:config.send-test.button": { en: "Send test message", de: "Testnachricht senden" },
163
- "contact:config.send-test.success": { en: "Test message sent.", de: "Testnachricht gesendet." },
161
+ "helpdesk:config.send-test.label": { en: "Test message", de: "Testnachricht" },
162
+ "helpdesk:config.send-test.button": { en: "Send test message", de: "Testnachricht senden" },
163
+ "helpdesk:config.send-test.success": {
164
+ en: "Test message sent.",
165
+ de: "Testnachricht gesendet.",
166
+ },
164
167
  [`${REQUEST_FIELD}:origin:option:website`]: { en: "Website", de: "Website" },
165
168
  [`${REQUEST_FIELD}:origin:option:admin-report`]: {
166
169
  en: "Admin, report a problem",
@@ -0,0 +1,5 @@
1
+ export { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.ts";
2
+ export { createHelpdeskFeature } from "./feature.ts";
3
+ export type { HelpdeskOptions } from "./options.ts";
4
+ export { helpdeskOpenRequestsPanels } from "./panels.ts";
5
+ export { HELPDESK_ADMIN_KINDS, HELPDESK_CLIENT_PATH, HELPDESK_DELIVERY_CHANNEL, HELPDESK_DELIVERY_STATUS, HELPDESK_FEATURE, HELPDESK_FIELD_LIMITS, HELPDESK_KIND, HELPDESK_NOTIFICATION_TYPES, HELPDESK_ORIGIN, HELPDESK_REPLY_CHANNELS, HELPDESK_SOURCE, HELPDESK_STATUS, HELPDESK_WEBSITE_KINDS, HelpdeskConfigKeys, HelpdeskErrors, HelpdeskHandlers, HelpdeskQueries, HelpdeskScreens, } from "./web/constants.ts";
@@ -0,0 +1,4 @@
1
+ export { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.js";
2
+ export { createHelpdeskFeature } from "./feature.js";
3
+ export { helpdeskOpenRequestsPanels } from "./panels.js";
4
+ export { HELPDESK_ADMIN_KINDS, HELPDESK_CLIENT_PATH, HELPDESK_DELIVERY_CHANNEL, HELPDESK_DELIVERY_STATUS, HELPDESK_FEATURE, HELPDESK_FIELD_LIMITS, HELPDESK_KIND, HELPDESK_NOTIFICATION_TYPES, HELPDESK_ORIGIN, HELPDESK_REPLY_CHANNELS, HELPDESK_SOURCE, HELPDESK_STATUS, HELPDESK_WEBSITE_KINDS, HelpdeskConfigKeys, HelpdeskErrors, HelpdeskHandlers, HelpdeskQueries, HelpdeskScreens, } from "./web/constants.js";
@@ -1,9 +1,9 @@
1
1
  import { type TenantDb } from "@cosmicdrift/kumiko-framework/db";
2
2
  import { type AppContext, type HandlerContext, type SessionUser } from "@cosmicdrift/kumiko-framework/engine";
3
- import { ContactErrors, type ContactPhoneMode, type ContactReplyChannels } from "./web/constants.ts";
3
+ import { HelpdeskErrors, type HelpdeskPhoneMode, type HelpdeskReplyChannels } from "./web/constants.ts";
4
4
  export declare const IN_APP_FEATURE = "channel-in-app";
5
5
  export declare const TELEGRAM_FEATURE = "channel-telegram";
6
- export declare const CONTACT_CROSS_TENANT_REASON = "contact is platform-wide (systemScope)";
6
+ export declare const HELPDESK_CROSS_TENANT_REASON = "helpdesk is platform-wide (systemScope)";
7
7
  export declare const SYSTEM_ADMIN_ROLE = "SystemAdmin";
8
8
  export declare const adminAccess: {
9
9
  readonly roles: readonly string[];
@@ -86,7 +86,7 @@ export declare function listRepliesOf(db: TenantDb, requestId: string): Promise<
86
86
  readonly sentAt: Temporal.Instant;
87
87
  }[]>;
88
88
  export declare function normalizeEmail(email: string): string;
89
- export declare function contactDb(ctx: Pick<AppContext, "systemDb">): TenantDb;
89
+ export declare function helpdeskDb(ctx: Pick<AppContext, "systemDb">): TenantDb;
90
90
  export declare function platformActor(): SessionUser;
91
91
  export declare function listSystemAdminIds(db: TenantDb): Promise<readonly string[]>;
92
92
  export type UserLabel = {
@@ -95,7 +95,7 @@ export type UserLabel = {
95
95
  };
96
96
  export declare function loadUserLabel(db: TenantDb, userId: string): Promise<UserLabel | null>;
97
97
  export declare function sendBestEffort(ctx: Pick<HandlerContext, "notify" | "obs">, label: string, send: (notify: NonNullable<HandlerContext["notify"]>) => Promise<unknown>): Promise<void>;
98
- export declare function pickReplyChannels(ctx: Pick<HandlerContext, "hasFeature">, reporterUserId: string | null | undefined): Promise<ContactReplyChannels>;
99
- export declare function phoneProblem(mode: ContactPhoneMode, phone: string | undefined): (typeof ContactErrors)[keyof typeof ContactErrors] | null;
98
+ export declare function pickReplyChannels(ctx: Pick<HandlerContext, "hasFeature">, reporterUserId: string | null | undefined): Promise<HelpdeskReplyChannels>;
99
+ export declare function phoneProblem(mode: HelpdeskPhoneMode, phone: string | undefined): (typeof HelpdeskErrors)[keyof typeof HelpdeskErrors] | null;
100
100
  export declare function loadTenantName(db: TenantDb, tenantId: string): Promise<string | null>;
101
101
  export declare function loadTenantPlan(ctx: Pick<HandlerContext, "dispatch" | "registry" | "obs">, tenantId: string): Promise<string | null>;
@@ -6,20 +6,20 @@ import { decryptStoredPii } from "../shared/index.js";
6
6
  import { tenantTable } from "../tenant/index.js";
7
7
  import { TierEngineQueries } from "../tier-engine/index.js";
8
8
  import { USER_STATUS, userTable } from "../user/index.js";
9
- import { contactReplyEntity, contactReplyTable, contactRequestEntity, contactRequestTable, } from "./entity.js";
10
- import { CONTACT_REPLY_CHANNELS, CONTACT_REPLY_ENTITY, CONTACT_REQUEST_ENTITY, ContactErrors, } from "./web/constants.js";
9
+ import { helpdeskReplyEntity, helpdeskReplyTable, helpdeskRequestEntity, helpdeskRequestTable, } from "./entity.js";
10
+ import { HELPDESK_REPLY_CHANNELS, HELPDESK_REPLY_ENTITY, HELPDESK_REQUEST_ENTITY, HelpdeskErrors, } from "./web/constants.js";
11
11
  export const IN_APP_FEATURE = "channel-in-app";
12
12
  export const TELEGRAM_FEATURE = "channel-telegram";
13
- export const CONTACT_CROSS_TENANT_REASON = "contact is platform-wide (systemScope)";
13
+ export const HELPDESK_CROSS_TENANT_REASON = "helpdesk is platform-wide (systemScope)";
14
14
  export const SYSTEM_ADMIN_ROLE = "SystemAdmin";
15
- const PII_DECRYPT_REASON = "contact:user-lookup";
15
+ const PII_DECRYPT_REASON = "helpdesk:user-lookup";
16
16
  export const adminAccess = { roles: access.systemAdmin };
17
17
  export const internalAccess = { roles: access.system };
18
- export const requestExecutor = createEventStoreExecutor(contactRequestTable, contactRequestEntity, {
19
- entityName: CONTACT_REQUEST_ENTITY,
18
+ export const requestExecutor = createEventStoreExecutor(helpdeskRequestTable, helpdeskRequestEntity, {
19
+ entityName: HELPDESK_REQUEST_ENTITY,
20
20
  });
21
- export const replyExecutor = createEventStoreExecutor(contactReplyTable, contactReplyEntity, {
22
- entityName: CONTACT_REPLY_ENTITY,
21
+ export const replyExecutor = createEventStoreExecutor(helpdeskReplyTable, helpdeskReplyEntity, {
22
+ entityName: HELPDESK_REPLY_ENTITY,
23
23
  });
24
24
  const MAX_REPLIES_PER_REQUEST = 200;
25
25
  export async function listRepliesOf(db, requestId) {
@@ -34,13 +34,13 @@ export async function listRepliesOf(db, requestId) {
34
34
  export function normalizeEmail(email) {
35
35
  return email.toLowerCase();
36
36
  }
37
- export function contactDb(ctx) {
37
+ export function helpdeskDb(ctx) {
38
38
  if (!ctx.systemDb) {
39
39
  throw new InternalError({
40
- message: "contact requires ctx.systemDb — is r.systemScope() set on the feature?",
40
+ message: "helpdesk requires ctx.systemDb — is r.systemScope() set on the feature?",
41
41
  });
42
42
  }
43
- return ctx.systemDb.acknowledgeCrossTenant(CONTACT_CROSS_TENANT_REASON);
43
+ return ctx.systemDb.acknowledgeCrossTenant(HELPDESK_CROSS_TENANT_REASON);
44
44
  }
45
45
  // Requests and replies are systemStream rows, so every write targets the system tenant's stream.
46
46
  export function platformActor() {
@@ -66,21 +66,21 @@ export async function sendBestEffort(ctx, label, send) {
66
66
  await send(ctx.notify);
67
67
  }
68
68
  catch (err) {
69
- ctx.obs.log?.warn(`[contact] ${label} failed`, {
69
+ ctx.obs.log?.warn(`[helpdesk] ${label} failed`, {
70
70
  error: err instanceof Error ? err.message : String(err),
71
71
  });
72
72
  }
73
73
  }
74
74
  export async function pickReplyChannels(ctx, reporterUserId) {
75
75
  const hasInApp = reporterUserId && (await ctx.hasFeature(IN_APP_FEATURE));
76
- return hasInApp ? CONTACT_REPLY_CHANNELS.EmailAndInApp : CONTACT_REPLY_CHANNELS.Email;
76
+ return hasInApp ? HELPDESK_REPLY_CHANNELS.EmailAndInApp : HELPDESK_REPLY_CHANNELS.Email;
77
77
  }
78
78
  export function phoneProblem(mode, phone) {
79
79
  const present = phone !== undefined && phone !== "";
80
80
  if (mode === "off")
81
- return present ? ContactErrors.phoneNotAllowed : null;
81
+ return present ? HelpdeskErrors.phoneNotAllowed : null;
82
82
  if (mode === "required")
83
- return present ? null : ContactErrors.phoneRequired;
83
+ return present ? null : HelpdeskErrors.phoneRequired;
84
84
  return null;
85
85
  }
86
86
  export async function loadTenantName(db, tenantId) {
@@ -101,7 +101,7 @@ export async function loadTenantPlan(ctx, tenantId) {
101
101
  return typeof tier === "string" && tier !== "" ? planDisplayName(tier) : null;
102
102
  }
103
103
  catch (err) {
104
- ctx.obs.log?.warn("[contact] tenant plan lookup failed", {
104
+ ctx.obs.log?.warn("[helpdesk] tenant plan lookup failed", {
105
105
  error: err instanceof Error ? err.message : String(err),
106
106
  });
107
107
  return null;
@@ -1,17 +1,17 @@
1
1
  import { type NotificationLocalizedTemplate, type TemplateVariables } from "@cosmicdrift/kumiko-framework/engine";
2
- export type ContactMailLocale = "en" | "de";
3
- export declare function resolveContactMailLocale(locale: string | undefined): ContactMailLocale;
2
+ export type HelpdeskMailLocale = "en" | "de";
3
+ export declare function resolveHelpdeskMailLocale(locale: string | undefined): HelpdeskMailLocale;
4
4
  export declare function truncateText(text: string, maxChars: number): string;
5
- export declare function contactKindLabel(kind: string, locale: string | undefined): string;
6
- export declare function formatContactDate(atEpochMs: number, locale: string | undefined): string;
7
- export declare const CONTACT_NEW_REQUEST_VARIABLES: TemplateVariables;
5
+ export declare function helpdeskKindLabel(kind: string, locale: string | undefined): string;
6
+ export declare function formatHelpdeskDate(atEpochMs: number, locale: string | undefined): string;
7
+ export declare const HELPDESK_NEW_REQUEST_VARIABLES: TemplateVariables;
8
8
  export type NewRequestMailArgs = {
9
9
  readonly kind: string;
10
10
  readonly appName: string;
11
11
  readonly link: string | undefined;
12
12
  readonly locale: string | undefined;
13
13
  };
14
- export declare function contactNewRequestVariables(args: NewRequestMailArgs): {
14
+ export declare function helpdeskNewRequestVariables(args: NewRequestMailArgs): {
15
15
  subject: string;
16
16
  intro: string;
17
17
  requestUrl?: string | undefined;
@@ -20,9 +20,9 @@ export declare function contactNewRequestVariables(args: NewRequestMailArgs): {
20
20
  telegramTitle: string;
21
21
  telegramBody: string;
22
22
  };
23
- export declare function contactNewRequestTemplate(): NotificationLocalizedTemplate;
24
- export declare const CONTACT_CONFIRMATION_VARIABLES: TemplateVariables;
25
- export declare function contactConfirmationVariables(args: {
23
+ export declare function helpdeskNewRequestTemplate(): NotificationLocalizedTemplate;
24
+ export declare const HELPDESK_CONFIRMATION_VARIABLES: TemplateVariables;
25
+ export declare function helpdeskConfirmationVariables(args: {
26
26
  readonly appName: string;
27
27
  readonly message: string;
28
28
  readonly locale: string | undefined;
@@ -34,18 +34,18 @@ export declare function contactConfirmationVariables(args: {
34
34
  readonly text: string;
35
35
  }[];
36
36
  };
37
- export declare const CONTACT_ACKNOWLEDGEMENT_VARIABLES: TemplateVariables;
38
- export declare function contactAcknowledgementVariables(args: {
37
+ export declare const HELPDESK_ACKNOWLEDGEMENT_VARIABLES: TemplateVariables;
38
+ export declare function helpdeskAcknowledgementVariables(args: {
39
39
  readonly appName: string;
40
40
  readonly locale: string | undefined;
41
41
  }): {
42
42
  appName: string;
43
43
  intro: string;
44
44
  };
45
- export declare function contactAcknowledgementTemplate(): NotificationLocalizedTemplate;
46
- export declare function contactConfirmationTemplate(): NotificationLocalizedTemplate;
47
- export declare const CONTACT_REPLY_VARIABLES: TemplateVariables;
48
- export declare function contactReplyVariables(args: {
45
+ export declare function helpdeskAcknowledgementTemplate(): NotificationLocalizedTemplate;
46
+ export declare function helpdeskConfirmationTemplate(): NotificationLocalizedTemplate;
47
+ export declare const HELPDESK_REPLY_VARIABLES: TemplateVariables;
48
+ export declare function helpdeskReplyVariables(args: {
49
49
  readonly requestSubject: string;
50
50
  readonly requestMessage: string;
51
51
  readonly requestSubmittedAt: number;
@@ -63,9 +63,9 @@ export declare function contactReplyVariables(args: {
63
63
  quote: string;
64
64
  footer: string;
65
65
  };
66
- export declare function contactReplyTemplate(): NotificationLocalizedTemplate;
67
- export declare const CONTACT_TEST_VARIABLES: TemplateVariables;
68
- export declare function contactTestVariables(args: {
66
+ export declare function helpdeskReplyTemplate(): NotificationLocalizedTemplate;
67
+ export declare const HELPDESK_TEST_VARIABLES: TemplateVariables;
68
+ export declare function helpdeskTestVariables(args: {
69
69
  readonly appName: string;
70
70
  readonly locale: string | undefined;
71
71
  }): {
@@ -73,8 +73,8 @@ export declare function contactTestVariables(args: {
73
73
  telegramTitle: string;
74
74
  telegramBody: string;
75
75
  };
76
- export declare function contactTestTemplate(): NotificationLocalizedTemplate;
77
- export declare function contactReplyInAppData(args: {
76
+ export declare function helpdeskTestTemplate(): NotificationLocalizedTemplate;
77
+ export declare function helpdeskReplyInAppData(args: {
78
78
  readonly authorName: string;
79
79
  readonly locale: string | undefined;
80
80
  }): {