Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+146
@@ -0,0 +1,146 @@
|
||||
// @vitest-environment node
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("@toolctrl/queue", () => ({
|
||||
buildNotificationJob: vi.fn((payload) => ({ name: "notification", payload })),
|
||||
enqueueJob: vi.fn(),
|
||||
queueNames: { notifications: "notifications" },
|
||||
resolveRedisConnectionOptions: vi.fn(() => undefined),
|
||||
}));
|
||||
|
||||
vi.mock("@toolctrl/queue/runtime", () => ({
|
||||
createQueue: vi.fn(() => ({ close: vi.fn(async () => undefined) })),
|
||||
}));
|
||||
|
||||
vi.mock("@toolctrl/db/notifications.server", () => ({
|
||||
createNotificationDelivery: vi.fn(async (input) => ({ id: "delivery_1", ...input })),
|
||||
redactNotificationDiagnosticText: vi.fn((value: string) => value),
|
||||
}));
|
||||
|
||||
vi.mock("~/utils/db/permissions/roles.db.server", () => ({
|
||||
getRolesByName: vi.fn(async () => []),
|
||||
}));
|
||||
|
||||
vi.mock("~/utils/db/permissions/userRoles.db.server", () => ({
|
||||
getUsersRolesInTenant: vi.fn(async () => []),
|
||||
}));
|
||||
|
||||
vi.mock("~/utils/db/users.db.server", () => ({
|
||||
getAdminUsersInRoles: vi.fn(async () => []),
|
||||
}));
|
||||
|
||||
import { createNotificationDelivery } from "@toolctrl/db/notifications.server";
|
||||
import { enqueueJob, resolveRedisConnectionOptions } from "@toolctrl/queue";
|
||||
import NotificationService, { mapNotificationChannelToCategory } from "./NotificationService";
|
||||
|
||||
const user = {
|
||||
id: "user_1",
|
||||
email: "user@example.test",
|
||||
firstName: "Ada",
|
||||
lastName: "Lovelace",
|
||||
phone: null,
|
||||
defaultTenantId: "tenant_1",
|
||||
};
|
||||
|
||||
describe("NotificationService", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
delete process.env.NOTIFICATIONS_NOVU_API_KEY;
|
||||
vi.unstubAllGlobals();
|
||||
});
|
||||
|
||||
it("records skipped deliveries when the queue is not configured", async () => {
|
||||
await NotificationService.send({
|
||||
channel: "admin-users",
|
||||
tenantId: "tenant_1",
|
||||
to: user,
|
||||
notification: { message: "Profile changed" },
|
||||
});
|
||||
|
||||
expect(createNotificationDelivery).toHaveBeenCalledWith({
|
||||
tenantId: "tenant_1",
|
||||
userId: "user_1",
|
||||
channel: "in-app",
|
||||
category: "team",
|
||||
messageKey: "admin-users",
|
||||
status: "SKIPPED",
|
||||
lastError: "Notification queue is not configured.",
|
||||
payloadMetadata: {
|
||||
source: "legacy-notification-service",
|
||||
reason: "queue-not-configured",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("records skipped deliveries when a configured queue fails", async () => {
|
||||
vi.mocked(resolveRedisConnectionOptions).mockReturnValue({ host: "127.0.0.1", port: 6379 } as any);
|
||||
vi.mocked(enqueueJob).mockRejectedValue(new Error("Redis connection failed"));
|
||||
|
||||
await NotificationService.send({
|
||||
channel: "admin-users",
|
||||
tenantId: "tenant_1",
|
||||
to: user,
|
||||
notification: { message: "Profile changed" },
|
||||
});
|
||||
|
||||
expect(createNotificationDelivery).toHaveBeenCalledWith({
|
||||
tenantId: "tenant_1",
|
||||
userId: "user_1",
|
||||
channel: "in-app",
|
||||
category: "team",
|
||||
messageKey: "admin-users",
|
||||
status: "SKIPPED",
|
||||
lastError: "Redis connection failed",
|
||||
payloadMetadata: {
|
||||
source: "legacy-notification-service",
|
||||
reason: "queue-enqueue-failed",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("maps subscription notifications to billing preferences", () => {
|
||||
expect(mapNotificationChannelToCategory("admin-subscriptions")).toBe("billing");
|
||||
});
|
||||
|
||||
it("returns null for Novu provider error responses", async () => {
|
||||
process.env.NOTIFICATIONS_NOVU_API_KEY = "novu-secret";
|
||||
const fetchMock = vi.fn(async () => new Response(JSON.stringify({ message: "unauthorized" }), { status: 401 }));
|
||||
vi.stubGlobal("fetch", fetchMock);
|
||||
|
||||
await expect(NotificationService.getSubscribers({})).resolves.toBeNull();
|
||||
|
||||
expect(fetchMock).toHaveBeenCalledWith(
|
||||
"https://api.novu.co/v1/subscribers?page=0",
|
||||
expect.objectContaining({
|
||||
headers: expect.objectContaining({ Authorization: "ApiKey novu-secret" }),
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it("passes tenantId through to enqueueJob so the priority resolver can run", async () => {
|
||||
vi.mocked(resolveRedisConnectionOptions).mockReturnValue({ host: "127.0.0.1", port: 6379 } as any);
|
||||
vi.mocked(enqueueJob).mockResolvedValue({ id: "job_priority_1" } as any);
|
||||
|
||||
await NotificationService.send({
|
||||
channel: "admin-users",
|
||||
tenantId: "tenant_priority_1",
|
||||
to: user,
|
||||
notification: { message: "Profile changed" },
|
||||
});
|
||||
|
||||
const lastCall = vi.mocked(enqueueJob).mock.calls.at(-1);
|
||||
expect(lastCall?.[2]).toMatchObject({ tenantId: "tenant_priority_1" });
|
||||
});
|
||||
|
||||
it("returns null for Novu provider network failures", async () => {
|
||||
process.env.NOTIFICATIONS_NOVU_API_KEY = "novu-secret";
|
||||
vi.stubGlobal(
|
||||
"fetch",
|
||||
vi.fn(async () => {
|
||||
throw new Error("network down");
|
||||
})
|
||||
);
|
||||
|
||||
await expect(NotificationService.getIntegrations()).resolves.toBeNull();
|
||||
});
|
||||
});
|
||||
+383
@@ -0,0 +1,383 @@
|
||||
import { buildNotificationJob, enqueueJob, queueNames, resolveRedisConnectionOptions, type RedisConnectionEnv, type TypedQueue } from "@toolctrl/queue";
|
||||
import { createNotificationDelivery, redactNotificationDiagnosticText } from "@toolctrl/db/notifications.server";
|
||||
import { getRolesByName } from "~/utils/db/permissions/roles.db.server";
|
||||
import { getUsersRolesInTenant } from "~/utils/db/permissions/userRoles.db.server";
|
||||
import { getAdminUsersInRoles } from "~/utils/db/users.db.server";
|
||||
import { NotificationIntegrationDto } from "../../dtos/NotificationIntegrationDto";
|
||||
import { NotificationMessageDto } from "../../dtos/NotificationMessageDto";
|
||||
import { NotificationSubscriberDto } from "../../dtos/NotificationSubscriberDto";
|
||||
import { NotificationTemplateDto } from "../../dtos/NotificationTemplateDto";
|
||||
import { NotificationChannel, NotificationChannels } from "../NotificationChannels";
|
||||
|
||||
type NotificationQueue = TypedQueue<typeof queueNames.notifications>;
|
||||
|
||||
async function withNotificationQueue<T>(env: RedisConnectionEnv | undefined, task: (queue: NotificationQueue) => Promise<T>): Promise<T | undefined> {
|
||||
const connection = resolveRedisConnectionOptions({ env });
|
||||
if (!connection) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const queueRuntimeModule = "@toolctrl/queue/runtime";
|
||||
const { createQueue } = (await import(/* @vite-ignore */ queueRuntimeModule)) as typeof import("@toolctrl/queue/runtime");
|
||||
const queue = createQueue(queueNames.notifications, { connection });
|
||||
try {
|
||||
return await task(queue);
|
||||
} finally {
|
||||
await queue.close();
|
||||
}
|
||||
}
|
||||
|
||||
async function novuApiFetch<T>(path: string, init?: RequestInit): Promise<T | null> {
|
||||
if (!process.env.NOTIFICATIONS_NOVU_API_KEY) {
|
||||
return null;
|
||||
}
|
||||
let response: Response;
|
||||
try {
|
||||
response = await fetch(`https://api.novu.co/v1${path}`, {
|
||||
...init,
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `ApiKey ${process.env.NOTIFICATIONS_NOVU_API_KEY}`,
|
||||
...(init?.headers ?? {}),
|
||||
},
|
||||
});
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
if (!response.ok) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return (await response.json()) as T;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IGetSubscribersData {
|
||||
page: number;
|
||||
totalCount: number;
|
||||
pageSize: number;
|
||||
data: NotificationSubscriberDto[];
|
||||
}
|
||||
async function getSubscribers({ page }: { page?: number }): Promise<IGetSubscribersData | null> {
|
||||
const query = new URLSearchParams({ page: String((page ?? 1) - 1) });
|
||||
return novuApiFetch<IGetSubscribersData>(`/subscribers?${query}`);
|
||||
}
|
||||
|
||||
export interface IGetMessagesData {
|
||||
page: number;
|
||||
totalCount: number;
|
||||
pageSize: number;
|
||||
data: NotificationMessageDto[];
|
||||
}
|
||||
async function getMessages({ channel, subscriberId, limit, page }: { channel?: string; subscriberId?: string; limit?: number; page?: number }) {
|
||||
let query = new URLSearchParams();
|
||||
if (channel) {
|
||||
query.append("channel", channel);
|
||||
}
|
||||
if (subscriberId) {
|
||||
query.append("subscriberId", subscriberId);
|
||||
}
|
||||
if (limit) {
|
||||
query.append("limit", limit.toString());
|
||||
}
|
||||
if (page === undefined) {
|
||||
page = 1;
|
||||
}
|
||||
if (page) {
|
||||
query.append("page", (page - 1).toString());
|
||||
}
|
||||
return novuApiFetch<IGetMessagesData>(`/messages?${query}`);
|
||||
}
|
||||
|
||||
export interface IGetTemplatesData {
|
||||
page: number;
|
||||
totalCount: number;
|
||||
pageSize: number;
|
||||
data: NotificationTemplateDto[];
|
||||
}
|
||||
async function getNotificationTemplates({ limit, page }: { limit?: number; page?: number }) {
|
||||
const query = new URLSearchParams();
|
||||
if (limit) query.append("limit", String(limit));
|
||||
if (page) query.append("page", String(page));
|
||||
return novuApiFetch<IGetTemplatesData>(`/notification-templates?${query}`);
|
||||
}
|
||||
|
||||
// interface ICreateNotificationTemplateArgs {
|
||||
// name: string;
|
||||
// notificationGroupId: string;
|
||||
// tags?: string[];
|
||||
// description?: string;
|
||||
// steps?: {
|
||||
// template: {
|
||||
// type: "in_app" | "email" | "sms" | "chat" | "push" | "digest" | "trigger" | "delay";
|
||||
// variables: {
|
||||
// type: "String";
|
||||
// name: string;
|
||||
// defaultValue: string;
|
||||
// required: boolean;
|
||||
// }[];
|
||||
// content: string;
|
||||
// };
|
||||
// }[];
|
||||
// active?: boolean;
|
||||
// draft?: boolean;
|
||||
// critical?: boolean;
|
||||
// preferenceSettings?: IPreferenceChannels;
|
||||
// }
|
||||
// async function createNotificationTemplate(data: ICreateNotificationTemplateArgs) {
|
||||
// const novu = getClient();
|
||||
// if (!novu) {
|
||||
// return;
|
||||
// }
|
||||
// const response = await novu.notificationTemplates.create(data);
|
||||
// return response.data as NotificationTemplateDto;
|
||||
// }
|
||||
|
||||
export interface IGetIntegrationsData {
|
||||
data: NotificationIntegrationDto[];
|
||||
}
|
||||
async function getIntegrations() {
|
||||
return novuApiFetch<IGetIntegrationsData>("/integrations");
|
||||
}
|
||||
|
||||
type NotificationAttachmentChannel = "in_app" | "email" | "sms" | "chat" | "push" | "digest" | "trigger" | "delay";
|
||||
interface IAttachmentOptions {
|
||||
mime: string;
|
||||
file: Buffer;
|
||||
name?: string;
|
||||
channels?: NotificationAttachmentChannel[];
|
||||
}
|
||||
interface INotificationUser {
|
||||
id: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
phone: string | null;
|
||||
defaultTenantId?: string | null;
|
||||
}
|
||||
|
||||
interface INotification {
|
||||
from?: { user?: INotificationUser | null };
|
||||
message: string;
|
||||
action?: {
|
||||
title?: string;
|
||||
url: string;
|
||||
};
|
||||
data?: { [key: string]: string | string[] | boolean | number | undefined | IAttachmentOptions | IAttachmentOptions[] | Record<string, unknown> };
|
||||
attachments?: IAttachmentOptions[];
|
||||
}
|
||||
|
||||
function getNotificationSourceKey(channel: string, notification: INotification): string | undefined {
|
||||
const directSourceKey = typeof notification.data?.sourceKey === "string" ? notification.data.sourceKey : undefined;
|
||||
const notificationSourceKey = typeof notification.data?.notificationSourceKey === "string" ? notification.data.notificationSourceKey : undefined;
|
||||
const normalized = (directSourceKey ?? notificationSourceKey)?.trim();
|
||||
if (normalized) {
|
||||
return normalized;
|
||||
}
|
||||
|
||||
const requestId = typeof notification.data?.requestId === "string" ? notification.data.requestId.trim() : "";
|
||||
return requestId ? `${channel}:request:${requestId}` : undefined;
|
||||
}
|
||||
|
||||
function createSkippedNotificationDelivery({
|
||||
targetTenantId,
|
||||
to,
|
||||
channel,
|
||||
reason,
|
||||
lastError,
|
||||
}: {
|
||||
targetTenantId: string;
|
||||
to: INotificationUser;
|
||||
channel: string;
|
||||
reason: string;
|
||||
lastError: string;
|
||||
}) {
|
||||
return createNotificationDelivery({
|
||||
tenantId: targetTenantId,
|
||||
userId: to.id,
|
||||
channel: "in-app",
|
||||
category: mapNotificationChannelToCategory(channel),
|
||||
messageKey: channel,
|
||||
status: "SKIPPED",
|
||||
lastError,
|
||||
payloadMetadata: {
|
||||
source: "legacy-notification-service",
|
||||
reason,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function send({
|
||||
channel,
|
||||
to,
|
||||
notification,
|
||||
tenantId,
|
||||
required = false,
|
||||
}: {
|
||||
channel: string;
|
||||
to: INotificationUser;
|
||||
notification: INotification;
|
||||
tenantId?: string | null;
|
||||
required?: boolean;
|
||||
}) {
|
||||
if (notification.from?.user?.id === to.id) {
|
||||
const isLocalDevelopmentMode = process.env.NODE_ENV === "development";
|
||||
if (!isLocalDevelopmentMode) {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("[LOCAL DEV] Skipping sending notification to self.");
|
||||
notification.message = `[dev] ${notification.message}`;
|
||||
}
|
||||
|
||||
if (notification.from?.user?.email === to.email) {
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
return;
|
||||
}
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("[LOCAL DEV] Skipping sending notification to self.");
|
||||
}
|
||||
if (notification.action && !notification.action?.title) {
|
||||
notification.action.title = "View";
|
||||
}
|
||||
|
||||
const targetTenantId = tenantId ?? (typeof notification.data?.tenantId === "string" ? notification.data.tenantId : undefined) ?? to.defaultTenantId;
|
||||
if (!targetTenantId) {
|
||||
const message = "Notification delivery requires tenantId.";
|
||||
if (process.env.NODE_ENV !== "test") {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`[NotificationService.send()] ${message}`);
|
||||
}
|
||||
if (required) {
|
||||
throw new Error(message);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const queued = await withNotificationQueue(process.env as RedisConnectionEnv, async (queue) => {
|
||||
const descriptor = buildNotificationJob({
|
||||
tenantId: targetTenantId,
|
||||
userId: to.id,
|
||||
email: to.email,
|
||||
channel: "in-app",
|
||||
category: mapNotificationChannelToCategory(channel),
|
||||
messageKey: channel,
|
||||
sourceKey: getNotificationSourceKey(channel, notification),
|
||||
metadata: {
|
||||
source: "legacy-notification-service",
|
||||
...(notification.action?.url ? { actionUrl: notification.action.url } : {}),
|
||||
...(notification.message ? { message: notification.message } : {}),
|
||||
},
|
||||
templateData: {
|
||||
...notification.data,
|
||||
from: notification.from,
|
||||
message: notification.message,
|
||||
action: notification.action,
|
||||
attachments: notification.attachments,
|
||||
},
|
||||
});
|
||||
return enqueueJob(queue, descriptor, { tenantId: targetTenantId });
|
||||
});
|
||||
if (!queued && required) {
|
||||
throw new Error("Notification queue is not configured.");
|
||||
}
|
||||
if (!queued) {
|
||||
return createSkippedNotificationDelivery({
|
||||
targetTenantId,
|
||||
to,
|
||||
channel,
|
||||
reason: "queue-not-configured",
|
||||
lastError: "Notification queue is not configured.",
|
||||
});
|
||||
}
|
||||
return queued;
|
||||
} catch (e: any) {
|
||||
const message = e instanceof Error ? e.message : String(e);
|
||||
const redactedMessage = redactNotificationDiagnosticText(message);
|
||||
// eslint-disable-next-line no-console
|
||||
console.error("[NotificationService.send()] Error: " + redactedMessage);
|
||||
if (required) {
|
||||
throw new Error(redactedMessage);
|
||||
}
|
||||
return createSkippedNotificationDelivery({
|
||||
targetTenantId,
|
||||
to,
|
||||
channel,
|
||||
reason: "queue-enqueue-failed",
|
||||
lastError: redactedMessage,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function mapNotificationChannelToCategory(channel: string) {
|
||||
if (channel === "admin-subscriptions") {
|
||||
return "billing";
|
||||
}
|
||||
if (channel.startsWith("admin-")) {
|
||||
return "team";
|
||||
}
|
||||
if (channel === "my-rows" || channel === "roles") {
|
||||
return "team";
|
||||
}
|
||||
return "default";
|
||||
}
|
||||
|
||||
async function sendToRoles({ channel, notification, tenantId }: { channel: NotificationChannel; tenantId?: string | null; notification: INotification }) {
|
||||
const notificationChannel = NotificationChannels.find((f) => f.name === channel);
|
||||
if (!notificationChannel?.roles) {
|
||||
return;
|
||||
}
|
||||
const allRoles = await getRolesByName(notificationChannel.roles);
|
||||
const adminRoles = allRoles.filter((f) => f.type === "admin");
|
||||
const appRoles = allRoles.filter((f) => f.type === "app");
|
||||
|
||||
const sentToUsers: string[] = [];
|
||||
|
||||
const adminUsersInRoles = await getAdminUsersInRoles(adminRoles.map((m) => m.id));
|
||||
await Promise.all(
|
||||
adminUsersInRoles.map(async (adminUser) => {
|
||||
if (sentToUsers.includes(adminUser.id)) {
|
||||
return;
|
||||
}
|
||||
sentToUsers.push(adminUser.id);
|
||||
await send({ channel: notificationChannel.name, to: adminUser, tenantId: tenantId ?? adminUser.defaultTenantId, notification });
|
||||
})
|
||||
);
|
||||
|
||||
if (tenantId) {
|
||||
const tenantUserRoles = await getUsersRolesInTenant(tenantId);
|
||||
await Promise.all(
|
||||
appRoles.map(async (role) => {
|
||||
const usersInRole = tenantUserRoles.filter((f) => f.roleId === role.id);
|
||||
return await Promise.all(
|
||||
usersInRole.map(async ({ user }) => {
|
||||
if (sentToUsers.includes(user.id)) {
|
||||
return;
|
||||
}
|
||||
sentToUsers.push(user.id);
|
||||
return await send({ channel: notificationChannel.name, to: user, tenantId, notification });
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteNotificationTemplate(id: string) {
|
||||
await novuApiFetch(`/notification-templates/${id}/status`, { method: "PATCH", body: JSON.stringify({ active: false }) });
|
||||
return novuApiFetch(`/notification-templates/${id}`, { method: "DELETE" });
|
||||
}
|
||||
|
||||
export default {
|
||||
getSubscribers,
|
||||
getMessages,
|
||||
getIntegrations,
|
||||
getNotificationTemplates,
|
||||
// createNotificationTemplate,
|
||||
deleteNotificationTemplate,
|
||||
send,
|
||||
sendToRoles,
|
||||
};
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { NotificationChannels } from "./NotificationChannels";
|
||||
|
||||
describe("NotificationChannels", () => {
|
||||
it("uses translation keys for visible channel descriptions", () => {
|
||||
for (const channel of NotificationChannels) {
|
||||
expect(channel.descriptionKey).toBe(`notifications.admin.channelDescriptions.${channel.name}`);
|
||||
expect(channel).not.toHaveProperty("description");
|
||||
}
|
||||
});
|
||||
});
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
import { DefaultAdminRoles } from "~/application/dtos/shared/DefaultAdminRoles";
|
||||
import { DefaultAppRoles } from "~/application/dtos/shared/DefaultAppRoles";
|
||||
|
||||
const NotificationChannelTypes = [
|
||||
"admin-accounts",
|
||||
"admin-users",
|
||||
"admin-subscriptions",
|
||||
"admin-api-keys",
|
||||
"admin-emails",
|
||||
"admin-groups",
|
||||
"admin-linked-accounts",
|
||||
"admin-account-members",
|
||||
"admin-onboarding",
|
||||
"admin-rows",
|
||||
"roles",
|
||||
"my-rows",
|
||||
] as const;
|
||||
export type NotificationChannel = typeof NotificationChannelTypes[number];
|
||||
|
||||
export interface NotificationChannelDto {
|
||||
name: NotificationChannel;
|
||||
descriptionKey: `notifications.admin.channelDescriptions.${NotificationChannel}`;
|
||||
roles?: string[];
|
||||
}
|
||||
|
||||
export const NotificationChannels: NotificationChannelDto[] = [
|
||||
{
|
||||
name: "admin-accounts",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-accounts",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-users",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-users",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-subscriptions",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-subscriptions",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-api-keys",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-api-keys",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-emails",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-emails",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-groups",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-groups",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-linked-accounts",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-linked-accounts",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-account-members",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-account-members",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-onboarding",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-onboarding",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "admin-rows",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.admin-rows",
|
||||
roles: [DefaultAdminRoles.SuperAdmin],
|
||||
},
|
||||
{
|
||||
name: "roles",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.roles",
|
||||
roles: [DefaultAppRoles.SuperUser],
|
||||
},
|
||||
{
|
||||
name: "my-rows",
|
||||
descriptionKey: "notifications.admin.channelDescriptions.my-rows",
|
||||
},
|
||||
];
|
||||
Reference in new issue
Block a user