@dxos/compute - v0.16.0
    Preparing search index...

    Class Trigger

    Function trigger. Runnable is invoked with the payload passed as input data. The event that fires the trigger is available in the runnable context.

    Hierarchy

    • {
          concurrency?: number;
          enabled?: boolean;
          input?: { readonly [key: string]: any };
          inputNodeId?: string;
          remote?: boolean;
          runnable?: Ref<PersistentOperation & OfKind<Object> & Unknown>;
          spec?:
              | { kind: "email" }
              | {
                  batchSize?: number;
                  feed?: Ref<Feed & OfKind<Object> & Unknown>;
                  kind: "feed";
              }
              | {
                  kind: "subscription";
                  options?: { deep?: boolean; delay?: number };
                  query: {
                      ast:
                          | QuerySelectClause
                          | QueryFilterClause
                          | QueryReferenceTraversalClause
                          | QueryIncomingReferencesClause
                          | QueryRelationClause
                          | QueryRelationTraversalClause
                          | QueryHierarchyTraversalClause
                          | QueryUnionClause
                          | QuerySetDifferenceClause
                          | QueryOrderClause
                          | QueryOptionsClause
                          | QueryLimitClause
                          | QuerySkipClause
                          | QueryAggregateClause
                          | QueryFromClause;
                      raw?: string;
                  };
              }
              | { kind: "direct" }
              | { cron: string; kind: "timer" }
              | { kind: "webhook"; method?: string; port?: number };
      } & OfKind<Object, this>
      • Trigger
    Index

    Constructors

    • Parameters

      • _: never

      Returns Trigger.Trigger

    Properties

    "~@dxos/echo/Kind": Object
    concurrency?: number = ...
    enabled?: boolean = ...
    id: string
    input?: { readonly [key: string]: any } = ...

    Passed as the input data to the runnable.

    inputNodeId?: string = ...

    Only used for workflowSchema. Specifies the input node in the circuit.

    Remove and enforce a single input node in all compute graphSchema.

    remote?: boolean = ...

    Runs this trigger on the edge rather than locally. When unset, the trigger runs locally on the client.

    runnable?: Ref<PersistentOperation & OfKind<Object> & Unknown> = ...

    Runnable (operation or workflow) to invoke. Wired programmatically (see plugin-routine's wireTriggers); not user-editable, so hidden from forms.

    spec?:
        | { kind: "email" }
        | {
            batchSize?: number;
            feed?: Ref<Feed & OfKind<Object> & Unknown>;
            kind: "feed";
        }
        | {
            kind: "subscription";
            options?: { deep?: boolean; delay?: number };
            query: {
                ast:
                    | QuerySelectClause
                    | QueryFilterClause
                    | QueryReferenceTraversalClause
                    | QueryIncomingReferencesClause
                    | QueryRelationClause
                    | QueryRelationTraversalClause
                    | QueryHierarchyTraversalClause
                    | QueryUnionClause
                    | QuerySetDifferenceClause
                    | QueryOrderClause
                    | QueryOptionsClause
                    | QueryLimitClause
                    | QuerySkipClause
                    | QueryAggregateClause
                    | QueryFromClause;
                raw?: string;
            };
        }
        | { kind: "direct" }
        | { cron: string; kind: "timer" }
        | { kind: "webhook"; method?: string; port?: number } = ...

    Type declaration

    • { kind: "email" }
    • {
          batchSize?: number;
          feed?: Ref<Feed & OfKind<Object> & Unknown>;
          kind: "feed";
      }
      • Optional ReadonlybatchSize?: number

        Consecutive feed items delivered per invocation, as event.items in feed order; one when unset. The last batch of a read is short rather than waiting for the feed to fill it.

      • Optional Readonlyfeed?: Ref<Feed & OfKind<Object> & Unknown>
      • Readonlykind: "feed"
    • {
          kind: "subscription";
          options?: { deep?: boolean; delay?: number };
          query: {
              ast:
                  | QuerySelectClause
                  | QueryFilterClause
                  | QueryReferenceTraversalClause
                  | QueryIncomingReferencesClause
                  | QueryRelationClause
                  | QueryRelationTraversalClause
                  | QueryHierarchyTraversalClause
                  | QueryUnionClause
                  | QuerySetDifferenceClause
                  | QueryOrderClause
                  | QueryOptionsClause
                  | QueryLimitClause
                  | QuerySkipClause
                  | QueryAggregateClause
                  | QueryFromClause;
              raw?: string;
          };
      }
    • { kind: "direct" }
    • { cron: string; kind: "timer" }
    • { kind: "webhook"; method?: string; port?: number }
    "~@dxos/echo/Kind": Type

    Entity-kind brand of the type-entity value itself — always EntityKind.Type. The kind of instance the type describes lives on [SchemaKindId] (Object / Relation / Type). Lets Obj.isObject / Relation.isRelation reject type entities by a single [KindId] check.

    "~@dxos/echo/SchemaKind": Object

    Schema-kind brand (object).

    "~@dxos/echo/Type.Instance"?: Trigger.Trigger & OfKind<Object>
    "~@dxos/echo/Type.StaticSchema": Codec<any, any>

    Source Effect Schema — used internally by Type.getSchema(self).

    fields: {}

    The fields defined in the original struct schema. Allows accessing field definitions for introspection.

    id: string

    Object id. Like all ECHO entities, type entities always carry an id — stamped at construction for in-memory (static) declarations and assigned by the database once persisted. The id does NOT determine the entity's URI: static types resolve to their typename DXN, persisted types to echo:///<id> (see getTypeURIFromSpecifier).

    jsonSchema: JsonSchemaType
    name?: string