@xanots/sdk 0.0.11 → 0.0.12
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/CHANGELOG.md +16 -0
- package/README.md +11 -6
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-QNKN5RYD.js → agent-file-refresh-GQWAAOBV.js} +4 -4
- package/dist/bin.js +11 -11
- package/dist/{branch-commands-2BLOC2GR.js → branch-commands-5KMPAAZV.js} +7 -7
- package/dist/bundle.d.ts +2 -2
- package/dist/bundle.js +2 -2
- package/dist/{capture-4WVJY4DQ.js → capture-YLUVAITI.js} +2 -2
- package/dist/chunk-2VTJSI6X.js +192 -0
- package/dist/{chunk-5XZ744TS.js → chunk-2ZCUO2UG.js} +1 -1
- package/dist/{chunk-XEOX6AM7.js → chunk-3LQGF2WS.js} +2 -2
- package/dist/{chunk-WP4OZZV4.js → chunk-3VFCKHOB.js} +2 -2
- package/dist/{chunk-XHEXOES3.js → chunk-5YDINUAP.js} +1 -1
- package/dist/{chunk-LU7TRWMC.js → chunk-6VNRMKFJ.js} +2 -2
- package/dist/{chunk-CTD5ZCV6.js → chunk-7WRJPKGK.js} +2 -2
- package/dist/{chunk-3INK4Y4E.js → chunk-AE3PDSDS.js} +1 -1
- package/dist/{chunk-22TKBSDV.js → chunk-AG5GCZDD.js} +2 -2
- package/dist/{chunk-DBFU47BJ.js → chunk-AOFFKSJC.js} +2 -2
- package/dist/{chunk-TCFIPDB3.js → chunk-AVGDL6RB.js} +1 -1
- package/dist/{chunk-BC2C5GVI.js → chunk-DCMANKMX.js} +1 -1
- package/dist/{chunk-WHOJWOSV.js → chunk-EETVJZAZ.js} +1 -1
- package/dist/{chunk-4Q7ZOHH7.js → chunk-ELK7UALJ.js} +3 -3
- package/dist/{chunk-VNQM3V2C.js → chunk-EXENFOWE.js} +2 -2
- package/dist/{chunk-UOZMSF4C.js → chunk-GSP2BY4F.js} +5 -5
- package/dist/{chunk-AIZKXUNP.js → chunk-IMLYGQK6.js} +2 -2
- package/dist/{chunk-QK7ZQJLP.js → chunk-N74KDCBD.js} +39 -25
- package/dist/{chunk-3IGNIP6R.js → chunk-NDP7OUPS.js} +1 -1
- package/dist/{chunk-EQW3YT5U.js → chunk-P6PVBQL6.js} +2 -2
- package/dist/{chunk-HYBN4H3F.js → chunk-PLE5QQOZ.js} +27 -20
- package/dist/{chunk-BSK7ELHU.js → chunk-PR7OXHGZ.js} +1 -1
- package/dist/{chunk-OWGCOGKK.js → chunk-QYSQ3UDO.js} +8 -8
- package/dist/{chunk-ZQ2PKR6R.js → chunk-RQ3FXV4K.js} +2 -2
- package/dist/{chunk-Q77KNEUL.js → chunk-RQNMTDXD.js} +1703 -2
- package/dist/{chunk-QKM4U5UK.js → chunk-TJS2AF5Y.js} +2 -2
- package/dist/{chunk-DIA7CT7J.js → chunk-V5Y7D4LH.js} +11 -2
- package/dist/{chunk-KA6G2L7U.js → chunk-VK26K7AY.js} +3 -3
- package/dist/{chunk-4IF54NU5.js → chunk-VPAWRBK5.js} +12 -16
- package/dist/{chunk-QYMAZRAU.js → chunk-VRNZ2NVV.js} +5 -5
- package/dist/{chunk-RCT7UX7B.js → chunk-XT3XQ4PF.js} +32 -27
- package/dist/{chunk-VAF6A3YD.js → chunk-XWFRNJMQ.js} +1 -1
- package/dist/{chunk-7ZYW652H.js → chunk-YHS6VVLJ.js} +2 -2
- package/dist/{chunk-G4EJMQLD.js → chunk-YX22LKQE.js} +2 -2
- package/dist/{chunk-F6CYJ7TN.js → chunk-Z2ZIE5CO.js} +2 -2
- package/dist/cli.d.ts +13 -6
- package/dist/cli.js +10 -10
- package/dist/codegen-command-Y2SPMAUW.js +47 -0
- package/dist/codegen.d.ts +5 -5
- package/dist/codegen.js +2 -2
- package/dist/{completion-WF46272M.js → completion-HJU5QEFB.js} +2 -2
- package/dist/{deploy-command-IP7V7GT4.js → deploy-command-XHS5PKPV.js} +19 -19
- package/dist/{ephemeral-command-U4AQ3TXX.js → ephemeral-command-2NKPEXUU.js} +8 -8
- package/dist/index.d.ts +88 -104
- package/dist/index.js +9 -9
- package/dist/init-command-23FFNUFT.js +32 -0
- package/dist/internal.d.ts +10 -16
- package/dist/internal.js +26 -26
- package/dist/{io-P2H75UV2.js → io-UBDMMDH6.js} +3 -3
- package/dist/{live-diff-IXKBVG4K.js → live-diff-HCOTN5WC.js} +3 -3
- package/dist/{lock-46FWYE4D.js → lock-HQ4KARU2.js} +2 -2
- package/dist/{lock-commands-ZZKZ4LZJ.js → lock-commands-WCRC56ME.js} +11 -11
- package/dist/{login-command-Z6CHTA57.js → login-command-P7LXD5TE.js} +6 -6
- package/dist/{loop-D5NPL4VH.js → loop-IC5ISSYB.js} +3 -3
- package/dist/{marketplace-command-P4IPLJ6J.js → marketplace-command-T6JCHW7J.js} +4 -4
- package/dist/{meta-client-K2J4XH64.js → meta-client-LKRKR3L2.js} +4 -4
- package/dist/node.d.ts +6 -6
- package/dist/node.js +14 -14
- package/dist/{preflight-command-K346GPTY.js → preflight-command-TZWPHBXY.js} +16 -16
- package/dist/{profile-command-LJSBDV2L.js → profile-command-WBNSMQSI.js} +3 -3
- package/dist/{release-command-IMNTIVWK.js → release-command-WEFYRTCI.js} +26 -26
- package/dist/{response-BQVQ24l1.d.ts → response-D6xGLEIn.d.ts} +18 -23
- package/dist/{routes-manifest-PWZHDOI5.js → routes-manifest-5ZFKUQWA.js} +2 -2
- package/dist/{runtime-V4C3AC3A.js → runtime-LSLIDALK.js} +1 -1
- package/dist/scaffold.d.ts +16 -8
- package/dist/scaffold.js +7 -11
- package/dist/{static-host-3WMV7IZO.js → static-host-4JDQCHUW.js} +1 -1
- package/dist/{status-command-AL47VG7H.js → status-command-VARULAR5.js} +4 -4
- package/dist/{store-BLyNeQ8S.d.ts → store-DAnUIi1T.d.ts} +81 -86
- package/dist/{test-command-YAZLKLGQ.js → test-command-YCAR4O35.js} +7 -7
- package/dist/{upgrade-command-BN3EHAOI.js → upgrade-command-GYEIMJBG.js} +15 -16
- package/dist/{workspace-2COHDBM3.js → workspace-33KHFLX3.js} +2 -2
- package/dist/{workspace-command-MNK7Y7MQ.js → workspace-command-2ZTGT26W.js} +26 -28
- package/dist/{workspace-export-DURY5WYL.js → workspace-export-MLYTYZS5.js} +3 -3
- package/dist/{xdo-BjJj5W_E.d.ts → xdo-ODuJklk6.d.ts} +27 -23
- package/guides/authoring.md +11 -2
- package/guides/typed-frontend.md +4 -4
- package/llms/statements-data.md +3 -2
- package/llms/values.md +1 -1
- package/llms-full.txt +18 -18
- package/llms.txt +14 -15
- package/manifest.json +6 -2
- package/package.json +1 -1
- package/dist/chunk-ANUDXFEX.js +0 -881
- package/dist/chunk-JGCWTCA7.js +0 -95
- package/dist/chunk-YBC3IKMF.js +0 -845
- package/dist/codegen-command-FUT2KJB6.js +0 -49
- package/dist/init-command-NPVL32L6.js +0 -34
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ef as Condition, eg as FilterResults, eh as ElementResult, ei as SameArrayResult, ej as GroupedArrayResult, ek as AgentResultOf, b3 as AddonDef, el as OutputPath, cZ as TableDef, em as QualifiedCol, bx as DbEval, cY as SortDirective, bz as DbWhere, en as OutputRoot, bM as InferRow, eo as AggregateRow, ep as EvalFields, eq as OutputAuthored, cb as MicroserviceDef, ah as generated, F as FunctionDef, co as QueryHandle } from './store-
|
|
2
|
-
export { b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, b0 as CaptureRecord, a_ as CaptureValue, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, by as DbEvalFilter, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b1 as LambdaBindings, b_ as LambdaBody, aZ as LambdaOptions, a$ as LambdaSurface, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, S as StatementSpec, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, b2 as Xano, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, er as lam, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-
|
|
3
|
-
import { y as StatementAnnotations, S as Statement, l as FromFieldMap, u as ObjValue, Y as Prettify, a1 as AsShapeBrand, X as XanoFileRef, z as StatementOptions, v as ObjectRef, O as ObjInput } from './response-
|
|
4
|
-
export { B as BrandOpts, b as BrandValue, D as DecimalMethod, E as EmailMethod, c as FieldAccess, f as FieldDescriptor, h as FieldMap, j as FieldOpts, k as FieldStyleType, I as IntMethod, M as MethodArg, m as MethodOpts, n as MethodSpec, o as MockEntry, p as MockMap, q as MockXdo, s as ObjMember, P as PasswordMethod, w as ResponseDef, x as RowFromFieldMap, T as TableRefMethod, A as TextFormat, C as TextMethod, G as TypeBrand, V as ValueOf, H as VectorMethod, J as XanoGeoPosition, K as XanoGeoValue, L as annotate, N as f, Q as obj, U as statements } from './response-
|
|
5
|
-
import { h as FilterXdo, V as Value, i as FilteredValue, R as RefValue, F as FunctionXdo } from './xdo-
|
|
6
|
-
export { C as CacheXdo, a as CaughtField, b as ConditionalContext, c as ConditionalElifContext, E as ExprGroup, d as ExprNode, e as ExprOperand, f as ExprStatement, g as FieldXdo, H as HistoryXdo, I as InputXdo, L as ListBoundsXdo, M as MethodXdo, P as PersistedFunctionRow, j as RegexValue, k as ResultItemXdo, S as StackItemXdo, l as StatementInputXdo, T as TAGS, m as TEST_EXPECT_TYPES, n as Tag, o as TaggedValue, p as TestDef, q as TestExpect, r as TestExpectType, s as TestXdo, t as auth, u as c, v as caught, w as col, x as env, y as expect, z as filter, A as inp, B as out, D as ref, G as resp, J as setting, K as sys, N as test, O as toolset, Q as withFilters } from './xdo-
|
|
1
|
+
import { ef as Condition, eg as FilterResults, eh as ElementResult, ei as SameArrayResult, ej as GroupedArrayResult, ek as AgentResultOf, b3 as AddonDef, el as OutputPath, cZ as TableDef, em as QualifiedCol, bx as DbEval, cY as SortDirective, bz as DbWhere, en as OutputRoot, bM as InferRow, eo as AggregateRow, ep as EvalFields, eq as OutputAuthored, cb as MicroserviceDef, ah as generated, F as FunctionDef, co as QueryHandle } from './store-DAnUIi1T.js';
|
|
2
|
+
export { b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, b0 as CaptureRecord, a_ as CaptureValue, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, by as DbEvalFilter, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b1 as LambdaBindings, b_ as LambdaBody, aZ as LambdaOptions, a$ as LambdaSurface, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, S as StatementSpec, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, b2 as Xano, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, er as lam, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-DAnUIi1T.js';
|
|
3
|
+
import { y as StatementAnnotations, S as Statement, l as FromFieldMap, u as ObjValue, Y as Prettify, a1 as AsShapeBrand, X as XanoFileRef, z as StatementOptions, v as ObjectRef, O as ObjInput } from './response-D6xGLEIn.js';
|
|
4
|
+
export { B as BrandOpts, b as BrandValue, D as DecimalMethod, E as EmailMethod, c as FieldAccess, f as FieldDescriptor, h as FieldMap, j as FieldOpts, k as FieldStyleType, I as IntMethod, M as MethodArg, m as MethodOpts, n as MethodSpec, o as MockEntry, p as MockMap, q as MockXdo, s as ObjMember, P as PasswordMethod, w as ResponseDef, x as RowFromFieldMap, T as TableRefMethod, A as TextFormat, C as TextMethod, G as TypeBrand, V as ValueOf, H as VectorMethod, J as XanoGeoPosition, K as XanoGeoValue, L as annotate, N as f, Q as obj, U as statements } from './response-D6xGLEIn.js';
|
|
5
|
+
import { h as FilterXdo, V as Value, i as FilteredValue, R as RefValue, F as FunctionXdo } from './xdo-ODuJklk6.js';
|
|
6
|
+
export { C as CacheXdo, a as CaughtField, b as ConditionalContext, c as ConditionalElifContext, E as ExprGroup, d as ExprNode, e as ExprOperand, f as ExprStatement, g as FieldXdo, H as HistoryXdo, I as InputXdo, L as ListBoundsXdo, M as MethodXdo, P as PersistedFunctionRow, j as RegexValue, k as ResultItemXdo, S as StackItemXdo, l as StatementInputXdo, T as TAGS, m as TEST_EXPECT_TYPES, n as Tag, o as TaggedValue, p as TestDef, q as TestExpect, r as TestExpectType, s as TestXdo, t as auth, u as c, v as caught, w as col, x as env, y as expect, z as filter, A as inp, B as out, D as ref, G as resp, J as setting, K as sys, N as test, O as toolset, Q as withFilters } from './xdo-ODuJklk6.js';
|
|
7
7
|
|
|
8
8
|
/** One `else if (when) { then }` branch of a {@link conditional}'s elif stack. */
|
|
9
9
|
interface ConditionalElifArgs extends StatementAnnotations {
|
|
@@ -21,7 +21,7 @@ interface ConditionalArgs extends StatementAnnotations {
|
|
|
21
21
|
declare function conditional(args: ConditionalArgs): Statement;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* `InferInput<Q>`
|
|
24
|
+
* `InferInput<Q>` — the request-payload TS type for a query (or function)
|
|
25
25
|
* def's declared inputs, computed at compile time from the value brands added in
|
|
26
26
|
* U1. No codegen, no build step: the type is derived from the def, so it can
|
|
27
27
|
* never drift from what the endpoint actually accepts.
|
|
@@ -90,7 +90,7 @@ type NameOf<F> = F extends FilterXdo<infer N> ? N : string;
|
|
|
90
90
|
* Apply ONE filter's declared result to `Shape`.
|
|
91
91
|
*
|
|
92
92
|
* Null propagates rather than being erased, matching `IndexShape`'s treatment of
|
|
93
|
-
* a nullable base
|
|
93
|
+
* a nullable base and the engine's runtime, where a filter over a null
|
|
94
94
|
* binding yields null: a `db.get` row is `Row | null`, so counting it is
|
|
95
95
|
* `number | null`, not `number`.
|
|
96
96
|
*
|
|
@@ -109,7 +109,7 @@ type ApplyFilter<Shape, N extends string> = string extends N ? unknown : null ex
|
|
|
109
109
|
type ApplyFilters<Shape, Fs> = Fs extends readonly [infer Head, ...infer Tail] ? ApplyFilters<ApplyFilter<Shape, NameOf<Head>>, Tail> : Fs extends readonly [] ? Shape : unknown;
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
* `InferResponse<Q>`
|
|
112
|
+
* `InferResponse<Q>` — the response type for a query or function def,
|
|
113
113
|
* the read-side counterpart of `InferInput`. Closes the round trip: rename or
|
|
114
114
|
* retype what an endpoint returns and every consumer that types a response
|
|
115
115
|
* against `InferResponse` lights up at compile time.
|
|
@@ -129,9 +129,9 @@ type ApplyFilters<Shape, Fs> = Fs extends readonly [infer Head, ...infer Tail] ?
|
|
|
129
129
|
* knowable):
|
|
130
130
|
* 1. A declared `responseShape` on the def always wins (the override).
|
|
131
131
|
* 2. Otherwise the shape is auto-derived from `response` + `stack`
|
|
132
|
-
* ({@link DeriveResponse}) — object-literal keys
|
|
133
|
-
* traced to a typed `db.get`/`db.query
|
|
134
|
-
* traces the base variable, then indexes the subpath into its shape
|
|
132
|
+
* ({@link DeriveResponse}) — object-literal keys and a single variable
|
|
133
|
+
* traced to a typed `db.get`/`db.query`. A dotted `ref("var.field")`
|
|
134
|
+
* traces the base variable, then indexes the subpath into its shape.
|
|
135
135
|
* 3. Anything the walk can't resolve (filters, lambdas, control-flow vars,
|
|
136
136
|
* `set_var`, function-produced vars, streams) resolves to `unknown`, which
|
|
137
137
|
* the author narrows or overrides via `responseShape`.
|
|
@@ -162,7 +162,7 @@ type DeclaredResponse<Q> = Q extends {
|
|
|
162
162
|
*/
|
|
163
163
|
/**
|
|
164
164
|
* What a response resolves to when the stack is a plain `Statement[]` rather
|
|
165
|
-
* than a tuple
|
|
165
|
+
* than a tuple.
|
|
166
166
|
*
|
|
167
167
|
* A widened stack has no heads to walk, so EVERY `as` binding in it is invisible
|
|
168
168
|
* and every `ref()` bottoms out. Resolving that to `unknown` made the failure
|
|
@@ -198,12 +198,12 @@ type TraceBinding<Name extends string, S> = S extends readonly [infer Head, ...i
|
|
|
198
198
|
* Walk a dotted subpath `Path` into an already-traced binding `Shape`, one
|
|
199
199
|
* segment at a time: `IndexShape<AgentRunResult<string>, "result">` → `string`.
|
|
200
200
|
*
|
|
201
|
-
* **Null-propagating
|
|
201
|
+
* **Null-propagating**: when the base is nullable (e.g. a `db.get` row,
|
|
202
202
|
* `Row | null`), the null flows *through* the projection rather than erasing it —
|
|
203
203
|
* `IndexShape<Row | null, "slug">` → `string | null`, mirroring the engine's
|
|
204
204
|
* runtime where `$row.slug` on a missed (null) row is itself null. Without this,
|
|
205
205
|
* `keyof (Row | null)` narrows to `never` and every dotted ref into a nullable
|
|
206
|
-
* base would bottom out at `unknown`, silently dropping the
|
|
206
|
+
* base would bottom out at `unknown`, silently dropping the projection.
|
|
207
207
|
*
|
|
208
208
|
* A segment that genuinely isn't a key of the (non-null) shape — including a
|
|
209
209
|
* shape that is already `unknown` (whose `keyof` is `never`) — still bottoms out
|
|
@@ -221,7 +221,7 @@ type IndexShape<Shape, Path extends string> = unknown extends Shape ? IndexStep<
|
|
|
221
221
|
type IndexStep<Shape, Path extends string> = Path extends `${infer Head}.${infer Rest}` ? Head extends keyof Shape ? IndexShape<Shape[Head], Rest> : unknown : Path extends keyof Shape ? Shape[Path] : unknown;
|
|
222
222
|
/**
|
|
223
223
|
* Resolve a `ref` name against the branded stack `S`. A **dotted** name projects
|
|
224
|
-
* a subpath
|
|
224
|
+
* a subpath: the head names the bound variable (traced via
|
|
225
225
|
* {@link TraceBinding}) and the tail indexes into that variable's shape (via
|
|
226
226
|
* {@link IndexShape}), so `ref("generated.result")` types to the completion, not
|
|
227
227
|
* `unknown`. A bare name traces the whole binding. Stack-variable names are
|
|
@@ -251,11 +251,11 @@ type TraceVar<Name extends string, S> = Name extends `${infer Base}.${infer Path
|
|
|
251
251
|
* values, and it is deliberate rather than a gap: typing a constant's key would
|
|
252
252
|
* mean branding the return of every constant constructor, and `Value` is the
|
|
253
253
|
* currency of every statement field in the SDK. Declare `responseShape` when a
|
|
254
|
-
* client needs those keys typed
|
|
254
|
+
* client needs those keys typed.
|
|
255
255
|
*/
|
|
256
256
|
type ResolveValue<V, S> = V extends ObjValue<infer Members> ? ResolveObj<Members, S> : V extends FilteredValue<infer Base, infer Chain> ? ApplyFilters<ResolveValue<Base, S>, Chain> : V extends RefValue<infer Name> ? TraceVar<Name, S> : unknown;
|
|
257
257
|
/**
|
|
258
|
-
* Resolve every member of an {@link ObjValue}'s record
|
|
258
|
+
* Resolve every member of an {@link ObjValue}'s record — the same
|
|
259
259
|
* walk {@link DeriveResponse} runs over a top-level object literal, one level
|
|
260
260
|
* down. `obj()` is the SDK's answer for a nested response object, and it used to
|
|
261
261
|
* cost the caller its types: the members are ordinary {@link Value}s with
|
|
@@ -279,8 +279,7 @@ type ResolveObj<Members, S> = Prettify<{
|
|
|
279
279
|
*
|
|
280
280
|
* The branch order is load-bearing:
|
|
281
281
|
* - a {@link Value} (including a nested `obj()`, a filtered value, or a `ref`)
|
|
282
|
-
* goes to {@link ResolveValue}, so `c.*` constants keep
|
|
283
|
-
* issue #79 documents;
|
|
282
|
+
* goes to {@link ResolveValue}, so `c.*` constants keep their `unknown` floor;
|
|
284
283
|
* - a RAW SCALAR literal types itself — `obj({ count: 3 })` really is a number,
|
|
285
284
|
* and unlike `c.int(3)` the type is right there to read. A boolean is widened
|
|
286
285
|
* explicitly because inference does not treat it like its siblings: `3` and
|
|
@@ -291,7 +290,7 @@ type ResolveObj<Members, S> = Prettify<{
|
|
|
291
290
|
* - an ARRAY resolves element-wise (checked before the record branch, since an
|
|
292
291
|
* array is also an object);
|
|
293
292
|
* - a nested plain RECORD recurses. This is the spelling `response: { user: {
|
|
294
|
-
* id: ref(...) } }` uses — the
|
|
293
|
+
* id: ref(...) } }` uses — the auto-wrap, which `encodeResponse` hands
|
|
295
294
|
* to `obj()` anyway, so the two spellings must and now do infer alike.
|
|
296
295
|
*/
|
|
297
296
|
type ResolveMember<M, S> = M extends Value ? ResolveValue<M, S> : M extends boolean ? boolean : M extends string | number ? M : M extends readonly (infer Element)[] ? ResolveMember<Element, S>[] : M extends object ? ResolveObj<M, S> : unknown;
|
|
@@ -300,7 +299,7 @@ type ResolveMember<M, S> = M extends Value ? ResolveValue<M, S> : M extends bool
|
|
|
300
299
|
* field and branded `stack`. Mirrors the Xano engine's static walk:
|
|
301
300
|
* - a record response (object literal) → an object with **those keys** (each
|
|
302
301
|
* member resolved individually, recursing into a nested `obj()` or plain
|
|
303
|
-
* object literal
|
|
302
|
+
* object literal); keys are known regardless of traceability;
|
|
304
303
|
* - a single {@link Value} response → resolve it against the stack;
|
|
305
304
|
* - no response / an unresolvable shape → `unknown`.
|
|
306
305
|
* Kept separate from {@link DeclaredResponse} so the user override always wins.
|
|
@@ -319,7 +318,7 @@ type DeriveResponse<Q> = Q extends {
|
|
|
319
318
|
type InferResponse<Q> = [DeclaredResponse<Q>] extends [never] ? DeriveResponse<Q> : DeclaredResponse<Q>;
|
|
320
319
|
|
|
321
320
|
/**
|
|
322
|
-
* Addressing a stored file from a client
|
|
321
|
+
* Addressing a stored file from a client.
|
|
323
322
|
*
|
|
324
323
|
* A file column comes back as a {@link XanoFileRef}: a `path` into the vault
|
|
325
324
|
* plus metadata, and an absolute, authoritative-looking `url`. On a
|
|
@@ -373,7 +372,7 @@ declare function setVar(as: string, value: Value, a?: StatementOptions): Stateme
|
|
|
373
372
|
declare function updateVar(name: string, value: Value, a?: StatementAnnotations): Statement;
|
|
374
373
|
|
|
375
374
|
/**
|
|
376
|
-
* Hand-authored `!class` control-flow / terminal statements
|
|
375
|
+
* Hand-authored `!class` control-flow / terminal statements. These carry
|
|
377
376
|
* PHP transforms in the engine, so they're authored by hand and validated
|
|
378
377
|
* against persisted fixtures rather than codegen'd. (`conditional` — also a
|
|
379
378
|
* `!class` special — already lives in `src/statements/conditional.ts`.)
|
|
@@ -407,7 +406,7 @@ declare function foreachContinue(a?: StatementAnnotations): Statement;
|
|
|
407
406
|
declare function foreachRemove(a?: StatementAnnotations): Statement;
|
|
408
407
|
|
|
409
408
|
/**
|
|
410
|
-
* Hand-authored control-flow block statements
|
|
409
|
+
* Hand-authored control-flow block statements. These carry non-trivial
|
|
411
410
|
* transforms in the engine (for, foreach, while, group), so they're authored by
|
|
412
411
|
* hand — like `conditional` — rather than codegen'd. Each nests a `run[]` stack
|
|
413
412
|
* encoded through the shared statement encoder, and `while` reuses the
|
|
@@ -420,7 +419,7 @@ declare function foreachRemove(a?: StatementAnnotations): Statement;
|
|
|
420
419
|
* group → context: { run:[…] }
|
|
421
420
|
*
|
|
422
421
|
* All four are golden-verified: `for`/`foreach` from vendored goldens, and
|
|
423
|
-
* `while`/`group` from live engine captures
|
|
422
|
+
* `while`/`group` from live engine captures. The
|
|
424
423
|
* `while` shape (`expr` comparison + `run[]`) and `group`'s bare `{run}` are
|
|
425
424
|
* confirmed byte-exact.
|
|
426
425
|
*/
|
|
@@ -453,7 +452,7 @@ declare function whileLoop(args: WhileArgs): Statement;
|
|
|
453
452
|
declare function group(body: Statement[], a?: StatementAnnotations): Statement;
|
|
454
453
|
|
|
455
454
|
/**
|
|
456
|
-
* Hand-authored branching block statements
|
|
455
|
+
* Hand-authored branching block statements — `switch` and `try_catch`.
|
|
457
456
|
* Both carry structural control-flow transforms in the engine, so
|
|
458
457
|
* (like `conditional` and the loops) they're authored by hand rather than
|
|
459
458
|
* codegen'd. Each nests `run[]` stacks encoded through the shared statement
|
|
@@ -514,7 +513,7 @@ declare function tryCatch(args: TryCatchArgs): Statement;
|
|
|
514
513
|
* Two families live here. The HTTP-request fields (`api.request`,
|
|
515
514
|
* `stream.from_request`, `webflow.request`, `microservice.request`) were hoisted
|
|
516
515
|
* per the rule of three once the second wrapper landed. The DB row CELL joined
|
|
517
|
-
* them
|
|
516
|
+
* them: it is a self-contained coercion unit that landed in `db.ts`
|
|
518
517
|
* only because that is where its caller is, and its siblings — `coerceScalar`,
|
|
519
518
|
* `coerceObj`, `coerceHeaders` — were already here.
|
|
520
519
|
*/
|
|
@@ -525,7 +524,7 @@ declare function tryCatch(args: TryCatchArgs): Statement;
|
|
|
525
524
|
* spec now carries the same set and rejects a constant outside it.
|
|
526
525
|
*/
|
|
527
526
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "OPTIONS" | "PATCH";
|
|
528
|
-
/** A headers map: full header lines built from `Name: value` pairs
|
|
527
|
+
/** A headers map: full header lines built from `Name: value` pairs. */
|
|
529
528
|
type HeaderMap = Readonly<Record<string, string | Value>>;
|
|
530
529
|
/**
|
|
531
530
|
* A value acceptable in a call/agent `input` map — a raw scalar literal, a nested
|
|
@@ -551,7 +550,7 @@ interface HttpRequestFields {
|
|
|
551
550
|
/**
|
|
552
551
|
* The bare JS literals a row cell accepts for a column whose row type is `V`,
|
|
553
552
|
* mirroring the `Scalar` union `fl.*` arguments and `seed` rows already take
|
|
554
|
-
|
|
553
|
+
*.
|
|
555
554
|
*
|
|
556
555
|
* Keyed on the column's own inferred type, so the widening is STRICTER than the
|
|
557
556
|
* tagged spelling it replaces: `{ is_hidden: "yes" }` on an `f.bool()` column is
|
|
@@ -561,7 +560,7 @@ interface HttpRequestFields {
|
|
|
561
560
|
* `null` is admitted on EVERY column, including the ones that refuse every other
|
|
562
561
|
* literal — an `obj`/`json`/list/`geo`/`vector` column has no bare-literal form
|
|
563
562
|
* and throws for a string, number or boolean, but takes `null`. That asymmetry
|
|
564
|
-
* is the decision, not an oversight
|
|
563
|
+
* is the decision, not an oversight: nulling a cell is a legitimate
|
|
565
564
|
* write whatever the column reads back as, and it matches what a seed row does
|
|
566
565
|
* with a `null` (see `coerceScalarValue` — nullability is the engine's to
|
|
567
566
|
* enforce, and a column config this layer does not fully model is not something
|
|
@@ -620,7 +619,7 @@ interface AsyncRuntime {
|
|
|
620
619
|
}
|
|
621
620
|
|
|
622
621
|
/**
|
|
623
|
-
* Hand-authored call-family block statements
|
|
622
|
+
* Hand-authored call-family block statements — invoking another workspace
|
|
624
623
|
* object from a stack. These carry `!class` transforms in the engine
|
|
625
624
|
* (FunctionRun, FunctionCall, ApiCall, …) so they're authored by hand.
|
|
626
625
|
*
|
|
@@ -654,17 +653,6 @@ interface AsyncRuntime {
|
|
|
654
653
|
* `action.call` / `action.package.call` are the exception to the paragraph
|
|
655
654
|
* above: their target is NOT a workspace object, so no id is derived for them
|
|
656
655
|
* and the author supplies one. See {@link ActionCallArgs} for why.
|
|
657
|
-
*
|
|
658
|
-
* @TODO(byte-verify): `function.run` (mvp:function), `api.call` (context.token
|
|
659
|
-
* confirmed tagged), and — since the workflow-test capture — `function.call`
|
|
660
|
-
* (mvp:workspace_run_function) are golden-verified. Still modeled/unverified:
|
|
661
|
-
* - the remaining `workspace_run_*` (task/tool/trigger/middleware/addon) — no
|
|
662
|
-
* golden, but they share the single-key `id` context two goldens now pin.
|
|
663
|
-
* - `workflow_test` → context.{datasource,id} — decode-accurate, no golden.
|
|
664
|
-
* - action / action_package — the stored shape is pinned against the engine's
|
|
665
|
-
* own authoring schema and its two transforms, and the ids are now carried
|
|
666
|
-
* verbatim rather than derived, so a capture is finally meaningful. It needs
|
|
667
|
-
* an instance with the package actually installed.
|
|
668
656
|
*/
|
|
669
657
|
|
|
670
658
|
/** A call/agent `{name: value}` input map — raw scalar literals coerce to constants. */
|
|
@@ -697,7 +685,7 @@ interface FunctionRunArgs<Fn extends FnRef = FnRef, As extends string = string>
|
|
|
697
685
|
/**
|
|
698
686
|
* `function.run <fn>` — run another function inline.
|
|
699
687
|
*
|
|
700
|
-
* Branded `AsShapeBrand<As, InferResponse<Fn
|
|
688
|
+
* Branded `AsShapeBrand<As, InferResponse<Fn>>`: the bound variable
|
|
701
689
|
* carries the TARGET's response type, so `ref("<as>.field")` in the caller's
|
|
702
690
|
* response types to that field instead of `unknown`. See {@link functionCall}
|
|
703
691
|
* for what the propagation can and cannot see.
|
|
@@ -719,7 +707,7 @@ interface FunctionCallArgs<Fn extends ObjectRef = ObjectRef, As extends string =
|
|
|
719
707
|
/**
|
|
720
708
|
* `function.call <fn>` — invoke a function as a workspace run.
|
|
721
709
|
*
|
|
722
|
-
* Branded `AsShapeBrand<As, InferResponse<Fn
|
|
710
|
+
* Branded `AsShapeBrand<As, InferResponse<Fn>>`. `InferResponse` of
|
|
723
711
|
* the TARGET is exactly what a client would get back from it, so drilling into
|
|
724
712
|
* the binding now types:
|
|
725
713
|
*
|
|
@@ -774,7 +762,7 @@ interface ApiCallArgs<Api extends ObjectRef = ObjectRef, As extends string = str
|
|
|
774
762
|
* entry in {@link ApiCallArgs.headers} instead.
|
|
775
763
|
*
|
|
776
764
|
* The `Value` spelling stays accepted so a pulled workspace holding one
|
|
777
|
-
* round-trips as itself
|
|
765
|
+
* round-trips as itself — it is a shape to carry, not to author.
|
|
778
766
|
*/
|
|
779
767
|
auth?: {
|
|
780
768
|
token: Value | string;
|
|
@@ -810,7 +798,7 @@ interface ToolCallArgs<Tool extends ObjectRef = ObjectRef, As extends string = s
|
|
|
810
798
|
}
|
|
811
799
|
/**
|
|
812
800
|
* `tool.call <tool>` — invoke a tool as a workspace run. Branded with the
|
|
813
|
-
* TARGET's `InferResponse
|
|
801
|
+
* TARGET's `InferResponse`, like {@link functionCall}.
|
|
814
802
|
*/
|
|
815
803
|
declare function toolCall<const Tool extends ObjectRef = ObjectRef, const As extends string = "", const Fs extends readonly FilterXdo[] = readonly []>(args: ToolCallArgs<Tool, As> & {
|
|
816
804
|
asFilters?: Fs;
|
|
@@ -921,14 +909,14 @@ interface WorkflowTestCallArgs extends StatementOptions {
|
|
|
921
909
|
declare function workflowTestCall(args: WorkflowTestCallArgs): Statement;
|
|
922
910
|
|
|
923
911
|
/**
|
|
924
|
-
* Hand-authored AI-agent and cloud-job specials
|
|
912
|
+
* Hand-authored AI-agent and cloud-job specials. All carry `!class`
|
|
925
913
|
* transforms in the engine (AgentRun, CloudJob, CloudJobAwait, CloudJobStatus).
|
|
926
914
|
* The stored shapes here are modeled on those transforms' `decode()` methods
|
|
927
915
|
* (authoritative for the persisted form), so they're grounded — but still have
|
|
928
916
|
* no golden fixture to deep-equal against.
|
|
929
917
|
*
|
|
930
918
|
* call_agent and cloud_job{,_await,_status} are golden-verified against live
|
|
931
|
-
* engine captures
|
|
919
|
+
* engine captures: agent → context.toolset.id +
|
|
932
920
|
* top-level runtime + input[]; cloud jobs → everything in input[] with the
|
|
933
921
|
* captured entry order. `runtime` is omitted at the default "shared" mode, and
|
|
934
922
|
* `await` is passed through as authored.
|
|
@@ -936,7 +924,7 @@ declare function workflowTestCall(args: WorkflowTestCallArgs): Statement;
|
|
|
936
924
|
|
|
937
925
|
/**
|
|
938
926
|
* The rich result object an agent run binds to its `as` variable — modeled on
|
|
939
|
-
* the engine's agent-run result envelope
|
|
927
|
+
* the engine's agent-run result envelope. **The completion is at
|
|
940
928
|
* `.result`**, not the top level; the surrounding fields are run metadata.
|
|
941
929
|
*
|
|
942
930
|
* `R` is the completion type: `string` for a text agent (the default — including
|
|
@@ -996,8 +984,8 @@ interface AiAgentRunArgs<As extends string = "", A extends ObjectRef = ObjectRef
|
|
|
996
984
|
/**
|
|
997
985
|
* Type-only override for the `.result` completion type. Usually unnecessary:
|
|
998
986
|
* when `agent` is a def handle from `agent({ output: { schema } })`, `.result`
|
|
999
|
-
* is inferred straight from that schema via {@link AgentResultOf}
|
|
1000
|
-
*
|
|
987
|
+
* is inferred straight from that schema via {@link AgentResultOf}.
|
|
988
|
+
* Pass a witness only to override that inference or to type the
|
|
1001
989
|
* `.result` of an agent referenced by bare name (which carries no schema) —
|
|
1002
990
|
* e.g. `resultShape: {} as { sentiment: string }`. Never emitted into the
|
|
1003
991
|
* statement (phantom, like the response brand).
|
|
@@ -1012,8 +1000,8 @@ interface AiAgentRunArgs<As extends string = "", A extends ObjectRef = ObjectRef
|
|
|
1012
1000
|
*
|
|
1013
1001
|
* Branded with `AsShapeBrand<As, AgentRunResult<R>>` (like the `db.*` producers)
|
|
1014
1002
|
* so `ref(as)` traces to the typed {@link AgentRunResult} envelope via
|
|
1015
|
-
* `InferResponse` instead of `unknown` — the completion is at `.result
|
|
1016
|
-
* A dotted `ref("<as>.result")` now projects that completion directly
|
|
1003
|
+
* `InferResponse` instead of `unknown` — the completion is at `.result`.
|
|
1004
|
+
* A dotted `ref("<as>.result")` now projects that completion directly, so
|
|
1017
1005
|
* the common "return just the answer" endpoint no longer needs a `responseShape`.
|
|
1018
1006
|
* The brand is phantom; the emitted statement bytes are unchanged.
|
|
1019
1007
|
*/
|
|
@@ -1025,8 +1013,7 @@ interface CloudJobArgs extends StatementOptions {
|
|
|
1025
1013
|
/**
|
|
1026
1014
|
* Container image to run. REQUIRED — the engine validates the parameter before
|
|
1027
1015
|
* the job launches and answers `400 ERROR_CODE_INPUT_ERROR "Missing param:
|
|
1028
|
-
* image"` without it. Measured on a live
|
|
1029
|
-
* `scripts/probe-special-required.ts`.
|
|
1016
|
+
* image"` without it. Measured on a live engine.
|
|
1030
1017
|
*/
|
|
1031
1018
|
image: Value;
|
|
1032
1019
|
/** Command to run in the container. REQUIRED, the same way `image` is. */
|
|
@@ -1070,7 +1057,7 @@ interface CloudJobStatusArgs extends StatementOptions {
|
|
|
1070
1057
|
declare function cloudJobStatus(a: CloudJobStatusArgs): Statement;
|
|
1071
1058
|
|
|
1072
1059
|
/**
|
|
1073
|
-
* Hand-authored miscellaneous specials
|
|
1060
|
+
* Hand-authored miscellaneous specials — the remaining `!class` /
|
|
1074
1061
|
* `!function` / declarative statements without a generated factory: array
|
|
1075
1062
|
* map/union, the comment & placeholder nodes, raw-input access, post-process,
|
|
1076
1063
|
* realtime events, auth-token creation, and the `expect.to_throw` test
|
|
@@ -1082,8 +1069,8 @@ declare function cloudJobStatus(a: CloudJobStatusArgs): Statement;
|
|
|
1082
1069
|
* later). Block fields map to same-named `context` entries unless the schema's
|
|
1083
1070
|
* declarative transform says otherwise.
|
|
1084
1071
|
*
|
|
1085
|
-
* array_map, array_union, get_input, and test_expect_to_throw are
|
|
1086
|
-
* golden-verified against live engine captures
|
|
1072
|
+
* array_map, array_union, get_input, and test_expect_to_throw are
|
|
1073
|
+
* golden-verified against live engine captures;
|
|
1087
1074
|
* post_process is parser-verified. Remaining unverified spots:
|
|
1088
1075
|
* (1) array_map — the scalar `transform_value` path is byte-exact. The
|
|
1089
1076
|
* object-literal form (`transform_object` + `output_type:"object"`) is now
|
|
@@ -1168,8 +1155,7 @@ interface ArrayUnionArgs extends StatementOptions {
|
|
|
1168
1155
|
* `source` — but the engine has no absent state for it: `right` declares
|
|
1169
1156
|
* `tag?=input` with an undefaulted `value`, so an omitted block resolves as an
|
|
1170
1157
|
* input named `""` and the request dies with
|
|
1171
|
-
* `500 ERROR_FATAL "Unable to locate input: "`. Measured on a live
|
|
1172
|
-
* by `scripts/probe-special-required.ts`.
|
|
1158
|
+
* `500 ERROR_FATAL "Unable to locate input: "`. Measured on a live engine.
|
|
1173
1159
|
*/
|
|
1174
1160
|
with: Value;
|
|
1175
1161
|
as?: string;
|
|
@@ -1373,7 +1359,7 @@ interface ExpectToThrowArgs extends StatementAnnotations {
|
|
|
1373
1359
|
* The matcher is stored as `context.value1` — the numbered slot every
|
|
1374
1360
|
* `expect.*` statement keeps its operands in. It was emitted as
|
|
1375
1361
|
* `context.exception` through 2.0.21, a key the engine never reads, so a
|
|
1376
|
-
* to_throw carrying one accepted ANY error instead of the one named
|
|
1362
|
+
* to_throw carrying one accepted ANY error instead of the one named.
|
|
1377
1363
|
*/
|
|
1378
1364
|
declare function expectToThrow(a: ExpectToThrowArgs): Statement;
|
|
1379
1365
|
interface ExpectToMatchArgs extends StatementAnnotations {
|
|
@@ -1386,7 +1372,7 @@ interface ExpectToMatchArgs extends StatementAnnotations {
|
|
|
1386
1372
|
* `expect.to_match` — assert a value matches a regex (`mvp:test_expect_to_match`).
|
|
1387
1373
|
*
|
|
1388
1374
|
* A typed, guarded pass-through to the generated factory: same bytes, same
|
|
1389
|
-
* fields. What it adds is
|
|
1375
|
+
* fields. What it adds is a refusal. The `value`
|
|
1390
1376
|
* slot is a PHP `preg_*` PATTERN, so a `c.text("^XanoTS.*Engine$")` there is not
|
|
1391
1377
|
* a stricter assertion — it is a pattern the engine cannot run, and the test
|
|
1392
1378
|
* fails against the very string it was written for:
|
|
@@ -1396,14 +1382,14 @@ interface ExpectToMatchArgs extends StatementAnnotations {
|
|
|
1396
1382
|
* ```
|
|
1397
1383
|
*
|
|
1398
1384
|
* The refusal is build-time and inspects the value it was handed, exactly as the
|
|
1399
|
-
* `fl.regex_*` guard does
|
|
1385
|
+
* `fl.regex_*` guard does: a bare `const` is refused and pointed at
|
|
1400
1386
|
* `c.regex`, while a `ref`/`inp`/`env` pattern — whose text is not visible here —
|
|
1401
1387
|
* is passed through untouched.
|
|
1402
1388
|
*/
|
|
1403
1389
|
declare function expectToMatch(a?: ExpectToMatchArgs): Statement;
|
|
1404
1390
|
|
|
1405
1391
|
/**
|
|
1406
|
-
* Hand-authored typed wrapper for `util.ip_lookup`
|
|
1392
|
+
* Hand-authored typed wrapper for `util.ip_lookup` — the geolocation
|
|
1407
1393
|
* statement whose bound variable is a NESTED object that nothing in the
|
|
1408
1394
|
* signature hints at.
|
|
1409
1395
|
*
|
|
@@ -1498,11 +1484,11 @@ declare function ipLookup<const As extends string = "", const Fs extends readonl
|
|
|
1498
1484
|
*
|
|
1499
1485
|
* - the reference field is named `addon` (an {@link ObjectRef}), so the nesting
|
|
1500
1486
|
* field is named `children` to avoid the collision — which also matches the
|
|
1501
|
-
* stored/export key
|
|
1487
|
+
* stored/export key;
|
|
1502
1488
|
* - the target is a guid-native `ObjectRef`, resolved to a guid and emitted under
|
|
1503
1489
|
* the stored `id` key. In a packageExport bundle the engine matches addons by
|
|
1504
1490
|
* guid (`importAddonId` → `guidMatch`), so emitting the guid as `id` is correct
|
|
1505
|
-
* — the same precedent `s.addon.call` uses
|
|
1491
|
+
* — the same precedent `s.addon.call` uses.
|
|
1506
1492
|
*/
|
|
1507
1493
|
|
|
1508
1494
|
/**
|
|
@@ -1547,7 +1533,7 @@ interface AddonSpec<Graft = unknown> {
|
|
|
1547
1533
|
}
|
|
1548
1534
|
|
|
1549
1535
|
/**
|
|
1550
|
-
* Hand-authored database statements
|
|
1536
|
+
* Hand-authored database statements — the `!map:dbo` family: read/delete/
|
|
1551
1537
|
* exists/patch/truncate/schema against a table. Codegen defers these because the
|
|
1552
1538
|
* target table is a `!map:dbo context.dbo.id` reference; with the guid
|
|
1553
1539
|
* foundation (refs/guid.ts) the table resolves to its deterministic guid.
|
|
@@ -1596,7 +1582,7 @@ type EvalAliases<E> = E extends readonly (infer Item)[] ? Item extends {
|
|
|
1596
1582
|
as: infer A extends string;
|
|
1597
1583
|
} ? A : never : never;
|
|
1598
1584
|
/**
|
|
1599
|
-
* The single-row shape a db read yields, for `InferResponse`'s trace
|
|
1585
|
+
* The single-row shape a db read yields, for `InferResponse`'s trace: the
|
|
1600
1586
|
* table's {@link InferRow}, narrowed to the selected `Cols` when an `output`
|
|
1601
1587
|
* list is given, else the full row. A bare-name / raw-`ColumnDef[]` table has no
|
|
1602
1588
|
* field brands, so `InferRow` is `never` → `unknown` (nothing to infer).
|
|
@@ -1669,7 +1655,7 @@ type AddonFields<A> = A extends readonly [infer H, ...infer Rest] ? (H extends {
|
|
|
1669
1655
|
* the field with the addon result at runtime, so when an alias shadows an
|
|
1670
1656
|
* existing column the honest type is the graft (`unknown`), not the base column.
|
|
1671
1657
|
* An intersection would collapse `unknown & string` back to the base column and
|
|
1672
|
-
* silently desync the type from runtime
|
|
1658
|
+
* silently desync the type from runtime.
|
|
1673
1659
|
*/
|
|
1674
1660
|
type WithAddons<Row, A> = [keyof AddonFields<A>] extends [never] ? Row : Prettify<Omit<Row, keyof AddonFields<A>> & AddonFields<A>>;
|
|
1675
1661
|
/**
|
|
@@ -1680,11 +1666,11 @@ type WithAddons<Row, A> = [keyof AddonFields<A>] extends [never] ? Row : Prettif
|
|
|
1680
1666
|
type WithEval<Row, E> = [keyof EvalFields<E>] extends [never] ? Row : Prettify<Omit<Row, keyof EvalFields<E>> & EvalFields<E>>;
|
|
1681
1667
|
/**
|
|
1682
1668
|
* The paging metadata envelope a `db.query` returns when `paging` is set with
|
|
1683
|
-
* metadata on — the engine's `packageListMeta` shape
|
|
1669
|
+
* metadata on — the engine's `packageListMeta` shape. The result
|
|
1684
1670
|
* list lives under `items`; `totals:true` adds `itemsTotal`/`pageTotal`. A query
|
|
1685
1671
|
* with no `paging`, or `paging:{ metadata:false }`, returns the bare list instead.
|
|
1686
1672
|
*
|
|
1687
|
-
* **Has-next signal
|
|
1673
|
+
* **Has-next signal:** read `nextPage` — it is `number` when
|
|
1688
1674
|
* another page exists and `null` on the last page (the engine fetches one extra
|
|
1689
1675
|
* row to decide, so this needs no second scan). For a total count, set
|
|
1690
1676
|
* `paging:{ totals:true }` and read `itemsTotal`/`pageTotal`. Both are typed on
|
|
@@ -1760,7 +1746,7 @@ interface DbAggregatePaging {
|
|
|
1760
1746
|
* (the engine requires the qualified form) and the statement declares that alias
|
|
1761
1747
|
* so the qualified name resolves; pass an already-dotted `name` for a
|
|
1762
1748
|
* `bind`ed/joined column and it is left as-is (and declares nothing, which is
|
|
1763
|
-
* what keeps a pulled workspace byte-exact
|
|
1749
|
+
* what keeps a pulled workspace byte-exact).
|
|
1764
1750
|
*/
|
|
1765
1751
|
interface DbAggregate {
|
|
1766
1752
|
group?: DbEval[];
|
|
@@ -1796,7 +1782,7 @@ type DbTableRef<T extends ObjectRef = ObjectRef> = T | null;
|
|
|
1796
1782
|
* widen what `where`/`sort`/`eval` can address by dotted path (`"author.id"`);
|
|
1797
1783
|
* they do not by themselves change the returned row shape.
|
|
1798
1784
|
*
|
|
1799
|
-
* ⚠ **The two sides of a join condition are spelled differently
|
|
1785
|
+
* ⚠ **The two sides of a join condition are spelled differently**.
|
|
1800
1786
|
* The JOINED column takes the dotted alias path; the query's OWN column stays
|
|
1801
1787
|
* BARE:
|
|
1802
1788
|
*
|
|
@@ -1892,7 +1878,7 @@ interface DbGetArgs<T extends ObjectRef = ObjectRef, As extends string = string,
|
|
|
1892
1878
|
* written row rather than null and so stay non-nullable — a genuine miss throws
|
|
1893
1879
|
* instead of yielding null (`NotFound`/404 for `edit`/`patch`; a
|
|
1894
1880
|
* unique-constraint error for `add`; `add_or_edit` upserts, so it never misses)
|
|
1895
|
-
|
|
1881
|
+
*. */
|
|
1896
1882
|
declare function dbGet<T extends ObjectRef, const As extends string = "", const Cols extends readonly OutputPath<ColsOf<T>>[] = readonly [], const A extends readonly AddonSpec[] = readonly [], const Fs extends readonly FilterXdo[] = readonly []>(args: DbGetArgs<T, As, Cols, A> & {
|
|
1897
1883
|
asFilters?: Fs;
|
|
1898
1884
|
}): DbResult<As, ApplyFilters<WithAddons<RowShapeOf<T, Cols>, A> | null, Fs>>;
|
|
@@ -2047,7 +2033,7 @@ interface DbField {
|
|
|
2047
2033
|
* A row cell: any authored {@link Value} **except** a `col()` reference. A `col()`
|
|
2048
2034
|
* (bare or wrapped in `withFilters`) does not resolve to the row's stored value
|
|
2049
2035
|
* inside a `db.edit`/`db.add` `row` — it evaluates to `null` at runtime and a
|
|
2050
|
-
* following `fl.add(1)` aborts the engine
|
|
2036
|
+
* following `fl.add(1)` aborts the engine. The `__col?: never` bound
|
|
2051
2037
|
* turns that live-only failure into a compile error; read the row first and pipe
|
|
2052
2038
|
* `ref("...")` through the filter instead.
|
|
2053
2039
|
*/
|
|
@@ -2073,9 +2059,9 @@ type RowsOf<T> = T extends TableDef<string, infer Row> ? Row : unknown;
|
|
|
2073
2059
|
/**
|
|
2074
2060
|
* A partial row keyed by column name — the values to write. Unspecified columns
|
|
2075
2061
|
* get a type default on `db.add`; on `db.edit` they are marked `ignore:true` and
|
|
2076
|
-
* keep their stored value instead (
|
|
2062
|
+
* keep their stored value instead (see `expandRow`).
|
|
2077
2063
|
*
|
|
2078
|
-
* A cell is a tagged {@link Value}, a {@link NestedCell}, or
|
|
2064
|
+
* A cell is a tagged {@link Value}, a {@link NestedCell}, or a bare
|
|
2079
2065
|
* JS literal typed against that column ({@link ScalarCell}), which `expandRow`
|
|
2080
2066
|
* coerces to the constant the author would otherwise have written by hand.
|
|
2081
2067
|
*/
|
|
@@ -2165,7 +2151,7 @@ interface DbEditArgs<T extends ObjectRef = ObjectRef, As extends string = string
|
|
|
2165
2151
|
* A **partial** row keyed by column name: only the columns you list are
|
|
2166
2152
|
* written. Columns you omit are emitted with `ignore:true` and keep their
|
|
2167
2153
|
* stored value — a `{ votes }` edit updates `votes` alone and leaves every
|
|
2168
|
-
* other column intact
|
|
2154
|
+
* other column intact. Expanded against the table's declared
|
|
2169
2155
|
* columns. Use `data` for byte-exact control over each entry's `ignore` flag.
|
|
2170
2156
|
*/
|
|
2171
2157
|
row?: RowMap<ColsOf<T>, RowsOf<T>>;
|
|
@@ -2316,7 +2302,7 @@ interface DbBulkAddArgs extends StatementOptions {
|
|
|
2316
2302
|
* ⚠ **Unset/`false` means the engine STRIPS `id` from every item** and assigns
|
|
2317
2303
|
* the next sequence value instead — silently, with no error and no warning.
|
|
2318
2304
|
* The rows then sit at ids nothing else expects, which surfaces much later as
|
|
2319
|
-
* a foreign key pointing at the wrong row
|
|
2305
|
+
* a foreign key pointing at the wrong row.
|
|
2320
2306
|
*
|
|
2321
2307
|
* This is the opposite of a `table` `seed`, where supplying `id` pins it. If
|
|
2322
2308
|
* you are inserting rows whose ids other rows reference, set this to `true`.
|
|
@@ -2330,7 +2316,7 @@ interface DbBulkAddArgs extends StatementOptions {
|
|
|
2330
2316
|
*
|
|
2331
2317
|
* ⚠ An `id` on a row is DISCARDED unless {@link DbBulkAddArgs.allowIdField} is
|
|
2332
2318
|
* `true` — see that field. Literal rows carrying one are rejected here rather
|
|
2333
|
-
* than silently renumbered by the engine
|
|
2319
|
+
* than silently renumbered by the engine.
|
|
2334
2320
|
*/
|
|
2335
2321
|
declare function dbBulkAdd(args: DbBulkAddArgs): Statement;
|
|
2336
2322
|
interface DbBulkDeleteArgs<As extends string = string> extends StatementOptions {
|
|
@@ -2419,7 +2405,7 @@ declare function dbBulkPatch<T extends ObjectRef, const As extends string = "",
|
|
|
2419
2405
|
* replacing rows wholesale. `export()` warns when a STATIC `items` array omits
|
|
2420
2406
|
* columns of the bound table, and `--strict` / `export({ strict: true })` fails
|
|
2421
2407
|
* the build on it — but an `items` built from a `ref`/`inp` cannot be inspected,
|
|
2422
|
-
* so nothing catches that one for you
|
|
2408
|
+
* so nothing catches that one for you.
|
|
2423
2409
|
*
|
|
2424
2410
|
* Left **unbranded** (plain {@link Statement}): the engine declares no output
|
|
2425
2411
|
* schema for `dbo_bulkupdate`/`dbo_bulkadd`, so
|
|
@@ -2434,7 +2420,7 @@ declare function dbBulkUpdate(args: DbBulkWriteArgs): Statement;
|
|
|
2434
2420
|
* mirror the engine schema's `return.list.paging` block: `page=1`, `per_page=25`,
|
|
2435
2421
|
* `offset=0`, `totals=false`, `metadata=true`.
|
|
2436
2422
|
*
|
|
2437
|
-
* **Input-bound (dynamic) paging
|
|
2423
|
+
* **Input-bound (dynamic) paging:** pass a {@link Value} (e.g.
|
|
2438
2424
|
* `inp("page")`) for `page`/`per_page`/`offset` instead of a number and it is
|
|
2439
2425
|
* emitted into `context.simpleExternal.<field>` as a tagged `{value,tag,filters}`
|
|
2440
2426
|
* (byte shape from the `simpleExternal` golden — the inner key is `value`, not
|
|
@@ -2464,7 +2450,7 @@ interface DbPaging {
|
|
|
2464
2450
|
* **Leave this unset.** It defaults to being DERIVED — on whenever a
|
|
2465
2451
|
* `page`/`per_page`/`offset` field or a classic `external` blob is present —
|
|
2466
2452
|
* which is what stops a `search`/`sort`-only `paging` from silently truncating a
|
|
2467
|
-
* result to 25 rows
|
|
2453
|
+
* result to 25 rows. Setting it overrides that derivation.
|
|
2468
2454
|
*
|
|
2469
2455
|
* It exists because a stored query can carry the two apart: real workspaces
|
|
2470
2456
|
* persist a non-default `per_page` with the gate OFF, and a derived-only encoder
|
|
@@ -2546,7 +2532,7 @@ interface DbQueryArgs<T extends ObjectRef = ObjectRef, As extends string = strin
|
|
|
2546
2532
|
* on (the default) the result is wrapped in a paging envelope
|
|
2547
2533
|
* (`{ items, curPage, nextPage, prevPage, offset, perPage, itemsReceived }`,
|
|
2548
2534
|
* plus `itemsTotal`/`pageTotal` when `totals:true`) instead of a bare row list,
|
|
2549
|
-
* and `InferResponse` reflects that
|
|
2535
|
+
* and `InferResponse` reflects that. Pass `metadata:false` to keep
|
|
2550
2536
|
* the bare array.
|
|
2551
2537
|
*/
|
|
2552
2538
|
paging?: P;
|
|
@@ -2612,7 +2598,7 @@ interface DbTransactionArgs extends StatementAnnotations {
|
|
|
2612
2598
|
* Capture the transaction's result into this stack variable.
|
|
2613
2599
|
*
|
|
2614
2600
|
* A transaction returns whatever its sub-stack returned, so the binding is
|
|
2615
|
-
* real state and not decoration — a pulled workspace stores one
|
|
2601
|
+
* real state and not decoration — a pulled workspace stores one.
|
|
2616
2602
|
* The engine's XanoScript schema for this statement declares no `as`
|
|
2617
2603
|
* argument, which is why nothing here modelled it; the statement class
|
|
2618
2604
|
* returns a value all the same, and the stack item carries the binding like
|
|
@@ -2642,7 +2628,7 @@ interface DbExternalQueryArgs extends StatementOptions {
|
|
|
2642
2628
|
* workspace environment variable unless it already looks like a URL, and
|
|
2643
2629
|
* falls back to it whenever the tagged value is empty. The two are separate
|
|
2644
2630
|
* stored fields, so a workspace holding the older one round-trips as the older
|
|
2645
|
-
* one rather than being quietly rewritten
|
|
2631
|
+
* one rather than being quietly rewritten.
|
|
2646
2632
|
*/
|
|
2647
2633
|
connectionString: Value | string;
|
|
2648
2634
|
responseType?: DbResponseType;
|
|
@@ -2661,8 +2647,8 @@ interface DbExternalQueryArgs extends StatementOptions {
|
|
|
2661
2647
|
* Golden-verified against a live postgres capture: the engine persists
|
|
2662
2648
|
* `context.{code,response_type,connection_string_flex,arg}` and does NOT store
|
|
2663
2649
|
* `parser` at its default, so the SDK's omission is correct. The rich envelope
|
|
2664
|
-
* matches.
|
|
2665
|
-
*
|
|
2650
|
+
* matches. Only postgres is capture-verified; the other 4 engines share the
|
|
2651
|
+
* format and stay modeled by analogy.
|
|
2666
2652
|
*/
|
|
2667
2653
|
declare function dbExternalQuery(args: DbExternalQueryArgs): Statement;
|
|
2668
2654
|
|
|
@@ -2820,11 +2806,9 @@ type PortArg<D> = string extends PortsOf<D> ? number | string : [PortsOf<D>] ext
|
|
|
2820
2806
|
* The five request fields this statement shares with the external-HTTP family,
|
|
2821
2807
|
* taken FROM that family's field set rather than restated.
|
|
2822
2808
|
*
|
|
2823
|
-
*
|
|
2824
|
-
*
|
|
2825
|
-
*
|
|
2826
|
-
* second would have left the record spelling silently unavailable here (issue
|
|
2827
|
-
* #92). The per-field docs stay local because the DEFAULTS differ — this
|
|
2809
|
+
* Deriving them keeps the two in step: a widening on the HTTP side (the
|
|
2810
|
+
* `headers` record form, say) reaches here without a second hand-edit.
|
|
2811
|
+
* The per-field docs stay local because the DEFAULTS differ — this
|
|
2828
2812
|
* statement's block schema requires all five, so it emits them (see
|
|
2829
2813
|
* {@link MICROSERVICE_DEFAULTS}) where `api.request` may leave them out.
|
|
2830
2814
|
*/
|
|
@@ -2896,7 +2880,7 @@ declare function microserviceRequest<const As extends string = "", const H exten
|
|
|
2896
2880
|
}): Statement & AsShapeBrand<As, ApplyFilters<ApiRequestResult, Fs>>;
|
|
2897
2881
|
|
|
2898
2882
|
/**
|
|
2899
|
-
* Typed `precondition` / `throw` overrides
|
|
2883
|
+
* Typed `precondition` / `throw` overrides.
|
|
2900
2884
|
*
|
|
2901
2885
|
* `s.throw` raises a generic error the runtime returns with **HTTP 200** and an
|
|
2902
2886
|
* error body — a client checking `res.ok` (or any non-2xx guard) treats a
|
|
@@ -2913,7 +2897,7 @@ declare function microserviceRequest<const As extends string = "", const H exten
|
|
|
2913
2897
|
/**
|
|
2914
2898
|
* The exception a failed {@link precondition} raises, and the HTTP status the
|
|
2915
2899
|
* runtime returns for it. Mirrors the engine's `mvp:precondition` `error_type`
|
|
2916
|
-
* enum
|
|
2900
|
+
* enum:
|
|
2917
2901
|
*
|
|
2918
2902
|
* - `standard` — generic error (the default).
|
|
2919
2903
|
* - `badrequest` — **400** Bad Request.
|
|
@@ -2956,7 +2940,7 @@ interface PreconditionArgs extends StatementAnnotations {
|
|
|
2956
2940
|
* `precondition { … }` — assert a condition and raise a **status-bearing** error
|
|
2957
2941
|
* if it fails (`mvp:precondition`). Prefer this over {@link throwError} (`s.throw`)
|
|
2958
2942
|
* whenever the rejection must be observable via HTTP status — a client guarding
|
|
2959
|
-
* on `res.ok` sees a real 4xx instead of a 200 with an error body.
|
|
2943
|
+
* on `res.ok` sees a real 4xx instead of a 200 with an error body.
|
|
2960
2944
|
*
|
|
2961
2945
|
* @example
|
|
2962
2946
|
* s.precondition({
|
|
@@ -2978,13 +2962,13 @@ interface ThrowArgs extends StatementAnnotations {
|
|
|
2978
2962
|
* ⚠️ The runtime returns a thrown error with **HTTP 200** and an error body, so
|
|
2979
2963
|
* a client checking `res.ok` treats it as success. For a rejection that surfaces
|
|
2980
2964
|
* as a real 4xx status, use {@link precondition} (`s.precondition`) with an
|
|
2981
|
-
* `error_type`.
|
|
2965
|
+
* `error_type`.
|
|
2982
2966
|
*/
|
|
2983
2967
|
declare function throwError(a: ThrowArgs): Statement;
|
|
2984
2968
|
|
|
2985
2969
|
/**
|
|
2986
2970
|
* Typed overrides for statement args the engine declares as a CLOSED SET but the
|
|
2987
|
-
* codegen ships as a bare `string
|
|
2971
|
+
* codegen ships as a bare `string`.
|
|
2988
2972
|
*
|
|
2989
2973
|
* The generated catalog harvests `enum` from the engine's runtime INPUT schemas,
|
|
2990
2974
|
* so a closed set declared on a `context`-routed field arrives untyped. Both
|
|
@@ -3071,7 +3055,7 @@ declare function createVideo(a: CreateVideoArgs): Statement;
|
|
|
3071
3055
|
declare function setHeader(a: SetHeaderArgs): Statement;
|
|
3072
3056
|
|
|
3073
3057
|
/**
|
|
3074
|
-
* Typed refusal of `capture` on `s.lambda
|
|
3058
|
+
* Typed refusal of `capture` on `s.lambda`.
|
|
3075
3059
|
*
|
|
3076
3060
|
* The grounding docs introduce an inline `code:` arrow and then, several
|
|
3077
3061
|
* paragraphs later, `lam.fn(fn, { surface?, capture? })`. Nothing connected the
|
|
@@ -3097,7 +3081,7 @@ type LambdaArgs = Parameters<typeof generated.lambda>[0] & {
|
|
|
3097
3081
|
* `lambda { … }` — run a JavaScript body (`mvp:lambda`).
|
|
3098
3082
|
*
|
|
3099
3083
|
* Delegates to the generated factory unchanged. The only addition is a typed
|
|
3100
|
-
* refusal of `capture
|
|
3084
|
+
* refusal of `capture`: the grounding docs introduce an inline
|
|
3101
3085
|
* `code:` arrow and then `lam.fn(fn, { capture })` several paragraphs later, so
|
|
3102
3086
|
* `capture` reads as a property of lambda bodies generally. The bare
|
|
3103
3087
|
* "does not exist in type" error that produced implies the wrong fix — drop the
|
|
@@ -4450,7 +4434,7 @@ declare const s: {
|
|
|
4450
4434
|
|
|
4451
4435
|
/**
|
|
4452
4436
|
* Wide aliases for the def types that carry generics — the annotation that lets
|
|
4453
|
-
* a workspace be assembled out of independently-authored modules
|
|
4437
|
+
* a workspace be assembled out of independently-authored modules.
|
|
4454
4438
|
*
|
|
4455
4439
|
* The problem is TypeScript's, not the SDK's. `register*` stores defs and does
|
|
4456
4440
|
* not read their brands, so it takes them however they arrive. What fails is the
|
|
@@ -4500,7 +4484,7 @@ type AnyFunctionDef = FunctionDef;
|
|
|
4500
4484
|
type AnyAddonDef = AddonDef;
|
|
4501
4485
|
|
|
4502
4486
|
/**
|
|
4503
|
-
* `compile()` — façade over the `function` object kind
|
|
4487
|
+
* `compile()` — façade over the `function` object kind. The envelope
|
|
4504
4488
|
* encoding now lives in `src/kinds/function.ts`; this keeps the MVP's public
|
|
4505
4489
|
* `compile`/`encodeResponse` surface stable.
|
|
4506
4490
|
*/
|
|
@@ -4524,7 +4508,7 @@ declare function compile(fn: FunctionDef): FunctionXdo;
|
|
|
4524
4508
|
*
|
|
4525
4509
|
* It applies to EVERY spec-routed statement, not only the handful whose stored
|
|
4526
4510
|
* envelope spells the entry members out in full — the lean and full input forms
|
|
4527
|
-
* are two serializations of one entry model
|
|
4511
|
+
* are two serializations of one entry model.
|
|
4528
4512
|
*
|
|
4529
4513
|
* The marker is carried on a non-enumerable property, so it never reaches
|
|
4530
4514
|
* `JSON.stringify` and an ignored value serializes exactly like the value it
|