This interface exposes a single Mendix Model. This interface contains the parts of the Model that are exposed through the SDK.
Working copy id of the current opened model (read only)
The Mendix meta model version related to the project.
The Mendix product version the model was created with/in. Note: this does not have to equal the meta model version.
The actual contents of the model.
The meta data of the model.
Adds the given module json to the project, which will make the module and its units read-only and unloadable.
Gives error if
Returns all units in the project, including modules, folders etc. To retrieve all "real" documents (pages, microflows etc.), use allDocuments().
Ends the connection with the Model API client. Flushes any pending deltas and invokes the callback once complete. If a callback is provided but no error callback is provided, errors will be handled through the default modelstore error handler.
Given a qualified name, returns a Module.
Get the deployment status of the working copy. Can be STAGING, STARTED, STARTING, UPDATING, STOPPED, FAILED_STAGING, FAILED, APP_NOT_FOUND, INVALID_PROJECTID, INVALID_OPENID, UNKNOWN_DEPLOYER, UNKNOWN_PROJECT, UNKNOWN_ACCOUNT, BUSY_PROVISIONIN, UNLINKED, NO_WEBMODELER_TARGET_SELECTED. Contains other deployment info as well.
Retrieves App Job by jobId. See also
In the response the most important field is status.
Polling for job status should stop once it has reeached "started" | "failed" | "consistencyerrors". Jobs will be cleaned up 10 minutes after the have reached one of this states.
Downloads the file specified by the supplied filepath. If filePath is empty, the raw response body will be provided in the callback
Returns all files or a subset of files options.filter: glob pattern to limit the set of files options.format: "json" or "zip" options.path: useful if format is "zip". If provided the zip will be stored on disk
Imports the given module MPK.
Importing a module overwrites existing files in the project.
Gives error if
Given an id, fetches a complete unit. The result might be returned from the cache. Use this method if you have just a unit Id, otherwise, unit.fetch() is a simpler alternative.
Sets the callback that is invoked when an error occurs in an asynchronous operation for which no error callback is specified.
Examples of such operations are making changes to the model and loading elements.
Start async deploy flow, creates new app job and returns it. This call immediately returns after successfully initiating the deployment job, and it's progress can be tracked using `getAppUpdateStates.
A start update packs the mpk and sends it to the cloud environment to update the application, a new application will be provisioned if needed.
The update job will always converge to a stable state (one of "started" | "failed" | "consistencyerrors"). Use the returned job id to poll for this.
Generated using TypeDoc