Options
All
  • Public
  • Public/Protected
  • All
Menu

Mendix Model SDK

Index

Type aliases

AbstractStructureProperty

AbstractStructureProperty: PartProperty<any> | PartListProperty<any> | StructuralChildProperty<any> | StructuralChildListProperty<any>

BuildResultStatus

BuildResultStatus: "Failure" | "Success"

CannotFixAppState

CannotFixAppState: "INVALID_PROJECTID" | "UNKNOWN_DEPLOYER" | "INVALID_OPENID" | "UNKNOWN_PROJECT" | "UNKNOWN_ACCOUNT" | "BUSY_PROVISIONING" | "UNLINKED" | "NO_WEBMODELER_TARGET_SELECTED" | "UNKNOWN"

Change

Change: IDeltaChange[]

ConcreteModelElements

ConcreteModelElements: object

Type declaration

Delta

ICommitToTeamServerOptions

IEnvironmentStatus

IEnvironmentStatus: object | object

IMergeState

IMergeState: ILockData

IModelEvent

IModelEvent: IFileEvent | IDeltaEvent

IUpdateAppJobStatus

IUpdateAppJobStatus: "updating" | "resuming" | "provisioning" | "started" | "consistencyerrors" | "failed"

IWorkingCopyEvent

InstanceConstructor

LockType

LockType: "bidi" | "conversion" | "edit" | "commit" | "update" | "switch" | "commit-wc"

ModelSdkClient

ModelSdkClient: ModelSdkClientImpl<IModel, Model>

Mutator

PrimitiveValue

PrimitiveValue: boolean | number | string | IPoint | ISize | IColor

RequestMethod

RequestMethod: "get" | "put" | "post" | "delete"

StructureState

StructureState: "new" | "attached" | "detached" | "deleted"

SuccessAppState

SuccessAppState: "APP_NOT_FOUND" | "STAGING" | "UPDATING" | "STARTING" | "FAILED_STAGING" | "FAILED" | "STARTED" | "MXBUILD_STARTED" | "STOPPED"

TransactionType

TransactionType: "explicit" | "implicit"

Variables

Const MAX_METAMODEL_VERSION

MAX_METAMODEL_VERSION: string

Highest supported Metamodel version: 8.15.0

Const SDK_VERSION

SDK_VERSION: string

Current SDK version: 4.42.0

Const testDataPathPrefix

testDataPathPrefix: "./data/"

Functions

asModelUnit

beginTransaction

  • Begin an explicit transaction for the given model.

    Rolling back the following actions are not possible:

    • Changes made to a structural unit.
    • Deleting a non-loaded unit.

    When rolling back a deleted element/unit, a new element/unit instance will be created with the same id. Be sure not to use the old - deleted - instance.

    Parameters

    Returns Transaction

checkInsertionIndex

  • checkInsertionIndex(index: number, property: AbstractProperty<any[], any>): void

checkMutator

checkUpdateOrRemovalIndex

  • checkUpdateOrRemovalIndex(index: number, property: AbstractProperty<any[], any>): void

contains

createElementFromJSON

  • Creates a new element instance from JSON. All element IDs are replaced by new ones. After creation, the element can be attached to a container. Optionally populate the given map from original to new IDs.

    Parameters

    Returns Element

createInVersionCheck

createModelUnitFromJSON

  • Creates a new model unit from JSON and attaches it to the provided container unit. All element IDs are replaced by new ones.

    Parameters

    Returns ModelUnit

findElement

getAuthInfo

getContainmentInfo

getElement

getElementNotFoundError

  • getElementNotFoundError(unit: ModelUnit, elementId: string): Error
  • Parameters

    Returns Error

getProperty

getUnit

instantiateChildElement

isAtLeast

  • Parameters

    Returns boolean

isListProperty

isNamedElement

parseAsNormalizedVersion

  • parseAsNormalizedVersion(versionString: string): Version
  • Parses the given string as a sem-Version, ignoring non-numeric and "extra" data, and padding with ".0" where necessary.

    Parameters

    • versionString: string

    Returns Version

promiseOrCallbacks

  • promiseOrCallbacks<T>(action: function, callback: ICallback<T> | undefined, errorCallback: IErrorCallback | undefined): Promise<T> | void
  • Type parameters

    • T

    Parameters

    • action: function
        • (resolve: function, reject: function): void
        • Parameters

          • resolve: function
              • (result?: T): void
              • Parameters

                • Optional result: T

                Returns void

          • reject: function
              • (err: any): void
              • Parameters

                • err: any

                Returns void

          Returns void

    • callback: ICallback<T> | undefined
    • errorCallback: IErrorCallback | undefined

    Returns Promise<T> | void

rawList

rawValue

readJson

  • readJson<T>(fileName: string): T
  • Reads the file with the given name relative to 'mendixmodelsdk', and parses and returns it as JSON.

    Type parameters

    • T

    Parameters

    • fileName: string

    Returns T

removeUselessDeltas

  • removeUselessDeltas(deltas: Delta[]): Delta[]
  • Parameters

    • deltas: Delta[]

    Returns Delta[]

runInTransaction

  • Run the specified action inside a transaction for the given model. The transaction will be committed when the action is finished. In case of an error the transaction will be rolled back.

    Rolling back the following actions are not possible:

    • Changes made to a structural unit.
    • Deleting a non-loaded unit.

    When rolling back a deleted element/unit, a new element/unit instance will be created with the same id. Be sure not to use the old - deleted - instance.

    Type parameters

    • T

    Parameters

    Returns T

  • Type parameters

    • T

    Parameters

    • model: IAbstractModel
    • action: function
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>

  • Type parameters

    • T

    Parameters

    Returns T

  • Type parameters

    • T

    Parameters

    Returns Promise<T>

sendListChangeDeltas

  • sendListChangeDeltas<T, P>(property: AbstractProperty<T[], IList<P>> | object, change: IArrayWillSplice<P> | IArrayWillChange<P>): void
  • Type parameters

    • T

    • P

    Parameters

    Returns void

updateStructure

  • updateStructure(structure: Structure, isReverting: boolean, updateAction: function): void
  • Parameters

    • structure: Structure
    • isReverting: boolean
    • updateAction: function
        • (): void
        • Returns void

    Returns void

writeJson

  • writeJson(fileName: string, json: object): void
  • Writes the given JSON under the given file name into the test-output directory.

    Parameters

    • fileName: string
    • json: object

    Returns void

xTimes

  • xTimes(n: number): string
  • Parameters

    • n: number

    Returns string

    a string consisting of n times an 'x'.

Generated using TypeDoc