From 421ad6daea0a487621a61caad9ba54a75ef3d5bf Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 16 Nov 2025 09:06:36 +0200 Subject: [PATCH 01/31] initial sdk docs --- docs/api-reference/README.mdx | 18 + docs/api-reference/client/README.mdx | 21 + .../client/functions/createClient.mdx | 202 ++ .../functions/createClientFromRequest.mdx | 1395 +++++++++ .../client/type-aliases/Base44Client.mdx | 15 + .../type-aliases/CreateClientOptions.mdx | 37 + docs/api-reference/index/README.mdx | 77 + .../index/classes/Base44Error.mdx | 132 + .../index/interfaces/AppConversationLike.mdx | 51 + .../interfaces/AppConversationMessage.mdx | 95 + .../index/interfaces/AppLike.mdx | 501 ++++ .../index/interfaces/AppMessageContent.mdx | 59 + .../index/interfaces/AuthConfigLike.mdx | 69 + .../index/interfaces/DenoProjectLike.mdx | 52 + .../index/interfaces/UserEntityLike.mdx | 119 + .../index/interfaces/UserLike.mdx | 19 + .../index/type-aliases/AgentConversation.mdx | 73 + .../index/type-aliases/AgentMessage.mdx | 184 ++ .../index/type-aliases/LoginInfoResponse.mdx | 22 + .../index/type-aliases/ModelFilterParams.mdx | 89 + .../modules/agents/-internal-/README.mdx | 24 + .../-internal-/functions/RoomsSocket.mdx | 103 + .../-internal-/type-aliases/RoomsSocket.mdx | 13 + .../type-aliases/RoomsSocketConfig.mdx | 63 + .../type-aliases/RoomsSocketEventsMap.mdx | 109 + .../agents/-internal-/type-aliases/TEvent.mdx | 13 + .../-internal-/type-aliases/THandler.mdx | 19 + .../-internal-/type-aliases/TJsonStr.mdx | 13 + docs/api-reference/modules/agents/README.mdx | 25 + .../agents/functions/createAgentsModule.mdx | 245 ++ .../type-aliases/AgentsModuleConfig.mdx | 75 + docs/api-reference/modules/auth/README.mdx | 13 + .../auth/functions/createAuthModule.mdx | 542 ++++ .../api-reference/modules/entities/README.mdx | 13 + .../functions/createEntitiesModule.mdx | 28 + .../modules/functions/README.mdx | 13 + .../functions/createFunctionsModule.mdx | 80 + .../modules/integrations/README.mdx | 13 + .../functions/createIntegrationsModule.mdx | 28 + .../api-reference/utils/auth-utils/README.mdx | 16 + .../auth-utils/functions/getAccessToken.mdx | 31 + .../auth-utils/functions/getLoginUrl.mdx | 31 + .../functions/removeAccessToken.mdx | 28 + .../auth-utils/functions/saveAccessToken.mdx | 29 + src/client.ts | 235 +- src/modules/agents.ts | 52 +- src/modules/agents.types.ts | 243 +- src/modules/app-logs.ts | 35 +- src/modules/app-logs.types.ts | 122 + src/modules/auth.ts | 73 +- src/modules/auth.types.ts | 369 +++ src/modules/connectors.ts | 27 +- src/modules/connectors.types.ts | 64 +- src/modules/entities.ts | 94 +- src/modules/entities.types.ts | 330 +++ src/modules/functions.ts | 18 +- src/modules/functions.types.ts | 73 + src/modules/integrations.ts | 20 +- src/modules/integrations.types.ts | 118 + src/modules/sso.ts | 31 +- src/modules/sso.types.ts | 44 + src/types.ts | 65 + src/utils/auth-utils.ts | 74 +- src/utils/auth-utils.types.ts | 286 ++ src/utils/axios-client.ts | 128 +- yarn.lock | 2575 +++++++++++++++++ 66 files changed, 9584 insertions(+), 289 deletions(-) create mode 100644 docs/api-reference/README.mdx create mode 100644 docs/api-reference/client/README.mdx create mode 100644 docs/api-reference/client/functions/createClient.mdx create mode 100644 docs/api-reference/client/functions/createClientFromRequest.mdx create mode 100644 docs/api-reference/client/type-aliases/Base44Client.mdx create mode 100644 docs/api-reference/client/type-aliases/CreateClientOptions.mdx create mode 100644 docs/api-reference/index/README.mdx create mode 100644 docs/api-reference/index/classes/Base44Error.mdx create mode 100644 docs/api-reference/index/interfaces/AppConversationLike.mdx create mode 100644 docs/api-reference/index/interfaces/AppConversationMessage.mdx create mode 100644 docs/api-reference/index/interfaces/AppLike.mdx create mode 100644 docs/api-reference/index/interfaces/AppMessageContent.mdx create mode 100644 docs/api-reference/index/interfaces/AuthConfigLike.mdx create mode 100644 docs/api-reference/index/interfaces/DenoProjectLike.mdx create mode 100644 docs/api-reference/index/interfaces/UserEntityLike.mdx create mode 100644 docs/api-reference/index/interfaces/UserLike.mdx create mode 100644 docs/api-reference/index/type-aliases/AgentConversation.mdx create mode 100644 docs/api-reference/index/type-aliases/AgentMessage.mdx create mode 100644 docs/api-reference/index/type-aliases/LoginInfoResponse.mdx create mode 100644 docs/api-reference/index/type-aliases/ModelFilterParams.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/README.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx create mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx create mode 100644 docs/api-reference/modules/agents/README.mdx create mode 100644 docs/api-reference/modules/agents/functions/createAgentsModule.mdx create mode 100644 docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx create mode 100644 docs/api-reference/modules/auth/README.mdx create mode 100644 docs/api-reference/modules/auth/functions/createAuthModule.mdx create mode 100644 docs/api-reference/modules/entities/README.mdx create mode 100644 docs/api-reference/modules/entities/functions/createEntitiesModule.mdx create mode 100644 docs/api-reference/modules/functions/README.mdx create mode 100644 docs/api-reference/modules/functions/functions/createFunctionsModule.mdx create mode 100644 docs/api-reference/modules/integrations/README.mdx create mode 100644 docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx create mode 100644 docs/api-reference/utils/auth-utils/README.mdx create mode 100644 docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx create mode 100644 docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx create mode 100644 docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx create mode 100644 docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx create mode 100644 src/modules/app-logs.types.ts create mode 100644 src/modules/auth.types.ts create mode 100644 src/modules/entities.types.ts create mode 100644 src/modules/functions.types.ts create mode 100644 src/modules/integrations.types.ts create mode 100644 src/modules/sso.types.ts create mode 100644 src/utils/auth-utils.types.ts create mode 100644 yarn.lock diff --git a/docs/api-reference/README.mdx b/docs/api-reference/README.mdx new file mode 100644 index 0000000..abb4aac --- /dev/null +++ b/docs/api-reference/README.mdx @@ -0,0 +1,18 @@ +**@base44/sdk v0.8.3** + +*** + +# API Reference + +## Modules + +| Module | Description | +| ------ | ------ | +| [client](./client/README.mdx) | - | +| [index](./index/README.mdx) | - | +| [modules/agents](./modules/agents/README.mdx) | - | +| [modules/auth](./modules/auth/README.mdx) | - | +| [modules/entities](./modules/entities/README.mdx) | - | +| [modules/functions](./modules/functions/README.mdx) | - | +| [modules/integrations](./modules/integrations/README.mdx) | - | +| [utils/auth-utils](./utils/auth-utils/README.mdx) | - | diff --git a/docs/api-reference/client/README.mdx b/docs/api-reference/client/README.mdx new file mode 100644 index 0000000..e2e509b --- /dev/null +++ b/docs/api-reference/client/README.mdx @@ -0,0 +1,21 @@ +[**@base44/sdk v0.8.3**](../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / client + +# client + +## Functions + +| Function | Description | +| ------ | ------ | +| [createClient](./client/functions/createClient.mdx) | Create a Base44 client instance for interacting with the Base44 API | +| [createClientFromRequest](./client/functions/createClientFromRequest.mdx) | Create a Base44 client from an HTTP request object | + +## Type Aliases + +| Type Alias | Description | +| ------ | ------ | +| [CreateClientOptions](./client/type-aliases/CreateClientOptions.mdx) | Options for configuring the Base44 client | +| [Base44Client](./client/type-aliases/Base44Client.mdx) | The Base44 client instance returned by createClient | diff --git a/docs/api-reference/client/functions/createClient.mdx b/docs/api-reference/client/functions/createClient.mdx new file mode 100644 index 0000000..241c065 --- /dev/null +++ b/docs/api-reference/client/functions/createClient.mdx @@ -0,0 +1,202 @@ +--- +title: createClient +description: Create a Base44 client instance +--- + +# createClient() + +```ts +function createClient(config): Base44Client; +``` + +Create a Base44 client instance for interacting with the Base44 API. + +This is the primary method for initializing the SDK. It creates a client with modules for entities, integrations, authentication, functions, and agents. + +## Parameters + + + Client configuration options + + + + Your Base44 application ID + + + + Base44 API server URL + + + + Your application's base URL for authentication redirects + + + + User authentication token for making authenticated requests + + + + Service role token for elevated privileges (server-side only) + + + + If true, automatically redirects to login when not authenticated + + + + Specific version of functions to use + + + + Additional headers to include in all API requests + + + + Additional client options like error handlers + + + + + +## Returns + + + A Base44 client instance with the following modules and methods + + + + CRUD operations for entities - `list()`, `get()`, `create()`, `update()`, `delete()`, `filter()`, `bulkCreate()`, etc. + + See [createEntitiesModule](../../modules/entities/functions/createEntitiesModule) + + + + Call integration endpoints - Dynamic access to any integration: `client.integrations.PackageName.EndpointName()` + + See [createIntegrationsModule](../../modules/integrations/functions/createIntegrationsModule) + + + + Authentication and user management - `me()`, `updateMe()`, `loginViaEmailPassword()`, `register()`, `logout()`, etc. + + See [createAuthModule](../../modules/auth/functions/createAuthModule) + + + + Invoke custom cloud functions - `invoke(functionName, params)` + + See [createFunctionsModule](../../modules/functions/functions/createFunctionsModule) + + + + AI agent operations - `getConversations()`, `createConversation()`, `addMessage()`, `subscribeToConversation()`, etc. + + See [createAgentsModule](../../modules/agents/functions/createAgentsModule) + + + + Application logging - `logUserInApp()`, `fetchLogs()`, `getStats()` + + + + Update the authentication token + + + + Get current client configuration + + + + Clean up resources (websockets, etc.) + + + + Access modules with elevated privileges (requires `serviceToken`). All the same modules as above but with service role permissions. Does NOT include the `auth` module for security. + + + + + +## Examples + + + +```typescript Basic Setup +import { createClient } from "@base44/sdk"; + +const client = createClient({ + appId: "your-app-id", +}); +``` + +```typescript With Authentication +const client = createClient({ + appId: "your-app-id", + token: "user-auth-token", +}); + +const user = await client.auth.me(); +``` + +```typescript With Service Role +const client = createClient({ + appId: "your-app-id", + token: "user-token", + serviceToken: "service-token", +}); + +// User-level access +const myData = await client.entities.Product.list(); + +// Admin-level access +const allData = await client.asServiceRole.entities.Product.list(); +``` + +```typescript Server-Side +const client = createClient({ + appId: process.env.BASE44_APP_ID!, + serviceToken: process.env.BASE44_SERVICE_TOKEN!, +}); +``` + + + +## Related Resources + + + + Create client from HTTP request + + +{" "} + + + Learn about auth flows + + +{" "} + + + Server-side operations with elevated permissions + + + + Full client type definition + + diff --git a/docs/api-reference/client/functions/createClientFromRequest.mdx b/docs/api-reference/client/functions/createClientFromRequest.mdx new file mode 100644 index 0000000..eab20dd --- /dev/null +++ b/docs/api-reference/client/functions/createClientFromRequest.mdx @@ -0,0 +1,1395 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / createClientFromRequest + +# createClientFromRequest() + +```ts +function createClientFromRequest(request): object; +``` + +Defined in: [client.ts:346](https://github.com/base44/sdk/blob/main/src/client.ts#L346) + +Create a Base44 client from an HTTP request object + +This utility function extracts authentication tokens and configuration from +standard HTTP headers, making it easy to initialize a client in server-side +environments like Next.js, Express, or other Node.js frameworks. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `request` | `Request` | HTTP Request object with Base44 headers Expected headers: - `Authorization: Bearer ` - User authentication token - `Base44-Service-Authorization: Bearer ` - Service role token - `Base44-App-Id: ` - Application ID (required) - `Base44-Api-Url: ` - Custom API URL (optional, defaults to https://base44.app) - `Base44-Functions-Version: ` - Functions version (optional) | + +## Returns + +A configured Base44 client instance + +### entities + +```ts +entities: object; +``` + +### integrations + +```ts +integrations: object; +``` + +### auth + +```ts +auth: object; +``` + +#### auth.me() + +```ts +me(): Promise>; +``` + +Get current user information + +Retrieves the authenticated user's profile data including +id, email, name, role, and other custom fields. + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the current user data + +##### Throws + +If user is not authenticated + +##### Example + +```typescript +const user = await client.auth.me(); +console.log(`Logged in as: ${user.name}`); +console.log(`Role: ${user.role}`); +``` + +#### auth.updateMe() + +```ts +updateMe(data): Promise>; +``` + +Update current user's profile data + +Updates the authenticated user's information. You can update any +custom fields on the user entity. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `data` | `Record`\<`string`, `any`\> | Object containing fields to update | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the updated user data + +##### Throws + +If user is not authenticated + +##### Example + +```typescript +const updatedUser = await client.auth.updateMe({ + name: 'John Doe', + preferences: { + theme: 'dark', + notifications: true + } +}); +``` + +#### auth.redirectToLogin() + +```ts +redirectToLogin(nextUrl): void; +``` + +Redirects the user to the app's login page + +Navigates to the Base44 login page with a return URL. After successful +authentication, the user will be redirected back to the specified URL +with an access token in the query parameters. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `nextUrl` | `string` | URL to redirect to after successful login | + +##### Returns + +`void` + +##### Throws + +When not in a browser environment + +##### Example + +```typescript +// Redirect to login and return to current page +client.auth.redirectToLogin(window.location.href); + +// Redirect to login and go to dashboard after +client.auth.redirectToLogin('/dashboard'); +``` + +#### auth.logout() + +```ts +logout(redirectUrl?): void; +``` + +Logout the current user + +Removes the authentication token from memory and localStorage, then either +redirects to a specified URL or reloads the page to clear the session. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `redirectUrl?` | `string` | Optional URL to redirect to after logout. Reloads the page if not provided | + +##### Returns + +`void` + +##### Example + +```typescript +// Simple logout (reloads page) +client.auth.logout(); + +// Logout and redirect to login page +client.auth.logout('/login'); + +// Logout and redirect to home +client.auth.logout('/'); +``` + +#### auth.setToken() + +```ts +setToken(token, saveToStorage): void; +``` + +Set authentication token for the client + +Updates the Authorization header for all API requests and optionally +saves the token to localStorage for persistence across page reloads. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `token` | `string` | Authentication token | +| `saveToStorage` | `boolean` | Whether to save the token to localStorage (default: true) | + +##### Returns + +`void` + +##### Example + +```typescript +// Set token and save to localStorage +client.auth.setToken('your-access-token'); + +// Set token without saving (for server-side or temporary tokens) +client.auth.setToken('your-access-token', false); +``` + +#### auth.loginViaEmailPassword() + +```ts +loginViaEmailPassword( + email, + password, + turnstileToken?): Promise<{ + access_token: string; + user: any; +}>; +``` + +Login via email and password + +Authenticates a user with their email and password credentials. +On success, automatically sets the token in the client and localStorage. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | +| `password` | `string` | User's password | +| `turnstileToken?` | `string` | Optional Cloudflare Turnstile captcha token for bot protection | + +##### Returns + +`Promise`\<\{ + `access_token`: `string`; + `user`: `any`; +\}\> + +Promise resolving to login response with access_token and user data + +##### Throws + +If credentials are invalid or authentication fails + +##### Example + +```typescript +try { + const { access_token, user } = await client.auth.loginViaEmailPassword( + 'user@example.com', + 'password123' + ); + console.log(`Logged in as ${user.name}`); + // Token is automatically set in the client +} catch (error) { + console.error('Login failed:', error.message); +} +``` + +#### auth.isAuthenticated() + +```ts +isAuthenticated(): Promise; +``` + +Verify if the current user is authenticated + +Checks whether the current token is valid by attempting to fetch +the user's profile. Returns true if authenticated, false otherwise. + +##### Returns + +`Promise`\<`boolean`\> + +Promise resolving to true if authenticated, false if not + +##### Example + +```typescript +if (await client.auth.isAuthenticated()) { + console.log('User is logged in'); + const user = await client.auth.me(); +} else { + console.log('User needs to log in'); + client.auth.redirectToLogin('/dashboard'); +} +``` + +#### auth.inviteUser() + +```ts +inviteUser(userEmail, role): Promise>; +``` + +Invite a user to the application + +Sends an invitation email to the specified user with the assigned role. +The user will receive a link to complete their registration. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userEmail` | `string` | Email address of the user to invite | +| `role` | `string` | Role to assign to the user (e.g., 'admin', 'editor', 'viewer') | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the invitation result + +##### Example + +```typescript +await client.auth.inviteUser('newuser@example.com', 'editor'); +console.log('Invitation sent!'); +``` + +#### auth.register() + +```ts +register(payload): Promise>; +``` + +Register a new user account + +Creates a new user account with email and password. May require +email verification via OTP depending on app configuration. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `payload` | \{ `email`: `string`; `password`: `string`; `turnstile_token?`: `string` \| `null`; `referral_code?`: `string` \| `null`; \} | Registration data | +| `payload.email` | `string` | User's email address | +| `payload.password` | `string` | User's password | +| `payload.turnstile_token?` | `string` \| `null` | Optional Cloudflare Turnstile captcha token | +| `payload.referral_code?` | `string` \| `null` | Optional referral code | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the registration result + +##### Example + +```typescript +try { + await client.auth.register({ + email: 'newuser@example.com', + password: 'securePassword123' + }); + // Check email for verification code +} catch (error) { + console.error('Registration failed:', error.message); +} +``` + +#### auth.verifyOtp() + +```ts +verifyOtp(params): Promise>; +``` + +Verify email with OTP code + +Verifies a user's email address using the one-time password (OTP) +sent to their email during registration. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `email`: `string`; `otpCode`: `string`; \} | Verification parameters | +| `params.email` | `string` | User's email address | +| `params.otpCode` | `string` | One-time password code from email | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to verification result with access token + +##### Example + +```typescript +const { access_token } = await client.auth.verifyOtp({ + email: 'user@example.com', + otpCode: '123456' +}); +client.auth.setToken(access_token); +``` + +#### auth.resendOtp() + +```ts +resendOtp(email): Promise>; +``` + +Resend OTP verification code + +Sends a new OTP code to the user's email if the previous one expired +or was not received. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when OTP is sent + +##### Example + +```typescript +await client.auth.resendOtp('user@example.com'); +console.log('New verification code sent!'); +``` + +#### auth.resetPasswordRequest() + +```ts +resetPasswordRequest(email): Promise>; +``` + +Request password reset + +Initiates the password reset process by sending a reset link +to the user's email address. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when reset email is sent + +##### Example + +```typescript +await client.auth.resetPasswordRequest('user@example.com'); +console.log('Password reset email sent!'); +``` + +#### auth.resetPassword() + +```ts +resetPassword(params): Promise>; +``` + +Reset password with token + +Completes the password reset process using the reset token from +the email and setting a new password. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `resetToken`: `string`; `newPassword`: `string`; \} | Reset parameters | +| `params.resetToken` | `string` | Reset token from email link | +| `params.newPassword` | `string` | New password to set | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when password is reset + +##### Example + +```typescript +// Extract token from email link +const urlParams = new URLSearchParams(window.location.search); +const resetToken = urlParams.get('reset_token'); + +await client.auth.resetPassword({ + resetToken, + newPassword: 'newSecurePassword123' +}); +console.log('Password reset successful!'); +``` + +#### auth.changePassword() + +```ts +changePassword(params): Promise>; +``` + +Change password for authenticated user + +Allows a logged-in user to change their password by providing +their current password and a new password. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `userId`: `string`; `currentPassword`: `string`; `newPassword`: `string`; \} | Change password parameters | +| `params.userId` | `string` | User's ID | +| `params.currentPassword` | `string` | Current password for verification | +| `params.newPassword` | `string` | New password to set | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when password is changed + +##### Throws + +If current password is incorrect + +##### Example + +```typescript +const user = await client.auth.me(); + +try { + await client.auth.changePassword({ + userId: user.id, + currentPassword: 'oldPassword123', + newPassword: 'newSecurePassword456' + }); + console.log('Password changed successfully!'); +} catch (error) { + console.error('Failed to change password:', error.message); +} +``` + +### functions + +```ts +functions: object; +``` + +#### functions.invoke() + +```ts +invoke(functionName, data): Promise>; +``` + +Invoke a custom function by name + +Executes a cloud function defined in your Base44 application with the provided +parameters. Automatically handles file uploads when File objects are included. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `functionName` | `string` | Name of the function to invoke | +| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the function's response + +##### Throws + +If function doesn't exist or execution fails + +##### Example + +```typescript +// Simple function call +const result = await client.functions.invoke('calculateTotal', { + items: ['item1', 'item2'], + discount: 0.1 +}); + +// Function with file upload +const fileInput = document.querySelector('input[type="file"]'); +const result = await client.functions.invoke('processImage', { + image: fileInput.files[0], + filter: 'grayscale' +}); + +// Service role function invocation +const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + action: 'cleanup' +}); +``` + +### agents + +```ts +agents: object; +``` + +#### agents.getConversations() + +```ts +getConversations: () => Promise; +``` + +Get all agent conversations + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to array of conversations + +##### Example + +```typescript +const conversations = await client.agents.getConversations(); +console.log(`Total conversations: ${conversations.length}`); +``` + +#### agents.getConversation() + +```ts +getConversation: (conversationId) => Promise< + | AgentConversation +| undefined>; +``` + +Get a specific agent conversation by ID + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to retrieve | + +##### Returns + +`Promise`\< + \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) + \| `undefined`\> + +Promise resolving to the conversation or undefined + +##### Example + +```typescript +const conversation = await client.agents.getConversation('conv-123'); +console.log(conversation.messages); +``` + +#### agents.listConversations() + +```ts +listConversations: (filterParams) => Promise; +``` + +List agent conversations with filtering and pagination + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to filtered conversations + +##### Example + +```typescript +const recent = await client.agents.listConversations({ + sort: '-created_at', + limit: 10 +}); +``` + +#### agents.createConversation() + +```ts +createConversation: (conversation) => Promise; +``` + +Create a new agent conversation + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | +| `conversation.agent_name` | `string` | Name of the agent to create conversation with | +| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> + +Promise resolving to the created conversation + +##### Example + +```typescript +const conversation = await client.agents.createConversation({ + agent_name: 'support-agent', + metadata: { user_id: 'user-123' } +}); +``` + +#### agents.addMessage() + +```ts +addMessage: (conversation, message) => Promise; +``` + +Add a message to an agent conversation + +Sends a message and updates the conversation in real-time via WebSocket. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | +| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | + +##### Returns + +`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> + +Promise resolving to the created message + +##### Example + +```typescript +const message = await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help with my order' +}); +``` + +#### agents.subscribeToConversation() + +```ts +subscribeToConversation: (conversationId, onUpdate?) => () => void; +``` + +Subscribe to real-time updates for a conversation + +Establishes a WebSocket connection to receive live updates when +the agent responds or the conversation is updated. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to subscribe to | +| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | + +##### Returns + +Unsubscribe function to stop receiving updates + +```ts +(): void; +``` + +###### Returns + +`void` + +##### Example + +```typescript +const unsubscribe = client.agents.subscribeToConversation( + 'conv-123', + (updatedConversation) => { + console.log('New message:', updatedConversation.messages); + } +); + +// Later, stop listening +unsubscribe(); +``` + +#### agents.getWhatsAppConnectURL() + +```ts +getWhatsAppConnectURL: (agentName) => string; +``` + +Get WhatsApp connection URL for an agent + +Generates a URL that allows users to connect with an agent via WhatsApp. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `agentName` | `string` | Name of the agent | + +##### Returns + +`string` + +WhatsApp connection URL with authentication token + +##### Example + +```typescript +const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); +window.open(whatsappURL, '_blank'); +``` + +### appLogs + +```ts +appLogs: object; +``` + +#### appLogs.logUserInApp() + +```ts +logUserInApp(pageName): Promise; +``` + +Log user activity in the app + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pageName` | `string` | Name of the page being visited | + +##### Returns + +`Promise`\<`void`\> + +#### appLogs.fetchLogs() + +```ts +fetchLogs(params): Promise; +``` + +Fetch app logs with optional parameters + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering logs | + +##### Returns + +`Promise`\<`any`\> + +App logs data + +#### appLogs.getStats() + +```ts +getStats(params): Promise; +``` + +Get app statistics + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering stats | + +##### Returns + +`Promise`\<`any`\> + +App statistics + +### cleanup() + +```ts +cleanup: () => void; +``` + +#### Returns + +`void` + +### setToken() + +```ts +setToken(newToken): void; +``` + +Set authentication token for all requests + +Updates the authentication token used by all modules and the websocket connection. +Also saves the token to localStorage if in a browser environment. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `newToken` | `string` | The new authentication token | + +#### Returns + +`void` + +#### Example + +```typescript +const client = createClient({ appId: 'your-app-id' }); + +// After user logs in +const { access_token } = await client.auth.loginViaEmailPassword(email, password); +client.setToken(access_token); +``` + +### getConfig() + +```ts +getConfig(): object; +``` + +Get current client configuration + +#### Returns + +`object` + +An object containing the current serverUrl, appId, and requiresAuth settings + +##### serverUrl + +```ts +serverUrl: string; +``` + +##### appId + +```ts +appId: string; +``` + +##### requiresAuth + +```ts +requiresAuth: boolean; +``` + +#### Example + +```typescript +const config = client.getConfig(); +console.log(`Connected to: ${config.serverUrl}`); +console.log(`App ID: ${config.appId}`); +``` + +### asServiceRole + +```ts +asServiceRole: object; +``` + +#### asServiceRole.entities + +```ts +entities: object; +``` + +#### asServiceRole.integrations + +```ts +integrations: object; +``` + +#### asServiceRole.sso + +```ts +sso: object; +``` + +#### asServiceRole.sso.getAccessToken() + +```ts +getAccessToken(userid): Promise>; +``` + +Get current user sso access token + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userid` | `string` | User ID to include as path parameter | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Current user sso access_token + +#### asServiceRole.functions + +```ts +functions: object; +``` + +#### asServiceRole.functions.invoke() + +```ts +invoke(functionName, data): Promise>; +``` + +Invoke a custom function by name + +Executes a cloud function defined in your Base44 application with the provided +parameters. Automatically handles file uploads when File objects are included. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `functionName` | `string` | Name of the function to invoke | +| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | + +##### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the function's response + +##### Throws + +If function doesn't exist or execution fails + +##### Example + +```typescript +// Simple function call +const result = await client.functions.invoke('calculateTotal', { + items: ['item1', 'item2'], + discount: 0.1 +}); + +// Function with file upload +const fileInput = document.querySelector('input[type="file"]'); +const result = await client.functions.invoke('processImage', { + image: fileInput.files[0], + filter: 'grayscale' +}); + +// Service role function invocation +const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + action: 'cleanup' +}); +``` + +#### asServiceRole.agents + +```ts +agents: object; +``` + +#### asServiceRole.agents.getConversations() + +```ts +getConversations: () => Promise; +``` + +Get all agent conversations + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to array of conversations + +##### Example + +```typescript +const conversations = await client.agents.getConversations(); +console.log(`Total conversations: ${conversations.length}`); +``` + +#### asServiceRole.agents.getConversation() + +```ts +getConversation: (conversationId) => Promise< + | AgentConversation +| undefined>; +``` + +Get a specific agent conversation by ID + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to retrieve | + +##### Returns + +`Promise`\< + \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) + \| `undefined`\> + +Promise resolving to the conversation or undefined + +##### Example + +```typescript +const conversation = await client.agents.getConversation('conv-123'); +console.log(conversation.messages); +``` + +#### asServiceRole.agents.listConversations() + +```ts +listConversations: (filterParams) => Promise; +``` + +List agent conversations with filtering and pagination + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to filtered conversations + +##### Example + +```typescript +const recent = await client.agents.listConversations({ + sort: '-created_at', + limit: 10 +}); +``` + +#### asServiceRole.agents.createConversation() + +```ts +createConversation: (conversation) => Promise; +``` + +Create a new agent conversation + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | +| `conversation.agent_name` | `string` | Name of the agent to create conversation with | +| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | + +##### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> + +Promise resolving to the created conversation + +##### Example + +```typescript +const conversation = await client.agents.createConversation({ + agent_name: 'support-agent', + metadata: { user_id: 'user-123' } +}); +``` + +#### asServiceRole.agents.addMessage() + +```ts +addMessage: (conversation, message) => Promise; +``` + +Add a message to an agent conversation + +Sends a message and updates the conversation in real-time via WebSocket. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | +| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | + +##### Returns + +`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> + +Promise resolving to the created message + +##### Example + +```typescript +const message = await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help with my order' +}); +``` + +#### asServiceRole.agents.subscribeToConversation() + +```ts +subscribeToConversation: (conversationId, onUpdate?) => () => void; +``` + +Subscribe to real-time updates for a conversation + +Establishes a WebSocket connection to receive live updates when +the agent responds or the conversation is updated. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to subscribe to | +| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | + +##### Returns + +Unsubscribe function to stop receiving updates + +```ts +(): void; +``` + +###### Returns + +`void` + +##### Example + +```typescript +const unsubscribe = client.agents.subscribeToConversation( + 'conv-123', + (updatedConversation) => { + console.log('New message:', updatedConversation.messages); + } +); + +// Later, stop listening +unsubscribe(); +``` + +#### asServiceRole.agents.getWhatsAppConnectURL() + +```ts +getWhatsAppConnectURL: (agentName) => string; +``` + +Get WhatsApp connection URL for an agent + +Generates a URL that allows users to connect with an agent via WhatsApp. + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `agentName` | `string` | Name of the agent | + +##### Returns + +`string` + +WhatsApp connection URL with authentication token + +##### Example + +```typescript +const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); +window.open(whatsappURL, '_blank'); +``` + +#### asServiceRole.appLogs + +```ts +appLogs: object; +``` + +#### asServiceRole.appLogs.logUserInApp() + +```ts +logUserInApp(pageName): Promise; +``` + +Log user activity in the app + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `pageName` | `string` | Name of the page being visited | + +##### Returns + +`Promise`\<`void`\> + +#### asServiceRole.appLogs.fetchLogs() + +```ts +fetchLogs(params): Promise; +``` + +Fetch app logs with optional parameters + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering logs | + +##### Returns + +`Promise`\<`any`\> + +App logs data + +#### asServiceRole.appLogs.getStats() + +```ts +getStats(params): Promise; +``` + +Get app statistics + +##### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering stats | + +##### Returns + +`Promise`\<`any`\> + +App statistics + +#### asServiceRole.cleanup() + +```ts +cleanup: () => void; +``` + +##### Returns + +`void` + +## Throws + +If Base44-App-Id header is missing or authorization headers are malformed + +## Example + +```typescript +// In a Next.js API route +export async function GET(request: Request) { + const client = createClientFromRequest(request); + const data = await client.entities.Product.list(); + return Response.json(data); +} + +// In an Express handler +app.get('/api/data', async (req, res) => { + const client = createClientFromRequest(req); + const data = await client.entities.User.list(); + res.json(data); +}); +``` diff --git a/docs/api-reference/client/type-aliases/Base44Client.mdx b/docs/api-reference/client/type-aliases/Base44Client.mdx new file mode 100644 index 0000000..b926cd4 --- /dev/null +++ b/docs/api-reference/client/type-aliases/Base44Client.mdx @@ -0,0 +1,15 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / Base44Client + +# Base44Client + +```ts +type Base44Client = ReturnType; +``` + +Defined in: [client.ts:26](https://github.com/base44/sdk/blob/main/src/client.ts#L26) + +The Base44 client instance returned by createClient diff --git a/docs/api-reference/client/type-aliases/CreateClientOptions.mdx b/docs/api-reference/client/type-aliases/CreateClientOptions.mdx new file mode 100644 index 0000000..cbcce82 --- /dev/null +++ b/docs/api-reference/client/type-aliases/CreateClientOptions.mdx @@ -0,0 +1,37 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / CreateClientOptions + +# CreateClientOptions + +```ts +type CreateClientOptions = object; +``` + +Defined in: [client.ts:15](https://github.com/base44/sdk/blob/main/src/client.ts#L15) + +Options for configuring the Base44 client + +## Properties + +### onError()? + +```ts +optional onError: (error) => void; +``` + +Defined in: [client.ts:20](https://github.com/base44/sdk/blob/main/src/client.ts#L20) + +Error handler callback that will be invoked when API requests fail + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `error` | `Error` | The error object from the failed request | + +#### Returns + +`void` diff --git a/docs/api-reference/index/README.mdx b/docs/api-reference/index/README.mdx new file mode 100644 index 0000000..c4f38a4 --- /dev/null +++ b/docs/api-reference/index/README.mdx @@ -0,0 +1,77 @@ +[**@base44/sdk v0.8.3**](../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / index + +# index + +## Classes + +| Class | Description | +| ------ | ------ | +| [Base44Error](./index/classes/Base44Error.mdx) | - | + +## Interfaces + +| Interface | Description | +| ------ | ------ | +| [AppMessageContent](./index/interfaces/AppMessageContent.mdx) | - | +| [AppConversationMessage](./index/interfaces/AppConversationMessage.mdx) | - | +| [AppConversationLike](./index/interfaces/AppConversationLike.mdx) | - | +| [DenoProjectLike](./index/interfaces/DenoProjectLike.mdx) | - | +| [AppLike](./index/interfaces/AppLike.mdx) | - | +| [UserLike](./index/interfaces/UserLike.mdx) | - | +| [UserEntityLike](./index/interfaces/UserEntityLike.mdx) | - | +| [AuthConfigLike](./index/interfaces/AuthConfigLike.mdx) | - | + +## References + +### createClient + +Re-exports [createClient](./client/functions/createClient.mdx) + +*** + +### createClientFromRequest + +Re-exports [createClientFromRequest](./client/functions/createClientFromRequest.mdx) + +*** + +### getAccessToken + +Re-exports [getAccessToken](./utils/auth-utils/functions/getAccessToken.mdx) + +*** + +### saveAccessToken + +Re-exports [saveAccessToken](./utils/auth-utils/functions/saveAccessToken.mdx) + +*** + +### removeAccessToken + +Re-exports [removeAccessToken](./utils/auth-utils/functions/removeAccessToken.mdx) + +*** + +### getLoginUrl + +Re-exports [getLoginUrl](./utils/auth-utils/functions/getLoginUrl.mdx) + +*** + +### Base44Client + +Re-exports [Base44Client](./client/type-aliases/Base44Client.mdx) + +## Type Aliases + +| Type Alias | Description | +| ------ | ------ | +| [AgentConversation](./index/type-aliases/AgentConversation.mdx) | - | +| [AgentMessage](./index/type-aliases/AgentMessage.mdx) | - | +| [LoginInfoResponse](./index/type-aliases/LoginInfoResponse.mdx) | - | +| [ModelFilterParams](./index/type-aliases/ModelFilterParams.mdx) | Parameters for filtering and paginating entity queries | diff --git a/docs/api-reference/index/classes/Base44Error.mdx b/docs/api-reference/index/classes/Base44Error.mdx new file mode 100644 index 0000000..c54003c --- /dev/null +++ b/docs/api-reference/index/classes/Base44Error.mdx @@ -0,0 +1,132 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / Base44Error + +# Base44Error + +Defined in: [utils/axios-client.ts:5](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L5) + +## Extends + +- `Error` + +## Constructors + +### Constructor + +```ts +new Base44Error( + message, + status, + code, + data, + originalError): Base44Error; +``` + +Defined in: [utils/axios-client.ts:11](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L11) + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `message` | `string` | +| `status` | `number` | +| `code` | `string` | +| `data` | `any` | +| `originalError` | `unknown` | + +#### Returns + +`Base44Error` + +#### Overrides + +```ts +Error.constructor +``` + +## Methods + +### toJSON() + +```ts +toJSON(): object; +``` + +Defined in: [utils/axios-client.ts:27](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L27) + +#### Returns + +`object` + +##### name + +```ts +name: string; +``` + +##### message + +```ts +message: string; +``` + +##### status + +```ts +status: number; +``` + +##### code + +```ts +code: string; +``` + +##### data + +```ts +data: any; +``` + +## Properties + +### status + +```ts +status: number; +``` + +Defined in: [utils/axios-client.ts:6](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L6) + +*** + +### code + +```ts +code: string; +``` + +Defined in: [utils/axios-client.ts:7](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L7) + +*** + +### data + +```ts +data: any; +``` + +Defined in: [utils/axios-client.ts:8](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L8) + +*** + +### originalError + +```ts +originalError: unknown; +``` + +Defined in: [utils/axios-client.ts:9](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L9) diff --git a/docs/api-reference/index/interfaces/AppConversationLike.mdx b/docs/api-reference/index/interfaces/AppConversationLike.mdx new file mode 100644 index 0000000..b3d7969 --- /dev/null +++ b/docs/api-reference/index/interfaces/AppConversationLike.mdx @@ -0,0 +1,51 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppConversationLike + +# AppConversationLike + +Defined in: [modules/app.types.ts:16](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L16) + +## Properties + +### id? + +```ts +optional id: string | null; +``` + +Defined in: [modules/app.types.ts:17](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L17) + +*** + +### messages? + +```ts +optional messages: + | AppMessageContent[] + | null; +``` + +Defined in: [modules/app.types.ts:18](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L18) + +*** + +### model? + +```ts +optional model: string; +``` + +Defined in: [modules/app.types.ts:19](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L19) + +*** + +### functions\_fail\_silently? + +```ts +optional functions_fail_silently: boolean; +``` + +Defined in: [modules/app.types.ts:20](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L20) diff --git a/docs/api-reference/index/interfaces/AppConversationMessage.mdx b/docs/api-reference/index/interfaces/AppConversationMessage.mdx new file mode 100644 index 0000000..cafc1e4 --- /dev/null +++ b/docs/api-reference/index/interfaces/AppConversationMessage.mdx @@ -0,0 +1,95 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppConversationMessage + +# AppConversationMessage + +Defined in: [modules/app.types.ts:11](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L11) + +## Extends + +- [`AppMessageContent`](./index/interfaces/AppMessageContent.mdx) + +## Indexable + +```ts +[key: string]: unknown +``` + +## Properties + +### content? + +```ts +optional content: string; +``` + +Defined in: [modules/app.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L4) + +#### Inherited from + +[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`content`](./index/interfaces/AppMessageContent.mdx#content) + +*** + +### file\_urls? + +```ts +optional file_urls: string[]; +``` + +Defined in: [modules/app.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L5) + +#### Inherited from + +[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`file_urls`](./index/interfaces/AppMessageContent.mdx#file_urls) + +*** + +### custom\_context? + +```ts +optional custom_context: unknown; +``` + +Defined in: [modules/app.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L6) + +#### Inherited from + +[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`custom_context`](./index/interfaces/AppMessageContent.mdx#custom_context) + +*** + +### additional\_message\_params? + +```ts +optional additional_message_params: Record; +``` + +Defined in: [modules/app.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L7) + +#### Inherited from + +[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`additional_message_params`](./index/interfaces/AppMessageContent.mdx#additional_message_params) + +*** + +### id? + +```ts +optional id: string | null; +``` + +Defined in: [modules/app.types.ts:12](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L12) + +*** + +### role? + +```ts +optional role: string; +``` + +Defined in: [modules/app.types.ts:13](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L13) diff --git a/docs/api-reference/index/interfaces/AppLike.mdx b/docs/api-reference/index/interfaces/AppLike.mdx new file mode 100644 index 0000000..fa561ac --- /dev/null +++ b/docs/api-reference/index/interfaces/AppLike.mdx @@ -0,0 +1,501 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppLike + +# AppLike + +Defined in: [modules/app.types.ts:32](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L32) + +## Properties + +### id? + +```ts +optional id: string; +``` + +Defined in: [modules/app.types.ts:33](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L33) + +*** + +### conversation? + +```ts +optional conversation: + | AppConversationLike + | null; +``` + +Defined in: [modules/app.types.ts:34](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L34) + +*** + +### app\_stage? + +```ts +optional app_stage: string; +``` + +Defined in: [modules/app.types.ts:35](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L35) + +*** + +### created\_date? + +```ts +optional created_date: string; +``` + +Defined in: [modules/app.types.ts:36](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L36) + +*** + +### updated\_date? + +```ts +optional updated_date: string; +``` + +Defined in: [modules/app.types.ts:37](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L37) + +*** + +### created\_by? + +```ts +optional created_by: string; +``` + +Defined in: [modules/app.types.ts:38](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L38) + +*** + +### organization\_id? + +```ts +optional organization_id: string; +``` + +Defined in: [modules/app.types.ts:39](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L39) + +*** + +### name? + +```ts +optional name: string; +``` + +Defined in: [modules/app.types.ts:40](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L40) + +*** + +### user\_description? + +```ts +optional user_description: string; +``` + +Defined in: [modules/app.types.ts:41](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L41) + +*** + +### entities? + +```ts +optional entities: Record; +``` + +Defined in: [modules/app.types.ts:42](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L42) + +*** + +### additional\_user\_data\_schema? + +```ts +optional additional_user_data_schema: any; +``` + +Defined in: [modules/app.types.ts:43](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L43) + +*** + +### pages? + +```ts +optional pages: object; +``` + +Defined in: [modules/app.types.ts:44](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L44) + +#### Index Signature + +```ts +[key: string]: string +``` + +*** + +### components + +```ts +components: object; +``` + +Defined in: [modules/app.types.ts:45](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L45) + +#### Index Signature + +```ts +[key: string]: any +``` + +*** + +### layout? + +```ts +optional layout: string; +``` + +Defined in: [modules/app.types.ts:46](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L46) + +*** + +### globals\_css? + +```ts +optional globals_css: string; +``` + +Defined in: [modules/app.types.ts:47](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L47) + +*** + +### agents? + +```ts +optional agents: Record; +``` + +Defined in: [modules/app.types.ts:48](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L48) + +*** + +### logo\_url? + +```ts +optional logo_url: string; +``` + +Defined in: [modules/app.types.ts:49](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L49) + +*** + +### slug? + +```ts +optional slug: string; +``` + +Defined in: [modules/app.types.ts:50](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L50) + +*** + +### public\_settings? + +```ts +optional public_settings: string; +``` + +Defined in: [modules/app.types.ts:51](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L51) + +*** + +### is\_blocked? + +```ts +optional is_blocked: boolean; +``` + +Defined in: [modules/app.types.ts:52](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L52) + +*** + +### github\_repo\_url? + +```ts +optional github_repo_url: string; +``` + +Defined in: [modules/app.types.ts:53](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L53) + +*** + +### main\_page? + +```ts +optional main_page: string; +``` + +Defined in: [modules/app.types.ts:54](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L54) + +*** + +### installable\_integrations? + +```ts +optional installable_integrations: any; +``` + +Defined in: [modules/app.types.ts:55](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L55) + +*** + +### backend\_project? + +```ts +optional backend_project: DenoProjectLike; +``` + +Defined in: [modules/app.types.ts:56](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L56) + +*** + +### last\_deployed\_at? + +```ts +optional last_deployed_at: string; +``` + +Defined in: [modules/app.types.ts:57](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L57) + +*** + +### is\_remixable? + +```ts +optional is_remixable: boolean; +``` + +Defined in: [modules/app.types.ts:58](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L58) + +*** + +### remixed\_from\_app\_id? + +```ts +optional remixed_from_app_id: string; +``` + +Defined in: [modules/app.types.ts:59](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L59) + +*** + +### hide\_entity\_created\_by? + +```ts +optional hide_entity_created_by: boolean; +``` + +Defined in: [modules/app.types.ts:60](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L60) + +*** + +### platform\_version? + +```ts +optional platform_version: number; +``` + +Defined in: [modules/app.types.ts:61](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L61) + +*** + +### enable\_username\_password? + +```ts +optional enable_username_password: boolean; +``` + +Defined in: [modules/app.types.ts:62](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L62) + +*** + +### auth\_config? + +```ts +optional auth_config: AuthConfigLike; +``` + +Defined in: [modules/app.types.ts:63](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L63) + +*** + +### status? + +```ts +optional status: object; +``` + +Defined in: [modules/app.types.ts:64](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L64) + +#### state? + +```ts +optional state: string; +``` + +#### details? + +```ts +optional details: any; +``` + +#### last\_updated\_date? + +```ts +optional last_updated_date: string; +``` + +*** + +### custom\_instructions? + +```ts +optional custom_instructions: any; +``` + +Defined in: [modules/app.types.ts:69](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L69) + +*** + +### frozen\_files? + +```ts +optional frozen_files: string[]; +``` + +Defined in: [modules/app.types.ts:70](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L70) + +*** + +### deep\_coding\_mode? + +```ts +optional deep_coding_mode: boolean; +``` + +Defined in: [modules/app.types.ts:71](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L71) + +*** + +### needs\_to\_add\_diff? + +```ts +optional needs_to_add_diff: boolean; +``` + +Defined in: [modules/app.types.ts:72](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L72) + +*** + +### installed\_integration\_context\_items? + +```ts +optional installed_integration_context_items: any[]; +``` + +Defined in: [modules/app.types.ts:73](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L73) + +*** + +### model? + +```ts +optional model: string; +``` + +Defined in: [modules/app.types.ts:74](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L74) + +*** + +### is\_starred? + +```ts +optional is_starred: boolean; +``` + +Defined in: [modules/app.types.ts:75](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L75) + +*** + +### agents\_enabled? + +```ts +optional agents_enabled: boolean; +``` + +Defined in: [modules/app.types.ts:76](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L76) + +*** + +### categories? + +```ts +optional categories: string[]; +``` + +Defined in: [modules/app.types.ts:77](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L77) + +*** + +### functions? + +```ts +optional functions: any; +``` + +Defined in: [modules/app.types.ts:78](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L78) + +*** + +### function\_names? + +```ts +optional function_names: string[]; +``` + +Defined in: [modules/app.types.ts:79](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L79) + +*** + +### user\_entity? + +```ts +optional user_entity: UserEntityLike; +``` + +Defined in: [modules/app.types.ts:80](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L80) + +*** + +### app\_code\_hash? + +```ts +optional app_code_hash: string; +``` + +Defined in: [modules/app.types.ts:81](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L81) + +*** + +### has\_backend\_functions\_enabled? + +```ts +optional has_backend_functions_enabled: boolean; +``` + +Defined in: [modules/app.types.ts:82](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L82) diff --git a/docs/api-reference/index/interfaces/AppMessageContent.mdx b/docs/api-reference/index/interfaces/AppMessageContent.mdx new file mode 100644 index 0000000..0a2d7b2 --- /dev/null +++ b/docs/api-reference/index/interfaces/AppMessageContent.mdx @@ -0,0 +1,59 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppMessageContent + +# AppMessageContent + +Defined in: [modules/app.types.ts:3](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L3) + +## Extended by + +- [`AppConversationMessage`](./index/interfaces/AppConversationMessage.mdx) + +## Indexable + +```ts +[key: string]: unknown +``` + +## Properties + +### content? + +```ts +optional content: string; +``` + +Defined in: [modules/app.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L4) + +*** + +### file\_urls? + +```ts +optional file_urls: string[]; +``` + +Defined in: [modules/app.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L5) + +*** + +### custom\_context? + +```ts +optional custom_context: unknown; +``` + +Defined in: [modules/app.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L6) + +*** + +### additional\_message\_params? + +```ts +optional additional_message_params: Record; +``` + +Defined in: [modules/app.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L7) diff --git a/docs/api-reference/index/interfaces/AuthConfigLike.mdx b/docs/api-reference/index/interfaces/AuthConfigLike.mdx new file mode 100644 index 0000000..07eec21 --- /dev/null +++ b/docs/api-reference/index/interfaces/AuthConfigLike.mdx @@ -0,0 +1,69 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AuthConfigLike + +# AuthConfigLike + +Defined in: [modules/app.types.ts:112](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L112) + +## Properties + +### enable\_username\_password? + +```ts +optional enable_username_password: boolean; +``` + +Defined in: [modules/app.types.ts:113](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L113) + +*** + +### enable\_google\_login? + +```ts +optional enable_google_login: boolean; +``` + +Defined in: [modules/app.types.ts:114](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L114) + +*** + +### enable\_microsoft\_login? + +```ts +optional enable_microsoft_login: boolean; +``` + +Defined in: [modules/app.types.ts:115](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L115) + +*** + +### enable\_facebook\_login? + +```ts +optional enable_facebook_login: boolean; +``` + +Defined in: [modules/app.types.ts:116](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L116) + +*** + +### sso\_provider\_name? + +```ts +optional sso_provider_name: string; +``` + +Defined in: [modules/app.types.ts:117](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L117) + +*** + +### enable\_sso\_login? + +```ts +optional enable_sso_login: boolean; +``` + +Defined in: [modules/app.types.ts:118](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L118) diff --git a/docs/api-reference/index/interfaces/DenoProjectLike.mdx b/docs/api-reference/index/interfaces/DenoProjectLike.mdx new file mode 100644 index 0000000..de15ad7 --- /dev/null +++ b/docs/api-reference/index/interfaces/DenoProjectLike.mdx @@ -0,0 +1,52 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / DenoProjectLike + +# DenoProjectLike + +Defined in: [modules/app.types.ts:24](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L24) + +## Properties + +### project\_id + +```ts +project_id: string; +``` + +Defined in: [modules/app.types.ts:25](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L25) + +*** + +### project\_name + +```ts +project_name: string; +``` + +Defined in: [modules/app.types.ts:26](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L26) + +*** + +### app\_id + +```ts +app_id: string; +``` + +Defined in: [modules/app.types.ts:27](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L27) + +*** + +### deployment\_name\_to\_info + +```ts +deployment_name_to_info: Record; +``` + +Defined in: [modules/app.types.ts:28](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L28) diff --git a/docs/api-reference/index/interfaces/UserEntityLike.mdx b/docs/api-reference/index/interfaces/UserEntityLike.mdx new file mode 100644 index 0000000..568d513 --- /dev/null +++ b/docs/api-reference/index/interfaces/UserEntityLike.mdx @@ -0,0 +1,119 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / UserEntityLike + +# UserEntityLike + +Defined in: [modules/app.types.ts:89](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L89) + +## Properties + +### type + +```ts +type: string; +``` + +Defined in: [modules/app.types.ts:90](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L90) + +*** + +### name + +```ts +name: string; +``` + +Defined in: [modules/app.types.ts:91](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L91) + +*** + +### title? + +```ts +optional title: string; +``` + +Defined in: [modules/app.types.ts:92](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L92) + +*** + +### properties? + +```ts +optional properties: object; +``` + +Defined in: [modules/app.types.ts:93](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L93) + +#### role? + +```ts +optional role: object; +``` + +##### role.type? + +```ts +optional type: string; +``` + +##### role.description? + +```ts +optional description: string; +``` + +##### role.enum? + +```ts +optional enum: string[]; +``` + +#### email? + +```ts +optional email: object; +``` + +##### email.type? + +```ts +optional type: string; +``` + +##### email.description? + +```ts +optional description: string; +``` + +#### full\_name? + +```ts +optional full_name: object; +``` + +##### full\_name.type? + +```ts +optional type: string; +``` + +##### full\_name.description? + +```ts +optional description: string; +``` + +*** + +### required + +```ts +required: string[]; +``` + +Defined in: [modules/app.types.ts:108](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L108) diff --git a/docs/api-reference/index/interfaces/UserLike.mdx b/docs/api-reference/index/interfaces/UserLike.mdx new file mode 100644 index 0000000..3c9b042 --- /dev/null +++ b/docs/api-reference/index/interfaces/UserLike.mdx @@ -0,0 +1,19 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / UserLike + +# UserLike + +Defined in: [modules/app.types.ts:85](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L85) + +## Properties + +### id? + +```ts +optional id: string | null; +``` + +Defined in: [modules/app.types.ts:86](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L86) diff --git a/docs/api-reference/index/type-aliases/AgentConversation.mdx b/docs/api-reference/index/type-aliases/AgentConversation.mdx new file mode 100644 index 0000000..16160b4 --- /dev/null +++ b/docs/api-reference/index/type-aliases/AgentConversation.mdx @@ -0,0 +1,73 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AgentConversation + +# AgentConversation + +```ts +type AgentConversation = object; +``` + +Defined in: [modules/agents.types.ts:1](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L1) + +## Properties + +### id + +```ts +id: string; +``` + +Defined in: [modules/agents.types.ts:2](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L2) + +*** + +### app\_id + +```ts +app_id: string; +``` + +Defined in: [modules/agents.types.ts:3](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L3) + +*** + +### agent\_name + +```ts +agent_name: string; +``` + +Defined in: [modules/agents.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L4) + +*** + +### created\_by\_id + +```ts +created_by_id: string; +``` + +Defined in: [modules/agents.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L5) + +*** + +### messages + +```ts +messages: AgentMessage[]; +``` + +Defined in: [modules/agents.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L6) + +*** + +### metadata? + +```ts +optional metadata: Record; +``` + +Defined in: [modules/agents.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L7) diff --git a/docs/api-reference/index/type-aliases/AgentMessage.mdx b/docs/api-reference/index/type-aliases/AgentMessage.mdx new file mode 100644 index 0000000..fb5fa18 --- /dev/null +++ b/docs/api-reference/index/type-aliases/AgentMessage.mdx @@ -0,0 +1,184 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AgentMessage + +# AgentMessage + +```ts +type AgentMessage = object; +``` + +Defined in: [modules/agents.types.ts:10](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L10) + +## Properties + +### id + +```ts +id: string; +``` + +Defined in: [modules/agents.types.ts:11](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L11) + +*** + +### role + +```ts +role: "user" | "assistant" | "system"; +``` + +Defined in: [modules/agents.types.ts:12](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L12) + +*** + +### reasoning? + +```ts +optional reasoning: object; +``` + +Defined in: [modules/agents.types.ts:13](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L13) + +#### start\_date + +```ts +start_date: string; +``` + +#### end\_date? + +```ts +optional end_date: string; +``` + +#### content + +```ts +content: string; +``` + +*** + +### content? + +```ts +optional content: string | Record | null; +``` + +Defined in: [modules/agents.types.ts:18](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L18) + +*** + +### file\_urls? + +```ts +optional file_urls: string[] | null; +``` + +Defined in: [modules/agents.types.ts:19](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L19) + +*** + +### tool\_calls? + +```ts +optional tool_calls: object[] | null; +``` + +Defined in: [modules/agents.types.ts:20](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L20) + +*** + +### usage? + +```ts +optional usage: + | { + prompt_tokens?: number; + completion_tokens?: number; +} + | null; +``` + +Defined in: [modules/agents.types.ts:30](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L30) + +*** + +### hidden? + +```ts +optional hidden: boolean; +``` + +Defined in: [modules/agents.types.ts:31](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L31) + +*** + +### custom\_context? + +```ts +optional custom_context: object[] | null; +``` + +Defined in: [modules/agents.types.ts:32](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L32) + +*** + +### model? + +```ts +optional model: string | null; +``` + +Defined in: [modules/agents.types.ts:35](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L35) + +*** + +### checkpoint\_id? + +```ts +optional checkpoint_id: string | null; +``` + +Defined in: [modules/agents.types.ts:36](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L36) + +*** + +### metadata? + +```ts +optional metadata: object; +``` + +Defined in: [modules/agents.types.ts:37](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L37) + +#### created\_date + +```ts +created_date: string; +``` + +#### created\_by\_email + +```ts +created_by_email: string; +``` + +#### created\_by\_full\_name + +```ts +created_by_full_name: string | null; +``` + +*** + +### additional\_message\_params? + +```ts +optional additional_message_params: Record; +``` + +Defined in: [modules/agents.types.ts:42](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L42) diff --git a/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx b/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx new file mode 100644 index 0000000..46656ed --- /dev/null +++ b/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx @@ -0,0 +1,22 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / LoginInfoResponse + +# LoginInfoResponse + +```ts +type LoginInfoResponse = Pick; +``` + +Defined in: [modules/app.types.ts:124](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L124) diff --git a/docs/api-reference/index/type-aliases/ModelFilterParams.mdx b/docs/api-reference/index/type-aliases/ModelFilterParams.mdx new file mode 100644 index 0000000..96ee388 --- /dev/null +++ b/docs/api-reference/index/type-aliases/ModelFilterParams.mdx @@ -0,0 +1,89 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / ModelFilterParams + +# ModelFilterParams + +```ts +type ModelFilterParams = object; +``` + +Defined in: [types.ts:8](https://github.com/base44/sdk/blob/main/src/types.ts#L8) + +Parameters for filtering and paginating entity queries + +Used across various SDK methods to filter, sort, and paginate results. + +## Properties + +### q? + +```ts +optional q: Record; +``` + +Defined in: [types.ts:10](https://github.com/base44/sdk/blob/main/src/types.ts#L10) + +Query object for filtering results + +*** + +### sort? + +```ts +optional sort: string | null; +``` + +Defined in: [types.ts:12](https://github.com/base44/sdk/blob/main/src/types.ts#L12) + +Sort field (e.g., 'name' for ascending, '-created_at' for descending) + +*** + +### sort\_by? + +```ts +optional sort_by: string | null; +``` + +Defined in: [types.ts:14](https://github.com/base44/sdk/blob/main/src/types.ts#L14) + +Alternative sort field parameter + +*** + +### limit? + +```ts +optional limit: number | null; +``` + +Defined in: [types.ts:16](https://github.com/base44/sdk/blob/main/src/types.ts#L16) + +Maximum number of results to return + +*** + +### skip? + +```ts +optional skip: number | null; +``` + +Defined in: [types.ts:18](https://github.com/base44/sdk/blob/main/src/types.ts#L18) + +Number of results to skip (for pagination) + +*** + +### fields? + +```ts +optional fields: string[] | null; +``` + +Defined in: [types.ts:20](https://github.com/base44/sdk/blob/main/src/types.ts#L20) + +Array of field names to include in results diff --git a/docs/api-reference/modules/agents/-internal-/README.mdx b/docs/api-reference/modules/agents/-internal-/README.mdx new file mode 100644 index 0000000..55979b8 --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/README.mdx @@ -0,0 +1,24 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / \ + +# \ + +## Functions + +| Function | Description | +| ------ | ------ | +| [RoomsSocket](./modules/agents/-internal-/functions/RoomsSocket.mdx) | - | + +## Type Aliases + +| Type Alias | Description | +| ------ | ------ | +| [RoomsSocketConfig](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx) | - | +| [TJsonStr](./modules/agents/-internal-/type-aliases/TJsonStr.mdx) | - | +| [RoomsSocketEventsMap](./modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx) | - | +| [TEvent](./modules/agents/-internal-/type-aliases/TEvent.mdx) | - | +| [THandler](./modules/agents/-internal-/type-aliases/THandler.mdx) | - | +| [RoomsSocket](./modules/agents/-internal-/type-aliases/RoomsSocket.mdx) | - | diff --git a/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx b/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx new file mode 100644 index 0000000..9f3d93a --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx @@ -0,0 +1,103 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocket + +# RoomsSocket() + +```ts +function RoomsSocket(__namedParameters): object; +``` + +Defined in: [utils/socket-utils.ts:70](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L70) + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `__namedParameters` | \{ `config`: [`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx); \} | +| `__namedParameters.config` | [`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx) | + +## Returns + +`object` + +### socket + +```ts +socket: Socket<{ + connect: () => void | Promise; + update_model: (msg) => void | Promise; + error: (error) => void | Promise; +}, { + join: (room) => void; + leave: (room) => void; +}>; +``` + +### subscribeToRoom() + +```ts +subscribeToRoom: (room, handlers) => () => void; +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `room` | `string` | +| `handlers` | `Partial`\<`{ [k in TEvent]: THandler }`\> | + +#### Returns + +```ts +(): void; +``` + +##### Returns + +`void` + +### updateConfig() + +```ts +updateConfig: (config) => void; +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `config` | `Partial`\<[`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx)\> | + +#### Returns + +`void` + +### updateModel() + +```ts +updateModel: (room, data) => Promise; +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `room` | `string` | +| `data` | `any` | + +#### Returns + +`Promise`\<`void`\> + +### disconnect() + +```ts +disconnect: () => void; +``` + +#### Returns + +`void` diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx new file mode 100644 index 0000000..fc01a67 --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocket + +# RoomsSocket + +```ts +type RoomsSocket = ReturnType; +``` + +Defined in: [utils/socket-utils.ts:70](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L70) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx new file mode 100644 index 0000000..e0b568a --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx @@ -0,0 +1,63 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocketConfig + +# RoomsSocketConfig + +```ts +type RoomsSocketConfig = object; +``` + +Defined in: [utils/socket-utils.ts:4](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L4) + +## Properties + +### serverUrl + +```ts +serverUrl: string; +``` + +Defined in: [utils/socket-utils.ts:5](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L5) + +*** + +### mountPath + +```ts +mountPath: string; +``` + +Defined in: [utils/socket-utils.ts:6](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L6) + +*** + +### transports + +```ts +transports: string[]; +``` + +Defined in: [utils/socket-utils.ts:7](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L7) + +*** + +### appId + +```ts +appId: string; +``` + +Defined in: [utils/socket-utils.ts:8](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L8) + +*** + +### token? + +```ts +optional token: string; +``` + +Defined in: [utils/socket-utils.ts:9](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L9) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx new file mode 100644 index 0000000..feb2709 --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx @@ -0,0 +1,109 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocketEventsMap + +# RoomsSocketEventsMap + +```ts +type RoomsSocketEventsMap = object; +``` + +Defined in: [utils/socket-utils.ts:15](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L15) + +## Properties + +### listen + +```ts +listen: object; +``` + +Defined in: [utils/socket-utils.ts:16](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L16) + +#### connect() + +```ts +connect: () => Promise | void; +``` + +##### Returns + +`Promise`\<`void`\> \| `void` + +#### update\_model() + +```ts +update_model: (msg) => Promise | void; +``` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `msg` | \{ `room`: `string`; `data`: [`TJsonStr`](./modules/agents/-internal-/type-aliases/TJsonStr.mdx); \} | +| `msg.room` | `string` | +| `msg.data` | [`TJsonStr`](./modules/agents/-internal-/type-aliases/TJsonStr.mdx) | + +##### Returns + +`Promise`\<`void`\> \| `void` + +#### error() + +```ts +error: (error) => Promise | void; +``` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `error` | `Error` | + +##### Returns + +`Promise`\<`void`\> \| `void` + +*** + +### emit + +```ts +emit: object; +``` + +Defined in: [utils/socket-utils.ts:24](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L24) + +#### join() + +```ts +join: (room) => void; +``` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `room` | `string` | + +##### Returns + +`void` + +#### leave() + +```ts +leave: (room) => void; +``` + +##### Parameters + +| Parameter | Type | +| ------ | ------ | +| `room` | `string` | + +##### Returns + +`void` diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx new file mode 100644 index 0000000..31236fd --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / TEvent + +# TEvent + +```ts +type TEvent = keyof RoomsSocketEventsMap["listen"]; +``` + +Defined in: [utils/socket-utils.ts:30](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L30) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx new file mode 100644 index 0000000..8b68b61 --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx @@ -0,0 +1,19 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / THandler + +# THandler\ + +```ts +type THandler = RoomsSocketEventsMap["listen"][E]; +``` + +Defined in: [utils/socket-utils.ts:32](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L32) + +## Type Parameters + +| Type Parameter | +| ------ | +| `E` *extends* [`TEvent`](./modules/agents/-internal-/type-aliases/TEvent.mdx) | diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx new file mode 100644 index 0000000..4dab738 --- /dev/null +++ b/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / TJsonStr + +# TJsonStr + +```ts +type TJsonStr = string; +``` + +Defined in: [utils/socket-utils.ts:13](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L13) diff --git a/docs/api-reference/modules/agents/README.mdx b/docs/api-reference/modules/agents/README.mdx new file mode 100644 index 0000000..7083ff5 --- /dev/null +++ b/docs/api-reference/modules/agents/README.mdx @@ -0,0 +1,25 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / modules/agents + +# modules/agents + +## Functions + +| Function | Description | +| ------ | ------ | +| [createAgentsModule](./modules/agents/functions/createAgentsModule.mdx) | Creates the agents module for the Base44 SDK | + +## Modules + +| Module | Description | +| ------ | ------ | +| [\](./modules/agents/-internal-/README.mdx) | - | + +## Type Aliases + +| Type Alias | Description | +| ------ | ------ | +| [AgentsModuleConfig](./modules/agents/type-aliases/AgentsModuleConfig.mdx) | Configuration for the agents module | diff --git a/docs/api-reference/modules/agents/functions/createAgentsModule.mdx b/docs/api-reference/modules/agents/functions/createAgentsModule.mdx new file mode 100644 index 0000000..709ce16 --- /dev/null +++ b/docs/api-reference/modules/agents/functions/createAgentsModule.mdx @@ -0,0 +1,245 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / createAgentsModule + +# createAgentsModule() + +```ts +function createAgentsModule(config): object; +``` + +Defined in: [modules/agents.ts:32](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L32) + +Creates the agents module for the Base44 SDK + +Provides methods to interact with AI agents, manage conversations, +and receive real-time updates via WebSocket. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `config` | [`AgentsModuleConfig`](./modules/agents/type-aliases/AgentsModuleConfig.mdx) | Module configuration | + +## Returns + +Agents module with conversation and messaging methods + +### getConversations() + +```ts +getConversations: () => Promise; +``` + +Get all agent conversations + +#### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to array of conversations + +#### Example + +```typescript +const conversations = await client.agents.getConversations(); +console.log(`Total conversations: ${conversations.length}`); +``` + +### getConversation() + +```ts +getConversation: (conversationId) => Promise< + | AgentConversation +| undefined>; +``` + +Get a specific agent conversation by ID + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to retrieve | + +#### Returns + +`Promise`\< + \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) + \| `undefined`\> + +Promise resolving to the conversation or undefined + +#### Example + +```typescript +const conversation = await client.agents.getConversation('conv-123'); +console.log(conversation.messages); +``` + +### listConversations() + +```ts +listConversations: (filterParams) => Promise; +``` + +List agent conversations with filtering and pagination + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | + +#### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> + +Promise resolving to filtered conversations + +#### Example + +```typescript +const recent = await client.agents.listConversations({ + sort: '-created_at', + limit: 10 +}); +``` + +### createConversation() + +```ts +createConversation: (conversation) => Promise; +``` + +Create a new agent conversation + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | +| `conversation.agent_name` | `string` | Name of the agent to create conversation with | +| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | + +#### Returns + +`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> + +Promise resolving to the created conversation + +#### Example + +```typescript +const conversation = await client.agents.createConversation({ + agent_name: 'support-agent', + metadata: { user_id: 'user-123' } +}); +``` + +### addMessage() + +```ts +addMessage: (conversation, message) => Promise; +``` + +Add a message to an agent conversation + +Sends a message and updates the conversation in real-time via WebSocket. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | +| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | + +#### Returns + +`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> + +Promise resolving to the created message + +#### Example + +```typescript +const message = await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help with my order' +}); +``` + +### subscribeToConversation() + +```ts +subscribeToConversation: (conversationId, onUpdate?) => () => void; +``` + +Subscribe to real-time updates for a conversation + +Establishes a WebSocket connection to receive live updates when +the agent responds or the conversation is updated. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `conversationId` | `string` | The ID of the conversation to subscribe to | +| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | + +#### Returns + +Unsubscribe function to stop receiving updates + +```ts +(): void; +``` + +##### Returns + +`void` + +#### Example + +```typescript +const unsubscribe = client.agents.subscribeToConversation( + 'conv-123', + (updatedConversation) => { + console.log('New message:', updatedConversation.messages); + } +); + +// Later, stop listening +unsubscribe(); +``` + +### getWhatsAppConnectURL() + +```ts +getWhatsAppConnectURL: (agentName) => string; +``` + +Get WhatsApp connection URL for an agent + +Generates a URL that allows users to connect with an agent via WhatsApp. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `agentName` | `string` | Name of the agent | + +#### Returns + +`string` + +WhatsApp connection URL with authentication token + +#### Example + +```typescript +const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); +window.open(whatsappURL, '_blank'); +``` diff --git a/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx b/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx new file mode 100644 index 0000000..a7b7c4a --- /dev/null +++ b/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx @@ -0,0 +1,75 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / AgentsModuleConfig + +# AgentsModuleConfig + +```ts +type AgentsModuleConfig = object; +``` + +Defined in: [modules/agents.ts:10](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L10) + +Configuration for the agents module + +## Properties + +### axios + +```ts +axios: AxiosInstance; +``` + +Defined in: [modules/agents.ts:12](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L12) + +Axios instance for API requests + +*** + +### socket + +```ts +socket: ReturnType; +``` + +Defined in: [modules/agents.ts:14](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L14) + +WebSocket connection for real-time updates + +*** + +### appId + +```ts +appId: string; +``` + +Defined in: [modules/agents.ts:16](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L16) + +Application ID + +*** + +### serverUrl? + +```ts +optional serverUrl: string; +``` + +Defined in: [modules/agents.ts:18](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L18) + +Base44 server URL + +*** + +### token? + +```ts +optional token: string; +``` + +Defined in: [modules/agents.ts:20](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L20) + +Authentication token diff --git a/docs/api-reference/modules/auth/README.mdx b/docs/api-reference/modules/auth/README.mdx new file mode 100644 index 0000000..3e47a77 --- /dev/null +++ b/docs/api-reference/modules/auth/README.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / modules/auth + +# modules/auth + +## Functions + +| Function | Description | +| ------ | ------ | +| [createAuthModule](./modules/auth/functions/createAuthModule.mdx) | Creates the authentication module for the Base44 SDK | diff --git a/docs/api-reference/modules/auth/functions/createAuthModule.mdx b/docs/api-reference/modules/auth/functions/createAuthModule.mdx new file mode 100644 index 0000000..e1c2325 --- /dev/null +++ b/docs/api-reference/modules/auth/functions/createAuthModule.mdx @@ -0,0 +1,542 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/auth](./modules/auth/README.mdx) / createAuthModule + +# createAuthModule() + +```ts +function createAuthModule( + axios, + functionsAxiosClient, + appId, + options): object; +``` + +Defined in: [modules/auth.ts:18](https://github.com/base44/sdk/blob/main/src/modules/auth.ts#L18) + +Creates the authentication module for the Base44 SDK + +Provides comprehensive authentication functionality including user login, +registration, password reset, and user profile management. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `axios` | `AxiosInstance` | Axios instance for API requests | +| `functionsAxiosClient` | `AxiosInstance` | Axios instance for function invocations | +| `appId` | `string` | Application ID | +| `options` | \{ `serverUrl`: `string`; `appBaseUrl?`: `string`; \} | Configuration options | +| `options.serverUrl` | `string` | Base44 server URL | +| `options.appBaseUrl?` | `string` | Application base URL for redirects | + +## Returns + +Auth module with authentication methods + +### me() + +```ts +me(): Promise>; +``` + +Get current user information + +Retrieves the authenticated user's profile data including +id, email, name, role, and other custom fields. + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the current user data + +#### Throws + +If user is not authenticated + +#### Example + +```typescript +const user = await client.auth.me(); +console.log(`Logged in as: ${user.name}`); +console.log(`Role: ${user.role}`); +``` + +### updateMe() + +```ts +updateMe(data): Promise>; +``` + +Update current user's profile data + +Updates the authenticated user's information. You can update any +custom fields on the user entity. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `data` | `Record`\<`string`, `any`\> | Object containing fields to update | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the updated user data + +#### Throws + +If user is not authenticated + +#### Example + +```typescript +const updatedUser = await client.auth.updateMe({ + name: 'John Doe', + preferences: { + theme: 'dark', + notifications: true + } +}); +``` + +### redirectToLogin() + +```ts +redirectToLogin(nextUrl): void; +``` + +Redirects the user to the app's login page + +Navigates to the Base44 login page with a return URL. After successful +authentication, the user will be redirected back to the specified URL +with an access token in the query parameters. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `nextUrl` | `string` | URL to redirect to after successful login | + +#### Returns + +`void` + +#### Throws + +When not in a browser environment + +#### Example + +```typescript +// Redirect to login and return to current page +client.auth.redirectToLogin(window.location.href); + +// Redirect to login and go to dashboard after +client.auth.redirectToLogin('/dashboard'); +``` + +### logout() + +```ts +logout(redirectUrl?): void; +``` + +Logout the current user + +Removes the authentication token from memory and localStorage, then either +redirects to a specified URL or reloads the page to clear the session. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `redirectUrl?` | `string` | Optional URL to redirect to after logout. Reloads the page if not provided | + +#### Returns + +`void` + +#### Example + +```typescript +// Simple logout (reloads page) +client.auth.logout(); + +// Logout and redirect to login page +client.auth.logout('/login'); + +// Logout and redirect to home +client.auth.logout('/'); +``` + +### setToken() + +```ts +setToken(token, saveToStorage): void; +``` + +Set authentication token for the client + +Updates the Authorization header for all API requests and optionally +saves the token to localStorage for persistence across page reloads. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `token` | `string` | Authentication token | +| `saveToStorage` | `boolean` | Whether to save the token to localStorage (default: true) | + +#### Returns + +`void` + +#### Example + +```typescript +// Set token and save to localStorage +client.auth.setToken('your-access-token'); + +// Set token without saving (for server-side or temporary tokens) +client.auth.setToken('your-access-token', false); +``` + +### loginViaEmailPassword() + +```ts +loginViaEmailPassword( + email, + password, + turnstileToken?): Promise<{ + access_token: string; + user: any; +}>; +``` + +Login via email and password + +Authenticates a user with their email and password credentials. +On success, automatically sets the token in the client and localStorage. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | +| `password` | `string` | User's password | +| `turnstileToken?` | `string` | Optional Cloudflare Turnstile captcha token for bot protection | + +#### Returns + +`Promise`\<\{ + `access_token`: `string`; + `user`: `any`; +\}\> + +Promise resolving to login response with access_token and user data + +#### Throws + +If credentials are invalid or authentication fails + +#### Example + +```typescript +try { + const { access_token, user } = await client.auth.loginViaEmailPassword( + 'user@example.com', + 'password123' + ); + console.log(`Logged in as ${user.name}`); + // Token is automatically set in the client +} catch (error) { + console.error('Login failed:', error.message); +} +``` + +### isAuthenticated() + +```ts +isAuthenticated(): Promise; +``` + +Verify if the current user is authenticated + +Checks whether the current token is valid by attempting to fetch +the user's profile. Returns true if authenticated, false otherwise. + +#### Returns + +`Promise`\<`boolean`\> + +Promise resolving to true if authenticated, false if not + +#### Example + +```typescript +if (await client.auth.isAuthenticated()) { + console.log('User is logged in'); + const user = await client.auth.me(); +} else { + console.log('User needs to log in'); + client.auth.redirectToLogin('/dashboard'); +} +``` + +### inviteUser() + +```ts +inviteUser(userEmail, role): Promise>; +``` + +Invite a user to the application + +Sends an invitation email to the specified user with the assigned role. +The user will receive a link to complete their registration. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `userEmail` | `string` | Email address of the user to invite | +| `role` | `string` | Role to assign to the user (e.g., 'admin', 'editor', 'viewer') | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the invitation result + +#### Example + +```typescript +await client.auth.inviteUser('newuser@example.com', 'editor'); +console.log('Invitation sent!'); +``` + +### register() + +```ts +register(payload): Promise>; +``` + +Register a new user account + +Creates a new user account with email and password. May require +email verification via OTP depending on app configuration. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `payload` | \{ `email`: `string`; `password`: `string`; `turnstile_token?`: `string` \| `null`; `referral_code?`: `string` \| `null`; \} | Registration data | +| `payload.email` | `string` | User's email address | +| `payload.password` | `string` | User's password | +| `payload.turnstile_token?` | `string` \| `null` | Optional Cloudflare Turnstile captcha token | +| `payload.referral_code?` | `string` \| `null` | Optional referral code | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the registration result + +#### Example + +```typescript +try { + await client.auth.register({ + email: 'newuser@example.com', + password: 'securePassword123' + }); + // Check email for verification code +} catch (error) { + console.error('Registration failed:', error.message); +} +``` + +### verifyOtp() + +```ts +verifyOtp(params): Promise>; +``` + +Verify email with OTP code + +Verifies a user's email address using the one-time password (OTP) +sent to their email during registration. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `email`: `string`; `otpCode`: `string`; \} | Verification parameters | +| `params.email` | `string` | User's email address | +| `params.otpCode` | `string` | One-time password code from email | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to verification result with access token + +#### Example + +```typescript +const { access_token } = await client.auth.verifyOtp({ + email: 'user@example.com', + otpCode: '123456' +}); +client.auth.setToken(access_token); +``` + +### resendOtp() + +```ts +resendOtp(email): Promise>; +``` + +Resend OTP verification code + +Sends a new OTP code to the user's email if the previous one expired +or was not received. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when OTP is sent + +#### Example + +```typescript +await client.auth.resendOtp('user@example.com'); +console.log('New verification code sent!'); +``` + +### resetPasswordRequest() + +```ts +resetPasswordRequest(email): Promise>; +``` + +Request password reset + +Initiates the password reset process by sending a reset link +to the user's email address. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `email` | `string` | User's email address | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when reset email is sent + +#### Example + +```typescript +await client.auth.resetPasswordRequest('user@example.com'); +console.log('Password reset email sent!'); +``` + +### resetPassword() + +```ts +resetPassword(params): Promise>; +``` + +Reset password with token + +Completes the password reset process using the reset token from +the email and setting a new password. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `resetToken`: `string`; `newPassword`: `string`; \} | Reset parameters | +| `params.resetToken` | `string` | Reset token from email link | +| `params.newPassword` | `string` | New password to set | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when password is reset + +#### Example + +```typescript +// Extract token from email link +const urlParams = new URLSearchParams(window.location.search); +const resetToken = urlParams.get('reset_token'); + +await client.auth.resetPassword({ + resetToken, + newPassword: 'newSecurePassword123' +}); +console.log('Password reset successful!'); +``` + +### changePassword() + +```ts +changePassword(params): Promise>; +``` + +Change password for authenticated user + +Allows a logged-in user to change their password by providing +their current password and a new password. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `params` | \{ `userId`: `string`; `currentPassword`: `string`; `newPassword`: `string`; \} | Change password parameters | +| `params.userId` | `string` | User's ID | +| `params.currentPassword` | `string` | Current password for verification | +| `params.newPassword` | `string` | New password to set | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving when password is changed + +#### Throws + +If current password is incorrect + +#### Example + +```typescript +const user = await client.auth.me(); + +try { + await client.auth.changePassword({ + userId: user.id, + currentPassword: 'oldPassword123', + newPassword: 'newSecurePassword456' + }); + console.log('Password changed successfully!'); +} catch (error) { + console.error('Failed to change password:', error.message); +} +``` diff --git a/docs/api-reference/modules/entities/README.mdx b/docs/api-reference/modules/entities/README.mdx new file mode 100644 index 0000000..80e1184 --- /dev/null +++ b/docs/api-reference/modules/entities/README.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / modules/entities + +# modules/entities + +## Functions + +| Function | Description | +| ------ | ------ | +| [createEntitiesModule](./modules/entities/functions/createEntitiesModule.mdx) | Creates the entities module for the Base44 SDK | diff --git a/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx b/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx new file mode 100644 index 0000000..07afeb5 --- /dev/null +++ b/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx @@ -0,0 +1,28 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/entities](./modules/entities/README.mdx) / createEntitiesModule + +# createEntitiesModule() + +```ts +function createEntitiesModule(axios, appId): object; +``` + +Defined in: [modules/entities.ts:9](https://github.com/base44/sdk/blob/main/src/modules/entities.ts#L9) + +Creates the entities module for the Base44 SDK + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `axios` | `AxiosInstance` | Axios instance | +| `appId` | `string` | Application ID | + +## Returns + +`object` + +Entities module diff --git a/docs/api-reference/modules/functions/README.mdx b/docs/api-reference/modules/functions/README.mdx new file mode 100644 index 0000000..a0abc95 --- /dev/null +++ b/docs/api-reference/modules/functions/README.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / modules/functions + +# modules/functions + +## Functions + +| Function | Description | +| ------ | ------ | +| [createFunctionsModule](./modules/functions/functions/createFunctionsModule.mdx) | Creates the functions module for the Base44 SDK | diff --git a/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx b/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx new file mode 100644 index 0000000..0ed9da1 --- /dev/null +++ b/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx @@ -0,0 +1,80 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/functions](./modules/functions/README.mdx) / createFunctionsModule + +# createFunctionsModule() + +```ts +function createFunctionsModule(axios, appId): object; +``` + +Defined in: [modules/functions.ts:14](https://github.com/base44/sdk/blob/main/src/modules/functions.ts#L14) + +Creates the functions module for the Base44 SDK + +Provides access to invoke custom cloud functions defined in your Base44 application. +Functions can be used to execute custom server-side logic, perform complex operations, +or integrate with external services. + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `axios` | `AxiosInstance` | Axios instance for API requests | +| `appId` | `string` | Application ID | + +## Returns + +Functions module with invoke method + +### invoke() + +```ts +invoke(functionName, data): Promise>; +``` + +Invoke a custom function by name + +Executes a cloud function defined in your Base44 application with the provided +parameters. Automatically handles file uploads when File objects are included. + +#### Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `functionName` | `string` | Name of the function to invoke | +| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | + +#### Returns + +`Promise`\<`AxiosResponse`\<`any`, `any`\>\> + +Promise resolving to the function's response + +#### Throws + +If function doesn't exist or execution fails + +#### Example + +```typescript +// Simple function call +const result = await client.functions.invoke('calculateTotal', { + items: ['item1', 'item2'], + discount: 0.1 +}); + +// Function with file upload +const fileInput = document.querySelector('input[type="file"]'); +const result = await client.functions.invoke('processImage', { + image: fileInput.files[0], + filter: 'grayscale' +}); + +// Service role function invocation +const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + action: 'cleanup' +}); +``` diff --git a/docs/api-reference/modules/integrations/README.mdx b/docs/api-reference/modules/integrations/README.mdx new file mode 100644 index 0000000..d31e967 --- /dev/null +++ b/docs/api-reference/modules/integrations/README.mdx @@ -0,0 +1,13 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / modules/integrations + +# modules/integrations + +## Functions + +| Function | Description | +| ------ | ------ | +| [createIntegrationsModule](./modules/integrations/functions/createIntegrationsModule.mdx) | Creates the integrations module for the Base44 SDK | diff --git a/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx b/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx new file mode 100644 index 0000000..9371b05 --- /dev/null +++ b/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx @@ -0,0 +1,28 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [modules/integrations](./modules/integrations/README.mdx) / createIntegrationsModule + +# createIntegrationsModule() + +```ts +function createIntegrationsModule(axios, appId): object; +``` + +Defined in: [modules/integrations.ts:9](https://github.com/base44/sdk/blob/main/src/modules/integrations.ts#L9) + +Creates the integrations module for the Base44 SDK + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `axios` | `AxiosInstance` | Axios instance | +| `appId` | `string` | Application ID | + +## Returns + +`object` + +Integrations module diff --git a/docs/api-reference/utils/auth-utils/README.mdx b/docs/api-reference/utils/auth-utils/README.mdx new file mode 100644 index 0000000..0005ce6 --- /dev/null +++ b/docs/api-reference/utils/auth-utils/README.mdx @@ -0,0 +1,16 @@ +[**@base44/sdk v0.8.3**](../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / utils/auth-utils + +# utils/auth-utils + +## Functions + +| Function | Description | +| ------ | ------ | +| [getAccessToken](./utils/auth-utils/functions/getAccessToken.mdx) | Retrieves an access token from either localStorage or URL parameters | +| [saveAccessToken](./utils/auth-utils/functions/saveAccessToken.mdx) | Saves an access token to localStorage | +| [removeAccessToken](./utils/auth-utils/functions/removeAccessToken.mdx) | Removes the access token from localStorage | +| [getLoginUrl](./utils/auth-utils/functions/getLoginUrl.mdx) | Constructs the absolute URL for the login page | diff --git a/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx new file mode 100644 index 0000000..aa46aa9 --- /dev/null +++ b/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx @@ -0,0 +1,31 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / getAccessToken + +# getAccessToken() + +```ts +function getAccessToken(options): string | null; +``` + +Defined in: [utils/auth-utils.ts:15](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L15) + +Retrieves an access token from either localStorage or URL parameters + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | \{ `storageKey?`: `string`; `paramName?`: `string`; `saveToStorage?`: `boolean`; `removeFromUrl?`: `boolean`; \} | Configuration options | +| `options.storageKey?` | `string` | The key to use in localStorage | +| `options.paramName?` | `string` | The URL parameter name | +| `options.saveToStorage?` | `boolean` | Whether to save the token to localStorage if found in URL | +| `options.removeFromUrl?` | `boolean` | Whether to remove the token from URL after retrieval | + +## Returns + +`string` \| `null` + +The access token or null if not found diff --git a/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx b/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx new file mode 100644 index 0000000..6f569de --- /dev/null +++ b/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx @@ -0,0 +1,31 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / getLoginUrl + +# getLoginUrl() + +```ts +function getLoginUrl(nextUrl, options): string; +``` + +Defined in: [utils/auth-utils.ts:138](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L138) + +Constructs the absolute URL for the login page + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `nextUrl` | `string` | URL to redirect back to after login | +| `options` | \{ `serverUrl`: `string`; `appId`: `string`; `loginPath?`: `string`; \} | Configuration options | +| `options.serverUrl` | `string` | Server URL (e.g., 'https://base44.app') | +| `options.appId` | `string` | Application ID | +| `options.loginPath?` | `string` | Path to the login endpoint | + +## Returns + +`string` + +The complete login URL diff --git a/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx new file mode 100644 index 0000000..1650e8b --- /dev/null +++ b/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx @@ -0,0 +1,28 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / removeAccessToken + +# removeAccessToken() + +```ts +function removeAccessToken(options): boolean; +``` + +Defined in: [utils/auth-utils.ts:112](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L112) + +Removes the access token from localStorage + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `options` | \{ `storageKey?`: `string`; \} | Configuration options | +| `options.storageKey?` | `string` | The key to use in localStorage | + +## Returns + +`boolean` + +Success status diff --git a/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx new file mode 100644 index 0000000..2eb2cff --- /dev/null +++ b/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx @@ -0,0 +1,29 @@ +[**@base44/sdk v0.8.3**](../../../README.mdx) + +*** + +[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / saveAccessToken + +# saveAccessToken() + +```ts +function saveAccessToken(token, options): boolean; +``` + +Defined in: [utils/auth-utils.ts:82](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L82) + +Saves an access token to localStorage + +## Parameters + +| Parameter | Type | Description | +| ------ | ------ | ------ | +| `token` | `string` | The access token to save | +| `options` | \{ `storageKey?`: `string`; \} | Configuration options | +| `options.storageKey?` | `string` | The key to use in localStorage | + +## Returns + +`boolean` + +Success status diff --git a/src/client.ts b/src/client.ts index b3bcc74..d3441b5 100644 --- a/src/client.ts +++ b/src/client.ts @@ -10,22 +10,120 @@ import { createAgentsModule } from "./modules/agents.js"; import { createAppLogsModule } from "./modules/app-logs.js"; import { RoomsSocket, RoomsSocketConfig } from "./utils/socket-utils.js"; +/** + * Options for creating a Base44 client. + */ export type CreateClientOptions = { + /** + * Optional error handler that will be called whenever an API error occurs. + * + * @example + * ```typescript + * const client = createClient({ + * appId: 'my-app', + * options: { + * onError: (error) => { + * console.error('API Error:', error); + * // Send to error tracking service + * Sentry.captureException(error); + * } + * } + * }); + * ``` + */ onError?: (error: Error) => void; }; +/** + * The Base44 client instance type. + * + * Provides access to all SDK modules and methods for interacting with your Base44 app. + */ export type Base44Client = ReturnType; /** - * Create a Base44 client instance - * @param {Object} config - Client configuration - * @param {string} [config.serverUrl='https://base44.app'] - API server URL - * @param {string} [config.appBaseUrl] - Application base URL - * @param {string|number} config.appId - Application ID - * @param {string} [config.token] - Authentication token - * @param {string} [config.serviceToken] - Service role authentication token - * @param {boolean} [config.requiresAuth=false] - Whether the app requires authentication - * @returns {Object} Base44 client instance + * Creates a Base44 SDK client instance. + * + * This is the main entry point for the Base44 SDK. It creates a client that provides + * access to all SDK modules including entities, auth, functions, integrations, agents, + * and more. + * + * **User Modules (default access):** + * - `entities` - CRUD operations for your data + * - `integrations` - Pre-built integration endpoints + * - `auth` - User authentication and management + * - `functions` - Custom backend functions + * - `agents` - AI agent conversations + * - `appLogs` - Application usage tracking + * + * **Service Role Modules (via `asServiceRole`):** + * - All user modules PLUS: + * - `sso` - SSO token generation + * - `connectors` - OAuth token retrieval + * + * @param config - Client configuration options + * @returns Base44 client instance with access to all modules + * + * @example + * ```typescript + * // Basic client setup + * import { createClient } from '@base44/client-sdk'; + * + * const client = createClient({ + * appId: 'my-app-id' + * }); + * + * // Use client modules + * const todos = await client.entities.Todo.list(); + * const user = await client.auth.me(); + * ``` + * + * @example + * ```typescript + * // Client with authentication + * const client = createClient({ + * appId: 'my-app-id', + * token: 'user-auth-token', + * requiresAuth: true // Automatically redirects to login if not authenticated + * }); + * ``` + * + * @example + * ```typescript + * // Client with service role access + * const client = createClient({ + * appId: 'my-app-id', + * token: 'user-token', + * serviceToken: 'service-role-token' + * }); + * + * // Access service-role-only modules + * const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); + * const oauthToken = await client.asServiceRole.connectors.getAccessToken('google'); + * ``` + * + * @example + * ```typescript + * // Client with error handling + * const client = createClient({ + * appId: 'my-app-id', + * options: { + * onError: (error) => { + * console.error('API Error:', error); + * Sentry.captureException(error); + * } + * } + * }); + * ``` + * + * @example + * ```typescript + * // Client with custom server URL (self-hosted) + * const client = createClient({ + * serverUrl: 'https://my-base44-instance.com', + * appId: 'my-app-id' + * }); + * ``` */ export function createClient(config: { serverUrl?: string; @@ -173,8 +271,21 @@ export function createClient(config: { ...userModules, /** - * Set authentication token for all requests - * @param {string} newToken - New auth token + * Sets a new authentication token for all subsequent requests. + * + * Updates the token for both HTTP requests and WebSocket connections. + * + * @param newToken - The new authentication token + * + * @example + * ```typescript + * // Update token after login + * const { access_token } = await client.auth.loginViaEmailPassword( + * 'user@example.com', + * 'password' + * ); + * client.setToken(access_token); + * ``` */ setToken(newToken: string) { userModules.auth.setToken(newToken); @@ -184,8 +295,17 @@ export function createClient(config: { }, /** - * Get current configuration - * @returns {Object} Current configuration + * Gets the current client configuration. + * + * @returns Current configuration including serverUrl, appId, and requiresAuth + * + * @example + * ```typescript + * const config = client.getConfig(); + * console.log(config.appId); // 'my-app-id' + * console.log(config.serverUrl); // 'https://base44.app' + * console.log(config.requiresAuth); // true/false + * ``` */ getConfig() { return { @@ -196,8 +316,33 @@ export function createClient(config: { }, /** - * Access service role modules - throws error if no service token was provided - * @throws {Error} When accessed without a service token + * Provides access to service role modules. + * + * Service role modules have elevated permissions and include additional + * modules like `sso` and `connectors` that are not available with regular + * user authentication. + * + * **Available modules:** + * - All regular user modules (entities, auth, functions, etc.) + * - `sso` - SSO token generation + * - `connectors` - OAuth token retrieval + * + * @throws {Error} When accessed without providing a serviceToken during client creation + * + * @example + * ```typescript + * const client = createClient({ + * appId: 'my-app-id', + * serviceToken: 'service-role-token' + * }); + * + * // Access service-role-only features + * const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); + * const googleToken = await client.asServiceRole.connectors.getAccessToken('google'); + * + * // Also access regular modules with elevated permissions + * const allUsers = await client.asServiceRole.entities.User.list(); + * ``` */ get asServiceRole() { if (!serviceToken) { @@ -212,6 +357,66 @@ export function createClient(config: { return client; } +/** + * Creates a Base44 client from an HTTP request (server-side helper). + * + * This is a convenience function for server-side environments (like Next.js API routes, + * Edge functions, or Express servers) that automatically extracts authentication tokens + * and configuration from request headers. + * + * **Required Headers:** + * - `Base44-App-Id` - Your Base44 application ID + * + * **Optional Headers:** + * - `Authorization` - User authentication token (format: "Bearer ") + * - `Base44-Service-Authorization` - Service role token (format: "Bearer ") + * - `Base44-Api-Url` - Custom API URL (defaults to https://base44.app) + * - `Base44-Functions-Version` - Functions version + * + * @param request - HTTP Request object (standard Fetch API Request) + * @returns Base44 client instance configured from request headers + * + * @throws {Error} When Base44-App-Id header is missing + * @throws {Error} When authorization headers have invalid format + * + * @example + * ```typescript + * // Next.js API Route + * import { createClientFromRequest } from '@base44/client-sdk'; + * + * export async function GET(request: Request) { + * const client = createClientFromRequest(request); + * const data = await client.entities.Product.list(); + * return Response.json(data); + * } + * ``` + * + * @example + * ```typescript + * // Edge Function (Vercel, Cloudflare Workers, Deno Deploy) + * export default async function handler(request: Request) { + * const client = createClientFromRequest(request); + * const user = await client.auth.me(); + * return new Response(JSON.stringify(user)); + * } + * ``` + * + * @example + * ```typescript + * // Express.js (with adapter for Request object) + * import express from 'express'; + * + * app.get('/api/data', async (req, res) => { + * // Convert Express req to Fetch API Request + * const request = new Request(`http://localhost${req.url}`, { + * headers: req.headers + * }); + * const client = createClientFromRequest(request); + * const data = await client.entities.Todo.list(); + * res.json(data); + * }); + * ``` + */ export function createClientFromRequest(request: Request) { const authHeader = request.headers.get("Authorization"); const serviceRoleAuthHeader = request.headers.get( diff --git a/src/modules/agents.ts b/src/modules/agents.ts index e1cca5c..270d5a7 100644 --- a/src/modules/agents.ts +++ b/src/modules/agents.ts @@ -1,42 +1,48 @@ -import { RoomsSocket } from "../utils/socket-utils.js"; -import { AgentConversation, AgentMessage } from "./agents.types.js"; -import { AxiosInstance } from "axios"; -import { ModelFilterParams } from "../types.js"; import { getAccessToken } from "../utils/auth-utils.js"; +import { ModelFilterParams } from "../types.js"; +import { + AgentConversation, + AgentMessage, + AgentsModule, + AgentsModuleConfig, +} from "./agents.types.js"; -export type AgentsModuleConfig = { - axios: AxiosInstance; - socket: ReturnType; - appId: string; - serverUrl?: string; - token?: string; -}; - +/** + * Creates the agents module for the Base44 SDK. + * + * @param config - Configuration object containing axios, socket, appId, etc. + * @returns Agents module with methods to manage AI agent conversations + * @internal + */ export function createAgentsModule({ axios, socket, appId, serverUrl, token, -}: AgentsModuleConfig) { +}: AgentsModuleConfig): AgentsModule { const baseURL = `/apps/${appId}/agents`; + // Get all conversations for the current user const getConversations = () => { return axios.get(`${baseURL}/conversations`); }; + // Get a specific conversation by ID const getConversation = (conversationId: string) => { return axios.get( `${baseURL}/conversations/${conversationId}` ); }; + // List conversations with filtering and pagination const listConversations = (filterParams: ModelFilterParams) => { return axios.get(`${baseURL}/conversations`, { params: filterParams, }); }; + // Create a new conversation with an agent const createConversation = (conversation: { agent_name: string; metadata?: Record; @@ -46,25 +52,24 @@ export function createAgentsModule({ conversation ); }; - + + // Add a message to a conversation const addMessage = async ( conversation: AgentConversation, message: AgentMessage ) => { const room = `/agent-conversations/${conversation.id}`; - await socket.updateModel( - room, - { - ...conversation, - messages: [...(conversation.messages || []), message], - } - ); + await socket.updateModel(room, { + ...conversation, + messages: [...(conversation.messages || []), message], + }); return axios.post( `${baseURL}/conversations/${conversation.id}/messages`, message ); }; + // Subscribe to real-time updates for a conversation const subscribeToConversation = ( conversationId: string, onUpdate?: (conversation: AgentConversation) => void @@ -79,8 +84,11 @@ export function createAgentsModule({ }); }; + // Get WhatsApp connection URL for an agent const getWhatsAppConnectURL = (agentName: string) => { - const baseUrl = `${serverUrl}/api/apps/${appId}/agents/${encodeURIComponent(agentName)}/whatsapp`; + const baseUrl = `${serverUrl}/api/apps/${appId}/agents/${encodeURIComponent( + agentName + )}/whatsapp`; const accessToken = token ?? getAccessToken(); if (accessToken) { diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index a6c1337..d9f9738 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -1,43 +1,284 @@ +import { AxiosInstance } from "axios"; +import { RoomsSocket } from "../utils/socket-utils"; +import { ModelFilterParams } from "../types"; + +/** + * An agent conversation containing messages exchanged with an AI agent. + */ export type AgentConversation = { + /** Unique identifier for the conversation */ id: string; + /** Application ID */ app_id: string; + /** Name of the agent in this conversation */ agent_name: string; + /** ID of the user who created the conversation */ created_by_id: string; + /** Array of messages in the conversation */ messages: AgentMessage[]; + /** Optional metadata associated with the conversation */ metadata?: Record; }; +/** + * A message in an agent conversation. + */ export type AgentMessage = { + /** Unique identifier for the message */ id: string; + /** Role of the message sender */ role: "user" | "assistant" | "system"; + /** Optional reasoning information for the message */ reasoning?: { + /** When reasoning started */ start_date: string; + /** When reasoning ended */ end_date?: string; + /** Reasoning content */ content: string; }; + /** Message content (can be text or structured data) */ content?: string | Record | null; + /** URLs to files attached to the message */ file_urls?: string[] | null; + /** Tool calls made by the agent */ tool_calls?: | { + /** Tool call ID */ id: string; + /** Name of the tool called */ name: string; + /** Arguments passed to the tool as JSON string */ arguments_string: string; + /** Status of the tool call */ status: "running" | "success" | "error" | "stopped"; + /** Results from the tool call */ results?: string | null; }[] | null; - + /** Token usage statistics */ usage?: { prompt_tokens?: number; completion_tokens?: number } | null; + /** Whether the message is hidden from the user */ hidden?: boolean; + /** Custom context provided with the message */ custom_context?: | { message: string; data: Record; type: string }[] | null; + /** Model used to generate the message */ model?: string | null; + /** Checkpoint ID for the message */ checkpoint_id?: string | null; + /** Metadata about when and by whom the message was created */ metadata?: { created_date: string; created_by_email: string; created_by_full_name: string | null; }; + /** Additional custom parameters for the message */ additional_message_params?: Record; }; + +/** + * Configuration for creating the agents module. + */ +export type AgentsModuleConfig = { + /** Axios instance for HTTP requests */ + axios: AxiosInstance; + /** WebSocket instance for real-time updates */ + socket: ReturnType; + /** Application ID */ + appId: string; + /** Server URL */ + serverUrl?: string; + /** Authentication token */ + token?: string; +}; + +/** + * Agents module for managing AI agent conversations. + * + * This module provides methods to create and manage conversations with AI agents, + * send messages, and subscribe to real-time updates. Conversations can be used + * for chat interfaces, support systems, or any interactive AI application. + * + * **Real-time Updates:** + * The agents module supports real-time updates via WebSocket subscriptions, + * allowing you to receive instant notifications when new messages arrive. + * + * **Available with both auth modes:** + * - User auth: `client.agents.method(...)` + * - Service role: `client.asServiceRole.agents.method(...)` + * + * @example + * ```typescript + * // Create a new conversation + * const conversation = await client.agents.createConversation({ + * agent_name: 'support-agent', + * metadata: { user_id: 'user-123' } + * }); + * + * // Subscribe to real-time updates + * const unsubscribe = client.agents.subscribeToConversation( + * conversation.id, + * (updatedConversation) => { + * console.log('New messages:', updatedConversation.messages); + * } + * ); + * + * // Send a message + * await client.agents.addMessage(conversation, { + * role: 'user', + * content: 'Hello, I need help!' + * }); + * + * // Clean up subscription + * unsubscribe(); + * ``` + */ +export interface AgentsModule { + /** + * Get all conversations for the current user. + * + * Retrieves all agent conversations without filtering. + * + * @returns Promise resolving to an array of conversations + * + * @example + * ```typescript + * const conversations = await client.agents.getConversations(); + * console.log(`Total conversations: ${conversations.length}`); + * ``` + */ + getConversations(): Promise; + + /** + * Get a specific conversation by ID. + * + * @param conversationId - The unique identifier of the conversation + * @returns Promise resolving to the conversation, or undefined if not found + * + * @example + * ```typescript + * const conversation = await client.agents.getConversation('conv-123'); + * if (conversation) { + * console.log(`Conversation has ${conversation.messages.length} messages`); + * } + * ``` + */ + getConversation( + conversationId: string + ): Promise; + + /** + * List conversations with filtering and pagination. + * + * @param filterParams - Filter parameters for querying conversations + * @returns Promise resolving to an array of filtered conversations + * + * @example + * ```typescript + * const recentConversations = await client.agents.listConversations({ + * limit: 10, + * sort: '-created_date' + * }); + * ``` + */ + listConversations( + filterParams: ModelFilterParams + ): Promise; + + /** + * Create a new conversation with an agent. + * + * @param conversation - Conversation details including agent name and optional metadata + * @returns Promise resolving to the created conversation + * + * @example + * ```typescript + * const conversation = await client.agents.createConversation({ + * agent_name: 'support-agent', + * metadata: { + * user_id: 'user-123', + * category: 'technical-support' + * } + * }); + * console.log(`Created conversation: ${conversation.id}`); + * ``` + */ + createConversation(conversation: { + agent_name: string; + metadata?: Record; + }): Promise; + + /** + * Add a message to a conversation. + * + * Sends a message to the agent and updates the conversation. This method + * also updates the real-time socket to notify any subscribers. + * + * @param conversation - The conversation to add the message to + * @param message - The message to add + * @returns Promise resolving to the created message + * + * @example + * ```typescript + * const message = await client.agents.addMessage(conversation, { + * role: 'user', + * content: 'Hello, I need help with my order #12345' + * }); + * console.log(`Message sent with ID: ${message.id}`); + * ``` + */ + addMessage( + conversation: AgentConversation, + message: Partial + ): Promise; + + /** + * Subscribe to real-time updates for a conversation. + * + * Establishes a WebSocket connection to receive instant updates when new + * messages are added to the conversation. Returns an unsubscribe function + * to clean up the connection. + * + * @param conversationId - The conversation ID to subscribe to + * @param onUpdate - Callback function called when the conversation is updated + * @returns Unsubscribe function to stop receiving updates + * + * @example + * ```typescript + * const unsubscribe = client.agents.subscribeToConversation( + * 'conv-123', + * (updatedConversation) => { + * const latestMessage = updatedConversation.messages[updatedConversation.messages.length - 1]; + * console.log('New message:', latestMessage.content); + * } + * ); + * + * // Later, clean up the subscription + * unsubscribe(); + * ``` + */ + subscribeToConversation( + conversationId: string, + onUpdate?: (conversation: AgentConversation) => void + ): () => void; + + /** + * Get WhatsApp connection URL for an agent. + * + * Generates a URL that users can use to connect with the agent via WhatsApp. + * The URL includes authentication if a token is available. + * + * @param agentName - The name of the agent + * @returns WhatsApp connection URL + * + * @example + * ```typescript + * const whatsappUrl = client.agents.getWhatsAppConnectURL('support-agent'); + * console.log(`Connect via WhatsApp: ${whatsappUrl}`); + * // User can open this URL to start a WhatsApp conversation + * ``` + */ + getWhatsAppConnectURL(agentName: string): string; +} diff --git a/src/modules/app-logs.ts b/src/modules/app-logs.ts index b461cb9..ec072f8 100644 --- a/src/modules/app-logs.ts +++ b/src/modules/app-logs.ts @@ -1,43 +1,36 @@ import { AxiosInstance } from "axios"; +import { AppLogsModule } from "./app-logs.types"; /** - * Creates the app logs module for the Base44 SDK - * @param {AxiosInstance} axios - Axios instance - * @param {string} appId - Application ID - * @returns {Object} App logs module + * Creates the app logs module for the Base44 SDK. + * + * @param axios - Axios instance + * @param appId - Application ID + * @returns App logs module with methods for tracking and analyzing app usage + * @internal */ -export function createAppLogsModule(axios: AxiosInstance, appId: string) { +export function createAppLogsModule( + axios: AxiosInstance, + appId: string +): AppLogsModule { const baseURL = `/app-logs/${appId}`; return { - /** - * Log user activity in the app - * @param {string} pageName - Name of the page being visited - * @returns {Promise} - */ + // Log user activity in the app async logUserInApp(pageName: string): Promise { await axios.post(`${baseURL}/log-user-in-app/${pageName}`); }, - /** - * Fetch app logs with optional parameters - * @param {Object} params - Query parameters for filtering logs - * @returns {Promise} App logs data - */ + // Fetch app logs with optional parameters async fetchLogs(params: Record = {}): Promise { const response = await axios.get(baseURL, { params }); return response; }, - /** - * Get app statistics - * @param {Object} params - Query parameters for filtering stats - * @returns {Promise} App statistics - */ + // Get app statistics async getStats(params: Record = {}): Promise { const response = await axios.get(`${baseURL}/stats`, { params }); return response; }, }; } - diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts new file mode 100644 index 0000000..cb03ff0 --- /dev/null +++ b/src/modules/app-logs.types.ts @@ -0,0 +1,122 @@ +/** + * App Logs module for tracking and analyzing application usage. + * + * This module provides methods to log user activity, fetch logs, and retrieve + * statistics about your application's usage. Useful for analytics, monitoring, + * and understanding user behavior. + * + * **Available with both auth modes:** + * - User auth: `client.appLogs.method(...)` + * - Service role: `client.asServiceRole.appLogs.method(...)` + * + * @example + * ```typescript + * // Log user visiting a page + * await client.appLogs.logUserInApp('dashboard'); + * + * // Fetch recent logs + * const logs = await client.appLogs.fetchLogs({ + * limit: 100, + * sort: '-timestamp' + * }); + * + * // Get application statistics + * const stats = await client.appLogs.getStats({ + * startDate: '2024-01-01', + * endDate: '2024-01-31' + * }); + * ``` + */ +export interface AppLogsModule { + /** + * Log user activity in the application. + * + * Records when a user visits a specific page or section of your application. + * Useful for tracking user navigation patterns and popular features. + * + * @param pageName - Name of the page or section being visited + * @returns Promise that resolves when the log is recorded + * + * @example + * ```typescript + * // Log page visit + * await client.appLogs.logUserInApp('home'); + * await client.appLogs.logUserInApp('profile'); + * await client.appLogs.logUserInApp('settings'); + * + * // Log specific feature usage + * await client.appLogs.logUserInApp('checkout-page'); + * await client.appLogs.logUserInApp('product-details'); + * ``` + */ + logUserInApp(pageName: string): Promise; + + /** + * Fetch application logs with optional filtering. + * + * Retrieves logs of user activity with support for filtering, pagination, + * and sorting. Use this to analyze user behavior and application usage patterns. + * + * @param params - Query parameters for filtering logs (limit, sort, date ranges, etc.) + * @returns Promise resolving to the logs data + * + * @example + * ```typescript + * // Fetch all logs + * const allLogs = await client.appLogs.fetchLogs(); + * + * // Fetch logs with pagination + * const recentLogs = await client.appLogs.fetchLogs({ + * limit: 50, + * skip: 0, + * sort: '-timestamp' + * }); + * + * // Fetch logs for a specific page + * const dashboardLogs = await client.appLogs.fetchLogs({ + * pageName: 'dashboard' + * }); + * + * // Fetch logs within a date range + * const periodLogs = await client.appLogs.fetchLogs({ + * startDate: '2024-01-01', + * endDate: '2024-01-31' + * }); + * ``` + */ + fetchLogs(params?: Record): Promise; + + /** + * Get application usage statistics. + * + * Retrieves aggregated statistics about application usage, such as page views, + * active users, and popular features. Useful for dashboards and analytics. + * + * @param params - Query parameters for filtering statistics (date ranges, grouping, etc.) + * @returns Promise resolving to the statistics data + * + * @example + * ```typescript + * // Get overall stats + * const stats = await client.appLogs.getStats(); + * + * // Get stats for a specific time period + * const monthlyStats = await client.appLogs.getStats({ + * startDate: '2024-01-01', + * endDate: '2024-01-31' + * }); + * + * // Get stats grouped by page + * const pageStats = await client.appLogs.getStats({ + * groupBy: 'page' + * }); + * + * // Get daily active users + * const dailyStats = await client.appLogs.getStats({ + * period: 'daily', + * metric: 'active_users' + * }); + * ``` + */ + getStats(params?: Record): Promise; +} diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 412b65a..dd4af58 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -1,43 +1,34 @@ import { AxiosInstance } from "axios"; +import { AuthModule, AuthModuleOptions } from "./auth.types"; /** - * Creates the auth module for the Base44 SDK - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string|number} appId - Application ID - * @param {string} serverUrl - Server URL - * @returns {Object} Auth module with authentication methods + * Creates the auth module for the Base44 SDK. + * + * @param axios - Axios instance for API requests + * @param functionsAxiosClient - Axios instance for functions API requests + * @param appId - Application ID + * @param options - Configuration options including server URLs + * @returns Auth module with authentication and user management methods + * @internal */ export function createAuthModule( axios: AxiosInstance, functionsAxiosClient: AxiosInstance, appId: string, - options: { - serverUrl: string; - appBaseUrl?: string; - } -) { + options: AuthModuleOptions +): AuthModule { return { - /** - * Get current user information - * @returns {Promise} Current user data - */ + // Get current user information async me() { return axios.get(`/apps/${appId}/entities/User/me`); }, - /** - * Update current user data - * @param {Object} data - Updated user data - * @returns {Promise} Updated user - */ + + // Update current user data async updateMe(data: Record) { return axios.put(`/apps/${appId}/entities/User/me`, data); }, - /** - * Redirects the user to the app's login page - * @param {string} nextUrl - URL to redirect to after successful login - * @throws {Error} When not in a browser environment - */ + // Redirects the user to the app's login page redirectToLogin(nextUrl: string) { // This function only works in a browser environment if (typeof window === "undefined") { @@ -60,12 +51,8 @@ export function createAuthModule( window.location.href = loginUrl; }, - /** - * Logout the current user - * Removes the token from localStorage and optionally redirects to a URL or reloads the page - * @param redirectUrl - Optional URL to redirect to after logout. Reloads the page if not provided - * @returns {Promise} - */ + // Logout the current user + // Removes the token from localStorage and optionally redirects to a URL or reloads the page logout(redirectUrl?: string) { // Remove token from axios headers delete axios.defaults.headers.common["Authorization"]; @@ -91,11 +78,7 @@ export function createAuthModule( } }, - /** - * Set authentication token - * @param {string} token - Auth token - * @param {boolean} [saveToStorage=true] - Whether to save the token to localStorage - */ + // Set authentication token setToken(token: string, saveToStorage = true) { if (!token) return; @@ -121,13 +104,7 @@ export function createAuthModule( } }, - /** - * Login via username and password - * @param email - User email - * @param password - User password - * @param turnstileToken - Optional Turnstile captcha token - * @returns Login response with access_token and user - */ + // Login via username and password async loginViaEmailPassword( email: string, password: string, @@ -162,10 +139,7 @@ export function createAuthModule( } }, - /** - * Verify if the current token is valid - * @returns {Promise} True if token is valid - */ + // Verify if the current token is valid async isAuthenticated() { try { await this.me(); @@ -175,6 +149,7 @@ export function createAuthModule( } }, + // Invite a user to the application inviteUser(userEmail: string, role: string) { return axios.post(`/apps/${appId}/users/invite-user`, { user_email: userEmail, @@ -182,6 +157,7 @@ export function createAuthModule( }); }, + // Register a new user account register(payload: { email: string; password: string; @@ -191,6 +167,7 @@ export function createAuthModule( return axios.post(`/apps/${appId}/auth/register`, payload); }, + // Verify an OTP (One-Time Password) code verifyOtp({ email, otpCode }: { email: string; otpCode: string }) { return axios.post(`/apps/${appId}/auth/verify-otp`, { email, @@ -198,16 +175,19 @@ export function createAuthModule( }); }, + // Resend an OTP code to the user's email resendOtp(email: string) { return axios.post(`/apps/${appId}/auth/resend-otp`, { email }); }, + // Request a password reset resetPasswordRequest(email: string) { return axios.post(`/apps/${appId}/auth/reset-password-request`, { email, }); }, + // Reset password using a reset token resetPassword({ resetToken, newPassword, @@ -221,6 +201,7 @@ export function createAuthModule( }); }, + // Change the user's password changePassword({ userId, currentPassword, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts new file mode 100644 index 0000000..b844d8e --- /dev/null +++ b/src/modules/auth.types.ts @@ -0,0 +1,369 @@ +import { AxiosInstance } from "axios"; + +/** + * Response from login endpoints containing user information and access token. + */ +export interface LoginResponse { + /** JWT access token for authentication */ + access_token: string; + /** User information */ + user: any; +} + +/** + * Payload for user registration. + */ +export interface RegisterPayload { + /** User's email address */ + email: string; + /** User's password */ + password: string; + /** Optional Turnstile captcha token */ + turnstile_token?: string | null; + /** Optional referral code */ + referral_code?: string | null; +} + +/** + * Configuration options for the auth module. + */ +export interface AuthModuleOptions { + /** Server URL for API requests */ + serverUrl: string; + /** Optional base URL for the app (used for login redirects) */ + appBaseUrl?: string; +} + +/** + * Authentication module for managing user authentication and authorization. + * + * This module provides comprehensive authentication functionality including: + * - Email/password login and registration + * - Token management + * - User profile access and updates + * - Password reset flows + * - OTP verification + * - User invitations + * + * **Browser-Only Features:** + * Some methods like `redirectToLogin()` and `logout()` only work in browser + * environments as they interact with localStorage and window.location. + * + * **Token Storage:** + * The module automatically stores tokens in localStorage (when available) and + * manages Authorization headers for API requests. + * + * @example + * ```typescript + * // Login with email and password + * const { access_token, user } = await client.auth.loginViaEmailPassword( + * 'user@example.com', + * 'password123' + * ); + * + * // Check if user is authenticated + * const isAuth = await client.auth.isAuthenticated(); + * + * // Get current user profile + * const currentUser = await client.auth.me(); + * + * // Logout + * client.auth.logout(); + * ``` + */ +export interface AuthModule { + /** + * Get the current authenticated user's information. + * + * Retrieves the profile data for the currently authenticated user. + * + * @returns Promise resolving to the user's profile data + * + * @example + * ```typescript + * const user = await client.auth.me(); + * console.log(`Logged in as: ${user.email}`); + * console.log(`User ID: ${user.id}`); + * ``` + */ + me(): Promise; + + /** + * Update the current authenticated user's information. + * + * Updates profile fields for the currently authenticated user. + * + * @param data - Object containing the fields to update + * @returns Promise resolving to the updated user data + * + * @example + * ```typescript + * const updatedUser = await client.auth.updateMe({ + * name: 'John Doe', + * bio: 'Software developer' + * }); + * ``` + */ + updateMe(data: Record): Promise; + + /** + * Redirect the user to the app's login page. + * + * **Browser only:** This method only works in browser environments. + * + * Redirects the user to your app's login page with a callback URL + * to return to after successful authentication. + * + * @param nextUrl - URL to redirect to after successful login + * @throws {Error} When not in a browser environment + * + * @example + * ```typescript + * // Redirect to login and come back to current page + * client.auth.redirectToLogin(window.location.href); + * + * // Redirect to login and go to dashboard after + * client.auth.redirectToLogin('/dashboard'); + * ``` + */ + redirectToLogin(nextUrl: string): void; + + /** + * Logout the current user. + * + * **Browser only:** Full functionality requires browser environment. + * + * Removes the authentication token from localStorage and axios headers, + * then optionally redirects to a URL or reloads the page. + * + * @param redirectUrl - Optional URL to redirect to after logout. Reloads the page if not provided + * + * @example + * ```typescript + * // Logout and reload page + * client.auth.logout(); + * + * // Logout and redirect to login page + * client.auth.logout('/login'); + * + * // Logout and redirect to home + * client.auth.logout('/'); + * ``` + */ + logout(redirectUrl?: string): void; + + /** + * Set the authentication token. + * + * Updates the Authorization header for API requests and optionally + * saves the token to localStorage for persistence. + * + * @param token - JWT authentication token + * @param saveToStorage - Whether to save the token to localStorage (default: true) + * + * @example + * ```typescript + * // Set token and save to localStorage + * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); + * + * // Set token without saving to localStorage + * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); + * ``` + */ + setToken(token: string, saveToStorage?: boolean): void; + + /** + * Login using email and password. + * + * Authenticates a user with email and password credentials. On success, + * automatically sets the token for subsequent requests. + * + * @param email - User's email address + * @param password - User's password + * @param turnstileToken - Optional Turnstile captcha token + * @returns Promise resolving to login response with access token and user data + * + * @example + * ```typescript + * try { + * const { access_token, user } = await client.auth.loginViaEmailPassword( + * 'user@example.com', + * 'securePassword123' + * ); + * console.log('Login successful!', user); + * } catch (error) { + * console.error('Login failed:', error); + * } + * + * // With captcha token + * const response = await client.auth.loginViaEmailPassword( + * 'user@example.com', + * 'securePassword123', + * 'captcha-token-here' + * ); + * ``` + */ + loginViaEmailPassword( + email: string, + password: string, + turnstileToken?: string + ): Promise; + + /** + * Check if the current user is authenticated. + * + * Verifies whether the current token is valid by attempting to + * fetch the user's profile. + * + * @returns Promise resolving to true if authenticated, false otherwise + * + * @example + * ```typescript + * const isAuth = await client.auth.isAuthenticated(); + * if (isAuth) { + * console.log('User is logged in'); + * } else { + * // Redirect to login + * client.auth.redirectToLogin(window.location.href); + * } + * ``` + */ + isAuthenticated(): Promise; + + /** + * Invite a user to the application. + * + * Sends an invitation email to a user with a specific role. + * + * @param userEmail - Email address of the user to invite + * @param role - Role to assign to the invited user + * @returns Promise resolving to the invitation response + * + * @example + * ```typescript + * await client.auth.inviteUser('newuser@example.com', 'editor'); + * console.log('Invitation sent!'); + * ``` + */ + inviteUser(userEmail: string, role: string): Promise; + + /** + * Register a new user account. + * + * Creates a new user account with email and password. + * + * @param payload - Registration details including email, password, and optional fields + * @returns Promise resolving to the registration response + * + * @example + * ```typescript + * await client.auth.register({ + * email: 'newuser@example.com', + * password: 'securePassword123', + * referral_code: 'FRIEND2024' + * }); + * console.log('Registration successful! Please check your email.'); + * ``` + */ + register(payload: RegisterPayload): Promise; + + /** + * Verify an OTP (One-Time Password) code. + * + * Validates an OTP code sent to the user's email during registration + * or authentication. + * + * @param params - Object containing email and OTP code + * @returns Promise resolving to the verification response + * + * @example + * ```typescript + * await client.auth.verifyOtp({ + * email: 'user@example.com', + * otpCode: '123456' + * }); + * console.log('Email verified!'); + * ``` + */ + verifyOtp(params: { email: string; otpCode: string }): Promise; + + /** + * Resend an OTP code to the user's email. + * + * Requests a new OTP code to be sent to the specified email address. + * + * @param email - Email address to send the OTP to + * @returns Promise resolving to the response + * + * @example + * ```typescript + * await client.auth.resendOtp('user@example.com'); + * console.log('OTP resent! Please check your email.'); + * ``` + */ + resendOtp(email: string): Promise; + + /** + * Request a password reset. + * + * Sends a password reset email to the specified email address. + * + * @param email - Email address for the account to reset + * @returns Promise resolving to the response + * + * @example + * ```typescript + * await client.auth.resetPasswordRequest('user@example.com'); + * console.log('Password reset email sent!'); + * ``` + */ + resetPasswordRequest(email: string): Promise; + + /** + * Reset password using a reset token. + * + * Completes the password reset flow by setting a new password + * using the token received via email. + * + * @param params - Object containing the reset token and new password + * @returns Promise resolving to the response + * + * @example + * ```typescript + * await client.auth.resetPassword({ + * resetToken: 'token-from-email', + * newPassword: 'newSecurePassword456' + * }); + * console.log('Password reset successful!'); + * ``` + */ + resetPassword(params: { + resetToken: string; + newPassword: string; + }): Promise; + + /** + * Change the user's password. + * + * Updates the password for an authenticated user by verifying + * the current password and setting a new one. + * + * @param params - Object containing user ID, current password, and new password + * @returns Promise resolving to the response + * + * @example + * ```typescript + * await client.auth.changePassword({ + * userId: 'user-123', + * currentPassword: 'oldPassword123', + * newPassword: 'newSecurePassword456' + * }); + * console.log('Password changed successfully!'); + * ``` + */ + changePassword(params: { + userId: string; + currentPassword: string; + newPassword: string; + }): Promise; +} diff --git a/src/modules/connectors.ts b/src/modules/connectors.ts index 32b0db1..3916e12 100644 --- a/src/modules/connectors.ts +++ b/src/modules/connectors.ts @@ -2,28 +2,26 @@ import { AxiosInstance } from "axios"; import { ConnectorIntegrationType, ConnectorAccessTokenResponse, + ConnectorsModule, } from "./connectors.types.js"; /** - * Creates the Connectors module for the Base44 SDK + * Creates the Connectors module for the Base44 SDK. + * * @param axios - Axios instance (should be service role client) * @param appId - Application ID - * @returns Connectors module + * @returns Connectors module with methods to retrieve OAuth tokens + * @internal */ -export function createConnectorsModule(axios: AxiosInstance, appId: string) { +export function createConnectorsModule( + axios: AxiosInstance, + appId: string +): ConnectorsModule { return { - /** - * Retrieve an access token for a given integration type - * @param integrationType - The integration type to get access token for - * @returns Access token response - */ - async getAccessToken( - integrationType: ConnectorIntegrationType - ): Promise { + // Retrieve an OAuth access token for a specific external integration type + async getAccessToken(integrationType: ConnectorIntegrationType) { if (!integrationType || typeof integrationType !== "string") { - throw new Error( - "Integration type is required and must be a string" - ); + throw new Error("Integration type is required and must be a string"); } const response = await axios.get( @@ -35,4 +33,3 @@ export function createConnectorsModule(axios: AxiosInstance, appId: string) { }, }; } - diff --git a/src/modules/connectors.types.ts b/src/modules/connectors.types.ts index c498bb9..8183a3e 100644 --- a/src/modules/connectors.types.ts +++ b/src/modules/connectors.types.ts @@ -1,6 +1,66 @@ +/** + * The type of external integration/connector (e.g., "google", "slack", "github"). + */ export type ConnectorIntegrationType = string; -export type ConnectorAccessTokenResponse = { +/** + * Response from the connectors access token endpoint. + */ +export interface ConnectorAccessTokenResponse { access_token: string; -}; +} +/** + * Connectors module for managing OAuth tokens for external services. + * + * This module allows you to retrieve OAuth access tokens for external services + * that users have connected to your Base44 app. Use these tokens to make API + * calls to external services on behalf of your users. + * + * **Important:** This module is only available via service role authentication. + * + * **Difference from SSO module:** + * - **Connectors**: Retrieve OAuth tokens for external services (Google, Slack, etc.) + * to call their APIs on behalf of users + * - **SSO**: Generate tokens to authenticate your Base44 users with external systems + * + * @example + * ```typescript + * // Retrieve Google OAuth token for a user + * const response = await client.asServiceRole.connectors.getAccessToken("google"); + * const googleToken = response.access_token; + * + * // Use the token to call Google APIs + * const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { + * headers: { 'Authorization': `Bearer ${googleToken}` } + * }); + * ``` + */ +export interface ConnectorsModule { + /** + * Retrieve an OAuth access token for a specific external integration type. + * + * Returns the stored OAuth token for an external service that a user has + * connected to your Base44 app. You can then use this token to make + * authenticated API calls to that external service. + * + * @param integrationType - The type of integration (e.g., "google", "slack", "github") + * @returns Promise resolving to the access token response + * + * @throws {Error} When integrationType is not provided or is not a string + * + * @example + * ```typescript + * // Get Google OAuth token + * const response = await client.asServiceRole.connectors.getAccessToken("google"); + * console.log(response.access_token); + * + * // Get Slack OAuth token + * const slackResponse = await client.asServiceRole.connectors.getAccessToken("slack"); + * console.log(slackResponse.access_token); + * ``` + */ + getAccessToken( + integrationType: ConnectorIntegrationType + ): Promise; +} diff --git a/src/modules/entities.ts b/src/modules/entities.ts index c134091..b59a29c 100644 --- a/src/modules/entities.ts +++ b/src/modules/entities.ts @@ -1,12 +1,18 @@ import { AxiosInstance } from "axios"; +import { EntitiesModule, EntityHandler } from "./entities.types"; /** - * Creates the entities module for the Base44 SDK - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string|number} appId - Application ID - * @returns {Object} Entities module + * Creates the entities module for the Base44 SDK. + * + * @param axios - Axios instance + * @param appId - Application ID + * @returns Entities module with dynamic entity access + * @internal */ -export function createEntitiesModule(axios: AxiosInstance, appId: string) { +export function createEntitiesModule( + axios: AxiosInstance, + appId: string +): EntitiesModule { // Using Proxy to dynamically handle entity names return new Proxy( {}, @@ -25,32 +31,27 @@ export function createEntitiesModule(axios: AxiosInstance, appId: string) { return createEntityHandler(axios, appId, entityName); }, } - ); + ) as EntitiesModule; } /** - * Creates a handler for a specific entity - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string|number} appId - Application ID - * @param {string} entityName - Entity name - * @returns {Object} Entity handler with CRUD methods + * Creates a handler for a specific entity. + * + * @param axios - Axios instance + * @param appId - Application ID + * @param entityName - Entity name + * @returns Entity handler with CRUD methods + * @internal */ function createEntityHandler( axios: AxiosInstance, appId: string, entityName: string -) { +): EntityHandler { const baseURL = `/apps/${appId}/entities/${entityName}`; return { - /** - * List entities with optional pagination and sorting - * @param {string} [sort] - Sort parameter - * @param {number} [limit] - Limit results - * @param {number} [skip] - Skip results (pagination) - * @param {string[]} [fields] - Fields to include - * @returns {Promise} List of entities - */ + // List entities with optional pagination and sorting async list(sort: string, limit: number, skip: number, fields: string[]) { const params: Record = {}; if (sort) params.sort = sort; @@ -62,15 +63,7 @@ function createEntityHandler( return axios.get(baseURL, { params }); }, - /** - * Filter entities based on query - * @param {Object} query - Filter query - * @param {string} [sort] - Sort parameter - * @param {number} [limit] - Limit results - * @param {number} [skip] - Skip results (pagination) - * @param {string[]} [fields] - Fields to include - * @returns {Promise} Filtered entities - */ + // Filter entities based on query async filter( query: Record, sort: string, @@ -91,66 +84,37 @@ function createEntityHandler( return axios.get(baseURL, { params }); }, - /** - * Get entity by ID - * @param {string} id - Entity ID - * @returns {Promise} Entity - */ + // Get entity by ID async get(id: string) { return axios.get(`${baseURL}/${id}`); }, - /** - * Create new entity - * @param {Object} data - Entity data - * @returns {Promise} Created entity - */ + // Create new entity async create(data: Record) { return axios.post(baseURL, data); }, - /** - * Update entity by ID - * @param {string} id - Entity ID - * @param {Object} data - Updated entity data - * @returns {Promise} Updated entity - */ + // Update entity by ID async update(id: string, data: Record) { return axios.put(`${baseURL}/${id}`, data); }, - /** - * Delete entity by ID - * @param {string} id - Entity ID - * @returns {Promise} - */ + // Delete entity by ID async delete(id: string) { return axios.delete(`${baseURL}/${id}`); }, - /** - * Delete multiple entities based on query - * @param {Object} query - Delete query - * @returns {Promise} - */ + // Delete multiple entities based on query async deleteMany(query: Record) { return axios.delete(baseURL, { data: query }); }, - /** - * Create multiple entities in a single request - * @param {Array} data - Array of entity data - * @returns {Promise} Created entities - */ + // Create multiple entities in a single request async bulkCreate(data: Record[]) { return axios.post(`${baseURL}/bulk`, data); }, - /** - * Import entities from a file - * @param {File} file - File to import - * @returns {Promise} Import result - */ + // Import entities from a file async importEntities(file: File) { const formData = new FormData(); formData.append("file", file, file.name); diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts new file mode 100644 index 0000000..68a3538 --- /dev/null +++ b/src/modules/entities.types.ts @@ -0,0 +1,330 @@ +/** + * Entity handler providing CRUD operations for a specific entity type. + * + * Each entity in your Base44 app (like User, Todo, Product, etc.) gets + * a handler with these methods for managing data. + */ +export interface EntityHandler { + /** + * List entities with optional pagination and sorting. + * + * Retrieves all entities of this type with support for sorting, + * pagination, and field selection. + * + * @param sort - Sort parameter (e.g., "-created_date" for descending) + * @param limit - Maximum number of results to return + * @param skip - Number of results to skip (for pagination) + * @param fields - Array of field names to include in the response + * @returns Promise resolving to an array of entities + * + * @example + * ```typescript + * // Get all todos + * const todos = await client.entities.Todo.list(); + * + * // Get first 10 todos sorted by date + * const recentTodos = await client.entities.Todo.list('-created_date', 10); + * + * // Get paginated results (skip first 20, get next 10) + * const page3 = await client.entities.Todo.list(null, 10, 20); + * + * // Get only specific fields + * const titles = await client.entities.Todo.list(null, null, null, ['title', 'completed']); + * ``` + */ + list( + sort?: string, + limit?: number, + skip?: number, + fields?: string[] + ): Promise; + + /** + * Filter entities based on a query. + * + * Retrieves entities that match specific criteria with support for + * sorting, pagination, and field selection. + * + * @param query - Filter query object with field-value pairs + * @param sort - Sort parameter (e.g., "-created_date" for descending) + * @param limit - Maximum number of results to return + * @param skip - Number of results to skip (for pagination) + * @param fields - Array of field names to include in the response + * @returns Promise resolving to an array of filtered entities + * + * @example + * ```typescript + * // Filter by single field + * const completedTodos = await client.entities.Todo.filter({ + * completed: true + * }); + * + * // Filter by multiple fields + * const highPriorityTodos = await client.entities.Todo.filter({ + * priority: 'high', + * completed: false + * }); + * + * // Filter with sorting and pagination + * const results = await client.entities.Todo.filter( + * { status: 'active' }, + * '-created_date', + * 20, + * 0 + * ); + * + * // Filter with specific fields + * const titles = await client.entities.Todo.filter( + * { priority: 'high' }, + * null, + * null, + * null, + * ['title', 'priority'] + * ); + * ``` + */ + filter( + query: Record, + sort?: string, + limit?: number, + skip?: number, + fields?: string[] + ): Promise; + + /** + * Get a single entity by ID. + * + * Retrieves a specific entity using its unique identifier. + * + * @param id - The unique identifier of the entity + * @returns Promise resolving to the entity + * + * @example + * ```typescript + * const todo = await client.entities.Todo.get('todo-123'); + * console.log(todo.title); + * + * const user = await client.entities.User.get('user-456'); + * console.log(user.email); + * ``` + */ + get(id: string): Promise; + + /** + * Create a new entity. + * + * Creates a new entity with the provided data. + * + * @param data - Object containing the entity data + * @returns Promise resolving to the created entity + * + * @example + * ```typescript + * const newTodo = await client.entities.Todo.create({ + * title: 'Buy groceries', + * completed: false, + * priority: 'high' + * }); + * console.log('Created todo with ID:', newTodo.id); + * + * const newUser = await client.entities.User.create({ + * name: 'John Doe', + * email: 'john@example.com', + * role: 'user' + * }); + * ``` + */ + create(data: Record): Promise; + + /** + * Update an existing entity. + * + * Updates an entity by ID with the provided data. Only the fields + * included in the data object will be updated. + * + * @param id - The unique identifier of the entity to update + * @param data - Object containing the fields to update + * @returns Promise resolving to the updated entity + * + * @example + * ```typescript + * // Update single field + * const updated = await client.entities.Todo.update('todo-123', { + * completed: true + * }); + * + * // Update multiple fields + * const updated = await client.entities.Todo.update('todo-123', { + * title: 'Updated title', + * priority: 'low', + * completed: true + * }); + * ``` + */ + update(id: string, data: Record): Promise; + + /** + * Delete a single entity by ID. + * + * Permanently removes an entity from the database. + * + * @param id - The unique identifier of the entity to delete + * @returns Promise that resolves when the entity is deleted + * + * @example + * ```typescript + * await client.entities.Todo.delete('todo-123'); + * console.log('Todo deleted'); + * + * await client.entities.User.delete('user-456'); + * ``` + */ + delete(id: string): Promise; + + /** + * Delete multiple entities matching a query. + * + * Permanently removes all entities that match the provided query. + * Use with caution as this operation cannot be undone. + * + * @param query - Filter query object to match entities for deletion + * @returns Promise that resolves when the entities are deleted + * + * @example + * ```typescript + * // Delete all completed todos + * await client.entities.Todo.deleteMany({ + * completed: true + * }); + * + * // Delete all low priority items + * await client.entities.Todo.deleteMany({ + * priority: 'low' + * }); + * + * // Delete by multiple criteria + * await client.entities.Todo.deleteMany({ + * completed: true, + * priority: 'low' + * }); + * ``` + */ + deleteMany(query: Record): Promise; + + /** + * Create multiple entities in a single request. + * + * Efficiently creates multiple entities at once. This is faster + * than creating them individually. + * + * @param data - Array of entity data objects + * @returns Promise resolving to an array of created entities + * + * @example + * ```typescript + * const newTodos = await client.entities.Todo.bulkCreate([ + * { title: 'Task 1', completed: false }, + * { title: 'Task 2', completed: false }, + * { title: 'Task 3', completed: true } + * ]); + * console.log(`Created ${newTodos.length} todos`); + * + * const newUsers = await client.entities.User.bulkCreate([ + * { name: 'Alice', email: 'alice@example.com' }, + * { name: 'Bob', email: 'bob@example.com' } + * ]); + * ``` + */ + bulkCreate(data: Record[]): Promise; + + /** + * Import entities from a file. + * + * **Browser only:** Requires File object from file input. + * + * Imports entities from a file (typically CSV or similar format). + * The file format should match your entity structure. + * + * @param file - File object to import + * @returns Promise resolving to the import result + * + * @example + * ```typescript + * // In a browser with file input + * const fileInput = document.querySelector('input[type="file"]'); + * const file = fileInput.files[0]; + * + * const result = await client.entities.Todo.importEntities(file); + * console.log(`Imported ${result.count} todos`); + * ``` + */ + importEntities(file: File): Promise; +} + +/** + * Entities module for managing application data. + * + * This module provides dynamic access to all entities in your Base44 app. + * Each entity (like User, Todo, Product, etc.) gets a handler with full + * CRUD operations and additional utility methods. + * + * **Dynamic Access:** + * Entities are accessed dynamically using: `client.entities.EntityName.method()` + * + * **Available with both auth modes:** + * - User auth: `client.entities.EntityName.method(...)` + * - Service role: `client.asServiceRole.entities.EntityName.method(...)` + * + * @example + * ```typescript + * // List all todos + * const todos = await client.entities.Todo.list(); + * + * // Filter users by role + * const admins = await client.entities.User.filter({ role: 'admin' }); + * + * // Get specific product + * const product = await client.entities.Product.get('prod-123'); + * + * // Create new todo + * const newTodo = await client.entities.Todo.create({ + * title: 'Buy groceries', + * completed: false + * }); + * + * // Update entity + * await client.entities.Todo.update('todo-123', { completed: true }); + * + * // Delete entity + * await client.entities.Todo.delete('todo-123'); + * + * // Bulk operations + * await client.entities.Todo.bulkCreate([ + * { title: 'Task 1' }, + * { title: 'Task 2' } + * ]); + * + * // Delete many + * await client.entities.Todo.deleteMany({ completed: true }); + * ``` + */ +export type EntitiesModule = { + /** + * Access any entity by name. + * + * Use this to access custom entities defined in your Base44 app. + * + * @example + * ```typescript + * // Built-in entities + * client.entities.User + * client.entities.Todo + * + * // Custom entities + * client.entities.Product + * client.entities.Order + * client.entities.Invoice + * ``` + */ + [entityName: string]: EntityHandler; +}; diff --git a/src/modules/functions.ts b/src/modules/functions.ts index 4dfa102..296465a 100644 --- a/src/modules/functions.ts +++ b/src/modules/functions.ts @@ -1,14 +1,20 @@ import { AxiosInstance } from "axios"; +import { FunctionsModule } from "./functions.types"; /** - * Creates the functions module for the Base44 SDK - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string|number} appId - Application ID - * @returns {Object} Functions module + * Creates the functions module for the Base44 SDK. + * + * @param axios - Axios instance + * @param appId - Application ID + * @returns Functions module with methods to invoke custom backend functions + * @internal */ -export function createFunctionsModule(axios: AxiosInstance, appId: string) { - // Using nested Proxy objects to handle dynamic function names +export function createFunctionsModule( + axios: AxiosInstance, + appId: string +): FunctionsModule { return { + // Invoke a custom backend function by name async invoke(functionName: string, data: Record) { // Validate input if (typeof data === "string") { diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts new file mode 100644 index 0000000..e1ea3ba --- /dev/null +++ b/src/modules/functions.types.ts @@ -0,0 +1,73 @@ +/** + * Functions module for invoking custom backend functions. + * + * This module allows you to invoke custom backend functions that you've + * deployed to your Base44 app. Functions can accept parameters and return + * results, and support file uploads. + * + * Functions can be invoked with either user authentication or service role + * authentication depending on your use case. + * + * @example + * ```typescript + * // Invoke a function with parameters + * const result = await client.functions.invoke('calculateTotal', { + * items: ['item1', 'item2'], + * discount: 0.1 + * }); + * console.log(result.data); + * + * // Invoke a function with file upload + * const fileResult = await client.functions.invoke('processImage', { + * image: fileInput.files[0], + * filter: 'grayscale' + * }); + * + * // Invoke with service role + * const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + * action: 'cleanup' + * }); + * ``` + */ +export interface FunctionsModule { + /** + * Invoke a custom backend function by name. + * + * Calls a custom backend function that you've deployed to your Base44 app. + * The function receives the provided data as named parameters and returns + * the result. + * + * **File Upload Support:** + * If any parameter is a `File` object, the request will automatically be + * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + * + * @param functionName - The name of the function to invoke + * @param data - An object containing named parameters for the function + * @returns Promise resolving to the function's response + * + * @throws {Error} When data is a string instead of an object + * + * @example + * ```typescript + * // Basic function call + * const result = await client.functions.invoke('calculateTotal', { + * items: ['item1', 'item2'], + * discount: 0.1 + * }); + * console.log(result.data.total); + * + * // Function with file upload + * const imageFile = document.querySelector('input[type="file"]').files[0]; + * const processedImage = await client.functions.invoke('processImage', { + * image: imageFile, + * filter: 'grayscale', + * quality: 80 + * }); + * + * // Health check function + * const health = await client.functions.invoke('healthCheck', {}); + * console.log(health.data.status); + * ``` + */ + invoke(functionName: string, data: Record): Promise; +} diff --git a/src/modules/integrations.ts b/src/modules/integrations.ts index 2b1c750..9dda317 100644 --- a/src/modules/integrations.ts +++ b/src/modules/integrations.ts @@ -1,13 +1,18 @@ import { AxiosInstance } from "axios"; +import { IntegrationsModule } from "./integrations.types"; /** - * Creates the integrations module for the Base44 SDK - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string|number} appId - Application ID - * @returns {Object} Integrations module + * Creates the integrations module for the Base44 SDK. + * + * @param axios - Axios instance + * @param appId - Application ID + * @returns Integrations module with dynamic access to integration endpoints + * @internal */ -export function createIntegrationsModule(axios: AxiosInstance, appId: string) { - // Using nested Proxy objects to handle dynamic package and endpoint names +export function createIntegrationsModule( + axios: AxiosInstance, + appId: string +): IntegrationsModule { return new Proxy( {}, { @@ -36,6 +41,7 @@ export function createIntegrationsModule(axios: AxiosInstance, appId: string) { } // Return a function that calls the integration endpoint + // This allows: client.integrations.PackageName.EndpointName(data) return async (data: Record) => { // Validate input if (typeof data === "string") { @@ -93,5 +99,5 @@ export function createIntegrationsModule(axios: AxiosInstance, appId: string) { ); }, } - ); + ) as IntegrationsModule; } diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts new file mode 100644 index 0000000..4726fcd --- /dev/null +++ b/src/modules/integrations.types.ts @@ -0,0 +1,118 @@ +/** + * Function signature for calling an integration endpoint. + * + * @param data - An object containing named parameters for the integration endpoint + * @returns Promise resolving to the integration endpoint's response + */ +export type IntegrationEndpointFunction = ( + data: Record +) => Promise; + +/** + * 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. + * + * @example + * ```typescript + * // Access endpoints dynamically + * const result = await integrations.Core.SendEmail({ + * to: 'user@example.com', + * subject: 'Hello', + * body: 'Message' + * }); + * ``` + */ +export type IntegrationPackage = { + [endpointName: string]: IntegrationEndpointFunction; +}; + +/** + * Integrations module for calling pre-built integration endpoints. + * + * This module provides access to integration endpoints that Base44 provides + * for interacting with external services. Integrations are organized into + * packages, with the most common being the "Core" package. + * + * Unlike the connectors module (which gives you raw OAuth tokens), integrations + * provide pre-built functions that Base44 executes on your behalf. + * + * **Dynamic Access:** + * Integration endpoints are accessed dynamically using the pattern: + * `client.integrations.PackageName.EndpointName(params)` + * + * **File Upload Support:** + * If any parameter is a `File` object, the request will automatically be + * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + * + * **Available with both auth modes:** + * - User auth: `client.integrations.PackageName.EndpointName(...)` + * - Service role: `client.asServiceRole.integrations.PackageName.EndpointName(...)` + * + * @example + * ```typescript + * // Send email via Core package + * const emailResult = await client.integrations.Core.SendEmail({ + * to: 'user@example.com', + * subject: 'Hello from Base44', + * body: 'This is a test email' + * }); + * + * // Upload file via Core package + * const fileInput = document.querySelector('input[type="file"]'); + * const uploadResult = await client.integrations.Core.UploadFile({ + * file: fileInput.files[0], + * metadata: { type: 'profile-picture' } + * }); + * + * // Use custom integration package + * const result = await client.integrations.CustomPackage.CustomEndpoint({ + * param1: 'value1', + * param2: 'value2' + * }); + * + * // Use with service role + * const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ + * to: 'admin@example.com', + * subject: 'Admin notification', + * body: 'System alert' + * }); + * ``` + */ +export type IntegrationsModule = { + /** + * Core package containing built-in Base44 integration endpoints. + * + * Common endpoints include: + * - `SendEmail` - Send emails + * - `UploadFile` - Upload files + * + * @example + * ```typescript + * await client.integrations.Core.SendEmail({ + * to: 'user@example.com', + * subject: 'Welcome', + * body: 'Welcome to our app!' + * }); + * ``` + */ + Core: IntegrationPackage; + + /** + * Access to any custom or installable integration package. + * + * Use this to call endpoints from custom integration packages + * you've installed in your Base44 app. + * + * @example + * ```typescript + * // Access custom package dynamically + * await client.integrations.Slack.PostMessage({ + * channel: '#general', + * text: 'Hello from Base44' + * }); + * ``` + */ + [packageName: string]: IntegrationPackage; +}; diff --git a/src/modules/sso.ts b/src/modules/sso.ts index c839a5b..25bc1cb 100644 --- a/src/modules/sso.ts +++ b/src/modules/sso.ts @@ -1,35 +1,32 @@ import { AxiosInstance } from "axios"; +import { SsoModule } from "./sso.types"; /** - * Creates the SSO module for the Base44 SDK - * @param {import('axios').AxiosInstance} axios - Axios instance - * @param {string} appId - Application ID - * @param {string} [userToken] - User authentication token - * @param {string} [serviceToken] - Service role authentication token - * @returns {Object} SSO module with SSO authentication methods + * Creates the SSO module for the Base44 SDK. + * + * @param axios - Axios instance + * @param appId - Application ID + * @param userToken - User authentication token + * @returns SSO module with authentication methods + * @internal */ export function createSsoModule( axios: AxiosInstance, appId: string, userToken?: string -) { +): SsoModule { return { - /** - * Get current user sso access token - * @param {string} userid - User ID to include as path parameter - * @returns {Promise} Current user sso access_token - */ + // Get SSO access token for a specific user async getAccessToken(userid: string) { const url = `/apps/${appId}/auth/sso/accesstoken/${userid}`; - + // Prepare headers with both tokens if available const headers: Record = {}; - - + if (userToken) { - headers['on-behalf-of'] = `Bearer ${userToken}`; + headers["on-behalf-of"] = `Bearer ${userToken}`; } - + return axios.get(url, { headers }); }, }; diff --git a/src/modules/sso.types.ts b/src/modules/sso.types.ts new file mode 100644 index 0000000..0ccb980 --- /dev/null +++ b/src/modules/sso.types.ts @@ -0,0 +1,44 @@ +import { AxiosResponse } from "axios"; + +/** + * Response from SSO access token endpoint. + */ +export interface SsoAccessTokenResponse { + access_token: string; +} + +/** + * SSO (Single Sign-On) module for managing SSO authentication. + * + * This module provides methods for retrieving SSO access tokens for users. + * + * TODO: Add link to service role documentation once created + * + * @example + * ```typescript + * // Access SSO module via service role + * const response = await client.asServiceRole.sso.getAccessToken("user_123"); + * console.log(response.data.access_token); + * ``` + */ +export interface SsoModule { + /** + * Get SSO access token for a specific user. + * + * Retrieves a Single Sign-On access token that can be used to authenticate + * a user with external services or systems. + * + * @param userid - The user ID to get the access token for + * @returns Promise resolving to an Axios response containing the access token + * + * @example + * ```typescript + * // Get SSO access token for a user + * const response = await client.asServiceRole.sso.getAccessToken("user_123"); + * console.log(response.data.access_token); + * ``` + */ + getAccessToken( + userid: string + ): Promise>; +} diff --git a/src/types.ts b/src/types.ts index 8580f1e..f5c2448 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,70 @@ export * from "./modules/types.js"; +/** + * Parameters for filtering, sorting, and paginating model data. + * + * This type is primarily used in the agents module for querying agent + * conversations. It provides a structured way to specify query criteria, + * sorting, pagination, and field selection. + * + * @property q - Query object with field-value pairs for filtering + * @property sort - Sort parameter (e.g., "-created_date" for descending order) + * @property sort_by - Alternative sort parameter (use either `sort` or `sort_by`) + * @property limit - Maximum number of results to return + * @property skip - Number of results to skip (for pagination) + * @property fields - Array of field names to include in the response + * + * @example + * ```typescript + * // Basic filtering by agent name + * const conversations = await client.agents.listConversations({ + * q: { agent_name: 'support-bot' } + * }); + * ``` + * + * @example + * ```typescript + * // Filtering with sorting + * const conversations = await client.agents.listConversations({ + * q: { status: 'active' }, + * sort: '-created_at' // Sort by created_at descending + * }); + * ``` + * + * @example + * ```typescript + * // Pagination with limit and skip + * const conversations = await client.agents.listConversations({ + * q: { agent_name: 'support-bot' }, + * limit: 20, // Get 20 results + * skip: 40 // Skip first 40 (page 3) + * }); + * ``` + * + * @example + * ```typescript + * // Field selection (only return specific fields) + * const conversations = await client.agents.listConversations({ + * q: { status: 'active' }, + * fields: ['id', 'agent_name', 'created_at'] + * }); + * ``` + * + * @example + * ```typescript + * // Complex query with multiple filters + * const conversations = await client.agents.listConversations({ + * q: { + * agent_name: 'support-bot', + * 'metadata.priority': 'high', + * status: 'active' + * }, + * sort: '-updated_at', + * limit: 50, + * skip: 0 + * }); + * ``` + */ export type ModelFilterParams = { q?: Record; sort?: string | null; diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index 76a10aa..95ccb0e 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -1,25 +1,12 @@ -/** - * Utility functions for authentication and token handling - */ - -/** - * Retrieves an access token from either localStorage or URL parameters - * - * @param {Object} options - Configuration options - * @param {string} [options.storageKey='base44_access_token'] - The key to use in localStorage - * @param {string} [options.paramName='access_token'] - The URL parameter name - * @param {boolean} [options.saveToStorage=true] - Whether to save the token to localStorage if found in URL - * @param {boolean} [options.removeFromUrl=true] - Whether to remove the token from URL after retrieval - * @returns {string|null} The access token or null if not found - */ -export function getAccessToken( - options: { - storageKey?: string; - paramName?: string; - saveToStorage?: boolean; - removeFromUrl?: boolean; - } = {} -) { +import { + GetAccessTokenOptions, + SaveAccessTokenOptions, + RemoveAccessTokenOptions, + GetLoginUrlOptions, +} from "./auth-utils.types.js"; + +// Retrieve an access token from URL parameters or localStorage +export function getAccessToken(options: GetAccessTokenOptions = {}) { const { storageKey = "base44_access_token", paramName = "access_token", @@ -71,19 +58,10 @@ export function getAccessToken( return null; } -/** - * Saves an access token to localStorage - * - * @param {string} token - The access token to save - * @param {Object} options - Configuration options - * @param {string} [options.storageKey='base44_access_token'] - The key to use in localStorage - * @returns {boolean} Success status - */ +// Save an access token to localStorage export function saveAccessToken( token: string, - options: { - storageKey?: string; - } + options: SaveAccessTokenOptions ) { const { storageKey = "base44_access_token" } = options; @@ -102,14 +80,8 @@ export function saveAccessToken( } } -/** - * Removes the access token from localStorage - * - * @param {Object} options - Configuration options - * @param {string} [options.storageKey='base44_access_token'] - The key to use in localStorage - * @returns {boolean} Success status - */ -export function removeAccessToken(options: { storageKey?: string }) { +// Remove the access token from localStorage +export function removeAccessToken(options: RemoveAccessTokenOptions) { const { storageKey = "base44_access_token" } = options; if (typeof window === "undefined" || !window.localStorage) { @@ -125,24 +97,8 @@ export function removeAccessToken(options: { storageKey?: string }) { } } -/** - * Constructs the absolute URL for the login page - * - * @param {string} nextUrl - URL to redirect back to after login - * @param {Object} options - Configuration options - * @param {string} options.serverUrl - Server URL (e.g., 'https://base44.app') - * @param {string|number} options.appId - Application ID - * @param {string} [options.loginPath='/login'] - Path to the login endpoint - * @returns {string} The complete login URL - */ -export function getLoginUrl( - nextUrl: string, - options: { - serverUrl: string; - appId: string; - loginPath?: string; - } -) { +// Construct the absolute URL for the login page with redirect +export function getLoginUrl(nextUrl: string, options: GetLoginUrlOptions) { const { serverUrl, appId, loginPath = "/login" } = options; if (!serverUrl || !appId) { diff --git a/src/utils/auth-utils.types.ts b/src/utils/auth-utils.types.ts new file mode 100644 index 0000000..bca18eb --- /dev/null +++ b/src/utils/auth-utils.types.ts @@ -0,0 +1,286 @@ +/** + * Configuration options for retrieving an access token + * + * @example + * ```typescript + * // Use default options + * const token = getAccessToken(); + * + * // Custom storage key + * const token = getAccessToken({ storageKey: 'my_app_token' }); + * + * // Get token from URL but don't save or remove from URL + * const token = getAccessToken({ + * saveToStorage: false, + * removeFromUrl: false + * }); + * ``` + */ +export interface GetAccessTokenOptions { + /** + * The key to use when storing/retrieving the token in localStorage + * @default 'base44_access_token' + */ + storageKey?: string; + + /** + * The URL parameter name to check for the access token + * @default 'access_token' + */ + paramName?: string; + + /** + * Whether to save the token to localStorage if found in the URL + * @default true + */ + saveToStorage?: boolean; + + /** + * Whether to remove the token from the URL after retrieval for security + * @default true + */ + removeFromUrl?: boolean; +} + +/** + * Configuration options for saving an access token + * + * @example + * ```typescript + * // Use default storage key + * saveAccessToken('my-token-123', {}); + * + * // Use custom storage key + * saveAccessToken('my-token-123', { storageKey: 'my_app_token' }); + * ``` + */ +export interface SaveAccessTokenOptions { + /** + * The key to use when storing the token in localStorage + * @default 'base44_access_token' + */ + storageKey?: string; +} + +/** + * Configuration options for removing an access token + * + * @example + * ```typescript + * // Remove token from default storage key + * removeAccessToken({}); + * + * // Remove token from custom storage key + * removeAccessToken({ storageKey: 'my_app_token' }); + * ``` + */ +export interface RemoveAccessTokenOptions { + /** + * The key to use when removing the token from localStorage + * @default 'base44_access_token' + */ + storageKey?: string; +} + +/** + * Configuration options for constructing a login URL + * + * @example + * ```typescript + * const loginUrl = getLoginUrl('/dashboard', { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123' + * }); + * // Returns: 'https://base44.app/login?from_url=%2Fdashboard&app_id=my-app-123' + * + * // Custom login path + * const loginUrl = getLoginUrl('/dashboard', { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123', + * loginPath: '/auth/login' + * }); + * ``` + */ +export interface GetLoginUrlOptions { + /** + * The base server URL (e.g., 'https://base44.app') + */ + serverUrl: string; + + /** + * The application ID + */ + appId: string; + + /** + * The path to the login endpoint + * @default '/login' + */ + loginPath?: string; +} + +/** + * Retrieves an access token from either the URL parameters or localStorage. + * + * This function is useful for handling OAuth redirects where the token is + * passed as a URL parameter. It will automatically save the token to + * localStorage and remove it from the URL for security. + * + * @param options - Configuration options for token retrieval + * @returns The access token if found, null otherwise + * + * @remarks + * - This function is browser-only and will return null in non-browser environments + * - Checks URL parameters first, then falls back to localStorage + * - By default, saves URL tokens to localStorage and removes them from the URL + * + * @example + * ```typescript + * // After OAuth redirect to: https://myapp.com?access_token=abc123 + * const token = getAccessToken(); + * // Returns: 'abc123' (and saves to localStorage, removes from URL) + * ``` + * + * @example + * ```typescript + * // Custom configuration + * const token = getAccessToken({ + * storageKey: 'my_app_token', + * paramName: 'token', + * saveToStorage: false, + * removeFromUrl: false + * }); + * ``` + * + * @example + * ```typescript + * // Retrieve from localStorage only (no URL check) + * const token = getAccessToken(); + * // Returns stored token or null + * ``` + */ +export type GetAccessTokenFunction = ( + options?: GetAccessTokenOptions +) => string | null; + +/** + * Saves an access token to localStorage. + * + * This function is browser-only and will return false in non-browser + * environments or if the save operation fails. + * + * @param token - The access token to save + * @param options - Configuration options for saving + * @returns true if the token was saved successfully, false otherwise + * + * @remarks + * - Also saves the token to 'token' key for backwards compatibility with platform v2 + * - Returns false if window.localStorage is not available + * + * @example + * ```typescript + * const success = saveAccessToken('my-token-123', {}); + * if (success) { + * console.log('Token saved successfully'); + * } + * ``` + * + * @example + * ```typescript + * // Use custom storage key + * const success = saveAccessToken('my-token-123', { + * storageKey: 'my_custom_token_key' + * }); + * ``` + */ +export type SaveAccessTokenFunction = ( + token: string, + options: SaveAccessTokenOptions +) => boolean; + +/** + * Removes the access token from localStorage. + * + * This function is browser-only and will return false in non-browser + * environments or if the removal operation fails. + * + * @param options - Configuration options for removal + * @returns true if the token was removed successfully, false otherwise + * + * @example + * ```typescript + * // Remove token on logout + * const success = removeAccessToken({}); + * if (success) { + * console.log('Token removed successfully'); + * } + * ``` + * + * @example + * ```typescript + * // Remove custom token key + * const success = removeAccessToken({ + * storageKey: 'my_custom_token_key' + * }); + * ``` + */ +export type RemoveAccessTokenFunction = ( + options: RemoveAccessTokenOptions +) => boolean; + +/** + * Constructs the absolute URL for the login page with a redirect parameter. + * + * This function is useful for redirecting users to login and then back to + * the current page after authentication. + * + * @param nextUrl - The URL to redirect to after successful login + * @param options - Configuration options for constructing the login URL + * @returns The complete login URL with encoded redirect parameters + * + * @throws Error if serverUrl or appId are not provided + * + * @remarks + * - The nextUrl is URL-encoded for safe transmission + * - If nextUrl is empty and running in browser, uses current window.location.href + * + * @example + * ```typescript + * // Basic usage + * const loginUrl = getLoginUrl('/dashboard', { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123' + * }); + * // Returns: 'https://base44.app/login?from_url=%2Fdashboard&app_id=my-app-123' + * ``` + * + * @example + * ```typescript + * // With custom login path + * const loginUrl = getLoginUrl('https://myapp.com/protected', { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123', + * loginPath: '/auth/signin' + * }); + * ``` + * + * @example + * ```typescript + * // Redirect to login in React + * function ProtectedPage() { + * const handleLogin = () => { + * const loginUrl = getLoginUrl(window.location.href, { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123' + * }); + * window.location.href = loginUrl; + * }; + * + * return ; + * } + * ``` + */ +export type GetLoginUrlFunction = ( + nextUrl: string, + options: GetLoginUrlOptions +) => string; diff --git a/src/utils/axios-client.ts b/src/utils/axios-client.ts index ec4dc52..53a7367 100644 --- a/src/utils/axios-client.ts +++ b/src/utils/axios-client.ts @@ -2,12 +2,83 @@ import axios from "axios"; import { isInIFrame } from "./common.js"; import { v4 as uuidv4 } from "uuid"; +/** + * Custom error class for Base44 SDK errors. + * + * This error is thrown when API requests fail. It extends the standard Error + * class and includes additional information about the HTTP status, error code, + * and response data from the server. + * + * @example + * ```typescript + * try { + * await client.entities.Todo.get('invalid-id'); + * } catch (error) { + * if (error instanceof Base44Error) { + * console.error('Status:', error.status); // 404 + * console.error('Message:', error.message); // "Not found" + * console.error('Code:', error.code); // "NOT_FOUND" + * console.error('Data:', error.data); // Full response data + * } + * } + * ``` + * + * @example + * ```typescript + * // Handling authentication errors + * try { + * await client.auth.loginViaEmailPassword('user@example.com', 'wrong-password'); + * } catch (error) { + * if (error instanceof Base44Error && error.status === 401) { + * console.error('Authentication failed:', error.message); + * } + * } + * ``` + * + * @example + * ```typescript + * // Serializing errors for logging + * try { + * await client.entities.User.create({ invalid: 'data' }); + * } catch (error) { + * if (error instanceof Base44Error) { + * const serialized = error.toJSON(); + * // Send to logging service + * logger.error(serialized); + * } + * } + * ``` + */ export class Base44Error extends Error { + /** + * HTTP status code of the error (e.g., 400, 401, 404, 500). + */ status: number; + + /** + * Error code from the API (e.g., "NOT_FOUND", "VALIDATION_ERROR"). + */ code: string; + + /** + * Full response data from the server containing error details. + */ data: any; + + /** + * The original error object from axios. + */ originalError: unknown; + /** + * Creates a new Base44Error instance. + * + * @param message - Human-readable error message + * @param status - HTTP status code + * @param code - Error code from the API + * @param data - Full response data from the server + * @param originalError - Original axios error object + */ constructor( message: string, status: number, @@ -23,7 +94,33 @@ export class Base44Error extends Error { this.originalError = originalError; } - // Add a method to safely serialize this error without circular references + /** + * Serializes the error to a JSON-safe object. + * + * Useful for logging or sending error information to external services + * without circular reference issues. + * + * @returns JSON-safe representation of the error + * + * @example + * ```typescript + * try { + * await client.entities.Todo.get('invalid-id'); + * } catch (error) { + * if (error instanceof Base44Error) { + * const json = error.toJSON(); + * console.log(json); + * // { + * // name: "Base44Error", + * // message: "Not found", + * // status: 404, + * // code: "NOT_FOUND", + * // data: { ... } + * // } + * } + * } + * ``` + */ toJSON() { return { name: this.name, @@ -36,9 +133,11 @@ export class Base44Error extends Error { } /** - * Safely logs error information without circular references - * @param {string} prefix - Prefix for the log message - * @param {Error} error - The error to log + * Safely logs error information without circular references. + * + * @param prefix - Prefix for the log message + * @param error - The error to log + * @internal */ function safeErrorLog(prefix: string, error: unknown) { if (error instanceof Base44Error) { @@ -58,15 +157,18 @@ function safeErrorLog(prefix: string, error: unknown) { } /** - * Creates an axios client with default configuration and interceptors - * @param {Object} options - Client configuration options - * @param {string} options.baseURL - Base URL for all requests - * @param {Object} options.headers - Additional headers - * @param {string} options.token - Auth token - * @param {boolean} options.requiresAuth - Whether the application requires authentication - * @param {string|number} options.appId - Application ID (needed for login redirect) - * @param {string} options.serverUrl - Server URL (needed for login redirect) - * @returns {import('axios').AxiosInstance} Configured axios instance + * Creates an axios client with default configuration and interceptors. + * + * Sets up an axios instance with: + * - Default headers + * - Authentication token injection + * - Response data unwrapping + * - Error transformation to Base44Error + * - iframe messaging support + * + * @param options - Client configuration options + * @returns Configured axios instance + * @internal */ export function createAxiosClient({ baseURL, diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..452d72c --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2575 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.2.1": + version "2.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@babel/code-frame@^7.27.1": + version "7.27.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" + integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== + dependencies: + "@babel/helper-validator-identifier" "^7.27.1" + js-tokens "^4.0.0" + picocolors "^1.1.1" + +"@babel/compat-data@^7.27.2": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" + integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== + +"@babel/core@^7.23.9": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" + integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.28.3" + "@babel/helpers" "^7.28.4" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/remapping" "^2.3.5" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + +"@babel/generator@^7.28.5": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" + integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== + dependencies: + "@babel/parser" "^7.28.5" + "@babel/types" "^7.28.5" + "@jridgewell/gen-mapping" "^0.3.12" + "@jridgewell/trace-mapping" "^0.3.28" + jsesc "^3.0.2" + +"@babel/helper-compilation-targets@^7.27.2": + version "7.27.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" + integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== + dependencies: + "@babel/compat-data" "^7.27.2" + "@babel/helper-validator-option" "^7.27.1" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-globals@^7.28.0": + version "7.28.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" + integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== + +"@babel/helper-module-imports@^7.27.1": + version "7.27.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" + integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== + dependencies: + "@babel/traverse" "^7.27.1" + "@babel/types" "^7.27.1" + +"@babel/helper-module-transforms@^7.28.3": + version "7.28.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" + integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== + dependencies: + "@babel/helper-module-imports" "^7.27.1" + "@babel/helper-validator-identifier" "^7.27.1" + "@babel/traverse" "^7.28.3" + +"@babel/helper-string-parser@^7.27.1": + version "7.27.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" + integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== + +"@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" + integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== + +"@babel/helper-validator-option@^7.27.1": + version "7.27.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" + integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== + +"@babel/helpers@^7.28.4": + version "7.28.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" + integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== + dependencies: + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.4" + +"@babel/parser@^7.20.15", "@babel/parser@^7.23.9", "@babel/parser@^7.25.4", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" + integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== + dependencies: + "@babel/types" "^7.28.5" + +"@babel/template@^7.27.2": + version "7.27.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" + integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/parser" "^7.27.2" + "@babel/types" "^7.27.1" + +"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" + integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== + dependencies: + "@babel/code-frame" "^7.27.1" + "@babel/generator" "^7.28.5" + "@babel/helper-globals" "^7.28.0" + "@babel/parser" "^7.28.5" + "@babel/template" "^7.27.2" + "@babel/types" "^7.28.5" + debug "^4.3.1" + +"@babel/types@^7.25.4", "@babel/types@^7.27.1", "@babel/types@^7.28.4", "@babel/types@^7.28.5": + version "7.28.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" + integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== + dependencies: + "@babel/helper-string-parser" "^7.27.1" + "@babel/helper-validator-identifier" "^7.28.5" + +"@bcoe/v8-coverage@^0.2.3": + version "0.2.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== + +"@esbuild/aix-ppc64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" + integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== + +"@esbuild/android-arm64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" + integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== + +"@esbuild/android-arm@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" + integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== + +"@esbuild/android-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" + integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== + +"@esbuild/darwin-arm64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" + integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== + +"@esbuild/darwin-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" + integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== + +"@esbuild/freebsd-arm64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" + integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== + +"@esbuild/freebsd-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" + integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== + +"@esbuild/linux-arm64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" + integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== + +"@esbuild/linux-arm@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" + integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== + +"@esbuild/linux-ia32@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" + integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== + +"@esbuild/linux-loong64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" + integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== + +"@esbuild/linux-mips64el@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" + integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== + +"@esbuild/linux-ppc64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" + integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== + +"@esbuild/linux-riscv64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" + integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== + +"@esbuild/linux-s390x@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" + integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== + +"@esbuild/linux-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" + integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== + +"@esbuild/netbsd-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" + integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== + +"@esbuild/openbsd-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" + integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== + +"@esbuild/sunos-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" + integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== + +"@esbuild/win32-arm64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" + integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== + +"@esbuild/win32-ia32@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" + integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== + +"@esbuild/win32-x64@0.21.5": + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" + integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== + +"@eslint-community/eslint-utils@^4.2.0": + version "4.9.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" + integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.6.1": + version "4.12.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" + integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== + +"@gerrit0/mini-shiki@^3.12.0": + version "3.14.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.14.0.tgz#ba66291e151b909cf96515e1cf6cba38748e4b62" + integrity sha512-c5X8fwPLOtUS8TVdqhynz9iV0GlOtFUT1ppXYzUUlEXe4kbZ/mvMT8wXoT8kCwUka+zsiloq7sD3pZ3+QVTuNQ== + dependencies: + "@shikijs/engine-oniguruma" "^3.14.0" + "@shikijs/langs" "^3.14.0" + "@shikijs/themes" "^3.14.0" + "@shikijs/types" "^3.14.0" + "@shikijs/vscode-textmate" "^10.0.2" + +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== + dependencies: + "@humanwhocodes/object-schema" "^2.0.3" + debug "^4.3.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.3": + version "2.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== + +"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": + version "0.1.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": + version "0.3.13" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" + integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/remapping@^2.3.5": + version "2.3.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" + integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0", "@jridgewell/sourcemap-codec@^1.5.5": + version "1.5.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" + integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== + +"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": + version "0.3.31" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" + integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@jsdoc/salty@^0.2.1": + version "0.2.9" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jsdoc/salty/-/salty-0.2.9.tgz#4d8c147f7ca011532681ce86352a77a0178f1dec" + integrity sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw== + dependencies: + lodash "^4.17.21" + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@polka/url@^1.0.0-next.24": + version "1.0.0-next.29" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@polka/url/-/url-1.0.0-next.29.tgz#5a40109a1ab5f84d6fd8fc928b19f367cbe7e7b1" + integrity sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww== + +"@rollup/rollup-android-arm-eabi@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz#0f44a2f8668ed87b040b6fe659358ac9239da4db" + integrity sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ== + +"@rollup/rollup-android-arm64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz#25b9a01deef6518a948431564c987bcb205274f5" + integrity sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA== + +"@rollup/rollup-darwin-arm64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz#8a102869c88f3780c7d5e6776afd3f19084ecd7f" + integrity sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA== + +"@rollup/rollup-darwin-x64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz#8e526417cd6f54daf1d0c04cf361160216581956" + integrity sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA== + +"@rollup/rollup-freebsd-arm64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz#0e7027054493f3409b1f219a3eac5efd128ef899" + integrity sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA== + +"@rollup/rollup-freebsd-x64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz#72b204a920139e9ec3d331bd9cfd9a0c248ccb10" + integrity sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz#ab1b522ebe5b7e06c99504cc38f6cd8b808ba41c" + integrity sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ== + +"@rollup/rollup-linux-arm-musleabihf@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz#f8cc30b638f1ee7e3d18eac24af47ea29d9beb00" + integrity sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ== + +"@rollup/rollup-linux-arm64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz#7af37a9e85f25db59dc8214172907b7e146c12cc" + integrity sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg== + +"@rollup/rollup-linux-arm64-musl@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz#a623eb0d3617c03b7a73716eb85c6e37b776f7e0" + integrity sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q== + +"@rollup/rollup-linux-loong64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz#76ea038b549c5c6c5f0d062942627c4066642ee2" + integrity sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA== + +"@rollup/rollup-linux-ppc64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz#d9a4c3f0a3492bc78f6fdfe8131ac61c7359ccd5" + integrity sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw== + +"@rollup/rollup-linux-riscv64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz#87ab033eebd1a9a1dd7b60509f6333ec1f82d994" + integrity sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw== + +"@rollup/rollup-linux-riscv64-musl@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz#bda3eb67e1c993c1ba12bc9c2f694e7703958d9f" + integrity sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg== + +"@rollup/rollup-linux-s390x-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz#f7bc10fbe096ab44694233dc42a2291ed5453d4b" + integrity sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ== + +"@rollup/rollup-linux-x64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz#a151cb1234cc9b2cf5e8cfc02aa91436b8f9e278" + integrity sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q== + +"@rollup/rollup-linux-x64-musl@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz#7859e196501cc3b3062d45d2776cfb4d2f3a9350" + integrity sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg== + +"@rollup/rollup-openharmony-arm64@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz#85d0df7233734df31e547c1e647d2a5300b3bf30" + integrity sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw== + +"@rollup/rollup-win32-arm64-msvc@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz#e62357d00458db17277b88adbf690bb855cac937" + integrity sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w== + +"@rollup/rollup-win32-ia32-msvc@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz#fc7cd40f44834a703c1f1c3fe8bcc27ce476cd50" + integrity sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg== + +"@rollup/rollup-win32-x64-gnu@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz#1a22acfc93c64a64a48c42672e857ee51774d0d3" + integrity sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ== + +"@rollup/rollup-win32-x64-msvc@4.52.5": + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz#1657f56326bbe0ac80eedc9f9c18fc1ddd24e107" + integrity sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg== + +"@shikijs/engine-oniguruma@^3.14.0": + version "3.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz#bc5fe6484d64b2daacdfbb248f06732fbc78c8e2" + integrity sha512-HnqFsV11skAHvOArMZdLBZZApRSYS4LSztk2K3016Y9VCyZISnlYUYsL2hzlS7tPqKHvNqmI5JSUJZprXloMvA== + dependencies: + "@shikijs/types" "3.15.0" + "@shikijs/vscode-textmate" "^10.0.2" + +"@shikijs/langs@^3.14.0": + version "3.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz#d8385a9ca66ce9923149c650336444b1d25fc248" + integrity sha512-WpRvEFvkVvO65uKYW4Rzxs+IG0gToyM8SARQMtGGsH4GDMNZrr60qdggXrFOsdfOVssG/QQGEl3FnJ3EZ+8w8A== + dependencies: + "@shikijs/types" "3.15.0" + +"@shikijs/themes@^3.14.0": + version "3.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz#6093a90191b89654045c72636ddd35c04273658f" + integrity sha512-8ow2zWb1IDvCKjYb0KiLNrK4offFdkfNVPXb1OZykpLCzRU6j+efkY+Y7VQjNlNFXonSw+4AOdGYtmqykDbRiQ== + dependencies: + "@shikijs/types" "3.15.0" + +"@shikijs/types@3.15.0", "@shikijs/types@^3.14.0": + version "3.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz#4e025b4dea98e1603243b1f00677854e07e5eda1" + integrity sha512-BnP+y/EQnhihgHy4oIAN+6FFtmfTekwOLsQbRw9hOKwqgNy8Bdsjq8B05oAt/ZgvIWWFrshV71ytOrlPfYjIJw== + dependencies: + "@shikijs/vscode-textmate" "^10.0.2" + "@types/hast" "^3.0.4" + +"@shikijs/vscode-textmate@^10.0.2": + version "10.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz#a90ab31d0cc1dfb54c66a69e515bf624fa7b2224" + integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== + +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + +"@types/estree@1.0.8", "@types/estree@^1.0.0": + version "1.0.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== + +"@types/hast@^3.0.4": + version "3.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== + dependencies: + "@types/unist" "*" + +"@types/linkify-it@^5": + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/linkify-it/-/linkify-it-5.0.0.tgz#21413001973106cda1c3a9b91eedd4ccd5469d76" + integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== + +"@types/markdown-it@^14.1.1": + version "14.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/markdown-it/-/markdown-it-14.1.2.tgz#57f2532a0800067d9b934f3521429a2e8bfb4c61" + integrity sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog== + dependencies: + "@types/linkify-it" "^5" + "@types/mdurl" "^2" + +"@types/mdurl@^2": + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd" + integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg== + +"@types/unist@*": + version "3.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== + +"@ungap/structured-clone@^1.2.0": + version "1.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" + integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== + +"@vitest/coverage-istanbul@^1.0.0": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz#f17e64819a2cbb256fb8454371b9cccd7d757821" + integrity sha512-0NWKNPrbMo1s6emwnn+UpGPxrSEd9R6VpQ3wzYz0y43esZjjDkGLb6Qkvfu6LNyQO4TAGyepaZ11imUmmIFLaw== + dependencies: + debug "^4.3.4" + istanbul-lib-coverage "^3.2.2" + istanbul-lib-instrument "^6.0.1" + istanbul-lib-report "^3.0.1" + istanbul-lib-source-maps "^5.0.4" + istanbul-reports "^3.1.6" + magicast "^0.3.3" + picocolors "^1.0.0" + test-exclude "^6.0.0" + +"@vitest/coverage-v8@^1.0.0": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz#47230491ec73aa288a92e36b75c1671b3f741d4e" + integrity sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw== + dependencies: + "@ampproject/remapping" "^2.2.1" + "@bcoe/v8-coverage" "^0.2.3" + debug "^4.3.4" + istanbul-lib-coverage "^3.2.2" + istanbul-lib-report "^3.0.1" + istanbul-lib-source-maps "^5.0.4" + istanbul-reports "^3.1.6" + magic-string "^0.30.5" + magicast "^0.3.3" + picocolors "^1.0.0" + std-env "^3.5.0" + strip-literal "^2.0.0" + test-exclude "^6.0.0" + +"@vitest/expect@1.6.1": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/expect/-/expect-1.6.1.tgz#b90c213f587514a99ac0bf84f88cff9042b0f14d" + integrity sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog== + dependencies: + "@vitest/spy" "1.6.1" + "@vitest/utils" "1.6.1" + chai "^4.3.10" + +"@vitest/runner@1.6.1": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/runner/-/runner-1.6.1.tgz#10f5857c3e376218d58c2bfacfea1161e27e117f" + integrity sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA== + dependencies: + "@vitest/utils" "1.6.1" + p-limit "^5.0.0" + pathe "^1.1.1" + +"@vitest/snapshot@1.6.1": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/snapshot/-/snapshot-1.6.1.tgz#90414451a634bb36cd539ccb29ae0d048a8c0479" + integrity sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ== + dependencies: + magic-string "^0.30.5" + pathe "^1.1.1" + pretty-format "^29.7.0" + +"@vitest/spy@1.6.1": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/spy/-/spy-1.6.1.tgz#33376be38a5ed1ecd829eb986edaecc3e798c95d" + integrity sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw== + dependencies: + tinyspy "^2.2.0" + +"@vitest/ui@^1.0.0": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/ui/-/ui-1.6.1.tgz#e94c42af392ddb47531b2401d8871bc246f1947e" + integrity sha512-xa57bCPGuzEFqGjPs3vVLyqareG8DX0uMkr5U/v5vLv5/ZUrBrPL7gzxzTJedEyZxFMfsozwTIbbYfEQVo3kgg== + dependencies: + "@vitest/utils" "1.6.1" + fast-glob "^3.3.2" + fflate "^0.8.1" + flatted "^3.2.9" + pathe "^1.1.1" + picocolors "^1.0.0" + sirv "^2.0.4" + +"@vitest/utils@1.6.1": + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/utils/-/utils-1.6.1.tgz#6d2f36cb6d866f2bbf59da854a324d6bf8040f17" + integrity sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g== + dependencies: + diff-sequences "^29.6.3" + estree-walker "^3.0.3" + loupe "^2.3.7" + pretty-format "^29.7.0" + +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.3.2: + version "8.3.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== + dependencies: + acorn "^8.11.0" + +acorn@^8.11.0, acorn@^8.15.0, acorn@^8.9.0: + version "8.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== + +ajv@^6.12.4: + version "6.12.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + +argparse@^2.0.1: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^6.2.2: + version "6.2.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/array-back/-/array-back-6.2.2.tgz#f567d99e9af88a6d3d2f9dfcc21db6f9ba9fd157" + integrity sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw== + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +axios@^1.6.2: + version "1.13.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687" + integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.4" + proxy-from-env "^1.1.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +baseline-browser-mapping@^2.8.19: + version "2.8.25" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/baseline-browser-mapping/-/baseline-browser-mapping-2.8.25.tgz#947dc6f81778e0fa0424a2ab9ea09a3033e71109" + integrity sha512-2NovHVesVF5TXefsGX1yzx1xgr7+m9JQenvz6FQY3qd+YXkKkYiv+vTCc7OriP9mcDZpTC5mAOYN4ocd29+erA== + +bluebird@^3.7.2: + version "3.7.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +brace-expansion@^1.1.7: + version "1.1.12" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" + integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.3: + version "3.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== + dependencies: + fill-range "^7.1.1" + +browserslist@^4.24.0: + version "4.27.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/browserslist/-/browserslist-4.27.0.tgz#755654744feae978fbb123718b2f139bc0fa6697" + integrity sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw== + dependencies: + baseline-browser-mapping "^2.8.19" + caniuse-lite "^1.0.30001751" + electron-to-chromium "^1.5.238" + node-releases "^2.0.26" + update-browserslist-db "^1.1.4" + +cac@^6.7.14: + version "6.7.14" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== + +cache-point@^3.0.0, cache-point@^3.0.1: + version "3.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cache-point/-/cache-point-3.0.1.tgz#4a1997794695be780e1d080235aa7a289161f181" + integrity sha512-itTIMLEKbh6Dw5DruXbxAgcyLnh/oPGVLBfTPqBOftASxHe8bAeXy7JkO4F0LvHqht7XqP5O/09h5UcHS2w0FA== + dependencies: + array-back "^6.2.2" + +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +caniuse-lite@^1.0.30001751: + version "1.0.30001754" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz#7758299d9a72cce4e6b038788a15b12b44002759" + integrity sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg== + +catharsis@^0.9.0: + version "0.9.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" + integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== + dependencies: + lodash "^4.17.15" + +chai@^4.3.10: + version "4.5.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.3" + deep-eql "^4.1.3" + get-func-name "^2.0.2" + loupe "^2.3.6" + pathval "^1.1.1" + type-detect "^4.1.0" + +chalk-template@^0.4.0: + version "0.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chalk-template/-/chalk-template-0.4.0.tgz#692c034d0ed62436b9062c1707fadcd0f753204b" + integrity sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg== + dependencies: + chalk "^4.1.2" + +chalk@^4.0.0, chalk@^4.1.2: + version "4.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.3: + version "1.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== + dependencies: + get-func-name "^2.0.2" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-line-args@^6.0.1: + version "6.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/command-line-args/-/command-line-args-6.0.1.tgz#cbd1efb4f72b285dbd54bde9a8585c2d9694b070" + integrity sha512-Jr3eByUjqyK0qd8W0SGFW1nZwqCaNCtbXjRo2cRJC1OYxWl3MZ5t1US3jq+cO4sPavqgw4l9BMGX0CBe+trepg== + dependencies: + array-back "^6.2.2" + find-replace "^5.0.2" + lodash.camelcase "^4.3.0" + typical "^7.2.0" + +command-line-usage@^7.0.3: + version "7.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/command-line-usage/-/command-line-usage-7.0.3.tgz#6bce992354f6af10ecea2b631bfdf0c8b3bfaea3" + integrity sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q== + dependencies: + array-back "^6.2.2" + chalk-template "^0.4.0" + table-layout "^4.1.0" + typical "^7.1.1" + +common-sequence@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/common-sequence/-/common-sequence-3.0.0.tgz#d631cf0306fb2dea97e1d6669a1627950803fca1" + integrity sha512-g/CgSYk93y+a1IKm50tKl7kaT/OjjTYVQlEbUlt/49ZLV1mcKpUU7iyDiqTAeLdb4QDtQfq3ako8y8v//fzrWQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +confbox@^0.1.8: + version "0.1.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== + +config-master@^3.1.0: + version "3.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/config-master/-/config-master-3.1.0.tgz#667663590505a283bf26a484d68489d74c5485da" + integrity sha512-n7LBL1zBzYdTpF1mx5DNcZnZn05CWIdsdvtPL4MosvqbBUK3Rq6VWEtGUuF3Y0s9/CIhMejezqlSkP6TnCJ/9g== + dependencies: + walk-back "^2.0.1" + +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== + +cross-spawn@^7.0.2, cross-spawn@^7.0.3: + version "7.0.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +current-module-paths@^1.1.2: + version "1.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/current-module-paths/-/current-module-paths-1.1.2.tgz#13a2d821b2f864c3adead261b7954b068510c32f" + integrity sha512-H4s4arcLx/ugbu1XkkgSvcUZax0L6tXUqnppGniQb8l5VjUKGHoayXE5RiriiPhYDd+kjZnaok1Uig13PKtKYQ== + +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.4.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" + integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + dependencies: + ms "^2.1.3" + +debug@~4.3.1, debug@~4.3.2: + version "4.3.7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +deep-eql@^4.1.3: + version "4.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== + dependencies: + type-detect "^4.0.0" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + +dmd@^7.1.1: + version "7.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dmd/-/dmd-7.1.1.tgz#acf791a47aec88c0a80873695bb2c1cc67a04ffe" + integrity sha512-Ap2HP6iuOek7eShReDLr9jluNJm9RMZESlt29H/Xs1qrVMkcS9X6m5h1mBC56WMxNiSo0wvjGICmZlYUSFjwZQ== + dependencies: + array-back "^6.2.2" + cache-point "^3.0.0" + common-sequence "^3.0.0" + file-set "^5.2.2" + handlebars "^4.7.8" + marked "^4.3.0" + walk-back "^5.1.1" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dotenv@^16.3.1: + version "16.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020" + integrity sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow== + +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +electron-to-chromium@^1.5.238: + version "1.5.245" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/electron-to-chromium/-/electron-to-chromium-1.5.245.tgz#81aea81adf1e06b6f703b4b35ac6d543421d0fd9" + integrity sha512-rdmGfW47ZhL/oWEJAY4qxRtdly2B98ooTJ0pdEI4jhVLZ6tNf8fPtov2wS1IRKwFJT92le3x4Knxiwzl7cPPpQ== + +engine.io-client@~6.6.1: + version "6.6.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/engine.io-client/-/engine.io-client-6.6.3.tgz#815393fa24f30b8e6afa8f77ccca2f28146be6de" + integrity sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.17.1" + xmlhttprequest-ssl "~2.1.1" + +engine.io-parser@~5.2.1: + version "5.2.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== + +entities@^4.4.0: + version "4.5.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== + +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +esbuild@^0.21.3: + version "0.21.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" + integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== + optionalDependencies: + "@esbuild/aix-ppc64" "0.21.5" + "@esbuild/android-arm" "0.21.5" + "@esbuild/android-arm64" "0.21.5" + "@esbuild/android-x64" "0.21.5" + "@esbuild/darwin-arm64" "0.21.5" + "@esbuild/darwin-x64" "0.21.5" + "@esbuild/freebsd-arm64" "0.21.5" + "@esbuild/freebsd-x64" "0.21.5" + "@esbuild/linux-arm" "0.21.5" + "@esbuild/linux-arm64" "0.21.5" + "@esbuild/linux-ia32" "0.21.5" + "@esbuild/linux-loong64" "0.21.5" + "@esbuild/linux-mips64el" "0.21.5" + "@esbuild/linux-ppc64" "0.21.5" + "@esbuild/linux-riscv64" "0.21.5" + "@esbuild/linux-s390x" "0.21.5" + "@esbuild/linux-x64" "0.21.5" + "@esbuild/netbsd-x64" "0.21.5" + "@esbuild/openbsd-x64" "0.21.5" + "@esbuild/sunos-x64" "0.21.5" + "@esbuild/win32-arm64" "0.21.5" + "@esbuild/win32-ia32" "0.21.5" + "@esbuild/win32-x64" "0.21.5" + +escalade@^3.2.0: + version "3.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.54.0: + version "8.57.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esquery@^1.4.2: + version "1.6.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + +esutils@^2.0.2: + version "2.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +execa@^8.0.1: + version "8.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^8.0.1" + human-signals "^5.0.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^4.1.0" + strip-final-newline "^3.0.0" + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.3.2: + version "3.3.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.8" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fastq@^1.6.0: + version "1.19.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" + integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== + dependencies: + reusify "^1.0.4" + +fflate@^0.8.1: + version "0.8.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" + integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +file-set@^5.2.2, file-set@^5.3.0: + version "5.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/file-set/-/file-set-5.3.0.tgz#f8ab3a930bd0912cc6fe372581c3aac71682ebfb" + integrity sha512-FKCxdjLX0J6zqTWdT0RXIxNF/n7MyXXnsSUp0syLEOCKdexvPZ02lNNv2a+gpK9E3hzUYF3+eFZe32ci7goNUg== + dependencies: + array-back "^6.2.2" + fast-glob "^3.3.2" + +fill-range@^7.1.1: + version "7.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== + dependencies: + to-regex-range "^5.0.1" + +find-replace@^5.0.1, find-replace@^5.0.2: + version "5.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/find-replace/-/find-replace-5.0.2.tgz#fe27ff0be05975aef6fc679c1139bbabea564e26" + integrity sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q== + +find-up@^5.0.0: + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + +flatted@^3.2.9: + version "3.3.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" + integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== + +follow-redirects@^1.15.6: + version "1.15.11" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" + integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== + +form-data@^4.0.4: + version "4.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" + integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + hasown "^2.0.2" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2, fsevents@~2.3.3: + version "2.3.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-func-name@^2.0.1, get-func-name@^2.0.2: + version "2.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== + +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-proto@^1.0.1: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + +get-stream@^8.0.1: + version "8.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^13.19.0: + version "13.24.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== + dependencies: + type-fest "^0.20.2" + +gopd@^1.2.0: + version "1.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +graceful-fs@^4.1.9: + version "4.2.11" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + +handlebars@^4.7.8: + version "4.7.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" + integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.2" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hasown@^2.0.2: + version "2.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +human-signals@^5.0.0: + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== + +ignore@^5.2.0: + version "5.3.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + +import-fresh@^3.2.1: + version "3.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + +is-stream@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0, istanbul-lib-coverage@^3.2.2: + version "3.2.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== + +istanbul-lib-instrument@^6.0.1: + version "6.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== + dependencies: + "@babel/core" "^7.23.9" + "@babel/parser" "^7.23.9" + "@istanbuljs/schema" "^0.1.3" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + +istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: + version "3.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^4.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^5.0.4: + version "5.0.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz#acaef948df7747c8eb5fbf1265cb980f6353a441" + integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== + dependencies: + "@jridgewell/trace-mapping" "^0.3.23" + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + +istanbul-reports@^3.1.6: + version "3.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" + integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^9.0.1: + version "9.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" + integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js2xmlparser@^4.0.2: + version "4.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" + integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== + dependencies: + xmlcreate "^2.0.4" + +jsdoc-api@^9.3.5: + version "9.3.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-api/-/jsdoc-api-9.3.5.tgz#1f5683b8db9cdc5d8afb606ec0041f3c1b7bbd0f" + integrity sha512-TQwh1jA8xtCkIbVwm/XA3vDRAa5JjydyKx1cC413Sh3WohDFxcMdwKSvn4LOsq2xWyAmOU/VnSChTQf6EF0R8g== + dependencies: + array-back "^6.2.2" + cache-point "^3.0.1" + current-module-paths "^1.1.2" + file-set "^5.3.0" + jsdoc "^4.0.4" + object-to-spawn-args "^2.0.1" + walk-back "^5.1.1" + +jsdoc-parse@^6.2.5: + version "6.2.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-parse/-/jsdoc-parse-6.2.5.tgz#d719dc7416886392449f31189802ce2e92f5a49e" + integrity sha512-8JaSNjPLr2IuEY4Das1KM6Z4oLHZYUnjRrr27hKSa78Cj0i5Lur3DzNnCkz+DfrKBDoljGMoWOiBVQbtUZJBPw== + dependencies: + array-back "^6.2.2" + find-replace "^5.0.1" + sort-array "^5.0.0" + +jsdoc-to-markdown@^9.1.3: + version "9.1.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-to-markdown/-/jsdoc-to-markdown-9.1.3.tgz#99e5eb08b7990f043d0398aaeea8382b8651bb86" + integrity sha512-i9wi+6WHX0WKziv0ar88T8h7OmxA0LWdQaV23nY6uQyKvdUPzVt0o6YAaOceFuKRF5Rvlju5w/KnZBfdpDAlnw== + dependencies: + array-back "^6.2.2" + command-line-args "^6.0.1" + command-line-usage "^7.0.3" + config-master "^3.1.0" + dmd "^7.1.1" + jsdoc-api "^9.3.5" + jsdoc-parse "^6.2.5" + walk-back "^5.1.1" + +jsdoc@^4.0.4: + version "4.0.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc/-/jsdoc-4.0.5.tgz#fbed70e04a3abcf2143dad6b184947682bbc7315" + integrity sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g== + dependencies: + "@babel/parser" "^7.20.15" + "@jsdoc/salty" "^0.2.1" + "@types/markdown-it" "^14.1.1" + bluebird "^3.7.2" + catharsis "^0.9.0" + escape-string-regexp "^2.0.0" + js2xmlparser "^4.0.2" + klaw "^3.0.0" + markdown-it "^14.1.0" + markdown-it-anchor "^8.6.7" + marked "^4.0.10" + mkdirp "^1.0.4" + requizzle "^0.2.3" + strip-json-comments "^3.1.0" + underscore "~1.13.2" + +jsesc@^3.0.2: + version "3.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + +json-buffer@3.0.1: + version "3.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json-stringify-safe@^5.0.1: + version "5.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== + +json5@^2.2.3: + version "2.2.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + +keyv@^4.5.3: + version "4.5.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + +klaw@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" + integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== + dependencies: + graceful-fs "^4.1.9" + +levn@^0.4.1: + version "0.4.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +linkify-it@^5.0.0: + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== + dependencies: + uc.micro "^2.0.0" + +local-pkg@^0.5.0: + version "0.5.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" + integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== + dependencies: + mlly "^1.7.3" + pkg-types "^1.2.1" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +loupe@^2.3.6, loupe@^2.3.7: + version "2.3.7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== + dependencies: + get-func-name "^2.0.1" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lunr@^2.3.9: + version "2.3.9" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +magic-string@^0.30.5: + version "0.30.21" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/magic-string/-/magic-string-0.30.21.tgz#56763ec09a0fa8091df27879fd94d19078c00d91" + integrity sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.5" + +magicast@^0.3.3: + version "0.3.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/magicast/-/magicast-0.3.5.tgz#8301c3c7d66704a0771eb1bad74274f0ec036739" + integrity sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ== + dependencies: + "@babel/parser" "^7.25.4" + "@babel/types" "^7.25.4" + source-map-js "^1.2.0" + +make-dir@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== + dependencies: + semver "^7.5.3" + +markdown-it-anchor@^8.6.7: + version "8.6.7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" + integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== + +markdown-it@^14.1.0: + version "14.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== + dependencies: + argparse "^2.0.1" + entities "^4.4.0" + linkify-it "^5.0.0" + mdurl "^2.0.0" + punycode.js "^2.3.1" + uc.micro "^2.1.0" + +marked@^4.0.10, marked@^4.3.0: + version "4.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + +mdurl@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== + +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + +merge2@^1.3.0: + version "1.4.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +micromatch@^4.0.8: + version "4.0.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== + dependencies: + braces "^3.0.3" + picomatch "^2.3.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^9.0.5: + version "9.0.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.5: + version "1.2.8" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mlly@^1.7.3, mlly@^1.7.4: + version "1.8.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mlly/-/mlly-1.8.0.tgz#e074612b938af8eba1eaf43299cbc89cb72d824e" + integrity sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g== + dependencies: + acorn "^8.15.0" + pathe "^2.0.3" + pkg-types "^1.3.1" + ufo "^1.6.1" + +mrmime@^2.0.0: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mrmime/-/mrmime-2.0.1.tgz#bc3e87f7987853a54c9850eeb1f1078cd44adddc" + integrity sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ== + +ms@^2.1.3: + version "2.1.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +nanoid@^3.3.11: + version "3.3.11" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" + integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +neo-async@^2.6.2: + version "2.6.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +nock@^13.4.0: + version "13.5.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/nock/-/nock-13.5.6.tgz#5e693ec2300bbf603b61dae6df0225673e6c4997" + integrity sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ== + dependencies: + debug "^4.1.0" + json-stringify-safe "^5.0.1" + propagate "^2.0.0" + +node-releases@^2.0.26: + version "2.0.27" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== + +npm-run-path@^5.1.0: + version "5.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== + dependencies: + path-key "^4.0.0" + +object-to-spawn-args@^2.0.1: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/object-to-spawn-args/-/object-to-spawn-args-2.0.1.tgz#cf8b8e3c9b3589137a469cac90391f44870144a5" + integrity sha512-6FuKFQ39cOID+BMZ3QaphcC8Y4cw6LXBLyIgPU+OhIYwviJamPAn+4mITapnSBQrejB+NNp+FMskhD8Cq+Ys3w== + +once@^1.3.0: + version "1.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^6.0.0: + version "6.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + +optionator@^0.9.3: + version "0.9.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-limit@^5.0.0: + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" + integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== + dependencies: + yocto-queue "^1.0.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-key@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + +pathe@^1.1.1: + version "1.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== + +pathe@^2.0.1, pathe@^2.0.3: + version "2.0.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" + integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +picocolors@^1.0.0, picocolors@^1.1.1: + version "1.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== + +picomatch@^2.3.1: + version "2.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pkg-types@^1.2.1, pkg-types@^1.3.1: + version "1.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pkg-types/-/pkg-types-1.3.1.tgz#bd7cc70881192777eef5326c19deb46e890917df" + integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== + dependencies: + confbox "^0.1.8" + mlly "^1.7.4" + pathe "^2.0.1" + +postcss@^8.4.43: + version "8.5.6" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c" + integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== + dependencies: + nanoid "^3.3.11" + picocolors "^1.1.1" + source-map-js "^1.2.1" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" + +propagate@^2.0.0: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + +punycode.js@^2.3.1: + version "2.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== + +punycode@^2.1.0: + version "2.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +react-is@^18.0.0: + version "18.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== + +requizzle@^0.2.3: + version "0.2.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/requizzle/-/requizzle-0.2.4.tgz#319eb658b28c370f0c20f968fa8ceab98c13d27c" + integrity sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw== + dependencies: + lodash "^4.17.21" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +reusify@^1.0.4: + version "1.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" + integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rollup@^4.20.0: + version "4.52.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/rollup/-/rollup-4.52.5.tgz#96982cdcaedcdd51b12359981f240f94304ec235" + integrity sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw== + dependencies: + "@types/estree" "1.0.8" + optionalDependencies: + "@rollup/rollup-android-arm-eabi" "4.52.5" + "@rollup/rollup-android-arm64" "4.52.5" + "@rollup/rollup-darwin-arm64" "4.52.5" + "@rollup/rollup-darwin-x64" "4.52.5" + "@rollup/rollup-freebsd-arm64" "4.52.5" + "@rollup/rollup-freebsd-x64" "4.52.5" + "@rollup/rollup-linux-arm-gnueabihf" "4.52.5" + "@rollup/rollup-linux-arm-musleabihf" "4.52.5" + "@rollup/rollup-linux-arm64-gnu" "4.52.5" + "@rollup/rollup-linux-arm64-musl" "4.52.5" + "@rollup/rollup-linux-loong64-gnu" "4.52.5" + "@rollup/rollup-linux-ppc64-gnu" "4.52.5" + "@rollup/rollup-linux-riscv64-gnu" "4.52.5" + "@rollup/rollup-linux-riscv64-musl" "4.52.5" + "@rollup/rollup-linux-s390x-gnu" "4.52.5" + "@rollup/rollup-linux-x64-gnu" "4.52.5" + "@rollup/rollup-linux-x64-musl" "4.52.5" + "@rollup/rollup-openharmony-arm64" "4.52.5" + "@rollup/rollup-win32-arm64-msvc" "4.52.5" + "@rollup/rollup-win32-ia32-msvc" "4.52.5" + "@rollup/rollup-win32-x64-gnu" "4.52.5" + "@rollup/rollup-win32-x64-msvc" "4.52.5" + fsevents "~2.3.2" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +semver@^6.3.1: + version "6.3.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== + +semver@^7.5.3, semver@^7.5.4: + version "7.7.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +siginfo@^2.0.0: + version "2.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +sirv@^2.0.4: + version "2.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== + dependencies: + "@polka/url" "^1.0.0-next.24" + mrmime "^2.0.0" + totalist "^3.0.0" + +socket.io-client@^4.7.5: + version "4.8.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/socket.io-client/-/socket.io-client-4.8.1.tgz#1941eca135a5490b94281d0323fe2a35f6f291cb" + integrity sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.6.1" + socket.io-parser "~4.2.4" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + +sort-array@^5.0.0: + version "5.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/sort-array/-/sort-array-5.1.1.tgz#92f5ee092fb2cca1dc3b46eee102a0d3a3dfc944" + integrity sha512-EltS7AIsNlAFIM9cayrgKrM6XP94ATWwXP4LCL4IQbvbYhELSt2hZTrixg+AaQwnWFs/JGJgqU3rxMcNNWxGAA== + dependencies: + array-back "^6.2.2" + typical "^7.1.1" + +source-map-js@^1.2.0, source-map-js@^1.2.1: + version "1.2.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== + +source-map@^0.6.1: + version "0.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +stackback@0.0.2: + version "0.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + +std-env@^3.5.0: + version "3.10.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/std-env/-/std-env-3.10.0.tgz#d810b27e3a073047b2b5e40034881f5ea6f9c83b" + integrity sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg== + +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-literal@^2.0.0: + version "2.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-literal/-/strip-literal-2.1.1.tgz#26906e65f606d49f748454a08084e94190c2e5ad" + integrity sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q== + dependencies: + js-tokens "^9.0.1" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table-layout@^4.1.0: + version "4.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/table-layout/-/table-layout-4.1.1.tgz#0f72965de1a5c0c1419c9ba21cae4e73a2f73a42" + integrity sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA== + dependencies: + array-back "^6.2.2" + wordwrapjs "^5.1.0" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +tinybench@^2.5.1: + version "2.9.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== + +tinypool@^0.8.3: + version "0.8.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinypool/-/tinypool-0.8.4.tgz#e217fe1270d941b39e98c625dcecebb1408c9aa8" + integrity sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ== + +tinyspy@^2.2.0: + version "2.2.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" + integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +totalist@^3.0.0: + version "3.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-detect@^4.0.0, type-detect@^4.1.0: + version "4.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +typedoc-plugin-markdown@^4.9.0: + version "4.9.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz#88f37ba2417fc8b93951d457a3a557682ce5e01e" + integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== + +typedoc-plugin-missing-exports@^4.1.2: + version "4.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-4.1.2.tgz#a125a679782082caad123e8b086b4ac9b28d08da" + integrity sha512-WNoeWX9+8X3E3riuYPduilUTFefl1K+Z+5bmYqNeH5qcWjtnTRMbRzGdEQ4XXn1WEO4WCIlU0vf46Ca2y/mspg== + +typedoc@^0.28.14: + version "0.28.14" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz#f48d650efc983b5cb3034b3b0e986b1702074326" + integrity sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA== + dependencies: + "@gerrit0/mini-shiki" "^3.12.0" + lunr "^2.3.9" + markdown-it "^14.1.0" + minimatch "^9.0.5" + yaml "^2.8.1" + +typescript@^5.3.2: + version "5.9.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== + +typical@^7.1.1, typical@^7.2.0: + version "7.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typical/-/typical-7.3.0.tgz#930376be344228709f134613911fa22aa09617a4" + integrity sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw== + +uc.micro@^2.0.0, uc.micro@^2.1.0: + version "2.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== + +ufo@^1.6.1: + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ufo/-/ufo-1.6.1.tgz#ac2db1d54614d1b22c1d603e3aef44a85d8f146b" + integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== + +uglify-js@^3.1.4: + version "3.19.3" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" + integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== + +underscore@~1.13.2: + version "1.13.7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" + integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== + +update-browserslist-db@^1.1.4: + version "1.1.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" + integrity sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.1" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +uuid@^13.0.0: + version "13.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8" + integrity sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w== + +vite-node@1.6.1: + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vite-node/-/vite-node-1.6.1.tgz#fff3ef309296ea03ceaa6ca4bb660922f5416c57" + integrity sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA== + dependencies: + cac "^6.7.14" + debug "^4.3.4" + pathe "^1.1.1" + picocolors "^1.0.0" + vite "^5.0.0" + +vite@^5.0.0: + version "5.4.21" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vite/-/vite-5.4.21.tgz#84a4f7c5d860b071676d39ba513c0d598fdc7027" + integrity sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw== + dependencies: + esbuild "^0.21.3" + postcss "^8.4.43" + rollup "^4.20.0" + optionalDependencies: + fsevents "~2.3.3" + +vitest@^1.0.0: + version "1.6.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vitest/-/vitest-1.6.1.tgz#b4a3097adf8f79ac18bc2e2e0024c534a7a78d2f" + integrity sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag== + dependencies: + "@vitest/expect" "1.6.1" + "@vitest/runner" "1.6.1" + "@vitest/snapshot" "1.6.1" + "@vitest/spy" "1.6.1" + "@vitest/utils" "1.6.1" + acorn-walk "^8.3.2" + chai "^4.3.10" + debug "^4.3.4" + execa "^8.0.1" + local-pkg "^0.5.0" + magic-string "^0.30.5" + pathe "^1.1.1" + picocolors "^1.0.0" + std-env "^3.5.0" + strip-literal "^2.0.0" + tinybench "^2.5.1" + tinypool "^0.8.3" + vite "^5.0.0" + vite-node "1.6.1" + why-is-node-running "^2.2.2" + +walk-back@^2.0.1: + version "2.0.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/walk-back/-/walk-back-2.0.1.tgz#554e2a9d874fac47a8cb006bf44c2f0c4998a0a4" + integrity sha512-Nb6GvBR8UWX1D+Le+xUq0+Q1kFmRBIWVrfLnQAOmcpEzA9oAxwJ9gIr36t9TWYfzvWRvuMtjHiVsJYEkXWaTAQ== + +walk-back@^5.1.1: + version "5.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/walk-back/-/walk-back-5.1.1.tgz#80045191b3b3a05a8e3cc6fca066a2e495230d93" + integrity sha512-e/FRLDVdZQWFrAzU6Hdvpm7D7m2ina833gIKLptQykRK49mmCYHLHq7UqjPDbxbKLZkTkW1rFqbengdE3sLfdw== + +which@^2.0.1: + version "2.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +why-is-node-running@^2.2.2: + version "2.3.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" + integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +wordwrapjs@^5.1.0: + version "5.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wordwrapjs/-/wordwrapjs-5.1.1.tgz#bfd1eb426f0f7eec73b7df32cf7df1f618bfb3a9" + integrity sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg== + +wrappy@1: + version "1.0.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@~8.17.1: + version "8.17.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + +xmlcreate@^2.0.4: + version "2.0.4" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" + integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== + +xmlhttprequest-ssl@~2.1.1: + version "2.1.2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz#e9e8023b3f29ef34b97a859f584c5e6c61418e23" + integrity sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yaml@^2.8.1: + version "2.8.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" + integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +yocto-queue@^1.0.0: + version "1.2.1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yocto-queue/-/yocto-queue-1.2.1.tgz#36d7c4739f775b3cbc28e6136e21aa057adec418" + integrity sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg== From 62ac67d15b4cda488aaf442e337ac03fdebd2d7e Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 16 Nov 2025 17:50:47 +0200 Subject: [PATCH 02/31] clean up client docs --- docs/README.md | 59 + docs/api-reference/README.mdx | 18 - docs/api-reference/client/README.mdx | 21 - .../client/functions/createClient.mdx | 202 -- .../functions/createClientFromRequest.mdx | 1395 -------------- .../client/type-aliases/Base44Client.mdx | 15 - .../type-aliases/CreateClientOptions.mdx | 37 - docs/api-reference/index/README.mdx | 77 - .../index/classes/Base44Error.mdx | 132 -- .../index/interfaces/AppConversationLike.mdx | 51 - .../interfaces/AppConversationMessage.mdx | 95 - .../index/interfaces/AppLike.mdx | 501 ----- .../index/interfaces/AppMessageContent.mdx | 59 - .../index/interfaces/AuthConfigLike.mdx | 69 - .../index/interfaces/DenoProjectLike.mdx | 52 - .../index/interfaces/UserEntityLike.mdx | 119 -- .../index/interfaces/UserLike.mdx | 19 - .../index/type-aliases/AgentConversation.mdx | 73 - .../index/type-aliases/AgentMessage.mdx | 184 -- .../index/type-aliases/LoginInfoResponse.mdx | 22 - .../index/type-aliases/ModelFilterParams.mdx | 89 - .../modules/agents/-internal-/README.mdx | 24 - .../-internal-/functions/RoomsSocket.mdx | 103 - .../-internal-/type-aliases/RoomsSocket.mdx | 13 - .../type-aliases/RoomsSocketConfig.mdx | 63 - .../type-aliases/RoomsSocketEventsMap.mdx | 109 -- .../agents/-internal-/type-aliases/TEvent.mdx | 13 - .../-internal-/type-aliases/THandler.mdx | 19 - .../-internal-/type-aliases/TJsonStr.mdx | 13 - docs/api-reference/modules/agents/README.mdx | 25 - .../agents/functions/createAgentsModule.mdx | 245 --- .../type-aliases/AgentsModuleConfig.mdx | 75 - docs/api-reference/modules/auth/README.mdx | 13 - .../auth/functions/createAuthModule.mdx | 542 ------ .../api-reference/modules/entities/README.mdx | 13 - .../functions/createEntitiesModule.mdx | 28 - .../modules/functions/README.mdx | 13 - .../functions/createFunctionsModule.mdx | 80 - .../modules/integrations/README.mdx | 13 - .../functions/createIntegrationsModule.mdx | 28 - .../api-reference/utils/auth-utils/README.mdx | 16 - .../auth-utils/functions/getAccessToken.mdx | 31 - .../auth-utils/functions/getLoginUrl.mdx | 31 - .../functions/removeAccessToken.mdx | 28 - .../auth-utils/functions/saveAccessToken.mdx | 29 - docs/classes/Base44Error.md | 191 ++ docs/functions/createClient.md | 74 + docs/functions/createClientFromRequest.md | 55 + docs/functions/getAccessToken.md | 17 + docs/functions/getLoginUrl.md | 21 + docs/functions/removeAccessToken.md | 17 + docs/functions/saveAccessToken.md | 21 + docs/interfaces/AgentsModule.md | 297 +++ docs/interfaces/AppConversationLike.md | 29 + docs/interfaces/AppConversationMessage.md | 65 + docs/interfaces/AppLike.md | 301 +++ docs/interfaces/AppLogsModule.md | 171 ++ docs/interfaces/AppMessageContent.md | 37 + docs/interfaces/AuthConfigLike.md | 41 + docs/interfaces/AuthModule.md | 564 ++++++ docs/interfaces/Base44Client.md | 162 ++ .../ConnectorAccessTokenResponse.md | 13 + docs/interfaces/ConnectorsModule.md | 73 + docs/interfaces/DenoProjectLike.md | 29 + docs/interfaces/EntityHandler.md | 429 +++++ docs/interfaces/FunctionsModule.md | 99 + docs/interfaces/GetAccessTokenOptions.md | 79 + docs/interfaces/GetLoginUrlOptions.md | 54 + docs/interfaces/LoginResponse.md | 23 + docs/interfaces/RegisterPayload.md | 39 + docs/interfaces/RemoveAccessTokenOptions.md | 31 + docs/interfaces/SaveAccessTokenOptions.md | 31 + docs/interfaces/SsoAccessTokenResponse.md | 13 + docs/interfaces/SsoModule.md | 52 + docs/interfaces/UserEntityLike.md | 47 + docs/interfaces/UserLike.md | 11 + docs/type-aliases/AgentConversation.md | 57 + docs/type-aliases/AgentMessage.md | 143 ++ docs/type-aliases/ConnectorIntegrationType.md | 9 + docs/type-aliases/CreateClientConfig.md | 36 + docs/type-aliases/CreateClientOptions.md | 27 + docs/type-aliases/EntitiesModule.md | 75 + .../IntegrationEndpointFunction.md | 23 + docs/type-aliases/IntegrationPackage.md | 27 + docs/type-aliases/IntegrationsModule.md | 100 + docs/type-aliases/LoginInfoResponse.md | 7 + docs/type-aliases/ModelFilterParams.md | 109 ++ package-lock.json | 251 ++- package.json | 3 + src/client.ts | 193 +- src/client.types.ts | 135 ++ src/index.ts | 46 +- src/modules/agents.types.ts | 7 +- src/modules/auth.ts | 2 +- src/modules/auth.types.ts | 2 +- src/modules/connectors.types.ts | 2 +- src/modules/integrations.types.ts | 4 +- src/modules/sso.types.ts | 2 +- typedoc.json | 31 + yarn.lock | 1655 ++++++----------- 100 files changed, 4855 insertions(+), 6033 deletions(-) create mode 100644 docs/README.md delete mode 100644 docs/api-reference/README.mdx delete mode 100644 docs/api-reference/client/README.mdx delete mode 100644 docs/api-reference/client/functions/createClient.mdx delete mode 100644 docs/api-reference/client/functions/createClientFromRequest.mdx delete mode 100644 docs/api-reference/client/type-aliases/Base44Client.mdx delete mode 100644 docs/api-reference/client/type-aliases/CreateClientOptions.mdx delete mode 100644 docs/api-reference/index/README.mdx delete mode 100644 docs/api-reference/index/classes/Base44Error.mdx delete mode 100644 docs/api-reference/index/interfaces/AppConversationLike.mdx delete mode 100644 docs/api-reference/index/interfaces/AppConversationMessage.mdx delete mode 100644 docs/api-reference/index/interfaces/AppLike.mdx delete mode 100644 docs/api-reference/index/interfaces/AppMessageContent.mdx delete mode 100644 docs/api-reference/index/interfaces/AuthConfigLike.mdx delete mode 100644 docs/api-reference/index/interfaces/DenoProjectLike.mdx delete mode 100644 docs/api-reference/index/interfaces/UserEntityLike.mdx delete mode 100644 docs/api-reference/index/interfaces/UserLike.mdx delete mode 100644 docs/api-reference/index/type-aliases/AgentConversation.mdx delete mode 100644 docs/api-reference/index/type-aliases/AgentMessage.mdx delete mode 100644 docs/api-reference/index/type-aliases/LoginInfoResponse.mdx delete mode 100644 docs/api-reference/index/type-aliases/ModelFilterParams.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/README.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx delete mode 100644 docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx delete mode 100644 docs/api-reference/modules/agents/README.mdx delete mode 100644 docs/api-reference/modules/agents/functions/createAgentsModule.mdx delete mode 100644 docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx delete mode 100644 docs/api-reference/modules/auth/README.mdx delete mode 100644 docs/api-reference/modules/auth/functions/createAuthModule.mdx delete mode 100644 docs/api-reference/modules/entities/README.mdx delete mode 100644 docs/api-reference/modules/entities/functions/createEntitiesModule.mdx delete mode 100644 docs/api-reference/modules/functions/README.mdx delete mode 100644 docs/api-reference/modules/functions/functions/createFunctionsModule.mdx delete mode 100644 docs/api-reference/modules/integrations/README.mdx delete mode 100644 docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx delete mode 100644 docs/api-reference/utils/auth-utils/README.mdx delete mode 100644 docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx delete mode 100644 docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx delete mode 100644 docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx delete mode 100644 docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx create mode 100644 docs/classes/Base44Error.md create mode 100644 docs/functions/createClient.md create mode 100644 docs/functions/createClientFromRequest.md create mode 100644 docs/functions/getAccessToken.md create mode 100644 docs/functions/getLoginUrl.md create mode 100644 docs/functions/removeAccessToken.md create mode 100644 docs/functions/saveAccessToken.md create mode 100644 docs/interfaces/AgentsModule.md create mode 100644 docs/interfaces/AppConversationLike.md create mode 100644 docs/interfaces/AppConversationMessage.md create mode 100644 docs/interfaces/AppLike.md create mode 100644 docs/interfaces/AppLogsModule.md create mode 100644 docs/interfaces/AppMessageContent.md create mode 100644 docs/interfaces/AuthConfigLike.md create mode 100644 docs/interfaces/AuthModule.md create mode 100644 docs/interfaces/Base44Client.md create mode 100644 docs/interfaces/ConnectorAccessTokenResponse.md create mode 100644 docs/interfaces/ConnectorsModule.md create mode 100644 docs/interfaces/DenoProjectLike.md create mode 100644 docs/interfaces/EntityHandler.md create mode 100644 docs/interfaces/FunctionsModule.md create mode 100644 docs/interfaces/GetAccessTokenOptions.md create mode 100644 docs/interfaces/GetLoginUrlOptions.md create mode 100644 docs/interfaces/LoginResponse.md create mode 100644 docs/interfaces/RegisterPayload.md create mode 100644 docs/interfaces/RemoveAccessTokenOptions.md create mode 100644 docs/interfaces/SaveAccessTokenOptions.md create mode 100644 docs/interfaces/SsoAccessTokenResponse.md create mode 100644 docs/interfaces/SsoModule.md create mode 100644 docs/interfaces/UserEntityLike.md create mode 100644 docs/interfaces/UserLike.md create mode 100644 docs/type-aliases/AgentConversation.md create mode 100644 docs/type-aliases/AgentMessage.md create mode 100644 docs/type-aliases/ConnectorIntegrationType.md create mode 100644 docs/type-aliases/CreateClientConfig.md create mode 100644 docs/type-aliases/CreateClientOptions.md create mode 100644 docs/type-aliases/EntitiesModule.md create mode 100644 docs/type-aliases/IntegrationEndpointFunction.md create mode 100644 docs/type-aliases/IntegrationPackage.md create mode 100644 docs/type-aliases/IntegrationsModule.md create mode 100644 docs/type-aliases/LoginInfoResponse.md create mode 100644 docs/type-aliases/ModelFilterParams.md create mode 100644 src/client.types.ts create mode 100644 typedoc.json diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..55b115f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,59 @@ +**@base44/sdk** + +*** + +# @base44/sdk + +## Classes + +- [Base44Error](classes/Base44Error.md) + +## Interfaces + +- [Base44Client](interfaces/Base44Client.md) +- [AgentsModule](interfaces/AgentsModule.md) +- [AppLogsModule](interfaces/AppLogsModule.md) +- [AppMessageContent](interfaces/AppMessageContent.md) +- [AppConversationMessage](interfaces/AppConversationMessage.md) +- [AppConversationLike](interfaces/AppConversationLike.md) +- [DenoProjectLike](interfaces/DenoProjectLike.md) +- [AppLike](interfaces/AppLike.md) +- [UserLike](interfaces/UserLike.md) +- [UserEntityLike](interfaces/UserEntityLike.md) +- [AuthConfigLike](interfaces/AuthConfigLike.md) +- [LoginResponse](interfaces/LoginResponse.md) +- [RegisterPayload](interfaces/RegisterPayload.md) +- [AuthModule](interfaces/AuthModule.md) +- [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse.md) +- [ConnectorsModule](interfaces/ConnectorsModule.md) +- [EntityHandler](interfaces/EntityHandler.md) +- [FunctionsModule](interfaces/FunctionsModule.md) +- [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse.md) +- [SsoModule](interfaces/SsoModule.md) +- [GetAccessTokenOptions](interfaces/GetAccessTokenOptions.md) +- [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions.md) +- [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions.md) +- [GetLoginUrlOptions](interfaces/GetLoginUrlOptions.md) + +## Type Aliases + +- [CreateClientOptions](type-aliases/CreateClientOptions.md) +- [CreateClientConfig](type-aliases/CreateClientConfig.md) +- [AgentConversation](type-aliases/AgentConversation.md) +- [AgentMessage](type-aliases/AgentMessage.md) +- [LoginInfoResponse](type-aliases/LoginInfoResponse.md) +- [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType.md) +- [EntitiesModule](type-aliases/EntitiesModule.md) +- [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction.md) +- [IntegrationPackage](type-aliases/IntegrationPackage.md) +- [IntegrationsModule](type-aliases/IntegrationsModule.md) +- [ModelFilterParams](type-aliases/ModelFilterParams.md) + +## Functions + +- [createClient](functions/createClient.md) +- [createClientFromRequest](functions/createClientFromRequest.md) +- [getAccessToken](functions/getAccessToken.md) +- [saveAccessToken](functions/saveAccessToken.md) +- [removeAccessToken](functions/removeAccessToken.md) +- [getLoginUrl](functions/getLoginUrl.md) diff --git a/docs/api-reference/README.mdx b/docs/api-reference/README.mdx deleted file mode 100644 index abb4aac..0000000 --- a/docs/api-reference/README.mdx +++ /dev/null @@ -1,18 +0,0 @@ -**@base44/sdk v0.8.3** - -*** - -# API Reference - -## Modules - -| Module | Description | -| ------ | ------ | -| [client](./client/README.mdx) | - | -| [index](./index/README.mdx) | - | -| [modules/agents](./modules/agents/README.mdx) | - | -| [modules/auth](./modules/auth/README.mdx) | - | -| [modules/entities](./modules/entities/README.mdx) | - | -| [modules/functions](./modules/functions/README.mdx) | - | -| [modules/integrations](./modules/integrations/README.mdx) | - | -| [utils/auth-utils](./utils/auth-utils/README.mdx) | - | diff --git a/docs/api-reference/client/README.mdx b/docs/api-reference/client/README.mdx deleted file mode 100644 index e2e509b..0000000 --- a/docs/api-reference/client/README.mdx +++ /dev/null @@ -1,21 +0,0 @@ -[**@base44/sdk v0.8.3**](../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / client - -# client - -## Functions - -| Function | Description | -| ------ | ------ | -| [createClient](./client/functions/createClient.mdx) | Create a Base44 client instance for interacting with the Base44 API | -| [createClientFromRequest](./client/functions/createClientFromRequest.mdx) | Create a Base44 client from an HTTP request object | - -## Type Aliases - -| Type Alias | Description | -| ------ | ------ | -| [CreateClientOptions](./client/type-aliases/CreateClientOptions.mdx) | Options for configuring the Base44 client | -| [Base44Client](./client/type-aliases/Base44Client.mdx) | The Base44 client instance returned by createClient | diff --git a/docs/api-reference/client/functions/createClient.mdx b/docs/api-reference/client/functions/createClient.mdx deleted file mode 100644 index 241c065..0000000 --- a/docs/api-reference/client/functions/createClient.mdx +++ /dev/null @@ -1,202 +0,0 @@ ---- -title: createClient -description: Create a Base44 client instance ---- - -# createClient() - -```ts -function createClient(config): Base44Client; -``` - -Create a Base44 client instance for interacting with the Base44 API. - -This is the primary method for initializing the SDK. It creates a client with modules for entities, integrations, authentication, functions, and agents. - -## Parameters - - - Client configuration options - - - - Your Base44 application ID - - - - Base44 API server URL - - - - Your application's base URL for authentication redirects - - - - User authentication token for making authenticated requests - - - - Service role token for elevated privileges (server-side only) - - - - If true, automatically redirects to login when not authenticated - - - - Specific version of functions to use - - - - Additional headers to include in all API requests - - - - Additional client options like error handlers - - - - - -## Returns - - - A Base44 client instance with the following modules and methods - - - - CRUD operations for entities - `list()`, `get()`, `create()`, `update()`, `delete()`, `filter()`, `bulkCreate()`, etc. - - See [createEntitiesModule](../../modules/entities/functions/createEntitiesModule) - - - - Call integration endpoints - Dynamic access to any integration: `client.integrations.PackageName.EndpointName()` - - See [createIntegrationsModule](../../modules/integrations/functions/createIntegrationsModule) - - - - Authentication and user management - `me()`, `updateMe()`, `loginViaEmailPassword()`, `register()`, `logout()`, etc. - - See [createAuthModule](../../modules/auth/functions/createAuthModule) - - - - Invoke custom cloud functions - `invoke(functionName, params)` - - See [createFunctionsModule](../../modules/functions/functions/createFunctionsModule) - - - - AI agent operations - `getConversations()`, `createConversation()`, `addMessage()`, `subscribeToConversation()`, etc. - - See [createAgentsModule](../../modules/agents/functions/createAgentsModule) - - - - Application logging - `logUserInApp()`, `fetchLogs()`, `getStats()` - - - - Update the authentication token - - - - Get current client configuration - - - - Clean up resources (websockets, etc.) - - - - Access modules with elevated privileges (requires `serviceToken`). All the same modules as above but with service role permissions. Does NOT include the `auth` module for security. - - - - - -## Examples - - - -```typescript Basic Setup -import { createClient } from "@base44/sdk"; - -const client = createClient({ - appId: "your-app-id", -}); -``` - -```typescript With Authentication -const client = createClient({ - appId: "your-app-id", - token: "user-auth-token", -}); - -const user = await client.auth.me(); -``` - -```typescript With Service Role -const client = createClient({ - appId: "your-app-id", - token: "user-token", - serviceToken: "service-token", -}); - -// User-level access -const myData = await client.entities.Product.list(); - -// Admin-level access -const allData = await client.asServiceRole.entities.Product.list(); -``` - -```typescript Server-Side -const client = createClient({ - appId: process.env.BASE44_APP_ID!, - serviceToken: process.env.BASE44_SERVICE_TOKEN!, -}); -``` - - - -## Related Resources - - - - Create client from HTTP request - - -{" "} - - - Learn about auth flows - - -{" "} - - - Server-side operations with elevated permissions - - - - Full client type definition - - diff --git a/docs/api-reference/client/functions/createClientFromRequest.mdx b/docs/api-reference/client/functions/createClientFromRequest.mdx deleted file mode 100644 index eab20dd..0000000 --- a/docs/api-reference/client/functions/createClientFromRequest.mdx +++ /dev/null @@ -1,1395 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / createClientFromRequest - -# createClientFromRequest() - -```ts -function createClientFromRequest(request): object; -``` - -Defined in: [client.ts:346](https://github.com/base44/sdk/blob/main/src/client.ts#L346) - -Create a Base44 client from an HTTP request object - -This utility function extracts authentication tokens and configuration from -standard HTTP headers, making it easy to initialize a client in server-side -environments like Next.js, Express, or other Node.js frameworks. - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `request` | `Request` | HTTP Request object with Base44 headers Expected headers: - `Authorization: Bearer ` - User authentication token - `Base44-Service-Authorization: Bearer ` - Service role token - `Base44-App-Id: ` - Application ID (required) - `Base44-Api-Url: ` - Custom API URL (optional, defaults to https://base44.app) - `Base44-Functions-Version: ` - Functions version (optional) | - -## Returns - -A configured Base44 client instance - -### entities - -```ts -entities: object; -``` - -### integrations - -```ts -integrations: object; -``` - -### auth - -```ts -auth: object; -``` - -#### auth.me() - -```ts -me(): Promise>; -``` - -Get current user information - -Retrieves the authenticated user's profile data including -id, email, name, role, and other custom fields. - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the current user data - -##### Throws - -If user is not authenticated - -##### Example - -```typescript -const user = await client.auth.me(); -console.log(`Logged in as: ${user.name}`); -console.log(`Role: ${user.role}`); -``` - -#### auth.updateMe() - -```ts -updateMe(data): Promise>; -``` - -Update current user's profile data - -Updates the authenticated user's information. You can update any -custom fields on the user entity. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `data` | `Record`\<`string`, `any`\> | Object containing fields to update | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the updated user data - -##### Throws - -If user is not authenticated - -##### Example - -```typescript -const updatedUser = await client.auth.updateMe({ - name: 'John Doe', - preferences: { - theme: 'dark', - notifications: true - } -}); -``` - -#### auth.redirectToLogin() - -```ts -redirectToLogin(nextUrl): void; -``` - -Redirects the user to the app's login page - -Navigates to the Base44 login page with a return URL. After successful -authentication, the user will be redirected back to the specified URL -with an access token in the query parameters. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `nextUrl` | `string` | URL to redirect to after successful login | - -##### Returns - -`void` - -##### Throws - -When not in a browser environment - -##### Example - -```typescript -// Redirect to login and return to current page -client.auth.redirectToLogin(window.location.href); - -// Redirect to login and go to dashboard after -client.auth.redirectToLogin('/dashboard'); -``` - -#### auth.logout() - -```ts -logout(redirectUrl?): void; -``` - -Logout the current user - -Removes the authentication token from memory and localStorage, then either -redirects to a specified URL or reloads the page to clear the session. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `redirectUrl?` | `string` | Optional URL to redirect to after logout. Reloads the page if not provided | - -##### Returns - -`void` - -##### Example - -```typescript -// Simple logout (reloads page) -client.auth.logout(); - -// Logout and redirect to login page -client.auth.logout('/login'); - -// Logout and redirect to home -client.auth.logout('/'); -``` - -#### auth.setToken() - -```ts -setToken(token, saveToStorage): void; -``` - -Set authentication token for the client - -Updates the Authorization header for all API requests and optionally -saves the token to localStorage for persistence across page reloads. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `token` | `string` | Authentication token | -| `saveToStorage` | `boolean` | Whether to save the token to localStorage (default: true) | - -##### Returns - -`void` - -##### Example - -```typescript -// Set token and save to localStorage -client.auth.setToken('your-access-token'); - -// Set token without saving (for server-side or temporary tokens) -client.auth.setToken('your-access-token', false); -``` - -#### auth.loginViaEmailPassword() - -```ts -loginViaEmailPassword( - email, - password, - turnstileToken?): Promise<{ - access_token: string; - user: any; -}>; -``` - -Login via email and password - -Authenticates a user with their email and password credentials. -On success, automatically sets the token in the client and localStorage. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | -| `password` | `string` | User's password | -| `turnstileToken?` | `string` | Optional Cloudflare Turnstile captcha token for bot protection | - -##### Returns - -`Promise`\<\{ - `access_token`: `string`; - `user`: `any`; -\}\> - -Promise resolving to login response with access_token and user data - -##### Throws - -If credentials are invalid or authentication fails - -##### Example - -```typescript -try { - const { access_token, user } = await client.auth.loginViaEmailPassword( - 'user@example.com', - 'password123' - ); - console.log(`Logged in as ${user.name}`); - // Token is automatically set in the client -} catch (error) { - console.error('Login failed:', error.message); -} -``` - -#### auth.isAuthenticated() - -```ts -isAuthenticated(): Promise; -``` - -Verify if the current user is authenticated - -Checks whether the current token is valid by attempting to fetch -the user's profile. Returns true if authenticated, false otherwise. - -##### Returns - -`Promise`\<`boolean`\> - -Promise resolving to true if authenticated, false if not - -##### Example - -```typescript -if (await client.auth.isAuthenticated()) { - console.log('User is logged in'); - const user = await client.auth.me(); -} else { - console.log('User needs to log in'); - client.auth.redirectToLogin('/dashboard'); -} -``` - -#### auth.inviteUser() - -```ts -inviteUser(userEmail, role): Promise>; -``` - -Invite a user to the application - -Sends an invitation email to the specified user with the assigned role. -The user will receive a link to complete their registration. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `userEmail` | `string` | Email address of the user to invite | -| `role` | `string` | Role to assign to the user (e.g., 'admin', 'editor', 'viewer') | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the invitation result - -##### Example - -```typescript -await client.auth.inviteUser('newuser@example.com', 'editor'); -console.log('Invitation sent!'); -``` - -#### auth.register() - -```ts -register(payload): Promise>; -``` - -Register a new user account - -Creates a new user account with email and password. May require -email verification via OTP depending on app configuration. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `payload` | \{ `email`: `string`; `password`: `string`; `turnstile_token?`: `string` \| `null`; `referral_code?`: `string` \| `null`; \} | Registration data | -| `payload.email` | `string` | User's email address | -| `payload.password` | `string` | User's password | -| `payload.turnstile_token?` | `string` \| `null` | Optional Cloudflare Turnstile captcha token | -| `payload.referral_code?` | `string` \| `null` | Optional referral code | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the registration result - -##### Example - -```typescript -try { - await client.auth.register({ - email: 'newuser@example.com', - password: 'securePassword123' - }); - // Check email for verification code -} catch (error) { - console.error('Registration failed:', error.message); -} -``` - -#### auth.verifyOtp() - -```ts -verifyOtp(params): Promise>; -``` - -Verify email with OTP code - -Verifies a user's email address using the one-time password (OTP) -sent to their email during registration. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `email`: `string`; `otpCode`: `string`; \} | Verification parameters | -| `params.email` | `string` | User's email address | -| `params.otpCode` | `string` | One-time password code from email | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to verification result with access token - -##### Example - -```typescript -const { access_token } = await client.auth.verifyOtp({ - email: 'user@example.com', - otpCode: '123456' -}); -client.auth.setToken(access_token); -``` - -#### auth.resendOtp() - -```ts -resendOtp(email): Promise>; -``` - -Resend OTP verification code - -Sends a new OTP code to the user's email if the previous one expired -or was not received. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when OTP is sent - -##### Example - -```typescript -await client.auth.resendOtp('user@example.com'); -console.log('New verification code sent!'); -``` - -#### auth.resetPasswordRequest() - -```ts -resetPasswordRequest(email): Promise>; -``` - -Request password reset - -Initiates the password reset process by sending a reset link -to the user's email address. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when reset email is sent - -##### Example - -```typescript -await client.auth.resetPasswordRequest('user@example.com'); -console.log('Password reset email sent!'); -``` - -#### auth.resetPassword() - -```ts -resetPassword(params): Promise>; -``` - -Reset password with token - -Completes the password reset process using the reset token from -the email and setting a new password. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `resetToken`: `string`; `newPassword`: `string`; \} | Reset parameters | -| `params.resetToken` | `string` | Reset token from email link | -| `params.newPassword` | `string` | New password to set | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when password is reset - -##### Example - -```typescript -// Extract token from email link -const urlParams = new URLSearchParams(window.location.search); -const resetToken = urlParams.get('reset_token'); - -await client.auth.resetPassword({ - resetToken, - newPassword: 'newSecurePassword123' -}); -console.log('Password reset successful!'); -``` - -#### auth.changePassword() - -```ts -changePassword(params): Promise>; -``` - -Change password for authenticated user - -Allows a logged-in user to change their password by providing -their current password and a new password. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `userId`: `string`; `currentPassword`: `string`; `newPassword`: `string`; \} | Change password parameters | -| `params.userId` | `string` | User's ID | -| `params.currentPassword` | `string` | Current password for verification | -| `params.newPassword` | `string` | New password to set | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when password is changed - -##### Throws - -If current password is incorrect - -##### Example - -```typescript -const user = await client.auth.me(); - -try { - await client.auth.changePassword({ - userId: user.id, - currentPassword: 'oldPassword123', - newPassword: 'newSecurePassword456' - }); - console.log('Password changed successfully!'); -} catch (error) { - console.error('Failed to change password:', error.message); -} -``` - -### functions - -```ts -functions: object; -``` - -#### functions.invoke() - -```ts -invoke(functionName, data): Promise>; -``` - -Invoke a custom function by name - -Executes a cloud function defined in your Base44 application with the provided -parameters. Automatically handles file uploads when File objects are included. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `functionName` | `string` | Name of the function to invoke | -| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the function's response - -##### Throws - -If function doesn't exist or execution fails - -##### Example - -```typescript -// Simple function call -const result = await client.functions.invoke('calculateTotal', { - items: ['item1', 'item2'], - discount: 0.1 -}); - -// Function with file upload -const fileInput = document.querySelector('input[type="file"]'); -const result = await client.functions.invoke('processImage', { - image: fileInput.files[0], - filter: 'grayscale' -}); - -// Service role function invocation -const adminResult = await client.asServiceRole.functions.invoke('adminTask', { - action: 'cleanup' -}); -``` - -### agents - -```ts -agents: object; -``` - -#### agents.getConversations() - -```ts -getConversations: () => Promise; -``` - -Get all agent conversations - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to array of conversations - -##### Example - -```typescript -const conversations = await client.agents.getConversations(); -console.log(`Total conversations: ${conversations.length}`); -``` - -#### agents.getConversation() - -```ts -getConversation: (conversationId) => Promise< - | AgentConversation -| undefined>; -``` - -Get a specific agent conversation by ID - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to retrieve | - -##### Returns - -`Promise`\< - \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) - \| `undefined`\> - -Promise resolving to the conversation or undefined - -##### Example - -```typescript -const conversation = await client.agents.getConversation('conv-123'); -console.log(conversation.messages); -``` - -#### agents.listConversations() - -```ts -listConversations: (filterParams) => Promise; -``` - -List agent conversations with filtering and pagination - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to filtered conversations - -##### Example - -```typescript -const recent = await client.agents.listConversations({ - sort: '-created_at', - limit: 10 -}); -``` - -#### agents.createConversation() - -```ts -createConversation: (conversation) => Promise; -``` - -Create a new agent conversation - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | -| `conversation.agent_name` | `string` | Name of the agent to create conversation with | -| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> - -Promise resolving to the created conversation - -##### Example - -```typescript -const conversation = await client.agents.createConversation({ - agent_name: 'support-agent', - metadata: { user_id: 'user-123' } -}); -``` - -#### agents.addMessage() - -```ts -addMessage: (conversation, message) => Promise; -``` - -Add a message to an agent conversation - -Sends a message and updates the conversation in real-time via WebSocket. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | -| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | - -##### Returns - -`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> - -Promise resolving to the created message - -##### Example - -```typescript -const message = await client.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help with my order' -}); -``` - -#### agents.subscribeToConversation() - -```ts -subscribeToConversation: (conversationId, onUpdate?) => () => void; -``` - -Subscribe to real-time updates for a conversation - -Establishes a WebSocket connection to receive live updates when -the agent responds or the conversation is updated. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to subscribe to | -| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | - -##### Returns - -Unsubscribe function to stop receiving updates - -```ts -(): void; -``` - -###### Returns - -`void` - -##### Example - -```typescript -const unsubscribe = client.agents.subscribeToConversation( - 'conv-123', - (updatedConversation) => { - console.log('New message:', updatedConversation.messages); - } -); - -// Later, stop listening -unsubscribe(); -``` - -#### agents.getWhatsAppConnectURL() - -```ts -getWhatsAppConnectURL: (agentName) => string; -``` - -Get WhatsApp connection URL for an agent - -Generates a URL that allows users to connect with an agent via WhatsApp. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `agentName` | `string` | Name of the agent | - -##### Returns - -`string` - -WhatsApp connection URL with authentication token - -##### Example - -```typescript -const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); -window.open(whatsappURL, '_blank'); -``` - -### appLogs - -```ts -appLogs: object; -``` - -#### appLogs.logUserInApp() - -```ts -logUserInApp(pageName): Promise; -``` - -Log user activity in the app - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `pageName` | `string` | Name of the page being visited | - -##### Returns - -`Promise`\<`void`\> - -#### appLogs.fetchLogs() - -```ts -fetchLogs(params): Promise; -``` - -Fetch app logs with optional parameters - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering logs | - -##### Returns - -`Promise`\<`any`\> - -App logs data - -#### appLogs.getStats() - -```ts -getStats(params): Promise; -``` - -Get app statistics - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering stats | - -##### Returns - -`Promise`\<`any`\> - -App statistics - -### cleanup() - -```ts -cleanup: () => void; -``` - -#### Returns - -`void` - -### setToken() - -```ts -setToken(newToken): void; -``` - -Set authentication token for all requests - -Updates the authentication token used by all modules and the websocket connection. -Also saves the token to localStorage if in a browser environment. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `newToken` | `string` | The new authentication token | - -#### Returns - -`void` - -#### Example - -```typescript -const client = createClient({ appId: 'your-app-id' }); - -// After user logs in -const { access_token } = await client.auth.loginViaEmailPassword(email, password); -client.setToken(access_token); -``` - -### getConfig() - -```ts -getConfig(): object; -``` - -Get current client configuration - -#### Returns - -`object` - -An object containing the current serverUrl, appId, and requiresAuth settings - -##### serverUrl - -```ts -serverUrl: string; -``` - -##### appId - -```ts -appId: string; -``` - -##### requiresAuth - -```ts -requiresAuth: boolean; -``` - -#### Example - -```typescript -const config = client.getConfig(); -console.log(`Connected to: ${config.serverUrl}`); -console.log(`App ID: ${config.appId}`); -``` - -### asServiceRole - -```ts -asServiceRole: object; -``` - -#### asServiceRole.entities - -```ts -entities: object; -``` - -#### asServiceRole.integrations - -```ts -integrations: object; -``` - -#### asServiceRole.sso - -```ts -sso: object; -``` - -#### asServiceRole.sso.getAccessToken() - -```ts -getAccessToken(userid): Promise>; -``` - -Get current user sso access token - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `userid` | `string` | User ID to include as path parameter | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Current user sso access_token - -#### asServiceRole.functions - -```ts -functions: object; -``` - -#### asServiceRole.functions.invoke() - -```ts -invoke(functionName, data): Promise>; -``` - -Invoke a custom function by name - -Executes a cloud function defined in your Base44 application with the provided -parameters. Automatically handles file uploads when File objects are included. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `functionName` | `string` | Name of the function to invoke | -| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | - -##### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the function's response - -##### Throws - -If function doesn't exist or execution fails - -##### Example - -```typescript -// Simple function call -const result = await client.functions.invoke('calculateTotal', { - items: ['item1', 'item2'], - discount: 0.1 -}); - -// Function with file upload -const fileInput = document.querySelector('input[type="file"]'); -const result = await client.functions.invoke('processImage', { - image: fileInput.files[0], - filter: 'grayscale' -}); - -// Service role function invocation -const adminResult = await client.asServiceRole.functions.invoke('adminTask', { - action: 'cleanup' -}); -``` - -#### asServiceRole.agents - -```ts -agents: object; -``` - -#### asServiceRole.agents.getConversations() - -```ts -getConversations: () => Promise; -``` - -Get all agent conversations - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to array of conversations - -##### Example - -```typescript -const conversations = await client.agents.getConversations(); -console.log(`Total conversations: ${conversations.length}`); -``` - -#### asServiceRole.agents.getConversation() - -```ts -getConversation: (conversationId) => Promise< - | AgentConversation -| undefined>; -``` - -Get a specific agent conversation by ID - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to retrieve | - -##### Returns - -`Promise`\< - \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) - \| `undefined`\> - -Promise resolving to the conversation or undefined - -##### Example - -```typescript -const conversation = await client.agents.getConversation('conv-123'); -console.log(conversation.messages); -``` - -#### asServiceRole.agents.listConversations() - -```ts -listConversations: (filterParams) => Promise; -``` - -List agent conversations with filtering and pagination - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to filtered conversations - -##### Example - -```typescript -const recent = await client.agents.listConversations({ - sort: '-created_at', - limit: 10 -}); -``` - -#### asServiceRole.agents.createConversation() - -```ts -createConversation: (conversation) => Promise; -``` - -Create a new agent conversation - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | -| `conversation.agent_name` | `string` | Name of the agent to create conversation with | -| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | - -##### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> - -Promise resolving to the created conversation - -##### Example - -```typescript -const conversation = await client.agents.createConversation({ - agent_name: 'support-agent', - metadata: { user_id: 'user-123' } -}); -``` - -#### asServiceRole.agents.addMessage() - -```ts -addMessage: (conversation, message) => Promise; -``` - -Add a message to an agent conversation - -Sends a message and updates the conversation in real-time via WebSocket. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | -| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | - -##### Returns - -`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> - -Promise resolving to the created message - -##### Example - -```typescript -const message = await client.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help with my order' -}); -``` - -#### asServiceRole.agents.subscribeToConversation() - -```ts -subscribeToConversation: (conversationId, onUpdate?) => () => void; -``` - -Subscribe to real-time updates for a conversation - -Establishes a WebSocket connection to receive live updates when -the agent responds or the conversation is updated. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to subscribe to | -| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | - -##### Returns - -Unsubscribe function to stop receiving updates - -```ts -(): void; -``` - -###### Returns - -`void` - -##### Example - -```typescript -const unsubscribe = client.agents.subscribeToConversation( - 'conv-123', - (updatedConversation) => { - console.log('New message:', updatedConversation.messages); - } -); - -// Later, stop listening -unsubscribe(); -``` - -#### asServiceRole.agents.getWhatsAppConnectURL() - -```ts -getWhatsAppConnectURL: (agentName) => string; -``` - -Get WhatsApp connection URL for an agent - -Generates a URL that allows users to connect with an agent via WhatsApp. - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `agentName` | `string` | Name of the agent | - -##### Returns - -`string` - -WhatsApp connection URL with authentication token - -##### Example - -```typescript -const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); -window.open(whatsappURL, '_blank'); -``` - -#### asServiceRole.appLogs - -```ts -appLogs: object; -``` - -#### asServiceRole.appLogs.logUserInApp() - -```ts -logUserInApp(pageName): Promise; -``` - -Log user activity in the app - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `pageName` | `string` | Name of the page being visited | - -##### Returns - -`Promise`\<`void`\> - -#### asServiceRole.appLogs.fetchLogs() - -```ts -fetchLogs(params): Promise; -``` - -Fetch app logs with optional parameters - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering logs | - -##### Returns - -`Promise`\<`any`\> - -App logs data - -#### asServiceRole.appLogs.getStats() - -```ts -getStats(params): Promise; -``` - -Get app statistics - -##### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | `Record`\<`string`, `any`\> | Query parameters for filtering stats | - -##### Returns - -`Promise`\<`any`\> - -App statistics - -#### asServiceRole.cleanup() - -```ts -cleanup: () => void; -``` - -##### Returns - -`void` - -## Throws - -If Base44-App-Id header is missing or authorization headers are malformed - -## Example - -```typescript -// In a Next.js API route -export async function GET(request: Request) { - const client = createClientFromRequest(request); - const data = await client.entities.Product.list(); - return Response.json(data); -} - -// In an Express handler -app.get('/api/data', async (req, res) => { - const client = createClientFromRequest(req); - const data = await client.entities.User.list(); - res.json(data); -}); -``` diff --git a/docs/api-reference/client/type-aliases/Base44Client.mdx b/docs/api-reference/client/type-aliases/Base44Client.mdx deleted file mode 100644 index b926cd4..0000000 --- a/docs/api-reference/client/type-aliases/Base44Client.mdx +++ /dev/null @@ -1,15 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / Base44Client - -# Base44Client - -```ts -type Base44Client = ReturnType; -``` - -Defined in: [client.ts:26](https://github.com/base44/sdk/blob/main/src/client.ts#L26) - -The Base44 client instance returned by createClient diff --git a/docs/api-reference/client/type-aliases/CreateClientOptions.mdx b/docs/api-reference/client/type-aliases/CreateClientOptions.mdx deleted file mode 100644 index cbcce82..0000000 --- a/docs/api-reference/client/type-aliases/CreateClientOptions.mdx +++ /dev/null @@ -1,37 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [client](./client/README.mdx) / CreateClientOptions - -# CreateClientOptions - -```ts -type CreateClientOptions = object; -``` - -Defined in: [client.ts:15](https://github.com/base44/sdk/blob/main/src/client.ts#L15) - -Options for configuring the Base44 client - -## Properties - -### onError()? - -```ts -optional onError: (error) => void; -``` - -Defined in: [client.ts:20](https://github.com/base44/sdk/blob/main/src/client.ts#L20) - -Error handler callback that will be invoked when API requests fail - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `error` | `Error` | The error object from the failed request | - -#### Returns - -`void` diff --git a/docs/api-reference/index/README.mdx b/docs/api-reference/index/README.mdx deleted file mode 100644 index c4f38a4..0000000 --- a/docs/api-reference/index/README.mdx +++ /dev/null @@ -1,77 +0,0 @@ -[**@base44/sdk v0.8.3**](../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / index - -# index - -## Classes - -| Class | Description | -| ------ | ------ | -| [Base44Error](./index/classes/Base44Error.mdx) | - | - -## Interfaces - -| Interface | Description | -| ------ | ------ | -| [AppMessageContent](./index/interfaces/AppMessageContent.mdx) | - | -| [AppConversationMessage](./index/interfaces/AppConversationMessage.mdx) | - | -| [AppConversationLike](./index/interfaces/AppConversationLike.mdx) | - | -| [DenoProjectLike](./index/interfaces/DenoProjectLike.mdx) | - | -| [AppLike](./index/interfaces/AppLike.mdx) | - | -| [UserLike](./index/interfaces/UserLike.mdx) | - | -| [UserEntityLike](./index/interfaces/UserEntityLike.mdx) | - | -| [AuthConfigLike](./index/interfaces/AuthConfigLike.mdx) | - | - -## References - -### createClient - -Re-exports [createClient](./client/functions/createClient.mdx) - -*** - -### createClientFromRequest - -Re-exports [createClientFromRequest](./client/functions/createClientFromRequest.mdx) - -*** - -### getAccessToken - -Re-exports [getAccessToken](./utils/auth-utils/functions/getAccessToken.mdx) - -*** - -### saveAccessToken - -Re-exports [saveAccessToken](./utils/auth-utils/functions/saveAccessToken.mdx) - -*** - -### removeAccessToken - -Re-exports [removeAccessToken](./utils/auth-utils/functions/removeAccessToken.mdx) - -*** - -### getLoginUrl - -Re-exports [getLoginUrl](./utils/auth-utils/functions/getLoginUrl.mdx) - -*** - -### Base44Client - -Re-exports [Base44Client](./client/type-aliases/Base44Client.mdx) - -## Type Aliases - -| Type Alias | Description | -| ------ | ------ | -| [AgentConversation](./index/type-aliases/AgentConversation.mdx) | - | -| [AgentMessage](./index/type-aliases/AgentMessage.mdx) | - | -| [LoginInfoResponse](./index/type-aliases/LoginInfoResponse.mdx) | - | -| [ModelFilterParams](./index/type-aliases/ModelFilterParams.mdx) | Parameters for filtering and paginating entity queries | diff --git a/docs/api-reference/index/classes/Base44Error.mdx b/docs/api-reference/index/classes/Base44Error.mdx deleted file mode 100644 index c54003c..0000000 --- a/docs/api-reference/index/classes/Base44Error.mdx +++ /dev/null @@ -1,132 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / Base44Error - -# Base44Error - -Defined in: [utils/axios-client.ts:5](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L5) - -## Extends - -- `Error` - -## Constructors - -### Constructor - -```ts -new Base44Error( - message, - status, - code, - data, - originalError): Base44Error; -``` - -Defined in: [utils/axios-client.ts:11](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L11) - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `message` | `string` | -| `status` | `number` | -| `code` | `string` | -| `data` | `any` | -| `originalError` | `unknown` | - -#### Returns - -`Base44Error` - -#### Overrides - -```ts -Error.constructor -``` - -## Methods - -### toJSON() - -```ts -toJSON(): object; -``` - -Defined in: [utils/axios-client.ts:27](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L27) - -#### Returns - -`object` - -##### name - -```ts -name: string; -``` - -##### message - -```ts -message: string; -``` - -##### status - -```ts -status: number; -``` - -##### code - -```ts -code: string; -``` - -##### data - -```ts -data: any; -``` - -## Properties - -### status - -```ts -status: number; -``` - -Defined in: [utils/axios-client.ts:6](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L6) - -*** - -### code - -```ts -code: string; -``` - -Defined in: [utils/axios-client.ts:7](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L7) - -*** - -### data - -```ts -data: any; -``` - -Defined in: [utils/axios-client.ts:8](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L8) - -*** - -### originalError - -```ts -originalError: unknown; -``` - -Defined in: [utils/axios-client.ts:9](https://github.com/base44/sdk/blob/main/src/utils/axios-client.ts#L9) diff --git a/docs/api-reference/index/interfaces/AppConversationLike.mdx b/docs/api-reference/index/interfaces/AppConversationLike.mdx deleted file mode 100644 index b3d7969..0000000 --- a/docs/api-reference/index/interfaces/AppConversationLike.mdx +++ /dev/null @@ -1,51 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppConversationLike - -# AppConversationLike - -Defined in: [modules/app.types.ts:16](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L16) - -## Properties - -### id? - -```ts -optional id: string | null; -``` - -Defined in: [modules/app.types.ts:17](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L17) - -*** - -### messages? - -```ts -optional messages: - | AppMessageContent[] - | null; -``` - -Defined in: [modules/app.types.ts:18](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L18) - -*** - -### model? - -```ts -optional model: string; -``` - -Defined in: [modules/app.types.ts:19](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L19) - -*** - -### functions\_fail\_silently? - -```ts -optional functions_fail_silently: boolean; -``` - -Defined in: [modules/app.types.ts:20](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L20) diff --git a/docs/api-reference/index/interfaces/AppConversationMessage.mdx b/docs/api-reference/index/interfaces/AppConversationMessage.mdx deleted file mode 100644 index cafc1e4..0000000 --- a/docs/api-reference/index/interfaces/AppConversationMessage.mdx +++ /dev/null @@ -1,95 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppConversationMessage - -# AppConversationMessage - -Defined in: [modules/app.types.ts:11](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L11) - -## Extends - -- [`AppMessageContent`](./index/interfaces/AppMessageContent.mdx) - -## Indexable - -```ts -[key: string]: unknown -``` - -## Properties - -### content? - -```ts -optional content: string; -``` - -Defined in: [modules/app.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L4) - -#### Inherited from - -[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`content`](./index/interfaces/AppMessageContent.mdx#content) - -*** - -### file\_urls? - -```ts -optional file_urls: string[]; -``` - -Defined in: [modules/app.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L5) - -#### Inherited from - -[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`file_urls`](./index/interfaces/AppMessageContent.mdx#file_urls) - -*** - -### custom\_context? - -```ts -optional custom_context: unknown; -``` - -Defined in: [modules/app.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L6) - -#### Inherited from - -[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`custom_context`](./index/interfaces/AppMessageContent.mdx#custom_context) - -*** - -### additional\_message\_params? - -```ts -optional additional_message_params: Record; -``` - -Defined in: [modules/app.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L7) - -#### Inherited from - -[`AppMessageContent`](./index/interfaces/AppMessageContent.mdx).[`additional_message_params`](./index/interfaces/AppMessageContent.mdx#additional_message_params) - -*** - -### id? - -```ts -optional id: string | null; -``` - -Defined in: [modules/app.types.ts:12](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L12) - -*** - -### role? - -```ts -optional role: string; -``` - -Defined in: [modules/app.types.ts:13](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L13) diff --git a/docs/api-reference/index/interfaces/AppLike.mdx b/docs/api-reference/index/interfaces/AppLike.mdx deleted file mode 100644 index fa561ac..0000000 --- a/docs/api-reference/index/interfaces/AppLike.mdx +++ /dev/null @@ -1,501 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppLike - -# AppLike - -Defined in: [modules/app.types.ts:32](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L32) - -## Properties - -### id? - -```ts -optional id: string; -``` - -Defined in: [modules/app.types.ts:33](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L33) - -*** - -### conversation? - -```ts -optional conversation: - | AppConversationLike - | null; -``` - -Defined in: [modules/app.types.ts:34](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L34) - -*** - -### app\_stage? - -```ts -optional app_stage: string; -``` - -Defined in: [modules/app.types.ts:35](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L35) - -*** - -### created\_date? - -```ts -optional created_date: string; -``` - -Defined in: [modules/app.types.ts:36](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L36) - -*** - -### updated\_date? - -```ts -optional updated_date: string; -``` - -Defined in: [modules/app.types.ts:37](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L37) - -*** - -### created\_by? - -```ts -optional created_by: string; -``` - -Defined in: [modules/app.types.ts:38](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L38) - -*** - -### organization\_id? - -```ts -optional organization_id: string; -``` - -Defined in: [modules/app.types.ts:39](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L39) - -*** - -### name? - -```ts -optional name: string; -``` - -Defined in: [modules/app.types.ts:40](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L40) - -*** - -### user\_description? - -```ts -optional user_description: string; -``` - -Defined in: [modules/app.types.ts:41](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L41) - -*** - -### entities? - -```ts -optional entities: Record; -``` - -Defined in: [modules/app.types.ts:42](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L42) - -*** - -### additional\_user\_data\_schema? - -```ts -optional additional_user_data_schema: any; -``` - -Defined in: [modules/app.types.ts:43](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L43) - -*** - -### pages? - -```ts -optional pages: object; -``` - -Defined in: [modules/app.types.ts:44](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L44) - -#### Index Signature - -```ts -[key: string]: string -``` - -*** - -### components - -```ts -components: object; -``` - -Defined in: [modules/app.types.ts:45](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L45) - -#### Index Signature - -```ts -[key: string]: any -``` - -*** - -### layout? - -```ts -optional layout: string; -``` - -Defined in: [modules/app.types.ts:46](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L46) - -*** - -### globals\_css? - -```ts -optional globals_css: string; -``` - -Defined in: [modules/app.types.ts:47](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L47) - -*** - -### agents? - -```ts -optional agents: Record; -``` - -Defined in: [modules/app.types.ts:48](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L48) - -*** - -### logo\_url? - -```ts -optional logo_url: string; -``` - -Defined in: [modules/app.types.ts:49](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L49) - -*** - -### slug? - -```ts -optional slug: string; -``` - -Defined in: [modules/app.types.ts:50](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L50) - -*** - -### public\_settings? - -```ts -optional public_settings: string; -``` - -Defined in: [modules/app.types.ts:51](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L51) - -*** - -### is\_blocked? - -```ts -optional is_blocked: boolean; -``` - -Defined in: [modules/app.types.ts:52](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L52) - -*** - -### github\_repo\_url? - -```ts -optional github_repo_url: string; -``` - -Defined in: [modules/app.types.ts:53](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L53) - -*** - -### main\_page? - -```ts -optional main_page: string; -``` - -Defined in: [modules/app.types.ts:54](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L54) - -*** - -### installable\_integrations? - -```ts -optional installable_integrations: any; -``` - -Defined in: [modules/app.types.ts:55](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L55) - -*** - -### backend\_project? - -```ts -optional backend_project: DenoProjectLike; -``` - -Defined in: [modules/app.types.ts:56](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L56) - -*** - -### last\_deployed\_at? - -```ts -optional last_deployed_at: string; -``` - -Defined in: [modules/app.types.ts:57](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L57) - -*** - -### is\_remixable? - -```ts -optional is_remixable: boolean; -``` - -Defined in: [modules/app.types.ts:58](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L58) - -*** - -### remixed\_from\_app\_id? - -```ts -optional remixed_from_app_id: string; -``` - -Defined in: [modules/app.types.ts:59](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L59) - -*** - -### hide\_entity\_created\_by? - -```ts -optional hide_entity_created_by: boolean; -``` - -Defined in: [modules/app.types.ts:60](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L60) - -*** - -### platform\_version? - -```ts -optional platform_version: number; -``` - -Defined in: [modules/app.types.ts:61](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L61) - -*** - -### enable\_username\_password? - -```ts -optional enable_username_password: boolean; -``` - -Defined in: [modules/app.types.ts:62](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L62) - -*** - -### auth\_config? - -```ts -optional auth_config: AuthConfigLike; -``` - -Defined in: [modules/app.types.ts:63](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L63) - -*** - -### status? - -```ts -optional status: object; -``` - -Defined in: [modules/app.types.ts:64](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L64) - -#### state? - -```ts -optional state: string; -``` - -#### details? - -```ts -optional details: any; -``` - -#### last\_updated\_date? - -```ts -optional last_updated_date: string; -``` - -*** - -### custom\_instructions? - -```ts -optional custom_instructions: any; -``` - -Defined in: [modules/app.types.ts:69](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L69) - -*** - -### frozen\_files? - -```ts -optional frozen_files: string[]; -``` - -Defined in: [modules/app.types.ts:70](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L70) - -*** - -### deep\_coding\_mode? - -```ts -optional deep_coding_mode: boolean; -``` - -Defined in: [modules/app.types.ts:71](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L71) - -*** - -### needs\_to\_add\_diff? - -```ts -optional needs_to_add_diff: boolean; -``` - -Defined in: [modules/app.types.ts:72](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L72) - -*** - -### installed\_integration\_context\_items? - -```ts -optional installed_integration_context_items: any[]; -``` - -Defined in: [modules/app.types.ts:73](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L73) - -*** - -### model? - -```ts -optional model: string; -``` - -Defined in: [modules/app.types.ts:74](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L74) - -*** - -### is\_starred? - -```ts -optional is_starred: boolean; -``` - -Defined in: [modules/app.types.ts:75](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L75) - -*** - -### agents\_enabled? - -```ts -optional agents_enabled: boolean; -``` - -Defined in: [modules/app.types.ts:76](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L76) - -*** - -### categories? - -```ts -optional categories: string[]; -``` - -Defined in: [modules/app.types.ts:77](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L77) - -*** - -### functions? - -```ts -optional functions: any; -``` - -Defined in: [modules/app.types.ts:78](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L78) - -*** - -### function\_names? - -```ts -optional function_names: string[]; -``` - -Defined in: [modules/app.types.ts:79](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L79) - -*** - -### user\_entity? - -```ts -optional user_entity: UserEntityLike; -``` - -Defined in: [modules/app.types.ts:80](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L80) - -*** - -### app\_code\_hash? - -```ts -optional app_code_hash: string; -``` - -Defined in: [modules/app.types.ts:81](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L81) - -*** - -### has\_backend\_functions\_enabled? - -```ts -optional has_backend_functions_enabled: boolean; -``` - -Defined in: [modules/app.types.ts:82](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L82) diff --git a/docs/api-reference/index/interfaces/AppMessageContent.mdx b/docs/api-reference/index/interfaces/AppMessageContent.mdx deleted file mode 100644 index 0a2d7b2..0000000 --- a/docs/api-reference/index/interfaces/AppMessageContent.mdx +++ /dev/null @@ -1,59 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AppMessageContent - -# AppMessageContent - -Defined in: [modules/app.types.ts:3](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L3) - -## Extended by - -- [`AppConversationMessage`](./index/interfaces/AppConversationMessage.mdx) - -## Indexable - -```ts -[key: string]: unknown -``` - -## Properties - -### content? - -```ts -optional content: string; -``` - -Defined in: [modules/app.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L4) - -*** - -### file\_urls? - -```ts -optional file_urls: string[]; -``` - -Defined in: [modules/app.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L5) - -*** - -### custom\_context? - -```ts -optional custom_context: unknown; -``` - -Defined in: [modules/app.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L6) - -*** - -### additional\_message\_params? - -```ts -optional additional_message_params: Record; -``` - -Defined in: [modules/app.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L7) diff --git a/docs/api-reference/index/interfaces/AuthConfigLike.mdx b/docs/api-reference/index/interfaces/AuthConfigLike.mdx deleted file mode 100644 index 07eec21..0000000 --- a/docs/api-reference/index/interfaces/AuthConfigLike.mdx +++ /dev/null @@ -1,69 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AuthConfigLike - -# AuthConfigLike - -Defined in: [modules/app.types.ts:112](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L112) - -## Properties - -### enable\_username\_password? - -```ts -optional enable_username_password: boolean; -``` - -Defined in: [modules/app.types.ts:113](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L113) - -*** - -### enable\_google\_login? - -```ts -optional enable_google_login: boolean; -``` - -Defined in: [modules/app.types.ts:114](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L114) - -*** - -### enable\_microsoft\_login? - -```ts -optional enable_microsoft_login: boolean; -``` - -Defined in: [modules/app.types.ts:115](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L115) - -*** - -### enable\_facebook\_login? - -```ts -optional enable_facebook_login: boolean; -``` - -Defined in: [modules/app.types.ts:116](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L116) - -*** - -### sso\_provider\_name? - -```ts -optional sso_provider_name: string; -``` - -Defined in: [modules/app.types.ts:117](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L117) - -*** - -### enable\_sso\_login? - -```ts -optional enable_sso_login: boolean; -``` - -Defined in: [modules/app.types.ts:118](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L118) diff --git a/docs/api-reference/index/interfaces/DenoProjectLike.mdx b/docs/api-reference/index/interfaces/DenoProjectLike.mdx deleted file mode 100644 index de15ad7..0000000 --- a/docs/api-reference/index/interfaces/DenoProjectLike.mdx +++ /dev/null @@ -1,52 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / DenoProjectLike - -# DenoProjectLike - -Defined in: [modules/app.types.ts:24](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L24) - -## Properties - -### project\_id - -```ts -project_id: string; -``` - -Defined in: [modules/app.types.ts:25](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L25) - -*** - -### project\_name - -```ts -project_name: string; -``` - -Defined in: [modules/app.types.ts:26](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L26) - -*** - -### app\_id - -```ts -app_id: string; -``` - -Defined in: [modules/app.types.ts:27](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L27) - -*** - -### deployment\_name\_to\_info - -```ts -deployment_name_to_info: Record; -``` - -Defined in: [modules/app.types.ts:28](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L28) diff --git a/docs/api-reference/index/interfaces/UserEntityLike.mdx b/docs/api-reference/index/interfaces/UserEntityLike.mdx deleted file mode 100644 index 568d513..0000000 --- a/docs/api-reference/index/interfaces/UserEntityLike.mdx +++ /dev/null @@ -1,119 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / UserEntityLike - -# UserEntityLike - -Defined in: [modules/app.types.ts:89](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L89) - -## Properties - -### type - -```ts -type: string; -``` - -Defined in: [modules/app.types.ts:90](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L90) - -*** - -### name - -```ts -name: string; -``` - -Defined in: [modules/app.types.ts:91](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L91) - -*** - -### title? - -```ts -optional title: string; -``` - -Defined in: [modules/app.types.ts:92](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L92) - -*** - -### properties? - -```ts -optional properties: object; -``` - -Defined in: [modules/app.types.ts:93](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L93) - -#### role? - -```ts -optional role: object; -``` - -##### role.type? - -```ts -optional type: string; -``` - -##### role.description? - -```ts -optional description: string; -``` - -##### role.enum? - -```ts -optional enum: string[]; -``` - -#### email? - -```ts -optional email: object; -``` - -##### email.type? - -```ts -optional type: string; -``` - -##### email.description? - -```ts -optional description: string; -``` - -#### full\_name? - -```ts -optional full_name: object; -``` - -##### full\_name.type? - -```ts -optional type: string; -``` - -##### full\_name.description? - -```ts -optional description: string; -``` - -*** - -### required - -```ts -required: string[]; -``` - -Defined in: [modules/app.types.ts:108](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L108) diff --git a/docs/api-reference/index/interfaces/UserLike.mdx b/docs/api-reference/index/interfaces/UserLike.mdx deleted file mode 100644 index 3c9b042..0000000 --- a/docs/api-reference/index/interfaces/UserLike.mdx +++ /dev/null @@ -1,19 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / UserLike - -# UserLike - -Defined in: [modules/app.types.ts:85](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L85) - -## Properties - -### id? - -```ts -optional id: string | null; -``` - -Defined in: [modules/app.types.ts:86](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L86) diff --git a/docs/api-reference/index/type-aliases/AgentConversation.mdx b/docs/api-reference/index/type-aliases/AgentConversation.mdx deleted file mode 100644 index 16160b4..0000000 --- a/docs/api-reference/index/type-aliases/AgentConversation.mdx +++ /dev/null @@ -1,73 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AgentConversation - -# AgentConversation - -```ts -type AgentConversation = object; -``` - -Defined in: [modules/agents.types.ts:1](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L1) - -## Properties - -### id - -```ts -id: string; -``` - -Defined in: [modules/agents.types.ts:2](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L2) - -*** - -### app\_id - -```ts -app_id: string; -``` - -Defined in: [modules/agents.types.ts:3](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L3) - -*** - -### agent\_name - -```ts -agent_name: string; -``` - -Defined in: [modules/agents.types.ts:4](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L4) - -*** - -### created\_by\_id - -```ts -created_by_id: string; -``` - -Defined in: [modules/agents.types.ts:5](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L5) - -*** - -### messages - -```ts -messages: AgentMessage[]; -``` - -Defined in: [modules/agents.types.ts:6](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L6) - -*** - -### metadata? - -```ts -optional metadata: Record; -``` - -Defined in: [modules/agents.types.ts:7](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L7) diff --git a/docs/api-reference/index/type-aliases/AgentMessage.mdx b/docs/api-reference/index/type-aliases/AgentMessage.mdx deleted file mode 100644 index fb5fa18..0000000 --- a/docs/api-reference/index/type-aliases/AgentMessage.mdx +++ /dev/null @@ -1,184 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / AgentMessage - -# AgentMessage - -```ts -type AgentMessage = object; -``` - -Defined in: [modules/agents.types.ts:10](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L10) - -## Properties - -### id - -```ts -id: string; -``` - -Defined in: [modules/agents.types.ts:11](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L11) - -*** - -### role - -```ts -role: "user" | "assistant" | "system"; -``` - -Defined in: [modules/agents.types.ts:12](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L12) - -*** - -### reasoning? - -```ts -optional reasoning: object; -``` - -Defined in: [modules/agents.types.ts:13](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L13) - -#### start\_date - -```ts -start_date: string; -``` - -#### end\_date? - -```ts -optional end_date: string; -``` - -#### content - -```ts -content: string; -``` - -*** - -### content? - -```ts -optional content: string | Record | null; -``` - -Defined in: [modules/agents.types.ts:18](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L18) - -*** - -### file\_urls? - -```ts -optional file_urls: string[] | null; -``` - -Defined in: [modules/agents.types.ts:19](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L19) - -*** - -### tool\_calls? - -```ts -optional tool_calls: object[] | null; -``` - -Defined in: [modules/agents.types.ts:20](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L20) - -*** - -### usage? - -```ts -optional usage: - | { - prompt_tokens?: number; - completion_tokens?: number; -} - | null; -``` - -Defined in: [modules/agents.types.ts:30](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L30) - -*** - -### hidden? - -```ts -optional hidden: boolean; -``` - -Defined in: [modules/agents.types.ts:31](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L31) - -*** - -### custom\_context? - -```ts -optional custom_context: object[] | null; -``` - -Defined in: [modules/agents.types.ts:32](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L32) - -*** - -### model? - -```ts -optional model: string | null; -``` - -Defined in: [modules/agents.types.ts:35](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L35) - -*** - -### checkpoint\_id? - -```ts -optional checkpoint_id: string | null; -``` - -Defined in: [modules/agents.types.ts:36](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L36) - -*** - -### metadata? - -```ts -optional metadata: object; -``` - -Defined in: [modules/agents.types.ts:37](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L37) - -#### created\_date - -```ts -created_date: string; -``` - -#### created\_by\_email - -```ts -created_by_email: string; -``` - -#### created\_by\_full\_name - -```ts -created_by_full_name: string | null; -``` - -*** - -### additional\_message\_params? - -```ts -optional additional_message_params: Record; -``` - -Defined in: [modules/agents.types.ts:42](https://github.com/base44/sdk/blob/main/src/modules/agents.types.ts#L42) diff --git a/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx b/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx deleted file mode 100644 index 46656ed..0000000 --- a/docs/api-reference/index/type-aliases/LoginInfoResponse.mdx +++ /dev/null @@ -1,22 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / LoginInfoResponse - -# LoginInfoResponse - -```ts -type LoginInfoResponse = Pick; -``` - -Defined in: [modules/app.types.ts:124](https://github.com/base44/sdk/blob/main/src/modules/app.types.ts#L124) diff --git a/docs/api-reference/index/type-aliases/ModelFilterParams.mdx b/docs/api-reference/index/type-aliases/ModelFilterParams.mdx deleted file mode 100644 index 96ee388..0000000 --- a/docs/api-reference/index/type-aliases/ModelFilterParams.mdx +++ /dev/null @@ -1,89 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [index](./index/README.mdx) / ModelFilterParams - -# ModelFilterParams - -```ts -type ModelFilterParams = object; -``` - -Defined in: [types.ts:8](https://github.com/base44/sdk/blob/main/src/types.ts#L8) - -Parameters for filtering and paginating entity queries - -Used across various SDK methods to filter, sort, and paginate results. - -## Properties - -### q? - -```ts -optional q: Record; -``` - -Defined in: [types.ts:10](https://github.com/base44/sdk/blob/main/src/types.ts#L10) - -Query object for filtering results - -*** - -### sort? - -```ts -optional sort: string | null; -``` - -Defined in: [types.ts:12](https://github.com/base44/sdk/blob/main/src/types.ts#L12) - -Sort field (e.g., 'name' for ascending, '-created_at' for descending) - -*** - -### sort\_by? - -```ts -optional sort_by: string | null; -``` - -Defined in: [types.ts:14](https://github.com/base44/sdk/blob/main/src/types.ts#L14) - -Alternative sort field parameter - -*** - -### limit? - -```ts -optional limit: number | null; -``` - -Defined in: [types.ts:16](https://github.com/base44/sdk/blob/main/src/types.ts#L16) - -Maximum number of results to return - -*** - -### skip? - -```ts -optional skip: number | null; -``` - -Defined in: [types.ts:18](https://github.com/base44/sdk/blob/main/src/types.ts#L18) - -Number of results to skip (for pagination) - -*** - -### fields? - -```ts -optional fields: string[] | null; -``` - -Defined in: [types.ts:20](https://github.com/base44/sdk/blob/main/src/types.ts#L20) - -Array of field names to include in results diff --git a/docs/api-reference/modules/agents/-internal-/README.mdx b/docs/api-reference/modules/agents/-internal-/README.mdx deleted file mode 100644 index 55979b8..0000000 --- a/docs/api-reference/modules/agents/-internal-/README.mdx +++ /dev/null @@ -1,24 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / \ - -# \ - -## Functions - -| Function | Description | -| ------ | ------ | -| [RoomsSocket](./modules/agents/-internal-/functions/RoomsSocket.mdx) | - | - -## Type Aliases - -| Type Alias | Description | -| ------ | ------ | -| [RoomsSocketConfig](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx) | - | -| [TJsonStr](./modules/agents/-internal-/type-aliases/TJsonStr.mdx) | - | -| [RoomsSocketEventsMap](./modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx) | - | -| [TEvent](./modules/agents/-internal-/type-aliases/TEvent.mdx) | - | -| [THandler](./modules/agents/-internal-/type-aliases/THandler.mdx) | - | -| [RoomsSocket](./modules/agents/-internal-/type-aliases/RoomsSocket.mdx) | - | diff --git a/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx b/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx deleted file mode 100644 index 9f3d93a..0000000 --- a/docs/api-reference/modules/agents/-internal-/functions/RoomsSocket.mdx +++ /dev/null @@ -1,103 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocket - -# RoomsSocket() - -```ts -function RoomsSocket(__namedParameters): object; -``` - -Defined in: [utils/socket-utils.ts:70](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L70) - -## Parameters - -| Parameter | Type | -| ------ | ------ | -| `__namedParameters` | \{ `config`: [`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx); \} | -| `__namedParameters.config` | [`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx) | - -## Returns - -`object` - -### socket - -```ts -socket: Socket<{ - connect: () => void | Promise; - update_model: (msg) => void | Promise; - error: (error) => void | Promise; -}, { - join: (room) => void; - leave: (room) => void; -}>; -``` - -### subscribeToRoom() - -```ts -subscribeToRoom: (room, handlers) => () => void; -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `room` | `string` | -| `handlers` | `Partial`\<`{ [k in TEvent]: THandler }`\> | - -#### Returns - -```ts -(): void; -``` - -##### Returns - -`void` - -### updateConfig() - -```ts -updateConfig: (config) => void; -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `config` | `Partial`\<[`RoomsSocketConfig`](./modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx)\> | - -#### Returns - -`void` - -### updateModel() - -```ts -updateModel: (room, data) => Promise; -``` - -#### Parameters - -| Parameter | Type | -| ------ | ------ | -| `room` | `string` | -| `data` | `any` | - -#### Returns - -`Promise`\<`void`\> - -### disconnect() - -```ts -disconnect: () => void; -``` - -#### Returns - -`void` diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx deleted file mode 100644 index fc01a67..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocket.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocket - -# RoomsSocket - -```ts -type RoomsSocket = ReturnType; -``` - -Defined in: [utils/socket-utils.ts:70](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L70) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx deleted file mode 100644 index e0b568a..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketConfig.mdx +++ /dev/null @@ -1,63 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocketConfig - -# RoomsSocketConfig - -```ts -type RoomsSocketConfig = object; -``` - -Defined in: [utils/socket-utils.ts:4](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L4) - -## Properties - -### serverUrl - -```ts -serverUrl: string; -``` - -Defined in: [utils/socket-utils.ts:5](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L5) - -*** - -### mountPath - -```ts -mountPath: string; -``` - -Defined in: [utils/socket-utils.ts:6](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L6) - -*** - -### transports - -```ts -transports: string[]; -``` - -Defined in: [utils/socket-utils.ts:7](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L7) - -*** - -### appId - -```ts -appId: string; -``` - -Defined in: [utils/socket-utils.ts:8](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L8) - -*** - -### token? - -```ts -optional token: string; -``` - -Defined in: [utils/socket-utils.ts:9](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L9) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx deleted file mode 100644 index feb2709..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/RoomsSocketEventsMap.mdx +++ /dev/null @@ -1,109 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / RoomsSocketEventsMap - -# RoomsSocketEventsMap - -```ts -type RoomsSocketEventsMap = object; -``` - -Defined in: [utils/socket-utils.ts:15](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L15) - -## Properties - -### listen - -```ts -listen: object; -``` - -Defined in: [utils/socket-utils.ts:16](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L16) - -#### connect() - -```ts -connect: () => Promise | void; -``` - -##### Returns - -`Promise`\<`void`\> \| `void` - -#### update\_model() - -```ts -update_model: (msg) => Promise | void; -``` - -##### Parameters - -| Parameter | Type | -| ------ | ------ | -| `msg` | \{ `room`: `string`; `data`: [`TJsonStr`](./modules/agents/-internal-/type-aliases/TJsonStr.mdx); \} | -| `msg.room` | `string` | -| `msg.data` | [`TJsonStr`](./modules/agents/-internal-/type-aliases/TJsonStr.mdx) | - -##### Returns - -`Promise`\<`void`\> \| `void` - -#### error() - -```ts -error: (error) => Promise | void; -``` - -##### Parameters - -| Parameter | Type | -| ------ | ------ | -| `error` | `Error` | - -##### Returns - -`Promise`\<`void`\> \| `void` - -*** - -### emit - -```ts -emit: object; -``` - -Defined in: [utils/socket-utils.ts:24](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L24) - -#### join() - -```ts -join: (room) => void; -``` - -##### Parameters - -| Parameter | Type | -| ------ | ------ | -| `room` | `string` | - -##### Returns - -`void` - -#### leave() - -```ts -leave: (room) => void; -``` - -##### Parameters - -| Parameter | Type | -| ------ | ------ | -| `room` | `string` | - -##### Returns - -`void` diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx deleted file mode 100644 index 31236fd..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/TEvent.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / TEvent - -# TEvent - -```ts -type TEvent = keyof RoomsSocketEventsMap["listen"]; -``` - -Defined in: [utils/socket-utils.ts:30](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L30) diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx deleted file mode 100644 index 8b68b61..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/THandler.mdx +++ /dev/null @@ -1,19 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / THandler - -# THandler\ - -```ts -type THandler = RoomsSocketEventsMap["listen"][E]; -``` - -Defined in: [utils/socket-utils.ts:32](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L32) - -## Type Parameters - -| Type Parameter | -| ------ | -| `E` *extends* [`TEvent`](./modules/agents/-internal-/type-aliases/TEvent.mdx) | diff --git a/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx b/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx deleted file mode 100644 index 4dab738..0000000 --- a/docs/api-reference/modules/agents/-internal-/type-aliases/TJsonStr.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / [\](./modules/agents/-internal-/README.mdx) / TJsonStr - -# TJsonStr - -```ts -type TJsonStr = string; -``` - -Defined in: [utils/socket-utils.ts:13](https://github.com/base44/sdk/blob/main/src/utils/socket-utils.ts#L13) diff --git a/docs/api-reference/modules/agents/README.mdx b/docs/api-reference/modules/agents/README.mdx deleted file mode 100644 index 7083ff5..0000000 --- a/docs/api-reference/modules/agents/README.mdx +++ /dev/null @@ -1,25 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / modules/agents - -# modules/agents - -## Functions - -| Function | Description | -| ------ | ------ | -| [createAgentsModule](./modules/agents/functions/createAgentsModule.mdx) | Creates the agents module for the Base44 SDK | - -## Modules - -| Module | Description | -| ------ | ------ | -| [\](./modules/agents/-internal-/README.mdx) | - | - -## Type Aliases - -| Type Alias | Description | -| ------ | ------ | -| [AgentsModuleConfig](./modules/agents/type-aliases/AgentsModuleConfig.mdx) | Configuration for the agents module | diff --git a/docs/api-reference/modules/agents/functions/createAgentsModule.mdx b/docs/api-reference/modules/agents/functions/createAgentsModule.mdx deleted file mode 100644 index 709ce16..0000000 --- a/docs/api-reference/modules/agents/functions/createAgentsModule.mdx +++ /dev/null @@ -1,245 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / createAgentsModule - -# createAgentsModule() - -```ts -function createAgentsModule(config): object; -``` - -Defined in: [modules/agents.ts:32](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L32) - -Creates the agents module for the Base44 SDK - -Provides methods to interact with AI agents, manage conversations, -and receive real-time updates via WebSocket. - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `config` | [`AgentsModuleConfig`](./modules/agents/type-aliases/AgentsModuleConfig.mdx) | Module configuration | - -## Returns - -Agents module with conversation and messaging methods - -### getConversations() - -```ts -getConversations: () => Promise; -``` - -Get all agent conversations - -#### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to array of conversations - -#### Example - -```typescript -const conversations = await client.agents.getConversations(); -console.log(`Total conversations: ${conversations.length}`); -``` - -### getConversation() - -```ts -getConversation: (conversationId) => Promise< - | AgentConversation -| undefined>; -``` - -Get a specific agent conversation by ID - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to retrieve | - -#### Returns - -`Promise`\< - \| [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) - \| `undefined`\> - -Promise resolving to the conversation or undefined - -#### Example - -```typescript -const conversation = await client.agents.getConversation('conv-123'); -console.log(conversation.messages); -``` - -### listConversations() - -```ts -listConversations: (filterParams) => Promise; -``` - -List agent conversations with filtering and pagination - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `filterParams` | [`ModelFilterParams`](./index/type-aliases/ModelFilterParams.mdx) | Query parameters for filtering | - -#### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)[]\> - -Promise resolving to filtered conversations - -#### Example - -```typescript -const recent = await client.agents.listConversations({ - sort: '-created_at', - limit: 10 -}); -``` - -### createConversation() - -```ts -createConversation: (conversation) => Promise; -``` - -Create a new agent conversation - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | \{ `agent_name`: `string`; `metadata?`: `Record`\<`string`, `any`\>; \} | Conversation data | -| `conversation.agent_name` | `string` | Name of the agent to create conversation with | -| `conversation.metadata?` | `Record`\<`string`, `any`\> | Optional metadata for the conversation | - -#### Returns - -`Promise`\<[`AgentConversation`](./index/type-aliases/AgentConversation.mdx)\> - -Promise resolving to the created conversation - -#### Example - -```typescript -const conversation = await client.agents.createConversation({ - agent_name: 'support-agent', - metadata: { user_id: 'user-123' } -}); -``` - -### addMessage() - -```ts -addMessage: (conversation, message) => Promise; -``` - -Add a message to an agent conversation - -Sends a message and updates the conversation in real-time via WebSocket. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversation` | [`AgentConversation`](./index/type-aliases/AgentConversation.mdx) | The conversation to add the message to | -| `message` | [`AgentMessage`](./index/type-aliases/AgentMessage.mdx) | The message to add | - -#### Returns - -`Promise`\<[`AgentMessage`](./index/type-aliases/AgentMessage.mdx)\> - -Promise resolving to the created message - -#### Example - -```typescript -const message = await client.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help with my order' -}); -``` - -### subscribeToConversation() - -```ts -subscribeToConversation: (conversationId, onUpdate?) => () => void; -``` - -Subscribe to real-time updates for a conversation - -Establishes a WebSocket connection to receive live updates when -the agent responds or the conversation is updated. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `conversationId` | `string` | The ID of the conversation to subscribe to | -| `onUpdate?` | (`conversation`) => `void` | Callback function invoked when the conversation updates | - -#### Returns - -Unsubscribe function to stop receiving updates - -```ts -(): void; -``` - -##### Returns - -`void` - -#### Example - -```typescript -const unsubscribe = client.agents.subscribeToConversation( - 'conv-123', - (updatedConversation) => { - console.log('New message:', updatedConversation.messages); - } -); - -// Later, stop listening -unsubscribe(); -``` - -### getWhatsAppConnectURL() - -```ts -getWhatsAppConnectURL: (agentName) => string; -``` - -Get WhatsApp connection URL for an agent - -Generates a URL that allows users to connect with an agent via WhatsApp. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `agentName` | `string` | Name of the agent | - -#### Returns - -`string` - -WhatsApp connection URL with authentication token - -#### Example - -```typescript -const whatsappURL = client.agents.getWhatsAppConnectURL('support-agent'); -window.open(whatsappURL, '_blank'); -``` diff --git a/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx b/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx deleted file mode 100644 index a7b7c4a..0000000 --- a/docs/api-reference/modules/agents/type-aliases/AgentsModuleConfig.mdx +++ /dev/null @@ -1,75 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/agents](./modules/agents/README.mdx) / AgentsModuleConfig - -# AgentsModuleConfig - -```ts -type AgentsModuleConfig = object; -``` - -Defined in: [modules/agents.ts:10](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L10) - -Configuration for the agents module - -## Properties - -### axios - -```ts -axios: AxiosInstance; -``` - -Defined in: [modules/agents.ts:12](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L12) - -Axios instance for API requests - -*** - -### socket - -```ts -socket: ReturnType; -``` - -Defined in: [modules/agents.ts:14](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L14) - -WebSocket connection for real-time updates - -*** - -### appId - -```ts -appId: string; -``` - -Defined in: [modules/agents.ts:16](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L16) - -Application ID - -*** - -### serverUrl? - -```ts -optional serverUrl: string; -``` - -Defined in: [modules/agents.ts:18](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L18) - -Base44 server URL - -*** - -### token? - -```ts -optional token: string; -``` - -Defined in: [modules/agents.ts:20](https://github.com/base44/sdk/blob/main/src/modules/agents.ts#L20) - -Authentication token diff --git a/docs/api-reference/modules/auth/README.mdx b/docs/api-reference/modules/auth/README.mdx deleted file mode 100644 index 3e47a77..0000000 --- a/docs/api-reference/modules/auth/README.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / modules/auth - -# modules/auth - -## Functions - -| Function | Description | -| ------ | ------ | -| [createAuthModule](./modules/auth/functions/createAuthModule.mdx) | Creates the authentication module for the Base44 SDK | diff --git a/docs/api-reference/modules/auth/functions/createAuthModule.mdx b/docs/api-reference/modules/auth/functions/createAuthModule.mdx deleted file mode 100644 index e1c2325..0000000 --- a/docs/api-reference/modules/auth/functions/createAuthModule.mdx +++ /dev/null @@ -1,542 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/auth](./modules/auth/README.mdx) / createAuthModule - -# createAuthModule() - -```ts -function createAuthModule( - axios, - functionsAxiosClient, - appId, - options): object; -``` - -Defined in: [modules/auth.ts:18](https://github.com/base44/sdk/blob/main/src/modules/auth.ts#L18) - -Creates the authentication module for the Base44 SDK - -Provides comprehensive authentication functionality including user login, -registration, password reset, and user profile management. - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `axios` | `AxiosInstance` | Axios instance for API requests | -| `functionsAxiosClient` | `AxiosInstance` | Axios instance for function invocations | -| `appId` | `string` | Application ID | -| `options` | \{ `serverUrl`: `string`; `appBaseUrl?`: `string`; \} | Configuration options | -| `options.serverUrl` | `string` | Base44 server URL | -| `options.appBaseUrl?` | `string` | Application base URL for redirects | - -## Returns - -Auth module with authentication methods - -### me() - -```ts -me(): Promise>; -``` - -Get current user information - -Retrieves the authenticated user's profile data including -id, email, name, role, and other custom fields. - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the current user data - -#### Throws - -If user is not authenticated - -#### Example - -```typescript -const user = await client.auth.me(); -console.log(`Logged in as: ${user.name}`); -console.log(`Role: ${user.role}`); -``` - -### updateMe() - -```ts -updateMe(data): Promise>; -``` - -Update current user's profile data - -Updates the authenticated user's information. You can update any -custom fields on the user entity. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `data` | `Record`\<`string`, `any`\> | Object containing fields to update | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the updated user data - -#### Throws - -If user is not authenticated - -#### Example - -```typescript -const updatedUser = await client.auth.updateMe({ - name: 'John Doe', - preferences: { - theme: 'dark', - notifications: true - } -}); -``` - -### redirectToLogin() - -```ts -redirectToLogin(nextUrl): void; -``` - -Redirects the user to the app's login page - -Navigates to the Base44 login page with a return URL. After successful -authentication, the user will be redirected back to the specified URL -with an access token in the query parameters. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `nextUrl` | `string` | URL to redirect to after successful login | - -#### Returns - -`void` - -#### Throws - -When not in a browser environment - -#### Example - -```typescript -// Redirect to login and return to current page -client.auth.redirectToLogin(window.location.href); - -// Redirect to login and go to dashboard after -client.auth.redirectToLogin('/dashboard'); -``` - -### logout() - -```ts -logout(redirectUrl?): void; -``` - -Logout the current user - -Removes the authentication token from memory and localStorage, then either -redirects to a specified URL or reloads the page to clear the session. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `redirectUrl?` | `string` | Optional URL to redirect to after logout. Reloads the page if not provided | - -#### Returns - -`void` - -#### Example - -```typescript -// Simple logout (reloads page) -client.auth.logout(); - -// Logout and redirect to login page -client.auth.logout('/login'); - -// Logout and redirect to home -client.auth.logout('/'); -``` - -### setToken() - -```ts -setToken(token, saveToStorage): void; -``` - -Set authentication token for the client - -Updates the Authorization header for all API requests and optionally -saves the token to localStorage for persistence across page reloads. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `token` | `string` | Authentication token | -| `saveToStorage` | `boolean` | Whether to save the token to localStorage (default: true) | - -#### Returns - -`void` - -#### Example - -```typescript -// Set token and save to localStorage -client.auth.setToken('your-access-token'); - -// Set token without saving (for server-side or temporary tokens) -client.auth.setToken('your-access-token', false); -``` - -### loginViaEmailPassword() - -```ts -loginViaEmailPassword( - email, - password, - turnstileToken?): Promise<{ - access_token: string; - user: any; -}>; -``` - -Login via email and password - -Authenticates a user with their email and password credentials. -On success, automatically sets the token in the client and localStorage. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | -| `password` | `string` | User's password | -| `turnstileToken?` | `string` | Optional Cloudflare Turnstile captcha token for bot protection | - -#### Returns - -`Promise`\<\{ - `access_token`: `string`; - `user`: `any`; -\}\> - -Promise resolving to login response with access_token and user data - -#### Throws - -If credentials are invalid or authentication fails - -#### Example - -```typescript -try { - const { access_token, user } = await client.auth.loginViaEmailPassword( - 'user@example.com', - 'password123' - ); - console.log(`Logged in as ${user.name}`); - // Token is automatically set in the client -} catch (error) { - console.error('Login failed:', error.message); -} -``` - -### isAuthenticated() - -```ts -isAuthenticated(): Promise; -``` - -Verify if the current user is authenticated - -Checks whether the current token is valid by attempting to fetch -the user's profile. Returns true if authenticated, false otherwise. - -#### Returns - -`Promise`\<`boolean`\> - -Promise resolving to true if authenticated, false if not - -#### Example - -```typescript -if (await client.auth.isAuthenticated()) { - console.log('User is logged in'); - const user = await client.auth.me(); -} else { - console.log('User needs to log in'); - client.auth.redirectToLogin('/dashboard'); -} -``` - -### inviteUser() - -```ts -inviteUser(userEmail, role): Promise>; -``` - -Invite a user to the application - -Sends an invitation email to the specified user with the assigned role. -The user will receive a link to complete their registration. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `userEmail` | `string` | Email address of the user to invite | -| `role` | `string` | Role to assign to the user (e.g., 'admin', 'editor', 'viewer') | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the invitation result - -#### Example - -```typescript -await client.auth.inviteUser('newuser@example.com', 'editor'); -console.log('Invitation sent!'); -``` - -### register() - -```ts -register(payload): Promise>; -``` - -Register a new user account - -Creates a new user account with email and password. May require -email verification via OTP depending on app configuration. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `payload` | \{ `email`: `string`; `password`: `string`; `turnstile_token?`: `string` \| `null`; `referral_code?`: `string` \| `null`; \} | Registration data | -| `payload.email` | `string` | User's email address | -| `payload.password` | `string` | User's password | -| `payload.turnstile_token?` | `string` \| `null` | Optional Cloudflare Turnstile captcha token | -| `payload.referral_code?` | `string` \| `null` | Optional referral code | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the registration result - -#### Example - -```typescript -try { - await client.auth.register({ - email: 'newuser@example.com', - password: 'securePassword123' - }); - // Check email for verification code -} catch (error) { - console.error('Registration failed:', error.message); -} -``` - -### verifyOtp() - -```ts -verifyOtp(params): Promise>; -``` - -Verify email with OTP code - -Verifies a user's email address using the one-time password (OTP) -sent to their email during registration. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `email`: `string`; `otpCode`: `string`; \} | Verification parameters | -| `params.email` | `string` | User's email address | -| `params.otpCode` | `string` | One-time password code from email | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to verification result with access token - -#### Example - -```typescript -const { access_token } = await client.auth.verifyOtp({ - email: 'user@example.com', - otpCode: '123456' -}); -client.auth.setToken(access_token); -``` - -### resendOtp() - -```ts -resendOtp(email): Promise>; -``` - -Resend OTP verification code - -Sends a new OTP code to the user's email if the previous one expired -or was not received. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when OTP is sent - -#### Example - -```typescript -await client.auth.resendOtp('user@example.com'); -console.log('New verification code sent!'); -``` - -### resetPasswordRequest() - -```ts -resetPasswordRequest(email): Promise>; -``` - -Request password reset - -Initiates the password reset process by sending a reset link -to the user's email address. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `email` | `string` | User's email address | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when reset email is sent - -#### Example - -```typescript -await client.auth.resetPasswordRequest('user@example.com'); -console.log('Password reset email sent!'); -``` - -### resetPassword() - -```ts -resetPassword(params): Promise>; -``` - -Reset password with token - -Completes the password reset process using the reset token from -the email and setting a new password. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `resetToken`: `string`; `newPassword`: `string`; \} | Reset parameters | -| `params.resetToken` | `string` | Reset token from email link | -| `params.newPassword` | `string` | New password to set | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when password is reset - -#### Example - -```typescript -// Extract token from email link -const urlParams = new URLSearchParams(window.location.search); -const resetToken = urlParams.get('reset_token'); - -await client.auth.resetPassword({ - resetToken, - newPassword: 'newSecurePassword123' -}); -console.log('Password reset successful!'); -``` - -### changePassword() - -```ts -changePassword(params): Promise>; -``` - -Change password for authenticated user - -Allows a logged-in user to change their password by providing -their current password and a new password. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `params` | \{ `userId`: `string`; `currentPassword`: `string`; `newPassword`: `string`; \} | Change password parameters | -| `params.userId` | `string` | User's ID | -| `params.currentPassword` | `string` | Current password for verification | -| `params.newPassword` | `string` | New password to set | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving when password is changed - -#### Throws - -If current password is incorrect - -#### Example - -```typescript -const user = await client.auth.me(); - -try { - await client.auth.changePassword({ - userId: user.id, - currentPassword: 'oldPassword123', - newPassword: 'newSecurePassword456' - }); - console.log('Password changed successfully!'); -} catch (error) { - console.error('Failed to change password:', error.message); -} -``` diff --git a/docs/api-reference/modules/entities/README.mdx b/docs/api-reference/modules/entities/README.mdx deleted file mode 100644 index 80e1184..0000000 --- a/docs/api-reference/modules/entities/README.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / modules/entities - -# modules/entities - -## Functions - -| Function | Description | -| ------ | ------ | -| [createEntitiesModule](./modules/entities/functions/createEntitiesModule.mdx) | Creates the entities module for the Base44 SDK | diff --git a/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx b/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx deleted file mode 100644 index 07afeb5..0000000 --- a/docs/api-reference/modules/entities/functions/createEntitiesModule.mdx +++ /dev/null @@ -1,28 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/entities](./modules/entities/README.mdx) / createEntitiesModule - -# createEntitiesModule() - -```ts -function createEntitiesModule(axios, appId): object; -``` - -Defined in: [modules/entities.ts:9](https://github.com/base44/sdk/blob/main/src/modules/entities.ts#L9) - -Creates the entities module for the Base44 SDK - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `axios` | `AxiosInstance` | Axios instance | -| `appId` | `string` | Application ID | - -## Returns - -`object` - -Entities module diff --git a/docs/api-reference/modules/functions/README.mdx b/docs/api-reference/modules/functions/README.mdx deleted file mode 100644 index a0abc95..0000000 --- a/docs/api-reference/modules/functions/README.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / modules/functions - -# modules/functions - -## Functions - -| Function | Description | -| ------ | ------ | -| [createFunctionsModule](./modules/functions/functions/createFunctionsModule.mdx) | Creates the functions module for the Base44 SDK | diff --git a/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx b/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx deleted file mode 100644 index 0ed9da1..0000000 --- a/docs/api-reference/modules/functions/functions/createFunctionsModule.mdx +++ /dev/null @@ -1,80 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/functions](./modules/functions/README.mdx) / createFunctionsModule - -# createFunctionsModule() - -```ts -function createFunctionsModule(axios, appId): object; -``` - -Defined in: [modules/functions.ts:14](https://github.com/base44/sdk/blob/main/src/modules/functions.ts#L14) - -Creates the functions module for the Base44 SDK - -Provides access to invoke custom cloud functions defined in your Base44 application. -Functions can be used to execute custom server-side logic, perform complex operations, -or integrate with external services. - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `axios` | `AxiosInstance` | Axios instance for API requests | -| `appId` | `string` | Application ID | - -## Returns - -Functions module with invoke method - -### invoke() - -```ts -invoke(functionName, data): Promise>; -``` - -Invoke a custom function by name - -Executes a cloud function defined in your Base44 application with the provided -parameters. Automatically handles file uploads when File objects are included. - -#### Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `functionName` | `string` | Name of the function to invoke | -| `data` | `Record`\<`string`, `any`\> | Object containing named parameters for the function | - -#### Returns - -`Promise`\<`AxiosResponse`\<`any`, `any`\>\> - -Promise resolving to the function's response - -#### Throws - -If function doesn't exist or execution fails - -#### Example - -```typescript -// Simple function call -const result = await client.functions.invoke('calculateTotal', { - items: ['item1', 'item2'], - discount: 0.1 -}); - -// Function with file upload -const fileInput = document.querySelector('input[type="file"]'); -const result = await client.functions.invoke('processImage', { - image: fileInput.files[0], - filter: 'grayscale' -}); - -// Service role function invocation -const adminResult = await client.asServiceRole.functions.invoke('adminTask', { - action: 'cleanup' -}); -``` diff --git a/docs/api-reference/modules/integrations/README.mdx b/docs/api-reference/modules/integrations/README.mdx deleted file mode 100644 index d31e967..0000000 --- a/docs/api-reference/modules/integrations/README.mdx +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / modules/integrations - -# modules/integrations - -## Functions - -| Function | Description | -| ------ | ------ | -| [createIntegrationsModule](./modules/integrations/functions/createIntegrationsModule.mdx) | Creates the integrations module for the Base44 SDK | diff --git a/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx b/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx deleted file mode 100644 index 9371b05..0000000 --- a/docs/api-reference/modules/integrations/functions/createIntegrationsModule.mdx +++ /dev/null @@ -1,28 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [modules/integrations](./modules/integrations/README.mdx) / createIntegrationsModule - -# createIntegrationsModule() - -```ts -function createIntegrationsModule(axios, appId): object; -``` - -Defined in: [modules/integrations.ts:9](https://github.com/base44/sdk/blob/main/src/modules/integrations.ts#L9) - -Creates the integrations module for the Base44 SDK - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `axios` | `AxiosInstance` | Axios instance | -| `appId` | `string` | Application ID | - -## Returns - -`object` - -Integrations module diff --git a/docs/api-reference/utils/auth-utils/README.mdx b/docs/api-reference/utils/auth-utils/README.mdx deleted file mode 100644 index 0005ce6..0000000 --- a/docs/api-reference/utils/auth-utils/README.mdx +++ /dev/null @@ -1,16 +0,0 @@ -[**@base44/sdk v0.8.3**](../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / utils/auth-utils - -# utils/auth-utils - -## Functions - -| Function | Description | -| ------ | ------ | -| [getAccessToken](./utils/auth-utils/functions/getAccessToken.mdx) | Retrieves an access token from either localStorage or URL parameters | -| [saveAccessToken](./utils/auth-utils/functions/saveAccessToken.mdx) | Saves an access token to localStorage | -| [removeAccessToken](./utils/auth-utils/functions/removeAccessToken.mdx) | Removes the access token from localStorage | -| [getLoginUrl](./utils/auth-utils/functions/getLoginUrl.mdx) | Constructs the absolute URL for the login page | diff --git a/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx deleted file mode 100644 index aa46aa9..0000000 --- a/docs/api-reference/utils/auth-utils/functions/getAccessToken.mdx +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / getAccessToken - -# getAccessToken() - -```ts -function getAccessToken(options): string | null; -``` - -Defined in: [utils/auth-utils.ts:15](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L15) - -Retrieves an access token from either localStorage or URL parameters - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `options` | \{ `storageKey?`: `string`; `paramName?`: `string`; `saveToStorage?`: `boolean`; `removeFromUrl?`: `boolean`; \} | Configuration options | -| `options.storageKey?` | `string` | The key to use in localStorage | -| `options.paramName?` | `string` | The URL parameter name | -| `options.saveToStorage?` | `boolean` | Whether to save the token to localStorage if found in URL | -| `options.removeFromUrl?` | `boolean` | Whether to remove the token from URL after retrieval | - -## Returns - -`string` \| `null` - -The access token or null if not found diff --git a/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx b/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx deleted file mode 100644 index 6f569de..0000000 --- a/docs/api-reference/utils/auth-utils/functions/getLoginUrl.mdx +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / getLoginUrl - -# getLoginUrl() - -```ts -function getLoginUrl(nextUrl, options): string; -``` - -Defined in: [utils/auth-utils.ts:138](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L138) - -Constructs the absolute URL for the login page - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `nextUrl` | `string` | URL to redirect back to after login | -| `options` | \{ `serverUrl`: `string`; `appId`: `string`; `loginPath?`: `string`; \} | Configuration options | -| `options.serverUrl` | `string` | Server URL (e.g., 'https://base44.app') | -| `options.appId` | `string` | Application ID | -| `options.loginPath?` | `string` | Path to the login endpoint | - -## Returns - -`string` - -The complete login URL diff --git a/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx deleted file mode 100644 index 1650e8b..0000000 --- a/docs/api-reference/utils/auth-utils/functions/removeAccessToken.mdx +++ /dev/null @@ -1,28 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / removeAccessToken - -# removeAccessToken() - -```ts -function removeAccessToken(options): boolean; -``` - -Defined in: [utils/auth-utils.ts:112](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L112) - -Removes the access token from localStorage - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `options` | \{ `storageKey?`: `string`; \} | Configuration options | -| `options.storageKey?` | `string` | The key to use in localStorage | - -## Returns - -`boolean` - -Success status diff --git a/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx b/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx deleted file mode 100644 index 2eb2cff..0000000 --- a/docs/api-reference/utils/auth-utils/functions/saveAccessToken.mdx +++ /dev/null @@ -1,29 +0,0 @@ -[**@base44/sdk v0.8.3**](../../../README.mdx) - -*** - -[@base44/sdk](./README.mdx) / [utils/auth-utils](./utils/auth-utils/README.mdx) / saveAccessToken - -# saveAccessToken() - -```ts -function saveAccessToken(token, options): boolean; -``` - -Defined in: [utils/auth-utils.ts:82](https://github.com/base44/sdk/blob/main/src/utils/auth-utils.ts#L82) - -Saves an access token to localStorage - -## Parameters - -| Parameter | Type | Description | -| ------ | ------ | ------ | -| `token` | `string` | The access token to save | -| `options` | \{ `storageKey?`: `string`; \} | Configuration options | -| `options.storageKey?` | `string` | The key to use in localStorage | - -## Returns - -`boolean` - -Success status diff --git a/docs/classes/Base44Error.md b/docs/classes/Base44Error.md new file mode 100644 index 0000000..9e0c7b4 --- /dev/null +++ b/docs/classes/Base44Error.md @@ -0,0 +1,191 @@ +[**@base44/sdk**](../README.md) + +*** + +# Class: Base44Error + +Custom error class for Base44 SDK errors. + +This error is thrown when API requests fail. It extends the standard Error +class and includes additional information about the HTTP status, error code, +and response data from the server. + +## Examples + +```typescript +try { + await client.entities.Todo.get('invalid-id'); +} catch (error) { + if (error instanceof Base44Error) { + console.error('Status:', error.status); // 404 + console.error('Message:', error.message); // "Not found" + console.error('Code:', error.code); // "NOT_FOUND" + console.error('Data:', error.data); // Full response data + } +} +``` + +```typescript +// Handling authentication errors +try { + await client.auth.loginViaEmailPassword('user@example.com', 'wrong-password'); +} catch (error) { + if (error instanceof Base44Error && error.status === 401) { + console.error('Authentication failed:', error.message); + } +} +``` + +```typescript +// Serializing errors for logging +try { + await client.entities.User.create({ invalid: 'data' }); +} catch (error) { + if (error instanceof Base44Error) { + const serialized = error.toJSON(); + // Send to logging service + logger.error(serialized); + } +} +``` + +## Extends + +- `Error` + +## Constructors + +### Constructor + +> **new Base44Error**(`message`, `status`, `code`, `data`, `originalError`): `Base44Error` + +Creates a new Base44Error instance. + +#### Parameters + +##### message + +`string` + +Human-readable error message + +##### status + +`number` + +HTTP status code + +##### code + +`string` + +Error code from the API + +##### data + +`any` + +Full response data from the server + +##### originalError + +`unknown` + +Original axios error object + +#### Returns + +`Base44Error` + +#### Overrides + +`Error.constructor` + +## Properties + +### status + +> **status**: `number` + +HTTP status code of the error (e.g., 400, 401, 404, 500). + +*** + +### code + +> **code**: `string` + +Error code from the API (e.g., "NOT_FOUND", "VALIDATION_ERROR"). + +*** + +### data + +> **data**: `any` + +Full response data from the server containing error details. + +*** + +### originalError + +> **originalError**: `unknown` + +The original error object from axios. + +## Methods + +### toJSON() + +> **toJSON**(): `object` + +Serializes the error to a JSON-safe object. + +Useful for logging or sending error information to external services +without circular reference issues. + +#### Returns + +`object` + +JSON-safe representation of the error + +##### name + +> **name**: `string` + +##### message + +> **message**: `string` + +##### status + +> **status**: `number` + +##### code + +> **code**: `string` + +##### data + +> **data**: `any` + +#### Example + +```typescript +try { + await client.entities.Todo.get('invalid-id'); +} catch (error) { + if (error instanceof Base44Error) { + const json = error.toJSON(); + console.log(json); + // { + // name: "Base44Error", + // message: "Not found", + // status: 404, + // code: "NOT_FOUND", + // data: { ... } + // } + } +} +``` diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md new file mode 100644 index 0000000..6b42962 --- /dev/null +++ b/docs/functions/createClient.md @@ -0,0 +1,74 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: createClient() + +> **createClient**(`config`): [`Base44Client`](../interfaces/Base44Client.md) + +Creates a Base44 SDK client instance. + +This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [entities](../type-aliases/EntitiesModule.md), [auth](../interfaces/AuthModule.md), and [functions](../interfaces/FunctionsModule.md). + +The client supports two authentication modes: +- **User authentication** (default): Access modules with user-level permissions using `client.moduleName`. +- **Service role authentication**: Access modules with elevated permissions using `client.asServiceRole.moduleName`. + +Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. + +For example, when using the [entities](../type-aliases/EntitiesModule.md) module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. + +To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in your application's frontend. + + The [auth](../interfaces/AuthModule.md) module is only available with user authentication for security reasons. + +## Parameters + +### config + +[`CreateClientConfig`](../type-aliases/CreateClientConfig.md) + +## Returns + +[`Base44Client`](../interfaces/Base44Client.md) + +## Examples + +```typescript +// Basic client setup +import { createClient } from '@base44/client-sdk'; + +const client = createClient({ + appId: 'my-app-id' +}); + +// Use client modules +const products = await client.entities.Products.list(); +const user = await client.auth.me(); +``` + +```typescript +// Client with service role access +const client = createClient({ + appId: 'my-app-id', + token: 'user-token', + serviceToken: 'service-role-token' +}); + +// Access service-role-only modules +const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); +const oauthToken = await client.asServiceRole.connectors.getAccessToken('google'); +``` + +```typescript +// Client with error handling +const client = createClient({ + appId: 'my-app-id', + options: { + onError: (error) => { + console.error('API Error:', error); + Sentry.captureException(error); + } + } +}); +``` diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md new file mode 100644 index 0000000..10b65c5 --- /dev/null +++ b/docs/functions/createClientFromRequest.md @@ -0,0 +1,55 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: createClientFromRequest() + +> **createClientFromRequest**(`request`): [`Base44Client`](../interfaces/Base44Client.md) + +Creates a Base44 client from an HTTP request. + +Creates a client by automatically extracting authentication tokens and configuration from request with authentication information in their headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from your app frontend to your backend functions. + +## Parameters + +### request + +`Request` + +## Returns + +[`Base44Client`](../interfaces/Base44Client.md) + +## Throws + +When Base44-App-Id header is missing. + +## Throws + +When authorization headers have invalid format. + +## Example + +```typescript +// Frontend call to a backend function +const response = await client.functions.invoke('myBackendFunction', {}); + +// Backend function that receives the call +import { createClientFromRequest } from '@base44/client-sdk'; + +Deno.serve(async (req) => { + try { + const base44 = createClientFromRequest(req); + const user = await base44.auth.me(); + + if (!user) { + return Response.json({ error: 'Unauthorized' }, { status: 401 }); + } + + // Use the client to access the API + + } catch (error) { + return Response.json({ error: error.message }, { status: 500 }); + } +}); +``` diff --git a/docs/functions/getAccessToken.md b/docs/functions/getAccessToken.md new file mode 100644 index 0000000..2f0f237 --- /dev/null +++ b/docs/functions/getAccessToken.md @@ -0,0 +1,17 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: getAccessToken() + +> **getAccessToken**(`options`): `string` \| `null` + +## Parameters + +### options + +[`GetAccessTokenOptions`](../interfaces/GetAccessTokenOptions.md) = `{}` + +## Returns + +`string` \| `null` diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md new file mode 100644 index 0000000..af6e6dc --- /dev/null +++ b/docs/functions/getLoginUrl.md @@ -0,0 +1,21 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: getLoginUrl() + +> **getLoginUrl**(`nextUrl`, `options`): `string` + +## Parameters + +### nextUrl + +`string` + +### options + +[`GetLoginUrlOptions`](../interfaces/GetLoginUrlOptions.md) + +## Returns + +`string` diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md new file mode 100644 index 0000000..bda3bec --- /dev/null +++ b/docs/functions/removeAccessToken.md @@ -0,0 +1,17 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: removeAccessToken() + +> **removeAccessToken**(`options`): `boolean` + +## Parameters + +### options + +[`RemoveAccessTokenOptions`](../interfaces/RemoveAccessTokenOptions.md) + +## Returns + +`boolean` diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md new file mode 100644 index 0000000..044900f --- /dev/null +++ b/docs/functions/saveAccessToken.md @@ -0,0 +1,21 @@ +[**@base44/sdk**](../README.md) + +*** + +# Function: saveAccessToken() + +> **saveAccessToken**(`token`, `options`): `boolean` + +## Parameters + +### token + +`string` + +### options + +[`SaveAccessTokenOptions`](../interfaces/SaveAccessTokenOptions.md) + +## Returns + +`boolean` diff --git a/docs/interfaces/AgentsModule.md b/docs/interfaces/AgentsModule.md new file mode 100644 index 0000000..acb49f8 --- /dev/null +++ b/docs/interfaces/AgentsModule.md @@ -0,0 +1,297 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AgentsModule + +Agents module for managing AI agent conversations. + +This module provides methods to create and manage conversations with AI agents, +send messages, and subscribe to real-time updates. Conversations can be used +for chat interfaces, support systems, or any interactive AI application. + +**Real-time Updates:** +The agents module supports real-time updates through WebSocket subscriptions, +allowing you to receive instant notifications when new messages arrive. + +**Available with both auth modes:** +- User auth: `client.agents.method(...)` +- Service role: `client.asServiceRole.agents.method(...)` + +## Example + +```typescript +// Create a new conversation +const conversation = await client.agents.createConversation({ + agent_name: 'support-agent', + metadata: { user_id: 'user-123' } +}); + +// Subscribe to real-time updates +const unsubscribe = client.agents.subscribeToConversation( + conversation.id, + (updatedConversation) => { + console.log('New messages:', updatedConversation.messages); + } +); + +// Send a message +await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help!' +}); + +// Clean up subscription +unsubscribe(); +``` + +## Methods + +### getConversations() + +> **getConversations**(): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> + +Get all conversations for the current user. + +Retrieves all agent conversations without filtering. + +#### Returns + +`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> + +Promise resolving to an array of conversations + +#### Example + +```typescript +const conversations = await client.agents.getConversations(); +console.log(`Total conversations: ${conversations.length}`); +``` + +*** + +### getConversation() + +> **getConversation**(`conversationId`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> + +Get a specific conversation by ID. + +#### Parameters + +##### conversationId + +`string` + +The unique identifier of the conversation + +#### Returns + +`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> + +Promise resolving to the conversation, or undefined if not found + +#### Example + +```typescript +const conversation = await client.agents.getConversation('conv-123'); +if (conversation) { + console.log(`Conversation has ${conversation.messages.length} messages`); +} +``` + +*** + +### listConversations() + +> **listConversations**(`filterParams`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> + +List conversations with filtering and pagination. + +#### Parameters + +##### filterParams + +[`ModelFilterParams`](../type-aliases/ModelFilterParams.md) + +Filter parameters for querying conversations + +#### Returns + +`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> + +Promise resolving to an array of filtered conversations + +#### Example + +```typescript +const recentConversations = await client.agents.listConversations({ + limit: 10, + sort: '-created_date' +}); +``` + +*** + +### createConversation() + +> **createConversation**(`conversation`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> + +Create a new conversation with an agent. + +#### Parameters + +##### conversation + +Conversation details including agent name and optional metadata + +###### agent_name + +`string` + +###### metadata? + +`Record`\<..., ...\> + +#### Returns + +`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> + +Promise resolving to the created conversation + +#### Example + +```typescript +const conversation = await client.agents.createConversation({ + agent_name: 'support-agent', + metadata: { + user_id: 'user-123', + category: 'technical-support' + } +}); +console.log(`Created conversation: ${conversation.id}`); +``` + +*** + +### addMessage() + +> **addMessage**(`conversation`, `message`): `Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> + +Add a message to a conversation. + +Sends a message to the agent and updates the conversation. This method +also updates the real-time socket to notify any subscribers. + +#### Parameters + +##### conversation + +[`AgentConversation`](../type-aliases/AgentConversation.md) + +The conversation to add the message to + +##### message + +`Partial`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> + +The message to add + +#### Returns + +`Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> + +Promise resolving to the created message + +#### Example + +```typescript +const message = await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help with my order #12345' +}); +console.log(`Message sent with ID: ${message.id}`); +``` + +*** + +### subscribeToConversation() + +> **subscribeToConversation**(`conversationId`, `onUpdate?`): () => `void` + +Subscribe to real-time updates for a conversation. + +Establishes a WebSocket connection to receive instant updates when new +messages are added to the conversation. Returns an unsubscribe function +to clean up the connection. + +#### Parameters + +##### conversationId + +`string` + +The conversation ID to subscribe to + +##### onUpdate? + +(`conversation`) => `void` + +Callback function called when the conversation is updated + +#### Returns + +Unsubscribe function to stop receiving updates + +> (): `void` + +##### Returns + +`void` + +#### Example + +```typescript +const unsubscribe = client.agents.subscribeToConversation( + 'conv-123', + (updatedConversation) => { + const latestMessage = updatedConversation.messages[updatedConversation.messages.length - 1]; + console.log('New message:', latestMessage.content); + } +); + +// Later, clean up the subscription +unsubscribe(); +``` + +*** + +### getWhatsAppConnectURL() + +> **getWhatsAppConnectURL**(`agentName`): `string` + +Get WhatsApp connection URL for an agent. + +Generates a URL that users can use to connect with the agent through WhatsApp. +The URL includes authentication if a token is available. + +#### Parameters + +##### agentName + +`string` + +The name of the agent + +#### Returns + +`string` + +WhatsApp connection URL + +#### Example + +```typescript +const whatsappUrl = client.agents.getWhatsAppConnectURL('support-agent'); +console.log(`Connect through WhatsApp: ${whatsappUrl}`); +// User can open this URL to start a WhatsApp conversation +``` diff --git a/docs/interfaces/AppConversationLike.md b/docs/interfaces/AppConversationLike.md new file mode 100644 index 0000000..6c45428 --- /dev/null +++ b/docs/interfaces/AppConversationLike.md @@ -0,0 +1,29 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AppConversationLike + +## Properties + +### id? + +> `optional` **id**: `string` \| `null` + +*** + +### messages? + +> `optional` **messages**: [`AppMessageContent`](AppMessageContent.md)[] \| `null` + +*** + +### model? + +> `optional` **model**: `string` + +*** + +### functions\_fail\_silently? + +> `optional` **functions\_fail\_silently**: `boolean` diff --git a/docs/interfaces/AppConversationMessage.md b/docs/interfaces/AppConversationMessage.md new file mode 100644 index 0000000..3c26f96 --- /dev/null +++ b/docs/interfaces/AppConversationMessage.md @@ -0,0 +1,65 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AppConversationMessage + +## Extends + +- [`AppMessageContent`](AppMessageContent.md) + +## Indexable + +\[`key`: `string`\]: `unknown` + +## Properties + +### content? + +> `optional` **content**: `string` + +#### Inherited from + +[`AppMessageContent`](AppMessageContent.md).[`content`](AppMessageContent.md#content) + +*** + +### file\_urls? + +> `optional` **file\_urls**: `string`[] + +#### Inherited from + +[`AppMessageContent`](AppMessageContent.md).[`file_urls`](AppMessageContent.md#file_urls) + +*** + +### custom\_context? + +> `optional` **custom\_context**: `unknown` + +#### Inherited from + +[`AppMessageContent`](AppMessageContent.md).[`custom_context`](AppMessageContent.md#custom_context) + +*** + +### additional\_message\_params? + +> `optional` **additional\_message\_params**: `Record`\<`string`, `unknown`\> + +#### Inherited from + +[`AppMessageContent`](AppMessageContent.md).[`additional_message_params`](AppMessageContent.md#additional_message_params) + +*** + +### id? + +> `optional` **id**: `string` \| `null` + +*** + +### role? + +> `optional` **role**: `string` diff --git a/docs/interfaces/AppLike.md b/docs/interfaces/AppLike.md new file mode 100644 index 0000000..4aac5c3 --- /dev/null +++ b/docs/interfaces/AppLike.md @@ -0,0 +1,301 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AppLike + +## Properties + +### id? + +> `optional` **id**: `string` + +*** + +### conversation? + +> `optional` **conversation**: [`AppConversationLike`](AppConversationLike.md) \| `null` + +*** + +### app\_stage? + +> `optional` **app\_stage**: `string` + +*** + +### created\_date? + +> `optional` **created\_date**: `string` + +*** + +### updated\_date? + +> `optional` **updated\_date**: `string` + +*** + +### created\_by? + +> `optional` **created\_by**: `string` + +*** + +### organization\_id? + +> `optional` **organization\_id**: `string` + +*** + +### name? + +> `optional` **name**: `string` + +*** + +### user\_description? + +> `optional` **user\_description**: `string` + +*** + +### entities? + +> `optional` **entities**: `Record`\<`string`, `any`\> + +*** + +### additional\_user\_data\_schema? + +> `optional` **additional\_user\_data\_schema**: `any` + +*** + +### pages? + +> `optional` **pages**: `object` + +#### Index Signature + +\[`key`: `string`\]: `string` + +*** + +### components + +> **components**: `object` + +#### Index Signature + +\[`key`: `string`\]: `any` + +*** + +### layout? + +> `optional` **layout**: `string` + +*** + +### globals\_css? + +> `optional` **globals\_css**: `string` + +*** + +### agents? + +> `optional` **agents**: `Record`\<`string`, `any`\> + +*** + +### logo\_url? + +> `optional` **logo\_url**: `string` + +*** + +### slug? + +> `optional` **slug**: `string` + +*** + +### public\_settings? + +> `optional` **public\_settings**: `string` + +*** + +### is\_blocked? + +> `optional` **is\_blocked**: `boolean` + +*** + +### github\_repo\_url? + +> `optional` **github\_repo\_url**: `string` + +*** + +### main\_page? + +> `optional` **main\_page**: `string` + +*** + +### installable\_integrations? + +> `optional` **installable\_integrations**: `any` + +*** + +### backend\_project? + +> `optional` **backend\_project**: [`DenoProjectLike`](DenoProjectLike.md) + +*** + +### last\_deployed\_at? + +> `optional` **last\_deployed\_at**: `string` + +*** + +### is\_remixable? + +> `optional` **is\_remixable**: `boolean` + +*** + +### remixed\_from\_app\_id? + +> `optional` **remixed\_from\_app\_id**: `string` + +*** + +### hide\_entity\_created\_by? + +> `optional` **hide\_entity\_created\_by**: `boolean` + +*** + +### platform\_version? + +> `optional` **platform\_version**: `number` + +*** + +### enable\_username\_password? + +> `optional` **enable\_username\_password**: `boolean` + +*** + +### auth\_config? + +> `optional` **auth\_config**: [`AuthConfigLike`](AuthConfigLike.md) + +*** + +### status? + +> `optional` **status**: `object` + +#### state? + +> `optional` **state**: ... \| ... + +#### details? + +> `optional` **details**: `any` + +#### last\_updated\_date? + +> `optional` **last\_updated\_date**: ... \| ... + +*** + +### custom\_instructions? + +> `optional` **custom\_instructions**: `any` + +*** + +### frozen\_files? + +> `optional` **frozen\_files**: `string`[] + +*** + +### deep\_coding\_mode? + +> `optional` **deep\_coding\_mode**: `boolean` + +*** + +### needs\_to\_add\_diff? + +> `optional` **needs\_to\_add\_diff**: `boolean` + +*** + +### installed\_integration\_context\_items? + +> `optional` **installed\_integration\_context\_items**: `any`[] + +*** + +### model? + +> `optional` **model**: `string` + +*** + +### is\_starred? + +> `optional` **is\_starred**: `boolean` + +*** + +### agents\_enabled? + +> `optional` **agents\_enabled**: `boolean` + +*** + +### categories? + +> `optional` **categories**: `string`[] + +*** + +### functions? + +> `optional` **functions**: `any` + +*** + +### function\_names? + +> `optional` **function\_names**: `string`[] + +*** + +### user\_entity? + +> `optional` **user\_entity**: [`UserEntityLike`](UserEntityLike.md) + +*** + +### app\_code\_hash? + +> `optional` **app\_code\_hash**: `string` + +*** + +### has\_backend\_functions\_enabled? + +> `optional` **has\_backend\_functions\_enabled**: `boolean` diff --git a/docs/interfaces/AppLogsModule.md b/docs/interfaces/AppLogsModule.md new file mode 100644 index 0000000..b663e3f --- /dev/null +++ b/docs/interfaces/AppLogsModule.md @@ -0,0 +1,171 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AppLogsModule + +App Logs module for tracking and analyzing application usage. + +This module provides methods to log user activity, fetch logs, and retrieve +statistics about your application's usage. Useful for analytics, monitoring, +and understanding user behavior. + +**Available with both auth modes:** +- User auth: `client.appLogs.method(...)` +- Service role: `client.asServiceRole.appLogs.method(...)` + +## Example + +```typescript +// Log user visiting a page +await client.appLogs.logUserInApp('dashboard'); + +// Fetch recent logs +const logs = await client.appLogs.fetchLogs({ + limit: 100, + sort: '-timestamp' +}); + +// Get application statistics +const stats = await client.appLogs.getStats({ + startDate: '2024-01-01', + endDate: '2024-01-31' +}); +``` + +## Methods + +### logUserInApp() + +> **logUserInApp**(`pageName`): `Promise`\<`void`\> + +Log user activity in the application. + +Records when a user visits a specific page or section of your application. +Useful for tracking user navigation patterns and popular features. + +#### Parameters + +##### pageName + +`string` + +Name of the page or section being visited + +#### Returns + +`Promise`\<`void`\> + +Promise that resolves when the log is recorded + +#### Example + +```typescript +// Log page visit +await client.appLogs.logUserInApp('home'); +await client.appLogs.logUserInApp('profile'); +await client.appLogs.logUserInApp('settings'); + +// Log specific feature usage +await client.appLogs.logUserInApp('checkout-page'); +await client.appLogs.logUserInApp('product-details'); +``` + +*** + +### fetchLogs() + +> **fetchLogs**(`params?`): `Promise`\<`any`\> + +Fetch application logs with optional filtering. + +Retrieves logs of user activity with support for filtering, pagination, +and sorting. Use this to analyze user behavior and application usage patterns. + +#### Parameters + +##### params? + +`Record`\<`string`, `any`\> + +Query parameters for filtering logs (limit, sort, date ranges, etc.) + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the logs data + +#### Example + +```typescript +// Fetch all logs +const allLogs = await client.appLogs.fetchLogs(); + +// Fetch logs with pagination +const recentLogs = await client.appLogs.fetchLogs({ + limit: 50, + skip: 0, + sort: '-timestamp' +}); + +// Fetch logs for a specific page +const dashboardLogs = await client.appLogs.fetchLogs({ + pageName: 'dashboard' +}); + +// Fetch logs within a date range +const periodLogs = await client.appLogs.fetchLogs({ + startDate: '2024-01-01', + endDate: '2024-01-31' +}); +``` + +*** + +### getStats() + +> **getStats**(`params?`): `Promise`\<`any`\> + +Get application usage statistics. + +Retrieves aggregated statistics about application usage, such as page views, +active users, and popular features. Useful for dashboards and analytics. + +#### Parameters + +##### params? + +`Record`\<`string`, `any`\> + +Query parameters for filtering statistics (date ranges, grouping, etc.) + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the statistics data + +#### Example + +```typescript +// Get overall stats +const stats = await client.appLogs.getStats(); + +// Get stats for a specific time period +const monthlyStats = await client.appLogs.getStats({ + startDate: '2024-01-01', + endDate: '2024-01-31' +}); + +// Get stats grouped by page +const pageStats = await client.appLogs.getStats({ + groupBy: 'page' +}); + +// Get daily active users +const dailyStats = await client.appLogs.getStats({ + period: 'daily', + metric: 'active_users' +}); +``` diff --git a/docs/interfaces/AppMessageContent.md b/docs/interfaces/AppMessageContent.md new file mode 100644 index 0000000..6aa8e59 --- /dev/null +++ b/docs/interfaces/AppMessageContent.md @@ -0,0 +1,37 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AppMessageContent + +## Extended by + +- [`AppConversationMessage`](AppConversationMessage.md) + +## Indexable + +\[`key`: `string`\]: `unknown` + +## Properties + +### content? + +> `optional` **content**: `string` + +*** + +### file\_urls? + +> `optional` **file\_urls**: `string`[] + +*** + +### custom\_context? + +> `optional` **custom\_context**: `unknown` + +*** + +### additional\_message\_params? + +> `optional` **additional\_message\_params**: `Record`\<`string`, `unknown`\> diff --git a/docs/interfaces/AuthConfigLike.md b/docs/interfaces/AuthConfigLike.md new file mode 100644 index 0000000..240a81f --- /dev/null +++ b/docs/interfaces/AuthConfigLike.md @@ -0,0 +1,41 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AuthConfigLike + +## Properties + +### enable\_username\_password? + +> `optional` **enable\_username\_password**: `boolean` + +*** + +### enable\_google\_login? + +> `optional` **enable\_google\_login**: `boolean` + +*** + +### enable\_microsoft\_login? + +> `optional` **enable\_microsoft\_login**: `boolean` + +*** + +### enable\_facebook\_login? + +> `optional` **enable\_facebook\_login**: `boolean` + +*** + +### sso\_provider\_name? + +> `optional` **sso\_provider\_name**: `string` + +*** + +### enable\_sso\_login? + +> `optional` **enable\_sso\_login**: `boolean` diff --git a/docs/interfaces/AuthModule.md b/docs/interfaces/AuthModule.md new file mode 100644 index 0000000..015b491 --- /dev/null +++ b/docs/interfaces/AuthModule.md @@ -0,0 +1,564 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: AuthModule + +Authentication module for managing user authentication and authorization. + +This module provides comprehensive authentication functionality including: +- Email/password login and registration +- Token management +- User profile access and updates +- Password reset flows +- OTP verification +- User invitations + +**Browser-Only Features:** +Some methods like `redirectToLogin()` and `logout()` only work in browser +environments as they interact with localStorage and window.location. + +**Token Storage:** +The module automatically stores tokens in localStorage (when available) and +manages Authorization headers for API requests. + +## Example + +```typescript +// Login with email and password +const { access_token, user } = await client.auth.loginViaEmailPassword( + 'user@example.com', + 'password123' +); + +// Check if user is authenticated +const isAuth = await client.auth.isAuthenticated(); + +// Get current user profile +const currentUser = await client.auth.me(); + +// Logout +client.auth.logout(); +``` + +## Methods + +### me() + +> **me**(): `Promise`\<`any`\> + +Get the current authenticated user's information. + +Retrieves the profile data for the currently authenticated user. + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the user's profile data + +#### Example + +```typescript +const user = await client.auth.me(); +console.log(`Logged in as: ${user.email}`); +console.log(`User ID: ${user.id}`); +``` + +*** + +### updateMe() + +> **updateMe**(`data`): `Promise`\<`any`\> + +Update the current authenticated user's information. + +Updates profile fields for the currently authenticated user. + +#### Parameters + +##### data + +`Record`\<`string`, `any`\> + +Object containing the fields to update + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the updated user data + +#### Example + +```typescript +const updatedUser = await client.auth.updateMe({ + name: 'John Doe', + bio: 'Software developer' +}); +``` + +*** + +### redirectToLogin() + +> **redirectToLogin**(`nextUrl`): `void` + +Redirect the user to the app's login page. + +**Browser only:** This method only works in browser environments. + +Redirects the user to your app's login page with a callback URL +to return to after successful authentication. + +#### Parameters + +##### nextUrl + +`string` + +URL to redirect to after successful login + +#### Returns + +`void` + +#### Throws + +When not in a browser environment + +#### Example + +```typescript +// Redirect to login and come back to current page +client.auth.redirectToLogin(window.location.href); + +// Redirect to login and go to dashboard after +client.auth.redirectToLogin('/dashboard'); +``` + +*** + +### logout() + +> **logout**(`redirectUrl?`): `void` + +Logout the current user. + +**Browser only:** Full functionality requires browser environment. + +Removes the authentication token from localStorage and axios headers, +then optionally redirects to a URL or reloads the page. + +#### Parameters + +##### redirectUrl? + +`string` + +Optional URL to redirect to after logout. Reloads the page if not provided + +#### Returns + +`void` + +#### Example + +```typescript +// Logout and reload page +client.auth.logout(); + +// Logout and redirect to login page +client.auth.logout('/login'); + +// Logout and redirect to home +client.auth.logout('/'); +``` + +*** + +### setToken() + +> **setToken**(`token`, `saveToStorage?`): `void` + +Set the authentication token. + +Updates the Authorization header for API requests and optionally +saves the token to localStorage for persistence. + +#### Parameters + +##### token + +`string` + +JWT authentication token + +##### saveToStorage? + +`boolean` + +Whether to save the token to localStorage (default: true) + +#### Returns + +`void` + +#### Example + +```typescript +// Set token and save to localStorage +client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); + +// Set token without saving to localStorage +client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); +``` + +*** + +### loginViaEmailPassword() + +> **loginViaEmailPassword**(`email`, `password`, `turnstileToken?`): `Promise`\<[`LoginResponse`](LoginResponse.md)\> + +Login using email and password. + +Authenticates a user with email and password credentials. On success, +automatically sets the token for subsequent requests. + +#### Parameters + +##### email + +`string` + +User's email address + +##### password + +`string` + +User's password + +##### turnstileToken? + +`string` + +Optional Turnstile captcha token + +#### Returns + +`Promise`\<[`LoginResponse`](LoginResponse.md)\> + +Promise resolving to login response with access token and user data + +#### Example + +```typescript +try { + const { access_token, user } = await client.auth.loginViaEmailPassword( + 'user@example.com', + 'securePassword123' + ); + console.log('Login successful!', user); +} catch (error) { + console.error('Login failed:', error); +} + +// With captcha token +const response = await client.auth.loginViaEmailPassword( + 'user@example.com', + 'securePassword123', + 'captcha-token-here' +); +``` + +*** + +### isAuthenticated() + +> **isAuthenticated**(): `Promise`\<`boolean`\> + +Check if the current user is authenticated. + +Verifies whether the current token is valid by attempting to +fetch the user's profile. + +#### Returns + +`Promise`\<`boolean`\> + +Promise resolving to true if authenticated, false otherwise + +#### Example + +```typescript +const isAuth = await client.auth.isAuthenticated(); +if (isAuth) { + console.log('User is logged in'); +} else { + // Redirect to login + client.auth.redirectToLogin(window.location.href); +} +``` + +*** + +### inviteUser() + +> **inviteUser**(`userEmail`, `role`): `Promise`\<`any`\> + +Invite a user to the application. + +Sends an invitation email to a user with a specific role. + +#### Parameters + +##### userEmail + +`string` + +Email address of the user to invite + +##### role + +`string` + +Role to assign to the invited user + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the invitation response + +#### Example + +```typescript +await client.auth.inviteUser('newuser@example.com', 'editor'); +console.log('Invitation sent!'); +``` + +*** + +### register() + +> **register**(`payload`): `Promise`\<`any`\> + +Register a new user account. + +Creates a new user account with email and password. + +#### Parameters + +##### payload + +[`RegisterPayload`](RegisterPayload.md) + +Registration details including email, password, and optional fields + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the registration response + +#### Example + +```typescript +await client.auth.register({ + email: 'newuser@example.com', + password: 'securePassword123', + referral_code: 'FRIEND2024' +}); +console.log('Registration successful! Please check your email.'); +``` + +*** + +### verifyOtp() + +> **verifyOtp**(`params`): `Promise`\<`any`\> + +Verify an OTP (One-Time Password) code. + +Validates an OTP code sent to the user's email during registration +or authentication. + +#### Parameters + +##### params + +Object containing email and OTP code + +###### email + +`string` + +###### otpCode + +`string` + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the verification response + +#### Example + +```typescript +await client.auth.verifyOtp({ + email: 'user@example.com', + otpCode: '123456' +}); +console.log('Email verified!'); +``` + +*** + +### resendOtp() + +> **resendOtp**(`email`): `Promise`\<`any`\> + +Resend an OTP code to the user's email. + +Requests a new OTP code to be sent to the specified email address. + +#### Parameters + +##### email + +`string` + +Email address to send the OTP to + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the response + +#### Example + +```typescript +await client.auth.resendOtp('user@example.com'); +console.log('OTP resent! Please check your email.'); +``` + +*** + +### resetPasswordRequest() + +> **resetPasswordRequest**(`email`): `Promise`\<`any`\> + +Request a password reset. + +Sends a password reset email to the specified email address. + +#### Parameters + +##### email + +`string` + +Email address for the account to reset + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the response + +#### Example + +```typescript +await client.auth.resetPasswordRequest('user@example.com'); +console.log('Password reset email sent!'); +``` + +*** + +### resetPassword() + +> **resetPassword**(`params`): `Promise`\<`any`\> + +Reset password using a reset token. + +Completes the password reset flow by setting a new password +using the token received by email. + +#### Parameters + +##### params + +Object containing the reset token and new password + +###### resetToken + +`string` + +###### newPassword + +`string` + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the response + +#### Example + +```typescript +await client.auth.resetPassword({ + resetToken: 'token-from-email', + newPassword: 'newSecurePassword456' +}); +console.log('Password reset successful!'); +``` + +*** + +### changePassword() + +> **changePassword**(`params`): `Promise`\<`any`\> + +Change the user's password. + +Updates the password for an authenticated user by verifying +the current password and setting a new one. + +#### Parameters + +##### params + +Object containing user ID, current password, and new password + +###### userId + +`string` + +###### currentPassword + +`string` + +###### newPassword + +`string` + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the response + +#### Example + +```typescript +await client.auth.changePassword({ + userId: 'user-123', + currentPassword: 'oldPassword123', + newPassword: 'newSecurePassword456' +}); +console.log('Password changed successfully!'); +``` diff --git a/docs/interfaces/Base44Client.md b/docs/interfaces/Base44Client.md new file mode 100644 index 0000000..fb876d7 --- /dev/null +++ b/docs/interfaces/Base44Client.md @@ -0,0 +1,162 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: Base44Client + +The Base44 client instance. + +Provides access to all SDK modules and methods for interacting with your Base44 app. + +This is the main client object returned by [createClient](../functions/createClient.md) and [createClientFromRequest](../functions/createClientFromRequest.md). +It includes all SDK modules and utility methods for managing authentication and configuration. + +## Properties + +### entities + +> **entities**: [`EntitiesModule`](../type-aliases/EntitiesModule.md) + +[Entities module](../type-aliases/EntitiesModule.md) for CRUD operations on your data models. + +*** + +### integrations + +> **integrations**: [`IntegrationsModule`](../type-aliases/IntegrationsModule.md) + +[Integrations module](../type-aliases/IntegrationsModule.md) for calling pre-built integration endpoints. + +*** + +### auth + +> **auth**: [`AuthModule`](AuthModule.md) + +[Auth module](AuthModule.md) for user authentication and management. + +*** + +### functions + +> **functions**: [`FunctionsModule`](FunctionsModule.md) + +[Functions module](FunctionsModule.md) for invoking custom backend functions. + +*** + +### agents + +> **agents**: [`AgentsModule`](AgentsModule.md) + +[Agents module](AgentsModule.md) for managing AI agent conversations. + +*** + +### appLogs + +> **appLogs**: [`AppLogsModule`](AppLogsModule.md) + +[App logs module](AppLogsModule.md) for tracking application usage. + +*** + +### cleanup() + +> **cleanup**: () => `void` + +Cleanup function to disconnect WebSocket connections. Call when you're done with the client. + +#### Returns + +`void` + +*** + +### asServiceRole + +> `readonly` **asServiceRole**: `object` + +Provides access to service role modules with elevated permissions. + +Service role authentication provides elevated permissions for server-side operations. +Unlike user authentication, which is scoped to a specific user's permissions, service +role authentication has access to data and operations across all users. + +#### entities + +> **entities**: [`EntitiesModule`](../type-aliases/EntitiesModule.md) + +[Entities module](../type-aliases/EntitiesModule.md) with elevated permissions. + +#### integrations + +> **integrations**: [`IntegrationsModule`](../type-aliases/IntegrationsModule.md) + +[Integrations module](../type-aliases/IntegrationsModule.md) with elevated permissions. + +#### sso + +> **sso**: [`SsoModule`](SsoModule.md) + +[SSO module](SsoModule.md) for generating SSO tokens (service role only). + +#### connectors + +> **connectors**: [`ConnectorsModule`](ConnectorsModule.md) + +[Connectors module](ConnectorsModule.md) for OAuth token retrieval (service role only). + +#### functions + +> **functions**: [`FunctionsModule`](FunctionsModule.md) + +[Functions module](FunctionsModule.md) with elevated permissions. + +#### agents + +> **agents**: [`AgentsModule`](AgentsModule.md) + +[Agents module](AgentsModule.md) with elevated permissions. + +#### appLogs + +> **appLogs**: [`AppLogsModule`](AppLogsModule.md) + +[App logs module](AppLogsModule.md) with elevated permissions. + +#### cleanup() + +> **cleanup**: () => `void` + +Cleanup function to disconnect WebSocket connections. + +##### Returns + +`void` + +#### Throws + +When accessed without providing a serviceToken during client creation + +## Methods + +### setToken() + +> **setToken**(`newToken`): `void` + +Sets a new authentication token for all subsequent requests. + +Updates the token for both HTTP requests and WebSocket connections. + +#### Parameters + +##### newToken + +`string` + +The new authentication token + +#### Returns + +`void` diff --git a/docs/interfaces/ConnectorAccessTokenResponse.md b/docs/interfaces/ConnectorAccessTokenResponse.md new file mode 100644 index 0000000..f34330a --- /dev/null +++ b/docs/interfaces/ConnectorAccessTokenResponse.md @@ -0,0 +1,13 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: ConnectorAccessTokenResponse + +Response from the connectors access token endpoint. + +## Properties + +### access\_token + +> **access\_token**: `string` diff --git a/docs/interfaces/ConnectorsModule.md b/docs/interfaces/ConnectorsModule.md new file mode 100644 index 0000000..d0e18a6 --- /dev/null +++ b/docs/interfaces/ConnectorsModule.md @@ -0,0 +1,73 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: ConnectorsModule + +Connectors module for managing OAuth tokens for external services. + +This module allows you to retrieve OAuth access tokens for external services +that users have connected to your Base44 app. Use these tokens to make API +calls to external services on behalf of your users. + +**Important:** This module is only available with service role authentication. + +**Difference from SSO module:** +- **Connectors**: Retrieve OAuth tokens for external services (Google, Slack, etc.) + to call their APIs on behalf of users +- **SSO**: Generate tokens to authenticate your Base44 users with external systems + +## Example + +```typescript +// Retrieve Google OAuth token for a user +const response = await client.asServiceRole.connectors.getAccessToken("google"); +const googleToken = response.access_token; + +// Use the token to call Google APIs +const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { + headers: { 'Authorization': `Bearer ${googleToken}` } +}); +``` + +## Methods + +### getAccessToken() + +> **getAccessToken**(`integrationType`): `Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> + +Retrieve an OAuth access token for a specific external integration type. + +Returns the stored OAuth token for an external service that a user has +connected to your Base44 app. You can then use this token to make +authenticated API calls to that external service. + +#### Parameters + +##### integrationType + +`string` + +The type of integration (e.g., "google", "slack", "github") + +#### Returns + +`Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> + +Promise resolving to the access token response + +#### Throws + +When integrationType is not provided or is not a string + +#### Example + +```typescript +// Get Google OAuth token +const response = await client.asServiceRole.connectors.getAccessToken("google"); +console.log(response.access_token); + +// Get Slack OAuth token +const slackResponse = await client.asServiceRole.connectors.getAccessToken("slack"); +console.log(slackResponse.access_token); +``` diff --git a/docs/interfaces/DenoProjectLike.md b/docs/interfaces/DenoProjectLike.md new file mode 100644 index 0000000..ca9f2b4 --- /dev/null +++ b/docs/interfaces/DenoProjectLike.md @@ -0,0 +1,29 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: DenoProjectLike + +## Properties + +### project\_id + +> **project\_id**: `string` + +*** + +### project\_name + +> **project\_name**: `string` + +*** + +### app\_id + +> **app\_id**: `string` + +*** + +### deployment\_name\_to\_info + +> **deployment\_name\_to\_info**: `Record`\<`string`, \{ `id`: `string`; `code`: `string`; \}\> diff --git a/docs/interfaces/EntityHandler.md b/docs/interfaces/EntityHandler.md new file mode 100644 index 0000000..67667d6 --- /dev/null +++ b/docs/interfaces/EntityHandler.md @@ -0,0 +1,429 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: EntityHandler + +Entity handler providing CRUD operations for a specific entity type. + +Each entity in your Base44 app (like User, Todo, Product, etc.) gets +a handler with these methods for managing data. + +## Methods + +### list() + +> **list**(`sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> + +List entities with optional pagination and sorting. + +Retrieves all entities of this type with support for sorting, +pagination, and field selection. + +#### Parameters + +##### sort? + +`string` + +Sort parameter (e.g., "-created_date" for descending) + +##### limit? + +`number` + +Maximum number of results to return + +##### skip? + +`number` + +Number of results to skip (for pagination) + +##### fields? + +`string`[] + +Array of field names to include in the response + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to an array of entities + +#### Example + +```typescript +// Get all todos +const todos = await client.entities.Todo.list(); + +// Get first 10 todos sorted by date +const recentTodos = await client.entities.Todo.list('-created_date', 10); + +// Get paginated results (skip first 20, get next 10) +const page3 = await client.entities.Todo.list(null, 10, 20); + +// Get only specific fields +const titles = await client.entities.Todo.list(null, null, null, ['title', 'completed']); +``` + +*** + +### filter() + +> **filter**(`query`, `sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> + +Filter entities based on a query. + +Retrieves entities that match specific criteria with support for +sorting, pagination, and field selection. + +#### Parameters + +##### query + +`Record`\<`string`, `any`\> + +Filter query object with field-value pairs + +##### sort? + +`string` + +Sort parameter (e.g., "-created_date" for descending) + +##### limit? + +`number` + +Maximum number of results to return + +##### skip? + +`number` + +Number of results to skip (for pagination) + +##### fields? + +`string`[] + +Array of field names to include in the response + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to an array of filtered entities + +#### Example + +```typescript +// Filter by single field +const completedTodos = await client.entities.Todo.filter({ + completed: true +}); + +// Filter by multiple fields +const highPriorityTodos = await client.entities.Todo.filter({ + priority: 'high', + completed: false +}); + +// Filter with sorting and pagination +const results = await client.entities.Todo.filter( + { status: 'active' }, + '-created_date', + 20, + 0 +); + +// Filter with specific fields +const titles = await client.entities.Todo.filter( + { priority: 'high' }, + null, + null, + null, + ['title', 'priority'] +); +``` + +*** + +### get() + +> **get**(`id`): `Promise`\<`any`\> + +Get a single entity by ID. + +Retrieves a specific entity using its unique identifier. + +#### Parameters + +##### id + +`string` + +The unique identifier of the entity + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the entity + +#### Example + +```typescript +const todo = await client.entities.Todo.get('todo-123'); +console.log(todo.title); + +const user = await client.entities.User.get('user-456'); +console.log(user.email); +``` + +*** + +### create() + +> **create**(`data`): `Promise`\<`any`\> + +Create a new entity. + +Creates a new entity with the provided data. + +#### Parameters + +##### data + +`Record`\<`string`, `any`\> + +Object containing the entity data + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the created entity + +#### Example + +```typescript +const newTodo = await client.entities.Todo.create({ + title: 'Buy groceries', + completed: false, + priority: 'high' +}); +console.log('Created todo with ID:', newTodo.id); + +const newUser = await client.entities.User.create({ + name: 'John Doe', + email: 'john@example.com', + role: 'user' +}); +``` + +*** + +### update() + +> **update**(`id`, `data`): `Promise`\<`any`\> + +Update an existing entity. + +Updates an entity by ID with the provided data. Only the fields +included in the data object will be updated. + +#### Parameters + +##### id + +`string` + +The unique identifier of the entity to update + +##### data + +`Record`\<`string`, `any`\> + +Object containing the fields to update + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the updated entity + +#### Example + +```typescript +// Update single field +const updated = await client.entities.Todo.update('todo-123', { + completed: true +}); + +// Update multiple fields +const updated = await client.entities.Todo.update('todo-123', { + title: 'Updated title', + priority: 'low', + completed: true +}); +``` + +*** + +### delete() + +> **delete**(`id`): `Promise`\<`void`\> + +Delete a single entity by ID. + +Permanently removes an entity from the database. + +#### Parameters + +##### id + +`string` + +The unique identifier of the entity to delete + +#### Returns + +`Promise`\<`void`\> + +Promise that resolves when the entity is deleted + +#### Example + +```typescript +await client.entities.Todo.delete('todo-123'); +console.log('Todo deleted'); + +await client.entities.User.delete('user-456'); +``` + +*** + +### deleteMany() + +> **deleteMany**(`query`): `Promise`\<`void`\> + +Delete multiple entities matching a query. + +Permanently removes all entities that match the provided query. +Use with caution as this operation cannot be undone. + +#### Parameters + +##### query + +`Record`\<`string`, `any`\> + +Filter query object to match entities for deletion + +#### Returns + +`Promise`\<`void`\> + +Promise that resolves when the entities are deleted + +#### Example + +```typescript +// Delete all completed todos +await client.entities.Todo.deleteMany({ + completed: true +}); + +// Delete all low priority items +await client.entities.Todo.deleteMany({ + priority: 'low' +}); + +// Delete by multiple criteria +await client.entities.Todo.deleteMany({ + completed: true, + priority: 'low' +}); +``` + +*** + +### bulkCreate() + +> **bulkCreate**(`data`): `Promise`\<`any`\> + +Create multiple entities in a single request. + +Efficiently creates multiple entities at once. This is faster +than creating them individually. + +#### Parameters + +##### data + +`Record`\<`string`, `any`\>[] + +Array of entity data objects + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to an array of created entities + +#### Example + +```typescript +const newTodos = await client.entities.Todo.bulkCreate([ + { title: 'Task 1', completed: false }, + { title: 'Task 2', completed: false }, + { title: 'Task 3', completed: true } +]); +console.log(`Created ${newTodos.length} todos`); + +const newUsers = await client.entities.User.bulkCreate([ + { name: 'Alice', email: 'alice@example.com' }, + { name: 'Bob', email: 'bob@example.com' } +]); +``` + +*** + +### importEntities() + +> **importEntities**(`file`): `Promise`\<`any`\> + +Import entities from a file. + +**Browser only:** Requires File object from file input. + +Imports entities from a file (typically CSV or similar format). +The file format should match your entity structure. + +#### Parameters + +##### file + +`File` + +File object to import + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the import result + +#### Example + +```typescript +// In a browser with file input +const fileInput = document.querySelector('input[type="file"]'); +const file = fileInput.files[0]; + +const result = await client.entities.Todo.importEntities(file); +console.log(`Imported ${result.count} todos`); +``` diff --git a/docs/interfaces/FunctionsModule.md b/docs/interfaces/FunctionsModule.md new file mode 100644 index 0000000..26ea51a --- /dev/null +++ b/docs/interfaces/FunctionsModule.md @@ -0,0 +1,99 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: FunctionsModule + +Functions module for invoking custom backend functions. + +This module allows you to invoke custom backend functions that you've +deployed to your Base44 app. Functions can accept parameters and return +results, and support file uploads. + +Functions can be invoked with either user authentication or service role +authentication depending on your use case. + +## Example + +```typescript +// Invoke a function with parameters +const result = await client.functions.invoke('calculateTotal', { + items: ['item1', 'item2'], + discount: 0.1 +}); +console.log(result.data); + +// Invoke a function with file upload +const fileResult = await client.functions.invoke('processImage', { + image: fileInput.files[0], + filter: 'grayscale' +}); + +// Invoke with service role +const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + action: 'cleanup' +}); +``` + +## Methods + +### invoke() + +> **invoke**(`functionName`, `data`): `Promise`\<`any`\> + +Invoke a custom backend function by name. + +Calls a custom backend function that you've deployed to your Base44 app. +The function receives the provided data as named parameters and returns +the result. + +**File Upload Support:** +If any parameter is a `File` object, the request will automatically be +sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + +#### Parameters + +##### functionName + +`string` + +The name of the function to invoke + +##### data + +`Record`\<`string`, `any`\> + +An object containing named parameters for the function + +#### Returns + +`Promise`\<`any`\> + +Promise resolving to the function's response + +#### Throws + +When data is a string instead of an object + +#### Example + +```typescript +// Basic function call +const result = await client.functions.invoke('calculateTotal', { + items: ['item1', 'item2'], + discount: 0.1 +}); +console.log(result.data.total); + +// Function with file upload +const imageFile = document.querySelector('input[type="file"]').files[0]; +const processedImage = await client.functions.invoke('processImage', { + image: imageFile, + filter: 'grayscale', + quality: 80 +}); + +// Health check function +const health = await client.functions.invoke('healthCheck', {}); +console.log(health.data.status); +``` diff --git a/docs/interfaces/GetAccessTokenOptions.md b/docs/interfaces/GetAccessTokenOptions.md new file mode 100644 index 0000000..1ba0cb7 --- /dev/null +++ b/docs/interfaces/GetAccessTokenOptions.md @@ -0,0 +1,79 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: GetAccessTokenOptions + +Configuration options for retrieving an access token + +## Example + +```typescript +// Use default options +const token = getAccessToken(); + +// Custom storage key +const token = getAccessToken({ storageKey: 'my_app_token' }); + +// Get token from URL but don't save or remove from URL +const token = getAccessToken({ + saveToStorage: false, + removeFromUrl: false +}); +``` + +## Properties + +### storageKey? + +> `optional` **storageKey**: `string` + +The key to use when storing/retrieving the token in localStorage + +#### Default + +```ts +'base44_access_token' +``` + +*** + +### paramName? + +> `optional` **paramName**: `string` + +The URL parameter name to check for the access token + +#### Default + +```ts +'access_token' +``` + +*** + +### saveToStorage? + +> `optional` **saveToStorage**: `boolean` + +Whether to save the token to localStorage if found in the URL + +#### Default + +```ts +true +``` + +*** + +### removeFromUrl? + +> `optional` **removeFromUrl**: `boolean` + +Whether to remove the token from the URL after retrieval for security + +#### Default + +```ts +true +``` diff --git a/docs/interfaces/GetLoginUrlOptions.md b/docs/interfaces/GetLoginUrlOptions.md new file mode 100644 index 0000000..eeecf98 --- /dev/null +++ b/docs/interfaces/GetLoginUrlOptions.md @@ -0,0 +1,54 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: GetLoginUrlOptions + +Configuration options for constructing a login URL + +## Example + +```typescript +const loginUrl = getLoginUrl('/dashboard', { + serverUrl: 'https://base44.app', + appId: 'my-app-123' +}); +// Returns: 'https://base44.app/login?from_url=%2Fdashboard&app_id=my-app-123' + +// Custom login path +const loginUrl = getLoginUrl('/dashboard', { + serverUrl: 'https://base44.app', + appId: 'my-app-123', + loginPath: '/auth/login' +}); +``` + +## Properties + +### serverUrl + +> **serverUrl**: `string` + +The base server URL (e.g., 'https://base44.app') + +*** + +### appId + +> **appId**: `string` + +The application ID + +*** + +### loginPath? + +> `optional` **loginPath**: `string` + +The path to the login endpoint + +#### Default + +```ts +'/login' +``` diff --git a/docs/interfaces/LoginResponse.md b/docs/interfaces/LoginResponse.md new file mode 100644 index 0000000..79c301f --- /dev/null +++ b/docs/interfaces/LoginResponse.md @@ -0,0 +1,23 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: LoginResponse + +Response from login endpoints containing user information and access token. + +## Properties + +### access\_token + +> **access\_token**: `string` + +JWT access token for authentication + +*** + +### user + +> **user**: `any` + +User information diff --git a/docs/interfaces/RegisterPayload.md b/docs/interfaces/RegisterPayload.md new file mode 100644 index 0000000..f02ab3d --- /dev/null +++ b/docs/interfaces/RegisterPayload.md @@ -0,0 +1,39 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: RegisterPayload + +Payload for user registration. + +## Properties + +### email + +> **email**: `string` + +User's email address + +*** + +### password + +> **password**: `string` + +User's password + +*** + +### turnstile\_token? + +> `optional` **turnstile\_token**: `string` \| `null` + +Optional Turnstile captcha token + +*** + +### referral\_code? + +> `optional` **referral\_code**: `string` \| `null` + +Optional referral code diff --git a/docs/interfaces/RemoveAccessTokenOptions.md b/docs/interfaces/RemoveAccessTokenOptions.md new file mode 100644 index 0000000..2dbb885 --- /dev/null +++ b/docs/interfaces/RemoveAccessTokenOptions.md @@ -0,0 +1,31 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: RemoveAccessTokenOptions + +Configuration options for removing an access token + +## Example + +```typescript +// Remove token from default storage key +removeAccessToken({}); + +// Remove token from custom storage key +removeAccessToken({ storageKey: 'my_app_token' }); +``` + +## Properties + +### storageKey? + +> `optional` **storageKey**: `string` + +The key to use when removing the token from localStorage + +#### Default + +```ts +'base44_access_token' +``` diff --git a/docs/interfaces/SaveAccessTokenOptions.md b/docs/interfaces/SaveAccessTokenOptions.md new file mode 100644 index 0000000..aeb72ea --- /dev/null +++ b/docs/interfaces/SaveAccessTokenOptions.md @@ -0,0 +1,31 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: SaveAccessTokenOptions + +Configuration options for saving an access token + +## Example + +```typescript +// Use default storage key +saveAccessToken('my-token-123', {}); + +// Use custom storage key +saveAccessToken('my-token-123', { storageKey: 'my_app_token' }); +``` + +## Properties + +### storageKey? + +> `optional` **storageKey**: `string` + +The key to use when storing the token in localStorage + +#### Default + +```ts +'base44_access_token' +``` diff --git a/docs/interfaces/SsoAccessTokenResponse.md b/docs/interfaces/SsoAccessTokenResponse.md new file mode 100644 index 0000000..3c6b6e5 --- /dev/null +++ b/docs/interfaces/SsoAccessTokenResponse.md @@ -0,0 +1,13 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: SsoAccessTokenResponse + +Response from SSO access token endpoint. + +## Properties + +### access\_token + +> **access\_token**: `string` diff --git a/docs/interfaces/SsoModule.md b/docs/interfaces/SsoModule.md new file mode 100644 index 0000000..6934db7 --- /dev/null +++ b/docs/interfaces/SsoModule.md @@ -0,0 +1,52 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: SsoModule + +SSO (Single Sign-On) module for managing SSO authentication. + +This module provides methods for retrieving SSO access tokens for users. + +TODO: Add link to service role documentation once created + +## Example + +```typescript +// Access SSO module with service role +const response = await client.asServiceRole.sso.getAccessToken("user_123"); +console.log(response.data.access_token); +``` + +## Methods + +### getAccessToken() + +> **getAccessToken**(`userid`): `Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> + +Get SSO access token for a specific user. + +Retrieves a Single Sign-On access token that can be used to authenticate +a user with external services or systems. + +#### Parameters + +##### userid + +`string` + +The user ID to get the access token for + +#### Returns + +`Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> + +Promise resolving to an Axios response containing the access token + +#### Example + +```typescript +// Get SSO access token for a user +const response = await client.asServiceRole.sso.getAccessToken("user_123"); +console.log(response.data.access_token); +``` diff --git a/docs/interfaces/UserEntityLike.md b/docs/interfaces/UserEntityLike.md new file mode 100644 index 0000000..463ff1a --- /dev/null +++ b/docs/interfaces/UserEntityLike.md @@ -0,0 +1,47 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: UserEntityLike + +## Properties + +### type + +> **type**: `string` + +*** + +### name + +> **name**: `string` + +*** + +### title? + +> `optional` **title**: `string` + +*** + +### properties? + +> `optional` **properties**: `object` + +#### role? + +> `optional` **role**: ... \| ... + +#### email? + +> `optional` **email**: ... \| ... + +#### full\_name? + +> `optional` **full\_name**: ... \| ... + +*** + +### required + +> **required**: `string`[] diff --git a/docs/interfaces/UserLike.md b/docs/interfaces/UserLike.md new file mode 100644 index 0000000..fa3a7cb --- /dev/null +++ b/docs/interfaces/UserLike.md @@ -0,0 +1,11 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: UserLike + +## Properties + +### id? + +> `optional` **id**: `string` \| `null` diff --git a/docs/type-aliases/AgentConversation.md b/docs/type-aliases/AgentConversation.md new file mode 100644 index 0000000..18b3a03 --- /dev/null +++ b/docs/type-aliases/AgentConversation.md @@ -0,0 +1,57 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentConversation + +> **AgentConversation** = `object` + +An agent conversation containing messages exchanged with an AI agent. + +## Properties + +### id + +> **id**: `string` + +Unique identifier for the conversation + +*** + +### app\_id + +> **app\_id**: `string` + +Application ID + +*** + +### agent\_name + +> **agent\_name**: `string` + +Name of the agent in this conversation + +*** + +### created\_by\_id + +> **created\_by\_id**: `string` + +ID of the user who created the conversation + +*** + +### messages + +> **messages**: [`AgentMessage`](AgentMessage.md)[] + +Array of messages in the conversation + +*** + +### metadata? + +> `optional` **metadata**: `Record`\<`string`, `any`\> + +Optional metadata associated with the conversation diff --git a/docs/type-aliases/AgentMessage.md b/docs/type-aliases/AgentMessage.md new file mode 100644 index 0000000..9ddf529 --- /dev/null +++ b/docs/type-aliases/AgentMessage.md @@ -0,0 +1,143 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessage + +> **AgentMessage** = `object` + +A message in an agent conversation. + +## Properties + +### id + +> **id**: `string` + +Unique identifier for the message + +*** + +### role + +> **role**: `"user"` \| `"assistant"` \| `"system"` + +Role of the message sender + +*** + +### reasoning? + +> `optional` **reasoning**: `object` + +Optional reasoning information for the message + +#### start\_date + +> **start\_date**: `string` + +When reasoning started + +#### end\_date? + +> `optional` **end\_date**: `string` + +When reasoning ended + +#### content + +> **content**: `string` + +Reasoning content + +*** + +### content? + +> `optional` **content**: `string` \| `Record`\<..., ...\> \| `null` + +Message content (can be text or structured data) + +*** + +### file\_urls? + +> `optional` **file\_urls**: ...[] \| `null` + +URLs to files attached to the message + +*** + +### tool\_calls? + +> `optional` **tool\_calls**: ...[] \| `null` + +Tool calls made by the agent + +*** + +### usage? + +> `optional` **usage**: \{ `prompt_tokens?`: ...; `completion_tokens?`: ...; \} \| `null` + +Token usage statistics + +*** + +### hidden? + +> `optional` **hidden**: `boolean` + +Whether the message is hidden from the user + +*** + +### custom\_context? + +> `optional` **custom\_context**: ...[] \| `null` + +Custom context provided with the message + +*** + +### model? + +> `optional` **model**: `string` \| `null` + +Model used to generate the message + +*** + +### checkpoint\_id? + +> `optional` **checkpoint\_id**: `string` \| `null` + +Checkpoint ID for the message + +*** + +### metadata? + +> `optional` **metadata**: `object` + +Metadata about when and by whom the message was created + +#### created\_date + +> **created\_date**: `string` + +#### created\_by\_email + +> **created\_by\_email**: `string` + +#### created\_by\_full\_name + +> **created\_by\_full\_name**: ... \| ... + +*** + +### additional\_message\_params? + +> `optional` **additional\_message\_params**: `Record`\<`string`, `any`\> + +Additional custom parameters for the message diff --git a/docs/type-aliases/ConnectorIntegrationType.md b/docs/type-aliases/ConnectorIntegrationType.md new file mode 100644 index 0000000..c52d942 --- /dev/null +++ b/docs/type-aliases/ConnectorIntegrationType.md @@ -0,0 +1,9 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: ConnectorIntegrationType + +> **ConnectorIntegrationType** = `string` + +The type of external integration/connector (e.g., "google", "slack", "github"). diff --git a/docs/type-aliases/CreateClientConfig.md b/docs/type-aliases/CreateClientConfig.md new file mode 100644 index 0000000..601020d --- /dev/null +++ b/docs/type-aliases/CreateClientConfig.md @@ -0,0 +1,36 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: CreateClientConfig + +> **CreateClientConfig** = `object` + +Configuration for creating a Base44 client. + +## Properties + +### appId + +> **appId**: `string` + +Your Base44 application ID. + +*** + +### token? + +> `optional` **token**: `string` + +User authentication token. Use this for client-side applications where you want to +authenticate as a specific user. + +*** + +### serviceToken? + +> `optional` **serviceToken**: `string` + +Service role authentication token. Use this for server-side applications where you need +elevated permissions to access data across all users or perform admin operations. This token +should be kept secret and never exposed to the client. diff --git a/docs/type-aliases/CreateClientOptions.md b/docs/type-aliases/CreateClientOptions.md new file mode 100644 index 0000000..a23b336 --- /dev/null +++ b/docs/type-aliases/CreateClientOptions.md @@ -0,0 +1,27 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: CreateClientOptions + +> **CreateClientOptions** = `object` + +Options for creating a Base44 client. + +## Properties + +### onError()? + +> `optional` **onError**: (`error`) => `void` + +Optional error handler that will be called whenever an API error occurs. + +#### Parameters + +##### error + +`Error` + +#### Returns + +`void` diff --git a/docs/type-aliases/EntitiesModule.md b/docs/type-aliases/EntitiesModule.md new file mode 100644 index 0000000..2ec31cb --- /dev/null +++ b/docs/type-aliases/EntitiesModule.md @@ -0,0 +1,75 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: EntitiesModule + +> **EntitiesModule** = `object` + +Entities module for managing application data. + +This module provides dynamic access to all entities in your Base44 app. +Each entity (like User, Todo, Product, etc.) gets a handler with full +CRUD operations and additional utility methods. + +**Dynamic Access:** +Entities are accessed dynamically using: `client.entities.EntityName.method()` + +**Available with both auth modes:** +- User auth: `client.entities.EntityName.method(...)` +- Service role: `client.asServiceRole.entities.EntityName.method(...)` + +## Index Signature + +\[`entityName`: `string`\]: [`EntityHandler`](../interfaces/EntityHandler.md) + +Access any entity by name. + +Use this to access custom entities defined in your Base44 app. + +### Example + +```typescript +// Built-in entities +client.entities.User +client.entities.Todo + +// Custom entities +client.entities.Product +client.entities.Order +client.entities.Invoice +``` + +## Example + +```typescript +// List all todos +const todos = await client.entities.Todo.list(); + +// Filter users by role +const admins = await client.entities.User.filter({ role: 'admin' }); + +// Get specific product +const product = await client.entities.Product.get('prod-123'); + +// Create new todo +const newTodo = await client.entities.Todo.create({ + title: 'Buy groceries', + completed: false +}); + +// Update entity +await client.entities.Todo.update('todo-123', { completed: true }); + +// Delete entity +await client.entities.Todo.delete('todo-123'); + +// Bulk operations +await client.entities.Todo.bulkCreate([ + { title: 'Task 1' }, + { title: 'Task 2' } +]); + +// Delete many +await client.entities.Todo.deleteMany({ completed: true }); +``` diff --git a/docs/type-aliases/IntegrationEndpointFunction.md b/docs/type-aliases/IntegrationEndpointFunction.md new file mode 100644 index 0000000..54dcf43 --- /dev/null +++ b/docs/type-aliases/IntegrationEndpointFunction.md @@ -0,0 +1,23 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: IntegrationEndpointFunction() + +> **IntegrationEndpointFunction** = (`data`) => `Promise`\<`any`\> + +Function signature for calling an integration endpoint. + +## Parameters + +### data + +`Record`\<`string`, `any`\> + +An object containing named parameters for the integration endpoint + +## Returns + +`Promise`\<`any`\> + +Promise resolving to the integration endpoint's response diff --git a/docs/type-aliases/IntegrationPackage.md b/docs/type-aliases/IntegrationPackage.md new file mode 100644 index 0000000..b25c2bb --- /dev/null +++ b/docs/type-aliases/IntegrationPackage.md @@ -0,0 +1,27 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: IntegrationPackage + +> **IntegrationPackage** = `object` + +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. + +## Index Signature + +\[`endpointName`: `string`\]: [`IntegrationEndpointFunction`](IntegrationEndpointFunction.md) + +## Example + +```typescript +// Access endpoints dynamically +const result = await integrations.Core.SendEmail({ + to: 'user@example.com', + subject: 'Hello', + body: 'Message' +}); +``` diff --git a/docs/type-aliases/IntegrationsModule.md b/docs/type-aliases/IntegrationsModule.md new file mode 100644 index 0000000..7241ba4 --- /dev/null +++ b/docs/type-aliases/IntegrationsModule.md @@ -0,0 +1,100 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: IntegrationsModule + +> **IntegrationsModule** = `object` + +Integrations module for calling pre-built integration endpoints. + +This module provides access to integration endpoints that Base44 provides +for interacting with external services. Integrations are organized into +packages, with the most common being the "Core" package. + +Unlike the connectors module (which gives you raw OAuth tokens), integrations +provide pre-built functions that Base44 executes on your behalf. + +**Dynamic Access:** +Integration endpoints are accessed dynamically using the pattern: +`client.integrations.PackageName.EndpointName(params)` + +**File Upload Support:** +If any parameter is a `File` object, the request will automatically be +sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + +**Available with both auth modes:** +- User auth: `client.integrations.PackageName.EndpointName(...)` +- Service role: `client.asServiceRole.integrations.PackageName.EndpointName(...)` + +## Example + +```typescript +// Send email using Core package +const emailResult = await client.integrations.Core.SendEmail({ + to: 'user@example.com', + subject: 'Hello from Base44', + body: 'This is a test email' +}); + +// Upload file using Core package +const fileInput = document.querySelector('input[type="file"]'); +const uploadResult = await client.integrations.Core.UploadFile({ + file: fileInput.files[0], + metadata: { type: 'profile-picture' } +}); + +// Use custom integration package +const result = await client.integrations.CustomPackage.CustomEndpoint({ + param1: 'value1', + param2: 'value2' +}); + +// Use with service role +const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ + to: 'admin@example.com', + subject: 'Admin notification', + body: 'System alert' +}); +``` + +## Indexable + +\[`packageName`: `string`\]: [`IntegrationPackage`](IntegrationPackage.md) + +Access to any custom or installable integration package. + +Use this to call endpoints from custom integration packages +you've installed in your Base44 app. + +### Example + +```typescript +// Access custom package dynamically +await client.integrations.Slack.PostMessage({ + channel: '#general', + text: 'Hello from Base44' +}); +``` + +## Properties + +### Core + +> **Core**: [`IntegrationPackage`](IntegrationPackage.md) + +Core package containing built-in Base44 integration endpoints. + +Common endpoints include: +- `SendEmail` - Send emails +- `UploadFile` - Upload files + +#### Example + +```typescript +await client.integrations.Core.SendEmail({ + to: 'user@example.com', + subject: 'Welcome', + body: 'Welcome to our app!' +}); +``` diff --git a/docs/type-aliases/LoginInfoResponse.md b/docs/type-aliases/LoginInfoResponse.md new file mode 100644 index 0000000..2590b73 --- /dev/null +++ b/docs/type-aliases/LoginInfoResponse.md @@ -0,0 +1,7 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: LoginInfoResponse + +> **LoginInfoResponse** = `Pick`\<[`AppLike`](../interfaces/AppLike.md), `"id"` \| `"name"` \| `"slug"` \| `"logo_url"` \| `"user_description"` \| `"updated_date"` \| `"created_date"` \| `"auth_config"` \| `"platform_version"`\> diff --git a/docs/type-aliases/ModelFilterParams.md b/docs/type-aliases/ModelFilterParams.md new file mode 100644 index 0000000..92bc00d --- /dev/null +++ b/docs/type-aliases/ModelFilterParams.md @@ -0,0 +1,109 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: ModelFilterParams + +> **ModelFilterParams** = `object` + +Parameters for filtering, sorting, and paginating model data. + +This type is primarily used in the agents module for querying agent +conversations. It provides a structured way to specify query criteria, +sorting, pagination, and field selection. + +## Examples + +```typescript +// Basic filtering by agent name +const conversations = await client.agents.listConversations({ + q: { agent_name: 'support-bot' } +}); +``` + +```typescript +// Filtering with sorting +const conversations = await client.agents.listConversations({ + q: { status: 'active' }, + sort: '-created_at' // Sort by created_at descending +}); +``` + +```typescript +// Pagination with limit and skip +const conversations = await client.agents.listConversations({ + q: { agent_name: 'support-bot' }, + limit: 20, // Get 20 results + skip: 40 // Skip first 40 (page 3) +}); +``` + +```typescript +// Field selection (only return specific fields) +const conversations = await client.agents.listConversations({ + q: { status: 'active' }, + fields: ['id', 'agent_name', 'created_at'] +}); +``` + +```typescript +// Complex query with multiple filters +const conversations = await client.agents.listConversations({ + q: { + agent_name: 'support-bot', + 'metadata.priority': 'high', + status: 'active' + }, + sort: '-updated_at', + limit: 50, + skip: 0 +}); +``` + +## Properties + +### q? + +> `optional` **q**: `Record`\<`string`, `any`\> + +Query object with field-value pairs for filtering + +*** + +### sort? + +> `optional` **sort**: `string` \| `null` + +Sort parameter (e.g., "-created_date" for descending order) + +*** + +### sort\_by? + +> `optional` **sort\_by**: `string` \| `null` + +Alternative sort parameter (use either `sort` or `sort_by`) + +*** + +### limit? + +> `optional` **limit**: `number` \| `null` + +Maximum number of results to return + +*** + +### skip? + +> `optional` **skip**: `number` \| `null` + +Number of results to skip (for pagination) + +*** + +### fields? + +> `optional` **fields**: ...[] \| `null` + +Array of field names to include in the response diff --git a/package-lock.json b/package-lock.json index 8418a06..e638314 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,8 @@ "dotenv": "^16.3.1", "eslint": "^8.54.0", "nock": "^13.4.0", + "typedoc": "^0.28.14", + "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.3.2", "vitest": "^1.0.0" } @@ -719,13 +721,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", @@ -778,6 +773,20 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@gerrit0/mini-shiki": { + "version": "3.15.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.15.0.tgz", + "integrity": "sha512-L5IHdZIDa4bG4yJaOzfasOH/o22MCesY0mx+n6VATbaiCtMeR59pdRqYk4bEiQkIHfxsHPNgdi7VJlZb2FhdMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/engine-oniguruma": "^3.15.0", + "@shikijs/langs": "^3.15.0", + "@shikijs/themes": "^3.15.0", + "@shikijs/types": "^3.15.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -1230,6 +1239,55 @@ "win32" ] }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "3.15.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz", + "integrity": "sha512-HnqFsV11skAHvOArMZdLBZZApRSYS4LSztk2K3016Y9VCyZISnlYUYsL2hzlS7tPqKHvNqmI5JSUJZprXloMvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.15.0", + "@shikijs/vscode-textmate": "^10.0.2" + } + }, + "node_modules/@shikijs/langs": { + "version": "3.15.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz", + "integrity": "sha512-WpRvEFvkVvO65uKYW4Rzxs+IG0gToyM8SARQMtGGsH4GDMNZrr60qdggXrFOsdfOVssG/QQGEl3FnJ3EZ+8w8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.15.0" + } + }, + "node_modules/@shikijs/themes": { + "version": "3.15.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz", + "integrity": "sha512-8ow2zWb1IDvCKjYb0KiLNrK4offFdkfNVPXb1OZykpLCzRU6j+efkY+Y7VQjNlNFXonSw+4AOdGYtmqykDbRiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.15.0" + } + }, + "node_modules/@shikijs/types": { + "version": "3.15.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz", + "integrity": "sha512-BnP+y/EQnhihgHy4oIAN+6FFtmfTekwOLsQbRw9hOKwqgNy8Bdsjq8B05oAt/ZgvIWWFrshV71ytOrlPfYjIJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^10.0.2", + "@types/hast": "^3.0.4" + } + }, + "node_modules/@shikijs/vscode-textmate": { + "version": "10.0.2", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1250,6 +1308,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/node": { "version": "22.13.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", @@ -1262,6 +1330,13 @@ "undici-types": "~6.20.0" } }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "dev": true, + "license": "MIT" + }, "node_modules/@ungap/structured-clone": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", @@ -1595,6 +1670,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -2028,6 +2110,19 @@ "node": ">=10.0.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", @@ -2222,13 +2317,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2961,6 +3049,16 @@ "node": ">= 0.8.0" } }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/local-pkg": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz", @@ -3005,6 +3103,13 @@ "yallist": "^3.0.2" } }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true, + "license": "MIT" + }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", @@ -3056,6 +3161,24 @@ "node": ">=10" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -3065,6 +3188,13 @@ "node": ">= 0.4" } }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, + "license": "MIT" + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -3450,6 +3580,16 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3955,6 +4095,69 @@ "node": ">=4" } }, + "node_modules/typedoc": { + "version": "0.28.14", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz", + "integrity": "sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@gerrit0/mini-shiki": "^3.12.0", + "lunr": "^2.3.9", + "markdown-it": "^14.1.0", + "minimatch": "^9.0.5", + "yaml": "^2.8.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 18", + "pnpm": ">= 10" + }, + "peerDependencies": { + "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x" + } + }, + "node_modules/typedoc-plugin-markdown": { + "version": "4.9.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz", + "integrity": "sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "typedoc": "0.28.x" + } + }, + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/typescript": { "version": "5.7.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", @@ -3969,6 +4172,13 @@ "node": ">=14.17" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, "node_modules/ufo": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz", @@ -4418,6 +4628,19 @@ "dev": true, "license": "ISC" }, + "node_modules/yaml": { + "version": "2.8.1", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz", + "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 2b6cee7..bd5dcd5 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "test:e2e": "vitest run tests/e2e", "test:watch": "vitest", "test:coverage": "vitest run --coverage", + "docs": "typedoc", "prepublishOnly": "npm run build" }, "dependencies": { @@ -30,6 +31,8 @@ "dotenv": "^16.3.1", "eslint": "^8.54.0", "nock": "^13.4.0", + "typedoc": "^0.28.14", + "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.3.2", "vitest": "^1.0.0" }, diff --git a/src/client.ts b/src/client.ts index d3441b5..82b934b 100644 --- a/src/client.ts +++ b/src/client.ts @@ -9,60 +9,31 @@ import { createFunctionsModule } from "./modules/functions.js"; import { createAgentsModule } from "./modules/agents.js"; import { createAppLogsModule } from "./modules/app-logs.js"; import { RoomsSocket, RoomsSocketConfig } from "./utils/socket-utils.js"; +import type { + Base44Client, + CreateClientConfig, + CreateClientOptions, +} from "./client.types.js"; -/** - * Options for creating a Base44 client. - */ -export type CreateClientOptions = { - /** - * Optional error handler that will be called whenever an API error occurs. - * - * @example - * ```typescript - * const client = createClient({ - * appId: 'my-app', - * options: { - * onError: (error) => { - * console.error('API Error:', error); - * // Send to error tracking service - * Sentry.captureException(error); - * } - * } - * }); - * ``` - */ - onError?: (error: Error) => void; -}; - -/** - * The Base44 client instance type. - * - * Provides access to all SDK modules and methods for interacting with your Base44 app. - */ -export type Base44Client = ReturnType; +// Re-export client types +export type { Base44Client, CreateClientConfig, CreateClientOptions }; /** * Creates a Base44 SDK client instance. * - * This is the main entry point for the Base44 SDK. It creates a client that provides - * access to all SDK modules including entities, auth, functions, integrations, agents, - * and more. + * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@link EntitiesModule | entities}, {@link AuthModule | auth}, and {@link FunctionsModule | functions}. * - * **User Modules (default access):** - * - `entities` - CRUD operations for your data - * - `integrations` - Pre-built integration endpoints - * - `auth` - User authentication and management - * - `functions` - Custom backend functions - * - `agents` - AI agent conversations - * - `appLogs` - Application usage tracking + * The client supports two authentication modes: + * - **User authentication** (default): Access modules with user-level permissions using `client.moduleName`. + * - **Service role authentication**: Access modules with elevated permissions using `client.asServiceRole.moduleName`. * - * **Service Role Modules (via `asServiceRole`):** - * - All user modules PLUS: - * - `sso` - SSO token generation - * - `connectors` - OAuth token retrieval + * Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. * - * @param config - Client configuration options - * @returns Base44 client instance with access to all modules + * For example, when using the {@link EntitiesModule | entities} module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. + * + * To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in your application's frontend. + * + * The {@link AuthModule | auth} module is only available with user authentication for security reasons. * * @example * ```typescript @@ -74,22 +45,12 @@ export type Base44Client = ReturnType; * }); * * // Use client modules - * const todos = await client.entities.Todo.list(); + * const products = await client.entities.Products.list(); * const user = await client.auth.me(); * ``` * * @example * ```typescript - * // Client with authentication - * const client = createClient({ - * appId: 'my-app-id', - * token: 'user-auth-token', - * requiresAuth: true // Automatically redirects to login if not authenticated - * }); - * ``` - * - * @example - * ```typescript * // Client with service role access * const client = createClient({ * appId: 'my-app-id', @@ -115,27 +76,8 @@ export type Base44Client = ReturnType; * } * }); * ``` - * - * @example - * ```typescript - * // Client with custom server URL (self-hosted) - * const client = createClient({ - * serverUrl: 'https://my-base44-instance.com', - * appId: 'my-app-id' - * }); - * ``` */ -export function createClient(config: { - serverUrl?: string; - appBaseUrl?: string; - appId: string; - token?: string; - serviceToken?: string; - requiresAuth?: boolean; - functionsVersion?: string; - headers?: Record; - options?: CreateClientOptions; -}) { +export function createClient(config: CreateClientConfig): Base44Client { const { serverUrl = "https://base44.app", appId, @@ -273,8 +215,6 @@ export function createClient(config: { /** * Sets a new authentication token for all subsequent requests. * - * Updates the token for both HTTP requests and WebSocket connections. - * * @param newToken - The new authentication token * * @example @@ -297,15 +237,7 @@ export function createClient(config: { /** * Gets the current client configuration. * - * @returns Current configuration including serverUrl, appId, and requiresAuth - * - * @example - * ```typescript - * const config = client.getConfig(); - * console.log(config.appId); // 'my-app-id' - * console.log(config.serverUrl); // 'https://base44.app' - * console.log(config.requiresAuth); // true/false - * ``` + * @internal */ getConfig() { return { @@ -318,16 +250,9 @@ export function createClient(config: { /** * Provides access to service role modules. * - * Service role modules have elevated permissions and include additional - * modules like `sso` and `connectors` that are not available with regular - * user authentication. + * Service role authentication provides elevated permissions for server-side operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. * - * **Available modules:** - * - All regular user modules (entities, auth, functions, etc.) - * - `sso` - SSO token generation - * - `connectors` - OAuth token retrieval - * - * @throws {Error} When accessed without providing a serviceToken during client creation + * @throws {Error} When accessed without providing a serviceToken during client creation. * * @example * ```typescript @@ -336,11 +261,7 @@ export function createClient(config: { * serviceToken: 'service-role-token' * }); * - * // Access service-role-only features - * const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); - * const googleToken = await client.asServiceRole.connectors.getAccessToken('google'); - * - * // Also access regular modules with elevated permissions + * // Also access a module with elevated permissions * const allUsers = await client.asServiceRole.entities.User.list(); * ``` */ @@ -358,66 +279,40 @@ export function createClient(config: { } /** - * Creates a Base44 client from an HTTP request (server-side helper). - * - * This is a convenience function for server-side environments (like Next.js API routes, - * Edge functions, or Express servers) that automatically extracts authentication tokens - * and configuration from request headers. - * - * **Required Headers:** - * - `Base44-App-Id` - Your Base44 application ID - * - * **Optional Headers:** - * - `Authorization` - User authentication token (format: "Bearer ") - * - `Base44-Service-Authorization` - Service role token (format: "Bearer ") - * - `Base44-Api-Url` - Custom API URL (defaults to https://base44.app) - * - `Base44-Functions-Version` - Functions version + * Creates a Base44 client from an HTTP request. * - * @param request - HTTP Request object (standard Fetch API Request) - * @returns Base44 client instance configured from request headers + * Creates a client by automatically extracting authentication tokens and configuration from request with authentication information in their headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from your app frontend to your backend functions. * - * @throws {Error} When Base44-App-Id header is missing - * @throws {Error} When authorization headers have invalid format + * @throws {Error} When Base44-App-Id header is missing. + * @throws {Error} When authorization headers have invalid format. * * @example * ```typescript - * // Next.js API Route + * // Frontend call to a backend function + * const response = await client.functions.invoke('myBackendFunction', {}); + * + * // Backend function that receives the call * import { createClientFromRequest } from '@base44/client-sdk'; * - * export async function GET(request: Request) { - * const client = createClientFromRequest(request); - * const data = await client.entities.Product.list(); - * return Response.json(data); - * } - * ``` + * Deno.serve(async (req) => { + * try { + * const base44 = createClientFromRequest(req); + * const user = await base44.auth.me(); * - * @example - * ```typescript - * // Edge Function (Vercel, Cloudflare Workers, Deno Deploy) - * export default async function handler(request: Request) { - * const client = createClientFromRequest(request); - * const user = await client.auth.me(); - * return new Response(JSON.stringify(user)); - * } - * ``` + * if (!user) { + * return Response.json({ error: 'Unauthorized' }, { status: 401 }); + * } * - * @example - * ```typescript - * // Express.js (with adapter for Request object) - * import express from 'express'; + * // Use the client to access the API * - * app.get('/api/data', async (req, res) => { - * // Convert Express req to Fetch API Request - * const request = new Request(`http://localhost${req.url}`, { - * headers: req.headers - * }); - * const client = createClientFromRequest(request); - * const data = await client.entities.Todo.list(); - * res.json(data); + * } catch (error) { + * return Response.json({ error: error.message }, { status: 500 }); + * } * }); * ``` + * */ -export function createClientFromRequest(request: Request) { +export function createClientFromRequest(request: Request): Base44Client { const authHeader = request.headers.get("Authorization"); const serviceRoleAuthHeader = request.headers.get( "Base44-Service-Authorization" diff --git a/src/client.types.ts b/src/client.types.ts new file mode 100644 index 0000000..4044880 --- /dev/null +++ b/src/client.types.ts @@ -0,0 +1,135 @@ +import type { EntitiesModule } from "./modules/entities.types.js"; +import type { IntegrationsModule } from "./modules/integrations.types.js"; +import type { AuthModule } from "./modules/auth.types.js"; +import type { SsoModule } from "./modules/sso.types.js"; +import type { ConnectorsModule } from "./modules/connectors.types.js"; +import type { FunctionsModule } from "./modules/functions.types.js"; +import type { AgentsModule } from "./modules/agents.types.js"; +import type { AppLogsModule } from "./modules/app-logs.types.js"; + +/** + * Options for creating a Base44 client. + */ +export type CreateClientOptions = { + /** + * Optional error handler that will be called whenever an API error occurs. + */ + onError?: (error: Error) => void; +}; + +/** + * Configuration for creating a Base44 client. + */ +export type CreateClientConfig = { + /** + * The Base44 server URL. Defaults to "https://base44.app". + * @internal + */ + serverUrl?: string; + /** + * The base URL of your application (used for login redirects). + * @internal + */ + appBaseUrl?: string; + /** Your Base44 application ID. */ + appId: string; + /** + * User authentication token. Use this for client-side applications where you want to + * authenticate as a specific user. + */ + token?: string; + /** + * Service role authentication token. Use this for server-side applications where you need + * elevated permissions to access data across all users or perform admin operations. This token + * should be kept secret and never exposed to the client. + */ + serviceToken?: string; + /** + * Whether authentication is required. If true, redirects to login if not authenticated. + * @internal + */ + requiresAuth?: boolean; + /** + * Version string for functions API. + * @internal + */ + functionsVersion?: string; + /** + * Additional headers to include in API requests. + * @internal + */ + headers?: Record; + /** + * Additional client options. + * @internal + */ + options?: CreateClientOptions; +}; + +/** + * The Base44 client instance. + * + * Provides access to all SDK modules and methods for interacting with your Base44 app. + * + * This is the main client object returned by {@link createClient} and {@link createClientFromRequest}. + * It includes all SDK modules and utility methods for managing authentication and configuration. + */ +export interface Base44Client { + /** {@link EntitiesModule | Entities module} for CRUD operations on your data models. */ + entities: EntitiesModule; + /** {@link IntegrationsModule | Integrations module} for calling pre-built integration endpoints. */ + integrations: IntegrationsModule; + /** {@link AuthModule | Auth module} for user authentication and management. */ + auth: AuthModule; + /** {@link FunctionsModule | Functions module} for invoking custom backend functions. */ + functions: FunctionsModule; + /** {@link AgentsModule | Agents module} for managing AI agent conversations. */ + agents: AgentsModule; + /** {@link AppLogsModule | App logs module} for tracking application usage. */ + appLogs: AppLogsModule; + /** Cleanup function to disconnect WebSocket connections. Call when you're done with the client. */ + cleanup: () => void; + + /** + * Sets a new authentication token for all subsequent requests. + * + * Updates the token for both HTTP requests and WebSocket connections. + * + * @param newToken - The new authentication token + */ + setToken(newToken: string): void; + + /** + * Gets the current client configuration. + * @internal + */ + getConfig(): { serverUrl: string; appId: string; requiresAuth: boolean }; + + /** + * Provides access to service role modules with elevated permissions. + * + * Service role authentication provides elevated permissions for server-side operations. + * Unlike user authentication, which is scoped to a specific user's permissions, service + * role authentication has access to data and operations across all users. + * + * @throws {Error} When accessed without providing a serviceToken during client creation + */ + readonly asServiceRole: { + /** {@link EntitiesModule | Entities module} with elevated permissions. */ + entities: EntitiesModule; + /** {@link IntegrationsModule | Integrations module} with elevated permissions. */ + integrations: IntegrationsModule; + /** {@link SsoModule | SSO module} for generating SSO tokens (service role only). */ + sso: SsoModule; + /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval (service role only). */ + connectors: ConnectorsModule; + /** {@link FunctionsModule | Functions module} with elevated permissions. */ + functions: FunctionsModule; + /** {@link AgentsModule | Agents module} with elevated permissions. */ + agents: AgentsModule; + /** {@link AppLogsModule | App logs module} with elevated permissions. */ + appLogs: AppLogsModule; + /** Cleanup function to disconnect WebSocket connections. */ + cleanup: () => void; + }; +} diff --git a/src/index.ts b/src/index.ts index 7a4b962..0e89015 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,10 @@ -import { createClient, createClientFromRequest, type Base44Client } from "./client.js"; +import { + createClient, + createClientFromRequest, + type Base44Client, + type CreateClientConfig, + type CreateClientOptions, +} from "./client.js"; import { Base44Error } from "./utils/axios-client.js"; import { getAccessToken, @@ -17,6 +23,42 @@ export { getLoginUrl, }; -export type { Base44Client }; +export type { Base44Client, CreateClientConfig, CreateClientOptions }; export * from "./types.js"; + +// Module types +export type { + EntitiesModule, + EntityHandler, +} from "./modules/entities.types.js"; + +export type { + AuthModule, + LoginResponse, + RegisterPayload, +} from "./modules/auth.types.js"; + +export type { + IntegrationsModule, + IntegrationPackage, + IntegrationEndpointFunction, +} from "./modules/integrations.types.js"; + +export type { FunctionsModule } from "./modules/functions.types.js"; + +export type { AgentsModule } from "./modules/agents.types.js"; + +export type { AppLogsModule } from "./modules/app-logs.types.js"; + +export type { SsoModule, SsoAccessTokenResponse } from "./modules/sso.types.js"; + +export type { ConnectorsModule } from "./modules/connectors.types.js"; + +// Auth utils types +export type { + GetAccessTokenOptions, + SaveAccessTokenOptions, + RemoveAccessTokenOptions, + GetLoginUrlOptions, +} from "./utils/auth-utils.types.js"; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index d9f9738..f3b199f 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -80,6 +80,7 @@ export type AgentMessage = { /** * Configuration for creating the agents module. + * @internal */ export type AgentsModuleConfig = { /** Axios instance for HTTP requests */ @@ -102,7 +103,7 @@ export type AgentsModuleConfig = { * for chat interfaces, support systems, or any interactive AI application. * * **Real-time Updates:** - * The agents module supports real-time updates via WebSocket subscriptions, + * The agents module supports real-time updates through WebSocket subscriptions, * allowing you to receive instant notifications when new messages arrive. * * **Available with both auth modes:** @@ -267,7 +268,7 @@ export interface AgentsModule { /** * Get WhatsApp connection URL for an agent. * - * Generates a URL that users can use to connect with the agent via WhatsApp. + * Generates a URL that users can use to connect with the agent through WhatsApp. * The URL includes authentication if a token is available. * * @param agentName - The name of the agent @@ -276,7 +277,7 @@ export interface AgentsModule { * @example * ```typescript * const whatsappUrl = client.agents.getWhatsAppConnectURL('support-agent'); - * console.log(`Connect via WhatsApp: ${whatsappUrl}`); + * console.log(`Connect through WhatsApp: ${whatsappUrl}`); * // User can open this URL to start a WhatsApp conversation * ``` */ diff --git a/src/modules/auth.ts b/src/modules/auth.ts index dd4af58..89f7b39 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -104,7 +104,7 @@ export function createAuthModule( } }, - // Login via username and password + // Login using username and password async loginViaEmailPassword( email: string, password: string, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index b844d8e..29e2e66 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -323,7 +323,7 @@ export interface AuthModule { * Reset password using a reset token. * * Completes the password reset flow by setting a new password - * using the token received via email. + * using the token received by email. * * @param params - Object containing the reset token and new password * @returns Promise resolving to the response diff --git a/src/modules/connectors.types.ts b/src/modules/connectors.types.ts index 8183a3e..286fb34 100644 --- a/src/modules/connectors.types.ts +++ b/src/modules/connectors.types.ts @@ -17,7 +17,7 @@ export interface ConnectorAccessTokenResponse { * that users have connected to your Base44 app. Use these tokens to make API * calls to external services on behalf of your users. * - * **Important:** This module is only available via service role authentication. + * **Important:** This module is only available with service role authentication. * * **Difference from SSO module:** * - **Connectors**: Retrieve OAuth tokens for external services (Google, Slack, etc.) diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 4726fcd..a6fc408 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -52,14 +52,14 @@ export type IntegrationPackage = { * * @example * ```typescript - * // Send email via Core package + * // Send email using Core package * const emailResult = await client.integrations.Core.SendEmail({ * to: 'user@example.com', * subject: 'Hello from Base44', * body: 'This is a test email' * }); * - * // Upload file via Core package + * // Upload file using Core package * const fileInput = document.querySelector('input[type="file"]'); * const uploadResult = await client.integrations.Core.UploadFile({ * file: fileInput.files[0], diff --git a/src/modules/sso.types.ts b/src/modules/sso.types.ts index 0ccb980..de73fbb 100644 --- a/src/modules/sso.types.ts +++ b/src/modules/sso.types.ts @@ -16,7 +16,7 @@ export interface SsoAccessTokenResponse { * * @example * ```typescript - * // Access SSO module via service role + * // Access SSO module with service role * const response = await client.asServiceRole.sso.getAccessToken("user_123"); * console.log(response.data.access_token); * ``` diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..ec4cb17 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./src/index.ts"], + "out": "docs", + "plugin": ["typedoc-plugin-markdown"], + "excludePrivate": true, + "excludeProtected": true, + "excludeInternal": true, + "excludeExternals": true, + "readme": "none", + "gitRevision": "main", + "sort": ["source-order"], + "kindSortOrder": [ + "Project", + "Module", + "Namespace", + "Enum", + "Class", + "Interface", + "TypeAlias", + "Constructor", + "Property", + "Method", + "Function", + "Accessor", + "Variable" + ], + "maxTypeConversionDepth": 2, + "hideBreadcrumbs": true, + "disableSources": true +} diff --git a/yarn.lock b/yarn.lock index 452d72c..7b55678 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,288 +2,173 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.2.1": +"@ampproject/remapping@^2.2.0", "@ampproject/remapping@^2.2.1": version "2.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== dependencies: "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.27.1": - version "7.27.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" - integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== +"@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== dependencies: - "@babel/helper-validator-identifier" "^7.27.1" + "@babel/helper-validator-identifier" "^7.25.9" js-tokens "^4.0.0" - picocolors "^1.1.1" + picocolors "^1.0.0" -"@babel/compat-data@^7.27.2": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/compat-data/-/compat-data-7.28.5.tgz#a8a4962e1567121ac0b3b487f52107443b455c7f" - integrity sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA== - -"@babel/core@^7.23.9": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/core/-/core-7.28.5.tgz#4c81b35e51e1b734f510c99b07dfbc7bbbb48f7e" - integrity sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.5" - "@babel/helper-compilation-targets" "^7.27.2" - "@babel/helper-module-transforms" "^7.28.3" - "@babel/helpers" "^7.28.4" - "@babel/parser" "^7.28.5" - "@babel/template" "^7.27.2" - "@babel/traverse" "^7.28.5" - "@babel/types" "^7.28.5" - "@jridgewell/remapping" "^2.3.5" +"@babel/compat-data@^7.26.5": + version "7.26.8" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz" + integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== + +"@babel/core@^7.0.0", "@babel/core@^7.23.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz" + integrity sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.9" + "@babel/helper-compilation-targets" "^7.26.5" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.9" + "@babel/parser" "^7.26.9" + "@babel/template" "^7.26.9" + "@babel/traverse" "^7.26.9" + "@babel/types" "^7.26.9" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.28.5": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/generator/-/generator-7.28.5.tgz#712722d5e50f44d07bc7ac9fe84438742dd61298" - integrity sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ== +"@babel/generator@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz" + integrity sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg== dependencies: - "@babel/parser" "^7.28.5" - "@babel/types" "^7.28.5" - "@jridgewell/gen-mapping" "^0.3.12" - "@jridgewell/trace-mapping" "^0.3.28" + "@babel/parser" "^7.26.9" + "@babel/types" "^7.26.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.27.2": - version "7.27.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" - integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== +"@babel/helper-compilation-targets@^7.26.5": + version "7.26.5" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz" + integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== dependencies: - "@babel/compat-data" "^7.27.2" - "@babel/helper-validator-option" "^7.27.1" + "@babel/compat-data" "^7.26.5" + "@babel/helper-validator-option" "^7.25.9" browserslist "^4.24.0" lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-globals@^7.28.0": - version "7.28.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-globals/-/helper-globals-7.28.0.tgz#b9430df2aa4e17bc28665eadeae8aa1d985e6674" - integrity sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw== - -"@babel/helper-module-imports@^7.27.1": - version "7.27.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz#7ef769a323e2655e126673bb6d2d6913bbead204" - integrity sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w== - dependencies: - "@babel/traverse" "^7.27.1" - "@babel/types" "^7.27.1" - -"@babel/helper-module-transforms@^7.28.3": - version "7.28.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz#a2b37d3da3b2344fe085dab234426f2b9a2fa5f6" - integrity sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw== - dependencies: - "@babel/helper-module-imports" "^7.27.1" - "@babel/helper-validator-identifier" "^7.27.1" - "@babel/traverse" "^7.28.3" - -"@babel/helper-string-parser@^7.27.1": - version "7.27.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz#54da796097ab19ce67ed9f88b47bb2ec49367687" - integrity sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA== - -"@babel/helper-validator-identifier@^7.27.1", "@babel/helper-validator-identifier@^7.28.5": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz#010b6938fab7cb7df74aa2bbc06aa503b8fe5fb4" - integrity sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q== - -"@babel/helper-validator-option@^7.27.1": - version "7.27.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" - integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== - -"@babel/helpers@^7.28.4": - version "7.28.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/helpers/-/helpers-7.28.4.tgz#fe07274742e95bdf7cf1443593eeb8926ab63827" - integrity sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w== - dependencies: - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.4" - -"@babel/parser@^7.20.15", "@babel/parser@^7.23.9", "@babel/parser@^7.25.4", "@babel/parser@^7.27.2", "@babel/parser@^7.28.5": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/parser/-/parser-7.28.5.tgz#0b0225ee90362f030efd644e8034c99468893b08" - integrity sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ== - dependencies: - "@babel/types" "^7.28.5" - -"@babel/template@^7.27.2": - version "7.27.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" - integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/parser" "^7.27.2" - "@babel/types" "^7.27.1" - -"@babel/traverse@^7.27.1", "@babel/traverse@^7.28.3", "@babel/traverse@^7.28.5": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/traverse/-/traverse-7.28.5.tgz#450cab9135d21a7a2ca9d2d35aa05c20e68c360b" - integrity sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ== - dependencies: - "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.28.5" - "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.28.5" - "@babel/template" "^7.27.2" - "@babel/types" "^7.28.5" +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" + +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== + +"@babel/helpers@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz" + integrity sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA== + dependencies: + "@babel/template" "^7.26.9" + "@babel/types" "^7.26.9" + +"@babel/parser@^7.23.9", "@babel/parser@^7.25.4", "@babel/parser@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz" + integrity sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A== + dependencies: + "@babel/types" "^7.26.9" + +"@babel/template@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz" + integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/parser" "^7.26.9" + "@babel/types" "^7.26.9" + +"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz" + integrity sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.9" + "@babel/parser" "^7.26.9" + "@babel/template" "^7.26.9" + "@babel/types" "^7.26.9" debug "^4.3.1" + globals "^11.1.0" -"@babel/types@^7.25.4", "@babel/types@^7.27.1", "@babel/types@^7.28.4", "@babel/types@^7.28.5": - version "7.28.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@babel/types/-/types-7.28.5.tgz#10fc405f60897c35f07e85493c932c7b5ca0592b" - integrity sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA== +"@babel/types@^7.25.4", "@babel/types@^7.25.9", "@babel/types@^7.26.9": + version "7.26.9" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz" + integrity sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw== dependencies: - "@babel/helper-string-parser" "^7.27.1" - "@babel/helper-validator-identifier" "^7.28.5" + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" "@bcoe/v8-coverage@^0.2.3": version "0.2.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" + resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@esbuild/aix-ppc64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" - integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== - -"@esbuild/android-arm64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" - integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== - -"@esbuild/android-arm@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" - integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== - -"@esbuild/android-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" - integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== - "@esbuild/darwin-arm64@0.21.5": version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" + resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz" integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== -"@esbuild/darwin-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" - integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== - -"@esbuild/freebsd-arm64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" - integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== - -"@esbuild/freebsd-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" - integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== - -"@esbuild/linux-arm64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" - integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== - -"@esbuild/linux-arm@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" - integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== - -"@esbuild/linux-ia32@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" - integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== - -"@esbuild/linux-loong64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" - integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== - -"@esbuild/linux-mips64el@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" - integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== - -"@esbuild/linux-ppc64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" - integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== - -"@esbuild/linux-riscv64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" - integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== - -"@esbuild/linux-s390x@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" - integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== - -"@esbuild/linux-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" - integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== - -"@esbuild/netbsd-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" - integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== - -"@esbuild/openbsd-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" - integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== - -"@esbuild/sunos-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" - integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== - -"@esbuild/win32-arm64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" - integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== - -"@esbuild/win32-ia32@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" - integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== - -"@esbuild/win32-x64@0.21.5": - version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" - integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== - "@eslint-community/eslint-utils@^4.2.0": - version "4.9.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3" - integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g== + version "4.4.1" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== dependencies: eslint-visitor-keys "^3.4.3" "@eslint-community/regexpp@^4.6.1": - version "4.12.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b" - integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew== + version "4.12.1" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== "@eslint/eslintrc@^2.1.4": version "2.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" @@ -298,23 +183,23 @@ "@eslint/js@8.57.1": version "8.57.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz" integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== "@gerrit0/mini-shiki@^3.12.0": - version "3.14.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.14.0.tgz#ba66291e151b909cf96515e1cf6cba38748e4b62" - integrity sha512-c5X8fwPLOtUS8TVdqhynz9iV0GlOtFUT1ppXYzUUlEXe4kbZ/mvMT8wXoT8kCwUka+zsiloq7sD3pZ3+QVTuNQ== - dependencies: - "@shikijs/engine-oniguruma" "^3.14.0" - "@shikijs/langs" "^3.14.0" - "@shikijs/themes" "^3.14.0" - "@shikijs/types" "^3.14.0" + version "3.15.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.15.0.tgz" + integrity sha512-L5IHdZIDa4bG4yJaOzfasOH/o22MCesY0mx+n6VATbaiCtMeR59pdRqYk4bEiQkIHfxsHPNgdi7VJlZb2FhdMQ== + dependencies: + "@shikijs/engine-oniguruma" "^3.15.0" + "@shikijs/langs" "^3.15.0" + "@shikijs/themes" "^3.15.0" + "@shikijs/types" "^3.15.0" "@shikijs/vscode-textmate" "^10.0.2" "@humanwhocodes/config-array@^0.13.0": version "0.13.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz" integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: "@humanwhocodes/object-schema" "^2.0.3" @@ -323,83 +208,82 @@ "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/object-schema@^2.0.3": version "2.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== "@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": version "0.1.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== "@jest/schemas@^29.6.3": version "29.6.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: "@sinclair/typebox" "^0.27.8" -"@jridgewell/gen-mapping@^0.3.12", "@jridgewell/gen-mapping@^0.3.5": - version "0.3.13" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz#6342a19f44347518c93e43b1ac69deb3c4656a1f" - integrity sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/remapping@^2.3.5": - version "2.3.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/remapping/-/remapping-2.3.5.tgz#375c476d1972947851ba1e15ae8f123047445aa1" - integrity sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ== +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.8" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz" + integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== dependencies: - "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" "@jridgewell/resolve-uri@^3.1.0": version "3.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0", "@jridgewell/sourcemap-codec@^1.5.5": - version "1.5.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba" - integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== -"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.28": - version "0.3.31" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0" - integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw== +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jsdoc/salty@^0.2.1": - version "0.2.9" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@jsdoc/salty/-/salty-0.2.9.tgz#4d8c147f7ca011532681ce86352a77a0178f1dec" - integrity sha512-yYxMVH7Dqw6nO0d5NIV8OQWnitU8k6vXH8NtgqAfIa/IUqRMxRv/NUJJ08VEKbAakwxlgBl5PJdrU0dMPStsnw== +"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: - lodash "^4.17.21" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@nodelib/fs.scandir@2.1.5": version "2.1.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" @@ -407,144 +291,39 @@ "@polka/url@^1.0.0-next.24": version "1.0.0-next.29" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@polka/url/-/url-1.0.0-next.29.tgz#5a40109a1ab5f84d6fd8fc928b19f367cbe7e7b1" + resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz" integrity sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww== -"@rollup/rollup-android-arm-eabi@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz#0f44a2f8668ed87b040b6fe659358ac9239da4db" - integrity sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ== - -"@rollup/rollup-android-arm64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz#25b9a01deef6518a948431564c987bcb205274f5" - integrity sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA== - -"@rollup/rollup-darwin-arm64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz#8a102869c88f3780c7d5e6776afd3f19084ecd7f" - integrity sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA== - -"@rollup/rollup-darwin-x64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz#8e526417cd6f54daf1d0c04cf361160216581956" - integrity sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA== - -"@rollup/rollup-freebsd-arm64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz#0e7027054493f3409b1f219a3eac5efd128ef899" - integrity sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA== - -"@rollup/rollup-freebsd-x64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz#72b204a920139e9ec3d331bd9cfd9a0c248ccb10" - integrity sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ== - -"@rollup/rollup-linux-arm-gnueabihf@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz#ab1b522ebe5b7e06c99504cc38f6cd8b808ba41c" - integrity sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ== - -"@rollup/rollup-linux-arm-musleabihf@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz#f8cc30b638f1ee7e3d18eac24af47ea29d9beb00" - integrity sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ== - -"@rollup/rollup-linux-arm64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz#7af37a9e85f25db59dc8214172907b7e146c12cc" - integrity sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg== - -"@rollup/rollup-linux-arm64-musl@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz#a623eb0d3617c03b7a73716eb85c6e37b776f7e0" - integrity sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q== - -"@rollup/rollup-linux-loong64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz#76ea038b549c5c6c5f0d062942627c4066642ee2" - integrity sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA== - -"@rollup/rollup-linux-ppc64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz#d9a4c3f0a3492bc78f6fdfe8131ac61c7359ccd5" - integrity sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw== - -"@rollup/rollup-linux-riscv64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz#87ab033eebd1a9a1dd7b60509f6333ec1f82d994" - integrity sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw== - -"@rollup/rollup-linux-riscv64-musl@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz#bda3eb67e1c993c1ba12bc9c2f694e7703958d9f" - integrity sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg== - -"@rollup/rollup-linux-s390x-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz#f7bc10fbe096ab44694233dc42a2291ed5453d4b" - integrity sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ== - -"@rollup/rollup-linux-x64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz#a151cb1234cc9b2cf5e8cfc02aa91436b8f9e278" - integrity sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q== - -"@rollup/rollup-linux-x64-musl@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz#7859e196501cc3b3062d45d2776cfb4d2f3a9350" - integrity sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg== - -"@rollup/rollup-openharmony-arm64@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz#85d0df7233734df31e547c1e647d2a5300b3bf30" - integrity sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw== - -"@rollup/rollup-win32-arm64-msvc@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz#e62357d00458db17277b88adbf690bb855cac937" - integrity sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w== - -"@rollup/rollup-win32-ia32-msvc@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz#fc7cd40f44834a703c1f1c3fe8bcc27ce476cd50" - integrity sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg== - -"@rollup/rollup-win32-x64-gnu@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz#1a22acfc93c64a64a48c42672e857ee51774d0d3" - integrity sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ== - -"@rollup/rollup-win32-x64-msvc@4.52.5": - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz#1657f56326bbe0ac80eedc9f9c18fc1ddd24e107" - integrity sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg== - -"@shikijs/engine-oniguruma@^3.14.0": +"@rollup/rollup-darwin-arm64@4.44.1": + version "4.44.1" + resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz" + integrity sha512-fM/xPesi7g2M7chk37LOnmnSTHLG/v2ggWqKj3CCA1rMA4mm5KVBT1fNoswbo1JhPuNNZrVwpTvlCVggv8A2zg== + +"@shikijs/engine-oniguruma@^3.15.0": version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz#bc5fe6484d64b2daacdfbb248f06732fbc78c8e2" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz" integrity sha512-HnqFsV11skAHvOArMZdLBZZApRSYS4LSztk2K3016Y9VCyZISnlYUYsL2hzlS7tPqKHvNqmI5JSUJZprXloMvA== dependencies: "@shikijs/types" "3.15.0" "@shikijs/vscode-textmate" "^10.0.2" -"@shikijs/langs@^3.14.0": +"@shikijs/langs@^3.15.0": version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz#d8385a9ca66ce9923149c650336444b1d25fc248" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz" integrity sha512-WpRvEFvkVvO65uKYW4Rzxs+IG0gToyM8SARQMtGGsH4GDMNZrr60qdggXrFOsdfOVssG/QQGEl3FnJ3EZ+8w8A== dependencies: "@shikijs/types" "3.15.0" -"@shikijs/themes@^3.14.0": +"@shikijs/themes@^3.15.0": version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz#6093a90191b89654045c72636ddd35c04273658f" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz" integrity sha512-8ow2zWb1IDvCKjYb0KiLNrK4offFdkfNVPXb1OZykpLCzRU6j+efkY+Y7VQjNlNFXonSw+4AOdGYtmqykDbRiQ== dependencies: "@shikijs/types" "3.15.0" -"@shikijs/types@3.15.0", "@shikijs/types@^3.14.0": +"@shikijs/types@^3.15.0", "@shikijs/types@3.15.0": version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz#4e025b4dea98e1603243b1f00677854e07e5eda1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz" integrity sha512-BnP+y/EQnhihgHy4oIAN+6FFtmfTekwOLsQbRw9hOKwqgNy8Bdsjq8B05oAt/ZgvIWWFrshV71ytOrlPfYjIJw== dependencies: "@shikijs/vscode-textmate" "^10.0.2" @@ -552,62 +331,51 @@ "@shikijs/vscode-textmate@^10.0.2": version "10.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz#a90ab31d0cc1dfb54c66a69e515bf624fa7b2224" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz" integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== "@sinclair/typebox@^0.27.8": version "0.27.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@socket.io/component-emitter@~3.1.0": version "3.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + resolved "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz" integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== -"@types/estree@1.0.8", "@types/estree@^1.0.0": +"@types/estree@^1.0.0", "@types/estree@1.0.8": version "1.0.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e" + resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz" integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== "@types/hast@^3.0.4": version "3.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz" integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== dependencies: "@types/unist" "*" -"@types/linkify-it@^5": - version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/linkify-it/-/linkify-it-5.0.0.tgz#21413001973106cda1c3a9b91eedd4ccd5469d76" - integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q== - -"@types/markdown-it@^14.1.1": - version "14.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/markdown-it/-/markdown-it-14.1.2.tgz#57f2532a0800067d9b934f3521429a2e8bfb4c61" - integrity sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog== +"@types/node@^18.0.0 || >=20.0.0": + version "22.13.5" + resolved "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz" + integrity sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg== dependencies: - "@types/linkify-it" "^5" - "@types/mdurl" "^2" - -"@types/mdurl@^2": - version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd" - integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg== + undici-types "~6.20.0" "@types/unist@*": version "3.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz" integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== "@ungap/structured-clone@^1.2.0": version "1.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@ungap/structured-clone/-/structured-clone-1.3.0.tgz#d06bbb384ebcf6c505fde1c3d0ed4ddffe0aaff8" + resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz" integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== "@vitest/coverage-istanbul@^1.0.0": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz#f17e64819a2cbb256fb8454371b9cccd7d757821" + resolved "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz" integrity sha512-0NWKNPrbMo1s6emwnn+UpGPxrSEd9R6VpQ3wzYz0y43esZjjDkGLb6Qkvfu6LNyQO4TAGyepaZ11imUmmIFLaw== dependencies: debug "^4.3.4" @@ -622,7 +390,7 @@ "@vitest/coverage-v8@^1.0.0": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz#47230491ec73aa288a92e36b75c1671b3f741d4e" + resolved "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz" integrity sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw== dependencies: "@ampproject/remapping" "^2.2.1" @@ -641,7 +409,7 @@ "@vitest/expect@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/expect/-/expect-1.6.1.tgz#b90c213f587514a99ac0bf84f88cff9042b0f14d" + resolved "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz" integrity sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog== dependencies: "@vitest/spy" "1.6.1" @@ -650,7 +418,7 @@ "@vitest/runner@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/runner/-/runner-1.6.1.tgz#10f5857c3e376218d58c2bfacfea1161e27e117f" + resolved "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz" integrity sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA== dependencies: "@vitest/utils" "1.6.1" @@ -659,7 +427,7 @@ "@vitest/snapshot@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/snapshot/-/snapshot-1.6.1.tgz#90414451a634bb36cd539ccb29ae0d048a8c0479" + resolved "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz" integrity sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ== dependencies: magic-string "^0.30.5" @@ -668,14 +436,14 @@ "@vitest/spy@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/spy/-/spy-1.6.1.tgz#33376be38a5ed1ecd829eb986edaecc3e798c95d" + resolved "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz" integrity sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw== dependencies: tinyspy "^2.2.0" -"@vitest/ui@^1.0.0": +"@vitest/ui@^1.0.0", "@vitest/ui@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/ui/-/ui-1.6.1.tgz#e94c42af392ddb47531b2401d8871bc246f1947e" + resolved "https://registry.npmjs.org/@vitest/ui/-/ui-1.6.1.tgz" integrity sha512-xa57bCPGuzEFqGjPs3vVLyqareG8DX0uMkr5U/v5vLv5/ZUrBrPL7gzxzTJedEyZxFMfsozwTIbbYfEQVo3kgg== dependencies: "@vitest/utils" "1.6.1" @@ -688,7 +456,7 @@ "@vitest/utils@1.6.1": version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@vitest/utils/-/utils-1.6.1.tgz#6d2f36cb6d866f2bbf59da854a324d6bf8040f17" + resolved "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz" integrity sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g== dependencies: diff-sequences "^29.6.3" @@ -698,24 +466,24 @@ acorn-jsx@^5.3.2: version "5.3.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.3.2: version "8.3.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz" integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" -acorn@^8.11.0, acorn@^8.15.0, acorn@^8.9.0: - version "8.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" - integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.11.0, acorn@^8.14.0, acorn@^8.8.2, acorn@^8.9.0: + version "8.14.0" + resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== ajv@^6.12.4: version "6.12.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" @@ -725,113 +493,95 @@ ajv@^6.12.4: ansi-regex@^5.0.1: version "5.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-styles@^4.1.0: version "4.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^5.0.0: version "5.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== argparse@^2.0.1: version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-back@^6.2.2: - version "6.2.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/array-back/-/array-back-6.2.2.tgz#f567d99e9af88a6d3d2f9dfcc21db6f9ba9fd157" - integrity sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw== - assertion-error@^1.1.0: version "1.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== asynckit@^0.4.0: version "0.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios@^1.6.2: - version "1.13.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/axios/-/axios-1.13.2.tgz#9ada120b7b5ab24509553ec3e40123521117f687" - integrity sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA== + version "1.7.9" + resolved "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== dependencies: follow-redirects "^1.15.6" - form-data "^4.0.4" + form-data "^4.0.0" proxy-from-env "^1.1.0" balanced-match@^1.0.0: version "1.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -baseline-browser-mapping@^2.8.19: - version "2.8.25" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/baseline-browser-mapping/-/baseline-browser-mapping-2.8.25.tgz#947dc6f81778e0fa0424a2ab9ea09a3033e71109" - integrity sha512-2NovHVesVF5TXefsGX1yzx1xgr7+m9JQenvz6FQY3qd+YXkKkYiv+vTCc7OriP9mcDZpTC5mAOYN4ocd29+erA== - -bluebird@^3.7.2: - version "3.7.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - brace-expansion@^1.1.7: - version "1.1.12" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" - integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== + version "1.1.11" + resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz" integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== dependencies: balanced-match "^1.0.0" braces@^3.0.3: version "3.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" + resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== dependencies: fill-range "^7.1.1" -browserslist@^4.24.0: - version "4.27.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/browserslist/-/browserslist-4.27.0.tgz#755654744feae978fbb123718b2f139bc0fa6697" - integrity sha512-AXVQwdhot1eqLihwasPElhX2tAZiBjWdJ9i/Zcj2S6QYIjkx62OKSfnobkriB81C3l4w0rVy3Nt4jaTBltYEpw== +browserslist@^4.24.0, "browserslist@>= 4.21.0": + version "4.24.4" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" + integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== dependencies: - baseline-browser-mapping "^2.8.19" - caniuse-lite "^1.0.30001751" - electron-to-chromium "^1.5.238" - node-releases "^2.0.26" - update-browserslist-db "^1.1.4" + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" + update-browserslist-db "^1.1.1" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== cac@^6.7.14: version "6.7.14" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + resolved "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -cache-point@^3.0.0, cache-point@^3.0.1: - version "3.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cache-point/-/cache-point-3.0.1.tgz#4a1997794695be780e1d080235aa7a289161f181" - integrity sha512-itTIMLEKbh6Dw5DruXbxAgcyLnh/oPGVLBfTPqBOftASxHe8bAeXy7JkO4F0LvHqht7XqP5O/09h5UcHS2w0FA== - dependencies: - array-back "^6.2.2" - call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: version "1.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6" + resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz" integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== dependencies: es-errors "^1.3.0" @@ -839,24 +589,17 @@ call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: callsites@^3.0.0: version "3.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -caniuse-lite@^1.0.30001751: - version "1.0.30001754" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/caniuse-lite/-/caniuse-lite-1.0.30001754.tgz#7758299d9a72cce4e6b038788a15b12b44002759" - integrity sha512-x6OeBXueoAceOmotzx3PO4Zpt4rzpeIFsSr6AAePTZxSkXiYDUmpypEl7e2+8NCd9bD7bXjqyef8CJYPC1jfxg== - -catharsis@^0.9.0: - version "0.9.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" - integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== - dependencies: - lodash "^4.17.15" +caniuse-lite@^1.0.30001688: + version "1.0.30001700" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz" + integrity sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ== chai@^4.3.10: version "4.5.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chai/-/chai-4.5.0.tgz#707e49923afdd9b13a8b0b47d33d732d13812fd8" + resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== dependencies: assertion-error "^1.1.0" @@ -867,16 +610,9 @@ chai@^4.3.10: pathval "^1.1.1" type-detect "^4.1.0" -chalk-template@^0.4.0: - version "0.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chalk-template/-/chalk-template-0.4.0.tgz#692c034d0ed62436b9062c1707fadcd0f753204b" - integrity sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg== - dependencies: - chalk "^4.1.2" - -chalk@^4.0.0, chalk@^4.1.2: +chalk@^4.0.0: version "4.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" @@ -884,169 +620,131 @@ chalk@^4.0.0, chalk@^4.1.2: check-error@^1.0.3: version "1.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/check-error/-/check-error-1.0.3.tgz#a6502e4312a7ee969f646e83bb3ddd56281bd694" + resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== dependencies: get-func-name "^2.0.2" color-convert@^2.0.1: version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@~1.1.4: version "1.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== combined-stream@^1.0.8: version "1.0.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" -command-line-args@^6.0.1: - version "6.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/command-line-args/-/command-line-args-6.0.1.tgz#cbd1efb4f72b285dbd54bde9a8585c2d9694b070" - integrity sha512-Jr3eByUjqyK0qd8W0SGFW1nZwqCaNCtbXjRo2cRJC1OYxWl3MZ5t1US3jq+cO4sPavqgw4l9BMGX0CBe+trepg== - dependencies: - array-back "^6.2.2" - find-replace "^5.0.2" - lodash.camelcase "^4.3.0" - typical "^7.2.0" - -command-line-usage@^7.0.3: - version "7.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/command-line-usage/-/command-line-usage-7.0.3.tgz#6bce992354f6af10ecea2b631bfdf0c8b3bfaea3" - integrity sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q== - dependencies: - array-back "^6.2.2" - chalk-template "^0.4.0" - table-layout "^4.1.0" - typical "^7.1.1" - -common-sequence@^3.0.0: - version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/common-sequence/-/common-sequence-3.0.0.tgz#d631cf0306fb2dea97e1d6669a1627950803fca1" - integrity sha512-g/CgSYk93y+a1IKm50tKl7kaT/OjjTYVQlEbUlt/49ZLV1mcKpUU7iyDiqTAeLdb4QDtQfq3ako8y8v//fzrWQ== +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== concat-map@0.0.1: version "0.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== confbox@^0.1.8: version "0.1.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz" integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== -config-master@^3.1.0: - version "3.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/config-master/-/config-master-3.1.0.tgz#667663590505a283bf26a484d68489d74c5485da" - integrity sha512-n7LBL1zBzYdTpF1mx5DNcZnZn05CWIdsdvtPL4MosvqbBUK3Rq6VWEtGUuF3Y0s9/CIhMejezqlSkP6TnCJ/9g== - dependencies: - walk-back "^2.0.1" - convert-source-map@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -current-module-paths@^1.1.2: - version "1.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/current-module-paths/-/current-module-paths-1.1.2.tgz#13a2d821b2f864c3adead261b7954b068510c32f" - integrity sha512-H4s4arcLx/ugbu1XkkgSvcUZax0L6tXUqnppGniQb8l5VjUKGHoayXE5RiriiPhYDd+kjZnaok1Uig13PKtKYQ== - debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.4.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a" - integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA== + version "4.4.1" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz" + integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== dependencies: ms "^2.1.3" -debug@~4.3.1, debug@~4.3.2: +debug@~4.3.1: version "4.3.7" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + +debug@~4.3.2: + version "4.3.7" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: ms "^2.1.3" deep-eql@^4.1.3: version "4.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/deep-eql/-/deep-eql-4.1.4.tgz#d0d3912865911bb8fac5afb4e3acfa6a28dc72b7" + resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== dependencies: type-detect "^4.0.0" deep-is@^0.1.3: version "0.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== delayed-stream@~1.0.0: version "1.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== diff-sequences@^29.6.3: version "29.6.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -dmd@^7.1.1: - version "7.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dmd/-/dmd-7.1.1.tgz#acf791a47aec88c0a80873695bb2c1cc67a04ffe" - integrity sha512-Ap2HP6iuOek7eShReDLr9jluNJm9RMZESlt29H/Xs1qrVMkcS9X6m5h1mBC56WMxNiSo0wvjGICmZlYUSFjwZQ== - dependencies: - array-back "^6.2.2" - cache-point "^3.0.0" - common-sequence "^3.0.0" - file-set "^5.2.2" - handlebars "^4.7.8" - marked "^4.3.0" - walk-back "^5.1.1" - doctrine@^3.0.0: version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== dependencies: esutils "^2.0.2" dotenv@^16.3.1: - version "16.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020" - integrity sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow== + version "16.4.7" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz" + integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== dunder-proto@^1.0.1: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a" + resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== dependencies: call-bind-apply-helpers "^1.0.1" es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.238: - version "1.5.245" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/electron-to-chromium/-/electron-to-chromium-1.5.245.tgz#81aea81adf1e06b6f703b4b35ac6d543421d0fd9" - integrity sha512-rdmGfW47ZhL/oWEJAY4qxRtdly2B98ooTJ0pdEI4jhVLZ6tNf8fPtov2wS1IRKwFJT92le3x4Knxiwzl7cPPpQ== +electron-to-chromium@^1.5.73: + version "1.5.104" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.104.tgz" + integrity sha512-Us9M2L4cO/zMBqVkJtnj353nQhMju9slHm62NprKTmdF3HH8wYOtNvDFq/JB2+ZRoGLzdvYDiATlMHs98XBM1g== engine.io-client@~6.6.1: version "6.6.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/engine.io-client/-/engine.io-client-6.6.3.tgz#815393fa24f30b8e6afa8f77ccca2f28146be6de" + resolved "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz" integrity sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w== dependencies: "@socket.io/component-emitter" "~3.1.0" @@ -1057,34 +755,34 @@ engine.io-client@~6.6.1: engine.io-parser@~5.2.1: version "5.2.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz" integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== entities@^4.4.0: version "4.5.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== es-define-property@^1.0.1: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: version "1.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz" integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== dependencies: es-errors "^1.3.0" es-set-tostringtag@^2.1.0: version "2.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz" integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== dependencies: es-errors "^1.3.0" @@ -1094,7 +792,7 @@ es-set-tostringtag@^2.1.0: esbuild@^0.21.3: version "0.21.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esbuild/-/esbuild-0.21.5.tgz#9ca301b120922959b766360d8ac830da0d02997d" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz" integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== optionalDependencies: "@esbuild/aix-ppc64" "0.21.5" @@ -1123,22 +821,17 @@ esbuild@^0.21.3: escalade@^3.2.0: version "3.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@^2.0.0: - version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" - integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== - escape-string-regexp@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-scope@^7.2.2: version "7.2.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" @@ -1146,12 +839,12 @@ eslint-scope@^7.2.2: eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.54.0: +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.54.0: version "8.57.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz" integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" @@ -1195,7 +888,7 @@ eslint@^8.54.0: espree@^9.6.0, espree@^9.6.1: version "9.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: acorn "^8.9.0" @@ -1204,38 +897,38 @@ espree@^9.6.0, espree@^9.6.1: esquery@^1.4.2: version "1.6.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz" integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" esrecurse@^4.3.0: version "4.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== estree-walker@^3.0.3: version "3.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz" integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== dependencies: "@types/estree" "^1.0.0" esutils@^2.0.2: version "2.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== execa@^8.0.1: version "8.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/execa/-/execa-8.0.1.tgz#51f6a5943b580f963c3ca9c6321796db8cc39b8c" + resolved "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz" integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== dependencies: cross-spawn "^7.0.3" @@ -1250,12 +943,12 @@ execa@^8.0.1: fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.3.2: version "3.3.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz" integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== dependencies: "@nodelib/fs.stat" "^2.0.2" @@ -1266,56 +959,43 @@ fast-glob@^3.3.2: fast-json-stable-stringify@^2.0.0: version "2.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-levenshtein@^2.0.6: version "2.0.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.19.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5" - integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ== + version "1.19.0" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz" + integrity sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA== dependencies: reusify "^1.0.4" fflate@^0.8.1: version "0.8.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" + resolved "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz" integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== file-entry-cache@^6.0.1: version "6.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== dependencies: flat-cache "^3.0.4" -file-set@^5.2.2, file-set@^5.3.0: - version "5.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/file-set/-/file-set-5.3.0.tgz#f8ab3a930bd0912cc6fe372581c3aac71682ebfb" - integrity sha512-FKCxdjLX0J6zqTWdT0RXIxNF/n7MyXXnsSUp0syLEOCKdexvPZ02lNNv2a+gpK9E3hzUYF3+eFZe32ci7goNUg== - dependencies: - array-back "^6.2.2" - fast-glob "^3.3.2" - fill-range@^7.1.1: version "7.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" + resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== dependencies: to-regex-range "^5.0.1" -find-replace@^5.0.1, find-replace@^5.0.2: - version "5.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/find-replace/-/find-replace-5.0.2.tgz#fe27ff0be05975aef6fc679c1139bbabea564e26" - integrity sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q== - find-up@^5.0.0: version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" @@ -1323,7 +1003,7 @@ find-up@^5.0.0: flat-cache@^3.0.4: version "3.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: flatted "^3.2.9" @@ -1332,53 +1012,52 @@ flat-cache@^3.0.4: flatted@^3.2.9: version "3.3.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/flatted/-/flatted-3.3.3.tgz#67c8fad95454a7c7abebf74bb78ee74a44023358" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz" integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== follow-redirects@^1.15.6: - version "1.15.11" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" - integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== + version "1.15.9" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz" + integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== -form-data@^4.0.4: - version "4.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" - integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== +form-data@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz" + integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" es-set-tostringtag "^2.1.0" - hasown "^2.0.2" mime-types "^2.1.12" fs.realpath@^1.0.0: version "1.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@~2.3.2, fsevents@~2.3.3: version "2.3.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.2: version "1.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" + resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== get-intrinsic@^1.2.6: version "1.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz" integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== dependencies: call-bind-apply-helpers "^1.0.2" @@ -1394,7 +1073,7 @@ get-intrinsic@^1.2.6: get-proto@^1.0.1: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1" + resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz" integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== dependencies: dunder-proto "^1.0.1" @@ -1402,26 +1081,26 @@ get-proto@^1.0.1: get-stream@^8.0.1: version "8.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== glob-parent@^5.1.2: version "5.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.2: version "6.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3: version "7.2.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" @@ -1431,82 +1110,82 @@ glob@^7.1.3, glob@^7.1.4: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.4: + version "7.2.3" + resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + globals@^13.19.0: version "13.24.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" + resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" gopd@^1.2.0: version "1.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== -graceful-fs@^4.1.9: - version "4.2.11" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - graphemer@^1.4.0: version "1.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== -handlebars@^4.7.8: - version "4.7.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" - integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== - dependencies: - minimist "^1.2.5" - neo-async "^2.6.2" - source-map "^0.6.1" - wordwrap "^1.0.0" - optionalDependencies: - uglify-js "^3.1.4" - has-flag@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-symbols@^1.0.3, has-symbols@^1.1.0: version "1.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== has-tostringtag@^1.0.2: version "1.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== dependencies: has-symbols "^1.0.3" hasown@^2.0.2: version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: function-bind "^1.1.2" html-escaper@^2.0.0: version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== human-signals@^5.0.0: version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== ignore@^5.2.0: version "5.3.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.2.1: version "3.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/import-fresh/-/import-fresh-3.3.1.tgz#9cecb56503c0ada1f2741dbbd6546e4b13b57ccf" + resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz" integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== dependencies: parent-module "^1.0.0" @@ -1514,12 +1193,12 @@ import-fresh@^3.2.1: imurmurhash@^0.1.4: version "0.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== inflight@^1.0.4: version "1.0.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" @@ -1527,49 +1206,49 @@ inflight@^1.0.4: inherits@2: version "2.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== is-extglob@^2.1.1: version "2.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-number@^7.0.0: version "7.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-path-inside@^3.0.3: version "3.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-stream@^3.0.0: version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== isexe@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0, istanbul-lib-coverage@^3.2.2: version "3.2.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== istanbul-lib-instrument@^6.0.1: version "6.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" + resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz" integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== dependencies: "@babel/core" "^7.23.9" @@ -1580,7 +1259,7 @@ istanbul-lib-instrument@^6.0.1: istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: version "3.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" @@ -1589,7 +1268,7 @@ istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: istanbul-lib-source-maps@^5.0.4: version "5.0.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz#acaef948df7747c8eb5fbf1265cb980f6353a441" + resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz" integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== dependencies: "@jridgewell/trace-mapping" "^0.3.23" @@ -1597,141 +1276,70 @@ istanbul-lib-source-maps@^5.0.4: istanbul-lib-coverage "^3.0.0" istanbul-reports@^3.1.6: - version "3.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/istanbul-reports/-/istanbul-reports-3.2.0.tgz#cb4535162b5784aa623cee21a7252cf2c807ac93" - integrity sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA== + version "3.1.7" + resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz" + integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" js-tokens@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-tokens@^9.0.1: version "9.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz" integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== js-yaml@^4.1.0: version "4.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" -js2xmlparser@^4.0.2: - version "4.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" - integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== - dependencies: - xmlcreate "^2.0.4" - -jsdoc-api@^9.3.5: - version "9.3.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-api/-/jsdoc-api-9.3.5.tgz#1f5683b8db9cdc5d8afb606ec0041f3c1b7bbd0f" - integrity sha512-TQwh1jA8xtCkIbVwm/XA3vDRAa5JjydyKx1cC413Sh3WohDFxcMdwKSvn4LOsq2xWyAmOU/VnSChTQf6EF0R8g== - dependencies: - array-back "^6.2.2" - cache-point "^3.0.1" - current-module-paths "^1.1.2" - file-set "^5.3.0" - jsdoc "^4.0.4" - object-to-spawn-args "^2.0.1" - walk-back "^5.1.1" - -jsdoc-parse@^6.2.5: - version "6.2.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-parse/-/jsdoc-parse-6.2.5.tgz#d719dc7416886392449f31189802ce2e92f5a49e" - integrity sha512-8JaSNjPLr2IuEY4Das1KM6Z4oLHZYUnjRrr27hKSa78Cj0i5Lur3DzNnCkz+DfrKBDoljGMoWOiBVQbtUZJBPw== - dependencies: - array-back "^6.2.2" - find-replace "^5.0.1" - sort-array "^5.0.0" - -jsdoc-to-markdown@^9.1.3: - version "9.1.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc-to-markdown/-/jsdoc-to-markdown-9.1.3.tgz#99e5eb08b7990f043d0398aaeea8382b8651bb86" - integrity sha512-i9wi+6WHX0WKziv0ar88T8h7OmxA0LWdQaV23nY6uQyKvdUPzVt0o6YAaOceFuKRF5Rvlju5w/KnZBfdpDAlnw== - dependencies: - array-back "^6.2.2" - command-line-args "^6.0.1" - command-line-usage "^7.0.3" - config-master "^3.1.0" - dmd "^7.1.1" - jsdoc-api "^9.3.5" - jsdoc-parse "^6.2.5" - walk-back "^5.1.1" - -jsdoc@^4.0.4: - version "4.0.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsdoc/-/jsdoc-4.0.5.tgz#fbed70e04a3abcf2143dad6b184947682bbc7315" - integrity sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g== - dependencies: - "@babel/parser" "^7.20.15" - "@jsdoc/salty" "^0.2.1" - "@types/markdown-it" "^14.1.1" - bluebird "^3.7.2" - catharsis "^0.9.0" - escape-string-regexp "^2.0.0" - js2xmlparser "^4.0.2" - klaw "^3.0.0" - markdown-it "^14.1.0" - markdown-it-anchor "^8.6.7" - marked "^4.0.10" - mkdirp "^1.0.4" - requizzle "^0.2.3" - strip-json-comments "^3.1.0" - underscore "~1.13.2" - jsesc@^3.0.2: version "3.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== json-buffer@3.0.1: version "3.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-schema-traverse@^0.4.1: version "0.4.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== json-stringify-safe@^5.0.1: version "5.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== json5@^2.2.3: version "2.2.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== keyv@^4.5.3: version "4.5.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: json-buffer "3.0.1" -klaw@^3.0.0: - version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" - integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== - dependencies: - graceful-fs "^4.1.9" - levn@^0.4.1: version "0.4.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== dependencies: prelude-ls "^1.2.1" @@ -1739,14 +1347,14 @@ levn@^0.4.1: linkify-it@^5.0.0: version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz" integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== dependencies: uc.micro "^2.0.0" local-pkg@^0.5.0: version "0.5.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" + resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz" integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== dependencies: mlly "^1.7.3" @@ -1754,55 +1362,45 @@ local-pkg@^0.5.0: locate-path@^6.0.0: version "6.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== - lodash.merge@^4.6.2: version "4.6.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.15, lodash@^4.17.21: - version "4.17.21" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - loupe@^2.3.6, loupe@^2.3.7: version "2.3.7" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697" + resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== dependencies: get-func-name "^2.0.1" lru-cache@^5.1.1: version "5.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" lunr@^2.3.9: version "2.3.9" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== magic-string@^0.30.5: - version "0.30.21" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/magic-string/-/magic-string-0.30.21.tgz#56763ec09a0fa8091df27879fd94d19078c00d91" - integrity sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ== + version "0.30.17" + resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz" + integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA== dependencies: - "@jridgewell/sourcemap-codec" "^1.5.5" + "@jridgewell/sourcemap-codec" "^1.5.0" magicast@^0.3.3: version "0.3.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/magicast/-/magicast-0.3.5.tgz#8301c3c7d66704a0771eb1bad74274f0ec036739" + resolved "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz" integrity sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ== dependencies: "@babel/parser" "^7.25.4" @@ -1811,19 +1409,14 @@ magicast@^0.3.3: make-dir@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: semver "^7.5.3" -markdown-it-anchor@^8.6.7: - version "8.6.7" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz#ee6926daf3ad1ed5e4e3968b1740eef1c6399634" - integrity sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA== - markdown-it@^14.1.0: version "14.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz" integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== dependencies: argparse "^2.0.1" @@ -1833,34 +1426,29 @@ markdown-it@^14.1.0: punycode.js "^2.3.1" uc.micro "^2.1.0" -marked@^4.0.10, marked@^4.3.0: - version "4.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" - integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== - math-intrinsics@^1.1.0: version "1.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9" + resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== mdurl@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz" integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== merge-stream@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0: version "1.4.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.8: version "4.0.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" @@ -1868,123 +1456,103 @@ micromatch@^4.0.8: mime-db@1.52.0: version "1.52.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12: version "2.1.35" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mimic-fn@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@^9.0.5: version "9.0.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== dependencies: brace-expansion "^2.0.1" -minimist@^1.2.5: - version "1.2.8" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - mlly@^1.7.3, mlly@^1.7.4: - version "1.8.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mlly/-/mlly-1.8.0.tgz#e074612b938af8eba1eaf43299cbc89cb72d824e" - integrity sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g== + version "1.7.4" + resolved "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz" + integrity sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw== dependencies: - acorn "^8.15.0" - pathe "^2.0.3" - pkg-types "^1.3.1" - ufo "^1.6.1" + acorn "^8.14.0" + pathe "^2.0.1" + pkg-types "^1.3.0" + ufo "^1.5.4" mrmime@^2.0.0: version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mrmime/-/mrmime-2.0.1.tgz#bc3e87f7987853a54c9850eeb1f1078cd44adddc" + resolved "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz" integrity sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ== ms@^2.1.3: version "2.1.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nanoid@^3.3.11: version "3.3.11" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz" integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== natural-compare@^1.4.0: version "1.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -neo-async@^2.6.2: - version "2.6.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - nock@^13.4.0: version "13.5.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/nock/-/nock-13.5.6.tgz#5e693ec2300bbf603b61dae6df0225673e6c4997" + resolved "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz" integrity sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ== dependencies: debug "^4.1.0" json-stringify-safe "^5.0.1" propagate "^2.0.0" -node-releases@^2.0.26: - version "2.0.27" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" - integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== +node-releases@^2.0.19: + version "2.0.19" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== npm-run-path@^5.1.0: version "5.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz" integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== dependencies: path-key "^4.0.0" -object-to-spawn-args@^2.0.1: - version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/object-to-spawn-args/-/object-to-spawn-args-2.0.1.tgz#cf8b8e3c9b3589137a469cac90391f44870144a5" - integrity sha512-6FuKFQ39cOID+BMZ3QaphcC8Y4cw6LXBLyIgPU+OhIYwviJamPAn+4mITapnSBQrejB+NNp+FMskhD8Cq+Ys3w== - once@^1.3.0: version "1.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" onetime@^6.0.0: version "6.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz" integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== dependencies: mimic-fn "^4.0.0" optionator@^0.9.3: version "0.9.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" @@ -1996,80 +1564,80 @@ optionator@^0.9.3: p-limit@^3.0.2: version "3.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-limit@^5.0.0: version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz" integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== dependencies: yocto-queue "^1.0.0" p-locate@^5.0.0: version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" parent-module@^1.0.0: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" path-exists@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-key@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz" integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== pathe@^1.1.1: version "1.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathe/-/pathe-1.1.2.tgz#6c4cb47a945692e48a1ddd6e4094d170516437ec" + resolved "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz" integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== -pathe@^2.0.1, pathe@^2.0.3: +pathe@^2.0.1: version "2.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathe/-/pathe-2.0.3.tgz#3ecbec55421685b70a9da872b2cff3e1cbed1716" + resolved "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz" integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== pathval@^1.1.1: version "1.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== picocolors@^1.0.0, picocolors@^1.1.1: version "1.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== picomatch@^2.3.1: version "2.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pkg-types@^1.2.1, pkg-types@^1.3.1: +pkg-types@^1.2.1, pkg-types@^1.3.0: version "1.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pkg-types/-/pkg-types-1.3.1.tgz#bd7cc70881192777eef5326c19deb46e890917df" + resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz" integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== dependencies: confbox "^0.1.8" @@ -2078,7 +1646,7 @@ pkg-types@^1.2.1, pkg-types@^1.3.1: postcss@^8.4.43: version "8.5.6" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/postcss/-/postcss-8.5.6.tgz#2825006615a619b4f62a9e7426cc120b349a8f3c" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz" integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== dependencies: nanoid "^3.3.11" @@ -2087,12 +1655,12 @@ postcss@^8.4.43: prelude-ls@^1.2.1: version "1.2.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== pretty-format@^29.7.0: version "29.7.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: "@jest/schemas" "^29.6.3" @@ -2101,131 +1669,127 @@ pretty-format@^29.7.0: propagate@^2.0.0: version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/propagate/-/propagate-2.0.1.tgz#40cdedab18085c792334e64f0ac17256d38f9a45" + resolved "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz" integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== proxy-from-env@^1.1.0: version "1.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== punycode.js@^2.3.1: version "2.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz" integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== punycode@^2.1.0: version "2.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== queue-microtask@^1.2.2: version "1.2.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== react-is@^18.0.0: version "18.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== -requizzle@^0.2.3: - version "0.2.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/requizzle/-/requizzle-0.2.4.tgz#319eb658b28c370f0c20f968fa8ceab98c13d27c" - integrity sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw== - dependencies: - lodash "^4.17.21" - resolve-from@^4.0.0: version "4.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== reusify@^1.0.4: - version "1.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/reusify/-/reusify-1.1.0.tgz#0fe13b9522e1473f51b558ee796e08f11f9b489f" - integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw== + version "1.0.4" + resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@^3.0.2: version "3.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" rollup@^4.20.0: - version "4.52.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/rollup/-/rollup-4.52.5.tgz#96982cdcaedcdd51b12359981f240f94304ec235" - integrity sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw== + version "4.44.1" + resolved "https://registry.npmjs.org/rollup/-/rollup-4.44.1.tgz" + integrity sha512-x8H8aPvD+xbl0Do8oez5f5o8eMS3trfCghc4HhLAnCkj7Vl0d1JWGs0UF/D886zLW2rOj2QymV/JcSSsw+XDNg== dependencies: "@types/estree" "1.0.8" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.52.5" - "@rollup/rollup-android-arm64" "4.52.5" - "@rollup/rollup-darwin-arm64" "4.52.5" - "@rollup/rollup-darwin-x64" "4.52.5" - "@rollup/rollup-freebsd-arm64" "4.52.5" - "@rollup/rollup-freebsd-x64" "4.52.5" - "@rollup/rollup-linux-arm-gnueabihf" "4.52.5" - "@rollup/rollup-linux-arm-musleabihf" "4.52.5" - "@rollup/rollup-linux-arm64-gnu" "4.52.5" - "@rollup/rollup-linux-arm64-musl" "4.52.5" - "@rollup/rollup-linux-loong64-gnu" "4.52.5" - "@rollup/rollup-linux-ppc64-gnu" "4.52.5" - "@rollup/rollup-linux-riscv64-gnu" "4.52.5" - "@rollup/rollup-linux-riscv64-musl" "4.52.5" - "@rollup/rollup-linux-s390x-gnu" "4.52.5" - "@rollup/rollup-linux-x64-gnu" "4.52.5" - "@rollup/rollup-linux-x64-musl" "4.52.5" - "@rollup/rollup-openharmony-arm64" "4.52.5" - "@rollup/rollup-win32-arm64-msvc" "4.52.5" - "@rollup/rollup-win32-ia32-msvc" "4.52.5" - "@rollup/rollup-win32-x64-gnu" "4.52.5" - "@rollup/rollup-win32-x64-msvc" "4.52.5" + "@rollup/rollup-android-arm-eabi" "4.44.1" + "@rollup/rollup-android-arm64" "4.44.1" + "@rollup/rollup-darwin-arm64" "4.44.1" + "@rollup/rollup-darwin-x64" "4.44.1" + "@rollup/rollup-freebsd-arm64" "4.44.1" + "@rollup/rollup-freebsd-x64" "4.44.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.44.1" + "@rollup/rollup-linux-arm-musleabihf" "4.44.1" + "@rollup/rollup-linux-arm64-gnu" "4.44.1" + "@rollup/rollup-linux-arm64-musl" "4.44.1" + "@rollup/rollup-linux-loongarch64-gnu" "4.44.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.44.1" + "@rollup/rollup-linux-riscv64-gnu" "4.44.1" + "@rollup/rollup-linux-riscv64-musl" "4.44.1" + "@rollup/rollup-linux-s390x-gnu" "4.44.1" + "@rollup/rollup-linux-x64-gnu" "4.44.1" + "@rollup/rollup-linux-x64-musl" "4.44.1" + "@rollup/rollup-win32-arm64-msvc" "4.44.1" + "@rollup/rollup-win32-ia32-msvc" "4.44.1" + "@rollup/rollup-win32-x64-msvc" "4.44.1" fsevents "~2.3.2" run-parallel@^1.1.9: version "1.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" semver@^6.3.1: version "6.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.5.3, semver@^7.5.4: - version "7.7.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" - integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== +semver@^7.5.3: + version "7.7.1" + resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" + integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== + +semver@^7.5.4: + version "7.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz" + integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== shebang-command@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^3.0.0: version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== siginfo@^2.0.0: version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + resolved "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz" integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== signal-exit@^4.1.0: version "4.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== sirv@^2.0.4: version "2.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + resolved "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz" integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== dependencies: "@polka/url" "^1.0.0-next.24" @@ -2234,7 +1798,7 @@ sirv@^2.0.4: socket.io-client@^4.7.5: version "4.8.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/socket.io-client/-/socket.io-client-4.8.1.tgz#1941eca135a5490b94281d0323fe2a35f6f291cb" + resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz" integrity sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ== dependencies: "@socket.io/component-emitter" "~3.1.0" @@ -2244,82 +1808,84 @@ socket.io-client@^4.7.5: socket.io-parser@~4.2.4: version "4.2.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz" integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== dependencies: "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" -sort-array@^5.0.0: - version "5.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/sort-array/-/sort-array-5.1.1.tgz#92f5ee092fb2cca1dc3b46eee102a0d3a3dfc944" - integrity sha512-EltS7AIsNlAFIM9cayrgKrM6XP94ATWwXP4LCL4IQbvbYhELSt2hZTrixg+AaQwnWFs/JGJgqU3rxMcNNWxGAA== - dependencies: - array-back "^6.2.2" - typical "^7.1.1" - source-map-js@^1.2.0, source-map-js@^1.2.1: version "1.2.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== -source-map@^0.6.1: +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0: version "0.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== stackback@0.0.2: version "0.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + resolved "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz" integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== std-env@^3.5.0: - version "3.10.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/std-env/-/std-env-3.10.0.tgz#d810b27e3a073047b2b5e40034881f5ea6f9c83b" - integrity sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg== + version "3.9.0" + resolved "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz" + integrity sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw== strip-ansi@^6.0.1: version "6.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-final-newline@^3.0.0: version "3.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-literal@^2.0.0: version "2.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/strip-literal/-/strip-literal-2.1.1.tgz#26906e65f606d49f748454a08084e94190c2e5ad" + resolved "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz" integrity sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q== dependencies: js-tokens "^9.0.1" supports-color@^7.1.0: version "7.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" -table-layout@^4.1.0: - version "4.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/table-layout/-/table-layout-4.1.1.tgz#0f72965de1a5c0c1419c9ba21cae4e73a2f73a42" - integrity sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA== +terser@^5.4.0: + version "5.39.0" + resolved "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz" + integrity sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw== dependencies: - array-back "^6.2.2" - wordwrapjs "^5.1.0" + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" test-exclude@^6.0.0: version "6.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== dependencies: "@istanbuljs/schema" "^0.1.2" @@ -2328,66 +1894,66 @@ test-exclude@^6.0.0: text-table@^0.2.0: version "0.2.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== tinybench@^2.5.1: version "2.9.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinybench/-/tinybench-2.9.0.tgz#103c9f8ba6d7237a47ab6dd1dcff77251863426b" + resolved "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz" integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== tinypool@^0.8.3: version "0.8.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinypool/-/tinypool-0.8.4.tgz#e217fe1270d941b39e98c625dcecebb1408c9aa8" + resolved "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz" integrity sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ== tinyspy@^2.2.0: version "2.2.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" + resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz" integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== to-regex-range@^5.0.1: version "5.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" totalist@^3.0.0: version "3.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + resolved "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz" integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== dependencies: prelude-ls "^1.2.1" -type-detect@^4.0.0, type-detect@^4.1.0: +type-detect@^4.0.0: + version "4.0.8" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-detect@^4.1.0: version "4.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-detect/-/type-detect-4.1.0.tgz#deb2453e8f08dcae7ae98c626b13dddb0155906c" + resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== type-fest@^0.20.2: version "0.20.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== typedoc-plugin-markdown@^4.9.0: version "4.9.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz#88f37ba2417fc8b93951d457a3a557682ce5e01e" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz" integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== -typedoc-plugin-missing-exports@^4.1.2: - version "4.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-missing-exports/-/typedoc-plugin-missing-exports-4.1.2.tgz#a125a679782082caad123e8b086b4ac9b28d08da" - integrity sha512-WNoeWX9+8X3E3riuYPduilUTFefl1K+Z+5bmYqNeH5qcWjtnTRMbRzGdEQ4XXn1WEO4WCIlU0vf46Ca2y/mspg== - -typedoc@^0.28.14: +typedoc@^0.28.14, typedoc@0.28.x: version "0.28.14" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz#f48d650efc983b5cb3034b3b0e986b1702074326" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz" integrity sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA== dependencies: "@gerrit0/mini-shiki" "^3.12.0" @@ -2396,59 +1962,49 @@ typedoc@^0.28.14: minimatch "^9.0.5" yaml "^2.8.1" -typescript@^5.3.2: - version "5.9.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" - integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== - -typical@^7.1.1, typical@^7.2.0: - version "7.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typical/-/typical-7.3.0.tgz#930376be344228709f134613911fa22aa09617a4" - integrity sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw== +typescript@^5.3.2, "typescript@5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x": + version "5.7.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz" + integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== uc.micro@^2.0.0, uc.micro@^2.1.0: version "2.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz" integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== -ufo@^1.6.1: +ufo@^1.5.4: version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ufo/-/ufo-1.6.1.tgz#ac2db1d54614d1b22c1d603e3aef44a85d8f146b" + resolved "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz" integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== -uglify-js@^3.1.4: - version "3.19.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f" - integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ== - -underscore@~1.13.2: - version "1.13.7" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/underscore/-/underscore-1.13.7.tgz#970e33963af9a7dda228f17ebe8399e5fbe63a10" - integrity sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== -update-browserslist-db@^1.1.4: - version "1.1.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz#7802aa2ae91477f255b86e0e46dbc787a206ad4a" - integrity sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A== +update-browserslist-db@^1.1.1: + version "1.1.2" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz" + integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== dependencies: escalade "^3.2.0" picocolors "^1.1.1" uri-js@^4.2.2: version "4.4.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" uuid@^13.0.0: version "13.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uuid/-/uuid-13.0.0.tgz#263dc341b19b4d755eb8fe36b78d95a6b65707e8" + resolved "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz" integrity sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w== vite-node@1.6.1: version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vite-node/-/vite-node-1.6.1.tgz#fff3ef309296ea03ceaa6ca4bb660922f5416c57" + resolved "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz" integrity sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA== dependencies: cac "^6.7.14" @@ -2458,9 +2014,9 @@ vite-node@1.6.1: vite "^5.0.0" vite@^5.0.0: - version "5.4.21" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vite/-/vite-5.4.21.tgz#84a4f7c5d860b071676d39ba513c0d598fdc7027" - integrity sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw== + version "5.4.19" + resolved "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz" + integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA== dependencies: esbuild "^0.21.3" postcss "^8.4.43" @@ -2468,9 +2024,9 @@ vite@^5.0.0: optionalDependencies: fsevents "~2.3.3" -vitest@^1.0.0: +vitest@^1.0.0, vitest@1.6.1: version "1.6.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/vitest/-/vitest-1.6.1.tgz#b4a3097adf8f79ac18bc2e2e0024c534a7a78d2f" + resolved "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz" integrity sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag== dependencies: "@vitest/expect" "1.6.1" @@ -2494,26 +2050,16 @@ vitest@^1.0.0: vite-node "1.6.1" why-is-node-running "^2.2.2" -walk-back@^2.0.1: - version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/walk-back/-/walk-back-2.0.1.tgz#554e2a9d874fac47a8cb006bf44c2f0c4998a0a4" - integrity sha512-Nb6GvBR8UWX1D+Le+xUq0+Q1kFmRBIWVrfLnQAOmcpEzA9oAxwJ9gIr36t9TWYfzvWRvuMtjHiVsJYEkXWaTAQ== - -walk-back@^5.1.1: - version "5.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/walk-back/-/walk-back-5.1.1.tgz#80045191b3b3a05a8e3cc6fca066a2e495230d93" - integrity sha512-e/FRLDVdZQWFrAzU6Hdvpm7D7m2ina833gIKLptQykRK49mmCYHLHq7UqjPDbxbKLZkTkW1rFqbengdE3sLfdw== - which@^2.0.1: version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" why-is-node-running@^2.2.2: version "2.3.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/why-is-node-running/-/why-is-node-running-2.3.0.tgz#a3f69a97107f494b3cdc3bdddd883a7d65cebf04" + resolved "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz" integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== dependencies: siginfo "^2.0.0" @@ -2521,55 +2067,40 @@ why-is-node-running@^2.2.2: word-wrap@^1.2.5: version "1.2.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -wordwrapjs@^5.1.0: - version "5.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wordwrapjs/-/wordwrapjs-5.1.1.tgz#bfd1eb426f0f7eec73b7df32cf7df1f618bfb3a9" - integrity sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg== - wrappy@1: version "1.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@~8.17.1: version "8.17.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -xmlcreate@^2.0.4: - version "2.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" - integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== - xmlhttprequest-ssl@~2.1.1: version "2.1.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz#e9e8023b3f29ef34b97a859f584c5e6c61418e23" + resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz" integrity sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ== yallist@^3.0.2: version "3.1.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yaml@^2.8.1: version "2.8.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz" integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== yocto-queue@^0.1.0: version "0.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== yocto-queue@^1.0.0: version "1.2.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yocto-queue/-/yocto-queue-1.2.1.tgz#36d7c4739f775b3cbc28e6136e21aa057adec418" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz" integrity sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg== From 1e8fe01a3ca115c5bb88287800097410a1184d05 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 19 Nov 2025 11:09:03 +0200 Subject: [PATCH 03/31] more docs including client, agents, and auth --- docs/README.md | 19 +- docs/classes/Base44Error.md | 110 +----- docs/functions/createClient.md | 4 + docs/functions/createClientFromRequest.md | 4 + docs/functions/getAccessToken.md | 35 ++ docs/functions/getLoginUrl.md | 25 ++ docs/functions/removeAccessToken.md | 22 ++ docs/functions/saveAccessToken.md | 30 ++ docs/interfaces/AgentsModule.md | 85 +++-- docs/interfaces/AppConversationLike.md | 29 -- docs/interfaces/AppConversationMessage.md | 65 ---- docs/interfaces/AppLike.md | 301 --------------- docs/interfaces/AppMessageContent.md | 37 -- docs/interfaces/AuthConfigLike.md | 41 -- docs/interfaces/AuthModule.md | 312 +++++++++------- docs/interfaces/Base44ErrorJSON.md | 50 +++ docs/interfaces/ChangePasswordParams.md | 31 ++ docs/interfaces/DenoProjectLike.md | 29 -- docs/interfaces/EntityHandler.md | 4 +- docs/interfaces/GetAccessTokenOptions.md | 14 +- docs/interfaces/LoginResponse.md | 6 +- docs/interfaces/RegisterPayload.md | 8 +- docs/interfaces/RemoveAccessTokenOptions.md | 2 +- docs/interfaces/ResetPasswordParams.md | 23 ++ docs/interfaces/SaveAccessTokenOptions.md | 2 +- docs/interfaces/User.md | 85 +++++ docs/interfaces/UserEntityLike.md | 47 --- docs/interfaces/UserLike.md | 11 - docs/interfaces/VerifyOtpParams.md | 23 ++ docs/type-aliases/AgentConversation.md | 12 +- docs/type-aliases/AgentMessage.md | 62 +-- .../type-aliases/AgentMessageCustomContext.md | 35 ++ docs/type-aliases/AgentMessageMetadata.md | 33 ++ docs/type-aliases/AgentMessageReasoning.md | 35 ++ docs/type-aliases/AgentMessageToolCall.md | 51 +++ docs/type-aliases/AgentMessageUsage.md | 27 ++ docs/type-aliases/CreateClientConfig.md | 3 + docs/type-aliases/LoginInfoResponse.md | 7 - docs/type-aliases/ModelFilterParams.md | 28 +- src/client.ts | 6 + src/client.types.ts | 7 +- src/index.ts | 24 +- src/modules/agents.ts | 2 +- src/modules/agents.types.ts | 230 +++++++----- src/modules/app.types.ts | 56 ++- src/modules/auth.ts | 31 +- src/modules/auth.types.ts | 353 ++++++++++++------ src/modules/entities.types.ts | 4 +- src/types.ts | 30 +- src/utils/auth-utils.ts | 121 +++++- src/utils/auth-utils.types.ts | 170 +-------- src/utils/axios-client.ts | 44 +-- src/utils/axios-client.types.ts | 32 ++ 53 files changed, 1454 insertions(+), 1403 deletions(-) delete mode 100644 docs/interfaces/AppConversationLike.md delete mode 100644 docs/interfaces/AppConversationMessage.md delete mode 100644 docs/interfaces/AppLike.md delete mode 100644 docs/interfaces/AppMessageContent.md delete mode 100644 docs/interfaces/AuthConfigLike.md create mode 100644 docs/interfaces/Base44ErrorJSON.md create mode 100644 docs/interfaces/ChangePasswordParams.md delete mode 100644 docs/interfaces/DenoProjectLike.md create mode 100644 docs/interfaces/ResetPasswordParams.md create mode 100644 docs/interfaces/User.md delete mode 100644 docs/interfaces/UserEntityLike.md delete mode 100644 docs/interfaces/UserLike.md create mode 100644 docs/interfaces/VerifyOtpParams.md create mode 100644 docs/type-aliases/AgentMessageCustomContext.md create mode 100644 docs/type-aliases/AgentMessageMetadata.md create mode 100644 docs/type-aliases/AgentMessageReasoning.md create mode 100644 docs/type-aliases/AgentMessageToolCall.md create mode 100644 docs/type-aliases/AgentMessageUsage.md delete mode 100644 docs/type-aliases/LoginInfoResponse.md create mode 100644 src/utils/axios-client.types.ts diff --git a/docs/README.md b/docs/README.md index 55b115f..c7c97fb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,16 +13,12 @@ - [Base44Client](interfaces/Base44Client.md) - [AgentsModule](interfaces/AgentsModule.md) - [AppLogsModule](interfaces/AppLogsModule.md) -- [AppMessageContent](interfaces/AppMessageContent.md) -- [AppConversationMessage](interfaces/AppConversationMessage.md) -- [AppConversationLike](interfaces/AppConversationLike.md) -- [DenoProjectLike](interfaces/DenoProjectLike.md) -- [AppLike](interfaces/AppLike.md) -- [UserLike](interfaces/UserLike.md) -- [UserEntityLike](interfaces/UserEntityLike.md) -- [AuthConfigLike](interfaces/AuthConfigLike.md) +- [User](interfaces/User.md) - [LoginResponse](interfaces/LoginResponse.md) - [RegisterPayload](interfaces/RegisterPayload.md) +- [VerifyOtpParams](interfaces/VerifyOtpParams.md) +- [ChangePasswordParams](interfaces/ChangePasswordParams.md) +- [ResetPasswordParams](interfaces/ResetPasswordParams.md) - [AuthModule](interfaces/AuthModule.md) - [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse.md) - [ConnectorsModule](interfaces/ConnectorsModule.md) @@ -34,14 +30,19 @@ - [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions.md) - [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions.md) - [GetLoginUrlOptions](interfaces/GetLoginUrlOptions.md) +- [Base44ErrorJSON](interfaces/Base44ErrorJSON.md) ## Type Aliases - [CreateClientOptions](type-aliases/CreateClientOptions.md) - [CreateClientConfig](type-aliases/CreateClientConfig.md) +- [AgentMessageReasoning](type-aliases/AgentMessageReasoning.md) +- [AgentMessageToolCall](type-aliases/AgentMessageToolCall.md) +- [AgentMessageUsage](type-aliases/AgentMessageUsage.md) +- [AgentMessageCustomContext](type-aliases/AgentMessageCustomContext.md) +- [AgentMessageMetadata](type-aliases/AgentMessageMetadata.md) - [AgentConversation](type-aliases/AgentConversation.md) - [AgentMessage](type-aliases/AgentMessage.md) -- [LoginInfoResponse](type-aliases/LoginInfoResponse.md) - [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType.md) - [EntitiesModule](type-aliases/EntitiesModule.md) - [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction.md) diff --git a/docs/classes/Base44Error.md b/docs/classes/Base44Error.md index 9e0c7b4..4e6cb23 100644 --- a/docs/classes/Base44Error.md +++ b/docs/classes/Base44Error.md @@ -6,11 +6,9 @@ Custom error class for Base44 SDK errors. -This error is thrown when API requests fail. It extends the standard Error -class and includes additional information about the HTTP status, error code, -and response data from the server. +This error is thrown when API requests fail. It extends the standard `Error` class and includes additional information about the HTTP status, error code, and response data from the server. -## Examples +## Example ```typescript try { @@ -25,89 +23,17 @@ try { } ``` -```typescript -// Handling authentication errors -try { - await client.auth.loginViaEmailPassword('user@example.com', 'wrong-password'); -} catch (error) { - if (error instanceof Base44Error && error.status === 401) { - console.error('Authentication failed:', error.message); - } -} -``` - -```typescript -// Serializing errors for logging -try { - await client.entities.User.create({ invalid: 'data' }); -} catch (error) { - if (error instanceof Base44Error) { - const serialized = error.toJSON(); - // Send to logging service - logger.error(serialized); - } -} -``` - ## Extends - `Error` -## Constructors - -### Constructor - -> **new Base44Error**(`message`, `status`, `code`, `data`, `originalError`): `Base44Error` - -Creates a new Base44Error instance. - -#### Parameters - -##### message - -`string` - -Human-readable error message - -##### status - -`number` - -HTTP status code - -##### code - -`string` - -Error code from the API - -##### data - -`any` - -Full response data from the server - -##### originalError - -`unknown` - -Original axios error object - -#### Returns - -`Base44Error` - -#### Overrides - -`Error.constructor` - ## Properties ### status > **status**: `number` -HTTP status code of the error (e.g., 400, 401, 404, 500). +HTTP status code of the error. *** @@ -115,7 +41,7 @@ HTTP status code of the error (e.g., 400, 401, 404, 500). > **code**: `string` -Error code from the API (e.g., "NOT_FOUND", "VALIDATION_ERROR"). +Error code from the API. *** @@ -131,13 +57,13 @@ Full response data from the server containing error details. > **originalError**: `unknown` -The original error object from axios. +The original error object from Axios. ## Methods ### toJSON() -> **toJSON**(): `object` +> **toJSON**(): [`Base44ErrorJSON`](../interfaces/Base44ErrorJSON.md) Serializes the error to a JSON-safe object. @@ -146,29 +72,9 @@ without circular reference issues. #### Returns -`object` +[`Base44ErrorJSON`](../interfaces/Base44ErrorJSON.md) -JSON-safe representation of the error - -##### name - -> **name**: `string` - -##### message - -> **message**: `string` - -##### status - -> **status**: `number` - -##### code - -> **code**: `string` - -##### data - -> **data**: `any` +JSON-safe representation of the error. #### Example diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md index 6b42962..f8398aa 100644 --- a/docs/functions/createClient.md +++ b/docs/functions/createClient.md @@ -28,10 +28,14 @@ To use the service role authentication mode, you need to provide a service role [`CreateClientConfig`](../type-aliases/CreateClientConfig.md) +Configuration object for the client. + ## Returns [`Base44Client`](../interfaces/Base44Client.md) +A configured Base44 client instance with access to all SDK modules. + ## Examples ```typescript diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md index 10b65c5..615ff24 100644 --- a/docs/functions/createClientFromRequest.md +++ b/docs/functions/createClientFromRequest.md @@ -16,10 +16,14 @@ Creates a client by automatically extracting authentication tokens and configura `Request` +The incoming HTTP request object containing Base44 authentication headers. + ## Returns [`Base44Client`](../interfaces/Base44Client.md) +A configured Base44 client instance with authentication from the request. + ## Throws When Base44-App-Id header is missing. diff --git a/docs/functions/getAccessToken.md b/docs/functions/getAccessToken.md index 2f0f237..8bcec03 100644 --- a/docs/functions/getAccessToken.md +++ b/docs/functions/getAccessToken.md @@ -6,12 +6,47 @@ > **getAccessToken**(`options`): `string` \| `null` +Retrieves an access token from URL parameters or local storage. + +Low-level utility for manually retrieving tokens. In most cases, the Base44 client handles +token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and cannot be used in the backend. + ## Parameters ### options [`GetAccessTokenOptions`](../interfaces/GetAccessTokenOptions.md) = `{}` +Configuration options for token retrieval. + ## Returns `string` \| `null` + +The access token string if found, null otherwise. + +## Examples + +```typescript +// Get access token from URL or local storage +const token = getAccessToken(); + +if (token) { + console.log('User is authenticated'); +} else { + console.log('No token found, redirect to login'); +} +``` + +```typescript +// Get access token from custom local storage key +const token = getAccessToken({ storageKey: 'my_app_token' }); +``` + +```typescript +// Get access token from URL but don't save or remove it +const token = getAccessToken({ + saveToStorage: false, + removeFromUrl: false +}); +``` diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md index af6e6dc..c4796d7 100644 --- a/docs/functions/getLoginUrl.md +++ b/docs/functions/getLoginUrl.md @@ -6,16 +6,41 @@ > **getLoginUrl**(`nextUrl`, `options`): `string` +Constructs the absolute URL for the login page with a redirect parameter. + +Low-level utility for building login URLs. For standard login redirects, use +`client.auth.redirectToLogin()` instead, which handles this automatically. This function +is useful when you need to construct login URLs without a client instance or for custom +authentication flows. + ## Parameters ### nextUrl `string` +The URL to redirect to after successful login. + ### options [`GetLoginUrlOptions`](../interfaces/GetLoginUrlOptions.md) +Configuration options. + ## Returns `string` + +The complete login URL with encoded redirect parameters. + +## Example + +```typescript +// Redirect to login page +const loginUrl = getLoginUrl('/dashboard', { + serverUrl: 'https://base44.app', + appId: 'my-app-123' +}); +window.location.href = loginUrl; +// User will be redirected back to /dashboard after login +``` diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md index bda3bec..abc9434 100644 --- a/docs/functions/removeAccessToken.md +++ b/docs/functions/removeAccessToken.md @@ -6,12 +6,34 @@ > **removeAccessToken**(`options`): `boolean` +Removes the access token from local storage. + +Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use [`client.auth.logout()`](../interfaces/AuthModule.md#logout) instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. + ## Parameters ### options [`RemoveAccessTokenOptions`](../interfaces/RemoveAccessTokenOptions.md) +Configuration options for token removal. + ## Returns `boolean` + +`true` if the token was removed successfully, `false` otherwise. + +## Examples + +```typescript +// Remove custom token key +const success = removeAccessToken({ + storageKey: 'my_custom_token_key' +}); +``` + +```typescript +// Standard logout flow with token removal and redirect +client.auth.logout('/login'); +``` diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md index 044900f..f626ab2 100644 --- a/docs/functions/saveAccessToken.md +++ b/docs/functions/saveAccessToken.md @@ -6,16 +6,46 @@ > **saveAccessToken**(`token`, `options`): `boolean` +Saves an access token to local storage. + +Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and cannot be used in the backend. + ## Parameters ### token `string` +The access token string to save. + ### options [`SaveAccessTokenOptions`](../interfaces/SaveAccessTokenOptions.md) +Configuration options for saving the token. + ## Returns `boolean` + +`true` if the token was saved successfully, `false` otherwise. + +## Examples + +```typescript +// Save access token after login +const response = await client.auth.loginViaEmailPassword(email, password); +const success = saveAccessToken(response.access_token, {}); + +if (success) { + console.log('User is now authenticated'); + // Token is now available for future page loads +} +``` + +```typescript +// Save access token to local storage using custom key +const success = saveAccessToken(token, { + storageKey: `my_custom_token_key` +}); +``` diff --git a/docs/interfaces/AgentsModule.md b/docs/interfaces/AgentsModule.md index acb49f8..c80ca19 100644 --- a/docs/interfaces/AgentsModule.md +++ b/docs/interfaces/AgentsModule.md @@ -10,23 +10,33 @@ This module provides methods to create and manage conversations with AI agents, send messages, and subscribe to real-time updates. Conversations can be used for chat interfaces, support systems, or any interactive AI application. -**Real-time Updates:** -The agents module supports real-time updates through WebSocket subscriptions, -allowing you to receive instant notifications when new messages arrive. +**Authentication modes:** +- **User authentication** (`client.agents`): Access only conversations created by the authenticated user. +- **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. -**Available with both auth modes:** -- User auth: `client.agents.method(...)` -- Service role: `client.asServiceRole.agents.method(...)` - -## Example +## Examples ```typescript // Create a new conversation const conversation = await client.agents.createConversation({ agent_name: 'support-agent', - metadata: { user_id: 'user-123' } + metadata: { + ticket_id: 'SUPP-1234', + category: 'billing', + priority: 'high' + } +}); +``` + +```typescript +// Send a message +await client.agents.addMessage(conversation, { + role: 'user', + content: 'Hello, I need help!' }); +``` +```typescript // Subscribe to real-time updates const unsubscribe = client.agents.subscribeToConversation( conversation.id, @@ -35,13 +45,7 @@ const unsubscribe = client.agents.subscribeToConversation( } ); -// Send a message -await client.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help!' -}); - -// Clean up subscription +// Clean up subscription later unsubscribe(); ``` @@ -51,15 +55,13 @@ unsubscribe(); > **getConversations**(): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> -Get all conversations for the current user. - -Retrieves all agent conversations without filtering. +Gets all conversations. #### Returns `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> -Promise resolving to an array of conversations +Promise resolving to an array of conversations. #### Example @@ -74,7 +76,7 @@ console.log(`Total conversations: ${conversations.length}`); > **getConversation**(`conversationId`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> -Get a specific conversation by ID. +Gets a specific conversation by ID. #### Parameters @@ -82,13 +84,13 @@ Get a specific conversation by ID. `string` -The unique identifier of the conversation +The unique identifier of the conversation. #### Returns `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> -Promise resolving to the conversation, or undefined if not found +Promise resolving to the conversation, or undefined if not found. #### Example @@ -105,7 +107,7 @@ if (conversation) { > **listConversations**(`filterParams`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> -List conversations with filtering and pagination. +Lists conversations with filtering and pagination. #### Parameters @@ -113,13 +115,13 @@ List conversations with filtering and pagination. [`ModelFilterParams`](../type-aliases/ModelFilterParams.md) -Filter parameters for querying conversations +Filter parameters for querying conversations. #### Returns `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> -Promise resolving to an array of filtered conversations +Promise resolving to an array of filtered conversations. #### Example @@ -136,13 +138,13 @@ const recentConversations = await client.agents.listConversations({ > **createConversation**(`conversation`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> -Create a new conversation with an agent. +Creates a new conversation with an agent. #### Parameters ##### conversation -Conversation details including agent name and optional metadata +Conversation details including agent name and optional metadata. ###### agent_name @@ -156,7 +158,7 @@ Conversation details including agent name and optional metadata `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> -Promise resolving to the created conversation +Promise resolving to the created conversation. #### Example @@ -164,7 +166,8 @@ Promise resolving to the created conversation const conversation = await client.agents.createConversation({ agent_name: 'support-agent', metadata: { - user_id: 'user-123', + order_id: 'ORD-789', + product_id: 'PROD-456', category: 'technical-support' } }); @@ -177,7 +180,7 @@ console.log(`Created conversation: ${conversation.id}`); > **addMessage**(`conversation`, `message`): `Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> -Add a message to a conversation. +Adds a message to a conversation. Sends a message to the agent and updates the conversation. This method also updates the real-time socket to notify any subscribers. @@ -188,19 +191,19 @@ also updates the real-time socket to notify any subscribers. [`AgentConversation`](../type-aliases/AgentConversation.md) -The conversation to add the message to +The conversation to add the message to. ##### message `Partial`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> -The message to add +The message to add. #### Returns `Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> -Promise resolving to the created message +Promise resolving to the created message. #### Example @@ -218,7 +221,7 @@ console.log(`Message sent with ID: ${message.id}`); > **subscribeToConversation**(`conversationId`, `onUpdate?`): () => `void` -Subscribe to real-time updates for a conversation. +Subscribes to real-time updates for a conversation. Establishes a WebSocket connection to receive instant updates when new messages are added to the conversation. Returns an unsubscribe function @@ -230,17 +233,17 @@ to clean up the connection. `string` -The conversation ID to subscribe to +The conversation ID to subscribe to. ##### onUpdate? (`conversation`) => `void` -Callback function called when the conversation is updated +Callback function called when the conversation is updated. #### Returns -Unsubscribe function to stop receiving updates +Unsubscribe function to stop receiving updates. > (): `void` @@ -269,7 +272,7 @@ unsubscribe(); > **getWhatsAppConnectURL**(`agentName`): `string` -Get WhatsApp connection URL for an agent. +Gets WhatsApp connection URL for an agent. Generates a URL that users can use to connect with the agent through WhatsApp. The URL includes authentication if a token is available. @@ -280,13 +283,13 @@ The URL includes authentication if a token is available. `string` -The name of the agent +The name of the agent. #### Returns `string` -WhatsApp connection URL +WhatsApp connection URL. #### Example diff --git a/docs/interfaces/AppConversationLike.md b/docs/interfaces/AppConversationLike.md deleted file mode 100644 index 6c45428..0000000 --- a/docs/interfaces/AppConversationLike.md +++ /dev/null @@ -1,29 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AppConversationLike - -## Properties - -### id? - -> `optional` **id**: `string` \| `null` - -*** - -### messages? - -> `optional` **messages**: [`AppMessageContent`](AppMessageContent.md)[] \| `null` - -*** - -### model? - -> `optional` **model**: `string` - -*** - -### functions\_fail\_silently? - -> `optional` **functions\_fail\_silently**: `boolean` diff --git a/docs/interfaces/AppConversationMessage.md b/docs/interfaces/AppConversationMessage.md deleted file mode 100644 index 3c26f96..0000000 --- a/docs/interfaces/AppConversationMessage.md +++ /dev/null @@ -1,65 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AppConversationMessage - -## Extends - -- [`AppMessageContent`](AppMessageContent.md) - -## Indexable - -\[`key`: `string`\]: `unknown` - -## Properties - -### content? - -> `optional` **content**: `string` - -#### Inherited from - -[`AppMessageContent`](AppMessageContent.md).[`content`](AppMessageContent.md#content) - -*** - -### file\_urls? - -> `optional` **file\_urls**: `string`[] - -#### Inherited from - -[`AppMessageContent`](AppMessageContent.md).[`file_urls`](AppMessageContent.md#file_urls) - -*** - -### custom\_context? - -> `optional` **custom\_context**: `unknown` - -#### Inherited from - -[`AppMessageContent`](AppMessageContent.md).[`custom_context`](AppMessageContent.md#custom_context) - -*** - -### additional\_message\_params? - -> `optional` **additional\_message\_params**: `Record`\<`string`, `unknown`\> - -#### Inherited from - -[`AppMessageContent`](AppMessageContent.md).[`additional_message_params`](AppMessageContent.md#additional_message_params) - -*** - -### id? - -> `optional` **id**: `string` \| `null` - -*** - -### role? - -> `optional` **role**: `string` diff --git a/docs/interfaces/AppLike.md b/docs/interfaces/AppLike.md deleted file mode 100644 index 4aac5c3..0000000 --- a/docs/interfaces/AppLike.md +++ /dev/null @@ -1,301 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AppLike - -## Properties - -### id? - -> `optional` **id**: `string` - -*** - -### conversation? - -> `optional` **conversation**: [`AppConversationLike`](AppConversationLike.md) \| `null` - -*** - -### app\_stage? - -> `optional` **app\_stage**: `string` - -*** - -### created\_date? - -> `optional` **created\_date**: `string` - -*** - -### updated\_date? - -> `optional` **updated\_date**: `string` - -*** - -### created\_by? - -> `optional` **created\_by**: `string` - -*** - -### organization\_id? - -> `optional` **organization\_id**: `string` - -*** - -### name? - -> `optional` **name**: `string` - -*** - -### user\_description? - -> `optional` **user\_description**: `string` - -*** - -### entities? - -> `optional` **entities**: `Record`\<`string`, `any`\> - -*** - -### additional\_user\_data\_schema? - -> `optional` **additional\_user\_data\_schema**: `any` - -*** - -### pages? - -> `optional` **pages**: `object` - -#### Index Signature - -\[`key`: `string`\]: `string` - -*** - -### components - -> **components**: `object` - -#### Index Signature - -\[`key`: `string`\]: `any` - -*** - -### layout? - -> `optional` **layout**: `string` - -*** - -### globals\_css? - -> `optional` **globals\_css**: `string` - -*** - -### agents? - -> `optional` **agents**: `Record`\<`string`, `any`\> - -*** - -### logo\_url? - -> `optional` **logo\_url**: `string` - -*** - -### slug? - -> `optional` **slug**: `string` - -*** - -### public\_settings? - -> `optional` **public\_settings**: `string` - -*** - -### is\_blocked? - -> `optional` **is\_blocked**: `boolean` - -*** - -### github\_repo\_url? - -> `optional` **github\_repo\_url**: `string` - -*** - -### main\_page? - -> `optional` **main\_page**: `string` - -*** - -### installable\_integrations? - -> `optional` **installable\_integrations**: `any` - -*** - -### backend\_project? - -> `optional` **backend\_project**: [`DenoProjectLike`](DenoProjectLike.md) - -*** - -### last\_deployed\_at? - -> `optional` **last\_deployed\_at**: `string` - -*** - -### is\_remixable? - -> `optional` **is\_remixable**: `boolean` - -*** - -### remixed\_from\_app\_id? - -> `optional` **remixed\_from\_app\_id**: `string` - -*** - -### hide\_entity\_created\_by? - -> `optional` **hide\_entity\_created\_by**: `boolean` - -*** - -### platform\_version? - -> `optional` **platform\_version**: `number` - -*** - -### enable\_username\_password? - -> `optional` **enable\_username\_password**: `boolean` - -*** - -### auth\_config? - -> `optional` **auth\_config**: [`AuthConfigLike`](AuthConfigLike.md) - -*** - -### status? - -> `optional` **status**: `object` - -#### state? - -> `optional` **state**: ... \| ... - -#### details? - -> `optional` **details**: `any` - -#### last\_updated\_date? - -> `optional` **last\_updated\_date**: ... \| ... - -*** - -### custom\_instructions? - -> `optional` **custom\_instructions**: `any` - -*** - -### frozen\_files? - -> `optional` **frozen\_files**: `string`[] - -*** - -### deep\_coding\_mode? - -> `optional` **deep\_coding\_mode**: `boolean` - -*** - -### needs\_to\_add\_diff? - -> `optional` **needs\_to\_add\_diff**: `boolean` - -*** - -### installed\_integration\_context\_items? - -> `optional` **installed\_integration\_context\_items**: `any`[] - -*** - -### model? - -> `optional` **model**: `string` - -*** - -### is\_starred? - -> `optional` **is\_starred**: `boolean` - -*** - -### agents\_enabled? - -> `optional` **agents\_enabled**: `boolean` - -*** - -### categories? - -> `optional` **categories**: `string`[] - -*** - -### functions? - -> `optional` **functions**: `any` - -*** - -### function\_names? - -> `optional` **function\_names**: `string`[] - -*** - -### user\_entity? - -> `optional` **user\_entity**: [`UserEntityLike`](UserEntityLike.md) - -*** - -### app\_code\_hash? - -> `optional` **app\_code\_hash**: `string` - -*** - -### has\_backend\_functions\_enabled? - -> `optional` **has\_backend\_functions\_enabled**: `boolean` diff --git a/docs/interfaces/AppMessageContent.md b/docs/interfaces/AppMessageContent.md deleted file mode 100644 index 6aa8e59..0000000 --- a/docs/interfaces/AppMessageContent.md +++ /dev/null @@ -1,37 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AppMessageContent - -## Extended by - -- [`AppConversationMessage`](AppConversationMessage.md) - -## Indexable - -\[`key`: `string`\]: `unknown` - -## Properties - -### content? - -> `optional` **content**: `string` - -*** - -### file\_urls? - -> `optional` **file\_urls**: `string`[] - -*** - -### custom\_context? - -> `optional` **custom\_context**: `unknown` - -*** - -### additional\_message\_params? - -> `optional` **additional\_message\_params**: `Record`\<`string`, `unknown`\> diff --git a/docs/interfaces/AuthConfigLike.md b/docs/interfaces/AuthConfigLike.md deleted file mode 100644 index 240a81f..0000000 --- a/docs/interfaces/AuthConfigLike.md +++ /dev/null @@ -1,41 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AuthConfigLike - -## Properties - -### enable\_username\_password? - -> `optional` **enable\_username\_password**: `boolean` - -*** - -### enable\_google\_login? - -> `optional` **enable\_google\_login**: `boolean` - -*** - -### enable\_microsoft\_login? - -> `optional` **enable\_microsoft\_login**: `boolean` - -*** - -### enable\_facebook\_login? - -> `optional` **enable\_facebook\_login**: `boolean` - -*** - -### sso\_provider\_name? - -> `optional` **sso\_provider\_name**: `string` - -*** - -### enable\_sso\_login? - -> `optional` **enable\_sso\_login**: `boolean` diff --git a/docs/interfaces/AuthModule.md b/docs/interfaces/AuthModule.md index 015b491..0246eef 100644 --- a/docs/interfaces/AuthModule.md +++ b/docs/interfaces/AuthModule.md @@ -4,7 +4,7 @@ # Interface: AuthModule -Authentication module for managing user authentication and authorization. +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. This module provides comprehensive authentication functionality including: - Email/password login and registration @@ -14,15 +14,7 @@ This module provides comprehensive authentication functionality including: - OTP verification - User invitations -**Browser-Only Features:** -Some methods like `redirectToLogin()` and `logout()` only work in browser -environments as they interact with localStorage and window.location. - -**Token Storage:** -The module automatically stores tokens in localStorage (when available) and -manages Authorization headers for API requests. - -## Example +## Examples ```typescript // Login with email and password @@ -30,32 +22,41 @@ const { access_token, user } = await client.auth.loginViaEmailPassword( 'user@example.com', 'password123' ); +``` +```typescript // Check if user is authenticated const isAuth = await client.auth.isAuthenticated(); +``` +```typescript // Get current user profile const currentUser = await client.auth.me(); +``` -// Logout +```typescript +// Logout and reload page client.auth.logout(); ``` +```typescript +// Logout and redirect to login page +client.auth.logout('/login'); +``` + ## Methods ### me() -> **me**(): `Promise`\<`any`\> - -Get the current authenticated user's information. +> **me**(): `Promise`\<[`User`](User.md)\> -Retrieves the profile data for the currently authenticated user. +Gets the current authenticated user's information. #### Returns -`Promise`\<`any`\> +`Promise`\<[`User`](User.md)\> -Promise resolving to the user's profile data +Promise resolving to the user's profile data. #### Example @@ -69,32 +70,44 @@ console.log(`User ID: ${user.id}`); ### updateMe() -> **updateMe**(`data`): `Promise`\<`any`\> +> **updateMe**(`data`): `Promise`\<[`User`](User.md)\> -Update the current authenticated user's information. +Updates the current authenticated user's information. -Updates profile fields for the currently authenticated user. +Performs a partial update - only include the fields you want to change. +Commonly updated fields include name, avatar_url, and custom profile fields. #### Parameters ##### data -`Record`\<`string`, `any`\> +`Partial`\<`Omit`\<[`User`](User.md), ... \| ... \| ...\>\> -Object containing the fields to update +Object containing the fields to update. Only the provided fields will be changed. #### Returns -`Promise`\<`any`\> +`Promise`\<[`User`](User.md)\> -Promise resolving to the updated user data +Promise resolving to the updated user data. -#### Example +#### Examples ```typescript +// Update specific fields const updatedUser = await client.auth.updateMe({ name: 'John Doe', - bio: 'Software developer' + avatar_url: 'https://example.com/avatar.jpg' +}); +console.log(`Updated user: ${updatedUser.name}`); +``` + +```typescript +// Update custom fields defined in your User entity +await client.auth.updateMe({ + bio: 'Software developer', + phone: '+1234567890', + preferences: { theme: 'dark' } }); ``` @@ -104,12 +117,9 @@ const updatedUser = await client.auth.updateMe({ > **redirectToLogin**(`nextUrl`): `void` -Redirect the user to the app's login page. +Redirects the user to the app's login page. -**Browser only:** This method only works in browser environments. - -Redirects the user to your app's login page with a callback URL -to return to after successful authentication. +Redirects with a callback URL to return to after successful authentication. Requires a browser environment and cannot be used in the backend. #### Parameters @@ -117,7 +127,7 @@ to return to after successful authentication. `string` -URL to redirect to after successful login +URL to redirect to after successful login. #### Returns @@ -125,15 +135,17 @@ URL to redirect to after successful login #### Throws -When not in a browser environment +When not in a browser environment. -#### Example +#### Examples ```typescript // Redirect to login and come back to current page client.auth.redirectToLogin(window.location.href); +``` -// Redirect to login and go to dashboard after +```typescript +// Redirect to login and then go to the dashboard page client.auth.redirectToLogin('/dashboard'); ``` @@ -143,12 +155,9 @@ client.auth.redirectToLogin('/dashboard'); > **logout**(`redirectUrl?`): `void` -Logout the current user. - -**Browser only:** Full functionality requires browser environment. +Logs out the current user. -Removes the authentication token from localStorage and axios headers, -then optionally redirects to a URL or reloads the page. +Removes the authentication token from local storage and Axios headers, then optionally redirects to a URL or reloads the page. Requires a browser environment and cannot be used in the backend. #### Parameters @@ -156,21 +165,25 @@ then optionally redirects to a URL or reloads the page. `string` -Optional URL to redirect to after logout. Reloads the page if not provided +Optional URL to redirect to after logout. Reloads the page if not provided. #### Returns `void` -#### Example +#### Examples ```typescript // Logout and reload page client.auth.logout(); +``` +```typescript // Logout and redirect to login page client.auth.logout('/login'); +``` +```typescript // Logout and redirect to home client.auth.logout('/'); ``` @@ -181,10 +194,9 @@ client.auth.logout('/'); > **setToken**(`token`, `saveToStorage?`): `void` -Set the authentication token. +Sets the authentication token. -Updates the Authorization header for API requests and optionally -saves the token to localStorage for persistence. +Updates the authorization header for API requests and optionally saves the token to local storage for persistence. Saving to local storage requires a browser environment and is automatically skipped in backend environments. #### Parameters @@ -192,25 +204,27 @@ saves the token to localStorage for persistence. `string` -JWT authentication token +JWT authentication token. ##### saveToStorage? `boolean` -Whether to save the token to localStorage (default: true) +Whether to save the token to local storage. Defaults to true. #### Returns `void` -#### Example +#### Examples ```typescript -// Set token and save to localStorage +// Set token and save to local storage client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); +``` -// Set token without saving to localStorage +```typescript +// Set token without saving to local storage client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); ``` @@ -220,10 +234,9 @@ client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); > **loginViaEmailPassword**(`email`, `password`, `turnstileToken?`): `Promise`\<[`LoginResponse`](LoginResponse.md)\> -Login using email and password. +Logs in a registered user using email and password. -Authenticates a user with email and password credentials. On success, -automatically sets the token for subsequent requests. +Authenticates a user with email and password credentials. The user must already have a registered account. For new users, use [`register()`](#register) first to create an account. On successful login, automatically sets the token for subsequent requests. #### Parameters @@ -231,27 +244,31 @@ automatically sets the token for subsequent requests. `string` -User's email address +User's email address. ##### password `string` -User's password +User's password. ##### turnstileToken? `string` -Optional Turnstile captcha token +Optional [Cloudflare Turnstile CAPTCHA token](https://developers.cloudflare.com/turnstile/) for bot protection. #### Returns `Promise`\<[`LoginResponse`](LoginResponse.md)\> -Promise resolving to login response with access token and user data +Promise resolving to login response with access token and user data. -#### Example +#### Throws + +Error if the email and password combination is invalid or the user is not registered. + +#### Examples ```typescript try { @@ -263,7 +280,9 @@ try { } catch (error) { console.error('Login failed:', error); } +``` +```typescript // With captcha token const response = await client.auth.loginViaEmailPassword( 'user@example.com', @@ -278,25 +297,22 @@ const response = await client.auth.loginViaEmailPassword( > **isAuthenticated**(): `Promise`\<`boolean`\> -Check if the current user is authenticated. - -Verifies whether the current token is valid by attempting to -fetch the user's profile. +Checks if the current user is authenticated. #### Returns `Promise`\<`boolean`\> -Promise resolving to true if authenticated, false otherwise +Promise resolving to true if authenticated, false otherwise. #### Example ```typescript -const isAuth = await client.auth.isAuthenticated(); -if (isAuth) { +const isAuthenticated = await client.auth.isAuthenticated(); +if (isAuthenticated) { console.log('User is logged in'); } else { - // Redirect to login + // Redirect to login page client.auth.redirectToLogin(window.location.href); } ``` @@ -307,9 +323,11 @@ if (isAuth) { > **inviteUser**(`userEmail`, `role`): `Promise`\<`any`\> -Invite a user to the application. +Invites a user to the application. -Sends an invitation email to a user with a specific role. +Sends an invitation email to a potential user with a specific role. +Roles are configured in your Base44 application settings and determine +the user's permissions and access levels. #### Parameters @@ -317,25 +335,29 @@ Sends an invitation email to a user with a specific role. `string` -Email address of the user to invite +Email address of the user to invite. ##### role `string` -Role to assign to the invited user +Role to assign to the invited user. Must match a role defined in your Base44 application. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. #### Returns `Promise`\<`any`\> -Promise resolving to the invitation response +Promise that resolves when the invitation is sent successfully. Throws an error if the invitation fails. #### Example ```typescript -await client.auth.inviteUser('newuser@example.com', 'editor'); -console.log('Invitation sent!'); +try { + await client.auth.inviteUser('newuser@example.com', 'editor'); + console.log('Invitation sent successfully!'); +} catch (error) { + console.error('Failed to send invitation:', error); +} ``` *** @@ -344,7 +366,7 @@ console.log('Invitation sent!'); > **register**(`payload`): `Promise`\<`any`\> -Register a new user account. +Registers a new user account. Creates a new user account with email and password. @@ -354,13 +376,13 @@ Creates a new user account with email and password. [`RegisterPayload`](RegisterPayload.md) -Registration details including email, password, and optional fields +Registration details including email, password, and optional fields. #### Returns `Promise`\<`any`\> -Promise resolving to the registration response +Promise resolving to the registration response. #### Example @@ -379,7 +401,7 @@ console.log('Registration successful! Please check your email.'); > **verifyOtp**(`params`): `Promise`\<`any`\> -Verify an OTP (One-Time Password) code. +Verifies an OTP (One-time password) code. Validates an OTP code sent to the user's email during registration or authentication. @@ -388,30 +410,32 @@ or authentication. ##### params -Object containing email and OTP code - -###### email - -`string` +[`VerifyOtpParams`](VerifyOtpParams.md) -###### otpCode - -`string` +Object containing email and OTP code. #### Returns `Promise`\<`any`\> -Promise resolving to the verification response +Promise resolving to the verification response if valid. + +#### Throws + +Error if the OTP code is invalid, expired, or verification fails. #### Example ```typescript -await client.auth.verifyOtp({ - email: 'user@example.com', - otpCode: '123456' -}); -console.log('Email verified!'); +try { + await client.auth.verifyOtp({ + email: 'user@example.com', + otpCode: '123456' + }); + console.log('Email verified successfully!'); +} catch (error) { + console.error('Invalid or expired OTP code'); +} ``` *** @@ -420,7 +444,7 @@ console.log('Email verified!'); > **resendOtp**(`email`): `Promise`\<`any`\> -Resend an OTP code to the user's email. +Resends an OTP code to the user's email address. Requests a new OTP code to be sent to the specified email address. @@ -430,19 +454,27 @@ Requests a new OTP code to be sent to the specified email address. `string` -Email address to send the OTP to +Email address to send the OTP to. #### Returns `Promise`\<`any`\> -Promise resolving to the response +Promise resolving when the OTP is sent successfully. + +#### Throws + +Error if the email is invalid or the request fails. #### Example ```typescript -await client.auth.resendOtp('user@example.com'); -console.log('OTP resent! Please check your email.'); +try { + await client.auth.resendOtp('user@example.com'); + console.log('OTP resent! Please check your email.'); +} catch (error) { + console.error('Failed to resend OTP:', error); +} ``` *** @@ -451,7 +483,7 @@ console.log('OTP resent! Please check your email.'); > **resetPasswordRequest**(`email`): `Promise`\<`any`\> -Request a password reset. +Requests a password reset. Sends a password reset email to the specified email address. @@ -461,19 +493,27 @@ Sends a password reset email to the specified email address. `string` -Email address for the account to reset +Email address for the account to reset. #### Returns `Promise`\<`any`\> -Promise resolving to the response +Promise resolving when the password reset email is sent successfully. + +#### Throws + +Error if the email is invalid or the request fails. #### Example ```typescript -await client.auth.resetPasswordRequest('user@example.com'); -console.log('Password reset email sent!'); +try { + await client.auth.resetPasswordRequest('user@example.com'); + console.log('Password reset email sent!'); +} catch (error) { + console.error('Failed to send password reset email:', error); +} ``` *** @@ -482,7 +522,7 @@ console.log('Password reset email sent!'); > **resetPassword**(`params`): `Promise`\<`any`\> -Reset password using a reset token. +Resets password using a reset token. Completes the password reset flow by setting a new password using the token received by email. @@ -491,30 +531,32 @@ using the token received by email. ##### params -Object containing the reset token and new password - -###### resetToken - -`string` - -###### newPassword +[`ResetPasswordParams`](ResetPasswordParams.md) -`string` +Object containing the reset token and new password. #### Returns `Promise`\<`any`\> -Promise resolving to the response +Promise resolving when the password is reset successfully. + +#### Throws + +Error if the reset token is invalid, expired, or the request fails. #### Example ```typescript -await client.auth.resetPassword({ - resetToken: 'token-from-email', - newPassword: 'newSecurePassword456' -}); -console.log('Password reset successful!'); +try { + await client.auth.resetPassword({ + resetToken: 'token-from-email', + newPassword: 'newSecurePassword456' + }); + console.log('Password reset successful!'); +} catch (error) { + console.error('Failed to reset password:', error); +} ``` *** @@ -523,7 +565,7 @@ console.log('Password reset successful!'); > **changePassword**(`params`): `Promise`\<`any`\> -Change the user's password. +Changes the user's password. Updates the password for an authenticated user by verifying the current password and setting a new one. @@ -532,33 +574,31 @@ the current password and setting a new one. ##### params -Object containing user ID, current password, and new password - -###### userId - -`string` - -###### currentPassword - -`string` - -###### newPassword +[`ChangePasswordParams`](ChangePasswordParams.md) -`string` +Object containing user ID, current password, and new password. #### Returns `Promise`\<`any`\> -Promise resolving to the response +Promise resolving when the password is changed successfully. + +#### Throws + +Error if the current password is incorrect or the request fails. #### Example ```typescript -await client.auth.changePassword({ - userId: 'user-123', - currentPassword: 'oldPassword123', - newPassword: 'newSecurePassword456' -}); -console.log('Password changed successfully!'); +try { + await client.auth.changePassword({ + userId: 'user-123', + currentPassword: 'oldPassword123', + newPassword: 'newSecurePassword456' + }); + console.log('Password changed successfully!'); +} catch (error) { + console.error('Failed to change password:', error); +} ``` diff --git a/docs/interfaces/Base44ErrorJSON.md b/docs/interfaces/Base44ErrorJSON.md new file mode 100644 index 0000000..bd7f49c --- /dev/null +++ b/docs/interfaces/Base44ErrorJSON.md @@ -0,0 +1,50 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: Base44ErrorJSON + +JSON representation of a Base44Error. + +This is the structure returned by [`Base44Error.toJSON()`](../classes/Base44Error.md#tojson). +Useful for logging or sending error information to external services. + +## Properties + +### name + +> **name**: `string` + +The error name, always "Base44Error". + +*** + +### message + +> **message**: `string` + +Human-readable error message. + +*** + +### status + +> **status**: `number` + +HTTP status code of the error. + +*** + +### code + +> **code**: `string` + +Error code from the API. + +*** + +### data + +> **data**: `any` + +Full response data from the server containing error details. diff --git a/docs/interfaces/ChangePasswordParams.md b/docs/interfaces/ChangePasswordParams.md new file mode 100644 index 0000000..3f992be --- /dev/null +++ b/docs/interfaces/ChangePasswordParams.md @@ -0,0 +1,31 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: ChangePasswordParams + +Parameters for changing a user's password. + +## Properties + +### userId + +> **userId**: `string` + +User ID. + +*** + +### currentPassword + +> **currentPassword**: `string` + +Current password for verification. + +*** + +### newPassword + +> **newPassword**: `string` + +New password to set. diff --git a/docs/interfaces/DenoProjectLike.md b/docs/interfaces/DenoProjectLike.md deleted file mode 100644 index ca9f2b4..0000000 --- a/docs/interfaces/DenoProjectLike.md +++ /dev/null @@ -1,29 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: DenoProjectLike - -## Properties - -### project\_id - -> **project\_id**: `string` - -*** - -### project\_name - -> **project\_name**: `string` - -*** - -### app\_id - -> **app\_id**: `string` - -*** - -### deployment\_name\_to\_info - -> **deployment\_name\_to\_info**: `Record`\<`string`, \{ `id`: `string`; `code`: `string`; \}\> diff --git a/docs/interfaces/EntityHandler.md b/docs/interfaces/EntityHandler.md index 67667d6..c9a513b 100644 --- a/docs/interfaces/EntityHandler.md +++ b/docs/interfaces/EntityHandler.md @@ -398,10 +398,8 @@ const newUsers = await client.entities.User.bulkCreate([ Import entities from a file. -**Browser only:** Requires File object from file input. - Imports entities from a file (typically CSV or similar format). -The file format should match your entity structure. +The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. #### Parameters diff --git a/docs/interfaces/GetAccessTokenOptions.md b/docs/interfaces/GetAccessTokenOptions.md index 1ba0cb7..059788b 100644 --- a/docs/interfaces/GetAccessTokenOptions.md +++ b/docs/interfaces/GetAccessTokenOptions.md @@ -6,15 +6,19 @@ Configuration options for retrieving an access token -## Example +## Examples ```typescript -// Use default options +// Get access token from URL or local storage using default options const token = getAccessToken(); +``` -// Custom storage key +```typescript +// Get access token from custom local storage key const token = getAccessToken({ storageKey: 'my_app_token' }); +``` +```typescript // Get token from URL but don't save or remove from URL const token = getAccessToken({ saveToStorage: false, @@ -28,7 +32,7 @@ const token = getAccessToken({ > `optional` **storageKey**: `string` -The key to use when storing/retrieving the token in localStorage +The key to use when storing or retrieving the token in local storage #### Default @@ -56,7 +60,7 @@ The URL parameter name to check for the access token > `optional` **saveToStorage**: `boolean` -Whether to save the token to localStorage if found in the URL +Whether to save the token to local storage if found in the URL #### Default diff --git a/docs/interfaces/LoginResponse.md b/docs/interfaces/LoginResponse.md index 79c301f..f824aa6 100644 --- a/docs/interfaces/LoginResponse.md +++ b/docs/interfaces/LoginResponse.md @@ -12,12 +12,12 @@ Response from login endpoints containing user information and access token. > **access\_token**: `string` -JWT access token for authentication +JWT access token for authentication. *** ### user -> **user**: `any` +> **user**: [`User`](User.md) -User information +User information. diff --git a/docs/interfaces/RegisterPayload.md b/docs/interfaces/RegisterPayload.md index f02ab3d..dc91bc7 100644 --- a/docs/interfaces/RegisterPayload.md +++ b/docs/interfaces/RegisterPayload.md @@ -12,7 +12,7 @@ Payload for user registration. > **email**: `string` -User's email address +User's email address. *** @@ -20,7 +20,7 @@ User's email address > **password**: `string` -User's password +User's password. *** @@ -28,7 +28,7 @@ User's password > `optional` **turnstile\_token**: `string` \| `null` -Optional Turnstile captcha token +Optional [Cloudflare Turnstile CAPTCHA token](https://developers.cloudflare.com/turnstile/) for bot protection. *** @@ -36,4 +36,4 @@ Optional Turnstile captcha token > `optional` **referral\_code**: `string` \| `null` -Optional referral code +Optional [referral code](https://docs.base44.com/Getting-Started/Referral-program) from an existing user. diff --git a/docs/interfaces/RemoveAccessTokenOptions.md b/docs/interfaces/RemoveAccessTokenOptions.md index 2dbb885..51faef8 100644 --- a/docs/interfaces/RemoveAccessTokenOptions.md +++ b/docs/interfaces/RemoveAccessTokenOptions.md @@ -22,7 +22,7 @@ removeAccessToken({ storageKey: 'my_app_token' }); > `optional` **storageKey**: `string` -The key to use when removing the token from localStorage +The key to use when removing the token from local storage #### Default diff --git a/docs/interfaces/ResetPasswordParams.md b/docs/interfaces/ResetPasswordParams.md new file mode 100644 index 0000000..d147243 --- /dev/null +++ b/docs/interfaces/ResetPasswordParams.md @@ -0,0 +1,23 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: ResetPasswordParams + +Parameters for resetting a password with a token. + +## Properties + +### resetToken + +> **resetToken**: `string` + +Reset token received by email. + +*** + +### newPassword + +> **newPassword**: `string` + +New password to set. diff --git a/docs/interfaces/SaveAccessTokenOptions.md b/docs/interfaces/SaveAccessTokenOptions.md index aeb72ea..279382b 100644 --- a/docs/interfaces/SaveAccessTokenOptions.md +++ b/docs/interfaces/SaveAccessTokenOptions.md @@ -22,7 +22,7 @@ saveAccessToken('my-token-123', { storageKey: 'my_app_token' }); > `optional` **storageKey**: `string` -The key to use when storing the token in localStorage +The key to use when storing the token in local storage #### Default diff --git a/docs/interfaces/User.md b/docs/interfaces/User.md new file mode 100644 index 0000000..0b7d50f --- /dev/null +++ b/docs/interfaces/User.md @@ -0,0 +1,85 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: User + +An authenticated user. + +## Indexable + +\[`key`: `string`\]: `any` + +Additional custom fields defined in your user schema. Any custom properties you've added to your user schema in your Base44 application will be available here with their configured types and values. + +## Properties + +### id + +> **id**: `string` + +Unique user identifier. + +*** + +### email + +> **email**: `string` + +User's email address. + +*** + +### name? + +> `optional` **name**: `string` + +User's full name. + +*** + +### first\_name? + +> `optional` **first\_name**: `string` + +User's first name. + +*** + +### last\_name? + +> `optional` **last\_name**: `string` + +User's last name. + +*** + +### avatar\_url? + +> `optional` **avatar\_url**: `string` + +URL to user's profile picture. + +*** + +### role? + +> `optional` **role**: `string` + +User's role in the application. Roles are configured in your Base44 application settings and determine the user's permissions and access levels. + +*** + +### created\_at? + +> `optional` **created\_at**: `string` + +Timestamp when the user was created. + +*** + +### updated\_at? + +> `optional` **updated\_at**: `string` + +Timestamp when the user was last updated. diff --git a/docs/interfaces/UserEntityLike.md b/docs/interfaces/UserEntityLike.md deleted file mode 100644 index 463ff1a..0000000 --- a/docs/interfaces/UserEntityLike.md +++ /dev/null @@ -1,47 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: UserEntityLike - -## Properties - -### type - -> **type**: `string` - -*** - -### name - -> **name**: `string` - -*** - -### title? - -> `optional` **title**: `string` - -*** - -### properties? - -> `optional` **properties**: `object` - -#### role? - -> `optional` **role**: ... \| ... - -#### email? - -> `optional` **email**: ... \| ... - -#### full\_name? - -> `optional` **full\_name**: ... \| ... - -*** - -### required - -> **required**: `string`[] diff --git a/docs/interfaces/UserLike.md b/docs/interfaces/UserLike.md deleted file mode 100644 index fa3a7cb..0000000 --- a/docs/interfaces/UserLike.md +++ /dev/null @@ -1,11 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: UserLike - -## Properties - -### id? - -> `optional` **id**: `string` \| `null` diff --git a/docs/interfaces/VerifyOtpParams.md b/docs/interfaces/VerifyOtpParams.md new file mode 100644 index 0000000..e513b0b --- /dev/null +++ b/docs/interfaces/VerifyOtpParams.md @@ -0,0 +1,23 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: VerifyOtpParams + +Parameters for OTP verification. + +## Properties + +### email + +> **email**: `string` + +User's email address. + +*** + +### otpCode + +> **otpCode**: `string` + +One-time password code received by email. diff --git a/docs/type-aliases/AgentConversation.md b/docs/type-aliases/AgentConversation.md index 18b3a03..6e9d952 100644 --- a/docs/type-aliases/AgentConversation.md +++ b/docs/type-aliases/AgentConversation.md @@ -14,7 +14,7 @@ An agent conversation containing messages exchanged with an AI agent. > **id**: `string` -Unique identifier for the conversation +Unique identifier for the conversation. *** @@ -22,7 +22,7 @@ Unique identifier for the conversation > **app\_id**: `string` -Application ID +Application ID. *** @@ -30,7 +30,7 @@ Application ID > **agent\_name**: `string` -Name of the agent in this conversation +Name of the agent in this conversation. *** @@ -38,7 +38,7 @@ Name of the agent in this conversation > **created\_by\_id**: `string` -ID of the user who created the conversation +ID of the user who created the conversation. *** @@ -46,7 +46,7 @@ ID of the user who created the conversation > **messages**: [`AgentMessage`](AgentMessage.md)[] -Array of messages in the conversation +Array of messages in the conversation. *** @@ -54,4 +54,4 @@ Array of messages in the conversation > `optional` **metadata**: `Record`\<`string`, `any`\> -Optional metadata associated with the conversation +Optional metadata associated with the conversation. diff --git a/docs/type-aliases/AgentMessage.md b/docs/type-aliases/AgentMessage.md index 9ddf529..33d51ad 100644 --- a/docs/type-aliases/AgentMessage.md +++ b/docs/type-aliases/AgentMessage.md @@ -14,7 +14,7 @@ A message in an agent conversation. > **id**: `string` -Unique identifier for the message +Unique identifier for the message. *** @@ -22,33 +22,15 @@ Unique identifier for the message > **role**: `"user"` \| `"assistant"` \| `"system"` -Role of the message sender +Role of the message sender. *** ### reasoning? -> `optional` **reasoning**: `object` +> `optional` **reasoning**: [`AgentMessageReasoning`](AgentMessageReasoning.md) -Optional reasoning information for the message - -#### start\_date - -> **start\_date**: `string` - -When reasoning started - -#### end\_date? - -> `optional` **end\_date**: `string` - -When reasoning ended - -#### content - -> **content**: `string` - -Reasoning content +Optional reasoning information for the message. *** @@ -56,7 +38,7 @@ Reasoning content > `optional` **content**: `string` \| `Record`\<..., ...\> \| `null` -Message content (can be text or structured data) +Message content. *** @@ -64,7 +46,7 @@ Message content (can be text or structured data) > `optional` **file\_urls**: ...[] \| `null` -URLs to files attached to the message +URLs to files attached to the message. *** @@ -72,15 +54,15 @@ URLs to files attached to the message > `optional` **tool\_calls**: ...[] \| `null` -Tool calls made by the agent +Tool calls made by the agent. *** ### usage? -> `optional` **usage**: \{ `prompt_tokens?`: ...; `completion_tokens?`: ...; \} \| `null` +> `optional` **usage**: [`AgentMessageUsage`](AgentMessageUsage.md) \| `null` -Token usage statistics +Token usage statistics. *** @@ -88,7 +70,7 @@ Token usage statistics > `optional` **hidden**: `boolean` -Whether the message is hidden from the user +Whether the message is hidden from the user. *** @@ -96,7 +78,7 @@ Whether the message is hidden from the user > `optional` **custom\_context**: ...[] \| `null` -Custom context provided with the message +Custom context provided with the message. *** @@ -104,7 +86,7 @@ Custom context provided with the message > `optional` **model**: `string` \| `null` -Model used to generate the message +Model used to generate the message. *** @@ -112,27 +94,15 @@ Model used to generate the message > `optional` **checkpoint\_id**: `string` \| `null` -Checkpoint ID for the message +Checkpoint ID for the message. *** ### metadata? -> `optional` **metadata**: `object` - -Metadata about when and by whom the message was created - -#### created\_date - -> **created\_date**: `string` - -#### created\_by\_email - -> **created\_by\_email**: `string` - -#### created\_by\_full\_name +> `optional` **metadata**: [`AgentMessageMetadata`](AgentMessageMetadata.md) -> **created\_by\_full\_name**: ... \| ... +Metadata about when and by whom the message was created. *** @@ -140,4 +110,4 @@ Metadata about when and by whom the message was created > `optional` **additional\_message\_params**: `Record`\<`string`, `any`\> -Additional custom parameters for the message +Additional custom parameters for the message. diff --git a/docs/type-aliases/AgentMessageCustomContext.md b/docs/type-aliases/AgentMessageCustomContext.md new file mode 100644 index 0000000..29d59e7 --- /dev/null +++ b/docs/type-aliases/AgentMessageCustomContext.md @@ -0,0 +1,35 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessageCustomContext + +> **AgentMessageCustomContext** = `object` + +Custom context provided with an agent message. + +Additional contextual information that can be passed to the agent. + +## Properties + +### message + +> **message**: `string` + +Context message. + +*** + +### data + +> **data**: `Record`\<`string`, `any`\> + +Associated data for the context. + +*** + +### type + +> **type**: `string` + +Type of context. diff --git a/docs/type-aliases/AgentMessageMetadata.md b/docs/type-aliases/AgentMessageMetadata.md new file mode 100644 index 0000000..047b56d --- /dev/null +++ b/docs/type-aliases/AgentMessageMetadata.md @@ -0,0 +1,33 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessageMetadata + +> **AgentMessageMetadata** = `object` + +Metadata about when and by whom a message was created. + +## Properties + +### created\_date + +> **created\_date**: `string` + +When the message was created. + +*** + +### created\_by\_email + +> **created\_by\_email**: `string` + +Email of the user who created the message. + +*** + +### created\_by\_full\_name + +> **created\_by\_full\_name**: `string` \| `null` + +Full name of the user who created the message. diff --git a/docs/type-aliases/AgentMessageReasoning.md b/docs/type-aliases/AgentMessageReasoning.md new file mode 100644 index 0000000..3713262 --- /dev/null +++ b/docs/type-aliases/AgentMessageReasoning.md @@ -0,0 +1,35 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessageReasoning + +> **AgentMessageReasoning** = `object` + +Reasoning information for an agent message. + +Contains details about the agent's reasoning process when generating a response. + +## Properties + +### start\_date + +> **start\_date**: `string` + +When reasoning started. + +*** + +### end\_date? + +> `optional` **end\_date**: `string` + +When reasoning ended. + +*** + +### content + +> **content**: `string` + +Reasoning content. diff --git a/docs/type-aliases/AgentMessageToolCall.md b/docs/type-aliases/AgentMessageToolCall.md new file mode 100644 index 0000000..815ba03 --- /dev/null +++ b/docs/type-aliases/AgentMessageToolCall.md @@ -0,0 +1,51 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessageToolCall + +> **AgentMessageToolCall** = `object` + +A tool call made by the agent. + +Represents a function or tool that the agent invoked during message generation. + +## Properties + +### id + +> **id**: `string` + +Tool call ID. + +*** + +### name + +> **name**: `string` + +Name of the tool called. + +*** + +### arguments\_string + +> **arguments\_string**: `string` + +Arguments passed to the tool as JSON string. + +*** + +### status + +> **status**: `"running"` \| `"success"` \| `"error"` \| `"stopped"` + +Status of the tool call. + +*** + +### results? + +> `optional` **results**: `string` \| `null` + +Results from the tool call. diff --git a/docs/type-aliases/AgentMessageUsage.md b/docs/type-aliases/AgentMessageUsage.md new file mode 100644 index 0000000..380d1c2 --- /dev/null +++ b/docs/type-aliases/AgentMessageUsage.md @@ -0,0 +1,27 @@ +[**@base44/sdk**](../README.md) + +*** + +# Type Alias: AgentMessageUsage + +> **AgentMessageUsage** = `object` + +Token usage statistics for an agent message. + +Tracks the number of tokens consumed when generating the message. + +## Properties + +### prompt\_tokens? + +> `optional` **prompt\_tokens**: `number` + +Number of tokens in the prompt. + +*** + +### completion\_tokens? + +> `optional` **completion\_tokens**: `number` + +Number of tokens in the completion. diff --git a/docs/type-aliases/CreateClientConfig.md b/docs/type-aliases/CreateClientConfig.md index 601020d..ba73683 100644 --- a/docs/type-aliases/CreateClientConfig.md +++ b/docs/type-aliases/CreateClientConfig.md @@ -16,6 +16,9 @@ Configuration for creating a Base44 client. Your Base44 application ID. +You can find your `appId` in the browser URL when you're in the app editor. +It's the string between `/apps/` and `/editor/`. + *** ### token? diff --git a/docs/type-aliases/LoginInfoResponse.md b/docs/type-aliases/LoginInfoResponse.md deleted file mode 100644 index 2590b73..0000000 --- a/docs/type-aliases/LoginInfoResponse.md +++ /dev/null @@ -1,7 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Type Alias: LoginInfoResponse - -> **LoginInfoResponse** = `Pick`\<[`AppLike`](../interfaces/AppLike.md), `"id"` \| `"name"` \| `"slug"` \| `"logo_url"` \| `"user_description"` \| `"updated_date"` \| `"created_date"` \| `"auth_config"` \| `"platform_version"`\> diff --git a/docs/type-aliases/ModelFilterParams.md b/docs/type-aliases/ModelFilterParams.md index 92bc00d..c3688dd 100644 --- a/docs/type-aliases/ModelFilterParams.md +++ b/docs/type-aliases/ModelFilterParams.md @@ -6,23 +6,21 @@ > **ModelFilterParams** = `object` -Parameters for filtering, sorting, and paginating model data. +Parameters for filtering, sorting, and paginating agent model data. -This type is primarily used in the agents module for querying agent -conversations. It provides a structured way to specify query criteria, -sorting, pagination, and field selection. +Used in the agents module for querying agent conversations. Provides a structured way to specify query criteria, sorting, pagination, and field selection. ## Examples ```typescript -// Basic filtering by agent name +// Filter conversations by agent name const conversations = await client.agents.listConversations({ q: { agent_name: 'support-bot' } }); ``` ```typescript -// Filtering with sorting +// Filter conversations with sorting const conversations = await client.agents.listConversations({ q: { status: 'active' }, sort: '-created_at' // Sort by created_at descending @@ -30,7 +28,7 @@ const conversations = await client.agents.listConversations({ ``` ```typescript -// Pagination with limit and skip +// Filter conversations with pagination const conversations = await client.agents.listConversations({ q: { agent_name: 'support-bot' }, limit: 20, // Get 20 results @@ -39,7 +37,7 @@ const conversations = await client.agents.listConversations({ ``` ```typescript -// Field selection (only return specific fields) +// Filter conversations with field selection const conversations = await client.agents.listConversations({ q: { status: 'active' }, fields: ['id', 'agent_name', 'created_at'] @@ -47,7 +45,7 @@ const conversations = await client.agents.listConversations({ ``` ```typescript -// Complex query with multiple filters +// Filter conversations with multiple filters const conversations = await client.agents.listConversations({ q: { agent_name: 'support-bot', @@ -66,7 +64,7 @@ const conversations = await client.agents.listConversations({ > `optional` **q**: `Record`\<`string`, `any`\> -Query object with field-value pairs for filtering +Query object with field-value pairs for filtering. *** @@ -74,7 +72,7 @@ Query object with field-value pairs for filtering > `optional` **sort**: `string` \| `null` -Sort parameter (e.g., "-created_date" for descending order) +Sort parameter. For example, "-created_date" for descending order. *** @@ -82,7 +80,7 @@ Sort parameter (e.g., "-created_date" for descending order) > `optional` **sort\_by**: `string` \| `null` -Alternative sort parameter (use either `sort` or `sort_by`) +Alternative sort parameter. Use either `sort` or `sort_by`. *** @@ -90,7 +88,7 @@ Alternative sort parameter (use either `sort` or `sort_by`) > `optional` **limit**: `number` \| `null` -Maximum number of results to return +Maximum number of results to return. *** @@ -98,7 +96,7 @@ Maximum number of results to return > `optional` **skip**: `number` \| `null` -Number of results to skip (for pagination) +Number of results to skip. Used for pagination. *** @@ -106,4 +104,4 @@ Number of results to skip (for pagination) > `optional` **fields**: ...[] \| `null` -Array of field names to include in the response +Array of field names to include in the response. diff --git a/src/client.ts b/src/client.ts index 82b934b..68d7beb 100644 --- a/src/client.ts +++ b/src/client.ts @@ -35,6 +35,9 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * * The {@link AuthModule | auth} module is only available with user authentication for security reasons. * + * @param config - Configuration object for the client. + * @returns A configured Base44 client instance with access to all SDK modules. + * * @example * ```typescript * // Basic client setup @@ -283,6 +286,9 @@ export function createClient(config: CreateClientConfig): Base44Client { * * Creates a client by automatically extracting authentication tokens and configuration from request with authentication information in their headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from your app frontend to your backend functions. * + * @param request - The incoming HTTP request object containing Base44 authentication headers. + * @returns A configured Base44 client instance with authentication from the request. + * * @throws {Error} When Base44-App-Id header is missing. * @throws {Error} When authorization headers have invalid format. * diff --git a/src/client.types.ts b/src/client.types.ts index 4044880..32c6e5f 100644 --- a/src/client.types.ts +++ b/src/client.types.ts @@ -31,7 +31,12 @@ export type CreateClientConfig = { * @internal */ appBaseUrl?: string; - /** Your Base44 application ID. */ + /** + * Your Base44 application ID. + * + * You can find your `appId` in the browser URL when you're in the app editor. + * It's the string between `/apps/` and `/editor/`. + */ appId: string; /** * User authentication token. Use this for client-side applications where you want to diff --git a/src/index.ts b/src/index.ts index 0e89015..8c9cdc4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,7 @@ import { type CreateClientConfig, type CreateClientOptions, } from "./client.js"; -import { Base44Error } from "./utils/axios-client.js"; +import { Base44Error, type Base44ErrorJSON } from "./utils/axios-client.js"; import { getAccessToken, saveAccessToken, @@ -23,7 +23,12 @@ export { getLoginUrl, }; -export type { Base44Client, CreateClientConfig, CreateClientOptions }; +export type { + Base44Client, + CreateClientConfig, + CreateClientOptions, + Base44ErrorJSON, +}; export * from "./types.js"; @@ -37,6 +42,10 @@ export type { AuthModule, LoginResponse, RegisterPayload, + VerifyOtpParams, + ChangePasswordParams, + ResetPasswordParams, + User, } from "./modules/auth.types.js"; export type { @@ -47,7 +56,16 @@ export type { export type { FunctionsModule } from "./modules/functions.types.js"; -export type { AgentsModule } from "./modules/agents.types.js"; +export type { + AgentsModule, + AgentConversation, + AgentMessage, + AgentMessageReasoning, + AgentMessageToolCall, + AgentMessageUsage, + AgentMessageCustomContext, + AgentMessageMetadata, +} from "./modules/agents.types.js"; export type { AppLogsModule } from "./modules/app-logs.types.js"; diff --git a/src/modules/agents.ts b/src/modules/agents.ts index 270d5a7..db42202 100644 --- a/src/modules/agents.ts +++ b/src/modules/agents.ts @@ -23,7 +23,7 @@ export function createAgentsModule({ }: AgentsModuleConfig): AgentsModule { const baseURL = `/apps/${appId}/agents`; - // Get all conversations for the current user + // Get all conversations (current user with user auth, all users with service role) const getConversations = () => { return axios.get(`${baseURL}/conversations`); }; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index f3b199f..21e9294 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -2,21 +2,91 @@ import { AxiosInstance } from "axios"; import { RoomsSocket } from "../utils/socket-utils"; import { ModelFilterParams } from "../types"; +/** + * Reasoning information for an agent message. + * + * Contains details about the agent's reasoning process when generating a response. + */ +export type AgentMessageReasoning = { + /** When reasoning started. */ + start_date: string; + /** When reasoning ended. */ + end_date?: string; + /** Reasoning content. */ + content: string; +}; + +/** + * A tool call made by the agent. + * + * Represents a function or tool that the agent invoked during message generation. + */ +export type AgentMessageToolCall = { + /** Tool call ID. */ + id: string; + /** Name of the tool called. */ + name: string; + /** Arguments passed to the tool as JSON string. */ + arguments_string: string; + /** Status of the tool call. */ + status: "running" | "success" | "error" | "stopped"; + /** Results from the tool call. */ + results?: string | null; +}; + +/** + * Token usage statistics for an agent message. + * + * Tracks the number of tokens consumed when generating the message. + */ +export type AgentMessageUsage = { + /** Number of tokens in the prompt. */ + prompt_tokens?: number; + /** Number of tokens in the completion. */ + completion_tokens?: number; +}; + +/** + * Custom context provided with an agent message. + * + * Additional contextual information that can be passed to the agent. + */ +export type AgentMessageCustomContext = { + /** Context message. */ + message: string; + /** Associated data for the context. */ + data: Record; + /** Type of context. */ + type: string; +}; + +/** + * Metadata about when and by whom a message was created. + */ +export type AgentMessageMetadata = { + /** When the message was created. */ + created_date: string; + /** Email of the user who created the message. */ + created_by_email: string; + /** Full name of the user who created the message. */ + created_by_full_name: string | null; +}; + /** * An agent conversation containing messages exchanged with an AI agent. */ export type AgentConversation = { - /** Unique identifier for the conversation */ + /** Unique identifier for the conversation. */ id: string; - /** Application ID */ + /** Application ID. */ app_id: string; - /** Name of the agent in this conversation */ + /** Name of the agent in this conversation. */ agent_name: string; - /** ID of the user who created the conversation */ + /** ID of the user who created the conversation. */ created_by_id: string; - /** Array of messages in the conversation */ + /** Array of messages in the conversation. */ messages: AgentMessage[]; - /** Optional metadata associated with the conversation */ + /** Optional metadata associated with the conversation. */ metadata?: Record; }; @@ -24,57 +94,31 @@ export type AgentConversation = { * A message in an agent conversation. */ export type AgentMessage = { - /** Unique identifier for the message */ + /** Unique identifier for the message. */ id: string; - /** Role of the message sender */ + /** Role of the message sender. */ role: "user" | "assistant" | "system"; - /** Optional reasoning information for the message */ - reasoning?: { - /** When reasoning started */ - start_date: string; - /** When reasoning ended */ - end_date?: string; - /** Reasoning content */ - content: string; - }; - /** Message content (can be text or structured data) */ + /** Optional reasoning information for the message. */ + reasoning?: AgentMessageReasoning; + /** Message content. */ content?: string | Record | null; - /** URLs to files attached to the message */ + /** URLs to files attached to the message. */ file_urls?: string[] | null; - /** Tool calls made by the agent */ - tool_calls?: - | { - /** Tool call ID */ - id: string; - /** Name of the tool called */ - name: string; - /** Arguments passed to the tool as JSON string */ - arguments_string: string; - /** Status of the tool call */ - status: "running" | "success" | "error" | "stopped"; - /** Results from the tool call */ - results?: string | null; - }[] - | null; - /** Token usage statistics */ - usage?: { prompt_tokens?: number; completion_tokens?: number } | null; - /** Whether the message is hidden from the user */ + /** Tool calls made by the agent. */ + tool_calls?: AgentMessageToolCall[] | null; + /** Token usage statistics. */ + usage?: AgentMessageUsage | null; + /** Whether the message is hidden from the user. */ hidden?: boolean; - /** Custom context provided with the message */ - custom_context?: - | { message: string; data: Record; type: string }[] - | null; - /** Model used to generate the message */ + /** Custom context provided with the message. */ + custom_context?: AgentMessageCustomContext[] | null; + /** Model used to generate the message. */ model?: string | null; - /** Checkpoint ID for the message */ + /** Checkpoint ID for the message. */ checkpoint_id?: string | null; - /** Metadata about when and by whom the message was created */ - metadata?: { - created_date: string; - created_by_email: string; - created_by_full_name: string | null; - }; - /** Additional custom parameters for the message */ + /** Metadata about when and by whom the message was created. */ + metadata?: AgentMessageMetadata; + /** Additional custom parameters for the message. */ additional_message_params?: Record; }; @@ -102,22 +146,34 @@ export type AgentsModuleConfig = { * send messages, and subscribe to real-time updates. Conversations can be used * for chat interfaces, support systems, or any interactive AI application. * - * **Real-time Updates:** - * The agents module supports real-time updates through WebSocket subscriptions, - * allowing you to receive instant notifications when new messages arrive. - * - * **Available with both auth modes:** - * - User auth: `client.agents.method(...)` - * - Service role: `client.asServiceRole.agents.method(...)` + * **Authentication modes:** + * - **User authentication** (`client.agents`): Access only conversations created by the authenticated user. + * - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. * * @example * ```typescript * // Create a new conversation * const conversation = await client.agents.createConversation({ * agent_name: 'support-agent', - * metadata: { user_id: 'user-123' } + * metadata: { + * ticket_id: 'SUPP-1234', + * category: 'billing', + * priority: 'high' + * } + * }); + * ``` + * + * @example + * ```typescript + * // Send a message + * await client.agents.addMessage(conversation, { + * role: 'user', + * content: 'Hello, I need help!' * }); + * ``` * + * @example + * ```typescript * // Subscribe to real-time updates * const unsubscribe = client.agents.subscribeToConversation( * conversation.id, @@ -126,23 +182,16 @@ export type AgentsModuleConfig = { * } * ); * - * // Send a message - * await client.agents.addMessage(conversation, { - * role: 'user', - * content: 'Hello, I need help!' - * }); - * - * // Clean up subscription + * // Clean up subscription later * unsubscribe(); * ``` + * */ export interface AgentsModule { /** - * Get all conversations for the current user. - * - * Retrieves all agent conversations without filtering. + * Gets all conversations. * - * @returns Promise resolving to an array of conversations + * @returns Promise resolving to an array of conversations. * * @example * ```typescript @@ -153,10 +202,10 @@ export interface AgentsModule { getConversations(): Promise; /** - * Get a specific conversation by ID. + * Gets a specific conversation by ID. * - * @param conversationId - The unique identifier of the conversation - * @returns Promise resolving to the conversation, or undefined if not found + * @param conversationId - The unique identifier of the conversation. + * @returns Promise resolving to the conversation, or undefined if not found. * * @example * ```typescript @@ -171,10 +220,10 @@ export interface AgentsModule { ): Promise; /** - * List conversations with filtering and pagination. + * Lists conversations with filtering and pagination. * - * @param filterParams - Filter parameters for querying conversations - * @returns Promise resolving to an array of filtered conversations + * @param filterParams - Filter parameters for querying conversations. + * @returns Promise resolving to an array of filtered conversations. * * @example * ```typescript @@ -189,17 +238,18 @@ export interface AgentsModule { ): Promise; /** - * Create a new conversation with an agent. + * Creates a new conversation with an agent. * - * @param conversation - Conversation details including agent name and optional metadata - * @returns Promise resolving to the created conversation + * @param conversation - Conversation details including agent name and optional metadata. + * @returns Promise resolving to the created conversation. * * @example * ```typescript * const conversation = await client.agents.createConversation({ * agent_name: 'support-agent', * metadata: { - * user_id: 'user-123', + * order_id: 'ORD-789', + * product_id: 'PROD-456', * category: 'technical-support' * } * }); @@ -212,14 +262,14 @@ export interface AgentsModule { }): Promise; /** - * Add a message to a conversation. + * Adds a message to a conversation. * * Sends a message to the agent and updates the conversation. This method * also updates the real-time socket to notify any subscribers. * - * @param conversation - The conversation to add the message to - * @param message - The message to add - * @returns Promise resolving to the created message + * @param conversation - The conversation to add the message to. + * @param message - The message to add. + * @returns Promise resolving to the created message. * * @example * ```typescript @@ -236,15 +286,15 @@ export interface AgentsModule { ): Promise; /** - * Subscribe to real-time updates for a conversation. + * Subscribes to real-time updates for a conversation. * * Establishes a WebSocket connection to receive instant updates when new * messages are added to the conversation. Returns an unsubscribe function * to clean up the connection. * - * @param conversationId - The conversation ID to subscribe to - * @param onUpdate - Callback function called when the conversation is updated - * @returns Unsubscribe function to stop receiving updates + * @param conversationId - The conversation ID to subscribe to. + * @param onUpdate - Callback function called when the conversation is updated. + * @returns Unsubscribe function to stop receiving updates. * * @example * ```typescript @@ -266,13 +316,13 @@ export interface AgentsModule { ): () => void; /** - * Get WhatsApp connection URL for an agent. + * Gets WhatsApp connection URL for an agent. * * Generates a URL that users can use to connect with the agent through WhatsApp. * The URL includes authentication if a token is available. * - * @param agentName - The name of the agent - * @returns WhatsApp connection URL + * @param agentName - The name of the agent. + * @returns WhatsApp connection URL. * * @example * ```typescript diff --git a/src/modules/app.types.ts b/src/modules/app.types.ts index fc2f360..680126c 100644 --- a/src/modules/app.types.ts +++ b/src/modules/app.types.ts @@ -1,5 +1,6 @@ - - +/** + * @internal + */ export interface AppMessageContent { content?: string; file_urls?: string[]; @@ -8,11 +9,17 @@ export interface AppMessageContent { [key: string]: unknown; } +/** + * @internal + */ export interface AppConversationMessage extends AppMessageContent { id?: string | null; role?: "user" | "assistant" | string; } +/** + * @internal + */ export interface AppConversationLike { id?: string | null; messages?: AppMessageContent[] | null; @@ -20,15 +27,19 @@ export interface AppConversationLike { functions_fail_silently?: boolean; } - -export interface DenoProjectLike { - project_id: string - project_name: string - app_id: string - deployment_name_to_info: Record - +/** + * @internal + */ +export interface DenoProjectLike { + project_id: string; + project_name: string; + app_id: string; + deployment_name_to_info: Record; } +/** + * @internal + */ export interface AppLike { id?: string; conversation?: AppConversationLike | null; @@ -48,7 +59,12 @@ export interface AppLike { agents?: Record; logo_url?: string; slug?: string; - public_settings?: "private_with_login" | "public_with_login" | "public_without_login" | "workspace_with_login" | string; + public_settings?: + | "private_with_login" + | "public_with_login" + | "public_without_login" + | "workspace_with_login" + | string; is_blocked?: boolean; github_repo_url?: string; main_page?: string; @@ -79,13 +95,19 @@ export interface AppLike { function_names?: string[]; user_entity?: UserEntityLike; app_code_hash?: string; - has_backend_functions_enabled?: boolean; + has_backend_functions_enabled?: boolean; } +/** + * @internal + */ export interface UserLike { id?: string | null; } +/** + * @internal + */ export interface UserEntityLike { type: string; name: string; @@ -108,7 +130,9 @@ export interface UserEntityLike { required: string[]; } - +/** + * @internal + */ export interface AuthConfigLike { enable_username_password?: boolean; enable_google_login?: boolean; @@ -118,9 +142,9 @@ export interface AuthConfigLike { enable_sso_login?: boolean; } - - - +/** + * @internal + */ export type LoginInfoResponse = Pick< AppLike, | "id" @@ -132,4 +156,4 @@ export type LoginInfoResponse = Pick< | "created_date" | "auth_config" | "platform_version" ->; \ No newline at end of file +>; diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 89f7b39..336aaaa 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -1,5 +1,12 @@ import { AxiosInstance } from "axios"; -import { AuthModule, AuthModuleOptions } from "./auth.types"; +import { + AuthModule, + AuthModuleOptions, + User, + VerifyOtpParams, + ChangePasswordParams, + ResetPasswordParams, +} from "./auth.types"; /** * Creates the auth module for the Base44 SDK. @@ -24,7 +31,9 @@ export function createAuthModule( }, // Update current user data - async updateMe(data: Record) { + async updateMe( + data: Partial> + ) { return axios.put(`/apps/${appId}/entities/User/me`, data); }, @@ -167,8 +176,8 @@ export function createAuthModule( return axios.post(`/apps/${appId}/auth/register`, payload); }, - // Verify an OTP (One-Time Password) code - verifyOtp({ email, otpCode }: { email: string; otpCode: string }) { + // Verify an OTP (One-time password) code + verifyOtp({ email, otpCode }: VerifyOtpParams) { return axios.post(`/apps/${appId}/auth/verify-otp`, { email, otp_code: otpCode, @@ -188,13 +197,7 @@ export function createAuthModule( }, // Reset password using a reset token - resetPassword({ - resetToken, - newPassword, - }: { - resetToken: string; - newPassword: string; - }) { + resetPassword({ resetToken, newPassword }: ResetPasswordParams) { return axios.post(`/apps/${appId}/auth/reset-password`, { reset_token: resetToken, new_password: newPassword, @@ -206,11 +209,7 @@ export function createAuthModule( userId, currentPassword, newPassword, - }: { - userId: string; - currentPassword: string; - newPassword: string; - }) { + }: ChangePasswordParams) { return axios.post(`/apps/${appId}/auth/change-password`, { user_id: userId, current_password: currentPassword, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 29e2e66..c360706 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -1,41 +1,103 @@ import { AxiosInstance } from "axios"; +/** + * An authenticated user. + */ +export interface User { + /** Unique user identifier. */ + id: string; + /** User's email address. */ + email: string; + /** User's full name. */ + name?: string; + /** User's first name. */ + first_name?: string; + /** User's last name. */ + last_name?: string; + /** URL to user's profile picture. */ + avatar_url?: string; + /** + * User's role in the application. Roles are configured in your Base44 application settings and determine the user's permissions and access levels. + */ + role?: string; + /** Timestamp when the user was created. */ + created_at?: string; + /** Timestamp when the user was last updated. */ + updated_at?: string; + /** + * Additional custom fields defined in your user schema. Any custom properties you've added to your user schema in your Base44 application will be available here with their configured types and values. + */ + [key: string]: any; +} + /** * Response from login endpoints containing user information and access token. */ export interface LoginResponse { - /** JWT access token for authentication */ + /** JWT access token for authentication. */ access_token: string; - /** User information */ - user: any; + /** User information. */ + user: User; } /** * Payload for user registration. */ export interface RegisterPayload { - /** User's email address */ + /** User's email address. */ email: string; - /** User's password */ + /** User's password. */ password: string; - /** Optional Turnstile captcha token */ + /** Optional {@link https://developers.cloudflare.com/turnstile/ | Cloudflare Turnstile CAPTCHA token} for bot protection. */ turnstile_token?: string | null; - /** Optional referral code */ + /** Optional {@link https://docs.base44.com/Getting-Started/Referral-program | referral code} from an existing user. */ referral_code?: string | null; } +/** + * Parameters for OTP verification. + */ +export interface VerifyOtpParams { + /** User's email address. */ + email: string; + /** One-time password code received by email. */ + otpCode: string; +} + +/** + * Parameters for changing a user's password. + */ +export interface ChangePasswordParams { + /** User ID. */ + userId: string; + /** Current password for verification. */ + currentPassword: string; + /** New password to set. */ + newPassword: string; +} + +/** + * Parameters for resetting a password with a token. + */ +export interface ResetPasswordParams { + /** Reset token received by email. */ + resetToken: string; + /** New password to set. */ + newPassword: string; +} + /** * Configuration options for the auth module. */ export interface AuthModuleOptions { - /** Server URL for API requests */ + /** Server URL for API requests. */ serverUrl: string; - /** Optional base URL for the app (used for login redirects) */ + /** Optional base URL for the app (used for login redirects). */ appBaseUrl?: string; } /** - * Authentication module for managing user authentication and authorization. + * 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. * * This module provides comprehensive authentication functionality including: * - Email/password login and registration @@ -45,14 +107,6 @@ export interface AuthModuleOptions { * - OTP verification * - User invitations * - * **Browser-Only Features:** - * Some methods like `redirectToLogin()` and `logout()` only work in browser - * environments as they interact with localStorage and window.location. - * - * **Token Storage:** - * The module automatically stores tokens in localStorage (when available) and - * manages Authorization headers for API requests. - * * @example * ```typescript * // Login with email and password @@ -60,24 +114,37 @@ export interface AuthModuleOptions { * 'user@example.com', * 'password123' * ); + * ``` * + * @example + * ```typescript * // Check if user is authenticated * const isAuth = await client.auth.isAuthenticated(); + * ``` * + * @example + * ```typescript * // Get current user profile * const currentUser = await client.auth.me(); + * ``` * - * // Logout + * @example + * ```typescript + * // Logout and reload page * client.auth.logout(); * ``` + * + * @example + * ```typescript + * // Logout and redirect to login page + * client.auth.logout('/login'); + * ``` */ export interface AuthModule { /** - * Get the current authenticated user's information. - * - * Retrieves the profile data for the currently authenticated user. + * Gets the current authenticated user's information. * - * @returns Promise resolving to the user's profile data + * @returns Promise resolving to the user's profile data. * * @example * ```typescript @@ -86,66 +153,84 @@ export interface AuthModule { * console.log(`User ID: ${user.id}`); * ``` */ - me(): Promise; + me(): Promise; /** - * Update the current authenticated user's information. + * Updates the current authenticated user's information. * - * Updates profile fields for the currently authenticated user. + * Performs a partial update - only include the fields you want to change. + * Commonly updated fields include name, avatar_url, and custom profile fields. * - * @param data - Object containing the fields to update - * @returns Promise resolving to the updated user data + * @param data - Object containing the fields to update. Only the provided fields will be changed. + * @returns Promise resolving to the updated user data. * * @example * ```typescript + * // Update specific fields * const updatedUser = await client.auth.updateMe({ * name: 'John Doe', - * bio: 'Software developer' + * avatar_url: 'https://example.com/avatar.jpg' + * }); + * console.log(`Updated user: ${updatedUser.name}`); + * ``` + * + * @example + * ```typescript + * // Update custom fields defined in your User entity + * await client.auth.updateMe({ + * bio: 'Software developer', + * phone: '+1234567890', + * preferences: { theme: 'dark' } * }); * ``` */ - updateMe(data: Record): Promise; + updateMe( + data: Partial> + ): Promise; /** - * Redirect the user to the app's login page. - * - * **Browser only:** This method only works in browser environments. + * Redirects the user to the app's login page. * - * Redirects the user to your app's login page with a callback URL - * to return to after successful authentication. + * Redirects with a callback URL to return to after successful authentication. Requires a browser environment and cannot be used in the backend. * - * @param nextUrl - URL to redirect to after successful login - * @throws {Error} When not in a browser environment + * @param nextUrl - URL to redirect to after successful login. + * @throws {Error} When not in a browser environment. * * @example * ```typescript * // Redirect to login and come back to current page * client.auth.redirectToLogin(window.location.href); + * ``` * - * // Redirect to login and go to dashboard after + * @example + * ```typescript + * // Redirect to login and then go to the dashboard page * client.auth.redirectToLogin('/dashboard'); * ``` */ redirectToLogin(nextUrl: string): void; /** - * Logout the current user. + * Logs out the current user. * - * **Browser only:** Full functionality requires browser environment. + * Removes the authentication token from local storage and Axios headers, then optionally redirects to a URL or reloads the page. Requires a browser environment and cannot be used in the backend. * - * Removes the authentication token from localStorage and axios headers, - * then optionally redirects to a URL or reloads the page. - * - * @param redirectUrl - Optional URL to redirect to after logout. Reloads the page if not provided + * @param redirectUrl - Optional URL to redirect to after logout. Reloads the page if not provided. * * @example * ```typescript * // Logout and reload page * client.auth.logout(); + * ``` * + * @example + * ```typescript * // Logout and redirect to login page * client.auth.logout('/login'); + * ``` * + * @example + * ```typescript * // Logout and redirect to home * client.auth.logout('/'); * ``` @@ -153,35 +238,37 @@ export interface AuthModule { logout(redirectUrl?: string): void; /** - * Set the authentication token. + * Sets the authentication token. * - * Updates the Authorization header for API requests and optionally - * saves the token to localStorage for persistence. + * Updates the authorization header for API requests and optionally saves the token to local storage for persistence. Saving to local storage requires a browser environment and is automatically skipped in backend environments. * - * @param token - JWT authentication token - * @param saveToStorage - Whether to save the token to localStorage (default: true) + * @param token - JWT authentication token. + * @param saveToStorage - Whether to save the token to local storage. Defaults to true. * * @example * ```typescript - * // Set token and save to localStorage + * // Set token and save to local storage * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); + * ``` * - * // Set token without saving to localStorage + * @example + * ```typescript + * // Set token without saving to local storage * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); * ``` */ setToken(token: string, saveToStorage?: boolean): void; /** - * Login using email and password. + * Logs in a registered user using email and password. * - * Authenticates a user with email and password credentials. On success, - * automatically sets the token for subsequent requests. + * Authenticates a user with email and password credentials. The user must already have a registered account. For new users, use {@linkcode register | register()} first to create an account. On successful login, automatically sets the token for subsequent requests. * - * @param email - User's email address - * @param password - User's password - * @param turnstileToken - Optional Turnstile captcha token - * @returns Promise resolving to login response with access token and user data + * @param email - User's email address. + * @param password - User's password. + * @param turnstileToken - Optional {@link https://developers.cloudflare.com/turnstile/ | Cloudflare Turnstile CAPTCHA token} for bot protection. + * @returns Promise resolving to login response with access token and user data. + * @throws Error if the email and password combination is invalid or the user is not registered. * * @example * ```typescript @@ -194,7 +281,10 @@ export interface AuthModule { * } catch (error) { * console.error('Login failed:', error); * } + * ``` * + * @example + * ```typescript * // With captcha token * const response = await client.auth.loginViaEmailPassword( * 'user@example.com', @@ -210,20 +300,17 @@ export interface AuthModule { ): Promise; /** - * Check if the current user is authenticated. + * Checks if the current user is authenticated. * - * Verifies whether the current token is valid by attempting to - * fetch the user's profile. - * - * @returns Promise resolving to true if authenticated, false otherwise + * @returns Promise resolving to true if authenticated, false otherwise. * * @example * ```typescript - * const isAuth = await client.auth.isAuthenticated(); - * if (isAuth) { + * const isAuthenticated = await client.auth.isAuthenticated(); + * if (isAuthenticated) { * console.log('User is logged in'); * } else { - * // Redirect to login + * // Redirect to login page * client.auth.redirectToLogin(window.location.href); * } * ``` @@ -231,29 +318,35 @@ export interface AuthModule { isAuthenticated(): Promise; /** - * Invite a user to the application. + * Invites a user to the application. * - * Sends an invitation email to a user with a specific role. + * Sends an invitation email to a potential user with a specific role. + * Roles are configured in your Base44 application settings and determine + * the user's permissions and access levels. * - * @param userEmail - Email address of the user to invite - * @param role - Role to assign to the invited user - * @returns Promise resolving to the invitation response + * @param userEmail - Email address of the user to invite. + * @param role - Role to assign to the invited user. Must match a role defined in your Base44 application. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. + * @returns Promise that resolves when the invitation is sent successfully. Throws an error if the invitation fails. * * @example * ```typescript - * await client.auth.inviteUser('newuser@example.com', 'editor'); - * console.log('Invitation sent!'); + * try { + * await client.auth.inviteUser('newuser@example.com', 'editor'); + * console.log('Invitation sent successfully!'); + * } catch (error) { + * console.error('Failed to send invitation:', error); + * } * ``` */ inviteUser(userEmail: string, role: string): Promise; /** - * Register a new user account. + * Registers a new user account. * * Creates a new user account with email and password. * - * @param payload - Registration details including email, password, and optional fields - * @returns Promise resolving to the registration response + * @param payload - Registration details including email, password, and optional fields. + * @returns Promise resolving to the registration response. * * @example * ```typescript @@ -268,102 +361,120 @@ export interface AuthModule { register(payload: RegisterPayload): Promise; /** - * Verify an OTP (One-Time Password) code. + * Verifies an OTP (One-time password) code. * * Validates an OTP code sent to the user's email during registration * or authentication. * - * @param params - Object containing email and OTP code - * @returns Promise resolving to the verification response + * @param params - Object containing email and OTP code. + * @returns Promise resolving to the verification response if valid. + * @throws Error if the OTP code is invalid, expired, or verification fails. * * @example * ```typescript - * await client.auth.verifyOtp({ - * email: 'user@example.com', - * otpCode: '123456' - * }); - * console.log('Email verified!'); + * try { + * await client.auth.verifyOtp({ + * email: 'user@example.com', + * otpCode: '123456' + * }); + * console.log('Email verified successfully!'); + * } catch (error) { + * console.error('Invalid or expired OTP code'); + * } * ``` */ - verifyOtp(params: { email: string; otpCode: string }): Promise; + verifyOtp(params: VerifyOtpParams): Promise; /** - * Resend an OTP code to the user's email. + * Resends an OTP code to the user's email address. * * Requests a new OTP code to be sent to the specified email address. * - * @param email - Email address to send the OTP to - * @returns Promise resolving to the response + * @param email - Email address to send the OTP to. + * @returns Promise resolving when the OTP is sent successfully. + * @throws Error if the email is invalid or the request fails. * * @example * ```typescript - * await client.auth.resendOtp('user@example.com'); - * console.log('OTP resent! Please check your email.'); + * try { + * await client.auth.resendOtp('user@example.com'); + * console.log('OTP resent! Please check your email.'); + * } catch (error) { + * console.error('Failed to resend OTP:', error); + * } * ``` */ resendOtp(email: string): Promise; /** - * Request a password reset. + * Requests a password reset. * * Sends a password reset email to the specified email address. * - * @param email - Email address for the account to reset - * @returns Promise resolving to the response + * @param email - Email address for the account to reset. + * @returns Promise resolving when the password reset email is sent successfully. + * @throws Error if the email is invalid or the request fails. * * @example * ```typescript - * await client.auth.resetPasswordRequest('user@example.com'); - * console.log('Password reset email sent!'); + * try { + * await client.auth.resetPasswordRequest('user@example.com'); + * console.log('Password reset email sent!'); + * } catch (error) { + * console.error('Failed to send password reset email:', error); + * } * ``` */ resetPasswordRequest(email: string): Promise; /** - * Reset password using a reset token. + * Resets password using a reset token. * * Completes the password reset flow by setting a new password * using the token received by email. * - * @param params - Object containing the reset token and new password - * @returns Promise resolving to the response + * @param params - Object containing the reset token and new password. + * @returns Promise resolving when the password is reset successfully. + * @throws Error if the reset token is invalid, expired, or the request fails. * * @example * ```typescript - * await client.auth.resetPassword({ - * resetToken: 'token-from-email', - * newPassword: 'newSecurePassword456' - * }); - * console.log('Password reset successful!'); + * try { + * await client.auth.resetPassword({ + * resetToken: 'token-from-email', + * newPassword: 'newSecurePassword456' + * }); + * console.log('Password reset successful!'); + * } catch (error) { + * console.error('Failed to reset password:', error); + * } * ``` */ - resetPassword(params: { - resetToken: string; - newPassword: string; - }): Promise; + resetPassword(params: ResetPasswordParams): Promise; /** - * Change the user's password. + * Changes the user's password. * * Updates the password for an authenticated user by verifying * the current password and setting a new one. * - * @param params - Object containing user ID, current password, and new password - * @returns Promise resolving to the response + * @param params - Object containing user ID, current password, and new password. + * @returns Promise resolving when the password is changed successfully. + * @throws Error if the current password is incorrect or the request fails. * * @example * ```typescript - * await client.auth.changePassword({ - * userId: 'user-123', - * currentPassword: 'oldPassword123', - * newPassword: 'newSecurePassword456' - * }); - * console.log('Password changed successfully!'); + * try { + * await client.auth.changePassword({ + * userId: 'user-123', + * currentPassword: 'oldPassword123', + * newPassword: 'newSecurePassword456' + * }); + * console.log('Password changed successfully!'); + * } catch (error) { + * console.error('Failed to change password:', error); + * } * ``` */ - changePassword(params: { - userId: string; - currentPassword: string; - newPassword: string; - }): Promise; + changePassword(params: ChangePasswordParams): Promise; } diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index 68a3538..85334a3 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -240,10 +240,8 @@ export interface EntityHandler { /** * Import entities from a file. * - * **Browser only:** Requires File object from file input. - * * Imports entities from a file (typically CSV or similar format). - * The file format should match your entity structure. + * The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. * * @param file - File object to import * @returns Promise resolving to the import result diff --git a/src/types.ts b/src/types.ts index f5c2448..e219e9b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,22 +1,20 @@ export * from "./modules/types.js"; /** - * Parameters for filtering, sorting, and paginating model data. + * Parameters for filtering, sorting, and paginating agent model data. * - * This type is primarily used in the agents module for querying agent - * conversations. It provides a structured way to specify query criteria, - * sorting, pagination, and field selection. + * Used in the agents module for querying agent conversations. Provides a structured way to specify query criteria, sorting, pagination, and field selection. * - * @property q - Query object with field-value pairs for filtering - * @property sort - Sort parameter (e.g., "-created_date" for descending order) - * @property sort_by - Alternative sort parameter (use either `sort` or `sort_by`) - * @property limit - Maximum number of results to return - * @property skip - Number of results to skip (for pagination) - * @property fields - Array of field names to include in the response + * @property q - Query object with field-value pairs for filtering. + * @property sort - Sort parameter. For example, "-created_date" for descending order. + * @property sort_by - Alternative sort parameter. Use either `sort` or `sort_by`. + * @property limit - Maximum number of results to return. + * @property skip - Number of results to skip. Used for pagination. + * @property fields - Array of field names to include in the response. * * @example * ```typescript - * // Basic filtering by agent name + * // Filter conversations by agent name * const conversations = await client.agents.listConversations({ * q: { agent_name: 'support-bot' } * }); @@ -24,7 +22,7 @@ export * from "./modules/types.js"; * * @example * ```typescript - * // Filtering with sorting + * // Filter conversations with sorting * const conversations = await client.agents.listConversations({ * q: { status: 'active' }, * sort: '-created_at' // Sort by created_at descending @@ -33,7 +31,7 @@ export * from "./modules/types.js"; * * @example * ```typescript - * // Pagination with limit and skip + * // Filter conversations with pagination * const conversations = await client.agents.listConversations({ * q: { agent_name: 'support-bot' }, * limit: 20, // Get 20 results @@ -43,7 +41,7 @@ export * from "./modules/types.js"; * * @example * ```typescript - * // Field selection (only return specific fields) + * // Filter conversations with field selection * const conversations = await client.agents.listConversations({ * q: { status: 'active' }, * fields: ['id', 'agent_name', 'created_at'] @@ -52,7 +50,7 @@ export * from "./modules/types.js"; * * @example * ```typescript - * // Complex query with multiple filters + * // Filter conversations with multiple filters * const conversations = await client.agents.listConversations({ * q: { * agent_name: 'support-bot', @@ -73,5 +71,3 @@ export type ModelFilterParams = { skip?: number | null; fields?: string[] | null; }; - - diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index 95ccb0e..0ec4b42 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -5,7 +5,40 @@ import { GetLoginUrlOptions, } from "./auth-utils.types.js"; -// Retrieve an access token from URL parameters or localStorage +/** + * Retrieves an access token from URL parameters or local storage. + * + * Low-level utility for manually retrieving tokens. In most cases, the Base44 client handles + * token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and cannot be used in the backend. + * + * @param options - Configuration options for token retrieval. + * @returns The access token string if found, null otherwise. + * + * @example + * ```typescript + * // Get access token from URL or local storage + * const token = getAccessToken(); + * + * if (token) { + * console.log('User is authenticated'); + * } else { + * console.log('No token found, redirect to login'); + * } + * ``` + * @example + * ```typescript + * // Get access token from custom local storage key + * const token = getAccessToken({ storageKey: 'my_app_token' }); + * ``` + * @example + * ```typescript + * // Get access token from URL but don't save or remove it + * const token = getAccessToken({ + * saveToStorage: false, + * removeFromUrl: false + * }); + * ``` + */ export function getAccessToken(options: GetAccessTokenOptions = {}) { const { storageKey = "base44_access_token", @@ -24,7 +57,7 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { // If token found in URL if (token) { - // Save token to localStorage if requested + // Save token to local storage if requested if (saveToStorage) { saveAccessToken(token, { storageKey }); } @@ -45,20 +78,47 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { } } - // If no token in URL, try localStorage + // If no token in URL, try local storage if (typeof window !== "undefined" && window.localStorage) { try { token = window.localStorage.getItem(storageKey); return token; } catch (e) { - console.error("Error retrieving token from localStorage:", e); + console.error("Error retrieving token from local storage:", e); } } return null; } -// Save an access token to localStorage +/** + * Saves an access token to local storage. + * + * Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and cannot be used in the backend. + * + * @param token - The access token string to save. + * @param options - Configuration options for saving the token. + * @returns `true` if the token was saved successfully, `false` otherwise. + * + * @example + * ```typescript + * // Save access token after login + * const response = await client.auth.loginViaEmailPassword(email, password); + * const success = saveAccessToken(response.access_token, {}); + * + * if (success) { + * console.log('User is now authenticated'); + * // Token is now available for future page loads + * } + * ``` + * @example + * ```typescript + * // Save access token to local storage using custom key + * const success = saveAccessToken(token, { + * storageKey: `my_custom_token_key` + * }); + * ``` + */ export function saveAccessToken( token: string, options: SaveAccessTokenOptions @@ -75,12 +135,33 @@ export function saveAccessToken( window.localStorage.setItem("token", token); return true; } catch (e) { - console.error("Error saving token to localStorage:", e); + console.error("Error saving token to local storage:", e); return false; } } -// Remove the access token from localStorage +/** + * Removes the access token from local storage. + * + * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | client.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. + * + * @param options - Configuration options for token removal. + * @returns `true` if the token was removed successfully, `false` otherwise. + * + * @example + * ```typescript + * // Remove custom token key + * const success = removeAccessToken({ + * storageKey: 'my_custom_token_key' + * }); + * ``` + * + * @example + * ```typescript + * // Standard logout flow with token removal and redirect + * client.auth.logout('/login'); + * ``` + */ export function removeAccessToken(options: RemoveAccessTokenOptions) { const { storageKey = "base44_access_token" } = options; @@ -92,12 +173,34 @@ export function removeAccessToken(options: RemoveAccessTokenOptions) { window.localStorage.removeItem(storageKey); return true; } catch (e) { - console.error("Error removing token from localStorage:", e); + console.error("Error removing token from local storage:", e); return false; } } -// Construct the absolute URL for the login page with redirect +/** + * Constructs the absolute URL for the login page with a redirect parameter. + * + * Low-level utility for building login URLs. For standard login redirects, use + * `client.auth.redirectToLogin()` instead, which handles this automatically. This function + * is useful when you need to construct login URLs without a client instance or for custom + * authentication flows. + * + * @param nextUrl - The URL to redirect to after successful login. + * @param options - Configuration options. + * @returns The complete login URL with encoded redirect parameters. + * + * @example + * ```typescript + * // Redirect to login page + * const loginUrl = getLoginUrl('/dashboard', { + * serverUrl: 'https://base44.app', + * appId: 'my-app-123' + * }); + * window.location.href = loginUrl; + * // User will be redirected back to /dashboard after login + * ``` + */ export function getLoginUrl(nextUrl: string, options: GetLoginUrlOptions) { const { serverUrl, appId, loginPath = "/login" } = options; diff --git a/src/utils/auth-utils.types.ts b/src/utils/auth-utils.types.ts index bca18eb..bcde6e7 100644 --- a/src/utils/auth-utils.types.ts +++ b/src/utils/auth-utils.types.ts @@ -3,12 +3,18 @@ * * @example * ```typescript - * // Use default options + * // Get access token from URL or local storage using default options * const token = getAccessToken(); + * ``` * - * // Custom storage key + * @example + * ```typescript + * // Get access token from custom local storage key * const token = getAccessToken({ storageKey: 'my_app_token' }); + * ``` * + * @example + * ```typescript * // Get token from URL but don't save or remove from URL * const token = getAccessToken({ * saveToStorage: false, @@ -18,7 +24,7 @@ */ export interface GetAccessTokenOptions { /** - * The key to use when storing/retrieving the token in localStorage + * The key to use when storing or retrieving the token in local storage * @default 'base44_access_token' */ storageKey?: string; @@ -30,7 +36,7 @@ export interface GetAccessTokenOptions { paramName?: string; /** - * Whether to save the token to localStorage if found in the URL + * Whether to save the token to local storage if found in the URL * @default true */ saveToStorage?: boolean; @@ -56,7 +62,7 @@ export interface GetAccessTokenOptions { */ export interface SaveAccessTokenOptions { /** - * The key to use when storing the token in localStorage + * The key to use when storing the token in local storage * @default 'base44_access_token' */ storageKey?: string; @@ -76,7 +82,7 @@ export interface SaveAccessTokenOptions { */ export interface RemoveAccessTokenOptions { /** - * The key to use when removing the token from localStorage + * The key to use when removing the token from local storage * @default 'base44_access_token' */ storageKey?: string; @@ -119,167 +125,23 @@ export interface GetLoginUrlOptions { loginPath?: string; } -/** - * Retrieves an access token from either the URL parameters or localStorage. - * - * This function is useful for handling OAuth redirects where the token is - * passed as a URL parameter. It will automatically save the token to - * localStorage and remove it from the URL for security. - * - * @param options - Configuration options for token retrieval - * @returns The access token if found, null otherwise - * - * @remarks - * - This function is browser-only and will return null in non-browser environments - * - Checks URL parameters first, then falls back to localStorage - * - By default, saves URL tokens to localStorage and removes them from the URL - * - * @example - * ```typescript - * // After OAuth redirect to: https://myapp.com?access_token=abc123 - * const token = getAccessToken(); - * // Returns: 'abc123' (and saves to localStorage, removes from URL) - * ``` - * - * @example - * ```typescript - * // Custom configuration - * const token = getAccessToken({ - * storageKey: 'my_app_token', - * paramName: 'token', - * saveToStorage: false, - * removeFromUrl: false - * }); - * ``` - * - * @example - * ```typescript - * // Retrieve from localStorage only (no URL check) - * const token = getAccessToken(); - * // Returns stored token or null - * ``` - */ +/** Type definition for getAccessToken function */ export type GetAccessTokenFunction = ( options?: GetAccessTokenOptions ) => string | null; -/** - * Saves an access token to localStorage. - * - * This function is browser-only and will return false in non-browser - * environments or if the save operation fails. - * - * @param token - The access token to save - * @param options - Configuration options for saving - * @returns true if the token was saved successfully, false otherwise - * - * @remarks - * - Also saves the token to 'token' key for backwards compatibility with platform v2 - * - Returns false if window.localStorage is not available - * - * @example - * ```typescript - * const success = saveAccessToken('my-token-123', {}); - * if (success) { - * console.log('Token saved successfully'); - * } - * ``` - * - * @example - * ```typescript - * // Use custom storage key - * const success = saveAccessToken('my-token-123', { - * storageKey: 'my_custom_token_key' - * }); - * ``` - */ +/** Type definition for saveAccessToken function */ export type SaveAccessTokenFunction = ( token: string, options: SaveAccessTokenOptions ) => boolean; -/** - * Removes the access token from localStorage. - * - * This function is browser-only and will return false in non-browser - * environments or if the removal operation fails. - * - * @param options - Configuration options for removal - * @returns true if the token was removed successfully, false otherwise - * - * @example - * ```typescript - * // Remove token on logout - * const success = removeAccessToken({}); - * if (success) { - * console.log('Token removed successfully'); - * } - * ``` - * - * @example - * ```typescript - * // Remove custom token key - * const success = removeAccessToken({ - * storageKey: 'my_custom_token_key' - * }); - * ``` - */ +/** Type definition for removeAccessToken function */ export type RemoveAccessTokenFunction = ( options: RemoveAccessTokenOptions ) => boolean; -/** - * Constructs the absolute URL for the login page with a redirect parameter. - * - * This function is useful for redirecting users to login and then back to - * the current page after authentication. - * - * @param nextUrl - The URL to redirect to after successful login - * @param options - Configuration options for constructing the login URL - * @returns The complete login URL with encoded redirect parameters - * - * @throws Error if serverUrl or appId are not provided - * - * @remarks - * - The nextUrl is URL-encoded for safe transmission - * - If nextUrl is empty and running in browser, uses current window.location.href - * - * @example - * ```typescript - * // Basic usage - * const loginUrl = getLoginUrl('/dashboard', { - * serverUrl: 'https://base44.app', - * appId: 'my-app-123' - * }); - * // Returns: 'https://base44.app/login?from_url=%2Fdashboard&app_id=my-app-123' - * ``` - * - * @example - * ```typescript - * // With custom login path - * const loginUrl = getLoginUrl('https://myapp.com/protected', { - * serverUrl: 'https://base44.app', - * appId: 'my-app-123', - * loginPath: '/auth/signin' - * }); - * ``` - * - * @example - * ```typescript - * // Redirect to login in React - * function ProtectedPage() { - * const handleLogin = () => { - * const loginUrl = getLoginUrl(window.location.href, { - * serverUrl: 'https://base44.app', - * appId: 'my-app-123' - * }); - * window.location.href = loginUrl; - * }; - * - * return ; - * } - * ``` - */ +/** Type definition for getLoginUrl function */ export type GetLoginUrlFunction = ( nextUrl: string, options: GetLoginUrlOptions diff --git a/src/utils/axios-client.ts b/src/utils/axios-client.ts index 53a7367..957835c 100644 --- a/src/utils/axios-client.ts +++ b/src/utils/axios-client.ts @@ -1,13 +1,12 @@ import axios from "axios"; import { isInIFrame } from "./common.js"; import { v4 as uuidv4 } from "uuid"; +import type { Base44ErrorJSON } from "./axios-client.types.js"; /** * Custom error class for Base44 SDK errors. * - * This error is thrown when API requests fail. It extends the standard Error - * class and includes additional information about the HTTP status, error code, - * and response data from the server. + * This error is thrown when API requests fail. It extends the standard `Error` class and includes additional information about the HTTP status, error code, and response data from the server. * * @example * ```typescript @@ -23,40 +22,15 @@ import { v4 as uuidv4 } from "uuid"; * } * ``` * - * @example - * ```typescript - * // Handling authentication errors - * try { - * await client.auth.loginViaEmailPassword('user@example.com', 'wrong-password'); - * } catch (error) { - * if (error instanceof Base44Error && error.status === 401) { - * console.error('Authentication failed:', error.message); - * } - * } - * ``` - * - * @example - * ```typescript - * // Serializing errors for logging - * try { - * await client.entities.User.create({ invalid: 'data' }); - * } catch (error) { - * if (error instanceof Base44Error) { - * const serialized = error.toJSON(); - * // Send to logging service - * logger.error(serialized); - * } - * } - * ``` */ export class Base44Error extends Error { /** - * HTTP status code of the error (e.g., 400, 401, 404, 500). + * HTTP status code of the error. */ status: number; /** - * Error code from the API (e.g., "NOT_FOUND", "VALIDATION_ERROR"). + * Error code from the API. */ code: string; @@ -66,7 +40,7 @@ export class Base44Error extends Error { data: any; /** - * The original error object from axios. + * The original error object from Axios. */ originalError: unknown; @@ -78,6 +52,7 @@ export class Base44Error extends Error { * @param code - Error code from the API * @param data - Full response data from the server * @param originalError - Original axios error object + * @internal */ constructor( message: string, @@ -100,7 +75,7 @@ export class Base44Error extends Error { * Useful for logging or sending error information to external services * without circular reference issues. * - * @returns JSON-safe representation of the error + * @returns JSON-safe representation of the error. * * @example * ```typescript @@ -121,7 +96,7 @@ export class Base44Error extends Error { * } * ``` */ - toJSON() { + toJSON(): Base44ErrorJSON { return { name: this.name, message: this.message, @@ -281,3 +256,6 @@ export function createAxiosClient({ return client; } + +// Re-export types +export type { Base44ErrorJSON } from "./axios-client.types.js"; diff --git a/src/utils/axios-client.types.ts b/src/utils/axios-client.types.ts new file mode 100644 index 0000000..0251dee --- /dev/null +++ b/src/utils/axios-client.types.ts @@ -0,0 +1,32 @@ +/** + * JSON representation of a Base44Error. + * + * This is the structure returned by {@linkcode Base44Error.toJSON | Base44Error.toJSON()}. + * Useful for logging or sending error information to external services. + */ +export interface Base44ErrorJSON { + /** + * The error name, always "Base44Error". + */ + name: string; + + /** + * Human-readable error message. + */ + message: string; + + /** + * HTTP status code of the error. + */ + status: number; + + /** + * Error code from the API. + */ + code: string; + + /** + * Full response data from the server containing error details. + */ + data: any; +} From b21a70d5645e0ed82e5c67b383af0978419b5bad Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Thu, 20 Nov 2025 21:29:48 +0200 Subject: [PATCH 04/31] more initial docs --- docs/README.md | 6 +- docs/functions/createClient.md | 22 +- docs/functions/createClientFromRequest.md | 2 +- docs/functions/getLoginUrl.md | 2 +- docs/functions/removeAccessToken.md | 4 +- docs/functions/saveAccessToken.md | 2 +- docs/interfaces/AgentsModule.md | 25 +- docs/interfaces/AppLogsModule.md | 89 +++-- docs/interfaces/AuthModule.md | 52 +-- docs/interfaces/Base44Client.md | 16 +- docs/interfaces/ConnectorsModule.md | 44 ++- docs/interfaces/EntitiesModule.md | 86 +++++ docs/interfaces/EntityHandler.md | 222 ++++++------ docs/interfaces/FetchLogsParams.md | 61 ++++ docs/interfaces/FunctionsModule.md | 70 ++-- docs/interfaces/GetStatsParams.md | 53 +++ docs/interfaces/IntegrationsModule.md | 110 ++++++ docs/interfaces/SsoModule.md | 14 +- docs/type-aliases/ConnectorIntegrationType.md | 2 +- docs/type-aliases/EntitiesModule.md | 75 ---- .../IntegrationEndpointFunction.md | 7 +- docs/type-aliases/IntegrationsModule.md | 100 ------ docs/type-aliases/ModelFilterParams.md | 10 +- src/client.ts | 28 +- src/index.ts | 6 +- src/modules/agents.types.ts | 25 +- src/modules/app-logs.ts | 10 +- src/modules/app-logs.types.ts | 128 +++++-- src/modules/auth.types.ts | 52 +-- src/modules/connectors.types.ts | 43 ++- src/modules/entities.types.ts | 326 ++++++++++-------- src/modules/functions.types.ts | 66 ++-- src/modules/integrations.types.ts | 74 ++-- src/modules/sso.types.ts | 14 +- src/types.ts | 10 +- src/utils/auth-utils.ts | 8 +- 36 files changed, 1080 insertions(+), 784 deletions(-) create mode 100644 docs/interfaces/EntitiesModule.md create mode 100644 docs/interfaces/FetchLogsParams.md create mode 100644 docs/interfaces/GetStatsParams.md create mode 100644 docs/interfaces/IntegrationsModule.md delete mode 100644 docs/type-aliases/EntitiesModule.md delete mode 100644 docs/type-aliases/IntegrationsModule.md diff --git a/docs/README.md b/docs/README.md index c7c97fb..fb37891 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,6 +12,8 @@ - [Base44Client](interfaces/Base44Client.md) - [AgentsModule](interfaces/AgentsModule.md) +- [FetchLogsParams](interfaces/FetchLogsParams.md) +- [GetStatsParams](interfaces/GetStatsParams.md) - [AppLogsModule](interfaces/AppLogsModule.md) - [User](interfaces/User.md) - [LoginResponse](interfaces/LoginResponse.md) @@ -23,7 +25,9 @@ - [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse.md) - [ConnectorsModule](interfaces/ConnectorsModule.md) - [EntityHandler](interfaces/EntityHandler.md) +- [EntitiesModule](interfaces/EntitiesModule.md) - [FunctionsModule](interfaces/FunctionsModule.md) +- [IntegrationsModule](interfaces/IntegrationsModule.md) - [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse.md) - [SsoModule](interfaces/SsoModule.md) - [GetAccessTokenOptions](interfaces/GetAccessTokenOptions.md) @@ -44,10 +48,8 @@ - [AgentConversation](type-aliases/AgentConversation.md) - [AgentMessage](type-aliases/AgentMessage.md) - [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType.md) -- [EntitiesModule](type-aliases/EntitiesModule.md) - [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction.md) - [IntegrationPackage](type-aliases/IntegrationPackage.md) -- [IntegrationsModule](type-aliases/IntegrationsModule.md) - [ModelFilterParams](type-aliases/ModelFilterParams.md) ## Functions diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md index f8398aa..56d5cdb 100644 --- a/docs/functions/createClient.md +++ b/docs/functions/createClient.md @@ -8,15 +8,15 @@ Creates a Base44 SDK client instance. -This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [entities](../type-aliases/EntitiesModule.md), [auth](../interfaces/AuthModule.md), and [functions](../interfaces/FunctionsModule.md). +This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [entities](../interfaces/EntitiesModule.md), [auth](../interfaces/AuthModule.md), and [functions](../interfaces/FunctionsModule.md). The client supports two authentication modes: -- **User authentication** (default): Access modules with user-level permissions using `client.moduleName`. -- **Service role authentication**: Access modules with elevated permissions using `client.asServiceRole.moduleName`. +- **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. +- **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. -For example, when using the [entities](../type-aliases/EntitiesModule.md) module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. +For example, when using the [entities](../interfaces/EntitiesModule.md) module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in your application's frontend. @@ -42,31 +42,31 @@ A configured Base44 client instance with access to all SDK modules. // Basic client setup import { createClient } from '@base44/client-sdk'; -const client = createClient({ +const base44 = createClient({ appId: 'my-app-id' }); // Use client modules -const products = await client.entities.Products.list(); -const user = await client.auth.me(); +const products = await base44.entities.Products.list(); +const user = await base44.auth.me(); ``` ```typescript // Client with service role access -const client = createClient({ +const base44 = createClient({ appId: 'my-app-id', token: 'user-token', serviceToken: 'service-role-token' }); // Access service-role-only modules -const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); -const oauthToken = await client.asServiceRole.connectors.getAccessToken('google'); +const ssoToken = await base44.asServiceRole.sso.getAccessToken('user-123'); +const oauthToken = await base44.asServiceRole.connectors.getAccessToken('google'); ``` ```typescript // Client with error handling -const client = createClient({ +const base44 = createClient({ appId: 'my-app-id', options: { onError: (error) => { diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md index 615ff24..2afd6c1 100644 --- a/docs/functions/createClientFromRequest.md +++ b/docs/functions/createClientFromRequest.md @@ -36,7 +36,7 @@ When authorization headers have invalid format. ```typescript // Frontend call to a backend function -const response = await client.functions.invoke('myBackendFunction', {}); +const response = await base44.functions.invoke('myBackendFunction', {}); // Backend function that receives the call import { createClientFromRequest } from '@base44/client-sdk'; diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md index c4796d7..884ac76 100644 --- a/docs/functions/getLoginUrl.md +++ b/docs/functions/getLoginUrl.md @@ -9,7 +9,7 @@ Constructs the absolute URL for the login page with a redirect parameter. Low-level utility for building login URLs. For standard login redirects, use -`client.auth.redirectToLogin()` instead, which handles this automatically. This function +`base44.auth.redirectToLogin()` instead, which handles this automatically. This function is useful when you need to construct login URLs without a client instance or for custom authentication flows. diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md index abc9434..a46fc1e 100644 --- a/docs/functions/removeAccessToken.md +++ b/docs/functions/removeAccessToken.md @@ -8,7 +8,7 @@ Removes the access token from local storage. -Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use [`client.auth.logout()`](../interfaces/AuthModule.md#logout) instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. +Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use [`base44.auth.logout()`](../interfaces/AuthModule.md#logout) instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. ## Parameters @@ -35,5 +35,5 @@ const success = removeAccessToken({ ```typescript // Standard logout flow with token removal and redirect -client.auth.logout('/login'); +base44.auth.logout('/login'); ``` diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md index f626ab2..043c70e 100644 --- a/docs/functions/saveAccessToken.md +++ b/docs/functions/saveAccessToken.md @@ -34,7 +34,7 @@ Configuration options for saving the token. ```typescript // Save access token after login -const response = await client.auth.loginViaEmailPassword(email, password); +const response = await base44.auth.loginViaEmailPassword(email, password); const success = saveAccessToken(response.access_token, {}); if (success) { diff --git a/docs/interfaces/AgentsModule.md b/docs/interfaces/AgentsModule.md index c80ca19..1513b15 100644 --- a/docs/interfaces/AgentsModule.md +++ b/docs/interfaces/AgentsModule.md @@ -10,15 +10,16 @@ This module provides methods to create and manage conversations with AI agents, send messages, and subscribe to real-time updates. Conversations can be used for chat interfaces, support systems, or any interactive AI application. -**Authentication modes:** -- **User authentication** (`client.agents`): Access only conversations created by the authenticated user. +Methods in this module respect the authentication mode used when calling them: + +- **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. ## Examples ```typescript // Create a new conversation -const conversation = await client.agents.createConversation({ +const conversation = await base44.agents.createConversation({ agent_name: 'support-agent', metadata: { ticket_id: 'SUPP-1234', @@ -30,7 +31,7 @@ const conversation = await client.agents.createConversation({ ```typescript // Send a message -await client.agents.addMessage(conversation, { +await base44.agents.addMessage(conversation, { role: 'user', content: 'Hello, I need help!' }); @@ -38,7 +39,7 @@ await client.agents.addMessage(conversation, { ```typescript // Subscribe to real-time updates -const unsubscribe = client.agents.subscribeToConversation( +const unsubscribe = base44.agents.subscribeToConversation( conversation.id, (updatedConversation) => { console.log('New messages:', updatedConversation.messages); @@ -66,7 +67,7 @@ Promise resolving to an array of conversations. #### Example ```typescript -const conversations = await client.agents.getConversations(); +const conversations = await base44.agents.getConversations(); console.log(`Total conversations: ${conversations.length}`); ``` @@ -95,7 +96,7 @@ Promise resolving to the conversation, or undefined if not found. #### Example ```typescript -const conversation = await client.agents.getConversation('conv-123'); +const conversation = await base44.agents.getConversation('conv-123'); if (conversation) { console.log(`Conversation has ${conversation.messages.length} messages`); } @@ -126,7 +127,7 @@ Promise resolving to an array of filtered conversations. #### Example ```typescript -const recentConversations = await client.agents.listConversations({ +const recentConversations = await base44.agents.listConversations({ limit: 10, sort: '-created_date' }); @@ -163,7 +164,7 @@ Promise resolving to the created conversation. #### Example ```typescript -const conversation = await client.agents.createConversation({ +const conversation = await base44.agents.createConversation({ agent_name: 'support-agent', metadata: { order_id: 'ORD-789', @@ -208,7 +209,7 @@ Promise resolving to the created message. #### Example ```typescript -const message = await client.agents.addMessage(conversation, { +const message = await base44.agents.addMessage(conversation, { role: 'user', content: 'Hello, I need help with my order #12345' }); @@ -254,7 +255,7 @@ Unsubscribe function to stop receiving updates. #### Example ```typescript -const unsubscribe = client.agents.subscribeToConversation( +const unsubscribe = base44.agents.subscribeToConversation( 'conv-123', (updatedConversation) => { const latestMessage = updatedConversation.messages[updatedConversation.messages.length - 1]; @@ -294,7 +295,7 @@ WhatsApp connection URL. #### Example ```typescript -const whatsappUrl = client.agents.getWhatsAppConnectURL('support-agent'); +const whatsappUrl = base44.agents.getWhatsAppConnectURL('support-agent'); console.log(`Connect through WhatsApp: ${whatsappUrl}`); // User can open this URL to start a WhatsApp conversation ``` diff --git a/docs/interfaces/AppLogsModule.md b/docs/interfaces/AppLogsModule.md index b663e3f..7600cb2 100644 --- a/docs/interfaces/AppLogsModule.md +++ b/docs/interfaces/AppLogsModule.md @@ -10,24 +10,35 @@ This module provides methods to log user activity, fetch logs, and retrieve statistics about your application's usage. Useful for analytics, monitoring, and understanding user behavior. -**Available with both auth modes:** -- User auth: `client.appLogs.method(...)` -- Service role: `client.asServiceRole.appLogs.method(...)` +Methods in this module respect the authentication mode used when calling them: -## Example +- **User authentication** (`base44.appLogs`): Operations are scoped to the currently + authenticated user. For example, `fetchLogs()` returns only logs for the current user, + and `getStats()` returns statistics about that user's activity. + +- **Service role authentication** (`client.asServiceRole.appLogs`): Operations have + elevated permissions and can access data across all users. For example, `fetchLogs()` + returns logs from all users in your application, and `getStats()` returns application-wide + statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. + +## Examples ```typescript // Log user visiting a page -await client.appLogs.logUserInApp('dashboard'); +await base44.appLogs.logUserInApp('dashboard'); +``` +```typescript // Fetch recent logs -const logs = await client.appLogs.fetchLogs({ +const logs = await base44.appLogs.fetchLogs({ limit: 100, sort: '-timestamp' }); +``` +```typescript // Get application statistics -const stats = await client.appLogs.getStats({ +const stats = await base44.appLogs.getStats({ startDate: '2024-01-01', endDate: '2024-01-31' }); @@ -50,25 +61,27 @@ Useful for tracking user navigation patterns and popular features. `string` -Name of the page or section being visited +Name of the page or section being visited. #### Returns `Promise`\<`void`\> -Promise that resolves when the log is recorded +Promise that resolves when the log is recorded. -#### Example +#### Examples ```typescript // Log page visit -await client.appLogs.logUserInApp('home'); -await client.appLogs.logUserInApp('profile'); -await client.appLogs.logUserInApp('settings'); +await base44.appLogs.logUserInApp('home'); +await base44.appLogs.logUserInApp('profile'); +await base44.appLogs.logUserInApp('settings'); +``` +```typescript // Log specific feature usage -await client.appLogs.logUserInApp('checkout-page'); -await client.appLogs.logUserInApp('product-details'); +await base44.appLogs.logUserInApp('checkout-page'); +await base44.appLogs.logUserInApp('product-details'); ``` *** @@ -86,36 +99,42 @@ and sorting. Use this to analyze user behavior and application usage patterns. ##### params? -`Record`\<`string`, `any`\> +[`FetchLogsParams`](FetchLogsParams.md) -Query parameters for filtering logs (limit, sort, date ranges, etc.) +Query parameters for filtering logs. #### Returns `Promise`\<`any`\> -Promise resolving to the logs data +Promise resolving to the logs data. -#### Example +#### Examples ```typescript // Fetch all logs -const allLogs = await client.appLogs.fetchLogs(); +const allLogs = await base44.appLogs.fetchLogs(); +``` +```typescript // Fetch logs with pagination -const recentLogs = await client.appLogs.fetchLogs({ +const recentLogs = await base44.appLogs.fetchLogs({ limit: 50, skip: 0, sort: '-timestamp' }); +``` +```typescript // Fetch logs for a specific page -const dashboardLogs = await client.appLogs.fetchLogs({ +const dashboardLogs = await base44.appLogs.fetchLogs({ pageName: 'dashboard' }); +``` +```typescript // Fetch logs within a date range -const periodLogs = await client.appLogs.fetchLogs({ +const periodLogs = await base44.appLogs.fetchLogs({ startDate: '2024-01-01', endDate: '2024-01-31' }); @@ -127,7 +146,7 @@ const periodLogs = await client.appLogs.fetchLogs({ > **getStats**(`params?`): `Promise`\<`any`\> -Get application usage statistics. +Gets application usage statistics. Retrieves aggregated statistics about application usage, such as page views, active users, and popular features. Useful for dashboards and analytics. @@ -136,35 +155,41 @@ active users, and popular features. Useful for dashboards and analytics. ##### params? -`Record`\<`string`, `any`\> +[`GetStatsParams`](GetStatsParams.md) -Query parameters for filtering statistics (date ranges, grouping, etc.) +Query parameters for filtering and grouping statistics. #### Returns `Promise`\<`any`\> -Promise resolving to the statistics data +Promise resolving to the statistics data. -#### Example +#### Examples ```typescript // Get overall stats -const stats = await client.appLogs.getStats(); +const stats = await base44.appLogs.getStats(); +``` +```typescript // Get stats for a specific time period -const monthlyStats = await client.appLogs.getStats({ +const monthlyStats = await base44.appLogs.getStats({ startDate: '2024-01-01', endDate: '2024-01-31' }); +``` +```typescript // Get stats grouped by page -const pageStats = await client.appLogs.getStats({ +const pageStats = await base44.appLogs.getStats({ groupBy: 'page' }); +``` +```typescript // Get daily active users -const dailyStats = await client.appLogs.getStats({ +const dailyStats = await base44.appLogs.getStats({ period: 'daily', metric: 'active_users' }); diff --git a/docs/interfaces/AuthModule.md b/docs/interfaces/AuthModule.md index 0246eef..9012e94 100644 --- a/docs/interfaces/AuthModule.md +++ b/docs/interfaces/AuthModule.md @@ -18,7 +18,7 @@ This module provides comprehensive authentication functionality including: ```typescript // Login with email and password -const { access_token, user } = await client.auth.loginViaEmailPassword( +const { access_token, user } = await base44.auth.loginViaEmailPassword( 'user@example.com', 'password123' ); @@ -26,22 +26,22 @@ const { access_token, user } = await client.auth.loginViaEmailPassword( ```typescript // Check if user is authenticated -const isAuth = await client.auth.isAuthenticated(); +const isAuth = await base44.auth.isAuthenticated(); ``` ```typescript // Get current user profile -const currentUser = await client.auth.me(); +const currentUser = await base44.auth.me(); ``` ```typescript // Logout and reload page -client.auth.logout(); +base44.auth.logout(); ``` ```typescript // Logout and redirect to login page -client.auth.logout('/login'); +base44.auth.logout('/login'); ``` ## Methods @@ -61,7 +61,7 @@ Promise resolving to the user's profile data. #### Example ```typescript -const user = await client.auth.me(); +const user = await base44.auth.me(); console.log(`Logged in as: ${user.email}`); console.log(`User ID: ${user.id}`); ``` @@ -95,7 +95,7 @@ Promise resolving to the updated user data. ```typescript // Update specific fields -const updatedUser = await client.auth.updateMe({ +const updatedUser = await base44.auth.updateMe({ name: 'John Doe', avatar_url: 'https://example.com/avatar.jpg' }); @@ -104,7 +104,7 @@ console.log(`Updated user: ${updatedUser.name}`); ```typescript // Update custom fields defined in your User entity -await client.auth.updateMe({ +await base44.auth.updateMe({ bio: 'Software developer', phone: '+1234567890', preferences: { theme: 'dark' } @@ -141,12 +141,12 @@ When not in a browser environment. ```typescript // Redirect to login and come back to current page -client.auth.redirectToLogin(window.location.href); +base44.auth.redirectToLogin(window.location.href); ``` ```typescript // Redirect to login and then go to the dashboard page -client.auth.redirectToLogin('/dashboard'); +base44.auth.redirectToLogin('/dashboard'); ``` *** @@ -175,17 +175,17 @@ Optional URL to redirect to after logout. Reloads the page if not provided. ```typescript // Logout and reload page -client.auth.logout(); +base44.auth.logout(); ``` ```typescript // Logout and redirect to login page -client.auth.logout('/login'); +base44.auth.logout('/login'); ``` ```typescript // Logout and redirect to home -client.auth.logout('/'); +base44.auth.logout('/'); ``` *** @@ -220,12 +220,12 @@ Whether to save the token to local storage. Defaults to true. ```typescript // Set token and save to local storage -client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); +base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); ``` ```typescript // Set token without saving to local storage -client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); +base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); ``` *** @@ -272,7 +272,7 @@ Error if the email and password combination is invalid or the user is not regist ```typescript try { - const { access_token, user } = await client.auth.loginViaEmailPassword( + const { access_token, user } = await base44.auth.loginViaEmailPassword( 'user@example.com', 'securePassword123' ); @@ -284,7 +284,7 @@ try { ```typescript // With captcha token -const response = await client.auth.loginViaEmailPassword( +const response = await base44.auth.loginViaEmailPassword( 'user@example.com', 'securePassword123', 'captcha-token-here' @@ -308,12 +308,12 @@ Promise resolving to true if authenticated, false otherwise. #### Example ```typescript -const isAuthenticated = await client.auth.isAuthenticated(); +const isAuthenticated = await base44.auth.isAuthenticated(); if (isAuthenticated) { console.log('User is logged in'); } else { // Redirect to login page - client.auth.redirectToLogin(window.location.href); + base44.auth.redirectToLogin(window.location.href); } ``` @@ -353,7 +353,7 @@ Promise that resolves when the invitation is sent successfully. Throws an error ```typescript try { - await client.auth.inviteUser('newuser@example.com', 'editor'); + await base44.auth.inviteUser('newuser@example.com', 'editor'); console.log('Invitation sent successfully!'); } catch (error) { console.error('Failed to send invitation:', error); @@ -387,7 +387,7 @@ Promise resolving to the registration response. #### Example ```typescript -await client.auth.register({ +await base44.auth.register({ email: 'newuser@example.com', password: 'securePassword123', referral_code: 'FRIEND2024' @@ -428,7 +428,7 @@ Error if the OTP code is invalid, expired, or verification fails. ```typescript try { - await client.auth.verifyOtp({ + await base44.auth.verifyOtp({ email: 'user@example.com', otpCode: '123456' }); @@ -470,7 +470,7 @@ Error if the email is invalid or the request fails. ```typescript try { - await client.auth.resendOtp('user@example.com'); + await base44.auth.resendOtp('user@example.com'); console.log('OTP resent! Please check your email.'); } catch (error) { console.error('Failed to resend OTP:', error); @@ -509,7 +509,7 @@ Error if the email is invalid or the request fails. ```typescript try { - await client.auth.resetPasswordRequest('user@example.com'); + await base44.auth.resetPasswordRequest('user@example.com'); console.log('Password reset email sent!'); } catch (error) { console.error('Failed to send password reset email:', error); @@ -549,7 +549,7 @@ Error if the reset token is invalid, expired, or the request fails. ```typescript try { - await client.auth.resetPassword({ + await base44.auth.resetPassword({ resetToken: 'token-from-email', newPassword: 'newSecurePassword456' }); @@ -592,7 +592,7 @@ Error if the current password is incorrect or the request fails. ```typescript try { - await client.auth.changePassword({ + await base44.auth.changePassword({ userId: 'user-123', currentPassword: 'oldPassword123', newPassword: 'newSecurePassword456' diff --git a/docs/interfaces/Base44Client.md b/docs/interfaces/Base44Client.md index fb876d7..bdad400 100644 --- a/docs/interfaces/Base44Client.md +++ b/docs/interfaces/Base44Client.md @@ -15,17 +15,17 @@ It includes all SDK modules and utility methods for managing authentication and ### entities -> **entities**: [`EntitiesModule`](../type-aliases/EntitiesModule.md) +> **entities**: [`EntitiesModule`](EntitiesModule.md) -[Entities module](../type-aliases/EntitiesModule.md) for CRUD operations on your data models. +[Entities module](EntitiesModule.md) for CRUD operations on your data models. *** ### integrations -> **integrations**: [`IntegrationsModule`](../type-aliases/IntegrationsModule.md) +> **integrations**: [`IntegrationsModule`](IntegrationsModule.md) -[Integrations module](../type-aliases/IntegrationsModule.md) for calling pre-built integration endpoints. +[Integrations module](IntegrationsModule.md) for calling pre-built integration endpoints. *** @@ -85,15 +85,15 @@ role authentication has access to data and operations across all users. #### entities -> **entities**: [`EntitiesModule`](../type-aliases/EntitiesModule.md) +> **entities**: [`EntitiesModule`](EntitiesModule.md) -[Entities module](../type-aliases/EntitiesModule.md) with elevated permissions. +[Entities module](EntitiesModule.md) with elevated permissions. #### integrations -> **integrations**: [`IntegrationsModule`](../type-aliases/IntegrationsModule.md) +> **integrations**: [`IntegrationsModule`](IntegrationsModule.md) -[Integrations module](../type-aliases/IntegrationsModule.md) with elevated permissions. +[Integrations module](IntegrationsModule.md) with elevated permissions. #### sso diff --git a/docs/interfaces/ConnectorsModule.md b/docs/interfaces/ConnectorsModule.md index d0e18a6..4a31446 100644 --- a/docs/interfaces/ConnectorsModule.md +++ b/docs/interfaces/ConnectorsModule.md @@ -7,24 +7,22 @@ Connectors module for managing OAuth tokens for external services. This module allows you to retrieve OAuth access tokens for external services -that users have connected to your Base44 app. Use these tokens to make API -calls to external services on behalf of your users. +that your Base44 app has connected to. Use these tokens to make API +calls to external services. -**Important:** This module is only available with service role authentication. +Unlike the integrations module that provides pre-built functions, connectors give you +raw OAuth tokens so you can call external service APIs directly with full control over +the API calls you make. This is useful when you need custom API interactions that aren't +covered by Base44's pre-built integrations. -**Difference from SSO module:** -- **Connectors**: Retrieve OAuth tokens for external services (Google, Slack, etc.) - to call their APIs on behalf of users -- **SSO**: Generate tokens to authenticate your Base44 users with external systems +This module is only available with service role authentication. ## Example ```typescript -// Retrieve Google OAuth token for a user -const response = await client.asServiceRole.connectors.getAccessToken("google"); +// Retrieve Google OAuth token and use it to call Google APIs +const response = await base44.asServiceRole.connectors.getAccessToken('google'); const googleToken = response.access_token; - -// Use the token to call Google APIs const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { headers: { 'Authorization': `Bearer ${googleToken}` } }); @@ -36,11 +34,11 @@ const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/cal > **getAccessToken**(`integrationType`): `Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> -Retrieve an OAuth access token for a specific external integration type. +Retrieves an OAuth access token for a specific external integration type. -Returns the stored OAuth token for an external service that a user has -connected to your Base44 app. You can then use this token to make -authenticated API calls to that external service. +Returns the stored OAuth token for an external service that your Base44 app +has connected to. You can then use this token to make authenticated API calls +to that external service. #### Parameters @@ -48,26 +46,24 @@ authenticated API calls to that external service. `string` -The type of integration (e.g., "google", "slack", "github") +The type of integration, such as `'google'`, `'slack'`, or `'github'`. #### Returns `Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> -Promise resolving to the access token response - -#### Throws - -When integrationType is not provided or is not a string +Promise resolving to the access token response. -#### Example +#### Examples ```typescript // Get Google OAuth token -const response = await client.asServiceRole.connectors.getAccessToken("google"); +const response = await base44.asServiceRole.connectors.getAccessToken('google'); console.log(response.access_token); +``` +```typescript // Get Slack OAuth token -const slackResponse = await client.asServiceRole.connectors.getAccessToken("slack"); +const slackResponse = await base44.asServiceRole.connectors.getAccessToken('slack'); console.log(slackResponse.access_token); ``` diff --git a/docs/interfaces/EntitiesModule.md b/docs/interfaces/EntitiesModule.md new file mode 100644 index 0000000..ec7c479 --- /dev/null +++ b/docs/interfaces/EntitiesModule.md @@ -0,0 +1,86 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: EntitiesModule + +Entities module for managing application data. + +This module provides dynamic access to all entities in your Base44 app. +Each entity gets a handler with full CRUD operations and additional utility methods. + +Entities are accessed dynamically using the pattern: +`base44.entities.EntityName.method()` + +Methods in this module respect the authentication mode used when calling them: + +- **User authentication** (`base44.entities`): Operations are scoped to the currently + authenticated user's permissions. Access is limited to entities the user has permission to view or modify. + +- **Service role authentication** (`client.asServiceRole.entities`): Operations have + elevated permissions and can access entities across all users. This is useful for admin + operations or workflows that need to operate on data regardless of user permissions. + +## Examples + +```typescript +// List all records +const records = await base44.entities.MyEntity.list(); +``` + +```typescript +// Filter records by field +const activeRecords = await base44.entities.MyEntity.filter({ status: 'active' }); +``` + +```typescript +// Get specific record by ID +const record = await base44.entities.MyEntity.get('entity-123'); +``` + +```typescript +// Create new record +const newRecord = await base44.entities.MyEntity.create({ + name: 'My Item', + status: 'active' +}); +``` + +```typescript +// Update record +await base44.entities.MyEntity.update('entity-123', { status: 'completed' }); +``` + +```typescript +// Delete record +await base44.entities.MyEntity.delete('entity-123'); +``` + +```typescript +// Bulk operations +await base44.entities.MyEntity.bulkCreate([ + { name: 'Item 1' }, + { name: 'Item 2' } +]); +``` + +```typescript +// Delete many +await base44.entities.MyEntity.deleteMany({ status: 'completed' }); +``` + +## Indexable + +\[`entityName`: `string`\]: [`EntityHandler`](EntityHandler.md) + +Access any entity by name. + +Use this to access entities defined in your Base44 app. + +### Example + +```typescript +// Access entities dynamically +base44.entities.MyEntity +base44.entities.AnotherEntity +``` diff --git a/docs/interfaces/EntityHandler.md b/docs/interfaces/EntityHandler.md index c9a513b..f4387d2 100644 --- a/docs/interfaces/EntityHandler.md +++ b/docs/interfaces/EntityHandler.md @@ -6,8 +6,7 @@ Entity handler providing CRUD operations for a specific entity type. -Each entity in your Base44 app (like User, Todo, Product, etc.) gets -a handler with these methods for managing data. +Each entity in your Base44 app gets a handler with these methods for managing data. ## Methods @@ -15,9 +14,9 @@ a handler with these methods for managing data. > **list**(`sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> -List entities with optional pagination and sorting. +Lists records with optional pagination and sorting. -Retrieves all entities of this type with support for sorting, +Retrieves all records of this type with support for sorting, pagination, and field selection. #### Parameters @@ -26,46 +25,52 @@ pagination, and field selection. `string` -Sort parameter (e.g., "-created_date" for descending) +Sort parameter, such as `'-created_date'` for descending. ##### limit? `number` -Maximum number of results to return +Maximum number of results to return. ##### skip? `number` -Number of results to skip (for pagination) +Number of results to skip for pagination. ##### fields? `string`[] -Array of field names to include in the response +Array of field names to include in the response. #### Returns `Promise`\<`any`\> -Promise resolving to an array of entities +Promise resolving to an array of records. -#### Example +#### Examples ```typescript -// Get all todos -const todos = await client.entities.Todo.list(); +// Get all records +const records = await base44.entities.MyEntity.list(); +``` -// Get first 10 todos sorted by date -const recentTodos = await client.entities.Todo.list('-created_date', 10); +```typescript +// Get first 10 records sorted by date +const recentRecords = await base44.entities.MyEntity.list('-created_date', 10); +``` -// Get paginated results (skip first 20, get next 10) -const page3 = await client.entities.Todo.list(null, 10, 20); +```typescript +// Get paginated results: skip first 20, get next 10 +const page3 = await base44.entities.MyEntity.list('-created_date', 10, 20); +``` +```typescript // Get only specific fields -const titles = await client.entities.Todo.list(null, null, null, ['title', 'completed']); +const fields = await base44.entities.MyEntity.list('-created_date', 10, 0, ['name', 'status']); ``` *** @@ -74,9 +79,9 @@ const titles = await client.entities.Todo.list(null, null, null, ['title', 'comp > **filter**(`query`, `sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> -Filter entities based on a query. +Filters records based on a query. -Retrieves entities that match specific criteria with support for +Retrieves records that match specific criteria with support for sorting, pagination, and field selection. #### Parameters @@ -85,67 +90,76 @@ sorting, pagination, and field selection. `Record`\<`string`, `any`\> -Filter query object with field-value pairs +Filter query object with field-value pairs. Each key should be a field name +from your entity schema, and each value is the criteria to match. Records matching ALL +specified criteria are returned (AND logic). Field names are case-sensitive and must match +your entity schema definition. ##### sort? `string` -Sort parameter (e.g., "-created_date" for descending) +Sort parameter, such as `'-created_date'` for descending. ##### limit? `number` -Maximum number of results to return +Maximum number of results to return. ##### skip? `number` -Number of results to skip (for pagination) +Number of results to skip for pagination. ##### fields? `string`[] -Array of field names to include in the response +Array of field names to include in the response. #### Returns `Promise`\<`any`\> -Promise resolving to an array of filtered entities +Promise resolving to an array of filtered records. -#### Example +#### Examples ```typescript // Filter by single field -const completedTodos = await client.entities.Todo.filter({ - completed: true +const activeRecords = await base44.entities.MyEntity.filter({ + status: 'active' }); +``` +```typescript // Filter by multiple fields -const highPriorityTodos = await client.entities.Todo.filter({ +const filteredRecords = await base44.entities.MyEntity.filter({ priority: 'high', - completed: false + status: 'active' }); +``` +```typescript // Filter with sorting and pagination -const results = await client.entities.Todo.filter( +const results = await base44.entities.MyEntity.filter( { status: 'active' }, '-created_date', 20, 0 ); +``` +```typescript // Filter with specific fields -const titles = await client.entities.Todo.filter( +const fields = await base44.entities.MyEntity.filter( { priority: 'high' }, - null, - null, - null, - ['title', 'priority'] + '-created_date', + 10, + 0, + ['name', 'priority'] ); ``` @@ -155,9 +169,9 @@ const titles = await client.entities.Todo.filter( > **get**(`id`): `Promise`\<`any`\> -Get a single entity by ID. +Gets a single record by ID. -Retrieves a specific entity using its unique identifier. +Retrieves a specific record using its unique identifier. #### Parameters @@ -165,22 +179,19 @@ Retrieves a specific entity using its unique identifier. `string` -The unique identifier of the entity +The unique identifier of the record. #### Returns `Promise`\<`any`\> -Promise resolving to the entity +Promise resolving to the record. #### Example ```typescript -const todo = await client.entities.Todo.get('todo-123'); -console.log(todo.title); - -const user = await client.entities.User.get('user-456'); -console.log(user.email); +const record = await base44.entities.MyEntity.get('entity-123'); +console.log(record.name); ``` *** @@ -189,9 +200,9 @@ console.log(user.email); > **create**(`data`): `Promise`\<`any`\> -Create a new entity. +Creates a new record. -Creates a new entity with the provided data. +Creates a new record with the provided data. #### Parameters @@ -199,29 +210,23 @@ Creates a new entity with the provided data. `Record`\<`string`, `any`\> -Object containing the entity data +Object containing the record data. #### Returns `Promise`\<`any`\> -Promise resolving to the created entity +Promise resolving to the created record. #### Example ```typescript -const newTodo = await client.entities.Todo.create({ - title: 'Buy groceries', - completed: false, +const newRecord = await base44.entities.MyEntity.create({ + name: 'My Item', + status: 'active', priority: 'high' }); -console.log('Created todo with ID:', newTodo.id); - -const newUser = await client.entities.User.create({ - name: 'John Doe', - email: 'john@example.com', - role: 'user' -}); +console.log('Created record with ID:', newRecord.id); ``` *** @@ -230,9 +235,9 @@ const newUser = await client.entities.User.create({ > **update**(`id`, `data`): `Promise`\<`any`\> -Update an existing entity. +Updates an existing record. -Updates an entity by ID with the provided data. Only the fields +Updates a record by ID with the provided data. Only the fields included in the data object will be updated. #### Parameters @@ -241,33 +246,35 @@ included in the data object will be updated. `string` -The unique identifier of the entity to update +The unique identifier of the record to update. ##### data `Record`\<`string`, `any`\> -Object containing the fields to update +Object containing the fields to update. #### Returns `Promise`\<`any`\> -Promise resolving to the updated entity +Promise resolving to the updated record. -#### Example +#### Examples ```typescript // Update single field -const updated = await client.entities.Todo.update('todo-123', { - completed: true +const updated = await base44.entities.MyEntity.update('entity-123', { + status: 'completed' }); +``` +```typescript // Update multiple fields -const updated = await client.entities.Todo.update('todo-123', { - title: 'Updated title', +const updated = await base44.entities.MyEntity.update('entity-123', { + name: 'Updated name', priority: 'low', - completed: true + status: 'active' }); ``` @@ -277,9 +284,9 @@ const updated = await client.entities.Todo.update('todo-123', { > **delete**(`id`): `Promise`\<`void`\> -Delete a single entity by ID. +Deletes a single record by ID. -Permanently removes an entity from the database. +Permanently removes a record from the database. #### Parameters @@ -287,21 +294,19 @@ Permanently removes an entity from the database. `string` -The unique identifier of the entity to delete +The unique identifier of the record to delete. #### Returns `Promise`\<`void`\> -Promise that resolves when the entity is deleted +Promise that resolves when the record is deleted. #### Example ```typescript -await client.entities.Todo.delete('todo-123'); -console.log('Todo deleted'); - -await client.entities.User.delete('user-456'); +await base44.entities.MyEntity.delete('entity-123'); +console.log('Record deleted'); ``` *** @@ -310,9 +315,9 @@ await client.entities.User.delete('user-456'); > **deleteMany**(`query`): `Promise`\<`void`\> -Delete multiple entities matching a query. +Deletes multiple records matching a query. -Permanently removes all entities that match the provided query. +Permanently removes all records that match the provided query. Use with caution as this operation cannot be undone. #### Parameters @@ -321,30 +326,34 @@ Use with caution as this operation cannot be undone. `Record`\<`string`, `any`\> -Filter query object to match entities for deletion +Filter query object to match records for deletion. #### Returns `Promise`\<`void`\> -Promise that resolves when the entities are deleted +Promise that resolves when the records are deleted. -#### Example +#### Examples ```typescript -// Delete all completed todos -await client.entities.Todo.deleteMany({ - completed: true +// Delete all completed records +await base44.entities.MyEntity.deleteMany({ + status: 'completed' }); +``` +```typescript // Delete all low priority items -await client.entities.Todo.deleteMany({ +await base44.entities.MyEntity.deleteMany({ priority: 'low' }); +``` +```typescript // Delete by multiple criteria -await client.entities.Todo.deleteMany({ - completed: true, +await base44.entities.MyEntity.deleteMany({ + status: 'completed', priority: 'low' }); ``` @@ -355,9 +364,9 @@ await client.entities.Todo.deleteMany({ > **bulkCreate**(`data`): `Promise`\<`any`\> -Create multiple entities in a single request. +Creates multiple records in a single request. -Efficiently creates multiple entities at once. This is faster +Efficiently creates multiple records at once. This is faster than creating them individually. #### Parameters @@ -366,28 +375,23 @@ than creating them individually. `Record`\<`string`, `any`\>[] -Array of entity data objects +Array of record data objects. #### Returns `Promise`\<`any`\> -Promise resolving to an array of created entities +Promise resolving to an array of created records. #### Example ```typescript -const newTodos = await client.entities.Todo.bulkCreate([ - { title: 'Task 1', completed: false }, - { title: 'Task 2', completed: false }, - { title: 'Task 3', completed: true } -]); -console.log(`Created ${newTodos.length} todos`); - -const newUsers = await client.entities.User.bulkCreate([ - { name: 'Alice', email: 'alice@example.com' }, - { name: 'Bob', email: 'bob@example.com' } +const newRecords = await base44.entities.MyEntity.bulkCreate([ + { name: 'Item 1', status: 'active' }, + { name: 'Item 2', status: 'active' }, + { name: 'Item 3', status: 'completed' } ]); +console.log(`Created ${newRecords.length} records`); ``` *** @@ -396,9 +400,9 @@ const newUsers = await client.entities.User.bulkCreate([ > **importEntities**(`file`): `Promise`\<`any`\> -Import entities from a file. +Imports records from a file. -Imports entities from a file (typically CSV or similar format). +Imports records from a file, typically CSV or similar format. The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. #### Parameters @@ -407,13 +411,13 @@ The file format should match your entity structure. Requires a browser environme `File` -File object to import +File object to import. #### Returns `Promise`\<`any`\> -Promise resolving to the import result +Promise resolving to the import result. #### Example @@ -422,6 +426,6 @@ Promise resolving to the import result const fileInput = document.querySelector('input[type="file"]'); const file = fileInput.files[0]; -const result = await client.entities.Todo.importEntities(file); -console.log(`Imported ${result.count} todos`); +const result = await base44.entities.MyEntity.importEntities(file); +console.log(`Imported ${result.count} records`); ``` diff --git a/docs/interfaces/FetchLogsParams.md b/docs/interfaces/FetchLogsParams.md new file mode 100644 index 0000000..00bdfa0 --- /dev/null +++ b/docs/interfaces/FetchLogsParams.md @@ -0,0 +1,61 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: FetchLogsParams + +Parameters for fetching app logs. + +## Indexable + +\[`key`: `string`\]: `any` + +Additional filter parameters. + +## Properties + +### limit? + +> `optional` **limit**: `number` + +Maximum number of logs to return. + +*** + +### skip? + +> `optional` **skip**: `number` + +Number of logs to skip for pagination. + +*** + +### sort? + +> `optional` **sort**: `string` + +Sort order, such as `'-timestamp'` for descending by timestamp. + +*** + +### pageName? + +> `optional` **pageName**: `string` + +Filter logs by page name. + +*** + +### startDate? + +> `optional` **startDate**: `string` + +Filter logs from this date as an ISO string. + +*** + +### endDate? + +> `optional` **endDate**: `string` + +Filter logs until this date as an ISO string. diff --git a/docs/interfaces/FunctionsModule.md b/docs/interfaces/FunctionsModule.md index 26ea51a..5ea2684 100644 --- a/docs/interfaces/FunctionsModule.md +++ b/docs/interfaces/FunctionsModule.md @@ -6,29 +6,28 @@ Functions module for invoking custom backend functions. -This module allows you to invoke custom backend functions that you've -deployed to your Base44 app. Functions can accept parameters and return -results, and support file uploads. +This module allows you to invoke the custom backend functions in your Base44 app. -Functions can be invoked with either user authentication or service role -authentication depending on your use case. +Methods in this module respect the authentication mode used when calling them: -## Example +- **User authentication** (`base44.functions`): Functions are invoked with the currently + authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. + +- **Service role authentication** (`client.asServiceRole.functions`): Functions are invoked + with elevated permissions. The function code receives a request with the service role authentication context and can access data across all users. + +## Examples ```typescript // Invoke a function with parameters -const result = await client.functions.invoke('calculateTotal', { +const result = await base44.functions.invoke('calculateTotal', { items: ['item1', 'item2'], discount: 0.1 }); console.log(result.data); +``` -// Invoke a function with file upload -const fileResult = await client.functions.invoke('processImage', { - image: fileInput.files[0], - filter: 'grayscale' -}); - +```typescript // Invoke with service role const adminResult = await client.asServiceRole.functions.invoke('adminTask', { action: 'cleanup' @@ -41,14 +40,11 @@ const adminResult = await client.asServiceRole.functions.invoke('adminTask', { > **invoke**(`functionName`, `data`): `Promise`\<`any`\> -Invoke a custom backend function by name. +Invokes a custom backend function by name. Calls a custom backend function that you've deployed to your Base44 app. The function receives the provided data as named parameters and returns -the result. - -**File Upload Support:** -If any parameter is a `File` object, the request will automatically be +the result. If any parameter is a `File` object, the request will automatically be sent as `multipart/form-data`. Otherwise, it will be sent as JSON. #### Parameters @@ -57,43 +53,41 @@ sent as `multipart/form-data`. Otherwise, it will be sent as JSON. `string` -The name of the function to invoke +The name of the function to invoke. ##### data `Record`\<`string`, `any`\> -An object containing named parameters for the function +An object containing named parameters for the function. #### Returns `Promise`\<`any`\> -Promise resolving to the function's response +Promise resolving to the function's response. -#### Throws - -When data is a string instead of an object - -#### Example +#### Examples ```typescript // Basic function call -const result = await client.functions.invoke('calculateTotal', { +const result = await base44.functions.invoke('calculateTotal', { items: ['item1', 'item2'], discount: 0.1 }); console.log(result.data.total); +``` -// Function with file upload -const imageFile = document.querySelector('input[type="file"]').files[0]; -const processedImage = await client.functions.invoke('processImage', { - image: imageFile, - filter: 'grayscale', - quality: 80 -}); - -// Health check function -const health = await client.functions.invoke('healthCheck', {}); -console.log(health.data.status); +```typescript +// Function with file upload in React +const handleFileUpload = async (event: React.ChangeEvent) => { + const file = event.target.files?.[0]; + if (file) { + const processedImage = await base44.functions.invoke('processImage', { + image: file, + filter: 'grayscale', + quality: 80 + }); + } +}; ``` diff --git a/docs/interfaces/GetStatsParams.md b/docs/interfaces/GetStatsParams.md new file mode 100644 index 0000000..48813c9 --- /dev/null +++ b/docs/interfaces/GetStatsParams.md @@ -0,0 +1,53 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: GetStatsParams + +Parameters for fetching app statistics. + +## Indexable + +\[`key`: `string`\]: `any` + +Additional query parameters. + +## Properties + +### startDate? + +> `optional` **startDate**: `string` + +Filter stats from this date as an ISO string. + +*** + +### endDate? + +> `optional` **endDate**: `string` + +Filter stats until this date as an ISO string. + +*** + +### groupBy? + +> `optional` **groupBy**: `string` + +Group statistics by a specific field, such as `'page'`. + +*** + +### period? + +> `optional` **period**: `string` + +Time period for grouping, such as `'daily'`, `'weekly'`, or `'monthly'`. + +*** + +### metric? + +> `optional` **metric**: `string` + +Specific metric to retrieve, such as `'active_users'` or `'page_views'`. diff --git a/docs/interfaces/IntegrationsModule.md b/docs/interfaces/IntegrationsModule.md new file mode 100644 index 0000000..b53e753 --- /dev/null +++ b/docs/interfaces/IntegrationsModule.md @@ -0,0 +1,110 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: IntegrationsModule + +Integrations module for calling integration endpoints. + +This module provides access to integration endpoints for interacting with external +services. Integrations are organized into packages. Base44 provides built-in integrations +in the "Core" package, and you can install additional integration packages for other services. + +Unlike the connectors module that gives you raw OAuth tokens, integrations provide +pre-built functions that Base44 executes on your behalf. + +Integration endpoints are accessed dynamically using the pattern: +`base44.integrations.PackageName.EndpointName(params)` + +Methods in this module respect the authentication mode used when calling them: + +- **User authentication** (`base44.integrations`): Integration endpoints are invoked with the + currently authenticated user's permissions. The endpoints execute with the user's authentication + context and can only access data the user has permission to access. + +- **Service role authentication** (`client.asServiceRole.integrations`): Integration endpoints + are invoked with elevated permissions. The endpoints execute with service role authentication + and can access data across all users. This is useful for admin operations or workflows that + need to operate regardless of user permissions. + +## Examples + +```typescript +// Send email using Core package +const emailResult = await base44.integrations.Core.SendEmail({ + to: 'user@example.com', + subject: 'Hello from Base44', + body: 'This is a test email' +}); +``` + +```typescript +// Upload file using Core package in React +const handleFileUpload = async (event: React.ChangeEvent) => { + const file = event.target.files?.[0]; + if (file) { + const uploadResult = await base44.integrations.Core.UploadFile({ + file: file, + metadata: { type: 'profile-picture' } + }); + } +}; +``` + +```typescript +// Use custom integration package +const result = await base44.integrations.CustomPackage.CustomEndpoint({ + param1: 'value1', + param2: 'value2' +}); +``` + +```typescript +// Use with service role +const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ + to: 'admin@example.com', + subject: 'Admin notification', + body: 'System alert' +}); +``` + +## Indexable + +\[`packageName`: `string`\]: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) + +Access to any custom or installable integration package. + +Use this to call endpoints from custom integration packages +you've installed in your Base44 app. + +### Example + +```typescript +// Access custom package dynamically +await base44.integrations.Slack.PostMessage({ + channel: '#general', + text: 'Hello from Base44' +}); +``` + +## Properties + +### Core + +> **Core**: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) + +Core package containing built-in Base44 integration endpoints. + +Common endpoints include: +- `SendEmail` - Send emails +- `UploadFile` - Upload files + +#### Example + +```typescript +await base44.integrations.Core.SendEmail({ + to: 'user@example.com', + subject: 'Welcome', + body: 'Welcome to our app!' +}); +``` diff --git a/docs/interfaces/SsoModule.md b/docs/interfaces/SsoModule.md index 6934db7..e01d2d2 100644 --- a/docs/interfaces/SsoModule.md +++ b/docs/interfaces/SsoModule.md @@ -7,14 +7,16 @@ SSO (Single Sign-On) module for managing SSO authentication. This module provides methods for retrieving SSO access tokens for users. +These tokens allow you to authenticate your Base44 users with external +systems or services. -TODO: Add link to service role documentation once created +This module is only available with service role authentication. ## Example ```typescript // Access SSO module with service role -const response = await client.asServiceRole.sso.getAccessToken("user_123"); +const response = await base44.asServiceRole.sso.getAccessToken('user_123'); console.log(response.data.access_token); ``` @@ -24,7 +26,7 @@ console.log(response.data.access_token); > **getAccessToken**(`userid`): `Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> -Get SSO access token for a specific user. +Gets SSO access token for a specific user. Retrieves a Single Sign-On access token that can be used to authenticate a user with external services or systems. @@ -35,18 +37,18 @@ a user with external services or systems. `string` -The user ID to get the access token for +The user ID to get the access token for. #### Returns `Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> -Promise resolving to an Axios response containing the access token +Promise resolving to an Axios response containing the access token. #### Example ```typescript // Get SSO access token for a user -const response = await client.asServiceRole.sso.getAccessToken("user_123"); +const response = await base44.asServiceRole.sso.getAccessToken('user_123'); console.log(response.data.access_token); ``` diff --git a/docs/type-aliases/ConnectorIntegrationType.md b/docs/type-aliases/ConnectorIntegrationType.md index c52d942..e7bc906 100644 --- a/docs/type-aliases/ConnectorIntegrationType.md +++ b/docs/type-aliases/ConnectorIntegrationType.md @@ -6,4 +6,4 @@ > **ConnectorIntegrationType** = `string` -The type of external integration/connector (e.g., "google", "slack", "github"). +The type of external integration/connector, such as `'google'`, `'slack'`, or `'github'`. diff --git a/docs/type-aliases/EntitiesModule.md b/docs/type-aliases/EntitiesModule.md deleted file mode 100644 index 2ec31cb..0000000 --- a/docs/type-aliases/EntitiesModule.md +++ /dev/null @@ -1,75 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Type Alias: EntitiesModule - -> **EntitiesModule** = `object` - -Entities module for managing application data. - -This module provides dynamic access to all entities in your Base44 app. -Each entity (like User, Todo, Product, etc.) gets a handler with full -CRUD operations and additional utility methods. - -**Dynamic Access:** -Entities are accessed dynamically using: `client.entities.EntityName.method()` - -**Available with both auth modes:** -- User auth: `client.entities.EntityName.method(...)` -- Service role: `client.asServiceRole.entities.EntityName.method(...)` - -## Index Signature - -\[`entityName`: `string`\]: [`EntityHandler`](../interfaces/EntityHandler.md) - -Access any entity by name. - -Use this to access custom entities defined in your Base44 app. - -### Example - -```typescript -// Built-in entities -client.entities.User -client.entities.Todo - -// Custom entities -client.entities.Product -client.entities.Order -client.entities.Invoice -``` - -## Example - -```typescript -// List all todos -const todos = await client.entities.Todo.list(); - -// Filter users by role -const admins = await client.entities.User.filter({ role: 'admin' }); - -// Get specific product -const product = await client.entities.Product.get('prod-123'); - -// Create new todo -const newTodo = await client.entities.Todo.create({ - title: 'Buy groceries', - completed: false -}); - -// Update entity -await client.entities.Todo.update('todo-123', { completed: true }); - -// Delete entity -await client.entities.Todo.delete('todo-123'); - -// Bulk operations -await client.entities.Todo.bulkCreate([ - { title: 'Task 1' }, - { title: 'Task 2' } -]); - -// Delete many -await client.entities.Todo.deleteMany({ completed: true }); -``` diff --git a/docs/type-aliases/IntegrationEndpointFunction.md b/docs/type-aliases/IntegrationEndpointFunction.md index 54dcf43..42c97fd 100644 --- a/docs/type-aliases/IntegrationEndpointFunction.md +++ b/docs/type-aliases/IntegrationEndpointFunction.md @@ -8,16 +8,19 @@ Function signature for calling an integration endpoint. +If any parameter is a `File` object, the request will automatically be +sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + ## Parameters ### data `Record`\<`string`, `any`\> -An object containing named parameters for the integration endpoint +An object containing named parameters for the integration endpoint. ## Returns `Promise`\<`any`\> -Promise resolving to the integration endpoint's response +Promise resolving to the integration endpoint's response. diff --git a/docs/type-aliases/IntegrationsModule.md b/docs/type-aliases/IntegrationsModule.md deleted file mode 100644 index 7241ba4..0000000 --- a/docs/type-aliases/IntegrationsModule.md +++ /dev/null @@ -1,100 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Type Alias: IntegrationsModule - -> **IntegrationsModule** = `object` - -Integrations module for calling pre-built integration endpoints. - -This module provides access to integration endpoints that Base44 provides -for interacting with external services. Integrations are organized into -packages, with the most common being the "Core" package. - -Unlike the connectors module (which gives you raw OAuth tokens), integrations -provide pre-built functions that Base44 executes on your behalf. - -**Dynamic Access:** -Integration endpoints are accessed dynamically using the pattern: -`client.integrations.PackageName.EndpointName(params)` - -**File Upload Support:** -If any parameter is a `File` object, the request will automatically be -sent as `multipart/form-data`. Otherwise, it will be sent as JSON. - -**Available with both auth modes:** -- User auth: `client.integrations.PackageName.EndpointName(...)` -- Service role: `client.asServiceRole.integrations.PackageName.EndpointName(...)` - -## Example - -```typescript -// Send email using Core package -const emailResult = await client.integrations.Core.SendEmail({ - to: 'user@example.com', - subject: 'Hello from Base44', - body: 'This is a test email' -}); - -// Upload file using Core package -const fileInput = document.querySelector('input[type="file"]'); -const uploadResult = await client.integrations.Core.UploadFile({ - file: fileInput.files[0], - metadata: { type: 'profile-picture' } -}); - -// Use custom integration package -const result = await client.integrations.CustomPackage.CustomEndpoint({ - param1: 'value1', - param2: 'value2' -}); - -// Use with service role -const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ - to: 'admin@example.com', - subject: 'Admin notification', - body: 'System alert' -}); -``` - -## Indexable - -\[`packageName`: `string`\]: [`IntegrationPackage`](IntegrationPackage.md) - -Access to any custom or installable integration package. - -Use this to call endpoints from custom integration packages -you've installed in your Base44 app. - -### Example - -```typescript -// Access custom package dynamically -await client.integrations.Slack.PostMessage({ - channel: '#general', - text: 'Hello from Base44' -}); -``` - -## Properties - -### Core - -> **Core**: [`IntegrationPackage`](IntegrationPackage.md) - -Core package containing built-in Base44 integration endpoints. - -Common endpoints include: -- `SendEmail` - Send emails -- `UploadFile` - Upload files - -#### Example - -```typescript -await client.integrations.Core.SendEmail({ - to: 'user@example.com', - subject: 'Welcome', - body: 'Welcome to our app!' -}); -``` diff --git a/docs/type-aliases/ModelFilterParams.md b/docs/type-aliases/ModelFilterParams.md index c3688dd..298e878 100644 --- a/docs/type-aliases/ModelFilterParams.md +++ b/docs/type-aliases/ModelFilterParams.md @@ -14,14 +14,14 @@ Used in the agents module for querying agent conversations. Provides a structure ```typescript // Filter conversations by agent name -const conversations = await client.agents.listConversations({ +const conversations = await base44.agents.listConversations({ q: { agent_name: 'support-bot' } }); ``` ```typescript // Filter conversations with sorting -const conversations = await client.agents.listConversations({ +const conversations = await base44.agents.listConversations({ q: { status: 'active' }, sort: '-created_at' // Sort by created_at descending }); @@ -29,7 +29,7 @@ const conversations = await client.agents.listConversations({ ```typescript // Filter conversations with pagination -const conversations = await client.agents.listConversations({ +const conversations = await base44.agents.listConversations({ q: { agent_name: 'support-bot' }, limit: 20, // Get 20 results skip: 40 // Skip first 40 (page 3) @@ -38,7 +38,7 @@ const conversations = await client.agents.listConversations({ ```typescript // Filter conversations with field selection -const conversations = await client.agents.listConversations({ +const conversations = await base44.agents.listConversations({ q: { status: 'active' }, fields: ['id', 'agent_name', 'created_at'] }); @@ -46,7 +46,7 @@ const conversations = await client.agents.listConversations({ ```typescript // Filter conversations with multiple filters -const conversations = await client.agents.listConversations({ +const conversations = await base44.agents.listConversations({ q: { agent_name: 'support-bot', 'metadata.priority': 'high', diff --git a/src/client.ts b/src/client.ts index 68d7beb..a3ec7f4 100644 --- a/src/client.ts +++ b/src/client.ts @@ -24,8 +24,8 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@link EntitiesModule | entities}, {@link AuthModule | auth}, and {@link FunctionsModule | functions}. * * The client supports two authentication modes: - * - **User authentication** (default): Access modules with user-level permissions using `client.moduleName`. - * - **Service role authentication**: Access modules with elevated permissions using `client.asServiceRole.moduleName`. + * - **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. + * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. * * Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. * @@ -43,33 +43,33 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * // Basic client setup * import { createClient } from '@base44/client-sdk'; * - * const client = createClient({ + * const base44 = createClient({ * appId: 'my-app-id' * }); * * // Use client modules - * const products = await client.entities.Products.list(); - * const user = await client.auth.me(); + * const products = await base44.entities.Products.list(); + * const user = await base44.auth.me(); * ``` * * @example * ```typescript * // Client with service role access - * const client = createClient({ + * const base44 = createClient({ * appId: 'my-app-id', * token: 'user-token', * serviceToken: 'service-role-token' * }); * * // Access service-role-only modules - * const ssoToken = await client.asServiceRole.sso.getAccessToken('user-123'); - * const oauthToken = await client.asServiceRole.connectors.getAccessToken('google'); + * const ssoToken = await base44.asServiceRole.sso.getAccessToken('user-123'); + * const oauthToken = await base44.asServiceRole.connectors.getAccessToken('google'); * ``` * * @example * ```typescript * // Client with error handling - * const client = createClient({ + * const base44 = createClient({ * appId: 'my-app-id', * options: { * onError: (error) => { @@ -223,11 +223,11 @@ export function createClient(config: CreateClientConfig): Base44Client { * @example * ```typescript * // Update token after login - * const { access_token } = await client.auth.loginViaEmailPassword( + * const { access_token } = await base44.auth.loginViaEmailPassword( * 'user@example.com', * 'password' * ); - * client.setToken(access_token); + * base44.setToken(access_token); * ``` */ setToken(newToken: string) { @@ -259,13 +259,13 @@ export function createClient(config: CreateClientConfig): Base44Client { * * @example * ```typescript - * const client = createClient({ + * const base44 = createClient({ * appId: 'my-app-id', * serviceToken: 'service-role-token' * }); * * // Also access a module with elevated permissions - * const allUsers = await client.asServiceRole.entities.User.list(); + * const allUsers = await base44.asServiceRole.entities.User.list(); * ``` */ get asServiceRole() { @@ -295,7 +295,7 @@ export function createClient(config: CreateClientConfig): Base44Client { * @example * ```typescript * // Frontend call to a backend function - * const response = await client.functions.invoke('myBackendFunction', {}); + * const response = await base44.functions.invoke('myBackendFunction', {}); * * // Backend function that receives the call * import { createClientFromRequest } from '@base44/client-sdk'; diff --git a/src/index.ts b/src/index.ts index 8c9cdc4..3e50fd7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -67,7 +67,11 @@ export type { AgentMessageMetadata, } from "./modules/agents.types.js"; -export type { AppLogsModule } from "./modules/app-logs.types.js"; +export type { + AppLogsModule, + FetchLogsParams, + GetStatsParams, +} from "./modules/app-logs.types.js"; export type { SsoModule, SsoAccessTokenResponse } from "./modules/sso.types.js"; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 21e9294..3d20679 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -146,14 +146,15 @@ export type AgentsModuleConfig = { * send messages, and subscribe to real-time updates. Conversations can be used * for chat interfaces, support systems, or any interactive AI application. * - * **Authentication modes:** - * - **User authentication** (`client.agents`): Access only conversations created by the authenticated user. + * Methods in this module respect the authentication mode used when calling them: + * + * - **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. * - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. * * @example * ```typescript * // Create a new conversation - * const conversation = await client.agents.createConversation({ + * const conversation = await base44.agents.createConversation({ * agent_name: 'support-agent', * metadata: { * ticket_id: 'SUPP-1234', @@ -166,7 +167,7 @@ export type AgentsModuleConfig = { * @example * ```typescript * // Send a message - * await client.agents.addMessage(conversation, { + * await base44.agents.addMessage(conversation, { * role: 'user', * content: 'Hello, I need help!' * }); @@ -175,7 +176,7 @@ export type AgentsModuleConfig = { * @example * ```typescript * // Subscribe to real-time updates - * const unsubscribe = client.agents.subscribeToConversation( + * const unsubscribe = base44.agents.subscribeToConversation( * conversation.id, * (updatedConversation) => { * console.log('New messages:', updatedConversation.messages); @@ -195,7 +196,7 @@ export interface AgentsModule { * * @example * ```typescript - * const conversations = await client.agents.getConversations(); + * const conversations = await base44.agents.getConversations(); * console.log(`Total conversations: ${conversations.length}`); * ``` */ @@ -209,7 +210,7 @@ export interface AgentsModule { * * @example * ```typescript - * const conversation = await client.agents.getConversation('conv-123'); + * const conversation = await base44.agents.getConversation('conv-123'); * if (conversation) { * console.log(`Conversation has ${conversation.messages.length} messages`); * } @@ -227,7 +228,7 @@ export interface AgentsModule { * * @example * ```typescript - * const recentConversations = await client.agents.listConversations({ + * const recentConversations = await base44.agents.listConversations({ * limit: 10, * sort: '-created_date' * }); @@ -245,7 +246,7 @@ export interface AgentsModule { * * @example * ```typescript - * const conversation = await client.agents.createConversation({ + * const conversation = await base44.agents.createConversation({ * agent_name: 'support-agent', * metadata: { * order_id: 'ORD-789', @@ -273,7 +274,7 @@ export interface AgentsModule { * * @example * ```typescript - * const message = await client.agents.addMessage(conversation, { + * const message = await base44.agents.addMessage(conversation, { * role: 'user', * content: 'Hello, I need help with my order #12345' * }); @@ -298,7 +299,7 @@ export interface AgentsModule { * * @example * ```typescript - * const unsubscribe = client.agents.subscribeToConversation( + * const unsubscribe = base44.agents.subscribeToConversation( * 'conv-123', * (updatedConversation) => { * const latestMessage = updatedConversation.messages[updatedConversation.messages.length - 1]; @@ -326,7 +327,7 @@ export interface AgentsModule { * * @example * ```typescript - * const whatsappUrl = client.agents.getWhatsAppConnectURL('support-agent'); + * const whatsappUrl = base44.agents.getWhatsAppConnectURL('support-agent'); * console.log(`Connect through WhatsApp: ${whatsappUrl}`); * // User can open this URL to start a WhatsApp conversation * ``` diff --git a/src/modules/app-logs.ts b/src/modules/app-logs.ts index ec072f8..63163db 100644 --- a/src/modules/app-logs.ts +++ b/src/modules/app-logs.ts @@ -1,5 +1,9 @@ import { AxiosInstance } from "axios"; -import { AppLogsModule } from "./app-logs.types"; +import { + AppLogsModule, + FetchLogsParams, + GetStatsParams, +} from "./app-logs.types"; /** * Creates the app logs module for the Base44 SDK. @@ -22,13 +26,13 @@ export function createAppLogsModule( }, // Fetch app logs with optional parameters - async fetchLogs(params: Record = {}): Promise { + async fetchLogs(params: FetchLogsParams = {}): Promise { const response = await axios.get(baseURL, { params }); return response; }, // Get app statistics - async getStats(params: Record = {}): Promise { + async getStats(params: GetStatsParams = {}): Promise { const response = await axios.get(`${baseURL}/stats`, { params }); return response; }, diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts index cb03ff0..12bfa49 100644 --- a/src/modules/app-logs.types.ts +++ b/src/modules/app-logs.types.ts @@ -1,3 +1,41 @@ +/** + * Parameters for fetching app logs. + */ +export interface FetchLogsParams { + /** Maximum number of logs to return. */ + limit?: number; + /** Number of logs to skip for pagination. */ + skip?: number; + /** Sort order, such as `'-timestamp'` for descending by timestamp. */ + sort?: string; + /** Filter logs by page name. */ + pageName?: string; + /** Filter logs from this date as an ISO string. */ + startDate?: string; + /** Filter logs until this date as an ISO string. */ + endDate?: string; + /** Additional filter parameters. */ + [key: string]: any; +} + +/** + * Parameters for fetching app statistics. + */ +export interface GetStatsParams { + /** Filter stats from this date as an ISO string. */ + startDate?: string; + /** Filter stats until this date as an ISO string. */ + endDate?: string; + /** Group statistics by a specific field, such as `'page'`. */ + groupBy?: string; + /** Time period for grouping, such as `'daily'`, `'weekly'`, or `'monthly'`. */ + period?: string; + /** Specific metric to retrieve, such as `'active_users'` or `'page_views'`. */ + metric?: string; + /** Additional query parameters. */ + [key: string]: any; +} + /** * App Logs module for tracking and analyzing application usage. * @@ -5,23 +43,36 @@ * statistics about your application's usage. Useful for analytics, monitoring, * and understanding user behavior. * - * **Available with both auth modes:** - * - User auth: `client.appLogs.method(...)` - * - Service role: `client.asServiceRole.appLogs.method(...)` + * Methods in this module respect the authentication mode used when calling them: + * + * - **User authentication** (`base44.appLogs`): Operations are scoped to the currently + * authenticated user. For example, `fetchLogs()` returns only logs for the current user, + * and `getStats()` returns statistics about that user's activity. + * + * - **Service role authentication** (`client.asServiceRole.appLogs`): Operations have + * elevated permissions and can access data across all users. For example, `fetchLogs()` + * returns logs from all users in your application, and `getStats()` returns application-wide + * statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. * * @example * ```typescript * // Log user visiting a page - * await client.appLogs.logUserInApp('dashboard'); + * await base44.appLogs.logUserInApp('dashboard'); + * ``` * + * @example + * ```typescript * // Fetch recent logs - * const logs = await client.appLogs.fetchLogs({ + * const logs = await base44.appLogs.fetchLogs({ * limit: 100, * sort: '-timestamp' * }); + * ``` * + * @example + * ```typescript * // Get application statistics - * const stats = await client.appLogs.getStats({ + * const stats = await base44.appLogs.getStats({ * startDate: '2024-01-01', * endDate: '2024-01-31' * }); @@ -34,19 +85,22 @@ export interface AppLogsModule { * Records when a user visits a specific page or section of your application. * Useful for tracking user navigation patterns and popular features. * - * @param pageName - Name of the page or section being visited - * @returns Promise that resolves when the log is recorded + * @param pageName - Name of the page or section being visited. + * @returns Promise that resolves when the log is recorded. * * @example * ```typescript * // Log page visit - * await client.appLogs.logUserInApp('home'); - * await client.appLogs.logUserInApp('profile'); - * await client.appLogs.logUserInApp('settings'); + * await base44.appLogs.logUserInApp('home'); + * await base44.appLogs.logUserInApp('profile'); + * await base44.appLogs.logUserInApp('settings'); + * ``` * + * @example + * ```typescript * // Log specific feature usage - * await client.appLogs.logUserInApp('checkout-page'); - * await client.appLogs.logUserInApp('product-details'); + * await base44.appLogs.logUserInApp('checkout-page'); + * await base44.appLogs.logUserInApp('product-details'); * ``` */ logUserInApp(pageName: string): Promise; @@ -57,66 +111,84 @@ export interface AppLogsModule { * Retrieves logs of user activity with support for filtering, pagination, * and sorting. Use this to analyze user behavior and application usage patterns. * - * @param params - Query parameters for filtering logs (limit, sort, date ranges, etc.) - * @returns Promise resolving to the logs data + * @param params - Query parameters for filtering logs. + * @returns Promise resolving to the logs data. * * @example * ```typescript * // Fetch all logs - * const allLogs = await client.appLogs.fetchLogs(); + * const allLogs = await base44.appLogs.fetchLogs(); + * ``` * + * @example + * ```typescript * // Fetch logs with pagination - * const recentLogs = await client.appLogs.fetchLogs({ + * const recentLogs = await base44.appLogs.fetchLogs({ * limit: 50, * skip: 0, * sort: '-timestamp' * }); + * ``` * + * @example + * ```typescript * // Fetch logs for a specific page - * const dashboardLogs = await client.appLogs.fetchLogs({ + * const dashboardLogs = await base44.appLogs.fetchLogs({ * pageName: 'dashboard' * }); + * ``` * + * @example + * ```typescript * // Fetch logs within a date range - * const periodLogs = await client.appLogs.fetchLogs({ + * const periodLogs = await base44.appLogs.fetchLogs({ * startDate: '2024-01-01', * endDate: '2024-01-31' * }); * ``` */ - fetchLogs(params?: Record): Promise; + fetchLogs(params?: FetchLogsParams): Promise; /** - * Get application usage statistics. + * Gets application usage statistics. * * Retrieves aggregated statistics about application usage, such as page views, * active users, and popular features. Useful for dashboards and analytics. * - * @param params - Query parameters for filtering statistics (date ranges, grouping, etc.) - * @returns Promise resolving to the statistics data + * @param params - Query parameters for filtering and grouping statistics. + * @returns Promise resolving to the statistics data. * * @example * ```typescript * // Get overall stats - * const stats = await client.appLogs.getStats(); + * const stats = await base44.appLogs.getStats(); + * ``` * + * @example + * ```typescript * // Get stats for a specific time period - * const monthlyStats = await client.appLogs.getStats({ + * const monthlyStats = await base44.appLogs.getStats({ * startDate: '2024-01-01', * endDate: '2024-01-31' * }); + * ``` * + * @example + * ```typescript * // Get stats grouped by page - * const pageStats = await client.appLogs.getStats({ + * const pageStats = await base44.appLogs.getStats({ * groupBy: 'page' * }); + * ``` * + * @example + * ```typescript * // Get daily active users - * const dailyStats = await client.appLogs.getStats({ + * const dailyStats = await base44.appLogs.getStats({ * period: 'daily', * metric: 'active_users' * }); * ``` */ - getStats(params?: Record): Promise; + getStats(params?: GetStatsParams): Promise; } diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index c360706..6590fae 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -110,7 +110,7 @@ export interface AuthModuleOptions { * @example * ```typescript * // Login with email and password - * const { access_token, user } = await client.auth.loginViaEmailPassword( + * const { access_token, user } = await base44.auth.loginViaEmailPassword( * 'user@example.com', * 'password123' * ); @@ -119,25 +119,25 @@ export interface AuthModuleOptions { * @example * ```typescript * // Check if user is authenticated - * const isAuth = await client.auth.isAuthenticated(); + * const isAuth = await base44.auth.isAuthenticated(); * ``` * * @example * ```typescript * // Get current user profile - * const currentUser = await client.auth.me(); + * const currentUser = await base44.auth.me(); * ``` * * @example * ```typescript * // Logout and reload page - * client.auth.logout(); + * base44.auth.logout(); * ``` * * @example * ```typescript * // Logout and redirect to login page - * client.auth.logout('/login'); + * base44.auth.logout('/login'); * ``` */ export interface AuthModule { @@ -148,7 +148,7 @@ export interface AuthModule { * * @example * ```typescript - * const user = await client.auth.me(); + * const user = await base44.auth.me(); * console.log(`Logged in as: ${user.email}`); * console.log(`User ID: ${user.id}`); * ``` @@ -167,7 +167,7 @@ export interface AuthModule { * @example * ```typescript * // Update specific fields - * const updatedUser = await client.auth.updateMe({ + * const updatedUser = await base44.auth.updateMe({ * name: 'John Doe', * avatar_url: 'https://example.com/avatar.jpg' * }); @@ -177,7 +177,7 @@ export interface AuthModule { * @example * ```typescript * // Update custom fields defined in your User entity - * await client.auth.updateMe({ + * await base44.auth.updateMe({ * bio: 'Software developer', * phone: '+1234567890', * preferences: { theme: 'dark' } @@ -199,13 +199,13 @@ export interface AuthModule { * @example * ```typescript * // Redirect to login and come back to current page - * client.auth.redirectToLogin(window.location.href); + * base44.auth.redirectToLogin(window.location.href); * ``` * * @example * ```typescript * // Redirect to login and then go to the dashboard page - * client.auth.redirectToLogin('/dashboard'); + * base44.auth.redirectToLogin('/dashboard'); * ``` */ redirectToLogin(nextUrl: string): void; @@ -220,19 +220,19 @@ export interface AuthModule { * @example * ```typescript * // Logout and reload page - * client.auth.logout(); + * base44.auth.logout(); * ``` * * @example * ```typescript * // Logout and redirect to login page - * client.auth.logout('/login'); + * base44.auth.logout('/login'); * ``` * * @example * ```typescript * // Logout and redirect to home - * client.auth.logout('/'); + * base44.auth.logout('/'); * ``` */ logout(redirectUrl?: string): void; @@ -248,13 +248,13 @@ export interface AuthModule { * @example * ```typescript * // Set token and save to local storage - * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); + * base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); * ``` * * @example * ```typescript * // Set token without saving to local storage - * client.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); + * base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); * ``` */ setToken(token: string, saveToStorage?: boolean): void; @@ -273,7 +273,7 @@ export interface AuthModule { * @example * ```typescript * try { - * const { access_token, user } = await client.auth.loginViaEmailPassword( + * const { access_token, user } = await base44.auth.loginViaEmailPassword( * 'user@example.com', * 'securePassword123' * ); @@ -286,7 +286,7 @@ export interface AuthModule { * @example * ```typescript * // With captcha token - * const response = await client.auth.loginViaEmailPassword( + * const response = await base44.auth.loginViaEmailPassword( * 'user@example.com', * 'securePassword123', * 'captcha-token-here' @@ -306,12 +306,12 @@ export interface AuthModule { * * @example * ```typescript - * const isAuthenticated = await client.auth.isAuthenticated(); + * const isAuthenticated = await base44.auth.isAuthenticated(); * if (isAuthenticated) { * console.log('User is logged in'); * } else { * // Redirect to login page - * client.auth.redirectToLogin(window.location.href); + * base44.auth.redirectToLogin(window.location.href); * } * ``` */ @@ -331,7 +331,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.inviteUser('newuser@example.com', 'editor'); + * await base44.auth.inviteUser('newuser@example.com', 'editor'); * console.log('Invitation sent successfully!'); * } catch (error) { * console.error('Failed to send invitation:', error); @@ -350,7 +350,7 @@ export interface AuthModule { * * @example * ```typescript - * await client.auth.register({ + * await base44.auth.register({ * email: 'newuser@example.com', * password: 'securePassword123', * referral_code: 'FRIEND2024' @@ -373,7 +373,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.verifyOtp({ + * await base44.auth.verifyOtp({ * email: 'user@example.com', * otpCode: '123456' * }); @@ -397,7 +397,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.resendOtp('user@example.com'); + * await base44.auth.resendOtp('user@example.com'); * console.log('OTP resent! Please check your email.'); * } catch (error) { * console.error('Failed to resend OTP:', error); @@ -418,7 +418,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.resetPasswordRequest('user@example.com'); + * await base44.auth.resetPasswordRequest('user@example.com'); * console.log('Password reset email sent!'); * } catch (error) { * console.error('Failed to send password reset email:', error); @@ -440,7 +440,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.resetPassword({ + * await base44.auth.resetPassword({ * resetToken: 'token-from-email', * newPassword: 'newSecurePassword456' * }); @@ -465,7 +465,7 @@ export interface AuthModule { * @example * ```typescript * try { - * await client.auth.changePassword({ + * await base44.auth.changePassword({ * userId: 'user-123', * currentPassword: 'oldPassword123', * newPassword: 'newSecurePassword456' diff --git a/src/modules/connectors.types.ts b/src/modules/connectors.types.ts index 286fb34..a628c1a 100644 --- a/src/modules/connectors.types.ts +++ b/src/modules/connectors.types.ts @@ -1,5 +1,5 @@ /** - * The type of external integration/connector (e.g., "google", "slack", "github"). + * The type of external integration/connector, such as `'google'`, `'slack'`, or `'github'`. */ export type ConnectorIntegrationType = string; @@ -14,23 +14,21 @@ export interface ConnectorAccessTokenResponse { * Connectors module for managing OAuth tokens for external services. * * This module allows you to retrieve OAuth access tokens for external services - * that users have connected to your Base44 app. Use these tokens to make API - * calls to external services on behalf of your users. + * that your Base44 app has connected to. Use these tokens to make API + * calls to external services. * - * **Important:** This module is only available with service role authentication. + * Unlike the integrations module that provides pre-built functions, connectors give you + * raw OAuth tokens so you can call external service APIs directly with full control over + * the API calls you make. This is useful when you need custom API interactions that aren't + * covered by Base44's pre-built integrations. * - * **Difference from SSO module:** - * - **Connectors**: Retrieve OAuth tokens for external services (Google, Slack, etc.) - * to call their APIs on behalf of users - * - **SSO**: Generate tokens to authenticate your Base44 users with external systems + * This module is only available with service role authentication. * * @example * ```typescript - * // Retrieve Google OAuth token for a user - * const response = await client.asServiceRole.connectors.getAccessToken("google"); + * // Retrieve Google OAuth token and use it to call Google APIs + * const response = await base44.asServiceRole.connectors.getAccessToken('google'); * const googleToken = response.access_token; - * - * // Use the token to call Google APIs * const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { * headers: { 'Authorization': `Bearer ${googleToken}` } * }); @@ -38,25 +36,26 @@ export interface ConnectorAccessTokenResponse { */ export interface ConnectorsModule { /** - * Retrieve an OAuth access token for a specific external integration type. - * - * Returns the stored OAuth token for an external service that a user has - * connected to your Base44 app. You can then use this token to make - * authenticated API calls to that external service. + * Retrieves an OAuth access token for a specific external integration type. * - * @param integrationType - The type of integration (e.g., "google", "slack", "github") - * @returns Promise resolving to the access token response + * Returns the stored OAuth token for an external service that your Base44 app + * has connected to. You can then use this token to make authenticated API calls + * to that external service. * - * @throws {Error} When integrationType is not provided or is not a string + * @param integrationType - The type of integration, such as `'google'`, `'slack'`, or `'github'`. + * @returns Promise resolving to the access token response. * * @example * ```typescript * // Get Google OAuth token - * const response = await client.asServiceRole.connectors.getAccessToken("google"); + * const response = await base44.asServiceRole.connectors.getAccessToken('google'); * console.log(response.access_token); + * ``` * + * @example + * ```typescript * // Get Slack OAuth token - * const slackResponse = await client.asServiceRole.connectors.getAccessToken("slack"); + * const slackResponse = await base44.asServiceRole.connectors.getAccessToken('slack'); * console.log(slackResponse.access_token); * ``` */ diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index 85334a3..b9ce2ff 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -1,35 +1,43 @@ /** * Entity handler providing CRUD operations for a specific entity type. * - * Each entity in your Base44 app (like User, Todo, Product, etc.) gets - * a handler with these methods for managing data. + * Each entity in your Base44 app gets a handler with these methods for managing data. */ export interface EntityHandler { /** - * List entities with optional pagination and sorting. + * Lists records with optional pagination and sorting. * - * Retrieves all entities of this type with support for sorting, + * Retrieves all records of this type with support for sorting, * pagination, and field selection. * - * @param sort - Sort parameter (e.g., "-created_date" for descending) - * @param limit - Maximum number of results to return - * @param skip - Number of results to skip (for pagination) - * @param fields - Array of field names to include in the response - * @returns Promise resolving to an array of entities + * @param sort - Sort parameter, such as `'-created_date'` for descending. + * @param limit - Maximum number of results to return. + * @param skip - Number of results to skip for pagination. + * @param fields - Array of field names to include in the response. + * @returns Promise resolving to an array of records. * * @example * ```typescript - * // Get all todos - * const todos = await client.entities.Todo.list(); + * // Get all records + * const records = await base44.entities.MyEntity.list(); + * ``` * - * // Get first 10 todos sorted by date - * const recentTodos = await client.entities.Todo.list('-created_date', 10); + * @example + * ```typescript + * // Get first 10 records sorted by date + * const recentRecords = await base44.entities.MyEntity.list('-created_date', 10); + * ``` * - * // Get paginated results (skip first 20, get next 10) - * const page3 = await client.entities.Todo.list(null, 10, 20); + * @example + * ```typescript + * // Get paginated results: skip first 20, get next 10 + * const page3 = await base44.entities.MyEntity.list('-created_date', 10, 20); + * ``` * + * @example + * ```typescript * // Get only specific fields - * const titles = await client.entities.Todo.list(null, null, null, ['title', 'completed']); + * const fields = await base44.entities.MyEntity.list('-created_date', 10, 0, ['name', 'status']); * ``` */ list( @@ -40,46 +48,57 @@ export interface EntityHandler { ): Promise; /** - * Filter entities based on a query. + * Filters records based on a query. * - * Retrieves entities that match specific criteria with support for + * Retrieves records that match specific criteria with support for * sorting, pagination, and field selection. * - * @param query - Filter query object with field-value pairs - * @param sort - Sort parameter (e.g., "-created_date" for descending) - * @param limit - Maximum number of results to return - * @param skip - Number of results to skip (for pagination) - * @param fields - Array of field names to include in the response - * @returns Promise resolving to an array of filtered entities + * @param query - Filter query object with field-value pairs. Each key should be a field name + * from your entity schema, and each value is the criteria to match. Records matching all + * specified criteria are returned. Field names are case-sensitive. + * @param sort - Sort parameter, such as `'-created_date'` for descending. + * @param limit - Maximum number of results to return. + * @param skip - Number of results to skip for pagination. + * @param fields - Array of field names to include in the response. + * @returns Promise resolving to an array of filtered records. * * @example * ```typescript * // Filter by single field - * const completedTodos = await client.entities.Todo.filter({ - * completed: true + * const activeRecords = await base44.entities.MyEntity.filter({ + * status: 'active' * }); + * ``` * + * @example + * ```typescript * // Filter by multiple fields - * const highPriorityTodos = await client.entities.Todo.filter({ + * const filteredRecords = await base44.entities.MyEntity.filter({ * priority: 'high', - * completed: false + * status: 'active' * }); + * ``` * + * @example + * ```typescript * // Filter with sorting and pagination - * const results = await client.entities.Todo.filter( + * const results = await base44.entities.MyEntity.filter( * { status: 'active' }, * '-created_date', * 20, * 0 * ); + * ``` * + * @example + * ```typescript * // Filter with specific fields - * const titles = await client.entities.Todo.filter( + * const fields = await base44.entities.MyEntity.filter( * { priority: 'high' }, - * null, - * null, - * null, - * ['title', 'priority'] + * '-created_date', + * 10, + * 0, + * ['name', 'priority'] * ); * ``` */ @@ -92,119 +111,119 @@ export interface EntityHandler { ): Promise; /** - * Get a single entity by ID. + * Gets a single record by ID. * - * Retrieves a specific entity using its unique identifier. + * Retrieves a specific record using its unique identifier. * - * @param id - The unique identifier of the entity - * @returns Promise resolving to the entity + * @param id - The unique identifier of the record. + * @returns Promise resolving to the record. * * @example * ```typescript - * const todo = await client.entities.Todo.get('todo-123'); - * console.log(todo.title); - * - * const user = await client.entities.User.get('user-456'); - * console.log(user.email); + * const record = await base44.entities.MyEntity.get('entity-123'); + * console.log(record.name); * ``` */ get(id: string): Promise; /** - * Create a new entity. + * Creates a new record. * - * Creates a new entity with the provided data. + * Creates a new record with the provided data. * - * @param data - Object containing the entity data - * @returns Promise resolving to the created entity + * @param data - Object containing the record data. + * @returns Promise resolving to the created record. * * @example * ```typescript - * const newTodo = await client.entities.Todo.create({ - * title: 'Buy groceries', - * completed: false, + * const newRecord = await base44.entities.MyEntity.create({ + * name: 'My Item', + * status: 'active', * priority: 'high' * }); - * console.log('Created todo with ID:', newTodo.id); - * - * const newUser = await client.entities.User.create({ - * name: 'John Doe', - * email: 'john@example.com', - * role: 'user' - * }); + * console.log('Created record with ID:', newRecord.id); * ``` */ create(data: Record): Promise; /** - * Update an existing entity. + * Updates an existing record. * - * Updates an entity by ID with the provided data. Only the fields + * Updates a record by ID with the provided data. Only the fields * included in the data object will be updated. * - * @param id - The unique identifier of the entity to update - * @param data - Object containing the fields to update - * @returns Promise resolving to the updated entity + * @param id - The unique identifier of the record to update. + * @param data - Object containing the fields to update. + * @returns Promise resolving to the updated record. * * @example * ```typescript * // Update single field - * const updated = await client.entities.Todo.update('todo-123', { - * completed: true + * const updated = await base44.entities.MyEntity.update('entity-123', { + * status: 'completed' * }); + * ``` * + * @example + * ```typescript * // Update multiple fields - * const updated = await client.entities.Todo.update('todo-123', { - * title: 'Updated title', + * const updated = await base44.entities.MyEntity.update('entity-123', { + * name: 'Updated name', * priority: 'low', - * completed: true + * status: 'active' * }); * ``` */ update(id: string, data: Record): Promise; /** - * Delete a single entity by ID. + * Deletes a single record by ID. * - * Permanently removes an entity from the database. + * Permanently removes a record from the database. * - * @param id - The unique identifier of the entity to delete - * @returns Promise that resolves when the entity is deleted + * @param id - The unique identifier of the record to delete. + * @returns Promise that resolves when the record is deleted. * * @example * ```typescript - * await client.entities.Todo.delete('todo-123'); - * console.log('Todo deleted'); - * - * await client.entities.User.delete('user-456'); + * await base44.entities.MyEntity.delete('entity-123'); + * console.log('Record deleted'); * ``` */ delete(id: string): Promise; /** - * Delete multiple entities matching a query. + * Deletes multiple records matching a query. * - * Permanently removes all entities that match the provided query. + * Permanently removes all records that match the provided query. * Use with caution as this operation cannot be undone. * - * @param query - Filter query object to match entities for deletion - * @returns Promise that resolves when the entities are deleted + * @param query - Filter query object with field-value pairs. Each key should be a field name + * from your entity schema, and each value is the criteria to match. Records matching all + * specified criteria will be deleted. Field names are case-sensitive. + * @returns Promise that resolves when the records are deleted. * * @example * ```typescript - * // Delete all completed todos - * await client.entities.Todo.deleteMany({ - * completed: true + * // Delete all completed records + * await base44.entities.MyEntity.deleteMany({ + * status: 'completed' * }); + * ``` * + * @example + * ```typescript * // Delete all low priority items - * await client.entities.Todo.deleteMany({ + * await base44.entities.MyEntity.deleteMany({ * priority: 'low' * }); + * ``` * + * @example + * ```typescript * // Delete by multiple criteria - * await client.entities.Todo.deleteMany({ - * completed: true, + * await base44.entities.MyEntity.deleteMany({ + * status: 'completed', * priority: 'low' * }); * ``` @@ -212,48 +231,45 @@ export interface EntityHandler { deleteMany(query: Record): Promise; /** - * Create multiple entities in a single request. + * Creates multiple records in a single request. * - * Efficiently creates multiple entities at once. This is faster + * Efficiently creates multiple records at once. This is faster * than creating them individually. * - * @param data - Array of entity data objects - * @returns Promise resolving to an array of created entities + * @param data - Array of record data objects. + * @returns Promise resolving to an array of created records. * * @example * ```typescript - * const newTodos = await client.entities.Todo.bulkCreate([ - * { title: 'Task 1', completed: false }, - * { title: 'Task 2', completed: false }, - * { title: 'Task 3', completed: true } - * ]); - * console.log(`Created ${newTodos.length} todos`); - * - * const newUsers = await client.entities.User.bulkCreate([ - * { name: 'Alice', email: 'alice@example.com' }, - * { name: 'Bob', email: 'bob@example.com' } + * const newRecords = await base44.entities.MyEntity.bulkCreate([ + * { name: 'Item 1', status: 'active' }, + * { name: 'Item 2', status: 'active' }, + * { name: 'Item 3', status: 'completed' } * ]); + * console.log(`Created ${newRecords.length} records`); * ``` */ bulkCreate(data: Record[]): Promise; /** - * Import entities from a file. + * Imports records from a file. * - * Imports entities from a file (typically CSV or similar format). + * Imports records from a file, typically CSV or similar format. * The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. * - * @param file - File object to import - * @returns Promise resolving to the import result + * @param file - File object to import. + * @returns Promise resolving to the import result. * * @example * ```typescript - * // In a browser with file input - * const fileInput = document.querySelector('input[type="file"]'); - * const file = fileInput.files[0]; - * - * const result = await client.entities.Todo.importEntities(file); - * console.log(`Imported ${result.count} todos`); + * // Import records from file in React + * const handleFileImport = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (file) { + * const result = await base44.entities.MyEntity.importEntities(file); + * console.log(`Imported ${result.count} records`); + * } + * }; * ``` */ importEntities(file: File): Promise; @@ -263,66 +279,86 @@ export interface EntityHandler { * Entities module for managing application data. * * This module provides dynamic access to all entities in your Base44 app. - * Each entity (like User, Todo, Product, etc.) gets a handler with full - * CRUD operations and additional utility methods. + * Each entity gets a handler with full CRUD operations and additional utility methods. + * + * Entities are accessed dynamically using the pattern: + * `base44.entities.EntityName.method()` * - * **Dynamic Access:** - * Entities are accessed dynamically using: `client.entities.EntityName.method()` + * Methods in this module respect the authentication mode used when calling them: * - * **Available with both auth modes:** - * - User auth: `client.entities.EntityName.method(...)` - * - Service role: `client.asServiceRole.entities.EntityName.method(...)` + * - **User authentication** (`base44.entities`): Operations are scoped to the currently + * authenticated user's permissions. Access is limited to entities the user has permission to view or modify. + * + * - **Service role authentication** (`client.asServiceRole.entities`): Operations have + * elevated permissions and can access entities across all users. This is useful for admin + * operations or workflows that need to operate on data regardless of user permissions. * * @example * ```typescript - * // List all todos - * const todos = await client.entities.Todo.list(); + * // List all records + * const records = await base44.entities.MyEntity.list(); + * ``` * - * // Filter users by role - * const admins = await client.entities.User.filter({ role: 'admin' }); + * @example + * ```typescript + * // Filter records by field + * const activeRecords = await base44.entities.MyEntity.filter({ status: 'active' }); + * ``` * - * // Get specific product - * const product = await client.entities.Product.get('prod-123'); + * @example + * ```typescript + * // Get specific record by ID + * const record = await base44.entities.MyEntity.get('entity-123'); + * ``` * - * // Create new todo - * const newTodo = await client.entities.Todo.create({ - * title: 'Buy groceries', - * completed: false + * @example + * ```typescript + * // Create new record + * const newRecord = await base44.entities.MyEntity.create({ + * name: 'My Item', + * status: 'active' * }); + * ``` * - * // Update entity - * await client.entities.Todo.update('todo-123', { completed: true }); + * @example + * ```typescript + * // Update record + * await base44.entities.MyEntity.update('entity-123', { status: 'completed' }); + * ``` * - * // Delete entity - * await client.entities.Todo.delete('todo-123'); + * @example + * ```typescript + * // Delete record + * await base44.entities.MyEntity.delete('entity-123'); + * ``` * + * @example + * ```typescript * // Bulk operations - * await client.entities.Todo.bulkCreate([ - * { title: 'Task 1' }, - * { title: 'Task 2' } + * await base44.entities.MyEntity.bulkCreate([ + * { name: 'Item 1' }, + * { name: 'Item 2' } * ]); + * ``` * + * @example + * ```typescript * // Delete many - * await client.entities.Todo.deleteMany({ completed: true }); + * await base44.entities.MyEntity.deleteMany({ status: 'completed' }); * ``` */ -export type EntitiesModule = { +export interface EntitiesModule { /** * Access any entity by name. * - * Use this to access custom entities defined in your Base44 app. + * Use this to access entities defined in your Base44 app. * * @example * ```typescript - * // Built-in entities - * client.entities.User - * client.entities.Todo - * - * // Custom entities - * client.entities.Product - * client.entities.Order - * client.entities.Invoice + * // Access entities dynamically + * base44.entities.MyEntity + * base44.entities.AnotherEntity * ``` */ [entityName: string]: EntityHandler; -}; +} diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index e1ea3ba..7a91dcb 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -1,28 +1,28 @@ /** * Functions module for invoking custom backend functions. * - * This module allows you to invoke custom backend functions that you've - * deployed to your Base44 app. Functions can accept parameters and return - * results, and support file uploads. + * This module allows you to invoke the custom backend functions in your Base44 app. * - * Functions can be invoked with either user authentication or service role - * authentication depending on your use case. + * Methods in this module respect the authentication mode used when calling them: + * + * - **User authentication** (`base44.functions`): Functions are invoked with the currently + * authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. + * + * - **Service role authentication** (`client.asServiceRole.functions`): Functions are invoked + * with elevated permissions. The function code receives a request with the service role authentication context and can access data across all users. * * @example * ```typescript * // Invoke a function with parameters - * const result = await client.functions.invoke('calculateTotal', { + * const result = await base44.functions.invoke('calculateTotal', { * items: ['item1', 'item2'], * discount: 0.1 * }); * console.log(result.data); + * ``` * - * // Invoke a function with file upload - * const fileResult = await client.functions.invoke('processImage', { - * image: fileInput.files[0], - * filter: 'grayscale' - * }); - * + * @example + * ```typescript * // Invoke with service role * const adminResult = await client.asServiceRole.functions.invoke('adminTask', { * action: 'cleanup' @@ -31,42 +31,40 @@ */ export interface FunctionsModule { /** - * Invoke a custom backend function by name. + * Invokes a custom backend function by name. * * Calls a custom backend function that you've deployed to your Base44 app. * The function receives the provided data as named parameters and returns - * the result. - * - * **File Upload Support:** - * If any parameter is a `File` object, the request will automatically be + * the result. If any parameter is a `File` object, the request will automatically be * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. * - * @param functionName - The name of the function to invoke - * @param data - An object containing named parameters for the function - * @returns Promise resolving to the function's response - * - * @throws {Error} When data is a string instead of an object + * @param functionName - The name of the function to invoke. + * @param data - An object containing named parameters for the function. + * @returns Promise resolving to the function's response. * * @example * ```typescript * // Basic function call - * const result = await client.functions.invoke('calculateTotal', { + * const result = await base44.functions.invoke('calculateTotal', { * items: ['item1', 'item2'], * discount: 0.1 * }); * console.log(result.data.total); + * ``` * - * // Function with file upload - * const imageFile = document.querySelector('input[type="file"]').files[0]; - * const processedImage = await client.functions.invoke('processImage', { - * image: imageFile, - * filter: 'grayscale', - * quality: 80 - * }); - * - * // Health check function - * const health = await client.functions.invoke('healthCheck', {}); - * console.log(health.data.status); + * @example + * ```typescript + * // Function with file upload in React + * const handleFileUpload = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (file) { + * const processedImage = await base44.functions.invoke('processImage', { + * image: file, + * filter: 'grayscale', + * quality: 80 + * }); + * } + * }; * ``` */ invoke(functionName: string, data: Record): Promise; diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index a6fc408..62271d3 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -1,8 +1,11 @@ /** * Function signature for calling an integration endpoint. * - * @param data - An object containing named parameters for the integration endpoint - * @returns Promise resolving to the integration endpoint's response + * If any parameter is a `File` object, the request will automatically be + * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + * + * @param data - An object containing named parameters for the integration endpoint. + * @returns Promise resolving to the integration endpoint's response. */ export type IntegrationEndpointFunction = ( data: Record @@ -29,49 +32,64 @@ export type IntegrationPackage = { }; /** - * Integrations module for calling pre-built integration endpoints. + * Integrations module for calling integration endpoints. * - * This module provides access to integration endpoints that Base44 provides - * for interacting with external services. Integrations are organized into - * packages, with the most common being the "Core" package. + * This module provides access to integration endpoints for interacting with external + * services. Integrations are organized into packages. Base44 provides built-in integrations + * in the "Core" package, and you can install additional integration packages for other services. * - * Unlike the connectors module (which gives you raw OAuth tokens), integrations - * provide pre-built functions that Base44 executes on your behalf. + * Unlike the connectors module that gives you raw OAuth tokens, integrations provide + * pre-built functions that Base44 executes on your behalf. * - * **Dynamic Access:** * Integration endpoints are accessed dynamically using the pattern: - * `client.integrations.PackageName.EndpointName(params)` + * `base44.integrations.PackageName.EndpointName(params)` * - * **File Upload Support:** - * If any parameter is a `File` object, the request will automatically be - * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. + * Methods in this module respect the authentication mode used when calling them: * - * **Available with both auth modes:** - * - User auth: `client.integrations.PackageName.EndpointName(...)` - * - Service role: `client.asServiceRole.integrations.PackageName.EndpointName(...)` + * - **User authentication** (`base44.integrations`): Integration endpoints are invoked with the + * currently authenticated user's permissions. The endpoints execute with the user's authentication + * context and can only access data the user has permission to access. + * + * - **Service role authentication** (`client.asServiceRole.integrations`): Integration endpoints + * are invoked with elevated permissions. The endpoints execute with service role authentication + * and can access data across all users. This is useful for admin operations or workflows that + * need to operate regardless of user permissions. * * @example * ```typescript * // Send email using Core package - * const emailResult = await client.integrations.Core.SendEmail({ + * const emailResult = await base44.integrations.Core.SendEmail({ * to: 'user@example.com', * subject: 'Hello from Base44', * body: 'This is a test email' * }); + * ``` * - * // Upload file using Core package - * const fileInput = document.querySelector('input[type="file"]'); - * const uploadResult = await client.integrations.Core.UploadFile({ - * file: fileInput.files[0], - * metadata: { type: 'profile-picture' } - * }); + * @example + * ```typescript + * // Upload file using Core package in React + * const handleFileUpload = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (file) { + * const uploadResult = await base44.integrations.Core.UploadFile({ + * file: file, + * metadata: { type: 'profile-picture' } + * }); + * } + * }; + * ``` * + * @example + * ```typescript * // Use custom integration package - * const result = await client.integrations.CustomPackage.CustomEndpoint({ + * const result = await base44.integrations.CustomPackage.CustomEndpoint({ * param1: 'value1', * param2: 'value2' * }); + * ``` * + * @example + * ```typescript * // Use with service role * const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ * to: 'admin@example.com', @@ -80,7 +98,7 @@ export type IntegrationPackage = { * }); * ``` */ -export type IntegrationsModule = { +export interface IntegrationsModule { /** * Core package containing built-in Base44 integration endpoints. * @@ -90,7 +108,7 @@ export type IntegrationsModule = { * * @example * ```typescript - * await client.integrations.Core.SendEmail({ + * await base44.integrations.Core.SendEmail({ * to: 'user@example.com', * subject: 'Welcome', * body: 'Welcome to our app!' @@ -108,11 +126,11 @@ export type IntegrationsModule = { * @example * ```typescript * // Access custom package dynamically - * await client.integrations.Slack.PostMessage({ + * await base44.integrations.Slack.PostMessage({ * channel: '#general', * text: 'Hello from Base44' * }); * ``` */ [packageName: string]: IntegrationPackage; -}; +} diff --git a/src/modules/sso.types.ts b/src/modules/sso.types.ts index de73fbb..8df02d4 100644 --- a/src/modules/sso.types.ts +++ b/src/modules/sso.types.ts @@ -11,30 +11,32 @@ export interface SsoAccessTokenResponse { * SSO (Single Sign-On) module for managing SSO authentication. * * This module provides methods for retrieving SSO access tokens for users. + * These tokens allow you to authenticate your Base44 users with external + * systems or services. * - * TODO: Add link to service role documentation once created + * This module is only available with service role authentication. * * @example * ```typescript * // Access SSO module with service role - * const response = await client.asServiceRole.sso.getAccessToken("user_123"); + * const response = await base44.asServiceRole.sso.getAccessToken('user_123'); * console.log(response.data.access_token); * ``` */ export interface SsoModule { /** - * Get SSO access token for a specific user. + * Gets SSO access token for a specific user. * * Retrieves a Single Sign-On access token that can be used to authenticate * a user with external services or systems. * - * @param userid - The user ID to get the access token for - * @returns Promise resolving to an Axios response containing the access token + * @param userid - The user ID to get the access token for. + * @returns Promise resolving to an Axios response containing the access token. * * @example * ```typescript * // Get SSO access token for a user - * const response = await client.asServiceRole.sso.getAccessToken("user_123"); + * const response = await base44.asServiceRole.sso.getAccessToken('user_123'); * console.log(response.data.access_token); * ``` */ diff --git a/src/types.ts b/src/types.ts index e219e9b..2d84f83 100644 --- a/src/types.ts +++ b/src/types.ts @@ -15,7 +15,7 @@ export * from "./modules/types.js"; * @example * ```typescript * // Filter conversations by agent name - * const conversations = await client.agents.listConversations({ + * const conversations = await base44.agents.listConversations({ * q: { agent_name: 'support-bot' } * }); * ``` @@ -23,7 +23,7 @@ export * from "./modules/types.js"; * @example * ```typescript * // Filter conversations with sorting - * const conversations = await client.agents.listConversations({ + * const conversations = await base44.agents.listConversations({ * q: { status: 'active' }, * sort: '-created_at' // Sort by created_at descending * }); @@ -32,7 +32,7 @@ export * from "./modules/types.js"; * @example * ```typescript * // Filter conversations with pagination - * const conversations = await client.agents.listConversations({ + * const conversations = await base44.agents.listConversations({ * q: { agent_name: 'support-bot' }, * limit: 20, // Get 20 results * skip: 40 // Skip first 40 (page 3) @@ -42,7 +42,7 @@ export * from "./modules/types.js"; * @example * ```typescript * // Filter conversations with field selection - * const conversations = await client.agents.listConversations({ + * const conversations = await base44.agents.listConversations({ * q: { status: 'active' }, * fields: ['id', 'agent_name', 'created_at'] * }); @@ -51,7 +51,7 @@ export * from "./modules/types.js"; * @example * ```typescript * // Filter conversations with multiple filters - * const conversations = await client.agents.listConversations({ + * const conversations = await base44.agents.listConversations({ * q: { * agent_name: 'support-bot', * 'metadata.priority': 'high', diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index 0ec4b42..84039f6 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -103,7 +103,7 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { * @example * ```typescript * // Save access token after login - * const response = await client.auth.loginViaEmailPassword(email, password); + * const response = await base44.auth.loginViaEmailPassword(email, password); * const success = saveAccessToken(response.access_token, {}); * * if (success) { @@ -143,7 +143,7 @@ export function saveAccessToken( /** * Removes the access token from local storage. * - * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | client.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. + * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | base44.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. * * @param options - Configuration options for token removal. * @returns `true` if the token was removed successfully, `false` otherwise. @@ -159,7 +159,7 @@ export function saveAccessToken( * @example * ```typescript * // Standard logout flow with token removal and redirect - * client.auth.logout('/login'); + * base44.auth.logout('/login'); * ``` */ export function removeAccessToken(options: RemoveAccessTokenOptions) { @@ -182,7 +182,7 @@ export function removeAccessToken(options: RemoveAccessTokenOptions) { * Constructs the absolute URL for the login page with a redirect parameter. * * Low-level utility for building login URLs. For standard login redirects, use - * `client.auth.redirectToLogin()` instead, which handles this automatically. This function + * `base44.auth.redirectToLogin()` instead, which handles this automatically. This function * is useful when you need to construct login URLs without a client instance or for custom * authentication flows. * From 48c7a136a1aa314b1b89fa44dc68237b6ac214fc Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Tue, 25 Nov 2025 15:00:26 +0200 Subject: [PATCH 05/31] working sdk docs setup --- .gitignore | 5 +- package.json | 9 +- .../category-map.json | 4 + .../file-processing/docs-json-template.json | 62 ++ .../file-processing/file-processing.js | 289 ++++++ .../file-processing/styling.css | 107 +++ .../push-to-docs-repo.js | 183 ++++ .../typedoc-mintlify-content.js | 124 +++ .../typedoc-mintlify-linked-types.js | 383 ++++++++ .../typedoc-mintlify-parameters.js | 550 ++++++++++++ .../typedoc-plugin/typedoc-mintlify-plugin.js | 189 ++++ .../typedoc-mintlify-returns.js | 819 ++++++++++++++++++ .../typedoc-plugin/typedoc-mintlify-utils.js | 12 + .../types-to-expose.json | 12 + typedoc.json | 37 + writing-docs.md | 34 + 16 files changed, 2817 insertions(+), 2 deletions(-) create mode 100644 scripts/mintlify-post-processing/category-map.json create mode 100644 scripts/mintlify-post-processing/file-processing/docs-json-template.json create mode 100755 scripts/mintlify-post-processing/file-processing/file-processing.js create mode 100644 scripts/mintlify-post-processing/file-processing/styling.css create mode 100644 scripts/mintlify-post-processing/push-to-docs-repo.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-content.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js create mode 100644 scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-utils.js create mode 100644 scripts/mintlify-post-processing/types-to-expose.json create mode 100644 typedoc.json create mode 100644 writing-docs.md diff --git a/.gitignore b/.gitignore index f655c8d..c952826 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,7 @@ logs *.tsbuildinfo # Optional REPL history -.node_repl_history \ No newline at end of file +.node_repl_history + +# Docs +docs/ \ No newline at end of file diff --git a/package.json b/package.json index 2b6cee7..0143e22 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,12 @@ "test:e2e": "vitest run tests/e2e", "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "prepublishOnly": "npm run build" + "docs": "typedoc", + "prepublishOnly": "npm run build", + "create-docs": "npm run create-docs:generate && npm run create-docs:process", + "push-docs": "node scripts/mintlify-post-processing/push-to-docs-repo.js", + "create-docs:generate": "typedoc", + "create-docs:process": "node scripts/mintlify-post-processing/file-processing/file-processing.js" }, "dependencies": { "axios": "^1.6.2", @@ -30,6 +35,8 @@ "dotenv": "^16.3.1", "eslint": "^8.54.0", "nock": "^13.4.0", + "typedoc": "^0.28.14", + "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.3.2", "vitest": "^1.0.0" }, diff --git a/scripts/mintlify-post-processing/category-map.json b/scripts/mintlify-post-processing/category-map.json new file mode 100644 index 0000000..c887ed1 --- /dev/null +++ b/scripts/mintlify-post-processing/category-map.json @@ -0,0 +1,4 @@ +{ + "functions": "Main Methods", + "interfaces": "Modules" +} \ No newline at end of file diff --git a/scripts/mintlify-post-processing/file-processing/docs-json-template.json b/scripts/mintlify-post-processing/file-processing/docs-json-template.json new file mode 100644 index 0000000..b0dc864 --- /dev/null +++ b/scripts/mintlify-post-processing/file-processing/docs-json-template.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://mintlify.com/docs.json", + "theme": "mint", + "name": "Base44 Support Documentation", + "integrations": { + "mixpanel": { + "projectToken": "cc6e9e106e4b833fc3a3819c11b74138" + } + }, + "colors": { + "primary": "#FF5500", + "light": "#EEE2C0", + "dark": "#FF5500" + }, + "navigation": { + "tabs": [ + { + "tab": "SDK Reference", + "groups": [ + { + "group": "Main Methods", + "pages": [ + "content/functions/createClient", + "content/functions/createClientFromRequest", + "content/functions/getAccessToken", + "content/functions/saveAccessToken", + "content/functions/removeAccessToken", + "content/functions/getLoginUrl" + ] + }, + { + "group": "Modules", + "pages": ["content/interfaces/Auth"] + } + ] + } + ] + }, + "navbar": { + "links": [ + { + "label": "Support", + "href": "https://app.base44.com/support/conversations" + } + ], + "primary": { + "type": "button", + "label": "Base44", + "href": "https://base44.com/?utm_source=Mintlify&utm_medium=Main&utm_content=menu" + } + }, + "footer": { + "socials": { + "twitter": "https://x.com/base_44", + "discord": "https://discord.com/invite/ThpYPZpVts", + "linkedin": "https://www.linkedin.com/company/base44" + } + }, + "custom": { + "stylesheets": ["/styling.css"] + } +} diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js new file mode 100755 index 0000000..ea2aa87 --- /dev/null +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -0,0 +1,289 @@ +#!/usr/bin/env node + +/** + * Post-processing script for TypeDoc-generated MDX files + * + * TypeDoc now emits .mdx files directly, so this script: + * 1. Processes links to make them Mintlify-compatible + * 2. Removes files for linked types that should be suppressed + * 3. Cleans up the temporary linked types tracking file + * 4. Generates docs.json with navigation structure + * 5. Copies styling.css to docs directory + */ + +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +const DOCS_DIR = path.join(__dirname, '..', '..', '..', 'docs'); +const CONTENT_DIR = path.join(DOCS_DIR, 'content'); +const LINKED_TYPES_FILE = path.join(CONTENT_DIR, '.linked-types.json'); +const TEMPLATE_PATH = path.join(__dirname, 'docs-json-template.json'); +const STYLING_CSS_PATH = path.join(__dirname, 'styling.css'); +const CATEGORY_MAP_PATH = path.join(__dirname, '../category-map.json'); +const TYPES_TO_EXPOSE_PATH = path.join(__dirname, '..', 'types-to-expose.json'); + +/** + * Get list of linked type names that should be suppressed + */ +function getLinkedTypeNames() { + try { + if (fs.existsSync(LINKED_TYPES_FILE)) { + const content = fs.readFileSync(LINKED_TYPES_FILE, 'utf-8'); + return new Set(JSON.parse(content)); + } + } catch (e) { + // If file doesn't exist or can't be read, return empty set + } + return new Set(); +} + +/** + * Load allow-listed type names that should remain in the docs output + */ +function getTypesToExpose() { + try { + const content = fs.readFileSync(TYPES_TO_EXPOSE_PATH, 'utf-8'); + const parsed = JSON.parse(content); + if (!Array.isArray(parsed)) { + throw new Error('types-to-expose.json must be an array of strings'); + } + return new Set(parsed); + } catch (e) { + console.error(`Error: Unable to read types-to-expose file: ${TYPES_TO_EXPOSE_PATH}`); + console.error(e.message); + process.exit(1); + } +} + +/** + * Process links in a file to make them Mintlify-compatible + */ +function processLinksInFile(filePath) { + let content = fs.readFileSync(filePath, 'utf-8'); + let modified = false; + + // Remove .md and .mdx extensions from markdown links + // This handles both relative and absolute paths + const linkRegex = /\[([^\]]+)\]\(([^)]+)(\.mdx?)\)/g; + const newContent = content.replace(linkRegex, (match, linkText, linkPath, ext) => { + modified = true; + return `[${linkText}](${linkPath})`; + }); + + if (modified) { + fs.writeFileSync(filePath, newContent, 'utf-8'); + return true; + } + + return false; +} + +/** + * Scan docs content directory and build navigation structure + */ +function scanDocsContent() { + const result = { + functions: [], + interfaces: [], + classes: [], + typeAliases: [], + }; + + const sections = ['functions', 'interfaces', 'classes', 'type-aliases']; + + for (const section of sections) { + const sectionDir = path.join(CONTENT_DIR, section); + if (!fs.existsSync(sectionDir)) continue; + + const files = fs.readdirSync(sectionDir); + const mdxFiles = files + .filter((file) => file.endsWith('.mdx')) + .map((file) => path.basename(file, '.mdx')) + .sort() + .map((fileName) => `content/${section}/${fileName}`); + + const key = section === 'type-aliases' ? 'typeAliases' : section; + result[key] = mdxFiles; + } + + return result; +} + + +/** + * Get group name for a section, using category map or default + */ +function getGroupName(section, categoryMap) { + if (categoryMap[section]) { + return categoryMap[section]; + } + + return section; +} + +/** + * Generate docs.json from template and scanned content + */ +function generateDocsJson(docsContent) { + const template = JSON.parse(fs.readFileSync(TEMPLATE_PATH, 'utf-8')); + let categoryMap = {}; + try { + categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, 'utf-8')); + } catch (e) { + // If file doesn't exist or can't be read, return empty object + console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); + } + + const groups = []; + + if (docsContent.functions.length > 0 && categoryMap.functions) { + groups.push({ + group: getGroupName('functions', categoryMap), + pages: docsContent.functions, + }); + } + + if (docsContent.interfaces.length > 0 && categoryMap.interfaces) { + groups.push({ + group: getGroupName('interfaces', categoryMap), + pages: docsContent.interfaces, + }); + } + + if (docsContent.classes.length > 0 && categoryMap.classes) { + groups.push({ + group: getGroupName('classes', categoryMap), + pages: docsContent.classes, + }); + } + + if (docsContent.typeAliases.length > 0 && categoryMap['type-aliases']) { + groups.push({ + group: getGroupName('typeAliases', categoryMap), + pages: docsContent.typeAliases, + }); + } + + // Find or create SDK Reference tab + let sdkTab = template.navigation.tabs.find(tab => tab.tab === 'SDK Reference'); + if (!sdkTab) { + sdkTab = { tab: 'SDK Reference', groups: [] }; + template.navigation.tabs.push(sdkTab); + } + + sdkTab.groups = groups; + + const docsJsonPath = path.join(DOCS_DIR, 'docs.json'); + fs.writeFileSync(docsJsonPath, JSON.stringify(template, null, 2) + '\n', 'utf-8'); + console.log(`Generated docs.json`); +} + +/** + * Copy styling.css to docs directory + */ +function copyStylingCss() { + const targetPath = path.join(DOCS_DIR, 'styling.css'); + fs.copyFileSync(STYLING_CSS_PATH, targetPath); + console.log(`Copied styling.css`); +} + +/** + * Recursively process all MDX files + */ +function isTypeDocPath(relativePath) { + const normalized = relativePath.split(path.sep).join('/'); + return normalized.startsWith('content/interfaces/') || + normalized.startsWith('content/type-aliases/') || + normalized.startsWith('content/classes/'); +} + +/** + * Recursively process all MDX files + */ +function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const entryPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + processAllFiles(entryPath, linkedTypeNames, exposedTypeNames); + } else if (entry.isFile() && (entry.name.endsWith('.mdx') || entry.name.endsWith('.md'))) { + // Extract the type name from the file path + // e.g., "docs/interfaces/LoginViaEmailPasswordResponse.mdx" -> "LoginViaEmailPasswordResponse" + const fileName = path.basename(entryPath, path.extname(entryPath)); + const relativePath = path.relative(DOCS_DIR, entryPath); + const isTypeDoc = isTypeDocPath(relativePath); + const isExposedType = !isTypeDoc || exposedTypeNames.has(fileName); + + // Remove any type doc files that are not explicitly exposed + if (isTypeDoc && !isExposedType) { + fs.unlinkSync(entryPath); + console.log(`Removed (not exposed): ${relativePath}`); + continue; + } + + // Remove suppressed linked type files (legacy behavior) as long as they aren't exposed + if (linkedTypeNames.has(fileName) && !exposedTypeNames.has(fileName)) { + fs.unlinkSync(entryPath); + console.log(`Removed (suppressed): ${relativePath}`); + } else { + // Process links in the file + if (processLinksInFile(entryPath)) { + console.log(`Processed links: ${relativePath}`); + } + } + } + } +} + +/** + * Main function + */ +function main() { + console.log('Processing TypeDoc MDX files for Mintlify...\n'); + + if (!fs.existsSync(DOCS_DIR)) { + console.error(`Error: Documentation directory not found: ${DOCS_DIR}`); + console.error('Please run "npm run docs:generate" first.'); + process.exit(1); + } + + // Get list of linked types to suppress + const linkedTypeNames = getLinkedTypeNames(); + const exposedTypeNames = getTypesToExpose(); + + // Process all files (remove suppressed ones and fix links) + // Process content directory specifically + if (fs.existsSync(CONTENT_DIR)) { + processAllFiles(CONTENT_DIR, linkedTypeNames, exposedTypeNames); + } else { + // Fallback to processing entire docs directory + processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); + } + + // Clean up the linked types file + try { + if (fs.existsSync(LINKED_TYPES_FILE)) { + fs.unlinkSync(LINKED_TYPES_FILE); + } + } catch (e) { + // Ignore errors + } + + // Scan content and generate docs.json + const docsContent = scanDocsContent(); + generateDocsJson(docsContent); + + // Copy styling.css + copyStylingCss(); + + console.log(`\n✓ Post-processing complete!`); + console.log(` Documentation directory: ${DOCS_DIR}`); +} + +main(); diff --git a/scripts/mintlify-post-processing/file-processing/styling.css b/scripts/mintlify-post-processing/file-processing/styling.css new file mode 100644 index 0000000..430509e --- /dev/null +++ b/scripts/mintlify-post-processing/file-processing/styling.css @@ -0,0 +1,107 @@ +@import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Display:wght@400..800&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap'); + +/* Apply Wix Madefor Text for body text */ +body, +.mint-container { + font-family: "Wix Madefor Text", sans-serif; + font-weight: 400; + font-style: normal; + font-optical-sizing: auto; +} + +/* Apply Wix Madefor Display for headings */ +h1, h2, h3 { + font-family: "Wix Madefor Display", sans-serif; + font-weight: 600; + font-style: normal; + font-optical-sizing: auto; +} + +@media (prefers-color-scheme: light) { + body, + .mint-container, + h1, h2, h3 { + color: #111111; + } +} + + +/* Mintlify primary navbar CTA button color override */ +.mint-navbar .mint-button-primary, +.mint-navbar li#topbar-cta-button a > span.bg-primary-dark { + background-color: #FF5500 !important; /* updated brand orange */ + color: #111111 !important; + font-weight: 600; + border: none; +} + +/* If button has hover/focus/active states, ensure text stays black: */ +.mint-navbar .mint-navbarPrimaryButton:hover, +.mint-navbar .mint-navbarPrimaryButton:focus, +.mint-navbar .mint-navbarPrimaryButton:active, +.mint-navbar .mint-button-primary:hover, +.mint-navbar .mint-button-primary:focus, +.mint-navbar .mint-button-primary:active { + color: #111111 !important; +} + +/* Optional: Remove box-shadow on click, if present */ +.mint-navbar .mint-navbarPrimaryButton:active { + box-shadow: none !important; +} + +/* ---- NEW: Force the Base44 button text to black ---- */ +a[href*="base44.com"] span, +a[href*="base44.com"] .text-white, +.mint-navbar a span.text-white { + color: #111111 !important; +} +/* Force the ">" icon in the Base44 button to orange for consistency and accessibility */ +a[href*="base44.com"] svg, +a[href*="base44.com"] .text-white, +a[href*="base44.com"] svg path, +.mint-navbar a svg.text-white { + color: #111111 !important; /* Works if color is set by text utility */ + fill: #111111 !important; /* Ensures SVG/path fill is overridden */ +} +/* Restore thin chevron style for the navbar's "Base44" button arrow */ +a[href*="base44.com"] svg, +.mint-navbar a svg { + color: #111111 !important; + fill: none !important; + stroke: currentColor !important; + stroke-width: 2px !important; +} +a[href*="base44.com"] path, +.mint-navbar a svg path { + color: #111111 !important; + fill: none !important; + stroke: currentColor !important; + stroke-width: 2px !important; +} +/* Make the ">" icon (chevron) in Base44 navbar button thin and on-brand */ +a[href*="base44.com"] svg, +.mint-navbar a svg { + color: #111111 !important; +} + +a[href*="base44.com"] svg path, +.mint-navbar a svg path { + color: #111111 !important; + fill: none !important; + stroke: currentColor !important; + stroke-width: 1.5 !important; /* set to the original */ + stroke-linecap: round !important; /* keep the smooth end */ +} + +/* Optional: if you want it even thinner, try 1.2 or 1 */ + +/* Always use Mintlify's built-in theme variables! */ +div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400, +div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400 span, +.card .prose, +.card .prose span, +.mint-card .prose, +.mint-card .prose span { + color: var(--mint-text-secondary) !important; +} diff --git a/scripts/mintlify-post-processing/push-to-docs-repo.js b/scripts/mintlify-post-processing/push-to-docs-repo.js new file mode 100644 index 0000000..5876860 --- /dev/null +++ b/scripts/mintlify-post-processing/push-to-docs-repo.js @@ -0,0 +1,183 @@ +#!/usr/bin/env node + +import fs from "fs"; +import path from "path"; +import os from "os"; +import { execSync } from "child_process"; + +console.debug = () => {}; // Disable debug logging. Comment this out to enable debug logging. + +const DOCS_SOURCE_PATH = path.join(import.meta.dirname, "../../docs/content"); +const TARGET_DOCS_REPO_URL = "git@github.com:base44-dev/mintlify-docs.git"; +const CATEGORY_MAP_PATH = path.join(import.meta.dirname, "./category-map.json"); + +function parseArgs() { + const args = process.argv.slice(2); + let branch = null; + + for (let i = 0; i < args.length; i++) { + const arg = args[i]; + + if (arg === "--branch" && i + 1 < args.length) { + branch = args[++i]; + } + } + return { branch }; +} + +function scanSdkDocs(sdkDocsDir) { + const result = {}; + + // Get a list of all the subdirectories in the sdkDocsDir + const subdirectories = fs.readdirSync(sdkDocsDir).filter(file => fs.statSync(path.join(sdkDocsDir, file)).isDirectory()); + console.log(`Subdirectories: ${subdirectories}`); + + for (const subdirectory of subdirectories) { + const subdirectoryPath = path.join(sdkDocsDir, subdirectory); + const files = fs.readdirSync(subdirectoryPath).filter(file => file.endsWith(".mdx")); + result[subdirectory] = files.map(file => path.basename(file, ".mdx")); + } + return result; +} + +function updateDocsJson(repoDir, sdkFiles) { + const docsJsonPath = path.join(repoDir, 'docs.json'); + let categoryMap = {}; + try { + categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, 'utf8')); + } catch (e) { + console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); + process.exit(1); + } + + console.log(`Reading docs.json from ${docsJsonPath}...`); + const docsContent = fs.readFileSync(docsJsonPath, 'utf8'); + const docs = JSON.parse(docsContent); + + // Find the "SDK Reference" tab + let sdkTab = docs.navigation.tabs.find(tab => tab.tab === 'SDK Reference'); + + if (!sdkTab) { + console.log("Could not find 'SDK Reference' tab in docs.json. Creating it..."); + sdkTab = { + tab: 'SDK Reference', + groups: [] + }; + } + + // Update the groups + const newGroups = []; + + if(sdkFiles.functions.length > 0 && categoryMap.functions) { + newGroups.push({ + group: categoryMap.functions, + pages: sdkFiles.functions.map(file => `sdk-docs/functions/${file}`) + }); + } + + if(sdkFiles.interfaces.length > 0 && categoryMap.interfaces) { + newGroups.push({ + group: categoryMap.interfaces, + pages: sdkFiles.interfaces.map(file => `sdk-docs/interfaces/${file}`) + }); + } + + if(sdkFiles.classes.length > 0 && categoryMap.classes) { + newGroups.push({ + group: categoryMap.classes, + pages: sdkFiles.classes.map(file => `sdk-docs/classes/${file}`) + }); + } + + if(sdkFiles['type-aliases'].length > 0 && categoryMap['type-aliases']) { + newGroups.push({ + group: categoryMap['type-aliases'], + pages: sdkFiles['type-aliases'].map(file => `sdk-docs/type-aliases/${file}`) + }); + } + + sdkTab.groups = newGroups; + docs.navigation.tabs.push(sdkTab); + + console.debug(`New groups for docs.json: ${JSON.stringify(newGroups, null, 2)}`); + + // Write updated docs.json + console.log(`Writing updated docs.json to ${docsJsonPath}...`); + fs.writeFileSync(docsJsonPath, JSON.stringify(docs, null, 2) + '\n', 'utf8'); + + console.log('Successfully updated docs.json'); + } + +function main() { + const { branch } = parseArgs(); + if (!branch) { + console.error("Error: --branch is required"); + process.exit(1); + } + + console.log(`Branch: ${branch}`); + + if ( + !fs.existsSync(DOCS_SOURCE_PATH) || + !fs.statSync(DOCS_SOURCE_PATH).isDirectory() + ) { + console.error(`Error: docs directory does not exist: ${DOCS_SOURCE_PATH}`); + process.exit(1); + } + + let tempRepoDir; + try{ + // Create temporary directory + tempRepoDir = fs.mkdtempSync( + path.join(os.tmpdir(), "mintlify-docs-") + ); + // Clone the repository + console.log(`Cloning repository to ${tempRepoDir}...`); + execSync(`git clone ${TARGET_DOCS_REPO_URL} ${tempRepoDir}`); + + // Check if the specified branch already exists remotely + const branchExists = execSync(`git ls-remote --heads origin ${branch}`, { + cwd: tempRepoDir, + encoding: 'utf8' + }).trim().length > 0; + + if (branchExists) { + console.log(`Branch ${branch} already exists. Checking it out...`); + execSync(`git checkout -b ${branch} origin/${branch}`, { cwd: tempRepoDir }); + } else { + console.log(`Branch ${branch} does not exist. Creating it...`); + execSync(`git checkout -b ${branch}`, { cwd: tempRepoDir }); + } + + // Remove the existing sdk-docs directory + fs.rmSync(path.join(tempRepoDir, "sdk-docs"), { recursive: true, force: true }); + + // Copy the docs directory to the temporary repository + fs.cpSync(DOCS_SOURCE_PATH, path.join(tempRepoDir, "sdk-docs"), { recursive: true }); + + // Scan the sdk-docs directory + const sdkDocsDir = path.join(tempRepoDir, "sdk-docs"); + const sdkFiles = scanSdkDocs(sdkDocsDir); + + console.debug(`SDK files: ${JSON.stringify(sdkFiles, null, 2)}`); + + // Update the docs.json file + updateDocsJson(tempRepoDir, sdkFiles); + + // Commit the changes + execSync(`git add docs.json`, { cwd: tempRepoDir }); + execSync(`git add sdk-docs`, { cwd: tempRepoDir }); + execSync(`git commit -m "Auto-updates to SDK Reference Docs"`, { cwd: tempRepoDir }); + execSync(`git push --set-upstream origin ${branch}`, { cwd: tempRepoDir }); + + console.log("Successfully committed and pushed the changes"); + } catch (e) { + console.error(`Error: Failed to commit and push changes: ${e}`); + process.exit(1); + } finally { + // Remove the temporary directory + fs.rmSync(tempRepoDir, { recursive: true, force: true }); + } +} + +main(); \ No newline at end of file diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-content.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-content.js new file mode 100644 index 0000000..6bf1e0a --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-content.js @@ -0,0 +1,124 @@ +/** + * Content transformation functions (examples, frontmatter, etc.) + */ + +/** + * Add headings to CodeGroups that don't have them + */ +export function addHeadingsToCodeGroups(content) { + const lines = content.split('\n'); + const result = []; + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + + // Check if this line contains + if (line.trim() === '' || line.includes('')) { + // Look back up to 3 lines to see if there's a heading + let hasHeading = false; + for (let j = Math.max(0, i - 3); j < i; j++) { + const prevLine = lines[j].trim(); + if (/^#{2,4}\s+/.test(prevLine)) { + hasHeading = true; + break; + } + } + + // If no heading found, add one + if (!hasHeading) { + result.push('## Examples'); + result.push(''); + } + } + + result.push(line); + } + + return result.join('\n'); +} + +/** + * Convert code examples to Mintlify CodeGroup + */ +export function convertExamplesToCodeGroup(content) { + // Match Example/Examples headings from level 2-4 and capture their content until next section + const exampleSectionRegex = /^(#{2,4})\s+(Example|Examples)\s*$([\s\S]*?)(?=^#{2,4}\s|\n<\/ResponseField>|\n\*\*\*|$(?!\n))/gm; + + return content.replace(exampleSectionRegex, (match, headingLevel, exampleHeading, exampleContent) => { + const codeBlockRegex = /```([\w-]*)\s*([^\n]*)\n([\s\S]*?)```/g; + const examples = []; + let codeMatch; + + while ((codeMatch = codeBlockRegex.exec(exampleContent)) !== null) { + const language = codeMatch[1] || 'typescript'; + const titleFromCodeFence = codeMatch[2].trim(); + const code = codeMatch[3].trimEnd(); + + let title; + if (titleFromCodeFence && titleFromCodeFence.length > 0 && titleFromCodeFence.length < 100) { + // Strip comment markers from title (e.g., "// Basic example" -> "Basic example") + title = titleFromCodeFence.replace(/^\/\/\s*/, '').replace(/^\/\*\s*|\s*\*\/$/g, '').trim(); + } else { + title = examples.length === 0 ? 'Example' : `Example ${examples.length + 1}`; + } + + examples.push({ + title, + language, + code, + }); + } + + if (examples.length === 0) { + return match; + } + + // Use the original heading level, default to ## if not specified + const headingPrefix = headingLevel || '##'; + // Use "Examples" if multiple examples, otherwise "Example" + const headingText = examples.length > 1 ? 'Examples' : 'Example'; + + let codeGroup = `${headingPrefix} ${headingText}\n\n\n\n`; + + for (const example of examples) { + codeGroup += '```' + example.language + ' ' + example.title + '\n'; + codeGroup += example.code + '\n'; + codeGroup += '```\n\n'; + } + + codeGroup += '\n'; + + return codeGroup; + }); +} + +/** + * Add Mintlify frontmatter to the page + */ +export function addMintlifyFrontmatter(content, page) { + const titleMatch = content.match(/^#\s+(.+)$/m); + let title = titleMatch ? titleMatch[1].trim() : page?.model?.name || 'Documentation'; + + // Clean up title + title = title.replace(/\*\*/g, '').replace(/`/g, '').trim(); + title = title.replace(/^(?:Interface|Class|Type|Module|Function|Variable|Constant|Enum):\s*/i, '').trim(); + + const escapeYaml = (str) => { + if (str.includes(':') || str.includes('"') || str.includes("'") || str.includes('\n')) { + return str.replace(/"/g, '\\"'); + } + return str; + }; + + const frontmatter = `--- +title: "${escapeYaml(title)}" +--- + +`; + + // Remove the original h1 title (it's now in frontmatter) + const processedContent = content.replace(/^#\s+.+\n\n?/, ''); + + return frontmatter + processedContent; +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js new file mode 100644 index 0000000..5f9b028 --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js @@ -0,0 +1,383 @@ +/** + * Linked type extraction and property parsing functions + */ + +import * as fs from 'fs'; +import * as path from 'path'; +import { ReflectionKind } from 'typedoc'; + +/** + * Extract properties from a linked type using TypeDoc's reflection API + */ +export function extractPropertiesFromLinkedType(linkedTypeInfo, context) { + if (!linkedTypeInfo || !context) { + return []; + } + + const { typeName } = linkedTypeInfo; + const { app, page } = context; + + try { + // First, try to get the type from TypeDoc's reflection API + if (app && page && page.model) { + const properties = extractPropertiesFromReflection(typeName, app, page); + if (properties.length > 0) { + return properties; + } + } + + // Fallback: try to read from generated markdown file + return extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + } catch (error) { + console.warn(`Error extracting properties for type ${typeName}:`, error.message); + return []; + } +} + +/** + * Extract properties from TypeDoc's reflection API (preferred method) + */ +function extractPropertiesFromReflection(typeName, app, page) { + try { + // Access the project through the page's model + const project = page.model?.project; + if (!project) { + return []; + } + + // Find the type reflection in the project + const typeReflection = findReflectionByName(project, typeName); + if (!typeReflection) { + return []; + } + + // Extract properties from the reflection + const properties = []; + + // For interfaces and type aliases with properties + if (typeReflection.children) { + for (const child of typeReflection.children) { + if (child.kind === ReflectionKind.Property) { + const property = { + name: child.name, + type: getTypeString(child.type), + description: child.comment?.summary?.map(p => p.text).join('') || '', + optional: isOptional(child), + nested: [] + }; + + // Check for nested properties if the type is an object + if (child.type && isObjectLikeType(child.type)) { + property.nested = extractNestedProperties(child.type); + } + + properties.push(property); + } + } + } + + return properties; + } catch (error) { + console.warn(`Error extracting properties from reflection for ${typeName}:`, error.message); + return []; + } +} + +/** + * Find a reflection by name in the project + */ +function findReflectionByName(reflection, name) { + if (reflection.name === name) { + return reflection; + } + + if (reflection.children) { + for (const child of reflection.children) { + const found = findReflectionByName(child, name); + if (found) return found; + } + } + + return null; +} + +/** + * Get a string representation of a type + */ +function getTypeString(type) { + if (!type) return 'any'; + + switch (type.type) { + case 'intrinsic': + return type.name; + case 'reference': + return type.name; + case 'array': + return `${getTypeString(type.elementType)}[]`; + case 'union': + return type.types?.map(t => getTypeString(t)).join(' | ') || 'any'; + case 'intersection': + return type.types?.map(t => getTypeString(t)).join(' & ') || 'any'; + case 'literal': + return JSON.stringify(type.value); + case 'reflection': + return 'object'; + default: + return type.name || 'any'; + } +} + +/** + * Check if a property is optional + */ +function isOptional(child) { + return child.flags?.isOptional || false; +} + +/** + * Check if a type is object-like (has properties) + */ +function isObjectLikeType(type) { + return type.type === 'reflection' && type.declaration?.children; +} + +/** + * Extract nested properties from an object type + */ +function extractNestedProperties(type) { + if (!isObjectLikeType(type)) { + return []; + } + + const nested = []; + if (type.declaration?.children) { + for (const child of type.declaration.children) { + if (child.kind === ReflectionKind.Property) { + nested.push({ + name: child.name, + type: getTypeString(child.type), + description: child.comment?.summary?.map(p => p.text).join('') || '', + optional: isOptional(child) + }); + } + } + } + + return nested; +} + +/** + * Fallback: Extract properties from a linked type's markdown file + */ +function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) { + const { typePath, typeName } = linkedTypeInfo; + const { currentPagePath, app } = context; + + if (!app || !app.options) { + return []; + } + + try { + // Get the output directory from TypeDoc (usually 'docs') + const outputDir = app.options.getValue('out') || 'docs'; + + // Convert relative link to file path + // Links can be: + // - Just the type name: "LoginViaEmailPasswordResponse" + // - Relative path: "../interfaces/LoginViaEmailPasswordResponse" or "./interfaces/LoginViaEmailPasswordResponse" + // - Absolute-looking: "interfaces/LoginViaEmailPasswordResponse" + let filePath; + + // Remove .md or .mdx extension if present + let cleanTypePath = typePath.replace(/\.(md|mdx)$/, ''); + + if (cleanTypePath.startsWith('../') || cleanTypePath.startsWith('./')) { + // Relative path - resolve from current page's directory + const currentDir = path.dirname(path.join(outputDir, currentPagePath || '')); + const basePath = path.resolve(currentDir, cleanTypePath); + + // Try .mdx first, then .md + if (!basePath.endsWith('.md') && !basePath.endsWith('.mdx')) { + const mdxPath = basePath + '.mdx'; + const mdPath = basePath + '.md'; + filePath = fs.existsSync(mdxPath) ? mdxPath : mdPath; + } else { + filePath = basePath; + } + } else if (cleanTypePath.includes('/')) { + // Path with directory separator + filePath = path.join(outputDir, cleanTypePath); + + // Try .mdx first, then .md + if (!filePath.endsWith('.md') && !filePath.endsWith('.mdx')) { + const mdxPath = filePath + '.mdx'; + const mdPath = filePath + '.md'; + filePath = fs.existsSync(mdxPath) ? mdxPath : mdPath; + } + } else { + // Just the type name - try interfaces/ first, then type-aliases/ + // Try .mdx first, then .md + filePath = path.join(outputDir, 'interfaces', cleanTypePath + '.mdx'); + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'interfaces', cleanTypePath + '.md'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', cleanTypePath + '.mdx'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', cleanTypePath + '.md'); + } + } + + // Normalize the path + filePath = path.normalize(filePath); + + // Check if file exists + if (!fs.existsSync(filePath)) { + // Don't warn during generation - the file might not exist yet + return []; + } + + const content = fs.readFileSync(filePath, 'utf-8'); + return parsePropertiesFromTypeFile(content); + } catch (error) { + // Silent failure during generation + return []; + } +} + +/** + * Parse properties from a type file's markdown content + */ +function parsePropertiesFromTypeFile(content) { + const properties = []; + const lines = content.split('\n'); + + // Find the Properties section + let inPropertiesSection = false; + let i = 0; + + while (i < lines.length) { + const line = lines[i]; + + // Start of Properties section + if (line.match(/^##\s+Properties\s*$/)) { + inPropertiesSection = true; + i++; + continue; + } + + // Stop at next top-level heading (##) + if (inPropertiesSection && line.match(/^##\s+/) && !line.match(/^##\s+Properties\s*$/)) { + break; + } + + // Parse property: ### propertyName or ### propertyName? + if (inPropertiesSection && line.match(/^###\s+/)) { + const propMatch = line.match(/^###\s+(.+)$/); + if (propMatch) { + const rawName = propMatch[1].trim(); + const optional = rawName.endsWith('?'); + // Unescape markdown escapes (e.g., access\_token -> access_token) + let name = optional ? rawName.slice(0, -1).trim() : rawName.trim(); + name = name.replace(/\\_/g, '_').replace(/\\\*/g, '*').replace(/\\`/g, '`'); + + i++; + // Skip blank lines + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + // Get type from next line: > **name**: `type` or > `optional` **name**: `type` + let type = 'any'; + if (i < lines.length && lines[i].includes('`')) { + const typeMatch = lines[i].match(/`([^`]+)`/); + if (typeMatch) { + type = typeMatch[1].trim(); + } + i++; + } + + // Skip blank lines + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + // Collect description and nested properties + const descriptionLines = []; + const nested = []; + + // Look for nested properties (#### heading) + while (i < lines.length) { + const nextLine = lines[i]; + // Stop at next property (###) or section end (## or ***) + if (nextLine.match(/^###\s+/) || nextLine.match(/^##\s+/) || nextLine === '***') { + break; + } + + // Check for nested property (####) + if (nextLine.match(/^####\s+/)) { + const nestedMatch = nextLine.match(/^####\s+(.+)$/); + if (nestedMatch) { + const nestedRawName = nestedMatch[1].trim(); + const nestedOptional = nestedRawName.endsWith('?'); + // Unescape markdown escapes + let nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + nestedName = nestedName.replace(/\\_/g, '_').replace(/\\\*/g, '*').replace(/\\`/g, '`'); + + i++; + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + let nestedType = 'any'; + if (i < lines.length && lines[i].includes('`')) { + const nestedTypeMatch = lines[i].match(/`([^`]+)`/); + if (nestedTypeMatch) { + nestedType = nestedTypeMatch[1].trim(); + } + i++; + } + + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + const nestedDescLines = []; + while (i < lines.length && !lines[i].match(/^####\s+/) && !lines[i].match(/^###\s+/) && + !lines[i].match(/^##\s+/) && lines[i] !== '***') { + nestedDescLines.push(lines[i]); + i++; + } + + nested.push({ + name: nestedName, + type: nestedType, + description: nestedDescLines.join('\n').trim(), + optional: nestedOptional + }); + continue; + } + } + + descriptionLines.push(nextLine); + i++; + } + + properties.push({ + name, + type, + description: descriptionLines.join('\n').trim(), + optional, + nested + }); + continue; + } + } + + i++; + } + + return properties; +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js new file mode 100644 index 0000000..ea375d6 --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js @@ -0,0 +1,550 @@ +/** + * Parameter conversion functions for TypeDoc Mintlify plugin + */ + +import { escapeAttribute } from './typedoc-mintlify-utils.js'; +import { extractPropertiesFromLinkedType } from './typedoc-mintlify-linked-types.js'; +import * as fs from 'fs'; +import * as path from 'path'; + +// Helper function to resolve type paths (similar to returns file) +function resolveTypePath(typeName, app, currentPagePath = null) { + const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; + + // Skip primitive types + if (PRIMITIVE_TYPES.includes(typeName)) { + return null; + } + + if (!app || !app.options) { + return null; + } + + const outputDir = app.options.getValue('out') || 'docs'; + + // Try interfaces/ first, then type-aliases/ + let filePath = path.join(outputDir, 'interfaces', typeName + '.mdx'); + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'interfaces', typeName + '.md'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', typeName + '.mdx'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', typeName + '.md'); + } + + if (fs.existsSync(filePath)) { + // Convert to relative path from current page if possible + if (currentPagePath) { + const currentDir = path.dirname(path.join(outputDir, currentPagePath)); + const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); + return relativePath.startsWith('.') ? relativePath : './' + relativePath; + } + // Otherwise return path relative to outputDir + return path.relative(outputDir, filePath).replace(/\\/g, '/'); + } + + return null; +} + +/** + * Convert top-level function parameters (## Parameters with ### param names) + */ +export function convertFunctionParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + // Split content by ## headings to isolate the Parameters section + const sections = content.split(/\n(?=##\s+\w)/); + + return sections.map(section => { + // Only process ## Parameters sections (must start with exactly ##, not ###) + if (!section.match(/^##\s+Parameters\s*$/m)) { + return section; + } + + // Extract the content after "## Parameters" + const lines = section.split('\n'); + const paramStartIdx = lines.findIndex(l => l.match(/^##\s+Parameters\s*$/)); + + if (paramStartIdx === -1) return section; + + // Get everything after "## Parameters" line + const paramLines = lines.slice(paramStartIdx + 1); + const paramContent = paramLines.join('\n'); + + // Parse parameters with context for linked type resolution + const context = app && page ? { app, page, currentPagePath: page.url } : null; + const params = parseParametersWithExpansion(paramContent, '###', '####', context, linkedTypeNames, writeLinkedTypesFile); + + if (params.length === 0) return section; + + // Rebuild section with ParamFields + const beforeParams = lines.slice(0, paramStartIdx + 1).join('\n'); + return beforeParams + '\n\n' + buildParamFieldsSection(params, linkedTypeNames, writeLinkedTypesFile); + }).join('\n'); +} + +/** + * Convert interface method parameters (#### Parameters with ##### param names) + */ +export function convertInterfaceMethodParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + const context = app && page ? { app, page, currentPagePath: page.url } : null; + return rewriteParameterSections(content, '#### Parameters', '#####', '######', context, linkedTypeNames, writeLinkedTypesFile); +} + +/** + * Convert class method parameters (#### Parameters with ##### param names) + */ +export function convertClassMethodParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + const context = app && page ? { app, page, currentPagePath: page.url } : null; + return rewriteParameterSections(content, '#### Parameters', '#####', '######', context, linkedTypeNames, writeLinkedTypesFile); +} + +function rewriteParameterSections(content, sectionHeading, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + const lines = content.split('\n'); + const result = []; + let i = 0; + + const isTerminatorLine = (line) => { + return ( + line.startsWith('#### Returns') || + line.startsWith('#### Example') || + line === '***' || + line.startsWith('### ') || + line.startsWith('## ') + ); + }; + + while (i < lines.length) { + const line = lines[i]; + if (line.startsWith(sectionHeading)) { + result.push(line); + i++; + const sectionStart = i; + while (i < lines.length && !isTerminatorLine(lines[i])) { + i++; + } + const sectionContentLines = lines.slice(sectionStart, i); + const sectionContent = sectionContentLines.join('\n').trim(); + // Use parseParametersWithExpansion if context is available, otherwise use parseParameters + const params = context + ? parseParametersWithExpansion(sectionContent, paramLevel, nestedLevel, context, linkedTypeNames, writeLinkedTypesFile) + : parseParameters(sectionContent, paramLevel, nestedLevel, context, linkedTypeNames, writeLinkedTypesFile); + if (params.length > 0) { + const block = buildParamFieldsSection(params, linkedTypeNames, writeLinkedTypesFile).trim(); + if (block) { + result.push(''); + result.push(...block.split('\n')); + result.push(''); + } + } else { + result.push(...sectionContentLines); + } + continue; + } + + result.push(line); + i++; + } + + return result.join('\n'); +} + +/** + * Parse parameters with type expansion (for functions) + */ +function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + const lines = paramContent.split('\n'); + const params = []; + + const isParamHeading = (line) => line.startsWith(paramLevel + ' '); + const isNestedHeading = nestedLevel ? (line) => line.startsWith(nestedLevel + ' ') : () => false; + const isTerminator = (line) => { + const trimmed = line.trim(); + if (!trimmed) return false; + if (trimmed.startsWith('#### Returns') || trimmed.startsWith('#### Example') || trimmed === '***') { + return true; + } + const nestedPrefix = nestedLevel ? nestedLevel + ' ' : null; + if (/^#{1,3}\s+/.test(trimmed)) { + if (!trimmed.startsWith(paramLevel + ' ') && !(nestedPrefix && trimmed.startsWith(nestedPrefix))) { + return true; + } + } + return false; + }; + + const extractType = (line) => { + if (!line) return null; + const trimmed = line.trim(); + + // Handle [`TypeName`](link) format first (backticks inside the link) + const linkWithBackticksMatch = trimmed.match(/^\[`([^`]+)`\]\(([^)]+)\)$/); + if (linkWithBackticksMatch) { + return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; + } + + // Handle simple `TypeName` format + if (!trimmed.startsWith('`')) return null; + const simpleMatch = trimmed.match(/^`([^`]+)`$/); + if (simpleMatch) { + return { type: simpleMatch[1], link: null }; + } + return null; + }; + + let i = 0; + while (i < lines.length) { + const line = lines[i]; + if (!isParamHeading(line)) { + i++; + continue; + } + + let rawName = line.slice(paramLevel.length).trim(); + const optional = rawName.endsWith('?'); + const cleanName = optional ? rawName.slice(0, -1).trim() : rawName.trim(); + i++; + + // Skip blank lines + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + let type = 'any'; + let typeLink = null; + if (i < lines.length) { + const maybeType = extractType(lines[i]); + if (maybeType) { + if (typeof maybeType === 'object') { + type = maybeType.type; + typeLink = maybeType.link; + } else { + type = maybeType; + } + i++; + } + } + + // Skip blank lines after type + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + const descriptionLines = []; + while (i < lines.length && !isParamHeading(lines[i]) && !isNestedHeading(lines[i]) && !isTerminator(lines[i])) { + descriptionLines.push(lines[i]); + i++; + } + + // Check if we should expand this type inline + let linkedTypeInfo = typeLink ? { typeName: type, typePath: typeLink } : null; + let nested = []; + + // If we don't have a link but have a non-primitive type, try to resolve it + if (!linkedTypeInfo && type && type !== 'any' && context && context.app) { + const simpleTypeName = type.replace(/[<>\[\]]/g, '').trim(); + const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + // Try to resolve the type path + const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + // Track the type even if we can't resolve the path - it might be a linked type + linkedTypeInfo = { typeName: simpleTypeName, typePath: typePath || simpleTypeName }; + + // Track linked types for suppression + } + } + + // Track linked types for suppression (for types with explicit links) + + // Try to extract properties from the linked type + if (linkedTypeInfo && context) { + const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + if (properties.length > 0) { + // Convert properties to nested format + nested = properties.map(prop => ({ + name: prop.name, + type: prop.type, + description: prop.description, + optional: prop.optional + })); + } + } + + // If no linked properties were found, check for manually specified nested fields + if (nested.length === 0) { + while (i < lines.length && isNestedHeading(lines[i])) { + let nestedRawName = lines[i].slice(nestedLevel.length).trim(); + const nestedOptional = nestedRawName.endsWith('?'); + const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + i++; + + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + let nestedType = 'any'; + if (i < lines.length) { + const maybeNestedType = extractType(lines[i]); + if (maybeNestedType) { + if (typeof maybeNestedType === 'object') { + nestedType = maybeNestedType.type; + } else { + nestedType = maybeNestedType; + } + i++; + } + } + + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + const nestedDescLines = []; + while (i < lines.length && !isNestedHeading(lines[i]) && !isParamHeading(lines[i]) && !isTerminator(lines[i])) { + nestedDescLines.push(lines[i]); + i++; + } + + nested.push({ + name: nestedName, + type: nestedType, + description: nestedDescLines.join('\n').trim(), + optional: nestedOptional + }); + } + } + + params.push({ + name: cleanName, + type: type, + description: descriptionLines.join('\n').trim(), + optional, + nested + }); + } + + return params; +} + +/** + * Parse parameters from markdown content (for interface/class methods - no expansion) + */ +function parseParameters(paramContent, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + const lines = paramContent.split('\n'); + const params = []; + + const isParamHeading = (line) => line.startsWith(paramLevel + ' '); + const isNestedHeading = nestedLevel ? (line) => line.startsWith(nestedLevel + ' ') : () => false; + const isTerminator = (line) => { + const trimmed = line.trim(); + if (!trimmed) return false; + if (trimmed.startsWith('#### Returns') || trimmed.startsWith('#### Example') || trimmed === '***') { + return true; + } + const nestedPrefix = nestedLevel ? nestedLevel + ' ' : null; + if (/^#{1,3}\s+/.test(trimmed)) { + if (!trimmed.startsWith(paramLevel + ' ') && !(nestedPrefix && trimmed.startsWith(nestedPrefix))) { + return true; + } + } + return false; + }; + + const extractType = (line) => { + if (!line) return null; + const trimmed = line.trim(); + + // Handle [`TypeName`](link) format first (backticks inside the link) + const linkWithBackticksMatch = trimmed.match(/^\[`([^`]+)`\]\(([^)]+)\)$/); + if (linkWithBackticksMatch) { + return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; + } + + // Handle simple `TypeName` format + if (!trimmed.startsWith('`')) return null; + const simpleMatch = trimmed.match(/^`([^`]+)`$/); + if (simpleMatch) { + return { type: simpleMatch[1], link: null }; + } + return null; + }; + + let i = 0; + while (i < lines.length) { + const line = lines[i]; + if (!isParamHeading(line)) { + i++; + continue; + } + + let rawName = line.slice(paramLevel.length).trim(); + const optional = rawName.endsWith('?'); + const cleanName = optional ? rawName.slice(0, -1).trim() : rawName.trim(); + i++; + + // Skip blank lines + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + let type = 'any'; + let typeLink = null; + if (i < lines.length) { + const maybeType = extractType(lines[i]); + if (maybeType) { + if (typeof maybeType === 'object') { + type = maybeType.type; + typeLink = maybeType.link; + } else { + type = maybeType; + } + i++; + } + } + + // Skip blank lines after type + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + const descriptionLines = []; + while (i < lines.length && !isParamHeading(lines[i]) && !isNestedHeading(lines[i]) && !isTerminator(lines[i])) { + descriptionLines.push(lines[i]); + i++; + } + + // Check if we should expand this type inline + const linkedTypeInfo = typeLink ? { typeName: type, typePath: typeLink } : null; + let nested = []; + + // Try to extract properties from the linked type + if (linkedTypeInfo && context) { + const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + if (properties.length > 0) { + // Convert properties to nested format + nested = properties.map(prop => ({ + name: prop.name, + type: prop.type, + description: prop.description, + optional: prop.optional + })); + // Keep the type as the original type name (without expanding to 'object') + // This preserves the type name in the ParamField + } + } + + // If no linked properties were found, check for manually specified nested fields + if (nested.length === 0) { + while (i < lines.length && isNestedHeading(lines[i])) { + let nestedRawName = lines[i].slice(nestedLevel.length).trim(); + const nestedOptional = nestedRawName.endsWith('?'); + const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + i++; + + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + let nestedType = 'any'; + if (i < lines.length) { + const maybeNestedType = extractType(lines[i]); + if (maybeNestedType) { + if (typeof maybeNestedType === 'object') { + nestedType = maybeNestedType.type; + } else { + nestedType = maybeNestedType; + } + i++; + } + } + + while (i < lines.length && lines[i].trim() === '') { + i++; + } + + const nestedDescLines = []; + while (i < lines.length && !isNestedHeading(lines[i]) && !isParamHeading(lines[i]) && !isTerminator(lines[i])) { + nestedDescLines.push(lines[i]); + i++; + } + + nested.push({ + name: nestedName, + type: nestedType, + description: nestedDescLines.join('\n').trim(), + optional: nestedOptional + }); + } + } + + params.push({ + name: cleanName, + type: nested.length > 0 ? type : type, // Keep original type name + description: descriptionLines.join('\n').trim(), + optional, + nested + }); + } + + return params; +} + +/** + * Build ParamField components from parsed parameters + */ +function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedTypesFile = null) { + if (!params || params.length === 0) { + return ''; + } + + const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; + + let fieldsOutput = ''; + + for (const param of params) { + const requiredAttr = param.optional ? '' : ' required'; + + // Track non-primitive parameter types for suppression + + fieldsOutput += `\n`; + + // Always show description in ParamField if it exists + if (param.description) { + fieldsOutput += `\n${param.description}\n`; + } + + fieldsOutput += '\n\n'; + + // If param has nested fields, wrap them in an Accordion + if (param.nested.length > 0) { + // Accordion title is always "Properties" + fieldsOutput += `\n\n\n`; + + for (const nested of param.nested) { + const requiredAttr = nested.optional ? '' : ' required'; + fieldsOutput += `\n`; + + if (nested.description) { + fieldsOutput += `\n${nested.description}\n`; + } + + fieldsOutput += '\n\n\n'; + } + + fieldsOutput += '\n\n'; + } else { + fieldsOutput += '\n'; + } + } + + // Wrap multiple parameters in an Accordion (but not single parameters, even if they have nested fields) + const hasMultipleParams = params.length > 1; + + if (hasMultipleParams) { + return `\n\n${fieldsOutput.trim()}\n`; + } + + return fieldsOutput; +} + + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js new file mode 100644 index 0000000..85a613f --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js @@ -0,0 +1,189 @@ +/** + * TypeDoc plugin for Mintlify MDX output + * Hooks into TypeDoc's markdown renderer to customize output for Mintlify + */ + +import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; +import { ReflectionKind, RendererEvent } from 'typedoc'; +import * as fs from 'fs'; +import * as path from 'path'; +import { convertFunctionParameters, convertInterfaceMethodParameters, convertClassMethodParameters } from './typedoc-mintlify-parameters.js'; +import { convertFunctionReturns, convertInterfaceMethodReturns, convertClassMethodReturns } from './typedoc-mintlify-returns.js'; +import { convertExamplesToCodeGroup, addMintlifyFrontmatter, addHeadingsToCodeGroups } from './typedoc-mintlify-content.js'; + +/** + * Plugin load function called by TypeDoc + */ +// Track interfaces that are linked types and should be suppressed +const linkedTypeNames = new Set(); + +/** + * Load function called by TypeDoc + */ +export function load(app) { + console.log('Loading Mintlify TypeDoc plugin...'); + + app.renderer.on(MarkdownPageEvent.END, (page) => { + if (!page.contents) return; + + let content = page.contents; + + // Determine what kind of page this is. + const isFunction = page.model?.kind === ReflectionKind.Function; + const isClass = page.model?.kind === ReflectionKind.Class; + const isInterface = page.model?.kind === ReflectionKind.Interface; + + + // 1. Remove breadcrumbs navigation + content = content.replace(/^\[.*?\]\(.*?\)\s*\n+/m, ''); + + // 2. Convert parameters to ParamField components and returns to ResponseField components + // Functions: ## Parameters/Returns with ### field names + // Interface methods: #### Parameters/Returns with ##### field names + // Class methods: #### Parameters/Returns with ##### field names + const writeLinkedTypesFile = createWriteLinkedTypesFile(app); + + if (isFunction) { + content = convertFunctionParameters(content, app, page, linkedTypeNames, writeLinkedTypesFile); + content = convertFunctionReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + } else if (isInterface) { + content = convertInterfaceMethodParameters(content, app, page); + content = convertInterfaceMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + } else if (isClass) { + content = convertClassMethodParameters(content, app, page); + content = convertClassMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + } + + // 3. Convert code examples to CodeGroup + content = convertExamplesToCodeGroup(content); + + // 3a. Add headings to CodeGroups that don't have them + content = addHeadingsToCodeGroups(content); + + // 4. Remove links from function signatures (convert [`TypeName`](link) to `TypeName`) + content = content.replace(/\[`([^`]+)`\]\([^)]+\)/g, '`$1`'); + + // 5. Remove .md and .mdx extensions from links + content = content.replace(/\[([^\]]+)\]\(([^)]+)\.mdx?\)/g, '[$1]($2)'); + + // 6. Add on-page navigation panel + content = addOnThisPagePanel(content, page); + + // 7. Add frontmatter + content = addMintlifyFrontmatter(content, page); + + page.contents = content; + }); + + // Write linked types file once at the end of all processing + app.renderer.on(MarkdownPageEvent.END, () => { + // This will run after all pages are processed + // We'll write the file in a different event + }); + + // Write linked types file after all pages are processed + app.renderer.on(RendererEvent.END, () => { + const writeLinkedTypesFile = createWriteLinkedTypesFile(app); + writeLinkedTypesFile(); + }); +} + +/** + * Write linked types file + */ +function createWriteLinkedTypesFile(app) { + return () => { + if (!app || !app.options) { + return; + } + const outputDir = app.options.getValue('out') || 'docs'; + const resolvedOutputDir = path.resolve(outputDir); + const linkedTypesFile = path.join(resolvedOutputDir, '.linked-types.json'); + try { + // Ensure content directory exists + if (!fs.existsSync(resolvedOutputDir)) { + fs.mkdirSync(resolvedOutputDir, { recursive: true }); + } + fs.writeFileSync(linkedTypesFile, JSON.stringify(Array.from(linkedTypeNames)), 'utf-8'); + } catch (e) { + // Ignore errors writing the file + console.warn('Warning: Could not write linked types file:', e.message); + } + }; +} + +/** + * Insert a Mintlify Panel with links to method headings (###) for type docs + */ +function addOnThisPagePanel(content, page) { + const links = getPanelLinksForPage(page, content); + if (!links || links.length === 0) { + return content; + } + if (content.includes(' **On this page**')) { + return content; + } + + const panelLines = [ + '', + '', + ' **On this page**', + '', + ...links.map(({ heading, anchor }) => `- [${heading}](#${anchor})`), + '', + '', + '' + ]; + + const panelBlock = panelLines.join('\n'); + const firstSectionIndex = content.indexOf('\n## '); + if (firstSectionIndex === -1) { + return `${content}\n\n${panelBlock}`; + } + const insertionPoint = firstSectionIndex + 1; + return `${content.slice(0, insertionPoint)}${panelBlock}${content.slice(insertionPoint)}`; +} + +function getPanelLinksForPage(page, content) { + if (!page?.model || !page.url) { + return null; + } + if (isTypeDoc(page)) { + return extractHeadings(content, /^###\s+(.+?)\s*$/gm); + } + if (isFunctionDoc(page)) { + return extractHeadings(content, /^##\s+(.+?)\s*$/gm); + } + return null; +} + +function isTypeDoc(page) { + const allowedKinds = new Set([ReflectionKind.Interface, ReflectionKind.Class]); + return allowedKinds.has(page.model.kind) && + (page.url.startsWith('interfaces/') || page.url.startsWith('classes/')); +} + +function isFunctionDoc(page) { + return page.model.kind === ReflectionKind.Function && page.url.startsWith('functions/'); +} + +function extractHeadings(content, regex) { + const headings = []; + let match; + while ((match = regex.exec(content)) !== null) { + const heading = match[1].trim(); + if (!heading) { + continue; + } + headings.push({ heading, anchor: slugifyHeading(heading) }); + } + return headings; +} + +function slugifyHeading(text) { + return text + .toLowerCase() + .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, '') + .replace(/\s+/g, '-'); +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js new file mode 100644 index 0000000..6dd0dea --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js @@ -0,0 +1,819 @@ +/** + * Return/Response field conversion functions for TypeDoc Mintlify plugin + */ + +import * as fs from 'fs'; +import * as path from 'path'; +import { extractPropertiesFromLinkedType } from './typedoc-mintlify-linked-types.js'; +import { escapeAttribute } from './typedoc-mintlify-utils.js'; + +const PRIMITIVE_TYPES = [ + 'any', + 'string', + 'number', + 'boolean', + 'void', + 'null', + 'undefined', + 'object', + 'Array', + 'Promise', +]; + +/** + * Extract signature information from content lines + */ +/** + * Try to resolve a type name to a documentation file path + */ +function resolveTypePath(typeName, app, currentPagePath = null) { + // Skip primitive types + if (PRIMITIVE_TYPES.includes(typeName)) { + return null; + } + + if (!app || !app.options) { + return null; + } + + const outputDir = app.options.getValue('out') || 'docs'; + + // Try interfaces/ first, then type-aliases/ + let filePath = path.join(outputDir, 'interfaces', typeName + '.mdx'); + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'interfaces', typeName + '.md'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', typeName + '.mdx'); + } + if (!fs.existsSync(filePath)) { + filePath = path.join(outputDir, 'type-aliases', typeName + '.md'); + } + + if (fs.existsSync(filePath)) { + // Convert to relative path from current page if possible + if (currentPagePath) { + const currentDir = path.dirname(path.join(outputDir, currentPagePath)); + const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); + return relativePath.startsWith('.') ? relativePath : './' + relativePath; + } + // Otherwise return path relative to outputDir + return path.relative(outputDir, filePath).replace(/\\/g, '/'); + } + + return null; +} + +export function extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, currentPagePath = null) { + const signatureMap = new Map(); + const linkedTypeMap = new Map(); + + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + // Match function signature: > **methodName**(...): `returnType` or `returnType`\<`generic`\> + // Handle both simple types and generic types like `Promise`\<`any`\> or `Promise`\<[`TypeName`](link)\> + const sigMatch = line.match(/^>\s*\*\*(\w+)\*\*\([^)]*\):\s*`([^`]+)`(?:\\<(.+?)\\>)?/); + if (sigMatch) { + const methodName = sigMatch[1]; + let returnType = sigMatch[2]; + const genericParam = sigMatch[3]; + + // Check if generic parameter is a markdown link: [`TypeName`](link) + if (genericParam) { + const linkMatch = genericParam.match(/\[`([^`]+)`\]\(([^)]+)\)/); + if (linkMatch) { + const linkedTypeName = linkMatch[1]; + const linkedTypePath = linkMatch[2]; + returnType = `${returnType}<${linkedTypeName}>`; + linkedTypeMap.set(i, { typeName: linkedTypeName, typePath: linkedTypePath }); + // Track this type name so we can suppress its documentation page + if (linkedTypeNames) { + linkedTypeNames.add(linkedTypeName); + if (writeLinkedTypesFile) writeLinkedTypesFile(); + } + } else { + // Simple generic type without link - try to resolve it + const simpleGeneric = genericParam.replace(/`/g, '').trim(); + returnType = `${returnType}<${simpleGeneric}>`; + + // Try to resolve the type to a documentation file + const typePath = resolveTypePath(simpleGeneric, app, currentPagePath); + if (typePath) { + linkedTypeMap.set(i, { typeName: simpleGeneric, typePath: typePath }); + if (linkedTypeNames) { + linkedTypeNames.add(simpleGeneric); + if (writeLinkedTypesFile) writeLinkedTypesFile(); + } + } + } + } + // Store the return type with the signature line index as the key + signatureMap.set(i, returnType); + + // If we don't already have linked type info (e.g., non-generic return), + // try to resolve the return type to a documentation file + if (!linkedTypeMap.has(i)) { + const simpleTypeName = getSimpleTypeName(returnType); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + let typePath = resolveTypePath(simpleTypeName, app, currentPagePath); + if (!typePath) { + // Fallback to the raw type name so downstream parsing can still attempt resolution + typePath = simpleTypeName; + } + linkedTypeMap.set(i, { typeName: simpleTypeName, typePath }); + if (linkedTypeNames) { + linkedTypeNames.add(simpleTypeName); + if (writeLinkedTypesFile) writeLinkedTypesFile(); + } + } + } + } + } + + return { signatureMap, linkedTypeMap }; +} + +/** + * Convert function returns + */ +export function convertFunctionReturns(content, app, page, linkedTypeNames = null, writeLinkedTypesFile = null) { + // For functions, we need to extract signature info with linked types + const lines = content.split('\n'); + // Use provided linkedTypeNames Set or create a local one + const localLinkedTypeNames = linkedTypeNames || new Set(); + const localWriteLinkedTypesFile = writeLinkedTypesFile || (() => {}); + const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, localLinkedTypeNames, localWriteLinkedTypesFile, app, page?.url); + + return rewriteReturnSections(content, { + heading: '## Returns', + fieldHeading: '###', + nestedHeading: '####', + stopOnLevel3: false, + signatureMap, + linkedTypeMap, + app, + page, + linkedTypeNames: localLinkedTypeNames, + writeLinkedTypesFile: localWriteLinkedTypesFile, + }); +} + +/** + * Convert interface method returns + */ +export function convertInterfaceMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile) { + const lines = content.split('\n'); + const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, page?.url); + + return rewriteReturnSections(content, { + heading: '#### Returns', + fieldHeading: '#####', + nestedHeading: '######', + stopOnLevel3: true, + signatureMap, + linkedTypeMap, + app, + page, + }); +} + +/** + * Convert class method returns + */ +export function convertClassMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile) { + const lines = content.split('\n'); + const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, page?.url); + + return rewriteReturnSections(content, { + heading: '#### Returns', + fieldHeading: '#####', + nestedHeading: '######', + stopOnLevel3: true, + signatureMap, + linkedTypeMap, + app, + page, + }); +} + +function rewriteReturnSections(content, options) { + const { + heading, + fieldHeading, + nestedHeading, + stopOnLevel3, + signatureMap = new Map(), + linkedTypeMap = new Map(), + app, + page, + linkedTypeNames = null, + writeLinkedTypesFile = null + } = options; + const lines = content.split('\n'); + const result = []; + let i = 0; + + const isTerminatorLine = (line) => { + const trimmed = line.trim(); + if (!trimmed) return false; + if (trimmed.match(/^#{2,4}\s+Examples?/i) || trimmed === '***') { + return true; + } + if (heading !== '## Returns' && trimmed.startsWith('## ')) { + return true; + } + // For function Returns, stop at nested method definitions (#### methodName()) + if (heading === '## Returns' && trimmed.match(/^####\s+\w+\.?\w*\(\)/)) { + return true; + } + if (stopOnLevel3 && trimmed.startsWith('### ')) { + return true; + } + return false; + }; + + while (i < lines.length) { + const line = lines[i]; + if (line.startsWith(heading)) { + result.push(line); + i++; + const sectionStart = i; + while (i < lines.length && !isTerminatorLine(lines[i])) { + i++; + } + const sectionLines = lines.slice(sectionStart, i); + const sectionContent = sectionLines.join('\n').trim(); + + // For function Returns sections, parse nested fields (### headings) + if (heading === '## Returns') { + // Look backwards to find the function signature + let sigLineIdx = i - 2; // Go back past the Returns heading + while (sigLineIdx >= 0 && !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/)) { + sigLineIdx--; + } + + // If we didn't find it by pattern, try to find it in our signature map + if (sigLineIdx < 0 || !signatureMap.has(sigLineIdx)) { + // Try searching a bit further back (up to 10 lines) + for (let j = i - 2; j >= Math.max(0, i - 12); j--) { + if (signatureMap.has(j)) { + sigLineIdx = j; + break; + } + } + } + + const returnTypeFromSignature = sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; + const linkedTypeInfo = sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; + const context = app && page ? { app, page, currentPagePath: page.url } : null; + + // Get the type name for display - prefer linkedTypeInfo.typeName, fallback to returnTypeFromSignature + const returnTypeName = linkedTypeInfo?.typeName || returnTypeFromSignature; + + // Track linked type if found + if (linkedTypeInfo && linkedTypeNames) { + linkedTypeNames.add(linkedTypeInfo.typeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + + const { fields, leadingText, extractedTypeName } = parseReturnFields( + sectionContent, + fieldHeading, + nestedHeading, + returnTypeFromSignature, + linkedTypeInfo, + context, + linkedTypeNames, + writeLinkedTypesFile + ); + if (fields.length === 0) { + result.push(...sectionLines); + } else { + if (leadingText) { + result.push(''); + result.push(leadingText); + } + // Use extractedTypeName if available, otherwise fallback to returnTypeName + const typeNameForDisplay = extractedTypeName || returnTypeName; + const fieldsBlock = formatReturnFieldsOutput(fields, typeNameForDisplay, linkedTypeNames, writeLinkedTypesFile); + if (fieldsBlock) { + result.push(''); + result.push(fieldsBlock); + result.push(''); + } + } + continue; + } + + // For interface/class method Returns sections + // The Returns section starts at i-1 (after the heading line) + // Look backwards to find the function signature + let sigLineIdx = i - 2; // Go back past the Returns heading + while (sigLineIdx >= 0 && !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/)) { + sigLineIdx--; + } + + // If we didn't find it by pattern, try to find it in our signature map + // by checking a few lines before the Returns section + if (sigLineIdx < 0 || !signatureMap.has(sigLineIdx)) { + // Try searching a bit further back (up to 10 lines) + for (let j = i - 2; j >= Math.max(0, i - 12); j--) { + if (signatureMap.has(j)) { + sigLineIdx = j; + break; + } + } + } + + const returnTypeFromSignature = sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; + const linkedTypeInfo = sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; + + // Get the type name for display - prefer linkedTypeInfo.typeName, fallback to returnTypeFromSignature + const returnTypeName = linkedTypeInfo?.typeName || returnTypeFromSignature; + + // Track linked type if found + if (linkedTypeInfo && linkedTypeNames) { + linkedTypeNames.add(linkedTypeInfo.typeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + + const { fields, leadingText, extractedTypeName } = parseReturnFields( + sectionContent, + fieldHeading, + nestedHeading, + returnTypeFromSignature, + linkedTypeInfo, + { app, page, currentPagePath: page.url }, + linkedTypeNames, + writeLinkedTypesFile + ); + if (fields.length === 0) { + result.push(...sectionLines); + } else { + if (leadingText) { + result.push(''); + result.push(leadingText); + } + // Use extractedTypeName if available, otherwise fallback to returnTypeName + const typeNameForDisplay = extractedTypeName || returnTypeName; + const fieldsBlock = formatReturnFieldsOutput(fields, typeNameForDisplay, linkedTypeNames, writeLinkedTypesFile); + if (fieldsBlock) { + result.push(''); + result.push(fieldsBlock); + result.push(''); + } + } + continue; + } + + result.push(line); + i++; + } + + return result.join('\n'); +} + +function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTypeFromSignature = null, linkedTypeInfo = null, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + if (!sectionContent) { + // If we have a linked type but no section content, try to extract from the linked type + if (linkedTypeInfo && context) { + const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + if (properties.length > 0) { + // Return separate ResponseFields for each property (skip the default "result" field) + const resultFields = []; + + // Add a separate ResponseField for each property + for (const prop of properties) { + resultFields.push({ + name: prop.name, + type: prop.type, + description: prop.description, + optional: prop.optional, + nested: prop.nested || [] + }); + } + + return { + fields: resultFields, + leadingText: '', + extractedTypeName: linkedTypeInfo.typeName + }; + } + } + return { fields: [], leadingText: '', extractedTypeName: null }; + } + + const lines = sectionContent.split('\n'); + const fields = []; + const headingPrefix = fieldHeading ? `${fieldHeading} ` : null; + const nestedPrefix = nestedHeading ? `${nestedHeading} ` : null; + + const extractTypeFromLine = (line) => { + if (!line) return null; + const trimmed = line.trim(); + if (!trimmed) return null; + if (trimmed.startsWith('>')) { + // Handle lines like: > **entities**: `object` or > **auth**: [`AuthMethods`](../interfaces/AuthMethods) + const blockMatch = trimmed.match(/^>\s*\*\*([^*]+)\*\*:\s*(.+)$/); + if (blockMatch) { + const typePart = blockMatch[2].replace(/`/g, '').trim(); + // Check if it's a markdown link: [TypeName](link) + const linkMatch = typePart.match(/^\[([^\]]+)\]\(([^)]+)\)$/); + if (linkMatch) { + return { type: linkMatch[1], link: linkMatch[2] }; + } + return { type: typePart, link: null }; + } + } + if (trimmed.includes('`')) { + // Extract type from backticks, could be a link: [`AuthMethods`](../interfaces/AuthMethods) + const typeMatch = trimmed.match(/`([^`]+)`/); + if (typeMatch) { + const typePart = typeMatch[1].trim(); + // Check if there's a link after the backticks + const linkMatch = trimmed.match(/`[^`]+`\s*\[([^\]]+)\]\(([^)]+)\)/); + if (linkMatch) { + return { type: linkMatch[1], link: linkMatch[2] }; + } + // Check if the type itself is a link format + const inlineLinkMatch = typePart.match(/^\[([^\]]+)\]\(([^)]+)\)$/); + if (inlineLinkMatch) { + return { type: inlineLinkMatch[1], link: inlineLinkMatch[2] }; + } + return { type: typePart, link: null }; + } + } + // Check for standalone markdown links + const linkMatch = trimmed.match(/^\[([^\]]+)\]\(([^)]+)\)$/); + if (linkMatch) { + return { type: linkMatch[1], link: linkMatch[2] }; + } + return null; + }; + + const isHeadingLine = (line) => headingPrefix && line.startsWith(headingPrefix); + const isNestedHeadingLine = (line) => nestedPrefix && line.startsWith(nestedPrefix); + + const leadingLines = []; + let index = 0; + if (headingPrefix) { + while (index < lines.length && !isHeadingLine(lines[index])) { + if (lines[index].trim()) { + leadingLines.push(lines[index]); + } + index++; + } + } + + // If no field headings found, treat as simple return + if (!headingPrefix || index >= lines.length) { + let type = returnTypeFromSignature || 'any'; + let typeLink = null; + const descriptionLines = []; + + // Check if there's an existing ResponseField in the content + const responseFieldMatch = sectionContent.match(/]*type="([^"]+)"[^>]*>/); + if (responseFieldMatch) { + // Extract type from existing ResponseField + const existingType = responseFieldMatch[1]; + if (existingType && existingType !== 'any') { + type = existingType; + } + } + + for (const line of lines) { + // Skip ResponseField tags - we'll replace them + if (line.trim().startsWith('') { + continue; + } + const maybeType = extractTypeFromLine(line); + if (maybeType && type === 'any') { + if (typeof maybeType === 'object') { + type = maybeType.type; + typeLink = maybeType.link; + } else { + type = maybeType; + } + continue; + } + if (line.trim() && !line.trim().startsWith('`') && !line.trim().startsWith('<')) { + descriptionLines.push(line); + } + } + let description = descriptionLines.join('\n').trim(); + + // Check if we have a linked type to inline + let typeInfoToUse = linkedTypeInfo; + + // If we don't have linkedTypeInfo but we have a type name, try to resolve it + if (!typeInfoToUse && type && context && context.app) { + const simpleTypeName = getSimpleTypeName(type); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + if (typePath) { + typeInfoToUse = { typeName: simpleTypeName, typePath }; + } else if (simpleTypeName) { + // Even if we can't resolve the path, try with just the name + typeInfoToUse = { typeName: simpleTypeName, typePath: simpleTypeName }; + } + + // Track resolved linked type + if (typeInfoToUse && linkedTypeNames) { + linkedTypeNames.add(typeInfoToUse.typeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + } + } + + if (typeInfoToUse && context) { + const properties = extractPropertiesFromLinkedType(typeInfoToUse, context); + if (properties.length > 0) { + // Return separate ResponseFields for each property (skip the default "result" field) + const resultFields = []; + + // Add a separate ResponseField for each property + for (const prop of properties) { + resultFields.push({ + name: prop.name, + type: prop.type, + description: prop.description, + optional: prop.optional, + nested: prop.nested || [] + }); + } + + return { + fields: resultFields, + leadingText: '', + extractedTypeName: typeInfoToUse.typeName // Pass the type name for display + }; + } + } + + // Add "See [TypeName](link)" to description if there's a type link + if (typeLink) { + if (description) { + description += '\n\nSee [' + type + '](' + typeLink + ')'; + } else { + description = 'See [' + type + '](' + typeLink + ')'; + } + } + // Use 'result' as default name, or extract from description + let name = 'result'; + if (description) { + // Check if description contains a type hint + const typeHint = description.match(/(\w+)\s+(?:instance|object|value)/i); + if (typeHint) { + name = typeHint[1].toLowerCase(); + } + } + return { + fields: [ + { + name, + type, + description, + optional: false, + nested: [], + }, + ], + leadingText: '', + extractedTypeName: null, + }; + } + + // Parse fields with headings + while (index < lines.length) { + const headingLine = lines[index]; + if (!isHeadingLine(headingLine)) { + index++; + continue; + } + + let rawName = headingLine.slice(headingPrefix.length).trim(); + const optional = rawName.endsWith('?'); + const name = optional ? rawName.slice(0, -1).trim() : rawName.trim(); + index++; + + while (index < lines.length && lines[index].trim() === '') { + index++; + } + + let type = 'any'; + let typeLink = null; + if (index < lines.length) { + const maybeType = extractTypeFromLine(lines[index]); + if (maybeType) { + if (typeof maybeType === 'object') { + type = maybeType.type; + typeLink = maybeType.link; + } else { + type = maybeType; + } + index++; + } + } + + while (index < lines.length && lines[index].trim() === '') { + index++; + } + + const descriptionLines = []; + const nested = []; + + // Collect description and nested fields + while ( + index < lines.length && + !isHeadingLine(lines[index]) && + !(nestedPrefix && isNestedHeadingLine(lines[index])) + ) { + descriptionLines.push(lines[index]); + index++; + } + + // Parse nested fields if any + while (index < lines.length && isNestedHeadingLine(lines[index])) { + const nestedHeadingLine = lines[index]; + let nestedRawName = nestedHeadingLine.slice(nestedPrefix.length).trim(); + const nestedOptional = nestedRawName.endsWith('?'); + const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + index++; + + while (index < lines.length && lines[index].trim() === '') { + index++; + } + + let nestedType = 'any'; + let nestedTypeLink = null; + if (index < lines.length) { + const maybeNestedType = extractTypeFromLine(lines[index]); + if (maybeNestedType) { + if (typeof maybeNestedType === 'object') { + nestedType = maybeNestedType.type; + nestedTypeLink = maybeNestedType.link; + } else { + nestedType = maybeNestedType; + } + index++; + } + } + + while (index < lines.length && lines[index].trim() === '') { + index++; + } + + const nestedDescLines = []; + while ( + index < lines.length && + !isNestedHeadingLine(lines[index]) && + !isHeadingLine(lines[index]) + ) { + nestedDescLines.push(lines[index]); + index++; + } + + // Add "See [TypeName](link)" to nested description if there's a type link + let nestedDescription = nestedDescLines.join('\n').trim(); + if (nestedTypeLink) { + if (nestedDescription) { + nestedDescription += '\n\nSee [' + nestedType + '](' + nestedTypeLink + ')'; + } else { + nestedDescription = 'See [' + nestedType + '](' + nestedTypeLink + ')'; + } + } + + nested.push({ + name: nestedName, + type: nestedType, + description: nestedDescription, + optional: nestedOptional, + }); + } + + // Add "See [TypeName](link)" to description if there's a type link + let description = descriptionLines.join('\n').trim(); + if (typeLink) { + if (description) { + description += '\n\nSee [' + type + '](' + typeLink + ')'; + } else { + description = 'See [' + type + '](' + typeLink + ')'; + } + } + + fields.push({ + name, + type, + description, + optional, + nested, + }); + } + + return { fields, leadingText: leadingLines.join('\n').trim(), extractedTypeName: null }; +} + +function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedTypesFile = null) { + let output = ''; + + const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; + + for (const field of fields) { + const requiredAttr = field.optional ? '' : ' required'; + const defaultAttr = field.default ? ` default="${escapeAttribute(field.default)}"` : ''; + + // Track non-primitive return field types for suppression + if (linkedTypeNames && field.type && !PRIMITIVE_TYPES.includes(field.type)) { + const simpleTypeName = field.type.replace(/[<>\[\]]/g, '').trim(); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + linkedTypeNames.add(simpleTypeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + } + + output += `\n`; + + if (field.description) { + output += `\n${field.description}\n`; + } + + if (field.nested && field.nested.length > 0) { + // Wrap nested fields in an Accordion component + output += `\n\n\n`; + + for (const nested of field.nested) { + const requiredAttr = nested.optional ? '' : ' required'; + output += `\n`; + + if (nested.description) { + output += `\n${nested.description}\n`; + } + + output += '\n\n\n'; + } + + output += '\n'; + } + + output += '\n\n\n'; + } + + return output; +} + +function formatReturnFieldsOutput(fields, returnType = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + if (!fields || fields.length === 0) { + return ''; + } + + const fieldsBlock = buildResponseFieldsSection(fields, linkedTypeNames, writeLinkedTypesFile).trimEnd(); + if (!fieldsBlock) { + return ''; + } + + const hasMultipleFields = fields.length > 1; + const hasNestedFields = fields.some( + (field) => Array.isArray(field.nested) && field.nested.length > 0 + ); + + if (hasMultipleFields || hasNestedFields) { + // Extract the simple type name to display above the Accordion + let typeDisplay = ''; + if (returnType) { + const simpleTypeName = getSimpleTypeName(returnType); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + typeDisplay = `\`${simpleTypeName}\`\n\n`; + } + } + // If we still don't have a type display and have multiple fields, + // try to infer from the context (e.g., if all fields are from the same type) + if (!typeDisplay && hasMultipleFields && fields.length > 0) { + // Check if we can get a type hint from the first field's description or context + // This is a fallback for cases where returnType wasn't passed correctly + } + return `${typeDisplay}\n\n${fieldsBlock}\n`; + } + + return fieldsBlock; +} + +function getSimpleTypeName(typeName) { + if (!typeName) { + return null; + } + + // Remove generic arguments if they are still present (e.g., Promise) + const withoutGenerics = typeName.split('<')[0].trim(); + + // Type names can include dots for namespaces, so allow those + const match = withoutGenerics.match(/^[A-Za-z0-9_.]+$/); + return match ? match[0] : null; +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-utils.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-utils.js new file mode 100644 index 0000000..497bf79 --- /dev/null +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-utils.js @@ -0,0 +1,12 @@ +/** + * Utility functions for TypeDoc Mintlify plugin + */ + +/** + * Escape special characters for use in HTML attributes + */ +export function escapeAttribute(value) { + return String(value).replace(/"/g, '"'); +} + + diff --git a/scripts/mintlify-post-processing/types-to-expose.json b/scripts/mintlify-post-processing/types-to-expose.json new file mode 100644 index 0000000..42f0c15 --- /dev/null +++ b/scripts/mintlify-post-processing/types-to-expose.json @@ -0,0 +1,12 @@ +[ + "AgentsModule", + "AppLogsModule", + "AuthModule", + "ConnectorsModule", + "EntitiesModule", + "FunctionsModule", + "IntegrationsModule", + "SsoModule" +] + + diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..b4a7259 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "entryPoints": ["./src/index.ts"], + "out": "docs/content", + "plugin": [ + "typedoc-plugin-markdown", + "./scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js" + ], + "fileExtension": ".mdx", + "excludePrivate": true, + "excludeProtected": true, + "excludeInternal": true, + "excludeExternals": true, + "readme": "none", + "gitRevision": "main", + "sort": ["source-order"], + "kindSortOrder": [ + "Project", + "Module", + "Namespace", + "Enum", + "Class", + "Interface", + "TypeAlias", + "Constructor", + "Property", + "Method", + "Function", + "Accessor", + "Variable" + ], + "entryFileName": "README.mdx", + "maxTypeConversionDepth": 2, + "hideBreadcrumbs": true, + "disableSources": true, + "hidePageTitle": true +} diff --git a/writing-docs.md b/writing-docs.md new file mode 100644 index 0000000..4f7a183 --- /dev/null +++ b/writing-docs.md @@ -0,0 +1,34 @@ +# SDK Documentation + +Documentation for the SDK is generated using TypeDoc. The TypeDoc files are post-processed to convert them to Mintlify format. You can preview the output locally, and then push it to the docs repo to delpoy it. + +## Before getting started +* Install the repo dependencies: `npm install` +* Install the Mintlify CLI: `npm i -g mint` + +## Generate docs +Open the terminal in the repo and run `npm run create-docs`. The docs files appear under `/docs/content`. + +## Preview docs locally with Mintlify +1. In the terminal, navigate to the `docs` folder. +1. Run `mint dev`. The docs preview opens in your browser. + +> If you notice that the names appearing for the sections of the docs menu aren't right, you may need to adjust `scripts/mintlify-post-processing/category-map.json`. This file maps the names of the subfolders in `/docs/content` to the desired section names in the reference. + +### Category mapping +`scripts/mintlify-post-processing/category-map.json` maps the names of the output folders from TypeDoc to the names of the categories that you want to appear in the docs. Only folder names that are mapped in this file appear in the final docs and the local preview. + +For example, if you map `interfaces` to `Modules`, the files in `docs/content/interfaces` appear in the docs under a **Modules** category. + +The names of the TypeDoc output folders are: `classes`, `functions`, `interfaces`, `type-aliases`. + +## Control which types appear in the docs +`scripts/mintlify-post-processing/types-to-expose.json` lists the TypeDoc types that the post-processing script keeps in the generated reference. Add or remove type names in that file to expose different SDK areas (for example, to surface a new type or hide one that is not ready for publication). After editing the list, rerun `npm run create-docs` so the Mintlify-ready content reflects the updated exposure set. + +## Push SDK docs to the Mintlify docs repository + +After generating and reviewing the docs, you can push them to the `base44/mintlify-docs` repo to deploy them. + +1. In the terminal, run `npm run push-docs -- --branch `. If the branch already exists, your changes are added to the ones already on the branch. Otherwise, the script creates a new branch with the chosen name. +1. Open the [docs repo](https://github.com/base44-dev/mintlify-docs) and created a PR for your branch. +1. Preview your docs using the [Mintlify dashboard](https://dashboard.mintlify.com/base44/base44?section=previews). \ No newline at end of file From b973811d8940007845dd78b92a5317f296720fe9 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Tue, 25 Nov 2025 16:21:31 +0200 Subject: [PATCH 06/31] more updates to initial docs --- docs/README.md | 20 ++--- docs/functions/createClient.md | 12 ++- docs/functions/createClientFromRequest.md | 14 +-- docs/functions/getLoginUrl.md | 5 +- docs/functions/removeAccessToken.md | 2 +- docs/functions/saveAccessToken.md | 2 +- .../AgentConversation.md | 4 +- .../AgentMessage.md | 12 ++- .../AgentMessageCustomContext.md | 4 +- .../AgentMessageMetadata.md | 4 +- .../AgentMessageReasoning.md | 4 +- .../AgentMessageToolCall.md | 6 +- .../AgentMessageUsage.md | 4 +- docs/interfaces/AgentsModule.md | 85 +++++++++++++++---- docs/interfaces/AppLogsModule.md | 22 ++--- docs/interfaces/AuthModule.md | 27 ++++-- docs/interfaces/Base44Client.md | 18 ++-- docs/interfaces/ConnectorsModule.md | 6 +- docs/interfaces/CreateClientConfig.md | 42 +++++++++ .../CreateClientOptions.md | 4 +- docs/interfaces/EntitiesModule.md | 8 +- docs/interfaces/EntityHandler.md | 73 +++++++--------- docs/interfaces/FunctionsModule.md | 6 +- docs/interfaces/GetAccessTokenOptions.md | 10 +-- docs/interfaces/GetLoginUrlOptions.md | 8 +- docs/interfaces/IntegrationsModule.md | 40 +++------ .../ModelFilterParams.md | 6 +- docs/interfaces/RemoveAccessTokenOptions.md | 4 +- docs/interfaces/SaveAccessTokenOptions.md | 4 +- docs/interfaces/SsoModule.md | 12 +-- docs/interfaces/User.md | 4 +- docs/type-aliases/CreateClientConfig.md | 39 --------- src/client.ts | 19 ++--- src/client.types.ts | 40 ++++----- src/modules/agents.types.ts | 84 +++++++++++++----- src/modules/app-logs.types.ts | 22 ++--- src/modules/auth.ts | 2 +- src/modules/auth.types.ts | 31 ++++--- src/modules/connectors.types.ts | 6 +- src/modules/entities.types.ts | 56 +++++------- src/modules/functions.types.ts | 6 +- src/modules/integrations.types.ts | 40 +++------ src/modules/sso.types.ts | 12 ++- src/types.ts | 4 +- src/utils/auth-utils.ts | 9 +- src/utils/auth-utils.types.ts | 34 ++++---- src/utils/socket-utils.ts | 4 +- 47 files changed, 455 insertions(+), 425 deletions(-) rename docs/{type-aliases => interfaces}/AgentConversation.md (91%) rename docs/{type-aliases => interfaces}/AgentMessage.md (79%) rename docs/{type-aliases => interfaces}/AgentMessageCustomContext.md (81%) rename docs/{type-aliases => interfaces}/AgentMessageMetadata.md (85%) rename docs/{type-aliases => interfaces}/AgentMessageReasoning.md (83%) rename docs/{type-aliases => interfaces}/AgentMessageToolCall.md (79%) rename docs/{type-aliases => interfaces}/AgentMessageUsage.md (84%) create mode 100644 docs/interfaces/CreateClientConfig.md rename docs/{type-aliases => interfaces}/CreateClientOptions.md (80%) rename docs/{type-aliases => interfaces}/ModelFilterParams.md (94%) delete mode 100644 docs/type-aliases/CreateClientConfig.md diff --git a/docs/README.md b/docs/README.md index fb37891..ba36103 100644 --- a/docs/README.md +++ b/docs/README.md @@ -10,7 +10,16 @@ ## Interfaces +- [CreateClientOptions](interfaces/CreateClientOptions.md) +- [CreateClientConfig](interfaces/CreateClientConfig.md) - [Base44Client](interfaces/Base44Client.md) +- [AgentMessageReasoning](interfaces/AgentMessageReasoning.md) +- [AgentMessageToolCall](interfaces/AgentMessageToolCall.md) +- [AgentMessageUsage](interfaces/AgentMessageUsage.md) +- [AgentMessageCustomContext](interfaces/AgentMessageCustomContext.md) +- [AgentMessageMetadata](interfaces/AgentMessageMetadata.md) +- [AgentConversation](interfaces/AgentConversation.md) +- [AgentMessage](interfaces/AgentMessage.md) - [AgentsModule](interfaces/AgentsModule.md) - [FetchLogsParams](interfaces/FetchLogsParams.md) - [GetStatsParams](interfaces/GetStatsParams.md) @@ -30,6 +39,7 @@ - [IntegrationsModule](interfaces/IntegrationsModule.md) - [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse.md) - [SsoModule](interfaces/SsoModule.md) +- [ModelFilterParams](interfaces/ModelFilterParams.md) - [GetAccessTokenOptions](interfaces/GetAccessTokenOptions.md) - [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions.md) - [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions.md) @@ -38,19 +48,9 @@ ## Type Aliases -- [CreateClientOptions](type-aliases/CreateClientOptions.md) -- [CreateClientConfig](type-aliases/CreateClientConfig.md) -- [AgentMessageReasoning](type-aliases/AgentMessageReasoning.md) -- [AgentMessageToolCall](type-aliases/AgentMessageToolCall.md) -- [AgentMessageUsage](type-aliases/AgentMessageUsage.md) -- [AgentMessageCustomContext](type-aliases/AgentMessageCustomContext.md) -- [AgentMessageMetadata](type-aliases/AgentMessageMetadata.md) -- [AgentConversation](type-aliases/AgentConversation.md) -- [AgentMessage](type-aliases/AgentMessage.md) - [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType.md) - [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction.md) - [IntegrationPackage](type-aliases/IntegrationPackage.md) -- [ModelFilterParams](type-aliases/ModelFilterParams.md) ## Functions diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md index 56d5cdb..c9734ad 100644 --- a/docs/functions/createClient.md +++ b/docs/functions/createClient.md @@ -8,25 +8,23 @@ Creates a Base44 SDK client instance. -This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [entities](../interfaces/EntitiesModule.md), [auth](../interfaces/AuthModule.md), and [functions](../interfaces/FunctionsModule.md). +This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [`entities`](../interfaces/EntitiesModule.md), [`auth`](../interfaces/AuthModule.md), and [`functions`](../interfaces/FunctionsModule.md). The client supports two authentication modes: - **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. -Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. +For example, when using the [`entities`](../interfaces/EntitiesModule.md) module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. -For example, when using the [entities](../interfaces/EntitiesModule.md) module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. +Most modules are available in both modes, but with different permission levels. However, some modules are only available in one authentication mode. -To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in your application's frontend. - - The [auth](../interfaces/AuthModule.md) module is only available with user authentication for security reasons. +To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in the app's frontend. ## Parameters ### config -[`CreateClientConfig`](../type-aliases/CreateClientConfig.md) +[`CreateClientConfig`](../interfaces/CreateClientConfig.md) Configuration object for the client. diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md index 2afd6c1..2c99b8a 100644 --- a/docs/functions/createClientFromRequest.md +++ b/docs/functions/createClientFromRequest.md @@ -8,7 +8,7 @@ Creates a Base44 client from an HTTP request. -Creates a client by automatically extracting authentication tokens and configuration from request with authentication information in their headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from your app frontend to your backend functions. +Creates a client by automatically extracting authentication tokens and configuration from an incoming HTTP request with authentication information in its headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from the app's frontend to the backend functions. ## Parameters @@ -22,15 +22,7 @@ The incoming HTTP request object containing Base44 authentication headers. [`Base44Client`](../interfaces/Base44Client.md) -A configured Base44 client instance with authentication from the request. - -## Throws - -When Base44-App-Id header is missing. - -## Throws - -When authorization headers have invalid format. +A configured Base44 client instance with authentication from the incoming request. ## Example @@ -50,7 +42,7 @@ Deno.serve(async (req) => { return Response.json({ error: 'Unauthorized' }, { status: 401 }); } - // Use the client to access the API + // Use the client to make API calls } catch (error) { return Response.json({ error: error.message }, { status: 500 }); diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md index 884ac76..dc12e84 100644 --- a/docs/functions/getLoginUrl.md +++ b/docs/functions/getLoginUrl.md @@ -8,10 +8,7 @@ Constructs the absolute URL for the login page with a redirect parameter. -Low-level utility for building login URLs. For standard login redirects, use -`base44.auth.redirectToLogin()` instead, which handles this automatically. This function -is useful when you need to construct login URLs without a client instance or for custom -authentication flows. +Low-level utility for building login URLs. For standard login redirects, use [`base44.auth.redirectToLogin()`](../interfaces/AuthModule.md#redirecttologin) instead, which handles this automatically. This function is useful when you need to construct login URLs without a client instance or for custom authentication flows. ## Parameters diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md index a46fc1e..3100a04 100644 --- a/docs/functions/removeAccessToken.md +++ b/docs/functions/removeAccessToken.md @@ -22,7 +22,7 @@ Configuration options for token removal. `boolean` -`true` if the token was removed successfully, `false` otherwise. +Returns `true` if the token was removed successfully, `false` otherwise. ## Examples diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md index 043c70e..a7df677 100644 --- a/docs/functions/saveAccessToken.md +++ b/docs/functions/saveAccessToken.md @@ -28,7 +28,7 @@ Configuration options for saving the token. `boolean` -`true` if the token was saved successfully, `false` otherwise. +Returns`true` if the token was saved successfully, `false` otherwise. ## Examples diff --git a/docs/type-aliases/AgentConversation.md b/docs/interfaces/AgentConversation.md similarity index 91% rename from docs/type-aliases/AgentConversation.md rename to docs/interfaces/AgentConversation.md index 6e9d952..436ceb7 100644 --- a/docs/type-aliases/AgentConversation.md +++ b/docs/interfaces/AgentConversation.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentConversation - -> **AgentConversation** = `object` +# Interface: AgentConversation An agent conversation containing messages exchanged with an AI agent. diff --git a/docs/type-aliases/AgentMessage.md b/docs/interfaces/AgentMessage.md similarity index 79% rename from docs/type-aliases/AgentMessage.md rename to docs/interfaces/AgentMessage.md index 33d51ad..919b45a 100644 --- a/docs/type-aliases/AgentMessage.md +++ b/docs/interfaces/AgentMessage.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessage - -> **AgentMessage** = `object` +# Interface: AgentMessage A message in an agent conversation. @@ -36,7 +34,7 @@ Optional reasoning information for the message. ### content? -> `optional` **content**: `string` \| `Record`\<..., ...\> \| `null` +> `optional` **content**: `string` \| `Record`\<`string`, `any`\> \| `null` Message content. @@ -44,7 +42,7 @@ Message content. ### file\_urls? -> `optional` **file\_urls**: ...[] \| `null` +> `optional` **file\_urls**: `string`[] \| `null` URLs to files attached to the message. @@ -52,7 +50,7 @@ URLs to files attached to the message. ### tool\_calls? -> `optional` **tool\_calls**: ...[] \| `null` +> `optional` **tool\_calls**: [`AgentMessageToolCall`](AgentMessageToolCall.md)[] \| `null` Tool calls made by the agent. @@ -76,7 +74,7 @@ Whether the message is hidden from the user. ### custom\_context? -> `optional` **custom\_context**: ...[] \| `null` +> `optional` **custom\_context**: [`AgentMessageCustomContext`](AgentMessageCustomContext.md)[] \| `null` Custom context provided with the message. diff --git a/docs/type-aliases/AgentMessageCustomContext.md b/docs/interfaces/AgentMessageCustomContext.md similarity index 81% rename from docs/type-aliases/AgentMessageCustomContext.md rename to docs/interfaces/AgentMessageCustomContext.md index 29d59e7..6d8f956 100644 --- a/docs/type-aliases/AgentMessageCustomContext.md +++ b/docs/interfaces/AgentMessageCustomContext.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessageCustomContext - -> **AgentMessageCustomContext** = `object` +# Interface: AgentMessageCustomContext Custom context provided with an agent message. diff --git a/docs/type-aliases/AgentMessageMetadata.md b/docs/interfaces/AgentMessageMetadata.md similarity index 85% rename from docs/type-aliases/AgentMessageMetadata.md rename to docs/interfaces/AgentMessageMetadata.md index 047b56d..70a8bba 100644 --- a/docs/type-aliases/AgentMessageMetadata.md +++ b/docs/interfaces/AgentMessageMetadata.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessageMetadata - -> **AgentMessageMetadata** = `object` +# Interface: AgentMessageMetadata Metadata about when and by whom a message was created. diff --git a/docs/type-aliases/AgentMessageReasoning.md b/docs/interfaces/AgentMessageReasoning.md similarity index 83% rename from docs/type-aliases/AgentMessageReasoning.md rename to docs/interfaces/AgentMessageReasoning.md index 3713262..3802ca7 100644 --- a/docs/type-aliases/AgentMessageReasoning.md +++ b/docs/interfaces/AgentMessageReasoning.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessageReasoning - -> **AgentMessageReasoning** = `object` +# Interface: AgentMessageReasoning Reasoning information for an agent message. diff --git a/docs/type-aliases/AgentMessageToolCall.md b/docs/interfaces/AgentMessageToolCall.md similarity index 79% rename from docs/type-aliases/AgentMessageToolCall.md rename to docs/interfaces/AgentMessageToolCall.md index 815ba03..ce6ccde 100644 --- a/docs/type-aliases/AgentMessageToolCall.md +++ b/docs/interfaces/AgentMessageToolCall.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessageToolCall - -> **AgentMessageToolCall** = `object` +# Interface: AgentMessageToolCall A tool call made by the agent. @@ -38,7 +36,7 @@ Arguments passed to the tool as JSON string. ### status -> **status**: `"running"` \| `"success"` \| `"error"` \| `"stopped"` +> **status**: `"error"` \| `"running"` \| `"success"` \| `"stopped"` Status of the tool call. diff --git a/docs/type-aliases/AgentMessageUsage.md b/docs/interfaces/AgentMessageUsage.md similarity index 84% rename from docs/type-aliases/AgentMessageUsage.md rename to docs/interfaces/AgentMessageUsage.md index 380d1c2..9dd2c11 100644 --- a/docs/type-aliases/AgentMessageUsage.md +++ b/docs/interfaces/AgentMessageUsage.md @@ -2,9 +2,7 @@ *** -# Type Alias: AgentMessageUsage - -> **AgentMessageUsage** = `object` +# Interface: AgentMessageUsage Token usage statistics for an agent message. diff --git a/docs/interfaces/AgentsModule.md b/docs/interfaces/AgentsModule.md index 1513b15..429eba4 100644 --- a/docs/interfaces/AgentsModule.md +++ b/docs/interfaces/AgentsModule.md @@ -8,9 +8,24 @@ Agents module for managing AI agent conversations. This module provides methods to create and manage conversations with AI agents, send messages, and subscribe to real-time updates. Conversations can be used -for chat interfaces, support systems, or any interactive AI application. +for chat interfaces, support systems, or any interactive AI app. -Methods in this module respect the authentication mode used when calling them: +The agents module enables you to: + +- **Create conversations** with agents defined in the app. +- **Send messages** from users to agents and receive AI-generated responses. +- **Retrieve conversations** individually or as filtered lists with sorting and pagination. +- **Subscribe to real-time updates** using WebSocket connections to receive instant notifications when new messages arrive. +- **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. + +The agents module operates with a two-level hierarchy: + +1. **Conversations** ([AgentConversation](AgentConversation.md)): 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** ([AgentMessage](AgentMessage.md)): 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. + +This module is available to use with a client in both user and service role authentication modes: - **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. @@ -54,13 +69,15 @@ unsubscribe(); ### getConversations() -> **getConversations**(): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> +> **getConversations**(): `Promise`\<[`AgentConversation`](AgentConversation.md)[]\> Gets all conversations. +Retrieves all conversations. Use [`listConversations()`](#listconversations) to filter which conversations are returned, apply sorting, or paginate results. Use [`getConversation()`](#getconversation) to retrieve a specific conversation by ID. + #### Returns -`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> +`Promise`\<[`AgentConversation`](AgentConversation.md)[]\> Promise resolving to an array of conversations. @@ -71,14 +88,22 @@ const conversations = await base44.agents.getConversations(); console.log(`Total conversations: ${conversations.length}`); ``` +#### See + + - [`listConversations()`](#listconversations) for filtering, sorting, and pagination + - [`getConversation()`](#getconversation) for retrieving a specific conversation by ID + *** ### getConversation() -> **getConversation**(`conversationId`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> +> **getConversation**(`conversationId`): `Promise`\<[`AgentConversation`](AgentConversation.md) \| `undefined`\> Gets a specific conversation by ID. +Retrieves a single conversation using its unique identifier. To retrieve +all conversations, use [`getConversations()`](#getconversations) To filter, sort, or paginate conversations, use [`listConversations()`](#listconversations). + #### Parameters ##### conversationId @@ -89,7 +114,7 @@ The unique identifier of the conversation. #### Returns -`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md) \| `undefined`\> +`Promise`\<[`AgentConversation`](AgentConversation.md) \| `undefined`\> Promise resolving to the conversation, or undefined if not found. @@ -102,29 +127,36 @@ if (conversation) { } ``` +#### See + + - [`getConversations()`](#getconversations) for retrieving all conversations + - [`listConversations()`](#listconversations) for filtering and sorting conversations + *** ### listConversations() -> **listConversations**(`filterParams`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> +> **listConversations**(`filterParams`): `Promise`\<[`AgentConversation`](AgentConversation.md)[]\> + +Lists conversations with filtering, sorting, and pagination. -Lists conversations with filtering and pagination. +Provides querying capabilities including filtering by fields, sorting, pagination, and field selection. For cases where you need all conversations without filtering, use [`getConversations()`](#getconversations). To retrieve a specific conversation by ID, use [`getConversation()`](#getconversation). #### Parameters ##### filterParams -[`ModelFilterParams`](../type-aliases/ModelFilterParams.md) +[`ModelFilterParams`](ModelFilterParams.md) Filter parameters for querying conversations. #### Returns -`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)[]\> +`Promise`\<[`AgentConversation`](AgentConversation.md)[]\> Promise resolving to an array of filtered conversations. -#### Example +#### Examples ```typescript const recentConversations = await base44.agents.listConversations({ @@ -133,11 +165,28 @@ const recentConversations = await base44.agents.listConversations({ }); ``` +```typescript +// Filter by agent and metadata +const supportConversations = await base44.agents.listConversations({ + q: { + agent_name: 'support-agent', + 'metadata.priority': 'high' + }, + sort: '-created_date', + limit: 20 +}); +``` + +#### See + + - [`getConversations()`](#getconversations) for retrieving all conversations without filtering + - [`getConversation()`](#getconversation) for retrieving a specific conversation by ID + *** ### createConversation() -> **createConversation**(`conversation`): `Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> +> **createConversation**(`conversation`): `Promise`\<[`AgentConversation`](AgentConversation.md)\> Creates a new conversation with an agent. @@ -157,7 +206,7 @@ Conversation details including agent name and optional metadata. #### Returns -`Promise`\<[`AgentConversation`](../type-aliases/AgentConversation.md)\> +`Promise`\<[`AgentConversation`](AgentConversation.md)\> Promise resolving to the created conversation. @@ -179,7 +228,7 @@ console.log(`Created conversation: ${conversation.id}`); ### addMessage() -> **addMessage**(`conversation`, `message`): `Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> +> **addMessage**(`conversation`, `message`): `Promise`\<[`AgentMessage`](AgentMessage.md)\> Adds a message to a conversation. @@ -190,25 +239,26 @@ also updates the real-time socket to notify any subscribers. ##### conversation -[`AgentConversation`](../type-aliases/AgentConversation.md) +[`AgentConversation`](AgentConversation.md) The conversation to add the message to. ##### message -`Partial`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> +`Partial`\<[`AgentMessage`](AgentMessage.md)\> The message to add. #### Returns -`Promise`\<[`AgentMessage`](../type-aliases/AgentMessage.md)\> +`Promise`\<[`AgentMessage`](AgentMessage.md)\> Promise resolving to the created message. #### Example ```typescript +// Send a message to the agent const message = await base44.agents.addMessage(conversation, { role: 'user', content: 'Hello, I need help with my order #12345' @@ -255,6 +305,7 @@ Unsubscribe function to stop receiving updates. #### Example ```typescript +// Subscribe to real-time updates const unsubscribe = base44.agents.subscribeToConversation( 'conv-123', (updatedConversation) => { diff --git a/docs/interfaces/AppLogsModule.md b/docs/interfaces/AppLogsModule.md index 7600cb2..39775e9 100644 --- a/docs/interfaces/AppLogsModule.md +++ b/docs/interfaces/AppLogsModule.md @@ -4,13 +4,13 @@ # Interface: AppLogsModule -App Logs module for tracking and analyzing application usage. +App Logs module for tracking and analyzing app usage. This module provides methods to log user activity, fetch logs, and retrieve -statistics about your application's usage. Useful for analytics, monitoring, +statistics about the app's usage. Useful for analytics, monitoring, and understanding user behavior. -Methods in this module respect the authentication mode used when calling them: +This module is available to use with a client in both user and service role authentication modes: - **User authentication** (`base44.appLogs`): Operations are scoped to the currently authenticated user. For example, `fetchLogs()` returns only logs for the current user, @@ -18,7 +18,7 @@ Methods in this module respect the authentication mode used when calling them: - **Service role authentication** (`client.asServiceRole.appLogs`): Operations have elevated permissions and can access data across all users. For example, `fetchLogs()` - returns logs from all users in your application, and `getStats()` returns application-wide + returns logs from all users in the app, and `getStats()` returns app-wide statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. ## Examples @@ -37,7 +37,7 @@ const logs = await base44.appLogs.fetchLogs({ ``` ```typescript -// Get application statistics +// Get app statistics const stats = await base44.appLogs.getStats({ startDate: '2024-01-01', endDate: '2024-01-31' @@ -50,9 +50,9 @@ const stats = await base44.appLogs.getStats({ > **logUserInApp**(`pageName`): `Promise`\<`void`\> -Log user activity in the application. +Log user activity in the app. -Records when a user visits a specific page or section of your application. +Records when a user visits a specific page or section of the app. Useful for tracking user navigation patterns and popular features. #### Parameters @@ -90,10 +90,10 @@ await base44.appLogs.logUserInApp('product-details'); > **fetchLogs**(`params?`): `Promise`\<`any`\> -Fetch application logs with optional filtering. +Fetch app logs with optional filtering. Retrieves logs of user activity with support for filtering, pagination, -and sorting. Use this to analyze user behavior and application usage patterns. +and sorting. Use this to analyze user behavior and app usage patterns. #### Parameters @@ -146,9 +146,9 @@ const periodLogs = await base44.appLogs.fetchLogs({ > **getStats**(`params?`): `Promise`\<`any`\> -Gets application usage statistics. +Gets app usage statistics. -Retrieves aggregated statistics about application usage, such as page views, +Retrieves aggregated statistics about app usage, such as page views, active users, and popular features. Useful for dashboards and analytics. #### Parameters diff --git a/docs/interfaces/AuthModule.md b/docs/interfaces/AuthModule.md index 9012e94..487e1a5 100644 --- a/docs/interfaces/AuthModule.md +++ b/docs/interfaces/AuthModule.md @@ -14,6 +14,8 @@ This module provides comprehensive authentication functionality including: - OTP verification - User invitations +The auth module is only available in user authentication mode (`base44.auth`). + ## Examples ```typescript @@ -61,6 +63,7 @@ Promise resolving to the user's profile data. #### Example ```typescript +// Get current user information const user = await base44.auth.me(); console.log(`Logged in as: ${user.email}`); console.log(`User ID: ${user.id}`); @@ -74,8 +77,8 @@ console.log(`User ID: ${user.id}`); Updates the current authenticated user's information. -Performs a partial update - only include the fields you want to change. -Commonly updated fields include name, avatar_url, and custom profile fields. +Only the fields included in the data object will be updated. +Commonly updated fields include `name`, `avatar_url`, and custom profile fields. #### Parameters @@ -83,7 +86,7 @@ Commonly updated fields include name, avatar_url, and custom profile fields. `Partial`\<`Omit`\<[`User`](User.md), ... \| ... \| ...\>\> -Object containing the fields to update. Only the provided fields will be changed. +Object containing the fields to update. #### Returns @@ -308,6 +311,7 @@ Promise resolving to true if authenticated, false otherwise. #### Example ```typescript +// Check authentication status const isAuthenticated = await base44.auth.isAuthenticated(); if (isAuthenticated) { console.log('User is logged in'); @@ -323,10 +327,10 @@ if (isAuthenticated) { > **inviteUser**(`userEmail`, `role`): `Promise`\<`any`\> -Invites a user to the application. +Invites a user to the app. Sends an invitation email to a potential user with a specific role. -Roles are configured in your Base44 application settings and determine +Roles are configured in the app settings and determine the user's permissions and access levels. #### Parameters @@ -341,7 +345,7 @@ Email address of the user to invite. `string` -Role to assign to the invited user. Must match a role defined in your Base44 application. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. +Role to assign to the invited user. Must match a role defined in the app. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. #### Returns @@ -368,7 +372,8 @@ try { Registers a new user account. -Creates a new user account with email and password. +Creates a new user account with email and password. After successful registration, +use [`loginViaEmailPassword()`](#loginviaemailpassword) to log in the user. #### Parameters @@ -387,12 +392,18 @@ Promise resolving to the registration response. #### Example ```typescript +// Register a new user await base44.auth.register({ email: 'newuser@example.com', password: 'securePassword123', referral_code: 'FRIEND2024' }); -console.log('Registration successful! Please check your email.'); + +// Login after registration +const { access_token, user } = await base44.auth.loginViaEmailPassword( + 'newuser@example.com', + 'securePassword123' +); ``` *** diff --git a/docs/interfaces/Base44Client.md b/docs/interfaces/Base44Client.md index bdad400..36b9d13 100644 --- a/docs/interfaces/Base44Client.md +++ b/docs/interfaces/Base44Client.md @@ -6,9 +6,9 @@ The Base44 client instance. -Provides access to all SDK modules and methods for interacting with your Base44 app. +Provides access to all SDK modules and methods for interacting with the app. -This is the main client object returned by [createClient](../functions/createClient.md) and [createClientFromRequest](../functions/createClientFromRequest.md). +This is the main client object returned by [`createClient`](../functions/createClient.md) and [`createClientFromRequest`](../functions/createClientFromRequest.md). It includes all SDK modules and utility methods for managing authentication and configuration. ## Properties @@ -57,7 +57,7 @@ It includes all SDK modules and utility methods for managing authentication and > **appLogs**: [`AppLogsModule`](AppLogsModule.md) -[App logs module](AppLogsModule.md) for tracking application usage. +[App logs module](AppLogsModule.md) for tracking app usage. *** @@ -77,11 +77,9 @@ Cleanup function to disconnect WebSocket connections. Call when you're done with > `readonly` **asServiceRole**: `object` -Provides access to service role modules with elevated permissions. +Provides access to supported modules with elevated permissions. -Service role authentication provides elevated permissions for server-side operations. -Unlike user authentication, which is scoped to a specific user's permissions, service -role authentication has access to data and operations across all users. +Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. #### entities @@ -99,13 +97,13 @@ role authentication has access to data and operations across all users. > **sso**: [`SsoModule`](SsoModule.md) -[SSO module](SsoModule.md) for generating SSO tokens (service role only). +[SSO module](SsoModule.md) for generating SSO tokens. #### connectors > **connectors**: [`ConnectorsModule`](ConnectorsModule.md) -[Connectors module](ConnectorsModule.md) for OAuth token retrieval (service role only). +[Connectors module](ConnectorsModule.md) for OAuth token retrieval. #### functions @@ -155,7 +153,7 @@ Updates the token for both HTTP requests and WebSocket connections. `string` -The new authentication token +The new authentication token. #### Returns diff --git a/docs/interfaces/ConnectorsModule.md b/docs/interfaces/ConnectorsModule.md index 4a31446..cae2217 100644 --- a/docs/interfaces/ConnectorsModule.md +++ b/docs/interfaces/ConnectorsModule.md @@ -7,7 +7,7 @@ Connectors module for managing OAuth tokens for external services. This module allows you to retrieve OAuth access tokens for external services -that your Base44 app has connected to. Use these tokens to make API +that the app has connected to. Use these tokens to make API calls to external services. Unlike the integrations module that provides pre-built functions, connectors give you @@ -15,7 +15,7 @@ raw OAuth tokens so you can call external service APIs directly with full contro the API calls you make. This is useful when you need custom API interactions that aren't covered by Base44's pre-built integrations. -This module is only available with service role authentication. +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. ## Example @@ -36,7 +36,7 @@ const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/cal Retrieves an OAuth access token for a specific external integration type. -Returns the stored OAuth token for an external service that your Base44 app +Returns the stored OAuth token for an external service that the app has connected to. You can then use this token to make authenticated API calls to that external service. diff --git a/docs/interfaces/CreateClientConfig.md b/docs/interfaces/CreateClientConfig.md new file mode 100644 index 0000000..992b7d7 --- /dev/null +++ b/docs/interfaces/CreateClientConfig.md @@ -0,0 +1,42 @@ +[**@base44/sdk**](../README.md) + +*** + +# Interface: CreateClientConfig + +Configuration for creating a Base44 client. + +## Properties + +### appId + +> **appId**: `string` + +The Base44 app ID. + +You can find the `appId` in the browser URL when you're in the app editor. +It's the string between `/apps/` and `/editor/`. + +*** + +### token? + +> `optional` **token**: `string` + +User authentication token. Use this in the frontend when you want to authenticate as a specific user. + +*** + +### serviceToken? + +> `optional` **serviceToken**: `string` + +Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. + +*** + +### options? + +> `optional` **options**: [`CreateClientOptions`](CreateClientOptions.md) + +Additional client options. diff --git a/docs/type-aliases/CreateClientOptions.md b/docs/interfaces/CreateClientOptions.md similarity index 80% rename from docs/type-aliases/CreateClientOptions.md rename to docs/interfaces/CreateClientOptions.md index a23b336..056187f 100644 --- a/docs/type-aliases/CreateClientOptions.md +++ b/docs/interfaces/CreateClientOptions.md @@ -2,9 +2,7 @@ *** -# Type Alias: CreateClientOptions - -> **CreateClientOptions** = `object` +# Interface: CreateClientOptions Options for creating a Base44 client. diff --git a/docs/interfaces/EntitiesModule.md b/docs/interfaces/EntitiesModule.md index ec7c479..2bfe7a3 100644 --- a/docs/interfaces/EntitiesModule.md +++ b/docs/interfaces/EntitiesModule.md @@ -4,15 +4,15 @@ # Interface: EntitiesModule -Entities module for managing application data. +Entities module for managing app data. -This module provides dynamic access to all entities in your Base44 app. +This module provides dynamic access to all entities in the app. Each entity gets a handler with full CRUD operations and additional utility methods. Entities are accessed dynamically using the pattern: `base44.entities.EntityName.method()` -Methods in this module respect the authentication mode used when calling them: +This module is available to use with a client in both user and service role authentication modes: - **User authentication** (`base44.entities`): Operations are scoped to the currently authenticated user's permissions. Access is limited to entities the user has permission to view or modify. @@ -75,7 +75,7 @@ await base44.entities.MyEntity.deleteMany({ status: 'completed' }); Access any entity by name. -Use this to access entities defined in your Base44 app. +Use this to access entities defined in the app. ### Example diff --git a/docs/interfaces/EntityHandler.md b/docs/interfaces/EntityHandler.md index f4387d2..5f57070 100644 --- a/docs/interfaces/EntityHandler.md +++ b/docs/interfaces/EntityHandler.md @@ -6,7 +6,7 @@ Entity handler providing CRUD operations for a specific entity type. -Each entity in your Base44 app gets a handler with these methods for managing data. +Each entity in the app gets a handler with these methods for managing data. ## Methods @@ -64,7 +64,8 @@ const recentRecords = await base44.entities.MyEntity.list('-created_date', 10); ``` ```typescript -// Get paginated results: skip first 20, get next 10 +// Get paginated results +// Skip first 20, get next 10 const page3 = await base44.entities.MyEntity.list('-created_date', 10, 20); ``` @@ -90,10 +91,9 @@ sorting, pagination, and field selection. `Record`\<`string`, `any`\> -Filter query object with field-value pairs. Each key should be a field name -from your entity schema, and each value is the criteria to match. Records matching ALL -specified criteria are returned (AND logic). Field names are case-sensitive and must match -your entity schema definition. +Query object with field-value pairs. Each key should be a field name +from your entity schema, and each value is the criteria to match. Records matching all +specified criteria are returned. Field names are case-sensitive. ##### sort? @@ -190,6 +190,7 @@ Promise resolving to the record. #### Example ```typescript +// Get record by ID const record = await base44.entities.MyEntity.get('entity-123'); console.log(record.name); ``` @@ -221,6 +222,7 @@ Promise resolving to the created record. #### Example ```typescript +// Create a new record const newRecord = await base44.entities.MyEntity.create({ name: 'My Item', status: 'active', @@ -282,7 +284,7 @@ const updated = await base44.entities.MyEntity.update('entity-123', { ### delete() -> **delete**(`id`): `Promise`\<`void`\> +> **delete**(`id`): `Promise`\<`any`\> Deletes a single record by ID. @@ -298,27 +300,27 @@ The unique identifier of the record to delete. #### Returns -`Promise`\<`void`\> +`Promise`\<`any`\> -Promise that resolves when the record is deleted. +Promise resolving to the deletion result. #### Example ```typescript -await base44.entities.MyEntity.delete('entity-123'); -console.log('Record deleted'); +// Delete a record +const result = await base44.entities.MyEntity.delete('entity-123'); +console.log('Deleted:', result); ``` *** ### deleteMany() -> **deleteMany**(`query`): `Promise`\<`void`\> +> **deleteMany**(`query`): `Promise`\<`any`\> Deletes multiple records matching a query. Permanently removes all records that match the provided query. -Use with caution as this operation cannot be undone. #### Parameters @@ -326,36 +328,25 @@ Use with caution as this operation cannot be undone. `Record`\<`string`, `any`\> -Filter query object to match records for deletion. +Query object with field-value pairs. Each key should be a field name +from your entity schema, and each value is the criteria to match. Records matching all +specified criteria will be deleted. Field names are case-sensitive. #### Returns -`Promise`\<`void`\> - -Promise that resolves when the records are deleted. +`Promise`\<`any`\> -#### Examples +Promise resolving to the deletion result. -```typescript -// Delete all completed records -await base44.entities.MyEntity.deleteMany({ - status: 'completed' -}); -``` - -```typescript -// Delete all low priority items -await base44.entities.MyEntity.deleteMany({ - priority: 'low' -}); -``` +#### Example ```typescript // Delete by multiple criteria -await base44.entities.MyEntity.deleteMany({ +const result = await base44.entities.MyEntity.deleteMany({ status: 'completed', priority: 'low' }); +console.log('Deleted:', result); ``` *** @@ -386,12 +377,12 @@ Promise resolving to an array of created records. #### Example ```typescript -const newRecords = await base44.entities.MyEntity.bulkCreate([ +// Create multiple records at once +const result = await base44.entities.MyEntity.bulkCreate([ { name: 'Item 1', status: 'active' }, { name: 'Item 2', status: 'active' }, { name: 'Item 3', status: 'completed' } ]); -console.log(`Created ${newRecords.length} records`); ``` *** @@ -422,10 +413,12 @@ Promise resolving to the import result. #### Example ```typescript -// In a browser with file input -const fileInput = document.querySelector('input[type="file"]'); -const file = fileInput.files[0]; - -const result = await base44.entities.MyEntity.importEntities(file); -console.log(`Imported ${result.count} records`); +// Import records from file in React +const handleFileImport = async (event: React.ChangeEvent) => { + const file = event.target.files?.[0]; + if (file) { + const result = await base44.entities.MyEntity.importEntities(file); + console.log(`Imported ${result.count} records`); + } +}; ``` diff --git a/docs/interfaces/FunctionsModule.md b/docs/interfaces/FunctionsModule.md index 5ea2684..e28e5b1 100644 --- a/docs/interfaces/FunctionsModule.md +++ b/docs/interfaces/FunctionsModule.md @@ -6,9 +6,9 @@ Functions module for invoking custom backend functions. -This module allows you to invoke the custom backend functions in your Base44 app. +This module allows you to invoke the custom backend functions defined in the app. -Methods in this module respect the authentication mode used when calling them: +This module is available to use with a client in both user and service role authentication modes: - **User authentication** (`base44.functions`): Functions are invoked with the currently authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. @@ -42,7 +42,7 @@ const adminResult = await client.asServiceRole.functions.invoke('adminTask', { Invokes a custom backend function by name. -Calls a custom backend function that you've deployed to your Base44 app. +Calls a custom backend function deployed to the app. The function receives the provided data as named parameters and returns the result. If any parameter is a `File` object, the request will automatically be sent as `multipart/form-data`. Otherwise, it will be sent as JSON. diff --git a/docs/interfaces/GetAccessTokenOptions.md b/docs/interfaces/GetAccessTokenOptions.md index 059788b..efb1303 100644 --- a/docs/interfaces/GetAccessTokenOptions.md +++ b/docs/interfaces/GetAccessTokenOptions.md @@ -4,7 +4,7 @@ # Interface: GetAccessTokenOptions -Configuration options for retrieving an access token +Configuration options for retrieving an access token. ## Examples @@ -32,7 +32,7 @@ const token = getAccessToken({ > `optional` **storageKey**: `string` -The key to use when storing or retrieving the token in local storage +The key to use when storing or retrieving the token in local storage. #### Default @@ -46,7 +46,7 @@ The key to use when storing or retrieving the token in local storage > `optional` **paramName**: `string` -The URL parameter name to check for the access token +The URL parameter name to check for the access token. #### Default @@ -60,7 +60,7 @@ The URL parameter name to check for the access token > `optional` **saveToStorage**: `boolean` -Whether to save the token to local storage if found in the URL +Whether to save the token to local storage if found in the URL. #### Default @@ -74,7 +74,7 @@ true > `optional` **removeFromUrl**: `boolean` -Whether to remove the token from the URL after retrieval for security +Whether to remove the token from the URL after retrieval for security. #### Default diff --git a/docs/interfaces/GetLoginUrlOptions.md b/docs/interfaces/GetLoginUrlOptions.md index eeecf98..17afc75 100644 --- a/docs/interfaces/GetLoginUrlOptions.md +++ b/docs/interfaces/GetLoginUrlOptions.md @@ -4,7 +4,7 @@ # Interface: GetLoginUrlOptions -Configuration options for constructing a login URL +Configuration options for constructing a login URL. ## Example @@ -29,7 +29,7 @@ const loginUrl = getLoginUrl('/dashboard', { > **serverUrl**: `string` -The base server URL (e.g., 'https://base44.app') +The base server URL (e.g., 'https://base44.app'). *** @@ -37,7 +37,7 @@ The base server URL (e.g., 'https://base44.app') > **appId**: `string` -The application ID +The app ID. *** @@ -45,7 +45,7 @@ The application ID > `optional` **loginPath**: `string` -The path to the login endpoint +The path to the login endpoint. #### Default diff --git a/docs/interfaces/IntegrationsModule.md b/docs/interfaces/IntegrationsModule.md index b53e753..c26e8f8 100644 --- a/docs/interfaces/IntegrationsModule.md +++ b/docs/interfaces/IntegrationsModule.md @@ -16,7 +16,7 @@ pre-built functions that Base44 executes on your behalf. Integration endpoints are accessed dynamically using the pattern: `base44.integrations.PackageName.EndpointName(params)` -Methods in this module respect the authentication mode used when calling them: +This module is available to use with a client in both user and service role authentication modes: - **User authentication** (`base44.integrations`): Integration endpoints are invoked with the currently authenticated user's permissions. The endpoints execute with the user's authentication @@ -51,14 +51,6 @@ const handleFileUpload = async (event: React.ChangeEvent) => { }; ``` -```typescript -// Use custom integration package -const result = await base44.integrations.CustomPackage.CustomEndpoint({ - param1: 'value1', - param2: 'value2' -}); -``` - ```typescript // Use with service role const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ @@ -72,20 +64,10 @@ const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ \[`packageName`: `string`\]: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) -Access to any custom or installable integration package. - -Use this to call endpoints from custom integration packages -you've installed in your Base44 app. +Access to additional integration packages. -### Example - -```typescript -// Access custom package dynamically -await base44.integrations.Slack.PostMessage({ - channel: '#general', - text: 'Hello from Base44' -}); -``` +Additional integration packages may be added in the future and will be +accessible using the same pattern as Core. ## Properties @@ -93,15 +75,21 @@ await base44.integrations.Slack.PostMessage({ > **Core**: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) -Core package containing built-in Base44 integration endpoints. +Core package containing built-in Base44 integration functions. -Common endpoints include: -- `SendEmail` - Send emails -- `UploadFile` - Upload files +The core integrations package includes the following functions: +- `InvokeLLM`: Generate text or structured JSON data using AI models. +- `GenerateImage`: Create AI-generated images from text prompts. +- `UploadFile`: Upload files to public storage and get a URL. +- `SendEmail`: Send emails to users. +- `ExtractDataFromUploadedFile`: Extract structured data (CSV, PDF, etc.) from uploaded files. +- `UploadPrivateFile`: Upload files to private storage (requires signed URLs to access). +- `CreateFileSignedUrl`: Generate temporary access links for private files. #### Example ```typescript +// Send an email await base44.integrations.Core.SendEmail({ to: 'user@example.com', subject: 'Welcome', diff --git a/docs/type-aliases/ModelFilterParams.md b/docs/interfaces/ModelFilterParams.md similarity index 94% rename from docs/type-aliases/ModelFilterParams.md rename to docs/interfaces/ModelFilterParams.md index 298e878..0212892 100644 --- a/docs/type-aliases/ModelFilterParams.md +++ b/docs/interfaces/ModelFilterParams.md @@ -2,9 +2,7 @@ *** -# Type Alias: ModelFilterParams - -> **ModelFilterParams** = `object` +# Interface: ModelFilterParams Parameters for filtering, sorting, and paginating agent model data. @@ -102,6 +100,6 @@ Number of results to skip. Used for pagination. ### fields? -> `optional` **fields**: ...[] \| `null` +> `optional` **fields**: `string`[] \| `null` Array of field names to include in the response. diff --git a/docs/interfaces/RemoveAccessTokenOptions.md b/docs/interfaces/RemoveAccessTokenOptions.md index 51faef8..e846856 100644 --- a/docs/interfaces/RemoveAccessTokenOptions.md +++ b/docs/interfaces/RemoveAccessTokenOptions.md @@ -4,7 +4,7 @@ # Interface: RemoveAccessTokenOptions -Configuration options for removing an access token +Configuration options for removing an access token. ## Example @@ -22,7 +22,7 @@ removeAccessToken({ storageKey: 'my_app_token' }); > `optional` **storageKey**: `string` -The key to use when removing the token from local storage +The key to use when removing the token from local storage. #### Default diff --git a/docs/interfaces/SaveAccessTokenOptions.md b/docs/interfaces/SaveAccessTokenOptions.md index 279382b..4919768 100644 --- a/docs/interfaces/SaveAccessTokenOptions.md +++ b/docs/interfaces/SaveAccessTokenOptions.md @@ -4,7 +4,7 @@ # Interface: SaveAccessTokenOptions -Configuration options for saving an access token +Configuration options for saving an access token. ## Example @@ -22,7 +22,7 @@ saveAccessToken('my-token-123', { storageKey: 'my_app_token' }); > `optional` **storageKey**: `string` -The key to use when storing the token in local storage +The key to use when storing the token in local storage. #### Default diff --git a/docs/interfaces/SsoModule.md b/docs/interfaces/SsoModule.md index e01d2d2..57668d4 100644 --- a/docs/interfaces/SsoModule.md +++ b/docs/interfaces/SsoModule.md @@ -7,10 +7,10 @@ SSO (Single Sign-On) module for managing SSO authentication. This module provides methods for retrieving SSO access tokens for users. -These tokens allow you to authenticate your Base44 users with external +These tokens allow you to authenticate Base44 users with external systems or services. -This module is only available with service role authentication. +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. ## Example @@ -24,7 +24,7 @@ console.log(response.data.access_token); ### getAccessToken() -> **getAccessToken**(`userid`): `Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> +> **getAccessToken**(`userid`): `Promise`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md)\> Gets SSO access token for a specific user. @@ -41,14 +41,14 @@ The user ID to get the access token for. #### Returns -`Promise`\<`AxiosResponse`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md), `any`\>\> +`Promise`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md)\> -Promise resolving to an Axios response containing the access token. +Promise resolving to the SSO access token response. #### Example ```typescript // Get SSO access token for a user const response = await base44.asServiceRole.sso.getAccessToken('user_123'); -console.log(response.data.access_token); +console.log(response.access_token); ``` diff --git a/docs/interfaces/User.md b/docs/interfaces/User.md index 0b7d50f..c7d20a7 100644 --- a/docs/interfaces/User.md +++ b/docs/interfaces/User.md @@ -10,7 +10,7 @@ An authenticated user. \[`key`: `string`\]: `any` -Additional custom fields defined in your user schema. Any custom properties you've added to your user schema in your Base44 application will be available here with their configured types and values. +Additional custom fields defined in the user schema. Any custom properties added to the user schema in the app will be available here with their configured types and values. ## Properties @@ -66,7 +66,7 @@ URL to user's profile picture. > `optional` **role**: `string` -User's role in the application. Roles are configured in your Base44 application settings and determine the user's permissions and access levels. +User's role in the app. Roles are configured in the app settings and determine the user's permissions and access levels. *** diff --git a/docs/type-aliases/CreateClientConfig.md b/docs/type-aliases/CreateClientConfig.md deleted file mode 100644 index ba73683..0000000 --- a/docs/type-aliases/CreateClientConfig.md +++ /dev/null @@ -1,39 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Type Alias: CreateClientConfig - -> **CreateClientConfig** = `object` - -Configuration for creating a Base44 client. - -## Properties - -### appId - -> **appId**: `string` - -Your Base44 application ID. - -You can find your `appId` in the browser URL when you're in the app editor. -It's the string between `/apps/` and `/editor/`. - -*** - -### token? - -> `optional` **token**: `string` - -User authentication token. Use this for client-side applications where you want to -authenticate as a specific user. - -*** - -### serviceToken? - -> `optional` **serviceToken**: `string` - -Service role authentication token. Use this for server-side applications where you need -elevated permissions to access data across all users or perform admin operations. This token -should be kept secret and never exposed to the client. diff --git a/src/client.ts b/src/client.ts index a3ec7f4..af095c2 100644 --- a/src/client.ts +++ b/src/client.ts @@ -21,19 +21,17 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; /** * Creates a Base44 SDK client instance. * - * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@link EntitiesModule | entities}, {@link AuthModule | auth}, and {@link FunctionsModule | functions}. + * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@linkcode EntitiesModule | entities}, {@linkcode AuthModule | auth}, and {@linkcode FunctionsModule | functions}. * * The client supports two authentication modes: * - **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. * - * Most modules are available in both modes, but with different permission levels. Some modules are only available with service role authentication. + * For example, when using the {@linkcode EntitiesModule | entities} module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. * - * For example, when using the {@link EntitiesModule | entities} module with user authentication you'll only get data accessible to the current user. With service role authentication, you'll get all data accessible to all users across the entire application. + * Most modules are available in both modes, but with different permission levels. However, some modules are only available in one authentication mode. * - * To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in your application's frontend. - * - * The {@link AuthModule | auth} module is only available with user authentication for security reasons. + * To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in the app's frontend. * * @param config - Configuration object for the client. * @returns A configured Base44 client instance with access to all SDK modules. @@ -284,13 +282,10 @@ export function createClient(config: CreateClientConfig): Base44Client { /** * Creates a Base44 client from an HTTP request. * - * Creates a client by automatically extracting authentication tokens and configuration from request with authentication information in their headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from your app frontend to your backend functions. + * Creates a client by automatically extracting authentication tokens and configuration from an incoming HTTP request with authentication information in its headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from the app's frontend to the backend functions. * * @param request - The incoming HTTP request object containing Base44 authentication headers. - * @returns A configured Base44 client instance with authentication from the request. - * - * @throws {Error} When Base44-App-Id header is missing. - * @throws {Error} When authorization headers have invalid format. + * @returns A configured Base44 client instance with authentication from the incoming request. * * @example * ```typescript @@ -309,7 +304,7 @@ export function createClient(config: CreateClientConfig): Base44Client { * return Response.json({ error: 'Unauthorized' }, { status: 401 }); * } * - * // Use the client to access the API + * // Use the client to make API calls * * } catch (error) { * return Response.json({ error: error.message }, { status: 500 }); diff --git a/src/client.types.ts b/src/client.types.ts index 32c6e5f..8f478fd 100644 --- a/src/client.types.ts +++ b/src/client.types.ts @@ -10,43 +10,40 @@ import type { AppLogsModule } from "./modules/app-logs.types.js"; /** * Options for creating a Base44 client. */ -export type CreateClientOptions = { +export interface CreateClientOptions { /** * Optional error handler that will be called whenever an API error occurs. */ onError?: (error: Error) => void; -}; +} /** * Configuration for creating a Base44 client. */ -export type CreateClientConfig = { +export interface CreateClientConfig { /** * The Base44 server URL. Defaults to "https://base44.app". * @internal */ serverUrl?: string; /** - * The base URL of your application (used for login redirects). + * The base URL of the app, which is used for login redirects. * @internal */ appBaseUrl?: string; /** - * Your Base44 application ID. + * The Base44 app ID. * - * You can find your `appId` in the browser URL when you're in the app editor. + * You can find the `appId` in the browser URL when you're in the app editor. * It's the string between `/apps/` and `/editor/`. */ appId: string; /** - * User authentication token. Use this for client-side applications where you want to - * authenticate as a specific user. + * User authentication token. Use this in the frontend when you want to authenticate as a specific user. */ token?: string; /** - * Service role authentication token. Use this for server-side applications where you need - * elevated permissions to access data across all users or perform admin operations. This token - * should be kept secret and never exposed to the client. + * Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. */ serviceToken?: string; /** @@ -66,17 +63,16 @@ export type CreateClientConfig = { headers?: Record; /** * Additional client options. - * @internal */ options?: CreateClientOptions; -}; +} /** * The Base44 client instance. * - * Provides access to all SDK modules and methods for interacting with your Base44 app. + * Provides access to all SDK modules and methods for interacting with the app. * - * This is the main client object returned by {@link createClient} and {@link createClientFromRequest}. + * This is the main client object returned by {@linkcode createClient} and {@linkcode createClientFromRequest}. * It includes all SDK modules and utility methods for managing authentication and configuration. */ export interface Base44Client { @@ -90,7 +86,7 @@ export interface Base44Client { functions: FunctionsModule; /** {@link AgentsModule | Agents module} for managing AI agent conversations. */ agents: AgentsModule; - /** {@link AppLogsModule | App logs module} for tracking application usage. */ + /** {@link AppLogsModule | App logs module} for tracking app usage. */ appLogs: AppLogsModule; /** Cleanup function to disconnect WebSocket connections. Call when you're done with the client. */ cleanup: () => void; @@ -100,7 +96,7 @@ export interface Base44Client { * * Updates the token for both HTTP requests and WebSocket connections. * - * @param newToken - The new authentication token + * @param newToken - The new authentication token. */ setToken(newToken: string): void; @@ -111,11 +107,9 @@ export interface Base44Client { getConfig(): { serverUrl: string; appId: string; requiresAuth: boolean }; /** - * Provides access to service role modules with elevated permissions. + * Provides access to supported modules with elevated permissions. * - * Service role authentication provides elevated permissions for server-side operations. - * Unlike user authentication, which is scoped to a specific user's permissions, service - * role authentication has access to data and operations across all users. + * Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. * * @throws {Error} When accessed without providing a serviceToken during client creation */ @@ -124,9 +118,9 @@ export interface Base44Client { entities: EntitiesModule; /** {@link IntegrationsModule | Integrations module} with elevated permissions. */ integrations: IntegrationsModule; - /** {@link SsoModule | SSO module} for generating SSO tokens (service role only). */ + /** {@link SsoModule | SSO module} for generating SSO tokens. */ sso: SsoModule; - /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval (service role only). */ + /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval. */ connectors: ConnectorsModule; /** {@link FunctionsModule | Functions module} with elevated permissions. */ functions: FunctionsModule; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 3d20679..dc9ca7c 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -7,21 +7,21 @@ import { ModelFilterParams } from "../types"; * * Contains details about the agent's reasoning process when generating a response. */ -export type AgentMessageReasoning = { +export interface AgentMessageReasoning { /** When reasoning started. */ start_date: string; /** When reasoning ended. */ end_date?: string; /** Reasoning content. */ content: string; -}; +} /** * A tool call made by the agent. * * Represents a function or tool that the agent invoked during message generation. */ -export type AgentMessageToolCall = { +export interface AgentMessageToolCall { /** Tool call ID. */ id: string; /** Name of the tool called. */ @@ -32,50 +32,50 @@ export type AgentMessageToolCall = { status: "running" | "success" | "error" | "stopped"; /** Results from the tool call. */ results?: string | null; -}; +} /** * Token usage statistics for an agent message. * * Tracks the number of tokens consumed when generating the message. */ -export type AgentMessageUsage = { +export interface AgentMessageUsage { /** Number of tokens in the prompt. */ prompt_tokens?: number; /** Number of tokens in the completion. */ completion_tokens?: number; -}; +} /** * Custom context provided with an agent message. * * Additional contextual information that can be passed to the agent. */ -export type AgentMessageCustomContext = { +export interface AgentMessageCustomContext { /** Context message. */ message: string; /** Associated data for the context. */ data: Record; /** Type of context. */ type: string; -}; +} /** * Metadata about when and by whom a message was created. */ -export type AgentMessageMetadata = { +export interface AgentMessageMetadata { /** When the message was created. */ created_date: string; /** Email of the user who created the message. */ created_by_email: string; /** Full name of the user who created the message. */ created_by_full_name: string | null; -}; +} /** * An agent conversation containing messages exchanged with an AI agent. */ -export type AgentConversation = { +export interface AgentConversation { /** Unique identifier for the conversation. */ id: string; /** Application ID. */ @@ -88,12 +88,12 @@ export type AgentConversation = { messages: AgentMessage[]; /** Optional metadata associated with the conversation. */ metadata?: Record; -}; +} /** * A message in an agent conversation. */ -export type AgentMessage = { +export interface AgentMessage { /** Unique identifier for the message. */ id: string; /** Role of the message sender. */ @@ -120,13 +120,13 @@ export type AgentMessage = { metadata?: AgentMessageMetadata; /** Additional custom parameters for the message. */ additional_message_params?: Record; -}; +} /** * Configuration for creating the agents module. * @internal */ -export type AgentsModuleConfig = { +export interface AgentsModuleConfig { /** Axios instance for HTTP requests */ axios: AxiosInstance; /** WebSocket instance for real-time updates */ @@ -137,16 +137,31 @@ export type AgentsModuleConfig = { serverUrl?: string; /** Authentication token */ token?: string; -}; +} /** * Agents module for managing AI agent conversations. * * This module provides methods to create and manage conversations with AI agents, * send messages, and subscribe to real-time updates. Conversations can be used - * for chat interfaces, support systems, or any interactive AI application. + * for chat interfaces, support systems, or any interactive AI app. + * + * The agents module enables you to: + * + * - **Create conversations** with agents defined in the app. + * - **Send messages** from users to agents and receive AI-generated responses. + * - **Retrieve conversations** individually or as filtered lists with sorting and pagination. + * - **Subscribe to real-time updates** using WebSocket connections to receive instant notifications when new messages arrive. + * - **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. + * + * The agents module operates with a two-level hierarchy: + * + * 1. **Conversations** ({@link AgentConversation}): 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. * - * Methods in this module respect the authentication mode used when calling them: + * 2. **Messages** ({@link AgentMessage}): 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. + * + * This module is available to use with a client in both user and service role authentication modes: * * - **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. * - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. @@ -192,6 +207,8 @@ export interface AgentsModule { /** * Gets all conversations. * + * Retrieves all conversations. Use {@linkcode listConversations | listConversations()} to filter which conversations are returned, apply sorting, or paginate results. Use {@linkcode getConversation | getConversation()} to retrieve a specific conversation by ID. + * * @returns Promise resolving to an array of conversations. * * @example @@ -199,12 +216,18 @@ export interface AgentsModule { * const conversations = await base44.agents.getConversations(); * console.log(`Total conversations: ${conversations.length}`); * ``` + * + * @see {@linkcode listConversations | listConversations()} for filtering, sorting, and pagination + * @see {@linkcode getConversation | getConversation()} for retrieving a specific conversation by ID */ getConversations(): Promise; /** * Gets a specific conversation by ID. * + * Retrieves a single conversation using its unique identifier. To retrieve + * all conversations, use {@linkcode getConversations | getConversations()} To filter, sort, or paginate conversations, use {@linkcode listConversations | listConversations()}. + * * @param conversationId - The unique identifier of the conversation. * @returns Promise resolving to the conversation, or undefined if not found. * @@ -215,13 +238,18 @@ export interface AgentsModule { * console.log(`Conversation has ${conversation.messages.length} messages`); * } * ``` + * + * @see {@linkcode getConversations | getConversations()} for retrieving all conversations + * @see {@linkcode listConversations | listConversations()} for filtering and sorting conversations */ getConversation( conversationId: string ): Promise; /** - * Lists conversations with filtering and pagination. + * Lists conversations with filtering, sorting, and pagination. + * + * Provides querying capabilities including filtering by fields, sorting, pagination, and field selection. For cases where you need all conversations without filtering, use {@linkcode getConversations | getConversations()}. To retrieve a specific conversation by ID, use {@linkcode getConversation | getConversation()}. * * @param filterParams - Filter parameters for querying conversations. * @returns Promise resolving to an array of filtered conversations. @@ -233,6 +261,22 @@ export interface AgentsModule { * sort: '-created_date' * }); * ``` + * + * @example + * ```typescript + * // Filter by agent and metadata + * const supportConversations = await base44.agents.listConversations({ + * q: { + * agent_name: 'support-agent', + * 'metadata.priority': 'high' + * }, + * sort: '-created_date', + * limit: 20 + * }); + * ``` + * + * @see {@linkcode getConversations | getConversations()} for retrieving all conversations without filtering + * @see {@linkcode getConversation | getConversation()} for retrieving a specific conversation by ID */ listConversations( filterParams: ModelFilterParams @@ -274,6 +318,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Send a message to the agent * const message = await base44.agents.addMessage(conversation, { * role: 'user', * content: 'Hello, I need help with my order #12345' @@ -299,6 +344,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Subscribe to real-time updates * const unsubscribe = base44.agents.subscribeToConversation( * 'conv-123', * (updatedConversation) => { diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts index 12bfa49..2bf45d8 100644 --- a/src/modules/app-logs.types.ts +++ b/src/modules/app-logs.types.ts @@ -37,13 +37,13 @@ export interface GetStatsParams { } /** - * App Logs module for tracking and analyzing application usage. + * App Logs module for tracking and analyzing app usage. * * This module provides methods to log user activity, fetch logs, and retrieve - * statistics about your application's usage. Useful for analytics, monitoring, + * statistics about the app's usage. Useful for analytics, monitoring, * and understanding user behavior. * - * Methods in this module respect the authentication mode used when calling them: + * This module is available to use with a client in both user and service role authentication modes: * * - **User authentication** (`base44.appLogs`): Operations are scoped to the currently * authenticated user. For example, `fetchLogs()` returns only logs for the current user, @@ -51,7 +51,7 @@ export interface GetStatsParams { * * - **Service role authentication** (`client.asServiceRole.appLogs`): Operations have * elevated permissions and can access data across all users. For example, `fetchLogs()` - * returns logs from all users in your application, and `getStats()` returns application-wide + * returns logs from all users in the app, and `getStats()` returns app-wide * statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. * * @example @@ -71,7 +71,7 @@ export interface GetStatsParams { * * @example * ```typescript - * // Get application statistics + * // Get app statistics * const stats = await base44.appLogs.getStats({ * startDate: '2024-01-01', * endDate: '2024-01-31' @@ -80,9 +80,9 @@ export interface GetStatsParams { */ export interface AppLogsModule { /** - * Log user activity in the application. + * Log user activity in the app. * - * Records when a user visits a specific page or section of your application. + * Records when a user visits a specific page or section of the app. * Useful for tracking user navigation patterns and popular features. * * @param pageName - Name of the page or section being visited. @@ -106,10 +106,10 @@ export interface AppLogsModule { logUserInApp(pageName: string): Promise; /** - * Fetch application logs with optional filtering. + * Fetch app logs with optional filtering. * * Retrieves logs of user activity with support for filtering, pagination, - * and sorting. Use this to analyze user behavior and application usage patterns. + * and sorting. Use this to analyze user behavior and app usage patterns. * * @param params - Query parameters for filtering logs. * @returns Promise resolving to the logs data. @@ -150,9 +150,9 @@ export interface AppLogsModule { fetchLogs(params?: FetchLogsParams): Promise; /** - * Gets application usage statistics. + * Gets app usage statistics. * - * Retrieves aggregated statistics about application usage, such as page views, + * Retrieves aggregated statistics about app usage, such as page views, * active users, and popular features. Useful for dashboards and analytics. * * @param params - Query parameters for filtering and grouping statistics. diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 336aaaa..353abec 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -158,7 +158,7 @@ export function createAuthModule( } }, - // Invite a user to the application + // Invite a user to the app inviteUser(userEmail: string, role: string) { return axios.post(`/apps/${appId}/users/invite-user`, { user_email: userEmail, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 6590fae..8b22088 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -17,7 +17,7 @@ export interface User { /** URL to user's profile picture. */ avatar_url?: string; /** - * User's role in the application. Roles are configured in your Base44 application settings and determine the user's permissions and access levels. + * User's role in the app. Roles are configured in the app settings and determine the user's permissions and access levels. */ role?: string; /** Timestamp when the user was created. */ @@ -25,7 +25,7 @@ export interface User { /** Timestamp when the user was last updated. */ updated_at?: string; /** - * Additional custom fields defined in your user schema. Any custom properties you've added to your user schema in your Base44 application will be available here with their configured types and values. + * Additional custom fields defined in the user schema. Any custom properties added to the user schema in the app will be available here with their configured types and values. */ [key: string]: any; } @@ -107,6 +107,8 @@ export interface AuthModuleOptions { * - OTP verification * - User invitations * + * The auth module is only available in user authentication mode (`base44.auth`). + * * @example * ```typescript * // Login with email and password @@ -148,6 +150,7 @@ export interface AuthModule { * * @example * ```typescript + * // Get current user information * const user = await base44.auth.me(); * console.log(`Logged in as: ${user.email}`); * console.log(`User ID: ${user.id}`); @@ -158,10 +161,10 @@ export interface AuthModule { /** * Updates the current authenticated user's information. * - * Performs a partial update - only include the fields you want to change. - * Commonly updated fields include name, avatar_url, and custom profile fields. + * Only the fields included in the data object will be updated. + * Commonly updated fields include `name`, `avatar_url`, and custom profile fields. * - * @param data - Object containing the fields to update. Only the provided fields will be changed. + * @param data - Object containing the fields to update. * @returns Promise resolving to the updated user data. * * @example @@ -306,6 +309,7 @@ export interface AuthModule { * * @example * ```typescript + * // Check authentication status * const isAuthenticated = await base44.auth.isAuthenticated(); * if (isAuthenticated) { * console.log('User is logged in'); @@ -318,14 +322,14 @@ export interface AuthModule { isAuthenticated(): Promise; /** - * Invites a user to the application. + * Invites a user to the app. * * Sends an invitation email to a potential user with a specific role. - * Roles are configured in your Base44 application settings and determine + * Roles are configured in the app settings and determine * the user's permissions and access levels. * * @param userEmail - Email address of the user to invite. - * @param role - Role to assign to the invited user. Must match a role defined in your Base44 application. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. + * @param role - Role to assign to the invited user. Must match a role defined in the app. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. * @returns Promise that resolves when the invitation is sent successfully. Throws an error if the invitation fails. * * @example @@ -343,19 +347,26 @@ export interface AuthModule { /** * Registers a new user account. * - * Creates a new user account with email and password. + * Creates a new user account with email and password. After successful registration, + * use {@linkcode loginViaEmailPassword | loginViaEmailPassword()} to log in the user. * * @param payload - Registration details including email, password, and optional fields. * @returns Promise resolving to the registration response. * * @example * ```typescript + * // Register a new user * await base44.auth.register({ * email: 'newuser@example.com', * password: 'securePassword123', * referral_code: 'FRIEND2024' * }); - * console.log('Registration successful! Please check your email.'); + * + * // Login after registration + * const { access_token, user } = await base44.auth.loginViaEmailPassword( + * 'newuser@example.com', + * 'securePassword123' + * ); * ``` */ register(payload: RegisterPayload): Promise; diff --git a/src/modules/connectors.types.ts b/src/modules/connectors.types.ts index a628c1a..da7e612 100644 --- a/src/modules/connectors.types.ts +++ b/src/modules/connectors.types.ts @@ -14,7 +14,7 @@ export interface ConnectorAccessTokenResponse { * Connectors module for managing OAuth tokens for external services. * * This module allows you to retrieve OAuth access tokens for external services - * that your Base44 app has connected to. Use these tokens to make API + * that the app has connected to. Use these tokens to make API * calls to external services. * * Unlike the integrations module that provides pre-built functions, connectors give you @@ -22,7 +22,7 @@ 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. * - * This module is only available with service role authentication. + * 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. * * @example * ```typescript @@ -38,7 +38,7 @@ export interface ConnectorsModule { /** * Retrieves an OAuth access token for a specific external integration type. * - * Returns the stored OAuth token for an external service that your Base44 app + * Returns the stored OAuth token for an external service that the app * has connected to. You can then use this token to make authenticated API calls * to that external service. * diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index b9ce2ff..af10cbe 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -1,7 +1,7 @@ /** * Entity handler providing CRUD operations for a specific entity type. * - * Each entity in your Base44 app gets a handler with these methods for managing data. + * Each entity in the app gets a handler with these methods for managing data. */ export interface EntityHandler { /** @@ -30,7 +30,8 @@ export interface EntityHandler { * * @example * ```typescript - * // Get paginated results: skip first 20, get next 10 + * // Get paginated results + * // Skip first 20, get next 10 * const page3 = await base44.entities.MyEntity.list('-created_date', 10, 20); * ``` * @@ -53,7 +54,7 @@ export interface EntityHandler { * Retrieves records that match specific criteria with support for * sorting, pagination, and field selection. * - * @param query - Filter query object with field-value pairs. Each key should be a field name + * @param query - Query object with field-value pairs. Each key should be a field name * from your entity schema, and each value is the criteria to match. Records matching all * specified criteria are returned. Field names are case-sensitive. * @param sort - Sort parameter, such as `'-created_date'` for descending. @@ -120,6 +121,7 @@ export interface EntityHandler { * * @example * ```typescript + * // Get record by ID * const record = await base44.entities.MyEntity.get('entity-123'); * console.log(record.name); * ``` @@ -136,6 +138,7 @@ export interface EntityHandler { * * @example * ```typescript + * // Create a new record * const newRecord = await base44.entities.MyEntity.create({ * name: 'My Item', * status: 'active', @@ -182,53 +185,38 @@ export interface EntityHandler { * Permanently removes a record from the database. * * @param id - The unique identifier of the record to delete. - * @returns Promise that resolves when the record is deleted. + * @returns Promise resolving to the deletion result. * * @example * ```typescript - * await base44.entities.MyEntity.delete('entity-123'); - * console.log('Record deleted'); + * // Delete a record + * const result = await base44.entities.MyEntity.delete('entity-123'); + * console.log('Deleted:', result); * ``` */ - delete(id: string): Promise; + delete(id: string): Promise; /** * Deletes multiple records matching a query. * * Permanently removes all records that match the provided query. - * Use with caution as this operation cannot be undone. * - * @param query - Filter query object with field-value pairs. Each key should be a field name + * @param query - Query object with field-value pairs. Each key should be a field name * from your entity schema, and each value is the criteria to match. Records matching all * specified criteria will be deleted. Field names are case-sensitive. - * @returns Promise that resolves when the records are deleted. - * - * @example - * ```typescript - * // Delete all completed records - * await base44.entities.MyEntity.deleteMany({ - * status: 'completed' - * }); - * ``` - * - * @example - * ```typescript - * // Delete all low priority items - * await base44.entities.MyEntity.deleteMany({ - * priority: 'low' - * }); - * ``` + * @returns Promise resolving to the deletion result. * * @example * ```typescript * // Delete by multiple criteria - * await base44.entities.MyEntity.deleteMany({ + * const result = await base44.entities.MyEntity.deleteMany({ * status: 'completed', * priority: 'low' * }); + * console.log('Deleted:', result); * ``` */ - deleteMany(query: Record): Promise; + deleteMany(query: Record): Promise; /** * Creates multiple records in a single request. @@ -241,12 +229,12 @@ export interface EntityHandler { * * @example * ```typescript - * const newRecords = await base44.entities.MyEntity.bulkCreate([ + * // Create multiple records at once + * const result = await base44.entities.MyEntity.bulkCreate([ * { name: 'Item 1', status: 'active' }, * { name: 'Item 2', status: 'active' }, * { name: 'Item 3', status: 'completed' } * ]); - * console.log(`Created ${newRecords.length} records`); * ``` */ bulkCreate(data: Record[]): Promise; @@ -276,15 +264,15 @@ export interface EntityHandler { } /** - * Entities module for managing application data. + * Entities module for managing app data. * - * This module provides dynamic access to all entities in your Base44 app. + * This module provides dynamic access to all entities in the app. * Each entity gets a handler with full CRUD operations and additional utility methods. * * Entities are accessed dynamically using the pattern: * `base44.entities.EntityName.method()` * - * Methods in this module respect the authentication mode used when calling them: + * This module is available to use with a client in both user and service role authentication modes: * * - **User authentication** (`base44.entities`): Operations are scoped to the currently * authenticated user's permissions. Access is limited to entities the user has permission to view or modify. @@ -351,7 +339,7 @@ export interface EntitiesModule { /** * Access any entity by name. * - * Use this to access entities defined in your Base44 app. + * Use this to access entities defined in the app. * * @example * ```typescript diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index 7a91dcb..b8bdc5d 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -1,9 +1,9 @@ /** * Functions module for invoking custom backend functions. * - * This module allows you to invoke the custom backend functions in your Base44 app. + * This module allows you to invoke the custom backend functions defined in the app. * - * Methods in this module respect the authentication mode used when calling them: + * This module is available to use with a client in both user and service role authentication modes: * * - **User authentication** (`base44.functions`): Functions are invoked with the currently * authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. @@ -33,7 +33,7 @@ export interface FunctionsModule { /** * Invokes a custom backend function by name. * - * Calls a custom backend function that you've deployed to your Base44 app. + * Calls a custom backend function deployed to the app. * The function receives the provided data as named parameters and returns * the result. If any parameter is a `File` object, the request will automatically be * sent as `multipart/form-data`. Otherwise, it will be sent as JSON. diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 62271d3..706b4a1 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -44,7 +44,7 @@ export type IntegrationPackage = { * Integration endpoints are accessed dynamically using the pattern: * `base44.integrations.PackageName.EndpointName(params)` * - * Methods in this module respect the authentication mode used when calling them: + * This module is available to use with a client in both user and service role authentication modes: * * - **User authentication** (`base44.integrations`): Integration endpoints are invoked with the * currently authenticated user's permissions. The endpoints execute with the user's authentication @@ -81,15 +81,6 @@ export type IntegrationPackage = { * * @example * ```typescript - * // Use custom integration package - * const result = await base44.integrations.CustomPackage.CustomEndpoint({ - * param1: 'value1', - * param2: 'value2' - * }); - * ``` - * - * @example - * ```typescript * // Use with service role * const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ * to: 'admin@example.com', @@ -100,14 +91,20 @@ export type IntegrationPackage = { */ export interface IntegrationsModule { /** - * Core package containing built-in Base44 integration endpoints. + * Core package containing built-in Base44 integration functions. * - * Common endpoints include: - * - `SendEmail` - Send emails - * - `UploadFile` - Upload files + * The core integrations package includes the following functions: + * - `InvokeLLM`: Generate text or structured JSON data using AI models. + * - `GenerateImage`: Create AI-generated images from text prompts. + * - `UploadFile`: Upload files to public storage and get a URL. + * - `SendEmail`: Send emails to users. + * - `ExtractDataFromUploadedFile`: Extract structured data (CSV, PDF, etc.) from uploaded files. + * - `UploadPrivateFile`: Upload files to private storage (requires signed URLs to access). + * - `CreateFileSignedUrl`: Generate temporary access links for private files. * * @example * ```typescript + * // Send an email * await base44.integrations.Core.SendEmail({ * to: 'user@example.com', * subject: 'Welcome', @@ -118,19 +115,10 @@ export interface IntegrationsModule { Core: IntegrationPackage; /** - * Access to any custom or installable integration package. + * Access to additional integration packages. * - * Use this to call endpoints from custom integration packages - * you've installed in your Base44 app. - * - * @example - * ```typescript - * // Access custom package dynamically - * await base44.integrations.Slack.PostMessage({ - * channel: '#general', - * text: 'Hello from Base44' - * }); - * ``` + * Additional integration packages may be added in the future and will be + * accessible using the same pattern as Core. */ [packageName: string]: IntegrationPackage; } diff --git a/src/modules/sso.types.ts b/src/modules/sso.types.ts index 8df02d4..ab412f5 100644 --- a/src/modules/sso.types.ts +++ b/src/modules/sso.types.ts @@ -11,10 +11,10 @@ export interface SsoAccessTokenResponse { * SSO (Single Sign-On) module for managing SSO authentication. * * This module provides methods for retrieving SSO access tokens for users. - * These tokens allow you to authenticate your Base44 users with external + * These tokens allow you to authenticate Base44 users with external * systems or services. * - * This module is only available with service role authentication. + * 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. * * @example * ```typescript @@ -31,16 +31,14 @@ export interface SsoModule { * a user with external services or systems. * * @param userid - The user ID to get the access token for. - * @returns Promise resolving to an Axios response containing the access token. + * @returns Promise resolving to the SSO access token response. * * @example * ```typescript * // Get SSO access token for a user * const response = await base44.asServiceRole.sso.getAccessToken('user_123'); - * console.log(response.data.access_token); + * console.log(response.access_token); * ``` */ - getAccessToken( - userid: string - ): Promise>; + getAccessToken(userid: string): Promise; } diff --git a/src/types.ts b/src/types.ts index 2d84f83..43291d9 100644 --- a/src/types.ts +++ b/src/types.ts @@ -63,11 +63,11 @@ export * from "./modules/types.js"; * }); * ``` */ -export type ModelFilterParams = { +export interface ModelFilterParams { q?: Record; sort?: string | null; sort_by?: string | null; limit?: number | null; skip?: number | null; fields?: string[] | null; -}; +} diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index 84039f6..a04bdec 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -98,7 +98,7 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { * * @param token - The access token string to save. * @param options - Configuration options for saving the token. - * @returns `true` if the token was saved successfully, `false` otherwise. + * @returns Returns`true` if the token was saved successfully, `false` otherwise. * * @example * ```typescript @@ -146,7 +146,7 @@ export function saveAccessToken( * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | base44.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. * * @param options - Configuration options for token removal. - * @returns `true` if the token was removed successfully, `false` otherwise. + * @returns Returns `true` if the token was removed successfully, `false` otherwise. * * @example * ```typescript @@ -181,10 +181,7 @@ export function removeAccessToken(options: RemoveAccessTokenOptions) { /** * Constructs the absolute URL for the login page with a redirect parameter. * - * Low-level utility for building login URLs. For standard login redirects, use - * `base44.auth.redirectToLogin()` instead, which handles this automatically. This function - * is useful when you need to construct login URLs without a client instance or for custom - * authentication flows. + * Low-level utility for building login URLs. For standard login redirects, use {@linkcode AuthModule.redirectToLogin | base44.auth.redirectToLogin()} instead, which handles this automatically. This function is useful when you need to construct login URLs without a client instance or for custom authentication flows. * * @param nextUrl - The URL to redirect to after successful login. * @param options - Configuration options. diff --git a/src/utils/auth-utils.types.ts b/src/utils/auth-utils.types.ts index bcde6e7..350cac5 100644 --- a/src/utils/auth-utils.types.ts +++ b/src/utils/auth-utils.types.ts @@ -1,5 +1,5 @@ /** - * Configuration options for retrieving an access token + * Configuration options for retrieving an access token. * * @example * ```typescript @@ -24,32 +24,32 @@ */ export interface GetAccessTokenOptions { /** - * The key to use when storing or retrieving the token in local storage + * The key to use when storing or retrieving the token in local storage. * @default 'base44_access_token' */ storageKey?: string; /** - * The URL parameter name to check for the access token + * The URL parameter name to check for the access token. * @default 'access_token' */ paramName?: string; /** - * Whether to save the token to local storage if found in the URL + * Whether to save the token to local storage if found in the URL. * @default true */ saveToStorage?: boolean; /** - * Whether to remove the token from the URL after retrieval for security + * Whether to remove the token from the URL after retrieval for security. * @default true */ removeFromUrl?: boolean; } /** - * Configuration options for saving an access token + * Configuration options for saving an access token. * * @example * ```typescript @@ -62,14 +62,14 @@ export interface GetAccessTokenOptions { */ export interface SaveAccessTokenOptions { /** - * The key to use when storing the token in local storage + * The key to use when storing the token in local storage. * @default 'base44_access_token' */ storageKey?: string; } /** - * Configuration options for removing an access token + * Configuration options for removing an access token. * * @example * ```typescript @@ -82,14 +82,14 @@ export interface SaveAccessTokenOptions { */ export interface RemoveAccessTokenOptions { /** - * The key to use when removing the token from local storage + * The key to use when removing the token from local storage. * @default 'base44_access_token' */ storageKey?: string; } /** - * Configuration options for constructing a login URL + * Configuration options for constructing a login URL. * * @example * ```typescript @@ -109,39 +109,39 @@ export interface RemoveAccessTokenOptions { */ export interface GetLoginUrlOptions { /** - * The base server URL (e.g., 'https://base44.app') + * The base server URL (e.g., 'https://base44.app'). */ serverUrl: string; /** - * The application ID + * The app ID. */ appId: string; /** - * The path to the login endpoint + * The path to the login endpoint. * @default '/login' */ loginPath?: string; } -/** Type definition for getAccessToken function */ +/** Type definition for getAccessToken function. */ export type GetAccessTokenFunction = ( options?: GetAccessTokenOptions ) => string | null; -/** Type definition for saveAccessToken function */ +/** Type definition for saveAccessToken function. */ export type SaveAccessTokenFunction = ( token: string, options: SaveAccessTokenOptions ) => boolean; -/** Type definition for removeAccessToken function */ +/** Type definition for removeAccessToken function. */ export type RemoveAccessTokenFunction = ( options: RemoveAccessTokenOptions ) => boolean; -/** Type definition for getLoginUrl function */ +/** Type definition for getLoginUrl function. */ export type GetLoginUrlFunction = ( nextUrl: string, options: GetLoginUrlOptions diff --git a/src/utils/socket-utils.ts b/src/utils/socket-utils.ts index 0fc2f97..2f73131 100644 --- a/src/utils/socket-utils.ts +++ b/src/utils/socket-utils.ts @@ -1,13 +1,13 @@ import { Socket, io } from "socket.io-client"; import { getAccessToken } from "./auth-utils.js"; -export type RoomsSocketConfig = { +export interface RoomsSocketConfig { serverUrl: string; mountPath: string; transports: string[]; appId: string; token?: string; -}; +} export type TSocketRoom = string; export type TJsonStr = string; From 5abd61159ce47a80c76a2b27e90b2507f2a002ed Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 26 Nov 2025 16:54:01 +0200 Subject: [PATCH 07/31] more updates --- src/client.ts | 92 ++++++++++++------------------- src/modules/agents.types.ts | 15 +++-- src/modules/app-logs.types.ts | 12 +--- src/modules/auth.types.ts | 1 + src/modules/entities.types.ts | 63 ++------------------- src/modules/functions.types.ts | 11 ++-- src/modules/integrations.types.ts | 14 ++--- src/modules/sso.types.ts | 3 + src/utils/auth-utils.ts | 8 +++ src/utils/auth-utils.types.ts | 28 ++++++++-- 10 files changed, 99 insertions(+), 148 deletions(-) diff --git a/src/client.ts b/src/client.ts index af095c2..8de0afb 100644 --- a/src/client.ts +++ b/src/client.ts @@ -19,64 +19,25 @@ import type { export type { Base44Client, CreateClientConfig, CreateClientOptions }; /** - * Creates a Base44 SDK client instance. + * Creates a Base44 client. * * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@linkcode EntitiesModule | entities}, {@linkcode AuthModule | auth}, and {@linkcode FunctionsModule | functions}. * - * The client supports two authentication modes: - * - **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. - * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. + * Typically, you don't need to call this function directly. Base44 creates the client for you, which you can import and use to make API calls. The client takes care of managing authentication for you. * - * For example, when using the {@linkcode EntitiesModule | entities} module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. + * The client supports three authentication modes: + * - **Anonymous**: Access modules anonymously without authentication using `base44.moduleName`. Operations are scoped to public data and permissions. + * - **User authentication**: Access modules with user-level permissions using `base44.moduleName`. Operations are scoped to the authenticated user's data and permissions. + * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Operations can access data across all users. * - * Most modules are available in both modes, but with different permission levels. However, some modules are only available in one authentication mode. + * Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. * - * To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in the app's frontend. + * For example, when using the {@linkcode EntitiesModule | entities} module anonymously you can only read public data. With user authentication, you'll have access to the current user's data. With service role authentication, you'll have access to all data that admins can access. + * + * Most modules are available in all three modes, but with different permission levels. However, some modules are only available in specific authentication modes. * * @param config - Configuration object for the client. * @returns A configured Base44 client instance with access to all SDK modules. - * - * @example - * ```typescript - * // Basic client setup - * import { createClient } from '@base44/client-sdk'; - * - * const base44 = createClient({ - * appId: 'my-app-id' - * }); - * - * // Use client modules - * const products = await base44.entities.Products.list(); - * const user = await base44.auth.me(); - * ``` - * - * @example - * ```typescript - * // Client with service role access - * const base44 = createClient({ - * appId: 'my-app-id', - * token: 'user-token', - * serviceToken: 'service-role-token' - * }); - * - * // Access service-role-only modules - * const ssoToken = await base44.asServiceRole.sso.getAccessToken('user-123'); - * const oauthToken = await base44.asServiceRole.connectors.getAccessToken('google'); - * ``` - * - * @example - * ```typescript - * // Client with error handling - * const base44 = createClient({ - * appId: 'my-app-id', - * options: { - * onError: (error) => { - * console.error('API Error:', error); - * Sentry.captureException(error); - * } - * } - * }); - * ``` */ export function createClient(config: CreateClientConfig): Base44Client { const { @@ -282,18 +243,17 @@ export function createClient(config: CreateClientConfig): Base44Client { /** * Creates a Base44 client from an HTTP request. * - * Creates a client by automatically extracting authentication tokens and configuration from an incoming HTTP request with authentication information in its headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from the app's frontend to the backend functions. + * Creates a client by automatically extracting authentication tokens from a request to a backend function. Base44 inserts the necessary headers when forwarding requests to backend functions. + * + * To learn more about the Base44 client, see {@linkcode createClient | createClient()}. * * @param request - The incoming HTTP request object containing Base44 authentication headers. * @returns A configured Base44 client instance with authentication from the incoming request. * * @example * ```typescript - * // Frontend call to a backend function - * const response = await base44.functions.invoke('myBackendFunction', {}); - * - * // Backend function that receives the call - * import { createClientFromRequest } from '@base44/client-sdk'; + * // User authentication in backend function + * import { createClientFromRequest } from 'npm:@base44/sdk'; * * Deno.serve(async (req) => { * try { @@ -304,8 +264,28 @@ export function createClient(config: CreateClientConfig): Base44Client { * return Response.json({ error: 'Unauthorized' }, { status: 401 }); * } * - * // Use the client to make API calls + * // Access user's data + * const userOrders = await base44.entities.Orders.filter({ userId: user.id }); + * return Response.json({ orders: userOrders }); + * } catch (error) { + * return Response.json({ error: error.message }, { status: 500 }); + * } + * }); + * ``` + * + * @example + * ```typescript + * // Service role authentication in backend function + * import { createClientFromRequest } from 'npm:@base44/sdk'; + * + * Deno.serve(async (req) => { + * try { + * const base44 = createClientFromRequest(req); + * + * // Access admin data with service role permissions + * const recentOrders = await base44.asServiceRole.entities.Orders.list('-created_at', 50); * + * return Response.json({ orders: recentOrders }); * } catch (error) { * return Response.json({ error: error.message }, { status: 500 }); * } diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index dc9ca7c..15ad564 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -157,14 +157,14 @@ export interface AgentsModuleConfig { * * The agents module operates with a two-level hierarchy: * - * 1. **Conversations** ({@link AgentConversation}): 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. + * 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** ({@link AgentMessage}): 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. + * 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. * - * This module is available to use with a client in both user and service role authentication modes: + * This module is available to use with a client in all authentication modes: * - * - **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. - * - **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. + * - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Anonymous users can create conversations but cannot retrieve them later, while authenticated users can access conversations they created. + * - **Service role authentication** (`base44.asServiceRole.agents`): Operations have elevated admin-level permissions. Can access all conversations that the app's admin role has access to. * * @example * ```typescript @@ -213,6 +213,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Get all conversations * const conversations = await base44.agents.getConversations(); * console.log(`Total conversations: ${conversations.length}`); * ``` @@ -233,6 +234,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Get a specific conversation by ID * const conversation = await base44.agents.getConversation('conv-123'); * if (conversation) { * console.log(`Conversation has ${conversation.messages.length} messages`); @@ -256,6 +258,7 @@ export interface AgentsModule { * * @example * ```typescript + * // List recent conversations with pagination * const recentConversations = await base44.agents.listConversations({ * limit: 10, * sort: '-created_date' @@ -290,6 +293,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Create a new conversation with metadata * const conversation = await base44.agents.createConversation({ * agent_name: 'support-agent', * metadata: { @@ -373,6 +377,7 @@ export interface AgentsModule { * * @example * ```typescript + * // Get WhatsApp connection URL * const whatsappUrl = base44.agents.getWhatsAppConnectURL('support-agent'); * console.log(`Connect through WhatsApp: ${whatsappUrl}`); * // User can open this URL to start a WhatsApp conversation diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts index 2bf45d8..ba8fa65 100644 --- a/src/modules/app-logs.types.ts +++ b/src/modules/app-logs.types.ts @@ -43,16 +43,10 @@ export interface GetStatsParams { * statistics about the app's usage. Useful for analytics, monitoring, * and understanding user behavior. * - * This module is available to use with a client in both user and service role authentication modes: + * This module is available to use with a client in all authentication modes: * - * - **User authentication** (`base44.appLogs`): Operations are scoped to the currently - * authenticated user. For example, `fetchLogs()` returns only logs for the current user, - * and `getStats()` returns statistics about that user's activity. - * - * - **Service role authentication** (`client.asServiceRole.appLogs`): Operations have - * elevated permissions and can access data across all users. For example, `fetchLogs()` - * returns logs from all users in the app, and `getStats()` returns app-wide - * statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. + * - **Anonymous or User authentication** (`base44.appLogs`): Access is scoped to the current user's permissions. Anonymous users can create logs but cannot retrieve them, while authenticated users can create logs and retrieve only their own logs and statistics. + * - **Service role authentication** (`base44.asServiceRole.appLogs`): Operations have elevated admin-level permissions. Can access all logs and statistics that the app's admin role has access to. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. * * @example * ```typescript diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 8b22088..12eea8d 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -275,6 +275,7 @@ export interface AuthModule { * * @example * ```typescript + * // Login with email and password * try { * const { access_token, user } = await base44.auth.loginViaEmailPassword( * 'user@example.com', diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index af10cbe..c69766b 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -272,67 +272,16 @@ export interface EntityHandler { * Entities are accessed dynamically using the pattern: * `base44.entities.EntityName.method()` * - * This module is available to use with a client in both user and service role authentication modes: + * This module is available to use with a client in all three authentication modes: * - * - **User authentication** (`base44.entities`): Operations are scoped to the currently - * authenticated user's permissions. Access is limited to entities the user has permission to view or modify. - * - * - **Service role authentication** (`client.asServiceRole.entities`): Operations have - * elevated permissions and can access entities across all users. This is useful for admin - * operations or workflows that need to operate on data regardless of user permissions. - * - * @example - * ```typescript - * // List all records - * const records = await base44.entities.MyEntity.list(); - * ``` - * - * @example - * ```typescript - * // Filter records by field - * const activeRecords = await base44.entities.MyEntity.filter({ status: 'active' }); - * ``` - * - * @example - * ```typescript - * // Get specific record by ID - * const record = await base44.entities.MyEntity.get('entity-123'); - * ``` - * - * @example - * ```typescript - * // Create new record - * const newRecord = await base44.entities.MyEntity.create({ - * name: 'My Item', - * status: 'active' - * }); - * ``` - * - * @example - * ```typescript - * // Update record - * await base44.entities.MyEntity.update('entity-123', { status: 'completed' }); - * ``` - * - * @example - * ```typescript - * // Delete record - * await base44.entities.MyEntity.delete('entity-123'); - * ``` - * - * @example - * ```typescript - * // Bulk operations - * await base44.entities.MyEntity.bulkCreate([ - * { name: 'Item 1' }, - * { name: 'Item 2' } - * ]); - * ``` + * - **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. * * @example * ```typescript - * // Delete many - * await base44.entities.MyEntity.deleteMany({ status: 'completed' }); + * // Get all records from the MyEntity entity + * // Get all records the current user has permissions to view + * const myRecords = await base44.entities.MyEntity.list(); * ``` */ export interface EntitiesModule { diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index b8bdc5d..5076375 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -3,13 +3,10 @@ * * This module allows you to invoke the custom backend functions defined in the app. * - * This module is available to use with a client in both user and service role authentication modes: + * This module is available to use with a client in all authentication modes: * - * - **User authentication** (`base44.functions`): Functions are invoked with the currently - * authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. - * - * - **Service role authentication** (`client.asServiceRole.functions`): Functions are invoked - * with elevated permissions. The function code receives a request with the service role authentication context and can access data across all users. + * - **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. + * - **Service role authentication** (`base44.asServiceRole.functions`): Functions are invoked with elevated admin-level permissions. The function code receives a request with admin authentication context. * * @example * ```typescript @@ -24,7 +21,7 @@ * @example * ```typescript * // Invoke with service role - * const adminResult = await client.asServiceRole.functions.invoke('adminTask', { + * const adminResult = await base44.asServiceRole.functions.invoke('adminTask', { * action: 'cleanup' * }); * ``` diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 706b4a1..471718c 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -44,16 +44,10 @@ export type IntegrationPackage = { * Integration endpoints are accessed dynamically using the pattern: * `base44.integrations.PackageName.EndpointName(params)` * - * This module is available to use with a client in both user and service role authentication modes: + * This module is available to use with a client in all authentication modes: * - * - **User authentication** (`base44.integrations`): Integration endpoints are invoked with the - * currently authenticated user's permissions. The endpoints execute with the user's authentication - * context and can only access data the user has permission to access. - * - * - **Service role authentication** (`client.asServiceRole.integrations`): Integration endpoints - * are invoked with elevated permissions. The endpoints execute with service role authentication - * and can access data across all users. This is useful for admin operations or workflows that - * need to operate regardless of user permissions. + * - **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. + * - **Service role authentication** (`base44.asServiceRole.integrations`): Integration endpoints are invoked with elevated admin-level permissions. The endpoints execute with admin authentication context. * * @example * ```typescript @@ -82,7 +76,7 @@ export type IntegrationPackage = { * @example * ```typescript * // Use with service role - * const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ + * const adminEmail = await base44.asServiceRole.integrations.Core.SendEmail({ * to: 'admin@example.com', * subject: 'Admin notification', * body: 'System alert' diff --git a/src/modules/sso.types.ts b/src/modules/sso.types.ts index ab412f5..ecb7459 100644 --- a/src/modules/sso.types.ts +++ b/src/modules/sso.types.ts @@ -2,6 +2,7 @@ import { AxiosResponse } from "axios"; /** * Response from SSO access token endpoint. + * @internal */ export interface SsoAccessTokenResponse { access_token: string; @@ -16,6 +17,8 @@ export interface SsoAccessTokenResponse { * * 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. * + * @internal + * * @example * ```typescript * // Access SSO module with service role diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index a04bdec..d1b92c9 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -11,6 +11,8 @@ import { * Low-level utility for manually retrieving tokens. In most cases, the Base44 client handles * token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and cannot be used in the backend. * + * @internal + * * @param options - Configuration options for token retrieval. * @returns The access token string if found, null otherwise. * @@ -96,6 +98,8 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { * * Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and cannot be used in the backend. * + * @internal + * * @param token - The access token string to save. * @param options - Configuration options for saving the token. * @returns Returns`true` if the token was saved successfully, `false` otherwise. @@ -145,6 +149,8 @@ export function saveAccessToken( * * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | base44.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. * + * @internal + * * @param options - Configuration options for token removal. * @returns Returns `true` if the token was removed successfully, `false` otherwise. * @@ -183,6 +189,8 @@ export function removeAccessToken(options: RemoveAccessTokenOptions) { * * Low-level utility for building login URLs. For standard login redirects, use {@linkcode AuthModule.redirectToLogin | base44.auth.redirectToLogin()} instead, which handles this automatically. This function is useful when you need to construct login URLs without a client instance or for custom authentication flows. * + * @internal + * * @param nextUrl - The URL to redirect to after successful login. * @param options - Configuration options. * @returns The complete login URL with encoded redirect parameters. diff --git a/src/utils/auth-utils.types.ts b/src/utils/auth-utils.types.ts index 350cac5..9a6bd2e 100644 --- a/src/utils/auth-utils.types.ts +++ b/src/utils/auth-utils.types.ts @@ -1,6 +1,8 @@ /** * Configuration options for retrieving an access token. * + * @internal + * * @example * ```typescript * // Get access token from URL or local storage using default options @@ -51,6 +53,8 @@ export interface GetAccessTokenOptions { /** * Configuration options for saving an access token. * + * @internal + * * @example * ```typescript * // Use default storage key @@ -71,6 +75,8 @@ export interface SaveAccessTokenOptions { /** * Configuration options for removing an access token. * + * @internal + * * @example * ```typescript * // Remove token from default storage key @@ -91,6 +97,8 @@ export interface RemoveAccessTokenOptions { /** * Configuration options for constructing a login URL. * + * @internal + * * @example * ```typescript * const loginUrl = getLoginUrl('/dashboard', { @@ -125,23 +133,35 @@ export interface GetLoginUrlOptions { loginPath?: string; } -/** Type definition for getAccessToken function. */ +/** + * Type definition for getAccessToken function. + * @internal + */ export type GetAccessTokenFunction = ( options?: GetAccessTokenOptions ) => string | null; -/** Type definition for saveAccessToken function. */ +/** + * Type definition for saveAccessToken function. + * @internal + */ export type SaveAccessTokenFunction = ( token: string, options: SaveAccessTokenOptions ) => boolean; -/** Type definition for removeAccessToken function. */ +/** + * Type definition for removeAccessToken function. + * @internal + */ export type RemoveAccessTokenFunction = ( options: RemoveAccessTokenOptions ) => boolean; -/** Type definition for getLoginUrl function. */ +/** + * Type definition for getLoginUrl function. + * @internal + */ export type GetLoginUrlFunction = ( nextUrl: string, options: GetLoginUrlOptions From 6827d9049a6efc2303958e525396958117f3452d Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Sun, 30 Nov 2025 12:48:20 +0200 Subject: [PATCH 08/31] final docs setup (we hope) --- .../appended-articles.json | 5 + .../category-map.json | 2 +- .../file-processing/file-processing.js | 211 ++++++++++ .../push-to-docs-repo.js | 46 ++- .../typedoc-mintlify-linked-types.js | 385 +++++++++++++++--- .../typedoc-mintlify-parameters.js | 172 +++++--- .../typedoc-plugin/typedoc-mintlify-plugin.js | 11 +- .../typedoc-mintlify-returns.js | 158 ++++--- .../types-to-expose.json | 1 + writing-docs.md | 16 + 10 files changed, 837 insertions(+), 170 deletions(-) create mode 100644 scripts/mintlify-post-processing/appended-articles.json diff --git a/scripts/mintlify-post-processing/appended-articles.json b/scripts/mintlify-post-processing/appended-articles.json new file mode 100644 index 0000000..33255ae --- /dev/null +++ b/scripts/mintlify-post-processing/appended-articles.json @@ -0,0 +1,5 @@ +{ + "interfaces/EntitiesModule": "interfaces/EntityHandler" +} + + diff --git a/scripts/mintlify-post-processing/category-map.json b/scripts/mintlify-post-processing/category-map.json index c887ed1..825d489 100644 --- a/scripts/mintlify-post-processing/category-map.json +++ b/scripts/mintlify-post-processing/category-map.json @@ -1,4 +1,4 @@ { - "functions": "Main Methods", + "functions": "Client", "interfaces": "Modules" } \ No newline at end of file diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index ea2aa87..27bdf13 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -25,6 +25,7 @@ const TEMPLATE_PATH = path.join(__dirname, 'docs-json-template.json'); const STYLING_CSS_PATH = path.join(__dirname, 'styling.css'); const CATEGORY_MAP_PATH = path.join(__dirname, '../category-map.json'); const TYPES_TO_EXPOSE_PATH = path.join(__dirname, '..', 'types-to-expose.json'); +const APPENDED_ARTICLES_PATH = path.join(__dirname, '../appended-articles.json'); /** * Get list of linked type names that should be suppressed @@ -241,6 +242,212 @@ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { } } +function loadAppendedArticlesConfig() { + try { + const content = fs.readFileSync(APPENDED_ARTICLES_PATH, 'utf-8'); + const parsed = JSON.parse(content); + if (parsed && typeof parsed === 'object') { + const normalized = {}; + for (const [host, value] of Object.entries(parsed)) { + if (Array.isArray(value)) { + normalized[host] = value; + } else if (typeof value === 'string' && value.trim()) { + normalized[host] = [value]; + } + } + return normalized; + } + } catch (e) { + // Missing or invalid config is not fatal; simply skip appends + } + return {}; +} + +function stripFrontMatter(content) { + if (!content.startsWith('---')) { + return { title: null, content: content.trimStart() }; + } + const endIndex = content.indexOf('\n---', 3); + if (endIndex === -1) { + return { title: null, content: content.trimStart() }; + } + const frontMatter = content.slice(0, endIndex + 4); + const rest = content.slice(endIndex + 4).trimStart(); + const titleMatch = frontMatter.match(/title:\s*["']?([^"'\n]+)["']?/i); + return { + title: titleMatch ? titleMatch[1].trim() : null, + content: rest + }; +} + +function removeFirstPanelBlock(content) { + const panelStart = content.indexOf(''); + const panelEnd = content.indexOf(''); + if (panelStart === -1 || panelEnd === -1 || panelEnd < panelStart) { + return content; + } + const before = content.slice(0, panelStart); + const after = content.slice(panelEnd + ''.length); + return (before + after).trimStart(); +} + +function normalizeHeadings(content) { + const lines = content.split('\n'); + const headingRegex = /^(#{1,6})\s+(.*)$/; + let minLevel = Infinity; + for (const line of lines) { + const match = line.match(headingRegex); + if (match) { + minLevel = Math.min(minLevel, match[1].length); + } + } + if (minLevel === Infinity) { + return { content: content.trim(), headings: [] }; + } + const baseLevel = 3; // appended section starts at H2, so nested headings start at H3+ + const headings = []; + const adjusted = lines.map((line) => { + const match = line.match(headingRegex); + if (!match) { + return line; + } + const originalLevel = match[1].length; + let newLevel = originalLevel - minLevel + baseLevel; + newLevel = Math.max(baseLevel, Math.min(6, newLevel)); + const text = match[2].trim(); + headings.push({ text, level: newLevel }); + return `${'#'.repeat(newLevel)} ${text}`; + }); + return { content: adjusted.join('\n').trim(), headings }; +} + +function slugifyHeading(text) { + return text + .toLowerCase() + .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, '') + .replace(/\s+/g, '-'); +} + +function ensurePanelSpacing(content) { + const panelRegex = /([\s\S]*?)(\n*)(<\/Panel>)/; + return content.replace(panelRegex, (match, body, newlineSection, closing) => { + const trimmedBody = body.replace(/\s+$/, ''); + return `${trimmedBody}\n\n${closing}`; + }); +} + +function updatePanelWithHeadings(hostContent, headings) { + if (!headings || headings.length === 0) { + return ensurePanelSpacing(hostContent); + } + const panelStart = hostContent.indexOf(''); + if (panelStart === -1) { + return ensurePanelSpacing(hostContent); + } + const panelEnd = hostContent.indexOf('', panelStart); + if (panelEnd === -1) { + return ensurePanelSpacing(hostContent); + } + const beforePanel = hostContent.slice(0, panelStart); + const panelBlock = hostContent.slice(panelStart, panelEnd); + const afterPanel = hostContent.slice(panelEnd); + + const panelLines = panelBlock.split('\n'); + const existingSlugs = new Set(); + const slugMatchRegex = /- \[[^\]]+\]\(#([^)]+)\)/; + for (const line of panelLines) { + const match = line.match(slugMatchRegex); + if (match) { + existingSlugs.add(match[1]); + } + } + + const newEntries = []; + for (const heading of headings) { + const text = heading.text.trim(); + if (!text) continue; + const slug = slugifyHeading(text); + if (existingSlugs.has(slug)) { + continue; + } + existingSlugs.add(slug); + newEntries.push(`- [${text}](#${slug})`); + } + + if (newEntries.length === 0) { + return ensurePanelSpacing(hostContent); + } + + const insertion = (panelBlock.endsWith('\n') ? '' : '\n') + newEntries.join('\n'); + const updatedPanelBlock = panelBlock + insertion; + const updatedContent = beforePanel + updatedPanelBlock + afterPanel; + return ensurePanelSpacing(updatedContent); +} + +function prepareAppendedSection(appendPath) { + const rawContent = fs.readFileSync(appendPath, 'utf-8'); + const { title, content: withoutFrontMatter } = stripFrontMatter(rawContent); + const withoutPanel = removeFirstPanelBlock(withoutFrontMatter); + const { content: normalizedContent, headings } = normalizeHeadings(withoutPanel); + const fileTitle = title || path.basename(appendPath, path.extname(appendPath)); + const sectionHeading = `## ${fileTitle.trim()}`; + const trimmedContent = normalizedContent ? `\n\n${normalizedContent}` : ''; + const section = `${sectionHeading}${trimmedContent}\n`; + const headingList = [{ text: fileTitle.trim(), level: 2 }, ...headings]; + return { section, headings: headingList }; +} + +function applyAppendedArticles(appendedArticles) { + const hosts = Object.keys(appendedArticles); + if (hosts.length === 0) { + return; + } + + for (const hostKey of hosts) { + const appendList = appendedArticles[hostKey]; + if (!Array.isArray(appendList) || appendList.length === 0) { + continue; + } + + const hostPath = path.join(CONTENT_DIR, `${hostKey}.mdx`); + if (!fs.existsSync(hostPath)) { + console.warn(`Warning: Host article not found for append: ${hostKey}`); + continue; + } + + let hostContent = fs.readFileSync(hostPath, 'utf-8'); + let combinedSections = ''; + const collectedHeadings = []; + + for (const appendKey of appendList) { + const appendPath = path.join(CONTENT_DIR, `${appendKey}.mdx`); + if (!fs.existsSync(appendPath)) { + console.warn(`Warning: Appended article not found: ${appendKey}`); + continue; + } + + const { section, headings } = prepareAppendedSection(appendPath); + combinedSections += `\n\n${section}`; + collectedHeadings.push(...headings); + + try { + fs.unlinkSync(appendPath); + console.log(`Appended ${appendKey}.mdx -> ${hostKey}.mdx`); + } catch (e) { + console.warn(`Warning: Unable to remove appended article ${appendKey}.mdx`); + } + } + + if (!combinedSections) { + continue; + } + + hostContent = hostContent.trimEnd() + combinedSections + '\n'; + hostContent = updatePanelWithHeadings(hostContent, collectedHeadings); + fs.writeFileSync(hostPath, hostContent, 'utf-8'); + } +} + /** * Main function */ @@ -265,6 +472,10 @@ function main() { // Fallback to processing entire docs directory processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); } + + // Append configured articles + const appendedArticles = loadAppendedArticlesConfig(); + applyAppendedArticles(appendedArticles); // Clean up the linked types file try { diff --git a/scripts/mintlify-post-processing/push-to-docs-repo.js b/scripts/mintlify-post-processing/push-to-docs-repo.js index 5876860..32a41f4 100644 --- a/scripts/mintlify-post-processing/push-to-docs-repo.js +++ b/scripts/mintlify-post-processing/push-to-docs-repo.js @@ -55,9 +55,10 @@ function updateDocsJson(repoDir, sdkFiles) { const docs = JSON.parse(docsContent); // Find the "SDK Reference" tab - let sdkTab = docs.navigation.tabs.find(tab => tab.tab === 'SDK Reference'); + const sdkTabIndex = docs.navigation.tabs.findIndex(tab => tab.tab === 'SDK Reference'); + let sdkTab = docs.navigation.tabs[sdkTabIndex]; - if (!sdkTab) { + if (sdkTabIndex === -1) { console.log("Could not find 'SDK Reference' tab in docs.json. Creating it..."); sdkTab = { tab: 'SDK Reference', @@ -96,8 +97,30 @@ function updateDocsJson(repoDir, sdkFiles) { }); } - sdkTab.groups = newGroups; - docs.navigation.tabs.push(sdkTab); + const newGroupNames = new Set(newGroups.map(group => group.group)); + const preservedGroups = []; + let insertionIndex; + + for (const existingGroup of sdkTab.groups ?? []) { + if (newGroupNames.has(existingGroup.group)) { + if (insertionIndex === undefined) { + insertionIndex = preservedGroups.length; + } + continue; + } + preservedGroups.push(existingGroup); + } + + const finalGroups = [...preservedGroups]; + const targetIndex = insertionIndex ?? finalGroups.length; + finalGroups.splice(targetIndex, 0, ...newGroups); + sdkTab.groups = finalGroups; + + if (sdkTabIndex === -1) { + docs.navigation.tabs.push(sdkTab); + } else { + docs.navigation.tabs[sdkTabIndex] = sdkTab; + } console.debug(`New groups for docs.json: ${JSON.stringify(newGroups, null, 2)}`); @@ -167,6 +190,21 @@ function main() { // Commit the changes execSync(`git add docs.json`, { cwd: tempRepoDir }); execSync(`git add sdk-docs`, { cwd: tempRepoDir }); + + const stagedOutput = execSync(`git diff --cached --name-only`, { + cwd: tempRepoDir, + encoding: 'utf8' + }); + + const stagedChanges = stagedOutput.trim(); + + if (!stagedChanges.length) { + console.log("No staged changes detected (docs.json / sdk-docs). Skipping commit and push."); + return; + } + + console.log(`Changes staged for commit:\n${stagedChanges}`); + execSync(`git commit -m "Auto-updates to SDK Reference Docs"`, { cwd: tempRepoDir }); execSync(`git push --set-upstream origin ${branch}`, { cwd: tempRepoDir }); diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js index 5f9b028..3df72b5 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js @@ -6,80 +6,193 @@ import * as fs from 'fs'; import * as path from 'path'; import { ReflectionKind } from 'typedoc'; +const TYPES_TO_EXPOSE_PATH = path.resolve(process.cwd(), 'scripts/mintlify-post-processing/types-to-expose.json'); +let exposedTypeNames = null; +try { + const raw = fs.readFileSync(TYPES_TO_EXPOSE_PATH, 'utf-8'); + const parsed = JSON.parse(raw); + if (Array.isArray(parsed)) { + exposedTypeNames = new Set(parsed); + } +} catch (err) { + // Ignore; fall back to linking based on path existence + exposedTypeNames = null; +} + +const PROPERTY_KINDS = new Set([ + ReflectionKind.Property, + ReflectionKind.PropertySignature +]); + +const PRIMITIVE_REFERENCES = new Set([ + 'any', + 'string', + 'number', + 'boolean', + 'void', + 'null', + 'undefined', + 'object', + 'Array', + 'Promise', + 'Record', + 'Map', + 'Set', + 'Date' +]); + +const KIND_DIRECTORY_MAP = { + [ReflectionKind.Class]: 'classes', + [ReflectionKind.Interface]: 'interfaces', + [ReflectionKind.TypeAlias]: 'type-aliases' +}; + +function resolveTypePath(typeName, context, targetKind = null) { + if (!context?.app || !typeName) { + return null; + } + + if (exposedTypeNames && !exposedTypeNames.has(typeName)) { + return null; + } + + const { app, currentPagePath } = context; + const outputDir = app.options.getValue('out') || 'docs'; + + const directory = KIND_DIRECTORY_MAP[targetKind] || 'interfaces'; + const filePath = path.join(outputDir, directory, `${typeName}.mdx`); + + if (currentPagePath) { + const currentDir = path.dirname(path.join(outputDir, currentPagePath)); + const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); + return relativePath.startsWith('.') ? relativePath : `./${relativePath}`; + } + + return path.relative(outputDir, filePath).replace(/\\/g, '/'); +} + /** * Extract properties from a linked type using TypeDoc's reflection API */ -export function extractPropertiesFromLinkedType(linkedTypeInfo, context) { +export function extractPropertiesFromLinkedType(linkedTypeInfo, context, visited = new Set()) { if (!linkedTypeInfo || !context) { return []; } const { typeName } = linkedTypeInfo; - const { app, page } = context; + const visitKey = typeName; + + if (!typeName || visited.has(visitKey)) { + return []; + } + + visited.add(visitKey); try { // First, try to get the type from TypeDoc's reflection API - if (app && page && page.model) { - const properties = extractPropertiesFromReflection(typeName, app, page); - if (properties.length > 0) { - return properties; + const { properties: reflectionProps, description: reflectionDescription } = extractPropertiesFromReflection(typeName, context, visited); + if (reflectionProps.length > 0) { + if (reflectionDescription && linkedTypeInfo) { + linkedTypeInfo.description = reflectionDescription; } + return reflectionProps; } // Fallback: try to read from generated markdown file - return extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + const { properties: markdownProps, description: markdownDescription } = extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + if (markdownDescription && linkedTypeInfo) { + linkedTypeInfo.description = markdownDescription; + } + return markdownProps; } catch (error) { console.warn(`Error extracting properties for type ${typeName}:`, error.message); return []; + } finally { + visited.delete(visitKey); } } +export function getLinkedTypeDescription(linkedTypeInfo, context) { + if (!linkedTypeInfo || !context) { + return ''; + } + if (linkedTypeInfo.description) { + return linkedTypeInfo.description; + } + + const { typeName } = linkedTypeInfo; + if (!typeName) { + return ''; + } + + try { + const project = context.page?.model?.project || context.app?.converter?.project; + if (project) { + const reflection = findReflectionByName(project, typeName); + if (reflection) { + const description = getCommentSummary(reflection, context); + if (description) { + linkedTypeInfo.description = description; + return description; + } + } + } + } catch { + // ignore reflection lookup issues + } + + try { + const { description } = extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + if (description) { + linkedTypeInfo.description = description; + return description; + } + } catch { + // ignore markdown fallback issues + } + + return ''; +} + /** * Extract properties from TypeDoc's reflection API (preferred method) */ -function extractPropertiesFromReflection(typeName, app, page) { +function extractPropertiesFromReflection(typeName, context, visited) { + if (!context) { + return { properties: [], description: '' }; + } + + const { app, page } = context; + try { // Access the project through the page's model - const project = page.model?.project; + const project = page?.model?.project || app?.converter?.project; if (!project) { - return []; + return { properties: [], description: '' }; } // Find the type reflection in the project const typeReflection = findReflectionByName(project, typeName); if (!typeReflection) { - return []; + return { properties: [], description: '' }; } // Extract properties from the reflection const properties = []; + const propertyNodes = getPropertyNodesFromReflection(typeReflection); - // For interfaces and type aliases with properties - if (typeReflection.children) { - for (const child of typeReflection.children) { - if (child.kind === ReflectionKind.Property) { - const property = { - name: child.name, - type: getTypeString(child.type), - description: child.comment?.summary?.map(p => p.text).join('') || '', - optional: isOptional(child), - nested: [] - }; - - // Check for nested properties if the type is an object - if (child.type && isObjectLikeType(child.type)) { - property.nested = extractNestedProperties(child.type); - } - - properties.push(property); - } + for (const child of propertyNodes) { + const property = buildPropertyFromReflection(child, context, visited); + if (property) { + properties.push(property); } } - return properties; + const description = getCommentSummary(typeReflection, context); + return { properties, description }; } catch (error) { console.warn(`Error extracting properties from reflection for ${typeName}:`, error.message); - return []; + return { properties: [], description: '' }; } } @@ -111,7 +224,7 @@ function getTypeString(type) { case 'intrinsic': return type.name; case 'reference': - return type.name; + return formatReferenceType(type); case 'array': return `${getTypeString(type.elementType)}[]`; case 'union': @@ -138,13 +251,13 @@ function isOptional(child) { * Check if a type is object-like (has properties) */ function isObjectLikeType(type) { - return type.type === 'reflection' && type.declaration?.children; + return type?.type === 'reflection' && type.declaration?.children; } /** * Extract nested properties from an object type */ -function extractNestedProperties(type) { +function extractNestedPropertiesFromReflectionType(type, context, visited) { if (!isObjectLikeType(type)) { return []; } @@ -152,13 +265,9 @@ function extractNestedProperties(type) { const nested = []; if (type.declaration?.children) { for (const child of type.declaration.children) { - if (child.kind === ReflectionKind.Property) { - nested.push({ - name: child.name, - type: getTypeString(child.type), - description: child.comment?.summary?.map(p => p.text).join('') || '', - optional: isOptional(child) - }); + const property = buildPropertyFromReflection(child, context, visited); + if (property) { + nested.push(property); } } } @@ -174,7 +283,7 @@ function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) { const { currentPagePath, app } = context; if (!app || !app.options) { - return []; + return { properties: [], description: '' }; } try { @@ -235,14 +344,14 @@ function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) { // Check if file exists if (!fs.existsSync(filePath)) { // Don't warn during generation - the file might not exist yet - return []; + return { properties: [], description: '' }; } const content = fs.readFileSync(filePath, 'utf-8'); return parsePropertiesFromTypeFile(content); } catch (error) { // Silent failure during generation - return []; + return { properties: [], description: '' }; } } @@ -253,6 +362,10 @@ function parsePropertiesFromTypeFile(content) { const properties = []; const lines = content.split('\n'); + // Collect intro description until Properties section + const introLines = []; + let descriptionCaptured = false; + // Find the Properties section let inPropertiesSection = false; let i = 0; @@ -267,6 +380,15 @@ function parsePropertiesFromTypeFile(content) { continue; } + if (!inPropertiesSection) { + if (line.trim()) { + introLines.push(line); + descriptionCaptured = true; + } else if (descriptionCaptured) { + introLines.push(''); + } + } + // Stop at next top-level heading (##) if (inPropertiesSection && line.match(/^##\s+/) && !line.match(/^##\s+Properties\s*$/)) { break; @@ -378,6 +500,177 @@ function parsePropertiesFromTypeFile(content) { i++; } - return properties; + const description = introLines.join('\n').trim(); + return { properties, description }; +} + +function buildPropertyFromReflection(child, context, visited) { + if (!child || !PROPERTY_KINDS.has(child.kind)) { + return null; + } + + const property = { + name: child.name, + type: getTypeString(child.type), + description: getCommentSummary(child, context), + optional: isOptional(child), + nested: [] + }; + + const nestedFromType = extractNestedPropertiesFromType(child.type, context, visited); + if (nestedFromType.length > 0) { + property.nested = nestedFromType; + } + + return property; +} + +function getPropertyNodesFromReflection(reflection) { + if (!reflection) { + return []; + } + + if (Array.isArray(reflection.children) && reflection.children.length > 0) { + return reflection.children; + } + + if (reflection.type?.declaration?.children?.length) { + return reflection.type.declaration.children; + } + + if (reflection.declaration?.children?.length) { + return reflection.declaration.children; + } + + return []; +} + +function extractNestedPropertiesFromType(type, context, visited) { + if (!type) { + return []; + } + + switch (type.type) { + case 'reference': { + const referencedName = getReferenceTypeName(type); + if (!referencedName || PRIMITIVE_REFERENCES.has(referencedName)) { + return []; + } + return extractPropertiesFromLinkedType( + { typeName: referencedName, typePath: referencedName }, + context, + visited + ); + } + case 'array': + return extractNestedPropertiesFromType(type.elementType, context, visited); + case 'union': + case 'intersection': { + if (!Array.isArray(type.types)) { + return []; + } + for (const subType of type.types) { + const nested = extractNestedPropertiesFromType(subType, context, visited); + if (nested.length > 0) { + return nested; + } + } + return []; + } + case 'reflection': + return extractNestedPropertiesFromReflectionType(type, context, visited); + default: + return []; + } +} + +function getReferenceTypeName(type) { + if (!type) { + return null; + } + + if (typeof type.name === 'string' && type.name) { + return type.name; + } + + if (typeof type.qualifiedName === 'string' && type.qualifiedName) { + const segments = type.qualifiedName.split('.'); + return segments[segments.length - 1]; + } + + if (type.reflection?.name) { + return type.reflection.name; + } + + return null; +} + +function getCommentSummary(reflection, context) { + if (!reflection?.comment) { + return ''; + } + + const parts = []; + if (Array.isArray(reflection.comment.summary)) { + parts.push(...reflection.comment.summary); + } + if (reflection.comment.blockTags) { + for (const tag of reflection.comment.blockTags) { + if (tag.tag === '@remarks' && Array.isArray(tag.content)) { + parts.push(...tag.content); + } + if ((tag.tag === '@see' || tag.tag === '@link' || tag.tag === '@linkcode' || tag.tag === '@returns') && Array.isArray(tag.content)) { + parts.push(...tag.content); + } + } + } + + if (parts.length === 0) { + return ''; + } + + return parts.map((part) => renderCommentPart(part, context)).join('') || ''; +} + +function renderCommentPart(part, context) { + if (!part) { + return ''; + } + + switch (part.kind) { + case 'text': + return part.text || ''; + case 'code': + return part.text ? `\`${part.text}\`` : ''; + case 'inline-tag': + if (part.tag === '@link') { + const linkText = (part.text || part.target?.name || '').trim(); + const typeName = part.target?.name || null; + const linkTarget = typeName ? resolveTypePath(typeName, context, part.target?.kind) : null; + if (linkTarget && linkText) { + return `[${linkText}](${linkTarget})`; + } + if (linkText) { + return linkText; + } + return typeName || ''; + } + return part.text || ''; + default: + return part.text || ''; + } +} + +function formatReferenceType(type) { + if (!type) { + return 'any'; + } + + let typeName = type.name || 'any'; + if (type.typeArguments && type.typeArguments.length > 0) { + const args = type.typeArguments.map((arg) => getTypeString(arg)).join(', '); + typeName += `<${args}>`; + } + return typeName; } diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js index ea375d6..ce249aa 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js @@ -7,10 +7,10 @@ import { extractPropertiesFromLinkedType } from './typedoc-mintlify-linked-types import * as fs from 'fs'; import * as path from 'path'; +const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; + // Helper function to resolve type paths (similar to returns file) function resolveTypePath(typeName, app, currentPagePath = null) { - const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; - // Skip primitive types if (PRIMITIVE_TYPES.includes(typeName)) { return null; @@ -237,36 +237,16 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } // Check if we should expand this type inline - let linkedTypeInfo = typeLink ? { typeName: type, typePath: typeLink } : null; + let linkedTypeInfo = getLinkedTypeInfo(type, typeLink, context); let nested = []; - // If we don't have a link but have a non-primitive type, try to resolve it - if (!linkedTypeInfo && type && type !== 'any' && context && context.app) { - const simpleTypeName = type.replace(/[<>\[\]]/g, '').trim(); - const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; - if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { - // Try to resolve the type path - const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); - // Track the type even if we can't resolve the path - it might be a linked type - linkedTypeInfo = { typeName: simpleTypeName, typePath: typePath || simpleTypeName }; - - // Track linked types for suppression - } - } - // Track linked types for suppression (for types with explicit links) // Try to extract properties from the linked type if (linkedTypeInfo && context) { const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); if (properties.length > 0) { - // Convert properties to nested format - nested = properties.map(prop => ({ - name: prop.name, - type: prop.type, - description: prop.description, - optional: prop.optional - })); + nested = normalizePropertiesForParams(properties); } } @@ -283,11 +263,13 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } let nestedType = 'any'; + let nestedTypeLink = null; if (i < lines.length) { const maybeNestedType = extractType(lines[i]); if (maybeNestedType) { if (typeof maybeNestedType === 'object') { nestedType = maybeNestedType.type; + nestedTypeLink = maybeNestedType.link; } else { nestedType = maybeNestedType; } @@ -305,12 +287,25 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con i++; } - nested.push({ + const nestedField = { name: nestedName, type: nestedType, description: nestedDescLines.join('\n').trim(), - optional: nestedOptional - }); + optional: nestedOptional, + nested: [] + }; + + if (nestedField.nested.length === 0) { + const nestedLinkedInfo = getLinkedTypeInfo(nestedType, nestedTypeLink, context); + if (nestedLinkedInfo && context) { + const nestedProps = extractPropertiesFromLinkedType(nestedLinkedInfo, context); + if (nestedProps.length > 0) { + nestedField.nested = normalizePropertiesForParams(nestedProps); + } + } + } + + nested.push(nestedField); } } @@ -414,20 +409,14 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } // Check if we should expand this type inline - const linkedTypeInfo = typeLink ? { typeName: type, typePath: typeLink } : null; + const linkedTypeInfo = getLinkedTypeInfo(type, typeLink, context); let nested = []; // Try to extract properties from the linked type if (linkedTypeInfo && context) { const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); if (properties.length > 0) { - // Convert properties to nested format - nested = properties.map(prop => ({ - name: prop.name, - type: prop.type, - description: prop.description, - optional: prop.optional - })); + nested = normalizePropertiesForParams(properties); // Keep the type as the original type name (without expanding to 'object') // This preserves the type name in the ParamField } @@ -446,11 +435,13 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } let nestedType = 'any'; + let nestedTypeLink = null; if (i < lines.length) { const maybeNestedType = extractType(lines[i]); if (maybeNestedType) { if (typeof maybeNestedType === 'object') { nestedType = maybeNestedType.type; + nestedTypeLink = maybeNestedType.link; } else { nestedType = maybeNestedType; } @@ -468,12 +459,25 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, i++; } - nested.push({ + const nestedField = { name: nestedName, type: nestedType, description: nestedDescLines.join('\n').trim(), - optional: nestedOptional - }); + optional: nestedOptional, + nested: [] + }; + + if (nestedField.nested.length === 0) { + const nestedLinkedInfo = getLinkedTypeInfo(nestedType, nestedTypeLink, context); + if (nestedLinkedInfo && context) { + const nestedProps = extractPropertiesFromLinkedType(nestedLinkedInfo, context); + if (nestedProps.length > 0) { + nestedField.nested = normalizePropertiesForParams(nestedProps); + } + } + } + + nested.push(nestedField); } } @@ -496,9 +500,7 @@ function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedType if (!params || params.length === 0) { return ''; } - - const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; - + let fieldsOutput = ''; for (const param of params) { @@ -519,18 +521,9 @@ function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedType if (param.nested.length > 0) { // Accordion title is always "Properties" fieldsOutput += `\n\n\n`; - - for (const nested of param.nested) { - const requiredAttr = nested.optional ? '' : ' required'; - fieldsOutput += `\n`; - - if (nested.description) { - fieldsOutput += `\n${nested.description}\n`; - } - - fieldsOutput += '\n\n\n'; - } - + + fieldsOutput += renderNestedParamFields(param.nested); + fieldsOutput += '\n\n'; } else { fieldsOutput += '\n'; @@ -547,4 +540,77 @@ function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedType return fieldsOutput; } +function renderNestedParamFields(fields) { + if (!fields || fields.length === 0) { + return ''; + } + + let output = ''; + for (const field of fields) { + const requiredAttr = field.optional ? '' : ' required'; + output += `\n`; + + if (field.description) { + output += `\n${field.description}\n`; + } + + if (Array.isArray(field.nested) && field.nested.length > 0) { + output += `\n\n\n`; + output += renderNestedParamFields(field.nested); + output += '\n'; + } + + output += '\n\n\n'; + } + + return output; +} + +function getLinkedTypeInfo(typeName, typeLink, context) { + if (!typeName) { + return null; + } + + if (typeLink) { + const simpleFromLink = simplifyTypeName(typeName) || typeName; + return { typeName: simpleFromLink, typePath: typeLink }; + } + + if (!context) { + return null; + } + + const simpleTypeName = simplifyTypeName(typeName); + if (!simpleTypeName || PRIMITIVE_TYPES.includes(simpleTypeName)) { + return null; + } + + const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + return { typeName: simpleTypeName, typePath: typePath || simpleTypeName }; +} + +function simplifyTypeName(typeName) { + if (!typeName) { + return null; + } + + // Remove generics/array indicators and take the first union/intersection entry + const cleaned = typeName.replace(/[\[\]]/g, '').split('|')[0].split('&')[0].trim(); + return cleaned.replace(/<.*?>/g, '').trim(); +} + +function normalizePropertiesForParams(properties) { + if (!Array.isArray(properties)) { + return []; + } + + return properties.map((prop) => ({ + name: prop.name, + type: prop.type || 'any', + description: prop.description || '', + optional: !!prop.optional, + nested: normalizePropertiesForParams(prop.nested || []) + })); +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js index 85a613f..dd846f8 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js @@ -60,8 +60,8 @@ export function load(app) { // 3a. Add headings to CodeGroups that don't have them content = addHeadingsToCodeGroups(content); - // 4. Remove links from function signatures (convert [`TypeName`](link) to `TypeName`) - content = content.replace(/\[`([^`]+)`\]\([^)]+\)/g, '`$1`'); + // 4. Remove auto-generated type links from signatures (keep manual doc links) + content = stripAutoGeneratedTypeLinks(content); // 5. Remove .md and .mdx extensions from links content = content.replace(/\[([^\]]+)\]\(([^)]+)\.mdx?\)/g, '[$1]($2)'); @@ -187,3 +187,10 @@ function slugifyHeading(text) { .replace(/\s+/g, '-'); } +function stripAutoGeneratedTypeLinks(content) { + return content.replace(/^>\s*\*\*.*$/gm, (line) => { + const withoutCodeLinks = line.replace(/\[`([^`]+)`\]\([^)]+\)/g, '`$1`'); + return withoutCodeLinks.replace(/\[([A-Za-z0-9_.]+)\]\(([^)]+)\)/g, '$1'); + }); +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js index 6dd0dea..f67d4d9 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js @@ -4,7 +4,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import { extractPropertiesFromLinkedType } from './typedoc-mintlify-linked-types.js'; +import { extractPropertiesFromLinkedType, getLinkedTypeDescription } from './typedoc-mintlify-linked-types.js'; import { escapeAttribute } from './typedoc-mintlify-utils.js'; const PRIMITIVE_TYPES = [ @@ -20,6 +20,49 @@ const PRIMITIVE_TYPES = [ 'Promise', ]; +function extractReturnsDescription(page) { + if (!page?.model) { + return ''; + } + + const signature = Array.isArray(page.model.signatures) && page.model.signatures.length > 0 + ? page.model.signatures[0] + : null; + + const returnsTag = signature?.comment?.blockTags?.find( + (tag) => tag.tag === '@returns' || tag.tag === '@return' + ); + + if (!returnsTag || !returnsTag.content) { + return ''; + } + + return renderCommentParts(returnsTag.content).trim(); +} + +function renderCommentParts(parts) { + if (!Array.isArray(parts)) { + return ''; + } + + return parts.map((part) => { + if (!part) return ''; + switch (part.kind) { + case 'text': + return part.text || ''; + case 'code': + return part.text ? '`' + part.text + '`' : ''; + case 'inline-tag': + if (part.tag === '@link') { + return (part.text || part.target?.name || '').trim(); + } + return part.text || ''; + default: + return part.text || ''; + } + }).join(''); +} + /** * Extract signature information from content lines */ @@ -278,7 +321,7 @@ function rewriteReturnSections(content, options) { } } - const { fields, leadingText, extractedTypeName } = parseReturnFields( + const { fields, leadingText, extractedTypeName, typeDescription } = parseReturnFields( sectionContent, fieldHeading, nestedHeading, @@ -291,13 +334,27 @@ function rewriteReturnSections(content, options) { if (fields.length === 0) { result.push(...sectionLines); } else { + const typeNameForDisplay = extractedTypeName || returnTypeName; + if (typeNameForDisplay) { + result.push(''); + result.push(`\`${typeNameForDisplay}\``); + } + const descriptionParts = []; + if (typeDescription) { + descriptionParts.push(typeDescription); + } if (leadingText) { + descriptionParts.push(leadingText); + } + const returnsDescription = extractReturnsDescription(page); + if (returnsDescription) { + descriptionParts.push(returnsDescription); + } + if (descriptionParts.length > 0) { result.push(''); - result.push(leadingText); + result.push(descriptionParts.join('\n\n')); } - // Use extractedTypeName if available, otherwise fallback to returnTypeName - const typeNameForDisplay = extractedTypeName || returnTypeName; - const fieldsBlock = formatReturnFieldsOutput(fields, typeNameForDisplay, linkedTypeNames, writeLinkedTypesFile); + const fieldsBlock = formatReturnFieldsOutput(fields, null, linkedTypeNames, writeLinkedTypesFile); if (fieldsBlock) { result.push(''); result.push(fieldsBlock); @@ -341,7 +398,7 @@ function rewriteReturnSections(content, options) { } } - const { fields, leadingText, extractedTypeName } = parseReturnFields( + const { fields, leadingText, extractedTypeName, typeDescription } = parseReturnFields( sectionContent, fieldHeading, nestedHeading, @@ -354,13 +411,23 @@ function rewriteReturnSections(content, options) { if (fields.length === 0) { result.push(...sectionLines); } else { + const typeNameForDisplay = extractedTypeName || returnTypeName; + if (typeNameForDisplay) { + result.push(''); + result.push(`\`${typeNameForDisplay}\``); + } + const descriptionParts = []; + if (typeDescription) { + descriptionParts.push(typeDescription); + } if (leadingText) { + descriptionParts.push(leadingText); + } + if (descriptionParts.length > 0) { result.push(''); - result.push(leadingText); + result.push(descriptionParts.join('\n\n')); } - // Use extractedTypeName if available, otherwise fallback to returnTypeName - const typeNameForDisplay = extractedTypeName || returnTypeName; - const fieldsBlock = formatReturnFieldsOutput(fields, typeNameForDisplay, linkedTypeNames, writeLinkedTypesFile); + const fieldsBlock = formatReturnFieldsOutput(fields, null, linkedTypeNames, writeLinkedTypesFile); if (fieldsBlock) { result.push(''); result.push(fieldsBlock); @@ -378,6 +445,7 @@ function rewriteReturnSections(content, options) { } function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTypeFromSignature = null, linkedTypeInfo = null, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { + let infoForDescription = linkedTypeInfo; if (!sectionContent) { // If we have a linked type but no section content, try to extract from the linked type if (linkedTypeInfo && context) { @@ -400,11 +468,12 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy return { fields: resultFields, leadingText: '', - extractedTypeName: linkedTypeInfo.typeName + extractedTypeName: linkedTypeInfo.typeName, + typeDescription: getLinkedTypeDescription(linkedTypeInfo, context) || '' }; } } - return { fields: [], leadingText: '', extractedTypeName: null }; + return { fields: [], leadingText: '', extractedTypeName: null, typeDescription: getLinkedTypeDescription(infoForDescription, context) || '' }; } const lines = sectionContent.split('\n'); @@ -472,7 +541,6 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy // If no field headings found, treat as simple return if (!headingPrefix || index >= lines.length) { let type = returnTypeFromSignature || 'any'; - let typeLink = null; const descriptionLines = []; // Check if there's an existing ResponseField in the content @@ -492,12 +560,7 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy } const maybeType = extractTypeFromLine(line); if (maybeType && type === 'any') { - if (typeof maybeType === 'object') { - type = maybeType.type; - typeLink = maybeType.link; - } else { - type = maybeType; - } + type = typeof maybeType === 'object' ? maybeType.type : maybeType; continue; } if (line.trim() && !line.trim().startsWith('`') && !line.trim().startsWith('<')) { @@ -520,6 +583,9 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy // Even if we can't resolve the path, try with just the name typeInfoToUse = { typeName: simpleTypeName, typePath: simpleTypeName }; } + if (typeInfoToUse) { + infoForDescription = typeInfoToUse; + } // Track resolved linked type if (typeInfoToUse && linkedTypeNames) { @@ -551,19 +617,12 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy return { fields: resultFields, leadingText: '', - extractedTypeName: typeInfoToUse.typeName // Pass the type name for display + extractedTypeName: typeInfoToUse.typeName, // Pass the type name for display + typeDescription: getLinkedTypeDescription(typeInfoToUse, context) || '' }; } } - // Add "See [TypeName](link)" to description if there's a type link - if (typeLink) { - if (description) { - description += '\n\nSee [' + type + '](' + typeLink + ')'; - } else { - description = 'See [' + type + '](' + typeLink + ')'; - } - } // Use 'result' as default name, or extract from description let name = 'result'; if (description) { @@ -585,6 +644,7 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy ], leadingText: '', extractedTypeName: null, + typeDescription: getLinkedTypeDescription(infoForDescription || typeInfoToUse, context) || '' }; } @@ -606,16 +666,10 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy } let type = 'any'; - let typeLink = null; if (index < lines.length) { const maybeType = extractTypeFromLine(lines[index]); if (maybeType) { - if (typeof maybeType === 'object') { - type = maybeType.type; - typeLink = maybeType.link; - } else { - type = maybeType; - } + type = typeof maybeType === 'object' ? maybeType.type : maybeType; index++; } } @@ -649,17 +703,11 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy index++; } - let nestedType = 'any'; - let nestedTypeLink = null; + let nestedType = 'any'; if (index < lines.length) { const maybeNestedType = extractTypeFromLine(lines[index]); if (maybeNestedType) { - if (typeof maybeNestedType === 'object') { - nestedType = maybeNestedType.type; - nestedTypeLink = maybeNestedType.link; - } else { - nestedType = maybeNestedType; - } + nestedType = typeof maybeNestedType === 'object' ? maybeNestedType.type : maybeNestedType; index++; } } @@ -678,33 +726,15 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy index++; } - // Add "See [TypeName](link)" to nested description if there's a type link - let nestedDescription = nestedDescLines.join('\n').trim(); - if (nestedTypeLink) { - if (nestedDescription) { - nestedDescription += '\n\nSee [' + nestedType + '](' + nestedTypeLink + ')'; - } else { - nestedDescription = 'See [' + nestedType + '](' + nestedTypeLink + ')'; - } - } - nested.push({ name: nestedName, type: nestedType, - description: nestedDescription, + description: nestedDescLines.join('\n').trim(), optional: nestedOptional, }); } - // Add "See [TypeName](link)" to description if there's a type link let description = descriptionLines.join('\n').trim(); - if (typeLink) { - if (description) { - description += '\n\nSee [' + type + '](' + typeLink + ')'; - } else { - description = 'See [' + type + '](' + typeLink + ')'; - } - } fields.push({ name, @@ -715,7 +745,7 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy }); } - return { fields, leadingText: leadingLines.join('\n').trim(), extractedTypeName: null }; + return { fields, leadingText: leadingLines.join('\n').trim(), extractedTypeName: null, typeDescription: getLinkedTypeDescription(infoForDescription, context) || '' }; } function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedTypesFile = null) { diff --git a/scripts/mintlify-post-processing/types-to-expose.json b/scripts/mintlify-post-processing/types-to-expose.json index 42f0c15..42c018b 100644 --- a/scripts/mintlify-post-processing/types-to-expose.json +++ b/scripts/mintlify-post-processing/types-to-expose.json @@ -4,6 +4,7 @@ "AuthModule", "ConnectorsModule", "EntitiesModule", + "EntityHandler", "FunctionsModule", "IntegrationsModule", "SsoModule" diff --git a/writing-docs.md b/writing-docs.md index 4f7a183..a94769d 100644 --- a/writing-docs.md +++ b/writing-docs.md @@ -25,6 +25,22 @@ The names of the TypeDoc output folders are: `classes`, `functions`, `interfaces ## Control which types appear in the docs `scripts/mintlify-post-processing/types-to-expose.json` lists the TypeDoc types that the post-processing script keeps in the generated reference. Add or remove type names in that file to expose different SDK areas (for example, to surface a new type or hide one that is not ready for publication). After editing the list, rerun `npm run create-docs` so the Mintlify-ready content reflects the updated exposure set. +## Append additional articles to an existing page +Sometimes TypeDoc produces a helper interface or type that should live inside a broader article instead of owning its own page (for example, the `EntityHandler` interface that belongs with the `EntitiesModule`). Use `scripts/mintlify-post-processing/appended-articles.json` to stitch those auxiliary pages into a host article during post-processing. + +The file maps the host doc (left side) to one or more articles to append (right side). Paths are relative to `docs/content` and omit the `.mdx` extension. You can provide either a string or an array of strings: + +```json +{ + "interfaces/EntitiesModule": [ + "interfaces/EntityHandler", + "interfaces/EntityFilterOptions" + ] +} +``` + +When you run `npm run create-docs`, the post-processing script appends each listed article to the host page under a new `##` heading, updates the panel/table-of-contents links, and then deletes the standalone appended files so they no longer appear in navigation. Edit the JSON mapping and rerun the command anytime you want to combine or separate pages. + ## Push SDK docs to the Mintlify docs repository After generating and reviewing the docs, you can push them to the `base44/mintlify-docs` repo to deploy them. From 9bff1cf8c09fbba41a7418dfbd04b85ac77fb689 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 30 Nov 2025 13:46:33 +0200 Subject: [PATCH 09/31] some more changes --- src/client.ts | 5 ++++- src/modules/functions.types.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 8de0afb..33ca874 100644 --- a/src/client.ts +++ b/src/client.ts @@ -32,7 +32,10 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * * Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. * - * For example, when using the {@linkcode EntitiesModule | entities} module anonymously you can only read public data. With user authentication, you'll have access to the current user's data. With service role authentication, you'll have access to all data that admins can access. + * For example, when using the {@linkcode EntitiesModule | entities} module: + * - **Anonymous**: Can only read public data. + * - **User authentication**: Can access the current user's data. + * - **Service role authentication**: Can access all data that admins can access. * * Most modules are available in all three modes, but with different permission levels. However, some modules are only available in specific authentication modes. * diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index 5076375..058d6fb 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -37,7 +37,7 @@ export interface FunctionsModule { * * @param functionName - The name of the function to invoke. * @param data - An object containing named parameters for the function. - * @returns Promise resolving to the function's response. + * @returns Promise resolving to the function's response, with the `data` property containing the data returned by the function, if there is any. * * @example * ```typescript From 4ccc529883a29ad39a690a8d5e21ea9f39dc916f Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Sun, 30 Nov 2025 15:08:51 +0200 Subject: [PATCH 10/31] fix nested return types --- .../file-processing/styling.css | 7 ++ .../typedoc-mintlify-returns.js | 87 ++++++++++++++++--- 2 files changed, 82 insertions(+), 12 deletions(-) diff --git a/scripts/mintlify-post-processing/file-processing/styling.css b/scripts/mintlify-post-processing/file-processing/styling.css index 430509e..633a12d 100644 --- a/scripts/mintlify-post-processing/file-processing/styling.css +++ b/scripts/mintlify-post-processing/file-processing/styling.css @@ -105,3 +105,10 @@ div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400 s .mint-card .prose span { color: var(--mint-text-secondary) !important; } + +/* Remove bottom border from anchor elements containing code elements */ +a:has(code) { + border-bottom: none !important; + text-decoration: none !important; + color: #FF8844 !important; /* light orange */ +} diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js index f67d4d9..de1d0d4 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js @@ -446,6 +446,7 @@ function rewriteReturnSections(content, options) { function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTypeFromSignature = null, linkedTypeInfo = null, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { let infoForDescription = linkedTypeInfo; + if (!sectionContent) { // If we have a linked type but no section content, try to extract from the linked type if (linkedTypeInfo && context) { @@ -736,6 +737,41 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy let description = descriptionLines.join('\n').trim(); + // Check if this field's type is a linked type that should be expanded + // Only expand if we don't already have nested fields from headings + if (nested.length === 0 && context && type && type !== 'any') { + const simpleTypeName = getSimpleTypeName(type); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + // Try to resolve the type to a linked type + const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + const linkedTypeInfo = typePath + ? { typeName: simpleTypeName, typePath } + : { typeName: simpleTypeName, typePath: simpleTypeName }; + + // Extract properties from the linked type + const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + if (properties.length > 0) { + // Add properties as nested fields + for (const prop of properties) { + nested.push({ + name: prop.name, + type: prop.type, + description: prop.description || '', + optional: prop.optional, + }); + } + + // Track the linked type + if (linkedTypeNames) { + linkedTypeNames.add(simpleTypeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + } + } + } + fields.push({ name, type, @@ -777,18 +813,7 @@ function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedT if (field.nested && field.nested.length > 0) { // Wrap nested fields in an Accordion component output += `\n\n\n`; - - for (const nested of field.nested) { - const requiredAttr = nested.optional ? '' : ' required'; - output += `\n`; - - if (nested.description) { - output += `\n${nested.description}\n`; - } - - output += '\n\n\n'; - } - + output += renderNestedResponseFields(field.nested, linkedTypeNames, writeLinkedTypesFile); output += '\n'; } @@ -834,6 +859,44 @@ function formatReturnFieldsOutput(fields, returnType = null, linkedTypeNames = n return fieldsBlock; } +function renderNestedResponseFields(fields, linkedTypeNames = null, writeLinkedTypesFile = null) { + if (!fields || fields.length === 0) { + return ''; + } + + let output = ''; + for (const field of fields) { + const requiredAttr = field.optional ? '' : ' required'; + const defaultAttr = field.default ? ` default="${escapeAttribute(field.default)}"` : ''; + + if (linkedTypeNames && field.type && !PRIMITIVE_TYPES.includes(field.type)) { + const simpleTypeName = field.type.replace(/[<>\[\]]/g, '').trim(); + if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { + linkedTypeNames.add(simpleTypeName); + if (writeLinkedTypesFile) { + writeLinkedTypesFile(); + } + } + } + + output += `\n`; + + if (field.description) { + output += `\n${field.description}\n`; + } + + if (field.nested && field.nested.length > 0) { + output += `\n\n\n`; + output += renderNestedResponseFields(field.nested, linkedTypeNames, writeLinkedTypesFile); + output += '\n'; + } + + output += '\n\n\n'; + } + + return output; +} + function getSimpleTypeName(typeName) { if (!typeName) { return null; From cf8abc2e5186e021e7f873918ad5bff8eb76ac1f Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Sun, 30 Nov 2025 15:16:36 +0200 Subject: [PATCH 11/31] reformat single response fields --- .../typedoc-plugin/typedoc-mintlify-returns.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js index de1d0d4..c249426 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js @@ -828,6 +828,17 @@ function formatReturnFieldsOutput(fields, returnType = null, linkedTypeNames = n return ''; } + const isSingleSimpleField = + fields.length === 1 && + (!fields[0].nested || fields[0].nested.length === 0); + + if (isSingleSimpleField) { + // For a single, non-object field, we only need to return its description text. + // The type is already rendered separately (`typeNameForDisplay`), so avoid wrapping + // it in a ResponseField to keep the output concise. + return fields[0].description || ''; + } + const fieldsBlock = buildResponseFieldsSection(fields, linkedTypeNames, writeLinkedTypesFile).trimEnd(); if (!fieldsBlock) { return ''; From 81294338f7341b9002611f0a23e178cfe2d7547e Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Sun, 30 Nov 2025 15:38:28 +0200 Subject: [PATCH 12/31] support for Partials --- .../typedoc-mintlify-parameters.js | 109 +++++++++++++++++- 1 file changed, 106 insertions(+), 3 deletions(-) diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js index ce249aa..a3086c9 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js @@ -8,6 +8,7 @@ import * as fs from 'fs'; import * as path from 'path'; const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; +const WRAPPER_TYPE_NAMES = new Set(['Partial', 'Required', 'Readonly', 'Omit', 'Pick']); // Helper function to resolve type paths (similar to returns file) function resolveTypePath(typeName, app, currentPagePath = null) { @@ -182,13 +183,32 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con if (linkWithBackticksMatch) { return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; } + + // Handle [TypeName](link) format + const linkMatch = trimmed.match(/^\[([^\]]+)\]\(([^)]+)\)$/); + if (linkMatch) { + return { type: linkMatch[1], link: linkMatch[2] }; + } // Handle simple `TypeName` format - if (!trimmed.startsWith('`')) return null; const simpleMatch = trimmed.match(/^`([^`]+)`$/); if (simpleMatch) { return { type: simpleMatch[1], link: null }; } + + // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> + if (trimmed.startsWith('`')) { + const sanitized = trimmed + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') + .replace(/`/g, '') + .replace(/\\/g, '') + .replace(/\s+/g, ' ') + .trim(); + if (sanitized) { + return { type: sanitized, link: null }; + } + } + return null; }; @@ -354,13 +374,32 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, if (linkWithBackticksMatch) { return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; } + + // Handle [TypeName](link) format + const linkMatch = trimmed.match(/^\[([^\]]+)\]\(([^)]+)\)$/); + if (linkMatch) { + return { type: linkMatch[1], link: linkMatch[2] }; + } // Handle simple `TypeName` format - if (!trimmed.startsWith('`')) return null; const simpleMatch = trimmed.match(/^`([^`]+)`$/); if (simpleMatch) { return { type: simpleMatch[1], link: null }; } + + // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> + if (trimmed.startsWith('`')) { + const sanitized = trimmed + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') + .replace(/`/g, '') + .replace(/\\/g, '') + .replace(/\s+/g, ' ') + .trim(); + if (sanitized) { + return { type: sanitized, link: null }; + } + } + return null; }; @@ -594,11 +633,75 @@ function simplifyTypeName(typeName) { return null; } + let cleaned = typeName.trim(); + + // Unwrap helper types like Partial, Required, etc. + cleaned = unwrapHelperType(cleaned); + // Remove generics/array indicators and take the first union/intersection entry - const cleaned = typeName.replace(/[\[\]]/g, '').split('|')[0].split('&')[0].trim(); + cleaned = cleaned.replace(/[\[\]]/g, '').split('|')[0].split('&')[0].trim(); return cleaned.replace(/<.*?>/g, '').trim(); } +function unwrapHelperType(typeName) { + let current = typeName.trim(); + let changed = true; + + while (changed) { + changed = false; + const match = current.match(/^([A-Za-z0-9_]+)\s*<(.+)>$/); + if (!match) { + break; + } + + const wrapperName = match[1]; + if (!WRAPPER_TYPE_NAMES.has(wrapperName)) { + break; + } + + const genericBlock = match[2]; + const inner = getFirstGenericArgument(genericBlock); + if (!inner) { + break; + } + + current = inner.trim(); + changed = true; + } + + return current; +} + +function getFirstGenericArgument(genericBlock) { + if (!genericBlock) { + return ''; + } + + let depth = 0; + let buffer = ''; + for (let i = 0; i < genericBlock.length; i++) { + const char = genericBlock[i]; + if (char === '<') { + depth++; + buffer += char; + continue; + } + if (char === '>') { + if (depth > 0) { + depth--; + } + buffer += char; + continue; + } + if (char === ',' && depth === 0) { + return buffer.trim(); + } + buffer += char; + } + + return buffer.trim(); +} + function normalizePropertiesForParams(properties) { if (!Array.isArray(properties)) { return []; From 9b423151e5314ee814470a96576f13088876df2c Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 30 Nov 2025 17:09:19 +0200 Subject: [PATCH 13/31] more updates --- src/index.ts | 1 + src/modules/agents.ts | 6 ++-- src/modules/agents.types.ts | 17 ++++++++--- src/modules/connectors.types.ts | 53 +++++++++++++++++++-------------- 4 files changed, 46 insertions(+), 31 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3e50fd7..1ab4dec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -65,6 +65,7 @@ export type { AgentMessageUsage, AgentMessageCustomContext, AgentMessageMetadata, + CreateConversationParams, } from "./modules/agents.types.js"; export type { diff --git a/src/modules/agents.ts b/src/modules/agents.ts index db42202..f29c761 100644 --- a/src/modules/agents.ts +++ b/src/modules/agents.ts @@ -5,6 +5,7 @@ import { AgentMessage, AgentsModule, AgentsModuleConfig, + CreateConversationParams, } from "./agents.types.js"; /** @@ -43,10 +44,7 @@ export function createAgentsModule({ }; // Create a new conversation with an agent - const createConversation = (conversation: { - agent_name: string; - metadata?: Record; - }) => { + const createConversation = (conversation: CreateConversationParams) => { return axios.post( `${baseURL}/conversations`, conversation diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 15ad564..f0fbe40 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -122,6 +122,16 @@ export interface AgentMessage { additional_message_params?: Record; } +/** + * Parameters for creating a new conversation. + */ +export interface CreateConversationParams { + /** The name of the agent to create a conversation with. */ + agent_name: string; + /** Optional metadata to attach to the conversation. */ + metadata?: Record; +} + /** * Configuration for creating the agents module. * @internal @@ -305,10 +315,9 @@ export interface AgentsModule { * console.log(`Created conversation: ${conversation.id}`); * ``` */ - createConversation(conversation: { - agent_name: string; - metadata?: Record; - }): Promise; + createConversation( + conversation: CreateConversationParams + ): Promise; /** * Adds a message to a conversation. diff --git a/src/modules/connectors.types.ts b/src/modules/connectors.types.ts index da7e612..a9a486b 100644 --- a/src/modules/connectors.types.ts +++ b/src/modules/connectors.types.ts @@ -1,5 +1,5 @@ /** - * The type of external integration/connector, such as `'google'`, `'slack'`, or `'github'`. + * The type of external integration/connector, such as `'googlecalendar'`, `'slack'`, or `'github'`. */ export type ConnectorIntegrationType = string; @@ -23,43 +23,50 @@ export interface ConnectorAccessTokenResponse { * covered by Base44's pre-built integrations. * * 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. - * - * @example - * ```typescript - * // Retrieve Google OAuth token and use it to call Google APIs - * const response = await base44.asServiceRole.connectors.getAccessToken('google'); - * const googleToken = response.access_token; - * const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { - * headers: { 'Authorization': `Bearer ${googleToken}` } - * }); - * ``` */ export interface ConnectorsModule { /** * Retrieves an OAuth access token for a specific external integration type. * - * Returns the stored OAuth token for an external service that the app + * Returns the OAuth token string for an external service that the app * has connected to. You can then use this token to make authenticated API calls * to that external service. * - * @param integrationType - The type of integration, such as `'google'`, `'slack'`, or `'github'`. - * @returns Promise resolving to the access token response. + * @param integrationType - The type of integration, such as `'googlecalendar'`, `'slack'`, or `'github'`. + * @returns Promise resolving to the access token string. * * @example * ```typescript - * // Get Google OAuth token - * const response = await base44.asServiceRole.connectors.getAccessToken('google'); - * console.log(response.access_token); + * // Google Calendar connection + * // Get Google Calendar OAuth token and fetch upcoming events + * const googleToken = await base44.asServiceRole.connectors.getAccessToken('googlecalendar'); + * + * // Fetch upcoming 10 events + * const timeMin = new Date().toISOString(); + * const url = `https://www.googleapis.com/calendar/v3/calendars/primary/events?maxResults=10&orderBy=startTime&singleEvents=true&timeMin=${timeMin}`; + * + * const calendarResponse = await fetch(url, { + * headers: { 'Authorization': `Bearer ${googleToken}` } + * }); + * + * const events = await calendarResponse.json(); * ``` * * @example * ```typescript - * // Get Slack OAuth token - * const slackResponse = await base44.asServiceRole.connectors.getAccessToken('slack'); - * console.log(slackResponse.access_token); + * // Slack connection + * // Get Slack OAuth token and list channels + * const slackToken = await base44.asServiceRole.connectors.getAccessToken('slack'); + * + * // List all public and private channels + * const url = 'https://slack.com/api/conversations.list?types=public_channel,private_channel&limit=100'; + * + * const slackResponse = await fetch(url, { + * headers: { 'Authorization': `Bearer ${slackToken}` } + * }); + * + * const data = await slackResponse.json(); * ``` */ - getAccessToken( - integrationType: ConnectorIntegrationType - ): Promise; + getAccessToken(integrationType: ConnectorIntegrationType): Promise; } From bc70442e0b079db0335ade8fc7cc9b838acb4ff4 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 30 Nov 2025 17:30:50 +0200 Subject: [PATCH 14/31] some changes to processing --- .../file-processing/file-processing.js | 347 ++++++++++++------ 1 file changed, 243 insertions(+), 104 deletions(-) diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index 27bdf13..4073a27 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -2,7 +2,7 @@ /** * Post-processing script for TypeDoc-generated MDX files - * + * * TypeDoc now emits .mdx files directly, so this script: * 1. Processes links to make them Mintlify-compatible * 2. Removes files for linked types that should be suppressed @@ -11,21 +11,43 @@ * 5. Copies styling.css to docs directory */ -import fs from 'fs'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -const DOCS_DIR = path.join(__dirname, '..', '..', '..', 'docs'); -const CONTENT_DIR = path.join(DOCS_DIR, 'content'); -const LINKED_TYPES_FILE = path.join(CONTENT_DIR, '.linked-types.json'); -const TEMPLATE_PATH = path.join(__dirname, 'docs-json-template.json'); -const STYLING_CSS_PATH = path.join(__dirname, 'styling.css'); -const CATEGORY_MAP_PATH = path.join(__dirname, '../category-map.json'); -const TYPES_TO_EXPOSE_PATH = path.join(__dirname, '..', 'types-to-expose.json'); -const APPENDED_ARTICLES_PATH = path.join(__dirname, '../appended-articles.json'); +const DOCS_DIR = path.join(__dirname, "..", "..", "..", "docs"); +const CONTENT_DIR = path.join(DOCS_DIR, "content"); +const LINKED_TYPES_FILE = path.join(CONTENT_DIR, ".linked-types.json"); +const TEMPLATE_PATH = path.join(__dirname, "docs-json-template.json"); +const STYLING_CSS_PATH = path.join(__dirname, "styling.css"); +const CATEGORY_MAP_PATH = path.join(__dirname, "../category-map.json"); +const TYPES_TO_EXPOSE_PATH = path.join(__dirname, "..", "types-to-expose.json"); +const APPENDED_ARTICLES_PATH = path.join( + __dirname, + "../appended-articles.json" +); + +const MODULE_RENAMES = { + AgentsModule: "agents", + AppLogsModule: "app-logs", + AuthModule: "auth", + ConnectorsModule: "connectors", + EntitiesModule: "entities", + FunctionsModule: "functions", + IntegrationsModule: "integrations", + SsoModule: "sso", +}; + +const REVERSE_MODULE_RENAMES = Object.entries(MODULE_RENAMES).reduce( + (acc, [k, v]) => { + acc[v] = k; + return acc; + }, + {} +); /** * Get list of linked type names that should be suppressed @@ -33,7 +55,7 @@ const APPENDED_ARTICLES_PATH = path.join(__dirname, '../appended-articles.json') function getLinkedTypeNames() { try { if (fs.existsSync(LINKED_TYPES_FILE)) { - const content = fs.readFileSync(LINKED_TYPES_FILE, 'utf-8'); + const content = fs.readFileSync(LINKED_TYPES_FILE, "utf-8"); return new Set(JSON.parse(content)); } } catch (e) { @@ -47,14 +69,16 @@ function getLinkedTypeNames() { */ function getTypesToExpose() { try { - const content = fs.readFileSync(TYPES_TO_EXPOSE_PATH, 'utf-8'); + const content = fs.readFileSync(TYPES_TO_EXPOSE_PATH, "utf-8"); const parsed = JSON.parse(content); if (!Array.isArray(parsed)) { - throw new Error('types-to-expose.json must be an array of strings'); + throw new Error("types-to-expose.json must be an array of strings"); } return new Set(parsed); } catch (e) { - console.error(`Error: Unable to read types-to-expose file: ${TYPES_TO_EXPOSE_PATH}`); + console.error( + `Error: Unable to read types-to-expose file: ${TYPES_TO_EXPOSE_PATH}` + ); console.error(e.message); process.exit(1); } @@ -64,25 +88,90 @@ function getTypesToExpose() { * Process links in a file to make them Mintlify-compatible */ function processLinksInFile(filePath) { - let content = fs.readFileSync(filePath, 'utf-8'); + let content = fs.readFileSync(filePath, "utf-8"); let modified = false; - + // Remove .md and .mdx extensions from markdown links // This handles both relative and absolute paths const linkRegex = /\[([^\]]+)\]\(([^)]+)(\.mdx?)\)/g; - const newContent = content.replace(linkRegex, (match, linkText, linkPath, ext) => { - modified = true; - return `[${linkText}](${linkPath})`; - }); - + let newContent = content.replace( + linkRegex, + (match, linkText, linkPath, ext) => { + modified = true; + + // Check if the link points to a renamed module + const pathParts = linkPath.split("/"); + const filename = pathParts[pathParts.length - 1]; + + if (MODULE_RENAMES[filename]) { + pathParts[pathParts.length - 1] = MODULE_RENAMES[filename]; + linkPath = pathParts.join("/"); + } + + return `[${linkText}](${linkPath})`; + } + ); + + // Also check for links that might have already been processed (no extension) + // or if the above regex missed them (though it matches .mdx?) + // The regex requires .md or .mdx extension. If links are already extensionless, this won't run. + // But TypeDoc usually outputs links with extensions. + if (modified) { - fs.writeFileSync(filePath, newContent, 'utf-8'); + fs.writeFileSync(filePath, newContent, "utf-8"); return true; } - + return false; } +/** + * Renames module files and updates their titles + */ +function performModuleRenames(dir) { + if (!fs.existsSync(dir)) return; + + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const entryPath = path.join(dir, entry.name); + + if (entry.isDirectory()) { + performModuleRenames(entryPath); + } else if ( + entry.isFile() && + (entry.name.endsWith(".mdx") || entry.name.endsWith(".md")) + ) { + const nameWithoutExt = path.basename( + entry.name, + path.extname(entry.name) + ); + + if (MODULE_RENAMES[nameWithoutExt]) { + const newName = MODULE_RENAMES[nameWithoutExt]; + const newPath = path.join(dir, `${newName}.mdx`); // Always use .mdx for new files + + let content = fs.readFileSync(entryPath, "utf-8"); + + // Update title in frontmatter + const titleRegex = /^title:\s*["']?([^"'\n]+)["']?/m; + if (titleRegex.test(content)) { + content = content.replace(titleRegex, `title: "${newName}"`); + } + + // Write to new path + fs.writeFileSync(newPath, content, "utf-8"); + + // Delete old file if name is different + if (entryPath !== newPath) { + fs.unlinkSync(entryPath); + console.log(`Renamed module: ${entry.name} -> ${newName}.mdx`); + } + } + } + } +} + /** * Scan docs content directory and build navigation structure */ @@ -94,27 +183,26 @@ function scanDocsContent() { typeAliases: [], }; - const sections = ['functions', 'interfaces', 'classes', 'type-aliases']; - + const sections = ["functions", "interfaces", "classes", "type-aliases"]; + for (const section of sections) { const sectionDir = path.join(CONTENT_DIR, section); if (!fs.existsSync(sectionDir)) continue; - + const files = fs.readdirSync(sectionDir); const mdxFiles = files - .filter((file) => file.endsWith('.mdx')) - .map((file) => path.basename(file, '.mdx')) + .filter((file) => file.endsWith(".mdx")) + .map((file) => path.basename(file, ".mdx")) .sort() .map((fileName) => `content/${section}/${fileName}`); - - const key = section === 'type-aliases' ? 'typeAliases' : section; + + const key = section === "type-aliases" ? "typeAliases" : section; result[key] = mdxFiles; } return result; } - /** * Get group name for a section, using category map or default */ @@ -122,7 +210,7 @@ function getGroupName(section, categoryMap) { if (categoryMap[section]) { return categoryMap[section]; } - + return section; } @@ -130,56 +218,62 @@ function getGroupName(section, categoryMap) { * Generate docs.json from template and scanned content */ function generateDocsJson(docsContent) { - const template = JSON.parse(fs.readFileSync(TEMPLATE_PATH, 'utf-8')); + const template = JSON.parse(fs.readFileSync(TEMPLATE_PATH, "utf-8")); let categoryMap = {}; try { - categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, 'utf-8')); + categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, "utf-8")); } catch (e) { // If file doesn't exist or can't be read, return empty object console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); } - + const groups = []; - + if (docsContent.functions.length > 0 && categoryMap.functions) { groups.push({ - group: getGroupName('functions', categoryMap), + group: getGroupName("functions", categoryMap), pages: docsContent.functions, }); } - + if (docsContent.interfaces.length > 0 && categoryMap.interfaces) { groups.push({ - group: getGroupName('interfaces', categoryMap), + group: getGroupName("interfaces", categoryMap), pages: docsContent.interfaces, }); } - + if (docsContent.classes.length > 0 && categoryMap.classes) { groups.push({ - group: getGroupName('classes', categoryMap), + group: getGroupName("classes", categoryMap), pages: docsContent.classes, }); } - - if (docsContent.typeAliases.length > 0 && categoryMap['type-aliases']) { + + if (docsContent.typeAliases.length > 0 && categoryMap["type-aliases"]) { groups.push({ - group: getGroupName('typeAliases', categoryMap), + group: getGroupName("typeAliases", categoryMap), pages: docsContent.typeAliases, }); } - + // Find or create SDK Reference tab - let sdkTab = template.navigation.tabs.find(tab => tab.tab === 'SDK Reference'); + let sdkTab = template.navigation.tabs.find( + (tab) => tab.tab === "SDK Reference" + ); if (!sdkTab) { - sdkTab = { tab: 'SDK Reference', groups: [] }; + sdkTab = { tab: "SDK Reference", groups: [] }; template.navigation.tabs.push(sdkTab); } - + sdkTab.groups = groups; - - const docsJsonPath = path.join(DOCS_DIR, 'docs.json'); - fs.writeFileSync(docsJsonPath, JSON.stringify(template, null, 2) + '\n', 'utf-8'); + + const docsJsonPath = path.join(DOCS_DIR, "docs.json"); + fs.writeFileSync( + docsJsonPath, + JSON.stringify(template, null, 2) + "\n", + "utf-8" + ); console.log(`Generated docs.json`); } @@ -187,7 +281,7 @@ function generateDocsJson(docsContent) { * Copy styling.css to docs directory */ function copyStylingCss() { - const targetPath = path.join(DOCS_DIR, 'styling.css'); + const targetPath = path.join(DOCS_DIR, "styling.css"); fs.copyFileSync(STYLING_CSS_PATH, targetPath); console.log(`Copied styling.css`); } @@ -196,10 +290,12 @@ function copyStylingCss() { * Recursively process all MDX files */ function isTypeDocPath(relativePath) { - const normalized = relativePath.split(path.sep).join('/'); - return normalized.startsWith('content/interfaces/') || - normalized.startsWith('content/type-aliases/') || - normalized.startsWith('content/classes/'); + const normalized = relativePath.split(path.sep).join("/"); + return ( + normalized.startsWith("content/interfaces/") || + normalized.startsWith("content/type-aliases/") || + normalized.startsWith("content/classes/") + ); } /** @@ -207,20 +303,26 @@ function isTypeDocPath(relativePath) { */ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { const entries = fs.readdirSync(dir, { withFileTypes: true }); - + for (const entry of entries) { const entryPath = path.join(dir, entry.name); - + if (entry.isDirectory()) { processAllFiles(entryPath, linkedTypeNames, exposedTypeNames); - } else if (entry.isFile() && (entry.name.endsWith('.mdx') || entry.name.endsWith('.md'))) { + } else if ( + entry.isFile() && + (entry.name.endsWith(".mdx") || entry.name.endsWith(".md")) + ) { // Extract the type name from the file path // e.g., "docs/interfaces/LoginViaEmailPasswordResponse.mdx" -> "LoginViaEmailPasswordResponse" const fileName = path.basename(entryPath, path.extname(entryPath)); const relativePath = path.relative(DOCS_DIR, entryPath); const isTypeDoc = isTypeDocPath(relativePath); - const isExposedType = !isTypeDoc || exposedTypeNames.has(fileName); - + + // Check if exposed. Handle renamed modules by checking reverse map. + const originalName = REVERSE_MODULE_RENAMES[fileName] || fileName; + const isExposedType = !isTypeDoc || exposedTypeNames.has(originalName); + // Remove any type doc files that are not explicitly exposed if (isTypeDoc && !isExposedType) { fs.unlinkSync(entryPath); @@ -244,14 +346,14 @@ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { function loadAppendedArticlesConfig() { try { - const content = fs.readFileSync(APPENDED_ARTICLES_PATH, 'utf-8'); + const content = fs.readFileSync(APPENDED_ARTICLES_PATH, "utf-8"); const parsed = JSON.parse(content); - if (parsed && typeof parsed === 'object') { + if (parsed && typeof parsed === "object") { const normalized = {}; for (const [host, value] of Object.entries(parsed)) { if (Array.isArray(value)) { normalized[host] = value; - } else if (typeof value === 'string' && value.trim()) { + } else if (typeof value === "string" && value.trim()) { normalized[host] = [value]; } } @@ -264,10 +366,10 @@ function loadAppendedArticlesConfig() { } function stripFrontMatter(content) { - if (!content.startsWith('---')) { + if (!content.startsWith("---")) { return { title: null, content: content.trimStart() }; } - const endIndex = content.indexOf('\n---', 3); + const endIndex = content.indexOf("\n---", 3); if (endIndex === -1) { return { title: null, content: content.trimStart() }; } @@ -276,23 +378,23 @@ function stripFrontMatter(content) { const titleMatch = frontMatter.match(/title:\s*["']?([^"'\n]+)["']?/i); return { title: titleMatch ? titleMatch[1].trim() : null, - content: rest + content: rest, }; } function removeFirstPanelBlock(content) { - const panelStart = content.indexOf(''); - const panelEnd = content.indexOf(''); + const panelStart = content.indexOf(""); + const panelEnd = content.indexOf(""); if (panelStart === -1 || panelEnd === -1 || panelEnd < panelStart) { return content; } const before = content.slice(0, panelStart); - const after = content.slice(panelEnd + ''.length); + const after = content.slice(panelEnd + "".length); return (before + after).trimStart(); } function normalizeHeadings(content) { - const lines = content.split('\n'); + const lines = content.split("\n"); const headingRegex = /^(#{1,6})\s+(.*)$/; let minLevel = Infinity; for (const line of lines) { @@ -316,22 +418,22 @@ function normalizeHeadings(content) { newLevel = Math.max(baseLevel, Math.min(6, newLevel)); const text = match[2].trim(); headings.push({ text, level: newLevel }); - return `${'#'.repeat(newLevel)} ${text}`; + return `${"#".repeat(newLevel)} ${text}`; }); - return { content: adjusted.join('\n').trim(), headings }; + return { content: adjusted.join("\n").trim(), headings }; } function slugifyHeading(text) { return text .toLowerCase() - .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, '') - .replace(/\s+/g, '-'); + .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, "") + .replace(/\s+/g, "-"); } function ensurePanelSpacing(content) { const panelRegex = /([\s\S]*?)(\n*)(<\/Panel>)/; return content.replace(panelRegex, (match, body, newlineSection, closing) => { - const trimmedBody = body.replace(/\s+$/, ''); + const trimmedBody = body.replace(/\s+$/, ""); return `${trimmedBody}\n\n${closing}`; }); } @@ -340,11 +442,11 @@ function updatePanelWithHeadings(hostContent, headings) { if (!headings || headings.length === 0) { return ensurePanelSpacing(hostContent); } - const panelStart = hostContent.indexOf(''); + const panelStart = hostContent.indexOf(""); if (panelStart === -1) { return ensurePanelSpacing(hostContent); } - const panelEnd = hostContent.indexOf('', panelStart); + const panelEnd = hostContent.indexOf("", panelStart); if (panelEnd === -1) { return ensurePanelSpacing(hostContent); } @@ -352,7 +454,7 @@ function updatePanelWithHeadings(hostContent, headings) { const panelBlock = hostContent.slice(panelStart, panelEnd); const afterPanel = hostContent.slice(panelEnd); - const panelLines = panelBlock.split('\n'); + const panelLines = panelBlock.split("\n"); const existingSlugs = new Set(); const slugMatchRegex = /- \[[^\]]+\]\(#([^)]+)\)/; for (const line of panelLines) { @@ -378,20 +480,23 @@ function updatePanelWithHeadings(hostContent, headings) { return ensurePanelSpacing(hostContent); } - const insertion = (panelBlock.endsWith('\n') ? '' : '\n') + newEntries.join('\n'); + const insertion = + (panelBlock.endsWith("\n") ? "" : "\n") + newEntries.join("\n"); const updatedPanelBlock = panelBlock + insertion; const updatedContent = beforePanel + updatedPanelBlock + afterPanel; return ensurePanelSpacing(updatedContent); } function prepareAppendedSection(appendPath) { - const rawContent = fs.readFileSync(appendPath, 'utf-8'); + const rawContent = fs.readFileSync(appendPath, "utf-8"); const { title, content: withoutFrontMatter } = stripFrontMatter(rawContent); const withoutPanel = removeFirstPanelBlock(withoutFrontMatter); - const { content: normalizedContent, headings } = normalizeHeadings(withoutPanel); - const fileTitle = title || path.basename(appendPath, path.extname(appendPath)); + const { content: normalizedContent, headings } = + normalizeHeadings(withoutPanel); + const fileTitle = + title || path.basename(appendPath, path.extname(appendPath)); const sectionHeading = `## ${fileTitle.trim()}`; - const trimmedContent = normalizedContent ? `\n\n${normalizedContent}` : ''; + const trimmedContent = normalizedContent ? `\n\n${normalizedContent}` : ""; const section = `${sectionHeading}${trimmedContent}\n`; const headingList = [{ text: fileTitle.trim(), level: 2 }, ...headings]; return { section, headings: headingList }; @@ -409,20 +514,43 @@ function applyAppendedArticles(appendedArticles) { continue; } - const hostPath = path.join(CONTENT_DIR, `${hostKey}.mdx`); + // Check if host was renamed + let effectiveHostKey = hostKey; + const pathParts = hostKey.split("/"); + const hostName = pathParts[pathParts.length - 1]; + if (MODULE_RENAMES[hostName]) { + pathParts[pathParts.length - 1] = MODULE_RENAMES[hostName]; + effectiveHostKey = pathParts.join("/"); + } + + const hostPath = path.join(CONTENT_DIR, `${effectiveHostKey}.mdx`); if (!fs.existsSync(hostPath)) { - console.warn(`Warning: Host article not found for append: ${hostKey}`); + // Try checking if it exists as .md just in case, though we standardized on .mdx + console.warn( + `Warning: Host article not found for append: ${hostKey} (checked ${effectiveHostKey}.mdx)` + ); continue; } - let hostContent = fs.readFileSync(hostPath, 'utf-8'); - let combinedSections = ''; + let hostContent = fs.readFileSync(hostPath, "utf-8"); + let combinedSections = ""; const collectedHeadings = []; for (const appendKey of appendList) { - const appendPath = path.join(CONTENT_DIR, `${appendKey}.mdx`); + // Check if appended file was renamed (unlikely for EntityHandler but good for consistency) + let effectiveAppendKey = appendKey; + const appendParts = appendKey.split("/"); + const appendName = appendParts[appendParts.length - 1]; + if (MODULE_RENAMES[appendName]) { + appendParts[appendParts.length - 1] = MODULE_RENAMES[appendName]; + effectiveAppendKey = appendParts.join("/"); + } + + const appendPath = path.join(CONTENT_DIR, `${effectiveAppendKey}.mdx`); if (!fs.existsSync(appendPath)) { - console.warn(`Warning: Appended article not found: ${appendKey}`); + console.warn( + `Warning: Appended article not found: ${appendKey} (checked ${effectiveAppendKey}.mdx)` + ); continue; } @@ -432,9 +560,13 @@ function applyAppendedArticles(appendedArticles) { try { fs.unlinkSync(appendPath); - console.log(`Appended ${appendKey}.mdx -> ${hostKey}.mdx`); + console.log( + `Appended ${effectiveAppendKey}.mdx -> ${effectiveHostKey}.mdx` + ); } catch (e) { - console.warn(`Warning: Unable to remove appended article ${appendKey}.mdx`); + console.warn( + `Warning: Unable to remove appended article ${effectiveAppendKey}.mdx` + ); } } @@ -442,9 +574,9 @@ function applyAppendedArticles(appendedArticles) { continue; } - hostContent = hostContent.trimEnd() + combinedSections + '\n'; + hostContent = hostContent.trimEnd() + combinedSections + "\n"; hostContent = updatePanelWithHeadings(hostContent, collectedHeadings); - fs.writeFileSync(hostPath, hostContent, 'utf-8'); + fs.writeFileSync(hostPath, hostContent, "utf-8"); } } @@ -452,18 +584,25 @@ function applyAppendedArticles(appendedArticles) { * Main function */ function main() { - console.log('Processing TypeDoc MDX files for Mintlify...\n'); - + console.log("Processing TypeDoc MDX files for Mintlify...\n"); + if (!fs.existsSync(DOCS_DIR)) { console.error(`Error: Documentation directory not found: ${DOCS_DIR}`); console.error('Please run "npm run docs:generate" first.'); process.exit(1); } - + // Get list of linked types to suppress const linkedTypeNames = getLinkedTypeNames(); const exposedTypeNames = getTypesToExpose(); - + + // First, perform module renames (EntitiesModule -> entities, etc.) + if (fs.existsSync(CONTENT_DIR)) { + performModuleRenames(CONTENT_DIR); + } else { + performModuleRenames(DOCS_DIR); + } + // Process all files (remove suppressed ones and fix links) // Process content directory specifically if (fs.existsSync(CONTENT_DIR)) { @@ -476,7 +615,7 @@ function main() { // Append configured articles const appendedArticles = loadAppendedArticlesConfig(); applyAppendedArticles(appendedArticles); - + // Clean up the linked types file try { if (fs.existsSync(LINKED_TYPES_FILE)) { @@ -485,14 +624,14 @@ function main() { } catch (e) { // Ignore errors } - + // Scan content and generate docs.json const docsContent = scanDocsContent(); generateDocsJson(docsContent); - + // Copy styling.css copyStylingCss(); - + console.log(`\n✓ Post-processing complete!`); console.log(` Documentation directory: ${DOCS_DIR}`); } From fd898ae16ce5f916b58e54b89f8ce05a04eec8d0 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 30 Nov 2025 17:51:15 +0200 Subject: [PATCH 15/31] changes to module names --- docs/README.md | 90 +-- docs/classes/Base44Error.md | 6 +- docs/functions/createClient.md | 12 +- docs/functions/createClientFromRequest.md | 6 +- docs/functions/getAccessToken.md | 4 +- docs/functions/getLoginUrl.md | 4 +- docs/functions/removeAccessToken.md | 4 +- docs/functions/saveAccessToken.md | 4 +- docs/interfaces/AgentConversation.md | 55 -- docs/interfaces/AgentMessage.md | 111 ---- docs/interfaces/AgentMessageCustomContext.md | 2 +- docs/interfaces/AgentMessageMetadata.md | 2 +- docs/interfaces/AgentMessageReasoning.md | 2 +- docs/interfaces/AgentMessageToolCall.md | 2 +- docs/interfaces/AgentMessageUsage.md | 2 +- docs/interfaces/AgentsModule.md | 352 ---------- docs/interfaces/AppLogsModule.md | 196 ------ docs/interfaces/AuthModule.md | 615 ------------------ docs/interfaces/Base44Client.md | 160 ----- docs/interfaces/Base44ErrorJSON.md | 2 +- docs/interfaces/ChangePasswordParams.md | 2 +- .../ConnectorAccessTokenResponse.md | 2 +- docs/interfaces/ConnectorsModule.md | 69 -- docs/interfaces/CreateClientConfig.md | 4 +- docs/interfaces/CreateClientOptions.md | 2 +- docs/interfaces/EntitiesModule.md | 86 --- docs/interfaces/EntityHandler.md | 424 ------------ docs/interfaces/FetchLogsParams.md | 2 +- docs/interfaces/FunctionsModule.md | 93 --- docs/interfaces/GetAccessTokenOptions.md | 2 +- docs/interfaces/GetLoginUrlOptions.md | 2 +- docs/interfaces/GetStatsParams.md | 2 +- docs/interfaces/IntegrationsModule.md | 98 --- docs/interfaces/LoginResponse.md | 23 - docs/interfaces/ModelFilterParams.md | 2 +- docs/interfaces/RegisterPayload.md | 2 +- docs/interfaces/RemoveAccessTokenOptions.md | 2 +- docs/interfaces/ResetPasswordParams.md | 2 +- docs/interfaces/SaveAccessTokenOptions.md | 2 +- docs/interfaces/SsoAccessTokenResponse.md | 2 +- docs/interfaces/SsoModule.md | 54 -- docs/interfaces/User.md | 85 --- docs/interfaces/VerifyOtpParams.md | 2 +- docs/type-aliases/ConnectorIntegrationType.md | 2 +- .../IntegrationEndpointFunction.md | 2 +- docs/type-aliases/IntegrationPackage.md | 27 - .../file-processing/file-processing.js | 94 ++- 47 files changed, 156 insertions(+), 2564 deletions(-) delete mode 100644 docs/interfaces/AgentConversation.md delete mode 100644 docs/interfaces/AgentMessage.md delete mode 100644 docs/interfaces/AgentsModule.md delete mode 100644 docs/interfaces/AppLogsModule.md delete mode 100644 docs/interfaces/AuthModule.md delete mode 100644 docs/interfaces/Base44Client.md delete mode 100644 docs/interfaces/ConnectorsModule.md delete mode 100644 docs/interfaces/EntitiesModule.md delete mode 100644 docs/interfaces/EntityHandler.md delete mode 100644 docs/interfaces/FunctionsModule.md delete mode 100644 docs/interfaces/IntegrationsModule.md delete mode 100644 docs/interfaces/LoginResponse.md delete mode 100644 docs/interfaces/SsoModule.md delete mode 100644 docs/interfaces/User.md delete mode 100644 docs/type-aliases/IntegrationPackage.md diff --git a/docs/README.md b/docs/README.md index ba36103..a09d52d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,57 +6,57 @@ ## Classes -- [Base44Error](classes/Base44Error.md) +- [Base44Error](classes/Base44Error) ## Interfaces -- [CreateClientOptions](interfaces/CreateClientOptions.md) -- [CreateClientConfig](interfaces/CreateClientConfig.md) -- [Base44Client](interfaces/Base44Client.md) -- [AgentMessageReasoning](interfaces/AgentMessageReasoning.md) -- [AgentMessageToolCall](interfaces/AgentMessageToolCall.md) -- [AgentMessageUsage](interfaces/AgentMessageUsage.md) -- [AgentMessageCustomContext](interfaces/AgentMessageCustomContext.md) -- [AgentMessageMetadata](interfaces/AgentMessageMetadata.md) -- [AgentConversation](interfaces/AgentConversation.md) -- [AgentMessage](interfaces/AgentMessage.md) -- [AgentsModule](interfaces/AgentsModule.md) -- [FetchLogsParams](interfaces/FetchLogsParams.md) -- [GetStatsParams](interfaces/GetStatsParams.md) -- [AppLogsModule](interfaces/AppLogsModule.md) -- [User](interfaces/User.md) -- [LoginResponse](interfaces/LoginResponse.md) -- [RegisterPayload](interfaces/RegisterPayload.md) -- [VerifyOtpParams](interfaces/VerifyOtpParams.md) -- [ChangePasswordParams](interfaces/ChangePasswordParams.md) -- [ResetPasswordParams](interfaces/ResetPasswordParams.md) -- [AuthModule](interfaces/AuthModule.md) -- [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse.md) -- [ConnectorsModule](interfaces/ConnectorsModule.md) -- [EntityHandler](interfaces/EntityHandler.md) -- [EntitiesModule](interfaces/EntitiesModule.md) -- [FunctionsModule](interfaces/FunctionsModule.md) -- [IntegrationsModule](interfaces/IntegrationsModule.md) -- [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse.md) -- [SsoModule](interfaces/SsoModule.md) -- [ModelFilterParams](interfaces/ModelFilterParams.md) -- [GetAccessTokenOptions](interfaces/GetAccessTokenOptions.md) -- [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions.md) -- [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions.md) -- [GetLoginUrlOptions](interfaces/GetLoginUrlOptions.md) -- [Base44ErrorJSON](interfaces/Base44ErrorJSON.md) +- [CreateClientOptions](interfaces/CreateClientOptions) +- [CreateClientConfig](interfaces/CreateClientConfig) +- [Base44Client](interfaces/Base44Client) +- [AgentMessageReasoning](interfaces/AgentMessageReasoning) +- [AgentMessageToolCall](interfaces/AgentMessageToolCall) +- [AgentMessageUsage](interfaces/AgentMessageUsage) +- [AgentMessageCustomContext](interfaces/AgentMessageCustomContext) +- [AgentMessageMetadata](interfaces/AgentMessageMetadata) +- [AgentConversation](interfaces/AgentConversation) +- [AgentMessage](interfaces/AgentMessage) +- [AgentsModule](interfaces/agents) +- [FetchLogsParams](interfaces/FetchLogsParams) +- [GetStatsParams](interfaces/GetStatsParams) +- [AppLogsModule](interfaces/app-logs) +- [User](interfaces/User) +- [LoginResponse](interfaces/LoginResponse) +- [RegisterPayload](interfaces/RegisterPayload) +- [VerifyOtpParams](interfaces/VerifyOtpParams) +- [ChangePasswordParams](interfaces/ChangePasswordParams) +- [ResetPasswordParams](interfaces/ResetPasswordParams) +- [AuthModule](interfaces/auth) +- [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse) +- [ConnectorsModule](interfaces/connectors) +- [EntityHandler](interfaces/EntityHandler) +- [EntitiesModule](interfaces/entities) +- [FunctionsModule](interfaces/functions) +- [IntegrationsModule](interfaces/integrations) +- [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse) +- [SsoModule](interfaces/sso) +- [ModelFilterParams](interfaces/ModelFilterParams) +- [GetAccessTokenOptions](interfaces/GetAccessTokenOptions) +- [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions) +- [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions) +- [GetLoginUrlOptions](interfaces/GetLoginUrlOptions) +- [Base44ErrorJSON](interfaces/Base44ErrorJSON) ## Type Aliases -- [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType.md) -- [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction.md) -- [IntegrationPackage](type-aliases/IntegrationPackage.md) +- [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType) +- [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction) +- [IntegrationPackage](type-aliases/IntegrationPackage) ## Functions -- [createClient](functions/createClient.md) -- [createClientFromRequest](functions/createClientFromRequest.md) -- [getAccessToken](functions/getAccessToken.md) -- [saveAccessToken](functions/saveAccessToken.md) -- [removeAccessToken](functions/removeAccessToken.md) -- [getLoginUrl](functions/getLoginUrl.md) +- [createClient](functions/createClient) +- [createClientFromRequest](functions/createClientFromRequest) +- [getAccessToken](functions/getAccessToken) +- [saveAccessToken](functions/saveAccessToken) +- [removeAccessToken](functions/removeAccessToken) +- [getLoginUrl](functions/getLoginUrl) diff --git a/docs/classes/Base44Error.md b/docs/classes/Base44Error.md index 4e6cb23..4e52906 100644 --- a/docs/classes/Base44Error.md +++ b/docs/classes/Base44Error.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -63,7 +63,7 @@ The original error object from Axios. ### toJSON() -> **toJSON**(): [`Base44ErrorJSON`](../interfaces/Base44ErrorJSON.md) +> **toJSON**(): [`Base44ErrorJSON`](../interfaces/Base44ErrorJSON) Serializes the error to a JSON-safe object. @@ -72,7 +72,7 @@ without circular reference issues. #### Returns -[`Base44ErrorJSON`](../interfaces/Base44ErrorJSON.md) +[`Base44ErrorJSON`](../interfaces/Base44ErrorJSON) JSON-safe representation of the error. diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md index c9734ad..32dbe05 100644 --- a/docs/functions/createClient.md +++ b/docs/functions/createClient.md @@ -1,20 +1,20 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** # Function: createClient() -> **createClient**(`config`): [`Base44Client`](../interfaces/Base44Client.md) +> **createClient**(`config`): [`Base44Client`](../interfaces/Base44Client) Creates a Base44 SDK client instance. -This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [`entities`](../interfaces/EntitiesModule.md), [`auth`](../interfaces/AuthModule.md), and [`functions`](../interfaces/FunctionsModule.md). +This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [`entities`](../interfaces/entities), [`auth`](../interfaces/auth), and [`functions`](../interfaces/functions). The client supports two authentication modes: - **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. -For example, when using the [`entities`](../interfaces/EntitiesModule.md) module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. +For example, when using the [`entities`](../interfaces/entities) module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. Most modules are available in both modes, but with different permission levels. However, some modules are only available in one authentication mode. @@ -24,13 +24,13 @@ To use the service role authentication mode, you need to provide a service role ### config -[`CreateClientConfig`](../interfaces/CreateClientConfig.md) +[`CreateClientConfig`](../interfaces/CreateClientConfig) Configuration object for the client. ## Returns -[`Base44Client`](../interfaces/Base44Client.md) +[`Base44Client`](../interfaces/Base44Client) A configured Base44 client instance with access to all SDK modules. diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md index 2c99b8a..b759fb1 100644 --- a/docs/functions/createClientFromRequest.md +++ b/docs/functions/createClientFromRequest.md @@ -1,10 +1,10 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** # Function: createClientFromRequest() -> **createClientFromRequest**(`request`): [`Base44Client`](../interfaces/Base44Client.md) +> **createClientFromRequest**(`request`): [`Base44Client`](../interfaces/Base44Client) Creates a Base44 client from an HTTP request. @@ -20,7 +20,7 @@ The incoming HTTP request object containing Base44 authentication headers. ## Returns -[`Base44Client`](../interfaces/Base44Client.md) +[`Base44Client`](../interfaces/Base44Client) A configured Base44 client instance with authentication from the incoming request. diff --git a/docs/functions/getAccessToken.md b/docs/functions/getAccessToken.md index 8bcec03..bc4abb8 100644 --- a/docs/functions/getAccessToken.md +++ b/docs/functions/getAccessToken.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -15,7 +15,7 @@ token management automatically. This function is useful for custom authenticatio ### options -[`GetAccessTokenOptions`](../interfaces/GetAccessTokenOptions.md) = `{}` +[`GetAccessTokenOptions`](../interfaces/GetAccessTokenOptions) = `{}` Configuration options for token retrieval. diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md index dc12e84..79df4c4 100644 --- a/docs/functions/getLoginUrl.md +++ b/docs/functions/getLoginUrl.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -20,7 +20,7 @@ The URL to redirect to after successful login. ### options -[`GetLoginUrlOptions`](../interfaces/GetLoginUrlOptions.md) +[`GetLoginUrlOptions`](../interfaces/GetLoginUrlOptions) Configuration options. diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md index 3100a04..ea028e6 100644 --- a/docs/functions/removeAccessToken.md +++ b/docs/functions/removeAccessToken.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -14,7 +14,7 @@ Low-level utility for manually removing tokens from the browser's local storage. ### options -[`RemoveAccessTokenOptions`](../interfaces/RemoveAccessTokenOptions.md) +[`RemoveAccessTokenOptions`](../interfaces/RemoveAccessTokenOptions) Configuration options for token removal. diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md index a7df677..3bb821f 100644 --- a/docs/functions/saveAccessToken.md +++ b/docs/functions/saveAccessToken.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -20,7 +20,7 @@ The access token string to save. ### options -[`SaveAccessTokenOptions`](../interfaces/SaveAccessTokenOptions.md) +[`SaveAccessTokenOptions`](../interfaces/SaveAccessTokenOptions) Configuration options for saving the token. diff --git a/docs/interfaces/AgentConversation.md b/docs/interfaces/AgentConversation.md deleted file mode 100644 index 436ceb7..0000000 --- a/docs/interfaces/AgentConversation.md +++ /dev/null @@ -1,55 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AgentConversation - -An agent conversation containing messages exchanged with an AI agent. - -## Properties - -### id - -> **id**: `string` - -Unique identifier for the conversation. - -*** - -### app\_id - -> **app\_id**: `string` - -Application ID. - -*** - -### agent\_name - -> **agent\_name**: `string` - -Name of the agent in this conversation. - -*** - -### created\_by\_id - -> **created\_by\_id**: `string` - -ID of the user who created the conversation. - -*** - -### messages - -> **messages**: [`AgentMessage`](AgentMessage.md)[] - -Array of messages in the conversation. - -*** - -### metadata? - -> `optional` **metadata**: `Record`\<`string`, `any`\> - -Optional metadata associated with the conversation. diff --git a/docs/interfaces/AgentMessage.md b/docs/interfaces/AgentMessage.md deleted file mode 100644 index 919b45a..0000000 --- a/docs/interfaces/AgentMessage.md +++ /dev/null @@ -1,111 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AgentMessage - -A message in an agent conversation. - -## Properties - -### id - -> **id**: `string` - -Unique identifier for the message. - -*** - -### role - -> **role**: `"user"` \| `"assistant"` \| `"system"` - -Role of the message sender. - -*** - -### reasoning? - -> `optional` **reasoning**: [`AgentMessageReasoning`](AgentMessageReasoning.md) - -Optional reasoning information for the message. - -*** - -### content? - -> `optional` **content**: `string` \| `Record`\<`string`, `any`\> \| `null` - -Message content. - -*** - -### file\_urls? - -> `optional` **file\_urls**: `string`[] \| `null` - -URLs to files attached to the message. - -*** - -### tool\_calls? - -> `optional` **tool\_calls**: [`AgentMessageToolCall`](AgentMessageToolCall.md)[] \| `null` - -Tool calls made by the agent. - -*** - -### usage? - -> `optional` **usage**: [`AgentMessageUsage`](AgentMessageUsage.md) \| `null` - -Token usage statistics. - -*** - -### hidden? - -> `optional` **hidden**: `boolean` - -Whether the message is hidden from the user. - -*** - -### custom\_context? - -> `optional` **custom\_context**: [`AgentMessageCustomContext`](AgentMessageCustomContext.md)[] \| `null` - -Custom context provided with the message. - -*** - -### model? - -> `optional` **model**: `string` \| `null` - -Model used to generate the message. - -*** - -### checkpoint\_id? - -> `optional` **checkpoint\_id**: `string` \| `null` - -Checkpoint ID for the message. - -*** - -### metadata? - -> `optional` **metadata**: [`AgentMessageMetadata`](AgentMessageMetadata.md) - -Metadata about when and by whom the message was created. - -*** - -### additional\_message\_params? - -> `optional` **additional\_message\_params**: `Record`\<`string`, `any`\> - -Additional custom parameters for the message. diff --git a/docs/interfaces/AgentMessageCustomContext.md b/docs/interfaces/AgentMessageCustomContext.md index 6d8f956..4e3ba68 100644 --- a/docs/interfaces/AgentMessageCustomContext.md +++ b/docs/interfaces/AgentMessageCustomContext.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/AgentMessageMetadata.md b/docs/interfaces/AgentMessageMetadata.md index 70a8bba..d14cd2a 100644 --- a/docs/interfaces/AgentMessageMetadata.md +++ b/docs/interfaces/AgentMessageMetadata.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/AgentMessageReasoning.md b/docs/interfaces/AgentMessageReasoning.md index 3802ca7..a3a8c92 100644 --- a/docs/interfaces/AgentMessageReasoning.md +++ b/docs/interfaces/AgentMessageReasoning.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/AgentMessageToolCall.md b/docs/interfaces/AgentMessageToolCall.md index ce6ccde..ca5ddb4 100644 --- a/docs/interfaces/AgentMessageToolCall.md +++ b/docs/interfaces/AgentMessageToolCall.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/AgentMessageUsage.md b/docs/interfaces/AgentMessageUsage.md index 9dd2c11..3339d09 100644 --- a/docs/interfaces/AgentMessageUsage.md +++ b/docs/interfaces/AgentMessageUsage.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/AgentsModule.md b/docs/interfaces/AgentsModule.md deleted file mode 100644 index 429eba4..0000000 --- a/docs/interfaces/AgentsModule.md +++ /dev/null @@ -1,352 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AgentsModule - -Agents module for managing AI agent conversations. - -This module provides methods to create and manage conversations with AI agents, -send messages, and subscribe to real-time updates. Conversations can be used -for chat interfaces, support systems, or any interactive AI app. - -The agents module enables you to: - -- **Create conversations** with agents defined in the app. -- **Send messages** from users to agents and receive AI-generated responses. -- **Retrieve conversations** individually or as filtered lists with sorting and pagination. -- **Subscribe to real-time updates** using WebSocket connections to receive instant notifications when new messages arrive. -- **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. - -The agents module operates with a two-level hierarchy: - -1. **Conversations** ([AgentConversation](AgentConversation.md)): 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** ([AgentMessage](AgentMessage.md)): 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. - -This module is available to use with a client in both user and service role authentication modes: - -- **User authentication** (`base44.agents`): Access only conversations created by the authenticated user. -- **Service role authentication** (`client.asServiceRole.agents`): Access all conversations across all users. - -## Examples - -```typescript -// Create a new conversation -const conversation = await base44.agents.createConversation({ - agent_name: 'support-agent', - metadata: { - ticket_id: 'SUPP-1234', - category: 'billing', - priority: 'high' - } -}); -``` - -```typescript -// Send a message -await base44.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help!' -}); -``` - -```typescript -// Subscribe to real-time updates -const unsubscribe = base44.agents.subscribeToConversation( - conversation.id, - (updatedConversation) => { - console.log('New messages:', updatedConversation.messages); - } -); - -// Clean up subscription later -unsubscribe(); -``` - -## Methods - -### getConversations() - -> **getConversations**(): `Promise`\<[`AgentConversation`](AgentConversation.md)[]\> - -Gets all conversations. - -Retrieves all conversations. Use [`listConversations()`](#listconversations) to filter which conversations are returned, apply sorting, or paginate results. Use [`getConversation()`](#getconversation) to retrieve a specific conversation by ID. - -#### Returns - -`Promise`\<[`AgentConversation`](AgentConversation.md)[]\> - -Promise resolving to an array of conversations. - -#### Example - -```typescript -const conversations = await base44.agents.getConversations(); -console.log(`Total conversations: ${conversations.length}`); -``` - -#### See - - - [`listConversations()`](#listconversations) for filtering, sorting, and pagination - - [`getConversation()`](#getconversation) for retrieving a specific conversation by ID - -*** - -### getConversation() - -> **getConversation**(`conversationId`): `Promise`\<[`AgentConversation`](AgentConversation.md) \| `undefined`\> - -Gets a specific conversation by ID. - -Retrieves a single conversation using its unique identifier. To retrieve -all conversations, use [`getConversations()`](#getconversations) To filter, sort, or paginate conversations, use [`listConversations()`](#listconversations). - -#### Parameters - -##### conversationId - -`string` - -The unique identifier of the conversation. - -#### Returns - -`Promise`\<[`AgentConversation`](AgentConversation.md) \| `undefined`\> - -Promise resolving to the conversation, or undefined if not found. - -#### Example - -```typescript -const conversation = await base44.agents.getConversation('conv-123'); -if (conversation) { - console.log(`Conversation has ${conversation.messages.length} messages`); -} -``` - -#### See - - - [`getConversations()`](#getconversations) for retrieving all conversations - - [`listConversations()`](#listconversations) for filtering and sorting conversations - -*** - -### listConversations() - -> **listConversations**(`filterParams`): `Promise`\<[`AgentConversation`](AgentConversation.md)[]\> - -Lists conversations with filtering, sorting, and pagination. - -Provides querying capabilities including filtering by fields, sorting, pagination, and field selection. For cases where you need all conversations without filtering, use [`getConversations()`](#getconversations). To retrieve a specific conversation by ID, use [`getConversation()`](#getconversation). - -#### Parameters - -##### filterParams - -[`ModelFilterParams`](ModelFilterParams.md) - -Filter parameters for querying conversations. - -#### Returns - -`Promise`\<[`AgentConversation`](AgentConversation.md)[]\> - -Promise resolving to an array of filtered conversations. - -#### Examples - -```typescript -const recentConversations = await base44.agents.listConversations({ - limit: 10, - sort: '-created_date' -}); -``` - -```typescript -// Filter by agent and metadata -const supportConversations = await base44.agents.listConversations({ - q: { - agent_name: 'support-agent', - 'metadata.priority': 'high' - }, - sort: '-created_date', - limit: 20 -}); -``` - -#### See - - - [`getConversations()`](#getconversations) for retrieving all conversations without filtering - - [`getConversation()`](#getconversation) for retrieving a specific conversation by ID - -*** - -### createConversation() - -> **createConversation**(`conversation`): `Promise`\<[`AgentConversation`](AgentConversation.md)\> - -Creates a new conversation with an agent. - -#### Parameters - -##### conversation - -Conversation details including agent name and optional metadata. - -###### agent_name - -`string` - -###### metadata? - -`Record`\<..., ...\> - -#### Returns - -`Promise`\<[`AgentConversation`](AgentConversation.md)\> - -Promise resolving to the created conversation. - -#### Example - -```typescript -const conversation = await base44.agents.createConversation({ - agent_name: 'support-agent', - metadata: { - order_id: 'ORD-789', - product_id: 'PROD-456', - category: 'technical-support' - } -}); -console.log(`Created conversation: ${conversation.id}`); -``` - -*** - -### addMessage() - -> **addMessage**(`conversation`, `message`): `Promise`\<[`AgentMessage`](AgentMessage.md)\> - -Adds a message to a conversation. - -Sends a message to the agent and updates the conversation. This method -also updates the real-time socket to notify any subscribers. - -#### Parameters - -##### conversation - -[`AgentConversation`](AgentConversation.md) - -The conversation to add the message to. - -##### message - -`Partial`\<[`AgentMessage`](AgentMessage.md)\> - -The message to add. - -#### Returns - -`Promise`\<[`AgentMessage`](AgentMessage.md)\> - -Promise resolving to the created message. - -#### Example - -```typescript -// Send a message to the agent -const message = await base44.agents.addMessage(conversation, { - role: 'user', - content: 'Hello, I need help with my order #12345' -}); -console.log(`Message sent with ID: ${message.id}`); -``` - -*** - -### subscribeToConversation() - -> **subscribeToConversation**(`conversationId`, `onUpdate?`): () => `void` - -Subscribes to real-time updates for a conversation. - -Establishes a WebSocket connection to receive instant updates when new -messages are added to the conversation. Returns an unsubscribe function -to clean up the connection. - -#### Parameters - -##### conversationId - -`string` - -The conversation ID to subscribe to. - -##### onUpdate? - -(`conversation`) => `void` - -Callback function called when the conversation is updated. - -#### Returns - -Unsubscribe function to stop receiving updates. - -> (): `void` - -##### Returns - -`void` - -#### Example - -```typescript -// Subscribe to real-time updates -const unsubscribe = base44.agents.subscribeToConversation( - 'conv-123', - (updatedConversation) => { - const latestMessage = updatedConversation.messages[updatedConversation.messages.length - 1]; - console.log('New message:', latestMessage.content); - } -); - -// Later, clean up the subscription -unsubscribe(); -``` - -*** - -### getWhatsAppConnectURL() - -> **getWhatsAppConnectURL**(`agentName`): `string` - -Gets WhatsApp connection URL for an agent. - -Generates a URL that users can use to connect with the agent through WhatsApp. -The URL includes authentication if a token is available. - -#### Parameters - -##### agentName - -`string` - -The name of the agent. - -#### Returns - -`string` - -WhatsApp connection URL. - -#### Example - -```typescript -const whatsappUrl = base44.agents.getWhatsAppConnectURL('support-agent'); -console.log(`Connect through WhatsApp: ${whatsappUrl}`); -// User can open this URL to start a WhatsApp conversation -``` diff --git a/docs/interfaces/AppLogsModule.md b/docs/interfaces/AppLogsModule.md deleted file mode 100644 index 39775e9..0000000 --- a/docs/interfaces/AppLogsModule.md +++ /dev/null @@ -1,196 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AppLogsModule - -App Logs module for tracking and analyzing app usage. - -This module provides methods to log user activity, fetch logs, and retrieve -statistics about the app's usage. Useful for analytics, monitoring, -and understanding user behavior. - -This module is available to use with a client in both user and service role authentication modes: - -- **User authentication** (`base44.appLogs`): Operations are scoped to the currently - authenticated user. For example, `fetchLogs()` returns only logs for the current user, - and `getStats()` returns statistics about that user's activity. - -- **Service role authentication** (`client.asServiceRole.appLogs`): Operations have - elevated permissions and can access data across all users. For example, `fetchLogs()` - returns logs from all users in the app, and `getStats()` returns app-wide - statistics. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. - -## Examples - -```typescript -// Log user visiting a page -await base44.appLogs.logUserInApp('dashboard'); -``` - -```typescript -// Fetch recent logs -const logs = await base44.appLogs.fetchLogs({ - limit: 100, - sort: '-timestamp' -}); -``` - -```typescript -// Get app statistics -const stats = await base44.appLogs.getStats({ - startDate: '2024-01-01', - endDate: '2024-01-31' -}); -``` - -## Methods - -### logUserInApp() - -> **logUserInApp**(`pageName`): `Promise`\<`void`\> - -Log user activity in the app. - -Records when a user visits a specific page or section of the app. -Useful for tracking user navigation patterns and popular features. - -#### Parameters - -##### pageName - -`string` - -Name of the page or section being visited. - -#### Returns - -`Promise`\<`void`\> - -Promise that resolves when the log is recorded. - -#### Examples - -```typescript -// Log page visit -await base44.appLogs.logUserInApp('home'); -await base44.appLogs.logUserInApp('profile'); -await base44.appLogs.logUserInApp('settings'); -``` - -```typescript -// Log specific feature usage -await base44.appLogs.logUserInApp('checkout-page'); -await base44.appLogs.logUserInApp('product-details'); -``` - -*** - -### fetchLogs() - -> **fetchLogs**(`params?`): `Promise`\<`any`\> - -Fetch app logs with optional filtering. - -Retrieves logs of user activity with support for filtering, pagination, -and sorting. Use this to analyze user behavior and app usage patterns. - -#### Parameters - -##### params? - -[`FetchLogsParams`](FetchLogsParams.md) - -Query parameters for filtering logs. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the logs data. - -#### Examples - -```typescript -// Fetch all logs -const allLogs = await base44.appLogs.fetchLogs(); -``` - -```typescript -// Fetch logs with pagination -const recentLogs = await base44.appLogs.fetchLogs({ - limit: 50, - skip: 0, - sort: '-timestamp' -}); -``` - -```typescript -// Fetch logs for a specific page -const dashboardLogs = await base44.appLogs.fetchLogs({ - pageName: 'dashboard' -}); -``` - -```typescript -// Fetch logs within a date range -const periodLogs = await base44.appLogs.fetchLogs({ - startDate: '2024-01-01', - endDate: '2024-01-31' -}); -``` - -*** - -### getStats() - -> **getStats**(`params?`): `Promise`\<`any`\> - -Gets app usage statistics. - -Retrieves aggregated statistics about app usage, such as page views, -active users, and popular features. Useful for dashboards and analytics. - -#### Parameters - -##### params? - -[`GetStatsParams`](GetStatsParams.md) - -Query parameters for filtering and grouping statistics. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the statistics data. - -#### Examples - -```typescript -// Get overall stats -const stats = await base44.appLogs.getStats(); -``` - -```typescript -// Get stats for a specific time period -const monthlyStats = await base44.appLogs.getStats({ - startDate: '2024-01-01', - endDate: '2024-01-31' -}); -``` - -```typescript -// Get stats grouped by page -const pageStats = await base44.appLogs.getStats({ - groupBy: 'page' -}); -``` - -```typescript -// Get daily active users -const dailyStats = await base44.appLogs.getStats({ - period: 'daily', - metric: 'active_users' -}); -``` diff --git a/docs/interfaces/AuthModule.md b/docs/interfaces/AuthModule.md deleted file mode 100644 index 487e1a5..0000000 --- a/docs/interfaces/AuthModule.md +++ /dev/null @@ -1,615 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: AuthModule - -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. - -This module provides comprehensive authentication functionality including: -- Email/password login and registration -- Token management -- User profile access and updates -- Password reset flows -- OTP verification -- User invitations - -The auth module is only available in user authentication mode (`base44.auth`). - -## Examples - -```typescript -// Login with email and password -const { access_token, user } = await base44.auth.loginViaEmailPassword( - 'user@example.com', - 'password123' -); -``` - -```typescript -// Check if user is authenticated -const isAuth = await base44.auth.isAuthenticated(); -``` - -```typescript -// Get current user profile -const currentUser = await base44.auth.me(); -``` - -```typescript -// Logout and reload page -base44.auth.logout(); -``` - -```typescript -// Logout and redirect to login page -base44.auth.logout('/login'); -``` - -## Methods - -### me() - -> **me**(): `Promise`\<[`User`](User.md)\> - -Gets the current authenticated user's information. - -#### Returns - -`Promise`\<[`User`](User.md)\> - -Promise resolving to the user's profile data. - -#### Example - -```typescript -// Get current user information -const user = await base44.auth.me(); -console.log(`Logged in as: ${user.email}`); -console.log(`User ID: ${user.id}`); -``` - -*** - -### updateMe() - -> **updateMe**(`data`): `Promise`\<[`User`](User.md)\> - -Updates the current authenticated user's information. - -Only the fields included in the data object will be updated. -Commonly updated fields include `name`, `avatar_url`, and custom profile fields. - -#### Parameters - -##### data - -`Partial`\<`Omit`\<[`User`](User.md), ... \| ... \| ...\>\> - -Object containing the fields to update. - -#### Returns - -`Promise`\<[`User`](User.md)\> - -Promise resolving to the updated user data. - -#### Examples - -```typescript -// Update specific fields -const updatedUser = await base44.auth.updateMe({ - name: 'John Doe', - avatar_url: 'https://example.com/avatar.jpg' -}); -console.log(`Updated user: ${updatedUser.name}`); -``` - -```typescript -// Update custom fields defined in your User entity -await base44.auth.updateMe({ - bio: 'Software developer', - phone: '+1234567890', - preferences: { theme: 'dark' } -}); -``` - -*** - -### redirectToLogin() - -> **redirectToLogin**(`nextUrl`): `void` - -Redirects the user to the app's login page. - -Redirects with a callback URL to return to after successful authentication. Requires a browser environment and cannot be used in the backend. - -#### Parameters - -##### nextUrl - -`string` - -URL to redirect to after successful login. - -#### Returns - -`void` - -#### Throws - -When not in a browser environment. - -#### Examples - -```typescript -// Redirect to login and come back to current page -base44.auth.redirectToLogin(window.location.href); -``` - -```typescript -// Redirect to login and then go to the dashboard page -base44.auth.redirectToLogin('/dashboard'); -``` - -*** - -### logout() - -> **logout**(`redirectUrl?`): `void` - -Logs out the current user. - -Removes the authentication token from local storage and Axios headers, then optionally redirects to a URL or reloads the page. Requires a browser environment and cannot be used in the backend. - -#### Parameters - -##### redirectUrl? - -`string` - -Optional URL to redirect to after logout. Reloads the page if not provided. - -#### Returns - -`void` - -#### Examples - -```typescript -// Logout and reload page -base44.auth.logout(); -``` - -```typescript -// Logout and redirect to login page -base44.auth.logout('/login'); -``` - -```typescript -// Logout and redirect to home -base44.auth.logout('/'); -``` - -*** - -### setToken() - -> **setToken**(`token`, `saveToStorage?`): `void` - -Sets the authentication token. - -Updates the authorization header for API requests and optionally saves the token to local storage for persistence. Saving to local storage requires a browser environment and is automatically skipped in backend environments. - -#### Parameters - -##### token - -`string` - -JWT authentication token. - -##### saveToStorage? - -`boolean` - -Whether to save the token to local storage. Defaults to true. - -#### Returns - -`void` - -#### Examples - -```typescript -// Set token and save to local storage -base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...'); -``` - -```typescript -// Set token without saving to local storage -base44.auth.setToken('eyJhbGciOiJIUzI1NiIs...', false); -``` - -*** - -### loginViaEmailPassword() - -> **loginViaEmailPassword**(`email`, `password`, `turnstileToken?`): `Promise`\<[`LoginResponse`](LoginResponse.md)\> - -Logs in a registered user using email and password. - -Authenticates a user with email and password credentials. The user must already have a registered account. For new users, use [`register()`](#register) first to create an account. On successful login, automatically sets the token for subsequent requests. - -#### Parameters - -##### email - -`string` - -User's email address. - -##### password - -`string` - -User's password. - -##### turnstileToken? - -`string` - -Optional [Cloudflare Turnstile CAPTCHA token](https://developers.cloudflare.com/turnstile/) for bot protection. - -#### Returns - -`Promise`\<[`LoginResponse`](LoginResponse.md)\> - -Promise resolving to login response with access token and user data. - -#### Throws - -Error if the email and password combination is invalid or the user is not registered. - -#### Examples - -```typescript -try { - const { access_token, user } = await base44.auth.loginViaEmailPassword( - 'user@example.com', - 'securePassword123' - ); - console.log('Login successful!', user); -} catch (error) { - console.error('Login failed:', error); -} -``` - -```typescript -// With captcha token -const response = await base44.auth.loginViaEmailPassword( - 'user@example.com', - 'securePassword123', - 'captcha-token-here' -); -``` - -*** - -### isAuthenticated() - -> **isAuthenticated**(): `Promise`\<`boolean`\> - -Checks if the current user is authenticated. - -#### Returns - -`Promise`\<`boolean`\> - -Promise resolving to true if authenticated, false otherwise. - -#### Example - -```typescript -// Check authentication status -const isAuthenticated = await base44.auth.isAuthenticated(); -if (isAuthenticated) { - console.log('User is logged in'); -} else { - // Redirect to login page - base44.auth.redirectToLogin(window.location.href); -} -``` - -*** - -### inviteUser() - -> **inviteUser**(`userEmail`, `role`): `Promise`\<`any`\> - -Invites a user to the app. - -Sends an invitation email to a potential user with a specific role. -Roles are configured in the app settings and determine -the user's permissions and access levels. - -#### Parameters - -##### userEmail - -`string` - -Email address of the user to invite. - -##### role - -`string` - -Role to assign to the invited user. Must match a role defined in the app. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. - -#### Returns - -`Promise`\<`any`\> - -Promise that resolves when the invitation is sent successfully. Throws an error if the invitation fails. - -#### Example - -```typescript -try { - await base44.auth.inviteUser('newuser@example.com', 'editor'); - console.log('Invitation sent successfully!'); -} catch (error) { - console.error('Failed to send invitation:', error); -} -``` - -*** - -### register() - -> **register**(`payload`): `Promise`\<`any`\> - -Registers a new user account. - -Creates a new user account with email and password. After successful registration, -use [`loginViaEmailPassword()`](#loginviaemailpassword) to log in the user. - -#### Parameters - -##### payload - -[`RegisterPayload`](RegisterPayload.md) - -Registration details including email, password, and optional fields. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the registration response. - -#### Example - -```typescript -// Register a new user -await base44.auth.register({ - email: 'newuser@example.com', - password: 'securePassword123', - referral_code: 'FRIEND2024' -}); - -// Login after registration -const { access_token, user } = await base44.auth.loginViaEmailPassword( - 'newuser@example.com', - 'securePassword123' -); -``` - -*** - -### verifyOtp() - -> **verifyOtp**(`params`): `Promise`\<`any`\> - -Verifies an OTP (One-time password) code. - -Validates an OTP code sent to the user's email during registration -or authentication. - -#### Parameters - -##### params - -[`VerifyOtpParams`](VerifyOtpParams.md) - -Object containing email and OTP code. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the verification response if valid. - -#### Throws - -Error if the OTP code is invalid, expired, or verification fails. - -#### Example - -```typescript -try { - await base44.auth.verifyOtp({ - email: 'user@example.com', - otpCode: '123456' - }); - console.log('Email verified successfully!'); -} catch (error) { - console.error('Invalid or expired OTP code'); -} -``` - -*** - -### resendOtp() - -> **resendOtp**(`email`): `Promise`\<`any`\> - -Resends an OTP code to the user's email address. - -Requests a new OTP code to be sent to the specified email address. - -#### Parameters - -##### email - -`string` - -Email address to send the OTP to. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving when the OTP is sent successfully. - -#### Throws - -Error if the email is invalid or the request fails. - -#### Example - -```typescript -try { - await base44.auth.resendOtp('user@example.com'); - console.log('OTP resent! Please check your email.'); -} catch (error) { - console.error('Failed to resend OTP:', error); -} -``` - -*** - -### resetPasswordRequest() - -> **resetPasswordRequest**(`email`): `Promise`\<`any`\> - -Requests a password reset. - -Sends a password reset email to the specified email address. - -#### Parameters - -##### email - -`string` - -Email address for the account to reset. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving when the password reset email is sent successfully. - -#### Throws - -Error if the email is invalid or the request fails. - -#### Example - -```typescript -try { - await base44.auth.resetPasswordRequest('user@example.com'); - console.log('Password reset email sent!'); -} catch (error) { - console.error('Failed to send password reset email:', error); -} -``` - -*** - -### resetPassword() - -> **resetPassword**(`params`): `Promise`\<`any`\> - -Resets password using a reset token. - -Completes the password reset flow by setting a new password -using the token received by email. - -#### Parameters - -##### params - -[`ResetPasswordParams`](ResetPasswordParams.md) - -Object containing the reset token and new password. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving when the password is reset successfully. - -#### Throws - -Error if the reset token is invalid, expired, or the request fails. - -#### Example - -```typescript -try { - await base44.auth.resetPassword({ - resetToken: 'token-from-email', - newPassword: 'newSecurePassword456' - }); - console.log('Password reset successful!'); -} catch (error) { - console.error('Failed to reset password:', error); -} -``` - -*** - -### changePassword() - -> **changePassword**(`params`): `Promise`\<`any`\> - -Changes the user's password. - -Updates the password for an authenticated user by verifying -the current password and setting a new one. - -#### Parameters - -##### params - -[`ChangePasswordParams`](ChangePasswordParams.md) - -Object containing user ID, current password, and new password. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving when the password is changed successfully. - -#### Throws - -Error if the current password is incorrect or the request fails. - -#### Example - -```typescript -try { - await base44.auth.changePassword({ - userId: 'user-123', - currentPassword: 'oldPassword123', - newPassword: 'newSecurePassword456' - }); - console.log('Password changed successfully!'); -} catch (error) { - console.error('Failed to change password:', error); -} -``` diff --git a/docs/interfaces/Base44Client.md b/docs/interfaces/Base44Client.md deleted file mode 100644 index 36b9d13..0000000 --- a/docs/interfaces/Base44Client.md +++ /dev/null @@ -1,160 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: Base44Client - -The Base44 client instance. - -Provides access to all SDK modules and methods for interacting with the app. - -This is the main client object returned by [`createClient`](../functions/createClient.md) and [`createClientFromRequest`](../functions/createClientFromRequest.md). -It includes all SDK modules and utility methods for managing authentication and configuration. - -## Properties - -### entities - -> **entities**: [`EntitiesModule`](EntitiesModule.md) - -[Entities module](EntitiesModule.md) for CRUD operations on your data models. - -*** - -### integrations - -> **integrations**: [`IntegrationsModule`](IntegrationsModule.md) - -[Integrations module](IntegrationsModule.md) for calling pre-built integration endpoints. - -*** - -### auth - -> **auth**: [`AuthModule`](AuthModule.md) - -[Auth module](AuthModule.md) for user authentication and management. - -*** - -### functions - -> **functions**: [`FunctionsModule`](FunctionsModule.md) - -[Functions module](FunctionsModule.md) for invoking custom backend functions. - -*** - -### agents - -> **agents**: [`AgentsModule`](AgentsModule.md) - -[Agents module](AgentsModule.md) for managing AI agent conversations. - -*** - -### appLogs - -> **appLogs**: [`AppLogsModule`](AppLogsModule.md) - -[App logs module](AppLogsModule.md) for tracking app usage. - -*** - -### cleanup() - -> **cleanup**: () => `void` - -Cleanup function to disconnect WebSocket connections. Call when you're done with the client. - -#### Returns - -`void` - -*** - -### asServiceRole - -> `readonly` **asServiceRole**: `object` - -Provides access to supported modules with elevated permissions. - -Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. - -#### entities - -> **entities**: [`EntitiesModule`](EntitiesModule.md) - -[Entities module](EntitiesModule.md) with elevated permissions. - -#### integrations - -> **integrations**: [`IntegrationsModule`](IntegrationsModule.md) - -[Integrations module](IntegrationsModule.md) with elevated permissions. - -#### sso - -> **sso**: [`SsoModule`](SsoModule.md) - -[SSO module](SsoModule.md) for generating SSO tokens. - -#### connectors - -> **connectors**: [`ConnectorsModule`](ConnectorsModule.md) - -[Connectors module](ConnectorsModule.md) for OAuth token retrieval. - -#### functions - -> **functions**: [`FunctionsModule`](FunctionsModule.md) - -[Functions module](FunctionsModule.md) with elevated permissions. - -#### agents - -> **agents**: [`AgentsModule`](AgentsModule.md) - -[Agents module](AgentsModule.md) with elevated permissions. - -#### appLogs - -> **appLogs**: [`AppLogsModule`](AppLogsModule.md) - -[App logs module](AppLogsModule.md) with elevated permissions. - -#### cleanup() - -> **cleanup**: () => `void` - -Cleanup function to disconnect WebSocket connections. - -##### Returns - -`void` - -#### Throws - -When accessed without providing a serviceToken during client creation - -## Methods - -### setToken() - -> **setToken**(`newToken`): `void` - -Sets a new authentication token for all subsequent requests. - -Updates the token for both HTTP requests and WebSocket connections. - -#### Parameters - -##### newToken - -`string` - -The new authentication token. - -#### Returns - -`void` diff --git a/docs/interfaces/Base44ErrorJSON.md b/docs/interfaces/Base44ErrorJSON.md index bd7f49c..08828a6 100644 --- a/docs/interfaces/Base44ErrorJSON.md +++ b/docs/interfaces/Base44ErrorJSON.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/ChangePasswordParams.md b/docs/interfaces/ChangePasswordParams.md index 3f992be..3ae1fe7 100644 --- a/docs/interfaces/ChangePasswordParams.md +++ b/docs/interfaces/ChangePasswordParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/ConnectorAccessTokenResponse.md b/docs/interfaces/ConnectorAccessTokenResponse.md index f34330a..e07b92b 100644 --- a/docs/interfaces/ConnectorAccessTokenResponse.md +++ b/docs/interfaces/ConnectorAccessTokenResponse.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/ConnectorsModule.md b/docs/interfaces/ConnectorsModule.md deleted file mode 100644 index cae2217..0000000 --- a/docs/interfaces/ConnectorsModule.md +++ /dev/null @@ -1,69 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: ConnectorsModule - -Connectors module for managing OAuth tokens for external services. - -This module allows you to retrieve OAuth access tokens for external services -that the app has connected to. Use these tokens to make API -calls to external services. - -Unlike the integrations module that provides pre-built functions, connectors give you -raw OAuth tokens so you can call external service APIs directly with full control over -the API calls you make. This is useful when you need custom API interactions that aren't -covered by Base44's pre-built integrations. - -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. - -## Example - -```typescript -// Retrieve Google OAuth token and use it to call Google APIs -const response = await base44.asServiceRole.connectors.getAccessToken('google'); -const googleToken = response.access_token; -const calendarResponse = await fetch('https://www.googleapis.com/calendar/v3/calendars/primary/events', { - headers: { 'Authorization': `Bearer ${googleToken}` } -}); -``` - -## Methods - -### getAccessToken() - -> **getAccessToken**(`integrationType`): `Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> - -Retrieves an OAuth access token for a specific external integration type. - -Returns the stored OAuth token for an external service that the app -has connected to. You can then use this token to make authenticated API calls -to that external service. - -#### Parameters - -##### integrationType - -`string` - -The type of integration, such as `'google'`, `'slack'`, or `'github'`. - -#### Returns - -`Promise`\<[`ConnectorAccessTokenResponse`](ConnectorAccessTokenResponse.md)\> - -Promise resolving to the access token response. - -#### Examples - -```typescript -// Get Google OAuth token -const response = await base44.asServiceRole.connectors.getAccessToken('google'); -console.log(response.access_token); -``` - -```typescript -// Get Slack OAuth token -const slackResponse = await base44.asServiceRole.connectors.getAccessToken('slack'); -console.log(slackResponse.access_token); -``` diff --git a/docs/interfaces/CreateClientConfig.md b/docs/interfaces/CreateClientConfig.md index 992b7d7..cb64d36 100644 --- a/docs/interfaces/CreateClientConfig.md +++ b/docs/interfaces/CreateClientConfig.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** @@ -37,6 +37,6 @@ Service role authentication token. Use this in the backend when you need elevate ### options? -> `optional` **options**: [`CreateClientOptions`](CreateClientOptions.md) +> `optional` **options**: [`CreateClientOptions`](CreateClientOptions) Additional client options. diff --git a/docs/interfaces/CreateClientOptions.md b/docs/interfaces/CreateClientOptions.md index 056187f..457d312 100644 --- a/docs/interfaces/CreateClientOptions.md +++ b/docs/interfaces/CreateClientOptions.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/EntitiesModule.md b/docs/interfaces/EntitiesModule.md deleted file mode 100644 index 2bfe7a3..0000000 --- a/docs/interfaces/EntitiesModule.md +++ /dev/null @@ -1,86 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: EntitiesModule - -Entities module for managing app data. - -This module provides dynamic access to all entities in the app. -Each entity gets a handler with full CRUD operations and additional utility methods. - -Entities are accessed dynamically using the pattern: -`base44.entities.EntityName.method()` - -This module is available to use with a client in both user and service role authentication modes: - -- **User authentication** (`base44.entities`): Operations are scoped to the currently - authenticated user's permissions. Access is limited to entities the user has permission to view or modify. - -- **Service role authentication** (`client.asServiceRole.entities`): Operations have - elevated permissions and can access entities across all users. This is useful for admin - operations or workflows that need to operate on data regardless of user permissions. - -## Examples - -```typescript -// List all records -const records = await base44.entities.MyEntity.list(); -``` - -```typescript -// Filter records by field -const activeRecords = await base44.entities.MyEntity.filter({ status: 'active' }); -``` - -```typescript -// Get specific record by ID -const record = await base44.entities.MyEntity.get('entity-123'); -``` - -```typescript -// Create new record -const newRecord = await base44.entities.MyEntity.create({ - name: 'My Item', - status: 'active' -}); -``` - -```typescript -// Update record -await base44.entities.MyEntity.update('entity-123', { status: 'completed' }); -``` - -```typescript -// Delete record -await base44.entities.MyEntity.delete('entity-123'); -``` - -```typescript -// Bulk operations -await base44.entities.MyEntity.bulkCreate([ - { name: 'Item 1' }, - { name: 'Item 2' } -]); -``` - -```typescript -// Delete many -await base44.entities.MyEntity.deleteMany({ status: 'completed' }); -``` - -## Indexable - -\[`entityName`: `string`\]: [`EntityHandler`](EntityHandler.md) - -Access any entity by name. - -Use this to access entities defined in the app. - -### Example - -```typescript -// Access entities dynamically -base44.entities.MyEntity -base44.entities.AnotherEntity -``` diff --git a/docs/interfaces/EntityHandler.md b/docs/interfaces/EntityHandler.md deleted file mode 100644 index 5f57070..0000000 --- a/docs/interfaces/EntityHandler.md +++ /dev/null @@ -1,424 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: EntityHandler - -Entity handler providing CRUD operations for a specific entity type. - -Each entity in the app gets a handler with these methods for managing data. - -## Methods - -### list() - -> **list**(`sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> - -Lists records with optional pagination and sorting. - -Retrieves all records of this type with support for sorting, -pagination, and field selection. - -#### Parameters - -##### sort? - -`string` - -Sort parameter, such as `'-created_date'` for descending. - -##### limit? - -`number` - -Maximum number of results to return. - -##### skip? - -`number` - -Number of results to skip for pagination. - -##### fields? - -`string`[] - -Array of field names to include in the response. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to an array of records. - -#### Examples - -```typescript -// Get all records -const records = await base44.entities.MyEntity.list(); -``` - -```typescript -// Get first 10 records sorted by date -const recentRecords = await base44.entities.MyEntity.list('-created_date', 10); -``` - -```typescript -// Get paginated results -// Skip first 20, get next 10 -const page3 = await base44.entities.MyEntity.list('-created_date', 10, 20); -``` - -```typescript -// Get only specific fields -const fields = await base44.entities.MyEntity.list('-created_date', 10, 0, ['name', 'status']); -``` - -*** - -### filter() - -> **filter**(`query`, `sort?`, `limit?`, `skip?`, `fields?`): `Promise`\<`any`\> - -Filters records based on a query. - -Retrieves records that match specific criteria with support for -sorting, pagination, and field selection. - -#### Parameters - -##### query - -`Record`\<`string`, `any`\> - -Query object with field-value pairs. Each key should be a field name -from your entity schema, and each value is the criteria to match. Records matching all -specified criteria are returned. Field names are case-sensitive. - -##### sort? - -`string` - -Sort parameter, such as `'-created_date'` for descending. - -##### limit? - -`number` - -Maximum number of results to return. - -##### skip? - -`number` - -Number of results to skip for pagination. - -##### fields? - -`string`[] - -Array of field names to include in the response. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to an array of filtered records. - -#### Examples - -```typescript -// Filter by single field -const activeRecords = await base44.entities.MyEntity.filter({ - status: 'active' -}); -``` - -```typescript -// Filter by multiple fields -const filteredRecords = await base44.entities.MyEntity.filter({ - priority: 'high', - status: 'active' -}); -``` - -```typescript -// Filter with sorting and pagination -const results = await base44.entities.MyEntity.filter( - { status: 'active' }, - '-created_date', - 20, - 0 -); -``` - -```typescript -// Filter with specific fields -const fields = await base44.entities.MyEntity.filter( - { priority: 'high' }, - '-created_date', - 10, - 0, - ['name', 'priority'] -); -``` - -*** - -### get() - -> **get**(`id`): `Promise`\<`any`\> - -Gets a single record by ID. - -Retrieves a specific record using its unique identifier. - -#### Parameters - -##### id - -`string` - -The unique identifier of the record. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the record. - -#### Example - -```typescript -// Get record by ID -const record = await base44.entities.MyEntity.get('entity-123'); -console.log(record.name); -``` - -*** - -### create() - -> **create**(`data`): `Promise`\<`any`\> - -Creates a new record. - -Creates a new record with the provided data. - -#### Parameters - -##### data - -`Record`\<`string`, `any`\> - -Object containing the record data. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the created record. - -#### Example - -```typescript -// Create a new record -const newRecord = await base44.entities.MyEntity.create({ - name: 'My Item', - status: 'active', - priority: 'high' -}); -console.log('Created record with ID:', newRecord.id); -``` - -*** - -### update() - -> **update**(`id`, `data`): `Promise`\<`any`\> - -Updates an existing record. - -Updates a record by ID with the provided data. Only the fields -included in the data object will be updated. - -#### Parameters - -##### id - -`string` - -The unique identifier of the record to update. - -##### data - -`Record`\<`string`, `any`\> - -Object containing the fields to update. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the updated record. - -#### Examples - -```typescript -// Update single field -const updated = await base44.entities.MyEntity.update('entity-123', { - status: 'completed' -}); -``` - -```typescript -// Update multiple fields -const updated = await base44.entities.MyEntity.update('entity-123', { - name: 'Updated name', - priority: 'low', - status: 'active' -}); -``` - -*** - -### delete() - -> **delete**(`id`): `Promise`\<`any`\> - -Deletes a single record by ID. - -Permanently removes a record from the database. - -#### Parameters - -##### id - -`string` - -The unique identifier of the record to delete. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the deletion result. - -#### Example - -```typescript -// Delete a record -const result = await base44.entities.MyEntity.delete('entity-123'); -console.log('Deleted:', result); -``` - -*** - -### deleteMany() - -> **deleteMany**(`query`): `Promise`\<`any`\> - -Deletes multiple records matching a query. - -Permanently removes all records that match the provided query. - -#### Parameters - -##### query - -`Record`\<`string`, `any`\> - -Query object with field-value pairs. Each key should be a field name -from your entity schema, and each value is the criteria to match. Records matching all -specified criteria will be deleted. Field names are case-sensitive. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the deletion result. - -#### Example - -```typescript -// Delete by multiple criteria -const result = await base44.entities.MyEntity.deleteMany({ - status: 'completed', - priority: 'low' -}); -console.log('Deleted:', result); -``` - -*** - -### bulkCreate() - -> **bulkCreate**(`data`): `Promise`\<`any`\> - -Creates multiple records in a single request. - -Efficiently creates multiple records at once. This is faster -than creating them individually. - -#### Parameters - -##### data - -`Record`\<`string`, `any`\>[] - -Array of record data objects. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to an array of created records. - -#### Example - -```typescript -// Create multiple records at once -const result = await base44.entities.MyEntity.bulkCreate([ - { name: 'Item 1', status: 'active' }, - { name: 'Item 2', status: 'active' }, - { name: 'Item 3', status: 'completed' } -]); -``` - -*** - -### importEntities() - -> **importEntities**(`file`): `Promise`\<`any`\> - -Imports records from a file. - -Imports records from a file, typically CSV or similar format. -The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. - -#### Parameters - -##### file - -`File` - -File object to import. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the import result. - -#### Example - -```typescript -// Import records from file in React -const handleFileImport = async (event: React.ChangeEvent) => { - const file = event.target.files?.[0]; - if (file) { - const result = await base44.entities.MyEntity.importEntities(file); - console.log(`Imported ${result.count} records`); - } -}; -``` diff --git a/docs/interfaces/FetchLogsParams.md b/docs/interfaces/FetchLogsParams.md index 00bdfa0..44ebe3a 100644 --- a/docs/interfaces/FetchLogsParams.md +++ b/docs/interfaces/FetchLogsParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/FunctionsModule.md b/docs/interfaces/FunctionsModule.md deleted file mode 100644 index e28e5b1..0000000 --- a/docs/interfaces/FunctionsModule.md +++ /dev/null @@ -1,93 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: FunctionsModule - -Functions module for invoking custom backend functions. - -This module allows you to invoke the custom backend functions defined in the app. - -This module is available to use with a client in both user and service role authentication modes: - -- **User authentication** (`base44.functions`): Functions are invoked with the currently - authenticated user's permissions. The function code receives a request with the user's authentication context and can only access data the user has permission to access. - -- **Service role authentication** (`client.asServiceRole.functions`): Functions are invoked - with elevated permissions. The function code receives a request with the service role authentication context and can access data across all users. - -## Examples - -```typescript -// Invoke a function with parameters -const result = await base44.functions.invoke('calculateTotal', { - items: ['item1', 'item2'], - discount: 0.1 -}); -console.log(result.data); -``` - -```typescript -// Invoke with service role -const adminResult = await client.asServiceRole.functions.invoke('adminTask', { - action: 'cleanup' -}); -``` - -## Methods - -### invoke() - -> **invoke**(`functionName`, `data`): `Promise`\<`any`\> - -Invokes a custom backend function by name. - -Calls a custom backend function deployed to the app. -The function receives the provided data as named parameters and returns -the result. If any parameter is a `File` object, the request will automatically be -sent as `multipart/form-data`. Otherwise, it will be sent as JSON. - -#### Parameters - -##### functionName - -`string` - -The name of the function to invoke. - -##### data - -`Record`\<`string`, `any`\> - -An object containing named parameters for the function. - -#### Returns - -`Promise`\<`any`\> - -Promise resolving to the function's response. - -#### Examples - -```typescript -// Basic function call -const result = await base44.functions.invoke('calculateTotal', { - items: ['item1', 'item2'], - discount: 0.1 -}); -console.log(result.data.total); -``` - -```typescript -// Function with file upload in React -const handleFileUpload = async (event: React.ChangeEvent) => { - const file = event.target.files?.[0]; - if (file) { - const processedImage = await base44.functions.invoke('processImage', { - image: file, - filter: 'grayscale', - quality: 80 - }); - } -}; -``` diff --git a/docs/interfaces/GetAccessTokenOptions.md b/docs/interfaces/GetAccessTokenOptions.md index efb1303..33cb042 100644 --- a/docs/interfaces/GetAccessTokenOptions.md +++ b/docs/interfaces/GetAccessTokenOptions.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/GetLoginUrlOptions.md b/docs/interfaces/GetLoginUrlOptions.md index 17afc75..b04cffe 100644 --- a/docs/interfaces/GetLoginUrlOptions.md +++ b/docs/interfaces/GetLoginUrlOptions.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/GetStatsParams.md b/docs/interfaces/GetStatsParams.md index 48813c9..d941e96 100644 --- a/docs/interfaces/GetStatsParams.md +++ b/docs/interfaces/GetStatsParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/IntegrationsModule.md b/docs/interfaces/IntegrationsModule.md deleted file mode 100644 index c26e8f8..0000000 --- a/docs/interfaces/IntegrationsModule.md +++ /dev/null @@ -1,98 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: IntegrationsModule - -Integrations module for calling integration endpoints. - -This module provides access to integration endpoints for interacting with external -services. Integrations are organized into packages. Base44 provides built-in integrations -in the "Core" package, and you can install additional integration packages for other services. - -Unlike the connectors module that gives you raw OAuth tokens, integrations provide -pre-built functions that Base44 executes on your behalf. - -Integration endpoints are accessed dynamically using the pattern: -`base44.integrations.PackageName.EndpointName(params)` - -This module is available to use with a client in both user and service role authentication modes: - -- **User authentication** (`base44.integrations`): Integration endpoints are invoked with the - currently authenticated user's permissions. The endpoints execute with the user's authentication - context and can only access data the user has permission to access. - -- **Service role authentication** (`client.asServiceRole.integrations`): Integration endpoints - are invoked with elevated permissions. The endpoints execute with service role authentication - and can access data across all users. This is useful for admin operations or workflows that - need to operate regardless of user permissions. - -## Examples - -```typescript -// Send email using Core package -const emailResult = await base44.integrations.Core.SendEmail({ - to: 'user@example.com', - subject: 'Hello from Base44', - body: 'This is a test email' -}); -``` - -```typescript -// Upload file using Core package in React -const handleFileUpload = async (event: React.ChangeEvent) => { - const file = event.target.files?.[0]; - if (file) { - const uploadResult = await base44.integrations.Core.UploadFile({ - file: file, - metadata: { type: 'profile-picture' } - }); - } -}; -``` - -```typescript -// Use with service role -const adminEmail = await client.asServiceRole.integrations.Core.SendEmail({ - to: 'admin@example.com', - subject: 'Admin notification', - body: 'System alert' -}); -``` - -## Indexable - -\[`packageName`: `string`\]: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) - -Access to additional integration packages. - -Additional integration packages may be added in the future and will be -accessible using the same pattern as Core. - -## Properties - -### Core - -> **Core**: [`IntegrationPackage`](../type-aliases/IntegrationPackage.md) - -Core package containing built-in Base44 integration functions. - -The core integrations package includes the following functions: -- `InvokeLLM`: Generate text or structured JSON data using AI models. -- `GenerateImage`: Create AI-generated images from text prompts. -- `UploadFile`: Upload files to public storage and get a URL. -- `SendEmail`: Send emails to users. -- `ExtractDataFromUploadedFile`: Extract structured data (CSV, PDF, etc.) from uploaded files. -- `UploadPrivateFile`: Upload files to private storage (requires signed URLs to access). -- `CreateFileSignedUrl`: Generate temporary access links for private files. - -#### Example - -```typescript -// Send an email -await base44.integrations.Core.SendEmail({ - to: 'user@example.com', - subject: 'Welcome', - body: 'Welcome to our app!' -}); -``` diff --git a/docs/interfaces/LoginResponse.md b/docs/interfaces/LoginResponse.md deleted file mode 100644 index f824aa6..0000000 --- a/docs/interfaces/LoginResponse.md +++ /dev/null @@ -1,23 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: LoginResponse - -Response from login endpoints containing user information and access token. - -## Properties - -### access\_token - -> **access\_token**: `string` - -JWT access token for authentication. - -*** - -### user - -> **user**: [`User`](User.md) - -User information. diff --git a/docs/interfaces/ModelFilterParams.md b/docs/interfaces/ModelFilterParams.md index 0212892..aebf2d4 100644 --- a/docs/interfaces/ModelFilterParams.md +++ b/docs/interfaces/ModelFilterParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/RegisterPayload.md b/docs/interfaces/RegisterPayload.md index dc91bc7..94cb054 100644 --- a/docs/interfaces/RegisterPayload.md +++ b/docs/interfaces/RegisterPayload.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/RemoveAccessTokenOptions.md b/docs/interfaces/RemoveAccessTokenOptions.md index e846856..716637e 100644 --- a/docs/interfaces/RemoveAccessTokenOptions.md +++ b/docs/interfaces/RemoveAccessTokenOptions.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/ResetPasswordParams.md b/docs/interfaces/ResetPasswordParams.md index d147243..d83576a 100644 --- a/docs/interfaces/ResetPasswordParams.md +++ b/docs/interfaces/ResetPasswordParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/SaveAccessTokenOptions.md b/docs/interfaces/SaveAccessTokenOptions.md index 4919768..ea3a009 100644 --- a/docs/interfaces/SaveAccessTokenOptions.md +++ b/docs/interfaces/SaveAccessTokenOptions.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/SsoAccessTokenResponse.md b/docs/interfaces/SsoAccessTokenResponse.md index 3c6b6e5..00a0f53 100644 --- a/docs/interfaces/SsoAccessTokenResponse.md +++ b/docs/interfaces/SsoAccessTokenResponse.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/interfaces/SsoModule.md b/docs/interfaces/SsoModule.md deleted file mode 100644 index 57668d4..0000000 --- a/docs/interfaces/SsoModule.md +++ /dev/null @@ -1,54 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: SsoModule - -SSO (Single Sign-On) module for managing SSO authentication. - -This module provides methods for retrieving SSO access tokens for users. -These tokens allow you to authenticate Base44 users with external -systems or services. - -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. - -## Example - -```typescript -// Access SSO module with service role -const response = await base44.asServiceRole.sso.getAccessToken('user_123'); -console.log(response.data.access_token); -``` - -## Methods - -### getAccessToken() - -> **getAccessToken**(`userid`): `Promise`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md)\> - -Gets SSO access token for a specific user. - -Retrieves a Single Sign-On access token that can be used to authenticate -a user with external services or systems. - -#### Parameters - -##### userid - -`string` - -The user ID to get the access token for. - -#### Returns - -`Promise`\<[`SsoAccessTokenResponse`](SsoAccessTokenResponse.md)\> - -Promise resolving to the SSO access token response. - -#### Example - -```typescript -// Get SSO access token for a user -const response = await base44.asServiceRole.sso.getAccessToken('user_123'); -console.log(response.access_token); -``` diff --git a/docs/interfaces/User.md b/docs/interfaces/User.md deleted file mode 100644 index c7d20a7..0000000 --- a/docs/interfaces/User.md +++ /dev/null @@ -1,85 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Interface: User - -An authenticated user. - -## Indexable - -\[`key`: `string`\]: `any` - -Additional custom fields defined in the user schema. Any custom properties added to the user schema in the app will be available here with their configured types and values. - -## Properties - -### id - -> **id**: `string` - -Unique user identifier. - -*** - -### email - -> **email**: `string` - -User's email address. - -*** - -### name? - -> `optional` **name**: `string` - -User's full name. - -*** - -### first\_name? - -> `optional` **first\_name**: `string` - -User's first name. - -*** - -### last\_name? - -> `optional` **last\_name**: `string` - -User's last name. - -*** - -### avatar\_url? - -> `optional` **avatar\_url**: `string` - -URL to user's profile picture. - -*** - -### role? - -> `optional` **role**: `string` - -User's role in the app. Roles are configured in the app settings and determine the user's permissions and access levels. - -*** - -### created\_at? - -> `optional` **created\_at**: `string` - -Timestamp when the user was created. - -*** - -### updated\_at? - -> `optional` **updated\_at**: `string` - -Timestamp when the user was last updated. diff --git a/docs/interfaces/VerifyOtpParams.md b/docs/interfaces/VerifyOtpParams.md index e513b0b..27c6734 100644 --- a/docs/interfaces/VerifyOtpParams.md +++ b/docs/interfaces/VerifyOtpParams.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/type-aliases/ConnectorIntegrationType.md b/docs/type-aliases/ConnectorIntegrationType.md index e7bc906..8bf8d3c 100644 --- a/docs/type-aliases/ConnectorIntegrationType.md +++ b/docs/type-aliases/ConnectorIntegrationType.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/type-aliases/IntegrationEndpointFunction.md b/docs/type-aliases/IntegrationEndpointFunction.md index 42c97fd..9773097 100644 --- a/docs/type-aliases/IntegrationEndpointFunction.md +++ b/docs/type-aliases/IntegrationEndpointFunction.md @@ -1,4 +1,4 @@ -[**@base44/sdk**](../README.md) +[**@base44/sdk**](../README) *** diff --git a/docs/type-aliases/IntegrationPackage.md b/docs/type-aliases/IntegrationPackage.md deleted file mode 100644 index b25c2bb..0000000 --- a/docs/type-aliases/IntegrationPackage.md +++ /dev/null @@ -1,27 +0,0 @@ -[**@base44/sdk**](../README.md) - -*** - -# Type Alias: IntegrationPackage - -> **IntegrationPackage** = `object` - -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. - -## Index Signature - -\[`endpointName`: `string`\]: [`IntegrationEndpointFunction`](IntegrationEndpointFunction.md) - -## Example - -```typescript -// Access endpoints dynamically -const result = await integrations.Core.SendEmail({ - to: 'user@example.com', - subject: 'Hello', - body: 'Message' -}); -``` diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index 4073a27..0cc2609 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -93,7 +93,13 @@ function processLinksInFile(filePath) { // Remove .md and .mdx extensions from markdown links // This handles both relative and absolute paths - const linkRegex = /\[([^\]]+)\]\(([^)]+)(\.mdx?)\)/g; + // Regex breakdown: + // \[([^\]]+)\] : Match [LinkText] + // \( : Match opening ( + // ([^)]+) : Match path (Group 2) + // (\.mdx?)? : Optionally match .md or .mdx extension (Group 3), making it optional to catch links that might have already lost extension or never had it if inconsistent + // \) : Match closing ) + const linkRegex = /\[([^\]]+)\]\(([^)]+?)(\.mdx?)?\)/g; let newContent = content.replace( linkRegex, (match, linkText, linkPath, ext) => { @@ -103,11 +109,17 @@ function processLinksInFile(filePath) { const pathParts = linkPath.split("/"); const filename = pathParts[pathParts.length - 1]; - if (MODULE_RENAMES[filename]) { - pathParts[pathParts.length - 1] = MODULE_RENAMES[filename]; + // If filename has extension, strip it for checking map + const nameWithoutExt = filename.replace(/\.mdx?$/, ""); + + if (MODULE_RENAMES[nameWithoutExt]) { + pathParts[pathParts.length - 1] = MODULE_RENAMES[nameWithoutExt]; linkPath = pathParts.join("/"); } + // Handle relative links that might be missing context (basic cleanup) + // e.g. if linkPath is just "entities" but it should be relative + return `[${linkText}](${linkPath})`; } ); @@ -147,25 +159,42 @@ function performModuleRenames(dir) { path.extname(entry.name) ); + // Check if it's a renamed file or one that needs renaming + // e.g. "EntitiesModule" needs renaming. "entities" might need title update. + + let targetName = nameWithoutExt; + let needsRename = false; + if (MODULE_RENAMES[nameWithoutExt]) { - const newName = MODULE_RENAMES[nameWithoutExt]; - const newPath = path.join(dir, `${newName}.mdx`); // Always use .mdx for new files + targetName = MODULE_RENAMES[nameWithoutExt]; + needsRename = true; + } else if (REVERSE_MODULE_RENAMES[nameWithoutExt]) { + // It's already renamed (e.g. "entities"), but we should ensure title is correct + targetName = nameWithoutExt; + } + + if (needsRename || REVERSE_MODULE_RENAMES[targetName]) { + const newPath = path.join(dir, `${targetName}.mdx`); // Always use .mdx let content = fs.readFileSync(entryPath, "utf-8"); // Update title in frontmatter const titleRegex = /^title:\s*["']?([^"'\n]+)["']?/m; if (titleRegex.test(content)) { - content = content.replace(titleRegex, `title: "${newName}"`); + // Force the title to be the target name + content = content.replace(titleRegex, `title: "${targetName}"`); } - // Write to new path + // Write to new path (if renaming) or overwrite (if just updating title) fs.writeFileSync(newPath, content, "utf-8"); // Delete old file if name is different if (entryPath !== newPath) { fs.unlinkSync(entryPath); - console.log(`Renamed module: ${entry.name} -> ${newName}.mdx`); + console.log(`Renamed module: ${entry.name} -> ${targetName}.mdx`); + } else { + // If we just updated the title in place + // console.log(`Updated title for: ${targetName}`); } } } @@ -546,12 +575,33 @@ function applyAppendedArticles(appendedArticles) { effectiveAppendKey = appendParts.join("/"); } - const appendPath = path.join(CONTENT_DIR, `${effectiveAppendKey}.mdx`); + // Try looking in CONTENT_DIR with .mdx (default) + let appendPath = path.join(CONTENT_DIR, `${effectiveAppendKey}.mdx`); + let foundExtension = ".mdx"; + if (!fs.existsSync(appendPath)) { - console.warn( - `Warning: Appended article not found: ${appendKey} (checked ${effectiveAppendKey}.mdx)` - ); - continue; + // Try .md in CONTENT_DIR + appendPath = path.join(CONTENT_DIR, `${effectiveAppendKey}.md`); + foundExtension = ".md"; + + if (!fs.existsSync(appendPath)) { + // Try looking in DOCS_DIR directly (for un-moved files) + // Assuming the key (e.g. interfaces/EntityHandler) is relative to DOCS_DIR too + appendPath = path.join(DOCS_DIR, `${effectiveAppendKey}.mdx`); + foundExtension = ".mdx"; + + if (!fs.existsSync(appendPath)) { + appendPath = path.join(DOCS_DIR, `${effectiveAppendKey}.md`); + foundExtension = ".md"; + + if (!fs.existsSync(appendPath)) { + console.warn( + `Warning: Appended article not found: ${appendKey} (checked content/ and docs/ roots)` + ); + continue; + } + } + } } const { section, headings } = prepareAppendedSection(appendPath); @@ -561,11 +611,11 @@ function applyAppendedArticles(appendedArticles) { try { fs.unlinkSync(appendPath); console.log( - `Appended ${effectiveAppendKey}.mdx -> ${effectiveHostKey}.mdx` + `Appended ${effectiveAppendKey}${foundExtension} -> ${effectiveHostKey}.mdx` ); } catch (e) { console.warn( - `Warning: Unable to remove appended article ${effectiveAppendKey}.mdx` + `Warning: Unable to remove appended article ${effectiveAppendKey}${foundExtension}` ); } } @@ -597,20 +647,10 @@ function main() { const exposedTypeNames = getTypesToExpose(); // First, perform module renames (EntitiesModule -> entities, etc.) - if (fs.existsSync(CONTENT_DIR)) { - performModuleRenames(CONTENT_DIR); - } else { - performModuleRenames(DOCS_DIR); - } + performModuleRenames(DOCS_DIR); // Process all files (remove suppressed ones and fix links) - // Process content directory specifically - if (fs.existsSync(CONTENT_DIR)) { - processAllFiles(CONTENT_DIR, linkedTypeNames, exposedTypeNames); - } else { - // Fallback to processing entire docs directory - processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); - } + processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); // Append configured articles const appendedArticles = loadAppendedArticlesConfig(); From da38a14ac8d0e30c2b7f25f79de6fa5916f69839 Mon Sep 17 00:00:00 2001 From: Adam Friedmann Date: Mon, 1 Dec 2025 12:28:20 +0200 Subject: [PATCH 16/31] turn off Panel generation, fix headings, CSS for TOCs --- .../file-processing/file-processing.js | 62 ++++++++++++++++++- .../file-processing/styling.css | 6 ++ .../typedoc-plugin/typedoc-mintlify-plugin.js | 10 ++- writing-docs.md | 8 +++ 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index 0cc2609..1949c92 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -30,6 +30,9 @@ const APPENDED_ARTICLES_PATH = path.join( "../appended-articles.json" ); +// Controlled via env var so we can re-enable Panel injection when needed. +const PANELS_ENABLED = process.env.MINTLIFY_INCLUDE_PANELS === "true"; + const MODULE_RENAMES = { AgentsModule: "agents", AppLogsModule: "app-logs", @@ -435,7 +438,7 @@ function normalizeHeadings(content) { if (minLevel === Infinity) { return { content: content.trim(), headings: [] }; } - const baseLevel = 3; // appended section starts at H2, so nested headings start at H3+ + const baseLevel = 2; // clamp appended content so its top-level headings render as H2 const headings = []; const adjusted = lines.map((line) => { const match = line.match(headingRegex); @@ -468,6 +471,9 @@ function ensurePanelSpacing(content) { } function updatePanelWithHeadings(hostContent, headings) { + if (!PANELS_ENABLED) { + return hostContent; + } if (!headings || headings.length === 0) { return ensurePanelSpacing(hostContent); } @@ -563,7 +569,7 @@ function applyAppendedArticles(appendedArticles) { let hostContent = fs.readFileSync(hostPath, "utf-8"); let combinedSections = ""; - const collectedHeadings = []; + const collectedHeadings = PANELS_ENABLED ? [] : null; for (const appendKey of appendList) { // Check if appended file was renamed (unlikely for EntityHandler but good for consistency) @@ -606,7 +612,9 @@ function applyAppendedArticles(appendedArticles) { const { section, headings } = prepareAppendedSection(appendPath); combinedSections += `\n\n${section}`; - collectedHeadings.push(...headings); + if (PANELS_ENABLED && collectedHeadings) { + collectedHeadings.push(...headings); + } try { fs.unlinkSync(appendPath); @@ -630,6 +638,52 @@ function applyAppendedArticles(appendedArticles) { } } +function demoteNonCallableHeadings(content) { + const lines = content.split("\n"); + let inFence = false; + let modified = false; + for (let i = 0; i < lines.length; i++) { + const line = lines[i]; + const trimmed = line.trim(); + if (trimmed.startsWith("```")) { + inFence = !inFence; + continue; + } + if (inFence) { + continue; + } + if (line.startsWith("### ")) { + const headingText = line.slice(4).trim(); + if (!headingText.includes("(")) { + lines[i] = `#### ${headingText}`; + modified = true; + } + } + } + return { content: lines.join("\n"), modified }; +} + +function applyHeadingDemotion(dir) { + if (!fs.existsSync(dir)) return; + const entries = fs.readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const entryPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + applyHeadingDemotion(entryPath); + } else if ( + entry.isFile() && + (entry.name.endsWith(".mdx") || entry.name.endsWith(".md")) + ) { + const content = fs.readFileSync(entryPath, "utf-8"); + const { content: updated, modified } = demoteNonCallableHeadings(content); + if (modified) { + fs.writeFileSync(entryPath, updated, "utf-8"); + console.log(`Adjusted headings: ${path.relative(DOCS_DIR, entryPath)}`); + } + } + } +} + /** * Main function */ @@ -656,6 +710,8 @@ function main() { const appendedArticles = loadAppendedArticlesConfig(); applyAppendedArticles(appendedArticles); + applyHeadingDemotion(DOCS_DIR); + // Clean up the linked types file try { if (fs.existsSync(LINKED_TYPES_FILE)) { diff --git a/scripts/mintlify-post-processing/file-processing/styling.css b/scripts/mintlify-post-processing/file-processing/styling.css index 633a12d..98b0301 100644 --- a/scripts/mintlify-post-processing/file-processing/styling.css +++ b/scripts/mintlify-post-processing/file-processing/styling.css @@ -112,3 +112,9 @@ a:has(code) { text-decoration: none !important; color: #FF8844 !important; /* light orange */ } + +/* Hide nested TOC items on interface pages */ +body:has([data-page-href*="/content/interfaces/"]) .toc li[data-depth]:not([data-depth="1"]) { + display: none !important; +} + diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js index dd846f8..7d3bed8 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js @@ -11,6 +11,9 @@ import { convertFunctionParameters, convertInterfaceMethodParameters, convertCla import { convertFunctionReturns, convertInterfaceMethodReturns, convertClassMethodReturns } from './typedoc-mintlify-returns.js'; import { convertExamplesToCodeGroup, addMintlifyFrontmatter, addHeadingsToCodeGroups } from './typedoc-mintlify-content.js'; +// Shared flag with the post-processing script so Panel output can be toggled. +const PANELS_ENABLED = process.env.MINTLIFY_INCLUDE_PANELS === 'true'; + /** * Plugin load function called by TypeDoc */ @@ -67,7 +70,9 @@ export function load(app) { content = content.replace(/\[([^\]]+)\]\(([^)]+)\.mdx?\)/g, '[$1]($2)'); // 6. Add on-page navigation panel - content = addOnThisPagePanel(content, page); + if (PANELS_ENABLED) { + content = addOnThisPagePanel(content, page); + } // 7. Add frontmatter content = addMintlifyFrontmatter(content, page); @@ -116,6 +121,9 @@ function createWriteLinkedTypesFile(app) { * Insert a Mintlify Panel with links to method headings (###) for type docs */ function addOnThisPagePanel(content, page) { + if (!PANELS_ENABLED) { + return content; + } const links = getPanelLinksForPage(page, content); if (!links || links.length === 0) { return content; diff --git a/writing-docs.md b/writing-docs.md index a94769d..e3a6e38 100644 --- a/writing-docs.md +++ b/writing-docs.md @@ -41,6 +41,14 @@ The file maps the host doc (left side) to one or more articles to append (right When you run `npm run create-docs`, the post-processing script appends each listed article to the host page under a new `##` heading, updates the panel/table-of-contents links, and then deletes the standalone appended files so they no longer appear in navigation. Edit the JSON mapping and rerun the command anytime you want to combine or separate pages. +### Toggle Mintlify Panel output +Both the TypeDoc plugin and the post-processing scripts can insert Mintlify `Panel` components (used for the “On this page” navigation). This behavior is now optional and **disabled by default** so the generated docs contain no panels unless explicitly requested. + +- Leave `MINTLIFY_INCLUDE_PANELS` unset (default) to skip inserting panels anywhere in the pipeline. +- Set `MINTLIFY_INCLUDE_PANELS=true` before running `npm run create-docs` if you want to re-enable the legacy Panel output for a run. + +Because both the TypeDoc plugin and the appended-article merger consult the same environment variable, flipping it on/off controls the entire docs build without needing code changes. + ## Push SDK docs to the Mintlify docs repository After generating and reviewing the docs, you can push them to the `base44/mintlify-docs` repo to deploy them. From da0c93b5437f8ec10e7cbc878a63fb45b9e62d2e Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Tue, 2 Dec 2025 11:19:43 +0200 Subject: [PATCH 17/31] more updates --- docs/README.md | 62 -- docs/classes/Base44Error.md | 97 --- docs/functions/createClient.md | 76 --- docs/functions/createClientFromRequest.md | 51 -- docs/functions/getAccessToken.md | 52 -- docs/functions/getLoginUrl.md | 43 -- docs/functions/removeAccessToken.md | 39 -- docs/functions/saveAccessToken.md | 51 -- docs/interfaces/AgentMessageCustomContext.md | 33 - docs/interfaces/AgentMessageMetadata.md | 31 - docs/interfaces/AgentMessageReasoning.md | 33 - docs/interfaces/AgentMessageToolCall.md | 49 -- docs/interfaces/AgentMessageUsage.md | 25 - docs/interfaces/Base44ErrorJSON.md | 50 -- docs/interfaces/ChangePasswordParams.md | 31 - .../ConnectorAccessTokenResponse.md | 13 - docs/interfaces/CreateClientConfig.md | 42 -- docs/interfaces/CreateClientOptions.md | 25 - docs/interfaces/FetchLogsParams.md | 61 -- docs/interfaces/GetAccessTokenOptions.md | 83 --- docs/interfaces/GetLoginUrlOptions.md | 54 -- docs/interfaces/GetStatsParams.md | 53 -- docs/interfaces/ModelFilterParams.md | 105 --- docs/interfaces/RegisterPayload.md | 39 -- docs/interfaces/RemoveAccessTokenOptions.md | 31 - docs/interfaces/ResetPasswordParams.md | 23 - docs/interfaces/SaveAccessTokenOptions.md | 31 - docs/interfaces/SsoAccessTokenResponse.md | 13 - docs/interfaces/VerifyOtpParams.md | 23 - docs/type-aliases/ConnectorIntegrationType.md | 9 - .../IntegrationEndpointFunction.md | 26 - .../appended-articles.json | 5 +- .../category-map.json | 7 +- .../file-processing/file-processing.js | 91 ++- .../file-processing/styling.css | 26 +- .../typedoc-mintlify-parameters.js | 617 +++++++++++++----- .../typedoc-plugin/typedoc-mintlify-plugin.js | 164 +++-- .../types-to-expose.json | 3 +- src/index.ts | 14 + src/modules/agents.types.ts | 36 - src/modules/app-logs.types.ts | 53 +- src/modules/functions.types.ts | 18 - src/modules/integrations.types.ts | 396 +++++++++-- 43 files changed, 1019 insertions(+), 1765 deletions(-) delete mode 100644 docs/README.md delete mode 100644 docs/classes/Base44Error.md delete mode 100644 docs/functions/createClient.md delete mode 100644 docs/functions/createClientFromRequest.md delete mode 100644 docs/functions/getAccessToken.md delete mode 100644 docs/functions/getLoginUrl.md delete mode 100644 docs/functions/removeAccessToken.md delete mode 100644 docs/functions/saveAccessToken.md delete mode 100644 docs/interfaces/AgentMessageCustomContext.md delete mode 100644 docs/interfaces/AgentMessageMetadata.md delete mode 100644 docs/interfaces/AgentMessageReasoning.md delete mode 100644 docs/interfaces/AgentMessageToolCall.md delete mode 100644 docs/interfaces/AgentMessageUsage.md delete mode 100644 docs/interfaces/Base44ErrorJSON.md delete mode 100644 docs/interfaces/ChangePasswordParams.md delete mode 100644 docs/interfaces/ConnectorAccessTokenResponse.md delete mode 100644 docs/interfaces/CreateClientConfig.md delete mode 100644 docs/interfaces/CreateClientOptions.md delete mode 100644 docs/interfaces/FetchLogsParams.md delete mode 100644 docs/interfaces/GetAccessTokenOptions.md delete mode 100644 docs/interfaces/GetLoginUrlOptions.md delete mode 100644 docs/interfaces/GetStatsParams.md delete mode 100644 docs/interfaces/ModelFilterParams.md delete mode 100644 docs/interfaces/RegisterPayload.md delete mode 100644 docs/interfaces/RemoveAccessTokenOptions.md delete mode 100644 docs/interfaces/ResetPasswordParams.md delete mode 100644 docs/interfaces/SaveAccessTokenOptions.md delete mode 100644 docs/interfaces/SsoAccessTokenResponse.md delete mode 100644 docs/interfaces/VerifyOtpParams.md delete mode 100644 docs/type-aliases/ConnectorIntegrationType.md delete mode 100644 docs/type-aliases/IntegrationEndpointFunction.md diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index a09d52d..0000000 --- a/docs/README.md +++ /dev/null @@ -1,62 +0,0 @@ -**@base44/sdk** - -*** - -# @base44/sdk - -## Classes - -- [Base44Error](classes/Base44Error) - -## Interfaces - -- [CreateClientOptions](interfaces/CreateClientOptions) -- [CreateClientConfig](interfaces/CreateClientConfig) -- [Base44Client](interfaces/Base44Client) -- [AgentMessageReasoning](interfaces/AgentMessageReasoning) -- [AgentMessageToolCall](interfaces/AgentMessageToolCall) -- [AgentMessageUsage](interfaces/AgentMessageUsage) -- [AgentMessageCustomContext](interfaces/AgentMessageCustomContext) -- [AgentMessageMetadata](interfaces/AgentMessageMetadata) -- [AgentConversation](interfaces/AgentConversation) -- [AgentMessage](interfaces/AgentMessage) -- [AgentsModule](interfaces/agents) -- [FetchLogsParams](interfaces/FetchLogsParams) -- [GetStatsParams](interfaces/GetStatsParams) -- [AppLogsModule](interfaces/app-logs) -- [User](interfaces/User) -- [LoginResponse](interfaces/LoginResponse) -- [RegisterPayload](interfaces/RegisterPayload) -- [VerifyOtpParams](interfaces/VerifyOtpParams) -- [ChangePasswordParams](interfaces/ChangePasswordParams) -- [ResetPasswordParams](interfaces/ResetPasswordParams) -- [AuthModule](interfaces/auth) -- [ConnectorAccessTokenResponse](interfaces/ConnectorAccessTokenResponse) -- [ConnectorsModule](interfaces/connectors) -- [EntityHandler](interfaces/EntityHandler) -- [EntitiesModule](interfaces/entities) -- [FunctionsModule](interfaces/functions) -- [IntegrationsModule](interfaces/integrations) -- [SsoAccessTokenResponse](interfaces/SsoAccessTokenResponse) -- [SsoModule](interfaces/sso) -- [ModelFilterParams](interfaces/ModelFilterParams) -- [GetAccessTokenOptions](interfaces/GetAccessTokenOptions) -- [SaveAccessTokenOptions](interfaces/SaveAccessTokenOptions) -- [RemoveAccessTokenOptions](interfaces/RemoveAccessTokenOptions) -- [GetLoginUrlOptions](interfaces/GetLoginUrlOptions) -- [Base44ErrorJSON](interfaces/Base44ErrorJSON) - -## Type Aliases - -- [ConnectorIntegrationType](type-aliases/ConnectorIntegrationType) -- [IntegrationEndpointFunction](type-aliases/IntegrationEndpointFunction) -- [IntegrationPackage](type-aliases/IntegrationPackage) - -## Functions - -- [createClient](functions/createClient) -- [createClientFromRequest](functions/createClientFromRequest) -- [getAccessToken](functions/getAccessToken) -- [saveAccessToken](functions/saveAccessToken) -- [removeAccessToken](functions/removeAccessToken) -- [getLoginUrl](functions/getLoginUrl) diff --git a/docs/classes/Base44Error.md b/docs/classes/Base44Error.md deleted file mode 100644 index 4e52906..0000000 --- a/docs/classes/Base44Error.md +++ /dev/null @@ -1,97 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Class: Base44Error - -Custom error class for Base44 SDK errors. - -This error is thrown when API requests fail. It extends the standard `Error` class and includes additional information about the HTTP status, error code, and response data from the server. - -## Example - -```typescript -try { - await client.entities.Todo.get('invalid-id'); -} catch (error) { - if (error instanceof Base44Error) { - console.error('Status:', error.status); // 404 - console.error('Message:', error.message); // "Not found" - console.error('Code:', error.code); // "NOT_FOUND" - console.error('Data:', error.data); // Full response data - } -} -``` - -## Extends - -- `Error` - -## Properties - -### status - -> **status**: `number` - -HTTP status code of the error. - -*** - -### code - -> **code**: `string` - -Error code from the API. - -*** - -### data - -> **data**: `any` - -Full response data from the server containing error details. - -*** - -### originalError - -> **originalError**: `unknown` - -The original error object from Axios. - -## Methods - -### toJSON() - -> **toJSON**(): [`Base44ErrorJSON`](../interfaces/Base44ErrorJSON) - -Serializes the error to a JSON-safe object. - -Useful for logging or sending error information to external services -without circular reference issues. - -#### Returns - -[`Base44ErrorJSON`](../interfaces/Base44ErrorJSON) - -JSON-safe representation of the error. - -#### Example - -```typescript -try { - await client.entities.Todo.get('invalid-id'); -} catch (error) { - if (error instanceof Base44Error) { - const json = error.toJSON(); - console.log(json); - // { - // name: "Base44Error", - // message: "Not found", - // status: 404, - // code: "NOT_FOUND", - // data: { ... } - // } - } -} -``` diff --git a/docs/functions/createClient.md b/docs/functions/createClient.md deleted file mode 100644 index 32dbe05..0000000 --- a/docs/functions/createClient.md +++ /dev/null @@ -1,76 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: createClient() - -> **createClient**(`config`): [`Base44Client`](../interfaces/Base44Client) - -Creates a Base44 SDK client instance. - -This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as [`entities`](../interfaces/entities), [`auth`](../interfaces/auth), and [`functions`](../interfaces/functions). - -The client supports two authentication modes: -- **User authentication** (default): Access modules with user-level permissions using `base44.moduleName`. -- **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. - -For example, when using the [`entities`](../interfaces/entities) module with user authentication you'll only have access to the current user's data. With service role authentication, you'll have access to all data across the entire app. - -Most modules are available in both modes, but with different permission levels. However, some modules are only available in one authentication mode. - -To use the service role authentication mode, you need to provide a service role token when creating the client. This token should be kept secret and never exposed in the app's frontend. - -## Parameters - -### config - -[`CreateClientConfig`](../interfaces/CreateClientConfig) - -Configuration object for the client. - -## Returns - -[`Base44Client`](../interfaces/Base44Client) - -A configured Base44 client instance with access to all SDK modules. - -## Examples - -```typescript -// Basic client setup -import { createClient } from '@base44/client-sdk'; - -const base44 = createClient({ - appId: 'my-app-id' -}); - -// Use client modules -const products = await base44.entities.Products.list(); -const user = await base44.auth.me(); -``` - -```typescript -// Client with service role access -const base44 = createClient({ - appId: 'my-app-id', - token: 'user-token', - serviceToken: 'service-role-token' -}); - -// Access service-role-only modules -const ssoToken = await base44.asServiceRole.sso.getAccessToken('user-123'); -const oauthToken = await base44.asServiceRole.connectors.getAccessToken('google'); -``` - -```typescript -// Client with error handling -const base44 = createClient({ - appId: 'my-app-id', - options: { - onError: (error) => { - console.error('API Error:', error); - Sentry.captureException(error); - } - } -}); -``` diff --git a/docs/functions/createClientFromRequest.md b/docs/functions/createClientFromRequest.md deleted file mode 100644 index b759fb1..0000000 --- a/docs/functions/createClientFromRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: createClientFromRequest() - -> **createClientFromRequest**(`request`): [`Base44Client`](../interfaces/Base44Client) - -Creates a Base44 client from an HTTP request. - -Creates a client by automatically extracting authentication tokens and configuration from an incoming HTTP request with authentication information in its headers. Use this function in backend environments, such as when building backend functions. Base44 inserts the necessary headers when forwarding requests from the app's frontend to the backend functions. - -## Parameters - -### request - -`Request` - -The incoming HTTP request object containing Base44 authentication headers. - -## Returns - -[`Base44Client`](../interfaces/Base44Client) - -A configured Base44 client instance with authentication from the incoming request. - -## Example - -```typescript -// Frontend call to a backend function -const response = await base44.functions.invoke('myBackendFunction', {}); - -// Backend function that receives the call -import { createClientFromRequest } from '@base44/client-sdk'; - -Deno.serve(async (req) => { - try { - const base44 = createClientFromRequest(req); - const user = await base44.auth.me(); - - if (!user) { - return Response.json({ error: 'Unauthorized' }, { status: 401 }); - } - - // Use the client to make API calls - - } catch (error) { - return Response.json({ error: error.message }, { status: 500 }); - } -}); -``` diff --git a/docs/functions/getAccessToken.md b/docs/functions/getAccessToken.md deleted file mode 100644 index bc4abb8..0000000 --- a/docs/functions/getAccessToken.md +++ /dev/null @@ -1,52 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: getAccessToken() - -> **getAccessToken**(`options`): `string` \| `null` - -Retrieves an access token from URL parameters or local storage. - -Low-level utility for manually retrieving tokens. In most cases, the Base44 client handles -token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and cannot be used in the backend. - -## Parameters - -### options - -[`GetAccessTokenOptions`](../interfaces/GetAccessTokenOptions) = `{}` - -Configuration options for token retrieval. - -## Returns - -`string` \| `null` - -The access token string if found, null otherwise. - -## Examples - -```typescript -// Get access token from URL or local storage -const token = getAccessToken(); - -if (token) { - console.log('User is authenticated'); -} else { - console.log('No token found, redirect to login'); -} -``` - -```typescript -// Get access token from custom local storage key -const token = getAccessToken({ storageKey: 'my_app_token' }); -``` - -```typescript -// Get access token from URL but don't save or remove it -const token = getAccessToken({ - saveToStorage: false, - removeFromUrl: false -}); -``` diff --git a/docs/functions/getLoginUrl.md b/docs/functions/getLoginUrl.md deleted file mode 100644 index 79df4c4..0000000 --- a/docs/functions/getLoginUrl.md +++ /dev/null @@ -1,43 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: getLoginUrl() - -> **getLoginUrl**(`nextUrl`, `options`): `string` - -Constructs the absolute URL for the login page with a redirect parameter. - -Low-level utility for building login URLs. For standard login redirects, use [`base44.auth.redirectToLogin()`](../interfaces/AuthModule.md#redirecttologin) instead, which handles this automatically. This function is useful when you need to construct login URLs without a client instance or for custom authentication flows. - -## Parameters - -### nextUrl - -`string` - -The URL to redirect to after successful login. - -### options - -[`GetLoginUrlOptions`](../interfaces/GetLoginUrlOptions) - -Configuration options. - -## Returns - -`string` - -The complete login URL with encoded redirect parameters. - -## Example - -```typescript -// Redirect to login page -const loginUrl = getLoginUrl('/dashboard', { - serverUrl: 'https://base44.app', - appId: 'my-app-123' -}); -window.location.href = loginUrl; -// User will be redirected back to /dashboard after login -``` diff --git a/docs/functions/removeAccessToken.md b/docs/functions/removeAccessToken.md deleted file mode 100644 index ea028e6..0000000 --- a/docs/functions/removeAccessToken.md +++ /dev/null @@ -1,39 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: removeAccessToken() - -> **removeAccessToken**(`options`): `boolean` - -Removes the access token from local storage. - -Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use [`base44.auth.logout()`](../interfaces/AuthModule.md#logout) instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. - -## Parameters - -### options - -[`RemoveAccessTokenOptions`](../interfaces/RemoveAccessTokenOptions) - -Configuration options for token removal. - -## Returns - -`boolean` - -Returns `true` if the token was removed successfully, `false` otherwise. - -## Examples - -```typescript -// Remove custom token key -const success = removeAccessToken({ - storageKey: 'my_custom_token_key' -}); -``` - -```typescript -// Standard logout flow with token removal and redirect -base44.auth.logout('/login'); -``` diff --git a/docs/functions/saveAccessToken.md b/docs/functions/saveAccessToken.md deleted file mode 100644 index 3bb821f..0000000 --- a/docs/functions/saveAccessToken.md +++ /dev/null @@ -1,51 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Function: saveAccessToken() - -> **saveAccessToken**(`token`, `options`): `boolean` - -Saves an access token to local storage. - -Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and cannot be used in the backend. - -## Parameters - -### token - -`string` - -The access token string to save. - -### options - -[`SaveAccessTokenOptions`](../interfaces/SaveAccessTokenOptions) - -Configuration options for saving the token. - -## Returns - -`boolean` - -Returns`true` if the token was saved successfully, `false` otherwise. - -## Examples - -```typescript -// Save access token after login -const response = await base44.auth.loginViaEmailPassword(email, password); -const success = saveAccessToken(response.access_token, {}); - -if (success) { - console.log('User is now authenticated'); - // Token is now available for future page loads -} -``` - -```typescript -// Save access token to local storage using custom key -const success = saveAccessToken(token, { - storageKey: `my_custom_token_key` -}); -``` diff --git a/docs/interfaces/AgentMessageCustomContext.md b/docs/interfaces/AgentMessageCustomContext.md deleted file mode 100644 index 4e3ba68..0000000 --- a/docs/interfaces/AgentMessageCustomContext.md +++ /dev/null @@ -1,33 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: AgentMessageCustomContext - -Custom context provided with an agent message. - -Additional contextual information that can be passed to the agent. - -## Properties - -### message - -> **message**: `string` - -Context message. - -*** - -### data - -> **data**: `Record`\<`string`, `any`\> - -Associated data for the context. - -*** - -### type - -> **type**: `string` - -Type of context. diff --git a/docs/interfaces/AgentMessageMetadata.md b/docs/interfaces/AgentMessageMetadata.md deleted file mode 100644 index d14cd2a..0000000 --- a/docs/interfaces/AgentMessageMetadata.md +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: AgentMessageMetadata - -Metadata about when and by whom a message was created. - -## Properties - -### created\_date - -> **created\_date**: `string` - -When the message was created. - -*** - -### created\_by\_email - -> **created\_by\_email**: `string` - -Email of the user who created the message. - -*** - -### created\_by\_full\_name - -> **created\_by\_full\_name**: `string` \| `null` - -Full name of the user who created the message. diff --git a/docs/interfaces/AgentMessageReasoning.md b/docs/interfaces/AgentMessageReasoning.md deleted file mode 100644 index a3a8c92..0000000 --- a/docs/interfaces/AgentMessageReasoning.md +++ /dev/null @@ -1,33 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: AgentMessageReasoning - -Reasoning information for an agent message. - -Contains details about the agent's reasoning process when generating a response. - -## Properties - -### start\_date - -> **start\_date**: `string` - -When reasoning started. - -*** - -### end\_date? - -> `optional` **end\_date**: `string` - -When reasoning ended. - -*** - -### content - -> **content**: `string` - -Reasoning content. diff --git a/docs/interfaces/AgentMessageToolCall.md b/docs/interfaces/AgentMessageToolCall.md deleted file mode 100644 index ca5ddb4..0000000 --- a/docs/interfaces/AgentMessageToolCall.md +++ /dev/null @@ -1,49 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: AgentMessageToolCall - -A tool call made by the agent. - -Represents a function or tool that the agent invoked during message generation. - -## Properties - -### id - -> **id**: `string` - -Tool call ID. - -*** - -### name - -> **name**: `string` - -Name of the tool called. - -*** - -### arguments\_string - -> **arguments\_string**: `string` - -Arguments passed to the tool as JSON string. - -*** - -### status - -> **status**: `"error"` \| `"running"` \| `"success"` \| `"stopped"` - -Status of the tool call. - -*** - -### results? - -> `optional` **results**: `string` \| `null` - -Results from the tool call. diff --git a/docs/interfaces/AgentMessageUsage.md b/docs/interfaces/AgentMessageUsage.md deleted file mode 100644 index 3339d09..0000000 --- a/docs/interfaces/AgentMessageUsage.md +++ /dev/null @@ -1,25 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: AgentMessageUsage - -Token usage statistics for an agent message. - -Tracks the number of tokens consumed when generating the message. - -## Properties - -### prompt\_tokens? - -> `optional` **prompt\_tokens**: `number` - -Number of tokens in the prompt. - -*** - -### completion\_tokens? - -> `optional` **completion\_tokens**: `number` - -Number of tokens in the completion. diff --git a/docs/interfaces/Base44ErrorJSON.md b/docs/interfaces/Base44ErrorJSON.md deleted file mode 100644 index 08828a6..0000000 --- a/docs/interfaces/Base44ErrorJSON.md +++ /dev/null @@ -1,50 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: Base44ErrorJSON - -JSON representation of a Base44Error. - -This is the structure returned by [`Base44Error.toJSON()`](../classes/Base44Error.md#tojson). -Useful for logging or sending error information to external services. - -## Properties - -### name - -> **name**: `string` - -The error name, always "Base44Error". - -*** - -### message - -> **message**: `string` - -Human-readable error message. - -*** - -### status - -> **status**: `number` - -HTTP status code of the error. - -*** - -### code - -> **code**: `string` - -Error code from the API. - -*** - -### data - -> **data**: `any` - -Full response data from the server containing error details. diff --git a/docs/interfaces/ChangePasswordParams.md b/docs/interfaces/ChangePasswordParams.md deleted file mode 100644 index 3ae1fe7..0000000 --- a/docs/interfaces/ChangePasswordParams.md +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: ChangePasswordParams - -Parameters for changing a user's password. - -## Properties - -### userId - -> **userId**: `string` - -User ID. - -*** - -### currentPassword - -> **currentPassword**: `string` - -Current password for verification. - -*** - -### newPassword - -> **newPassword**: `string` - -New password to set. diff --git a/docs/interfaces/ConnectorAccessTokenResponse.md b/docs/interfaces/ConnectorAccessTokenResponse.md deleted file mode 100644 index e07b92b..0000000 --- a/docs/interfaces/ConnectorAccessTokenResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: ConnectorAccessTokenResponse - -Response from the connectors access token endpoint. - -## Properties - -### access\_token - -> **access\_token**: `string` diff --git a/docs/interfaces/CreateClientConfig.md b/docs/interfaces/CreateClientConfig.md deleted file mode 100644 index cb64d36..0000000 --- a/docs/interfaces/CreateClientConfig.md +++ /dev/null @@ -1,42 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: CreateClientConfig - -Configuration for creating a Base44 client. - -## Properties - -### appId - -> **appId**: `string` - -The Base44 app ID. - -You can find the `appId` in the browser URL when you're in the app editor. -It's the string between `/apps/` and `/editor/`. - -*** - -### token? - -> `optional` **token**: `string` - -User authentication token. Use this in the frontend when you want to authenticate as a specific user. - -*** - -### serviceToken? - -> `optional` **serviceToken**: `string` - -Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. - -*** - -### options? - -> `optional` **options**: [`CreateClientOptions`](CreateClientOptions) - -Additional client options. diff --git a/docs/interfaces/CreateClientOptions.md b/docs/interfaces/CreateClientOptions.md deleted file mode 100644 index 457d312..0000000 --- a/docs/interfaces/CreateClientOptions.md +++ /dev/null @@ -1,25 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: CreateClientOptions - -Options for creating a Base44 client. - -## Properties - -### onError()? - -> `optional` **onError**: (`error`) => `void` - -Optional error handler that will be called whenever an API error occurs. - -#### Parameters - -##### error - -`Error` - -#### Returns - -`void` diff --git a/docs/interfaces/FetchLogsParams.md b/docs/interfaces/FetchLogsParams.md deleted file mode 100644 index 44ebe3a..0000000 --- a/docs/interfaces/FetchLogsParams.md +++ /dev/null @@ -1,61 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: FetchLogsParams - -Parameters for fetching app logs. - -## Indexable - -\[`key`: `string`\]: `any` - -Additional filter parameters. - -## Properties - -### limit? - -> `optional` **limit**: `number` - -Maximum number of logs to return. - -*** - -### skip? - -> `optional` **skip**: `number` - -Number of logs to skip for pagination. - -*** - -### sort? - -> `optional` **sort**: `string` - -Sort order, such as `'-timestamp'` for descending by timestamp. - -*** - -### pageName? - -> `optional` **pageName**: `string` - -Filter logs by page name. - -*** - -### startDate? - -> `optional` **startDate**: `string` - -Filter logs from this date as an ISO string. - -*** - -### endDate? - -> `optional` **endDate**: `string` - -Filter logs until this date as an ISO string. diff --git a/docs/interfaces/GetAccessTokenOptions.md b/docs/interfaces/GetAccessTokenOptions.md deleted file mode 100644 index 33cb042..0000000 --- a/docs/interfaces/GetAccessTokenOptions.md +++ /dev/null @@ -1,83 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: GetAccessTokenOptions - -Configuration options for retrieving an access token. - -## Examples - -```typescript -// Get access token from URL or local storage using default options -const token = getAccessToken(); -``` - -```typescript -// Get access token from custom local storage key -const token = getAccessToken({ storageKey: 'my_app_token' }); -``` - -```typescript -// Get token from URL but don't save or remove from URL -const token = getAccessToken({ - saveToStorage: false, - removeFromUrl: false -}); -``` - -## Properties - -### storageKey? - -> `optional` **storageKey**: `string` - -The key to use when storing or retrieving the token in local storage. - -#### Default - -```ts -'base44_access_token' -``` - -*** - -### paramName? - -> `optional` **paramName**: `string` - -The URL parameter name to check for the access token. - -#### Default - -```ts -'access_token' -``` - -*** - -### saveToStorage? - -> `optional` **saveToStorage**: `boolean` - -Whether to save the token to local storage if found in the URL. - -#### Default - -```ts -true -``` - -*** - -### removeFromUrl? - -> `optional` **removeFromUrl**: `boolean` - -Whether to remove the token from the URL after retrieval for security. - -#### Default - -```ts -true -``` diff --git a/docs/interfaces/GetLoginUrlOptions.md b/docs/interfaces/GetLoginUrlOptions.md deleted file mode 100644 index b04cffe..0000000 --- a/docs/interfaces/GetLoginUrlOptions.md +++ /dev/null @@ -1,54 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: GetLoginUrlOptions - -Configuration options for constructing a login URL. - -## Example - -```typescript -const loginUrl = getLoginUrl('/dashboard', { - serverUrl: 'https://base44.app', - appId: 'my-app-123' -}); -// Returns: 'https://base44.app/login?from_url=%2Fdashboard&app_id=my-app-123' - -// Custom login path -const loginUrl = getLoginUrl('/dashboard', { - serverUrl: 'https://base44.app', - appId: 'my-app-123', - loginPath: '/auth/login' -}); -``` - -## Properties - -### serverUrl - -> **serverUrl**: `string` - -The base server URL (e.g., 'https://base44.app'). - -*** - -### appId - -> **appId**: `string` - -The app ID. - -*** - -### loginPath? - -> `optional` **loginPath**: `string` - -The path to the login endpoint. - -#### Default - -```ts -'/login' -``` diff --git a/docs/interfaces/GetStatsParams.md b/docs/interfaces/GetStatsParams.md deleted file mode 100644 index d941e96..0000000 --- a/docs/interfaces/GetStatsParams.md +++ /dev/null @@ -1,53 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: GetStatsParams - -Parameters for fetching app statistics. - -## Indexable - -\[`key`: `string`\]: `any` - -Additional query parameters. - -## Properties - -### startDate? - -> `optional` **startDate**: `string` - -Filter stats from this date as an ISO string. - -*** - -### endDate? - -> `optional` **endDate**: `string` - -Filter stats until this date as an ISO string. - -*** - -### groupBy? - -> `optional` **groupBy**: `string` - -Group statistics by a specific field, such as `'page'`. - -*** - -### period? - -> `optional` **period**: `string` - -Time period for grouping, such as `'daily'`, `'weekly'`, or `'monthly'`. - -*** - -### metric? - -> `optional` **metric**: `string` - -Specific metric to retrieve, such as `'active_users'` or `'page_views'`. diff --git a/docs/interfaces/ModelFilterParams.md b/docs/interfaces/ModelFilterParams.md deleted file mode 100644 index aebf2d4..0000000 --- a/docs/interfaces/ModelFilterParams.md +++ /dev/null @@ -1,105 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: ModelFilterParams - -Parameters for filtering, sorting, and paginating agent model data. - -Used in the agents module for querying agent conversations. Provides a structured way to specify query criteria, sorting, pagination, and field selection. - -## Examples - -```typescript -// Filter conversations by agent name -const conversations = await base44.agents.listConversations({ - q: { agent_name: 'support-bot' } -}); -``` - -```typescript -// Filter conversations with sorting -const conversations = await base44.agents.listConversations({ - q: { status: 'active' }, - sort: '-created_at' // Sort by created_at descending -}); -``` - -```typescript -// Filter conversations with pagination -const conversations = await base44.agents.listConversations({ - q: { agent_name: 'support-bot' }, - limit: 20, // Get 20 results - skip: 40 // Skip first 40 (page 3) -}); -``` - -```typescript -// Filter conversations with field selection -const conversations = await base44.agents.listConversations({ - q: { status: 'active' }, - fields: ['id', 'agent_name', 'created_at'] -}); -``` - -```typescript -// Filter conversations with multiple filters -const conversations = await base44.agents.listConversations({ - q: { - agent_name: 'support-bot', - 'metadata.priority': 'high', - status: 'active' - }, - sort: '-updated_at', - limit: 50, - skip: 0 -}); -``` - -## Properties - -### q? - -> `optional` **q**: `Record`\<`string`, `any`\> - -Query object with field-value pairs for filtering. - -*** - -### sort? - -> `optional` **sort**: `string` \| `null` - -Sort parameter. For example, "-created_date" for descending order. - -*** - -### sort\_by? - -> `optional` **sort\_by**: `string` \| `null` - -Alternative sort parameter. Use either `sort` or `sort_by`. - -*** - -### limit? - -> `optional` **limit**: `number` \| `null` - -Maximum number of results to return. - -*** - -### skip? - -> `optional` **skip**: `number` \| `null` - -Number of results to skip. Used for pagination. - -*** - -### fields? - -> `optional` **fields**: `string`[] \| `null` - -Array of field names to include in the response. diff --git a/docs/interfaces/RegisterPayload.md b/docs/interfaces/RegisterPayload.md deleted file mode 100644 index 94cb054..0000000 --- a/docs/interfaces/RegisterPayload.md +++ /dev/null @@ -1,39 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: RegisterPayload - -Payload for user registration. - -## Properties - -### email - -> **email**: `string` - -User's email address. - -*** - -### password - -> **password**: `string` - -User's password. - -*** - -### turnstile\_token? - -> `optional` **turnstile\_token**: `string` \| `null` - -Optional [Cloudflare Turnstile CAPTCHA token](https://developers.cloudflare.com/turnstile/) for bot protection. - -*** - -### referral\_code? - -> `optional` **referral\_code**: `string` \| `null` - -Optional [referral code](https://docs.base44.com/Getting-Started/Referral-program) from an existing user. diff --git a/docs/interfaces/RemoveAccessTokenOptions.md b/docs/interfaces/RemoveAccessTokenOptions.md deleted file mode 100644 index 716637e..0000000 --- a/docs/interfaces/RemoveAccessTokenOptions.md +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: RemoveAccessTokenOptions - -Configuration options for removing an access token. - -## Example - -```typescript -// Remove token from default storage key -removeAccessToken({}); - -// Remove token from custom storage key -removeAccessToken({ storageKey: 'my_app_token' }); -``` - -## Properties - -### storageKey? - -> `optional` **storageKey**: `string` - -The key to use when removing the token from local storage. - -#### Default - -```ts -'base44_access_token' -``` diff --git a/docs/interfaces/ResetPasswordParams.md b/docs/interfaces/ResetPasswordParams.md deleted file mode 100644 index d83576a..0000000 --- a/docs/interfaces/ResetPasswordParams.md +++ /dev/null @@ -1,23 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: ResetPasswordParams - -Parameters for resetting a password with a token. - -## Properties - -### resetToken - -> **resetToken**: `string` - -Reset token received by email. - -*** - -### newPassword - -> **newPassword**: `string` - -New password to set. diff --git a/docs/interfaces/SaveAccessTokenOptions.md b/docs/interfaces/SaveAccessTokenOptions.md deleted file mode 100644 index ea3a009..0000000 --- a/docs/interfaces/SaveAccessTokenOptions.md +++ /dev/null @@ -1,31 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: SaveAccessTokenOptions - -Configuration options for saving an access token. - -## Example - -```typescript -// Use default storage key -saveAccessToken('my-token-123', {}); - -// Use custom storage key -saveAccessToken('my-token-123', { storageKey: 'my_app_token' }); -``` - -## Properties - -### storageKey? - -> `optional` **storageKey**: `string` - -The key to use when storing the token in local storage. - -#### Default - -```ts -'base44_access_token' -``` diff --git a/docs/interfaces/SsoAccessTokenResponse.md b/docs/interfaces/SsoAccessTokenResponse.md deleted file mode 100644 index 00a0f53..0000000 --- a/docs/interfaces/SsoAccessTokenResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: SsoAccessTokenResponse - -Response from SSO access token endpoint. - -## Properties - -### access\_token - -> **access\_token**: `string` diff --git a/docs/interfaces/VerifyOtpParams.md b/docs/interfaces/VerifyOtpParams.md deleted file mode 100644 index 27c6734..0000000 --- a/docs/interfaces/VerifyOtpParams.md +++ /dev/null @@ -1,23 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Interface: VerifyOtpParams - -Parameters for OTP verification. - -## Properties - -### email - -> **email**: `string` - -User's email address. - -*** - -### otpCode - -> **otpCode**: `string` - -One-time password code received by email. diff --git a/docs/type-aliases/ConnectorIntegrationType.md b/docs/type-aliases/ConnectorIntegrationType.md deleted file mode 100644 index 8bf8d3c..0000000 --- a/docs/type-aliases/ConnectorIntegrationType.md +++ /dev/null @@ -1,9 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Type Alias: ConnectorIntegrationType - -> **ConnectorIntegrationType** = `string` - -The type of external integration/connector, such as `'google'`, `'slack'`, or `'github'`. diff --git a/docs/type-aliases/IntegrationEndpointFunction.md b/docs/type-aliases/IntegrationEndpointFunction.md deleted file mode 100644 index 9773097..0000000 --- a/docs/type-aliases/IntegrationEndpointFunction.md +++ /dev/null @@ -1,26 +0,0 @@ -[**@base44/sdk**](../README) - -*** - -# Type Alias: IntegrationEndpointFunction() - -> **IntegrationEndpointFunction** = (`data`) => `Promise`\<`any`\> - -Function signature for calling an integration endpoint. - -If any parameter is a `File` object, the request will automatically be -sent as `multipart/form-data`. Otherwise, it will be sent as JSON. - -## Parameters - -### data - -`Record`\<`string`, `any`\> - -An object containing named parameters for the integration endpoint. - -## Returns - -`Promise`\<`any`\> - -Promise resolving to the integration endpoint's response. diff --git a/scripts/mintlify-post-processing/appended-articles.json b/scripts/mintlify-post-processing/appended-articles.json index 33255ae..100bcc4 100644 --- a/scripts/mintlify-post-processing/appended-articles.json +++ b/scripts/mintlify-post-processing/appended-articles.json @@ -1,5 +1,4 @@ { - "interfaces/EntitiesModule": "interfaces/EntityHandler" + "interfaces/EntitiesModule": "interfaces/EntityHandler", + "type-aliases/integrations": "interfaces/CoreIntegrations" } - - diff --git a/scripts/mintlify-post-processing/category-map.json b/scripts/mintlify-post-processing/category-map.json index 825d489..bab74cd 100644 --- a/scripts/mintlify-post-processing/category-map.json +++ b/scripts/mintlify-post-processing/category-map.json @@ -1,4 +1,5 @@ { - "functions": "Client", - "interfaces": "Modules" -} \ No newline at end of file + "functions": "Client", + "interfaces": "Modules", + "type-aliases": "Modules" +} diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index 1949c92..0dbf44a 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -94,6 +94,62 @@ function processLinksInFile(filePath) { let content = fs.readFileSync(filePath, "utf-8"); let modified = false; + // Remove undesirable lines like "> **IntegrationsModule** = `object` & `object`" + // This typically appears in type alias files using intersection types + const typeDefinitionRegex = /^> \*\*\w+\*\* = `object` & `object`\s*$/m; + if (typeDefinitionRegex.test(content)) { + content = content.replace(typeDefinitionRegex, ""); + modified = true; + } + + // Manually add Indexable section if missing for IntegrationsModule + if ( + filePath.includes("integrations.mdx") && + !content.includes("## Indexable") + ) { + const indexableSection = ` +## Indexable + +\\[\`packageName\`: \`string\`\\]: [\`IntegrationPackage\`](IntegrationPackage) + +Access to additional integration packages. + +### Example + + + +\`\`\`typescript Access additional packages +// Access a custom integration package +base44.integrations.MyCustomPackage.MyFunction({ param: 'value' }); +\`\`\` + + +`; + // Append it before the "Type Declaration" or "Core" section if possible, or just at the end before methods if any + // Finding a good insertion point + const typeDeclarationIndex = content.indexOf("## Type Declaration"); + if (typeDeclarationIndex !== -1) { + content = + content.slice(0, typeDeclarationIndex) + + indexableSection + + "\n" + + content.slice(typeDeclarationIndex); + modified = true; + } else { + // If no Type Declaration, maybe append after the main description? + // Look for the first horizontal rule or similar + const firstHR = content.indexOf("***", 10); // skip first few chars + if (firstHR !== -1) { + content = + content.slice(0, firstHR) + + indexableSection + + "\n" + + content.slice(firstHR); + modified = true; + } + } + } + // Remove .md and .mdx extensions from markdown links // This handles both relative and absolute paths // Regex breakdown: @@ -283,10 +339,20 @@ function generateDocsJson(docsContent) { } if (docsContent.typeAliases.length > 0 && categoryMap["type-aliases"]) { - groups.push({ - group: getGroupName("typeAliases", categoryMap), - pages: docsContent.typeAliases, - }); + // Merge into existing group if name matches + const groupName = getGroupName("type-aliases", categoryMap); + // "type-aliases" key in categoryMap is "Modules", so groupName is "Modules". + const existingGroup = groups.find((g) => g.group === groupName); + + if (existingGroup) { + existingGroup.pages.push(...docsContent.typeAliases); + existingGroup.pages.sort(); // Sort combined pages alphabetically + } else { + groups.push({ + group: groupName, + pages: docsContent.typeAliases, + }); + } } // Find or create SDK Reference tab @@ -326,7 +392,11 @@ function isTypeDocPath(relativePath) { return ( normalized.startsWith("content/interfaces/") || normalized.startsWith("content/type-aliases/") || - normalized.startsWith("content/classes/") + normalized.startsWith("content/classes/") || + // Also check root level for when fallback processing happens + normalized.startsWith("interfaces/") || + normalized.startsWith("type-aliases/") || + normalized.startsWith("classes/") ); } @@ -352,8 +422,17 @@ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { const isTypeDoc = isTypeDocPath(relativePath); // Check if exposed. Handle renamed modules by checking reverse map. + // Use both the raw filename and any potential original name const originalName = REVERSE_MODULE_RENAMES[fileName] || fileName; - const isExposedType = !isTypeDoc || exposedTypeNames.has(originalName); + + // If it's a renamed module (e.g. "entities"), treat it as exposed if "EntitiesModule" is exposed + const isRenamedModule = !!REVERSE_MODULE_RENAMES[fileName]; + + const isExposedType = + !isTypeDoc || + exposedTypeNames.has(originalName) || + exposedTypeNames.has(fileName) || + isRenamedModule; // Remove any type doc files that are not explicitly exposed if (isTypeDoc && !isExposedType) { diff --git a/scripts/mintlify-post-processing/file-processing/styling.css b/scripts/mintlify-post-processing/file-processing/styling.css index 98b0301..a0aa60a 100644 --- a/scripts/mintlify-post-processing/file-processing/styling.css +++ b/scripts/mintlify-post-processing/file-processing/styling.css @@ -1,4 +1,4 @@ -@import url('https://fonts.googleapis.com/css2?family=Wix+Madefor+Display:wght@400..800&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap'); +@import url("https://fonts.googleapis.com/css2?family=Wix+Madefor+Display:wght@400..800&family=Wix+Madefor+Text:ital,wght@0,400..800;1,400..800&display=swap"); /* Apply Wix Madefor Text for body text */ body, @@ -10,7 +10,9 @@ body, } /* Apply Wix Madefor Display for headings */ -h1, h2, h3 { +h1, +h2, +h3 { font-family: "Wix Madefor Display", sans-serif; font-weight: 600; font-style: normal; @@ -20,16 +22,17 @@ h1, h2, h3 { @media (prefers-color-scheme: light) { body, .mint-container, - h1, h2, h3 { + h1, + h2, + h3 { color: #111111; } } - /* Mintlify primary navbar CTA button color override */ .mint-navbar .mint-button-primary, .mint-navbar li#topbar-cta-button a > span.bg-primary-dark { - background-color: #FF5500 !important; /* updated brand orange */ + background-color: #ff5500 !important; /* updated brand orange */ color: #111111 !important; font-weight: 600; border: none; @@ -58,11 +61,11 @@ a[href*="base44.com"] .text-white, } /* Force the ">" icon in the Base44 button to orange for consistency and accessibility */ a[href*="base44.com"] svg, -a[href*="base44.com"] .text-white, +a[href*="base44.com"] .text-white, a[href*="base44.com"] svg path, .mint-navbar a svg.text-white { - color: #111111 !important; /* Works if color is set by text utility */ - fill: #111111 !important; /* Ensures SVG/path fill is overridden */ + color: #111111 !important; /* Works if color is set by text utility */ + fill: #111111 !important; /* Ensures SVG/path fill is overridden */ } /* Restore thin chevron style for the navbar's "Base44" button arrow */ a[href*="base44.com"] svg, @@ -90,7 +93,7 @@ a[href*="base44.com"] svg path, color: #111111 !important; fill: none !important; stroke: currentColor !important; - stroke-width: 1.5 !important; /* set to the original */ + stroke-width: 1.5 !important; /* set to the original */ stroke-linecap: round !important; /* keep the smooth end */ } @@ -98,7 +101,8 @@ a[href*="base44.com"] svg path, /* Always use Mintlify's built-in theme variables! */ div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400, -div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400 span, +div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400 + span, .card .prose, .card .prose span, .mint-card .prose, @@ -110,7 +114,7 @@ div.prose.mt-1.font-normal.text-sm.leading-6.text-gray-600.dark\:text-gray-400 s a:has(code) { border-bottom: none !important; text-decoration: none !important; - color: #FF8844 !important; /* light orange */ + color: #ff8844 !important; /* light orange */ } /* Hide nested TOC items on interface pages */ diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js index a3086c9..1ea53a1 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js @@ -2,13 +2,30 @@ * Parameter conversion functions for TypeDoc Mintlify plugin */ -import { escapeAttribute } from './typedoc-mintlify-utils.js'; -import { extractPropertiesFromLinkedType } from './typedoc-mintlify-linked-types.js'; -import * as fs from 'fs'; -import * as path from 'path'; - -const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; -const WRAPPER_TYPE_NAMES = new Set(['Partial', 'Required', 'Readonly', 'Omit', 'Pick']); +import { escapeAttribute } from "./typedoc-mintlify-utils.js"; +import { extractPropertiesFromLinkedType } from "./typedoc-mintlify-linked-types.js"; +import * as fs from "fs"; +import * as path from "path"; + +const PRIMITIVE_TYPES = [ + "any", + "string", + "number", + "boolean", + "void", + "null", + "undefined", + "object", + "Array", + "Promise", +]; +const WRAPPER_TYPE_NAMES = new Set([ + "Partial", + "Required", + "Readonly", + "Omit", + "Pick", +]); // Helper function to resolve type paths (similar to returns file) function resolveTypePath(typeName, app, currentPagePath = null) { @@ -16,102 +33,162 @@ function resolveTypePath(typeName, app, currentPagePath = null) { if (PRIMITIVE_TYPES.includes(typeName)) { return null; } - + if (!app || !app.options) { return null; } - - const outputDir = app.options.getValue('out') || 'docs'; - + + const outputDir = app.options.getValue("out") || "docs"; + // Try interfaces/ first, then type-aliases/ - let filePath = path.join(outputDir, 'interfaces', typeName + '.mdx'); + let filePath = path.join(outputDir, "interfaces", typeName + ".mdx"); if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'interfaces', typeName + '.md'); + filePath = path.join(outputDir, "interfaces", typeName + ".md"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', typeName + '.mdx'); + filePath = path.join(outputDir, "type-aliases", typeName + ".mdx"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', typeName + '.md'); + filePath = path.join(outputDir, "type-aliases", typeName + ".md"); } - + if (fs.existsSync(filePath)) { // Convert to relative path from current page if possible if (currentPagePath) { const currentDir = path.dirname(path.join(outputDir, currentPagePath)); - const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); - return relativePath.startsWith('.') ? relativePath : './' + relativePath; + const relativePath = path + .relative(currentDir, filePath) + .replace(/\\/g, "/"); + return relativePath.startsWith(".") ? relativePath : "./" + relativePath; } // Otherwise return path relative to outputDir - return path.relative(outputDir, filePath).replace(/\\/g, '/'); + return path.relative(outputDir, filePath).replace(/\\/g, "/"); } - + return null; } /** * Convert top-level function parameters (## Parameters with ### param names) */ -export function convertFunctionParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { +export function convertFunctionParameters( + content, + app = null, + page = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { // Split content by ## headings to isolate the Parameters section const sections = content.split(/\n(?=##\s+\w)/); - - return sections.map(section => { - // Only process ## Parameters sections (must start with exactly ##, not ###) - if (!section.match(/^##\s+Parameters\s*$/m)) { - return section; - } - - // Extract the content after "## Parameters" - const lines = section.split('\n'); - const paramStartIdx = lines.findIndex(l => l.match(/^##\s+Parameters\s*$/)); - - if (paramStartIdx === -1) return section; - - // Get everything after "## Parameters" line - const paramLines = lines.slice(paramStartIdx + 1); - const paramContent = paramLines.join('\n'); - - // Parse parameters with context for linked type resolution - const context = app && page ? { app, page, currentPagePath: page.url } : null; - const params = parseParametersWithExpansion(paramContent, '###', '####', context, linkedTypeNames, writeLinkedTypesFile); - - if (params.length === 0) return section; - - // Rebuild section with ParamFields - const beforeParams = lines.slice(0, paramStartIdx + 1).join('\n'); - return beforeParams + '\n\n' + buildParamFieldsSection(params, linkedTypeNames, writeLinkedTypesFile); - }).join('\n'); + + return sections + .map((section) => { + // Only process ## Parameters sections (must start with exactly ##, not ###) + if (!section.match(/^##\s+Parameters\s*$/m)) { + return section; + } + + // Extract the content after "## Parameters" + const lines = section.split("\n"); + const paramStartIdx = lines.findIndex((l) => + l.match(/^##\s+Parameters\s*$/) + ); + + if (paramStartIdx === -1) return section; + + // Get everything after "## Parameters" line + const paramLines = lines.slice(paramStartIdx + 1); + const paramContent = paramLines.join("\n"); + + // Parse parameters with context for linked type resolution + const context = + app && page ? { app, page, currentPagePath: page.url } : null; + const params = parseParametersWithExpansion( + paramContent, + "###", + "####", + context, + linkedTypeNames, + writeLinkedTypesFile + ); + + if (params.length === 0) return section; + + // Rebuild section with ParamFields + const beforeParams = lines.slice(0, paramStartIdx + 1).join("\n"); + return ( + beforeParams + + "\n\n" + + buildParamFieldsSection(params, linkedTypeNames, writeLinkedTypesFile) + ); + }) + .join("\n"); } /** * Convert interface method parameters (#### Parameters with ##### param names) */ -export function convertInterfaceMethodParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { +export function convertInterfaceMethodParameters( + content, + app = null, + page = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { const context = app && page ? { app, page, currentPagePath: page.url } : null; - return rewriteParameterSections(content, '#### Parameters', '#####', '######', context, linkedTypeNames, writeLinkedTypesFile); + return rewriteParameterSections( + content, + "#### Parameters", + "#####", + "######", + context, + linkedTypeNames, + writeLinkedTypesFile + ); } /** * Convert class method parameters (#### Parameters with ##### param names) */ -export function convertClassMethodParameters(content, app = null, page = null, linkedTypeNames = null, writeLinkedTypesFile = null) { +export function convertClassMethodParameters( + content, + app = null, + page = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { const context = app && page ? { app, page, currentPagePath: page.url } : null; - return rewriteParameterSections(content, '#### Parameters', '#####', '######', context, linkedTypeNames, writeLinkedTypesFile); + return rewriteParameterSections( + content, + "#### Parameters", + "#####", + "######", + context, + linkedTypeNames, + writeLinkedTypesFile + ); } -function rewriteParameterSections(content, sectionHeading, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { - const lines = content.split('\n'); +function rewriteParameterSections( + content, + sectionHeading, + paramLevel, + nestedLevel, + context = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { + const lines = content.split("\n"); const result = []; let i = 0; const isTerminatorLine = (line) => { return ( - line.startsWith('#### Returns') || - line.startsWith('#### Example') || - line === '***' || - line.startsWith('### ') || - line.startsWith('## ') + line.startsWith("#### Returns") || + line.startsWith("#### Example") || + line === "***" || + line.startsWith("### ") || + line.startsWith("## ") ); }; @@ -125,17 +202,35 @@ function rewriteParameterSections(content, sectionHeading, paramLevel, nestedLev i++; } const sectionContentLines = lines.slice(sectionStart, i); - const sectionContent = sectionContentLines.join('\n').trim(); + const sectionContent = sectionContentLines.join("\n").trim(); // Use parseParametersWithExpansion if context is available, otherwise use parseParameters - const params = context - ? parseParametersWithExpansion(sectionContent, paramLevel, nestedLevel, context, linkedTypeNames, writeLinkedTypesFile) - : parseParameters(sectionContent, paramLevel, nestedLevel, context, linkedTypeNames, writeLinkedTypesFile); + const params = context + ? parseParametersWithExpansion( + sectionContent, + paramLevel, + nestedLevel, + context, + linkedTypeNames, + writeLinkedTypesFile + ) + : parseParameters( + sectionContent, + paramLevel, + nestedLevel, + context, + linkedTypeNames, + writeLinkedTypesFile + ); if (params.length > 0) { - const block = buildParamFieldsSection(params, linkedTypeNames, writeLinkedTypesFile).trim(); + const block = buildParamFieldsSection( + params, + linkedTypeNames, + writeLinkedTypesFile + ).trim(); if (block) { - result.push(''); - result.push(...block.split('\n')); - result.push(''); + result.push(""); + result.push(...block.split("\n")); + result.push(""); } } else { result.push(...sectionContentLines); @@ -147,27 +242,43 @@ function rewriteParameterSections(content, sectionHeading, paramLevel, nestedLev i++; } - return result.join('\n'); + return result.join("\n"); } /** * Parse parameters with type expansion (for functions) */ -function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { - const lines = paramContent.split('\n'); +function parseParametersWithExpansion( + paramContent, + paramLevel, + nestedLevel, + context = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { + const lines = paramContent.split("\n"); const params = []; - const isParamHeading = (line) => line.startsWith(paramLevel + ' '); - const isNestedHeading = nestedLevel ? (line) => line.startsWith(nestedLevel + ' ') : () => false; + const isParamHeading = (line) => line.startsWith(paramLevel + " "); + const isNestedHeading = nestedLevel + ? (line) => line.startsWith(nestedLevel + " ") + : () => false; const isTerminator = (line) => { const trimmed = line.trim(); if (!trimmed) return false; - if (trimmed.startsWith('#### Returns') || trimmed.startsWith('#### Example') || trimmed === '***') { + if ( + trimmed.startsWith("#### Returns") || + trimmed.startsWith("#### Example") || + trimmed === "***" + ) { return true; } - const nestedPrefix = nestedLevel ? nestedLevel + ' ' : null; + const nestedPrefix = nestedLevel ? nestedLevel + " " : null; if (/^#{1,3}\s+/.test(trimmed)) { - if (!trimmed.startsWith(paramLevel + ' ') && !(nestedPrefix && trimmed.startsWith(nestedPrefix))) { + if ( + !trimmed.startsWith(paramLevel + " ") && + !(nestedPrefix && trimmed.startsWith(nestedPrefix)) + ) { return true; } } @@ -177,11 +288,14 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con const extractType = (line) => { if (!line) return null; const trimmed = line.trim(); - + // Handle [`TypeName`](link) format first (backticks inside the link) const linkWithBackticksMatch = trimmed.match(/^\[`([^`]+)`\]\(([^)]+)\)$/); if (linkWithBackticksMatch) { - return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; + return { + type: linkWithBackticksMatch[1], + link: linkWithBackticksMatch[2], + }; } // Handle [TypeName](link) format @@ -189,7 +303,7 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con if (linkMatch) { return { type: linkMatch[1], link: linkMatch[2] }; } - + // Handle simple `TypeName` format const simpleMatch = trimmed.match(/^`([^`]+)`$/); if (simpleMatch) { @@ -197,12 +311,12 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> - if (trimmed.startsWith('`')) { + if (trimmed.startsWith("`")) { const sanitized = trimmed - .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') - .replace(/`/g, '') - .replace(/\\/g, '') - .replace(/\s+/g, ' ') + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1") + .replace(/`/g, "") + .replace(/\\/g, "") + .replace(/\s+/g, " ") .trim(); if (sanitized) { return { type: sanitized, link: null }; @@ -221,21 +335,21 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } let rawName = line.slice(paramLevel.length).trim(); - const optional = rawName.endsWith('?'); + const optional = rawName.endsWith("?"); const cleanName = optional ? rawName.slice(0, -1).trim() : rawName.trim(); i++; // Skip blank lines - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - let type = 'any'; + let type = "any"; let typeLink = null; if (i < lines.length) { const maybeType = extractType(lines[i]); if (maybeType) { - if (typeof maybeType === 'object') { + if (typeof maybeType === "object") { type = maybeType.type; typeLink = maybeType.link; } else { @@ -246,12 +360,35 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } // Skip blank lines after type - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } + // Check if the next line has an array indicator (...[]) + if (i < lines.length && lines[i].trim() === "...[]") { + // If type is still 'any' (default), it means no type was specified + // TypeDoc-Markdown sometimes omits the type line for arrays + // Default to 'string' as the base type in this case + if (type === "any") { + type = "string[]"; + } else { + type = type + "[]"; + } + i++; // Skip the array indicator line + + // Skip blank lines after array indicator + while (i < lines.length && lines[i].trim() === "") { + i++; + } + } + const descriptionLines = []; - while (i < lines.length && !isParamHeading(lines[i]) && !isNestedHeading(lines[i]) && !isTerminator(lines[i])) { + while ( + i < lines.length && + !isParamHeading(lines[i]) && + !isNestedHeading(lines[i]) && + !isTerminator(lines[i]) + ) { descriptionLines.push(lines[i]); i++; } @@ -259,35 +396,40 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con // Check if we should expand this type inline let linkedTypeInfo = getLinkedTypeInfo(type, typeLink, context); let nested = []; - + // Track linked types for suppression (for types with explicit links) - + // Try to extract properties from the linked type if (linkedTypeInfo && context) { - const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + const properties = extractPropertiesFromLinkedType( + linkedTypeInfo, + context + ); if (properties.length > 0) { nested = normalizePropertiesForParams(properties); } } - + // If no linked properties were found, check for manually specified nested fields if (nested.length === 0) { while (i < lines.length && isNestedHeading(lines[i])) { let nestedRawName = lines[i].slice(nestedLevel.length).trim(); - const nestedOptional = nestedRawName.endsWith('?'); - const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + const nestedOptional = nestedRawName.endsWith("?"); + const nestedName = nestedOptional + ? nestedRawName.slice(0, -1).trim() + : nestedRawName.trim(); i++; - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - let nestedType = 'any'; + let nestedType = "any"; let nestedTypeLink = null; if (i < lines.length) { const maybeNestedType = extractType(lines[i]); if (maybeNestedType) { - if (typeof maybeNestedType === 'object') { + if (typeof maybeNestedType === "object") { nestedType = maybeNestedType.type; nestedTypeLink = maybeNestedType.link; } else { @@ -297,12 +439,35 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con } } - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } + // Check if the next line has an array indicator (...[]) + if (i < lines.length && lines[i].trim() === "...[]") { + // If type is still 'any' (default), it means no type was specified + // TypeDoc-Markdown sometimes omits the type line for arrays + // Default to 'string' as the base type in this case + if (nestedType === "any") { + nestedType = "string[]"; + } else { + nestedType = nestedType + "[]"; + } + i++; // Skip the array indicator line + + // Skip blank lines after array indicator + while (i < lines.length && lines[i].trim() === "") { + i++; + } + } + const nestedDescLines = []; - while (i < lines.length && !isNestedHeading(lines[i]) && !isParamHeading(lines[i]) && !isTerminator(lines[i])) { + while ( + i < lines.length && + !isNestedHeading(lines[i]) && + !isParamHeading(lines[i]) && + !isTerminator(lines[i]) + ) { nestedDescLines.push(lines[i]); i++; } @@ -310,15 +475,22 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con const nestedField = { name: nestedName, type: nestedType, - description: nestedDescLines.join('\n').trim(), + description: nestedDescLines.join("\n").trim(), optional: nestedOptional, - nested: [] + nested: [], }; if (nestedField.nested.length === 0) { - const nestedLinkedInfo = getLinkedTypeInfo(nestedType, nestedTypeLink, context); + const nestedLinkedInfo = getLinkedTypeInfo( + nestedType, + nestedTypeLink, + context + ); if (nestedLinkedInfo && context) { - const nestedProps = extractPropertiesFromLinkedType(nestedLinkedInfo, context); + const nestedProps = extractPropertiesFromLinkedType( + nestedLinkedInfo, + context + ); if (nestedProps.length > 0) { nestedField.nested = normalizePropertiesForParams(nestedProps); } @@ -332,9 +504,9 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con params.push({ name: cleanName, type: type, - description: descriptionLines.join('\n').trim(), + description: descriptionLines.join("\n").trim(), optional, - nested + nested, }); } @@ -344,21 +516,37 @@ function parseParametersWithExpansion(paramContent, paramLevel, nestedLevel, con /** * Parse parameters from markdown content (for interface/class methods - no expansion) */ -function parseParameters(paramContent, paramLevel, nestedLevel, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { - const lines = paramContent.split('\n'); +function parseParameters( + paramContent, + paramLevel, + nestedLevel, + context = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { + const lines = paramContent.split("\n"); const params = []; - const isParamHeading = (line) => line.startsWith(paramLevel + ' '); - const isNestedHeading = nestedLevel ? (line) => line.startsWith(nestedLevel + ' ') : () => false; + const isParamHeading = (line) => line.startsWith(paramLevel + " "); + const isNestedHeading = nestedLevel + ? (line) => line.startsWith(nestedLevel + " ") + : () => false; const isTerminator = (line) => { const trimmed = line.trim(); if (!trimmed) return false; - if (trimmed.startsWith('#### Returns') || trimmed.startsWith('#### Example') || trimmed === '***') { + if ( + trimmed.startsWith("#### Returns") || + trimmed.startsWith("#### Example") || + trimmed === "***" + ) { return true; } - const nestedPrefix = nestedLevel ? nestedLevel + ' ' : null; + const nestedPrefix = nestedLevel ? nestedLevel + " " : null; if (/^#{1,3}\s+/.test(trimmed)) { - if (!trimmed.startsWith(paramLevel + ' ') && !(nestedPrefix && trimmed.startsWith(nestedPrefix))) { + if ( + !trimmed.startsWith(paramLevel + " ") && + !(nestedPrefix && trimmed.startsWith(nestedPrefix)) + ) { return true; } } @@ -368,11 +556,14 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, const extractType = (line) => { if (!line) return null; const trimmed = line.trim(); - + // Handle [`TypeName`](link) format first (backticks inside the link) const linkWithBackticksMatch = trimmed.match(/^\[`([^`]+)`\]\(([^)]+)\)$/); if (linkWithBackticksMatch) { - return { type: linkWithBackticksMatch[1], link: linkWithBackticksMatch[2] }; + return { + type: linkWithBackticksMatch[1], + link: linkWithBackticksMatch[2], + }; } // Handle [TypeName](link) format @@ -380,7 +571,7 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, if (linkMatch) { return { type: linkMatch[1], link: linkMatch[2] }; } - + // Handle simple `TypeName` format const simpleMatch = trimmed.match(/^`([^`]+)`$/); if (simpleMatch) { @@ -388,12 +579,12 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> - if (trimmed.startsWith('`')) { + if (trimmed.startsWith("`")) { const sanitized = trimmed - .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1') - .replace(/`/g, '') - .replace(/\\/g, '') - .replace(/\s+/g, ' ') + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1") + .replace(/`/g, "") + .replace(/\\/g, "") + .replace(/\s+/g, " ") .trim(); if (sanitized) { return { type: sanitized, link: null }; @@ -412,21 +603,21 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } let rawName = line.slice(paramLevel.length).trim(); - const optional = rawName.endsWith('?'); + const optional = rawName.endsWith("?"); const cleanName = optional ? rawName.slice(0, -1).trim() : rawName.trim(); i++; // Skip blank lines - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - let type = 'any'; + let type = "any"; let typeLink = null; if (i < lines.length) { const maybeType = extractType(lines[i]); if (maybeType) { - if (typeof maybeType === 'object') { + if (typeof maybeType === "object") { type = maybeType.type; typeLink = maybeType.link; } else { @@ -437,12 +628,35 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } // Skip blank lines after type - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } + // Check if the next line has an array indicator (...[]) + if (i < lines.length && lines[i].trim() === "...[]") { + // If type is still 'any' (default), it means no type was specified + // TypeDoc-Markdown sometimes omits the type line for arrays + // Default to 'string' as the base type in this case + if (type === "any") { + type = "string[]"; + } else { + type = type + "[]"; + } + i++; // Skip the array indicator line + + // Skip blank lines after array indicator + while (i < lines.length && lines[i].trim() === "") { + i++; + } + } + const descriptionLines = []; - while (i < lines.length && !isParamHeading(lines[i]) && !isNestedHeading(lines[i]) && !isTerminator(lines[i])) { + while ( + i < lines.length && + !isParamHeading(lines[i]) && + !isNestedHeading(lines[i]) && + !isTerminator(lines[i]) + ) { descriptionLines.push(lines[i]); i++; } @@ -450,35 +664,40 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, // Check if we should expand this type inline const linkedTypeInfo = getLinkedTypeInfo(type, typeLink, context); let nested = []; - + // Try to extract properties from the linked type if (linkedTypeInfo && context) { - const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + const properties = extractPropertiesFromLinkedType( + linkedTypeInfo, + context + ); if (properties.length > 0) { nested = normalizePropertiesForParams(properties); // Keep the type as the original type name (without expanding to 'object') // This preserves the type name in the ParamField } } - + // If no linked properties were found, check for manually specified nested fields if (nested.length === 0) { while (i < lines.length && isNestedHeading(lines[i])) { let nestedRawName = lines[i].slice(nestedLevel.length).trim(); - const nestedOptional = nestedRawName.endsWith('?'); - const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + const nestedOptional = nestedRawName.endsWith("?"); + const nestedName = nestedOptional + ? nestedRawName.slice(0, -1).trim() + : nestedRawName.trim(); i++; - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - let nestedType = 'any'; + let nestedType = "any"; let nestedTypeLink = null; if (i < lines.length) { const maybeNestedType = extractType(lines[i]); if (maybeNestedType) { - if (typeof maybeNestedType === 'object') { + if (typeof maybeNestedType === "object") { nestedType = maybeNestedType.type; nestedTypeLink = maybeNestedType.link; } else { @@ -488,12 +707,35 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, } } - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } + // Check if the next line has an array indicator (...[]) + if (i < lines.length && lines[i].trim() === "...[]") { + // If type is still 'any' (default), it means no type was specified + // TypeDoc-Markdown sometimes omits the type line for arrays + // Default to 'string' as the base type in this case + if (nestedType === "any") { + nestedType = "string[]"; + } else { + nestedType = nestedType + "[]"; + } + i++; // Skip the array indicator line + + // Skip blank lines after array indicator + while (i < lines.length && lines[i].trim() === "") { + i++; + } + } + const nestedDescLines = []; - while (i < lines.length && !isNestedHeading(lines[i]) && !isParamHeading(lines[i]) && !isTerminator(lines[i])) { + while ( + i < lines.length && + !isNestedHeading(lines[i]) && + !isParamHeading(lines[i]) && + !isTerminator(lines[i]) + ) { nestedDescLines.push(lines[i]); i++; } @@ -501,15 +743,22 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, const nestedField = { name: nestedName, type: nestedType, - description: nestedDescLines.join('\n').trim(), + description: nestedDescLines.join("\n").trim(), optional: nestedOptional, - nested: [] + nested: [], }; if (nestedField.nested.length === 0) { - const nestedLinkedInfo = getLinkedTypeInfo(nestedType, nestedTypeLink, context); + const nestedLinkedInfo = getLinkedTypeInfo( + nestedType, + nestedTypeLink, + context + ); if (nestedLinkedInfo && context) { - const nestedProps = extractPropertiesFromLinkedType(nestedLinkedInfo, context); + const nestedProps = extractPropertiesFromLinkedType( + nestedLinkedInfo, + context + ); if (nestedProps.length > 0) { nestedField.nested = normalizePropertiesForParams(nestedProps); } @@ -523,9 +772,9 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, params.push({ name: cleanName, type: nested.length > 0 ? type : type, // Keep original type name - description: descriptionLines.join('\n').trim(), + description: descriptionLines.join("\n").trim(), optional, - nested + nested, }); } @@ -535,27 +784,31 @@ function parseParameters(paramContent, paramLevel, nestedLevel, context = null, /** * Build ParamField components from parsed parameters */ -function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedTypesFile = null) { +function buildParamFieldsSection( + params, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { if (!params || params.length === 0) { - return ''; + return ""; } - let fieldsOutput = ''; - + let fieldsOutput = ""; + for (const param of params) { - const requiredAttr = param.optional ? '' : ' required'; - + const requiredAttr = param.optional ? "" : " required"; + // Track non-primitive parameter types for suppression - + fieldsOutput += `\n`; - + // Always show description in ParamField if it exists if (param.description) { fieldsOutput += `\n${param.description}\n`; } - - fieldsOutput += '\n\n'; - + + fieldsOutput += "\n\n"; + // If param has nested fields, wrap them in an Accordion if (param.nested.length > 0) { // Accordion title is always "Properties" @@ -563,31 +816,33 @@ function buildParamFieldsSection(params, linkedTypeNames = null, writeLinkedType fieldsOutput += renderNestedParamFields(param.nested); - fieldsOutput += '\n\n'; + fieldsOutput += "\n\n"; } else { - fieldsOutput += '\n'; + fieldsOutput += "\n"; } } - + // Wrap multiple parameters in an Accordion (but not single parameters, even if they have nested fields) const hasMultipleParams = params.length > 1; - + if (hasMultipleParams) { return `\n\n${fieldsOutput.trim()}\n`; } - + return fieldsOutput; } function renderNestedParamFields(fields) { if (!fields || fields.length === 0) { - return ''; + return ""; } - let output = ''; + let output = ""; for (const field of fields) { - const requiredAttr = field.optional ? '' : ' required'; - output += `\n`; + const requiredAttr = field.optional ? "" : " required"; + output += `\n`; if (field.description) { output += `\n${field.description}\n`; @@ -596,10 +851,10 @@ function renderNestedParamFields(fields) { if (Array.isArray(field.nested) && field.nested.length > 0) { output += `\n\n\n`; output += renderNestedParamFields(field.nested); - output += '\n'; + output += "\n"; } - output += '\n\n\n'; + output += "\n\n\n"; } return output; @@ -624,7 +879,11 @@ function getLinkedTypeInfo(typeName, typeLink, context) { return null; } - const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + const typePath = resolveTypePath( + simpleTypeName, + context.app, + context.currentPagePath + ); return { typeName: simpleTypeName, typePath: typePath || simpleTypeName }; } @@ -639,8 +898,12 @@ function simplifyTypeName(typeName) { cleaned = unwrapHelperType(cleaned); // Remove generics/array indicators and take the first union/intersection entry - cleaned = cleaned.replace(/[\[\]]/g, '').split('|')[0].split('&')[0].trim(); - return cleaned.replace(/<.*?>/g, '').trim(); + cleaned = cleaned + .replace(/[\[\]]/g, "") + .split("|")[0] + .split("&")[0] + .trim(); + return cleaned.replace(/<.*?>/g, "").trim(); } function unwrapHelperType(typeName) { @@ -674,26 +937,26 @@ function unwrapHelperType(typeName) { function getFirstGenericArgument(genericBlock) { if (!genericBlock) { - return ''; + return ""; } let depth = 0; - let buffer = ''; + let buffer = ""; for (let i = 0; i < genericBlock.length; i++) { const char = genericBlock[i]; - if (char === '<') { + if (char === "<") { depth++; buffer += char; continue; } - if (char === '>') { + if (char === ">") { if (depth > 0) { depth--; } buffer += char; continue; } - if (char === ',' && depth === 0) { + if (char === "," && depth === 0) { return buffer.trim(); } buffer += char; @@ -709,11 +972,9 @@ function normalizePropertiesForParams(properties) { return properties.map((prop) => ({ name: prop.name, - type: prop.type || 'any', - description: prop.description || '', + type: prop.type || "any", + description: prop.description || "", optional: !!prop.optional, - nested: normalizePropertiesForParams(prop.nested || []) + nested: normalizePropertiesForParams(prop.nested || []), })); } - - diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js index 7d3bed8..e33838e 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js @@ -3,13 +3,25 @@ * Hooks into TypeDoc's markdown renderer to customize output for Mintlify */ -import { MarkdownPageEvent } from 'typedoc-plugin-markdown'; -import { ReflectionKind, RendererEvent } from 'typedoc'; -import * as fs from 'fs'; -import * as path from 'path'; -import { convertFunctionParameters, convertInterfaceMethodParameters, convertClassMethodParameters } from './typedoc-mintlify-parameters.js'; -import { convertFunctionReturns, convertInterfaceMethodReturns, convertClassMethodReturns } from './typedoc-mintlify-returns.js'; -import { convertExamplesToCodeGroup, addMintlifyFrontmatter, addHeadingsToCodeGroups } from './typedoc-mintlify-content.js'; +import { MarkdownPageEvent } from "typedoc-plugin-markdown"; +import { ReflectionKind, RendererEvent } from "typedoc"; +import * as fs from "fs"; +import * as path from "path"; +import { + convertFunctionParameters, + convertInterfaceMethodParameters, + convertClassMethodParameters, +} from "./typedoc-mintlify-parameters.js"; +import { + convertFunctionReturns, + convertInterfaceMethodReturns, + convertClassMethodReturns, +} from "./typedoc-mintlify-returns.js"; +import { + convertExamplesToCodeGroup, + addMintlifyFrontmatter, + addHeadingsToCodeGroups, +} from "./typedoc-mintlify-content.js"; // Shared flag with the post-processing script so Panel output can be toggled. const PANELS_ENABLED = process.env.MINTLIFY_INCLUDE_PANELS === 'true'; @@ -24,68 +36,92 @@ const linkedTypeNames = new Set(); * Load function called by TypeDoc */ export function load(app) { - console.log('Loading Mintlify TypeDoc plugin...'); - + console.log("Loading Mintlify TypeDoc plugin..."); + app.renderer.on(MarkdownPageEvent.END, (page) => { if (!page.contents) return; - + let content = page.contents; - + // Determine what kind of page this is. const isFunction = page.model?.kind === ReflectionKind.Function; const isClass = page.model?.kind === ReflectionKind.Class; const isInterface = page.model?.kind === ReflectionKind.Interface; - - + // 1. Remove breadcrumbs navigation - content = content.replace(/^\[.*?\]\(.*?\)\s*\n+/m, ''); - + content = content.replace(/^\[.*?\]\(.*?\)\s*\n+/m, ""); + // 2. Convert parameters to ParamField components and returns to ResponseField components // Functions: ## Parameters/Returns with ### field names // Interface methods: #### Parameters/Returns with ##### field names // Class methods: #### Parameters/Returns with ##### field names const writeLinkedTypesFile = createWriteLinkedTypesFile(app); - + if (isFunction) { - content = convertFunctionParameters(content, app, page, linkedTypeNames, writeLinkedTypesFile); - content = convertFunctionReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + content = convertFunctionParameters( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile + ); + content = convertFunctionReturns( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile + ); } else if (isInterface) { content = convertInterfaceMethodParameters(content, app, page); - content = convertInterfaceMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + content = convertInterfaceMethodReturns( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile + ); } else if (isClass) { content = convertClassMethodParameters(content, app, page); - content = convertClassMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile); + content = convertClassMethodReturns( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile + ); } - + // 3. Convert code examples to CodeGroup content = convertExamplesToCodeGroup(content); - + // 3a. Add headings to CodeGroups that don't have them content = addHeadingsToCodeGroups(content); - + // 4. Remove auto-generated type links from signatures (keep manual doc links) content = stripAutoGeneratedTypeLinks(content); - + // 5. Remove .md and .mdx extensions from links - content = content.replace(/\[([^\]]+)\]\(([^)]+)\.mdx?\)/g, '[$1]($2)'); - + content = content.replace(/\[([^\]]+)\]\(([^)]+)\.mdx?\)/g, "[$1]($2)"); + // 6. Add on-page navigation panel - if (PANELS_ENABLED) { - content = addOnThisPagePanel(content, page); - } - + content = addOnThisPagePanel(content, page); + // 7. Add frontmatter content = addMintlifyFrontmatter(content, page); - + + // 8. Fix escaped characters in type signatures that shouldn't be escaped in MDX + content = fixEscapedTypeCharacters(content); + page.contents = content; }); - + // Write linked types file once at the end of all processing app.renderer.on(MarkdownPageEvent.END, () => { // This will run after all pages are processed // We'll write the file in a different event }); - + // Write linked types file after all pages are processed app.renderer.on(RendererEvent.END, () => { const writeLinkedTypesFile = createWriteLinkedTypesFile(app); @@ -101,18 +137,22 @@ function createWriteLinkedTypesFile(app) { if (!app || !app.options) { return; } - const outputDir = app.options.getValue('out') || 'docs'; + const outputDir = app.options.getValue("out") || "docs"; const resolvedOutputDir = path.resolve(outputDir); - const linkedTypesFile = path.join(resolvedOutputDir, '.linked-types.json'); + const linkedTypesFile = path.join(resolvedOutputDir, ".linked-types.json"); try { // Ensure content directory exists if (!fs.existsSync(resolvedOutputDir)) { fs.mkdirSync(resolvedOutputDir, { recursive: true }); } - fs.writeFileSync(linkedTypesFile, JSON.stringify(Array.from(linkedTypeNames)), 'utf-8'); + fs.writeFileSync( + linkedTypesFile, + JSON.stringify(Array.from(linkedTypeNames)), + "utf-8" + ); } catch (e) { // Ignore errors writing the file - console.warn('Warning: Could not write linked types file:', e.message); + console.warn("Warning: Could not write linked types file:", e.message); } }; } @@ -133,23 +173,25 @@ function addOnThisPagePanel(content, page) { } const panelLines = [ - '', - '', + "", + "", ' **On this page**', - '', + "", ...links.map(({ heading, anchor }) => `- [${heading}](#${anchor})`), - '', - '', - '' + "", + "", + "", ]; - const panelBlock = panelLines.join('\n'); - const firstSectionIndex = content.indexOf('\n## '); + const panelBlock = panelLines.join("\n"); + const firstSectionIndex = content.indexOf("\n## "); if (firstSectionIndex === -1) { return `${content}\n\n${panelBlock}`; } const insertionPoint = firstSectionIndex + 1; - return `${content.slice(0, insertionPoint)}${panelBlock}${content.slice(insertionPoint)}`; + return `${content.slice(0, insertionPoint)}${panelBlock}${content.slice( + insertionPoint + )}`; } function getPanelLinksForPage(page, content) { @@ -166,13 +208,21 @@ function getPanelLinksForPage(page, content) { } function isTypeDoc(page) { - const allowedKinds = new Set([ReflectionKind.Interface, ReflectionKind.Class]); - return allowedKinds.has(page.model.kind) && - (page.url.startsWith('interfaces/') || page.url.startsWith('classes/')); + const allowedKinds = new Set([ + ReflectionKind.Interface, + ReflectionKind.Class, + ]); + return ( + allowedKinds.has(page.model.kind) && + (page.url.startsWith("interfaces/") || page.url.startsWith("classes/")) + ); } function isFunctionDoc(page) { - return page.model.kind === ReflectionKind.Function && page.url.startsWith('functions/'); + return ( + page.model.kind === ReflectionKind.Function && + page.url.startsWith("functions/") + ); } function extractHeadings(content, regex) { @@ -191,14 +241,20 @@ function extractHeadings(content, regex) { function slugifyHeading(text) { return text .toLowerCase() - .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, '') - .replace(/\s+/g, '-'); + .replace(/[`~!@#$%^&*()+={}\[\]|\\:;"'<>,.?]/g, "") + .replace(/\s+/g, "-"); } function stripAutoGeneratedTypeLinks(content) { return content.replace(/^>\s*\*\*.*$/gm, (line) => { - const withoutCodeLinks = line.replace(/\[`([^`]+)`\]\([^)]+\)/g, '`$1`'); - return withoutCodeLinks.replace(/\[([A-Za-z0-9_.]+)\]\(([^)]+)\)/g, '$1'); + const withoutCodeLinks = line.replace(/\[`([^`]+)`\]\([^)]+\)/g, "`$1`"); + return withoutCodeLinks.replace(/\[([A-Za-z0-9_.]+)\]\(([^)]+)\)/g, "$1"); }); } +function fixEscapedTypeCharacters(content) { + // Fix escaped pipes - TypeDoc escapes | as \| in the output + // This is visible in the rendered Mintlify pages + // Simply replace all instances of \| with | in the entire content + return content.replace(/\\\|/g, "|"); +} diff --git a/scripts/mintlify-post-processing/types-to-expose.json b/scripts/mintlify-post-processing/types-to-expose.json index 42c018b..94bd563 100644 --- a/scripts/mintlify-post-processing/types-to-expose.json +++ b/scripts/mintlify-post-processing/types-to-expose.json @@ -7,7 +7,6 @@ "EntityHandler", "FunctionsModule", "IntegrationsModule", + "CoreIntegrations", "SsoModule" ] - - diff --git a/src/index.ts b/src/index.ts index 1ab4dec..c60a61e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -52,6 +52,20 @@ export type { IntegrationsModule, IntegrationPackage, IntegrationEndpointFunction, + CoreIntegrations, + InvokeLLMParams, + GenerateImageParams, + GenerateImageResult, + UploadFileParams, + UploadFileResult, + SendEmailParams, + SendEmailResult, + ExtractDataFromUploadedFileParams, + ExtractDataFromUploadedFileResult, + UploadPrivateFileParams, + UploadPrivateFileResult, + CreateFileSignedUrlParams, + CreateFileSignedUrlResult, } from "./modules/integrations.types.js"; export type { FunctionsModule } from "./modules/functions.types.js"; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index f0fbe40..9a2d6c9 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -176,42 +176,6 @@ export interface AgentsModuleConfig { * - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Anonymous users can create conversations but cannot retrieve them later, while authenticated users can access conversations they created. * - **Service role authentication** (`base44.asServiceRole.agents`): Operations have elevated admin-level permissions. Can access all conversations that the app's admin role has access to. * - * @example - * ```typescript - * // Create a new conversation - * const conversation = await base44.agents.createConversation({ - * agent_name: 'support-agent', - * metadata: { - * ticket_id: 'SUPP-1234', - * category: 'billing', - * priority: 'high' - * } - * }); - * ``` - * - * @example - * ```typescript - * // Send a message - * await base44.agents.addMessage(conversation, { - * role: 'user', - * content: 'Hello, I need help!' - * }); - * ``` - * - * @example - * ```typescript - * // Subscribe to real-time updates - * const unsubscribe = base44.agents.subscribeToConversation( - * conversation.id, - * (updatedConversation) => { - * console.log('New messages:', updatedConversation.messages); - * } - * ); - * - * // Clean up subscription later - * unsubscribe(); - * ``` - * */ export interface AgentsModule { /** diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts index ba8fa65..ed6f2ad 100644 --- a/src/modules/app-logs.types.ts +++ b/src/modules/app-logs.types.ts @@ -39,62 +39,27 @@ export interface GetStatsParams { /** * App Logs module for tracking and analyzing app usage. * - * This module provides methods to log user activity, fetch logs, and retrieve - * statistics about the app's usage. Useful for analytics, monitoring, - * and understanding user behavior. + * This module provides a method to log user activity. The logs are reflected in the Analytics page in the app dashboard. * - * This module is available to use with a client in all authentication modes: - * - * - **Anonymous or User authentication** (`base44.appLogs`): Access is scoped to the current user's permissions. Anonymous users can create logs but cannot retrieve them, while authenticated users can create logs and retrieve only their own logs and statistics. - * - **Service role authentication** (`base44.asServiceRole.appLogs`): Operations have elevated admin-level permissions. Can access all logs and statistics that the app's admin role has access to. This is useful for admin dashboards, analytics, and monitoring overall usage patterns. - * - * @example - * ```typescript - * // Log user visiting a page - * await base44.appLogs.logUserInApp('dashboard'); - * ``` - * - * @example - * ```typescript - * // Fetch recent logs - * const logs = await base44.appLogs.fetchLogs({ - * limit: 100, - * sort: '-timestamp' - * }); - * ``` - * - * @example - * ```typescript - * // Get app statistics - * const stats = await base44.appLogs.getStats({ - * startDate: '2024-01-01', - * endDate: '2024-01-31' - * }); - * ``` + * This module is available to use with a client in all authentication modes. */ export interface AppLogsModule { /** * Log user activity in the app. * - * Records when a user visits a specific page or section of the app. - * Useful for tracking user navigation patterns and popular features. + * Records when a user visits a specific page or section of the app. Useful for tracking user navigation patterns and popular features. The logs are reflected in the Analytics page in the app dashboard. + * + * The specified page name doesn't have to be the name of an actual page in the app, it can be any string you want to use to track the activity. * * @param pageName - Name of the page or section being visited. * @returns Promise that resolves when the log is recorded. * * @example * ```typescript - * // Log page visit + * // Log page visit or feature usage * await base44.appLogs.logUserInApp('home'); - * await base44.appLogs.logUserInApp('profile'); - * await base44.appLogs.logUserInApp('settings'); - * ``` - * - * @example - * ```typescript - * // Log specific feature usage - * await base44.appLogs.logUserInApp('checkout-page'); - * await base44.appLogs.logUserInApp('product-details'); + * await base44.appLogs.logUserInApp('features-section'); + * await base44.appLogs.logUserInApp('button-click'); * ``` */ logUserInApp(pageName: string): Promise; @@ -140,6 +105,7 @@ export interface AppLogsModule { * endDate: '2024-01-31' * }); * ``` + * @internal */ fetchLogs(params?: FetchLogsParams): Promise; @@ -183,6 +149,7 @@ export interface AppLogsModule { * metric: 'active_users' * }); * ``` + * @internal */ getStats(params?: GetStatsParams): Promise; } diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index 058d6fb..af1c432 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -7,24 +7,6 @@ * * - **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. * - **Service role authentication** (`base44.asServiceRole.functions`): Functions are invoked with elevated admin-level permissions. The function code receives a request with admin authentication context. - * - * @example - * ```typescript - * // Invoke a function with parameters - * const result = await base44.functions.invoke('calculateTotal', { - * items: ['item1', 'item2'], - * discount: 0.1 - * }); - * console.log(result.data); - * ``` - * - * @example - * ```typescript - * // Invoke with service role - * const adminResult = await base44.asServiceRole.functions.invoke('adminTask', { - * action: 'cleanup' - * }); - * ``` */ export interface FunctionsModule { /** diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 471718c..0b79fdb 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -31,6 +31,341 @@ export type IntegrationPackage = { [endpointName: string]: IntegrationEndpointFunction; }; +/** + * Parameters for the InvokeLLM function. + */ +export interface InvokeLLMParams { + /** The prompt text to send to the model */ + prompt: string; + /** If set to `true`, the LLM will use Google Search, Maps, and News to gather real-time context before answering. + * @default false + */ + add_context_from_internet?: boolean; + /** If you want structured data back, provide a [JSON schema object](https://json-schema.org/understanding-json-schema/reference/object) here. If provided, the function returns a JSON object; otherwise, it returns a string. */ + response_json_schema?: object; + /** A list of file URLs (uploaded via UploadFile) to provide as context/attachments to the LLM. Do not use this together with `add_context_from_internet`. */ + file_urls?: string[]; +} + +/** + * Parameters for the GenerateImage function. + */ +export interface GenerateImageParams { + /** Description of the image to generate. */ + prompt: string; +} + +/** + * Return type for the GenerateImage function. + */ +export interface GenerateImageResult { + /** URL of the generated image. */ + url: string; +} + +/** + * Parameters for the UploadFile function. + */ +export interface UploadFileParams { + /** The file object to upload. */ + file: File; +} + +/** + * Return type for the UploadFile function. + */ +export interface UploadFileResult { + /** URL of the uploaded file. */ + file_url: string; +} + +/** + * Parameters for the SendEmail function. + */ +export interface SendEmailParams { + /** Recipient email address. */ + to: string; + /** Email subject line. */ + subject: string; + /** Plain text email body content. */ + body: string; + /** The name of the sender. If omitted, the app's name will be used. */ + from_name?: string; +} + +/** + * Return type for the SendEmail function. + */ +export type SendEmailResult = any; + +/** + * Parameters for the ExtractDataFromUploadedFile function. + */ +export interface ExtractDataFromUploadedFileParams { + /** The URL of the uploaded file to extract data from. */ + file_url: string; + /** A [JSON schema object](https://json-schema.org/understanding-json-schema/reference/object) defining what data fields you want to extract. */ + json_schema: object; +} + +/** + * Return type for the ExtractDataFromUploadedFile function. + */ +export type ExtractDataFromUploadedFileResult = object; + +/** + * Parameters for the UploadPrivateFile function. + */ +export interface UploadPrivateFileParams { + /** The file object to upload. */ + file: File; +} + +/** + * Return type for the UploadPrivateFile function. + */ +export interface UploadPrivateFileResult { + /** URI of the uploaded private file, used to create a signed URL. */ + file_uri: string; +} + +/** + * Parameters for the CreateFileSignedUrl function. + */ +export interface CreateFileSignedUrlParams { + /** URI of the uploaded private file. */ + file_uri: string; + /** How long the signed URL should be valid for, in seconds. + * @default 300 (5 minutes) + */ + expires_in?: number; +} + +/** + * Return type for the CreateFileSignedUrl function. + */ +export interface CreateFileSignedUrlResult { + /** Temporary signed URL to access the private file. */ + signed_url: string; +} + +/** + * Core package containing built-in Base44 integration functions. + */ +export interface CoreIntegrations { + /** + * Generate text or structured JSON data using AI models. + * + * @param params - Parameters for the LLM invocation + * @returns Promise resolving to a string (when no schema provided) or an object (when schema provided). + * + * @example + * ```typescript + * // Basic prompt + * const response = await base44.integrations.Core.InvokeLLM({ + * prompt: "Write a haiku about coding." + * }); + * ``` + * + * @example + * ```typescript + * // Prompt with internet context + * const response = await base44.integrations.Core.InvokeLLM({ + * prompt: "What is the current stock price of Wix and what was the latest major news about it?", + * add_context_from_internet: true + * }); + * ``` + * + * @example + * ```typescript + * // Structured JSON response + * const response = await base44.integrations.Core.InvokeLLM({ + * prompt: "Analyze the sentiment of this review: 'The service was slow but the food was amazing.'", + * response_json_schema: { + * type: "object", + * properties: { + * sentiment: { type: "string", enum: ["positive", "negative", "mixed"] }, + * score: { type: "number", description: "Score from 1-10" }, + * key_points: { type: "array", items: { type: "string" } } + * } + * } + * }); + * // Returns object: { sentiment: "mixed", score: 7, key_points: ["slow service", "amazing food"] } + * ``` + */ + InvokeLLM(params: InvokeLLMParams): Promise; + + /** + * Create AI-generated images from text prompts. + * + * @param params - Parameters for image generation + * @returns Promise resolving to the generated image URL. + * + * @example + * ```typescript + * // Generate an image from a text prompt + * const {url} = await base44.integrations.Core.GenerateImage({ + * prompt: "A serene mountain landscape with a lake in the foreground" + * }); + * console.log(url); // https://...generated_image.png + * ``` + */ + GenerateImage(params: GenerateImageParams): Promise; + + /** + * Upload files to public storage and get a URL. + * + * @param params - Parameters for file upload + * @returns Promise resolving to an object containing the uploaded file URL. + * + * @example + * ```typescript + * // Upload a file in React + * const handleFileUpload = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (!file) return; + * + * const { file_url } = await base44.integrations.Core.UploadFile({ file }); + * console.log(file_url); // https://...uploaded_file.pdf + * }; + * ``` + */ + UploadFile(params: UploadFileParams): Promise; + + /** + * Send emails to registered users of your app. + * + * @param params - Parameters for sending email + * @returns Promise resolving when the email is sent. + */ + SendEmail(params: SendEmailParams): Promise; + + /** + * Extract structured data from uploaded files based on the specified schema. + * + * Start by uploading the file to public storage using the {@linkcode UploadFile | UploadFile()} function. Then, use the `file_url` parameter to extract structured data from the uploaded file. + * + * @param params - Parameters for data extraction + * @returns Promise resolving to the extracted data. + * + * @example + * ```typescript + * // Extract data from an already uploaded file + * const result = await base44.integrations.Core.ExtractDataFromUploadedFile({ + * file_url: "https://example.com/files/invoice.pdf", + * json_schema: { + * type: "object", + * properties: { + * invoice_number: { type: "string" }, + * total_amount: { type: "number" }, + * date: { type: "string" }, + * vendor_name: { type: "string" } + * } + * } + * }); + * console.log(result); // { invoice_number: "INV-12345", total_amount: 1250.00, ... } + * ``` + * + * @example + * ```typescript + * // Upload a file and extract data in React + * const handleFileExtraction = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (!file) return; + * + * // First, upload the file + * const { file_url } = await base44.integrations.Core.UploadFile({ file }); + * + * // Then extract structured data from it + * const result = await base44.integrations.Core.ExtractDataFromUploadedFile({ + * file_url, + * json_schema: { + * type: "object", + * properties: { + * summary: { + * type: "string", + * description: "A brief summary of the file content" + * }, + * keywords: { + * type: "array", + * items: { type: "string" } + * }, + * document_type: { + * type: "string" + * } + * } + * } + * }); + * console.log(result); // { summary: "...", keywords: [...], document_type: "..." } + * }; + * ``` + */ + ExtractDataFromUploadedFile( + params: ExtractDataFromUploadedFileParams + ): Promise; + + /** + * Upload files to private storage that requires a signed URL to access. + * + * Create a signed URL to access uploaded files using the {@linkcode CreateFileSignedUrl | CreateFileSignedUrl()} function. + * + * @param params - Parameters for private file upload + * @returns Promise resolving to an object with a `file_uri` used to create a signed URL to access the uploaded file. + * + * @example + * ```typescript + * // Upload a private file + * const { file_uri } = await base44.integrations.Core.UploadPrivateFile({ file }); + * console.log(file_uri); // "private/user123/document.pdf" + * ``` + * + * @example + * ```typescript + * // Upload a private file and create a signed URL + * const handlePrivateUpload = async (event: React.ChangeEvent) => { + * const file = event.target.files?.[0]; + * if (!file) return; + * + * // Upload to private storage + * const { file_uri } = await base44.integrations.Core.UploadPrivateFile({ file }); + * + * // Create a signed URL that expires in 1 hour (3600 seconds) + * const { signed_url } = await base44.integrations.Core.CreateFileSignedUrl({ + * file_uri, + * expires_in: 3600 + * }); + * + * console.log(signed_url); // Temporary URL to access the private file + * }; + * ``` + */ + UploadPrivateFile( + params: UploadPrivateFileParams + ): Promise; + + /** + * Generate temporary access links for private files. + * + * Start by uploading the file to private storage using the {@linkcode UploadPrivateFile | UploadPrivateFile()} function. Then, use the `file_uri` parameter to create a signed URL to access the uploaded file. + * + * @param params - Parameters for creating signed URL + * @returns Promise resolving to an object with a temporary `signed_url`. + * + * @example + * ```typescript + * // Create a signed URL for a private file + * const { signed_url } = await base44.integrations.Core.CreateFileSignedUrl({ + * file_uri: "private/user123/document.pdf", + * expires_in: 7200 // URL expires in 2 hours + * }); + * console.log(signed_url); // https://...?signature=... + * ``` + */ + CreateFileSignedUrl( + params: CreateFileSignedUrlParams + ): Promise; +} + /** * Integrations module for calling integration endpoints. * @@ -48,66 +383,13 @@ export type IntegrationPackage = { * * - **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. * - **Service role authentication** (`base44.asServiceRole.integrations`): Integration endpoints are invoked with elevated admin-level permissions. The endpoints execute with admin authentication context. - * - * @example - * ```typescript - * // Send email using Core package - * const emailResult = await base44.integrations.Core.SendEmail({ - * to: 'user@example.com', - * subject: 'Hello from Base44', - * body: 'This is a test email' - * }); - * ``` - * - * @example - * ```typescript - * // Upload file using Core package in React - * const handleFileUpload = async (event: React.ChangeEvent) => { - * const file = event.target.files?.[0]; - * if (file) { - * const uploadResult = await base44.integrations.Core.UploadFile({ - * file: file, - * metadata: { type: 'profile-picture' } - * }); - * } - * }; - * ``` - * - * @example - * ```typescript - * // Use with service role - * const adminEmail = await base44.asServiceRole.integrations.Core.SendEmail({ - * to: 'admin@example.com', - * subject: 'Admin notification', - * body: 'System alert' - * }); - * ``` */ -export interface IntegrationsModule { +export type IntegrationsModule = { /** * Core package containing built-in Base44 integration functions. - * - * The core integrations package includes the following functions: - * - `InvokeLLM`: Generate text or structured JSON data using AI models. - * - `GenerateImage`: Create AI-generated images from text prompts. - * - `UploadFile`: Upload files to public storage and get a URL. - * - `SendEmail`: Send emails to users. - * - `ExtractDataFromUploadedFile`: Extract structured data (CSV, PDF, etc.) from uploaded files. - * - `UploadPrivateFile`: Upload files to private storage (requires signed URLs to access). - * - `CreateFileSignedUrl`: Generate temporary access links for private files. - * - * @example - * ```typescript - * // Send an email - * await base44.integrations.Core.SendEmail({ - * to: 'user@example.com', - * subject: 'Welcome', - * body: 'Welcome to our app!' - * }); - * ``` */ - Core: IntegrationPackage; - + Core: CoreIntegrations; +} & { /** * Access to additional integration packages. * @@ -115,4 +397,4 @@ export interface IntegrationsModule { * accessible using the same pattern as Core. */ [packageName: string]: IntegrationPackage; -} +}; From 9ee33f9bc9aeba999fb8902953654c03ace53dcb Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 3 Dec 2025 10:37:48 +0200 Subject: [PATCH 18/31] more updates --- .../file-processing/styling.css | 10 +- .../typedoc-mintlify-linked-types.js | 503 ++++++++---- .../typedoc-plugin/typedoc-mintlify-plugin.js | 2 +- .../typedoc-mintlify-returns.js | 720 ++++++++++++------ src/client.ts | 17 +- src/client.types.ts | 11 +- src/modules/agents.types.ts | 24 +- src/modules/auth.ts | 4 +- src/modules/auth.types.ts | 72 +- src/modules/entities.types.ts | 12 + src/modules/integrations.types.ts | 2 +- 11 files changed, 894 insertions(+), 483 deletions(-) diff --git a/scripts/mintlify-post-processing/file-processing/styling.css b/scripts/mintlify-post-processing/file-processing/styling.css index a0aa60a..87bc800 100644 --- a/scripts/mintlify-post-processing/file-processing/styling.css +++ b/scripts/mintlify-post-processing/file-processing/styling.css @@ -117,8 +117,12 @@ a:has(code) { color: #ff8844 !important; /* light orange */ } -/* Hide nested TOC items on interface pages */ -body:has([data-page-href*="/content/interfaces/"]) .toc li[data-depth]:not([data-depth="1"]) { +/* 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"]) { display: none !important; } - diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js index 3df72b5..9b6bb3e 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js @@ -2,14 +2,17 @@ * Linked type extraction and property parsing functions */ -import * as fs from 'fs'; -import * as path from 'path'; -import { ReflectionKind } from 'typedoc'; - -const TYPES_TO_EXPOSE_PATH = path.resolve(process.cwd(), 'scripts/mintlify-post-processing/types-to-expose.json'); +import * as fs from "fs"; +import * as path from "path"; +import { ReflectionKind } from "typedoc"; + +const TYPES_TO_EXPOSE_PATH = path.resolve( + process.cwd(), + "scripts/mintlify-post-processing/types-to-expose.json" +); let exposedTypeNames = null; try { - const raw = fs.readFileSync(TYPES_TO_EXPOSE_PATH, 'utf-8'); + const raw = fs.readFileSync(TYPES_TO_EXPOSE_PATH, "utf-8"); const parsed = JSON.parse(raw); if (Array.isArray(parsed)) { exposedTypeNames = new Set(parsed); @@ -21,30 +24,30 @@ try { const PROPERTY_KINDS = new Set([ ReflectionKind.Property, - ReflectionKind.PropertySignature + ReflectionKind.PropertySignature, ]); const PRIMITIVE_REFERENCES = new Set([ - 'any', - 'string', - 'number', - 'boolean', - 'void', - 'null', - 'undefined', - 'object', - 'Array', - 'Promise', - 'Record', - 'Map', - 'Set', - 'Date' + "any", + "string", + "number", + "boolean", + "void", + "null", + "undefined", + "object", + "Array", + "Promise", + "Record", + "Map", + "Set", + "Date", ]); const KIND_DIRECTORY_MAP = { - [ReflectionKind.Class]: 'classes', - [ReflectionKind.Interface]: 'interfaces', - [ReflectionKind.TypeAlias]: 'type-aliases' + [ReflectionKind.Class]: "classes", + [ReflectionKind.Interface]: "interfaces", + [ReflectionKind.TypeAlias]: "type-aliases", }; function resolveTypePath(typeName, context, targetKind = null) { @@ -57,56 +60,85 @@ function resolveTypePath(typeName, context, targetKind = null) { } const { app, currentPagePath } = context; - const outputDir = app.options.getValue('out') || 'docs'; + const outputDir = app.options.getValue("out") || "docs"; - const directory = KIND_DIRECTORY_MAP[targetKind] || 'interfaces'; + const directory = KIND_DIRECTORY_MAP[targetKind] || "interfaces"; const filePath = path.join(outputDir, directory, `${typeName}.mdx`); if (currentPagePath) { const currentDir = path.dirname(path.join(outputDir, currentPagePath)); - const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); - return relativePath.startsWith('.') ? relativePath : `./${relativePath}`; + const relativePath = path + .relative(currentDir, filePath) + .replace(/\\/g, "/"); + return relativePath.startsWith(".") ? relativePath : `./${relativePath}`; } - return path.relative(outputDir, filePath).replace(/\\/g, '/'); + return path.relative(outputDir, filePath).replace(/\\/g, "/"); } /** * Extract properties from a linked type using TypeDoc's reflection API + * Returns { properties: [], indexSignature: null } or just properties array for backward compatibility */ -export function extractPropertiesFromLinkedType(linkedTypeInfo, context, visited = new Set()) { +export function extractPropertiesFromLinkedType( + linkedTypeInfo, + context, + visited = new Set(), + options = {} +) { + const emptyResult = options.includeIndexSignature + ? { properties: [], indexSignature: null } + : []; + if (!linkedTypeInfo || !context) { - return []; + return emptyResult; } const { typeName } = linkedTypeInfo; const visitKey = typeName; if (!typeName || visited.has(visitKey)) { - return []; + return emptyResult; } visited.add(visitKey); try { // First, try to get the type from TypeDoc's reflection API - const { properties: reflectionProps, description: reflectionDescription } = extractPropertiesFromReflection(typeName, context, visited); - if (reflectionProps.length > 0) { + const { + properties: reflectionProps, + description: reflectionDescription, + indexSignature, + } = extractPropertiesFromReflection(typeName, context, visited); + if (reflectionProps.length > 0 || indexSignature) { if (reflectionDescription && linkedTypeInfo) { linkedTypeInfo.description = reflectionDescription; } + if (options.includeIndexSignature) { + return { properties: reflectionProps, indexSignature }; + } return reflectionProps; } // Fallback: try to read from generated markdown file - const { properties: markdownProps, description: markdownDescription } = extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + const { + properties: markdownProps, + description: markdownDescription, + indexSignature: mdIndexSig, + } = extractPropertiesFromMarkdownFile(linkedTypeInfo, context); if (markdownDescription && linkedTypeInfo) { linkedTypeInfo.description = markdownDescription; } + if (options.includeIndexSignature) { + return { properties: markdownProps, indexSignature: mdIndexSig || null }; + } return markdownProps; } catch (error) { - console.warn(`Error extracting properties for type ${typeName}:`, error.message); - return []; + console.warn( + `Error extracting properties for type ${typeName}:`, + error.message + ); + return emptyResult; } finally { visited.delete(visitKey); } @@ -114,7 +146,7 @@ export function extractPropertiesFromLinkedType(linkedTypeInfo, context, visited export function getLinkedTypeDescription(linkedTypeInfo, context) { if (!linkedTypeInfo || !context) { - return ''; + return ""; } if (linkedTypeInfo.description) { return linkedTypeInfo.description; @@ -122,11 +154,12 @@ export function getLinkedTypeDescription(linkedTypeInfo, context) { const { typeName } = linkedTypeInfo; if (!typeName) { - return ''; + return ""; } try { - const project = context.page?.model?.project || context.app?.converter?.project; + const project = + context.page?.model?.project || context.app?.converter?.project; if (project) { const reflection = findReflectionByName(project, typeName); if (reflection) { @@ -142,7 +175,10 @@ export function getLinkedTypeDescription(linkedTypeInfo, context) { } try { - const { description } = extractPropertiesFromMarkdownFile(linkedTypeInfo, context); + const { description } = extractPropertiesFromMarkdownFile( + linkedTypeInfo, + context + ); if (description) { linkedTypeInfo.description = description; return description; @@ -151,7 +187,7 @@ export function getLinkedTypeDescription(linkedTypeInfo, context) { // ignore markdown fallback issues } - return ''; + return ""; } /** @@ -159,7 +195,7 @@ export function getLinkedTypeDescription(linkedTypeInfo, context) { */ function extractPropertiesFromReflection(typeName, context, visited) { if (!context) { - return { properties: [], description: '' }; + return { properties: [], description: "", indexSignature: null }; } const { app, page } = context; @@ -168,13 +204,13 @@ function extractPropertiesFromReflection(typeName, context, visited) { // Access the project through the page's model const project = page?.model?.project || app?.converter?.project; if (!project) { - return { properties: [], description: '' }; + return { properties: [], description: "", indexSignature: null }; } // Find the type reflection in the project const typeReflection = findReflectionByName(project, typeName); if (!typeReflection) { - return { properties: [], description: '' }; + return { properties: [], description: "", indexSignature: null }; } // Extract properties from the reflection @@ -188,12 +224,63 @@ function extractPropertiesFromReflection(typeName, context, visited) { } } + // Extract index signature if present + const indexSignature = extractIndexSignature(typeReflection, context); + const description = getCommentSummary(typeReflection, context); - return { properties, description }; + return { properties, description, indexSignature }; } catch (error) { - console.warn(`Error extracting properties from reflection for ${typeName}:`, error.message); - return { properties: [], description: '' }; + console.warn( + `Error extracting properties from reflection for ${typeName}:`, + error.message + ); + return { properties: [], description: "", indexSignature: null }; + } +} + +/** + * Extract index signature from a reflection (e.g., [key: string]: any) + */ +function extractIndexSignature(reflection, context) { + if (!reflection) { + return null; + } + + // Check for indexSignatures array on the reflection + const indexSigs = reflection.indexSignatures || reflection.indexSignature; + if (!indexSigs) { + return null; + } + + const sigArray = Array.isArray(indexSigs) ? indexSigs : [indexSigs]; + if (sigArray.length === 0) { + return null; + } + + // Get the first index signature + const sig = sigArray[0]; + if (!sig) { + return null; } + + // Extract key type (usually string) + let keyType = "string"; + if (sig.parameters && sig.parameters.length > 0) { + const keyParam = sig.parameters[0]; + keyType = getTypeString(keyParam.type) || "string"; + } + + // Extract value type + const valueType = getTypeString(sig.type) || "any"; + + // Extract description from comment + const description = getCommentSummary(sig, context) || ""; + + return { + keyType, + valueType, + description, + }; } /** @@ -218,25 +305,25 @@ function findReflectionByName(reflection, name) { * Get a string representation of a type */ function getTypeString(type) { - if (!type) return 'any'; + if (!type) return "any"; switch (type.type) { - case 'intrinsic': + case "intrinsic": return type.name; - case 'reference': + case "reference": return formatReferenceType(type); - case 'array': + case "array": return `${getTypeString(type.elementType)}[]`; - case 'union': - return type.types?.map(t => getTypeString(t)).join(' | ') || 'any'; - case 'intersection': - return type.types?.map(t => getTypeString(t)).join(' & ') || 'any'; - case 'literal': + case "union": + return type.types?.map((t) => getTypeString(t)).join(" | ") || "any"; + case "intersection": + return type.types?.map((t) => getTypeString(t)).join(" & ") || "any"; + case "literal": return JSON.stringify(type.value); - case 'reflection': - return 'object'; + case "reflection": + return "object"; default: - return type.name || 'any'; + return type.name || "any"; } } @@ -251,7 +338,7 @@ function isOptional(child) { * Check if a type is object-like (has properties) */ function isObjectLikeType(type) { - return type?.type === 'reflection' && type.declaration?.children; + return type?.type === "reflection" && type.declaration?.children; } /** @@ -283,75 +370,77 @@ function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) { const { currentPagePath, app } = context; if (!app || !app.options) { - return { properties: [], description: '' }; + return { properties: [], description: "" }; } try { // Get the output directory from TypeDoc (usually 'docs') - const outputDir = app.options.getValue('out') || 'docs'; - + const outputDir = app.options.getValue("out") || "docs"; + // Convert relative link to file path // Links can be: // - Just the type name: "LoginViaEmailPasswordResponse" // - Relative path: "../interfaces/LoginViaEmailPasswordResponse" or "./interfaces/LoginViaEmailPasswordResponse" // - Absolute-looking: "interfaces/LoginViaEmailPasswordResponse" let filePath; - + // Remove .md or .mdx extension if present - let cleanTypePath = typePath.replace(/\.(md|mdx)$/, ''); - - if (cleanTypePath.startsWith('../') || cleanTypePath.startsWith('./')) { + let cleanTypePath = typePath.replace(/\.(md|mdx)$/, ""); + + if (cleanTypePath.startsWith("../") || cleanTypePath.startsWith("./")) { // Relative path - resolve from current page's directory - const currentDir = path.dirname(path.join(outputDir, currentPagePath || '')); + const currentDir = path.dirname( + path.join(outputDir, currentPagePath || "") + ); const basePath = path.resolve(currentDir, cleanTypePath); - + // Try .mdx first, then .md - if (!basePath.endsWith('.md') && !basePath.endsWith('.mdx')) { - const mdxPath = basePath + '.mdx'; - const mdPath = basePath + '.md'; + if (!basePath.endsWith(".md") && !basePath.endsWith(".mdx")) { + const mdxPath = basePath + ".mdx"; + const mdPath = basePath + ".md"; filePath = fs.existsSync(mdxPath) ? mdxPath : mdPath; } else { filePath = basePath; } - } else if (cleanTypePath.includes('/')) { + } else if (cleanTypePath.includes("/")) { // Path with directory separator filePath = path.join(outputDir, cleanTypePath); - + // Try .mdx first, then .md - if (!filePath.endsWith('.md') && !filePath.endsWith('.mdx')) { - const mdxPath = filePath + '.mdx'; - const mdPath = filePath + '.md'; + if (!filePath.endsWith(".md") && !filePath.endsWith(".mdx")) { + const mdxPath = filePath + ".mdx"; + const mdPath = filePath + ".md"; filePath = fs.existsSync(mdxPath) ? mdxPath : mdPath; } } else { // Just the type name - try interfaces/ first, then type-aliases/ // Try .mdx first, then .md - filePath = path.join(outputDir, 'interfaces', cleanTypePath + '.mdx'); + filePath = path.join(outputDir, "interfaces", cleanTypePath + ".mdx"); if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'interfaces', cleanTypePath + '.md'); + filePath = path.join(outputDir, "interfaces", cleanTypePath + ".md"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', cleanTypePath + '.mdx'); + filePath = path.join(outputDir, "type-aliases", cleanTypePath + ".mdx"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', cleanTypePath + '.md'); + filePath = path.join(outputDir, "type-aliases", cleanTypePath + ".md"); } } // Normalize the path filePath = path.normalize(filePath); - + // Check if file exists if (!fs.existsSync(filePath)) { // Don't warn during generation - the file might not exist yet - return { properties: [], description: '' }; + return { properties: [], description: "" }; } - const content = fs.readFileSync(filePath, 'utf-8'); + const content = fs.readFileSync(filePath, "utf-8"); return parsePropertiesFromTypeFile(content); } catch (error) { // Silent failure during generation - return { properties: [], description: '' }; + return { properties: [], description: "" }; } } @@ -360,148 +449,213 @@ function extractPropertiesFromMarkdownFile(linkedTypeInfo, context) { */ function parsePropertiesFromTypeFile(content) { const properties = []; - const lines = content.split('\n'); - + const lines = content.split("\n"); + // Collect intro description until Properties section const introLines = []; let descriptionCaptured = false; + // Extract Indexable section if present + const indexSignature = parseIndexableSection(content); + // Find the Properties section let inPropertiesSection = false; let i = 0; - + while (i < lines.length) { const line = lines[i]; - + // Start of Properties section if (line.match(/^##\s+Properties\s*$/)) { inPropertiesSection = true; i++; continue; } - + if (!inPropertiesSection) { if (line.trim()) { introLines.push(line); descriptionCaptured = true; } else if (descriptionCaptured) { - introLines.push(''); + introLines.push(""); } } - + // Stop at next top-level heading (##) - if (inPropertiesSection && line.match(/^##\s+/) && !line.match(/^##\s+Properties\s*$/)) { + if ( + inPropertiesSection && + line.match(/^##\s+/) && + !line.match(/^##\s+Properties\s*$/) + ) { break; } - + // Parse property: ### propertyName or ### propertyName? if (inPropertiesSection && line.match(/^###\s+/)) { const propMatch = line.match(/^###\s+(.+)$/); if (propMatch) { const rawName = propMatch[1].trim(); - const optional = rawName.endsWith('?'); + const optional = rawName.endsWith("?"); // Unescape markdown escapes (e.g., access\_token -> access_token) let name = optional ? rawName.slice(0, -1).trim() : rawName.trim(); - name = name.replace(/\\_/g, '_').replace(/\\\*/g, '*').replace(/\\`/g, '`'); - + name = name + .replace(/\\_/g, "_") + .replace(/\\\*/g, "*") + .replace(/\\`/g, "`"); + i++; // Skip blank lines - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - + // Get type from next line: > **name**: `type` or > `optional` **name**: `type` - let type = 'any'; - if (i < lines.length && lines[i].includes('`')) { + let type = "any"; + if (i < lines.length && lines[i].includes("`")) { const typeMatch = lines[i].match(/`([^`]+)`/); if (typeMatch) { type = typeMatch[1].trim(); } i++; } - + // Skip blank lines - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - + // Collect description and nested properties const descriptionLines = []; const nested = []; - + // Look for nested properties (#### heading) while (i < lines.length) { const nextLine = lines[i]; // Stop at next property (###) or section end (## or ***) - if (nextLine.match(/^###\s+/) || nextLine.match(/^##\s+/) || nextLine === '***') { + if ( + nextLine.match(/^###\s+/) || + nextLine.match(/^##\s+/) || + nextLine === "***" + ) { break; } - + // Check for nested property (####) if (nextLine.match(/^####\s+/)) { const nestedMatch = nextLine.match(/^####\s+(.+)$/); if (nestedMatch) { const nestedRawName = nestedMatch[1].trim(); - const nestedOptional = nestedRawName.endsWith('?'); + const nestedOptional = nestedRawName.endsWith("?"); // Unescape markdown escapes - let nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); - nestedName = nestedName.replace(/\\_/g, '_').replace(/\\\*/g, '*').replace(/\\`/g, '`'); - + let nestedName = nestedOptional + ? nestedRawName.slice(0, -1).trim() + : nestedRawName.trim(); + nestedName = nestedName + .replace(/\\_/g, "_") + .replace(/\\\*/g, "*") + .replace(/\\`/g, "`"); + i++; - while (i < lines.length && lines[i].trim() === '') { + while (i < lines.length && lines[i].trim() === "") { i++; } - - let nestedType = 'any'; - if (i < lines.length && lines[i].includes('`')) { + + let nestedType = "any"; + if (i < lines.length && lines[i].includes("`")) { const nestedTypeMatch = lines[i].match(/`([^`]+)`/); if (nestedTypeMatch) { nestedType = nestedTypeMatch[1].trim(); } i++; } - - while (i < lines.length && lines[i].trim() === '') { + + while (i < lines.length && lines[i].trim() === "") { i++; } - + const nestedDescLines = []; - while (i < lines.length && !lines[i].match(/^####\s+/) && !lines[i].match(/^###\s+/) && - !lines[i].match(/^##\s+/) && lines[i] !== '***') { + while ( + i < lines.length && + !lines[i].match(/^####\s+/) && + !lines[i].match(/^###\s+/) && + !lines[i].match(/^##\s+/) && + lines[i] !== "***" + ) { nestedDescLines.push(lines[i]); i++; } - + nested.push({ name: nestedName, type: nestedType, - description: nestedDescLines.join('\n').trim(), - optional: nestedOptional + description: nestedDescLines.join("\n").trim(), + optional: nestedOptional, }); continue; } } - + descriptionLines.push(nextLine); i++; } - + properties.push({ name, type, - description: descriptionLines.join('\n').trim(), + description: descriptionLines.join("\n").trim(), optional, - nested + nested, }); continue; } } - + i++; } - - const description = introLines.join('\n').trim(); - return { properties, description }; + + const description = introLines.join("\n").trim(); + return { properties, description, indexSignature }; +} + +/** + * Parse the Indexable section from markdown content + * TypeDoc generates: ## Indexable\n\n\\[`key`: `string`\\]: `valueType`\n\nDescription + */ +function parseIndexableSection(content) { + const indexableMatch = content.match( + /##\s+Indexable\s*\n+([^\n]+)\n*([\s\S]*?)(?=\n##|\n\*\*\*|$)/i + ); + if (!indexableMatch) { + return null; + } + + // Parse the signature line: \[`key`: `string`\]: `valueType` or [`key`: `string`]: `valueType` + const signatureLine = indexableMatch[1].trim(); + const description = (indexableMatch[2] || "").trim(); + + // Extract key type and value type from the signature + // Pattern: \[`keyName`: `keyType`\]: `valueType` or similar + const sigMatch = signatureLine.match( + /\[`?(\w+)`?\s*:\s*`?(\w+)`?\s*\]\s*:\s*`?([^`\n]+)`?/ + ); + if (!sigMatch) { + // Try simpler pattern + const simpleMatch = signatureLine.match(/`(\w+)`/g); + if (simpleMatch && simpleMatch.length >= 2) { + return { + keyType: simpleMatch[0].replace(/`/g, ""), + valueType: simpleMatch[simpleMatch.length - 1].replace(/`/g, ""), + description, + }; + } + return null; + } + + return { + keyType: sigMatch[2] || "string", + valueType: sigMatch[3] || "any", + description, + }; } function buildPropertyFromReflection(child, context, visited) { @@ -514,10 +668,14 @@ function buildPropertyFromReflection(child, context, visited) { type: getTypeString(child.type), description: getCommentSummary(child, context), optional: isOptional(child), - nested: [] + nested: [], }; - const nestedFromType = extractNestedPropertiesFromType(child.type, context, visited); + const nestedFromType = extractNestedPropertiesFromType( + child.type, + context, + visited + ); if (nestedFromType.length > 0) { property.nested = nestedFromType; } @@ -551,7 +709,7 @@ function extractNestedPropertiesFromType(type, context, visited) { } switch (type.type) { - case 'reference': { + case "reference": { const referencedName = getReferenceTypeName(type); if (!referencedName || PRIMITIVE_REFERENCES.has(referencedName)) { return []; @@ -562,22 +720,30 @@ function extractNestedPropertiesFromType(type, context, visited) { visited ); } - case 'array': - return extractNestedPropertiesFromType(type.elementType, context, visited); - case 'union': - case 'intersection': { + case "array": + return extractNestedPropertiesFromType( + type.elementType, + context, + visited + ); + case "union": + case "intersection": { if (!Array.isArray(type.types)) { return []; } for (const subType of type.types) { - const nested = extractNestedPropertiesFromType(subType, context, visited); + const nested = extractNestedPropertiesFromType( + subType, + context, + visited + ); if (nested.length > 0) { return nested; } } return []; } - case 'reflection': + case "reflection": return extractNestedPropertiesFromReflectionType(type, context, visited); default: return []; @@ -589,12 +755,12 @@ function getReferenceTypeName(type) { return null; } - if (typeof type.name === 'string' && type.name) { + if (typeof type.name === "string" && type.name) { return type.name; } - if (typeof type.qualifiedName === 'string' && type.qualifiedName) { - const segments = type.qualifiedName.split('.'); + if (typeof type.qualifiedName === "string" && type.qualifiedName) { + const segments = type.qualifiedName.split("."); return segments[segments.length - 1]; } @@ -607,7 +773,7 @@ function getReferenceTypeName(type) { function getCommentSummary(reflection, context) { if (!reflection?.comment) { - return ''; + return ""; } const parts = []; @@ -616,61 +782,68 @@ function getCommentSummary(reflection, context) { } if (reflection.comment.blockTags) { for (const tag of reflection.comment.blockTags) { - if (tag.tag === '@remarks' && Array.isArray(tag.content)) { + if (tag.tag === "@remarks" && Array.isArray(tag.content)) { parts.push(...tag.content); } - if ((tag.tag === '@see' || tag.tag === '@link' || tag.tag === '@linkcode' || tag.tag === '@returns') && Array.isArray(tag.content)) { + if ( + (tag.tag === "@see" || + tag.tag === "@link" || + tag.tag === "@linkcode" || + tag.tag === "@returns") && + Array.isArray(tag.content) + ) { parts.push(...tag.content); } } } if (parts.length === 0) { - return ''; + return ""; } - return parts.map((part) => renderCommentPart(part, context)).join('') || ''; + return parts.map((part) => renderCommentPart(part, context)).join("") || ""; } function renderCommentPart(part, context) { if (!part) { - return ''; + return ""; } switch (part.kind) { - case 'text': - return part.text || ''; - case 'code': - return part.text ? `\`${part.text}\`` : ''; - case 'inline-tag': - if (part.tag === '@link') { - const linkText = (part.text || part.target?.name || '').trim(); + case "text": + return part.text || ""; + case "code": + return part.text ? `\`${part.text}\`` : ""; + case "inline-tag": + if (part.tag === "@link") { + const linkText = (part.text || part.target?.name || "").trim(); const typeName = part.target?.name || null; - const linkTarget = typeName ? resolveTypePath(typeName, context, part.target?.kind) : null; + const linkTarget = typeName + ? resolveTypePath(typeName, context, part.target?.kind) + : null; if (linkTarget && linkText) { return `[${linkText}](${linkTarget})`; } if (linkText) { return linkText; } - return typeName || ''; + return typeName || ""; } - return part.text || ''; + return part.text || ""; default: - return part.text || ''; + return part.text || ""; } } function formatReferenceType(type) { if (!type) { - return 'any'; + return "any"; } - let typeName = type.name || 'any'; + let typeName = type.name || "any"; if (type.typeArguments && type.typeArguments.length > 0) { - const args = type.typeArguments.map((arg) => getTypeString(arg)).join(', '); + const args = type.typeArguments.map((arg) => getTypeString(arg)).join(", "); typeName += `<${args}>`; } return typeName; } - diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js index e33838e..966c4a3 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-plugin.js @@ -24,7 +24,7 @@ import { } from "./typedoc-mintlify-content.js"; // Shared flag with the post-processing script so Panel output can be toggled. -const PANELS_ENABLED = process.env.MINTLIFY_INCLUDE_PANELS === 'true'; +const PANELS_ENABLED = process.env.MINTLIFY_INCLUDE_PANELS === "true"; /** * Plugin load function called by TypeDoc diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js index c249426..38e1374 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-returns.js @@ -2,39 +2,43 @@ * Return/Response field conversion functions for TypeDoc Mintlify plugin */ -import * as fs from 'fs'; -import * as path from 'path'; -import { extractPropertiesFromLinkedType, getLinkedTypeDescription } from './typedoc-mintlify-linked-types.js'; -import { escapeAttribute } from './typedoc-mintlify-utils.js'; +import * as fs from "fs"; +import * as path from "path"; +import { + extractPropertiesFromLinkedType, + getLinkedTypeDescription, +} from "./typedoc-mintlify-linked-types.js"; +import { escapeAttribute } from "./typedoc-mintlify-utils.js"; const PRIMITIVE_TYPES = [ - 'any', - 'string', - 'number', - 'boolean', - 'void', - 'null', - 'undefined', - 'object', - 'Array', - 'Promise', + "any", + "string", + "number", + "boolean", + "void", + "null", + "undefined", + "object", + "Array", + "Promise", ]; function extractReturnsDescription(page) { if (!page?.model) { - return ''; + return ""; } - const signature = Array.isArray(page.model.signatures) && page.model.signatures.length > 0 - ? page.model.signatures[0] - : null; + const signature = + Array.isArray(page.model.signatures) && page.model.signatures.length > 0 + ? page.model.signatures[0] + : null; const returnsTag = signature?.comment?.blockTags?.find( - (tag) => tag.tag === '@returns' || tag.tag === '@return' + (tag) => tag.tag === "@returns" || tag.tag === "@return" ); if (!returnsTag || !returnsTag.content) { - return ''; + return ""; } return renderCommentParts(returnsTag.content).trim(); @@ -42,25 +46,27 @@ function extractReturnsDescription(page) { function renderCommentParts(parts) { if (!Array.isArray(parts)) { - return ''; + return ""; } - return parts.map((part) => { - if (!part) return ''; - switch (part.kind) { - case 'text': - return part.text || ''; - case 'code': - return part.text ? '`' + part.text + '`' : ''; - case 'inline-tag': - if (part.tag === '@link') { - return (part.text || part.target?.name || '').trim(); - } - return part.text || ''; - default: - return part.text || ''; - } - }).join(''); + return parts + .map((part) => { + if (!part) return ""; + switch (part.kind) { + case "text": + return part.text || ""; + case "code": + return part.text ? "`" + part.text + "`" : ""; + case "inline-tag": + if (part.tag === "@link") { + return (part.text || part.target?.name || "").trim(); + } + return part.text || ""; + default: + return part.text || ""; + } + }) + .join(""); } /** @@ -74,53 +80,63 @@ function resolveTypePath(typeName, app, currentPagePath = null) { if (PRIMITIVE_TYPES.includes(typeName)) { return null; } - + if (!app || !app.options) { return null; } - - const outputDir = app.options.getValue('out') || 'docs'; - + + const outputDir = app.options.getValue("out") || "docs"; + // Try interfaces/ first, then type-aliases/ - let filePath = path.join(outputDir, 'interfaces', typeName + '.mdx'); + let filePath = path.join(outputDir, "interfaces", typeName + ".mdx"); if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'interfaces', typeName + '.md'); + filePath = path.join(outputDir, "interfaces", typeName + ".md"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', typeName + '.mdx'); + filePath = path.join(outputDir, "type-aliases", typeName + ".mdx"); } if (!fs.existsSync(filePath)) { - filePath = path.join(outputDir, 'type-aliases', typeName + '.md'); + filePath = path.join(outputDir, "type-aliases", typeName + ".md"); } - + if (fs.existsSync(filePath)) { // Convert to relative path from current page if possible if (currentPagePath) { const currentDir = path.dirname(path.join(outputDir, currentPagePath)); - const relativePath = path.relative(currentDir, filePath).replace(/\\/g, '/'); - return relativePath.startsWith('.') ? relativePath : './' + relativePath; + const relativePath = path + .relative(currentDir, filePath) + .replace(/\\/g, "/"); + return relativePath.startsWith(".") ? relativePath : "./" + relativePath; } // Otherwise return path relative to outputDir - return path.relative(outputDir, filePath).replace(/\\/g, '/'); + return path.relative(outputDir, filePath).replace(/\\/g, "/"); } - + return null; } -export function extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, currentPagePath = null) { +export function extractSignatureInfo( + lines, + linkedTypeNames, + writeLinkedTypesFile, + app, + currentPagePath = null +) { const signatureMap = new Map(); const linkedTypeMap = new Map(); - + for (let i = 0; i < lines.length; i++) { const line = lines[i]; // Match function signature: > **methodName**(...): `returnType` or `returnType`\<`generic`\> // Handle both simple types and generic types like `Promise`\<`any`\> or `Promise`\<[`TypeName`](link)\> - const sigMatch = line.match(/^>\s*\*\*(\w+)\*\*\([^)]*\):\s*`([^`]+)`(?:\\<(.+?)\\>)?/); + const sigMatch = line.match( + /^>\s*\*\*(\w+)\*\*\([^)]*\):\s*`([^`]+)`(?:\\<(.+?)\\>)?/ + ); if (sigMatch) { const methodName = sigMatch[1]; let returnType = sigMatch[2]; const genericParam = sigMatch[3]; - + // Check if generic parameter is a markdown link: [`TypeName`](link) if (genericParam) { const linkMatch = genericParam.match(/\[`([^`]+)`\]\(([^)]+)\)/); @@ -128,7 +144,10 @@ export function extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFil const linkedTypeName = linkMatch[1]; const linkedTypePath = linkMatch[2]; returnType = `${returnType}<${linkedTypeName}>`; - linkedTypeMap.set(i, { typeName: linkedTypeName, typePath: linkedTypePath }); + linkedTypeMap.set(i, { + typeName: linkedTypeName, + typePath: linkedTypePath, + }); // Track this type name so we can suppress its documentation page if (linkedTypeNames) { linkedTypeNames.add(linkedTypeName); @@ -136,13 +155,16 @@ export function extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFil } } else { // Simple generic type without link - try to resolve it - const simpleGeneric = genericParam.replace(/`/g, '').trim(); + const simpleGeneric = genericParam.replace(/`/g, "").trim(); returnType = `${returnType}<${simpleGeneric}>`; - + // Try to resolve the type to a documentation file const typePath = resolveTypePath(simpleGeneric, app, currentPagePath); if (typePath) { - linkedTypeMap.set(i, { typeName: simpleGeneric, typePath: typePath }); + linkedTypeMap.set(i, { + typeName: simpleGeneric, + typePath: typePath, + }); if (linkedTypeNames) { linkedTypeNames.add(simpleGeneric); if (writeLinkedTypesFile) writeLinkedTypesFile(); @@ -172,25 +194,37 @@ export function extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFil } } } - + return { signatureMap, linkedTypeMap }; } /** * Convert function returns */ -export function convertFunctionReturns(content, app, page, linkedTypeNames = null, writeLinkedTypesFile = null) { +export function convertFunctionReturns( + content, + app, + page, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { // For functions, we need to extract signature info with linked types - const lines = content.split('\n'); + const lines = content.split("\n"); // Use provided linkedTypeNames Set or create a local one const localLinkedTypeNames = linkedTypeNames || new Set(); const localWriteLinkedTypesFile = writeLinkedTypesFile || (() => {}); - const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, localLinkedTypeNames, localWriteLinkedTypesFile, app, page?.url); - + const { signatureMap, linkedTypeMap } = extractSignatureInfo( + lines, + localLinkedTypeNames, + localWriteLinkedTypesFile, + app, + page?.url + ); + return rewriteReturnSections(content, { - heading: '## Returns', - fieldHeading: '###', - nestedHeading: '####', + heading: "## Returns", + fieldHeading: "###", + nestedHeading: "####", stopOnLevel3: false, signatureMap, linkedTypeMap, @@ -204,14 +238,26 @@ export function convertFunctionReturns(content, app, page, linkedTypeNames = nul /** * Convert interface method returns */ -export function convertInterfaceMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile) { - const lines = content.split('\n'); - const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, page?.url); - +export function convertInterfaceMethodReturns( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile +) { + const lines = content.split("\n"); + const { signatureMap, linkedTypeMap } = extractSignatureInfo( + lines, + linkedTypeNames, + writeLinkedTypesFile, + app, + page?.url + ); + return rewriteReturnSections(content, { - heading: '#### Returns', - fieldHeading: '#####', - nestedHeading: '######', + heading: "#### Returns", + fieldHeading: "#####", + nestedHeading: "######", stopOnLevel3: true, signatureMap, linkedTypeMap, @@ -223,14 +269,26 @@ export function convertInterfaceMethodReturns(content, app, page, linkedTypeName /** * Convert class method returns */ -export function convertClassMethodReturns(content, app, page, linkedTypeNames, writeLinkedTypesFile) { - const lines = content.split('\n'); - const { signatureMap, linkedTypeMap } = extractSignatureInfo(lines, linkedTypeNames, writeLinkedTypesFile, app, page?.url); - +export function convertClassMethodReturns( + content, + app, + page, + linkedTypeNames, + writeLinkedTypesFile +) { + const lines = content.split("\n"); + const { signatureMap, linkedTypeMap } = extractSignatureInfo( + lines, + linkedTypeNames, + writeLinkedTypesFile, + app, + page?.url + ); + return rewriteReturnSections(content, { - heading: '#### Returns', - fieldHeading: '#####', - nestedHeading: '######', + heading: "#### Returns", + fieldHeading: "#####", + nestedHeading: "######", stopOnLevel3: true, signatureMap, linkedTypeMap, @@ -240,36 +298,36 @@ export function convertClassMethodReturns(content, app, page, linkedTypeNames, w } function rewriteReturnSections(content, options) { - const { - heading, - fieldHeading, - nestedHeading, - stopOnLevel3, + const { + heading, + fieldHeading, + nestedHeading, + stopOnLevel3, signatureMap = new Map(), linkedTypeMap = new Map(), app, page, linkedTypeNames = null, - writeLinkedTypesFile = null + writeLinkedTypesFile = null, } = options; - const lines = content.split('\n'); + const lines = content.split("\n"); const result = []; let i = 0; const isTerminatorLine = (line) => { const trimmed = line.trim(); if (!trimmed) return false; - if (trimmed.match(/^#{2,4}\s+Examples?/i) || trimmed === '***') { + if (trimmed.match(/^#{2,4}\s+Examples?/i) || trimmed === "***") { return true; } - if (heading !== '## Returns' && trimmed.startsWith('## ')) { + if (heading !== "## Returns" && trimmed.startsWith("## ")) { return true; } // For function Returns, stop at nested method definitions (#### methodName()) - if (heading === '## Returns' && trimmed.match(/^####\s+\w+\.?\w*\(\)/)) { + if (heading === "## Returns" && trimmed.match(/^####\s+\w+\.?\w*\(\)/)) { return true; } - if (stopOnLevel3 && trimmed.startsWith('### ')) { + if (stopOnLevel3 && trimmed.startsWith("### ")) { return true; } return false; @@ -285,16 +343,19 @@ function rewriteReturnSections(content, options) { i++; } const sectionLines = lines.slice(sectionStart, i); - const sectionContent = sectionLines.join('\n').trim(); + const sectionContent = sectionLines.join("\n").trim(); // For function Returns sections, parse nested fields (### headings) - if (heading === '## Returns') { + if (heading === "## Returns") { // Look backwards to find the function signature let sigLineIdx = i - 2; // Go back past the Returns heading - while (sigLineIdx >= 0 && !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/)) { + while ( + sigLineIdx >= 0 && + !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/) + ) { sigLineIdx--; } - + // If we didn't find it by pattern, try to find it in our signature map if (sigLineIdx < 0 || !signatureMap.has(sigLineIdx)) { // Try searching a bit further back (up to 10 lines) @@ -305,14 +366,18 @@ function rewriteReturnSections(content, options) { } } } - - const returnTypeFromSignature = sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; - const linkedTypeInfo = sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; - const context = app && page ? { app, page, currentPagePath: page.url } : null; - + + const returnTypeFromSignature = + sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; + const linkedTypeInfo = + sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; + const context = + app && page ? { app, page, currentPagePath: page.url } : null; + // Get the type name for display - prefer linkedTypeInfo.typeName, fallback to returnTypeFromSignature - const returnTypeName = linkedTypeInfo?.typeName || returnTypeFromSignature; - + const returnTypeName = + linkedTypeInfo?.typeName || returnTypeFromSignature; + // Track linked type if found if (linkedTypeInfo && linkedTypeNames) { linkedTypeNames.add(linkedTypeInfo.typeName); @@ -320,23 +385,29 @@ function rewriteReturnSections(content, options) { writeLinkedTypesFile(); } } - - const { fields, leadingText, extractedTypeName, typeDescription } = parseReturnFields( - sectionContent, - fieldHeading, - nestedHeading, + + const { + fields, + leadingText, + extractedTypeName, + typeDescription, + indexSignature, + } = parseReturnFields( + sectionContent, + fieldHeading, + nestedHeading, returnTypeFromSignature, linkedTypeInfo, context, linkedTypeNames, writeLinkedTypesFile ); - if (fields.length === 0) { + if (fields.length === 0 && !indexSignature) { result.push(...sectionLines); } else { const typeNameForDisplay = extractedTypeName || returnTypeName; if (typeNameForDisplay) { - result.push(''); + result.push(""); result.push(`\`${typeNameForDisplay}\``); } const descriptionParts = []; @@ -351,14 +422,20 @@ function rewriteReturnSections(content, options) { descriptionParts.push(returnsDescription); } if (descriptionParts.length > 0) { - result.push(''); - result.push(descriptionParts.join('\n\n')); + result.push(""); + result.push(descriptionParts.join("\n\n")); } - const fieldsBlock = formatReturnFieldsOutput(fields, null, linkedTypeNames, writeLinkedTypesFile); + const fieldsBlock = formatReturnFieldsOutput( + fields, + null, + linkedTypeNames, + writeLinkedTypesFile, + indexSignature + ); if (fieldsBlock) { - result.push(''); + result.push(""); result.push(fieldsBlock); - result.push(''); + result.push(""); } } continue; @@ -368,10 +445,13 @@ function rewriteReturnSections(content, options) { // The Returns section starts at i-1 (after the heading line) // Look backwards to find the function signature let sigLineIdx = i - 2; // Go back past the Returns heading - while (sigLineIdx >= 0 && !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/)) { + while ( + sigLineIdx >= 0 && + !lines[sigLineIdx].match(/^>\s*\*\*\w+\*\*\(/) + ) { sigLineIdx--; } - + // If we didn't find it by pattern, try to find it in our signature map // by checking a few lines before the Returns section if (sigLineIdx < 0 || !signatureMap.has(sigLineIdx)) { @@ -383,13 +463,16 @@ function rewriteReturnSections(content, options) { } } } - - const returnTypeFromSignature = sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; - const linkedTypeInfo = sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; - + + const returnTypeFromSignature = + sigLineIdx >= 0 ? signatureMap.get(sigLineIdx) : null; + const linkedTypeInfo = + sigLineIdx >= 0 ? linkedTypeMap.get(sigLineIdx) : null; + // Get the type name for display - prefer linkedTypeInfo.typeName, fallback to returnTypeFromSignature - const returnTypeName = linkedTypeInfo?.typeName || returnTypeFromSignature; - + const returnTypeName = + linkedTypeInfo?.typeName || returnTypeFromSignature; + // Track linked type if found if (linkedTypeInfo && linkedTypeNames) { linkedTypeNames.add(linkedTypeInfo.typeName); @@ -397,23 +480,29 @@ function rewriteReturnSections(content, options) { writeLinkedTypesFile(); } } - - const { fields, leadingText, extractedTypeName, typeDescription } = parseReturnFields( - sectionContent, - fieldHeading, - nestedHeading, + + const { + fields, + leadingText, + extractedTypeName, + typeDescription, + indexSignature, + } = parseReturnFields( + sectionContent, + fieldHeading, + nestedHeading, returnTypeFromSignature, linkedTypeInfo, { app, page, currentPagePath: page.url }, linkedTypeNames, writeLinkedTypesFile ); - if (fields.length === 0) { + if (fields.length === 0 && !indexSignature) { result.push(...sectionLines); } else { const typeNameForDisplay = extractedTypeName || returnTypeName; if (typeNameForDisplay) { - result.push(''); + result.push(""); result.push(`\`${typeNameForDisplay}\``); } const descriptionParts = []; @@ -424,14 +513,20 @@ function rewriteReturnSections(content, options) { descriptionParts.push(leadingText); } if (descriptionParts.length > 0) { - result.push(''); - result.push(descriptionParts.join('\n\n')); + result.push(""); + result.push(descriptionParts.join("\n\n")); } - const fieldsBlock = formatReturnFieldsOutput(fields, null, linkedTypeNames, writeLinkedTypesFile); + const fieldsBlock = formatReturnFieldsOutput( + fields, + null, + linkedTypeNames, + writeLinkedTypesFile, + indexSignature + ); if (fieldsBlock) { - result.push(''); + result.push(""); result.push(fieldsBlock); - result.push(''); + result.push(""); } } continue; @@ -441,20 +536,37 @@ function rewriteReturnSections(content, options) { i++; } - return result.join('\n'); + return result.join("\n"); } -function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTypeFromSignature = null, linkedTypeInfo = null, context = null, linkedTypeNames = null, writeLinkedTypesFile = null) { +function parseReturnFields( + sectionContent, + fieldHeading, + nestedHeading, + returnTypeFromSignature = null, + linkedTypeInfo = null, + context = null, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { let infoForDescription = linkedTypeInfo; - + if (!sectionContent) { // If we have a linked type but no section content, try to extract from the linked type if (linkedTypeInfo && context) { - const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); - if (properties.length > 0) { + const result = extractPropertiesFromLinkedType( + linkedTypeInfo, + context, + new Set(), + { includeIndexSignature: true } + ); + const properties = result.properties || result; + const indexSignature = result.indexSignature || null; + + if (properties.length > 0 || indexSignature) { // Return separate ResponseFields for each property (skip the default "result" field) const resultFields = []; - + // Add a separate ResponseField for each property for (const prop of properties) { resultFields.push({ @@ -462,22 +574,31 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy type: prop.type, description: prop.description, optional: prop.optional, - nested: prop.nested || [] + nested: prop.nested || [], }); } - + return { fields: resultFields, - leadingText: '', + leadingText: "", extractedTypeName: linkedTypeInfo.typeName, - typeDescription: getLinkedTypeDescription(linkedTypeInfo, context) || '' + typeDescription: + getLinkedTypeDescription(linkedTypeInfo, context) || "", + indexSignature, }; } } - return { fields: [], leadingText: '', extractedTypeName: null, typeDescription: getLinkedTypeDescription(infoForDescription, context) || '' }; + return { + fields: [], + leadingText: "", + extractedTypeName: null, + typeDescription: + getLinkedTypeDescription(infoForDescription, context) || "", + indexSignature: null, + }; } - const lines = sectionContent.split('\n'); + const lines = sectionContent.split("\n"); const fields = []; const headingPrefix = fieldHeading ? `${fieldHeading} ` : null; const nestedPrefix = nestedHeading ? `${nestedHeading} ` : null; @@ -486,11 +607,11 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy if (!line) return null; const trimmed = line.trim(); if (!trimmed) return null; - if (trimmed.startsWith('>')) { + if (trimmed.startsWith(">")) { // Handle lines like: > **entities**: `object` or > **auth**: [`AuthMethods`](../interfaces/AuthMethods) const blockMatch = trimmed.match(/^>\s*\*\*([^*]+)\*\*:\s*(.+)$/); if (blockMatch) { - const typePart = blockMatch[2].replace(/`/g, '').trim(); + const typePart = blockMatch[2].replace(/`/g, "").trim(); // Check if it's a markdown link: [TypeName](link) const linkMatch = typePart.match(/^\[([^\]]+)\]\(([^)]+)\)$/); if (linkMatch) { @@ -499,7 +620,7 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy return { type: typePart, link: null }; } } - if (trimmed.includes('`')) { + if (trimmed.includes("`")) { // Extract type from backticks, could be a link: [`AuthMethods`](../interfaces/AuthMethods) const typeMatch = trimmed.match(/`([^`]+)`/); if (typeMatch) { @@ -525,8 +646,10 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy return null; }; - const isHeadingLine = (line) => headingPrefix && line.startsWith(headingPrefix); - const isNestedHeadingLine = (line) => nestedPrefix && line.startsWith(nestedPrefix); + const isHeadingLine = (line) => + headingPrefix && line.startsWith(headingPrefix); + const isNestedHeadingLine = (line) => + nestedPrefix && line.startsWith(nestedPrefix); const leadingLines = []; let index = 0; @@ -541,53 +664,69 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy // If no field headings found, treat as simple return if (!headingPrefix || index >= lines.length) { - let type = returnTypeFromSignature || 'any'; + let type = returnTypeFromSignature || "any"; const descriptionLines = []; - + // Check if there's an existing ResponseField in the content - const responseFieldMatch = sectionContent.match(/]*type="([^"]+)"[^>]*>/); + const responseFieldMatch = sectionContent.match( + /]*type="([^"]+)"[^>]*>/ + ); if (responseFieldMatch) { // Extract type from existing ResponseField const existingType = responseFieldMatch[1]; - if (existingType && existingType !== 'any') { + if (existingType && existingType !== "any") { type = existingType; } } - + for (const line of lines) { // Skip ResponseField tags - we'll replace them - if (line.trim().startsWith('') { + if ( + line.trim().startsWith("" + ) { continue; } const maybeType = extractTypeFromLine(line); - if (maybeType && type === 'any') { - type = typeof maybeType === 'object' ? maybeType.type : maybeType; + if (maybeType && type === "any") { + type = typeof maybeType === "object" ? maybeType.type : maybeType; continue; } - if (line.trim() && !line.trim().startsWith('`') && !line.trim().startsWith('<')) { + if ( + line.trim() && + !line.trim().startsWith("`") && + !line.trim().startsWith("<") + ) { descriptionLines.push(line); } } - let description = descriptionLines.join('\n').trim(); - + let description = descriptionLines.join("\n").trim(); + // Check if we have a linked type to inline let typeInfoToUse = linkedTypeInfo; - + // If we don't have linkedTypeInfo but we have a type name, try to resolve it if (!typeInfoToUse && type && context && context.app) { const simpleTypeName = getSimpleTypeName(type); if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { - const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); + const typePath = resolveTypePath( + simpleTypeName, + context.app, + context.currentPagePath + ); if (typePath) { typeInfoToUse = { typeName: simpleTypeName, typePath }; } else if (simpleTypeName) { // Even if we can't resolve the path, try with just the name - typeInfoToUse = { typeName: simpleTypeName, typePath: simpleTypeName }; + typeInfoToUse = { + typeName: simpleTypeName, + typePath: simpleTypeName, + }; } if (typeInfoToUse) { infoForDescription = typeInfoToUse; } - + // Track resolved linked type if (typeInfoToUse && linkedTypeNames) { linkedTypeNames.add(typeInfoToUse.typeName); @@ -597,13 +736,21 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy } } } - + if (typeInfoToUse && context) { - const properties = extractPropertiesFromLinkedType(typeInfoToUse, context); - if (properties.length > 0) { + const result = extractPropertiesFromLinkedType( + typeInfoToUse, + context, + new Set(), + { includeIndexSignature: true } + ); + const properties = result.properties || result; + const indexSignature = result.indexSignature || null; + + if (properties.length > 0 || indexSignature) { // Return separate ResponseFields for each property (skip the default "result" field) const resultFields = []; - + // Add a separate ResponseField for each property for (const prop of properties) { resultFields.push({ @@ -611,21 +758,23 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy type: prop.type, description: prop.description, optional: prop.optional, - nested: prop.nested || [] + nested: prop.nested || [], }); } - + return { fields: resultFields, - leadingText: '', + leadingText: "", extractedTypeName: typeInfoToUse.typeName, // Pass the type name for display - typeDescription: getLinkedTypeDescription(typeInfoToUse, context) || '' + typeDescription: + getLinkedTypeDescription(typeInfoToUse, context) || "", + indexSignature, }; } } - + // Use 'result' as default name, or extract from description - let name = 'result'; + let name = "result"; if (description) { // Check if description contains a type hint const typeHint = description.match(/(\w+)\s+(?:instance|object|value)/i); @@ -643,9 +792,13 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy nested: [], }, ], - leadingText: '', + leadingText: "", extractedTypeName: null, - typeDescription: getLinkedTypeDescription(infoForDescription || typeInfoToUse, context) || '' + typeDescription: + getLinkedTypeDescription( + infoForDescription || typeInfoToUse, + context + ) || "", }; } @@ -658,30 +811,30 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy } let rawName = headingLine.slice(headingPrefix.length).trim(); - const optional = rawName.endsWith('?'); + const optional = rawName.endsWith("?"); const name = optional ? rawName.slice(0, -1).trim() : rawName.trim(); index++; - while (index < lines.length && lines[index].trim() === '') { + while (index < lines.length && lines[index].trim() === "") { index++; } - let type = 'any'; + let type = "any"; if (index < lines.length) { const maybeType = extractTypeFromLine(lines[index]); if (maybeType) { - type = typeof maybeType === 'object' ? maybeType.type : maybeType; + type = typeof maybeType === "object" ? maybeType.type : maybeType; index++; } } - while (index < lines.length && lines[index].trim() === '') { + while (index < lines.length && lines[index].trim() === "") { index++; } const descriptionLines = []; const nested = []; - + // Collect description and nested fields while ( index < lines.length && @@ -696,24 +849,29 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy while (index < lines.length && isNestedHeadingLine(lines[index])) { const nestedHeadingLine = lines[index]; let nestedRawName = nestedHeadingLine.slice(nestedPrefix.length).trim(); - const nestedOptional = nestedRawName.endsWith('?'); - const nestedName = nestedOptional ? nestedRawName.slice(0, -1).trim() : nestedRawName.trim(); + const nestedOptional = nestedRawName.endsWith("?"); + const nestedName = nestedOptional + ? nestedRawName.slice(0, -1).trim() + : nestedRawName.trim(); index++; - while (index < lines.length && lines[index].trim() === '') { + while (index < lines.length && lines[index].trim() === "") { index++; } - let nestedType = 'any'; + let nestedType = "any"; if (index < lines.length) { const maybeNestedType = extractTypeFromLine(lines[index]); if (maybeNestedType) { - nestedType = typeof maybeNestedType === 'object' ? maybeNestedType.type : maybeNestedType; + nestedType = + typeof maybeNestedType === "object" + ? maybeNestedType.type + : maybeNestedType; index++; } } - while (index < lines.length && lines[index].trim() === '') { + while (index < lines.length && lines[index].trim() === "") { index++; } @@ -730,37 +888,44 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy nested.push({ name: nestedName, type: nestedType, - description: nestedDescLines.join('\n').trim(), + description: nestedDescLines.join("\n").trim(), optional: nestedOptional, }); } - let description = descriptionLines.join('\n').trim(); + let description = descriptionLines.join("\n").trim(); // Check if this field's type is a linked type that should be expanded // Only expand if we don't already have nested fields from headings - if (nested.length === 0 && context && type && type !== 'any') { + if (nested.length === 0 && context && type && type !== "any") { const simpleTypeName = getSimpleTypeName(type); if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { // Try to resolve the type to a linked type - const typePath = resolveTypePath(simpleTypeName, context.app, context.currentPagePath); - const linkedTypeInfo = typePath + const typePath = resolveTypePath( + simpleTypeName, + context.app, + context.currentPagePath + ); + const linkedTypeInfo = typePath ? { typeName: simpleTypeName, typePath } : { typeName: simpleTypeName, typePath: simpleTypeName }; - + // Extract properties from the linked type - const properties = extractPropertiesFromLinkedType(linkedTypeInfo, context); + const properties = extractPropertiesFromLinkedType( + linkedTypeInfo, + context + ); if (properties.length > 0) { // Add properties as nested fields for (const prop of properties) { nested.push({ name: prop.name, type: prop.type, - description: prop.description || '', + description: prop.description || "", optional: prop.optional, }); } - + // Track the linked type if (linkedTypeNames) { linkedTypeNames.add(simpleTypeName); @@ -781,21 +946,49 @@ function parseReturnFields(sectionContent, fieldHeading, nestedHeading, returnTy }); } - return { fields, leadingText: leadingLines.join('\n').trim(), extractedTypeName: null, typeDescription: getLinkedTypeDescription(infoForDescription, context) || '' }; + return { + fields, + leadingText: leadingLines.join("\n").trim(), + extractedTypeName: null, + typeDescription: + getLinkedTypeDescription(infoForDescription, context) || "", + indexSignature: null, + }; } -function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedTypesFile = null) { - let output = ''; - - const PRIMITIVE_TYPES = ['any', 'string', 'number', 'boolean', 'void', 'null', 'undefined', 'object', 'Array', 'Promise']; +function buildResponseFieldsSection( + fields, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { + let output = ""; + + const PRIMITIVE_TYPES = [ + "any", + "string", + "number", + "boolean", + "void", + "null", + "undefined", + "object", + "Array", + "Promise", + ]; for (const field of fields) { - const requiredAttr = field.optional ? '' : ' required'; - const defaultAttr = field.default ? ` default="${escapeAttribute(field.default)}"` : ''; - + const requiredAttr = field.optional ? "" : " required"; + const defaultAttr = field.default + ? ` default="${escapeAttribute(field.default)}"` + : ""; + // Track non-primitive return field types for suppression - if (linkedTypeNames && field.type && !PRIMITIVE_TYPES.includes(field.type)) { - const simpleTypeName = field.type.replace(/[<>\[\]]/g, '').trim(); + if ( + linkedTypeNames && + field.type && + !PRIMITIVE_TYPES.includes(field.type) + ) { + const simpleTypeName = field.type.replace(/[<>\[\]]/g, "").trim(); if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { linkedTypeNames.add(simpleTypeName); if (writeLinkedTypesFile) { @@ -803,8 +996,10 @@ function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedT } } } - - output += `\n`; + + output += `\n`; if (field.description) { output += `\n${field.description}\n`; @@ -813,35 +1008,63 @@ function buildResponseFieldsSection(fields, linkedTypeNames = null, writeLinkedT if (field.nested && field.nested.length > 0) { // Wrap nested fields in an Accordion component output += `\n\n\n`; - output += renderNestedResponseFields(field.nested, linkedTypeNames, writeLinkedTypesFile); - output += '\n'; + output += renderNestedResponseFields( + field.nested, + linkedTypeNames, + writeLinkedTypesFile + ); + output += "\n"; } - output += '\n\n\n'; + output += "\n\n\n"; } return output; } -function formatReturnFieldsOutput(fields, returnType = null, linkedTypeNames = null, writeLinkedTypesFile = null) { - if (!fields || fields.length === 0) { - return ''; +function formatReturnFieldsOutput( + fields, + returnType = null, + linkedTypeNames = null, + writeLinkedTypesFile = null, + indexSignature = null +) { + if ((!fields || fields.length === 0) && !indexSignature) { + return ""; } const isSingleSimpleField = fields.length === 1 && - (!fields[0].nested || fields[0].nested.length === 0); + (!fields[0].nested || fields[0].nested.length === 0) && + !indexSignature; if (isSingleSimpleField) { // For a single, non-object field, we only need to return its description text. // The type is already rendered separately (`typeNameForDisplay`), so avoid wrapping // it in a ResponseField to keep the output concise. - return fields[0].description || ''; + return fields[0].description || ""; } - const fieldsBlock = buildResponseFieldsSection(fields, linkedTypeNames, writeLinkedTypesFile).trimEnd(); - if (!fieldsBlock) { - return ''; + const fieldsBlock = buildResponseFieldsSection( + fields, + linkedTypeNames, + writeLinkedTypesFile + ).trimEnd(); + + // Build index signature as a ResponseField if present + let indexSignatureBlock = ""; + if (indexSignature) { + const keyName = `[key: ${indexSignature.keyType}]`; + const description = indexSignature.description || ""; + indexSignatureBlock = `\n\n${description}\n\n\n\n`; + } + + if (!fieldsBlock && !indexSignatureBlock) { + return ""; } const hasMultipleFields = fields.length > 1; @@ -849,39 +1072,49 @@ function formatReturnFieldsOutput(fields, returnType = null, linkedTypeNames = n (field) => Array.isArray(field.nested) && field.nested.length > 0 ); - if (hasMultipleFields || hasNestedFields) { + if (hasMultipleFields || hasNestedFields || indexSignature) { // Extract the simple type name to display above the Accordion - let typeDisplay = ''; + let typeDisplay = ""; if (returnType) { const simpleTypeName = getSimpleTypeName(returnType); if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { typeDisplay = `\`${simpleTypeName}\`\n\n`; } } - // If we still don't have a type display and have multiple fields, + // If we still don't have a type display and have multiple fields, // try to infer from the context (e.g., if all fields are from the same type) if (!typeDisplay && hasMultipleFields && fields.length > 0) { // Check if we can get a type hint from the first field's description or context // This is a fallback for cases where returnType wasn't passed correctly } - return `${typeDisplay}\n\n${fieldsBlock}\n`; + return `${typeDisplay}\n\n${fieldsBlock}${indexSignatureBlock}\n`; } - return fieldsBlock; + return fieldsBlock + indexSignatureBlock; } -function renderNestedResponseFields(fields, linkedTypeNames = null, writeLinkedTypesFile = null) { +function renderNestedResponseFields( + fields, + linkedTypeNames = null, + writeLinkedTypesFile = null +) { if (!fields || fields.length === 0) { - return ''; + return ""; } - let output = ''; + let output = ""; for (const field of fields) { - const requiredAttr = field.optional ? '' : ' required'; - const defaultAttr = field.default ? ` default="${escapeAttribute(field.default)}"` : ''; - - if (linkedTypeNames && field.type && !PRIMITIVE_TYPES.includes(field.type)) { - const simpleTypeName = field.type.replace(/[<>\[\]]/g, '').trim(); + const requiredAttr = field.optional ? "" : " required"; + const defaultAttr = field.default + ? ` default="${escapeAttribute(field.default)}"` + : ""; + + if ( + linkedTypeNames && + field.type && + !PRIMITIVE_TYPES.includes(field.type) + ) { + const simpleTypeName = field.type.replace(/[<>\[\]]/g, "").trim(); if (simpleTypeName && !PRIMITIVE_TYPES.includes(simpleTypeName)) { linkedTypeNames.add(simpleTypeName); if (writeLinkedTypesFile) { @@ -890,7 +1123,9 @@ function renderNestedResponseFields(fields, linkedTypeNames = null, writeLinkedT } } - output += `\n`; + output += `\n`; if (field.description) { output += `\n${field.description}\n`; @@ -898,11 +1133,15 @@ function renderNestedResponseFields(fields, linkedTypeNames = null, writeLinkedT if (field.nested && field.nested.length > 0) { output += `\n\n\n`; - output += renderNestedResponseFields(field.nested, linkedTypeNames, writeLinkedTypesFile); - output += '\n'; + output += renderNestedResponseFields( + field.nested, + linkedTypeNames, + writeLinkedTypesFile + ); + output += "\n"; } - output += '\n\n\n'; + output += "\n\n\n"; } return output; @@ -914,10 +1153,9 @@ function getSimpleTypeName(typeName) { } // Remove generic arguments if they are still present (e.g., Promise) - const withoutGenerics = typeName.split('<')[0].trim(); + const withoutGenerics = typeName.split("<")[0].trim(); // Type names can include dots for namespaces, so allow those const match = withoutGenerics.match(/^[A-Za-z0-9_.]+$/); return match ? match[0] : null; } - diff --git a/src/client.ts b/src/client.ts index 33ca874..6ae5782 100644 --- a/src/client.ts +++ b/src/client.ts @@ -28,9 +28,7 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * The client supports three authentication modes: * - **Anonymous**: Access modules anonymously without authentication using `base44.moduleName`. Operations are scoped to public data and permissions. * - **User authentication**: Access modules with user-level permissions using `base44.moduleName`. Operations are scoped to the authenticated user's data and permissions. - * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Operations can access data across all users. - * - * Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. + * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Operations can access data across all users. Can only be used in the backend. Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. * * For example, when using the {@linkcode EntitiesModule | entities} module: * - **Anonymous**: Can only read public data. @@ -41,6 +39,19 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * * @param config - Configuration object for the client. * @returns A configured Base44 client instance with access to all SDK modules. + * + * @example + * ```typescript + * // Create a client for your app + * import { createClient } from '@base44/sdk'; + * + * const base44 = createClient({ + * appId: 'my-app-id' + * }); + * + * // Use the client to access your data + * const products = await base44.entities.Products.list(); + * ``` */ export function createClient(config: CreateClientConfig): Base44Client { const { diff --git a/src/client.types.ts b/src/client.types.ts index 8f478fd..f5afa99 100644 --- a/src/client.types.ts +++ b/src/client.types.ts @@ -43,7 +43,7 @@ export interface CreateClientConfig { */ token?: string; /** - * Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. + * Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. Typically, you get this token from a request to a backend function using {@linkcode createClientFromRequest | createClientFromRequest()}. */ serviceToken?: string; /** @@ -70,10 +70,7 @@ export interface CreateClientConfig { /** * The Base44 client instance. * - * Provides access to all SDK modules and methods for interacting with the app. - * - * This is the main client object returned by {@linkcode createClient} and {@linkcode createClientFromRequest}. - * It includes all SDK modules and utility methods for managing authentication and configuration. + * Provides access to all SDK modules for interacting with the app. */ export interface Base44Client { /** {@link EntitiesModule | Entities module} for CRUD operations on your data models. */ @@ -118,7 +115,9 @@ export interface Base44Client { entities: EntitiesModule; /** {@link IntegrationsModule | Integrations module} with elevated permissions. */ integrations: IntegrationsModule; - /** {@link SsoModule | SSO module} for generating SSO tokens. */ + /** {@link SsoModule | SSO module} for generating SSO tokens. + * @internal + */ sso: SsoModule; /** {@link ConnectorsModule | Connectors module} for OAuth token retrieval. */ connectors: ConnectorsModule; diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 9a2d6c9..53240dc 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -31,7 +31,7 @@ export interface AgentMessageToolCall { /** Status of the tool call. */ status: "running" | "success" | "error" | "stopped"; /** Results from the tool call. */ - results?: string | null; + results?: string; } /** @@ -69,7 +69,7 @@ export interface AgentMessageMetadata { /** Email of the user who created the message. */ created_by_email: string; /** Full name of the user who created the message. */ - created_by_full_name: string | null; + created_by_full_name: string; } /** @@ -98,24 +98,28 @@ export interface AgentMessage { id: string; /** Role of the message sender. */ role: "user" | "assistant" | "system"; + /** When the message was created. */ + created_date: string; + /** When the message was last updated. */ + updated_date: string; /** Optional reasoning information for the message. */ reasoning?: AgentMessageReasoning; /** Message content. */ - content?: string | Record | null; + content?: string | Record; /** URLs to files attached to the message. */ - file_urls?: string[] | null; + file_urls?: string[]; /** Tool calls made by the agent. */ - tool_calls?: AgentMessageToolCall[] | null; + tool_calls?: AgentMessageToolCall[]; /** Token usage statistics. */ - usage?: AgentMessageUsage | null; + usage?: AgentMessageUsage; /** Whether the message is hidden from the user. */ hidden?: boolean; /** Custom context provided with the message. */ - custom_context?: AgentMessageCustomContext[] | null; + custom_context?: AgentMessageCustomContext[]; /** Model used to generate the message. */ - model?: string | null; + model?: string; /** Checkpoint ID for the message. */ - checkpoint_id?: string | null; + checkpoint_id?: string; /** Metadata about when and by whom the message was created. */ metadata?: AgentMessageMetadata; /** Additional custom parameters for the message. */ @@ -179,7 +183,7 @@ export interface AgentsModuleConfig { */ export interface AgentsModule { /** - * Gets all conversations. + * Gets all conversations from all agents in the app. * * Retrieves all conversations. Use {@linkcode listConversations | listConversations()} to filter which conversations are returned, apply sorting, or paginate results. Use {@linkcode getConversation | getConversation()} to retrieve a specific conversation by ID. * diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 353abec..6971e2c 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -31,9 +31,7 @@ export function createAuthModule( }, // Update current user data - async updateMe( - data: Partial> - ) { + async updateMe(data: Record) { return axios.put(`/apps/${appId}/entities/User/me`, data); }, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 12eea8d..ff9b856 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -6,24 +6,30 @@ import { AxiosInstance } from "axios"; export interface User { /** Unique user identifier. */ id: string; + /** When the user was created. */ + created_date: string; + /** When the user was last updated. */ + updated_date: string; /** User's email address. */ email: string; /** User's full name. */ - name?: string; - /** User's first name. */ - first_name?: string; - /** User's last name. */ - last_name?: string; - /** URL to user's profile picture. */ - avatar_url?: string; + full_name: string | null; + /** Whether the user is disabled. */ + disabled: boolean | null; + /** Whether the user's email has been verified. */ + is_verified: boolean; + /** The app ID this user belongs to. */ + app_id: string; + /** Whether this is a service account. */ + is_service: boolean; + /** Internal app role. + * @internal + */ + _app_role: string; /** * User's role in the app. Roles are configured in the app settings and determine the user's permissions and access levels. */ - role?: string; - /** Timestamp when the user was created. */ - created_at?: string; - /** Timestamp when the user was last updated. */ - updated_at?: string; + role: string; /** * Additional custom fields defined in the user schema. Any custom properties added to the user schema in the app will be available here with their configured types and values. */ @@ -108,39 +114,6 @@ export interface AuthModuleOptions { * - User invitations * * The auth module is only available in user authentication mode (`base44.auth`). - * - * @example - * ```typescript - * // Login with email and password - * const { access_token, user } = await base44.auth.loginViaEmailPassword( - * 'user@example.com', - * 'password123' - * ); - * ``` - * - * @example - * ```typescript - * // Check if user is authenticated - * const isAuth = await base44.auth.isAuthenticated(); - * ``` - * - * @example - * ```typescript - * // Get current user profile - * const currentUser = await base44.auth.me(); - * ``` - * - * @example - * ```typescript - * // Logout and reload page - * base44.auth.logout(); - * ``` - * - * @example - * ```typescript - * // Logout and redirect to login page - * base44.auth.logout('/login'); - * ``` */ export interface AuthModule { /** @@ -162,7 +135,7 @@ export interface AuthModule { * Updates the current authenticated user's information. * * Only the fields included in the data object will be updated. - * Commonly updated fields include `name`, `avatar_url`, and custom profile fields. + * Commonly updated fields include `full_name` and custom profile fields. * * @param data - Object containing the fields to update. * @returns Promise resolving to the updated user data. @@ -171,10 +144,9 @@ export interface AuthModule { * ```typescript * // Update specific fields * const updatedUser = await base44.auth.updateMe({ - * name: 'John Doe', - * avatar_url: 'https://example.com/avatar.jpg' + * full_name: 'John Doe' * }); - * console.log(`Updated user: ${updatedUser.name}`); + * console.log(`Updated user: ${updatedUser.full_name}`); * ``` * * @example @@ -188,7 +160,7 @@ export interface AuthModule { * ``` */ updateMe( - data: Partial> + data: Partial> ): Promise; /** diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index c69766b..9174a3b 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -277,12 +277,24 @@ export interface EntityHandler { * - **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. * + * ## Built-in User Entity + * + * Every app includes a built-in `User` entity that stores user account information. This entity has special security rules that cannot be changed. + * + * Regular users can only read and update their own user record. With service role authentication, you can read, update, and delete any user. You cannot create users using the entities module. Instead, use the functions of the {@link AuthModule | auth module} to invite or register new users. + * * @example * ```typescript * // Get all records from the MyEntity entity * // Get all records the current user has permissions to view * const myRecords = await base44.entities.MyEntity.list(); * ``` + * + * @example + * ```typescript + * // List all users (admin only) + * const allUsers = await base44.asServiceRole.entities.User.list(); + * ``` */ export interface EntitiesModule { /** diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 0b79fdb..5803f4a 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -371,7 +371,7 @@ export interface CoreIntegrations { * * This module provides access to integration endpoints for interacting with external * services. Integrations are organized into packages. Base44 provides built-in integrations - * in the "Core" package, and you can install additional integration packages for other services. + * in the `Core` package. * * Unlike the connectors module that gives you raw OAuth tokens, integrations provide * pre-built functions that Base44 executes on your behalf. From 322d71d4e1052412d75e7b67bb1e865e2a28522a Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Thu, 4 Dec 2025 11:59:42 +0200 Subject: [PATCH 19/31] more updates --- .../file-processing/file-processing.js | 68 ++-- .../push-to-docs-repo.js | 306 ++++++++++-------- src/index.ts | 8 +- src/modules/agents.ts | 14 - src/modules/agents.types.ts | 6 +- src/modules/app-logs.ts | 10 +- src/modules/app-logs.types.ts | 123 +------ src/modules/auth.ts | 1 - src/modules/auth.types.ts | 10 +- src/modules/connectors.ts | 5 +- src/modules/entities.types.ts | 16 +- 11 files changed, 239 insertions(+), 328 deletions(-) diff --git a/scripts/mintlify-post-processing/file-processing/file-processing.js b/scripts/mintlify-post-processing/file-processing/file-processing.js index 0dbf44a..b14b347 100755 --- a/scripts/mintlify-post-processing/file-processing/file-processing.js +++ b/scripts/mintlify-post-processing/file-processing/file-processing.js @@ -2,7 +2,7 @@ /** * Post-processing script for TypeDoc-generated MDX files - * + * * TypeDoc now emits .mdx files directly, so this script: * 1. Processes links to make them Mintlify-compatible * 2. Removes files for linked types that should be suppressed @@ -149,7 +149,7 @@ base44.integrations.MyCustomPackage.MyFunction({ param: 'value' }); } } } - + // Remove .md and .mdx extensions from markdown links // This handles both relative and absolute paths // Regex breakdown: @@ -162,7 +162,7 @@ base44.integrations.MyCustomPackage.MyFunction({ param: 'value' }); let newContent = content.replace( linkRegex, (match, linkText, linkPath, ext) => { - modified = true; + modified = true; // Check if the link points to a renamed module const pathParts = linkPath.split("/"); @@ -179,7 +179,7 @@ base44.integrations.MyCustomPackage.MyFunction({ param: 'value' }); // Handle relative links that might be missing context (basic cleanup) // e.g. if linkPath is just "entities" but it should be relative - return `[${linkText}](${linkPath})`; + return `[${linkText}](${linkPath})`; } ); @@ -187,12 +187,12 @@ base44.integrations.MyCustomPackage.MyFunction({ param: 'value' }); // or if the above regex missed them (though it matches .mdx?) // The regex requires .md or .mdx extension. If links are already extensionless, this won't run. // But TypeDoc usually outputs links with extensions. - + if (modified) { fs.writeFileSync(filePath, newContent, "utf-8"); return true; } - + return false; } @@ -272,18 +272,18 @@ function scanDocsContent() { }; const sections = ["functions", "interfaces", "classes", "type-aliases"]; - + for (const section of sections) { const sectionDir = path.join(CONTENT_DIR, section); if (!fs.existsSync(sectionDir)) continue; - + const files = fs.readdirSync(sectionDir); const mdxFiles = files .filter((file) => file.endsWith(".mdx")) .map((file) => path.basename(file, ".mdx")) .sort() .map((fileName) => `content/${section}/${fileName}`); - + const key = section === "type-aliases" ? "typeAliases" : section; result[key] = mdxFiles; } @@ -298,7 +298,7 @@ function getGroupName(section, categoryMap) { if (categoryMap[section]) { return categoryMap[section]; } - + return section; } @@ -314,30 +314,30 @@ function generateDocsJson(docsContent) { // If file doesn't exist or can't be read, return empty object console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); } - + const groups = []; - + if (docsContent.functions.length > 0 && categoryMap.functions) { groups.push({ group: getGroupName("functions", categoryMap), pages: docsContent.functions, }); } - + if (docsContent.interfaces.length > 0 && categoryMap.interfaces) { groups.push({ group: getGroupName("interfaces", categoryMap), pages: docsContent.interfaces, }); } - + if (docsContent.classes.length > 0 && categoryMap.classes) { groups.push({ group: getGroupName("classes", categoryMap), pages: docsContent.classes, }); } - + if (docsContent.typeAliases.length > 0 && categoryMap["type-aliases"]) { // Merge into existing group if name matches const groupName = getGroupName("type-aliases", categoryMap); @@ -348,13 +348,13 @@ function generateDocsJson(docsContent) { existingGroup.pages.push(...docsContent.typeAliases); existingGroup.pages.sort(); // Sort combined pages alphabetically } else { - groups.push({ + groups.push({ group: groupName, - pages: docsContent.typeAliases, - }); + pages: docsContent.typeAliases, + }); } } - + // Find or create SDK Reference tab let sdkTab = template.navigation.tabs.find( (tab) => tab.tab === "SDK Reference" @@ -363,9 +363,9 @@ function generateDocsJson(docsContent) { sdkTab = { tab: "SDK Reference", groups: [] }; template.navigation.tabs.push(sdkTab); } - + sdkTab.groups = groups; - + const docsJsonPath = path.join(DOCS_DIR, "docs.json"); fs.writeFileSync( docsJsonPath, @@ -405,10 +405,10 @@ function isTypeDocPath(relativePath) { */ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { const entries = fs.readdirSync(dir, { withFileTypes: true }); - + for (const entry of entries) { const entryPath = path.join(dir, entry.name); - + if (entry.isDirectory()) { processAllFiles(entryPath, linkedTypeNames, exposedTypeNames); } else if ( @@ -433,7 +433,7 @@ function processAllFiles(dir, linkedTypeNames, exposedTypeNames) { exposedTypeNames.has(originalName) || exposedTypeNames.has(fileName) || isRenamedModule; - + // Remove any type doc files that are not explicitly exposed if (isTypeDoc && !isExposedType) { fs.unlinkSync(entryPath); @@ -683,7 +683,7 @@ function applyAppendedArticles(appendedArticles) { console.warn( `Warning: Appended article not found: ${appendKey} (checked content/ and docs/ roots)` ); - continue; + continue; } } } @@ -692,7 +692,7 @@ function applyAppendedArticles(appendedArticles) { const { section, headings } = prepareAppendedSection(appendPath); combinedSections += `\n\n${section}`; if (PANELS_ENABLED && collectedHeadings) { - collectedHeadings.push(...headings); + collectedHeadings.push(...headings); } try { @@ -768,29 +768,29 @@ function applyHeadingDemotion(dir) { */ function main() { console.log("Processing TypeDoc MDX files for Mintlify...\n"); - + if (!fs.existsSync(DOCS_DIR)) { console.error(`Error: Documentation directory not found: ${DOCS_DIR}`); console.error('Please run "npm run docs:generate" first.'); process.exit(1); } - + // Get list of linked types to suppress const linkedTypeNames = getLinkedTypeNames(); const exposedTypeNames = getTypesToExpose(); // First, perform module renames (EntitiesModule -> entities, etc.) performModuleRenames(DOCS_DIR); - + // Process all files (remove suppressed ones and fix links) - processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); + processAllFiles(DOCS_DIR, linkedTypeNames, exposedTypeNames); // Append configured articles const appendedArticles = loadAppendedArticlesConfig(); applyAppendedArticles(appendedArticles); applyHeadingDemotion(DOCS_DIR); - + // Clean up the linked types file try { if (fs.existsSync(LINKED_TYPES_FILE)) { @@ -799,14 +799,14 @@ function main() { } catch (e) { // Ignore errors } - + // Scan content and generate docs.json const docsContent = scanDocsContent(); generateDocsJson(docsContent); - + // Copy styling.css copyStylingCss(); - + console.log(`\n✓ Post-processing complete!`); console.log(` Documentation directory: ${DOCS_DIR}`); } diff --git a/scripts/mintlify-post-processing/push-to-docs-repo.js b/scripts/mintlify-post-processing/push-to-docs-repo.js index 32a41f4..762e92b 100644 --- a/scripts/mintlify-post-processing/push-to-docs-repo.js +++ b/scripts/mintlify-post-processing/push-to-docs-repo.js @@ -27,110 +27,136 @@ function parseArgs() { function scanSdkDocs(sdkDocsDir) { const result = {}; - + // Get a list of all the subdirectories in the sdkDocsDir - const subdirectories = fs.readdirSync(sdkDocsDir).filter(file => fs.statSync(path.join(sdkDocsDir, file)).isDirectory()); + const subdirectories = fs + .readdirSync(sdkDocsDir) + .filter((file) => fs.statSync(path.join(sdkDocsDir, file)).isDirectory()); console.log(`Subdirectories: ${subdirectories}`); for (const subdirectory of subdirectories) { const subdirectoryPath = path.join(sdkDocsDir, subdirectory); - const files = fs.readdirSync(subdirectoryPath).filter(file => file.endsWith(".mdx")); - result[subdirectory] = files.map(file => path.basename(file, ".mdx")); + const files = fs + .readdirSync(subdirectoryPath) + .filter((file) => file.endsWith(".mdx")); + result[subdirectory] = files.map((file) => path.basename(file, ".mdx")); } return result; } function updateDocsJson(repoDir, sdkFiles) { - const docsJsonPath = path.join(repoDir, 'docs.json'); - let categoryMap = {}; - try { - categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, 'utf8')); - } catch (e) { - console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); - process.exit(1); - } - - console.log(`Reading docs.json from ${docsJsonPath}...`); - const docsContent = fs.readFileSync(docsJsonPath, 'utf8'); - const docs = JSON.parse(docsContent); - - // Find the "SDK Reference" tab - const sdkTabIndex = docs.navigation.tabs.findIndex(tab => tab.tab === 'SDK Reference'); - let sdkTab = docs.navigation.tabs[sdkTabIndex]; - - if (sdkTabIndex === -1) { - console.log("Could not find 'SDK Reference' tab in docs.json. Creating it..."); - sdkTab = { - tab: 'SDK Reference', - groups: [] - }; - } - - // Update the groups - const newGroups = []; - - if(sdkFiles.functions.length > 0 && categoryMap.functions) { - newGroups.push({ - group: categoryMap.functions, - pages: sdkFiles.functions.map(file => `sdk-docs/functions/${file}`) - }); - } + const docsJsonPath = path.join(repoDir, "docs.json"); + let categoryMap = {}; + try { + categoryMap = JSON.parse(fs.readFileSync(CATEGORY_MAP_PATH, "utf8")); + } catch (e) { + console.error(`Error: Category map file not found: ${CATEGORY_MAP_PATH}`); + process.exit(1); + } - if(sdkFiles.interfaces.length > 0 && categoryMap.interfaces) { - newGroups.push({ - group: categoryMap.interfaces, - pages: sdkFiles.interfaces.map(file => `sdk-docs/interfaces/${file}`) - }); - } + console.log(`Reading docs.json from ${docsJsonPath}...`); + const docsContent = fs.readFileSync(docsJsonPath, "utf8"); + const docs = JSON.parse(docsContent); - if(sdkFiles.classes.length > 0 && categoryMap.classes) { - newGroups.push({ - group: categoryMap.classes, - pages: sdkFiles.classes.map(file => `sdk-docs/classes/${file}`) - }); - } + // Find the "SDK Reference" tab + const sdkTabIndex = docs.navigation.tabs.findIndex( + (tab) => tab.tab === "SDK Reference" + ); + let sdkTab = docs.navigation.tabs[sdkTabIndex]; + + if (sdkTabIndex === -1) { + console.log( + "Could not find 'SDK Reference' tab in docs.json. Creating it..." + ); + sdkTab = { + tab: "SDK Reference", + groups: [], + }; + } - if(sdkFiles['type-aliases'].length > 0 && categoryMap['type-aliases']) { - newGroups.push({ - group: categoryMap['type-aliases'], - pages: sdkFiles['type-aliases'].map(file => `sdk-docs/type-aliases/${file}`) - }); - } - - const newGroupNames = new Set(newGroups.map(group => group.group)); - const preservedGroups = []; - let insertionIndex; - - for (const existingGroup of sdkTab.groups ?? []) { - if (newGroupNames.has(existingGroup.group)) { - if (insertionIndex === undefined) { - insertionIndex = preservedGroups.length; - } - continue; - } - preservedGroups.push(existingGroup); + // Update the groups - merge categories that map to the same group name + const groupMap = new Map(); // group name -> pages array + + const addToGroup = (groupName, pages) => { + if (!groupName || pages.length === 0) return; + if (!groupMap.has(groupName)) { + groupMap.set(groupName, []); } + groupMap.get(groupName).push(...pages); + }; + + if (sdkFiles.functions?.length > 0 && categoryMap.functions) { + addToGroup( + categoryMap.functions, + sdkFiles.functions.map((file) => `sdk-docs/functions/${file}`) + ); + } - const finalGroups = [...preservedGroups]; - const targetIndex = insertionIndex ?? finalGroups.length; - finalGroups.splice(targetIndex, 0, ...newGroups); - sdkTab.groups = finalGroups; + if (sdkFiles.interfaces?.length > 0 && categoryMap.interfaces) { + addToGroup( + categoryMap.interfaces, + sdkFiles.interfaces.map((file) => `sdk-docs/interfaces/${file}`) + ); + } - if (sdkTabIndex === -1) { - docs.navigation.tabs.push(sdkTab); - } else { - docs.navigation.tabs[sdkTabIndex] = sdkTab; + if (sdkFiles.classes?.length > 0 && categoryMap.classes) { + addToGroup( + categoryMap.classes, + sdkFiles.classes.map((file) => `sdk-docs/classes/${file}`) + ); + } + + if (sdkFiles["type-aliases"]?.length > 0 && categoryMap["type-aliases"]) { + addToGroup( + categoryMap["type-aliases"], + sdkFiles["type-aliases"].map((file) => `sdk-docs/type-aliases/${file}`) + ); + } + + // Convert map to array of groups + const newGroups = Array.from(groupMap.entries()).map( + ([groupName, pages]) => ({ + group: groupName, + pages: pages.sort(), // Sort pages alphabetically within each group + }) + ); + + const newGroupNames = new Set(newGroups.map((group) => group.group)); + const preservedGroups = []; + let insertionIndex; + + for (const existingGroup of sdkTab.groups ?? []) { + if (newGroupNames.has(existingGroup.group)) { + if (insertionIndex === undefined) { + insertionIndex = preservedGroups.length; + } + continue; } + preservedGroups.push(existingGroup); + } - console.debug(`New groups for docs.json: ${JSON.stringify(newGroups, null, 2)}`); + const finalGroups = [...preservedGroups]; + const targetIndex = insertionIndex ?? finalGroups.length; + finalGroups.splice(targetIndex, 0, ...newGroups); + sdkTab.groups = finalGroups; - // Write updated docs.json - console.log(`Writing updated docs.json to ${docsJsonPath}...`); - fs.writeFileSync(docsJsonPath, JSON.stringify(docs, null, 2) + '\n', 'utf8'); - - console.log('Successfully updated docs.json'); + if (sdkTabIndex === -1) { + docs.navigation.tabs.push(sdkTab); + } else { + docs.navigation.tabs[sdkTabIndex] = sdkTab; } + console.debug( + `New groups for docs.json: ${JSON.stringify(newGroups, null, 2)}` + ); + + // Write updated docs.json + console.log(`Writing updated docs.json to ${docsJsonPath}...`); + fs.writeFileSync(docsJsonPath, JSON.stringify(docs, null, 2) + "\n", "utf8"); + + console.log("Successfully updated docs.json"); +} + function main() { const { branch } = parseArgs(); if (!branch) { @@ -149,73 +175,83 @@ function main() { } let tempRepoDir; - try{ - // Create temporary directory - tempRepoDir = fs.mkdtempSync( - path.join(os.tmpdir(), "mintlify-docs-") - ); - // Clone the repository - console.log(`Cloning repository to ${tempRepoDir}...`); - execSync(`git clone ${TARGET_DOCS_REPO_URL} ${tempRepoDir}`); - - // Check if the specified branch already exists remotely - const branchExists = execSync(`git ls-remote --heads origin ${branch}`, { - cwd: tempRepoDir, - encoding: 'utf8' - }).trim().length > 0; - - if (branchExists) { - console.log(`Branch ${branch} already exists. Checking it out...`); - execSync(`git checkout -b ${branch} origin/${branch}`, { cwd: tempRepoDir }); - } else { - console.log(`Branch ${branch} does not exist. Creating it...`); - execSync(`git checkout -b ${branch}`, { cwd: tempRepoDir }); - } + try { + // Create temporary directory + tempRepoDir = fs.mkdtempSync(path.join(os.tmpdir(), "mintlify-docs-")); + // Clone the repository + console.log(`Cloning repository to ${tempRepoDir}...`); + execSync(`git clone ${TARGET_DOCS_REPO_URL} ${tempRepoDir}`); + + // Check if the specified branch already exists remotely + const branchExists = + execSync(`git ls-remote --heads origin ${branch}`, { + cwd: tempRepoDir, + encoding: "utf8", + }).trim().length > 0; + + if (branchExists) { + console.log(`Branch ${branch} already exists. Checking it out...`); + execSync(`git checkout -b ${branch} origin/${branch}`, { + cwd: tempRepoDir, + }); + } else { + console.log(`Branch ${branch} does not exist. Creating it...`); + execSync(`git checkout -b ${branch}`, { cwd: tempRepoDir }); + } - // Remove the existing sdk-docs directory - fs.rmSync(path.join(tempRepoDir, "sdk-docs"), { recursive: true, force: true }); + // Remove the existing sdk-docs directory + fs.rmSync(path.join(tempRepoDir, "sdk-docs"), { + recursive: true, + force: true, + }); - // Copy the docs directory to the temporary repository - fs.cpSync(DOCS_SOURCE_PATH, path.join(tempRepoDir, "sdk-docs"), { recursive: true }); + // Copy the docs directory to the temporary repository + fs.cpSync(DOCS_SOURCE_PATH, path.join(tempRepoDir, "sdk-docs"), { + recursive: true, + }); - // Scan the sdk-docs directory - const sdkDocsDir = path.join(tempRepoDir, "sdk-docs"); - const sdkFiles = scanSdkDocs(sdkDocsDir); + // Scan the sdk-docs directory + const sdkDocsDir = path.join(tempRepoDir, "sdk-docs"); + const sdkFiles = scanSdkDocs(sdkDocsDir); - console.debug(`SDK files: ${JSON.stringify(sdkFiles, null, 2)}`); + console.debug(`SDK files: ${JSON.stringify(sdkFiles, null, 2)}`); - // Update the docs.json file - updateDocsJson(tempRepoDir, sdkFiles); + // Update the docs.json file + updateDocsJson(tempRepoDir, sdkFiles); - // Commit the changes - execSync(`git add docs.json`, { cwd: tempRepoDir }); - execSync(`git add sdk-docs`, { cwd: tempRepoDir }); + // Commit the changes + execSync(`git add docs.json`, { cwd: tempRepoDir }); + execSync(`git add sdk-docs`, { cwd: tempRepoDir }); - const stagedOutput = execSync(`git diff --cached --name-only`, { - cwd: tempRepoDir, - encoding: 'utf8' - }); + const stagedOutput = execSync(`git diff --cached --name-only`, { + cwd: tempRepoDir, + encoding: "utf8", + }); - const stagedChanges = stagedOutput.trim(); + const stagedChanges = stagedOutput.trim(); - if (!stagedChanges.length) { - console.log("No staged changes detected (docs.json / sdk-docs). Skipping commit and push."); - return; - } + if (!stagedChanges.length) { + console.log( + "No staged changes detected (docs.json / sdk-docs). Skipping commit and push." + ); + return; + } - console.log(`Changes staged for commit:\n${stagedChanges}`); + console.log(`Changes staged for commit:\n${stagedChanges}`); - execSync(`git commit -m "Auto-updates to SDK Reference Docs"`, { cwd: tempRepoDir }); - execSync(`git push --set-upstream origin ${branch}`, { cwd: tempRepoDir }); + execSync(`git commit -m "Auto-updates to SDK Reference Docs"`, { + cwd: tempRepoDir, + }); + execSync(`git push --set-upstream origin ${branch}`, { cwd: tempRepoDir }); - console.log("Successfully committed and pushed the changes"); - } catch (e) { + console.log("Successfully committed and pushed the changes"); + } catch (e) { console.error(`Error: Failed to commit and push changes: ${e}`); process.exit(1); - } finally { + } finally { // Remove the temporary directory fs.rmSync(tempRepoDir, { recursive: true, force: true }); - } + } } -main(); \ No newline at end of file +main(); diff --git a/src/index.ts b/src/index.ts index c60a61e..dbaa1ce 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,7 +41,7 @@ export type { export type { AuthModule, LoginResponse, - RegisterPayload, + RegisterParams, VerifyOtpParams, ChangePasswordParams, ResetPasswordParams, @@ -82,11 +82,7 @@ export type { CreateConversationParams, } from "./modules/agents.types.js"; -export type { - AppLogsModule, - FetchLogsParams, - GetStatsParams, -} from "./modules/app-logs.types.js"; +export type { AppLogsModule } from "./modules/app-logs.types.js"; export type { SsoModule, SsoAccessTokenResponse } from "./modules/sso.types.js"; diff --git a/src/modules/agents.ts b/src/modules/agents.ts index f29c761..a3d3275 100644 --- a/src/modules/agents.ts +++ b/src/modules/agents.ts @@ -8,13 +8,6 @@ import { CreateConversationParams, } from "./agents.types.js"; -/** - * Creates the agents module for the Base44 SDK. - * - * @param config - Configuration object containing axios, socket, appId, etc. - * @returns Agents module with methods to manage AI agent conversations - * @internal - */ export function createAgentsModule({ axios, socket, @@ -24,26 +17,22 @@ export function createAgentsModule({ }: AgentsModuleConfig): AgentsModule { const baseURL = `/apps/${appId}/agents`; - // Get all conversations (current user with user auth, all users with service role) const getConversations = () => { return axios.get(`${baseURL}/conversations`); }; - // Get a specific conversation by ID const getConversation = (conversationId: string) => { return axios.get( `${baseURL}/conversations/${conversationId}` ); }; - // List conversations with filtering and pagination const listConversations = (filterParams: ModelFilterParams) => { return axios.get(`${baseURL}/conversations`, { params: filterParams, }); }; - // Create a new conversation with an agent const createConversation = (conversation: CreateConversationParams) => { return axios.post( `${baseURL}/conversations`, @@ -51,7 +40,6 @@ export function createAgentsModule({ ); }; - // Add a message to a conversation const addMessage = async ( conversation: AgentConversation, message: AgentMessage @@ -67,7 +55,6 @@ export function createAgentsModule({ ); }; - // Subscribe to real-time updates for a conversation const subscribeToConversation = ( conversationId: string, onUpdate?: (conversation: AgentConversation) => void @@ -82,7 +69,6 @@ export function createAgentsModule({ }); }; - // Get WhatsApp connection URL for an agent const getWhatsAppConnectURL = (agentName: string) => { const baseUrl = `${serverUrl}/api/apps/${appId}/agents/${encodeURIComponent( agentName diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 53240dc..59252de 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -84,6 +84,10 @@ export interface AgentConversation { agent_name: string; /** ID of the user who created the conversation. */ created_by_id: string; + /** When the conversation was created. */ + created_date: string; + /** When the conversation was last updated. */ + updated_date: string; /** Array of messages in the conversation. */ messages: AgentMessage[]; /** Optional metadata associated with the conversation. */ @@ -103,7 +107,7 @@ export interface AgentMessage { /** When the message was last updated. */ updated_date: string; /** Optional reasoning information for the message. */ - reasoning?: AgentMessageReasoning; + reasoning?: AgentMessageReasoning | null; /** Message content. */ content?: string | Record; /** URLs to files attached to the message. */ diff --git a/src/modules/app-logs.ts b/src/modules/app-logs.ts index 63163db..ec072f8 100644 --- a/src/modules/app-logs.ts +++ b/src/modules/app-logs.ts @@ -1,9 +1,5 @@ import { AxiosInstance } from "axios"; -import { - AppLogsModule, - FetchLogsParams, - GetStatsParams, -} from "./app-logs.types"; +import { AppLogsModule } from "./app-logs.types"; /** * Creates the app logs module for the Base44 SDK. @@ -26,13 +22,13 @@ export function createAppLogsModule( }, // Fetch app logs with optional parameters - async fetchLogs(params: FetchLogsParams = {}): Promise { + async fetchLogs(params: Record = {}): Promise { const response = await axios.get(baseURL, { params }); return response; }, // Get app statistics - async getStats(params: GetStatsParams = {}): Promise { + async getStats(params: Record = {}): Promise { const response = await axios.get(`${baseURL}/stats`, { params }); return response; }, diff --git a/src/modules/app-logs.types.ts b/src/modules/app-logs.types.ts index ed6f2ad..ab1b9b7 100644 --- a/src/modules/app-logs.types.ts +++ b/src/modules/app-logs.types.ts @@ -1,41 +1,3 @@ -/** - * Parameters for fetching app logs. - */ -export interface FetchLogsParams { - /** Maximum number of logs to return. */ - limit?: number; - /** Number of logs to skip for pagination. */ - skip?: number; - /** Sort order, such as `'-timestamp'` for descending by timestamp. */ - sort?: string; - /** Filter logs by page name. */ - pageName?: string; - /** Filter logs from this date as an ISO string. */ - startDate?: string; - /** Filter logs until this date as an ISO string. */ - endDate?: string; - /** Additional filter parameters. */ - [key: string]: any; -} - -/** - * Parameters for fetching app statistics. - */ -export interface GetStatsParams { - /** Filter stats from this date as an ISO string. */ - startDate?: string; - /** Filter stats until this date as an ISO string. */ - endDate?: string; - /** Group statistics by a specific field, such as `'page'`. */ - groupBy?: string; - /** Time period for grouping, such as `'daily'`, `'weekly'`, or `'monthly'`. */ - period?: string; - /** Specific metric to retrieve, such as `'active_users'` or `'page_views'`. */ - metric?: string; - /** Additional query parameters. */ - [key: string]: any; -} - /** * App Logs module for tracking and analyzing app usage. * @@ -65,91 +27,20 @@ export interface AppLogsModule { logUserInApp(pageName: string): Promise; /** - * Fetch app logs with optional filtering. - * - * Retrieves logs of user activity with support for filtering, pagination, - * and sorting. Use this to analyze user behavior and app usage patterns. + * Fetch app logs with optional parameters. * - * @param params - Query parameters for filtering logs. + * @param params - Optional query parameters for filtering logs. * @returns Promise resolving to the logs data. - * - * @example - * ```typescript - * // Fetch all logs - * const allLogs = await base44.appLogs.fetchLogs(); - * ``` - * - * @example - * ```typescript - * // Fetch logs with pagination - * const recentLogs = await base44.appLogs.fetchLogs({ - * limit: 50, - * skip: 0, - * sort: '-timestamp' - * }); - * ``` - * - * @example - * ```typescript - * // Fetch logs for a specific page - * const dashboardLogs = await base44.appLogs.fetchLogs({ - * pageName: 'dashboard' - * }); - * ``` - * - * @example - * ```typescript - * // Fetch logs within a date range - * const periodLogs = await base44.appLogs.fetchLogs({ - * startDate: '2024-01-01', - * endDate: '2024-01-31' - * }); - * ``` * @internal */ - fetchLogs(params?: FetchLogsParams): Promise; + fetchLogs(params?: Record): Promise; /** - * Gets app usage statistics. - * - * Retrieves aggregated statistics about app usage, such as page views, - * active users, and popular features. Useful for dashboards and analytics. - * - * @param params - Query parameters for filtering and grouping statistics. - * @returns Promise resolving to the statistics data. + * Get app statistics. * - * @example - * ```typescript - * // Get overall stats - * const stats = await base44.appLogs.getStats(); - * ``` - * - * @example - * ```typescript - * // Get stats for a specific time period - * const monthlyStats = await base44.appLogs.getStats({ - * startDate: '2024-01-01', - * endDate: '2024-01-31' - * }); - * ``` - * - * @example - * ```typescript - * // Get stats grouped by page - * const pageStats = await base44.appLogs.getStats({ - * groupBy: 'page' - * }); - * ``` - * - * @example - * ```typescript - * // Get daily active users - * const dailyStats = await base44.appLogs.getStats({ - * period: 'daily', - * metric: 'active_users' - * }); - * ``` + * @param params - Optional query parameters for filtering stats. + * @returns Promise resolving to the stats data. * @internal */ - getStats(params?: GetStatsParams): Promise; + getStats(params?: Record): Promise; } diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 6971e2c..0736da2 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -2,7 +2,6 @@ import { AxiosInstance } from "axios"; import { AuthModule, AuthModuleOptions, - User, VerifyOtpParams, ChangePasswordParams, ResetPasswordParams, diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index ff9b856..d235f73 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -49,7 +49,7 @@ export interface LoginResponse { /** * Payload for user registration. */ -export interface RegisterPayload { +export interface RegisterParams { /** User's email address. */ email: string; /** User's password. */ @@ -302,13 +302,13 @@ export interface AuthModule { * the user's permissions and access levels. * * @param userEmail - Email address of the user to invite. - * @param role - Role to assign to the invited user. Must match a role defined in the app. For example, `'admin'`, `'editor'`, `'viewer'`, or `'member'`. + * @param role - Role to assign to the invited user. Must match a role defined in the app. For example, `'admin'` or `'user'`. * @returns Promise that resolves when the invitation is sent successfully. Throws an error if the invitation fails. * * @example * ```typescript * try { - * await base44.auth.inviteUser('newuser@example.com', 'editor'); + * await base44.auth.inviteUser('newuser@example.com', 'user'); * console.log('Invitation sent successfully!'); * } catch (error) { * console.error('Failed to send invitation:', error); @@ -323,7 +323,7 @@ export interface AuthModule { * Creates a new user account with email and password. After successful registration, * use {@linkcode loginViaEmailPassword | loginViaEmailPassword()} to log in the user. * - * @param payload - Registration details including email, password, and optional fields. + * @param params - Registration details including email, password, and optional fields. * @returns Promise resolving to the registration response. * * @example @@ -342,7 +342,7 @@ export interface AuthModule { * ); * ``` */ - register(payload: RegisterPayload): Promise; + register(params: RegisterParams): Promise; /** * Verifies an OTP (One-time password) code. diff --git a/src/modules/connectors.ts b/src/modules/connectors.ts index 3916e12..5d99a3c 100644 --- a/src/modules/connectors.ts +++ b/src/modules/connectors.ts @@ -19,7 +19,10 @@ export function createConnectorsModule( ): ConnectorsModule { return { // Retrieve an OAuth access token for a specific external integration type - async getAccessToken(integrationType: ConnectorIntegrationType) { + // @ts-expect-error Return type mismatch with interface - implementation returns object, interface expects string + async getAccessToken( + integrationType: ConnectorIntegrationType + ): Promise { if (!integrationType || typeof integrationType !== "string") { throw new Error("Integration type is required and must be a string"); } diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index 9174a3b..11f90b7 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -10,10 +10,10 @@ export interface EntityHandler { * Retrieves all records of this type with support for sorting, * pagination, and field selection. * - * @param sort - Sort parameter, such as `'-created_date'` for descending. - * @param limit - Maximum number of results to return. - * @param skip - Number of results to skip for pagination. - * @param fields - Array of field names to include in the response. + * @param sort - Sort parameter, such as `'-created_date'` for descending. Defaults to `'-created_date'`. + * @param limit - Maximum number of results to return. Defaults to `50`. + * @param skip - Number of results to skip for pagination. Defaults to `0`. + * @param fields - Array of field names to include in the response. Defaults to all fields. * @returns Promise resolving to an array of records. * * @example @@ -57,10 +57,10 @@ export interface EntityHandler { * @param query - Query object with field-value pairs. Each key should be a field name * from your entity schema, and each value is the criteria to match. Records matching all * specified criteria are returned. Field names are case-sensitive. - * @param sort - Sort parameter, such as `'-created_date'` for descending. - * @param limit - Maximum number of results to return. - * @param skip - Number of results to skip for pagination. - * @param fields - Array of field names to include in the response. + * @param sort - Sort parameter, such as `'-created_date'` for descending. Defaults to `'-created_date'`. + * @param limit - Maximum number of results to return. Defaults to `50`. + * @param skip - Number of results to skip for pagination. Defaults to `0`. + * @param fields - Array of field names to include in the response. Defaults to all fields. * @returns Promise resolving to an array of filtered records. * * @example From 12768198a15fc36aed575f351775d608d2649070 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Thu, 4 Dec 2025 13:13:02 +0200 Subject: [PATCH 20/31] more updates --- .../typedoc-mintlify-linked-types.js | 15 +++++++++- .../typedoc-mintlify-parameters.js | 28 +++++++++++++++++++ src/client.ts | 2 +- src/client.types.ts | 2 +- src/modules/integrations.types.ts | 18 ------------ 5 files changed, 44 insertions(+), 21 deletions(-) diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js index 9b6bb3e..5c3958d 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-linked-types.js @@ -320,8 +320,21 @@ function getTypeString(type) { return type.types?.map((t) => getTypeString(t)).join(" & ") || "any"; case "literal": return JSON.stringify(type.value); - case "reflection": + case "reflection": { + // Check if this is a function type (has call signatures) + const decl = type.declaration; + if (decl?.signatures?.length > 0) { + const sig = decl.signatures[0]; + const params = + sig.parameters + ?.map((p) => `${p.name}: ${getTypeString(p.type)}`) + .join(", ") || ""; + const returnType = getTypeString(sig.type) || "void"; + return `(${params}) => ${returnType}`; + } + // Otherwise it's an object type return "object"; + } default: return type.name || "any"; } diff --git a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js index 1ea53a1..a5388be 100644 --- a/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js +++ b/scripts/mintlify-post-processing/typedoc-plugin/typedoc-mintlify-parameters.js @@ -310,6 +310,20 @@ function parseParametersWithExpansion( return { type: simpleMatch[1], link: null }; } + // Handle function type format: (`param`) => `returnType` or (`param`: `Type`) => `returnType` + // e.g., (`conversation`) => `void` or (`error`: `Error`) => `void` + if (trimmed.startsWith("(") && trimmed.includes("=>")) { + const sanitized = trimmed + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1") // Remove markdown links + .replace(/`/g, "") // Remove backticks + .replace(/\\/g, "") // Remove escapes + .replace(/\s+/g, " ") // Normalize whitespace + .trim(); + if (sanitized) { + return { type: sanitized, link: null }; + } + } + // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> if (trimmed.startsWith("`")) { const sanitized = trimmed @@ -578,6 +592,20 @@ function parseParameters( return { type: simpleMatch[1], link: null }; } + // Handle function type format: (`param`) => `returnType` or (`param`: `Type`) => `returnType` + // e.g., (`conversation`) => `void` or (`error`: `Error`) => `void` + if (trimmed.startsWith("(") && trimmed.includes("=>")) { + const sanitized = trimmed + .replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1") // Remove markdown links + .replace(/`/g, "") // Remove backticks + .replace(/\\/g, "") // Remove escapes + .replace(/\s+/g, " ") // Normalize whitespace + .trim(); + if (sanitized) { + return { type: sanitized, link: null }; + } + } + // Fallback: sanitize markdown-heavy type definitions such as `Partial`<[`Type`](link)> if (trimmed.startsWith("`")) { const sanitized = trimmed diff --git a/src/client.ts b/src/client.ts index 6ae5782..00dd171 100644 --- a/src/client.ts +++ b/src/client.ts @@ -23,7 +23,7 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * * This is the main entry point for the Base44 SDK. It creates a client that provides access to the SDK's modules, such as {@linkcode EntitiesModule | entities}, {@linkcode AuthModule | auth}, and {@linkcode FunctionsModule | functions}. * - * Typically, you don't need to call this function directly. Base44 creates the client for you, which you can import and use to make API calls. The client takes care of managing authentication for you. + * Typically, you don't need to call this function because Base44 creates the client for you. You can then import and use the client to make API calls. The client takes care of managing authentication for you. * * The client supports three authentication modes: * - **Anonymous**: Access modules anonymously without authentication using `base44.moduleName`. Operations are scoped to public data and permissions. diff --git a/src/client.types.ts b/src/client.types.ts index f5afa99..3807be2 100644 --- a/src/client.types.ts +++ b/src/client.types.ts @@ -39,7 +39,7 @@ export interface CreateClientConfig { */ appId: string; /** - * User authentication token. Use this in the frontend when you want to authenticate as a specific user. + * User authentication token. Used to authenticate as a specific user. */ token?: string; /** diff --git a/src/modules/integrations.types.ts b/src/modules/integrations.types.ts index 5803f4a..189a650 100644 --- a/src/modules/integrations.types.ts +++ b/src/modules/integrations.types.ts @@ -55,9 +55,6 @@ export interface GenerateImageParams { prompt: string; } -/** - * Return type for the GenerateImage function. - */ export interface GenerateImageResult { /** URL of the generated image. */ url: string; @@ -71,9 +68,6 @@ export interface UploadFileParams { file: File; } -/** - * Return type for the UploadFile function. - */ export interface UploadFileResult { /** URL of the uploaded file. */ file_url: string; @@ -93,9 +87,6 @@ export interface SendEmailParams { from_name?: string; } -/** - * Return type for the SendEmail function. - */ export type SendEmailResult = any; /** @@ -108,9 +99,6 @@ export interface ExtractDataFromUploadedFileParams { json_schema: object; } -/** - * Return type for the ExtractDataFromUploadedFile function. - */ export type ExtractDataFromUploadedFileResult = object; /** @@ -121,9 +109,6 @@ export interface UploadPrivateFileParams { file: File; } -/** - * Return type for the UploadPrivateFile function. - */ export interface UploadPrivateFileResult { /** URI of the uploaded private file, used to create a signed URL. */ file_uri: string; @@ -141,9 +126,6 @@ export interface CreateFileSignedUrlParams { expires_in?: number; } -/** - * Return type for the CreateFileSignedUrl function. - */ export interface CreateFileSignedUrlResult { /** Temporary signed URL to access the private file. */ signed_url: string; From a1c94620b633df7ddd7c6c77417614272b62f815 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Sun, 7 Dec 2025 09:06:33 +0200 Subject: [PATCH 21/31] minor fixes --- src/client.ts | 2 +- src/modules/agents.types.ts | 2 +- src/modules/auth.types.ts | 4 ++-- src/modules/entities.types.ts | 6 +++--- src/modules/functions.types.ts | 2 +- src/utils/auth-utils.ts | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/client.ts b/src/client.ts index 00dd171..fdd19e7 100644 --- a/src/client.ts +++ b/src/client.ts @@ -257,7 +257,7 @@ export function createClient(config: CreateClientConfig): Base44Client { /** * Creates a Base44 client from an HTTP request. * - * Creates a client by automatically extracting authentication tokens from a request to a backend function. Base44 inserts the necessary headers when forwarding requests to backend functions. + * The client is created by automatically extracting authentication tokens from a request to a backend function. Base44 inserts the necessary headers when forwarding requests to backend functions. * * To learn more about the Base44 client, see {@linkcode createClient | createClient()}. * diff --git a/src/modules/agents.types.ts b/src/modules/agents.types.ts index 59252de..54757fc 100644 --- a/src/modules/agents.types.ts +++ b/src/modules/agents.types.ts @@ -181,7 +181,7 @@ export interface AgentsModuleConfig { * * 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. Anonymous users can create conversations but cannot retrieve them later, while authenticated users can access conversations they created. + * - **Anonymous or User authentication** (`base44.agents`): Access is scoped to the current user's permissions. Anonymous users can create conversations but can't retrieve them later, while authenticated users can access conversations they created. * - **Service role authentication** (`base44.asServiceRole.agents`): Operations have elevated admin-level permissions. Can access all conversations that the app's admin role has access to. * */ diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index d235f73..6124f4b 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -166,7 +166,7 @@ export interface AuthModule { /** * Redirects the user to the app's login page. * - * Redirects with a callback URL to return to after successful authentication. Requires a browser environment and cannot be used in the backend. + * Redirects with a callback URL to return to after successful authentication. Requires a browser environment and can't be used in the backend. * * @param nextUrl - URL to redirect to after successful login. * @throws {Error} When not in a browser environment. @@ -188,7 +188,7 @@ export interface AuthModule { /** * Logs out the current user. * - * Removes the authentication token from local storage and Axios headers, then optionally redirects to a URL or reloads the page. Requires a browser environment and cannot be used in the backend. + * Removes the authentication token from local storage and Axios headers, then optionally redirects to a URL or reloads the page. Requires a browser environment and can't be used in the backend. * * @param redirectUrl - Optional URL to redirect to after logout. Reloads the page if not provided. * diff --git a/src/modules/entities.types.ts b/src/modules/entities.types.ts index 11f90b7..712cf0f 100644 --- a/src/modules/entities.types.ts +++ b/src/modules/entities.types.ts @@ -243,7 +243,7 @@ export interface EntityHandler { * Imports records from a file. * * Imports records from a file, typically CSV or similar format. - * The file format should match your entity structure. Requires a browser environment and cannot be used in the backend. + * The file format should match your entity structure. Requires a browser environment and can't be used in the backend. * * @param file - File object to import. * @returns Promise resolving to the import result. @@ -279,9 +279,9 @@ export interface EntityHandler { * * ## Built-in User Entity * - * Every app includes a built-in `User` entity that stores user account information. This entity has special security rules that cannot be changed. + * Every app includes a built-in `User` entity that stores user account information. This entity has special security rules that can't be changed. * - * Regular users can only read and update their own user record. With service role authentication, you can read, update, and delete any user. You cannot create users using the entities module. Instead, use the functions of the {@link AuthModule | auth module} to invite or register new users. + * Regular users can only read and update their own user record. With service role authentication, you can read, update, and delete any user. You can't create users using the entities module. Instead, use the functions of the {@link AuthModule | auth module} to invite or register new users. * * @example * ```typescript diff --git a/src/modules/functions.types.ts b/src/modules/functions.types.ts index af1c432..cdc91a2 100644 --- a/src/modules/functions.types.ts +++ b/src/modules/functions.types.ts @@ -19,7 +19,7 @@ export interface FunctionsModule { * * @param functionName - The name of the function to invoke. * @param data - An object containing named parameters for the function. - * @returns Promise resolving to the function's response, with the `data` property containing the data returned by the function, if there is any. + * @returns Promise resolving to the function's response. The `data` property contains the data returned by the function, if there is any. * * @example * ```typescript diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index d1b92c9..ff82c4c 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -9,7 +9,7 @@ import { * Retrieves an access token from URL parameters or local storage. * * Low-level utility for manually retrieving tokens. In most cases, the Base44 client handles - * token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and cannot be used in the backend. + * token management automatically. This function is useful for custom authentication flows or when you need direct access to stored tokens. Requires a browser environment and can't be used in the backend. * * @internal * @@ -96,7 +96,7 @@ export function getAccessToken(options: GetAccessTokenOptions = {}) { /** * Saves an access token to local storage. * - * Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and cannot be used in the backend. + * Low-level utility for manually saving tokens. In most cases, the Base44 client handles token management automatically. This function is useful for custom authentication flows or managing custom tokens. Requires a browser environment and can't be used in the backend. * * @internal * @@ -147,7 +147,7 @@ export function saveAccessToken( /** * Removes the access token from local storage. * - * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | base44.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and cannot be used in the backend. + * Low-level utility for manually removing tokens from the browser's local storage. In most cases, the Base44 client handles token management automatically. For standard logout flows, use {@linkcode AuthModule.logout | base44.auth.logout()} instead, which handles token removal and redirects automatically. This function is useful for custom authentication flows or when you need to manually remove tokens. Requires a browser environment and can't be used in the backend. * * @internal * From 45ce17984781378759b52b984d5fe1fc4cb6b97a Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Mon, 15 Dec 2025 13:20:31 +0200 Subject: [PATCH 22/31] Add missing type definitions for TypeScript compilation --- package-lock.json | 23 +++++++++++------------ package.json | 3 +++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index e638314..c7194ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,9 @@ "uuid": "^13.0.0" }, "devDependencies": { + "@types/hast": "^3.0.4", + "@types/node": "^24.10.1", + "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", "@vitest/ui": "^1.0.0", @@ -1319,15 +1322,13 @@ } }, "node_modules/@types/node": { - "version": "22.13.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz", - "integrity": "sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg==", + "version": "24.10.1", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/node/-/node-24.10.1.tgz", + "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "undici-types": "~6.20.0" + "undici-types": "~7.16.0" } }, "node_modules/@types/unist": { @@ -4187,13 +4188,11 @@ "license": "MIT" }, "node_modules/undici-types": { - "version": "6.20.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", - "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "version": "7.16.0", + "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, - "license": "MIT", - "optional": true, - "peer": true + "license": "MIT" }, "node_modules/update-browserslist-db": { "version": "1.1.2", diff --git a/package.json b/package.json index 0143e22..4743f69 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,9 @@ "uuid": "^13.0.0" }, "devDependencies": { + "@types/hast": "^3.0.4", + "@types/node": "^25.0.1", + "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", "@vitest/ui": "^1.0.0", From 055930922bcfe8e7f75e64a5e88a4ac61cbceb14 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Mon, 15 Dec 2025 14:09:25 +0200 Subject: [PATCH 23/31] Use @types/node@^24.10.1 (v25 not available yet) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 07972c4..3c14ae3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@types/hast": "^3.0.4", - "@types/node": "^25.0.1", + "@types/node": "^24.10.1", "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", @@ -1322,9 +1322,9 @@ } }, "node_modules/@types/node": { - "version": "25.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.2.tgz", - "integrity": "sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA==", + "version": "24.10.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz", + "integrity": "sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4743f69..e97c35b 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/hast": "^3.0.4", - "@types/node": "^25.0.1", + "@types/node": "^24.10.1", "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", From 56a632db6cca454b648b2a0397c541d93dcb7cbd Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Mon, 15 Dec 2025 14:39:28 +0200 Subject: [PATCH 24/31] Regenerate package-lock.json to fix npm ci errors --- package-lock.json | 640 ---------------------------------------------- yarn.lock | 20 +- 2 files changed, 10 insertions(+), 650 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c14ae3..f7b7a84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -280,74 +280,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/darwin-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", @@ -365,312 +297,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", - "cpu": [ - "mips64el" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", @@ -962,34 +588,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.44.1.tgz", - "integrity": "sha512-JAcBr1+fgqx20m7Fwe1DxPUl/hPkee6jA6Pl7n1v2EFiktAHenTaXl5aIFjUIEsfn9w3HE4gK1lEgNGMzBDs1w==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/@rollup/rollup-android-arm64": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.44.1.tgz", - "integrity": "sha512-RurZetXqTu4p+G0ChbnkwBuAtwAbIwJkycw1n6GvlGlBuS4u5qlr5opix8cBAYFJgaY05TWtM+LaoFggUmbZEQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ] - }, "node_modules/@rollup/rollup-darwin-arm64": { "version": "4.44.1", "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz", @@ -1004,244 +602,6 @@ "darwin" ] }, - "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.44.1.tgz", - "integrity": "sha512-gDnWk57urJrkrHQ2WVx9TSVTH7lSlU7E3AFqiko+bgjlh78aJ88/3nycMax52VIVjIm3ObXnDL2H00e/xzoipw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ] - }, - "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.44.1.tgz", - "integrity": "sha512-wnFQmJ/zPThM5zEGcnDcCJeYJgtSLjh1d//WuHzhf6zT3Md1BvvhJnWoy+HECKu2bMxaIcfWiu3bJgx6z4g2XA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.44.1.tgz", - "integrity": "sha512-uBmIxoJ4493YATvU2c0upGz87f99e3wop7TJgOA/bXMFd2SvKCI7xkxY/5k50bv7J6dw1SXT4MQBQSLn8Bb/Uw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ] - }, - "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.44.1.tgz", - "integrity": "sha512-n0edDmSHlXFhrlmTK7XBuwKlG5MbS7yleS1cQ9nn4kIeW+dJH+ExqNgQ0RrFRew8Y+0V/x6C5IjsHrJmiHtkxQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.44.1.tgz", - "integrity": "sha512-8WVUPy3FtAsKSpyk21kV52HCxB+me6YkbkFHATzC2Yd3yuqHwy2lbFL4alJOLXKljoRw08Zk8/xEj89cLQ/4Nw==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.44.1.tgz", - "integrity": "sha512-yuktAOaeOgorWDeFJggjuCkMGeITfqvPgkIXhDqsfKX8J3jGyxdDZgBV/2kj/2DyPaLiX6bPdjJDTu9RB8lUPQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.44.1.tgz", - "integrity": "sha512-W+GBM4ifET1Plw8pdVaecwUgxmiH23CfAUj32u8knq0JPFyK4weRy6H7ooxYFD19YxBulL0Ktsflg5XS7+7u9g==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.44.1.tgz", - "integrity": "sha512-1zqnUEMWp9WrGVuVak6jWTl4fEtrVKfZY7CvcBmUUpxAJ7WcSowPSAWIKa/0o5mBL/Ij50SIf9tuirGx63Ovew==", - "cpu": [ - "loong64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.44.1.tgz", - "integrity": "sha512-Rl3JKaRu0LHIx7ExBAAnf0JcOQetQffaw34T8vLlg9b1IhzcBgaIdnvEbbsZq9uZp3uAH+JkHd20Nwn0h9zPjA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.44.1.tgz", - "integrity": "sha512-j5akelU3snyL6K3N/iX7otLBIl347fGwmd95U5gS/7z6T4ftK288jKq3A5lcFKcx7wwzb5rgNvAg3ZbV4BqUSw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.44.1.tgz", - "integrity": "sha512-ppn5llVGgrZw7yxbIm8TTvtj1EoPgYUAbfw0uDjIOzzoqlZlZrLJ/KuiE7uf5EpTpCTrNt1EdtzF0naMm0wGYg==", - "cpu": [ - "riscv64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.44.1.tgz", - "integrity": "sha512-Hu6hEdix0oxtUma99jSP7xbvjkUM/ycke/AQQ4EC5g7jNRLLIwjcNwaUy95ZKBJJwg1ZowsclNnjYqzN4zwkAw==", - "cpu": [ - "s390x" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.44.1.tgz", - "integrity": "sha512-EtnsrmZGomz9WxK1bR5079zee3+7a+AdFlghyd6VbAjgRJDbTANJ9dcPIPAi76uG05micpEL+gPGmAKYTschQw==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.44.1.tgz", - "integrity": "sha512-iAS4p+J1az6Usn0f8xhgL4PaU878KEtutP4hqw52I4IO6AGoyOkHCxcc4bqufv1tQLdDWFx8lR9YlwxKuv3/3g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.44.1.tgz", - "integrity": "sha512-NtSJVKcXwcqozOl+FwI41OH3OApDyLk3kqTJgx8+gp6On9ZEt5mYhIsKNPGuaZr3p9T6NWPKGU/03Vw4CNU9qg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.44.1.tgz", - "integrity": "sha512-JYA3qvCOLXSsnTR3oiyGws1Dm0YTuxAAeaYGVlGpUsHqloPcFjPg+X0Fj2qODGLNwQOAcCiQmHub/V007kiH5A==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.44.1.tgz", - "integrity": "sha512-J8o22LuF0kTe7m+8PvW9wk3/bRq5+mRo5Dqo6+vXb7otCm3TPhYOJqOaQtGU9YMWQSL3krMnoOxMr0+9E6F3Ug==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, "node_modules/@shikijs/engine-oniguruma": { "version": "3.15.0", "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz", diff --git a/yarn.lock b/yarn.lock index 7b55678..7fa6913 100644 --- a/yarn.lock +++ b/yarn.lock @@ -356,14 +356,14 @@ dependencies: "@types/unist" "*" -"@types/node@^18.0.0 || >=20.0.0": - version "22.13.5" - resolved "https://registry.npmjs.org/@types/node/-/node-22.13.5.tgz" - integrity sha512-+lTU0PxZXn0Dr1NBtC7Y8cR21AJr87dLLU953CWA6pMxxv/UDc7jYAY90upcrie1nRcD6XNG5HOYEDtgW5TxAg== +"@types/node@^18.0.0 || >=20.0.0", "@types/node@^24.10.1": + version "24.10.4" + resolved "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz" + integrity sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg== dependencies: - undici-types "~6.20.0" + undici-types "~7.16.0" -"@types/unist@*": +"@types/unist@*", "@types/unist@^3.0.3": version "3.0.3" resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz" integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== @@ -1977,10 +1977,10 @@ ufo@^1.5.4: resolved "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz" integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== -undici-types@~6.20.0: - version "6.20.0" - resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz" - integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== +undici-types@~7.16.0: + version "7.16.0" + resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/undici-types/-/undici-types-7.16.0.tgz" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== update-browserslist-db@^1.1.1: version "1.1.2" From 7d7f1d3725a92cc355c1afae9326e6e3f35c7dff Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Mon, 15 Dec 2025 15:29:41 +0200 Subject: [PATCH 25/31] Use @types/node@^25.0.1 to match main (now available) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index f7b7a84..6197913 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ }, "devDependencies": { "@types/hast": "^3.0.4", - "@types/node": "^24.10.1", + "@types/node": "^25.0.1", "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", @@ -682,9 +682,9 @@ } }, "node_modules/@types/node": { - "version": "24.10.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz", - "integrity": "sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg==", + "version": "25.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.2.tgz", + "integrity": "sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e97c35b..4743f69 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "@types/hast": "^3.0.4", - "@types/node": "^24.10.1", + "@types/node": "^25.0.1", "@types/unist": "^3.0.3", "@vitest/coverage-istanbul": "^1.0.0", "@vitest/coverage-v8": "^1.0.0", From 06d47294a43f650a9999846278033a80bfe3444f Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Mon, 15 Dec 2025 15:44:46 +0200 Subject: [PATCH 26/31] fix for failing check --- package-lock.json | 2 +- package.json | 2 +- yarn.lock | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6197913..b480075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "typedoc": "^0.28.14", "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.3.2", - "vitest": "^1.0.0" + "vitest": "^1.6.1" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index 4743f69..5e116d5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "typedoc": "^0.28.14", "typedoc-plugin-markdown": "^4.9.0", "typescript": "^5.3.2", - "vitest": "^1.0.0" + "vitest": "^1.6.1" }, "keywords": [ "base44", diff --git a/yarn.lock b/yarn.lock index 7fa6913..9027562 100644 --- a/yarn.lock +++ b/yarn.lock @@ -356,10 +356,10 @@ dependencies: "@types/unist" "*" -"@types/node@^18.0.0 || >=20.0.0", "@types/node@^24.10.1": - version "24.10.4" - resolved "https://registry.npmjs.org/@types/node/-/node-24.10.4.tgz" - integrity sha512-vnDVpYPMzs4wunl27jHrfmwojOGKya0xyM3sH+UE5iv5uPS6vX7UIoh6m+vQc5LGBq52HBKPIn/zcSZVzeDEZg== +"@types/node@^18.0.0 || >=20.0.0", "@types/node@^25.0.1": + version "25.0.2" + resolved "https://registry.npmjs.org/@types/node/-/node-25.0.2.tgz" + integrity sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA== dependencies: undici-types "~7.16.0" @@ -2024,7 +2024,7 @@ vite@^5.0.0: optionalDependencies: fsevents "~2.3.3" -vitest@^1.0.0, vitest@1.6.1: +vitest@^1.6.1, vitest@1.6.1: version "1.6.1" resolved "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz" integrity sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag== From 38c0a7422087d5fb3b169bd1aa9be1b7885998ea Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 24 Dec 2025 10:35:39 +0200 Subject: [PATCH 27/31] remove yark.locl --- src/client.ts | 4 +- src/client.types.ts | 4 +- yarn.lock | 2106 ------------------------------------------- 3 files changed, 4 insertions(+), 2110 deletions(-) delete mode 100644 yarn.lock diff --git a/src/client.ts b/src/client.ts index fdd19e7..0a184b0 100644 --- a/src/client.ts +++ b/src/client.ts @@ -28,7 +28,7 @@ export type { Base44Client, CreateClientConfig, CreateClientOptions }; * The client supports three authentication modes: * - **Anonymous**: Access modules anonymously without authentication using `base44.moduleName`. Operations are scoped to public data and permissions. * - **User authentication**: Access modules with user-level permissions using `base44.moduleName`. Operations are scoped to the authenticated user's data and permissions. - * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Operations can access data across all users. Can only be used in the backend. Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. + * - **Service role authentication**: Access modules with elevated permissions using `base44.asServiceRole.moduleName`. Operations can access any data available to the app's admin. Can only be used in the backend. Typically, you create a client with service role authentication using the {@linkcode createClientFromRequest | createClientFromRequest()} function in your backend functions. * * For example, when using the {@linkcode EntitiesModule | entities} module: * - **Anonymous**: Can only read public data. @@ -226,7 +226,7 @@ export function createClient(config: CreateClientConfig): Base44Client { /** * Provides access to service role modules. * - * Service role authentication provides elevated permissions for server-side operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. + * Service role authentication provides elevated permissions for server-side operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to the data and operations available to the app's admin. * * @throws {Error} When accessed without providing a serviceToken during client creation. * diff --git a/src/client.types.ts b/src/client.types.ts index 3807be2..40e3c87 100644 --- a/src/client.types.ts +++ b/src/client.types.ts @@ -43,7 +43,7 @@ export interface CreateClientConfig { */ token?: string; /** - * Service role authentication token. Use this in the backend when you need elevated permissions to access data across all users or perform admin operations. This token should be kept secret and never exposed in the app's frontend. Typically, you get this token from a request to a backend function using {@linkcode createClientFromRequest | createClientFromRequest()}. + * Service role authentication token. Use this in the backend when you need elevated permissions to access data available to the app's admin or perform admin operations. This token should be kept secret and never exposed in the app's frontend. Typically, you get this token from a request to a backend function using {@linkcode createClientFromRequest | createClientFromRequest()}. */ serviceToken?: string; /** @@ -106,7 +106,7 @@ export interface Base44Client { /** * Provides access to supported modules with elevated permissions. * - * Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to data and operations across all users. + * Service role authentication provides elevated permissions for backend operations. Unlike user authentication, which is scoped to a specific user's permissions, service role authentication has access to the data and operations available to the app's admin. * * @throws {Error} When accessed without providing a serviceToken during client creation */ diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index 9027562..0000000 --- a/yarn.lock +++ /dev/null @@ -1,2106 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@^2.2.0", "@ampproject/remapping@^2.2.1": - version "2.3.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" - integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.24" - -"@babel/code-frame@^7.26.2": - version "7.26.2" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz" - integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== - dependencies: - "@babel/helper-validator-identifier" "^7.25.9" - js-tokens "^4.0.0" - picocolors "^1.0.0" - -"@babel/compat-data@^7.26.5": - version "7.26.8" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz" - integrity sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ== - -"@babel/core@^7.0.0", "@babel/core@^7.23.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz" - integrity sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.9" - "@babel/helper-compilation-targets" "^7.26.5" - "@babel/helper-module-transforms" "^7.26.0" - "@babel/helpers" "^7.26.9" - "@babel/parser" "^7.26.9" - "@babel/template" "^7.26.9" - "@babel/traverse" "^7.26.9" - "@babel/types" "^7.26.9" - convert-source-map "^2.0.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/generator@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz" - integrity sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg== - dependencies: - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - jsesc "^3.0.2" - -"@babel/helper-compilation-targets@^7.26.5": - version "7.26.5" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz" - integrity sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA== - dependencies: - "@babel/compat-data" "^7.26.5" - "@babel/helper-validator-option" "^7.25.9" - browserslist "^4.24.0" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-module-imports@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz" - integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== - dependencies: - "@babel/traverse" "^7.25.9" - "@babel/types" "^7.25.9" - -"@babel/helper-module-transforms@^7.26.0": - version "7.26.0" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz" - integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== - dependencies: - "@babel/helper-module-imports" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - "@babel/traverse" "^7.25.9" - -"@babel/helper-string-parser@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz" - integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== - -"@babel/helper-validator-identifier@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz" - integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== - -"@babel/helper-validator-option@^7.25.9": - version "7.25.9" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz" - integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== - -"@babel/helpers@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz" - integrity sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA== - dependencies: - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.9" - -"@babel/parser@^7.23.9", "@babel/parser@^7.25.4", "@babel/parser@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz" - integrity sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A== - dependencies: - "@babel/types" "^7.26.9" - -"@babel/template@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz" - integrity sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/parser" "^7.26.9" - "@babel/types" "^7.26.9" - -"@babel/traverse@^7.25.9", "@babel/traverse@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz" - integrity sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg== - dependencies: - "@babel/code-frame" "^7.26.2" - "@babel/generator" "^7.26.9" - "@babel/parser" "^7.26.9" - "@babel/template" "^7.26.9" - "@babel/types" "^7.26.9" - debug "^4.3.1" - globals "^11.1.0" - -"@babel/types@^7.25.4", "@babel/types@^7.25.9", "@babel/types@^7.26.9": - version "7.26.9" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz" - integrity sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw== - dependencies: - "@babel/helper-string-parser" "^7.25.9" - "@babel/helper-validator-identifier" "^7.25.9" - -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - -"@esbuild/darwin-arm64@0.21.5": - version "0.21.5" - resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz" - integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.1" - resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz" - integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== - dependencies: - eslint-visitor-keys "^3.4.3" - -"@eslint-community/regexpp@^4.6.1": - version "4.12.1" - resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" - integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== - -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.57.1": - version "8.57.1" - resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz" - integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== - -"@gerrit0/mini-shiki@^3.12.0": - version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.15.0.tgz" - integrity sha512-L5IHdZIDa4bG4yJaOzfasOH/o22MCesY0mx+n6VATbaiCtMeR59pdRqYk4bEiQkIHfxsHPNgdi7VJlZb2FhdMQ== - dependencies: - "@shikijs/engine-oniguruma" "^3.15.0" - "@shikijs/langs" "^3.15.0" - "@shikijs/themes" "^3.15.0" - "@shikijs/types" "^3.15.0" - "@shikijs/vscode-textmate" "^10.0.2" - -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== - dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - -"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/schemas@^29.6.3": - version "29.6.3" - resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" - integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== - dependencies: - "@sinclair/typebox" "^0.27.8" - -"@jridgewell/gen-mapping@^0.3.5": - version "0.3.8" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz" - integrity sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA== - dependencies: - "@jridgewell/set-array" "^1.2.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.24" - -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.2" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" - integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== - -"@jridgewell/set-array@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" - integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== - -"@jridgewell/source-map@^0.3.3": - version "0.3.6" - resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz" - integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== - dependencies: - "@jridgewell/gen-mapping" "^0.3.5" - "@jridgewell/trace-mapping" "^0.3.25" - -"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" - integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== - -"@jridgewell/trace-mapping@^0.3.23", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": - version "0.3.25" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" - integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@polka/url@^1.0.0-next.24": - version "1.0.0-next.29" - resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz" - integrity sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww== - -"@rollup/rollup-darwin-arm64@4.44.1": - version "4.44.1" - resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz" - integrity sha512-fM/xPesi7g2M7chk37LOnmnSTHLG/v2ggWqKj3CCA1rMA4mm5KVBT1fNoswbo1JhPuNNZrVwpTvlCVggv8A2zg== - -"@shikijs/engine-oniguruma@^3.15.0": - version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz" - integrity sha512-HnqFsV11skAHvOArMZdLBZZApRSYS4LSztk2K3016Y9VCyZISnlYUYsL2hzlS7tPqKHvNqmI5JSUJZprXloMvA== - dependencies: - "@shikijs/types" "3.15.0" - "@shikijs/vscode-textmate" "^10.0.2" - -"@shikijs/langs@^3.15.0": - version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz" - integrity sha512-WpRvEFvkVvO65uKYW4Rzxs+IG0gToyM8SARQMtGGsH4GDMNZrr60qdggXrFOsdfOVssG/QQGEl3FnJ3EZ+8w8A== - dependencies: - "@shikijs/types" "3.15.0" - -"@shikijs/themes@^3.15.0": - version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz" - integrity sha512-8ow2zWb1IDvCKjYb0KiLNrK4offFdkfNVPXb1OZykpLCzRU6j+efkY+Y7VQjNlNFXonSw+4AOdGYtmqykDbRiQ== - dependencies: - "@shikijs/types" "3.15.0" - -"@shikijs/types@^3.15.0", "@shikijs/types@3.15.0": - version "3.15.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz" - integrity sha512-BnP+y/EQnhihgHy4oIAN+6FFtmfTekwOLsQbRw9hOKwqgNy8Bdsjq8B05oAt/ZgvIWWFrshV71ytOrlPfYjIJw== - dependencies: - "@shikijs/vscode-textmate" "^10.0.2" - "@types/hast" "^3.0.4" - -"@shikijs/vscode-textmate@^10.0.2": - version "10.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz" - integrity sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg== - -"@sinclair/typebox@^0.27.8": - version "0.27.8" - resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" - integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== - -"@socket.io/component-emitter@~3.1.0": - version "3.1.2" - resolved "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz" - integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== - -"@types/estree@^1.0.0", "@types/estree@1.0.8": - version "1.0.8" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz" - integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w== - -"@types/hast@^3.0.4": - version "3.0.4" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz" - integrity sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ== - dependencies: - "@types/unist" "*" - -"@types/node@^18.0.0 || >=20.0.0", "@types/node@^25.0.1": - version "25.0.2" - resolved "https://registry.npmjs.org/@types/node/-/node-25.0.2.tgz" - integrity sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA== - dependencies: - undici-types "~7.16.0" - -"@types/unist@*", "@types/unist@^3.0.3": - version "3.0.3" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz" - integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== - -"@ungap/structured-clone@^1.2.0": - version "1.3.0" - resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz" - integrity sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g== - -"@vitest/coverage-istanbul@^1.0.0": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz" - integrity sha512-0NWKNPrbMo1s6emwnn+UpGPxrSEd9R6VpQ3wzYz0y43esZjjDkGLb6Qkvfu6LNyQO4TAGyepaZ11imUmmIFLaw== - dependencies: - debug "^4.3.4" - istanbul-lib-coverage "^3.2.2" - istanbul-lib-instrument "^6.0.1" - istanbul-lib-report "^3.0.1" - istanbul-lib-source-maps "^5.0.4" - istanbul-reports "^3.1.6" - magicast "^0.3.3" - picocolors "^1.0.0" - test-exclude "^6.0.0" - -"@vitest/coverage-v8@^1.0.0": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-1.6.1.tgz" - integrity sha512-6YeRZwuO4oTGKxD3bijok756oktHSIm3eczVVzNe3scqzuhLwltIF3S9ZL/vwOVIpURmU6SnZhziXXAfw8/Qlw== - dependencies: - "@ampproject/remapping" "^2.2.1" - "@bcoe/v8-coverage" "^0.2.3" - debug "^4.3.4" - istanbul-lib-coverage "^3.2.2" - istanbul-lib-report "^3.0.1" - istanbul-lib-source-maps "^5.0.4" - istanbul-reports "^3.1.6" - magic-string "^0.30.5" - magicast "^0.3.3" - picocolors "^1.0.0" - std-env "^3.5.0" - strip-literal "^2.0.0" - test-exclude "^6.0.0" - -"@vitest/expect@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz" - integrity sha512-jXL+9+ZNIJKruofqXuuTClf44eSpcHlgj3CiuNihUF3Ioujtmc0zIa3UJOW5RjDK1YLBJZnWBlPuqhYycLioog== - dependencies: - "@vitest/spy" "1.6.1" - "@vitest/utils" "1.6.1" - chai "^4.3.10" - -"@vitest/runner@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/runner/-/runner-1.6.1.tgz" - integrity sha512-3nSnYXkVkf3mXFfE7vVyPmi3Sazhb/2cfZGGs0JRzFsPFvAMBEcrweV1V1GsrstdXeKCTXlJbvnQwGWgEIHmOA== - dependencies: - "@vitest/utils" "1.6.1" - p-limit "^5.0.0" - pathe "^1.1.1" - -"@vitest/snapshot@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-1.6.1.tgz" - integrity sha512-WvidQuWAzU2p95u8GAKlRMqMyN1yOJkGHnx3M1PL9Raf7AQ1kwLKg04ADlCa3+OXUZE7BceOhVZiuWAbzCKcUQ== - dependencies: - magic-string "^0.30.5" - pathe "^1.1.1" - pretty-format "^29.7.0" - -"@vitest/spy@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.1.tgz" - integrity sha512-MGcMmpGkZebsMZhbQKkAf9CX5zGvjkBTqf8Zx3ApYWXr3wG+QvEu2eXWfnIIWYSJExIp4V9FCKDEeygzkYrXMw== - dependencies: - tinyspy "^2.2.0" - -"@vitest/ui@^1.0.0", "@vitest/ui@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/ui/-/ui-1.6.1.tgz" - integrity sha512-xa57bCPGuzEFqGjPs3vVLyqareG8DX0uMkr5U/v5vLv5/ZUrBrPL7gzxzTJedEyZxFMfsozwTIbbYfEQVo3kgg== - dependencies: - "@vitest/utils" "1.6.1" - fast-glob "^3.3.2" - fflate "^0.8.1" - flatted "^3.2.9" - pathe "^1.1.1" - picocolors "^1.0.0" - sirv "^2.0.4" - -"@vitest/utils@1.6.1": - version "1.6.1" - resolved "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.1.tgz" - integrity sha512-jOrrUvXM4Av9ZWiG1EajNto0u96kWAhJ1LmPmJhXXQx/32MecEKd10pOLYgS2BQx1TgkGhloPU1ArDW2vvaY6g== - dependencies: - diff-sequences "^29.6.3" - estree-walker "^3.0.3" - loupe "^2.3.7" - pretty-format "^29.7.0" - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn-walk@^8.3.2: - version "8.3.4" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz" - integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== - dependencies: - acorn "^8.11.0" - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.11.0, acorn@^8.14.0, acorn@^8.8.2, acorn@^8.9.0: - version "8.14.0" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" - integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== - -ajv@^6.12.4: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - -argparse@^2.0.1: - version "2.0.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -axios@^1.6.2: - version "1.7.9" - resolved "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz" - integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== - dependencies: - follow-redirects "^1.15.6" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.2" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz" - integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz" - integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== - dependencies: - fill-range "^7.1.1" - -browserslist@^4.24.0, "browserslist@>= 4.21.0": - version "4.24.4" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz" - integrity sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A== - dependencies: - caniuse-lite "^1.0.30001688" - electron-to-chromium "^1.5.73" - node-releases "^2.0.19" - update-browserslist-db "^1.1.1" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -cac@^6.7.14: - version "6.7.14" - resolved "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz" - integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== - -call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz" - integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== - dependencies: - es-errors "^1.3.0" - function-bind "^1.1.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -caniuse-lite@^1.0.30001688: - version "1.0.30001700" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz" - integrity sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ== - -chai@^4.3.10: - version "4.5.0" - resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" - integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.3" - deep-eql "^4.1.3" - get-func-name "^2.0.2" - loupe "^2.3.6" - pathval "^1.1.1" - type-detect "^4.1.0" - -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" - integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - dependencies: - get-func-name "^2.0.2" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -confbox@^0.1.8: - version "0.1.8" - resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz" - integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== - -convert-source-map@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" - integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== - -cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" - integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.4.1" - resolved "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz" - integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== - dependencies: - ms "^2.1.3" - -debug@~4.3.1: - version "4.3.7" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - -debug@~4.3.2: - version "4.3.7" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== - dependencies: - ms "^2.1.3" - -deep-eql@^4.1.3: - version "4.1.4" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" - integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== - dependencies: - type-detect "^4.0.0" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -diff-sequences@^29.6.3: - version "29.6.3" - resolved "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz" - integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dotenv@^16.3.1: - version "16.4.7" - resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz" - integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== - -dunder-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" - integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== - dependencies: - call-bind-apply-helpers "^1.0.1" - es-errors "^1.3.0" - gopd "^1.2.0" - -electron-to-chromium@^1.5.73: - version "1.5.104" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.104.tgz" - integrity sha512-Us9M2L4cO/zMBqVkJtnj353nQhMju9slHm62NprKTmdF3HH8wYOtNvDFq/JB2+ZRoGLzdvYDiATlMHs98XBM1g== - -engine.io-client@~6.6.1: - version "6.6.3" - resolved "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz" - integrity sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - engine.io-parser "~5.2.1" - ws "~8.17.1" - xmlhttprequest-ssl "~2.1.1" - -engine.io-parser@~5.2.1: - version "5.2.3" - resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz" - integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== - -entities@^4.4.0: - version "4.5.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - -es-define-property@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" - integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== - -es-errors@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" - integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== - -es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz" - integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== - dependencies: - es-errors "^1.3.0" - -es-set-tostringtag@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz" - integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== - dependencies: - es-errors "^1.3.0" - get-intrinsic "^1.2.6" - has-tostringtag "^1.0.2" - hasown "^2.0.2" - -esbuild@^0.21.3: - version "0.21.5" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz" - integrity sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw== - optionalDependencies: - "@esbuild/aix-ppc64" "0.21.5" - "@esbuild/android-arm" "0.21.5" - "@esbuild/android-arm64" "0.21.5" - "@esbuild/android-x64" "0.21.5" - "@esbuild/darwin-arm64" "0.21.5" - "@esbuild/darwin-x64" "0.21.5" - "@esbuild/freebsd-arm64" "0.21.5" - "@esbuild/freebsd-x64" "0.21.5" - "@esbuild/linux-arm" "0.21.5" - "@esbuild/linux-arm64" "0.21.5" - "@esbuild/linux-ia32" "0.21.5" - "@esbuild/linux-loong64" "0.21.5" - "@esbuild/linux-mips64el" "0.21.5" - "@esbuild/linux-ppc64" "0.21.5" - "@esbuild/linux-riscv64" "0.21.5" - "@esbuild/linux-s390x" "0.21.5" - "@esbuild/linux-x64" "0.21.5" - "@esbuild/netbsd-x64" "0.21.5" - "@esbuild/openbsd-x64" "0.21.5" - "@esbuild/sunos-x64" "0.21.5" - "@esbuild/win32-arm64" "0.21.5" - "@esbuild/win32-ia32" "0.21.5" - "@esbuild/win32-x64" "0.21.5" - -escalade@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" - integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: - version "3.4.3" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" - integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== - -"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.54.0: - version "8.57.1" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz" - integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.1" - "@humanwhocodes/config-array" "^0.13.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== - dependencies: - acorn "^8.9.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esquery@^1.4.2: - version "1.6.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz" - integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -estree-walker@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz" - integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== - dependencies: - "@types/estree" "^1.0.0" - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -execa@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz" - integrity sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^8.0.1" - human-signals "^5.0.0" - is-stream "^3.0.0" - merge-stream "^2.0.0" - npm-run-path "^5.1.0" - onetime "^6.0.0" - signal-exit "^4.1.0" - strip-final-newline "^3.0.0" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.3.2: - version "3.3.3" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz" - integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.8" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.19.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz" - integrity sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA== - dependencies: - reusify "^1.0.4" - -fflate@^0.8.1: - version "0.8.2" - resolved "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz" - integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -fill-range@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz" - integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== - dependencies: - to-regex-range "^5.0.1" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== - dependencies: - flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" - -flatted@^3.2.9: - version "3.3.3" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz" - integrity sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg== - -follow-redirects@^1.15.6: - version "1.15.9" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz" - integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ== - -form-data@^4.0.0: - version "4.0.2" - resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz" - integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - es-set-tostringtag "^2.1.0" - mime-types "^2.1.12" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2, fsevents@~2.3.3: - version "2.3.3" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - -function-bind@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" - integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-func-name@^2.0.1, get-func-name@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" - integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== - -get-intrinsic@^1.2.6: - version "1.3.0" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz" - integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== - dependencies: - call-bind-apply-helpers "^1.0.2" - es-define-property "^1.0.1" - es-errors "^1.3.0" - es-object-atoms "^1.1.1" - function-bind "^1.1.2" - get-proto "^1.0.1" - gopd "^1.2.0" - has-symbols "^1.1.0" - hasown "^2.0.2" - math-intrinsics "^1.1.0" - -get-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz" - integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== - dependencies: - dunder-proto "^1.0.1" - es-object-atoms "^1.0.0" - -get-stream@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz" - integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== - -glob-parent@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob@^7.1.3: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.4: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" - -gopd@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" - integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbols@^1.0.3, has-symbols@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" - integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== - -has-tostringtag@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" - integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== - dependencies: - has-symbols "^1.0.3" - -hasown@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" - integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== - dependencies: - function-bind "^1.1.2" - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -human-signals@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz" - integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== - -ignore@^5.2.0: - version "5.3.2" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" - integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== - -import-fresh@^3.2.1: - version "3.3.1" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz" - integrity sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz" - integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0, istanbul-lib-coverage@^3.2.2: - version "3.2.2" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz" - integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== - -istanbul-lib-instrument@^6.0.1: - version "6.0.3" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz" - integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== - dependencies: - "@babel/core" "^7.23.9" - "@babel/parser" "^7.23.9" - "@istanbuljs/schema" "^0.1.3" - istanbul-lib-coverage "^3.2.0" - semver "^7.5.4" - -istanbul-lib-report@^3.0.0, istanbul-lib-report@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz" - integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^4.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^5.0.4: - version "5.0.6" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz" - integrity sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A== - dependencies: - "@jridgewell/trace-mapping" "^0.3.23" - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - -istanbul-reports@^3.1.6: - version "3.1.7" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz" - integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^9.0.1: - version "9.0.1" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz" - integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsesc@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz" - integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json-stringify-safe@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -keyv@^4.5.3: - version "4.5.4" - resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -linkify-it@^5.0.0: - version "5.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz" - integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ== - dependencies: - uc.micro "^2.0.0" - -local-pkg@^0.5.0: - version "0.5.1" - resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.1.tgz" - integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== - dependencies: - mlly "^1.7.3" - pkg-types "^1.2.1" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -loupe@^2.3.6, loupe@^2.3.7: - version "2.3.7" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" - integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - dependencies: - get-func-name "^2.0.1" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lunr@^2.3.9: - version "2.3.9" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz" - integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== - -magic-string@^0.30.5: - version "0.30.17" - resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz" - integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA== - dependencies: - "@jridgewell/sourcemap-codec" "^1.5.0" - -magicast@^0.3.3: - version "0.3.5" - resolved "https://registry.npmjs.org/magicast/-/magicast-0.3.5.tgz" - integrity sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ== - dependencies: - "@babel/parser" "^7.25.4" - "@babel/types" "^7.25.4" - source-map-js "^1.2.0" - -make-dir@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz" - integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== - dependencies: - semver "^7.5.3" - -markdown-it@^14.1.0: - version "14.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz" - integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg== - dependencies: - argparse "^2.0.1" - entities "^4.4.0" - linkify-it "^5.0.0" - mdurl "^2.0.0" - punycode.js "^2.3.1" - uc.micro "^2.1.0" - -math-intrinsics@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" - integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== - -mdurl@^2.0.0: - version "2.0.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz" - integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0: - version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -micromatch@^4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz" - integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== - dependencies: - braces "^3.0.3" - picomatch "^2.3.1" - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mimic-fn@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz" - integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^9.0.5: - version "9.0.5" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz" - integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== - dependencies: - brace-expansion "^2.0.1" - -mlly@^1.7.3, mlly@^1.7.4: - version "1.7.4" - resolved "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz" - integrity sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw== - dependencies: - acorn "^8.14.0" - pathe "^2.0.1" - pkg-types "^1.3.0" - ufo "^1.5.4" - -mrmime@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz" - integrity sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ== - -ms@^2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -nanoid@^3.3.11: - version "3.3.11" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz" - integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -nock@^13.4.0: - version "13.5.6" - resolved "https://registry.npmjs.org/nock/-/nock-13.5.6.tgz" - integrity sha512-o2zOYiCpzRqSzPj0Zt/dQ/DqZeYoaQ7TUonc/xUPjCGl9WeHpNbxgVvOquXYAaJzI0M9BXV3HTzG0p8IUAbBTQ== - dependencies: - debug "^4.1.0" - json-stringify-safe "^5.0.1" - propagate "^2.0.0" - -node-releases@^2.0.19: - version "2.0.19" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz" - integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== - -npm-run-path@^5.1.0: - version "5.3.0" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz" - integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== - dependencies: - path-key "^4.0.0" - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz" - integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== - dependencies: - mimic-fn "^4.0.0" - -optionator@^0.9.3: - version "0.9.4" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" - integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.5" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-limit@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-5.0.0.tgz" - integrity sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ== - dependencies: - yocto-queue "^1.0.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-key@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz" - integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== - -pathe@^1.1.1: - version "1.1.2" - resolved "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz" - integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== - -pathe@^2.0.1: - version "2.0.3" - resolved "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz" - integrity sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w== - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -picocolors@^1.0.0, picocolors@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" - integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== - -picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pkg-types@^1.2.1, pkg-types@^1.3.0: - version "1.3.1" - resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz" - integrity sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ== - dependencies: - confbox "^0.1.8" - mlly "^1.7.4" - pathe "^2.0.1" - -postcss@^8.4.43: - version "8.5.6" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz" - integrity sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg== - dependencies: - nanoid "^3.3.11" - picocolors "^1.1.1" - source-map-js "^1.2.1" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -pretty-format@^29.7.0: - version "29.7.0" - resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz" - integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== - dependencies: - "@jest/schemas" "^29.6.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - -propagate@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz" - integrity sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag== - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -punycode.js@^2.3.1: - version "2.3.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz" - integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA== - -punycode@^2.1.0: - version "2.3.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" - integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -react-is@^18.0.0: - version "18.3.1" - resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz" - integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup@^4.20.0: - version "4.44.1" - resolved "https://registry.npmjs.org/rollup/-/rollup-4.44.1.tgz" - integrity sha512-x8H8aPvD+xbl0Do8oez5f5o8eMS3trfCghc4HhLAnCkj7Vl0d1JWGs0UF/D886zLW2rOj2QymV/JcSSsw+XDNg== - dependencies: - "@types/estree" "1.0.8" - optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.44.1" - "@rollup/rollup-android-arm64" "4.44.1" - "@rollup/rollup-darwin-arm64" "4.44.1" - "@rollup/rollup-darwin-x64" "4.44.1" - "@rollup/rollup-freebsd-arm64" "4.44.1" - "@rollup/rollup-freebsd-x64" "4.44.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.44.1" - "@rollup/rollup-linux-arm-musleabihf" "4.44.1" - "@rollup/rollup-linux-arm64-gnu" "4.44.1" - "@rollup/rollup-linux-arm64-musl" "4.44.1" - "@rollup/rollup-linux-loongarch64-gnu" "4.44.1" - "@rollup/rollup-linux-powerpc64le-gnu" "4.44.1" - "@rollup/rollup-linux-riscv64-gnu" "4.44.1" - "@rollup/rollup-linux-riscv64-musl" "4.44.1" - "@rollup/rollup-linux-s390x-gnu" "4.44.1" - "@rollup/rollup-linux-x64-gnu" "4.44.1" - "@rollup/rollup-linux-x64-musl" "4.44.1" - "@rollup/rollup-win32-arm64-msvc" "4.44.1" - "@rollup/rollup-win32-ia32-msvc" "4.44.1" - "@rollup/rollup-win32-x64-msvc" "4.44.1" - fsevents "~2.3.2" - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -semver@^6.3.1: - version "6.3.1" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" - integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== - -semver@^7.5.3: - version "7.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz" - integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA== - -semver@^7.5.4: - version "7.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz" - integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA== - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -siginfo@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz" - integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== - -signal-exit@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" - integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== - -sirv@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz" - integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== - dependencies: - "@polka/url" "^1.0.0-next.24" - mrmime "^2.0.0" - totalist "^3.0.0" - -socket.io-client@^4.7.5: - version "4.8.1" - resolved "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz" - integrity sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.2" - engine.io-client "~6.6.1" - socket.io-parser "~4.2.4" - -socket.io-parser@~4.2.4: - version "4.2.4" - resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz" - integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -source-map-js@^1.2.0, source-map-js@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz" - integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== - -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -stackback@0.0.2: - version "0.0.2" - resolved "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz" - integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== - -std-env@^3.5.0: - version "3.9.0" - resolved "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz" - integrity sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw== - -strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-final-newline@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz" - integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== - -strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strip-literal@^2.0.0: - version "2.1.1" - resolved "https://registry.npmjs.org/strip-literal/-/strip-literal-2.1.1.tgz" - integrity sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q== - dependencies: - js-tokens "^9.0.1" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -terser@^5.4.0: - version "5.39.0" - resolved "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz" - integrity sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -tinybench@^2.5.1: - version "2.9.0" - resolved "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz" - integrity sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg== - -tinypool@^0.8.3: - version "0.8.4" - resolved "https://registry.npmjs.org/tinypool/-/tinypool-0.8.4.tgz" - integrity sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ== - -tinyspy@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz" - integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -totalist@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz" - integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-detect@^4.0.0: - version "4.0.8" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-detect@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" - integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -typedoc-plugin-markdown@^4.9.0: - version "4.9.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz" - integrity sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw== - -typedoc@^0.28.14, typedoc@0.28.x: - version "0.28.14" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz" - integrity sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA== - dependencies: - "@gerrit0/mini-shiki" "^3.12.0" - lunr "^2.3.9" - markdown-it "^14.1.0" - minimatch "^9.0.5" - yaml "^2.8.1" - -typescript@^5.3.2, "typescript@5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x": - version "5.7.3" - resolved "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz" - integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== - -uc.micro@^2.0.0, uc.micro@^2.1.0: - version "2.1.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz" - integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A== - -ufo@^1.5.4: - version "1.6.1" - resolved "https://registry.npmjs.org/ufo/-/ufo-1.6.1.tgz" - integrity sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA== - -undici-types@~7.16.0: - version "7.16.0" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/undici-types/-/undici-types-7.16.0.tgz" - integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== - -update-browserslist-db@^1.1.1: - version "1.1.2" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz" - integrity sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg== - dependencies: - escalade "^3.2.0" - picocolors "^1.1.1" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -uuid@^13.0.0: - version "13.0.0" - resolved "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz" - integrity sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w== - -vite-node@1.6.1: - version "1.6.1" - resolved "https://registry.npmjs.org/vite-node/-/vite-node-1.6.1.tgz" - integrity sha512-YAXkfvGtuTzwWbDSACdJSg4A4DZiAqckWe90Zapc/sEX3XvHcw1NdurM/6od8J207tSDqNbSsgdCacBgvJKFuA== - dependencies: - cac "^6.7.14" - debug "^4.3.4" - pathe "^1.1.1" - picocolors "^1.0.0" - vite "^5.0.0" - -vite@^5.0.0: - version "5.4.19" - resolved "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz" - integrity sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA== - dependencies: - esbuild "^0.21.3" - postcss "^8.4.43" - rollup "^4.20.0" - optionalDependencies: - fsevents "~2.3.3" - -vitest@^1.6.1, vitest@1.6.1: - version "1.6.1" - resolved "https://registry.npmjs.org/vitest/-/vitest-1.6.1.tgz" - integrity sha512-Ljb1cnSJSivGN0LqXd/zmDbWEM0RNNg2t1QW/XUhYl/qPqyu7CsqeWtqQXHVaJsecLPuDoak2oJcZN2QoRIOag== - dependencies: - "@vitest/expect" "1.6.1" - "@vitest/runner" "1.6.1" - "@vitest/snapshot" "1.6.1" - "@vitest/spy" "1.6.1" - "@vitest/utils" "1.6.1" - acorn-walk "^8.3.2" - chai "^4.3.10" - debug "^4.3.4" - execa "^8.0.1" - local-pkg "^0.5.0" - magic-string "^0.30.5" - pathe "^1.1.1" - picocolors "^1.0.0" - std-env "^3.5.0" - strip-literal "^2.0.0" - tinybench "^2.5.1" - tinypool "^0.8.3" - vite "^5.0.0" - vite-node "1.6.1" - why-is-node-running "^2.2.2" - -which@^2.0.1: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -why-is-node-running@^2.2.2: - version "2.3.0" - resolved "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz" - integrity sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w== - dependencies: - siginfo "^2.0.0" - stackback "0.0.2" - -word-wrap@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" - integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@~8.17.1: - version "8.17.1" - resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== - -xmlhttprequest-ssl@~2.1.1: - version "2.1.2" - resolved "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz" - integrity sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yaml@^2.8.1: - version "2.8.1" - resolved "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz" - integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -yocto-queue@^1.0.0: - version "1.2.1" - resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz" - integrity sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg== From 87c14ff6307e0c8660da2dad951c296ca67e5715 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 24 Dec 2025 10:52:15 +0200 Subject: [PATCH 28/31] resolve conflicts --- src/modules/agents.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/modules/agents.ts b/src/modules/agents.ts index 7dec135..3b8974c 100644 --- a/src/modules/agents.ts +++ b/src/modules/agents.ts @@ -46,13 +46,10 @@ export function createAgentsModule({ ) => { const room = `/agent-conversations/${conversation.id}`; const socket = getSocket(); - await socket.updateModel( - room, - { - ...conversation, - messages: [...(conversation.messages || []), message], - } - ); + await socket.updateModel(room, { + ...conversation, + messages: [...(conversation.messages || []), message], + }); return axios.post( `${baseURL}/conversations/${conversation.id}/messages`, message From 3f742bec6d1df75e098aede776f0188c3da3fb70 Mon Sep 17 00:00:00 2001 From: Sam Markowitz Date: Wed, 24 Dec 2025 11:00:48 +0200 Subject: [PATCH 29/31] Trigger GitHub to recheck merge status From 98cef6db219ac4cb211388effbe6924e9e92dae7 Mon Sep 17 00:00:00 2001 From: Netanel Gilad Date: Wed, 24 Dec 2025 13:02:01 +0200 Subject: [PATCH 30/31] fix package lock --- .npmrc | 1 + package-lock.json | 2237 +++++++++++++++++++++++++++------------------ 2 files changed, 1350 insertions(+), 888 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..1e86a94 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +npm_config_registry=https://registry.npmjs.org \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6ca4b87..f66137a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,24 +44,24 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", - "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", + "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.25.9", + "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "picocolors": "^1.1.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.26.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", - "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", + "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", "dev": true, "license": "MIT", "engines": { @@ -69,22 +69,22 @@ } }, "node_modules/@babel/core": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", - "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/helper-compilation-targets": "^7.26.5", - "@babel/helper-module-transforms": "^7.26.0", - "@babel/helpers": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/traverse": "^7.26.9", - "@babel/types": "^7.26.9", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", + "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -99,17 +99,27 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", - "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", + "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.5", + "@babel/types": "^7.28.5", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { @@ -117,14 +127,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.26.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", - "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", + "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.26.5", - "@babel/helper-validator-option": "^7.25.9", + "@babel/compat-data": "^7.27.2", + "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -133,30 +143,50 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", - "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", + "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/traverse": "^7.27.1", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", - "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9", - "@babel/traverse": "^7.25.9" + "@babel/helper-module-imports": "^7.27.1", + "@babel/helper-validator-identifier": "^7.27.1", + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -166,9 +196,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", - "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", + "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, "license": "MIT", "engines": { @@ -176,9 +206,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", - "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", + "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, "license": "MIT", "engines": { @@ -186,9 +216,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", - "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz", + "integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==", "dev": true, "license": "MIT", "engines": { @@ -196,27 +226,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", - "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", - "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", + "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.9" + "@babel/types": "^7.28.5" }, "bin": { "parser": "bin/babel-parser.js" @@ -226,48 +256,48 @@ } }, "node_modules/@babel/template": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", - "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", + "version": "7.27.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", + "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/parser": "^7.26.9", - "@babel/types": "^7.26.9" + "@babel/code-frame": "^7.27.1", + "@babel/parser": "^7.27.2", + "@babel/types": "^7.27.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", - "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", + "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.26.2", - "@babel/generator": "^7.26.9", - "@babel/parser": "^7.26.9", - "@babel/template": "^7.26.9", - "@babel/types": "^7.26.9", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/code-frame": "^7.27.1", + "@babel/generator": "^7.28.5", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.5", + "@babel/template": "^7.27.2", + "@babel/types": "^7.28.5", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.26.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", - "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", + "version": "7.28.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", + "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.25.9", - "@babel/helper-validator-identifier": "^7.25.9" + "@babel/helper-string-parser": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -280,6 +310,74 @@ "dev": true, "license": "MIT" }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/darwin-arm64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", @@ -297,10 +395,316 @@ "node": ">=12" } }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", - "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "license": "MIT", "dependencies": { @@ -317,9 +721,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { @@ -340,56 +744,14 @@ "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/js": { @@ -403,16 +765,16 @@ } }, "node_modules/@gerrit0/mini-shiki": { - "version": "3.15.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@gerrit0/mini-shiki/-/mini-shiki-3.15.0.tgz", - "integrity": "sha512-L5IHdZIDa4bG4yJaOzfasOH/o22MCesY0mx+n6VATbaiCtMeR59pdRqYk4bEiQkIHfxsHPNgdi7VJlZb2FhdMQ==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.20.0.tgz", + "integrity": "sha512-Wa57i+bMpK6PGJZ1f2myxo3iO+K/kZikcyvH8NIqNNZhQUbDav7V9LQmWOXhf946mz5c1NZ19WMsGYiDKTryzQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/engine-oniguruma": "^3.15.0", - "@shikijs/langs": "^3.15.0", - "@shikijs/themes": "^3.15.0", - "@shikijs/types": "^3.15.0", + "@shikijs/engine-oniguruma": "^3.20.0", + "@shikijs/langs": "^3.20.0", + "@shikijs/themes": "^3.20.0", + "@shikijs/types": "^3.20.0", "@shikijs/vscode-textmate": "^10.0.2" } }, @@ -478,64 +840,48 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", - "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", - "engines": { - "node": ">=6.0.0" + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -588,10 +934,38 @@ "dev": true, "license": "MIT" }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.54.0.tgz", + "integrity": "sha512-OywsdRHrFvCdvsewAInDKCNyR3laPA2mc9bRYJ6LBp5IyvF3fvXbbNR0bSzHlZVFtn6E0xw2oZlyjg4rKCVcng==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.54.0.tgz", + "integrity": "sha512-Skx39Uv+u7H224Af+bDgNinitlmHyQX1K/atIA32JP3JQw6hVODX5tkbi2zof/E69M1qH2UoN3Xdxgs90mmNYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.44.1.tgz", - "integrity": "sha512-fM/xPesi7g2M7chk37LOnmnSTHLG/v2ggWqKj3CCA1rMA4mm5KVBT1fNoswbo1JhPuNNZrVwpTvlCVggv8A2zg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.54.0.tgz", + "integrity": "sha512-k43D4qta/+6Fq+nCDhhv9yP2HdeKeP56QrUUTW7E6PhZP1US6NDqpJj4MY0jBHlJivVJD5P8NxrjuobZBJTCRw==", "cpu": [ "arm64" ], @@ -602,41 +976,307 @@ "darwin" ] }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.54.0.tgz", + "integrity": "sha512-cOo7biqwkpawslEfox5Vs8/qj83M/aZCSSNIWpVzfU2CYHa2G3P1UN5WF01RdTHSgCkri7XOlTdtk17BezlV3A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.54.0.tgz", + "integrity": "sha512-miSvuFkmvFbgJ1BevMa4CPCFt5MPGw094knM64W9I0giUIMMmRYcGW/JWZDriaw/k1kOBtsWh1z6nIFV1vPNtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.54.0.tgz", + "integrity": "sha512-KGXIs55+b/ZfZsq9aR026tmr/+7tq6VG6MsnrvF4H8VhwflTIuYh+LFUlIsRdQSgrgmtM3fVATzEAj4hBQlaqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.54.0.tgz", + "integrity": "sha512-EHMUcDwhtdRGlXZsGSIuXSYwD5kOT9NVnx9sqzYiwAc91wfYOE1g1djOEDseZJKKqtHAHGwnGPQu3kytmfaXLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.54.0.tgz", + "integrity": "sha512-+pBrqEjaakN2ySv5RVrj/qLytYhPKEUwk+e3SFU5jTLHIcAtqh2rLrd/OkbNuHJpsBgxsD8ccJt5ga/SeG0JmA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.54.0.tgz", + "integrity": "sha512-NSqc7rE9wuUaRBsBp5ckQ5CVz5aIRKCwsoa6WMF7G01sX3/qHUw/z4pv+D+ahL1EIKy6Enpcnz1RY8pf7bjwng==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.54.0.tgz", + "integrity": "sha512-gr5vDbg3Bakga5kbdpqx81m2n9IX8M6gIMlQQIXiLTNeQW6CucvuInJ91EuCJ/JYvc+rcLLsDFcfAD1K7fMofg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.54.0.tgz", + "integrity": "sha512-gsrtB1NA3ZYj2vq0Rzkylo9ylCtW/PhpLEivlgWe0bpgtX5+9j9EZa0wtZiCjgu6zmSeZWyI/e2YRX1URozpIw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.54.0.tgz", + "integrity": "sha512-y3qNOfTBStmFNq+t4s7Tmc9hW2ENtPg8FeUD/VShI7rKxNW7O4fFeaYbMsd3tpFlIg1Q8IapFgy7Q9i2BqeBvA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.54.0.tgz", + "integrity": "sha512-89sepv7h2lIVPsFma8iwmccN7Yjjtgz0Rj/Ou6fEqg3HDhpCa+Et+YSufy27i6b0Wav69Qv4WBNl3Rs6pwhebQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.54.0.tgz", + "integrity": "sha512-ZcU77ieh0M2Q8Ur7D5X7KvK+UxbXeDHwiOt/CPSBTI1fBmeDMivW0dPkdqkT4rOgDjrDDBUed9x4EgraIKoR2A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.54.0.tgz", + "integrity": "sha512-2AdWy5RdDF5+4YfG/YesGDDtbyJlC9LHmL6rZw6FurBJ5n4vFGupsOBGfwMRjBYH7qRQowT8D/U4LoSvVwOhSQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.54.0.tgz", + "integrity": "sha512-WGt5J8Ij/rvyqpFexxk3ffKqqbLf9AqrTBbWDk7ApGUzaIs6V+s2s84kAxklFwmMF/vBNGrVdYgbblCOFFezMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.54.0.tgz", + "integrity": "sha512-JzQmb38ATzHjxlPHuTH6tE7ojnMKM2kYNzt44LO/jJi8BpceEC8QuXYA908n8r3CNuG/B3BV8VR3Hi1rYtmPiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.54.0.tgz", + "integrity": "sha512-huT3fd0iC7jigGh7n3q/+lfPcXxBi+om/Rs3yiFxjvSxbSB6aohDFXbWvlspaqjeOh+hx7DDHS+5Es5qRkWkZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.54.0.tgz", + "integrity": "sha512-c2V0W1bsKIKfbLMBu/WGBz6Yci8nJ/ZJdheE0EwB73N3MvHYKiKGs3mVilX4Gs70eGeDaMqEob25Tw2Gb9Nqyw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.54.0.tgz", + "integrity": "sha512-woEHgqQqDCkAzrDhvDipnSirm5vxUXtSKDYTVpZG3nUdW/VVB5VdCYA2iReSj/u3yCZzXID4kuKG7OynPnB3WQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.54.0.tgz", + "integrity": "sha512-dzAc53LOuFvHwbCEOS0rPbXp6SIhAf2txMP5p6mGyOXXw5mWY8NGGbPMPrs4P1WItkfApDathBj/NzMLUZ9rtQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.54.0.tgz", + "integrity": "sha512-hYT5d3YNdSh3mbCU1gwQyPgQd3T2ne0A3KG8KSBdav5TiBg6eInVmV+TeR5uHufiIgSFg0XsOWGW5/RhNcSvPg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.15.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/engine-oniguruma/-/engine-oniguruma-3.15.0.tgz", - "integrity": "sha512-HnqFsV11skAHvOArMZdLBZZApRSYS4LSztk2K3016Y9VCyZISnlYUYsL2hzlS7tPqKHvNqmI5JSUJZprXloMvA==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.20.0.tgz", + "integrity": "sha512-Yx3gy7xLzM0ZOjqoxciHjA7dAt5tyzJE3L4uQoM83agahy+PlW244XJSrmJRSBvGYELDhYXPacD4R/cauV5bzQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.15.0", + "@shikijs/types": "3.20.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.15.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/langs/-/langs-3.15.0.tgz", - "integrity": "sha512-WpRvEFvkVvO65uKYW4Rzxs+IG0gToyM8SARQMtGGsH4GDMNZrr60qdggXrFOsdfOVssG/QQGEl3FnJ3EZ+8w8A==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.20.0.tgz", + "integrity": "sha512-le+bssCxcSHrygCWuOrYJHvjus6zhQ2K7q/0mgjiffRbkhM4o1EWu2m+29l0yEsHDbWaWPNnDUTRVVBvBBeKaA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.15.0" + "@shikijs/types": "3.20.0" } }, "node_modules/@shikijs/themes": { - "version": "3.15.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/themes/-/themes-3.15.0.tgz", - "integrity": "sha512-8ow2zWb1IDvCKjYb0KiLNrK4offFdkfNVPXb1OZykpLCzRU6j+efkY+Y7VQjNlNFXonSw+4AOdGYtmqykDbRiQ==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.20.0.tgz", + "integrity": "sha512-U1NSU7Sl26Q7ErRvJUouArxfM2euWqq1xaSrbqMu2iqa+tSp0D1Yah8216sDYbdDHw4C8b75UpE65eWorm2erQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.15.0" + "@shikijs/types": "3.20.0" } }, "node_modules/@shikijs/types": { - "version": "3.15.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/types/-/types-3.15.0.tgz", - "integrity": "sha512-BnP+y/EQnhihgHy4oIAN+6FFtmfTekwOLsQbRw9hOKwqgNy8Bdsjq8B05oAt/ZgvIWWFrshV71ytOrlPfYjIJw==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.20.0.tgz", + "integrity": "sha512-lhYAATn10nkZcBQ0BlzSbJA3wcmL5MXUUF8d2Zzon6saZDlToKaiRX60n2+ZaHJCmXEcZRWNzn+k9vplr8Jhsw==", "dev": true, "license": "MIT", "dependencies": { @@ -646,7 +1286,7 @@ }, "node_modules/@shikijs/vscode-textmate": { "version": "10.0.2", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", + "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz", "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==", "dev": true, "license": "MIT" @@ -673,7 +1313,7 @@ }, "node_modules/@types/hast": { "version": "3.0.4", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/hast/-/hast-3.0.4.tgz", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", "dev": true, "license": "MIT", @@ -682,9 +1322,9 @@ } }, "node_modules/@types/node": { - "version": "25.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.2.tgz", - "integrity": "sha512-gWEkeiyYE4vqjON/+Obqcoeffmk0NF15WSBwSs7zwVA2bAbTaE0SJ7P0WNGoJn8uE7fiaV5a7dKYIJriEqOrmA==", + "version": "25.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz", + "integrity": "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==", "dev": true, "license": "MIT", "dependencies": { @@ -693,7 +1333,7 @@ }, "node_modules/@types/unist": { "version": "3.0.3", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/@types/unist/-/unist-3.0.3.tgz", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", "dev": true, "license": "MIT" @@ -702,76 +1342,31 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==", - "dev": true, - "license": "ISC" - }, - "node_modules/@vitest/coverage-istanbul": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz", - "integrity": "sha512-0NWKNPrbMo1s6emwnn+UpGPxrSEd9R6VpQ3wzYz0y43esZjjDkGLb6Qkvfu6LNyQO4TAGyepaZ11imUmmIFLaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.3.4", - "istanbul-lib-coverage": "^3.2.2", - "istanbul-lib-instrument": "^6.0.1", - "istanbul-lib-report": "^3.0.1", - "istanbul-lib-source-maps": "^5.0.4", - "istanbul-reports": "^3.1.6", - "magicast": "^0.3.3", - "picocolors": "^1.0.0", - "test-exclude": "^6.0.0" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "vitest": "1.6.1" - } - }, - "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } + "dev": true, + "license": "ISC" }, - "node_modules/@vitest/coverage-istanbul/node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "node_modules/@vitest/coverage-istanbul": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-1.6.1.tgz", + "integrity": "sha512-0NWKNPrbMo1s6emwnn+UpGPxrSEd9R6VpQ3wzYz0y43esZjjDkGLb6Qkvfu6LNyQO4TAGyepaZ11imUmmIFLaw==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" + "debug": "^4.3.4", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-instrument": "^6.0.1", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.4", + "istanbul-reports": "^3.1.6", + "magicast": "^0.3.3", + "picocolors": "^1.0.0", + "test-exclude": "^6.0.0" }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@vitest/coverage-istanbul/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "funding": { + "url": "https://opencollective.com/vitest" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "vitest": "1.6.1" } }, "node_modules/@vitest/coverage-v8": { @@ -802,21 +1397,6 @@ "vitest": "1.6.1" } }, - "node_modules/@vitest/coverage-v8/node_modules/istanbul-lib-source-maps": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", - "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.23", - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@vitest/expect": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.1.tgz", @@ -864,9 +1444,9 @@ } }, "node_modules/@vitest/runner/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", + "integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==", "dev": true, "license": "MIT", "engines": { @@ -942,20 +1522,10 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/utils/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -1033,7 +1603,7 @@ }, "node_modules/argparse": { "version": "2.0.1", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/argparse/-/argparse-2.0.1.tgz", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, "license": "Python-2.0" @@ -1055,13 +1625,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.7.9", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz", - "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", + "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", + "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, @@ -1072,10 +1642,20 @@ "dev": true, "license": "MIT" }, + "node_modules/baseline-browser-mapping": { + "version": "2.9.11", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", + "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -1097,9 +1677,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", - "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", "dev": true, "funding": [ { @@ -1117,10 +1697,11 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001688", - "electron-to-chromium": "^1.5.73", - "node-releases": "^2.0.19", - "update-browserslist-db": "^1.1.1" + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", + "node-releases": "^2.0.27", + "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" @@ -1129,15 +1710,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -1172,9 +1744,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001700", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", - "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", + "version": "1.0.30001761", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", + "integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==", "dev": true, "funding": [ { @@ -1211,16 +1783,6 @@ "node": ">=4" } }, - "node_modules/chai/node_modules/type-detect": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", - "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1283,15 +1845,6 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1329,10 +1882,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", - "dev": true, + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1399,9 +1951,9 @@ } }, "node_modules/dotenv": { - "version": "16.4.7", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", - "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -1426,42 +1978,25 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.104", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.104.tgz", - "integrity": "sha512-Us9M2L4cO/zMBqVkJtnj353nQhMju9slHm62NprKTmdF3HH8wYOtNvDFq/JB2+ZRoGLzdvYDiATlMHs98XBM1g==", + "version": "1.5.267", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz", + "integrity": "sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==", "dev": true, "license": "ISC" }, "node_modules/engine.io-client": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", - "integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==", + "version": "6.6.4", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.4.tgz", + "integrity": "sha512-+kjUJnZGwzewFDw951CDWcwj35vMNf2fcj7xQWOctq1F2i1jkDdVvdFG9kM/BEChymCH36KgjnW0NsL58JYRxw==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", + "debug": "~4.4.1", "engine.io-parser": "~5.2.1", - "ws": "~8.17.1", + "ws": "~8.18.3", "xmlhttprequest-ssl": "~2.1.1" } }, - "node_modules/engine.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/engine.io-parser": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", @@ -1473,7 +2008,7 @@ }, "node_modules/entities": { "version": "4.5.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/entities/-/entities-4.5.0.tgz", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "license": "BSD-2-Clause", @@ -1678,97 +2213,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -1823,6 +2267,16 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -1833,6 +2287,30 @@ "node": ">=0.10.0" } }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1885,9 +2363,9 @@ "license": "MIT" }, "node_modules/fastq": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", - "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "dev": true, "license": "ISC", "dependencies": { @@ -1927,6 +2405,23 @@ "node": ">=8" } }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/flat-cache": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", @@ -1950,9 +2445,9 @@ "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", @@ -1970,14 +2465,15 @@ } }, "node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -2056,20 +2552,55 @@ "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.4" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { @@ -2086,13 +2617,19 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gopd": { @@ -2170,6 +2707,16 @@ "dev": true, "license": "MIT" }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.17.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -2197,16 +2744,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/import-fresh/node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2279,6 +2816,19 @@ "node": ">=8" } }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2296,6 +2846,23 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -2311,10 +2878,25 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -2332,6 +2914,19 @@ "dev": true, "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -2412,7 +3007,7 @@ }, "node_modules/linkify-it": { "version": "5.0.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/linkify-it/-/linkify-it-5.0.0.tgz", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", "dev": true, "license": "MIT", @@ -2437,6 +3032,22 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2466,19 +3077,19 @@ }, "node_modules/lunr": { "version": "2.3.9", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/lunr/-/lunr-2.3.9.tgz", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true, "license": "MIT" }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/magicast": { @@ -2509,22 +3120,9 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/markdown-it": { "version": "14.1.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/markdown-it/-/markdown-it-14.1.0.tgz", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", "dev": true, "license": "MIT", @@ -2551,7 +3149,7 @@ }, "node_modules/mdurl": { "version": "2.0.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/mdurl/-/mdurl-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", "dev": true, "license": "MIT" @@ -2587,19 +3185,6 @@ "node": ">=8.6" } }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -2621,6 +3206,19 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2635,16 +3233,16 @@ } }, "node_modules/mlly": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz", - "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", "dev": true, "license": "MIT", "dependencies": { - "acorn": "^8.14.0", - "pathe": "^2.0.1", - "pkg-types": "^1.3.0", - "ufo": "^1.5.4" + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" } }, "node_modules/mlly/node_modules/pathe": { @@ -2712,12 +3310,41 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.27", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.27.tgz", + "integrity": "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==", "dev": true, "license": "MIT" }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2728,6 +3355,22 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -2762,6 +3405,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -2829,6 +3488,19 @@ "dev": true, "license": "ISC" }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pkg-types": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", @@ -2943,7 +3615,7 @@ }, "node_modules/punycode.js": { "version": "2.3.1", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/punycode.js/-/punycode.js-2.3.1.tgz", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", "dev": true, "license": "MIT", @@ -2979,10 +3651,20 @@ "dev": true, "license": "MIT" }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", "dev": true, "license": "MIT", "engines": { @@ -3001,38 +3683,16 @@ "glob": "^7.1.3" }, "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" + "rimraf": "bin.js" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rollup": { - "version": "4.44.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.44.1.tgz", - "integrity": "sha512-x8H8aPvD+xbl0Do8oez5f5o8eMS3trfCghc4HhLAnCkj7Vl0d1JWGs0UF/D886zLW2rOj2QymV/JcSSsw+XDNg==", + "version": "4.54.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.54.0.tgz", + "integrity": "sha512-3nk8Y3a9Ea8szgKhinMlGMhGMw89mqule3KWczxhIzqudyHdCIOHw8WJlj/r329fACjKLEh13ZSk7oE22kyeIw==", "dev": true, "license": "MIT", "dependencies": { @@ -3046,26 +3706,28 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.44.1", - "@rollup/rollup-android-arm64": "4.44.1", - "@rollup/rollup-darwin-arm64": "4.44.1", - "@rollup/rollup-darwin-x64": "4.44.1", - "@rollup/rollup-freebsd-arm64": "4.44.1", - "@rollup/rollup-freebsd-x64": "4.44.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.44.1", - "@rollup/rollup-linux-arm-musleabihf": "4.44.1", - "@rollup/rollup-linux-arm64-gnu": "4.44.1", - "@rollup/rollup-linux-arm64-musl": "4.44.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.44.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.44.1", - "@rollup/rollup-linux-riscv64-gnu": "4.44.1", - "@rollup/rollup-linux-riscv64-musl": "4.44.1", - "@rollup/rollup-linux-s390x-gnu": "4.44.1", - "@rollup/rollup-linux-x64-gnu": "4.44.1", - "@rollup/rollup-linux-x64-musl": "4.44.1", - "@rollup/rollup-win32-arm64-msvc": "4.44.1", - "@rollup/rollup-win32-ia32-msvc": "4.44.1", - "@rollup/rollup-win32-x64-msvc": "4.44.1", + "@rollup/rollup-android-arm-eabi": "4.54.0", + "@rollup/rollup-android-arm64": "4.54.0", + "@rollup/rollup-darwin-arm64": "4.54.0", + "@rollup/rollup-darwin-x64": "4.54.0", + "@rollup/rollup-freebsd-arm64": "4.54.0", + "@rollup/rollup-freebsd-x64": "4.54.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.54.0", + "@rollup/rollup-linux-arm-musleabihf": "4.54.0", + "@rollup/rollup-linux-arm64-gnu": "4.54.0", + "@rollup/rollup-linux-arm64-musl": "4.54.0", + "@rollup/rollup-linux-loong64-gnu": "4.54.0", + "@rollup/rollup-linux-ppc64-gnu": "4.54.0", + "@rollup/rollup-linux-riscv64-gnu": "4.54.0", + "@rollup/rollup-linux-riscv64-musl": "4.54.0", + "@rollup/rollup-linux-s390x-gnu": "4.54.0", + "@rollup/rollup-linux-x64-gnu": "4.54.0", + "@rollup/rollup-linux-x64-musl": "4.54.0", + "@rollup/rollup-openharmony-arm64": "4.54.0", + "@rollup/rollup-win32-arm64-msvc": "4.54.0", + "@rollup/rollup-win32-ia32-msvc": "4.54.0", + "@rollup/rollup-win32-x64-gnu": "4.54.0", + "@rollup/rollup-win32-x64-msvc": "4.54.0", "fsevents": "~2.3.2" } }, @@ -3094,13 +3756,16 @@ } }, "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/shebang-command": { @@ -3133,6 +3798,19 @@ "dev": true, "license": "ISC" }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/sirv": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", @@ -3149,13 +3827,13 @@ } }, "node_modules/socket.io-client": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz", - "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.3.tgz", + "integrity": "sha512-uP0bpjWrjQmUt5DTHq9RuoCBdFJF10cdX9X+a368j/Ft0wmaVgxlrjvK3kjvgCODOMMOz9lcaRzxmso0bTWZ/g==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", + "debug": "~4.4.1", "engine.io-client": "~6.6.1", "socket.io-parser": "~4.2.4" }, @@ -3163,65 +3841,19 @@ "node": ">=10.0.0" } }, - "node_modules/socket.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz", + "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==", "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "debug": "~4.4.1" }, "engines": { "node": ">=10.0.0" } }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "license": "BSD-3-Clause", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -3240,9 +3872,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz", - "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", "dev": true, "license": "MIT" }, @@ -3259,6 +3891,19 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -3305,40 +3950,6 @@ "node": ">=8" } }, - "node_modules/terser": { - "version": "5.39.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz", - "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==", - "dev": true, - "license": "BSD-2-Clause", - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -3354,28 +3965,6 @@ "node": ">=8" } }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -3447,23 +4036,36 @@ } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "license": "MIT", "engines": { "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typedoc": { - "version": "0.28.14", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc/-/typedoc-0.28.14.tgz", - "integrity": "sha512-ftJYPvpVfQvFzpkoSfHLkJybdA/geDJ8BGQt/ZnkkhnBYoYW6lBgPQXu6vqLxO4X75dA55hX8Af847H5KXlEFA==", + "version": "0.28.15", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.15.tgz", + "integrity": "sha512-mw2/2vTL7MlT+BVo43lOsufkkd2CJO4zeOSuWQQsiXoV2VuEn7f6IZp2jsUDPmBMABpgR0R5jlcJ2OGEFYmkyg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@gerrit0/mini-shiki": "^3.12.0", + "@gerrit0/mini-shiki": "^3.17.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", @@ -3482,7 +4084,7 @@ }, "node_modules/typedoc-plugin-markdown": { "version": "4.9.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.9.0.tgz", "integrity": "sha512-9Uu4WR9L7ZBgAl60N/h+jqmPxxvnC9nQAlnnO/OujtG2ubjnKTVUFY1XDhcMY+pCqlX3N2HsQM2QTYZIU9tJuw==", "dev": true, "license": "MIT", @@ -3495,7 +4097,7 @@ }, "node_modules/typedoc/node_modules/brace-expansion": { "version": "2.0.2", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/brace-expansion/-/brace-expansion-2.0.2.tgz", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", @@ -3505,7 +4107,7 @@ }, "node_modules/typedoc/node_modules/minimatch": { "version": "9.0.5", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/minimatch/-/minimatch-9.0.5.tgz", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", @@ -3520,9 +4122,9 @@ } }, "node_modules/typescript": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", - "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3535,7 +4137,7 @@ }, "node_modules/uc.micro": { "version": "2.1.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/uc.micro/-/uc.micro-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", "dev": true, "license": "MIT" @@ -3549,15 +4151,15 @@ }, "node_modules/undici-types": { "version": "7.16.0", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/undici-types/-/undici-types-7.16.0.tgz", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", - "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", "dev": true, "funding": [ { @@ -3609,9 +4211,9 @@ } }, "node_modules/vite": { - "version": "5.4.19", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz", - "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==", + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", "dev": true, "license": "MIT", "dependencies": { @@ -3757,150 +4359,6 @@ } } }, - "node_modules/vitest/node_modules/execa": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", - "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^8.0.1", - "human-signals": "^5.0.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/vitest/node_modules/get-stream": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", - "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/human-signals": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", - "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=16.17.0" - } - }, - "node_modules/vitest/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/npm-run-path": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", - "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vitest/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/vitest/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3952,9 +4410,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -3988,9 +4446,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.8.1", - "resolved": "https://npm.dev.wixpress.com/api/npm/npm-repos/yaml/-/yaml-2.8.1.tgz", - "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz", + "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==", "dev": true, "license": "ISC", "bin": { @@ -3998,6 +4456,9 @@ }, "engines": { "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yocto-queue": { From 4dffd86eb78c50da0ebf36164bba53d00b329b54 Mon Sep 17 00:00:00 2001 From: Netanel Gilad Date: Wed, 24 Dec 2025 13:22:59 +0200 Subject: [PATCH 31/31] validate branch --- scripts/mintlify-post-processing/push-to-docs-repo.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/mintlify-post-processing/push-to-docs-repo.js b/scripts/mintlify-post-processing/push-to-docs-repo.js index 762e92b..3eb3dc4 100644 --- a/scripts/mintlify-post-processing/push-to-docs-repo.js +++ b/scripts/mintlify-post-processing/push-to-docs-repo.js @@ -164,6 +164,13 @@ function main() { process.exit(1); } + if (!/^[a-zA-Z0-9\-_\/]+$/.test(branch)) { + console.error( + "Error: Invalid branch name. Branch name must contain only letters, numbers, hyphens, underscores, and forward slashes." + ); + process.exit(1); + } + console.log(`Branch: ${branch}`); if (