@base44-preview/platform 0.4.0-pr.345.2183bda → 0.5.0-pr.346.138d91a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,11 +5,13 @@ npm install @base44/platform
5
5
  ```
6
6
 
7
7
  The Platform SDK for white-label platforms built on Base44. It is independent of the app SDK
8
- (`@base44/sdk`) and has two entrypoints:
8
+ (`@base44/sdk`) and has three entrypoints:
9
9
 
10
10
  - `@base44/platform`, for the browser: implements the read-only white-label live AI chat
11
11
  contract. A partner's browser watches the AI chat of up to eight apps over the platform's
12
12
  shared socket. The workspace must have white-label sockets enabled; this SDK does not open sessions.
13
+ - `@base44/platform/react`: `useChat`, a hook that runs the AI chat for one app on top of the
14
+ browser client. See [React](#react).
13
15
  - `@base44/platform/server`, for your backend: verify the webhooks Base44 sends when apps are
14
16
  created, published, unpublished, trashed or restored. See
15
17
  [Receiving webhooks](#receiving-webhooks-server).
@@ -211,7 +213,7 @@ Every exported shape and field has JSDoc. `npm run docs` validates it into `docs
211
213
  and `npm run copy-docs-local -- --target <mintlify-docs>` copies the result into
212
214
  `developers/references/platform-sdk/docs`. The pipeline's config for this package lives
213
215
  in `scripts/mintlify-post-processing/`, including `reference.ts`, the docs-only entry that combines
214
- the client and server entrypoints into one reference. The Socket messages page is built in mintlify-docs from
216
+ the client, server and React entrypoints into one reference. The Socket messages page is built in mintlify-docs from
215
217
  the service's AsyncAPI document, not here.
216
218
 
217
219
  `PlatformSocketError` extends `Error` with `code` and optional `appId`. Original
@@ -296,6 +296,8 @@ export interface ChatOptions {
296
296
  /**
297
297
  * Called with the new app after {@link UseChatResult.create} succeeds. The chat already follows it.
298
298
  * Pass its ID back as `appId` to keep it in your own state.
299
+ *
300
+ * @param app - The app that was created.
299
301
  */
300
302
  onAppCreated?: (app: ChatApp) => void;
301
303
  }
@@ -1,16 +1,4 @@
1
1
  /** The `@base44/platform/react` entry: the AI chat for one app, as a React hook. React is an optional peer, loaded only here. */
2
- import { useChat } from "./useChat.js";
3
- import type { UseChatResult, ChatApp, ChatBackend, ChatOptions } from "./chat.types.js";
4
- export { useChat };
2
+ export { useChat } from "./useChat.js";
5
3
  export type { ApprovalDetails, ApprovalQuestion, ChatApp, UseChatResult, ChatOptions, ChatBackend, ChatAnswer, ChatConnection, ChatError, ChatItem, ChatQuestion, ChatStatus, ChatStep, ChoiceEntry, ChoiceQuestion, SecretField, SecretsQuestion, ToolCallAnswer, } from "./chat.types.js";
6
4
  export type { SocketSession } from "../client/modules/chat.types.js";
7
- /** @deprecated Renamed to {@link useChat}. Removed in 0.6.0. @hidden */
8
- export declare const useBase44Chat: typeof useChat;
9
- /** @deprecated Renamed to {@link UseChatResult}. Removed in 0.6.0. @hidden */
10
- export type Base44Chat = UseChatResult;
11
- /** @deprecated Renamed to {@link ChatOptions}. Removed in 0.6.0. @hidden */
12
- export type Base44ChatOptions = ChatOptions;
13
- /** @deprecated Renamed to {@link ChatBackend}. Removed in 0.6.0. @hidden */
14
- export type Base44ChatBackend = ChatBackend;
15
- /** @deprecated Renamed to {@link ChatApp}. Removed in 0.6.0. @hidden */
16
- export type Base44App = ChatApp;
@@ -1,6 +1,2 @@
1
1
  /** The `@base44/platform/react` entry: the AI chat for one app, as a React hook. React is an optional peer, loaded only here. */
2
- import { useChat } from "./useChat.js";
3
- export { useChat };
4
- // The names before 0.5.0, kept for one release so existing code keeps working.
5
- /** @deprecated Renamed to {@link useChat}. Removed in 0.6.0. @hidden */
6
- export const useBase44Chat = useChat;
2
+ export { useChat } from "./useChat.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/platform",
3
- "version": "0.4.0-pr.345.2183bda",
3
+ "version": "0.5.0-pr.346.138d91a",
4
4
  "description": "Base44 Platform SDK for white-label platforms: a browser client for following the AI chat and a server entrypoint for webhooks",
5
5
  "main": "dist/client/index.js",
6
6
  "types": "dist/client/index.d.ts",