From e4079e1eb37aa901e61ff75d7a381ce158036d91 Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Tue, 13 Oct 2026 12:34:38 +0300 Subject: [PATCH 1/5] fix(sdk-docs): keep member links when module pages are renamed A {@link} to a module method was still pointing at AppModule.mdx after that page was renamed to app. --- .../file-processing/file-processing.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js index 43a7dcb9..7f439361 100755 --- a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -204,17 +204,23 @@ Access to additional integration packages. (match, linkText, linkPath, ext) => { modified = true; + // A member link keeps its anchor after the filename, as in + // `AppModule.mdx#getpublicsettings`. Split that off before renaming. + const hashAt = linkPath.indexOf("#"); + const hash = hashAt === -1 ? "" : linkPath.slice(hashAt); + const pathOnly = hashAt === -1 ? linkPath : linkPath.slice(0, hashAt); + // Check if the link points to a renamed module - const pathParts = linkPath.split("/"); + const pathParts = pathOnly.split("/"); const filename = pathParts[pathParts.length - 1]; // If filename has extension, strip it for checking map const nameWithoutExt = filename.replace(/\.mdx?$/, ""); const moduleRename = getModuleRename(nameWithoutExt); - if (moduleRename) { - pathParts[pathParts.length - 1] = moduleRename; - linkPath = pathParts.join("/"); + if (moduleRename || (hash && nameWithoutExt !== filename)) { + pathParts[pathParts.length - 1] = moduleRename ?? nameWithoutExt; + linkPath = pathParts.join("/") + hash; } // Handle relative links that might be missing context (basic cleanup) From 302ad376c7fbe61b652d7568afb7a51286b6bc05 Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Tue, 13 Oct 2026 12:44:17 +0300 Subject: [PATCH 2/5] docs(sdk): label the public settings link in JSDoc Name the link with the JSDoc pipe and drop the file-processing change. --- .../file-processing/file-processing.js | 14 ++++---------- packages/sdk/src/modules/app.types.ts | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js index 7f439361..43a7dcb9 100755 --- a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -204,23 +204,17 @@ Access to additional integration packages. (match, linkText, linkPath, ext) => { modified = true; - // A member link keeps its anchor after the filename, as in - // `AppModule.mdx#getpublicsettings`. Split that off before renaming. - const hashAt = linkPath.indexOf("#"); - const hash = hashAt === -1 ? "" : linkPath.slice(hashAt); - const pathOnly = hashAt === -1 ? linkPath : linkPath.slice(0, hashAt); - // Check if the link points to a renamed module - const pathParts = pathOnly.split("/"); + const pathParts = linkPath.split("/"); const filename = pathParts[pathParts.length - 1]; // If filename has extension, strip it for checking map const nameWithoutExt = filename.replace(/\.mdx?$/, ""); const moduleRename = getModuleRename(nameWithoutExt); - if (moduleRename || (hash && nameWithoutExt !== filename)) { - pathParts[pathParts.length - 1] = moduleRename ?? nameWithoutExt; - linkPath = pathParts.join("/") + hash; + if (moduleRename) { + pathParts[pathParts.length - 1] = moduleRename; + linkPath = pathParts.join("/"); } // Handle relative links that might be missing context (basic cleanup) diff --git a/packages/sdk/src/modules/app.types.ts b/packages/sdk/src/modules/app.types.ts index f3656fb4..2982eb1d 100644 --- a/packages/sdk/src/modules/app.types.ts +++ b/packages/sdk/src/modules/app.types.ts @@ -10,7 +10,7 @@ export type AppPublicSettings = | string; /** - * The app's public configuration, as returned by {@link AppModule.getPublicSettings}. + * The app's public configuration, as returned by {@linkcode AppModule.getPublicSettings | getPublicSettings()}. */ export interface AppPublicSettingsResponse { /** The app's ID. */ From cc5f581bd7a89700249f0c1a394121cbfef1f1e0 Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Wed, 14 Oct 2026 11:59:53 +0300 Subject: [PATCH 3/5] docs(sdk): describe app visibility and show app types on the app page - Describe the four visibility values in AppPublicSettings, with a table that links to the related product docs, and note that the CLI can't set public_with_login. - Note that SSO enforcement makes public_without_login apps require sign-in. - Rewrite the app module and getPublicSettings() descriptions, and add a redirectToLogin() example for visitors who aren't signed in. - Expose AppPublicSettings and fold it and AppPublicSettingsResponse into the app page under Type Definitions. Co-Authored-By: Claude Sonnet 5.5 --- .../appended-articles.json | 4 ++ .../file-processing/file-processing.js | 5 ++ .../types-to-expose.json | 1 + packages/sdk/src/modules/app.types.ts | 64 +++++++++++++------ 4 files changed, 53 insertions(+), 21 deletions(-) diff --git a/packages/sdk/scripts/mintlify-post-processing/appended-articles.json b/packages/sdk/scripts/mintlify-post-processing/appended-articles.json index 3002ae7a..bdacdfc3 100644 --- a/packages/sdk/scripts/mintlify-post-processing/appended-articles.json +++ b/packages/sdk/scripts/mintlify-post-processing/appended-articles.json @@ -23,6 +23,10 @@ "interfaces/CoreIntegrations", "interfaces/CustomIntegrationsModule" ], + "interfaces/AppModule": [ + "interfaces/AppPublicSettingsResponse", + "type-aliases/AppPublicSettings" + ], "type-aliases/ActorsModule": [ "interfaces/ActorRef", "interfaces/Connection", diff --git a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js index 43a7dcb9..65b26131 100755 --- a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -1596,6 +1596,11 @@ function groupTypeDefinitions(content) { { types: ["ActorClient", "ActorRegistry", "ActorNameRegistry"], indicator: "ActorClient" + }, + // App module + { + types: ["AppPublicSettingsResponse", "AppPublicSettings"], + indicator: "AppPublicSettingsResponse" } ]; diff --git a/packages/sdk/scripts/mintlify-post-processing/types-to-expose.json b/packages/sdk/scripts/mintlify-post-processing/types-to-expose.json index 5ec2810e..bf00cb3c 100644 --- a/packages/sdk/scripts/mintlify-post-processing/types-to-expose.json +++ b/packages/sdk/scripts/mintlify-post-processing/types-to-expose.json @@ -16,6 +16,7 @@ "AnalyticsModule", "AppLogsModule", "AppModule", + "AppPublicSettings", "AppPublicSettingsResponse", "AuthModule", "ConnectorApiRequest", diff --git a/packages/sdk/src/modules/app.types.ts b/packages/sdk/src/modules/app.types.ts index 2982eb1d..f30254ed 100644 --- a/packages/sdk/src/modules/app.types.ts +++ b/packages/sdk/src/modules/app.types.ts @@ -1,6 +1,20 @@ /** - * The app's access policy: whether the app is reachable without an account, and - * who may sign in. + * The app's visibility. + * + * You can set and manage the app's visibility in the app's dashboard or with the Base44 CLI [`visibility`](/developers/references/cli/commands/visibility) command. Learn more about [app visibility](/Setting-up-your-app/Managing-access#setting-your-app-visibility). + * + * + * The CLI doesn't support `public_with_login`. To use it, change the app's visibility in the dashboard. + * + * + * The following table shows the supported values and the visibility each one represents: + * + * | Value | Visibility | + * | --- | --- | + * | `private_with_login` | **Private**: Only [invited users](/Setting-up-your-app/Managing-access#inviting-users-to-your-app) | + * | `workspace_with_login` | **Workspace**: Users in your Base44 [workspace](/documentation/account-and-billing/about-workspaces) | + * | `public_with_login` | **Public (login required)**: Visitors with a Base44 account | + * | `public_without_login` | **Public (no login)**: Anyone | */ export type AppPublicSettings = | "private_with_login" @@ -10,47 +24,55 @@ export type AppPublicSettings = | string; /** - * The app's public configuration, as returned by {@linkcode AppModule.getPublicSettings | getPublicSettings()}. + * The app's public settings. */ export interface AppPublicSettingsResponse { /** The app's ID. */ id: string; - /** The app's access policy. */ + /** + * The app's visibility. + * + * Returns the value saved in the app's settings. + * + * + * If your workspace [enforces SSO for apps](/Enterprise/Enterprise-SSO-and-app-visibility), apps set to `public_without_login` also require sign-in. Visitors who aren't signed in get the `auth_required` error. + * + */ public_settings: AppPublicSettings; } /** - * App module for reading the app's own public configuration. + * App module for reading an app's public settings, including its visibility. + * + * Use it to read the app's visibility and determine whether the current visitor can access the app. + * If the app requires login, use `redirectToLogin()` from the {@link AuthModule | auth module} to send the visitor to the login page. * - * Use it to discover how the app is gated before rendering it, so a private app - * can send the visitor to login instead of rendering an empty shell. + * Learn more about [app visibility](/Setting-up-your-app/Managing-access#setting-your-app-visibility). * - * ## Authentication Modes + * ## Authentication modes * - * This module is available to use with a client in all authentication modes. The - * client's token, when it has one, is sent with the request — a signed-in visitor - * who has no access to the app is reported differently from an anonymous one. + * You can use this module with a client in any authentication mode. The client sends its token, if it has one, with the request. */ export interface AppModule { /** - * Get the app's public configuration. + * Retrieves the app's public settings. * - * Rejects with a {@linkcode Base44Error} when the visitor may not open the app: - * `status` is `403` and `data.extra_data.reason` says why — `"auth_required"` - * when the visitor must sign in, `"user_not_registered"` when the signed-in - * visitor has no access to this app. + * Rejects with a {@linkcode Base44Error} that has a `status` of `403` when the visitor can't access the app. + * Check `data.extra_data.reason` to find the cause: + * - `auth_required`: The visitor must sign in. + * - `user_not_registered`: The visitor is signed in but doesn't have access. * - * @returns Promise resolving to the app's ID and access policy. + * @returns Promise resolving to the app's ID and visibility. * * @example * ```typescript - * // Decide what to render before the app boots + * // Redirect a visitor who isn't signed in * try { * const { public_settings } = await base44.app.getPublicSettings(); - * console.log('App access policy:', public_settings); + * console.log('App visibility:', public_settings); * } catch (error) { - * if (error.status === 403) { - * console.log('Blocked because:', error.data?.extra_data?.reason); + * if (error.status === 403 && error.data?.extra_data?.reason === 'auth_required') { + * base44.auth.redirectToLogin(''); * } * } * ``` From 2b973ba7d8fe886c1c882cbf86ee801fdab25c0a Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Wed, 14 Oct 2026 12:30:17 +0300 Subject: [PATCH 4/5] docs(sdk): link the public_settings field to AppPublicSettings - Show the public_settings field as AppPublicSettings in the app page's Returns section. `| string` makes TypeScript reduce the type to string, so the docs pipeline now restores the type name, alongside the existing truncated-type cleanup. - Remove AppPublicSettingsResponse from Type Definitions. The Returns section already shows its fields, so the type is deleted after processing, like EntityPage. AppPublicSettings stays on the page. - Move the SSO note from the field into the AppPublicSettings documentation and link the field to that section. Co-Authored-By: Claude Sonnet 5.5 --- .../appended-articles.json | 1 - .../file-processing/file-processing.js | 16 ++++++++++--- .../types-to-delete-after-processing.json | 1 + packages/sdk/src/modules/app.types.ts | 23 ++++++++----------- 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/packages/sdk/scripts/mintlify-post-processing/appended-articles.json b/packages/sdk/scripts/mintlify-post-processing/appended-articles.json index bdacdfc3..a18035f0 100644 --- a/packages/sdk/scripts/mintlify-post-processing/appended-articles.json +++ b/packages/sdk/scripts/mintlify-post-processing/appended-articles.json @@ -24,7 +24,6 @@ "interfaces/CustomIntegrationsModule" ], "interfaces/AppModule": [ - "interfaces/AppPublicSettingsResponse", "type-aliases/AppPublicSettings" ], "type-aliases/ActorsModule": [ diff --git a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js index 65b26131..34f9ffd7 100755 --- a/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/packages/sdk/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -1599,8 +1599,8 @@ function groupTypeDefinitions(content) { }, // App module { - types: ["AppPublicSettingsResponse", "AppPublicSettings"], - indicator: "AppPublicSettingsResponse" + types: ["AppPublicSettings"], + indicator: "AppPublicSettings" } ]; @@ -2195,7 +2195,7 @@ function cleanupSortFieldSignature(dir) { } /** - * Fix truncated intersection types in ParamField type attributes. + * Fix truncated or collapsed types in ParamField and ResponseField type attributes. * TypeDoc renders (Partial & { id: string })[] as "Partial<...> & object[]". */ function cleanupTruncatedParamTypes(dir) { @@ -2220,6 +2220,16 @@ function cleanupTruncatedParamTypes(dir) { modified = true; } + // AppPublicSettings ends in `| string`, so TypeScript reduces it to plain + // `string` and TypeDoc renders the public_settings field as "string". + if (content.includes(' - * The CLI doesn't support `public_with_login`. To use it, change the app's visibility in the dashboard. - * + * You can set and manage the app's visibility in the app's dashboard or with the Base44 CLI [`visibility`](/developers/references/cli/commands/visibility) command. * * The following table shows the supported values and the visibility each one represents: * @@ -15,6 +11,10 @@ * | `workspace_with_login` | **Workspace**: Users in your Base44 [workspace](/documentation/account-and-billing/about-workspaces) | * | `public_with_login` | **Public (login required)**: Visitors with a Base44 account | * | `public_without_login` | **Public (no login)**: Anyone | + * + * + * If your workspace [enforces SSO for apps](/Enterprise/Enterprise-SSO-and-app-visibility), apps set to `public_without_login` also require sign-in. + * */ export type AppPublicSettings = | "private_with_login" @@ -30,19 +30,14 @@ export interface AppPublicSettingsResponse { /** The app's ID. */ id: string; /** - * The app's visibility. - * - * Returns the value saved in the app's settings. - * - * - * If your workspace [enforces SSO for apps](/Enterprise/Enterprise-SSO-and-app-visibility), apps set to `public_without_login` also require sign-in. Visitors who aren't signed in get the `auth_required` error. - * + * The app's visibility. + * For supported values, see [`AppPublicSettings`](#apppublicsettings). */ public_settings: AppPublicSettings; } /** - * App module for reading an app's public settings, including its visibility. + * App module for reading an app's public settings. * * Use it to read the app's visibility and determine whether the current visitor can access the app. * If the app requires login, use `redirectToLogin()` from the {@link AuthModule | auth module} to send the visitor to the login page. From 17ad268bf0b500dcfe12fb63bc25b23d9cf1552a Mon Sep 17 00:00:00 2001 From: "Abraham (Avi) Soclof" Date: Wed, 14 Oct 2026 13:46:05 +0300 Subject: [PATCH 5/5] docs(sdk): simplify the public_with_login visibility description Co-Authored-By: Claude Sonnet 5.5 --- packages/sdk/src/modules/app.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/modules/app.types.ts b/packages/sdk/src/modules/app.types.ts index ced5cf1f..fc0b0aa9 100644 --- a/packages/sdk/src/modules/app.types.ts +++ b/packages/sdk/src/modules/app.types.ts @@ -9,7 +9,7 @@ * | --- | --- | * | `private_with_login` | **Private**: Only [invited users](/Setting-up-your-app/Managing-access#inviting-users-to-your-app) | * | `workspace_with_login` | **Workspace**: Users in your Base44 [workspace](/documentation/account-and-billing/about-workspaces) | - * | `public_with_login` | **Public (login required)**: Visitors with a Base44 account | + * | `public_with_login` | **Public (login required)**: Visitors must log in | * | `public_without_login` | **Public (no login)**: Anyone | * *