Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IModelApiClient

The IModelApiClient interface is used for forwarding calls to the underlying Mendix Model API. Implementations of this interface serve as fully-typed clients for the Model API Server. Default implementation: ModelApiClientImpl. Note that all its methods are asynchronous, with the last two arguments always being a (success) callback and an error callback, and we will only explain the "essential" arguments in their documentation.

Note: this interface is part of the internal API of the Model SDK.

DISCLAIMER: End-users of the SDK should never rely directly on elements of the internal API, e.g. by implementing interfaces or instantiating classes. Anything in this file can be removed, or change signature, even between patch-level SDK versions.

Hierarchy

  • IModelApiClient

Implemented by

Index

Methods

checkAccess

  • checkAccess(workingCopyId: string, memberOpenId: string, callback: ICallback<boolean>, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • memberOpenId: string
    • callback: ICallback<boolean>
    • errorCallback: IErrorCallback

    Returns any

createWorkingCopy

deleteFile

  • deleteFile(workingCopyId: string, filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Deletes the file with the specified filepath.

    Parameters

    • workingCopyId: string
    • filePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

deleteWorkingCopy

  • deleteWorkingCopy(workingCopyId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

deleteWorkingCopyByProject

  • deleteWorkingCopyByProject(projectId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Deletes the project-to-working copy mapping for given project ID.

    Parameters

    • projectId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

deploy

  • deploy(workingCopyId: string, forceFullDeployment: boolean, callback: ICallback<IDeploymentResult>, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • forceFullDeployment: boolean
    • callback: ICallback<IDeploymentResult>
    • errorCallback: IErrorCallback

    Returns any

exportMpk

  • exportMpk(workingCopyId: string, outFilePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • outFilePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

getDeploymentStatus

  • getDeploymentStatus(workingCopyId: string, callback: ICallback<IDeploymentResult>, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • callback: ICallback<IDeploymentResult>
    • errorCallback: IErrorCallback

    Returns any

getEditorData

  • getEditorData(callback: ICallback<IEditorData>, errorCallback: IErrorCallback): any
  • Returns UUIDs for helper working copies for each supported Mendix version.

    These are pre-defined working copies that are accessible for read operations, and contain units that might come in handy when creating pages from templates.

    Parameters

    • callback: ICallback<IEditorData>
    • errorCallback: IErrorCallback

    Returns any

getFile

  • getFile(workingCopyId: string, filePath: string, outFilePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Downloads the file specified by the supplied filepath.

    Parameters

    • workingCopyId: string
    • filePath: string
    • outFilePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

getFiles

  • getFiles(workingCopyId: string, options: IGetFilesOptions, callback: ICallback<string[]>, errorCallback: IErrorCallback): any
  • Returns an array of all filepaths in the working copy.

    Parameters

    • workingCopyId: string
    • options: IGetFilesOptions
    • callback: ICallback<string[]>
    • errorCallback: IErrorCallback

    Returns any

getMyWorkingCopies

  • getMyWorkingCopies(callback: ICallback<IWorkingCopy[]>, errorCallback: IErrorCallback): any
  • Parameters

    • callback: ICallback<IWorkingCopy[]>
    • errorCallback: IErrorCallback

    Returns any

getWorkingCopyByProject

  • getWorkingCopyByProject(projectId: any, callback: ICallback<string>, errorCallback: IErrorCallback): any
  • Retrieves the working copy id that the given project ID maps to.

    Parameters

    • projectId: any
    • callback: ICallback<string>
    • errorCallback: IErrorCallback

    Returns any

grantAccess

  • grantAccess(workingCopyId: string, memberOpenId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • memberOpenId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

grantAccessByProject

  • grantAccessByProject(projectId: string, memberOpenId: string, callback: ICallback<boolean>, errorCallback: IErrorCallback): any
  • Parameters

    • projectId: string
    • memberOpenId: string
    • callback: ICallback<boolean>
    • errorCallback: IErrorCallback

    Returns any

loadUnitById

  • loadUnitById<T>(workingCopyId: string, unitId: string, callback: ICallback<IAbstractUnitJson>, errorCallback: IErrorCallback): any
  • Retrieves a unit, as normalized model JSON, by working copy and unit ID.

    Type parameters

    Parameters

    • workingCopyId: string
    • unitId: string
    • callback: ICallback<IAbstractUnitJson>
    • errorCallback: IErrorCallback

    Returns any

loadUnitInterfaces

  • loadUnitInterfaces(workingCopyId: string, callback: ICallback<IAbstractUnitJson[]>, errorCallback: IErrorCallback): any
  • Loads all unit interfaces of the working copy indicated with workingCopyId as an array of normalized model JSON.

    Parameters

    • workingCopyId: string
    • callback: ICallback<IAbstractUnitJson[]>
    • errorCallback: IErrorCallback

    Returns any

loadWorkingCopyMetaData

  • loadWorkingCopyMetaData(workingCopyId: string, callback: ICallback<IWorkingCopy>, errorCallback: IErrorCallback): any
  • Retrieves the top-level working copy information/meta data for the working copy with given workingCopyId.

    Parameters

    • workingCopyId: string
    • callback: ICallback<IWorkingCopy>
    • errorCallback: IErrorCallback

    Returns any

lockWorkingCopy

  • lockWorkingCopy(workingCopyId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Lock the working copy (will be locked for the currently authenticated openid)

    Parameters

    • workingCopyId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

putFile

  • putFile(workingCopyId: string, inFilePath: string | Blob, filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Uploads the supplied file to the specified filepath.

    Parameters

    • workingCopyId: string
    • inFilePath: string | Blob
    • filePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

revokeAccess

  • revokeAccess(workingCopyId: string, memberOpenId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Parameters

    • workingCopyId: string
    • memberOpenId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

revokeAccessByProject

  • revokeAccessByProject(projectId: string, memberOpenId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Parameters

    • projectId: string
    • memberOpenId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

sendDeltas

  • sendDeltas(workingCopyId: string, deltas: IDelta[], callback: ICallback<Object>, errorCallback: IErrorCallback): any
  • Sends a sequence of deltas on the working copy with the given workingCopyId to the Model API Server; batched if more than one is passed, as a single delta otherwise.

    Parameters

    • workingCopyId: string
    • deltas: IDelta[]
    • callback: ICallback<Object>
    • errorCallback: IErrorCallback

    Returns any

unlockWorkingCopy

  • unlockWorkingCopy(workingCopyId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Unlock the working copy (will be unlocked for the currently authenticated openid, will fail if it's locked by another openid)

    Parameters

    • workingCopyId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

updateWorkingCopyByProject

  • updateWorkingCopyByProject(projectId: string, workingCopyId: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Update the project-to-working copy mapping with the given data.

    Parameters

    • projectId: string
    • workingCopyId: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

Generated using TypeDoc