@base44-preview/sdk 0.8.62-pr.379.c455058 → 0.8.62-pr.381.cdc254a
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.
|
@@ -48,8 +48,8 @@ type ActorMethodCall<F> = F extends (args: infer A, ...rest: never[]) => infer R
|
|
|
48
48
|
type UntypedActorMethods = Record<string, (args?: unknown) => Promise<unknown>>;
|
|
49
49
|
/**
|
|
50
50
|
* An actor's callable methods, as seen by a caller: each runs the actor's method of the same
|
|
51
|
-
* name and resolves to its return value. Typed from the actor's `methods`
|
|
52
|
-
* {@linkcode ActorRegistry}; any name otherwise.
|
|
51
|
+
* name with one JSON argument and resolves to its return value. Typed from the actor's `methods`
|
|
52
|
+
* in {@linkcode ActorRegistry}; any name otherwise.
|
|
53
53
|
*/
|
|
54
54
|
export type ActorMethods<N extends string> = N extends keyof ActorRegistry ? ActorRegistry[N] extends {
|
|
55
55
|
methods: infer M;
|
|
@@ -153,6 +153,12 @@ export interface Connection<N extends string = string> {
|
|
|
153
153
|
* its return value. A refusal rejects with a `Base44Error` carrying the actor's status (404 for
|
|
154
154
|
* a method the actor doesn't list in `static callable`).
|
|
155
155
|
*
|
|
156
|
+
* A call takes one argument, any JSON value: pass several values as an object, such as
|
|
157
|
+
* `ref.videoReady({ id, url })`, or an array. Further arguments are dropped, so `ref.m(a, b)`
|
|
158
|
+
* sends only `a`. Arguments and the reply are JSON-encoded: a `Date` arrives as a string,
|
|
159
|
+
* `undefined` is dropped (`null` inside an array), and functions, `Map` and `Set` values don't
|
|
160
|
+
* survive. A request is at most 64 KB and calls are rate-limited per caller.
|
|
161
|
+
*
|
|
156
162
|
* @example
|
|
157
163
|
* ```typescript
|
|
158
164
|
* // Call a method on a session
|