Skip to content

Commit 21992f0

Browse files
committed
more fixes
1 parent c0a3920 commit 21992f0

5 files changed

Lines changed: 76 additions & 74 deletions

File tree

scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,14 +462,29 @@ function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) {
462462
*/
463463
function parsePropertiesFromTypeFile(content) {
464464
const properties = [];
465-
const lines = content.split("\n");
465+
466+
// Strip YAML frontmatter if present
467+
let contentWithoutFrontmatter = content;
468+
if (content.startsWith("---")) {
469+
const endIndex = content.indexOf("\n---", 3);
470+
if (endIndex !== -1) {
471+
contentWithoutFrontmatter = content.slice(endIndex + 4).trimStart();
472+
}
473+
}
474+
475+
// Strip leading horizontal rule (***) that TypeDoc adds after frontmatter
476+
if (contentWithoutFrontmatter.startsWith("***")) {
477+
contentWithoutFrontmatter = contentWithoutFrontmatter.slice(3).trimStart();
478+
}
479+
480+
const lines = contentWithoutFrontmatter.split("\n");
466481

467482
// Collect intro description until Properties section
468483
const introLines = [];
469484
let descriptionCaptured = false;
470485

471-
// Extract Indexable section if present
472-
const indexSignature = parseIndexableSection(content);
486+
// Extract Indexable section if present (use content without frontmatter)
487+
const indexSignature = parseIndexableSection(contentWithoutFrontmatter);
473488

474489
// Find the Properties section
475490
let inPropertiesSection = false;

src/client.types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ export interface Base44Client {
8686
agents: AgentsModule;
8787
/** {@link AppLogsModule | App logs module} for tracking app usage. */
8888
appLogs: AppLogsModule;
89-
/** {@link AnalyticsModule | Analytics module} for tracking app usage. */
89+
/**
90+
* {@link AnalyticsModule | Analytics module} for tracking app usage.
91+
* @internal
92+
*/
9093
analytics: AnalyticsModule;
9194
/** Cleanup function to disconnect WebSocket connections. Call when you're done with the client. */
9295
cleanup: () => void;

src/modules/custom-integrations.types.ts

Lines changed: 32 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface CustomIntegrationCallParams {
88
payload?: Record<string, any>;
99

1010
/**
11-
* Path parameters to substitute in the URL (e.g., `{ owner: "user", repo: "repo" }`).
11+
* Path parameters to substitute in the URL. For example, `{ owner: "user", repo: "repo" }`.
1212
*/
1313
pathParams?: Record<string, string>;
1414

@@ -42,49 +42,7 @@ export interface CustomIntegrationCallResponse {
4242
/**
4343
* Module for calling custom workspace-level API integrations.
4444
*
45-
* Custom integrations allow workspace administrators to connect any external API
46-
* by importing an OpenAPI specification. Apps in the workspace can then call
47-
* these integrations using this module.
48-
*
49-
* Unlike the built-in integrations (like `Core`), custom integrations:
50-
* - Are defined per-workspace by importing OpenAPI specs
51-
* - Use a slug-based identifier instead of package names
52-
* - Proxy requests through Base44's backend (credentials never exposed to frontend)
53-
*
54-
* @example
55-
* ```typescript
56-
* // Call a custom CRM integration
57-
* const response = await base44.integrations.custom.call(
58-
* "my-crm", // integration slug (defined by workspace admin)
59-
* "get:/contacts", // endpoint: method:path format
60-
* {
61-
* queryParams: { limit: 10 }
62-
* }
63-
* );
64-
*
65-
* if (response.success) {
66-
* console.log("Contacts:", response.data);
67-
* } else {
68-
* console.error("API returned error:", response.status_code);
69-
* }
70-
* ```
71-
*
72-
* @example
73-
* ```typescript
74-
* // Call with path params and request body payload
75-
* const response = await base44.integrations.custom.call(
76-
* "github",
77-
* "post:/repos/{owner}/{repo}/issues",
78-
* {
79-
* pathParams: { owner: "myorg", repo: "myrepo" },
80-
* payload: {
81-
* title: "Bug report",
82-
* body: "Something is broken",
83-
* labels: ["bug"]
84-
* }
85-
* }
86-
* );
87-
* ```
45+
* Custom integrations allow workspace administrators to connect any external API by importing an OpenAPI specification. Apps in the workspace can then call these integrations using this module.
8846
*/
8947
export interface CustomIntegrationsModule {
9048
/**
@@ -100,6 +58,36 @@ export interface CustomIntegrationsModule {
10058
* @throws {Base44Error} If the integration or operation is not found (404).
10159
* @throws {Base44Error} If the external API call fails (502).
10260
* @throws {Base44Error} If the request times out (504).
61+
*
62+
* @example
63+
* ```typescript
64+
* // Call a custom CRM integration
65+
* const response = await base44.integrations.custom.call(
66+
* "my-crm",
67+
* "get:/contacts",
68+
* { queryParams: { limit: 10 } }
69+
* );
70+
*
71+
* if (response.success) {
72+
* console.log("Contacts:", response.data);
73+
* }
74+
* ```
75+
*
76+
* @example
77+
* ```typescript
78+
* // Call with path params and request body
79+
* const response = await base44.integrations.custom.call(
80+
* "github",
81+
* "post:/repos/{owner}/{repo}/issues",
82+
* {
83+
* pathParams: { owner: "myorg", repo: "myrepo" },
84+
* payload: {
85+
* title: "Bug report",
86+
* body: "Something is broken"
87+
* }
88+
* }
89+
* );
90+
* ```
10391
*/
10492
call(
10593
slug: string,

src/modules/entities.types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
/**
22
* Event types for realtime entity updates.
3+
* @internal
34
*/
45
export type RealtimeEventType = "create" | "update" | "delete";
56

67
/**
78
* Payload received when a realtime event occurs.
9+
* @internal
810
*/
911
export interface RealtimeEvent {
1012
/** The type of change that occurred */
@@ -19,11 +21,13 @@ export interface RealtimeEvent {
1921

2022
/**
2123
* Callback function invoked when a realtime event occurs.
24+
* @internal
2225
*/
2326
export type RealtimeCallback = (event: RealtimeEvent) => void;
2427

2528
/**
2629
* Function returned from subscribe, call it to unsubscribe.
30+
* @internal
2731
*/
2832
export type Subscription = () => void;
2933

@@ -309,6 +313,7 @@ export interface EntityHandler {
309313
* // Later, unsubscribe
310314
* unsubscribe();
311315
* ```
316+
* @internal
312317
*/
313318
subscribe(callback: RealtimeCallback): Subscription;
314319
}

src/modules/integrations.types.ts

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -351,22 +351,28 @@ export interface CoreIntegrations {
351351
}
352352

353353
/**
354-
* Integrations module for calling integration endpoints.
354+
* Integrations module for calling integration methods.
355355
*
356-
* This module provides access to integration endpoints for interacting with external
357-
* services. Integrations are organized into packages. Base44 provides built-in integrations
358-
* in the `Core` package.
356+
* 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.
359357
*
360-
* Unlike the connectors module that gives you raw OAuth tokens, integrations provide
361-
* pre-built functions that Base44 executes on your behalf.
358+
* There are two types of integrations:
362359
*
363-
* Integration endpoints are accessed dynamically using the pattern:
364-
* `base44.integrations.PackageName.EndpointName(params)`
360+
* - **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:
361+
* ```
362+
* base44.integrations.Core.FunctionName(params)
363+
* ```
364+
*
365+
* - **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:
366+
* ```
367+
* base44.integrations.custom.call(slug, operationId, params)
368+
* ```
369+
*
370+
* <Info>To call a custom integration, it must be pre-configured by a workspace administrator who imports an OpenAPI specification.</Info>
365371
*
366372
* This module is available to use with a client in all authentication modes:
367373
*
368-
* - **Anonymous or User authentication** (`base44.integrations`): Integration endpoints are invoked with the current user's permissions. Anonymous users invoke endpoints without authentication, while authenticated users invoke endpoints with their authentication context.
369-
* - **Service role authentication** (`base44.asServiceRole.integrations`): Integration endpoints are invoked with elevated admin-level permissions. The endpoints execute with admin authentication context.
374+
* - **Anonymous or User authentication** (`base44.integrations`): Integration methods are invoked with the current user's permissions. Anonymous users invoke methods without authentication, while authenticated users invoke methods with their authentication context.
375+
* - **Service role authentication** (`base44.asServiceRole.integrations`): Integration methods are invoked with elevated admin-level permissions. The methods execute with admin authentication context.
370376
*/
371377
export type IntegrationsModule = {
372378
/**
@@ -375,22 +381,7 @@ export type IntegrationsModule = {
375381
Core: CoreIntegrations;
376382

377383
/**
378-
* Custom integrations module for calling workspace-level API integrations.
379-
*
380-
* Allows calling external APIs that workspace admins have configured
381-
* by importing OpenAPI specifications.
382-
*
383-
* @example
384-
* ```typescript
385-
* const response = await base44.integrations.custom.call(
386-
* "github", // integration slug
387-
* "listIssues", // operation ID
388-
* {
389-
* pathParams: { owner: "myorg", repo: "myrepo" },
390-
* queryParams: { state: "open" }
391-
* }
392-
* );
393-
* ```
384+
* Custom integrations module for calling pre-configured external APIs.
394385
*/
395386
custom: CustomIntegrationsModule;
396387
} & {

0 commit comments

Comments
 (0)