Skip to content

JavaScript APIs (TypeScript definitions)

Eric Domke edited this page May 23, 2023 · 15 revisions
interface Window {
  aras: arasObj
  ArasModules : arasModules
  Aras : {
    IOM : {
      UrlType : {
        none:0
        securityToken:1
      }
    }
  }
  ArasCore : {
    Dialogs : {
      about()
      createNewPackage(arrayOfPackage)
      multiLingual(e : Array, t? : {})
      /**
       * Display the properties dialog
       * @param item Item node
       * @param itemType ItemType node
       * @param options options object. For example, {aras: this.aras}
       */
      properties(item : Element, itemType : Element, options? : {
        aras? : arasObj
        title? : string
      })
      selectPackageDefinition(arrayOfPackage)
    }
    searchConverter : {
      simpleToAml(criteria, propName, type)
    }
    user : {
      authenticationType : string
      database : string
      errorHandlers : {
        passwordExpired(faultObj, args)
      }
      id : string
      login()
      loginName : string
      type: string
      validate(serverUrl, timezoneName)
    }
  }
}

interface TopWindow extends Window {
  arasTabs : headerTabs
  favorites : FavoriteManager
  main : Window
  store : Redux
}

interface Redux {
  boundActionCreators : ReduxBoundActions
  /**
   * Returns the current state tree of your application. It is equal to the last value returned by the store's reducer.
   * @returns The current state tree of your application.
   */
  getState() : ReduxState
  /**
   * Adds a change listener. It will be called any time an action is dispatched, and some part of the state tree may 
   * potentially have changed. You may then call `getState()` to read the current state tree inside the callback.
   * @param listener The callback to be invoked any time an action has been dispatched, and the state tree might have 
   * changed. You may call getState() inside this callback to read the current state tree. It is reasonable to expect 
   * that the store's reducer is a pure function, so you may compare references to some deep path in the state tree to 
   * learn whether its value has changed.
   */
  subscribe(listener : () => void): () => void
}

interface ReduxBoundActions {
  changeItem(type: string, id : string, options: Record<string, any>) : void
  createItemLocalChangesRecord(type: string, id : string) : void
  deleteItemLocalChangesRecord(type: string, id : string) : void
  resetItemLocalChangesRecord(type: string, id : string) : void
  updateLayoutData(layoutId : any, data : any) : void
  removeLayout(layoutId : any) : void
}

interface ReduxState {
  layout: any,
  localChanges : any
}

type ItemCommands = "edit"|"unlock"|"save"|"done"|"refresh";

enum ExecuteUserCommandHandlerOptions {
  Default = 0,
  EvalWinHandler = 1
}

interface ItemWindow extends Window {
  item : Element
  onRefresh() : void
  /**
   * Show the revisions window
   */
  onRevisionsCommand() : void
  registerCommandEventHandler(handlerOwnerWindow : window
    , handlerF : () => string | void
    , BeforeOrAfter : "before"|"after"
    , commandName : ItemCommands
    , options? : ExecuteUserCommandHandlerOptions) : string | void
  unregisterCommandEventHandler(key: string) : void
  executeUserCommandHandler(hId : string) : string
}

interface RelationshipWindow extends Window {
  RelType_ID : string
  RelType_Lbl : string
  RelType_Nd : Element
  RelType_Nm : string
  newRelationship(showSearchDialog : boolean, relatedNode : Element, relationshipCallback : (relationshipNode : Element) => void, relatedOption : "pick"|"create"|"norelated") : void
  /**
   * Preload items
   * @param type The item type name
   * @param resArray Array of IDs
   */
  preloadItems(type : string, resArray : string[]) : Element[]
}

interface SearchWindow extends Window {
  currentSearchMode : SearchMode
  searchContainer : SearchContainer
}

interface Document {
  createNode(nodeType, name : string, namespaceUrl : string) : Element
  loadXML(xmlString : string) : boolean
  loadUrl(filename : string) : void
  selectSingleNode(xPath : string) : Node
  selectNodes(xPath : string) : Node[]
  transformNode(xmlDoc : Document) : string
}

interface Element {
  selectSingleNode(xPath : string) : Node
  selectNodes(xPath : string) : Node[]
  transformNode(xmlDoc : Document) : string
}

interface arasAccordion {
  appendChild(child : HTMLElement) : HTMLElement
  removeChild(child : HTMLElement) : HTMLElement
  /**
   * Collapse the accordion
   */
  collapse() : Promise
  /**
   * Expand the accordion
   */
  expand() : Promise
  toggle(collapsed : boolean) : Promise
}

interface headerTabs extends tabs {
  addTab(id : string, options : tabData)
  clickOpenInTearOff(id : string) : Promise
  closeOtherTabs(excludedTabId : string) : Promise
  closeTabs(tabs : Array) : Promise
  ejectTab(id : string)
  dropdownTabRender()
  focusTab(id : string)
  forceCloseAllTabs()
  getSearchGridTabs(id)
  open(src, winName, isUnfocused, className)
  openForm(formId : string, icon : string, label : string)
  openNonItemWindow(win : {
    itemId : string
    itemTypeName : string
    windowType : "whereUsed"|"structureBrowser"
  }, id : string)
  openPage(url : string, itemTypeId : string, icon : string, label : string)
  /**
   * Open a new search tab
   * @param itemtypeID ItemType ID
   * @param favoriteSearchId Favorite ID referencing the saved search
   * @returns Content window of the new IFRAME
   */
  openSearch(itemtypeID : string, favoriteSearchId? : string)
  removeTab(id : string, ignorePageCloseHooks = false)
  render()
  selectTab(id : string, preventFocus : boolean) : Promise
  setTitleTabWithFrame(frameWindow)
  updateTabInformation(currentID, newID)
  updateTitleTab(id : string, props : {
    label?: string,
    image?: string
  }) : Promise
}

/** Implemented by  */
interface tabs {
  /** Tab information by ID */
  data: Map<string, tabData>
  /** List of IDs */
  tabs: string[]
  draggableTabs: boolean
  initialized: boolean
  useTooltip: boolean
  static readonly booleanAttributes: string[]

  addTab(id : string, props : tabData) : Promise<any>
  connectKeyboard(): void
  makeDraggable() : void
  makeScroll() : void
  makeSelectable() : void
  removeTab(id: string) : Promise<any>
  render() : Promise<any>
  scrollIntoView(id: string) : void
  selectTab(id : string) : Promise<boolean>
  setTabContent(id: string, props: tabData): Promise<any>
}

interface tabData {
  image? : string
  label? : string
  closable? : boolean
  draggable? : boolean
  hidden?: boolean
  [key: string] : any
}

/************** ARAS FORM *****************/
interface ItemFormWindow extends Window {
  document : ItemFormDocument
  handleItemChange(propNm : string, propVal : string | Element, dataType? : string, datePattern? : string) : void
  getFieldComponentByName(name : string) : Field
  getFieldComponentById(id : string) : Field
}

interface Field {
  component : ArasFormComponent
  dom: Element
  on(event : string, callback)
  setValue(value : string) : void
  getValue() : string
  setDisabled(bool : boolean) : void
  setReadOnly(bool : boolean) : void
}

interface ItemFormDocument extends Document {
  item : Element
  thisItem : Aras.IOM.Item
}

interface ItemProperty extends FilterList {
  state : ItemPropertyState
  setState(next : ItemPropertyState) : void
  request() : Promise<Element | string>
}

interface ItemPropertyState extends BaseTypeaheadState {
  /** The name of the item type */
  itemType? : string
  /** The maximum number of items to search the database for */
  maxItemsCount?: number
}

/** 
 * @description Located in the file `Modules\components\filterList.js`
 * More information on [the blog](https://community.aras.com/b/english/posts/tech-tip-dynamically-change-type-ahead-english?CommentId=e6b66db6-81bb-4dbc-97e8-9c12c434554b)
 */
interface FilterList extends BaseTypeahead {
  validate() : boolean
  inputValidate() : boolean
}

interface BaseTypeahead {
  state : BaseTypeaheadState
  setState(next : BaseTypeaheadState) : void
  getTemplate() : Template
  component() : any
  setFocus() : void
  render() : Promise<any>
}

interface BaseTypeaheadState {
  /** The list of values to search */
  list?: {
    label : string,
    value: string
  }[]
  /** The text that was typed in */
  label?: string
  /** Whether the TypeAdead is visible */
  shown?: boolean
  width?: "auto" | number
  validation?: boolean
}

interface ArasFormComponent {
  state : ArasFormComponentState
  setState(next : ArasFormComponentState) : void
}

interface ArasFormComponentState {
  value?: string
  disabled?: boolean
  readonly?: boolean
}

interface Template {
  tag : string,
  attrs?: Record<string, string>
  className?: string,
  children?: Template[],
  style?: Record<string, any>
}

/************** END ARAS FORM *****************/

type FavoriteCategory = "Item"|"Search"|"Enterprise Search"|"Graph View"|"ItemType"|"Tree Grid View"

interface Favorite {
  additional_data : FavoriteAdditionalData
  category : FavoriteCategory
  contextType : string
  id: string
  label : string
  ownedBy : string
  quickAccessFlag : "0"|"1"
}

interface FavoriteManager {
  add(category : FavoriteCategory, favoriteData : {
    contextType : string
    label : string
    additionalData : FavoriteAdditionalData
    mustViewById? : string
    quickAccess : "0"|"1"
  }) : Promise<Favorite>
  delete(favoriteId : string) : Promise<boolean>
  removeFromQuickAccess(favoriteId : string) : Promise<Favorite>
  get(favoriteId : string) : Favorite
  getDataMap(favoriteCategory : FavoriteCategory, filterCriteria : (favorite : Favorite) => boolean = null) : Map<string, Favorite>
}

type FavoriteAdditionalData = ItemFavoriteData | SearchFavoriteData

interface ItemFavoriteData {
  /** config_id */
  id : string
  [key : string] : any
}

interface SearchFavoriteData {
  id : string
  location : string
  search_mode : string
  [key : string] : any
}

interface checkItemCallback {
  /**
   * @param itemNode the item
   * @param reqName the name of the required property
   * @param propLabel the label of the required property
   * @param defVal the default value of the property
   * @returns `true` for success, `false` for failure with a failure message
   */
  (itemNode : Element, reqName : string, propLabel : string, defVal : string): {
    result : boolean
    message? : string
  }
}

/**
 * Mission of the SearchContainer class is to simplify adding search mechanism to any page in the Innovator.
 * To use search at the page, a new instance of the class must be created.
 * Class operates by Aras.Client.JS.SearchMode objects.
 * @example <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 * <html>
 * <head>
 *   <title></title>
 *   <link rel="stylesheet" type="text/css" href="../styles/default.css" />
 * 
 *   <script type="text/javascript" src="../javascript/include.aspx?classes=ScriptSet6"></script>
 * 
 * </head>
 * <body>
 * 
 *   <script type="text/javascript">
 *     onload = function onload_handler()
 *     {
 *       searchContainer = new SearchContainer(itemTypeName, grid, "My Search Location", searchPlaceholder);
 *       searchContainer.initSearchModesInToolbar();
 *       searchContainer.initSavedSearchesInToolbar();
 *       searchContainer.showAutoSavedSearchMode();
 *     }
 *   </script>
 * 
 *   <table id="main_table" border="0" style="width: 100%; height: 100%; table-layout: fixed;"
 *     cellspacing="0" cellpadding="0">
 *     <tr style="height: 28px;">
 *       <td>
 *         <object id="toolbar">
 *         </object>
 *       </td>
 *     </tr>
 *     <tr id="searchPlaceholder" style="display: none; height: 0px;">
 *     </tr>
 *     <!-- IE has bug not allowing to set rows height in % when standards turned on. //
 *     tr_IE_fix_bug_with_height - special style from styles\default.css that helps to
 *     solve this problem.
 *     -->
 *     <tr class="tr_IE_fix_bug_with_height">
 *       <td>
 *         <object id="grid">
 *         </object>
 *       </td>
 *     </tr>
 *   </table>
 * </body>
 * </html>
 */
interface SearchContainer
{
  /**
   * 
   * @param itemTypeName Name of the ItemType which items you want to search for.
   * @param gridInfo Grid to display search results. Also can be used by search mode for generating query (like "Simple" search mode do).
	 * Instance of the Aras.Client.Controls.GridContainer. Must be loaded before passing into SearchContainer.
   * @param menuInfo Menu to operate by search.
	 * Instance of the Aras.Client.Controls.MainMenu. Must be loaded before passing into SearchContainer.
   * @param searchLocation Name of the place where search will be used.
	 * This parameter has sence because search behaviour can be different in different search locations.
	 * See "SearchLocations" list for all possible search location values.
   * @param searchPlaceholder Object at the page which will contain search modes.
   * @param requiredProperties Name:Value collection of properties that must be applied to every quiery.
   * @param searchToolbar Toolbar that will be used to operate by search.
	 * Instance of the Aras.Client.Controls.Toolbar. Must be loaded before passing into SearchContainer.
   */
  constructor(itemTypeName : string,
    gridInfo,
    menuInfo,
    searchLocation : string,
    searchPlaceholder : object,
    requiredProperties : Record<string, any>,
    searchToolbar)
  defaultSearchMode : string
  forceAutoSearch : boolean
  /**
   * Gets grid object used to display search results.
   * @returns TreeTable instance used by search.
   */
  getGrid() : Aras.Client.Controls.GridContainer
  /**
   * Gets menu object containing search control objects.
   * @returns MainMenu instance used by search.
   */
  getMenu() : Aras.Client.Controls.MainMenu
  getPolyItem()
  /**
   * @summary Gets definition for property corresponding to column in the grid with specified index.
   * @param columnIdx - Index of the column in grid.
   * @returns XmlNode containing property info.
   * @description Some SearchModes could use information from grid as source data for search query generation.
   * And in some cases it will be required to know what property corresponds to the column.
   */
  getPropertyDefinitionByColumnIndex(columnIdx : number) : Element
  /**
   * @summary Gets XPath to property corresponding to the column in the grid with specified index.
   * @param columnIdx - Index of the column in grid.
   * @returns XPath to the property in grid; returns undefined in case when there are no grid or columnIdx not specified.
   * @description Some SearchModes could use information from grid as source data for search query generation.
   * For example "Simple" search mode works in such way.
   * This method allows to get explicitly path to criteria in search criteria dom.
   */
  getPropertyXPathByColumnIndex(columnIdx : number) : string
  /**
   * Gets requiredProperties object for SearchContainer.
   * @returns Object representing key/value collection of XPath to properties and values.
   */
  getRequiredProperties() : Object
  /**
   * Retrieves the value of the specified Style attribute of the SearchContainer.
   * @param strAttributeName - Name of the attribute.
   * @returns Variant that returns a String, number, or Boolean value as defined by the attribute.
   * If the attribute is not present, this method returns null.
   */
  getStyleAttribute(strAttributeName)
  getVisibleXProps(currItemTypeId)
  /**
   * Initialize search container.
   * @param ignoreAutoSavedSearch - Flag for ignoring autoSavedSearch criterias and searchMode.
   */
  initSearchContainer(ignoreAutoSavedSearch)
  isFavoriteSearchChanged()
  /**
   * This method have sense in case when you work with more than one SearchContainer.
   * Method resets Search menu and removes handlers from controls for currently selected SearchContainer instance.
   */
  onEndSearchContainer()
  /**
   * @summary This method have sense in case when you work with more than one SearchContainer. If you switch between them you may need to reinitilize controls.
   * Method reinitializes Search menu and forces controls to work with currently selected SearchContainer instance.
   * @description You don't need to call this method if constructor of the SearchContainer is called.
   */
  onStartSearchContainer()
  /**
   * Determines if search should be started automatically. And if should starts the search.
   */
  runAutoSearch()
  /**
   * @summary This method have sense in case when you work with more than one SearchContainer. If you switch between them you may need to reinitilize controls.
   * Method reinitializes Search menu and forces controls to work with currently selected SearchContainer instance.
   * @description You don't need to call this method if constructor of the SearchContainer is called.
   */
  runSearch()
  /**
   * @summary Sets requiredProperties object for SearchContainer.
   * @param requiredPropertiesObject - Object representing key/value collection of XPath to properties and values.
   * @description In some cases SearchMode must return query containing immutable properties/values.
   * This method allows user to specify such immutable criterias.
   * @example var reqProperties = new Object();
   * reqProperties["source_id/Item[@type='MySourceItem']/name"] = 'my_item_name';
   * reqProperties["related_id/Item[@type='MyRelatedItem']/label"] = 'related_item_label';
   * searchContainer.setRequiredProperties(reqProperties);
   * // In this case SearchMode.getAml() method will always return query containing next aml:
   * // ....
   * // <source_id>
   * //  <Item type='MySourceItem'>
   * //    <name>my_item_name</name>
   * //  </Item>
   * // </source_id>
   * // <related_id>
   * //  <Item type='MyRelatedItem'>
   * //    <label>related_item_label</label>
   * //  </Item>
   * // </related_id>
   * // ....
   */
  setRequiredProperties(requiredPropertiesObject : Record<string, any>)
  /**
   * @summary Sets the value of the specified CSS attribute on the DOM element associated with .
   * @param strAttributeName - Name of the attribute.
   * @param attributeValue - Variant that specifies the string, number, or Boolean to assign to the attribute.
   * @description Can be used to set height, visibility, etc. attributes.
   */
  setStyleAttribute(strAttributeName : string, attributeValue : any)
  /**
   * @summary Shows SearchMode in SearchContainer.
   * @param searchModeId - Id of search mode to show.
   * @description Method loads SearchMode into SearchContainer and initialize it with current search criteria.
   */
  showSearchMode(searchModeId : string)
  toggleSearchPlaceholderVisibility(isHidden : boolean)
}

/**
 * @summary This class provides interface and some basic functionality to create search modes.
 * To create your own search mode inherit from SearchMode class and implement required UI.
 * @description Innovator client sends AML requests to server to get data.
 * End users may not know about AML. They'd like to use some user friendly UI.
 *
 * # Important
 * The only purpose of any Search Mode is build AML query.
 * That also provides some UI to do this.
 * It is important to understand that Search Mode doesn't send the built AML query to server.
 * @example
 * function MySearchMode()
 * {
 * }
 * MySearchMode.prototype = new SearchMode();
 *
 * //your own onStartSearchMode implementation
 * MySearchMode.prototype.onStartSearchMode = function MySearchMode_onStartSearchMode(sContainer)
 * {
 *   // Call base onStartSearchMode method.
 *   SearchMode.prototype.onStartSearchMode.call(this, sContainer);
 *
 *   if (this.toolbar && this.toolbar.IsButtonVisible("add_criteria"))
 *     toolbar.HideItem("add_criteria");
 * }
 *
 * //...
 *
 * searchMode = new MySearchMode();// this is obligatory line. searchMode is predefined global variable.
 */
interface SearchMode {
  /**
   * @param searchContainer Instance of Aras.Client.JS.SearchContainer class.
   * @param aras Aras object
   */
  constructor(searchContainer : SearchContainer, aras : arasObj)
  /**
   * @summary Removes all criterias from current query item.
   * @description Removes all items criterias and where attribute. Value for select attribute will be reset to default.Required property values will be applied to query.
   */
  clearSearchCriteria()
  /**
   * Gets AML generated by search mode.
   * @returns AML built by Search Mode.
   */
  getAml() : string
  /**
   * @summary Gets item from cache for current search mode.
   * @param key - Key for access to cache item.
   * @returns Value of the cache item.
   * @description Cache using for storage itemmax and pagemax values.
   */
  getCacheItem(key : string) : any
  /**
   * Gets maxRecords attribute for current query item.
   * @returns Current maxRecords set in criteria. -1 will be returned if nothing specified.
   */
  getMaxRecords() : number
  /**
   * Gets order_by attribute for current query item.
   * @returns Value of the order_by attribute.
   */
  getOrderBy() : string
  /**
   * Gets page attribute for current query item.
   * @returns Current page set in criteria. -1 will be returned if nothing specified.
   */
  getPageNumber() : number
  /**
   * Gets pagesize attribute for current query item.
   * @returns Current pagesize set in criteria. -1 will be returned if nothing specified.
   */
  getPageSize() : number
  /**
   * @summary Gets select attribute for current query item.
   * @returns Value of the select attribute.
   * @description Select attribute contains list of item properties to select.
   */
  getSelect() : string
  /** contains true when validation succeeded and false when failed. */
  isValidAML : boolean
  /**
   * @summary Method called on SearchContainer dispose or when SearchContainer hides current search mode and shows another.
   * @description The purpose of this method is to perform some actions on SearchMode remove/dispose.
   */
  onEndSearchMode()
  /**
   * @summary Method called when the search mode loaded into SearchContainer.
   * @description Can be used to perform search mode UI initialization.
   */
  onStartSearchMode()
  /**
   * Delete item from cache for current search mode.
   * @param key - Key for access to cache item.
   */
  removeCacheItem(key : string)
  /**
   * Initializes search mode with AML.
   * @param searchAML - AML to initialize search mode.
   */
  setAml(searchAML : string)
  /**
   * Sets item to cache for current search mode.
   * @param key - Key for access to cache item.
   * @param value - Value of cache item.
   */
  setCacheItem(key : string, value : any)
  /**
   * @summary Sets maxRecords attribute for current query item.
   * @param maxRecords - The maximum number of items to retrieve.
   * @returns true if maxRecords was successfully set; false otherwise.
   * @description Value should be a positive integer.
   */
  setMaxRecords(maxRecords : number) : boolean
  /**
   * @summary Sets order_by attribute for current query item.
   * @param orderBy - You can sort query results by one or more of the properties in the returned items by using an order_by attribute.
   * @description Supports the keywords ASC (ascending) and DESC (descending).
   */
  setOrderBy(orderBy : string)
  /**
   * @summary Sets page attribute for current query item.
   * @param page - Will have affect only if page size specified.
   * @returns true if page was successfully set; false otherwise.
   * @description Value should be a positive integer. In couple with page size allows arbitrary item selections.
   */
  setPageNumber(page : number) : boolean
  /**
   * @summary Sets pagesize attribute for current query item.
   * @param pageSize - Number of items per page to select.
   * @returns true if page size was successfully set; false otherwise.
   * @description Value should be a positive integer.
   */
  setPageSize(pageSize : number) : boolean
  /**
   * Sets returnMode attribute for current query item.
   * @param returnMode - The value is considered to be a hint to the server to identify type of returned data.
   */
  setReturnMode(returnMode : string)
  /**
   * Sets select attribute for current query item.
   * @param selectAttr - List of properties names divided by comma.
   */
  setSelect(selectAttr : string)
  /** contains true when search mode supports xClass search */
  supportXClassSearch : boolean
  /**
   * @summary Tests AML for compatibility with current search mode.
   * @param searchAml - AML to test for compatibility.
   * @returns true if AML is compatible with current search mode, otherwise false.
   * @description Compatibility means that AML can be successfully parsed and displayed by search mode.
   */
  testAmlForCompatibility(searchAml : string) : boolean
  xClassSearchCriteriaXPath : string
}

interface Vault {
  /**
   * Add the specified file URL to the fileList.
   */
  addFileToList(fileID : string, filename : string) : boolean
  /**
   * Clear all userdata values.
   */
  clearClientData() : void
  /**
   * Clears fileList.
   */
  clearFileList()
  /**
   * Download file from fileUrl to working directory with specified credentials and post data.
   * To use this method call .
   * @param strUrl - Url to download file from.
   * @returns `true` if file downloaded successfully, `false` otherwise.
   */
  downloadFile(strUrl : string) : boolean
  /**
   * Gets userdata (form fields) for uploading.
   */
  getClientData(name : string) : string
  /**
   * Gets checksum of the current file.
   */
  getFileChecksum(fileName : string | File) : string
  /**
   * Gets the size of the current file.
   */
  getFileSize(fileName : string | File) : number
  /**
   * Get the error message from the last operation.
   */
  getLastError() : string
  /**
   * Returns the Response property, which is set with the server response data from the upload() method call.
   */
  getResponse() : string
  /**
   * Reads the string of base64 encoding bytes from the offset position to the offset + count of the stream.
   * @param offset - start position
   * @param count - count of bytes
   * @returns Specified count of base64 encoded bytes from specified offset
   */
  readBase64(path, offset : int, count : int) : Promise<string>
  /**
   * Reads the stream from the current position to the end of the stream.
   * @param encoding - Parameter for System.Text.Encoding.GetEncoding method. "UTF-8" is default.
   * @returns The rest of the stream as a string, from the current position to the end.
   * If the current position is at the end of the stream, returns the empty string("").
   */
  readText(path, encoding : string) : string
  /**
   * Displays a file selection dialog box that allows the user to browse the local file system and select a file.
   * The WorkingDir property for the applet is also set if the user browses to a directory.
   * The working directory for the dialog box is initialized to the working directory for the applet.
   * @returns Returns the Promise object which will be resolved with selected file if user selects file.
   */
  selectFile() : Promise<File>
  /**
   * Send files from clientData to specified url.
   */
  sendFiles(serverUrl : string) : boolean
  /**
   * Send files from clientData to specified url in asynchronous mode
   */
  sendFilesAsync(serverUrl : string) : Promise<any>
  /**
   * Set userdata (form fields) for uploading.
   * Mode: upload.
   */
  setClientData(name : string, value_Renamed : string) : void
  /**
   * Sets local file name.
   */
  setLocalFileName(filename : string) : void
}

type arasGlobalEvent = 'VariableChanged'|'ItemLock'|'ItemSave'|'PreferenceValueChanged'

interface arasModules {
  Dialog : Dialog,
  MaximazableDialog : Dialog,
  copyTextToBuffer(text : string, container? : HTMLElement | Window) : void
  soap(data : string | Element, options : {
    async? : boolean
    method? : string
    headers? : Record<string, string>
    url?: string
    soapConfig? : object
    SOAPAction? : string
    [key : string] : any
  }) : Promise<Element | string>
}

type DialogType = "DefaultModal"|"DefaultPopup"

interface DialogOptions {
  dialogWidth?: number | string
  dialogHeight?: number | string
  center?: boolean
  dialogTop?: number
  top?: number
  dialogLeft?: number
  left?: number
  resizable?: boolean
  status?: boolean
  scroll?: boolean
  help?: boolean
}

interface DialogArgs {
  title?: string
  classList?: string
  content?: string
  dialogWidth?: number
  dialogHeight?: number
  type?: "WhereUsed"|"SearchDialog"|"ImageBrowser"|"Date"|"HTMLEditorDialog"|"RevisionsDialog"|"ManageFileProperty"|"Text"|"Color"
  [key: string] : any
}

interface SearchDialogArgs extends DialogArgs {
  itemtypeName?: string
  itemtypeID?: string
  handler: (res : { itemID?: string }) => boolean
  sourceItemTypeName?: string
  sourcePropertyName?: string
  multiselect?: boolean
}

interface ConfirmDialogArgs {
  additionalButton?: {
    actionName?: string,
    /** CSS class for the button */
    buttonModifier?: string,
    text?: string
  }[],
  /** CSS class for the button */
  cancelButtonModifier?: string,
  /** CSS class for the button */
  okButtonModifier?: string,
  /** Text for the button */
  okButtonText?: string,
  /** Title for the dialog */
  title?: string
}

interface AlertDialogArgs {
  customization? : {
    data? : Aras.IOM.Item | SOAPResults
    technicalMessage?: string
    stackTrace?: string
    title?: string
    img?: string
  }
  type?: "warning"|"error"|"success"|"soap"|"stack"|"iom"
}

interface Dialog {
  static alert(message = '', options: AlertDialogArgs = {}) : Promise<string>
  static confirm(message = '', options: ConfirmDialogArgs = {}) : Promise<string>
  static show(type : "iframe", args? : DialogArgs) : Dialog
  promise : Promise<any>
  dialogNode : Element
  contentNode : Element
  result : any
  returnValue : any
  type : string

  new (type : string, args? : DialogArgs) : Dialog
  makeMove() : void
  makeClose() : void
  makeAutoresize() : void
  show() : void
  hide() : void
  close(data? : any) : void
  move(left: number, top: number) : void
  setTitle(title : string) : void
  resizeContent(width : number, height: number) : void
  resize(width : number, height: number) : void
}

interface ModalDialogHelper {
  show(type : DialogType
    , aWindow : Window
    , params : DialogArgs
    , options : DialogOptions
    , file : string
    , callbacks : {
      oncancel?: (dialog : Dialog) => void
      onload?: (dialog : Dialog) => void
    }) : void
}

interface Utils {
  /**
   * Set content, thats stored in clipboard
   */
  setClipboardData(dataType : string, value : string, aWindow : Window = window) : void
  /**
   * Returns html content, thats stored in clipboard
   */
  getClipboardData(dataType? = "Text") : object
  /**
   * Checks if clipboard operations are supported
   */
  isClipboardSupported() : boolean  
  /**
   * Creates instance of XmlHttpRequestManager
   */
  createXmlHttpRequestManager() : XmlHttpRequestManager
  /**
   * Stops hooking the mouse hit in the window.
   * @param window DHTML window object
   * @param name Name of the HTML object for which to stop hooking
   */
  stopHookingMouseInputInScript(window : Window, name : string) : void
  /**
   * Starts hooking the mouse hit in the window.
   * @param doHide flag to hide/unhide
   * @param window DHTML window object
   * @param name Name of the HTML object for which to start hooking
   * @param checkFunctionInScript Script function object
   */
  startHookingMouseInputInScript(doHide : boolean, window : Window, name : string, checkFunctionInScript : object) : void
}

interface SoapController {
  isInvalid : boolean
	callback : () => void
  stop : () => void
  markInvalid() : void
}

class SOAP {
  /**
   * send xml to InovatorServer and return result.
   * @param methodName - string with Innovator Server method name (ApplyItem, GetItem, ...)
   * @param bodyStr - xml string to send
   * @param url - url of Innovator Server (by default url is built from this.parent.baseURL)
   * @param saveChanges 
   * @param soapController - an instance of SoapController
   */
  send(methodName : string, bodyStr : string, url? : string, saveChanges? : any, soapController? : SoapController) : SOAPResults
  static showExitExcuse(arasableObj : arasObj) : void
  static handleSessionTimeout(options : { message: string}) : Promise<any>
  getDateStamp() : string
}

interface CacheResponse {
  success : boolean
  message : string
  item : Element
}

/**
 * @summary "aras.vault" instance of the class can be used in custom JavaScript code.
 * Vault provides batch file uploading/downloading capabilities together with related
 * file manipulation routines.
 * @description It has user friendly interface, displays a progress bar during time consuming upload/download
 * process and has warning/error messages system to inform the user about any collisions.
 * User has a possibility to add/remove files to the batch list, rename files and folders,
 * cancel current job.
 * User may select files from both local and network-mapped folders, optionally including all
 * sub-folders.
 * Additionally, he can enter any valid network path and browse it in the file selection dialog.
 * 
 * File transfer works over http, SSL (https) with or without proxy. This is achieved
 * by using browser's native connection classes.
 * And the most attractive feature is the possibility to upload huge files (unlimited file size)
 * with no timeouts or memory leacks (known java bug).
 * We use all available network traffic, so the transfer will go as fast as your LAN/WAN allows.
 * You can submit your form data together with the file. It is usually required to send the state
 * information back to the server.
 * 
 * What else can I do with Vault applet that I can't with a usual FILE form input field?
 * - Well, you can control, filter and preprocess the file list that user has selected.
 * You can enable or disable to transfer some file types basing on your application logic,
 * and you can collect additional information related to those files.
 * And finally, you don't need to reload your page while you transferring the files.
 *
 * We use the standard "multipart/form-data" content encoding, so the applet is compatible
 * with any server-side uploading component.
 * The quality of the server-side component as well as the hard-drive performance
 * will also affect the resulting transfer rate.
 */
interface Vault {
  vault : fileSystemAccess,
  /**
   * Set userdata (form fields) for uploading.<br/>
	 * Mode: upload.
   */
  setClientData(name : string, value_Renamed : string) : void
  /**
   * Gets userdata (form fields) for uploading.
   */
  getClientData(name : string) : string
  /**
   * Displays a file selection dialog box that allows the user to browse the local file system and select a file.
	 * The WorkingDir property for the applet is also set if the user browses to a directory.
	 * The working directory for the dialog box is initialized to the working directory for the applet.
   * @returns Promise. Returns the Promise object which will be resolved with selected file if user selects file.
   */
  selectFile() : Promise<any>
  /**
   * Gets checksum of the current file.
   */
  getFileChecksum(fileName : string) : string
  /**
   * Add the specified file URL to the fileList.
   */
  addFileToList(fileID : string, filename : string) : boolean
  /**
   * Send files from clientData to specified url.
   */
  sendFiles(serverUrl: string) : boolean
  /**
   * Send files from clientData to specified url in asynchronous mode
   */
  sendFilesAsync(serverUrl: string) : Promise<any>
  /**
   * Returns the Response property, which is set with the server response data from the upload() method call.
   */
  getResponse() : string
  /**
   * Get the error message from the last operation.
   */
  getLastError() : string
  /**
   * Clear all userdata values.
   */
  clearClientData() : void
  /**
   * Clears fileList.
   */
  clearFileList() : void
  /**
   * Sets local file name.
   * @param filename 
   */
  setLocalFileName(filename : string)
  /**
   * Download file from fileUrl to working directory with specified credentials and post data. To use this method 
   * call SetLocalFileName()
   * @param strUrl Url to download file from.
   * @returns true if file downloaded successfully, false otherwise.
   */
  downloadFile(strUrl : string) : boolean
  /**
   * Gets the size of the current file.
   * @param fileName 
   */
  getFileSize(fileName : string) : number
  /**
   * Reads the stream from the current position to the end of the stream.
   * @param encoding Parameter for System.Text.Encoding.GetEncoding method. "UTF-8" is default.
   * @returns The rest of the stream as a string, from the current position to the end.
	 * If the current position is at the end of the stream, returns the empty string("").
   */
  readText(path : string, encoding : string) : string
  /**
   * Reads the string of base64 encoding bytes from the offset position to the offset + count of the stream.
   * @param offset start position
   * @param count count of bytes
   * @returns Specified count of base64 encoded bytes from specified offset
   */
  readBase64(path : string, offset : int, count : int) : string
}

interface fileSystemAccess {
  /**
   * Gets checksum of the current file.
   */
  getFileChecksum(file : string) : string
  /**
   * Gets the size of the current file.
   */
  getFileSize(file : string) : number
  /**
   * Send files from clientData to specified url.
   */
  sendFiles(serverUrl: string) : boolean
  /**
   * Send files from clientData to specified url in asynchronous mode
   */
  sendFilesAsync(serverUrl: string) : Promise<any>
  /**
   * Clear all userdata values.
   */
  clearClientData() : void
  /**
   * Add the specified file URL to the fileList.
   */
  addFileToList(fileID : string, filepath : string) : boolean
  removeFileFromList(fileId : string) : void
  /**
   * Displays a file selection dialog box that allows the user to browse the local file system and select a file.
	 * The WorkingDir property for the applet is also set if the user browses to a directory.
	 * The working directory for the dialog box is initialized to the working directory for the applet.
   * @returns Promise. Returns the Promise object which will be resolved with selected file if user selects file.
   */
  selectFile() : Promise<any>
  /**
   * Clears fileList.
   */
  clearFileList() : void
  /**
   * Set userdata (form fields) for uploading.<br/>
	 * Mode: upload.
   */
  setClientData(name : string, valueRenamed : string) : void
  /**
   * Gets userdata (form fields) for uploading.
   */
  getClientData(name : string) : string
  /**
   * Returns the Response property, which is set with the server response data from the upload() method call.
   */
  getResponse() : string
  /**
   * Sets local file name.
   */
  setLocalFileName(filename : string)
  /**
   * Download file from fileUrl to working directory with specified credentials and post data. To use this method 
   * call SetLocalFileName()
   * @param strUrl Url to download file from.
   * @returns true if file downloaded successfully, false otherwise.
   */
  downloadFile(strUrl : string) : boolean
  makeFileDownloadUrl(strUrl : string) : string
  calculateMd5(file : File) : string
  /**
   * Get the error message from the last operation.
   */
  getLastError() : string
  /**
   * Reads the stream from the current position to the end of the stream.
   * @param encoding Parameter for System.Text.Encoding.GetEncoding method. "UTF-8" is default.
   * @returns The rest of the stream as a string, from the current position to the end.
	 * If the current position is at the end of the stream, returns the empty string("").
   */
  readText(file : string, encoding : string) : string
  /**
   * Reads the string of base64 encoding bytes from the offset position to the offset + count of the stream.
   * @param offset start position
   * @param count count of bytes
   * @returns Specified count of base64 encoded bytes from specified offset
   */
  readBase64(file : string, offset : int, count : int) : string
}

interface arasObj {
  Enums : {
    CheckinManagerFlags: {
      None: 0
      UnlockAfterCheckin: 1
    }
    CheckoutManagerFlags: {
      None: 0
      UseTransactions: 1
    }
    SortType: {
      Ascending: 0
      Descending: 1
    }
    UrlType: {
      None: 0
      SecurityToken: 1
    }
  }
  IomInnovator : Aras.IOM.Innovator
  mainWindowName : string
  MetadataCache : MetadataCache
  modalDialogHelper : ModalDialogHelper
  OAuthClient : {
    authorizationHeaderName : string
    unauthorizedStatusCode : number

    getAuthorizationHeader() : Record<string, string>
    getToken()
    init(oauthClientId, baseClientUrl, oauthServerConfiguration)
    isLogged()
    login(options)
    logout(options)
    relogin(options)
  }
  utils : Utils
  vault : Vault
  windowsByName : Record<string, Window>

  /**
   * Method to activate the activity
   * @param activity the activity to be activated
   */
  activateActivity(activity)
  /**
   * Adds id to a list of ids which are being processed in async operation.
   * @param id item id 
   * @param operationDescription operation description.
   */
  addIdBeingProcessed(id : string, operationDescription : string)
  /**
   * Method to add an item
   * @param itemID the id for the item
   */
  addItem(itemID : string)
  /**
   * Adds item(s) to a package definition
   */
  addItemToPackageDef(strArrOfId : string[], itemTypeName : string): void
  addToCache(item)
  AlertAbout()
  AlertAboutSession()
  /**
   * @param errorMessage client-facing error message
   * @param technicalErrorMessage the technical error message
   * @param stackTrace the stack trace
   * @param options the object with settings
   */
  AlertError(errorMessage : string, technicalErrorMessage? : string, stackTrace? : string, options? : { window : Window }) : void
  AlertSuccess(msg : string, argwin? : Window)
  AlertWarning(msg : string)
  /**
   * Method to to apply the item style to teh grid cell
   * @param cell the grid cell object
   * @param style the style for the cell
   * @param setBg boolean to set the background for the cell
   */
  applyCellStyle(cell, style : Object, setBg : boolean)
  /**
   * Method to apply an item on the server side.
   * @param body the message body for the item
   */
  applyItem(body) : string
  /**
   * Method to invoke an action on an item on the server side.
   * @param action the the server action to be performed, which is the Innovator Method name
   * @param type the ItemType name
   * @param body the message body for the action
   */
  applyItemMethod(action : string, type : string, body : string)
  /**
   * Method to ApplyItem. Checking "do files exist in itemNd" is called before soap send. Returns xml node.
   * @param itemNd xml node to send in ApplyItem soap action. May contain items with type="File".
   * @param win item window
   * @param statusMsg message text to show in status bar. If empty then nothing is shown.
   * @param XPath2ReturnedNd xpath to select returned node. Default: aras.XPathResult('/Item')
   */
  applyItemWithFilesCheck(itemNd : Element, win : Window, statusMsg : string, XPath2ReturnedNd : string)
  /**
   * Method to ApplyItem. Checking "do files exist in itemNd" is called before soap send. Returns xml node.
   * @param itemNd xml node to send in ApplyItem soap action. May contain items with type="File".
   * @param win item window
   * @param statusMsg message text to show in status bar. If empty then nothing is shown.
   * @param XPath2ReturnedNd xpath to select returned node. Default: aras.XPathResult('/Item')
   */
  applyItemWithFilesCheckAsync(itemNd : Element, win : Window, statusMsg : string, XPath2ReturnedNd : string, isGridUpdate : boolean) : Promise
  /**
   * Method to invoke an Innovator Method on the server side.
   * @param action the server action to be performed
   * @param body the message body for the action
   */
  applyMethod(action : string, body : string)
  applySortOrder(relationshipsArray)
  /**
   * Method to transform a dom using the XSLT style sheet passed as a URL.
   */
  applyXsltFile(domObj : Document, xslFile : string)
  /**
   * Method to transform a dom using the XSLT style sheet passed as string.
   */
  applyXsltString(domObj : Document, xslStr : string) : string
  areClassPathsEqual(class_path1, class_path2)
  arrayToMVListPropertyValue(arr)
  /**
   * Method to get list of identity IDs for those current user is a member.
   * The list is a string and has following format:
   * identityID, identityID,...,identityID
   */
  buildIdentityList(identityListSoapResults : string)
  /**
   * Returns an HTML string of the running workflow instance - sign-off History
   */
  BuildProcessReport(ProcessId)
  calcMD5(s : string) : string
  canInvokeAction(actionId)
  canInvokeActionImpl(methodName, location)
  /**
   * @param itemNd item node to check
   * @param win Not used
   * @param exclusion property to exclude from the check 
   * @param itemType item type
   */
  checkItem(itemNd : Element, win : any, exclusion : string, itemType : Element) : { message : string }[]
  /**
   * @param itemNd item node to check
   * @param exclusion property to exclude from the check 
   * @param itemType item type
   * @param breakOnFirstError stop the check after the first error
   * @param emptyPropertyWithDefaultValueCallback 
   */
  checkItemForErrors(itemNd : Element, exclusion : string, itemType : Element, breakOnFirstError : boolean, emptyPropertyWithDefaultValueCallback : checkItemCallback) : { message : string }[]
  checkItemType(itemNd, win)
  /**
   * Method to clear the server cache
   */
  clearCache()
  clearClientMetadataCache()
  /**
   * Method to set the clear status bar value.
   */
  clearStatus(statID)
  clearStatusMessage(messageID)
  clientItemValidation(itemTypeName : string, itemNd : Element, breakOnFirstError : boolean, emptyPropertyCb : checkItemCallback) : { message : string }[]
  cloneForm(formID, newFormName)
  CommonPropertyValue(action, propertyName, propertyValue, propertyDescription)
  /**
   * Method to compile VB or C# code on the server side to check syntax.
   * @param body the method item xml
   */
  compileMethod(body)
  /**
   * Displays a confirmation dialog box which contains a message and OK and Cancel buttons.
   * @param message Message to display in a dialog.
   * @param ownerWindow parent window for the dialog.
   * @returns true - if a user clicked the OK button. false - if a user clicked Cancel button.
   */
  confirm(message : string, ownerWindow : Window) : boolean
  Confirm_PurgeAndDeleteItem(itemId, keyedName, purgeORdelete)
  /**
   * This function is a wrapper for IomInnovator.ConsumeLicense to handle exсeptions in case when LicenseService has returned "500" http response.
   * Our IOM controls are hosted in the main window and are shared between other windows. So, if tearoff window calls IomInnovator.ConsumeLicense inside of try catch block and exception is occured then it appears in the main window as script error and only after that will be handled by "catch" block of tearoff window.
   */
  ConsumeLicense(featureName)
  /**
   * converts val from neutral format if need
   */
  convertFromNeutral(val, data_type, dotNetPattern4Date)
  convertFromNeutralAllValues(itmNd)
  /**
   * converts localValue to neutral format if need
   */
  convertToNeutral(localValue, dataType, dotNetPattern)
  /**
   * Method to copy/clone an item (perform a "Save As")
   * @param itemTypeName ItemType name
   * @param itemID item ID
   */
  copyItem(itemTypeName : string, itemID : string)
  /**
   * Method to copy an item
   * @param itemNd item to be cloned
   */
  copyItemEx(itemNd : Element, action : string, do_add : boolean)
  copyRelationship(relationshipType, relationshipID)
  /**
   * @deprecated Use this.MetadataCache.CreateCacheKey()
   */
  CreateCacheKey() : array
  /**
   * provide simple way to create xml documents without specifying needed attributes each time
   */
  createXMLDocument() : Document
  /**
   * Create Xml Element. If parent variable exist, add element as child
   * @param elName element name to be created
   * @param parent parent element
   */
  createXmlElement(elName : string, parent? : Element) : Element
  decorateForMultipleGrids(fn)
  deleteItem(itemTypeName : string, itemID : string, silentMode : boolean) : boolean
  deleteItemEx(itemNd : Element, silentMode : boolean) : boolean
  deletePreferences(preferenceIDs)
  deletePropertyFromObject(obj, key)
  deleteSavedSearchesByPreferenceIDs(preferenceIDs)
  dirtyItemsHandler()
  doCacheUpdate(prepare, itemNd : Element, tempArray)
  doesClassPath1StartWithClassPath2(class_path1, class_path2)
  downloadFile(fileNd : Element, preferredName: string)
  downloadItemFiles(itemNd : Element)
  EscapeSpecialChars(str : string)
  escapeXMLAttribute(strIn : string)
  EscapeXPathStringCriteria(str : string)
  /**
   * Method to evaluate JavaScript stored as a Method item on the client side.
   * @param methodName the name of the Method item
   * @param itemDom the item dom
   * @param addArgs Object with any additional parameters.
   */
  evalItemMethod(methodName : string, itemNode : Element, addArgs? : object)
  /**
   * Method to evaluate the JavaScript code in the Aras object space.
   */
  evalJavaScript(jsCode)
  /**
   * Method to evaluate JavaScript stored as a Method item on the client side.
   * @param methodNameOrNd the name or id of the Method item or Method Node
   * @param XMLinput inDom or XML string that is loaded into the _top.inDom
   * @param inArgs arguments for method(can not be changed the object in evalMethod)
   */
  evalMethod(methodNameOrNd : string|Object, XMLinput : string|Element, inArgs? : object)
  /**
   * Method to close the activity
   * activity  = the activity to be closed
   * path      = path that should be followed
   */
  evaluateActivity(body)
  export2Office(gridXmlCallback, toTool, itemNd, itemTypeName, tabName)
  /**
   * Returns a pointer to the main Aras object (from the main window)
   */
  findMainArasObject()
  /**
   * fires event in all windows
   * supported events:
   * "VariableChanged": {varName, varValue}
   * "ItemLock": {itemID, itemNd, newLockedValue}
   * "ItemSave": {itemID, itemNd}
   * @param eventName
   * @param params
   */
  fireEvent(eventName : arasGlobalEvent, params)
  fireUnitTestsForSelectPropNdsByClassPath()
  fixLiquidContainerHeight(doc, el, obj)
  generateExceptionDetails(err, func)
  /**
   * Method to generate a new ID by getting it from the server
   */
  generateNewGUID() : string
  /**
   * @param url location of new document if window with nameForNewWindow hasn't defined. Created for IR-008617 "One Window (Main) Service report gives Access Denied"
   */
  getActionTargetWindow(nameForNewWindow : string, url? : string) : Window
  getAffectedItems(itemTypeName, itemId)
  /**
   * Returns the Active and Pending Activity items for the user.
   * The users Activities are those assigned to an Identity for which the user is a Member
   */
  getAssignedActivities(inBasketViewMode)
  /**
   * Returns the Active and Pending tasks for the user (Workflow Activities, Project Activities, FMEA Action Items).
   * The users tasks are those assigned to an Identity for which the user is a Member
   * @param workflowTasks boolean AML value. 1 or 0
   * @param projectTasks boolean AML value. 1 or 0
   * @param actionTasks boolean AML value. 1 or 0
   */
  getAssignedTasks(inBasketViewMode : string, workflowTasks : number, projectTasks : number, actionTasks : number)
  getAuthenticationType()
  getBaseURL(additionalPath? : string) : string
  getCacheObject()
  /**
   * Method to load the where class is referenced
   * @param typeId the ItemType name
   * @param classId the id of class node
   * @param scanTypes for this types dependencies will be tracked
   * @param detailed if true return detailed result, if false return count of dependencies
   */
  getClassWhereUsed(typeId : string, classId : string, scanTypes, detailed : boolean)
  getClippedDateFormat(dateFormat)
  getCommonPropertyValue(propertyName, propertyDescription)
  getCorporateToLocalOffset()
  /**
   * Returns login name to communicate with Server (logged user login name)
   * @returns login name of current user
   */
  getCurrentLoginName() : string
  /**
   * Returns User id to communicate with Server (logged user id)
   * @returns User ID
   */
  getCurrentUserID() : string
  getCurrentWindow()
  getDatabase()
  getDateFormatByPattern(pattern)
  getDecimalPattern(precision, scale)
  getDirtyItems()
  getDocumentBodySize(document)
  getDotNetDatePattern(innovatorDatePattern)
  getElementsByClass(searchClass, node)
  getElementsById(doc, tag, id)
  /**
   * For internal use only
   */
  getEmptySoapResult()
  /**
   * get text with faultactor (contains stack trace)
   * @param xmlDom xml document with soap message
   */
  getFaultActor(xmlDom) : string
  /**
   * get text with fault details
   * @param xmlDom xml document with soap message
   */
  getFaultDetails(xmlDom) : string
  /**
   * Get text with faultstring
   * @param xmlDom xml document with soap message
   */
  getFaultString(xmlDom) : string
  getFieldTextWidth(field)
  /**
   * @deprecated
   */
  getFile(value, fileSelect)
  getFileItemTypeID()
  getFileText(fileUrl)
  getFileURLEx(itemNd)
  getFormForDisplay(id, mode)
  getFormId(name)
  getFromCache(itemID)
  /**
   * Method to load the history items for specified item
   * @param typeName the ItemType name
   * @param id the id for the item
   */
  getHistoryItems(typeName : string, id : string)
  /**
   * Returns set of "header name" -> "header value" pairs. The headers are used to send request to server.
   * @param soapAction The SOAPAction header value
   * @returns set of "header name" -> "header value" pairs. The headers are used to send request to server.
   */
  getHttpHeadersForSoapMessage(soapAction? : string) : Record<string, string>
  getI18NXMLResource(resourceFileNm : string, parentUrl4XmlFolder? : string, resourceId? : string) : string
  /**
   * @returns A string containing a comma-delimited list of IDs
   */
  getIdentityList() : string
  getInnovatorUrl() : string
  getIomSessionContext() : Aras.IOM.I18NSessionContext
  getIsAliasIdentityIDForLoggedUser() : string
  /**
   * Method to load an item
   * @param itemTypeName the ItemType name
   * @param xpath the XPath to teh item in the dom cache
   * @param body the query message to get the items
   * @param levels the levels deep for the returned item configuration
   * @param configPath the RelationshipType names to include inteh item configuration returned
   * @param select the list of properties to return
   */
  getItem(itemTypeName, xpath, body, levels, configPath, select)
  /**
   * Method to load all the versions of an item
   * @param typeName the ItemType name
   * @param id the id for the item
   */
  getItemAllVersions(typeName : string, id : string) : Element[]
  /**
   * Method to load an item by id
   * @param typeName the ItemType name
   * @param id the id for the item
   * @param levels the levels deep for the returned item configuration
   * @param configPath the RelationshipType names to include in the item configuration returned
   * @param select the list of properties to return
   */
  getItemById(typeName : string, id : string, levels = 1, configPath = "", select = "") : Element
  /**
   * Method to load an item by id
   * @param typeName the ItemType name
   * @param keyed_name the keyed_name for the item
   * @param levels the levels deep for the returned item configuration
   * @param configPath the RelationshipType names to include in the item configuration returned
   * @param select the list of properties to return
   */
  getItemByKeyedName(typeName : string, keyed_name : string, levels = 1, configPath = "", select = "") : Element
  /**
   * Method to load an item by id
   * @param typeName the ItemType name
   * @param name the name for the item
   * @param levels the levels deep for the returned item configuration
   * @param configPath the RelationshipType names to include in the item configuration returned
   * @param select the list of properties to return
   */
  getItemByName(typeName : string, name : string, levels = 1, configPath = "", select = "") : Element
  getItemFromServer(itemTypeName, id, selectAttr, related_expand, language)
  getItemFromServerByName(itemTypeName, name, selectAttr, related_expand)
  getItemFromServerWithRels(itemTypeName, id, itemSelect, reltypeName, relSelect, related_expand)
  /**
   * Method to load the latest version for the item
   * @param itemTypeName the ItemType name
   * @param itemId the id for the item
   */
  getItemLastVersion(typeName : string, itemId : string, preventDefaultErrorMessage = false) : Element
  getItemLastVersionEx(itemNd : Element)
  /**
   * Method to load the promote values
   * @param typeName the ItemType name
   * @param id the id for the item
   */
  getItemNextStates(typeName : string, id : string)
  /**
   * Method to get the value of an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   */
  getItemProperty(node : Element, element : string, defaultVal? : string) : string
  /**
   * Method to get the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to get
   * @param attribute the name of the attribute
   */
  getItemPropertyAttribute(node : Element, element : string, attribute : string) : string
  getItemPropertyTranslations(item, property)
  getItemRelationship(item, relTypeName, relID, useServer)
  getItemRelationships(itemTypeName, itemId, relsName, pageSize, page, body, forceReplaceByItemFromServer)
  getItemRelationshipsEx(itemNd, relsName, pageSize, page, body, forceReplaceByItemFromServer)
  getItemsOfFileProperties(itemNode, ItemTypeNode, eachFileCallback)
  /**
   * Method to get the style for the item
   * @param item dom object for the item
   */
  getItemStyles(item)
  getItemTranslation(srcNode, mlPropNm, lang, defaultVal, foundNodeCb)
  getItemTranslationAttribute(srcNode, mlPropNm, lang, attribute, defaultVal)
  /**
   * Method to load a ItemType by Form ID
   * @param id the id for the Form item
   */
  getItemTypeByFormID(id : string, ignoreFault : boolean = false)
  getItemTypeColor(criteriaValue, criteriaName)
  /**
   * Search item by specific criteria.
   * @deprecated Use getItemTypeForClient() instead.
   * @param criteriaValue Value of criteria.
   * @param criteriaName Name of criteria for search. Can be 'id' or 'name'. 'name' by default.
   */
  getItemTypeDictionary(criteriaValue : string, criteriaName : 'id'|'name' = "name") : object
  getItemTypeDictionaryJson(criteriaValue, criteriaName)
  /**
   * Search item by specific criteria.
   * @param criteriaValue Value of criteria.
   * @param criteriaName Name of criteria for search. Can be 'id' or 'name'. 'name' by default.
   */
  getItemTypeForClient(criteriaValue : string, criteriaName : 'id'|'name' = "name") : Aras.IOM.Item
  getItemTypeForClientFromCache(criteriaValue : string, criteriaName : 'id'|'name' = "name") : Aras.IOM.Item
  getItemTypeId(name : string) : string
  getItemTypeName(id : string) : string
  getItemTypeNodeForClient(criteriaValue : string, criteriaName : 'id'|'name' = "name") : Element
  /**
   * Method to get the properties for the ItemType
   * @param itemType the itemType
   */
  getItemTypeProperties(itemType : Element) : Element[]
  /**
   * Method to load an item by id
   * @param typeName the ItemType name
   * @param id the id for the item
   * @param levels the levels deep for the returned item configuration
   * @param configPath the RelationshipType names to include in the item configuration returned
   * @param select the list of properties to return
   */
  getItemUsingIdAsParameter(typeName : string, id : string, levels = 1, configPath = "", select = "") : Element
  /**
   * Method to load the where used items for an item
   * @param typeName the ItemType name
   * @param id the id for the item
   */
  getItemWhereUsed(typeName : string, id : string)
  /**
   * Method to get key field values for an item
   * @param id the id for the item
   */
  getKeyedName(id : string, itemTypeName = "") : string
  getKeyedNameAttribute(node, element)
  getKeyedNameEx(itemNd)
  getLanguageDirection(languageCode)
  getLanguagesResultNd()
  getLCStateLabel(currentStateId, soapSendCaller, callback)
  getLessStrictDateFormat(dateFormat)
  /**
   * Method to get the Filter Value for a List item
   * @param listID the id for the List
   * @param is_bgrequest
   */
  getListFilterValues(listID : string, is_bgrequest : boolean)
  getListId(name)
  /**
   * Method to get the Values for a List item
   * @param listId the id for the List
   * @param is_bgrequest
   */
  getListValues(listID : string, is_bgrequest? : boolean) : Element[]
  getLocalesResultNd()
  /**
   * User item representing the user logged in is a special item
   * and thus is stored in the separate DOM.
   */
  getLoggedUserItem() : boolean|Element
  getLoginName() : string
  getMainArasObject() : arasObj
  getMainWindow() : TopWindow
  /**
   * @param xmlDom xml document with soap message
   */
  getMessageNode(xmlDom : object)
  getMorphaeList(itemType)
  getMostTopWindowWithAras(windowObj? : Window = window) : TopWindow
  /**
   * Method to get the next value from a sequence item
   * @param id the id for the sequence (optional if seqName is used)
   * @param seqName the sequence name (optional is the id is used)
   */
  getNextSequence(id : string, seqName : string)
  /**
   * Method to get the value of an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   */
  getNodeElement(node : Element, element : string, defaultVal? : string) : string
  /**
   * Method to get the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to get
   * @param attribute the name of the attribute
   */
  getNodeElementAttribute(node : Element, element : string, attribute : string) : string
  getNodeTranslationElement(srcNode, mlPropNm, lang, defaultVal, foundNodeCb)
  getNodeTranslationElementAttribute(srcNode, mlPropNm, lang, attribute, defaultVal)
  getNotifyByContext(wnd : Window) : (message : string, options? : {
    timeout? : number,
    position? : 'top-right'|'bottom-left'|'bottom-right'|'top-left',
    type? : 'info'|'warning'|'success'|'error'
  }) => void
  getOpenedWindowsCount(closeAllDuringLooping)
  GetOperationName_PurgeAndDeleteItem(purgeORdelete)
  getPermissions(access_type : string, itemID : string, typeID : string, typeName : string)
  getPolymorphicsWhereUsedAsPolySource(itemTypeId)
  getPreferenceItem(prefITName, specificITorRTId)
  getPreferenceItemProperty(prefITName, specificITorRTId, propNm, defaultVal)
  getPropertiesOfTypeFile(ItemTypeNd)
  getRealPropertyForForeignProperty(foreignProperty, currentItemType)
  /**
   * Method to get related item from relationship
   * @param item relationship from which related item will be taken
   */
  getRelatedItem(item)
  /**
   * Method to get the Relationships for an item
   * @param item the item
   * @param typeName the ItemType name for the Relationships
   */
  getRelationships(item : Element, typeName : string) : boolean | Element[]
  getRelationshipType(id : string) : Aras.IOM.Item
  getRelationshipTypeId(name : string) : string
  getRelationshipTypeName(id : string) : string
  getResource(solution: string, key : string, ...args : string[]) : string
  getResources(solution, keys)
  getSavedSearches(itemTypeName, location, autoSavedOnly, savedSearchId2Return)
  getScriptsURL(additionalPath? : string) : string
  /**
   * Returns a search mode
   * @param searchModeId SearchMode ID
   */
  getSearchMode(searchModeId : string) : Element
  /**
   * Returns an array of search modes
   * @returns Array of all SearchMode items or with particular item if {searchModeId} was passed
   */
  getSearchModes(searchModeId? : string) : Array<Element>
  getSelectCriteria(itemTypeId, isForRelationshipsGrid, xProperties)
  getServerBaseURL() : string
  getServerURL() : string
  getSessionContextLanguageCode()
  getSessionContextLocale()
  getSeveralListsValues(listsArray, is_bgrequest? : boolean, readyResponseIfNeed? : boolean)
  getTopHelpUrl() : string
  getUnlockEditStateItemsXml()
  getUpdatedPreferenceItemsXml()
  getUpdatedSavedSearchesXml()
  getUserID() : string
  getUserReportServiceBaseUrl() : string
  /**
   * @returns return "admin" if logged user has Administrators or SuperUser Identity
   * otherwise return "user"
   */
  getUserType() : "admin"|"user"
  /**
   * Method to get the text value for an element by XPath.
   * @param xpath the APath to the element
   * @param node the optional node otherwise use the global dom
   */
  getValueByXPath(xpath : string, node)
  getVariable(varName)
  /**
   * Get Vault Server ID for current User
   * @returns id of Vault Server
   */
  getVaultServerID() : string
  /**
   * Return Vault Server url for current User
   */
  getVaultServerURL() : string
  getVisiblePropertiesXPath(itemTypeName, getForRelshipGrid)
  getXmlPreferenceItemWithUpdatedLayoutItem(layoutPreferenceItem)
  getvisiblePropsForItemType(currItemType)
  getXmlPreferenceItemWithUpdatedLayoutItem(layoutPreferenceItem)
  /**
   * check if xmldom (soap message) contains Fault
   * @param xmlDom xml document with soap message
   * @param ignoreZeroFault ignore zero faultcode or not
   */
  hasFault(xmlDom, ignoreZeroFault : boolean) : boolean
  /**
   * Check if xmldom (soap message) contains Message
   * @param xmlDom xml document with soap message
   */
  hasMessage(xmlDom : object)
  /**
   * Method to initiate a new workflow process
   * @param workflowMapID the id for the Workflow Map to be used as a template
   * @param item the item for which new workflow process should be created
   */
  initiateWorkflow(workflowMapID, item)
  /**
   * Invoke the Method associated with an action.
   * @param action the the Action item
   * @param itemTypeID
   * @param thisSelectedItemID
   */
  invokeAction(action : string, itemTypeID : string, thisSelectedItemID : string)
  isAdminUser() : boolean
  isClassPathRoot(class_path)
  isClItemCompatibleWithIT(clipboardItem, itemTypeID)
  isClItemCompatibleWithRT(clipboardItem, targetRelatedTN)
  isDirtyEx(itemNd : Element) : boolean
  isDirtyItems()
  isEditStateEx(itemNd : Element) : boolean
  /**
   * Checks if id is being processed in async operation.
   * @param id
   */
  isIdBeingProcessed(id : string) : boolean
  isInCache(itemID)
  isInteger(propertyValue)
  isLCNCompatibleWithIT(itemTypeID)
  isLCNCompatibleWithRT(targetRelatedTN)
  isLCNCompatibleWithRTOnly(targetRelationshipTN)
  isLocalAuthenticationType()
  isLocked(itemNd : Element) : boolean
  isLockedByUser(itemNd : Element) : boolean
  /**
   * Function defines is it necessary to display the SSVC sidebar.
   * @param itemNd xml node of item to find correspondent view
   * @param formType string, representing mode: 'add', 'view', 'edit' or 'print'
   */
  isNeedToDisplaySSVCSidebar(itemNd : Element, formType : 'add'|'view'|'edit'|'print')
  isNegativeInteger(propertyValue)
  isNew(itemNd : Element) : boolean
  isPolymorphic(itemType)
  isPositiveInteger(propertyValue)
  isPropertyValueValid(propertyDef, propertyValue, inputLocale)
  isPropFilledOnServer(propName)
  isTempEx(itemNd)
  /**
   * Method to test ID value to be temporary.
   * @param id ID to test.
   * @returns is ID temporary.
   */
  isTempID(id : string) : boolean
  /**
   * Indicate whether window is closed.
   * Supposition: sometimes invoking of property window.closed launch exception "Permission denied". (After applying patch KB918899)
   */
  isWindowClosed(window)
  /**
   * Method to load an item or items
   * @param typeName the ItemType name
   * @param body the query message to get the items
   * @param levels the levels deep for the returned item configuration
   * @param pageSize the number of rows to return
   * @param page the page number
   * @param configPath the RelationshipType names to include in the item configuration returned
   * @param select the list of properties to return
   */
  loadItems(typeName, body, levels, pageSize, page, configPath, select)
  /**
   * Returns an applet ready XML string of the running workflow instance.
   */
  loadProcessInstance(ProcessId, ActivityId)
  /**
   * Method to lock the item
   * @param itemID item ID
   * @param itemTypeName ItemType name
   */
  lockItem(itemID : string, itemTypeName : string)
  lockItemEx(itemNode)
  login()
  /**
   * Method to logoff the Innovator Server and close the session.
   */
  logout()
  makeItemsGridBlank(saveSetups)
  mergeItem(oldItem, newItem)
  mergeItemRelationships(oldItem, newItem)
  mergeItemsSet(oldSet, newSet)
  mvListPropertyValueToArray(val)
  newArray()
  /**
   * Method to create a new item of ItemType File
   * @param fileNameOrObject the name of the file or FileObject
   */
  newFileItem(fileNameOrObject : string|File) : Element
  newIOMInnovator(contextAras? : arasObj) : Aras.IOM.Innovator
  newIOMItem(itemTypeName? : string, action? : string) : Aras.IOM.Item
  /**
   * Method to create a new item
   * @param itemTypeName the name of the ItemType
   */
  newItem(itemTypeName : string, itemTypeNdOrSpecialArg? : any) : Element
  /**
   * Method to create a new element (property) for the item node and set the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   * @param attribute the name of the attribute
   * @param value the value for the attribute
   */
  newItemPropertyAttribute(node : Element, element : string, attribute : string, value : string)
  /**
   * Method to create a new element (property) for the item node and set the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   * @param attribute the name of the attribute
   * @param value the value for the attribute
   */
  newNodeElementAttribute(node, element : string, attribute : string, value : string)
  newObject()
  newQryItem(itemTypeName)
  /**
   * Method to create a new Relationship for an item
   * @param relTypeId the RelatinshpType id
   * @param srcItem the source item in the relationship (may be null:i.e. when created with mainMenu)
   * @param searchDialog true or false : if search dialog to be displayed
   * @param wnd the window from which the dialog is opened
   */
  newRelationship(relTypeId : string, srcItem : Element, searchDialog : boolean, wnd : Window, relatedItem
    , relatedTypeName?, bTestRelatedItemArg?, bIsDoGetItemArg?, descByTypeName?) : Element
  newUIResource(solution)
  /**
   * Method to create a new workflow map
   */
  newWorkflowMap()
  parse2NeutralEndOfDayStr(dtObj)
  pasteRelationship(parentItem, clipboardItem, as_is, as_new, targetRelationshipTN, targetRelatedTN, showConfirmDlg)
  populateRelationshipsGrid(bodyStr)
  populateRelationshipsTables(bodyStr)
  prepareItem4Save(itemNd)
  preserveTags(str)
  /**
   * Method to print the frame
   * @param frame the frame object
   */
  printFrame(frame : object)
  /**
   * Method to promote an item to the next state
   * @param itemTypeName the ItemType name
   * @param itemID the id for the item
   * @param stateName the next state name
   */
  promote(itemTypeName : string, itemID : string, stateName : string, comments : string)
  promoteEx(itemNd : Element, stateName : string, comments : string, soapController)
  promoteItem_implementation(promoteParams, soapController)
  prompt(msg, defValue, argwin)
  purgeItem(itemTypeName : string, itemID : string, silentMode : boolean) : boolean
  purgeItemEx(itemNd : Element, silentMode : boolean) : boolean
  /**
   * ReAssigns an Activity to a new Identity
   * Activity ID and the Identity ID must be passed as arguments
   */
  ReAssignActivity(ActivityId, IdentityId)
  rebuildView(viewId)
  RefillWindow(itemNd, win, isReloadFrm)
  refreshItemsGrid(itemTypeName, itemID, updatedItem, itemsGrid)
  refreshWindows(message, results, saveChanges)
  /**
   * Register Handler for event by win
   * see fireEvent description for details
   */
  registerEventHandler(eventName : arasGlobalEvent, win : Window, handler : (args : object) => void)
  removeFromCache(item : Element | string) : CacheResponse
  RemoveGarbage_PurgeAndDeleteItem(ItemTypeName, ItemId, DeletedItemTypeName, relationship_id)
  /**
   * Removes id from a list of ids which are being processed in async operation.
   * @param id
   */
  removeIdBeingProcessed(id : string)
  removeItemPropertyAttribute(node : Element, element : string, attribute : string)
  removeItemTranslation(srcNode, mlPropNm, lang)
  removeItemTranslationAttribute(srcNode, mlPropNm, lang, attribute)
  removeNodeElementAttribute(node : Element, element : string, attribute : string)
  removeNodeTranslationElementAttribute(srcNode, mlPropNm, lang, attribute)
  removeVariable(varName)
  replacePolyItemNodeWithNativeItem(ritem)
  resetAllItemsAccess(itemTypeName)
  resetItemAccess(itemTypeName, itemId)
  resetLifeCycle(itemTypeName, itemID)
  resetUserPreferences()
  /**
   * Invoke the Method associated with a report.
   * @param report the the Report item
   * @param itemTypeID is ignored
   */
  runClientReport(report, itemTypeID, item)
  /**
   * Run a report
   * @param report Report element
   * @param itemTypeID ID of the itemtype. Can be an empty string and inferred from the `item` parameter
   * @param item AML definition of the item
   * @example
   * var report = top.aras.getItemByKeyedName("Report", "{Report Name}");
   * var item; // XML Node representing item. Could be result of 
   *           // top.aras.getItemById('{ItemType}', '{Item ID}')
   * top.aras.runReport(report, "", item);
   */
  runReport(report : Element, itemTypeID : string, item : Element)
  runServerReport(report, itemTypeID, item)
  /**
   * Method to save an item
   * @param itemID the id for the item to be saved
   * @param confirmSuccess
   */
  saveItem(itemID, confirmSuccess)
  saveItemEx(itemNd, confirmSuccess, doVersion)
  saveItemExAsync(itemNd, confirmSuccess, doVersion, isGridUpdate)
  savePreferenceItems()
  saveString2File(contentCallback, extension, fileName)
  saveUICommandHistoryIfNeed(itemTypeValue, itemNd, uiCmd, formName)
  SelectFileFromPackage(methodName, isMultiselect)
  selectPropNdsByClassPath(class_path, itemTypeNd, excludePropsWithThisClassPath, ignoreProps2Delete)
  sendFilesWithVaultApplet(itemNd, statusMsg, XPath2ReturnedNd)
  sendFilesWithVaultAppletAsync(itemNd, statusMsg, XPath2ReturnedNd)
  SendSoap_PurgeAndDeleteItem(ItemTypeName, ItemId, purgeORdelete)
  setActionTargetWindow(win : Window)
  setCommonPropertyValue(propertyName, propertyValue, propertyDescription)
  setDatabase(database)
  setDefaultLifeCycle(itemTypeName : string, itemID : string)
  setDefaultMessage(id, infoOrText, imgURL)
  setIdentityList(identityList)
  setItemEditStateEx(itemNd, state)
  /**
   * Method to set the value of an element on the node.
   * The item is the node and the property is the element.
   * @param srcNode the item object
   * @param propertyName the property to set
   * @param value the value for the property
   * @param applyTheChangeToAllFound flag to signal if the change must be common or local
   * @param itemTypeNd node representing itemType of srcNode
   * @return always true.
   */
  setItemProperty(srcNode : Element, propertyName : string, value : *, applyTheChangeToAllFound = true, itemTypeNd : * = undefined) : boolean
  /**
   * Method to set the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   * @param attribute the name of the attribute
   * @param value the value for the attribute
   */
  setItemPropertyAttribute(node : Element, element : string, attribute : string, value : string)
  setItemPropertyTranslations(item, property, translations, applyChanges2All)
  setItemTranslation(srcNode, mlPropNm, value, lang)
  setItemTranslationAttribute(srcNode, mlPropNm, lang, attribute, value)
  setLoginName(loginName)
  /**
   * Method to set the value of an element on the node.
   * The item is the node and the property is the element.
   * @param srcNode the item object
   * @param propertyName the property to set
   * @param value the value for the property
   * @param applyTheChangeToAllFound flag to signal if the change must be common or local
   * @param itemTypeNd node representing itemType of srcNode
   * @return always true.
   */
  setNodeElement(srcNode : Element, propertyName : string, value : *, applyTheChangeToAllFound = true, itemTypeNd : * = undefined) : boolean
  /**
   * Method to set the value of an attribute on an element on the node.
   * The item is the node and the property is the element.
   * @param node the item object
   * @param element the property to set
   * @param attribute the name of the attribute
   * @param value the value for the attribute
   */
  setNodeElementAttribute(node : Element, element : string, attribute : string, value : string)
  /**
   * Method to set the value of an element on the node
   * and set action attribute on the node, if it is absent.
   * The item is the node and the property is the element.
   * @param srcNode the item object
   * @param element the property to set
   * @param value the value for the property
   * @param apply_the_change_to_all_found flag to signal if the change must be common or local
   * @param action action attribute to be set on the node. By default, if action is not defined
   * and node action attribute != 'add' or != 'create' we set action 'update'
   */
  setNodeElementWithAction(srcNode : *, element : string, value : *, apply_the_change_to_all_found = true, action = "update")
  setNodeTranslationElement(srcNode, mlPropNm, value, lang)
  setNodeTranslationElementAttribute(srcNode, mlPropNm, lang, attribute, value)
  setPreferenceItemProperties(prefITName, specificITorRTId, varsHash)
  setStatus(text, image)
  setStatusEx(text, id, image)
  SetupURLs(startURL, options)
  setUserID(userID)
  setUserReportServiceBaseUrl(url)
  setUserType(usertype)
  /**
   * Method to set the users working directory
   * @param id the id for the user
   * @param workingDir the working directory
   */
  setUserWorkingDirectory(id : string, workingDir : string)
  setVariable(varName, varValue)
  setVarsStorage(varsStorage)
  setWindowLangAttribute(window)
  setWindowTitle(window, title)
  showColorDialog(oldColor)
  ShowContextHelp(itemTypeName)
  showExceptionDetails(err)
  showStatusMessage(id : string, text : string, imgURL : string, imgPosition?)
  showValidationMsg(ownerWindow : Window)
  /**
   * send xml to InovatorServer and return result.
   * @param methodName - string with Innovator Server method name (ApplyItem, GetItem, ...)
   * @param xmlBody - xml string to send
   * @param url - url of Innovator Server (by default url is built from this.parent.baseURL)
   * @param saveChanges 
   * @param soapController  - an instance of SoapController
   */
  soapSend(methodName : string, xmlBody : string, url? : string, saveChanges? : any, soapController? : SoapController) : SOAPResults
  sortProperties(ndsCollection)
  SsrEditorWindowId(window)
  SsrEditorWindowId(window)
  /**
   * Finds the Default Workflow Map for the passed itemType and instance,   and
   * creates an instance of that Workflow and starts it.
   */
  StartDefaultWorkflow(ItemId, ItemType, ItemTypeId)
  /**
   * Starts an instance of a Workflow for a specified item
   * WorkflowMap ID and the Item ID must be passed as arguments
   */
  StartNamedWorkflow(ItemId, ItemType, ItemTypeId, WorkflowMapId)
  /**
   * Method to start the workflow process
   * @param workflowProcess the workflow process that should be started
   */
  startWorkflow(workflowProcess)
  /**
   * Method to stop the workflow process
   * @param workflowProcess the workflow process that should be stopped
   */
  stopWorkflow(workflowProcess)
  /**
   * @param report AML definition of the report
   * @param report_location Is `service` for self-service reports
   * @param url URL of the report (used for self-service reports)
   * @param results String contents of the report
   * @param doReturnWindow Whether to return the newly created window
   */
  targetReport(report : Element, report_location : "service"|"", url : string, results : string, doReturnWindow : boolean) : Window | void;
  TransformVaultServerURL(url)
  uiAddConfigLink2Doc4Assembly()
  uiCloseWindowEx(itemID)
  uiDrawFieldEx(fieldNd, propNd, mode, itemTypeNd)
  /**
   * @param formNd
   * @param mode - (add, edit, view, print, view_form, edit_form, search)
   */
  uiDrawFormEx(formNd : Element, mode : 'add'|'edit'|'view'|'print'|'view_form'|'edit_form'|'search', itemTypeNd, listItems)
  uiDrawItemInfoTable(itemTypeNd, propsHelper, propertiesArray)
  uiDrawItemInfoTable4ItemsGrid(itemTypeNd, propertiesHelper)
  uiDrawItemInfoTableImpl(itemTypeNd, propertiesHelper)
  uiFieldGetValue(uiField)
  uiFindAndSetFocusWindowEx(itemID)
  uiFindWindowEx(itemID)
  uiFindWindowEx2(itemNd)
  uiGenerateGridXML(inDom, Dprops, Rprops, typeID, params, getCached)
  uiGenerateGridXSLT(DescByProps_Arr, RelatedProps_Arr, params, typeID)
  uiGenerateItemsGridXML(inDom, props, itemtypeID, params)
  uiGenerateParametersGrid(itemTypeName, classification)
  uiGenerateRelationshipsGridXML(inDom, Dprops, Rprops, itemTypeId, params, getCached)
  uiGenerateRelationshipsTabbar(itemTypeName, itemID)
  uiGenerateRelationshipsTable(itemTypeName, itemID, relationshiptypeID)
  uiGetElementCoordinates(oNode)
  /**
   * Returns string: field type 4 specified Property
   */
  uiGetFieldType4Property(propertyNd) : string
  uiGetFilteredListEx(fValueNds, filter)
  uiGetFilteredObject4Grid(itemTypeID, filteredPropName, filterValue)
  /**
   * function to get form xml node correspondent to the item (itemNd) and mode
   * (result depends on current user)
   * @param itemNd xml node of item to find correspondent form
   * @param formType string, representing mode: 'add', 'view', 'edit' or 'print'
   */
  uiGetForm4ItemEx(itemNd : Element, formType : 'add'|'view'|'edit'|'print')
  /**
   * function to get id of form correspondent to the item (itemNd) and mode
   * (result depends on current user)
   * @param itemNd xml node of item to find correspondent form
   * @param formType string, representing mode: 'add', 'view', 'edit' or 'print'
   */
  uiGetFormID4ItemEx(itemNd : Element, formType : 'add'|'view'|'edit'|'print')
  /**
   * Case insensitive check whether exists such keyed_name in the ItemType.
   * Checks if there is an instance of the specified type with a specified keyed name in the DB.
   * The check is case insensitive if the DB was setup properly.
   * If instance cannot be defined uniquely - the first matched is used.
   * If instance doesn't exists in DB then boolean false is returned.
   * @param itemTypeName - the ItemType name
   * @param keyed_name - the keyed name
   * @param skipDialog - skip showing the dialog (default value undefined (false))
   */
  uiGetItemByKeyedName(itemTypeName : string, keyed_name : string, skipDialog = false) : boolean|Object
  uiGetItemInfoTable(itemTypeNd, itemNd, makeTableForItm, appendIdToItmTable, widthsHash, propsArr)
  uiGetRectangleToShowWindowNearElement(element, windowSize, rectangleInsideElement, eventObject, isGrid)
  /**
   * function to get Relationship View of ItemType
   * (result depends on current user)
   * @param itemType xml node of ItemType
   */
  uiGetRelationshipView4ItemTypeEx(itemType : Element) : Element
  /**
   * function to get TOC View of ItemType
   * (result depends on current user)
   * @param itemType xml node of ItemType
   */
  uiGetTOCView4ItemTypeEx(itemType : Element) : Element
  uiInitItemsGridSetups(currItemType, visibleProps)
  uiInitRelationshipsGridSetups(relationshiptypeID, Dprops, Rprops, grid_view)
  uiIsCheckOutPossible(fileItems, ItemCanBeLockedByUser, ItemIsLockedByUser)
  uiIsCopyFilePossible(fileItems)
  uiIsParamTabVisible(itemNd, itemTypeName)
  uiIsParamTabVisibleEx(itemNd, itemTypeName)
  uiItemCanBeLockedByUser(itemNd, isRelationship, useSrcAccess)
  /**
   * @param itemTypesList an array of objects like [{id:5, name:'Type5'}]
   */
  uiItemTypeSelectionDialog(itemTypesList, wnd, callback)
  uiMergeForeignPropertyWithSource(foreignProperty, returnSource)
  uiNewItemEx(itemTypeName)
  uiNewItemExAsync(itemTypeId)
  uiOpenEmptyWindowEx(itemNd : Element) : boolean
  uiOpenWindowEx(itemID, params, alertErrorWin)
  uiPopulateFormWithItemEx(form, itemNd, itemTypeNd, isEditMode)
  uiPopulateInfoTableWithItem(sourceItm, doc, sendThumbnailRequestHandler, sendLCStateRequestHandler)
  uiPopulatePropertiesOnWindow(hostWindow, itemNd, itemTypeNd, formNd, isEditMode, mode, userChangeHandler)
  uiPrepareDOM4GridXSLT(dom)
  uiPrepareDOM4XSLT(inDom, itemTypeID, RTorITPrefix, colWidths, colOrder)
  uiPrepareTableWithColumns(inDom, columnObjects)
  uiRegWindowEx(itemID, win)
  /**
   * @param oldItemId- old id of item to be shown
   * @param itemId   - id of item to be shown //usually itemId==oldItemId
   * @param editMode - 'view' or 'edit'
   * @param viewMode - 'tab view', ' or 'openFile'
   */
  uiReShowItem(oldItemId : string, itemId : string, editMode? : "view"|"edit", viewMode : "tab view"|"openFile" = "tab view") : boolean | any
  /**
   * @param oldItemID - old id of item to be shown
   * @param itemNd - item to be shown //usually itemId==oldItemId
   * @param viewMode - "tab view" or "openFile"
   */
  uiReShowItemEx(oldItemID : string, itemNd : Element, viewMode : "tab view"|"openFile" = "tab view") : boolean | any
  uiShowControlsApiReferenceCommand(isJavaScript)
  uiShowDialogNearElement(element, dialogUrl, dialogParameters, dialogOptions, dialogSize, rectangleInsideElement, eventObject, isGrid)
  /**
   * @param itemTypeName - may be empty string if item is in client cache
   * @param itemID - ID of the item. Obligatory
   * @param viewMode - 'tab view' or 'openFile' if not specified `aras.getVariable('viewMode')` is used
   * @param isTearOff - `true` or `false`, if not specified `aras.getVariable('TearOff')` is used
   */
  uiShowItem(itemTypeName : string, itemID : string, viewMode? : 'tab view'|'openFile'|'new', isUnfocused? : boolean) : boolean|Promise<Window>
  /**
   * @param itemNd item to be shown
   * @param viewMode 'tab view' or 'openFile'
   * @param isOpenInTearOff true or false
   */
  uiShowItemEx(itemNd, viewMode? : 'tab view'|'openFile', isOpenInTearOff? : boolean, isUnfocused? : boolean) : boolean|Promise<Window>
  /**
   * @param frame
   * @param itemNd
   * @param formType - 'add', 'view', 'edit', 'default', 'edit_form' (also this parameter defines mode to open item)
   * @param formNd4Display - if specified then this form is used to display the item
   */
  uiShowItemInFrameEx(frame, itemNd, formType : 'add'|'view'|'edit'|'default'|'edit_form', nestedLevel, formNd4Display, itemTypeNd4Form, userChangeHandler, listItems)
  uiShowItemLastVersion(itemTypeName, itemId)
  uiToggleCheckbox(uiField)
  uiUnregWindowEx(itemID)
  uiViewXMLInFrame(frame, xmldoc, expandNodes)
  uiViewXMLstringInFrame(frame, string, expandNodes)
  uiWriteObject(doc, objectHTML)
  uiWriteObject(doc, objectHTML)
  /**
   * Method to unlock the item
   * id = the id for the item
   */
  unlockItem(itemID : string, itemTypeName : string)
  unlockItemEx(itemNode : Element, saveChanges : boolean) : Element
  /**
   * UnRegister Handler for event by win
   */
  unregisterEventHandler(eventName : arasGlobalEvent, win : Window, handler : (args : object) => void)
  updateDomSelectLabel(domSelect)
  UpdateFeatureTreeIfNeed()
  updateFilesInCache(itemNd)
  updateInCache(item)
  updateInCacheEx(oldItm, newItm)
  /**
   * Method to update an item
   * @param itemID the id for the item
   */
  updateItem(itemID : string)
  /**
   * checks either the Password or E-Signature for a user
   * @param incoming MD5 encrypted string
   * @param mode "password" or "esignature"
   * @returns pass or fail
   */
  ValidateVote(incoming : string, mode : "password"|"esignature") : boolean | Document
  ValidateXml(schemas, xml)
  ValidationMsg(ownerWindow)
  /**
   * Method to version the item
   * @param itemTypeName
   * @param itemID the id for the item
   */
  versionItem(itemTypeName, itemID)
  /**
   * Return an XPath relative to the Result node
   * @param str relative XPath
   */
  XPathResult(str? : string) : string
  /**
   * Return an XPath relative to the Fault node
   * @param str relative XPath
   */
  XPathFault(str? : string) : string
  /**
   * Return an XPath relative to the Message node
   * @param str relative XPath
   */
  XPathMessage(str? : string) : string
}

interface MetadataCache {
  GetItemType(criteriaValue : string, criteriaName : "id"|"name") : SOAPResults
  GetRelationshipType(criteriaValue : string, criteriaName : "id"|"name") : SOAPResults
  GetForm(criteriaValue : string, criteriaName : "id"|"name")
  GetClientMethod(criteriaValue : string, criteriaName : "id"|"name")
  GetClientMethodNd(criteriaValue : string, criteriaName : "id"|"name") : Element
  GetAllClientMethods()
  GetList(listIds, filterListIds)
  GetApplicationVersion()
  GetIdentity(criteriaValue : string, criteriaName : "id"|"name")
  GetSearchModes()
  GetAllXClassificationTrees()
  GetItemTypeName(id)
  GetRelationshipTypeName(id)
  GetFormName(id)
  GetItemTypeId(name)
  GetRelationshipTypeId(name)
  GetFormId(name)
  ExtractDateFromCache(criteriaValue, criteriaType, itemType)
  DeleteListDatesFromCache()
  DeleteFormDatesFromCache()
  DeleteClientMethodDatesFromCache()
  DeleteAllClientMethodsDatesFromCache()
  DeleteITDatesFromCache()
  DeleteRTDatesFromCache()
  DeleteIdentityDatesFromCache()
  DeleteConfigurableUiDatesFromCache()
  DeleteConfigurableUiControlsDatesFromCache()
  DeletePresentationConfigurationDatesFromCache()
  DeleteCommandBarSectionDatesFromCache()
  DeleteXClassificationTreesDates()
  DeleteContentTypeByDocumentItemTypeDatesFromCache()
  DeleteSearchModeDatesFromCache()
  GetItem(key : string)
  RemoveById(id : string)
  SetItem(key : string, item)
  GetItemsById(key : string)
  ClearCache()
  CreateCacheKey(...arguments: string[]) : string
  RemoveItemById(id)
  GetConfigurableUi(context)
  GetConfigurableUiAsync(context : {
    item_type_id : string,
    item_id : string,
    location_name : string,
    item_classification : string   
  }, isJSON : boolean) : Promise<Record<string, any>>
  GetConfigurableUIControls(context)
  GetPresentationConfiguration(id)
  GetCommandBarSection(id)
  GetContentTypeByDocumentItemType(id)
  RefreshMetadata(itemTypeName)
  UpdatePreloadDates(metadataDates)
}

interface SOAPResults {
  arasableObj : arasObj
  results : Document
  resultsXML : string
  getResponseText() : string
  getParseError() : string
  isFault() : boolean | string
  getFaultCode() : number | string
  getFaultString() : string
  getFaultActor() : string
  getFaultDetails() : string
  getServerMessage() : string
  getResultsBody() : string
  getResult() : Element
  getMessage() : Element
  getMessageValue(key : string) : string
}

namespace Aras.IOM {
  enum UrlType {
    none = 0,
    securityToken = 1
  }

  interface IServerConnection{
    /**
     * Send a request with the specified action and AML to Innovator server and write the obtained response into the outDOM.
     * @param actionName - Action name (e.g. "ApplyAML", etc.)
     * @param inDom - AML that has to be sent to the server
     * @param outDom - Output parameter: empty XmlDocument that is filled with the server response.
     */
    CallAction(actionName : string, inDom : Element, outDom : Element)
    /**
     * The method is not supported by the class.
     * @param reason - Reason
     * @param msg - Message
     */
    DebugLog(reason : string, msg : any)
    /**
     * The method is not supported by the class.
     */
    DebugLogP() : boolean
    /**
     * Returns name of the current database in use.
     */
    GetDatabaseName() : string
    /**
     * Returns all configured databases
     */
    GetDatabases() : string[]
    /**
     * Returns file full file url. In some cases with AuthenticationBroker's token.
     */
    getFileUrl(fileId : string, type : Aras.IOM.UrlType) : string
    getFileUrls(fileIds : string[], type : Aras.IOM.UrlType) : string[]
    /**
     * Returns information about subscription and specified add-on's
     * @param issuer - Select addons by issuer. Skip if null or empty.
     * @param addonName - Select add-ons by the add-on name. Skip if null or empty.
     * @returns subscription info with add-ons in xml format, null if failed
     */
    GetLicenseInfo(issuer : string, addonName : string) : string
    /**
     * The method is not supported by the class.
     * @param name - Server operating parameter.
     * @param defaultvalue - Default value of the parameter.
     * @returns The default value passed to the method.
     */
    GetOperatingParameter(name : string, defaultvalue : any) : any
    /**
     * The method is not supported by the class.
     * @returns null
     */
    GetSrvContext() : any
    /**
     * If Login() was already called, returns id of the user assosiated with the connection; otherwise throws an exception.
     * @returns User ID
     */
    getUserID() : string
    GetValidateUserXmlResult() : string
    /**
     * Login into Innovator server.
     * @returns "error" item if login failed; otherwise item representing logged-in user.
     */
    Login() : Aras.IOM.Item
    /**
     * Logout from Innovator.
     * @param unlockOnLogout - Pass 'true' if want to unlock locked objects on logout; 'false' otherwise
     */
    Logout(unlockOnLogout : boolean)
    /**
     * Logout from Innovator (do not unlock locked Items).
     */
    Logout()
    /**
     * Logout from Innovator.
     */
    Logout(unlockOnLogout : boolean)
  }
  interface I18NSessionContext {
    /**
     * Converts from neutral format into the format specific for the session locale.
     * @param svalue - Locale specific string representation of a value that has to be converted.
     * @param vtype - Type of the value; only the following types are considered to be locale specific - 'date' | 'float' | 'decimal'
     * @param datePtrn - The parameter is taken into consideration only if vtype='date'. In this case the parameter can have one the following values: short_datelong_dateshort_date_timelong_date_timeshort_timelong_time
     * @returns Locale specific string representation of the svalue.
     */
    ConvertFromNeutral(svalue : string, vtype : string, datePtrn : string) : string
    /**
     * Converts a date-time in the time zone of the session in neutral format to a string that represents the same moment of time in UTC.
     * @param neutralStr - A string that represent a date-time in the time zone of the session in neutral format.
     * @param outPattern - Invariant culture date time format.
     * @returns The convertation result.
     */
    ConvertNeutralToUtcDateTime(neutralStr : string, outPattern : string) : string
    /**
     * Convert svalue that is a string representation of value of type vtype into the neutral format. It is assumed that svalue has a format that is a valid format for the session locale.
     * @param svalue - Locale specific string representation of a value that has to be converted.
     * @param vtype - Type of the value; only the following types are considered to be locale specific - 'date' | 'float' | 'decimal'
     * @param datePtrn - The parameter is taken into consideration only if vtype='date'. In this case user can specify the exact format that is used in the string representation of a date in svalue. In case vtype='date' but the parameter is not specified or passed as null or empty string then an attempt is made to parse the svalue assuming that it has a valid format for the session locale.
     */
    ConvertToNeutral(svalue : string, vtype : string, datePtrn : string) : string
    /**
     * Converts utcStr date to string representing the same moment of time in the time zone of the session in neutral format.
     * @param utcStr - If utcStr doesn't have an offset it's interpreted as UTC date/time; i.e. as it would have offset +0000. If the parameter has an offset then it's interpreted as the exact moment of time that is specified by the parameter.
     * @param inPattern - Invariant culture date time format.
     * @returns The convertation result.
     */
    ConvertUtcDateTimeToNeutral(utcStr : string, inPattern : string) : string
    /**
     * Returns offset in minutes between corporate time zone and the local time zone of the client. If the corporate time zone is not defined by the Innovator then '0' is returned.
     * @returns Offset in minutes
     */
    GetCorporateToLocalOffset() : number
    /**
     * Returns code of the default language.
     * @returns Language code, e.g. "en"
     */
    GetDefaultLanguageCode() : string
    /**
     * Returns suffix of the default language.
     * @returns Language suffix, e.g. "_en"
     */
    GetDefaultLanguageSuffix() : string
    /**
     * Returns Innovator language code for the session language.
     * @returns Language code, e.g. "en"
     */
    GetLanguageCode() : string
    /**
     * Returns suffix of the language for the session language.
     * @returns Language suffix, e.g. "_en"
     */
    GetLanguageSuffix() : string
    /**
     * Returns locale of the current session.
     * @returns Locale, e.g. "en-US"
     */
    GetLocale() : string
    /**
     * Returns time zone of the session.
     * @returns Time zone, e.g. "US Eastern Standard Time". The value is one of keys from the registry entry: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
     */
    GetTimeZone() : string
    /**
     * Returns locale specific date-time pattern that corresponds to the passed Innovator pattern (e.g. 'short_date').
     * @param innovatorDatePattern - One of possible values: short_datelong_dateshort_date_timelong_date_timeshort_timelong_time
     * @returns Date-time pattern, e.g. "yyyy-MM-dd"
     */
    GetUIDatePattern(innovatorDatePattern : string) : string
  }
  interface Innovator {
    /**
     * Sends request to Innovator server and returns server response as an item.
     * @param AML - AML script to be sent to Innovator server.
     * @returns Server response.
     */
    applyAML(AML : string) : Aras.IOM.Item
    /**
     * Apply a method by name, passing a string value as its body.
     * @param methodName - Name of the method.
     * @param body - Context for the method (method item).
     */
    applyMethod(methodName : string, body : string) : Aras.IOM.Item
    /**
     * Sends SQL request to Innovator server and returns server response as an Item.
     * @param sql - SQL to be sent to Innovator server.
     * @returns Server response.
     */
    applySQL(sql : string) : Aras.IOM.Item
    /**
     * Computes the MD5 hash value for the specified string.
     * @returns MD5 hash value.
     */
    calcMD5(val : string) : string
    /**
     * Consumes license for feature
     * @param featureName - the name on the feature
     * @returns Returns id of consumed license
     */
    ConsumeLicense(featureName : string) : string
    /**
     * Returns an Item where the nodeList property of the Item contains Activity Items.
     * @param state - InBaseket view mode; possible values - "Active" | "Pending" | "Both".
     * @param userId - User ID.
     */
    getAssignedActivities(state : string, userId : string) : Aras.IOM.Item
    /**
     * Returns the server connection set on the instance.
     * @returns Server connection object that implements IServerConnection interface. The real type of the server connection object depends on what was passed to the IomFactory.CreateInnovator(IServerConnection) when the instance of the Innovator class was created.
     */
    getConnection() : Aras.IOM.IServerConnection
    /**
     * Returns file full file url. In some cases with AuthenticationBroker's token.
     */
    getFileUrl(fileId : string, type : Aras.IOM.UrlType) : string
    getFileUrls(fileIds : System.Collections.ArrayList, type : Aras.IOM.UrlType) : System.Collections.ArrayList
    /**
     * Returns current internationalization context. Aras.IOM.I18NSessionContext
     * @returns Current I18NSessionContext of the session.
     */
    getI18NSessionContext() : Aras.IOM.I18NSessionContext
    /**
     * Returns an Item object that matches the ItemType name and ID for the Item. Aras.IOM.Innovator.getItemByKeyedName(System.String,System.String)
     * @param itemTypeName - Name of the ItemType.
     * @param id - Item's ID.
     * @returns If request to the server failed the method returns an "error" item; if no item with specified type and id found in the database the method returns 'null'; otherwise the method returns the found item.
     */
    getItemById(itemTypeName : string, id : string) : Aras.IOM.Item
    /**
     * Returns an Item object that matches the ItemType name and keyed name for the Item. Aras.IOM.Innovator.getItemById(System.String,System.String)
     * @param itemTypeName - Name of the ItemType.
     * @param keyedName - Keyed name for the searched item.
     * @returns If request to the server failed the method returns an "error" item; if no item with specified type and id found in the database the method returns 'null'; otherwise the method returns the found item.
     */
    getItemByKeyedName(itemTypeName : string, keyedName : string) : Aras.IOM.Item
    /**
     * Returns an Item with the node property referencing the first found <Item> node from the passed ArasXmlDocument.
     * @param dom - Instance of ArasXmlDocument.
     * @returns null if passed ArasXmlDocument doesn't have an <Item> node; new Item otherwise.
     */
    getItemInDom(dom : Element) : Aras.IOM.Item
    /**
     * A new 32 character hex string based on a GUID.
     * @returns New GUID.
     */
    getNewID() : string
    /**
     * Returns the next sequence value by sequence name.
     * @param sequenceName - Sequence name.
     * @returns New sequence value if request to the server succeeded, null otherwise.
     */
    getNextSequence(sequenceName : string) : string
    /**
     * Returns aliases of the logged-in user.
     * @returns Comma delimited string of Identity ID's; if request to the server failed or no aliases were found the return value is an empty string.
     */
    getUserAliases() : string
    /**
     * Returns id of the user assosiated with a given instance of Innovator if this user is currently logged in, otherwise throws "Not logged in" exception.
     * @returns User id.
     */
    getUserID() : string
    /**
     * Returns a new "error" item.
     * @param explanation - Is used to populate the <faultstring> tag inside <Fault> node. According to the SOAP 1.1 specification the faultstring element is intended to provide a human readable explanation of the fault and is not intended for algorithmic processing. Note, that passed message is set as InnerText on the <faultstring> element without any pre-processing, so symbols like '<', '>', etc. will be escaped.
     * @returns Created "error" item.
     */
    newError(explanation : string) : Aras.IOM.Item
    /**
     * Returns a new Item. Aras.IOM.Item.newItem
     * @returns Newly created instance of Item.
     */
    newItem() : Aras.IOM.Item
    /**
     * Returns a new Item with the specified type. Aras.IOM.Item.newItem(System.String)
     * @param itemTypeName - Name of the ItemType.
     * @returns Newly created instance of Item.
     */
    newItem(itemTypeName : string) : Aras.IOM.Item
    /**
     * Returns a new Item with the specified type and action. Aras.IOM.Item.newItem(System.String,System.String)
     * @param itemTypeName - Name of the ItemType.
     * @param action - Name of action (e.g. "get", "update", etc.)
     * @returns Newly created instance of Item.
     */
    newItem(itemTypeName : string, action : string) : Aras.IOM.Item
    /**
     * Returns an Item where the text passed in as the argument is the body for the <Result> tag.
     * @param resultBody - Text to be set as the body for the <Result> tag.
     * @returns Created item.
     */
    newResult(resultBody : string) : Aras.IOM.Item
    /**
     * Creates new ArasXmlDocument.
     * @returns Instance of System.Xml.ArasXmlDocument
     */
    newXMLDocument() : Element
  }
  
  interface Item {
    /**
     * Add specified item as a relationship item to the instance.
     * @param item - Items to be added to item's relationships.
     */
    addRelationship(item : Aras.IOM.Item)
    /**
     * Appends passed item to this.nodeList.
     * @param item - Item to append
     */
    appendItem(item : Aras.IOM.Item)
    /**
     * Applies the AML, which is the XML of 'this.dom'.
     * @param action - The action argument is optional and if passed is assigned to the action attribute. The action can be assigned when the Item was created or by the setAction() method.
     * @param argsObject - A collection of name-value pairs where 'name' is interpreted as 'property name' and 'value' as the property value. Specified in the collection properties are set on the item prior to applying its AML. 
     * @returns Returns an Item where the dom property is the XML returned from the server. The dom may contain an Item, a forest of Items (i.e. a disjoint union of AML trees), or an Error.
     */
    apply(action? : string, argsObject? : object) : Aras.IOM.Item
    /**
     * Applies the AML, which is the XML of 'this.dom'.
     * @param action - The action argument is optional and if passed is assigned to the action attribute. The action can be assigned when the Item was created or by the setAction() method.
     * @param argsObject - A collection of name-value pairs where 'name' is interpreted as 'property name' and 'value' as the property value. Specified in the collection properties are set on the item prior to applying its AML. 
     * @returns Returns an Item where the dom property is the XML returned from the server. The dom may contain an Item, a forest of Items (i.e. a disjoint union of AML trees), or an Error.
     */
    applyAsync(action? : string, argsObject? : object) : Promise<Aras.IOM.Item>
    /**
     * Performs XSL transformation of the item's DOM and returns the result of the transformation. IMPORTANT: Be very carefull when using slylesheets from untrusted urls, there's a possibility to use scripts in the stylesheets with the code that can cause damage. Make sure that the stylesheet doesn't contain intrader's script code before using.
     * @param xslStylesheet - If type='text' then it's XML text for the stylesheet; if type='url' then it's URL of a stylesheet file.
     * @param type - The type argument is either 'text' or a 'url' (case insensitive).
     * @returns String that represents XML of the item's DOM after XSL transformation.
     */
    applyStylesheet(xslStylesheet : string, type : string) : string
    /**
     * Attach physical file to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.
     * @param filePath - Path to the physical file.
     */
    attachPhysicalFile(filePath : string)
    /**
     * Attach physical file to the item. Calling the method means that the physical will be streamed to the server when apply() is called on the item.
     * @param filePath - Path to the physical file.
     * @param vaultServerId - Vault server id.
     */
    attachPhysicalFile(filePath : string, vaultServerId : string)
    /**
     * Cancels the workflow process. Item's type must be "Workflow Process".
     */
    cancelWorkflow()
    /**
     * Checkout physical file from the vault to the specified local directory.
     * @param dir - Path to the directory to which the file will be checked out. The path can be either relative to the location of the client executable or absolute.
     * @returns If checkout has failed the method returns an "error" item; otherwise this is returned.
     */
    checkout(dir : string) : Aras.IOM.Item
    /**
     * Clones the item.
     * @param cloneRelationships - If true, all relationships of the item are cloned as well.
     * @returns Cloned item.
     */
    clone(cloneRelationships : boolean) : Aras.IOM.Item
    /**
     * Closes the workflow process. Item's type must be "Workflow Process".
     */
    closeWorkflow()
    /**
     * Creates an item with the specified type and action and sets it as the specified property of this item.
     * @param propName - Name of property.
     * @param type - Type of the item property.
     * @param action - Name of the action that will be set on the item property.
     * @returns Created item with the specified type and action.
     */
    createPropertyItem(propName : string, type : string, action : string) : Aras.IOM.Item
    /**
     * Creates an item with the specified type and action and sets it as the related item on this item.
     * @param type - Type of the related item.
     * @param action - Name of the action that will be set on created related item.
     * @returns Created related item with specified type and action.
     */
    createRelatedItem(type : string, action : string) : Aras.IOM.Item
    /**
     * Creates new <Item> node with specified 'type' and 'action' under <Relationships> node inside this.node.
     * @param type - Value of attribute 'type' that will be set on the created <Item> node.
     * @param action - Value of attribute 'action' that will be set on the created <Item> node.
     * @returns Item that reference newly created <Item> node. Returned item shares it's DOM with this item, i.e. both items reference the same instance of ArasXmlDocument throught their dom properties.
     */
    createRelationship(type : string, action : string) : Aras.IOM.Item
    /**
     * A reference to the instance of ArasXmlDocument that holds the data for the Item in the AML format. ArasXmlDocument is an alias that represents System.Xml.XmlDocument when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMDocument when it used from COM (JavaScript).
     */
    dom : Document
    /**
     * Send e-mail to the specified identity. In order to do so, the method sends a special request to the Innovator server.
     * @param emailItem - Item of type "EMail Message"
     * @param identityItem - Item of type "Identity"
     * @returns 'true' if mail was successfully sent, 'false' otherwise
     */
    email(emailItem : Aras.IOM.Item, identityItem : Aras.IOM.Item) : boolean
    /**
     * Fetches from server default values for all properties of the item's ItemType and sets them on the item.
     * @param overwrite_current - If 'true', overwrite existing property values.
     * @returns If fetching failed, returns "error" item that contains information about the failure. Otherwise, returns this with set property values.
     */
    fetchDefaultPropertyValues(overwrite_current : boolean) : Aras.IOM.Item
    /**
     * Downloads a file to target path.
     * @param propertyName - Name of property of type File for which physical file needs to be downloaded
     * @param targetPath - Path to folder or file to which physical file should be downloaded. Here is examples of possible values: - Folder path, example: C:/temp/ - Full file path, example: C:/temp/1.txt
     * @param mode - Responsible for reflecting in which mode operation should be completed. 
     * @returns Item of type File. Property "checkedout_path" of item will be populated by the path to which file was downloaded.
     */
    fetchFileProperty(propertyName : string, targetPath : string, mode : Aras.IOM.FetchFileMode) : Aras.IOM.Item
    /**
     * Fetches from the server the locked status of the item using the item's ID.
     * @returns  -1 - failed to fetch item's lock status from server  0 not locked  1 locked by user  2 locked by other 
     */
    fetchLockStatus() : number
    /**
     * Fetches relationships of specified type from the server and sets them on the item.
     * @param relationshipTypeName - Name of the relationship type.
     * @returns If server request failed the method returns an "error" item; otherwise it returns this.
     */
    fetchRelationships(relationshipTypeName : string) : Aras.IOM.Item
    /**
     * Fetches relationships of specified type from the server and sets them on the item. Specified select list will be set on the request AML.
     * @param relationshipTypeName - Name of the relationship type.
     * @param selectList - Select list that is set on attribute 'select' of the request (see "Programmer's Guide" for more info on format of select list).
     * @returns If server request failed the method returns an "error" item; otherwise it returns this.
     */
    fetchRelationships(relationshipTypeName : string, selectList : string) : Aras.IOM.Item
    /**
     * Fetches relationships of specified type from the server and sets them on the item. Specified select list and order are set on the request AML.
     * @param relationshipTypeName - Name of the relationship type.
     * @param selectList - Select list that is set on attribute 'select' of the request (see "Programmer's Guide" for more info on format of select list).
     * @param orderBy - The value is set on attribute 'order_by' of the request (see "Programmer's Guide" for more info on format of 'order_by').
     * @returns If server request failed the method returns an "error" item; otherwise it returns this.
     */
    fetchRelationships(relationshipTypeName : string, selectList : string, orderBy : string) : Aras.IOM.Item
    /**
     * Returns the 'action' attribute from the Item node. Aras.IOM.Item.getAttribute(System.String)
     * @returns Value of the 'action' attribute if the attribute exists, empty string otherwise
     */
    getAction() : string
    /**
     * Returns value of the attribute with the specified name on the item's node.
     * @param attributeName - The qualified name of the attribute.
     * @returns Attribute value or null if the attribute doesn't exist
     */
    getAttribute(attributeName : string) : string
    /**
     * Returns value of the attribute with the specified name on the item's node.
     * @param attributeName - The qualified name of the attribute.
     * @param defaultValue - Default value of the attribute.
     * @returns Attribute value if the attribute exists, default value otherwise
     */
    getAttribute(attributeName : string, defaultValue : string) : string
    /**
     * Gets error code of the "error" item. Aras.IOM.Item.getErrorCode
     * @returns Value of <faultcode>. If the item is not an "error" item, empty string is returned.
     */
    getErrorCode() : string
    /**
     * Returns details of the error item.
     * @returns If the instance is not an error item an empty string is retured.
     */
    getErrorDetail() : string
    /**
     * Returns the content of the <faultactor> element of SOAP Fault element.
     * @returns If the instance is not an error item, an empty string is returned.
     */
    getErrorSource() : string
    /**
     * Returns the error message. Aras.IOM.Item.setErrorString(System.String)
     * @returns The returned value is obtained from the <faultstring> tag of <Fault>. If the instance is not an error item an emtpy string is returned.
     */
    getErrorString() : string
    /**
     * Same as getErrorCode(). Aras.IOM.Item.getErrorCode
     * @returns Value of <faultcode>.
     */
    getErrorWho() : string
    /**
     * Returns the filename for the attached file. This is only is meaningful if the type="File", otherwise throws an exception.
     * @returns Name of the physical file attached to the Item of type "File".
     */
    getFileName() : string
    /**
     * Returns ID of the Item node. According to AML standard ID could be set on <Item> either as the attribute with name 'id' or as a sub-tag <id> (i.e. item property) or both.
     * @returns ID of the item or empty string if ID was not found.
     */
    getID() : string
    /**
     * Returns instance of Innovator this Item "belongs" to.
     */
    getInnovator() : Aras.IOM.Innovator
    /**
     * Gets an item by index.
     * @param index - 0 based index
     * @returns Found item. Returned item shares its dom with this item (i.e. returned item and this item dom property reference the same instance of ArasXmlDocument).
     */
    getItemByIndex(index : number) : Aras.IOM.Item
    /**
     * Returns the number of items that the instance represents.
     * @returns '0' if the item is an error with error code 0 (No Items Found).'-1' if the item is an error of any other type N (where N is a positive integer for number of items that the instance represents) if the item is not an error 
     */
    getItemCount() : number
    /**
     * Gets an item (single or collection) resolving xpath specified.
     * @param xpath - XPath for selecting <Item> nodes
     * @returns Instance of the class that represents either a single item or a collection of items. The collection could be empty. The returned item shares its dom with this item, i.e. returned item dom and this.dom reference the same instance of ArasXmlDocument.
     */
    getItemsByXPath(xpath : string) : Aras.IOM.Item
    /**
     * Gets item's lock status based on the property locked_by_id.
     * @returns  0 not locked  1 locked by user  2 locked by other 
     */
    getLockStatus() : number
    /**
     * Returns Item object with the nodeList containing logical nodes that are children of the this.node. Aras.IOM.Item.isLogicalAras.IOM.Item.newANDAras.IOM.Item.newORAras.IOM.Item.newNOT
     * @returns Item object with the nodeList containing logical nodes that are direct children of the this.node. The returned item shares its dom with this item.
     */
    getLogicalChildren() : Aras.IOM.Item
    /**
     * Returns the Item object with the nodeList containing all logical nodes of this.node. Aras.IOM.Item.isLogicalAras.IOM.Item.newANDAras.IOM.Item.newORAras.IOM.Item.newNOT
     * @returns Item object with the nodeList containing all logical nodes of this.node. The returned item shares its dom with this item.
     */
    getLogicalItems() : Aras.IOM.Item
    /**
     * Generate new 32 character hex string globally unique identifier.
     * @returns GUID as a string
     */
    getNewID() : string
    /**
     * Returns a parent item of the instance.
     * @returns If this.node doesn't have an ancestor::Item, null is returned.
     */
    getParentItem() : Aras.IOM.Item
    /**
     * Gets value of the property with the specified name.
     * @param propertyName - Property name.
     * @param defaultValue - Default value of the property.
     * @param lang - Language for which the property value has to be returned. If null value is passed, the language of the current session is assumed.
     * @returns If the property is an item-property, ID of the item-property is returned. If the property doesn't exist or it's an item-property without ID, the default value is returned; otherwise the method returns value of the specified property name for the specified language.
     */
    getProperty(propertyName : string, defaultValue? : string, lang? : string) : string
    /**
     * Gets the specified attribute of the property with the specified name and language. Aras.IOM.Item.getPropertyCondition(System.String)
     * @param propertyName - Property name.
     * @param attributeName - Attribute name
     * @param defaultValue - Attribute default value
     * @param lang - Language for which the property attribute has to be returned. If null value is passed, the language of the current session is assumed.
     * @returns If either property with the specified name or the specified attribute on the property doesn't exist, returns the default value; otherwise returns value of the property attribute for the specified language.
     */
    getPropertyAttribute(propertyName : string, attributeName : string, defaultValue? : string, lang? : string) : string
    /**
     * Gets the 'condition' attribute of the property with the specified name and language. Aras.IOM.Item.getPropertyAttribute(System.String,System.String)
     * @param propertyName - Property name.
     * @param lang - Language for which the property condition has to be returned. If null value is passed, the language of the current session is assumed.
     * @returns If either property with the specified name or attribute 'condition' on the property doesn't exist, returns null.
     */
    getPropertyCondition(propertyName : string, lang? : string) : string
    /**
     * Gets item-property by name.
     * @param propertyName - Property name.
     * @returns Found item-property. If by some reason an item can't be returned (e.g. 'this.dom' doesn't have a property with the specified name or the property contains just id but type of the item-property is unknown), the method returns null. NOTE: If specified property name is 'id' then the method returns this item.
     */
    getPropertyItem(propertyName : string) : Aras.IOM.Item
    /**
     * Gets related item of the relationship.
     * @returns Related item. If by some reason the related item can't be returned (e.g. 'this.dom' doesn't have 'related_id' property or type of the related item is unknown), the method returns null.
     */
    getRelatedItem() : Aras.IOM.Item
    /**
     * Tries to find related item (xpath: "./related_id") on item's node and returns its ID. Aras.IOM.Item.getRelatedItem
     * @returns ID of the related item. If related item not found, return empty string.
     */
    getRelatedItemID() : string
    /**
     * Returns an item that is a collection of relationship item with specified type; each relationship item has only properties specified in the select list.
     * @param itemTypeName - Type of relationship.
     * @param selectAttr - Select list for relations items.
     * @returns Item that is a collection of relationship items with specified name. If this doesn't have any relationship of this type, the returned item nodeList will be empty.
     */
    getRelationships(itemTypeName : string, selectAttr : string) : Aras.IOM.Item
    /**
     * Returns an item that is a collection of relationship item with specified type; each relationship item has only properties specified in the select list.
     * @param itemTypeName - Type of relationship.
     * @param selectAttr - Select list for relations items.
     * @param orderByAttr - Comma delimited list of property names used to set the SQL "ORDER BY" clause.
     * @returns Item that is a collection of relationship items with specified name. If this doesn't have any relationship of this type, the returned item nodeList will be empty.
     */
    getRelationships(itemTypeName : string, selectAttr : string, orderByAttr : string) : Aras.IOM.Item
    /**
     * Returns an item that is a collection of all relationships items available on the instance.
     * @returns Item that is a collection of all relationships items available on the instance. If this doesn't have relationships, the returned item nodeList will be empty.
     */
    getRelationships() : Aras.IOM.Item
    /**
     * Returns an item that is a collection of relationships item with specified type available on the instance.
     * @param itemTypeName - Type of relationship.
     * @returns Item that is a collection of relationships items with specified name available on the instance. If this doesn't have any relationships of this type, the returned item nodeList will be empty.
     */
    getRelationships(itemTypeName : string) : Aras.IOM.Item
    /**
     * Returns 'InnerText' property of ArasXmlNode with xpath = Item.XPathResult from the item's dom.
     * @returns If this.dom is null or node with xpath = Item.XPathResult was not found, the method returns an empty string.
     */
    getResult() : string
    /**
     * Returns value of the 'type' attribute of the Item node.
     * @returns Value of 'type' attribute if the attribute exists, empty string otherwise.
     */
    getType() : string
    /**
     * Instantiates workflow for the item using specified workflow map.
     * @param workflowMapID - ID of a WorkflowMap.
     * @returns Returns a Workflow Process item created by this method or an "error" item.
     */
    instantiateWorkflow(workflowMapID : string) : Aras.IOM.Item
    /**
     * Checks if the instance represents a set of items and not a single item.
     * @returns 'true' if this.nodeList != null AND this.node == null, 'false' otherwise
     */
    isCollection() : boolean
    /**
     * This is the replacement for the old hasFault() function with the Boolean argument of false to indicate to ignore the zero based faults.
     * @returns 'true' if the item is an error but has faultcode="0", 'false' otherwise.
     */
    isEmpty() : boolean
    /**
     * Checks if the item is an "error item".
     * @returns 'true' if the item is an "error item" (i.e. this.dom has a top_level tag Item.XPathFault), 'false' otherwise
     */
    isError() : boolean
    /**
     * Fetches from the server the locked status of the item using the item's ID.
     * @returns  0 not locked  1 locked by user  2 locked by other 
     */
    isLocked() : number
    /**
     * Find out if the item's node is a "logical" node ("AND", "OR", "NOT").
     * @returns true if the this.node != null and this.node.LocalName is "AND" | "OR" | "NOT" (case insensitive); false otherwise.
     */
    isLogical() : boolean
    /**
     * Checks the attribute 'isNew' on the item.
     * @returns 'true' if the Item has the attribute 'isNew' set to '1', 'false' otherwise
     */
    isNew() : boolean
    /**
     * Checks if this.node is the root item in this.dom.
     * @returns 'true' if this.node is the top 'Item' node in this.dom, 'false' otherwise
     */
    isRoot() : boolean
    /**
     * This loads the dom property for the Item object with the passed AML. The method will also set the node and nodeList properties for the Item object according to the content of the loaded AML.
     * @param AML - String with AML script. For more details on format of AML please read "Innovator Programmer's Guide".
     */
    loadAML(AML : string)
    /**
     * Applies the 'lock' action on the item and returns the server response.
     * @returns Response item from the server.
     */
    lockItem() : Aras.IOM.Item
    /**
     * Inserts logical node with tag <and> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
     * @returns Logical "AND" item. Returned item shares dom with this item.
     */
    newAND() : Aras.IOM.Item
    /**
     * Creates a new Innovator object.
     * @returns New instance of Innovator.
     */
    newInnovator() : Aras.IOM.Innovator
    /**
     * Returns a new Item. Aras.IOM.Item.newItem(System.String)
     * @returns Newly created instance of Item.
     */
    newItem() : Aras.IOM.Item
    /**
     * Returns a new Item with the specified type. Aras.IOM.Item.newItem(System.String)
     * @param itemTypeName - Name of the ItemType.
     * @returns Newly created instance of Item.
     */
    newItem(itemTypeName : string) : Aras.IOM.Item
    /**
     * Returns a new Item with the specified type and action. Aras.IOM.Item.newItem(System.String,System.String)
     * @param itemTypeName - Name of the ItemType.
     * @param action - Name of action (e.g. "get", "update", etc.)
     * @returns Newly created instance of Item.
     */
    newItem(itemTypeName : string, action : string) : Aras.IOM.Item
    /**
     * Inserts logical node with tag <not> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
     * @returns Logical "NOT" item. Returned item shares dom with this item.
     */
    newNOT() : Aras.IOM.Item
    /**
     * Inserts logical node with tag <or> under the parent node, which can be Item or Logical, and returns an Item Object that represents a newly inserted logical node.
     * @returns Logical "OR" item. Returned item shares dom with this item.
     */
    newOR() : Aras.IOM.Item
    /**
     * Creates new ArasXmlDocument.
     * @returns Instance of System.Xml.ArasXmlDocument
     */
    newXMLDocument() : Element
    /**
     * A reference to the <Item> node in the dom for this Item instance. The type of node is System.Xml.XmlElement when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMElement when it used from COM (JavaScript).
     */
    node : Element
    /**
     * List of <Item> nodes from the dom for this Item instance. The type of nodeList is System.Xml.XmlNodeList when IOM namespace is used from .NET (C#, VBScript) and MSXML2.IXMLDOMNodeList when it used from COM (JavaScript).
     */
    nodeList : Element[]
    /**
     * Promote item to the specified state.
     * @param state - State to promote.
     * @param comments - If ItemType of the item is configured to log "history" records when items of the ItemType are created\promoted\etc., (i.e. if the ItemType's property "save_history" is set to "1") then the comments will be used as a comment for the "history" record about the promote event.
     * @returns "Result" item with inner text "Ok" in case of success. Otherwise "error" item (if promote failed).
     */
    promote(state : string, comments : string) : Aras.IOM.Item
    /**
     * Removes the specified attribute if the attribute exist; does nothing otherwise.
     * @param attributeName - The name of the attribute to remove.This is a qualified name.
     */
    removeAttribute(attributeName : string)
    /**
     * Remove specified item from the this.dom
     * @param item - Item to be removed.
     */
    removeItem(item : Aras.IOM.Item)
    /**
     * Removes logical node referenced by the passed item from this.node.
     * @param logicalItem - Logical item to be removed.
     */
    removeLogical(logicalItem : Aras.IOM.Item)
    /**
     * Removes the property tag with the specified name from the item's dom.
     * @param propertyName - Property name.
     */
    removeProperty(propertyName : string)
    /**
     * Removes the property tag with the specified name and language from the item's dom.
     * @param propertyName - Property name.
     * @param lang - Language for which the property needs to be removed. If null value is passed, the language of the current session is assumed.
     */
    removeProperty(propertyName : string, lang : string)
    /**
     * Modifies item's node by removing attribute on the specified property.
     * @param propertyName - Name of the property
     * @param attributeName - Name of the attribute
     */
    removePropertyAttribute(propertyName : string, attributeName : string)
    /**
     * Modifies item's node by removing attribute on the specified property with the specified xml:lang attribute.
     * @param propertyName - Name of the property
     * @param attributeName - Name of the attribute
     * @param lang - Language for which the property attribute needs to be removed. If null value is passed, the language of the current session is assumed.
     */
    removePropertyAttribute(propertyName : string, attributeName : string, lang : string)
    /**
     * Removes the passed item's node from the 'Relationships' node of the item.
     * @param item - The relationship item to be removed.
     */
    removeRelationship(item : Aras.IOM.Item)
    /**
     * Set the 'action' attribute on this.node. Aras.IOM.Item.setAttribute(System.String,System.String)
     * @param action - Action name
     */
    setAction(action : string)
    /**
     * Set the value of the attribute with the specified name on the item's node.
     * @param attributeName - The name of the attribute to create or alter. This is a qualified name. If the name contains a colon it is parsed into prefix and local name components.
     * @param attributeValue - The value to set for the attribute.
     */
    setAttribute(attributeName : string, attributeValue : string)
    /**
     * Sets error code on the "error" item. Aras.IOM.Item.setErrorCode(System.String)
     * @param errcode - Error code to set.
     */
    setErrorCode(errcode : string)
    /**
     * Sets the detailed error message of the error item. Aras.IOM.Item.getErrorDetail
     * @param detail - Error details that are set as InnerText on <detail> element of <Fault> without any pre-processing, so symbols like '<', '>', etc. will be escaped.
     */
    setErrorDetail(detail : string)
    /**
     * Sets the <faultactor> of the SOAP Fault element. If the instance is not an error item, the method does nothing.
     * @param source - Value to be set on 'faultactor' element of SOAP Fault.
     */
    setErrorSource(source : string)
    /**
     * Sets the error message of the error item.
     * @param errorMessage - Error message to be set.
     */
    setErrorString(errorMessage : string)
    /**
     * Same as setErrorCode(). Aras.IOM.Item.setErrorCode(System.String)
     * @param who - Value to set
     */
    setErrorWho(who : string)
    /**
     * Set the filename for the attached file. This is only is meaningful if the type="File" and will cause the apply() to submit multipart/form-data to the VaultServer.
     */
    setFileName(filePath : string)
    /**
     * Set a file to an item reference.
     * @param propertyName - name of property of type File for which new physical file should be set
     * @param pathToFile - path to physical file which should be attached to property of the item
     * @returns Item of type File generated by method
     */
    setFileProperty(propertyName : string, pathToFile : string) : Aras.IOM.Item
    /**
     * Set the id attribute on the Item node. If the item has the property id as well, the property is set too.
     * @param id - ID of the item
     */
    setID(id : string)
    /**
     * Gets new ID by calling getNewID() then passes obtained ID to setID(id). Aras.IOM.Item.getNewIDAras.IOM.Item.setID(System.String)
     */
    setNewID()
    /**
     * Set the property with the specified name. If property doesn't exist on the item, create it first and then set.
     * @param propertyName - Property name.
     * @param propertyValue - Value to be set on the property.
     */
    setProperty(propertyName : string, propertyValue : string)
    /**
     * Set the property with the specified name and language. If property doesn't exist on the item, create it first and then set. Aras.IOM.Item.setPropertyCondition(System.String,System.String)Aras.IOM.Item.setPropertyAttribute(System.String,System.String,System.String)
     * @param propertyName - Property name.
     * @param propertyValue - Value to be set on the property.
     * @param lang - Language for which the property needs to be set. If null value is passed, the language of the current session is assumed.
     */
    setProperty(propertyName : string, propertyValue : string, lang : string)
    /**
     * Set the attribute for the specified property.
     * @param propertyName - Property name
     * @param attributeName - Attribute name
     * @param attributeValue - Attribute value to be set
     */
    setPropertyAttribute(propertyName : string, attributeName : string, attributeValue : string)
    /**
     * Set the attribute for the specified property and language.
     * @param propertyName - Property name
     * @param attributeName - Attribute name
     * @param attributeValue - Attribute value to be set
     * @param lang - Language for which the property attribute has to be set. If null value is passed, the language of the current session is assumed.
     */
    setPropertyAttribute(propertyName : string, attributeName : string, attributeValue : string, lang : string)
    /**
     * Sets the attribute 'condition' on the specified property. Aras.IOM.Item.setPropertyAttribute(System.String,System.String,System.String)
     * @param propertyName - Property name
     * @param condition - Condition value
     */
    setPropertyCondition(propertyName : string, condition : string)
    /**
     * Sets the attribute 'condition' on the specified property with the specified language. Aras.IOM.Item.setPropertyAttribute(System.String,System.String,System.String)
     * @param propertyName - Property name
     * @param condition - Condition value
     * @param lang - Language for which the property condition has to be set. If null value is passed, the language of the current session is assumed.
     */
    setPropertyCondition(propertyName : string, condition : string, lang : string)
    /**
     * Sets a property to an item reference.
     * @param propertyName - Name of the property
     * @param item - Instance of Item whose 'node' appends or replaces child <Item> node under the specified property.
     * @returns Instance of the class that represent the item-property. Returned item shares its 'dom' with this (i.e. dom property of both instances points to the same instance of ArasXmlDocument).
     */
    setPropertyItem(propertyName : string, item : Aras.IOM.Item) : Aras.IOM.Item
    /**
     * Sets the 'related_id' property to an item reference. Aras.IOM.Item.createRelatedItem(System.String,System.String)
     * @param ritem - Related item
     */
    setRelatedItem(ritem : Aras.IOM.Item)
    setThisMethodImplementation(thisMethodImplemenation)
    /**
     * Set the 'type' attribute on the Item node.
     * @param itemTypeName - Name of the item type
     */
    setType(itemTypeName : string)
    /**
     * Starts the workflow process. Item's type must be "Workflow Process".
     */
    startWorkflow()
    thisMethod(inDom : Element, inArgs : object) : any
    /**
     * Returns AML string that represents the current Aras.IOM.Item.
     */
    ToString() : string
    /**
     * Applies the 'unlock' action on the item and returns the server response.
     * @returns Response item from the server.
     */
    unlockItem() : Aras.IOM.Item
  }
}
Clone this wiki locally