Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
553 changes: 553 additions & 0 deletions scripts/mintlify-post-processing/file-processing/file-processing.js

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions scripts/mintlify-post-processing/file-processing/styling.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@ a:has(code) {
color: #ff8844 !important; /* light orange */
}

/* Hide nested TOC items on interface and type-alias pages */
body:has([data-page-href*="/content/interfaces/"])
.toc
li[data-depth]:not([data-depth="1"]),
body:has([data-page-href*="/content/type-aliases/"])
.toc
li[data-depth]:not([data-depth="1"]) {
/* Show section headings (depth 0) and methods (depth 1), but hide method details (depth 2+) */
/* This applies to SDK interface and type-alias pages */

/* Hide Parameters, Returns, Examples (depth 2) on SDK docs pages */
.toc li.toc-item[data-depth="2"] {
display: none !important;
}
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export type {

export type {
IntegrationsModule,
IntegrationPackage,
IntegrationEndpointFunction,
CoreIntegrations,
InvokeLLMParams,
Expand Down
6 changes: 6 additions & 0 deletions src/modules/agents.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ export interface AgentsModuleConfig {
* send messages, and subscribe to realtime updates. Conversations can be used
* for chat interfaces, support systems, or any interactive AI app.
*
* ## Key Features
*
* The agents module enables you to:
*
* - **Create conversations** with agents defined in the app.
Expand All @@ -192,12 +194,16 @@ export interface AgentsModuleConfig {
* - **Attach metadata** to conversations for tracking context, categories, priorities, or linking to external systems.
* - **Generate WhatsApp connection URLs** for users to interact with agents through WhatsApp.
*
* ## Conversation Structure
*
* The agents module operates with a two-level hierarchy:
*
* 1. **Conversations**: Top-level containers that represent a dialogue with a specific agent. Each conversation has a unique ID, is associated with an agent by name, and belongs to the user who created it. Conversations can include optional metadata for tracking app-specific context like ticket IDs, categories, or custom fields.
*
* 2. **Messages**: Individual exchanges within a conversation. Each message has a role, content, and optional metadata like token usage, tool calls, file attachments, and reasoning information. Messages are stored as an array within their parent conversation.
*
* ## Authentication Modes
*
* This module is available to use with a client in all authentication modes:
*
* - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Users must be authenticated to create and access conversations.
Expand Down
4 changes: 4 additions & 0 deletions src/modules/analytics.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ export type AnalyticsModuleOptions = {
*
* <Note> Analytics events tracked with this module appear as custom event cards in the [Analytics dashboard](/documentation/performance-and-seo/app-analytics).</Note>
*
* ## Best Practices
*
* When tracking events:
*
* - Choose clear, descriptive event names in snake_case like `signup_button_click` or `purchase_completed` rather than generic names like `click`.
* - Include relevant context in your properties such as identifiers like `product_id`, measurements like `price`, and flags like `is_first_purchase`.
*
* ## Authentication Modes
*
* This module is only available in user authentication mode (`base44.analytics`).
*/
export interface AnalyticsModule {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/app-logs.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*
* This module provides a method to log user activity. The logs are reflected in the Analytics page in the app dashboard.
*
* ## Authentication Modes
*
* This module is available to use with a client in all authentication modes.
*/
export interface AppLogsModule {
Expand Down
4 changes: 4 additions & 0 deletions src/modules/auth.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export interface AuthModuleOptions {
/**
* Authentication module for managing user authentication and authorization. The module automatically stores tokens in local storage when available and manages authorization headers for API requests.
*
* ## Features
*
* This module provides comprehensive authentication functionality including:
* - Email/password login and registration
* - Token management
Expand All @@ -113,6 +115,8 @@ export interface AuthModuleOptions {
* - OTP verification
* - User invitations
*
* ## Authentication Modes
*
* The auth module is only available in user authentication mode (`base44.auth`).
*/
export interface AuthModule {
Expand Down
2 changes: 2 additions & 0 deletions src/modules/connectors.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export interface ConnectorAccessTokenResponse {
* the API calls you make. This is useful when you need custom API interactions that aren't
* covered by Base44's pre-built integrations.
*
* ## Authentication Modes
*
* This module is only available to use with a client in service role authentication mode, which means it can only be used in backend environments.
*
* ## Dynamic Types
Expand Down
8 changes: 8 additions & 0 deletions src/modules/entities.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,14 @@ type DynamicEntitiesModule = {
* - **Anonymous or User authentication** (`base44.entities`): Access is scoped to the current user's permissions. Anonymous users can only access public entities, while authenticated users can access entities they have permission to view or modify.
* - **Service role authentication** (`base44.asServiceRole.entities`): Operations have elevated admin-level permissions. Can access all entities that the app's admin role has access to.
*
* ## Entity Handlers
*
* An entity handler is the object you get when you access an entity through `base44.entities.EntityName`. Every entity in your app automatically gets a handler with CRUD methods for managing records.
*
* For example, `base44.entities.Task` is an entity handler for Task records, and `base44.entities.User` is an entity handler for User records. Each handler provides methods like `list()`, `create()`, `update()`, and `delete()`.
*
* You don't need to instantiate or import entity handlers. They're automatically available for every entity you create in your app.
*
* ## Built-in User Entity
*
* Every app includes a built-in `User` entity that stores user account information. This entity has special security rules that can't be changed.
Expand Down
2 changes: 2 additions & 0 deletions src/modules/functions.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export type FunctionName = keyof FunctionNameRegistry extends never
*
* This module allows you to invoke the custom backend functions defined in the app.
*
* ## Authentication Modes
*
* This module is available to use with a client in all authentication modes:
*
* - **Anonymous or User authentication** (`base44.functions`): Functions are invoked with the current user's permissions. Anonymous users invoke functions without authentication, while authenticated users invoke functions with their authentication context.
Expand Down
79 changes: 62 additions & 17 deletions src/modules/integrations.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,31 @@ import { CustomIntegrationsModule } from "./custom-integrations.types.js";
* @returns Promise resolving to the integration endpoint's response.
*/
export type IntegrationEndpointFunction = (
data: Record<string, any>
data: Record<string, any>,
) => Promise<any>;

/**
* A package containing integration endpoints.
*
* Provides dynamic access to integration endpoints within a package.
* Each endpoint is accessed as a property that returns a function to invoke it.
* An integration package is a collection of endpoint functions indexed by endpoint name.
* Both `Core` and `custom` are integration packages that implement this structure.
*
* @example
* @example **Core package**
* ```typescript
* // Access endpoints dynamically
* const result = await integrations.Core.SendEmail({
* to: 'user@example.com',
* subject: 'Hello',
* body: 'Message'
* await base44.integrations.Core.InvokeLLM({
* prompt: 'Explain quantum computing',
* model: 'gpt-4'
* });
* ```
*
* @example **custom package**
* ```typescript
* await base44.integrations.custom.call(
* 'github',
* 'get:/repos/{owner}/{repo}',
* { pathParams: { owner: 'myorg', repo: 'myrepo' } }
* );
* ```
*/
export type IntegrationPackage = {
[endpointName: string]: IntegrationEndpointFunction;
Expand Down Expand Up @@ -285,7 +292,7 @@ export interface CoreIntegrations {
* ```
*/
ExtractDataFromUploadedFile(
params: ExtractDataFromUploadedFileParams
params: ExtractDataFromUploadedFileParams,
): Promise<ExtractDataFromUploadedFileResult>;

/**
Expand Down Expand Up @@ -324,7 +331,7 @@ export interface CoreIntegrations {
* ```
*/
UploadPrivateFile(
params: UploadPrivateFileParams
params: UploadPrivateFileParams,
): Promise<UploadPrivateFileResult>;

/**
Expand All @@ -346,7 +353,7 @@ export interface CoreIntegrations {
* ```
*/
CreateFileSignedUrl(
params: CreateFileSignedUrlParams
params: CreateFileSignedUrlParams,
): Promise<CreateFileSignedUrlResult>;
}

Expand All @@ -355,19 +362,23 @@ export interface CoreIntegrations {
*
* This module provides access to integration methods for interacting with external services. Unlike the connectors module that gives you raw OAuth tokens, integrations provide pre-built functions that Base44 executes on your behalf.
*
* ## Integration Types
*
* There are two types of integrations:
*
* - **Built-in integrations** (`Core`): Pre-built functions provided by Base44 for common tasks such as AI-powered text generation, image creation, file uploads, and email. Access core integration methods using:
* ```
* base44.integrations.Core.FunctionName(params)
* ```
*
* - **Custom integrations** (`custom`): Pre-configured external APIs. Custom integration calls are proxied through Base44's backend, so credentials are never exposed to the frontend. Access custom integration methods using:
* - **Custom workspace integrations** (`custom`): Pre-configured external APIs set up by workspace administrators. Workspace integration calls are proxied through Base44's backend, so credentials are never exposed to the frontend. Access custom workspace integration methods using:
* ```
* base44.integrations.custom.call(slug, operationId, params)
* ```
*
* <Info>To call a custom integration, it must be pre-configured by a workspace administrator who imports an OpenAPI specification.</Info>
* <Info>To call a custom workspace integration, it must be pre-configured by a workspace administrator who imports an OpenAPI specification. Learn more about [custom workspace integrations](/documentation/integrations/managing-workspace-integrations).</Info>
*
* ## Authentication Modes
*
* This module is available to use with a client in all authentication modes:
*
Expand All @@ -377,19 +388,53 @@ export interface CoreIntegrations {
export type IntegrationsModule = {
/**
* Core package containing built-in Base44 integration functions.
*
* @example
* ```typescript
* const response = await base44.integrations.Core.InvokeLLM({
* prompt: 'Explain quantum computing',
* model: 'gpt-4'
* });
* ```
*/
Core: CoreIntegrations;

/**
* Custom integrations module for calling pre-configured external APIs.
* Workspace integrations module for calling pre-configured external APIs.
*
* @example
* ```typescript
* const result = await base44.integrations.custom.call(
* 'github',
* 'get:/repos/{owner}/{repo}',
* { pathParams: { owner: 'myorg', repo: 'myrepo' } }
* );
* ```
*/
custom: CustomIntegrationsModule;
} & {
/**
* Access to additional integration packages.
*
* Additional integration packages may be added in the future and will be
* accessible using the same pattern as Core.
* Allows accessing integration packages as properties. This enables both `Core` and `custom` packages,
* as well as any future integration packages that may be added.
*
* @example **Use Core integrations**
* ```typescript
* const response = await base44.integrations.Core.InvokeLLM({
* prompt: 'Explain quantum computing',
* model: 'gpt-4'
* });
* ```
*
* @example **Use custom integrations**
* ```typescript
* const result = await base44.integrations.custom.call(
* 'github',
* 'get:/repos/{owner}/{repo}',
* { pathParams: { owner: 'myorg', repo: 'myrepo' } }
* );
* ```
*/
[packageName: string]: IntegrationPackage;
};