effx
API reference@effx/runtime

builtins

API reference for @effx/runtime/builtins

builtins.ts overview


Exports Grouped by Category


utils

Authorize

Signature

declare const Authorize: Definition<
  "Authorize",
  "operation",
  readonly [Arg<CapabilityValue, CapabilityMarker>],
  undefined
>

Cli

Signature

declare const Cli: Definition<"Cli", "operation", readonly [Arg<string, string>], undefined>

Command

Signature

declare const Command: Definition<
  "Command",
  "operation",
  {
    readonly name: OptionalArg<string, string>
    readonly input: Arg<Top, SchemaMarker>
    readonly success: Arg<Top, SchemaMarker>
  },
  undefined
>

Errors

Signature

declare const Errors: Definition<"Errors", "operation", RestArgs<Top, SchemaMarker>, undefined>

FoldkitCommand

Signature

declare const FoldkitCommand: Definition<
  "Foldkit.Command",
  "operation",
  { readonly success: Arg<Top, SchemaMarker>; readonly failure: Arg<Top, SchemaMarker> },
  undefined
>

HttpAccess

Signature

declare const HttpAccess: Definition<
  "Http.Access",
  "operation",
  readonly [
    Arg<
      Readonly<{
        readonly capabilities: TaggedLive<{
          readonly None: {}
          readonly One: { readonly capability: Arg<string, string> }
          readonly Any: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
          readonly All: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
        }>
        readonly requirements: ReadonlyArray<
          Readonly<{ readonly id: string; readonly parameters?: { readonly [key: string]: JsonValue } | undefined }>
        >
        readonly canonicalScopeResolver: object
        readonly annotator?: ((spec: HttpAccessAnnotationSpec) => Context.Context<never>) | undefined
        readonly exposure?: "External" | "Internal" | undefined
        readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
        readonly principalKinds?:
          | readonly [
              "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
              ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
            ]
          | undefined
        readonly concealment?:
          | TaggedLive<{
              readonly Reveal: {}
              readonly NotFound: {
                readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
              }
            }>
          | undefined
        readonly decisionTime?: "SnapshotRead" | "Transaction" | undefined
        readonly snapshotDecisionForCommand?: boolean | undefined
      }>,
      Readonly<{
        readonly annotator: SymbolMarker
        readonly exposure: "External" | "Internal"
        readonly acceptedCredentials: readonly [string, ...string[]]
        readonly principalKinds: readonly [
          "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
          ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
        ]
        readonly capabilities: TaggedRead<{
          readonly None: {}
          readonly One: { readonly capability: Arg<string, string> }
          readonly Any: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
          readonly All: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
        }>
        readonly requirements: ReadonlyArray<
          Readonly<{ readonly id: string; readonly parameters?: { readonly [key: string]: JsonValue } | undefined }>
        >
        readonly canonicalScopeResolver: SymbolMarker
        readonly concealment: TaggedRead<{
          readonly Reveal: {}
          readonly NotFound: { readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
        }>
        readonly decisionTime: "SnapshotRead" | "Transaction"
        readonly snapshotDecisionForCommand?: boolean | undefined
      }>
    >
  ],
  undefined
>

HttpContract

Signature

declare const HttpContract: Definition<
  "Http.Contract",
  "operation",
  readonly [
    Arg<
      Readonly<{
        readonly root?: string | undefined
        readonly group?: string | undefined
        readonly params?: Top | undefined
        readonly query?: true | Top | undefined
        readonly headers?: Top | undefined
        readonly payload?: Top | undefined
        readonly payloadIsQuery?: boolean | undefined
        readonly success?: Top | undefined
        readonly status?: number | undefined
        readonly mediaType?: string | undefined
        readonly responseHeaders?: Top | undefined
        readonly conditional?: boolean | undefined
        readonly middleware?: ReadonlyArray<ServiceLike> | undefined
        readonly metadata?:
          | Readonly<{
              readonly annotator?: HttpOperationAnnotator | undefined
              readonly operationId?: string | undefined
              readonly summary?: string | undefined
              readonly description?: string | undefined
              readonly tags?: ReadonlyArray<string> | undefined
              readonly commandIdentity?: ExportedFunctionSymbol | undefined
            }>
          | undefined
      }>,
      Readonly<{
        readonly group: string
        readonly success: SchemaMarker
        readonly root?: string | undefined
        readonly params?: SchemaMarker | undefined
        readonly query?: SchemaMarker | undefined
        readonly headers?: SchemaMarker | undefined
        readonly payload?: SchemaMarker | undefined
        readonly payloadIsQuery?: boolean | undefined
        readonly status?: number | undefined
        readonly mediaType?: string | undefined
        readonly responseHeaders?: SchemaMarker | undefined
        readonly conditional?: boolean | undefined
        readonly middleware?: ReadonlyArray<SymbolMarker> | undefined
        readonly metadata?:
          | Readonly<{
              readonly annotator?: SymbolMarker | undefined
              readonly operationId?: string | undefined
              readonly summary?: string | undefined
              readonly description?: string | undefined
              readonly tags?: ReadonlyArray<string> | undefined
              readonly commandIdentity?: SymbolMarker | undefined
            }>
          | undefined
      }>
    >
  ],
  undefined
>

HttpDelete

Signature

declare const HttpDelete: Definition<"Http.Delete", "operation", readonly [Arg<string, string>], undefined>

HttpGet

Signature

declare const HttpGet: Definition<"Http.Get", "operation", readonly [Arg<string, string>], undefined>

HttpGroup

Signature

declare const HttpGroup: Definition<
  "Http.Group",
  "group",
  readonly [
    Arg<
      Readonly<{
        readonly root: string | { readonly identifier: string }
        readonly group: string
        readonly title?: string | undefined
        readonly description?: string | undefined
        readonly displayName?: string | undefined
        readonly defaults?:
          | Readonly<{
              readonly middleware?: ReadonlyArray<ServiceLike> | undefined
              readonly metadata?: Readonly<{ readonly annotator?: HttpOperationAnnotator | undefined }> | undefined
              readonly problems?: Readonly<{ readonly registry?: ProblemRegistry | undefined }> | undefined
              readonly access?:
                | Readonly<{
                    readonly annotator?: ((spec: HttpAccessAnnotationSpec) => Context.Context<never>) | undefined
                    readonly exposure?: "External" | "Internal" | undefined
                    readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
                    readonly principalKinds?:
                      | readonly [
                          "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
                          ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
                        ]
                      | undefined
                    readonly concealment?:
                      | TaggedLive<{
                          readonly Reveal: {}
                          readonly NotFound: {
                            readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
                          }
                        }>
                      | undefined
                  }>
                | undefined
            }>
          | undefined
      }>,
      Readonly<{
        readonly root: string | RootSymbolMarker
        readonly group: string
        readonly title?: string | undefined
        readonly description?: string | undefined
        readonly displayName?: string | undefined
        readonly defaults?:
          | Readonly<{
              readonly middleware?: ReadonlyArray<SymbolMarker> | undefined
              readonly metadata?: Readonly<{ readonly annotator?: SymbolMarker | undefined }> | undefined
              readonly problems?: Readonly<{ readonly registry?: SymbolMarker | undefined }> | undefined
              readonly access?:
                | Readonly<{
                    readonly annotator?: SymbolMarker | undefined
                    readonly exposure?: "External" | "Internal" | undefined
                    readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
                    readonly principalKinds?:
                      | readonly [
                          "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
                          ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
                        ]
                      | undefined
                    readonly concealment?:
                      | TaggedRead<{
                          readonly Reveal: {}
                          readonly NotFound: {
                            readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
                          }
                        }>
                      | undefined
                  }>
                | undefined
            }>
          | undefined
      }>
    >
  ],
  undefined
>

HttpIn

Builder-only association (.in(Group)); consumed by the 0013 pre-pass, never interpreted.

Signature

declare const HttpIn: Definition<"Http.In", "operation", readonly [Arg<HttpGroupReference, SymbolMarker>], undefined>

HttpPatch

Signature

declare const HttpPatch: Definition<"Http.Patch", "operation", readonly [Arg<string, string>], undefined>

HttpPost

Signature

declare const HttpPost: Definition<"Http.Post", "operation", readonly [Arg<string, string>], undefined>

HttpProblems

Signature

declare const HttpProblems: Definition<
  "Http.Problems",
  "operation",
  readonly [
    Arg<
      Readonly<{
        readonly codes: readonly [string, ...string[]]
        readonly registry?: ProblemRegistry | undefined
        readonly identifier?: string | undefined
        readonly map?: Readonly<Record<string, string>> | undefined
      }>,
      Readonly<{
        readonly registry: SymbolMarker
        readonly codes: readonly [string, ...string[]]
        readonly identifier?: string | undefined
        readonly map?: Readonly<Record<string, string>> | undefined
      }>
    >
  ],
  undefined
>

HttpPut

Signature

declare const HttpPut: Definition<"Http.Put", "operation", readonly [Arg<string, string>], undefined>

PersistentModel

Signature

declare const PersistentModel: Definition<
  "PersistentModel",
  "model",
  {
    readonly table: Arg<string, string>
    readonly schema: InjectedArg<SchemaMarker>
    readonly views: OptionalArg<Readonly<Record<string, Top>>, Readonly<Record<string, SchemaMarker>>>
    readonly focus: OptionalArg<
      Readonly<Record<string, ReadonlyArray<string> | FocusValue>>,
      Readonly<Record<string, ReadonlyArray<string>>>
    >
  },
  undefined
>

Query

Signature

declare const Query: Definition<
  "Query",
  "operation",
  {
    readonly name: OptionalArg<string, string>
    readonly input: Arg<Top, SchemaMarker>
    readonly success: Arg<Top, SchemaMarker>
  },
  undefined
>

Requirements

Signature

declare const Requirements: Definition<"Requirements", "operation", RestArgs<ServiceLike, SymbolMarker>, undefined>

Rpc

Signature

declare const Rpc: Definition<"Rpc", "operation", readonly [Arg<string, string>], undefined>

all

Every built-in definition: the frontend's plan table and builder-step name table derive from this.

Signature

declare const all: readonly [
  Definition<
    "Query",
    "operation",
    {
      readonly name: OptionalArg<string, string>
      readonly input: Arg<Top, SchemaMarker>
      readonly success: Arg<Top, SchemaMarker>
    },
    undefined
  >,
  Definition<
    "Command",
    "operation",
    {
      readonly name: OptionalArg<string, string>
      readonly input: Arg<Top, SchemaMarker>
      readonly success: Arg<Top, SchemaMarker>
    },
    undefined
  >,
  Definition<"Errors", "operation", RestArgs<Top, SchemaMarker>, undefined>,
  Definition<"Requirements", "operation", RestArgs<ServiceLike, SymbolMarker>, undefined>,
  Definition<"Authorize", "operation", readonly [Arg<CapabilityValue, CapabilityMarker>], undefined>,
  Definition<"Rpc", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Cli", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Http.Get", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Http.Post", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Http.Put", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Http.Patch", "operation", readonly [Arg<string, string>], undefined>,
  Definition<"Http.Delete", "operation", readonly [Arg<string, string>], undefined>,
  Definition<
    "Http.Contract",
    "operation",
    readonly [
      Arg<
        Readonly<{
          readonly root?: string | undefined
          readonly group?: string | undefined
          readonly params?: Top | undefined
          readonly query?: true | Top | undefined
          readonly headers?: Top | undefined
          readonly payload?: Top | undefined
          readonly payloadIsQuery?: boolean | undefined
          readonly success?: Top | undefined
          readonly status?: number | undefined
          readonly mediaType?: string | undefined
          readonly responseHeaders?: Top | undefined
          readonly conditional?: boolean | undefined
          readonly middleware?: ReadonlyArray<ServiceLike> | undefined
          readonly metadata?:
            | Readonly<{
                readonly annotator?: HttpOperationAnnotator | undefined
                readonly operationId?: string | undefined
                readonly summary?: string | undefined
                readonly description?: string | undefined
                readonly tags?: ReadonlyArray<string> | undefined
                readonly commandIdentity?: ExportedFunctionSymbol | undefined
              }>
            | undefined
        }>,
        Readonly<{
          readonly group: string
          readonly success: SchemaMarker
          readonly root?: string | undefined
          readonly params?: SchemaMarker | undefined
          readonly query?: SchemaMarker | undefined
          readonly headers?: SchemaMarker | undefined
          readonly payload?: SchemaMarker | undefined
          readonly payloadIsQuery?: boolean | undefined
          readonly status?: number | undefined
          readonly mediaType?: string | undefined
          readonly responseHeaders?: SchemaMarker | undefined
          readonly conditional?: boolean | undefined
          readonly middleware?: ReadonlyArray<SymbolMarker> | undefined
          readonly metadata?:
            | Readonly<{
                readonly annotator?: SymbolMarker | undefined
                readonly operationId?: string | undefined
                readonly summary?: string | undefined
                readonly description?: string | undefined
                readonly tags?: ReadonlyArray<string> | undefined
                readonly commandIdentity?: SymbolMarker | undefined
              }>
            | undefined
        }>
      >
    ],
    undefined
  >,
  Definition<
    "Http.Problems",
    "operation",
    readonly [
      Arg<
        Readonly<{
          readonly codes: readonly [string, ...string[]]
          readonly registry?: ProblemRegistry | undefined
          readonly identifier?: string | undefined
          readonly map?: Readonly<Record<string, string>> | undefined
        }>,
        Readonly<{
          readonly registry: SymbolMarker
          readonly codes: readonly [string, ...string[]]
          readonly identifier?: string | undefined
          readonly map?: Readonly<Record<string, string>> | undefined
        }>
      >
    ],
    undefined
  >,
  Definition<
    "Http.Access",
    "operation",
    readonly [
      Arg<
        Readonly<{
          readonly capabilities: TaggedLive<{
            readonly None: {}
            readonly One: { readonly capability: Arg<string, string> }
            readonly Any: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
            readonly All: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
          }>
          readonly requirements: ReadonlyArray<
            Readonly<{ readonly id: string; readonly parameters?: { readonly [key: string]: JsonValue } | undefined }>
          >
          readonly canonicalScopeResolver: object
          readonly annotator?: ((spec: HttpAccessAnnotationSpec) => Context.Context<never>) | undefined
          readonly exposure?: "External" | "Internal" | undefined
          readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
          readonly principalKinds?:
            | readonly [
                "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
                ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
              ]
            | undefined
          readonly concealment?:
            | TaggedLive<{
                readonly Reveal: {}
                readonly NotFound: {
                  readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
                }
              }>
            | undefined
          readonly decisionTime?: "SnapshotRead" | "Transaction" | undefined
          readonly snapshotDecisionForCommand?: boolean | undefined
        }>,
        Readonly<{
          readonly annotator: SymbolMarker
          readonly exposure: "External" | "Internal"
          readonly acceptedCredentials: readonly [string, ...string[]]
          readonly principalKinds: readonly [
            "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
            ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
          ]
          readonly capabilities: TaggedRead<{
            readonly None: {}
            readonly One: { readonly capability: Arg<string, string> }
            readonly Any: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
            readonly All: { readonly capabilities: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
          }>
          readonly requirements: ReadonlyArray<
            Readonly<{ readonly id: string; readonly parameters?: { readonly [key: string]: JsonValue } | undefined }>
          >
          readonly canonicalScopeResolver: SymbolMarker
          readonly concealment: TaggedRead<{
            readonly Reveal: {}
            readonly NotFound: { readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]> }
          }>
          readonly decisionTime: "SnapshotRead" | "Transaction"
          readonly snapshotDecisionForCommand?: boolean | undefined
        }>
      >
    ],
    undefined
  >,
  Definition<
    "Http.Group",
    "group",
    readonly [
      Arg<
        Readonly<{
          readonly root: string | { readonly identifier: string }
          readonly group: string
          readonly title?: string | undefined
          readonly description?: string | undefined
          readonly displayName?: string | undefined
          readonly defaults?:
            | Readonly<{
                readonly middleware?: ReadonlyArray<ServiceLike> | undefined
                readonly metadata?: Readonly<{ readonly annotator?: HttpOperationAnnotator | undefined }> | undefined
                readonly problems?: Readonly<{ readonly registry?: ProblemRegistry | undefined }> | undefined
                readonly access?:
                  | Readonly<{
                      readonly annotator?: ((spec: HttpAccessAnnotationSpec) => Context.Context<never>) | undefined
                      readonly exposure?: "External" | "Internal" | undefined
                      readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
                      readonly principalKinds?:
                        | readonly [
                            "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
                            ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
                          ]
                        | undefined
                      readonly concealment?:
                        | TaggedLive<{
                            readonly Reveal: {}
                            readonly NotFound: {
                              readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
                            }
                          }>
                        | undefined
                    }>
                  | undefined
              }>
            | undefined
        }>,
        Readonly<{
          readonly root: string | RootSymbolMarker
          readonly group: string
          readonly title?: string | undefined
          readonly description?: string | undefined
          readonly displayName?: string | undefined
          readonly defaults?:
            | Readonly<{
                readonly middleware?: ReadonlyArray<SymbolMarker> | undefined
                readonly metadata?: Readonly<{ readonly annotator?: SymbolMarker | undefined }> | undefined
                readonly problems?: Readonly<{ readonly registry?: SymbolMarker | undefined }> | undefined
                readonly access?:
                  | Readonly<{
                      readonly annotator?: SymbolMarker | undefined
                      readonly exposure?: "External" | "Internal" | undefined
                      readonly acceptedCredentials?: readonly [string, ...string[]] | undefined
                      readonly principalKinds?:
                        | readonly [
                            "Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder",
                            ...("Anonymous" | "Person" | "ServicePrincipal" | "CapabilityHolder")[]
                          ]
                        | undefined
                      readonly concealment?:
                        | TaggedRead<{
                            readonly Reveal: {}
                            readonly NotFound: {
                              readonly stages: Arg<readonly [string, ...string[]], readonly [string, ...string[]]>
                            }
                          }>
                        | undefined
                    }>
                  | undefined
              }>
            | undefined
        }>
      >
    ],
    undefined
  >,
  Definition<"Http.In", "operation", readonly [Arg<HttpGroupReference, SymbolMarker>], undefined>,
  Definition<
    "Foldkit.Command",
    "operation",
    { readonly success: Arg<Top, SchemaMarker>; readonly failure: Arg<Top, SchemaMarker> },
    undefined
  >,
  Definition<
    "PersistentModel",
    "model",
    {
      readonly table: Arg<string, string>
      readonly schema: InjectedArg<SchemaMarker>
      readonly views: OptionalArg<Readonly<Record<string, Top>>, Readonly<Record<string, SchemaMarker>>>
      readonly focus: OptionalArg<
        Readonly<Record<string, ReadonlyArray<string> | FocusValue>>,
        Readonly<Record<string, ReadonlyArray<string>>>
      >
    },
    undefined
  >
]

On this page