@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.
- package/package.json +1 -1
- package/packages/bundled-features/package.json +13 -13
- package/packages/bundled-features/src/admin-shell/feature.ts +1 -1
- package/packages/bundled-features/src/agent-tools/api-docs/anchors.ts +1 -1
- package/packages/bundled-features/src/auth-email-password/boot-rules.ts +9 -0
- package/packages/bundled-features/src/auth-email-password/feature.ts +6 -19
- package/packages/bundled-features/src/auth-email-password/validate-options.ts +20 -0
- package/packages/bundled-features/src/billing-foundation/boot-rules.ts +26 -0
- package/packages/bundled-features/src/billing-foundation/validate-options.ts +59 -46
- package/packages/bundled-features/src/cap-overview/boot-rules.ts +14 -0
- package/packages/bundled-features/src/cap-overview/feature.ts +12 -5
- package/packages/bundled-features/src/data-retention/changes.json +6 -0
- package/packages/bundled-features/src/data-retention/feature.ts +3 -2
- package/packages/bundled-features/src/documents/boot-rules.ts +14 -0
- package/packages/bundled-features/src/documents/feature.ts +8 -4
- package/packages/bundled-features/src/file-derivatives/boot-rules.ts +9 -0
- package/packages/bundled-features/src/file-derivatives/feature.ts +6 -3
- package/packages/bundled-features/src/folders/boot-rules.ts +9 -0
- package/packages/bundled-features/src/folders/feature.ts +6 -3
- package/packages/bundled-features/src/helpdesk/boot-rules.ts +9 -0
- package/packages/bundled-features/src/{contact → helpdesk}/challenge.ts +2 -2
- package/packages/bundled-features/src/{contact → helpdesk}/changes.json +18 -0
- package/packages/bundled-features/src/{contact/client/contact-client-source.ts → helpdesk/client/helpdesk-client-source.ts} +4 -4
- package/packages/bundled-features/src/helpdesk/client/helpdesk-website-client.ts +29 -0
- package/packages/bundled-features/src/helpdesk/client/index.ts +9 -0
- package/packages/bundled-features/src/{contact → helpdesk}/entity.ts +35 -31
- package/packages/bundled-features/src/{contact → helpdesk}/feature.ts +56 -52
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/attempts.ts +3 -3
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/challenge.query.ts +10 -10
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/forward-request.write.ts +25 -23
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/mark-done.write.ts +11 -11
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/notify-reporter-in-app.write.ts +14 -14
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/open-count.query.ts +4 -4
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/open-count.ts +2 -2
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/replies.query.ts +6 -6
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/reply.write.ts +30 -30
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/report.write.ts +29 -29
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-delivery.query.ts +40 -40
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-detail.query.ts +15 -15
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/request-list.query.ts +2 -2
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/send-reply-mail.write.ts +24 -24
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/send-test.write.ts +18 -14
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/submit.write.ts +32 -31
- package/packages/bundled-features/src/{contact → helpdesk}/handlers/take-over-uploads.ts +5 -5
- package/packages/bundled-features/src/{contact → helpdesk}/i18n.ts +78 -75
- package/packages/bundled-features/src/helpdesk/index.ts +29 -0
- package/packages/bundled-features/src/{contact → helpdesk}/lib.ts +32 -28
- package/packages/bundled-features/src/{contact → helpdesk}/mail.ts +56 -56
- package/packages/bundled-features/src/{contact → helpdesk}/options.ts +18 -16
- package/packages/bundled-features/src/helpdesk/panels.ts +28 -0
- package/packages/bundled-features/src/{contact → helpdesk}/payloads.ts +33 -33
- package/packages/bundled-features/src/{contact → helpdesk}/screens.ts +104 -104
- package/packages/bundled-features/src/{contact → helpdesk}/subject.ts +3 -3
- package/packages/bundled-features/src/{contact → helpdesk}/user-data-hooks.ts +17 -17
- package/packages/bundled-features/src/helpdesk/web/constants.ts +160 -0
- package/packages/bundled-features/src/helpdesk/web/index.ts +29 -0
- package/packages/bundled-features/src/host-routing/boot-rules.ts +27 -0
- package/packages/bundled-features/src/host-routing/validate-options.ts +36 -27
- package/packages/bundled-features/src/jobs/boot-rules.ts +9 -0
- package/packages/bundled-features/src/jobs/feature.ts +9 -4
- package/packages/bundled-features/src/legal-pages/boot-rules.ts +19 -0
- package/packages/bundled-features/src/legal-pages/feature.ts +6 -3
- package/packages/bundled-features/src/legal-pages/lib/validate-routes.ts +11 -5
- package/packages/bundled-features/src/metrics/boot-rules.ts +15 -0
- package/packages/bundled-features/src/metrics/validate.ts +8 -2
- package/packages/bundled-features/src/notes-history/boot-rules.ts +9 -0
- package/packages/bundled-features/src/notes-history/feature.ts +6 -3
- package/packages/bundled-features/src/personal-access-tokens/boot-rules.ts +9 -0
- package/packages/bundled-features/src/personal-access-tokens/scope-events-check.ts +6 -3
- package/packages/bundled-features/src/presence/boot-rules.ts +9 -0
- package/packages/bundled-features/src/presence/options.ts +5 -1
- package/packages/bundled-features/src/readiness/boot-rules.ts +14 -0
- package/packages/bundled-features/src/readiness/probe-boot-check.ts +8 -6
- package/packages/bundled-features/src/shared/assert-no-where-rule-in-ownership-write.ts +6 -4
- package/packages/bundled-features/src/shared/boot-rules.ts +9 -0
- package/packages/bundled-features/src/subscription-mollie/boot-rules.ts +19 -0
- package/packages/bundled-features/src/subscription-mollie/feature.ts +18 -10
- package/packages/bundled-features/src/tags/boot-rules.ts +9 -0
- package/packages/bundled-features/src/tags/feature.ts +6 -3
- package/packages/bundled-features/src/template-resolver/boot-rules.ts +19 -0
- package/packages/bundled-features/src/template-resolver/feature.ts +14 -10
- package/packages/bundled-features/src/tenant/boot-rules.ts +9 -0
- package/packages/bundled-features/src/tenant/feature.ts +5 -3
- package/samples/apps/marketing-demo/README.md +1 -1
- package/samples/apps/marketing-demo/playwright.config.ts +1 -1
- package/samples/apps/marketing-demo/src/app/client.tsx +3 -3
- package/samples/apps/marketing-demo/src/app/seed-data.ts +1 -1
- package/samples/apps/marketing-demo/src/app/seed.ts +4 -4
- package/samples/apps/marketing-demo/src/app/server.ts +3 -3
- package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/feature.ts +15 -12
- package/samples/apps/marketing-demo/src/features/ticketing/i18n.ts +100 -0
- package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/schema/ticket.ts +4 -4
- package/samples/apps/marketing-demo/src/features/ticketing/web/index.ts +7 -0
- package/samples/apps/use-all-bundled/feature-manifest.json +67 -67
- package/samples/apps/use-all-bundled/kumiko/migrations/0064_helpdesk-rename.rebuild.json +4 -0
- package/samples/apps/use-all-bundled/package.json +1 -1
- package/samples/apps/use-all-bundled/src/app/client.tsx +1 -1
- package/samples/apps/use-all-bundled/src/app/screens-feature.ts +10 -10
- package/samples/apps/use-all-bundled/src/run-config.ts +6 -6
- package/samples/recipes/api-docs/README.md +3 -3
- package/samples/recipes/api-docs/api-docs/de/events.md +14 -14
- package/samples/recipes/api-docs/api-docs/de/overview.md +3 -3
- package/samples/recipes/api-docs/api-docs/de/reference/tickets.md +10 -10
- package/samples/recipes/api-docs/api-docs/de/tokens.md +4 -4
- package/samples/recipes/api-docs/api-docs/en/events.md +14 -14
- package/samples/recipes/api-docs/api-docs/en/overview.md +3 -3
- package/samples/recipes/api-docs/api-docs/en/reference/tickets.md +10 -10
- package/samples/recipes/api-docs/api-docs/en/tokens.md +4 -4
- package/samples/recipes/api-docs/api-docs/index.json +22 -22
- package/samples/recipes/api-docs/api-docs/openapi.json +67 -67
- package/samples/recipes/api-docs/api-examples/ticket-close.json +1 -1
- package/samples/recipes/api-docs/api-examples/ticket-create.json +1 -1
- package/samples/recipes/api-docs/api-examples/ticket-detail.json +1 -1
- package/samples/recipes/api-docs/api-examples/ticket-list.json +1 -1
- package/samples/recipes/api-docs/api-examples/ticket-update.json +1 -1
- package/samples/recipes/api-docs/api-examples/webhooks/ticket-closed.json +1 -1
- package/samples/recipes/api-docs/kumiko.config.ts +4 -4
- package/samples/recipes/api-docs/src/feature.ts +44 -44
- package/samples/recipes/golden-path/src/feature.ts +1 -1
- package/samples/recipes/helpdesk/README.md +56 -0
- package/samples/recipes/{contact → helpdesk}/package.json +2 -2
- package/samples/recipes/{contact → helpdesk}/src/feature.ts +11 -8
- package/packages/bundled-features/src/contact/client/contact-website-client.ts +0 -29
- package/packages/bundled-features/src/contact/client/index.ts +0 -9
- package/packages/bundled-features/src/contact/index.ts +0 -29
- package/packages/bundled-features/src/contact/panels.ts +0 -28
- package/packages/bundled-features/src/contact/web/constants.ts +0 -160
- package/packages/bundled-features/src/contact/web/index.ts +0 -29
- package/samples/apps/marketing-demo/src/features/helpdesk/i18n.ts +0 -100
- package/samples/apps/marketing-demo/src/features/helpdesk/web/index.ts +0 -7
- package/samples/recipes/contact/README.md +0 -52
- /package/packages/bundled-features/src/{contact → helpdesk}/handlers/access.ts +0 -0
- /package/packages/bundled-features/src/{contact → helpdesk}/pow.ts +0 -0
- /package/packages/bundled-features/src/{contact → helpdesk}/user-agent.ts +0 -0
- /package/samples/apps/marketing-demo/src/features/{helpdesk → ticketing}/schema/index.ts +0 -0
package/packages/bundled-features/src/{contact → helpdesk}/handlers/send-reply-mail.write.ts
RENAMED
|
@@ -9,7 +9,7 @@ import { fileRefsTable } from "@cosmicdrift/kumiko-framework/files";
|
|
|
9
9
|
import type { FileAttachmentRef } from "../../delivery/index.ts";
|
|
10
10
|
import { decryptStoredPii } from "../../shared/index.ts";
|
|
11
11
|
import {
|
|
12
|
-
|
|
12
|
+
helpdeskDb,
|
|
13
13
|
internalAccess,
|
|
14
14
|
loadUserLabel,
|
|
15
15
|
platformActor,
|
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
requestExecutor,
|
|
18
18
|
sendBestEffort,
|
|
19
19
|
} from "../lib.ts";
|
|
20
|
-
import {
|
|
21
|
-
import type {
|
|
22
|
-
import {
|
|
20
|
+
import { helpdeskReplyVariables, resolveHelpdeskMailLocale } from "../mail.ts";
|
|
21
|
+
import type { HelpdeskOptions } from "../options.ts";
|
|
22
|
+
import { HelpdeskSendReplyMailSchema } from "../payloads.ts";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
HELPDESK_NOTIFICATION_TYPES,
|
|
25
|
+
HELPDESK_REPLY_ENTITY,
|
|
26
|
+
HELPDESK_REQUEST_ENTITY,
|
|
27
|
+
HelpdeskConfigKeys,
|
|
28
|
+
helpdeskIdempotencyKeys,
|
|
29
29
|
} from "../web/constants.ts";
|
|
30
30
|
|
|
31
|
-
const ATTACHMENT_LOOKUP_REASON = "
|
|
31
|
+
const ATTACHMENT_LOOKUP_REASON = "helpdesk:reply-attachment";
|
|
32
32
|
|
|
33
|
-
export type
|
|
33
|
+
export type HelpdeskSendReplyMailData = { readonly kind: "sent"; readonly attachmentCount: number };
|
|
34
34
|
|
|
35
35
|
type FileRefNameRow = { readonly fileName: string };
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ async function resolveAttachments(
|
|
|
38
38
|
ctx: HandlerContext,
|
|
39
39
|
fileIds: readonly string[],
|
|
40
40
|
): Promise<readonly FileAttachmentRef[]> {
|
|
41
|
-
const db =
|
|
41
|
+
const db = helpdeskDb(ctx);
|
|
42
42
|
const attachments: FileAttachmentRef[] = [];
|
|
43
43
|
for (const fileRefId of fileIds) {
|
|
44
44
|
const row = await fetchOne<FileRefNameRow>(db, fileRefsTable, {
|
|
@@ -57,7 +57,7 @@ async function resolveReplyTo(
|
|
|
57
57
|
ctx: HandlerContext,
|
|
58
58
|
authorEmail: string | undefined,
|
|
59
59
|
): Promise<string | undefined> {
|
|
60
|
-
const configured = await ctx.config?.(
|
|
60
|
+
const configured = await ctx.config?.(HelpdeskConfigKeys.replyTo);
|
|
61
61
|
return typeof configured === "string" && configured.trim() !== ""
|
|
62
62
|
? configured.trim()
|
|
63
63
|
: authorEmail;
|
|
@@ -65,26 +65,26 @@ async function resolveReplyTo(
|
|
|
65
65
|
|
|
66
66
|
// Runs as the platform identity: the delivery channel reads attachments of the sending tenant,
|
|
67
67
|
// and the reply files live in the system tenant, whichever tenant the answering admin is in.
|
|
68
|
-
export function createSendReplyMailHandler(opts:
|
|
68
|
+
export function createSendReplyMailHandler(opts: HelpdeskOptions) {
|
|
69
69
|
return defineWriteHandler<
|
|
70
70
|
"send-reply-mail",
|
|
71
|
-
typeof
|
|
72
|
-
|
|
71
|
+
typeof HelpdeskSendReplyMailSchema,
|
|
72
|
+
HelpdeskSendReplyMailData
|
|
73
73
|
>({
|
|
74
74
|
name: "send-reply-mail",
|
|
75
|
-
schema:
|
|
75
|
+
schema: HelpdeskSendReplyMailSchema,
|
|
76
76
|
access: internalAccess,
|
|
77
77
|
agent: { expose: false },
|
|
78
78
|
description:
|
|
79
79
|
"Internal: mails a stored reply to the reporter with Reply-To, the quoted request and the reply files attached. Only the platform identity can call it.",
|
|
80
80
|
handler: async (event, ctx) => {
|
|
81
|
-
const db =
|
|
81
|
+
const db = helpdeskDb(ctx);
|
|
82
82
|
const { replyId } = event.payload;
|
|
83
83
|
const reply = await replyExecutor.detail({ id: replyId }, platformActor(), db);
|
|
84
|
-
if (!reply) return writeFailure(new NotFoundError(
|
|
84
|
+
if (!reply) return writeFailure(new NotFoundError(HELPDESK_REPLY_ENTITY, replyId));
|
|
85
85
|
const request = await requestExecutor.detail({ id: reply.requestId }, platformActor(), db);
|
|
86
86
|
if (!request) {
|
|
87
|
-
return writeFailure(new NotFoundError(
|
|
87
|
+
return writeFailure(new NotFoundError(HELPDESK_REQUEST_ENTITY, reply.requestId));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
const author = await loadUserLabel(db, reply.authorUserId);
|
|
@@ -96,11 +96,11 @@ export function createSendReplyMailHandler(opts: ContactOptions) {
|
|
|
96
96
|
const locale = request.locale ?? undefined;
|
|
97
97
|
|
|
98
98
|
await sendBestEffort(ctx, "reply mail", (notify) =>
|
|
99
|
-
notify(
|
|
99
|
+
notify(HELPDESK_NOTIFICATION_TYPES.reply, {
|
|
100
100
|
route: { email: recipientEmail },
|
|
101
101
|
recipientId: request.id,
|
|
102
102
|
data: {
|
|
103
|
-
...
|
|
103
|
+
...helpdeskReplyVariables({
|
|
104
104
|
requestSubject: request.subject,
|
|
105
105
|
requestMessage: request.message,
|
|
106
106
|
requestSubmittedAt: Number(request.submittedAt.epochMilliseconds),
|
|
@@ -112,9 +112,9 @@ export function createSendReplyMailHandler(opts: ContactOptions) {
|
|
|
112
112
|
...(replyTo !== undefined && { replyTo }),
|
|
113
113
|
...(attachments.length > 0 && { attachments }),
|
|
114
114
|
},
|
|
115
|
-
idempotencyKey:
|
|
115
|
+
idempotencyKey: helpdeskIdempotencyKeys.reply(replyId),
|
|
116
116
|
priority: "normal",
|
|
117
|
-
locale:
|
|
117
|
+
locale: resolveHelpdeskMailLocale(locale),
|
|
118
118
|
}),
|
|
119
119
|
);
|
|
120
120
|
|
|
@@ -5,39 +5,43 @@ import {
|
|
|
5
5
|
writeFailure,
|
|
6
6
|
} from "@cosmicdrift/kumiko-framework/errors";
|
|
7
7
|
import { adminAccess } from "../lib.ts";
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { helpdeskTestVariables, resolveHelpdeskMailLocale } from "../mail.ts";
|
|
9
|
+
import type { HelpdeskOptions } from "../options.ts";
|
|
10
|
+
import { HelpdeskEmptySchema } from "../payloads.ts";
|
|
11
|
+
import {
|
|
12
|
+
HELPDESK_NOTIFICATION_TYPES,
|
|
13
|
+
HelpdeskConfigKeys,
|
|
14
|
+
HelpdeskErrors,
|
|
15
|
+
} from "../web/constants.ts";
|
|
12
16
|
|
|
13
|
-
export type
|
|
17
|
+
export type HelpdeskSendTestData = { readonly kind: "sent" };
|
|
14
18
|
|
|
15
|
-
export function createSendTestHandler(opts:
|
|
16
|
-
return defineWriteHandler<"send-test", typeof
|
|
19
|
+
export function createSendTestHandler(opts: HelpdeskOptions) {
|
|
20
|
+
return defineWriteHandler<"send-test", typeof HelpdeskEmptySchema, HelpdeskSendTestData>({
|
|
17
21
|
name: "send-test",
|
|
18
|
-
schema:
|
|
22
|
+
schema: HelpdeskEmptySchema,
|
|
19
23
|
access: adminAccess,
|
|
20
24
|
agent: { expose: false },
|
|
21
25
|
description:
|
|
22
26
|
"Sends a test message to the configured Telegram chat; fails with a typed error when no chat is configured or the provider does not accept the message, so a SystemAdmin can verify bot token and chat id.",
|
|
23
27
|
handler: async (event, ctx) => {
|
|
24
|
-
const chatId = await ctx.config?.(
|
|
28
|
+
const chatId = await ctx.config?.(HelpdeskConfigKeys.telegramChat);
|
|
25
29
|
if (typeof chatId !== "string" || chatId.trim() === "") {
|
|
26
|
-
return writeFailure(new UnprocessableError(
|
|
30
|
+
return writeFailure(new UnprocessableError(HelpdeskErrors.telegramChatMissing));
|
|
27
31
|
}
|
|
28
32
|
if (!ctx.notify) {
|
|
29
33
|
throw new InternalError({ message: "ctx.notify unavailable — mount the delivery feature" });
|
|
30
34
|
}
|
|
31
35
|
const locale = opts.adminLocale ?? "en";
|
|
32
|
-
const result = await ctx.notify(
|
|
36
|
+
const result = await ctx.notify(HELPDESK_NOTIFICATION_TYPES.test, {
|
|
33
37
|
route: { telegram: chatId.trim() },
|
|
34
38
|
recipientId: event.user.id,
|
|
35
|
-
data:
|
|
39
|
+
data: helpdeskTestVariables({ appName: opts.appName, locale }),
|
|
36
40
|
immediate: true,
|
|
37
|
-
locale:
|
|
41
|
+
locale: resolveHelpdeskMailLocale(locale),
|
|
38
42
|
});
|
|
39
43
|
if (result.deliveries.some((d) => d.status === "failed")) {
|
|
40
|
-
return writeFailure(new UnprocessableError(
|
|
44
|
+
return writeFailure(new UnprocessableError(HelpdeskErrors.telegramTestFailed));
|
|
41
45
|
}
|
|
42
46
|
return { isSuccess: true, data: { kind: "sent" } };
|
|
43
47
|
},
|
|
@@ -16,37 +16,37 @@ import { generateId } from "@cosmicdrift/kumiko-framework/utils";
|
|
|
16
16
|
import type { PayloadRateLimitOption } from "@cosmicdrift/kumiko-types/handlers";
|
|
17
17
|
import { consumeChallenge } from "../challenge.ts";
|
|
18
18
|
import {
|
|
19
|
-
|
|
19
|
+
helpdeskDb,
|
|
20
20
|
normalizeEmail,
|
|
21
21
|
phoneProblem,
|
|
22
22
|
platformActor,
|
|
23
23
|
requestExecutor,
|
|
24
24
|
sendBestEffort,
|
|
25
25
|
} from "../lib.ts";
|
|
26
|
-
import {
|
|
26
|
+
import { helpdeskAcknowledgementVariables, resolveHelpdeskMailLocale } from "../mail.ts";
|
|
27
27
|
import {
|
|
28
|
-
type ContactOptions,
|
|
29
|
-
type ContactSettings,
|
|
30
28
|
DEFAULT_SUBMIT_EMAIL_RATE_LIMITS,
|
|
31
29
|
DEFAULT_SUBMIT_RATE_LIMIT,
|
|
30
|
+
type HelpdeskOptions,
|
|
31
|
+
type HelpdeskSettings,
|
|
32
32
|
} from "../options.ts";
|
|
33
|
-
import { type
|
|
33
|
+
import { type HelpdeskSubmitInput, HelpdeskSubmitSchema } from "../payloads.ts";
|
|
34
34
|
import { verifyProofOfWork } from "../pow.ts";
|
|
35
35
|
import { deriveSubjectFromMessage } from "../subject.ts";
|
|
36
36
|
import { summarizeUserAgent } from "../user-agent.ts";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
HELPDESK_NOTIFICATION_TYPES,
|
|
39
|
+
HELPDESK_SOURCE,
|
|
40
|
+
HELPDESK_STATUS,
|
|
41
|
+
HelpdeskHandlers,
|
|
42
|
+
helpdeskIdempotencyKeys,
|
|
43
43
|
} from "../web/constants.ts";
|
|
44
44
|
import { SUBMIT_ROLES } from "./access.ts";
|
|
45
45
|
|
|
46
|
-
export type
|
|
46
|
+
export type HelpdeskSubmitData = { readonly kind: "submitted" };
|
|
47
47
|
|
|
48
48
|
// Identical body for stored and silently dropped submits, so a bot learns nothing from it.
|
|
49
|
-
const SUBMITTED: WriteResult<
|
|
49
|
+
const SUBMITTED: WriteResult<HelpdeskSubmitData> = {
|
|
50
50
|
isSuccess: true,
|
|
51
51
|
data: { kind: "submitted" },
|
|
52
52
|
};
|
|
@@ -54,7 +54,7 @@ const SUBMITTED: WriteResult<ContactSubmitData> = {
|
|
|
54
54
|
type DropReason = "honeypot" | "challenge" | "too_fast" | "proof_of_work";
|
|
55
55
|
|
|
56
56
|
// An explicitly bound `undefined` is an error for the postgres driver; a missing key is not.
|
|
57
|
-
function presentOptionalFields(payload:
|
|
57
|
+
function presentOptionalFields(payload: HelpdeskSubmitInput) {
|
|
58
58
|
return {
|
|
59
59
|
...(payload.phone !== undefined && payload.phone !== "" && { phone: payload.phone }),
|
|
60
60
|
...(payload.page !== undefined && payload.page !== "" && { page: payload.page }),
|
|
@@ -62,15 +62,15 @@ function presentOptionalFields(payload: ContactSubmitInput) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
async function findDropReason(
|
|
65
|
-
payload:
|
|
65
|
+
payload: HelpdeskSubmitInput,
|
|
66
66
|
ctx: HandlerContext,
|
|
67
|
-
settings:
|
|
67
|
+
settings: HelpdeskSettings,
|
|
68
68
|
): Promise<DropReason | null> {
|
|
69
69
|
if (payload.website !== undefined && payload.website.trim() !== "") return "honeypot";
|
|
70
70
|
const redis = ctx.services.redis;
|
|
71
71
|
if (!redis) {
|
|
72
72
|
throw new InternalError({
|
|
73
|
-
message: "
|
|
73
|
+
message: "helpdesk:submit requires ctx.services.redis for the challenge store",
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
const issued = await consumeChallenge(redis, payload.challenge);
|
|
@@ -89,18 +89,19 @@ async function findDropReason(
|
|
|
89
89
|
// real owner out. Only submits that passed the spam checks count. An empty list disables the limit.
|
|
90
90
|
async function enforceEmailLimits(
|
|
91
91
|
ctx: HandlerContext,
|
|
92
|
-
payload:
|
|
92
|
+
payload: HelpdeskSubmitInput,
|
|
93
93
|
limits: readonly PayloadRateLimitOption[],
|
|
94
94
|
): Promise<WriteFailure | null> {
|
|
95
95
|
if (limits.length === 0) return null;
|
|
96
96
|
const { rateLimit } = ctx.services;
|
|
97
97
|
if (!rateLimit || !ctx.rateLimitDigest) {
|
|
98
98
|
throw new InternalError({
|
|
99
|
-
message:
|
|
99
|
+
message:
|
|
100
|
+
"helpdesk:submit declares an email rate limit but no rate limiter or digest is wired",
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
const requests = limits.map(({ per, limit, windowSeconds, cost, normalize }) => ({
|
|
103
|
-
bucket: `
|
|
104
|
+
bucket: `helpdesk-submit:${per.payloadField}:${ctx.rateLimitDigest?.(
|
|
104
105
|
normalizePayloadBucketValue(payload.email, normalize),
|
|
105
106
|
)}`,
|
|
106
107
|
config: { limit, windowSeconds, ...(cost !== undefined && { cost }) },
|
|
@@ -114,11 +115,11 @@ async function enforceEmailLimits(
|
|
|
114
115
|
return null;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
|
-
export function createSubmitHandler(opts:
|
|
118
|
+
export function createSubmitHandler(opts: HelpdeskOptions, settings: HelpdeskSettings) {
|
|
118
119
|
const emailRateLimits = opts.emailRateLimits ?? DEFAULT_SUBMIT_EMAIL_RATE_LIMITS;
|
|
119
|
-
return defineWriteHandler<"submit", typeof
|
|
120
|
+
return defineWriteHandler<"submit", typeof HelpdeskSubmitSchema, HelpdeskSubmitData>({
|
|
120
121
|
name: "submit",
|
|
121
|
-
schema:
|
|
122
|
+
schema: HelpdeskSubmitSchema,
|
|
122
123
|
access: { roles: SUBMIT_ROLES, personalData: "public-intake", anySignedIn: true },
|
|
123
124
|
rateLimit: opts.rateLimit ?? DEFAULT_SUBMIT_RATE_LIMIT,
|
|
124
125
|
agent: { expose: false },
|
|
@@ -128,7 +129,7 @@ export function createSubmitHandler(opts: ContactOptions, settings: ContactSetti
|
|
|
128
129
|
const payload = event.payload;
|
|
129
130
|
const dropReason = await findDropReason(payload, ctx, settings);
|
|
130
131
|
if (dropReason !== null) {
|
|
131
|
-
ctx.obs.log?.info("[
|
|
132
|
+
ctx.obs.log?.info("[helpdesk:submit] dropped", { reason: dropReason });
|
|
132
133
|
return SUBMITTED;
|
|
133
134
|
}
|
|
134
135
|
|
|
@@ -146,8 +147,8 @@ export function createSubmitHandler(opts: ContactOptions, settings: ContactSetti
|
|
|
146
147
|
{
|
|
147
148
|
id: requestId,
|
|
148
149
|
kind: payload.kind,
|
|
149
|
-
status:
|
|
150
|
-
source:
|
|
150
|
+
status: HELPDESK_STATUS.Open,
|
|
151
|
+
source: HELPDESK_SOURCE.Website,
|
|
151
152
|
subject: deriveSubjectFromMessage(payload.message),
|
|
152
153
|
message: payload.message,
|
|
153
154
|
name: payload.name,
|
|
@@ -161,30 +162,30 @@ export function createSubmitHandler(opts: ContactOptions, settings: ContactSetti
|
|
|
161
162
|
replyCount: 0,
|
|
162
163
|
},
|
|
163
164
|
platformActor(),
|
|
164
|
-
|
|
165
|
+
helpdeskDb(ctx),
|
|
165
166
|
);
|
|
166
167
|
if (!created.isSuccess) return created;
|
|
167
168
|
|
|
168
169
|
await sendBestEffort(ctx, "forward request", async () => {
|
|
169
170
|
const forwarded = await ctx.dispatch.writeAs(
|
|
170
171
|
platformActor(),
|
|
171
|
-
|
|
172
|
+
HelpdeskHandlers.forwardRequest,
|
|
172
173
|
{ requestId },
|
|
173
174
|
);
|
|
174
175
|
if (!forwarded.isSuccess) throw new Error(forwarded.error.message);
|
|
175
176
|
});
|
|
176
177
|
|
|
177
178
|
await sendBestEffort(ctx, "confirmation mail", (notify) =>
|
|
178
|
-
notify(
|
|
179
|
+
notify(HELPDESK_NOTIFICATION_TYPES.acknowledgement, {
|
|
179
180
|
route: { email },
|
|
180
181
|
recipientId: requestId,
|
|
181
|
-
data:
|
|
182
|
+
data: helpdeskAcknowledgementVariables({
|
|
182
183
|
appName: opts.appName,
|
|
183
184
|
locale: payload.locale,
|
|
184
185
|
}),
|
|
185
|
-
idempotencyKey:
|
|
186
|
+
idempotencyKey: helpdeskIdempotencyKeys.confirmation(requestId),
|
|
186
187
|
priority: "normal",
|
|
187
|
-
locale:
|
|
188
|
+
locale: resolveHelpdeskMailLocale(payload.locale),
|
|
188
189
|
}),
|
|
189
190
|
);
|
|
190
191
|
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
import { copyPendingFileRefsToTenant } from "@cosmicdrift/kumiko-framework/files";
|
|
7
7
|
import type { WriteResult } from "@cosmicdrift/kumiko-types/handlers";
|
|
8
8
|
import { fileContextForTenant } from "../../file-foundation/index.ts";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { helpdeskDb, platformActor } from "../lib.ts";
|
|
10
|
+
import { HELPDESK_UPLOAD_FIELD } from "../web/constants.ts";
|
|
11
11
|
|
|
12
12
|
// The form uploads into the submitter's tenant; the request or reply lives in the system tenant.
|
|
13
13
|
export async function takeOverUploads(
|
|
@@ -21,7 +21,7 @@ export async function takeOverUploads(
|
|
|
21
21
|
},
|
|
22
22
|
): Promise<WriteResult<readonly string[]>> {
|
|
23
23
|
if (args.fileIds.length === 0) return { isSuccess: true, data: [] };
|
|
24
|
-
const db =
|
|
24
|
+
const db = helpdeskDb(ctx);
|
|
25
25
|
const submitterTenantId = args.user.tenantId;
|
|
26
26
|
return copyPendingFileRefsToTenant({
|
|
27
27
|
source: {
|
|
@@ -29,7 +29,7 @@ export async function takeOverUploads(
|
|
|
29
29
|
user: args.user,
|
|
30
30
|
files: fileContextForTenant(ctx, submitterTenantId, submitterTenantId),
|
|
31
31
|
entityType: args.screen,
|
|
32
|
-
fieldName:
|
|
32
|
+
fieldName: HELPDESK_UPLOAD_FIELD,
|
|
33
33
|
},
|
|
34
34
|
target: {
|
|
35
35
|
db,
|
|
@@ -38,7 +38,7 @@ export async function takeOverUploads(
|
|
|
38
38
|
files: fileContextForTenant(ctx, submitterTenantId, SYSTEM_TENANT_ID),
|
|
39
39
|
attachTo: {
|
|
40
40
|
entityType: args.entityType,
|
|
41
|
-
fieldName:
|
|
41
|
+
fieldName: HELPDESK_UPLOAD_FIELD,
|
|
42
42
|
entityId: args.entityId,
|
|
43
43
|
},
|
|
44
44
|
},
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
type LocalizedString = { readonly en: string; readonly de: string };
|
|
2
2
|
|
|
3
|
-
const DELIVERY_FIELD = "
|
|
4
|
-
const REQUEST_FIELD = "
|
|
5
|
-
const REPLY_ENTITY_FIELD = "
|
|
3
|
+
const DELIVERY_FIELD = "helpdesk:entity:helpdesk-delivery:field";
|
|
4
|
+
const REQUEST_FIELD = "helpdesk:entity:helpdesk-request:field";
|
|
5
|
+
const REPLY_ENTITY_FIELD = "helpdesk:entity:helpdesk-reply:field";
|
|
6
6
|
// Option labels of an actionForm select resolve against the renderer's pseudo-entity, not a real one.
|
|
7
|
-
const FORM_FIELD = "
|
|
7
|
+
const FORM_FIELD = "helpdesk:entity:__action-form__:field";
|
|
8
8
|
|
|
9
|
-
export function
|
|
9
|
+
export function createHelpdeskI18n(): Readonly<Record<string, LocalizedString>> {
|
|
10
10
|
return {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"helpdesk:feature.label": { en: "Contact", de: "Kontakt" },
|
|
12
|
+
"helpdesk:notify.new-request.label": { en: "New contact request", de: "Neue Meldung" },
|
|
13
|
+
"helpdesk:notify.confirmation.label": {
|
|
14
14
|
en: "Contact confirmation",
|
|
15
15
|
de: "Bestätigung der Meldung",
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"helpdesk:notify.acknowledgement.label": {
|
|
18
18
|
en: "Contact acknowledgement",
|
|
19
19
|
de: "Eingangsbestätigung der Meldung",
|
|
20
20
|
},
|
|
21
|
-
"
|
|
21
|
+
"helpdesk:notify.reply.label": {
|
|
22
22
|
en: "Reply to a contact request",
|
|
23
23
|
de: "Antwort auf eine Meldung",
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"helpdesk:notify.reply-in-app.label": {
|
|
26
26
|
en: "Reply note in the app",
|
|
27
27
|
de: "Hinweis auf eine Antwort in der App",
|
|
28
28
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
29
|
+
"helpdesk:notify.test.label": { en: "Contact test message", de: "Testnachricht Kontakt" },
|
|
30
|
+
"helpdesk:report.submit": { en: "Send report", de: "Meldung senden" },
|
|
31
|
+
"helpdesk:reply.submit": { en: "Send reply", de: "Antwort senden" },
|
|
32
|
+
"helpdesk:overview.open": { en: "Open requests", de: "Offene Meldungen" },
|
|
33
|
+
"helpdesk:filter.open": { en: "Open", de: "Offen" },
|
|
34
|
+
"helpdesk:config.reply-to.label": { en: "Reply-To address", de: "Antwortadresse" },
|
|
35
|
+
"helpdesk:config.telegram-chat.label": { en: "Chat id or @channel", de: "Chat-ID oder @Kanal" },
|
|
36
|
+
"helpdesk:entity:helpdesk-request:field:kind": { en: "Kind", de: "Art" },
|
|
37
|
+
"helpdesk:entity:helpdesk-request:field:status": { en: "Status", de: "Status" },
|
|
38
|
+
"helpdesk:entity:helpdesk-request:field:source": { en: "Source", de: "Quelle" },
|
|
39
|
+
"helpdesk:entity:helpdesk-request:field:subject": { en: "Subject", de: "Betreff" },
|
|
40
|
+
"helpdesk:entity:helpdesk-request:field:message": { en: "Message", de: "Nachricht" },
|
|
41
|
+
"helpdesk:entity:helpdesk-request:field:name": { en: "Name", de: "Name" },
|
|
42
|
+
"helpdesk:entity:helpdesk-request:field:email": { en: "Email", de: "E-Mail" },
|
|
43
|
+
"helpdesk:entity:helpdesk-request:field:phone": { en: "Phone", de: "Telefon" },
|
|
44
|
+
"helpdesk:entity:helpdesk-request:field:submittedAt": { en: "Received", de: "Eingang" },
|
|
45
|
+
"helpdesk:entity:helpdesk-request:field:answeredAt": { en: "Answered", de: "Beantwortet" },
|
|
46
|
+
"helpdesk:entity:helpdesk-request:field:closedAt": { en: "Closed", de: "Abgeschlossen" },
|
|
47
|
+
"helpdesk:entity:helpdesk-request:field:replyCount": { en: "Replies", de: "Antworten" },
|
|
48
|
+
"helpdesk:report.hint": {
|
|
49
49
|
en: "Goes straight to the {appName} team",
|
|
50
50
|
de: "Geht direkt an das Team von {appName}",
|
|
51
51
|
},
|
|
52
|
-
"
|
|
52
|
+
"helpdesk:config.send-test.description": {
|
|
53
53
|
en: "Now sends a test message to the chat.",
|
|
54
54
|
de: "Schickt jetzt eine Testnachricht an den Chat.",
|
|
55
55
|
},
|
|
@@ -59,24 +59,24 @@ export function createContactI18n(): Readonly<Record<string, LocalizedString>> {
|
|
|
59
59
|
"screen:reply.title": { en: "Reply", de: "Antworten" },
|
|
60
60
|
"screen:reply-mail.title": { en: "Reply", de: "Antworten" },
|
|
61
61
|
"screen:forwarding.title": { en: "Forwarding of requests", de: "Weiterleitung von Meldungen" },
|
|
62
|
-
"
|
|
62
|
+
"helpdesk:report.summary": {
|
|
63
63
|
en: "The answer comes by email to your account address, usually the same working day.",
|
|
64
64
|
de: "Die Antwort kommt per Mail an die Adresse deines Kontos, meist am selben Werktag.",
|
|
65
65
|
},
|
|
66
|
-
"
|
|
67
|
-
"
|
|
66
|
+
"helpdesk:report.section": { en: "Your report", de: "Deine Meldung" },
|
|
67
|
+
"helpdesk:report.section.description": {
|
|
68
68
|
en: "We attach account, tenant, app version and browser automatically.",
|
|
69
69
|
de: "Konto, Mandant, App-Version und Browser hängen wir automatisch an.",
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"helpdesk:report.success": {
|
|
72
72
|
en: "Thanks, your report has arrived. The answer comes by email.",
|
|
73
73
|
de: "Danke, deine Meldung ist angekommen. Die Antwort kommt per Mail.",
|
|
74
74
|
},
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
75
|
+
"helpdesk:report.field.kind": { en: "Kind", de: "Art" },
|
|
76
|
+
"helpdesk:report.field.phone": { en: "Phone", de: "Telefon" },
|
|
77
|
+
"helpdesk:report.field.subject": { en: "Subject", de: "Betreff" },
|
|
78
|
+
"helpdesk:report.field.message": { en: "What happened?", de: "Was ist passiert?" },
|
|
79
|
+
"helpdesk:report.field.files": { en: "Files", de: "Dateien" },
|
|
80
80
|
[`${FORM_FIELD}:name`]: { en: "Reporter", de: "Absender" },
|
|
81
81
|
[`${FORM_FIELD}:email`]: { en: "Email", de: "E-Mail" },
|
|
82
82
|
[`${FORM_FIELD}:replyTo`]: { en: "Replies go to", de: "Rückantworten an" },
|
|
@@ -84,40 +84,40 @@ export function createContactI18n(): Readonly<Record<string, LocalizedString>> {
|
|
|
84
84
|
[`${FORM_FIELD}:kind:option:question`]: { en: "Question", de: "Frage" },
|
|
85
85
|
[`${FORM_FIELD}:kind:option:bug`]: { en: "Bug", de: "Fehler" },
|
|
86
86
|
[`${FORM_FIELD}:kind:option:wish`]: { en: "Wish", de: "Wunsch" },
|
|
87
|
-
"
|
|
88
|
-
"
|
|
87
|
+
"helpdesk:reply.title": { en: "To {name}", de: "An {name}" },
|
|
88
|
+
"helpdesk:reply.summary.in-app": {
|
|
89
89
|
en: "By email to {email} and in the app. Replies go to {replyTo}.",
|
|
90
90
|
de: "Per E-Mail an {email} und in der App. Rückantworten gehen an {replyTo}.",
|
|
91
91
|
},
|
|
92
|
-
"
|
|
92
|
+
"helpdesk:reply.summary.mail": {
|
|
93
93
|
en: "By email to {email}. Replies go to {replyTo}.",
|
|
94
94
|
de: "Per E-Mail an {email}. Rückantworten gehen an {replyTo}.",
|
|
95
95
|
},
|
|
96
|
-
"
|
|
97
|
-
"
|
|
96
|
+
"helpdesk:reply.section": { en: "Reply", de: "Antwort" },
|
|
97
|
+
"helpdesk:reply.section.description": {
|
|
98
98
|
en: "The request is quoted below in the mail.",
|
|
99
99
|
de: "Die Meldung wird unten in der Mail zitiert.",
|
|
100
100
|
},
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
101
|
+
"helpdesk:reply.field.message": { en: "Message", de: "Nachricht" },
|
|
102
|
+
"helpdesk:reply.field.files": { en: "Files", de: "Dateien" },
|
|
103
|
+
"helpdesk:reply.field.mark-done": {
|
|
104
104
|
en: "Mark the request as done afterwards",
|
|
105
105
|
de: "Meldung danach als erledigt markieren",
|
|
106
106
|
},
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
107
|
+
"helpdesk:filter.all": { en: "All", de: "Alle" },
|
|
108
|
+
"helpdesk:list.from": { en: "From", de: "Von" },
|
|
109
|
+
"helpdesk:action.open": { en: "Open", de: "Öffnen" },
|
|
110
|
+
"helpdesk:action.mark-done": { en: "Mark as done", de: "Als erledigt markieren" },
|
|
111
|
+
"helpdesk:action.reply": { en: "Reply", de: "Antworten" },
|
|
112
|
+
"helpdesk:detail.attachments": { en: "Attachments", de: "Anhänge" },
|
|
113
|
+
"helpdesk:detail.section.message": { en: "Request", de: "Anliegen" },
|
|
114
|
+
"helpdesk:detail.section.replies": { en: "Replies", de: "Antworten" },
|
|
115
|
+
"helpdesk:detail.section.files": { en: "Files", de: "Dateien" },
|
|
116
|
+
"helpdesk:detail.section.sender": { en: "Sender", de: "Absender" },
|
|
117
|
+
"helpdesk:detail.section.origin": { en: "Origin", de: "Herkunft" },
|
|
118
|
+
"helpdesk:detail.section.delivery": { en: "Delivery", de: "Zustellung" },
|
|
119
|
+
"helpdesk:detail.delivery-log": { en: "Delivery log", de: "Zustellprotokoll" },
|
|
120
|
+
"helpdesk:detail.section.notes": { en: "Notes", de: "Notizen" },
|
|
121
121
|
[`${REQUEST_FIELD}:reporterTenantName`]: { en: "Tenant", de: "Mandant" },
|
|
122
122
|
[`${REQUEST_FIELD}:reporterTenantPlan`]: { en: "Tenant plan", de: "Plan des Mandanten" },
|
|
123
123
|
[`${REQUEST_FIELD}:fileCount`]: { en: "Files", de: "Dateien" },
|
|
@@ -137,33 +137,36 @@ export function createContactI18n(): Readonly<Record<string, LocalizedString>> {
|
|
|
137
137
|
[`${REPLY_ENTITY_FIELD}:sentAt`]: { en: "Sent", de: "Gesendet" },
|
|
138
138
|
[`${REPLY_ENTITY_FIELD}:authorName`]: { en: "From", de: "Von" },
|
|
139
139
|
[`${REPLY_ENTITY_FIELD}:message`]: { en: "Message", de: "Nachricht" },
|
|
140
|
-
"
|
|
141
|
-
"
|
|
140
|
+
"helpdesk:forwarding.email": { en: "Email", de: "E-Mail" },
|
|
141
|
+
"helpdesk:forwarding.email.description": {
|
|
142
142
|
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.",
|
|
143
143
|
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.",
|
|
144
144
|
},
|
|
145
|
-
"
|
|
146
|
-
"
|
|
145
|
+
"helpdesk:forwarding.telegram": { en: "Telegram", de: "Telegram" },
|
|
146
|
+
"helpdesk:forwarding.telegram.description": {
|
|
147
147
|
en: "Optional. Requests also go as a message to a Telegram chat or channel.",
|
|
148
148
|
de: "Optional. Meldungen gehen zusätzlich als Nachricht in einen Telegram-Chat oder Kanal.",
|
|
149
149
|
},
|
|
150
|
-
"
|
|
151
|
-
"
|
|
150
|
+
"helpdesk:forwarding.submit": { en: "Save", de: "Speichern" },
|
|
151
|
+
"helpdesk:config.reply-to.description": {
|
|
152
152
|
en: "Used as Reply-To in every answer. Empty means the address of the SystemAdmin who replies.",
|
|
153
153
|
de: "Steht als Reply-To in jeder Antwort. Leer heißt: Adresse des SystemAdmins, der antwortet.",
|
|
154
154
|
},
|
|
155
|
-
"
|
|
155
|
+
"helpdesk:config.telegram-chat.description": {
|
|
156
156
|
en: "Leave empty to not use Telegram.",
|
|
157
157
|
de: "Leer lassen, um Telegram nicht zu nutzen.",
|
|
158
158
|
},
|
|
159
|
-
"
|
|
160
|
-
"
|
|
159
|
+
"helpdesk:config.bot-token.label": { en: "Bot token", de: "Bot-Token" },
|
|
160
|
+
"helpdesk:config.bot-token.description": {
|
|
161
161
|
en: "From @BotFather. Stored encrypted and never shown again.",
|
|
162
162
|
de: "Von @BotFather. Wird verschlüsselt gespeichert und nie wieder angezeigt.",
|
|
163
163
|
},
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
164
|
+
"helpdesk:config.send-test.label": { en: "Test message", de: "Testnachricht" },
|
|
165
|
+
"helpdesk:config.send-test.button": { en: "Send test message", de: "Testnachricht senden" },
|
|
166
|
+
"helpdesk:config.send-test.success": {
|
|
167
|
+
en: "Test message sent.",
|
|
168
|
+
de: "Testnachricht gesendet.",
|
|
169
|
+
},
|
|
167
170
|
[`${REQUEST_FIELD}:origin:option:website`]: { en: "Website", de: "Website" },
|
|
168
171
|
[`${REQUEST_FIELD}:origin:option:admin-report`]: {
|
|
169
172
|
en: "Admin, report a problem",
|