2025-12-08 08:49:59 +01:00

49 lines
1.6 KiB
TypeScript

import { MatchConfig } from "./types";
export const MATCH_CONFIGS: Record<string, MatchConfig> = {
"permissions-to-groups": {
type: "permissions-to-groups",
sourceLabel: "Permissions",
targetLabel: "Groups",
sourceEndpoint: "/api/dashboard/admin/permissions",
targetEndpoint: "/api/dashboard/admin/groups",
sourceCollectionKeys: ["permissions", "data", "items"],
targetCollectionKeys: ["groups", "data", "items"],
sourcePrimaryKey: "name",
targetPrimaryKey: "name",
},
"methods-to-psp": {
type: "methods-to-psp",
sourceLabel: "Methods",
targetLabel: "PSPs",
sourceEndpoint: "/api/dashboard/admin/methods",
targetEndpoint: "/api/dashboard/admin/psps",
sourceCollectionKeys: ["methods", "data", "items"],
targetCollectionKeys: ["psps", "data", "items"],
sourcePrimaryKey: "name",
targetPrimaryKey: "name",
},
"psp-to-merchant": {
type: "psp-to-merchant",
sourceLabel: "PSPs",
targetLabel: "Merchants",
sourceEndpoint: "/api/dashboard/admin/psps",
targetEndpoint: "/api/dashboard/admin/merchants",
sourceCollectionKeys: ["psps", "data", "items"],
targetCollectionKeys: ["merchants", "data", "items"],
sourcePrimaryKey: "name",
targetPrimaryKey: "name",
},
"groups-to-users": {
type: "groups-to-users",
sourceLabel: "Groups",
targetLabel: "Users",
sourceEndpoint: "/api/dashboard/admin/groups",
targetEndpoint: "/api/dashboard/admin/users",
sourceCollectionKeys: ["groups", "data", "items"],
targetCollectionKeys: ["users", "data", "items"],
sourcePrimaryKey: "name",
targetPrimaryKey: "email",
},
};