### Labels start() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns the starting row or column number within the Grid for the current chunk. ```javascript start(): number; ``` -------------------------------- ### Source Data Example Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/partialListCopy.md This is an example of the source data structure used in the script, representing items with properties like 'Parent', 'Code', 'p.Наименование', and 's.Все валюты'. ```javascript [ { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000011", "p.Наименование": "Нгултрум", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000019", "p.Наименование": "Риель", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000042", "p.Наименование": "Даласи", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000043", "p.Наименование": "Седи", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000095", "p.Наименование": "Бальбоа", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000096", "p.Наименование": "Кина", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000097", "p.Наименование": "Гуарани", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000102", "p.Наименование": "Российский рубль", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000128", "p.Наименование": "Египетский фунт", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000131", "p.Наименование": "Доллар США", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000167", "p.Наименование": "Евро", "s.Все валюты": "true" }, { "Parent": "Выгружается ЕОС НСИ", "Code": "01001FG010000000000170", "p.Наименование": "Злотый", "s.Все валюты": "true" }, { "Parent": "Ручной ввод", "Code": "01001FG020000000000001", "p.Наименование": "Боливар Соберано", "s.Все валюты": "true" }, { "Parent": "Ручной ввод", "Code": "01001FG020000000000003", "p.Наименование": "Добра", "s.Все валюты": "true" } ] ``` -------------------------------- ### GridRange columnStart() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns the starting column number of the GridRange. ```javascript columnStart(): number; ``` -------------------------------- ### GridRange rowStart() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns the starting row number of the GridRange. ```javascript rowStart(): number; ``` -------------------------------- ### Get Options Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the Options interface for configuring connection settings. ```javascript options(): Options; ``` -------------------------------- ### Get Certificate Path Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the file path for the certificate. ```javascript getPath(path: string): string; ``` -------------------------------- ### Params: Get All Parameters Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves all parameters as a JavaScript Object. ```javascript getAll(): Object; ``` -------------------------------- ### Get URL Path Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the server path from the URL. ```javascript getUrlPath(): string; ``` -------------------------------- ### Get URL Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the currently set URL. ```javascript getUrl(): string; ``` -------------------------------- ### Example Usage: Sending an Urgent Notification Source: https://github.com/optimacros/scripts_documentation/blob/main/API/notifications.md Demonstrates how to use the Web.Builder interface to send an urgent web notification. ```APIDOC ## Example Usage: Sending an Urgent Notification ### Description This example illustrates sending an urgent web notification by calling the `markUrgent()` method on the `Web.Builder` instance. ### Code ```js const channelName = 'WEB notices'; const recepients = ['tester1@example.com','tester2@example.com','%ALL_MODELLERS%']; const sender = om.notifications.web(channelName); try { const result = sender .setTo(recepients) .setSubject('Hello from scripts!') .setBody('Some URGENT message!') .markUrgent() .send(); console.log('Success:\n\n'); console.log(result.messageId); } catch (e) { console.log(`Error: ${e.message}`); } ``` ``` -------------------------------- ### Get URL Object Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the Url object for building the URL. ```javascript url(): Url; ``` -------------------------------- ### Get Redirect Protocols Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the list of protocols for which redirects are allowed. ```javascript getProtocols(): string[]; ``` -------------------------------- ### Full Script Example Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/rowsColumnsFilters.md A complete script demonstrating how to open a multicube, access its pivot view, create a grid, and log row/column counts along with row dimension names. ```javascript const multicubesTab = om.multicubes.multicubesTab(); const multicubeTab = multicubesTab.open('Условия и расчёты'); const pivot = multicubeTab.pivot('Условия и расчёты 3'); const grid = pivot.create(); console.log(`Rows: ${grid.rowCount()} `); console.log(`Columns: ${grid.columnCount()} `); const definitionInfo = grid.getDefinitionInfo(); let rowDimensionNames = []; definitionInfo.getRowDimensions().forEach(gridDimension => { const entity = gridDimension.getDimensionEntity(); rowDimensionNames.push(entity.name()); }); console.log(`Row dimensions: ${rowDimensionNames.join(', ')} `); ``` -------------------------------- ### Get Shared Folder Adapter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns an interface for accessing a shared folder. Shared folders are server directories added by an administrator during Workspace installation via a manifest. ```javascript sharedFolder(id: string): Filesystem; ``` -------------------------------- ### BaseAdapter Load Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns a Filesystem object with pre-configured settings. This method is essential for initializing the filesystem adapter. ```javascript load(): Filesystem; ``` -------------------------------- ### Get HTTP Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Retrieves the HTTP method used for the request. The API service supports only GET and POST methods. ```javascript getMethod(): string; ``` -------------------------------- ### Example Source List Data Structure Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/listReduce.md Illustrates the structure of the data read from the source list, including the 'List', 'Parent', and other properties. ```json [ { "List": "Объекты реализации", "Parent": "ЦФО-3-1||110", "Контрагент": "Контрагент 1", "Договор": "Договор 1" }, { "List": "Объекты реализации", "Parent": "ЦФО-3-1||110", "Контрагент": "Контрагент 1", "Договор": "Договор 1" }, // ... { "List": "Объекты реализации", "Parent": "ЦФО-3-3||112", "Контрагент": "Контрагент 20", "Договор": "Договор 2" }, { "List": "Объекты реализации", "Parent": "ЦФО-3-3||112", "Контрагент": "Контрагент 20", "Договор": "Договор 2" } ] ``` -------------------------------- ### Get File Infos Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Retrieves an interface for managing file information in the response. ```typescript getFileInfos(): ResponseFileInfos; ``` -------------------------------- ### Run 'Hello, world!' Script in Model Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/hw.md Execute a simple 'Hello, world!' script within the Optimacros model interface. Ensure the script is added and saved before running. ```javascript console.log('Hello, world!'); ``` -------------------------------- ### Get Selected Entity from Page Selector Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/rowsColumnsFilters.md Retrieve the selected entity within a filter's dimension. This complements `getDimensionEntity` to get the specific value chosen by the user. ```javascript let pageSelectedNames = []; definitionInfo.getPageSelectors().forEach(pageSelector => { const dimensionEntity = pageSelector.getDimensionEntity(); const selectedEntity = pageSelector.getSelectedEntity(); }); ``` -------------------------------- ### Example of Loaded Environment Variables Source: https://github.com/optimacros/scripts_documentation/blob/main/API/env.md Illustrates the structure of environment variables loaded from a multicube, showing nested objects based on cube structure. ```json { "cube1": { "Германия": { "May 19": 12, "Jun 19": 10 }, "Берлин": { "May 19": 4, "Jun 19": 5 }, "Франция": { "May 19": 7, "Jun 19": 13 }, "Париж": { "May 19": 2, "Jun 19": 10 } }, "Cube #15": { "Германия": { "May 19": null, "Jun 19": null }, "Берлин": { "May 19": null, "Jun 19": "Марс123" }, "Франция": { "May 19": null, "Jun 19": null }, "Париж": { "May 19": "Марс123", "Jun 19": null } } } ``` -------------------------------- ### Script Output Example Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/partialListCopy.md This shows the expected console output after the script has been executed, including messages about reading lists, changing items, mapping parents, and creating new items. ```text Reading source list Reading destination list and changing existing items 2 existing items changed Mapping parents Creating new items ``` -------------------------------- ### Get Row Dimension Names Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/rowsColumnsFilters.md Retrieves and logs the names of dimensions present in the rows of the grid. It iterates through row dimensions, gets their entity names, and joins them into a comma-separated string. ```javascript const definitionInfo = grid.getDefinitionInfo(); let rowDimensionNames = []; definitionInfo.getRowDimensions().forEach(gridDimension => { const entity = gridDimension.getDimensionEntity(); rowDimensionNames.push(entity.name()); }); console.log(`Row dimensions: ${rowDimensionNames.join(', ')} `); ``` -------------------------------- ### Get Verify Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the Verify interface for SSL certificate verification settings. ```javascript verify(): Verify; ``` -------------------------------- ### Example Usage: Sending a Standard Notification Source: https://github.com/optimacros/scripts_documentation/blob/main/API/notifications.md Demonstrates how to use the Web.Builder interface to send a standard web notification. ```APIDOC ## Example Usage: Sending a Standard Notification ### Description This example shows how to configure and send a basic web notification using the `Web.Builder` interface. ### Code ```js const channelName = 'WEB notices'; const recepients = ['tester1@example.com','tester2@example.com','%ALL_MODELLERS%']; const sender = om.notifications.web(channelName); try { const result = sender .setTo(recepients) .setSubject('Hello from scripts!') .setBody('Some message') .send(); console.log('Success:\n\n'); console.log(result.messageId); } catch (e) { console.log(`Error: ${e.message}`); } ``` ``` -------------------------------- ### Set HTTP Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Sets the HTTP method for the request. Available methods include GET, POST, DELETE, PUT, HEAD, OPTIONS. The default method is GET. Returns true on success. ```javascript setMethod(type: string): boolean; ``` -------------------------------- ### Get Available Hash Algorithms Source: https://github.com/optimacros/scripts_documentation/blob/main/API/crypto.md Retrieves a list of hashing algorithms supported by the `hash()` method. ```javascript getHashAlgorithms(): string[]; ``` -------------------------------- ### Get FTP Adapter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns an interface for accessing the FTP file system. Requires the FTPAdapter. ```javascript ftp(): FTPAdapter; ``` -------------------------------- ### Get Strict Redirect Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md This method is not implemented. ```javascript getStrict(): boolean; ``` -------------------------------- ### PathObj getSystem Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns a reference to the file system. ```javascript getSystem(): Filesystem; ``` -------------------------------- ### Get All Parameters Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Retrieves all parameters passed in the request as an array of ParamInfo objects. ```javascript getAll(): ParamInfo[]; ``` -------------------------------- ### Get User Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the username or null if it is not set. ```javascript getUser(): string | null; ``` -------------------------------- ### Filesystem.createDir Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Creates a directory. ```APIDOC ## createDir(path: string): null ### Description Creates the directory at `path`. Intermediate directories will be created if necessary. If the directory already exists, this operation does nothing. Returns `null` upon successful completion. ### Parameters #### Path Parameters - **path** (string) - Required - The path of the directory to create. ``` -------------------------------- ### Create Directory Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Creates a directory at the specified path, including any necessary intermediate directories. If the directory already exists, this operation does nothing. Returns null on success. ```javascript createDir(path: string): null; ``` -------------------------------- ### Get Parameter Name Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns the name of the parameter. ```javascript getName(): string; ``` -------------------------------- ### CSV Export and Reading Setup Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/csv.md Initializes CSV export settings, opens a multicube tab, creates a pivot grid, and sets up a CSV reader with specific encoding. This prepares the environment for reading and processing CSV data. ```javascript const CUBES_MK = { cubePrize: "Приз", cubePoints: "Уровень игрока" }; const multicubesTab = om.multicubes.multicubesTab(); const multicubeTab = multicubesTab.open("Уровни игроков"); const pivot = multicubeTab.pivot(); const grid = pivot.create(); const storageExporter = grid.storageExporter().setFormat("csv").setEncoding("WINDOWS-1251"); const exportResult = storageExporter.export().copyToLocal("export"); const resultInfo = om.common.resultInfo(); const localFileSystem = om.filesystems.local(); const filePath = localFileSystem.getPathObj("export"); const fileManager = om.filesystems.filesDataManager(); const csvReader = fileManager.csvReader(filePath) .changeFileCharset("WINDOWS-1251"); const generator = csvReader.generator(); const dimensionsLength = 2; let firstLaunch = true; let indexMap = {}; ``` -------------------------------- ### Get Model ID Source: https://github.com/optimacros/scripts_documentation/blob/main/API/common.md Retrieves the unique identifier for the model. ```javascript id(): string; ``` -------------------------------- ### Get Storage Importer Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns an interface for fast data import into a multicube. This is optimized for quick data loading. ```javascript storageImporter(): StorageImporter; ``` -------------------------------- ### Initialize and Validate Script Environment Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/partialListCopy.md Loads the environment configuration and performs a crucial check to ensure the source and destination property lists have the same length. This is necessary because the script maps properties by index, not by name. ```javascript // v1.0 const ENV = om.environment.get('ENV'); if (!ENV) { throw new Error('ENV not defined'); } if (ENV.SRC_PROPS.length !== ENV.DST_PROPS.length) { throw new Error('Списки свойств приёмника и источника разной длины!'); } ``` -------------------------------- ### Get Fragment Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the fragment identifier or null if it is not set. ```javascript getFragment(): string | null; ``` -------------------------------- ### Инициализация скрипта свёртки справочника Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/listReduce.md Скрипт начинается с чтения объекта настроек ENV из переменной окружения и проверки его наличия. Затем сохраняется ссылка на вкладку справочника-приёмника. ```javascript // v1.1 const ENV = om.environment.get('ENV'); if (!ENV) { throw new Error('ENV not defined'); } ``` ```javascript const dstListTab = om.lists.listsTab().open(ENV.DST_LIST); // Set formula for NAME_PROPERTY if (ENV.NAME_PROPERTY) { om.common.requestInfo().logStatusMessage(`Setting formula for ${ENV.NAME_PROPERTY}`, true); for (const chunk of dstListTab.customPropertiesTab().pivot().rowsFilter(ENV.NAME_PROPERTY).columnsFilter('Formula').create().range().generator()) { chunk.cells().first().setValue(ENV.PROPERTIES.map((prop) => "TEXT('" + prop + "')").join(' & "|" & ')); } } ``` -------------------------------- ### Get Port Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the port number or null if it is not set. ```javascript getPort(): number | null; ``` -------------------------------- ### Import Data with SqlBulkCopyBuilder Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Imports data from a specified file path into the database. It constructs a bcp command based on the builder's flags and waits for the import to complete. ```js import(path: string): SqlBulkCopyResult; ``` -------------------------------- ### Get URL Scheme Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the URL scheme (protocol). ```javascript getUrlScheme(): string; ``` -------------------------------- ### Perform Import Source: https://github.com/optimacros/scripts_documentation/blob/main/API/exportImport.md Initiates the data import process into the Grid based on the configured settings. Returns 'this' for chaining. Throws an exception if the file path has not been set. ```javascript import(): this; ``` -------------------------------- ### Get Client Information Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns an interface for retrieving details about the client that sent the request. ```javascript getClientInfo(): ClientInfo; ``` -------------------------------- ### With Promise Option Source: https://github.com/optimacros/scripts_documentation/blob/main/API/scriptChains.md Enables running the script with a Promise. Defaults to `false`. ```javascript withPromise(withPromise: boolean): this; ``` -------------------------------- ### Get Import File Path Source: https://github.com/optimacros/scripts_documentation/blob/main/API/exportImport.md Retrieves the path of the file to be imported. Throws an exception if the path has not been set. ```javascript getFilePath(): string; ``` -------------------------------- ### Get All Cursor Results Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns all response documents as an array. ```javascript all(): Object[]; ``` -------------------------------- ### Filesystem.makeGlobalFile Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Registers an existing file in the global file registry. ```APIDOC ## makeGlobalFile(name: string, extension: string, path: string, copy?: boolean): string ### Description This function is intended for use only with the local filesystem. It registers an existing file at `path` in the global file registry under the name `{name}.{extension}`. The `copy` argument (defaults to `true`) determines whether the file at `path` is copied or moved to the global registry. Returns the hash of the file. Typically used for passing to `ResultInfo.addFileHash()`. ### Parameters #### Path Parameters - **name** (string) - Required - The base name for the file in the global registry. - **extension** (string) - Required - The extension for the file in the global registry. - **path** (string) - Required - The path to the existing file. - **copy** (boolean) - Optional - If true, the file is copied; if false, it is moved. Defaults to true. ``` -------------------------------- ### Get Deleted Count Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns the number of documents deleted. ```javascript getDeletedCount(): number; ``` -------------------------------- ### Get File Information Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns an interface for accessing information about files uploaded by the client. ```javascript getFileInfos(): RequestFileInfos; ``` -------------------------------- ### Get Modified Count Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns the number of documents that were modified. ```javascript getModifiedCount(): number; ``` -------------------------------- ### Filesystem.download Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Downloads a file from the current filesystem to the local filesystem. ```APIDOC ## download(from: string, to: string): boolean ### Description Copies a file from the path `from` in the current filesystem to the local filesystem at `to`. Returns a boolean indicating success. ### Parameters #### Path Parameters - **from** (string) - Required - The path of the file in the current filesystem. - **to** (string) - Required - The destination path on the local filesystem. ``` -------------------------------- ### Load MongoDB Connection Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Creates and returns the MongoDB connection interface. This method finalizes the connection setup. ```typescript load(): Connection; ``` -------------------------------- ### Set Host Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Sets the host name or address for the URL. The default host is ''. Returns true upon successful setting. ```javascript setHost(host: string): boolean; ``` -------------------------------- ### Get Error Code Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the error code from the ResponseErrors interface. ```javascript getCode(): number; ``` -------------------------------- ### SqlBulkCopyBuilder.import Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Imports data from a specified file path into the database. This method constructs a bcp command based on the builder's flags, waits for the import to complete, and returns a SqlBulkCopyResult. ```APIDOC ## import ### Description Imports data from a specified file path into the database. This method constructs a bcp command based on the builder's flags, waits for the import to complete, and returns a SqlBulkCopyResult. ### Method ```js import(path: string): SqlBulkCopyResult; ``` ### Parameters #### Path Parameters - **path** (string) - Required - The path to the file to import. ``` -------------------------------- ### Get Column Count Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns the total number of columns in the grid. ```javascript columnCount(): number; ``` -------------------------------- ### Get Row Count Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns the total number of rows in the grid. ```javascript rowCount(): number; ``` -------------------------------- ### SqlBulkCopyBuilder.format Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Creates a format file based on the builder's flags and specified parameters. This method constructs a bcp format command, waits for its completion, and returns a SqlBulkCopyResult. If the xml flag is true, the format file will be XML-based. ```APIDOC ## format ### Description Creates a format file based on the builder's flags and specified parameters. This method constructs a bcp format command, waits for its completion, and returns a SqlBulkCopyResult. If the xml flag is true, the format file will be XML-based. ### Method ```js format(path: string, xml: boolean): SqlBulkCopyResult; ``` ### Parameters #### Path Parameters - **path** (string) - Required - The path where the format file will be created. - **xml** (boolean) - Optional - If true, creates an XML-based format file. Defaults to true. ``` -------------------------------- ### Filesystem.write Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Writes content to a file, creating it if it doesn't exist. ```APIDOC ## write(path: string, contents: string): null ### Description If the file at `path` does not exist, it will be created. Intermediate directories will also be created if necessary. The provided `contents` will then be written to the file. Returns `null` upon successful completion. ### Parameters #### Path Parameters - **path** (string) - Required - The path of the file to write to. - **contents** (string) - Required - The content to write to the file. ``` -------------------------------- ### Get Request Timeout Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the configured request timeout in seconds. ```javascript getReqTimeout(): number; ``` -------------------------------- ### Load SQL Connection Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Establishes the connection to the SQL database and returns the SqlConnection object. ```typescript load(): SqlConnection; ``` -------------------------------- ### Get Available HMAC Hash Algorithms Source: https://github.com/optimacros/scripts_documentation/blob/main/API/crypto.md Retrieves a list of hashing algorithms supported by the `hmac()` method. ```javascript getHmacHashAlgorithms(): string[]; ``` -------------------------------- ### Get Connection Timeout Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the configured connection timeout in seconds. ```javascript getConnTimeout(): number; ``` -------------------------------- ### Configure Hint for Bulk Import with bcp Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Sets one or more hints to use during the bulk import operation. Corresponds to the bcp utility option -h. ```js setStandardInputFile(path: string): this; ``` -------------------------------- ### Get Local Filesystem Adapter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns an interface for accessing the local file system. This is a temporary server folder that acts as the script's working directory, and the script cannot access files outside of this directory. ```javascript local(): Filesystem; ``` -------------------------------- ### Download File Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Copies a file from the current filesystem to the local filesystem. Returns a boolean indicating success. ```javascript download(from: string, to: string): boolean; ``` -------------------------------- ### Get Max Redirects Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the maximum number of redirects allowed. ```javascript getMax(): number; ``` -------------------------------- ### Get URL Parameters Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns an interface for accessing URL parameters. ```javascript params(): UrlParams; ``` -------------------------------- ### Initialize Destination List and Cell Buffer Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/partialListCopy.md Opens the destination list tab and creates a cell buffer for modifications. Logs a message indicating the start of the process. ```javascript // Get destination list tab const dstListTab = om.lists.listsTab().open(ENV.DST_LIST); const cb = om.common.createCellBuffer().canLoadCellsValues(false); let propNameMap = {}; om.common.requestInfo().logStatusMessage(`Reading destination list and changing existing items`, true); ``` -------------------------------- ### Copy File Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Copies a file from 'from' to the 'to' path. Throws an exception if the source file does not exist. Returns null on success. ```javascript copy(from: string, to: string): null; ``` -------------------------------- ### Get Import File Encoding Source: https://github.com/optimacros/scripts_documentation/blob/main/API/exportImport.md Retrieves the encoding of the file being imported. ```javascript getEncoding(): string; ``` -------------------------------- ### Set Use List Options for LIST Command Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Configures whether to use '-aln' flags with the FTP LIST command. This can resolve issues with empty file listings on some servers. The default is true. Returns the adapter instance for chaining. ```typescript setUseListOptions(useListOptions: boolean): this; ``` -------------------------------- ### Get FTP Password Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Retrieves the currently set FTP password. ```typescript getPassword(): string | null; ``` -------------------------------- ### Get FTP Username Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Retrieves the currently set FTP username. ```typescript getUsername(): string | null; ``` -------------------------------- ### Set URL Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Sets the entire URL. Returns true upon successful setting. ```javascript setUrl(url: string): boolean; ``` -------------------------------- ### Get Cursor Generator Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns a generator that iterates through all response documents. ```javascript generator(): Object[]; ``` -------------------------------- ### BaseAdapter Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md The BaseAdapter interface serves as the base for file system adapters, providing a method to load the file system configuration. ```APIDOC ## Interface: BaseAdapter ### Description Base interface for file system adapters. ### Methods - **load()**: Filesystem Returns a Filesystem object with pre-configured settings. ``` -------------------------------- ### Get Inserted IDs Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns an array of ObjectId for the inserted documents. ```javascript getInsertedIds(): Types.ObjectId[]; ``` -------------------------------- ### Get Inserted ID from InsertOneResult Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns the ObjectId of the document that was inserted. ```javascript getInsertedId(): Types.ObjectId; ``` -------------------------------- ### Set FTP Root Directory Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Sets the initial directory for FTP operations. The default value is '/'. Returns the adapter instance for chaining. ```typescript setRoot(root: string): this; ``` -------------------------------- ### CubeCellSelectorBuilder setStartCell() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/cubeCell.md Specifies the starting cell for the selection using an array of dimension IDs. These IDs can be obtained from CubeCell.getDimensionIds(). ```javascript setStartCell(longIds: number[]): this; ``` -------------------------------- ### Get Path Object Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Returns a PathObj interface for the given path. ```javascript getPathObj(path: string): PathObj; ``` -------------------------------- ### SqlConnection.qb() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Returns a `SqlQueryBuilder` instance associated with this database connection, used for constructing queries. ```javascript qb(): SqlQueryBuilder; ``` -------------------------------- ### Get Storage Instance Priority Source: https://github.com/optimacros/scripts_documentation/blob/main/API/common.md Retrieves the priority of the storage instance for the model. ```javascript getStorageInstancePriority(): number; ``` -------------------------------- ### Filesystem.listContents Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Lists the contents of a directory. ```APIDOC ## listContents(path: string, recursive: boolean): FileMeta[] ### Description Returns an array of `FileMeta` objects containing information about the items within the directory at `path`. If the `recursive` flag is set to `true`, information about nested items will also be included. ### Parameters #### Path Parameters - **path** (string) - Required - The path to the directory. - **recursive** (boolean) - Required - Whether to list contents recursively. ``` -------------------------------- ### Get Error Message Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the error message text from the ResponseErrors interface. ```javascript getMessage(): string; ``` -------------------------------- ### Options Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Interface for configuring connection options for the HTTP client. ```APIDOC ## Options Interface ### Description Interface for configuring connection options for the HTTP client. ### Methods #### setConnTimeout ```js setConnTimeout(seconds: number): boolean; ``` Sets the connection timeout in seconds. Default: `10`, Max: `30`. Returns `true`. #### getConnTimeout ```js getConnTimeout(): number; ``` Gets the connection timeout. #### setReqTimeout ```js setReqTimeout(seconds: number): boolean; ``` Sets the response timeout in seconds. Default: `30`, Max: `21600` (6 hours). Returns `true`. #### getReqTimeout ```js getReqTimeout(): number; ``` Gets the response timeout. #### setCanDecodeContent ```js setCanDecodeContent(value: boolean): boolean; ``` Sets whether to decode the response body. If `true`, compressed bodies are decompressed. Default: `true`. Returns `true`. #### getCanDecodeContent ```js getCanDecodeContent(): boolean; ``` Gets the response body decoding flag. #### allowRedirects ```js allowRedirects(): AllowRedirects; ``` Returns the `AllowRedirects` interface for configuring HTTP redirects. #### auth ```js auth(): HttpAuth; ``` Returns the `HttpAuth` interface for configuring HTTP authentication. #### cert ```js cert(): Cert; ``` Returns the `Cert` interface for configuring certificate authentication. Note: This is not fully implemented. #### verify ```js verify(): Verify; ``` Returns the `Verify` interface for SSL certificate verification. ``` -------------------------------- ### Get HTTP Status Code Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the HTTP status code of the response. ```javascript getStatusCode(): number; ``` -------------------------------- ### Get Exporter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns an Exporter interface for basic table export operations. ```javascript exporter(): Exporter; ``` -------------------------------- ### BaseConverter convert Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/csv.md Executes the file conversion process. Returns the name of the converted file. ```javascript convert(): string; ``` -------------------------------- ### Set URL Path Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Sets the server path for the URL. The default path is '/'. Returns true upon successful setting. ```javascript setUrlPath(path: string): boolean; ``` -------------------------------- ### Get Cookies Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the Params interface for accessing and managing cookies. ```javascript cookies(): Params; ``` -------------------------------- ### Filesystem.copy Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Copies a file to a new location. ```APIDOC ## copy(from: string, to: string): null ### Description Copies the file from `from` to the path `to`. Returns `null` upon successful completion. Throws an exception if the source file `from` does not exist. ### Parameters #### Path Parameters - **from** (string) - Required - The path of the file to copy. - **to** (string) - Required - The destination path for the copied file. ``` -------------------------------- ### Get Redirect Status Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the current status of HTTP redirect enablement. ```javascript getStatus(): boolean; ``` -------------------------------- ### Filesystem.upload Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Uploads a file from the local filesystem to the current filesystem. ```APIDOC ## upload(from: string, to: string): boolean ### Description Copies a file from the local filesystem (`from`) to the path `to` in the current filesystem. Returns a boolean indicating success. ### Parameters #### Path Parameters - **from** (string) - Required - The path of the file on the local filesystem. - **to** (string) - Required - The destination path in the current filesystem. ``` -------------------------------- ### Write to File Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Creates a file if it doesn't exist (including intermediate directories) and writes the specified content to it. Returns null on success. ```javascript write(path: string, contents: string): null; ``` -------------------------------- ### Params: Get Specific Parameter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the value of a specific parameter by its name. ```javascript get(name: string): any; ``` -------------------------------- ### Get Task Description Source: https://github.com/optimacros/scripts_documentation/blob/main/API/scriptChains.md Retrieves the description that was set for the task using setTaskDescription(). ```javascript getDescription(): string; ``` -------------------------------- ### Register Report File and Add Hash Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/csv.md Register an existing report file in the global file registry using `makeGlobalFile` from the `Filesystem` interface. The returned hash can then be added to `resultInfo` for tracking. ```javascript const hashReport = localFileSystem.makeGlobalFile("report","csv",reportFilePath,false); resultInfo.addFileHash(hashReport); ``` -------------------------------- ### Get Script Output Source: https://github.com/optimacros/scripts_documentation/blob/main/API/scriptChains.md Retrieves the output that a script has logged using console.log(). ```javascript getOutput(): string; ``` -------------------------------- ### CubeInfo getFormatInfo() Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/cubeCell.md Returns the CubeFormatInfo interface for details about the cube's format. ```javascript getFormatInfo(): CubeFormatInfo; ``` -------------------------------- ### Get Environment Variable Source: https://github.com/optimacros/scripts_documentation/blob/main/API/scriptChains.md Retrieves the value of an environment variable using its key. ```javascript get(key: string): any; ``` -------------------------------- ### Set Collection Creation Options Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Sets options for creating a MongoDB collection. Refer to MongoDB documentation for available options. ```typescript setOptions(options: Object): this; ``` -------------------------------- ### Export Multicube Data to CSV Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/csv.md This snippet demonstrates how to open a specific multicube, create a grid, and then export its data to CSV format using the StorageExporter. The exported data is copied to a local file named 'export'. Ensure the 'csv' format is set for the exporter. ```javascript const multicubesTab = om.multicubes.multicubesTab(); const multicubeTab = multicubesTab.open("Уровни игроков"); const pivot = multicubeTab.pivot(); const grid = pivot.create(); const storageExporter = this.grid.storageExporter().setFormat("csv"); const exportResult = storageExporter.export().copyToLocal("export"); ``` -------------------------------- ### Get FTP Port Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Retrieves the currently set FTP server port. ```typescript getPort(): number; ``` -------------------------------- ### Get Matched Count Source: https://github.com/optimacros/scripts_documentation/blob/main/API/mongoDB.md Returns the number of documents that matched the filter criteria. ```javascript getMatchedCount(): number; ``` -------------------------------- ### Set Import File Path Source: https://github.com/optimacros/scripts_documentation/blob/main/API/exportImport.md Sets the path to the file that will be imported. Returns 'this' for chaining. ```javascript setFilePath(path: string): this; ``` -------------------------------- ### Get Report Path from SyncResult Source: https://github.com/optimacros/scripts_documentation/blob/main/API/sync.md Retrieves the name of the generated report file. ```typescript getReportPath(): string; ``` -------------------------------- ### Get Uploaded File Size Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns the size of the uploaded file in bytes. ```javascript getFileSize(): number; ``` -------------------------------- ### BaseConverter setSource Method Source: https://github.com/optimacros/scripts_documentation/blob/main/API/csv.md Sets the path to the source file for conversion. Returns the BaseConverter instance for chaining. ```javascript setSource(path: string): this; ``` -------------------------------- ### Get Uploaded File Name Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns the original name of the uploaded file. ```javascript getFileName(): string; ``` -------------------------------- ### Get Parameter Value Source: https://github.com/optimacros/scripts_documentation/blob/main/API/apiService.md Returns the value of the parameter. Can be null if the parameter has no value. ```javascript getValue(): string | null; ``` -------------------------------- ### Send Basic Web Notification Source: https://github.com/optimacros/scripts_documentation/blob/main/API/notifications.md Example of sending a standard web notification using the Web.Builder interface. Ensure the channel name and recipients are correctly specified. ```javascript const channelName = 'WEB notices'; const recepients = ['tester1@example.com','tester2@example.com','%ALL_MODELLERS%']; const sender = om.notifications.web(channelName); try { const result = sender .setTo(recepients) .setSubject('Hello from scripts!') .setBody('Some message') .send(); console.log('Success:\n\n'); console.log(result.messageId); } catch (e) { console.log(`Error: ${e.message}`); } ``` -------------------------------- ### CubesTab Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Provides methods to interact with cubes within a multi-cube environment, including creating, deleting, and reordering elements. ```APIDOC ## CubesTab Interface Provides methods to interact with cubes within a multi-cube environment. ### Methods - `elementsCreator(): ElementsCreator` Returns a reference to `ElementsCreator` for adding cubes. - `elementsDeleter(): ElementsDeleter` Returns a reference to `ElementsDeleter` for deleting cubes. - `elementsReorder(): ElementsReorder` Returns a reference to `ElementsReorder` for reordering cubes. ``` -------------------------------- ### Get NamedElementsCreator Source: https://github.com/optimacros/scripts_documentation/blob/main/API/elementsManipulator.md Returns a reference to the NamedElementsCreator interface for adding named elements. ```typescript named(): NamedElementsCreator; ``` -------------------------------- ### Get NumericElementsCreator Source: https://github.com/optimacros/scripts_documentation/blob/main/API/elementsManipulator.md Returns a reference to the NumericElementsCreator interface for adding numeric elements. ```typescript numeric(): NumericElementsCreator; ``` -------------------------------- ### Full Script for Multicube Row Dimensions Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/cellsAccess.md This script initializes a multicube view, creates a pivot table, and then iterates through all row dimensions to log their labels. It sets up the necessary objects to access the data generator. ```javascript const multicubesTab = om.multicubes.multicubesTab(); const multicubeTab = multicubesTab.open('Условия и расчёты'); const pivot = multicubeTab.pivot('Условия и расчёты 3'); const grid = pivot.create(); const range = grid.range(); const generator = range.generator(); for (const chunk of generator) { chunk.rows().all().forEach(labelsGroup => { const rowLabels = []; labelsGroup.all().forEach(labels => { rowLabels.push(labels.label()); }); console.log(`Row label: ${rowLabels.join(', ')} `); }); } ``` -------------------------------- ### Get Dimension Entity Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Retrieves the EntityInfo object associated with a data cube dimension. ```javascript getDimensionEntity(): EntityInfo; ``` -------------------------------- ### Get Storage Exporter Source: https://github.com/optimacros/scripts_documentation/blob/main/API/views.md Returns a StorageExporter interface for fast table export operations. ```javascript storageExporter(): StorageExporter; ``` -------------------------------- ### Get Response Headers Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Retrieves the response headers. The headers are returned in the ObjectOfStringArray format. ```javascript headers(): ObjectOfStringArray; ``` -------------------------------- ### Url Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Provides methods for setting and getting various components of a URL, including the full URL, path, scheme, host, port, user credentials, fragment, and parameters. ```APIDOC ## Url Interface ### Description Provides methods for setting and getting various components of a URL, including the full URL, path, scheme, host, port, user credentials, fragment, and parameters. ### Methods - **setUrl(url: string): boolean** Sets the entire URL. Returns `true`. - **getUrl(): string** Returns the current URL. - **setUrlPath(path: string): boolean** Sets the server path for the URL. Default is `'/'`. Returns `true`. - **getUrlPath(): string** Returns the server path of the URL. - **setUrlScheme(scheme: string): boolean** Sets the URL scheme (protocol). Default is `'http'`. Returns `true`. - **getUrlScheme(): string** Returns the URL scheme (protocol). - **setHost(host: string): boolean** Sets the host name or address. Default is `''`. Returns `true`. - **getHost(): string** Returns the host name or address. - **setPort(port: number | string): boolean** Sets the port number. Returns `true`. - **getPort(): number | null** Returns the port number or `null` if not set. - **setUser(user: string): boolean** Sets the username. Returns `true`. - **getUser(): string | null** Returns the username or `null` if not set. - **setPassword(password: string): boolean** Sets the password. Returns `true`. - **getPassword(): string | null** Returns the password or `null` if not set. - **setFragment(fragment: string): boolean** Sets the fragment identifier. Returns `true`. - **getFragment(): string | null** Returns the fragment identifier or `null` if not set. - **params(): UrlParams** Returns an interface for accessing URL parameters. ``` -------------------------------- ### Set Server Name for bcp Utility Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Sets the SQL Server instance to connect to. Corresponds to the bcp utility's -S option. ```javascript setServerName(value: string): this; ``` -------------------------------- ### Get Headers Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the Params interface for constructing HTTP headers for the request. ```javascript headers(): Params; ``` -------------------------------- ### Export Data with SqlBulkCopyBuilder Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Exports data from the database to a specified file path. It generates a bcp command according to the builder's settings and waits for the export process to finish. ```js export(path: string): SqlBulkCopyResult; ``` -------------------------------- ### Get Request Body Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the RequestBody interface for configuring the request body. ```javascript body(): RequestBody; ``` -------------------------------- ### SqlConnectorBuilder Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md A builder interface for establishing connections to relational databases. It follows the builder pattern and provides methods to set host, port, username, password, and database name before loading the SQL connection. ```APIDOC ## SqlConnectorBuilder ### Description This interface implements the builder pattern for creating SQL database connectors. It allows setting connection parameters and loading the final connection object. ### Methods - **setHost(value: string): this** Sets the connection host address. Returns `this` for chaining. - **setPort(value: number): this** Sets the port number for the connection. Returns `this` for chaining. - **setUsername(value: string): this** Sets the username for authentication. Returns `this` for chaining. - **setPassword(value: string): this** Sets the password for authentication. Returns `this` for chaining. - **setDatabase(value: string): this** Sets the name of the database to connect to. Returns `this` for chaining. - **load(): SqlConnection** Establishes the connection to the database and returns a `SqlConnection` object. ``` -------------------------------- ### Full CSV Write Example Source: https://github.com/optimacros/scripts_documentation/blob/main/cookBook/csv.md This script reads data from a CSV, modifies player levels and prizes, and writes the transformed data to a new CSV file named 'import'. It handles header creation and conditional data modification. ```javascript const CUBES_MK = { cubePrize: "Приз", cubePoints: "Уровень игрока" }; const multicubesTab = om.multicubes.multicubesTab(); const multicubeTab = multicubesTab.open("Уровни игроков"); const pivot = multicubeTab.pivot(); const grid = pivot.create(); const storageExporter = grid.storageExporter().setFormat("csv").setEncoding("WINDOWS-1251"); const exportResult = storageExporter.export().copyToLocal("export"); const resultInfo = om.common.resultInfo(); const localFileSystem = om.filesystems.local(); const filePath = localFileSystem.getPathObj("export"); const fileManager = om.filesystems.filesDataManager(); const csvReader = fileManager.csvReader(filePath) .changeFileCharset("WINDOWS-1251"); const generator = csvReader.generator(); let writer = fileManager.csvWriter(); const dimensionsLength = 2; let firstLaunch = true; let indexMap = {}; for (let rowArray of generator) { let row = []; if (firstLaunch) { rowArray.forEach((element,index) => { if (index < dimensionsLength) { row.push(element); } indexMap[element] = index; }); row.push(CUBES_MK.cubePoints); row.push(CUBES_MK.cubePrize); firstLaunch = false; } else { rowArray.forEach((element,index) => { if (index < dimensionsLength) { row.push(element); } }); let points = rowArray[indexMap[CUBES_MK.cubePoints]]; if (points > 5) { row.push(Math.round(Math.random() * 10) + 5); row.push("Меч Иссинхдора"); } else { row.push(points); row.push("Меч 3 уровня"); } } writer.writeRow(row); } writer.save("import"); ``` -------------------------------- ### Get HttpAuth Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the HttpAuth interface for accessing HTTP authentication settings. ```javascript auth(): HttpAuth; ``` -------------------------------- ### Get Redirects Interface Source: https://github.com/optimacros/scripts_documentation/blob/main/API/http.md Returns the AllowRedirects interface for accessing HTTP redirect settings. ```javascript allowRedirects(): AllowRedirects; ``` -------------------------------- ### Filesystem.read Source: https://github.com/optimacros/scripts_documentation/blob/main/API/fs.md Reads the entire content of a file. ```APIDOC ## read(path: string): string ### Description Reads the entire content of the file at `path` and returns it as a string. ### Parameters #### Path Parameters - **path** (string) - Required - The path to the file to read. ``` -------------------------------- ### Configure Response File for Interactive bcp Source: https://github.com/optimacros/scripts_documentation/blob/main/API/relationalDB.md Sets the name of the response file containing answers to command-line prompts for each data field during interactive bulk copy. Corresponds to the bcp utility option -i. ```js setKeepNullValuesMode(status: boolean): this; ``` -------------------------------- ### Get Environment Info Source: https://github.com/optimacros/scripts_documentation/blob/main/API/scriptChains.md Returns the `EnvironmentInfo` interface for passing environment variables to the script. ```javascript environmentInfo(): EnvironmentInfo; ```