Skip to content

lib/routeMap

const StudioCMSRoutes: {
authLinks: {
auth0Callback: string;
auth0Index: string;
discordCallback: string;
discordIndex: string;
githubCallback: string;
githubIndex: string;
googleCallback: string;
googleIndex: string;
loginAPI: string;
loginURL: string;
logoutAPI: string;
logoutURL: string;
registerAPI: string;
signupURL: string;
};
endpointLinks: {
apiTokens: string;
config: string;
content: {
folder: string;
page: string;
};
createResetLink: string;
newUsers: {
create: string;
invite: string;
};
partials: {
editor: string;
livePreviewBox: string;
render: string;
userListItems: string;
};
plugins: string;
profile: string;
resetPassword: string;
searchList: string;
users: string;
verifySession: string;
};
fts: {
step1: string;
step2: string;
};
mainLinks: {
baseSiteURL: string;
contentManagement: string;
contentManagementCreate: string;
contentManagementDiff: string;
contentManagementEdit: string;
contentManagementFolderCreate: string;
contentManagementFolderEdit: string;
createPage: string;
dashboardIndex: string;
plugins: string;
siteConfiguration: string;
userManagement: string;
userManagementEdit: string;
userProfile: string;
};
sdk: {
fallback_pages: string;
pages: string;
updateLatestVersionCache: string;
};
};

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:91

An object containing various route mappings for the StudioCMS application.

authLinks: {
auth0Callback: string;
auth0Index: string;
discordCallback: string;
discordIndex: string;
githubCallback: string;
githubIndex: string;
googleCallback: string;
googleIndex: string;
loginAPI: string;
loginURL: string;
logoutAPI: string;
logoutURL: string;
registerAPI: string;
signupURL: string;
};

auth0Callback: string;

API route for Auth0 authentication callback.

auth0Index: string;

API route for Auth0 authentication index.

discordCallback: string;

API route for Discord authentication callback.

discordIndex: string;

API route for Discord authentication index.

githubCallback: string;

API route for GitHub authentication callback.

githubIndex: string;

API route for GitHub authentication index.

googleCallback: string;

API route for Google authentication callback.

googleIndex: string;

API route for Google authentication index.

loginAPI: string;

API route for logging in.

loginURL: string;

URL for the login page.

logoutAPI: string;

API route for logging out.

logoutURL: string;

URL for the logout page.

registerAPI: string;

API route for registering a new user.

signupURL: string;

URL for the signup page.

endpointLinks: {
apiTokens: string;
config: string;
content: {
folder: string;
page: string;
};
createResetLink: string;
newUsers: {
create: string;
invite: string;
};
partials: {
editor: string;
livePreviewBox: string;
render: string;
userListItems: string;
};
plugins: string;
profile: string;
resetPassword: string;
searchList: string;
users: string;
verifySession: string;
};

apiTokens: string;

API route for fetching API tokens.

config: string;

API route for fetching configuration.

content: {
folder: string;
page: string;
};

folder: string;

API route for fetching folder content.

page: string;

API route for fetching page content.

createResetLink: string;

API route for creating a password reset link.

newUsers: {
create: string;
invite: string;
};

create: string;

API route for creating a new user.

invite: string;

API route for inviting a new user.

partials: {
editor: string;
livePreviewBox: string;
render: string;
userListItems: string;
};

editor: string;

API route for the editor.

livePreviewBox: string;

API route for live preview box rendering.

render: string;

API route for rendering content.

userListItems: string;

API route for fetching user list items.

plugins: string;

API route for fetching plugins.

profile: string;

API route for fetching user profile.

resetPassword: string;

API route for resetting password.

searchList: string;

API route for searching lists.

users: string;

API route for fetching users.

verifySession: string;

API route for verifying a user session.

fts: {
step1: string;
step2: string;
};

step1: string;

API route for step 1 of the FTS process.

step2: string;

API route for step 2 of the FTS process.

mainLinks: {
baseSiteURL: string;
contentManagement: string;
contentManagementCreate: string;
contentManagementDiff: string;
contentManagementEdit: string;
contentManagementFolderCreate: string;
contentManagementFolderEdit: string;
createPage: string;
dashboardIndex: string;
plugins: string;
siteConfiguration: string;
userManagement: string;
userManagementEdit: string;
userProfile: string;
};

baseSiteURL: string;

Base URL for the non-dashboard site.

contentManagement: string;

URL for the content management page.

contentManagementCreate: string;

URL for creating content in the content management page.

contentManagementDiff: string;

URL for viewing content differences in the content management page.

contentManagementEdit: string;

URL for editing content in the content management page.

contentManagementFolderCreate: string;

URL for creating a folder in the content management page.

contentManagementFolderEdit: string;

URL for editing a folder in the content management page.

createPage: string;

URL for creating a new page.

dashboardIndex: string;

URL for the dashboard index.

plugins: string;

URL for the plugins page.

siteConfiguration: string;

URL for the site configuration page.

userManagement: string;

URL for the user management page.

userManagementEdit: string;

URL for editing user management details.

userProfile: string;

URL for the user profile page.

sdk: {
fallback_pages: string;
pages: string;
updateLatestVersionCache: string;
};

fallback_pages: string;

SDK route for fetching fallback list of pages.

pages: string;

SDK route for listing pages.

updateLatestVersionCache: string;

SDK route for updating the latest version cache.

function getDeleteRoute(slug: string): string

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:34

Generates a delete route for a given page slug.

string

The slug of the page to be deleted.

string

The complete delete route for the specified page.


function getEditRoute(slug: string): string

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:24

Generates the edit route for a given page slug.

string

The slug of the page to generate the edit route for.

string

The edit route as a string.


function getSluggedRoute(url: string, slug: string): string

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:14

Generates a slugged route by appending the provided slug to the given URL.

string

The base URL to which the slug will be appended.

string

The slug to append to the base URL.

string

The complete slugged route as a string.


function makeDashboardRoute(route?: string): string

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:54

Generates a URL for the dashboard route.

string

An optional string representing the specific route to append to the dashboard URL.

string

The generated dashboard URL as a string.


function makeNonDashboardRoute(route?: string): string

Defined in: studiocms/packages/studiocms/src/lib/routeMap.ts:44

Generates a non-dashboard route URL.

string

The optional route string to be appended. If not provided, a default route will be used.

string

The generated non-dashboard route URL as a string.