@base44-preview/platform 0.6.0-pr.364.ba7ce9d → 0.6.0-pr.378.dce07b1

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
@@ -91,7 +91,9 @@ export async function POST(request: Request) {
91
91
 
92
92
  An event type added to Base44 after your SDK version arrives as `{ type: "unknown", name, data }`,
93
93
  with its real type in `name` and an unchecked `data`, the same shape the client uses. After you
94
- upgrade, it arrives under its own `type`.
94
+ upgrade, it arrives under its own `type`. A known event type can also gain an optional field or an
95
+ enum value without a new version, so its enum fields are typed as their known values or any other
96
+ string, and your code should handle values it doesn't recognize.
95
97
 
96
98
  Delivery is at least once with no ordering guarantee: deduplicate on `event.id`, and answer
97
99
  2xx to event types you do not handle. Event types are generated from the schemas published at
@@ -11,7 +11,7 @@ import type { PlatformClient } from "./client.types.js";
11
11
  * [`createPlatformServer()`](/developers/references/platform-sdk/docs/functions/createPlatformServer)
12
12
  * from `@base44/platform/server`.
13
13
  *
14
- * @returns A new platform client.
14
+ * @returns A new platform client, with one property for each module.
15
15
  *
16
16
  * @example
17
17
  * ```typescript
@@ -11,7 +11,7 @@ import { createChat } from "./modules/chat.js";
11
11
  * [`createPlatformServer()`](/developers/references/platform-sdk/docs/functions/createPlatformServer)
12
12
  * from `@base44/platform/server`.
13
13
  *
14
- * @returns A new platform client.
14
+ * @returns A new platform client, with one property for each module.
15
15
  *
16
16
  * @example
17
17
  * ```typescript
@@ -15,9 +15,9 @@ export interface AppCreatedV1Data {
15
15
  */
16
16
  owner_id: string;
17
17
  /**
18
- * The kind of app. New values arrive as a new event version.
18
+ * The kind of app. New values may be added; handle ones you don't know.
19
19
  */
20
- app_type: "imported_app" | "user_agent" | "user_app" | "user_game";
20
+ app_type: "imported_app" | "user_agent" | "user_app" | "user_game" | (string & {});
21
21
  /**
22
22
  * When the app was created (UTC).
23
23
  */
@@ -206,7 +206,7 @@ export interface ChatTurnEndedV1Data {
206
206
  /**
207
207
  * How the turn ended. `finished`: the AI replied and has nothing pending. `waiting_for_user_input`: the AI stopped to ask something, such as a clarifying question or a plan to approve, and continues when the next message answers it. `failed`: the turn hit an error. `cancelled`: the turn was stopped before it ended. `interrupted`: the AI was interrupted, for example by a restart, and continues the work in a new turn whose `continues_message_id` is this message.
208
208
  */
209
- status: "finished" | "waiting_for_user_input" | "failed" | "cancelled" | "interrupted";
209
+ status: "finished" | "waiting_for_user_input" | "failed" | "cancelled" | "interrupted" | (string & {});
210
210
  /**
211
211
  * When the turn ended (UTC).
212
212
  */
@@ -1,4 +1,4 @@
1
- // Generated by scripts/generate-webhook-types.mjs from the schemas published at
2
- // https://base44.com/webhooks/schemas. Do not edit by hand; run `npm run generate:webhooks`.
1
+ // Generated by scripts/generate-webhook-types.mjs from the latest schema revision of each event
2
+ // published at https://base44.com/webhooks/schemas. Do not edit by hand; run `npm run generate:webhooks`.
3
3
  /** Every event type in {@link WebhookEventMap}, so events from a newer Base44 can be told apart at runtime. @internal */
4
4
  export const WEBHOOK_EVENT_TYPES = ["app.created.v1", "app.published.v1", "app.unpublished.v1", "app.deleted.v1", "app.restored.v1", "webhook.test.v1", "chat.turn_started.v1", "chat.turn_ended.v1"];
@@ -7,7 +7,7 @@ import type { PlatformServer } from "./server.types.js";
7
7
  * such as [`webhooks`](/developers/references/platform-sdk/docs/interfaces/webhooks). It takes no
8
8
  * options and makes no network requests. Each module takes what it needs when you call it.
9
9
  *
10
- * @returns A new platform server client.
10
+ * @returns A new platform server client, with one property for each module.
11
11
  *
12
12
  * @example
13
13
  * ```typescript
@@ -7,7 +7,7 @@ import { createWebhooks } from "./modules/webhooks.js";
7
7
  * such as [`webhooks`](/developers/references/platform-sdk/docs/interfaces/webhooks). It takes no
8
8
  * options and makes no network requests. Each module takes what it needs when you call it.
9
9
  *
10
- * @returns A new platform server client.
10
+ * @returns A new platform server client, with one property for each module.
11
11
  *
12
12
  * @example
13
13
  * ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/platform",
3
- "version": "0.6.0-pr.364.ba7ce9d",
3
+ "version": "0.6.0-pr.378.dce07b1",
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",