Skip to content

SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.

migrate domains page from ce to ee

Ahmed Essamebfe8db2d458
diff --git a/packages/app/src/backend/routes/api/page/domains.ts b/packages/app/src/backend/routes/api/page/domains.ts
deleted file mode 100644
index b2ad45ad..00000000
--- a/packages/app/src/backend/routes/api/page/domains.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import express from 'express';
-import { smythAPIReq, forwardToSmythAPIMiddleware, authHeaders } from '../../../utils/';
-
-const router = express.Router();
-
-router.get('/domainsList', async (req, res) => {
- try {
- const result = await smythAPIReq.get('/domains?verified=true', await authHeaders(req));
- return res.json(result.data.domains);
- } catch (error) {
- console.log('error', error);
- return res
- .status(error?.status || error?.response?.status || 500)
- .json({ error: error?.message });
- }
-});
-
-const smythProxy = forwardToSmythAPIMiddleware({ endpointBuilder: (req) => `/domain${req.url}` });
-
-// forward all other requests to smyth api
-router.get('/*', smythProxy);
-router.post('/*', smythProxy);
-router.put('/*', smythProxy);
-router.delete('/*', smythProxy);
-
-export default router;
diff --git a/packages/app/src/backend/routes/api/page/index.ts b/packages/app/src/backend/routes/api/page/index.ts
index 374fd0a8..03098766 100644
--- a/packages/app/src/backend/routes/api/page/index.ts
+++ b/packages/app/src/backend/routes/api/page/index.ts
@@ -5,7 +5,6 @@ import aiagents from './aiagents';
import builder from './builder';
import { chatRouter } from './chat';
import collection from './collection';
-import domains from './domains';
import logs from './logs';
import { onboardRouter } from './onboard';
import plans from './plans';
@@ -16,8 +15,6 @@ import user from './user';
import vault from './vault';
const routers = {
- domains,
- // vectors,
agents,
templates,
teams,
diff --git a/packages/app/src/react/app/routeMap.tsx b/packages/app/src/react/app/routeMap.tsx
index f1198429..211eb1b5 100644
--- a/packages/app/src/react/app/routeMap.tsx
+++ b/packages/app/src/react/app/routeMap.tsx
@@ -8,7 +8,6 @@ import AccountPage from '../features/account/pages/AccountPage';
import AgentSettingsBulkCallPage from '../features/agent-settings/pages/AgentSettingsBulkCallPage';
import AgentSettingsPage from '../features/agent-settings/pages/AgentSettingsPage';
import AIChatPage from '../features/ai-chat/pages/ai-chat';
-import DomainsPage from '../features/domains-space/pages/DomainsPage';
import PartnersPage from '../features/partners/pages/PartnersPage';
import FeaturePageUpsell from '../features/subscriptions/components/paywalls/feature-page-upsell';
import {
@@ -25,16 +24,7 @@ import SinglePriceSubscriptionPage from '../features/subscriptions/pages/SingleP
import TemplatesPage from '../features/templates/pages/TemplatesPage';
export const routeMap: IPageRoute[] = [
- {
- path: '/domains',
- component: DomainsPage,
- access: {
- subscriptionBased: true,
- checkAccess: (subs) => subs.plan.properties?.flags?.domainRegistrationEnabled,
- UpsellContent: <FeaturePageUpsell.Subdomains />,
- },
- title: 'Domains',
- },
+
{ path: '/templates', component: TemplatesPage, title: 'Templates' },
diff --git a/packages/app/src/react/features/domains-space/clients/domain.api-client.service.ts b/packages/app/src/react/features/domains-space/clients/domain.api-client.service.ts
deleted file mode 100644
index 5933215c..00000000
--- a/packages/app/src/react/features/domains-space/clients/domain.api-client.service.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { apiPayloadTypes } from '@react/shared/types';
-
-export const postDomain = (data: apiPayloadTypes.PostDomainRequest) =>
- fetch('/api/page/domains/', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify(data),
- });
-
-export const verifyDomain = (domain: string) =>
- fetch(`/api/page/domains/${domain}/verify`, { headers: { 'Content-Type': 'application/json' } });
-
-export const getHost = async (domain: string): Promise<{ host: string }> => {
- const result = await fetch(`/api/page/domains/${domain}/get-cname-target`);
- return result.json();
-};
-
-export const getDomains = () => fetch('/api/page/domains/domainsList').then((res) => res.json());
diff --git a/packages/app/src/react/features/domains-space/clients/index.ts b/packages/app/src/react/features/domains-space/clients/index.ts
deleted file mode 100644
index f0797d97..00000000
--- a/packages/app/src/react/features/domains-space/clients/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * as domainAPI from './domain.api-client.service';
diff --git a/packages/app/src/react/features/domains-space/components/dialogs/add.domain.tsx b/packages/app/src/react/features/domains-space/components/dialogs/add.domain.tsx
deleted file mode 100644
index 3620371a..00000000
--- a/packages/app/src/react/features/domains-space/components/dialogs/add.domain.tsx
+++ /dev/null
@@ -1,213 +0,0 @@
-import { useMutation } from '@tanstack/react-query';
-import { Dispatch, FC, SetStateAction, useState } from 'react';
-import { IoArrowBack } from 'react-icons/io5';
-
-import { domainAPI } from '@react/features/domains-space/clients';
-import { Input } from '@react/shared/components/ui/input';
-import Modal from '@react/shared/components/ui/modals/Modal';
-import { Button } from '@react/shared/components/ui/newDesign/button';
-import { extractError } from '@react/shared/utils/errors';
-
-interface AddDomainComponent {
- onClose?: () => void;
- setDomainData?: Dispatch<SetStateAction<any[]>>;
-}
-
-const modalStepTitles = ['Enter your subdomain', 'Verify your domain'];
-
-export const AddDomain: FC<AddDomainComponent> = ({ onClose, setDomainData }) => {
- const [currStepTitle, setCurrStepTitle] = useState(modalStepTitles[0]);
-
- return (
- <Modal onClose={onClose} title={currStepTitle} panelClasses="lg:min-w-[48vw] md:min-w-[48vw]">
- <AddDomainContent
- setCurrStepTitle={setCurrStepTitle}
- onClose={onClose}
- setDomainData={setDomainData}
- />
- </Modal>
- );
-};
-
-interface AddDomainContentComponent {
- setCurrStepTitle?: Dispatch<SetStateAction<string>>;
- onClose?: () => void;
- setDomainData?: Dispatch<SetStateAction<any[]>>;
- onDomainCreation?: (domainName: any) => void;
-}
-
-export const AddDomainContent: FC<AddDomainContentComponent> = ({
- setCurrStepTitle = () => {},
- onClose = () => {},
- setDomainData = () => {},
- onDomainCreation = (domainName: string) => {},
-}) => {
- const [domainInput, setInputValue] = useState('');
- const [domainVerificationErr, setDomainVerificationErr] = useState<string | null>(null);
- const [domainVerificationSuccess, setDomainVerificationSuccess] = useState(false);
- const [targetHost, setHost] = useState(null);
-
- const hostMutation = useMutation({
- mutationFn: domainAPI.getHost,
- onSuccess: (data) => {
- setHost(data.host);
- setCurrStepTitle(modalStepTitles[1]);
- },
- });
-
- const domainVerificationMutation = useMutation({
- mutationFn: domainAPI.verifyDomain,
- mutationKey: ['verifyDomain'],
- onSuccess: () => setDomainVerificationSuccess(true),
- });
-
- const createDomain = useMutation({ mutationFn: domainAPI.postDomain });
-
- const handleDomainChange = (value: string) => {
- const regex = /^(www\.)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
- const sanitizedValue: string = value.replace(/^(http:\/\/|https:\/\/)/, '').trim();
- const validDomain = regex.test(sanitizedValue);
-
- if (validDomain) {
- const domainParts = sanitizedValue.split('.');
- // check if it is not a subdomain, if so, tell user to enter a subdomain
- if (domainParts.length < 3) {
- setDomainVerificationErr(
- 'Enter a valid subdomain, using subdomains allows you to host multiple agents on the same top domain.',
- );
- } else setDomainVerificationErr(null);
- } else setDomainVerificationErr('Please enter a valid domain.');
-
- setInputValue(value);
- return;
- };
-
- const handleDomainChoiceSubmit = async () => {
- if (domainVerificationErr) return;
- await hostMutation.mutateAsync(domainInput);
- };
-
- const resetModal = () => {
- setHost(null);
- setDomainVerificationSuccess(false);
- setCurrStepTitle(modalStepTitles[0]);
- setDomainVerificationErr(null);
- setDomainVerificationSuccess(false);
- domainVerificationMutation.reset();
- hostMutation.reset();
- createDomain.reset();
- };
-
- const handleDomainSubmission = async () => {
- if (createDomain.isLoading) return;
- const res = await createDomain.mutateAsync({ name: domainInput });
- const json = await res.json();
- setDomainData((prevDomainData) => [json.domain, ...prevDomainData]);
- onDomainCreation(domainInput);
- onClose();
- };
-
- return (
- <div className="pt-5">
- {targetHost && (
- <div className="flex items-center cursor-pointer pt-2 pb-2 min-w-fit" onClick={resetModal}>
- <IoArrowBack className="mr-1" />
- <span>Back</span>
- </div>
- )}
-
- {!targetHost && (
- <div>
- <div className="flex items-center w-full py-3">
- <Input
- value={domainInput}
- onChange={(event) => handleDomainChange(event.target.value)}
- fullWidth
- placeholder="Ex: smyth.mydomain.com"
- />
- <Button
- handleClick={handleDomainChoiceSubmit}
- disabled={
- hostMutation.isLoading ||
- domainVerificationMutation.isLoading ||
- Boolean(domainVerificationErr) ||
- !domainInput?.trim()
- }
- className="mt-1 ml-2 "
- label="Next"
- loading={hostMutation.isLoading}
- />
- </div>
- {domainVerificationErr && (
- <p className="m-0 pt-1 text-red-600 text-sm">{domainVerificationErr}</p>
- )}
- {hostMutation.isError && (
- <p className="m-0 pt-1 text-red-600 text-sm" id="error">
- {extractError(hostMutation.error) || 'Something went wrong'}
- </p>
- )}
- </div>
- )}
-
- {targetHost && (
- <div>
- <p className="py-4">Create a CNAME record with the following values then click verify.</p>
- <div className="border secondary-grey border-solid rounded-md border-[#DFDFDF] p-3">
- <div>
- <span className="font-bold">Host: </span>
- <span id="hostValue" className="break-all">
- {' '}
- {domainInput}
- </span>
- </div>
- <div className="pt-2">
- <span className="font-bold">Target:</span>
- <span className="break-all"> {hostMutation.data?.host}</span>
- </div>
- </div>
-
- <p className="mt-4">
- <span className=" font-semibold">Note:</span> It may take up to 24 hours for the changes
- to take effect because of DNS propagation.
- </p>
-
- {!domainVerificationSuccess && (
- <Button
- handleClick={() => domainVerificationMutation.mutate(domainInput)}
- className="mt-4 bg-v2-blue"
- label="Verify"
- loading={domainVerificationMutation.isLoading}
- fullWidth
- />
- )}
-
- {domainVerificationMutation.isSuccess && (
- <p className="success-text mt-2 text-center">Domain verified successfully ✅</p>
- )}
- {domainVerificationMutation.isError && (
- <p className="m-0 pt-1 text-red-600 text-sm mt-2" id="error">
- {extractError(domainVerificationMutation.error) || 'Something went wrong'}
- </p>
- )}
-
- {domainVerificationSuccess && (
- <Button
- handleClick={handleDomainSubmission}
- className="mt-4 bg-v2-blue"
- label="Add Domain"
- disabled={!domainVerificationMutation.isSuccess || createDomain.isLoading}
- loading={createDomain.isLoading}
- fullWidth
- />
- )}
-
- {createDomain.isError && (
- <div className="pt-2 text-red-600 text-sm">
- {extractError(createDomain.error) || 'Something went wrong'}
- </div>
- )}
- </div>
- )}
- </div>
- );
-};
diff --git a/packages/app/src/react/features/domains-space/components/dialogs/delete.domain.tsx b/packages/app/src/react/features/domains-space/components/dialogs/delete.domain.tsx
deleted file mode 100644
index c876ff72..00000000
--- a/packages/app/src/react/features/domains-space/components/dialogs/delete.domain.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { FC } from 'react';
-
-import { Input } from '@react/shared/components/ui/input';
-import Modal from '@react/shared/components/ui/modals/Modal';
-import { Button } from '@react/shared/components/ui/newDesign/button';
-
-interface State {
- inputValue: string;
- deleteError: boolean;
- errorMessage?: string;
- deleteLoading: boolean;
- selectedDomain: string;
- dialogOpen: boolean;
-}
-interface DomainDeletionPopup {
- onClose?: () => void;
- state?: State;
- handleChange?: Function;
- handleDeleteDomain?: Function;
-}
-export const DomainDeletionModal: FC<DomainDeletionPopup> = (props) => {
- const { onClose, state, handleChange, handleDeleteDomain } = props;
-
- return (
- <Modal onClose={onClose} title="Confirm Domain URL Deletion">
- <div className="text-sm space-y-1 pb-2 pt-1">
- <p>
- Please be aware that deleting this Domain URL will permanently remove it from your records
- and could impact linked agents.
- </p>
- <p>
- Type the domaine name to confirm:&nbsp;
- <span className="font-bold">{state.selectedDomain}</span>
- </p>
- </div>
- <Input
- value={state.inputValue}
- onChange={(event) => handleChange(event.target.value)}
- fullWidth
- placeholder="Type domain name"
- id="namespaceDeleteInput"
- error={state.deleteError}
- errorMessage={state.errorMessage}
- />
- <Button
- fullWidth
- isDelete
- variant="primary"
- className="mt-2"
- handleClick={() => handleDeleteDomain(state.inputValue)}
- label="Delete"
- addIcon={state.deleteLoading}
- Icon={
- state.deleteLoading ? <div id="loader" className="circular-loader mr-2"></div> : undefined
- }
- disabled={state.inputValue !== state.selectedDomain || state.deleteLoading}
- />
- </Modal>
- );
-};
diff --git a/packages/app/src/react/features/domains-space/components/domains.table.tsx b/packages/app/src/react/features/domains-space/components/domains.table.tsx
deleted file mode 100644
index 131951a4..00000000
--- a/packages/app/src/react/features/domains-space/components/domains.table.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-import { Tooltip } from 'flowbite-react';
-import { Dispatch, FC, SetStateAction, useState } from 'react';
-import { Link } from 'react-router-dom';
-
-import { DomainDeletionModal } from '@react/features/domains-space/components';
-import { extractError } from '@react/shared/utils/errors';
-import { Trash2 } from 'lucide-react';
-
-interface IdName {
- id: string;
- name: string;
-}
-interface DataItem extends IdName {
- aiAgent: IdName;
- aiAgentEndpoint: { path: string }[];
-}
-
-interface DomainsTableProps {
- dataArray: DataItem[];
- setDomainData?: Dispatch<SetStateAction<any[]>>;
-}
-
-export const DomainsTable: FC<DomainsTableProps> = ({ dataArray, setDomainData }) => {
- const [state, setState] = useState({
- inputValue: '',
- deleteError: false,
- errorMessage: '',
- deleteLoading: false,
- selectedDomain: '',
- dialogOpen: false,
- });
-
- const handleDeleteDomain = async (value) => {
- setState({ ...state, deleteLoading: true });
-
- try {
- const data = await fetch('/api/page/domains/delete', {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ name: value }),
- });
-
- const filteredDomain = dataArray.filter((item) => item.name !== value);
-
- setDomainData(filteredDomain);
- setState({
- ...state,
- deleteLoading: false,
- deleteError: false,
- inputValue: '',
- dialogOpen: false,
- });
- } catch (error) {
- const _errorMessage =
- error.status === 403 && extractError(error) === 'Forbidden'
- ? 'You are not authorized to delete this domain'
- : extractError(error) || 'An error occurred while deleting the domain';
- setState({ ...state, deleteLoading: false, errorMessage: _errorMessage, deleteError: true });
- }
- };
-
- const handleChange = (value) => setState({ ...state, inputValue: value, deleteError: false });
-
- return (
- <div className="relative overflow-hidden">
- <div className="overflow-x-auto">
- <table className="w-full table-auto border border-solid border-gray-100">
- <thead className="bg-gray-50">
- <tr>
- <th className="px-4 sm:px-6 py-3 text-left text-xs font-semibold text-[#242424] uppercase tracking-wider whitespace-nowrap">
- Name
- </th>
- <th className="px-4 sm:px-6 py-3 text-left text-xs font-semibold text-[#242424] uppercase tracking-wider whitespace-nowrap">
- Agent
- </th>
- <th className="px-4 sm:px-6 py-3 text-left text-xs font-semibold text-[#242424] uppercase tracking-wider whitespace-nowrap">
- Endpoints
- </th>
- <th className="text-right px-4 sm:px-6 py-3 text-xs font-semibold text-[#242424] uppercase tracking-wider whitespace-nowrap">
- Actions
- </th>
- </tr>
- </thead>
-
- <tbody className="bg-white divide-y divide-gray-200">
- {dataArray?.map((item, index) => (
- <tr
- key={index}
- className="hover:bg-gray-50 border-b border-solid border-gray-100 h-12"
- >
- {/* Name Column */}
- <td className="px-6 py-4 whitespace-nowrap min-w-[200px] text-[#111827]">
- <div className="flex items-center w-full h-full break-all">
- <span className="whitespace-normal text-wrap">{item?.name}</span>
- </div>
- </td>
- {/* Agent Column */}
- <td className="px-6 py-4 whitespace-nowrap min-w-[200px] text-[#6B7280]">
- <div className="flex items-center w-full h-full">
- {item.aiAgent && item.aiAgent?.name ? (
- <Link to={`/builder/${item.aiAgent.id}`} target="_blank">
- <span className="cursor-pointer domainAgent">{item.aiAgent?.name}</span>
- </Link>
- ) : (
- 'N/A'
- )}
- </div>
- </td>
- {/* Endpoints Column */}
- <td className="px-6 py-4 whitespace-nowrap min-w-[200px] text-[#6B7280]">
- <div className="flex items-center w-full h-full break-all">
- {item.aiAgentEndpoint && item.aiAgentEndpoint.length > 0
- ? item.aiAgentEndpoint.map((agent) => (agent?.path ? agent.path : 'N/A'))
- : 'N/A'}
- </div>
- </td>
- {/* Actions Column */}
- <td className="px-6 py-4 whitespace-nowrap text-[#6B7280]">
- <div className="flex items-center h-full justify-end">
- <Tooltip content="Delete Domain" placement="top" className="min-w-max">
- <Trash2
- data-tooltip-target="deleteDomain"
- onClick={() =>
- setState({
- ...state,
- inputValue: '',
- dialogOpen: true,
- selectedDomain: item?.name,
- })
- }
- id="deleteDomain"
- className="h-4 w-4 text-[#242424] cursor-pointer"
- />
- </Tooltip>
- </div>
- </td>
- </tr>
- ))}
- </tbody>
- </table>
-
- {state.dialogOpen && (
- <DomainDeletionModal
- state={state}
- onClose={() => setState({ ...state, inputValue: '', dialogOpen: false })}
- handleChange={handleChange}
- handleDeleteDomain={handleDeleteDomain}
- />
- )}
- </div>
- </div>
- );
-};
diff --git a/packages/app/src/react/features/domains-space/components/index.tsx b/packages/app/src/react/features/domains-space/components/index.tsx
deleted file mode 100644
index 8e947302..00000000
--- a/packages/app/src/react/features/domains-space/components/index.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './dialogs/add.domain';
-export * from './dialogs/delete.domain';
-export * from './domains.table';
diff --git a/packages/app/src/react/features/domains-space/pages/DomainsPage.tsx b/packages/app/src/react/features/domains-space/pages/DomainsPage.tsx
deleted file mode 100644
index 4893f26a..00000000
--- a/packages/app/src/react/features/domains-space/pages/DomainsPage.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { ChangeEvent, useMemo, useState } from 'react';
-import { createPortal } from 'react-dom';
-
-import { domainAPI } from '@react/features/domains-space/clients';
-import { AddDomain, DomainsTable } from '@react/features/domains-space/components';
-import HeaderSearch from '@react/shared/components/headerSearch';
-import { Button as CustomButton } from '@react/shared/components/ui/newDesign/button';
-import TableRowSkeleton from '@react/shared/components/ui/table/table.row.skeleton';
-import { useAuthCtx } from '@react/shared/contexts/auth.context';
-import { SMYTHOS_DOCS_URL } from '@src/shared/constants/general';
-import { useQuery } from '@tanstack/react-query';
-
-const DomainsPage = () => {
- const [openAddDialog, setOpenAddDialog] = useState(false);
- const [searchQuery, setSearchQuery] = useState('');
- const [domainData, setDomainData] = useState([]);
-
- const { isLoading: loading } = useQuery({
- queryKey: ['domains'],
- queryFn: domainAPI.getDomains,
- onSuccess: (data) => setDomainData(data),
- });
-
- const { hasReadOnlyPageAccess } = useAuthCtx();
-
- const isReadOnlyAccess = hasReadOnlyPageAccess('/domains');
-
- // Filter domains based on search query
- const filteredDomains = useMemo(() => {
- if (!searchQuery) return domainData;
- return domainData.filter((domain: any) =>
- domain.name.toLowerCase().includes(searchQuery.toLowerCase()),
- );
- }, [domainData, searchQuery]);
-
- const handleSearchChange = (e: ChangeEvent<HTMLInputElement>) => setSearchQuery(e.target.value);
-
- const renderSkeletonLoading = () => {
- return Array.from({ length: 3 }).map((_, index) => (
- <TableRowSkeleton key={`skeleton-row-${index}`} className="py-5 my-3" />
- ));
- };
-
- return (
- <div className="pl-12 md:pl-0">
- <div className="flex mb-6 flex-wrap flex-col md:flex-row md:flex-nowrap items-center w-full justify-between md:justify-end">
- <HeaderSearch
- leftComponent={
- <div className="verfication flex items-center">
- <img src="/img/domain.icons/check-badge.svg" alt="" />
- <span className="pl-1 min-w-[200px]">VERIFIED SUBDOMAINS</span>
- </div>
- }
- handleClick={() => setOpenAddDialog(true)}
- label="Add Subdomain"
- addIcon
- search
- placeholder="Search Subdomain"
- isReadOnlyAccess={isReadOnlyAccess}
- btnAttributes={{ 'data-test': 'add-subdomain-button' }}
- handleChange={handleSearchChange}
- isButtonHidden={domainData?.length === 0}
- />
- </div>
- {loading ? (
- <div className="py-3">{renderSkeletonLoading()}</div>
- ) : filteredDomains.length === 0 ? (
- searchQuery ? (
- <div className="text-center text-xl font-bold py-6 md:py-12">
- No matching subdomains found.
- </div>
- ) : (
- <div className="flex justify-center items-start py-16 pl-12 md:pl-0">
- <div className="max-w-md w-full mx-auto flex flex-col items-center p-4 text-center">
- <h4 className="text-2xl font-medium text-black text-center ml-2 mb-2">
- Add your subdomain
- </h4>
- <p className="mb-8">
- Use subdomains to host your agents on custom, branded URLs. SmythOS supports custom
- subdomain verification through DNS and lets you connect verified domains directly
- during deployment.
- </p>
- <div className="flex justify-between items-center gap-4 mt-2 w-full">
- <CustomButton
- handleClick={() => {
- window.open(
- `${SMYTHOS_DOCS_URL}/agent-deployments/subdomains/`,
- '_blank',
- 'noopener,noreferrer',
- );
- }}
- className="flex-1"
- label={'Learn more'}
- variant="secondary"
- />
- <CustomButton
- handleClick={() => setOpenAddDialog(true)}
- addIcon={true}
- label={'Add Subdomain'}
- className="flex-1"
- />
- </div>
- </div>
- </div>
- )
- ) : (
- <div className="pb-6 overflow-hidden rounded-lg">
- <DomainsTable dataArray={filteredDomains} setDomainData={setDomainData} />
- </div>
- )}
- {openAddDialog &&
- createPortal(
- <AddDomain onClose={() => setOpenAddDialog(false)} setDomainData={setDomainData} />,
- document.body,
- )}
- </div>
- );
-};
-
-export default DomainsPage;
diff --git a/packages/app/src/react/shared/constants/navigation.ts b/packages/app/src/react/shared/constants/navigation.ts
index 3a597878..ec773102 100644
--- a/packages/app/src/react/shared/constants/navigation.ts
+++ b/packages/app/src/react/shared/constants/navigation.ts
@@ -1,7 +1,6 @@
import { plugins, PluginTarget, PluginType } from '@src/react/shared/plugins/Plugins';
import { SMYTHOS_DOCS_URL } from '@src/shared/constants/general';
import {
- BinaryTreeIcon,
BookIcon,
DiscordIcon,
GridIcon,
@@ -31,7 +30,6 @@ export const getSidebarMenuItems = (): SidebarMenuItem[] => {
return [
{ url: '/agents', name: 'Home', icon: HomeIcon, visible: true, order: 1 },
- { url: '/domains', name: 'Subdomains', icon: BinaryTreeIcon, visible: true, order: 3 },
{ url: '/analytics', name: 'Analytics', icon: LineChartIcon, visible: true, order: 4 },
{ url: '/vault', name: 'Vault', icon: KeyIcon, visible: true, order: 5 },
{ url: '/templates', name: 'Templates', icon: GridIcon, visible: true, order: 6 },
diff --git a/packages/app/src/react/shared/types/api-payload.types.ts b/packages/app/src/react/shared/types/api-payload.types.ts
index e221adcd..9574e6ef 100644
--- a/packages/app/src/react/shared/types/api-payload.types.ts
+++ b/packages/app/src/react/shared/types/api-payload.types.ts
@@ -36,10 +36,6 @@ export interface UpdateTeamMemberRoleRequest {
roleId: number;
}
-export interface PostDomainRequest {
- name: string;
-}
-
export interface CreateAgentScheduledJobRequest {
jobType: 'AGENT_SCHEDULE';
name?: string;