@mendix/extensions-api - v0.2.4
    Preparing search index...

    Interface IMicroflowModelApi

    API for working with microflows

    interface IMicroflowModelApi {
        _apiId: "mendix.MicroflowModelApi";
        addEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): DisposeListener;
        addMicroflow(
            containerId: string,
            options?: MicroflowCreationOptions,
        ): Promise<Microflow>;
        applyChanges(operations: Operation[]): Promise<ApplyChangesResult>;
        createElement<TElement extends ElementBase>(
            type: TElement["$Type"],
            options?: TElement["$CreationOptions"],
        ): Promise<TElement>;
        createUnit(
            type: "Microflows$Microflow",
            containerId: string,
            options?: MicroflowCreationOptions,
        ): Promise<Microflow>;
        deleteUnit(unitId: string): Promise<void>;
        getElementMetadata(): Promise<ElementMetadataMap>;
        loadUnits(
            type: "Microflows$Microflow",
            unitIds: string[],
        ): Promise<Microflow[]>;
        removeEventListener<K extends never>(
            eventType: K,
            listener: EventHandler<{}, K>,
        ): void;
    }

    Hierarchy

    • IModelComponentApiBase<Microflow>
      • IMicroflowModelApi
    Index

    Properties

    _apiId: "mendix.MicroflowModelApi"

    Unique identifier that can be used to register or retrieve a specific API.

    Example: mendix.EditorsAPI, mycompany.MyFunkyAPI

    Methods

    • Adds an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to listen for.

      • listener: EventHandler<{}, K>

        The event listener to add.

      Returns DisposeListener

      A function that can be called to remove the event listener.

    • Adds a new microflow to the specified container.

      Parameters

      • containerId: string

        The ID of the container where the microflow will be added. It could be a module or folder.

      • Optionaloptions: MicroflowCreationOptions

        Options that specify how the microflow will be initialized.

      Returns Promise<Microflow>

      A promise that resolves to the newly created microflow.

    • Parameters

      • operations: Operation[]

      Returns Promise<ApplyChangesResult>

    • Parameters

      • unitId: string

      Returns Promise<void>

    • Returns Promise<ElementMetadataMap>

    • Parameters

      • type: "Microflows$Microflow"
      • unitIds: string[]

      Returns Promise<Microflow[]>

    • Removes an event listener for the specified event type.

      Type Parameters

      • K extends never

      Parameters

      • eventType: K

        The type of event to remove the listener from.

      • listener: EventHandler<{}, K>

        The event listener to remove.

      Returns void