UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

269 lines (268 loc) 7.48 kB
/** * Generates a slugged route by appending the provided slug to the given URL. * * @param url - The base URL to which the slug will be appended. * @param slug - The slug to append to the base URL. * @returns The complete slugged route as a string. */ export declare function getSluggedRoute(url: string, slug: string): string; /** * Generates the edit route for a given page slug. * * @param slug - The slug of the page to generate the edit route for. * @returns The edit route as a string. */ export declare function getEditRoute(slug: string): string; /** * Generates a delete route for a given page slug. * * @param slug - The slug of the page to be deleted. * @returns The complete delete route for the specified page. */ export declare function getDeleteRoute(slug: string): string; /** * Generates a non-dashboard route URL. * * @param route - The optional route string to be appended. If not provided, a default route will be used. * @returns The generated non-dashboard route URL as a string. */ export declare function makeNonDashboardRoute(route?: string | undefined): string; /** * Generates a URL for the dashboard route. * * @param route - An optional string representing the specific route to append to the dashboard URL. * @returns The generated dashboard URL as a string. */ export declare function makeDashboardRoute(route?: string | undefined): string; /** * An object containing various route mappings for the StudioCMS application. */ export declare const StudioCMSRoutes: { mainLinks: { /** * Base URL for the non-dashboard site. */ baseSiteURL: string; /** * URL for the dashboard index. */ dashboardIndex: string; /** * URL for the user profile page. */ userProfile: string; /** * URL for the content management page. */ contentManagement: string; /** * URL for creating content in the content management page. */ contentManagementCreate: string; /** * URL for editing content in the content management page. */ contentManagementEdit: string; /** * URL for creating a folder in the content management page. */ contentManagementFolderCreate: string; /** * URL for editing a folder in the content management page. */ contentManagementFolderEdit: string; /** * URL for viewing content differences in the content management page. */ contentManagementDiff: string; /** * URL for creating a new page. */ createPage: string; /** * URL for the site configuration page. */ siteConfiguration: string; /** * URL for the smtp configuration page. */ smtpConfiguration: string; /** * URL for the user management page. */ userManagement: string; /** * URL for editing user management details. */ userManagementEdit: string; /** * URL for the plugins page. */ plugins: string; /** * URL for unverified email page. */ unverifiedEmail: string; passwordReset: string; }; authLinks: { /** * URL for the login page. */ loginURL: string; /** * URL for the logout page. */ logoutURL: string; /** * URL for the signup page. */ signupURL: string; /** * API route for logging in. */ loginAPI: string; /** * API route for logging out. */ logoutAPI: string; /** * API route for registering a new user. */ registerAPI: string; /** * API route for OAuth authentication. * * @param provider - The name of the OAuth provider (e.g., 'github', 'google'). * @returns The complete API route for the specified OAuth provider. */ oAuthIndex: (provider: string) => string; /** * API route for OAuth callback. */ oAuthCallback: (provider: string) => string; forgotPasswordAPI: string; }; endpointLinks: { /** * API route for searching lists. */ searchList: string; partials: { /** * API route for live preview box rendering. */ livePreviewBox: string; /** * API route for fetching user list items. */ userListItems: string; /** * API route for rendering content. */ render: string; /** * API route for the editor. */ editor: string; }; /** * API route for fetching configuration. */ config: string; /** * API route for fetching users. */ users: string; /** * API route for fetching user profile. */ profile: string; /** * API route for creating a password reset link. */ createResetLink: string; /** * API route for resetting password. */ resetPassword: string; content: { /** * API route for fetching page content. */ page: string; /** * API route for fetching folder content. */ folder: string; diff: string; }; /** * API route for fetching plugins. */ plugins: string; newUsers: { /** * API route for creating a new user. */ create: string; /** * API route for inviting a new user. */ invite: string; }; /** * API route for fetching API tokens. */ apiTokens: string; /** * API route for verifying a user session. */ verifySession: string; /** * API routes for the mailer configuration. */ mailer: { /** * API route for updating the mailer configuration */ config: string; /** * API route for testing the mailer configuration. */ testEmail: string; }; verifyEmail: string; emailNotificationSettingsSite: string; resendVerificationEmail: string; updateUserNotifications: string; }; sdk: { /** * SDK route for listing pages. */ pages: string; /** * SDK route for fetching fallback list of pages. */ fallback_pages: string; /** * SDK route for updating the latest version cache. */ updateLatestVersionCache: string; /** * SDK route for the full changelog JSON. */ changelog: string; }; fts: { /** * API route for step 1 of the FTS process. */ step1: string; /** * API route for step 2 of the FTS process. */ step2: string; }; };