Server.callV2
luastra/serverServer.callV2(operation: string, inputFields: { [string]: string }, options: Options?, limitsValue: V2Limits?): RequestIdCarries fields produced by a schema-v2 generated client through the existing bounded server capability and returns a RequestId. It does not expose a second transport or provider API.
Before you use it
Add luastra/server to this module's dependencies in luastra.json, then import it with require("luastra/server"). Declare rpc.call in luastra.json and configure a declared backend operation with a deployed trusted handler. Application code should prefer its generated operation function and decoder.
How it fits
Server.callV2 starts asynchronous trusted work; app.resolve later reports transport success or failure.
When to use it
Prefer the generated operation function instead of calling Server.callV2 directly. Use this helper only when maintaining generated-client infrastructure, and preserve the declaration limits.
Parameters
| Parameter | Type / values | Description |
|---|---|---|
| operation | string | Declared schema-v2 backend operation name. |
| inputFields | { [string]: string } | Typed flat fields produced by the generated operation encoder. |
| options | Options? | Optional deadline, idempotency key, and retry policy. |
| limitsValue | V2Limits? | Validated payload and field ceilings supplied by the generated client. |
| options.deadlineMs | integer (1..30000)? | Optional request deadline; defaults to 3000 ms. |
| options.idempotencyKey | string (8..128 bytes)? | Optional stable idempotency key admitted by the selected operation. |
| options.retry | boolean? | Allows the host's bounded retry policy when true; defaults to false. |
| limitsValue.maximumBytes | integer (1024..4096) | Complete encoded payload ceiling copied from the validated declaration. |
| limitsValue.maximumFields | integer (1..256) | Encoded field ceiling copied from the validated declaration. |
Returns
RequestId — an opaque request identifier used to correlate the asynchronous completion in app.resolve.
What happens next
A RequestId now, then one resolve completion from the configured backend.
Failures and fixes
Handle transport failure, envelope decode failure, and domain validation failure separately. The static web build does not deploy trusted backend handlers, credentials, or production operations for you.
Availability
Public-source alpha API in 0.5.0-alpha; production backend deployment remains application-owned.
Focused example
-- Generated clients call this helper after validating typed input.
local requestId = Server.callV2("records.page.v2", typedFields, options, limits)