@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.
- package/dist/admin-shell/feature.d.ts +1 -1
- package/dist/agent-tools/api-docs/anchors.js +1 -1
- package/dist/auth-email-password/boot-rules.d.ts +7 -0
- package/dist/auth-email-password/boot-rules.js +7 -0
- package/dist/auth-email-password/feature.js +6 -13
- package/dist/auth-email-password/validate-options.d.ts +5 -0
- package/dist/auth-email-password/validate-options.js +15 -0
- package/dist/billing-foundation/boot-rules.d.ts +22 -0
- package/dist/billing-foundation/boot-rules.js +22 -0
- package/dist/billing-foundation/validate-options.js +56 -18
- package/dist/cap-overview/boot-rules.d.ts +12 -0
- package/dist/cap-overview/boot-rules.js +12 -0
- package/dist/cap-overview/feature.js +8 -3
- package/dist/documents/boot-rules.d.ts +12 -0
- package/dist/documents/boot-rules.js +12 -0
- package/dist/documents/feature.js +8 -3
- package/dist/file-derivatives/boot-rules.d.ts +7 -0
- package/dist/file-derivatives/boot-rules.js +7 -0
- package/dist/file-derivatives/feature.js +5 -2
- package/dist/folders/boot-rules.d.ts +7 -0
- package/dist/folders/boot-rules.js +7 -0
- package/dist/folders/feature.js +8 -5
- package/dist/helpdesk/boot-rules.d.ts +7 -0
- package/dist/helpdesk/boot-rules.js +7 -0
- package/dist/{contact → helpdesk}/challenge.js +2 -2
- package/dist/helpdesk/client/helpdesk-client-source.d.ts +1 -0
- package/dist/{contact/client/contact-client-source.js → helpdesk/client/helpdesk-client-source.js} +4 -4
- package/dist/helpdesk/client/helpdesk-website-client.d.ts +26 -0
- package/dist/helpdesk/client/index.d.ts +2 -0
- package/dist/helpdesk/client/index.js +1 -0
- package/dist/{contact → helpdesk}/entity.d.ts +6 -6
- package/dist/{contact → helpdesk}/entity.js +31 -27
- package/dist/helpdesk/feature.d.ts +3 -0
- package/dist/{contact → helpdesk}/feature.js +43 -39
- package/dist/{contact → helpdesk}/handlers/attempts.d.ts +2 -2
- package/dist/helpdesk/handlers/challenge.query.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/challenge.query.js +5 -5
- package/dist/helpdesk/handlers/forward-request.write.d.ts +9 -0
- package/dist/{contact → helpdesk}/handlers/forward-request.write.js +17 -15
- package/dist/{contact → helpdesk}/handlers/mark-done.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/mark-done.write.js +8 -8
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.d.ts +2 -2
- package/dist/{contact → helpdesk}/handlers/notify-reporter-in-app.write.js +11 -11
- package/dist/{contact → helpdesk}/handlers/open-count.js +2 -2
- package/dist/{contact → helpdesk}/handlers/open-count.query.js +4 -4
- package/dist/{contact → helpdesk}/handlers/replies.query.js +6 -6
- package/dist/{contact → helpdesk}/handlers/reply.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/reply.write.js +16 -16
- package/dist/helpdesk/handlers/report.write.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/report.write.js +17 -17
- package/dist/helpdesk/handlers/request-delivery.query.d.ts +16 -0
- package/dist/{contact → helpdesk}/handlers/request-delivery.query.js +24 -24
- package/dist/{contact → helpdesk}/handlers/request-detail.query.d.ts +3 -3
- package/dist/{contact → helpdesk}/handlers/request-detail.query.js +10 -10
- package/dist/{contact → helpdesk}/handlers/request-list.query.js +2 -2
- package/dist/helpdesk/handlers/send-reply-mail.write.d.ts +8 -0
- package/dist/{contact → helpdesk}/handlers/send-reply-mail.write.js +15 -15
- package/dist/helpdesk/handlers/send-test.write.d.ts +5 -0
- package/dist/{contact → helpdesk}/handlers/send-test.write.js +10 -10
- package/dist/{contact → helpdesk}/handlers/submit.write.d.ts +4 -4
- package/dist/{contact → helpdesk}/handlers/submit.write.js +17 -17
- package/dist/{contact → helpdesk}/handlers/take-over-uploads.js +5 -5
- package/dist/{contact → helpdesk}/i18n.d.ts +1 -1
- package/dist/{contact → helpdesk}/i18n.js +78 -75
- package/dist/helpdesk/index.d.ts +5 -0
- package/dist/helpdesk/index.js +4 -0
- package/dist/{contact → helpdesk}/lib.d.ts +5 -5
- package/dist/{contact → helpdesk}/lib.js +16 -16
- package/dist/{contact → helpdesk}/mail.d.ts +20 -20
- package/dist/{contact → helpdesk}/mail.js +47 -47
- package/dist/{contact → helpdesk}/options.d.ts +6 -6
- package/dist/helpdesk/options.js +36 -0
- package/dist/helpdesk/panels.d.ts +2 -0
- package/dist/helpdesk/panels.js +21 -0
- package/dist/{contact → helpdesk}/payloads.d.ts +11 -11
- package/dist/{contact → helpdesk}/payloads.js +28 -28
- package/dist/helpdesk/screens.d.ts +5 -0
- package/dist/{contact → helpdesk}/screens.js +87 -87
- package/dist/{contact → helpdesk}/subject.js +3 -3
- package/dist/helpdesk/user-data-hooks.d.ts +3 -0
- package/dist/{contact → helpdesk}/user-data-hooks.js +15 -15
- package/dist/helpdesk/web/constants.d.ts +127 -0
- package/dist/helpdesk/web/constants.js +126 -0
- package/dist/helpdesk/web/index.d.ts +1 -0
- package/dist/helpdesk/web/index.js +1 -0
- package/dist/host-routing/boot-rules.d.ts +22 -0
- package/dist/host-routing/boot-rules.js +22 -0
- package/dist/host-routing/validate-options.js +35 -11
- package/dist/jobs/boot-rules.d.ts +7 -0
- package/dist/jobs/boot-rules.js +7 -0
- package/dist/jobs/feature.js +5 -2
- package/dist/legal-pages/boot-rules.d.ts +17 -0
- package/dist/legal-pages/boot-rules.js +17 -0
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/lib/validate-routes.js +11 -3
- package/dist/metrics/boot-rules.d.ts +12 -0
- package/dist/metrics/boot-rules.js +12 -0
- package/dist/metrics/validate.js +8 -2
- package/dist/notes-history/boot-rules.d.ts +7 -0
- package/dist/notes-history/boot-rules.js +7 -0
- package/dist/notes-history/feature.js +7 -4
- package/dist/personal-access-tokens/boot-rules.d.ts +7 -0
- package/dist/personal-access-tokens/boot-rules.js +7 -0
- package/dist/personal-access-tokens/scope-events-check.js +7 -4
- package/dist/presence/boot-rules.d.ts +7 -0
- package/dist/presence/boot-rules.js +7 -0
- package/dist/presence/options.js +5 -1
- package/dist/readiness/boot-rules.d.ts +12 -0
- package/dist/readiness/boot-rules.js +12 -0
- package/dist/readiness/probe-boot-check.js +8 -3
- package/dist/shared/assert-no-where-rule-in-ownership-write.d.ts +1 -1
- package/dist/shared/assert-no-where-rule-in-ownership-write.js +11 -7
- package/dist/shared/boot-rules.d.ts +7 -0
- package/dist/shared/boot-rules.js +7 -0
- package/dist/subscription-mollie/boot-rules.d.ts +17 -0
- package/dist/subscription-mollie/boot-rules.js +17 -0
- package/dist/subscription-mollie/feature.js +13 -6
- package/dist/tags/boot-rules.d.ts +7 -0
- package/dist/tags/boot-rules.js +7 -0
- package/dist/tags/feature.js +8 -5
- package/dist/template-resolver/boot-rules.d.ts +17 -0
- package/dist/template-resolver/boot-rules.js +17 -0
- package/dist/template-resolver/feature.js +14 -5
- package/dist/tenant/boot-rules.d.ts +7 -0
- package/dist/tenant/boot-rules.js +7 -0
- package/dist/tenant/feature.js +5 -2
- package/kumiko-es-tables.json +4 -4
- package/package.json +29 -29
- package/src/{contact → helpdesk}/changes.json +6 -0
- package/dist/contact/client/contact-client-source.d.ts +0 -1
- package/dist/contact/client/contact-website-client.d.ts +0 -26
- package/dist/contact/client/index.d.ts +0 -2
- package/dist/contact/client/index.js +0 -1
- package/dist/contact/feature.d.ts +0 -3
- package/dist/contact/handlers/challenge.query.d.ts +0 -9
- package/dist/contact/handlers/forward-request.write.d.ts +0 -9
- package/dist/contact/handlers/report.write.d.ts +0 -16
- package/dist/contact/handlers/request-delivery.query.d.ts +0 -16
- package/dist/contact/handlers/send-reply-mail.write.d.ts +0 -8
- package/dist/contact/handlers/send-test.write.d.ts +0 -5
- package/dist/contact/index.d.ts +0 -5
- package/dist/contact/index.js +0 -4
- package/dist/contact/options.js +0 -32
- package/dist/contact/panels.d.ts +0 -2
- package/dist/contact/panels.js +0 -21
- package/dist/contact/screens.d.ts +0 -5
- package/dist/contact/user-data-hooks.d.ts +0 -3
- package/dist/contact/web/constants.d.ts +0 -127
- package/dist/contact/web/constants.js +0 -126
- package/dist/contact/web/index.d.ts +0 -1
- package/dist/contact/web/index.js +0 -1
- /package/dist/{contact → helpdesk}/challenge.d.ts +0 -0
- /package/dist/{contact/client/contact-website-client.js → helpdesk/client/helpdesk-website-client.js} +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/access.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/attempts.js +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/open-count.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/replies.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/request-list.query.d.ts +0 -0
- /package/dist/{contact → helpdesk}/handlers/take-over-uploads.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.d.ts +0 -0
- /package/dist/{contact → helpdesk}/pow.js +0 -0
- /package/dist/{contact → helpdesk}/subject.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.d.ts +0 -0
- /package/dist/{contact → helpdesk}/user-agent.js +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type ContactSettings } from "../options.ts";
|
|
2
|
-
import { type ContactPhoneMode } from "../web/constants.ts";
|
|
3
|
-
export type ContactChallengeData = {
|
|
4
|
-
readonly challenge: string;
|
|
5
|
-
readonly bits: number;
|
|
6
|
-
readonly phone: ContactPhoneMode;
|
|
7
|
-
readonly kinds: readonly string[];
|
|
8
|
-
};
|
|
9
|
-
export declare function createChallengeQuery(settings: ContactSettings): import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"challenge", import("zod").ZodObject<{}, import("zod/v4/core").$strict>, ContactChallengeData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ContactOptions } from "../options.ts";
|
|
2
|
-
export type ContactForwardData = {
|
|
3
|
-
readonly kind: "forwarded";
|
|
4
|
-
readonly adminCount: number;
|
|
5
|
-
readonly telegram: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare function createForwardRequestHandler(opts: ContactOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"forward-request", import("zod").ZodObject<{
|
|
8
|
-
requestId: import("zod").ZodUUID;
|
|
9
|
-
}, import("zod/v4/core").$strict>, ContactForwardData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type ContactOptions, type ContactSettings } from "../options.ts";
|
|
2
|
-
export type ContactReportData = {
|
|
3
|
-
readonly kind: "reported";
|
|
4
|
-
readonly id: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function createReportHandler(opts: ContactOptions, settings: ContactSettings): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"report", import("zod").ZodObject<{
|
|
7
|
-
kind: import("zod").ZodEnum<{
|
|
8
|
-
bug: "bug";
|
|
9
|
-
question: "question";
|
|
10
|
-
wish: "wish";
|
|
11
|
-
}>;
|
|
12
|
-
subject: import("zod").ZodString;
|
|
13
|
-
message: import("zod").ZodString;
|
|
14
|
-
phone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
15
|
-
fileIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUUID>>;
|
|
16
|
-
}, import("zod/v4/core").$strict>, ContactReportData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ContactOptions } from "../options.ts";
|
|
2
|
-
import { type ContactDeliveryChannel, type ContactDeliveryStatus } from "../web/constants.ts";
|
|
3
|
-
type DeliveryRow = {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly channel: ContactDeliveryChannel;
|
|
6
|
-
readonly recipient: string;
|
|
7
|
-
readonly at: string;
|
|
8
|
-
readonly status: ContactDeliveryStatus;
|
|
9
|
-
};
|
|
10
|
-
export declare function createRequestDeliveryQuery(opts: ContactOptions): import("@cosmicdrift/kumiko-types/define-handler").QueryHandlerDefinition<"request-delivery", import("zod").ZodObject<{
|
|
11
|
-
id: import("zod").ZodUUID;
|
|
12
|
-
}, import("zod/v4/core").$strict>, {
|
|
13
|
-
rows: DeliveryRow[];
|
|
14
|
-
nextCursor: null;
|
|
15
|
-
}, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap>;
|
|
16
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ContactOptions } from "../options.ts";
|
|
2
|
-
export type ContactSendReplyMailData = {
|
|
3
|
-
readonly kind: "sent";
|
|
4
|
-
readonly attachmentCount: number;
|
|
5
|
-
};
|
|
6
|
-
export declare function createSendReplyMailHandler(opts: ContactOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"send-reply-mail", import("zod").ZodObject<{
|
|
7
|
-
replyId: import("zod").ZodUUID;
|
|
8
|
-
}, import("zod/v4/core").$strict>, ContactSendReplyMailData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ContactOptions } from "../options.ts";
|
|
2
|
-
export type ContactSendTestData = {
|
|
3
|
-
readonly kind: "sent";
|
|
4
|
-
};
|
|
5
|
-
export declare function createSendTestHandler(opts: ContactOptions): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"send-test", import("zod").ZodObject<{}, import("zod/v4/core").$strict>, ContactSendTestData, import("@cosmicdrift/kumiko-types/event-type-map").KumikoEventTypeMap, undefined, undefined>;
|
package/dist/contact/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { contactReplyEntity, contactReplyTable, contactRequestEntity, contactRequestTable, } from "./entity.ts";
|
|
2
|
-
export { createContactFeature } from "./feature.ts";
|
|
3
|
-
export type { ContactOptions } from "./options.ts";
|
|
4
|
-
export { contactOpenRequestsPanels } from "./panels.ts";
|
|
5
|
-
export { CONTACT_ADMIN_KINDS, CONTACT_CLIENT_PATH, CONTACT_DELIVERY_CHANNEL, CONTACT_DELIVERY_STATUS, CONTACT_FEATURE, CONTACT_FIELD_LIMITS, CONTACT_KIND, CONTACT_NOTIFICATION_TYPES, CONTACT_ORIGIN, CONTACT_REPLY_CHANNELS, CONTACT_SOURCE, CONTACT_STATUS, CONTACT_WEBSITE_KINDS, ContactConfigKeys, ContactErrors, ContactHandlers, ContactQueries, ContactScreens, } from "./web/constants.ts";
|
package/dist/contact/index.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { contactReplyEntity, contactReplyTable, contactRequestEntity, contactRequestTable, } from "./entity.js";
|
|
2
|
-
export { createContactFeature } from "./feature.js";
|
|
3
|
-
export { contactOpenRequestsPanels } from "./panels.js";
|
|
4
|
-
export { CONTACT_ADMIN_KINDS, CONTACT_CLIENT_PATH, CONTACT_DELIVERY_CHANNEL, CONTACT_DELIVERY_STATUS, CONTACT_FEATURE, CONTACT_FIELD_LIMITS, CONTACT_KIND, CONTACT_NOTIFICATION_TYPES, CONTACT_ORIGIN, CONTACT_REPLY_CHANNELS, CONTACT_SOURCE, CONTACT_STATUS, CONTACT_WEBSITE_KINDS, ContactConfigKeys, ContactErrors, ContactHandlers, ContactQueries, ContactScreens, } from "./web/constants.js";
|
package/dist/contact/options.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CONTACT_DEFAULT_CHALLENGE_TTL_MINUTES, CONTACT_DEFAULT_MIN_SUBMIT_SECONDS, CONTACT_POW_BITS, } from "./web/constants.js";
|
|
2
|
-
export const DEFAULT_SUBMIT_RATE_LIMIT = {
|
|
3
|
-
per: "ip+handler",
|
|
4
|
-
limit: 5,
|
|
5
|
-
windowSeconds: 10 * 60,
|
|
6
|
-
};
|
|
7
|
-
export const REPORT_RATE_LIMIT = {
|
|
8
|
-
per: "user+handler",
|
|
9
|
-
limit: 10,
|
|
10
|
-
windowSeconds: 60 * 60,
|
|
11
|
-
};
|
|
12
|
-
export const CHALLENGE_RATE_LIMIT = {
|
|
13
|
-
per: "ip+handler",
|
|
14
|
-
limit: 30,
|
|
15
|
-
windowSeconds: 10 * 60,
|
|
16
|
-
};
|
|
17
|
-
export const DEFAULT_SUBMIT_EMAIL_RATE_LIMITS = [
|
|
18
|
-
{ per: { payloadField: "email" }, limit: 3, windowSeconds: 24 * 60 * 60, normalize: "email" },
|
|
19
|
-
];
|
|
20
|
-
export const DEFAULT_RETENTION_KEEP_FOR = "365d";
|
|
21
|
-
export function resolveContactSettings(opts) {
|
|
22
|
-
const bits = opts.spamProtection?.proofOfWorkBits ?? CONTACT_POW_BITS.default;
|
|
23
|
-
if (!Number.isInteger(bits) || bits < CONTACT_POW_BITS.min || bits > CONTACT_POW_BITS.max) {
|
|
24
|
-
throw new Error(`contact: spamProtection.proofOfWorkBits must be an integer between ${CONTACT_POW_BITS.min} and ${CONTACT_POW_BITS.max}, got ${bits}`);
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
phone: opts.fields?.phone ?? "off",
|
|
28
|
-
proofOfWorkBits: bits,
|
|
29
|
-
minSubmitMs: (opts.spamProtection?.minSubmitSeconds ?? CONTACT_DEFAULT_MIN_SUBMIT_SECONDS) * 1000,
|
|
30
|
-
challengeTtlSeconds: (opts.spamProtection?.challengeTtlMinutes ?? CONTACT_DEFAULT_CHALLENGE_TTL_MINUTES) * 60,
|
|
31
|
-
};
|
|
32
|
-
}
|
package/dist/contact/panels.d.ts
DELETED
package/dist/contact/panels.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CONTACT_FEATURE, CONTACT_STATUS, ContactQueries, ContactScreens, } from "./web/constants.js";
|
|
2
|
-
// Stat tile for a dashboard: how many contact requests still wait for a first answer.
|
|
3
|
-
export function contactOpenRequestsPanels() {
|
|
4
|
-
return [
|
|
5
|
-
{
|
|
6
|
-
kind: "stat",
|
|
7
|
-
id: `${CONTACT_FEATURE}-open-requests`,
|
|
8
|
-
label: "contact:overview.open",
|
|
9
|
-
query: ContactQueries.requestList,
|
|
10
|
-
params: {
|
|
11
|
-
filters: [{ field: "status", op: "eq", value: CONTACT_STATUS.Open }],
|
|
12
|
-
limit: 1,
|
|
13
|
-
totalCount: true,
|
|
14
|
-
},
|
|
15
|
-
ignoreScreenFilter: true,
|
|
16
|
-
valueField: "total",
|
|
17
|
-
tone: "warn",
|
|
18
|
-
navigate: { screen: ContactScreens.requestList },
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ScreenDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
-
import type { ContactOptions, ContactSettings } from "./options.ts";
|
|
3
|
-
export declare const REPORT_FIELD_LABEL: string;
|
|
4
|
-
export declare const REPLY_FIELD_LABEL: string;
|
|
5
|
-
export declare function createContactScreens(opts: ContactOptions, settings: ContactSettings): readonly ScreenDefinition[];
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
export declare const CONTACT_FEATURE: "contact";
|
|
2
|
-
export declare const CONTACT_KIND: {
|
|
3
|
-
readonly Question: "question";
|
|
4
|
-
readonly Contact: "contact";
|
|
5
|
-
readonly Bug: "bug";
|
|
6
|
-
readonly Wish: "wish";
|
|
7
|
-
};
|
|
8
|
-
export type ContactKind = (typeof CONTACT_KIND)[keyof typeof CONTACT_KIND];
|
|
9
|
-
export declare const CONTACT_WEBSITE_KINDS: readonly ["question", "contact", "bug"];
|
|
10
|
-
export declare const CONTACT_ADMIN_KINDS: readonly ["question", "bug", "wish"];
|
|
11
|
-
export declare const CONTACT_STATUS: {
|
|
12
|
-
readonly Open: "open";
|
|
13
|
-
readonly Answered: "answered";
|
|
14
|
-
readonly Done: "done";
|
|
15
|
-
};
|
|
16
|
-
export type ContactStatus = (typeof CONTACT_STATUS)[keyof typeof CONTACT_STATUS];
|
|
17
|
-
export declare const CONTACT_SOURCE: {
|
|
18
|
-
readonly Website: "website";
|
|
19
|
-
readonly Admin: "admin";
|
|
20
|
-
};
|
|
21
|
-
export type ContactSource = (typeof CONTACT_SOURCE)[keyof typeof CONTACT_SOURCE];
|
|
22
|
-
export declare const CONTACT_REPLY_CHANNELS: {
|
|
23
|
-
readonly Email: "email";
|
|
24
|
-
readonly EmailAndInApp: "email+inApp";
|
|
25
|
-
};
|
|
26
|
-
export type ContactReplyChannels = (typeof CONTACT_REPLY_CHANNELS)[keyof typeof CONTACT_REPLY_CHANNELS];
|
|
27
|
-
export declare const CONTACT_ORIGIN: {
|
|
28
|
-
readonly Website: "website";
|
|
29
|
-
readonly AdminReport: "admin-report";
|
|
30
|
-
};
|
|
31
|
-
export type ContactOrigin = (typeof CONTACT_ORIGIN)[keyof typeof CONTACT_ORIGIN];
|
|
32
|
-
export declare const CONTACT_DELIVERY_CHANNEL: {
|
|
33
|
-
readonly Email: "email";
|
|
34
|
-
readonly Telegram: "telegram";
|
|
35
|
-
readonly ReplyEmail: "reply-email";
|
|
36
|
-
readonly ReplyInApp: "reply-in-app";
|
|
37
|
-
};
|
|
38
|
-
export type ContactDeliveryChannel = (typeof CONTACT_DELIVERY_CHANNEL)[keyof typeof CONTACT_DELIVERY_CHANNEL];
|
|
39
|
-
export declare const CONTACT_DELIVERY_STATUS: {
|
|
40
|
-
readonly Pending: "pending";
|
|
41
|
-
readonly Delivered: "delivered";
|
|
42
|
-
readonly Failed: "failed";
|
|
43
|
-
readonly Skipped: "skipped";
|
|
44
|
-
readonly Read: "read";
|
|
45
|
-
};
|
|
46
|
-
export type ContactDeliveryStatus = (typeof CONTACT_DELIVERY_STATUS)[keyof typeof CONTACT_DELIVERY_STATUS];
|
|
47
|
-
export type ContactPhoneMode = "off" | "optional" | "required";
|
|
48
|
-
export declare const ContactHandlers: {
|
|
49
|
-
readonly submit: "contact:write:submit";
|
|
50
|
-
readonly report: "contact:write:report";
|
|
51
|
-
readonly reply: "contact:write:reply";
|
|
52
|
-
readonly markDone: "contact:write:mark-done";
|
|
53
|
-
readonly sendTest: "contact:write:send-test";
|
|
54
|
-
readonly forwardRequest: "contact:write:forward-request";
|
|
55
|
-
readonly sendReplyMail: "contact:write:send-reply-mail";
|
|
56
|
-
readonly notifyReporterInApp: "contact:write:notify-reporter-in-app";
|
|
57
|
-
};
|
|
58
|
-
export declare const ContactQueries: {
|
|
59
|
-
readonly challenge: "contact:query:challenge";
|
|
60
|
-
readonly openCount: "contact:query:open-count";
|
|
61
|
-
readonly requestDetail: "contact:query:request-detail";
|
|
62
|
-
readonly replies: "contact:query:replies";
|
|
63
|
-
readonly requestDelivery: "contact:query:request-delivery";
|
|
64
|
-
readonly requestList: "contact:query:contact-request:list";
|
|
65
|
-
};
|
|
66
|
-
export declare const ContactScreens: {
|
|
67
|
-
readonly requestList: "contact:screen:request-list";
|
|
68
|
-
readonly requestDetail: "contact:screen:request-detail";
|
|
69
|
-
readonly report: "contact:screen:report";
|
|
70
|
-
readonly reply: "contact:screen:reply";
|
|
71
|
-
readonly replyMail: "contact:screen:reply-mail";
|
|
72
|
-
readonly forwarding: "contact:screen:forwarding";
|
|
73
|
-
};
|
|
74
|
-
export declare const CONTACT_UPLOAD_FIELD: "fileIds";
|
|
75
|
-
export declare const ContactConfigKeys: {
|
|
76
|
-
readonly replyTo: "contact:config:reply-to";
|
|
77
|
-
readonly telegramChat: "contact:config:telegram-chat";
|
|
78
|
-
};
|
|
79
|
-
export declare const ContactErrors: {
|
|
80
|
-
readonly telegramChatMissing: "telegram_chat_missing";
|
|
81
|
-
readonly telegramTestFailed: "telegram_test_failed";
|
|
82
|
-
readonly notFound: "contact_request_not_found";
|
|
83
|
-
readonly phoneNotAllowed: "contact_phone_not_allowed";
|
|
84
|
-
readonly phoneRequired: "contact_phone_required";
|
|
85
|
-
readonly reporterEmailMissing: "contact_reporter_email_missing";
|
|
86
|
-
readonly attachmentNotFound: "contact_attachment_not_found";
|
|
87
|
-
};
|
|
88
|
-
export declare const CONTACT_NOTIFICATION_TYPES: {
|
|
89
|
-
readonly newRequest: "contact:notify:new-request";
|
|
90
|
-
readonly confirmation: "contact:notify:confirmation";
|
|
91
|
-
readonly acknowledgement: "contact:notify:acknowledgement";
|
|
92
|
-
readonly reply: "contact:notify:reply";
|
|
93
|
-
readonly replyInApp: "contact:notify:reply-in-app";
|
|
94
|
-
readonly test: "contact:notify:test";
|
|
95
|
-
};
|
|
96
|
-
export declare const CONTACT_CLIENT_PATH: "/contact/client.js";
|
|
97
|
-
export declare const CONTACT_FIELD_LIMITS: {
|
|
98
|
-
readonly name: 120;
|
|
99
|
-
readonly email: 254;
|
|
100
|
-
readonly phone: 40;
|
|
101
|
-
readonly subject: 200;
|
|
102
|
-
readonly message: 5000;
|
|
103
|
-
readonly locale: 35;
|
|
104
|
-
readonly honeypot: 500;
|
|
105
|
-
readonly page: 300;
|
|
106
|
-
readonly challenge: 64;
|
|
107
|
-
readonly nonce: 32;
|
|
108
|
-
};
|
|
109
|
-
export declare const CONTACT_MAX_FILES = 5;
|
|
110
|
-
export declare const CONTACT_SUBJECT_MAX_CHARS = 80;
|
|
111
|
-
export declare const CONTACT_POW_BITS: {
|
|
112
|
-
readonly min: 8;
|
|
113
|
-
readonly max: 26;
|
|
114
|
-
readonly default: 19;
|
|
115
|
-
};
|
|
116
|
-
export declare const CONTACT_DEFAULT_MIN_SUBMIT_SECONDS = 3;
|
|
117
|
-
export declare const CONTACT_DEFAULT_CHALLENGE_TTL_MINUTES = 30;
|
|
118
|
-
export declare const CONTACT_CHALLENGE_REDIS_PREFIX: "contact:challenge:";
|
|
119
|
-
export declare const CONTACT_REQUEST_ENTITY: "contact-request";
|
|
120
|
-
export declare const CONTACT_REPLY_ENTITY: "contact-reply";
|
|
121
|
-
export declare const contactIdempotencyKeys: {
|
|
122
|
-
readonly admins: (requestId: string) => string;
|
|
123
|
-
readonly telegram: (requestId: string) => string;
|
|
124
|
-
readonly confirmation: (requestId: string) => string;
|
|
125
|
-
readonly reply: (replyId: string) => string;
|
|
126
|
-
readonly replyInApp: (replyId: string) => string;
|
|
127
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// Pure string constants, safe for browser code (see waitlist/web/constants.ts).
|
|
2
|
-
export const CONTACT_FEATURE = "contact";
|
|
3
|
-
export const CONTACT_KIND = {
|
|
4
|
-
Question: "question",
|
|
5
|
-
Contact: "contact",
|
|
6
|
-
Bug: "bug",
|
|
7
|
-
Wish: "wish",
|
|
8
|
-
};
|
|
9
|
-
export const CONTACT_WEBSITE_KINDS = [
|
|
10
|
-
CONTACT_KIND.Question,
|
|
11
|
-
CONTACT_KIND.Contact,
|
|
12
|
-
CONTACT_KIND.Bug,
|
|
13
|
-
];
|
|
14
|
-
export const CONTACT_ADMIN_KINDS = [
|
|
15
|
-
CONTACT_KIND.Question,
|
|
16
|
-
CONTACT_KIND.Bug,
|
|
17
|
-
CONTACT_KIND.Wish,
|
|
18
|
-
];
|
|
19
|
-
export const CONTACT_STATUS = {
|
|
20
|
-
Open: "open",
|
|
21
|
-
Answered: "answered",
|
|
22
|
-
Done: "done",
|
|
23
|
-
};
|
|
24
|
-
export const CONTACT_SOURCE = {
|
|
25
|
-
Website: "website",
|
|
26
|
-
Admin: "admin",
|
|
27
|
-
};
|
|
28
|
-
export const CONTACT_REPLY_CHANNELS = {
|
|
29
|
-
Email: "email",
|
|
30
|
-
EmailAndInApp: "email+inApp",
|
|
31
|
-
};
|
|
32
|
-
export const CONTACT_ORIGIN = {
|
|
33
|
-
Website: "website",
|
|
34
|
-
AdminReport: "admin-report",
|
|
35
|
-
};
|
|
36
|
-
export const CONTACT_DELIVERY_CHANNEL = {
|
|
37
|
-
Email: "email",
|
|
38
|
-
Telegram: "telegram",
|
|
39
|
-
ReplyEmail: "reply-email",
|
|
40
|
-
ReplyInApp: "reply-in-app",
|
|
41
|
-
};
|
|
42
|
-
export const CONTACT_DELIVERY_STATUS = {
|
|
43
|
-
Pending: "pending",
|
|
44
|
-
Delivered: "delivered",
|
|
45
|
-
Failed: "failed",
|
|
46
|
-
Skipped: "skipped",
|
|
47
|
-
Read: "read",
|
|
48
|
-
};
|
|
49
|
-
export const ContactHandlers = {
|
|
50
|
-
submit: "contact:write:submit",
|
|
51
|
-
report: "contact:write:report",
|
|
52
|
-
reply: "contact:write:reply",
|
|
53
|
-
markDone: "contact:write:mark-done",
|
|
54
|
-
sendTest: "contact:write:send-test",
|
|
55
|
-
forwardRequest: "contact:write:forward-request",
|
|
56
|
-
sendReplyMail: "contact:write:send-reply-mail",
|
|
57
|
-
notifyReporterInApp: "contact:write:notify-reporter-in-app",
|
|
58
|
-
};
|
|
59
|
-
export const ContactQueries = {
|
|
60
|
-
challenge: "contact:query:challenge",
|
|
61
|
-
openCount: "contact:query:open-count",
|
|
62
|
-
requestDetail: "contact:query:request-detail",
|
|
63
|
-
replies: "contact:query:replies",
|
|
64
|
-
requestDelivery: "contact:query:request-delivery",
|
|
65
|
-
// Entity-convention list QN: entityList screens resolve their query by this shape.
|
|
66
|
-
requestList: "contact:query:contact-request:list",
|
|
67
|
-
};
|
|
68
|
-
export const ContactScreens = {
|
|
69
|
-
requestList: "contact:screen:request-list",
|
|
70
|
-
requestDetail: "contact:screen:request-detail",
|
|
71
|
-
report: "contact:screen:report",
|
|
72
|
-
reply: "contact:screen:reply",
|
|
73
|
-
replyMail: "contact:screen:reply-mail",
|
|
74
|
-
forwarding: "contact:screen:forwarding",
|
|
75
|
-
};
|
|
76
|
-
// Files field of both upload forms (report, reply); the uploads are pending under the screen QN.
|
|
77
|
-
export const CONTACT_UPLOAD_FIELD = "fileIds";
|
|
78
|
-
export const ContactConfigKeys = {
|
|
79
|
-
replyTo: "contact:config:reply-to",
|
|
80
|
-
telegramChat: "contact:config:telegram-chat",
|
|
81
|
-
};
|
|
82
|
-
export const ContactErrors = {
|
|
83
|
-
telegramChatMissing: "telegram_chat_missing",
|
|
84
|
-
telegramTestFailed: "telegram_test_failed",
|
|
85
|
-
notFound: "contact_request_not_found",
|
|
86
|
-
phoneNotAllowed: "contact_phone_not_allowed",
|
|
87
|
-
phoneRequired: "contact_phone_required",
|
|
88
|
-
reporterEmailMissing: "contact_reporter_email_missing",
|
|
89
|
-
attachmentNotFound: "contact_attachment_not_found",
|
|
90
|
-
};
|
|
91
|
-
export const CONTACT_NOTIFICATION_TYPES = {
|
|
92
|
-
newRequest: "contact:notify:new-request",
|
|
93
|
-
confirmation: "contact:notify:confirmation",
|
|
94
|
-
acknowledgement: "contact:notify:acknowledgement",
|
|
95
|
-
reply: "contact:notify:reply",
|
|
96
|
-
replyInApp: "contact:notify:reply-in-app",
|
|
97
|
-
test: "contact:notify:test",
|
|
98
|
-
};
|
|
99
|
-
export const CONTACT_CLIENT_PATH = "/contact/client.js";
|
|
100
|
-
export const CONTACT_FIELD_LIMITS = {
|
|
101
|
-
name: 120,
|
|
102
|
-
email: 254,
|
|
103
|
-
phone: 40,
|
|
104
|
-
subject: 200,
|
|
105
|
-
message: 5000,
|
|
106
|
-
locale: 35,
|
|
107
|
-
honeypot: 500,
|
|
108
|
-
page: 300,
|
|
109
|
-
challenge: 64,
|
|
110
|
-
nonce: 32,
|
|
111
|
-
};
|
|
112
|
-
export const CONTACT_MAX_FILES = 5;
|
|
113
|
-
export const CONTACT_SUBJECT_MAX_CHARS = 80;
|
|
114
|
-
export const CONTACT_POW_BITS = { min: 8, max: 26, default: 19 };
|
|
115
|
-
export const CONTACT_DEFAULT_MIN_SUBMIT_SECONDS = 3;
|
|
116
|
-
export const CONTACT_DEFAULT_CHALLENGE_TTL_MINUTES = 30;
|
|
117
|
-
export const CONTACT_CHALLENGE_REDIS_PREFIX = "contact:challenge:";
|
|
118
|
-
export const CONTACT_REQUEST_ENTITY = "contact-request";
|
|
119
|
-
export const CONTACT_REPLY_ENTITY = "contact-reply";
|
|
120
|
-
export const contactIdempotencyKeys = {
|
|
121
|
-
admins: (requestId) => `contact:request:${requestId}:admins`,
|
|
122
|
-
telegram: (requestId) => `contact:request:${requestId}:telegram`,
|
|
123
|
-
confirmation: (requestId) => `contact:request:${requestId}:confirmation`,
|
|
124
|
-
reply: (replyId) => `contact:reply:${replyId}`,
|
|
125
|
-
replyInApp: (replyId) => `contact:reply:${replyId}:in-app`,
|
|
126
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CONTACT_ADMIN_KINDS, CONTACT_CLIENT_PATH, CONTACT_DELIVERY_CHANNEL, CONTACT_DELIVERY_STATUS, CONTACT_FEATURE, CONTACT_FIELD_LIMITS, CONTACT_KIND, CONTACT_NOTIFICATION_TYPES, CONTACT_ORIGIN, CONTACT_REPLY_CHANNELS, CONTACT_SOURCE, CONTACT_STATUS, CONTACT_SUBJECT_MAX_CHARS, CONTACT_WEBSITE_KINDS, ContactConfigKeys, type ContactDeliveryChannel, type ContactDeliveryStatus, ContactErrors, ContactHandlers, type ContactKind, type ContactOrigin, type ContactPhoneMode, ContactQueries, type ContactReplyChannels, ContactScreens, type ContactSource, type ContactStatus, } from "./constants.ts";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CONTACT_ADMIN_KINDS, CONTACT_CLIENT_PATH, CONTACT_DELIVERY_CHANNEL, CONTACT_DELIVERY_STATUS, CONTACT_FEATURE, CONTACT_FIELD_LIMITS, CONTACT_KIND, CONTACT_NOTIFICATION_TYPES, CONTACT_ORIGIN, CONTACT_REPLY_CHANNELS, CONTACT_SOURCE, CONTACT_STATUS, CONTACT_SUBJECT_MAX_CHARS, CONTACT_WEBSITE_KINDS, ContactConfigKeys, ContactErrors, ContactHandlers, ContactQueries, ContactScreens, } from "./constants.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|