/*************************************************************************************************************************************** * assets API */ function portal_api_assets(p_parent) { this.m_parent = p_parent; } portal_api_assets.prototype.get = function (p__id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.get' }; if (p__id !== undefined) l_dict._id = p__id return this.m_parent.server_call(this, "assets/get", l_dict, p_callback, p_error_callback); } portal_api_assets.prototype.get_with_url = function (p_url, p_sub, p_callback, p_error_callback) { if (this.get_with_url && this.get_with_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.get_with_url' }; if (p_url !== undefined) l_dict.url = p_url if (p_sub !== undefined) l_dict.sub = p_sub return this.m_parent.server_call(this, "assets/get_with_url", l_dict, p_callback, p_error_callback); } portal_api_assets.prototype.get_cloudflow_url = function (p_url, p_sub, p_type, p_callback, p_error_callback) { if (this.get_cloudflow_url && this.get_cloudflow_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.get_cloudflow_url' }; if (p_url !== undefined) l_dict.url = p_url if (p_sub !== undefined) l_dict.sub = p_sub if (p_type !== undefined) l_dict.type = p_type return this.m_parent.server_call(this, "assets/get_cloudflow_url", l_dict, p_callback, p_error_callback); } portal_api_assets.prototype.reset_metadata = function (p_url, p_callback, p_error_callback) { if (this.reset_metadata && this.reset_metadata.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.reset_metadata' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "assets/reset_metadata", l_dict, p_callback, p_error_callback); } portal_api_assets.prototype.reset_thumb = function (p_url, p_callback, p_error_callback) { if (this.reset_thumb && this.reset_thumb.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.reset_thumb' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "assets/reset_thumb", l_dict, p_callback, p_error_callback); } portal_api_assets.prototype.reset_render = function (p_url, p_callback, p_error_callback) { if (this.reset_render && this.reset_render.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'assets.reset_render' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "assets/reset_render", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * utils API */ function portal_api_utils(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * utils.xml API */ function portal_api_utils_xml(p_parent) { this.m_parent = p_parent; } portal_api_utils_xml.prototype.read = function (p_xml, p_callback, p_error_callback) { if (this.read && this.read.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.xml.read' }; if (p_xml !== undefined) l_dict.xml = p_xml return this.m_parent.server_call(this, "utils/xml/read", l_dict, p_callback, p_error_callback); } portal_api_utils_xml.prototype.read_url = function (p_file_url, p_callback, p_error_callback) { if (this.read_url && this.read_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.xml.read_url' }; if (p_file_url !== undefined) l_dict.file_url = p_file_url return this.m_parent.server_call(this, "utils/xml/read_url", l_dict, p_callback, p_error_callback); } portal_api_utils_xml.prototype.write = function (p_json, p_callback, p_error_callback) { if (this.write && this.write.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.xml.write' }; if (p_json !== undefined) l_dict.json = p_json return this.m_parent.server_call(this, "utils/xml/write", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * utils.http API */ function portal_api_utils_http(p_parent) { this.m_parent = p_parent; } portal_api_utils_http.prototype.post = function (p_host, p_port, p_url, p_ssl, p_data, p_callback, p_error_callback) { if (this.post && this.post.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.http.post' }; if (p_host !== undefined) l_dict.host = p_host if (p_port !== undefined) l_dict.port = p_port if (p_url !== undefined) l_dict.url = p_url if (p_ssl !== undefined) l_dict.ssl = p_ssl if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "utils/http/post", l_dict, p_callback, p_error_callback); } portal_api_utils_http.prototype.post_data = function (p_host, p_port, p_url, p_ssl, p_content_type, p_data, p_callback, p_error_callback) { if (this.post_data && this.post_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.http.post_data' }; if (p_host !== undefined) l_dict.host = p_host if (p_port !== undefined) l_dict.port = p_port if (p_url !== undefined) l_dict.url = p_url if (p_ssl !== undefined) l_dict.ssl = p_ssl if (p_content_type !== undefined) l_dict.content_type = p_content_type if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "utils/http/post_data", l_dict, p_callback, p_error_callback); } portal_api_utils.prototype.format_date = function (p_secs_since_epoch, p_format, p_time_zone_offset, p_callback, p_error_callback) { if (this.format_date && this.format_date.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.format_date' }; if (p_secs_since_epoch !== undefined) l_dict.secs_since_epoch = p_secs_since_epoch if (p_format !== undefined) l_dict.format = p_format if (p_time_zone_offset !== undefined) l_dict.time_zone_offset = p_time_zone_offset return this.m_parent.server_call(this, "utils/format_date", l_dict, p_callback, p_error_callback); } portal_api_utils.prototype.uuid = function (p_callback, p_error_callback) { if (this.uuid && this.uuid.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.uuid' }; return this.m_parent.server_call(this, "utils/uuid", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * utils.csv API */ function portal_api_utils_csv(p_parent) { this.m_parent = p_parent; } portal_api_utils_csv.prototype.read = function (p_csv, p_column_sep, p_row_sep, p_use_headers, p_callback, p_error_callback) { if (this.read && this.read.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.csv.read' }; if (p_csv !== undefined) l_dict.csv = p_csv if (p_column_sep !== undefined) l_dict.column_sep = p_column_sep if (p_row_sep !== undefined) l_dict.row_sep = p_row_sep if (p_use_headers !== undefined) l_dict.use_headers = p_use_headers return this.m_parent.server_call(this, "utils/csv/read", l_dict, p_callback, p_error_callback); } portal_api_utils_csv.prototype.read_url = function (p_file_url, p_column_sep, p_row_sep, p_use_headers, p_callback, p_error_callback) { if (this.read_url && this.read_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.csv.read_url' }; if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_column_sep !== undefined) l_dict.column_sep = p_column_sep if (p_row_sep !== undefined) l_dict.row_sep = p_row_sep if (p_use_headers !== undefined) l_dict.use_headers = p_use_headers return this.m_parent.server_call(this, "utils/csv/read_url", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * utils.sql API */ function portal_api_utils_sql(p_parent) { this.m_parent = p_parent; } portal_api_utils_sql.prototype.query = function (p_db_url, p_query, p_params, p_callback, p_error_callback) { if (this.query && this.query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.sql.query' }; if (p_db_url !== undefined) l_dict.db_url = p_db_url if (p_query !== undefined) l_dict.query = p_query if (p_params !== undefined) l_dict.params = p_params return this.m_parent.server_call(this, "utils/sql/query", l_dict, p_callback, p_error_callback); } portal_api_utils_sql.prototype.update = function (p_db_url, p_queries, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.sql.update' }; if (p_db_url !== undefined) l_dict.db_url = p_db_url if (p_queries !== undefined) l_dict.queries = p_queries return this.m_parent.server_call(this, "utils/sql/update", l_dict, p_callback, p_error_callback); } portal_api_utils.prototype.hash = function (p_data, p_hash_method, p_encoding, p_callback, p_error_callback) { if (this.hash && this.hash.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'utils.hash' }; if (p_data !== undefined) l_dict.data = p_data if (p_hash_method !== undefined) l_dict.hash_method = p_hash_method if (p_encoding !== undefined) l_dict.encoding = p_encoding return this.m_parent.server_call(this, "utils/hash", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * account API */ function portal_api_account(p_parent) { this.m_parent = p_parent; } portal_api_account.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "account/create", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "account/delete", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "account/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "account/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "account/get", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "account/list", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "account/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_account.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'account.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "account/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * archive API */ function portal_api_archive(p_parent) { this.m_parent = p_parent; } portal_api_archive.prototype.unzip_data = function (p_archive, p_options, p_callback, p_error_callback) { if (this.unzip_data && this.unzip_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'archive.unzip_data' }; if (p_archive !== undefined) l_dict.archive = p_archive if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "archive/unzip_data", l_dict, p_callback, p_error_callback); } portal_api_archive.prototype.unzip_files = function (p_archive, p_folder, p_options, p_callback, p_error_callback) { if (this.unzip_files && this.unzip_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'archive.unzip_files' }; if (p_archive !== undefined) l_dict.archive = p_archive if (p_folder !== undefined) l_dict.folder = p_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "archive/unzip_files", l_dict, p_callback, p_error_callback); } portal_api_archive.prototype.zip_data = function (p_archive_folder, p_archive_name, p_data_to_add, p_options, p_callback, p_error_callback) { if (this.zip_data && this.zip_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'archive.zip_data' }; if (p_archive_folder !== undefined) l_dict.archive_folder = p_archive_folder if (p_archive_name !== undefined) l_dict.archive_name = p_archive_name if (p_data_to_add !== undefined) l_dict.data_to_add = p_data_to_add if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "archive/zip_data", l_dict, p_callback, p_error_callback); } portal_api_archive.prototype.zip_files = function (p_archive_folder, p_archive_name, p_files_to_add, p_options, p_callback, p_error_callback) { if (this.zip_files && this.zip_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'archive.zip_files' }; if (p_archive_folder !== undefined) l_dict.archive_folder = p_archive_folder if (p_archive_name !== undefined) l_dict.archive_name = p_archive_name if (p_files_to_add !== undefined) l_dict.files_to_add = p_files_to_add if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "archive/zip_files", l_dict, p_callback, p_error_callback); } portal_api_archive.prototype.list_zip = function (p_archive, p_options, p_callback, p_error_callback) { if (this.list_zip && this.list_zip.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'archive.list_zip' }; if (p_archive !== undefined) l_dict.archive = p_archive if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "archive/list_zip", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * asset API */ function portal_api_asset(p_parent) { this.m_parent = p_parent; } portal_api_asset.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/count", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "asset/create", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "asset/delete", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "asset/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "asset/get", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "asset/list", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "asset/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "asset/set_keys", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "asset/update", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_crop_zone = function (p_asset, p_crop_zone, p_callback, p_error_callback) { if (this.add_crop_zone && this.add_crop_zone.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_crop_zone' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_crop_zone !== undefined) l_dict.crop_zone = p_crop_zone return this.m_parent.server_call(this, "asset/add_crop_zone", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_tag = function (p_asset, p_tag, p_callback, p_error_callback) { if (this.add_tag && this.add_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_tag' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "asset/add_tag", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_to_database = function (p_url, p_callback, p_error_callback) { if (this.add_to_database && this.add_to_database.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_to_database' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "asset/add_to_database", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.create_anonymous_url = function (p_url, p_options, p_callback, p_error_callback) { if (this.create_anonymous_url && this.create_anonymous_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.create_anonymous_url' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/create_anonymous_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.download = function (p_url, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.download' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "asset/download", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.export_xfdf_with_options = function (p_asset_url, p_xfdf_url, p_options, p_callback, p_error_callback) { if (this.export_xfdf_with_options && this.export_xfdf_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.export_xfdf_with_options' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_xfdf_url !== undefined) l_dict.xfdf_url = p_xfdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/export_xfdf_with_options", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.export_xfdf = function (p_asset_url, p_xfdf_url, p_callback, p_error_callback) { if (this.export_xfdf && this.export_xfdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.export_xfdf' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_xfdf_url !== undefined) l_dict.xfdf_url = p_xfdf_url return this.m_parent.server_call(this, "asset/export_xfdf", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_by_url = function (p_url, p_callback, p_error_callback) { if (this.get_by_url && this.get_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "asset/get_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_crop_zones = function (p_asset, p_callback, p_error_callback) { if (this.get_crop_zones && this.get_crop_zones.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_crop_zones' }; if (p_asset !== undefined) l_dict.asset = p_asset return this.m_parent.server_call(this, "asset/get_crop_zones", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_tags = function (p_asset, p_callback, p_error_callback) { if (this.get_tags && this.get_tags.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_tags' }; if (p_asset !== undefined) l_dict.asset = p_asset return this.m_parent.server_call(this, "asset/get_tags", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.has_all_tags = function (p_asset, p_tags, p_callback, p_error_callback) { if (this.has_all_tags && this.has_all_tags.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.has_all_tags' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_tags !== undefined) l_dict.tags = p_tags return this.m_parent.server_call(this, "asset/has_all_tags", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.has_at_least_one_tag = function (p_asset, p_tags, p_callback, p_error_callback) { if (this.has_at_least_one_tag && this.has_at_least_one_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.has_at_least_one_tag' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_tags !== undefined) l_dict.tags = p_tags return this.m_parent.server_call(this, "asset/has_at_least_one_tag", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.has_tag = function (p_asset, p_tag, p_callback, p_error_callback) { if (this.has_tag && this.has_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.has_tag' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "asset/has_tag", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.list_with_tag_query = function (p_query, p_tag_query, p_tag_mode, p_fields, p_callback, p_error_callback) { if (this.list_with_tag_query && this.list_with_tag_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.list_with_tag_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_tag_query !== undefined) l_dict.tag_query = p_tag_query if (p_tag_mode !== undefined) l_dict.tag_mode = p_tag_mode if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "asset/list_with_tag_query", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.list_with_tag_query_and_options = function (p_query, p_tag_query, p_tag_mode, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_tag_query_and_options && this.list_with_tag_query_and_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.list_with_tag_query_and_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_tag_query !== undefined) l_dict.tag_query = p_tag_query if (p_tag_mode !== undefined) l_dict.tag_mode = p_tag_mode if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/list_with_tag_query_and_options", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.remove_crop_zone = function (p_asset, p_crop_zone_id, p_callback, p_error_callback) { if (this.remove_crop_zone && this.remove_crop_zone.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.remove_crop_zone' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_crop_zone_id !== undefined) l_dict.crop_zone_id = p_crop_zone_id return this.m_parent.server_call(this, "asset/remove_crop_zone", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.remove_tag = function (p_asset, p_tag, p_callback, p_error_callback) { if (this.remove_tag && this.remove_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.remove_tag' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "asset/remove_tag", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.update_crop_zone = function (p_asset, p_crop_zone, p_callback, p_error_callback) { if (this.update_crop_zone && this.update_crop_zone.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.update_crop_zone' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_crop_zone !== undefined) l_dict.crop_zone = p_crop_zone return this.m_parent.server_call(this, "asset/update_crop_zone", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.set_priority = function (p_asset, p_priority, p_callback, p_error_callback) { if (this.set_priority && this.set_priority.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.set_priority' }; if (p_asset !== undefined) l_dict.asset = p_asset if (p_priority !== undefined) l_dict.priority = p_priority return this.m_parent.server_call(this, "asset/set_priority", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.remove_tiles = function (p_url, p_thumb, p_callback, p_error_callback) { if (this.remove_tiles && this.remove_tiles.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.remove_tiles' }; if (p_url !== undefined) l_dict.url = p_url if (p_thumb !== undefined) l_dict.thumb = p_thumb return this.m_parent.server_call(this, "asset/remove_tiles", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_comment = function (p_asset_id, p_note_id, p_comment, p_options, p_callback, p_error_callback) { if (this.add_comment && this.add_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_comment' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment !== undefined) l_dict.comment = p_comment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/add_comment", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_comment_by_url = function (p_asset_url, p_note_id, p_comment, p_options, p_callback, p_error_callback) { if (this.add_comment_by_url && this.add_comment_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_comment_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment !== undefined) l_dict.comment = p_comment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/add_comment_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.edit_comment = function (p_asset_id, p_note_id, p_comment_id, p_new_value, p_old_value, p_options, p_callback, p_error_callback) { if (this.edit_comment && this.edit_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.edit_comment' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment_id !== undefined) l_dict.comment_id = p_comment_id if (p_new_value !== undefined) l_dict.new_value = p_new_value if (p_old_value !== undefined) l_dict.old_value = p_old_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/edit_comment", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.edit_comment_by_url = function (p_asset_url, p_note_id, p_comment_id, p_new_value, p_old_value, p_options, p_callback, p_error_callback) { if (this.edit_comment_by_url && this.edit_comment_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.edit_comment_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment_id !== undefined) l_dict.comment_id = p_comment_id if (p_new_value !== undefined) l_dict.new_value = p_new_value if (p_old_value !== undefined) l_dict.old_value = p_old_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/edit_comment_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_note = function (p_asset_id, p_note, p_options, p_callback, p_error_callback) { if (this.add_note && this.add_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_note' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/add_note", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.add_note_by_url = function (p_asset_url, p_note, p_options, p_callback, p_error_callback) { if (this.add_note_by_url && this.add_note_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.add_note_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/add_note_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.delete_note = function (p_asset_id, p_note, p_options, p_callback, p_error_callback) { if (this.delete_note && this.delete_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.delete_note' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/delete_note", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.delete_note_by_url = function (p_asset_url, p_note, p_options, p_callback, p_error_callback) { if (this.delete_note_by_url && this.delete_note_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.delete_note_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/delete_note_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_notes2 = function (p_asset_id, p_options, p_callback, p_error_callback) { if (this.get_notes2 && this.get_notes2.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_notes2' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/get_notes2", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_notes_by_url = function (p_asset_url, p_options, p_callback, p_error_callback) { if (this.get_notes_by_url && this.get_notes_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_notes_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/get_notes_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.import_xfdf = function (p_asset_id, p_fdf_url, p_options, p_callback, p_error_callback) { if (this.import_xfdf && this.import_xfdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.import_xfdf' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_fdf_url !== undefined) l_dict.fdf_url = p_fdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/import_xfdf", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.import_xfdf_by_url = function (p_asset_url, p_fdf_url, p_options, p_callback, p_error_callback) { if (this.import_xfdf_by_url && this.import_xfdf_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.import_xfdf_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_fdf_url !== undefined) l_dict.fdf_url = p_fdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/import_xfdf_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.save_note = function (p_asset_id, p_note, p_options, p_callback, p_error_callback) { if (this.save_note && this.save_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.save_note' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/save_note", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.save_note_by_url = function (p_asset_url, p_note, p_options, p_callback, p_error_callback) { if (this.save_note_by_url && this.save_note_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.save_note_by_url' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "asset/save_note_by_url", l_dict, p_callback, p_error_callback); } portal_api_asset.prototype.get_notes = function (p_asset, p_callback, p_error_callback) { if (this.get_notes && this.get_notes.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'asset.get_notes' }; if (p_asset !== undefined) l_dict.asset = p_asset return this.m_parent.server_call(this, "asset/get_notes", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * attributes API */ function portal_api_attributes(p_parent) { this.m_parent = p_parent; } portal_api_attributes.prototype.remove = function (p_attribute_id, p_callback, p_error_callback) { if (this.remove && this.remove.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.remove' }; if (p_attribute_id !== undefined) l_dict.attribute_id = p_attribute_id return this.m_parent.server_call(this, "attributes/remove", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.list_all = function (p_callback, p_error_callback) { if (this.list_all && this.list_all.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.list_all' }; return this.m_parent.server_call(this, "attributes/list_all", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.list_for_contact = function (p_contact_id, p_callback, p_error_callback) { if (this.list_for_contact && this.list_for_contact.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.list_for_contact' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id return this.m_parent.server_call(this, "attributes/list_for_contact", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.add_to_contact_by_id = function (p_contact_id, p_attribute_id, p_callback, p_error_callback) { if (this.add_to_contact_by_id && this.add_to_contact_by_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.add_to_contact_by_id' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id if (p_attribute_id !== undefined) l_dict.attribute_id = p_attribute_id return this.m_parent.server_call(this, "attributes/add_to_contact_by_id", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.add_to_contact_by_name = function (p_contact_id, p_attribute_name, p_callback, p_error_callback) { if (this.add_to_contact_by_name && this.add_to_contact_by_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.add_to_contact_by_name' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id if (p_attribute_name !== undefined) l_dict.attribute_name = p_attribute_name return this.m_parent.server_call(this, "attributes/add_to_contact_by_name", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.change_name = function (p_attribute_id, p_attribute_name, p_callback, p_error_callback) { if (this.change_name && this.change_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.change_name' }; if (p_attribute_id !== undefined) l_dict.attribute_id = p_attribute_id if (p_attribute_name !== undefined) l_dict.attribute_name = p_attribute_name return this.m_parent.server_call(this, "attributes/change_name", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.add = function (p_attribute_name, p_callback, p_error_callback) { if (this.add && this.add.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.add' }; if (p_attribute_name !== undefined) l_dict.attribute_name = p_attribute_name return this.m_parent.server_call(this, "attributes/add", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.remove_from_contact_by_id = function (p_contact_id, p_attribute_id, p_callback, p_error_callback) { if (this.remove_from_contact_by_id && this.remove_from_contact_by_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.remove_from_contact_by_id' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id if (p_attribute_id !== undefined) l_dict.attribute_id = p_attribute_id return this.m_parent.server_call(this, "attributes/remove_from_contact_by_id", l_dict, p_callback, p_error_callback); } portal_api_attributes.prototype.remove_from_contact_by_name = function (p_contact_id, p_attribute_name, p_callback, p_error_callback) { if (this.remove_from_contact_by_name && this.remove_from_contact_by_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'attributes.remove_from_contact_by_name' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id if (p_attribute_name !== undefined) l_dict.attribute_name = p_attribute_name return this.m_parent.server_call(this, "attributes/remove_from_contact_by_name", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * auth API */ function portal_api_auth(p_parent) { this.m_parent = p_parent; } portal_api_auth.prototype.create_session = function (p_user_name, p_options, p_callback, p_error_callback) { if (this.create_session && this.create_session.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.create_session' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "auth/create_session", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.create_session_with_expiry = function (p_user_name, p_user_pass, p_expiry, p_callback, p_error_callback) { if (this.create_session_with_expiry && this.create_session_with_expiry.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.create_session_with_expiry' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_user_pass !== undefined) l_dict.user_pass = p_user_pass if (p_expiry !== undefined) l_dict.expiry = p_expiry return this.m_parent.server_call(this, "auth/create_session_with_expiry", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.get_identity_providers = function (p_callback, p_error_callback) { if (this.get_identity_providers && this.get_identity_providers.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.get_identity_providers' }; return this.m_parent.server_call(this, "auth/get_identity_providers", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.generate_login_url = function (p_provider, p_callback, p_error_callback) { if (this.generate_login_url && this.generate_login_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.generate_login_url' }; if (p_provider !== undefined) l_dict.provider = p_provider return this.m_parent.server_call(this, "auth/generate_login_url", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.generate_oauth2_url = function (p_provider, p_callback, p_error_callback) { if (this.generate_oauth2_url && this.generate_oauth2_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.generate_oauth2_url' }; if (p_provider !== undefined) l_dict.provider = p_provider return this.m_parent.server_call(this, "auth/generate_oauth2_url", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.get_current_user = function (p_callback, p_error_callback) { if (this.get_current_user && this.get_current_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.get_current_user' }; return this.m_parent.server_call(this, "auth/get_current_user", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.login_with_options = function (p_user_name, p_options, p_callback, p_error_callback) { if (this.login_with_options && this.login_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.login_with_options' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "auth/login_with_options", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.login = function (p_user_name, p_user_pass, p_callback, p_error_callback) { if (this.login && this.login.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.login' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_user_pass !== undefined) l_dict.user_pass = p_user_pass return this.m_parent.server_call(this, "auth/login", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.mfa_login = function (p_user_name, p_options, p_callback, p_error_callback) { if (this.mfa_login && this.mfa_login.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.mfa_login' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "auth/mfa_login", l_dict, p_callback, p_error_callback); } portal_api_auth.prototype.logout = function (p_callback, p_error_callback) { if (this.logout && this.logout.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'auth.logout' }; return this.m_parent.server_call(this, "auth/logout", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * braille API */ function portal_api_braille(p_parent) { this.m_parent = p_parent; } portal_api_braille.prototype.get_available_encodings = function (p_options, p_callback, p_error_callback) { if (this.get_available_encodings && this.get_available_encodings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'braille.get_available_encodings' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "braille/get_available_encodings", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * bucket API */ function portal_api_bucket(p_parent) { this.m_parent = p_parent; } portal_api_bucket.prototype.add_value = function (p_identifier, p_value, p_options, p_callback, p_error_callback) { if (this.add_value && this.add_value.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.add_value' }; if (p_identifier !== undefined) l_dict.identifier = p_identifier if (p_value !== undefined) l_dict.value = p_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/add_value", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.extract_value = function (p_identifier, p_value, p_options, p_callback, p_error_callback) { if (this.extract_value && this.extract_value.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.extract_value' }; if (p_identifier !== undefined) l_dict.identifier = p_identifier if (p_value !== undefined) l_dict.value = p_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/extract_value", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.get_visualization_data = function (p_identifier, p_from_date, p_to_date, p_options, p_callback, p_error_callback) { if (this.get_visualization_data && this.get_visualization_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.get_visualization_data' }; if (p_identifier !== undefined) l_dict.identifier = p_identifier if (p_from_date !== undefined) l_dict.from_date = p_from_date if (p_to_date !== undefined) l_dict.to_date = p_to_date if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/get_visualization_data", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.instantiate_base_bucket = function (p_data, p_callback, p_error_callback) { if (this.instantiate_base_bucket && this.instantiate_base_bucket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.instantiate_base_bucket' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "bucket/instantiate_base_bucket", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.set_value = function (p_identifier, p_value, p_options, p_callback, p_error_callback) { if (this.set_value && this.set_value.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.set_value' }; if (p_identifier !== undefined) l_dict.identifier = p_identifier if (p_value !== undefined) l_dict.value = p_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/set_value", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/count", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "bucket/create", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "bucket/delete", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "bucket/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "bucket/get", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "bucket/list", l_dict, p_callback, p_error_callback); } portal_api_bucket.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bucket.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bucket/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * registry API */ function portal_api_registry(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * registry.cfapp API */ function portal_api_registry_cfapp(p_parent) { this.m_parent = p_parent; } portal_api_registry_cfapp.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "registry/cfapp/count", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "registry/cfapp/create", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "registry/cfapp/delete", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "registry/cfapp/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "registry/cfapp/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "registry/cfapp/get", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "registry/cfapp/list", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "registry/cfapp/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "registry/cfapp/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "registry/cfapp/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "registry/cfapp/set_keys", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "registry/cfapp/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_registry_cfapp.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'registry.cfapp.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "registry/cfapp/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * config API */ function portal_api_config(p_parent) { this.m_parent = p_parent; } portal_api_config.prototype.add_file_store = function (p_definition, p_options, p_callback, p_error_callback) { if (this.add_file_store && this.add_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_file_store' }; if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_file_store", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.add_file_store_mapping = function (p_server_name, p_definition, p_options, p_callback, p_error_callback) { if (this.add_file_store_mapping && this.add_file_store_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_file_store_mapping' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_file_store_mapping", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.add_logical = function (p_server_name, p_definition, p_options, p_callback, p_error_callback) { if (this.add_logical && this.add_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_logical' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_logical", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.add_missing_workers = function (p_options, p_callback, p_error_callback) { if (this.add_missing_workers && this.add_missing_workers.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_missing_workers' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_missing_workers", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.add_worker = function (p_server_name, p_definition, p_options, p_callback, p_error_callback) { if (this.add_worker && this.add_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_worker' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_worker", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.add_work_server = function (p_definition, p_options, p_callback, p_error_callback) { if (this.add_work_server && this.add_work_server.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.add_work_server' }; if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/add_work_server", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.delete_file_store = function (p_name, p_options, p_callback, p_error_callback) { if (this.delete_file_store && this.delete_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.delete_file_store' }; if (p_name !== undefined) l_dict.name = p_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/delete_file_store", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.delete_file_store_mapping = function (p_server_name, p_mapping_name, p_options, p_callback, p_error_callback) { if (this.delete_file_store_mapping && this.delete_file_store_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.delete_file_store_mapping' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_mapping_name !== undefined) l_dict.mapping_name = p_mapping_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/delete_file_store_mapping", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.delete_logical = function (p_server_name, p_logical_name, p_options, p_callback, p_error_callback) { if (this.delete_logical && this.delete_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.delete_logical' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_logical_name !== undefined) l_dict.logical_name = p_logical_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/delete_logical", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.delete_worker = function (p_server_name, p_worker_name, p_options, p_callback, p_error_callback) { if (this.delete_worker && this.delete_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.delete_worker' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_worker_name !== undefined) l_dict.worker_name = p_worker_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/delete_worker", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.delete_work_server = function (p_server_name, p_options, p_callback, p_error_callback) { if (this.delete_work_server && this.delete_work_server.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.delete_work_server' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/delete_work_server", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.get_patchplanner = function (p_options, p_callback, p_error_callback) { if (this.get_patchplanner && this.get_patchplanner.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.get_patchplanner' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/get_patchplanner", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.get_settings = function (p_options, p_callback, p_error_callback) { if (this.get_settings && this.get_settings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.get_settings' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/get_settings", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.list_file_stores = function (p_options, p_callback, p_error_callback) { if (this.list_file_stores && this.list_file_stores.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.list_file_stores' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/list_file_stores", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.list_work_servers = function (p_options, p_callback, p_error_callback) { if (this.list_work_servers && this.list_work_servers.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.list_work_servers' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/list_work_servers", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.setup = function (p_definition, p_options, p_callback, p_error_callback) { if (this.setup && this.setup.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.setup' }; if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/setup", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_file_store = function (p_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_file_store && this.update_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_file_store' }; if (p_name !== undefined) l_dict.name = p_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_file_store", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_file_store_mapping = function (p_server_name, p_mapping_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_file_store_mapping && this.update_file_store_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_file_store_mapping' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_mapping_name !== undefined) l_dict.mapping_name = p_mapping_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_file_store_mapping", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_logical = function (p_server_name, p_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_logical && this.update_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_logical' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_name !== undefined) l_dict.name = p_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_logical", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_patchplanner = function (p_changes, p_options, p_callback, p_error_callback) { if (this.update_patchplanner && this.update_patchplanner.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_patchplanner' }; if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_patchplanner", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_settings = function (p_changes, p_options, p_callback, p_error_callback) { if (this.update_settings && this.update_settings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_settings' }; if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_settings", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_worker = function (p_server_name, p_worker_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_worker && this.update_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_worker' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_worker_name !== undefined) l_dict.worker_name = p_worker_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_worker", l_dict, p_callback, p_error_callback); } portal_api_config.prototype.update_work_server = function (p_server_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_work_server && this.update_work_server.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'config.update_work_server' }; if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "config/update_work_server", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * curve API */ function portal_api_curve(p_parent) { this.m_parent = p_parent; } portal_api_curve.prototype.interpolate = function (p_curve_json, p_callback, p_error_callback) { if (this.interpolate && this.interpolate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.interpolate' }; if (p_curve_json !== undefined) l_dict.curve_json = p_curve_json return this.m_parent.server_call(this, "curve/interpolate", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.read_file = function (p_url, p_callback, p_error_callback) { if (this.read_file && this.read_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.read_file' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "curve/read_file", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.write_file = function (p_data, p_url, p_options, p_callback, p_error_callback) { if (this.write_file && this.write_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.write_file' }; if (p_data !== undefined) l_dict.data = p_data if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "curve/write_file", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.import_cgats = function (p_cgats_file, p_density, p_callback, p_error_callback) { if (this.import_cgats && this.import_cgats.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.import_cgats' }; if (p_cgats_file !== undefined) l_dict.cgats_file = p_cgats_file if (p_density !== undefined) l_dict.density = p_density return this.m_parent.server_call(this, "curve/import_cgats", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.cgats_import = function (p_cgats_file, p_density, p_callback, p_error_callback) { if (this.cgats_import && this.cgats_import.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.cgats_import' }; if (p_cgats_file !== undefined) l_dict.cgats_file = p_cgats_file if (p_density !== undefined) l_dict.density = p_density return this.m_parent.server_call(this, "curve/cgats_import", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.cgats_set_gold = function (p_cgats_file, p_algorithm, p_ink_limits, p_dotgain, p_callback, p_error_callback) { if (this.cgats_set_gold && this.cgats_set_gold.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.cgats_set_gold' }; if (p_cgats_file !== undefined) l_dict.cgats_file = p_cgats_file if (p_algorithm !== undefined) l_dict.algorithm = p_algorithm if (p_ink_limits !== undefined) l_dict.ink_limits = p_ink_limits if (p_dotgain !== undefined) l_dict.dotgain = p_dotgain return this.m_parent.server_call(this, "curve/cgats_set_gold", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.import_iso18620 = function (p_iso18620_file, p_callback, p_error_callback) { if (this.import_iso18620 && this.import_iso18620.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.import_iso18620' }; if (p_iso18620_file !== undefined) l_dict.iso18620_file = p_iso18620_file return this.m_parent.server_call(this, "curve/import_iso18620", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.smoothen = function (p_points, p_options, p_callback, p_error_callback) { if (this.smoothen && this.smoothen.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.smoothen' }; if (p_points !== undefined) l_dict.points = p_points if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "curve/smoothen", l_dict, p_callback, p_error_callback); } portal_api_curve.prototype.dgc_txt_convert = function (p_dgc_txt, p_options, p_callback, p_error_callback) { if (this.dgc_txt_convert && this.dgc_txt_convert.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'curve.dgc_txt_convert' }; if (p_dgc_txt !== undefined) l_dict.dgc_txt = p_dgc_txt if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "curve/dgc_txt_convert", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * custom_objects API */ function portal_api_custom_objects(p_parent) { this.m_parent = p_parent; } portal_api_custom_objects.prototype.create = function (p_collection, p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.create' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "custom_objects/create", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.delete = function (p_collection, p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.delete' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "custom_objects/delete", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.delete_multiple = function (p_collection, p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.delete_multiple' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "custom_objects/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.delete_by_query = function (p_collection, p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.delete_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "custom_objects/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.delete_many = function (p_collection, p_query, p_callback, p_error_callback) { if (this.delete_many && this.delete_many.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.delete_many' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query return this.m_parent.server_call(this, "custom_objects/delete_many", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.get = function (p_collection, p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.get' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "custom_objects/get", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.list = function (p_collection, p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.list' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "custom_objects/list", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.list_with_options = function (p_collection, p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.list_with_options' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "custom_objects/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.remove_keys = function (p_collection, p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.remove_keys' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "custom_objects/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.remove_keys_by_query = function (p_collection, p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.remove_keys_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "custom_objects/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.set_is_scoped = function (p_collection, p_is_scoped, p_callback, p_error_callback) { if (this.set_is_scoped && this.set_is_scoped.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.set_is_scoped' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_is_scoped !== undefined) l_dict.is_scoped = p_is_scoped return this.m_parent.server_call(this, "custom_objects/set_is_scoped", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.set_keys = function (p_collection, p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.set_keys' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "custom_objects/set_keys", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.set_keys_by_query = function (p_collection, p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.set_keys_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "custom_objects/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.set_scope = function (p_collection, p_id, p_scope_id, p_callback, p_error_callback) { if (this.set_scope && this.set_scope.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.set_scope' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id if (p_scope_id !== undefined) l_dict.scope_id = p_scope_id return this.m_parent.server_call(this, "custom_objects/set_scope", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.update = function (p_collection, p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.update' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "custom_objects/update", l_dict, p_callback, p_error_callback); } portal_api_custom_objects.prototype.count = function (p_collection, p_query, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'custom_objects.count' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query return this.m_parent.server_call(this, "custom_objects/count", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * database API */ function portal_api_database(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * database.collection API */ function portal_api_database_collection(p_parent) { this.m_parent = p_parent; } portal_api_database_collection.prototype.create_index = function (p_collection, p_index_name, p_key, p_options, p_callback, p_error_callback) { if (this.create_index && this.create_index.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.collection.create_index' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_index_name !== undefined) l_dict.index_name = p_index_name if (p_key !== undefined) l_dict.key = p_key if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/collection/create_index", l_dict, p_callback, p_error_callback); } portal_api_database_collection.prototype.get_all_names = function (p_database, p_callback, p_error_callback) { if (this.get_all_names && this.get_all_names.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.collection.get_all_names' }; if (p_database !== undefined) l_dict.database = p_database return this.m_parent.server_call(this, "database/collection/get_all_names", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * database.document API */ function portal_api_database_document(p_parent) { this.m_parent = p_parent; } portal_api_database_document.prototype.count = function (p_collection, p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.count' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/document/count", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.create = function (p_collection, p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.create' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "database/document/create", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.create_by_url = function (p_url, p_data, p_callback, p_error_callback) { if (this.create_by_url && this.create_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.create_by_url' }; if (p_url !== undefined) l_dict.url = p_url if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "database/document/create_by_url", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.delete = function (p_collection, p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.delete' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "database/document/delete", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.delete_multiple = function (p_collection, p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.delete_multiple' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "database/document/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.delete_by_query = function (p_collection, p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.delete_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/document/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.get = function (p_collection, p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.get' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "database/document/get", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.get_by_url = function (p_url, p_callback, p_error_callback) { if (this.get_by_url && this.get_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.get_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "database/document/get_by_url", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.list = function (p_collection, p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.list' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "database/document/list", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.list_with_options = function (p_collection, p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.list_with_options' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/document/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.remove_keys = function (p_collection, p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.remove_keys' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "database/document/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.remove_keys_by_query = function (p_collection, p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.remove_keys_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/document/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.set_keys = function (p_collection, p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.set_keys' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "database/document/set_keys", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.set_keys_by_query = function (p_collection, p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.set_keys_by_query' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database/document/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_database_document.prototype.update = function (p_collection, p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database.document.update' }; if (p_collection !== undefined) l_dict.collection = p_collection if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "database/document/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * email API */ function portal_api_email(p_parent) { this.m_parent = p_parent; } portal_api_email.prototype.send_mail = function (p_email_address, p_subject, p_body, p_callback, p_error_callback) { if (this.send_mail && this.send_mail.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'email.send_mail' }; if (p_email_address !== undefined) l_dict.email_address = p_email_address if (p_subject !== undefined) l_dict.subject = p_subject if (p_body !== undefined) l_dict.body = p_body return this.m_parent.server_call(this, "email/send_mail", l_dict, p_callback, p_error_callback); } portal_api_email.prototype.send_mail_with_attachements = function (p_email_address, p_subject, p_body, p_attachments, p_callback, p_error_callback) { if (this.send_mail_with_attachements && this.send_mail_with_attachements.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'email.send_mail_with_attachements' }; if (p_email_address !== undefined) l_dict.email_address = p_email_address if (p_subject !== undefined) l_dict.subject = p_subject if (p_body !== undefined) l_dict.body = p_body if (p_attachments !== undefined) l_dict.attachments = p_attachments return this.m_parent.server_call(this, "email/send_mail_with_attachements", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * file API */ function portal_api_file(p_parent) { this.m_parent = p_parent; } portal_api_file.prototype.compare_files_with_options = function (p_first_file, p_second_file, p_options, p_callback, p_error_callback) { if (this.compare_files_with_options && this.compare_files_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.compare_files_with_options' }; if (p_first_file !== undefined) l_dict.first_file = p_first_file if (p_second_file !== undefined) l_dict.second_file = p_second_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/compare_files_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.compare_files = function (p_first_file, p_second_file, p_callback, p_error_callback) { if (this.compare_files && this.compare_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.compare_files' }; if (p_first_file !== undefined) l_dict.first_file = p_first_file if (p_second_file !== undefined) l_dict.second_file = p_second_file return this.m_parent.server_call(this, "file/compare_files", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.copy_file_with_options = function (p_from_file, p_to_file_or_folder, p_options, p_callback, p_error_callback) { if (this.copy_file_with_options && this.copy_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.copy_file_with_options' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/copy_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.copy_file = function (p_from_file, p_to_file_or_folder, p_callback, p_error_callback) { if (this.copy_file && this.copy_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.copy_file' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder return this.m_parent.server_call(this, "file/copy_file", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.copy_file_and_overwrite = function (p_from_file, p_to_file_or_folder, p_overwrite, p_callback, p_error_callback) { if (this.copy_file_and_overwrite && this.copy_file_and_overwrite.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.copy_file_and_overwrite' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "file/copy_file_and_overwrite", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.copy_file_with_unique_name = function (p_from_file, p_to_file_or_folder, p_unique_name_mode, p_callback, p_error_callback) { if (this.copy_file_with_unique_name && this.copy_file_with_unique_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.copy_file_with_unique_name' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_unique_name_mode !== undefined) l_dict.unique_name_mode = p_unique_name_mode return this.m_parent.server_call(this, "file/copy_file_with_unique_name", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.copy_folder = function (p_from_folder, p_to_folder, p_options, p_callback, p_error_callback) { if (this.copy_folder && this.copy_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.copy_folder' }; if (p_from_folder !== undefined) l_dict.from_folder = p_from_folder if (p_to_folder !== undefined) l_dict.to_folder = p_to_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/copy_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.create_folder_with_options = function (p_inside_folder, p_folder_to_create, p_options, p_callback, p_error_callback) { if (this.create_folder_with_options && this.create_folder_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.create_folder_with_options' }; if (p_inside_folder !== undefined) l_dict.inside_folder = p_inside_folder if (p_folder_to_create !== undefined) l_dict.folder_to_create = p_folder_to_create if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/create_folder_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.create_folder = function (p_inside_folder, p_folder_to_create, p_callback, p_error_callback) { if (this.create_folder && this.create_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.create_folder' }; if (p_inside_folder !== undefined) l_dict.inside_folder = p_inside_folder if (p_folder_to_create !== undefined) l_dict.folder_to_create = p_folder_to_create return this.m_parent.server_call(this, "file/create_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.delete_file_with_options = function (p_file, p_options, p_callback, p_error_callback) { if (this.delete_file_with_options && this.delete_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.delete_file_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/delete_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.delete_file = function (p_file, p_callback, p_error_callback) { if (this.delete_file && this.delete_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.delete_file' }; if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "file/delete_file", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.delete_folder_with_options = function (p_folder, p_options, p_callback, p_error_callback) { if (this.delete_folder_with_options && this.delete_folder_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.delete_folder_with_options' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/delete_folder_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.delete_folder = function (p_folder, p_contents_only, p_callback, p_error_callback) { if (this.delete_folder && this.delete_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.delete_folder' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_contents_only !== undefined) l_dict.contents_only = p_contents_only return this.m_parent.server_call(this, "file/delete_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.does_exist = function (p_file_or_folder, p_callback, p_error_callback) { if (this.does_exist && this.does_exist.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.does_exist' }; if (p_file_or_folder !== undefined) l_dict.file_or_folder = p_file_or_folder return this.m_parent.server_call(this, "file/does_exist", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.get_file_info = function (p_file, p_callback, p_error_callback) { if (this.get_file_info && this.get_file_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.get_file_info' }; if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "file/get_file_info", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.get_file_info_from_file = function (p_file, p_callback, p_error_callback) { if (this.get_file_info_from_file && this.get_file_info_from_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.get_file_info_from_file' }; if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "file/get_file_info_from_file", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.get_predefined_folder = function (p_folder_type, p_callback, p_error_callback) { if (this.get_predefined_folder && this.get_predefined_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.get_predefined_folder' }; if (p_folder_type !== undefined) l_dict.folder_type = p_folder_type return this.m_parent.server_call(this, "file/get_predefined_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.list_folder = function (p_folder, p_options, p_callback, p_error_callback) { if (this.list_folder && this.list_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.list_folder' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/list_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_file_with_options = function (p_from_file, p_to_file_or_folder, p_options, p_callback, p_error_callback) { if (this.move_file_with_options && this.move_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_file_with_options' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/move_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_file = function (p_from_file, p_to_file_or_folder, p_callback, p_error_callback) { if (this.move_file && this.move_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_file' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder return this.m_parent.server_call(this, "file/move_file", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_file_and_overwrite = function (p_from_file, p_to_file_or_folder, p_overwrite, p_callback, p_error_callback) { if (this.move_file_and_overwrite && this.move_file_and_overwrite.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_file_and_overwrite' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "file/move_file_and_overwrite", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_file_with_unique_name = function (p_from_file, p_to_file_or_folder, p_unique_name_mode, p_callback, p_error_callback) { if (this.move_file_with_unique_name && this.move_file_with_unique_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_file_with_unique_name' }; if (p_from_file !== undefined) l_dict.from_file = p_from_file if (p_to_file_or_folder !== undefined) l_dict.to_file_or_folder = p_to_file_or_folder if (p_unique_name_mode !== undefined) l_dict.unique_name_mode = p_unique_name_mode return this.m_parent.server_call(this, "file/move_file_with_unique_name", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_folder = function (p_from_folder, p_to_folder, p_options, p_callback, p_error_callback) { if (this.move_folder && this.move_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_folder' }; if (p_from_folder !== undefined) l_dict.from_folder = p_from_folder if (p_to_folder !== undefined) l_dict.to_folder = p_to_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/move_folder", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.move_file_to_trash = function (p_url, p_options, p_callback, p_error_callback) { if (this.move_file_to_trash && this.move_file_to_trash.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.move_file_to_trash' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/move_file_to_trash", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.ospath_to_url = function (p_ospath, p_base_url, p_callback, p_error_callback) { if (this.ospath_to_url && this.ospath_to_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.ospath_to_url' }; if (p_ospath !== undefined) l_dict.ospath = p_ospath if (p_base_url !== undefined) l_dict.base_url = p_base_url return this.m_parent.server_call(this, "file/ospath_to_url", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.read_json_file = function (p_url, p_callback, p_error_callback) { if (this.read_json_file && this.read_json_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.read_json_file' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/read_json_file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * file.json API */ function portal_api_file_json(p_parent) { this.m_parent = p_parent; } portal_api_file_json.prototype.read = function (p_url, p_callback, p_error_callback) { if (this.read && this.read.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.json.read' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/json/read", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.rewrite_ospath = function (p_ospath, p_from_notation, p_to_notation, p_callback, p_error_callback) { if (this.rewrite_ospath && this.rewrite_ospath.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.rewrite_ospath' }; if (p_ospath !== undefined) l_dict.ospath = p_ospath if (p_from_notation !== undefined) l_dict.from_notation = p_from_notation if (p_to_notation !== undefined) l_dict.to_notation = p_to_notation return this.m_parent.server_call(this, "file/rewrite_ospath", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.set_file_info = function (p_file, p_file_info, p_callback, p_error_callback) { if (this.set_file_info && this.set_file_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.set_file_info' }; if (p_file !== undefined) l_dict.file = p_file if (p_file_info !== undefined) l_dict.file_info = p_file_info return this.m_parent.server_call(this, "file/set_file_info", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.url_to_ospath = function (p_url, p_callback, p_error_callback) { if (this.url_to_ospath && this.url_to_ospath.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.url_to_ospath' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/url_to_ospath", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.write_json_file = function (p_data, p_url, p_options, p_callback, p_error_callback) { if (this.write_json_file && this.write_json_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.write_json_file' }; if (p_data !== undefined) l_dict.data = p_data if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/write_json_file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * file.json API */ function portal_api_file_json(p_parent) { this.m_parent = p_parent; } portal_api_file_json.prototype.write = function (p_data, p_url, p_options, p_callback, p_error_callback) { if (this.write && this.write.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.json.write' }; if (p_data !== undefined) l_dict.data = p_data if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/json/write", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * file.text API */ function portal_api_file_text(p_parent) { this.m_parent = p_parent; } portal_api_file_text.prototype.read = function (p_url, p_options, p_callback, p_error_callback) { if (this.read && this.read.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.text.read' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/text/read", l_dict, p_callback, p_error_callback); } portal_api_file_text.prototype.tail = function (p_url, p_options, p_callback, p_error_callback) { if (this.tail && this.tail.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.text.tail' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/text/tail", l_dict, p_callback, p_error_callback); } portal_api_file_text.prototype.write = function (p_text, p_url, p_options, p_callback, p_error_callback) { if (this.write && this.write.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.text.write' }; if (p_text !== undefined) l_dict.text = p_text if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "file/text/write", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.write_string = function (p_url, p_string, p_callback, p_error_callback) { if (this.write_string && this.write_string.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.write_string' }; if (p_url !== undefined) l_dict.url = p_url if (p_string !== undefined) l_dict.string = p_string return this.m_parent.server_call(this, "file/write_string", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.read_string = function (p_url, p_callback, p_error_callback) { if (this.read_string && this.read_string.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.read_string' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/read_string", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.fileExists = function (p_url, p_callback, p_error_callback) { if (this.fileExists && this.fileExists.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.fileExists' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/fileExists", l_dict, p_callback, p_error_callback); } portal_api_file.prototype.read_json_from_url = function (p_url, p_callback, p_error_callback) { if (this.read_json_from_url && this.read_json_from_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'file.read_json_from_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "file/read_json_from_url", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * folder API */ function portal_api_folder(p_parent) { this.m_parent = p_parent; } portal_api_folder.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "folder/get", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "folder/create", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "folder/delete", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "folder/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "folder/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.add_tag = function (p_folder, p_tag, p_callback, p_error_callback) { if (this.add_tag && this.add_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.add_tag' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "folder/add_tag", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.create_missing_folders = function (p_folder, p_options, p_callback, p_error_callback) { if (this.create_missing_folders && this.create_missing_folders.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.create_missing_folders' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "folder/create_missing_folders", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.get_tags = function (p_folder, p_callback, p_error_callback) { if (this.get_tags && this.get_tags.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.get_tags' }; if (p_folder !== undefined) l_dict.folder = p_folder return this.m_parent.server_call(this, "folder/get_tags", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.has_all_tags = function (p_folder, p_tags, p_callback, p_error_callback) { if (this.has_all_tags && this.has_all_tags.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.has_all_tags' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_tags !== undefined) l_dict.tags = p_tags return this.m_parent.server_call(this, "folder/has_all_tags", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.has_at_least_one_tag = function (p_folder, p_tags, p_callback, p_error_callback) { if (this.has_at_least_one_tag && this.has_at_least_one_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.has_at_least_one_tag' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_tags !== undefined) l_dict.tags = p_tags return this.m_parent.server_call(this, "folder/has_at_least_one_tag", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.has_tag = function (p_folder, p_tag, p_callback, p_error_callback) { if (this.has_tag && this.has_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.has_tag' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "folder/has_tag", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "folder/list", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "folder/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.list_with_tag_query = function (p_query, p_tag_query, p_tag_mode, p_fields, p_callback, p_error_callback) { if (this.list_with_tag_query && this.list_with_tag_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.list_with_tag_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_tag_query !== undefined) l_dict.tag_query = p_tag_query if (p_tag_mode !== undefined) l_dict.tag_mode = p_tag_mode if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "folder/list_with_tag_query", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.list_with_tag_query_and_options = function (p_query, p_tag_query, p_tag_mode, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_tag_query_and_options && this.list_with_tag_query_and_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.list_with_tag_query_and_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_tag_query !== undefined) l_dict.tag_query = p_tag_query if (p_tag_mode !== undefined) l_dict.tag_mode = p_tag_mode if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "folder/list_with_tag_query_and_options", l_dict, p_callback, p_error_callback); } portal_api_folder.prototype.remove_tag = function (p_folder, p_tag, p_callback, p_error_callback) { if (this.remove_tag && this.remove_tag.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'folder.remove_tag' }; if (p_folder !== undefined) l_dict.folder = p_folder if (p_tag !== undefined) l_dict.tag = p_tag return this.m_parent.server_call(this, "folder/remove_tag", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * localization API */ function portal_api_localization(p_parent) { this.m_parent = p_parent; } portal_api_localization.prototype.localize = function (p_keyword, p_context, p_parameters, p_options, p_callback, p_error_callback) { if (this.localize && this.localize.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'localization.localize' }; if (p_keyword !== undefined) l_dict.keyword = p_keyword if (p_context !== undefined) l_dict.context = p_context if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "localization/localize", l_dict, p_callback, p_error_callback); } portal_api_localization.prototype.localize_for_multiple_languages = function (p_keyword, p_context, p_parameters, p_options, p_callback, p_error_callback) { if (this.localize_for_multiple_languages && this.localize_for_multiple_languages.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'localization.localize_for_multiple_languages' }; if (p_keyword !== undefined) l_dict.keyword = p_keyword if (p_context !== undefined) l_dict.context = p_context if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "localization/localize_for_multiple_languages", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * logging API */ function portal_api_logging(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * logging.trace API */ function portal_api_logging_trace(p_parent) { this.m_parent = p_parent; } portal_api_logging_trace.prototype.is_enabled_for = function (p_context, p_level, p_callback, p_error_callback) { if (this.is_enabled_for && this.is_enabled_for.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.trace.is_enabled_for' }; if (p_context !== undefined) l_dict.context = p_context if (p_level !== undefined) l_dict.level = p_level return this.m_parent.server_call(this, "logging/trace/is_enabled_for", l_dict, p_callback, p_error_callback); } portal_api_logging_trace.prototype.level_for = function (p_context, p_callback, p_error_callback) { if (this.level_for && this.level_for.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.trace.level_for' }; if (p_context !== undefined) l_dict.context = p_context return this.m_parent.server_call(this, "logging/trace/level_for", l_dict, p_callback, p_error_callback); } portal_api_logging_trace.prototype.log = function (p_context, p_level, p_message, p_callback, p_error_callback) { if (this.log && this.log.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.trace.log' }; if (p_context !== undefined) l_dict.context = p_context if (p_level !== undefined) l_dict.level = p_level if (p_message !== undefined) l_dict.message = p_message return this.m_parent.server_call(this, "logging/trace/log", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "logging/count", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "logging/delete", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "logging/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "logging/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "logging/list", l_dict, p_callback, p_error_callback); } portal_api_logging.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'logging.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "logging/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * network API */ function portal_api_network(p_parent) { this.m_parent = p_parent; } portal_api_network.prototype.download_to_file = function (p_url, p_file, p_callback, p_error_callback) { if (this.download_to_file && this.download_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.download_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "network/download_to_file", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.download_to_file_with_options = function (p_url, p_file, p_options, p_callback, p_error_callback) { if (this.download_to_file_with_options && this.download_to_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.download_to_file_with_options' }; if (p_url !== undefined) l_dict.url = p_url if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "network/download_to_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.upload_file = function (p_file, p_url, p_callback, p_error_callback) { if (this.upload_file && this.upload_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.upload_file' }; if (p_file !== undefined) l_dict.file = p_file if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "network/upload_file", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.upload_file_with_authentication = function (p_file, p_url, p_username, p_password, p_callback, p_error_callback) { if (this.upload_file_with_authentication && this.upload_file_with_authentication.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.upload_file_with_authentication' }; if (p_file !== undefined) l_dict.file = p_file if (p_url !== undefined) l_dict.url = p_url if (p_username !== undefined) l_dict.username = p_username if (p_password !== undefined) l_dict.password = p_password return this.m_parent.server_call(this, "network/upload_file_with_authentication", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.upload_file_with_options = function (p_file, p_url, p_options, p_callback, p_error_callback) { if (this.upload_file_with_options && this.upload_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.upload_file_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "network/upload_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.call_rest = function (p_http_method, p_url, p_content_type, p_request_data, p_callback, p_error_callback) { if (this.call_rest && this.call_rest.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.call_rest' }; if (p_http_method !== undefined) l_dict.http_method = p_http_method if (p_url !== undefined) l_dict.url = p_url if (p_content_type !== undefined) l_dict.content_type = p_content_type if (p_request_data !== undefined) l_dict.request_data = p_request_data return this.m_parent.server_call(this, "network/call_rest", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.call_rest_with_options = function (p_http_method, p_url, p_content_type, p_request_data, p_options, p_callback, p_error_callback) { if (this.call_rest_with_options && this.call_rest_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.call_rest_with_options' }; if (p_http_method !== undefined) l_dict.http_method = p_http_method if (p_url !== undefined) l_dict.url = p_url if (p_content_type !== undefined) l_dict.content_type = p_content_type if (p_request_data !== undefined) l_dict.request_data = p_request_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "network/call_rest_with_options", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.call_soap = function (p_url, p_name, p_parameters, p_callback, p_error_callback) { if (this.call_soap && this.call_soap.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.call_soap' }; if (p_url !== undefined) l_dict.url = p_url if (p_name !== undefined) l_dict.name = p_name if (p_parameters !== undefined) l_dict.parameters = p_parameters return this.m_parent.server_call(this, "network/call_soap", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.call_soap_with_local_wsdl = function (p_url, p_name, p_parameters, p_wsdl_url, p_callback, p_error_callback) { if (this.call_soap_with_local_wsdl && this.call_soap_with_local_wsdl.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.call_soap_with_local_wsdl' }; if (p_url !== undefined) l_dict.url = p_url if (p_name !== undefined) l_dict.name = p_name if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_wsdl_url !== undefined) l_dict.wsdl_url = p_wsdl_url return this.m_parent.server_call(this, "network/call_soap_with_local_wsdl", l_dict, p_callback, p_error_callback); } portal_api_network.prototype.call_soap_with_options = function (p_url, p_name, p_parameters, p_options, p_callback, p_error_callback) { if (this.call_soap_with_options && this.call_soap_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'network.call_soap_with_options' }; if (p_url !== undefined) l_dict.url = p_url if (p_name !== undefined) l_dict.name = p_name if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "network/call_soap_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * output_device API */ function portal_api_output_device(p_parent) { this.m_parent = p_parent; } portal_api_output_device.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "output_device/create", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "output_device/delete", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "output_device/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "output_device/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "output_device/get", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "output_device/list", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "output_device/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_output_device.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'output_device.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "output_device/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * pdf API */ function portal_api_pdf(p_parent) { this.m_parent = p_parent; } portal_api_pdf.prototype.delete_pages = function (p_url, p_delete_pages, p_callback, p_error_callback) { if (this.delete_pages && this.delete_pages.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.delete_pages' }; if (p_url !== undefined) l_dict.url = p_url if (p_delete_pages !== undefined) l_dict.delete_pages = p_delete_pages return this.m_parent.server_call(this, "pdf/delete_pages", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.delete_pages_with_options = function (p_url, p_delete_pages, p_options, p_callback, p_error_callback) { if (this.delete_pages_with_options && this.delete_pages_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.delete_pages_with_options' }; if (p_url !== undefined) l_dict.url = p_url if (p_delete_pages !== undefined) l_dict.delete_pages = p_delete_pages if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/delete_pages_with_options", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.down_sample = function (p_pdf, p_downsampled, p_options, p_callback, p_error_callback) { if (this.down_sample && this.down_sample.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.down_sample' }; if (p_pdf !== undefined) l_dict.pdf = p_pdf if (p_downsampled !== undefined) l_dict.downsampled = p_downsampled if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/down_sample", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.join_pages = function (p_files, p_target_folder, p_options, p_callback, p_error_callback) { if (this.join_pages && this.join_pages.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.join_pages' }; if (p_files !== undefined) l_dict.files = p_files if (p_target_folder !== undefined) l_dict.target_folder = p_target_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/join_pages", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.optimize_for_rip = function (p_pdf, p_optimized, p_callback, p_error_callback) { if (this.optimize_for_rip && this.optimize_for_rip.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.optimize_for_rip' }; if (p_pdf !== undefined) l_dict.pdf = p_pdf if (p_optimized !== undefined) l_dict.optimized = p_optimized return this.m_parent.server_call(this, "pdf/optimize_for_rip", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.split_pages = function (p_url, p_target_folder, p_options, p_callback, p_error_callback) { if (this.split_pages && this.split_pages.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.split_pages' }; if (p_url !== undefined) l_dict.url = p_url if (p_target_folder !== undefined) l_dict.target_folder = p_target_folder if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/split_pages", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.update_4pro_file = function (p_file, p_options, p_callback, p_error_callback) { if (this.update_4pro_file && this.update_4pro_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.update_4pro_file' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/update_4pro_file", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.pdf_validate = function (p_url, p_callback, p_error_callback) { if (this.pdf_validate && this.pdf_validate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.pdf_validate' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "pdf/pdf_validate", l_dict, p_callback, p_error_callback); } portal_api_pdf.prototype.save_rasterized_to_file = function (p_input_url, p_rasterized_url, p_options, p_callback, p_error_callback) { if (this.save_rasterized_to_file && this.save_rasterized_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'pdf.save_rasterized_to_file' }; if (p_input_url !== undefined) l_dict.input_url = p_input_url if (p_rasterized_url !== undefined) l_dict.rasterized_url = p_rasterized_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "pdf/save_rasterized_to_file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * portal API */ function portal_api_portal(p_parent) { this.m_parent = p_parent; } portal_api_portal.prototype.check_file_store = function (p_path, p_test_file, p_callback, p_error_callback) { if (this.check_file_store && this.check_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.check_file_store' }; if (p_path !== undefined) l_dict.path = p_path if (p_test_file !== undefined) l_dict.test_file = p_test_file return this.m_parent.server_call(this, "portal/check_file_store", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_active_users = function (p_callback, p_error_callback) { if (this.get_active_users && this.get_active_users.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_active_users' }; return this.m_parent.server_call(this, "portal/get_active_users", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_db_status = function (p_options, p_callback, p_error_callback) { if (this.get_db_status && this.get_db_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_db_status' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "portal/get_db_status", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_portal_info = function (p_callback, p_error_callback) { if (this.get_portal_info && this.get_portal_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_portal_info' }; return this.m_parent.server_call(this, "portal/get_portal_info", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_proofscope_url = function (p_proofscope_id, p_callback, p_error_callback) { if (this.get_proofscope_url && this.get_proofscope_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_proofscope_url' }; if (p_proofscope_id !== undefined) l_dict.proofscope_id = p_proofscope_id return this.m_parent.server_call(this, "portal/get_proofscope_url", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_stats = function (p_callback, p_error_callback) { if (this.get_stats && this.get_stats.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_stats' }; return this.m_parent.server_call(this, "portal/get_stats", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_url = function (p_callback, p_error_callback) { if (this.get_url && this.get_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_url' }; return this.m_parent.server_call(this, "portal/get_url", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_workers_pending = function (p_callback, p_error_callback) { if (this.get_workers_pending && this.get_workers_pending.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_workers_pending' }; return this.m_parent.server_call(this, "portal/get_workers_pending", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.remove_filestore = function (p_filestore, p_callback, p_error_callback) { if (this.remove_filestore && this.remove_filestore.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.remove_filestore' }; if (p_filestore !== undefined) l_dict.filestore = p_filestore return this.m_parent.server_call(this, "portal/remove_filestore", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.send_test_mail = function (p_smtp_to, p_callback, p_error_callback) { if (this.send_test_mail && this.send_test_mail.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.send_test_mail' }; if (p_smtp_to !== undefined) l_dict.smtp_to = p_smtp_to return this.m_parent.server_call(this, "portal/send_test_mail", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.setup = function (p_callback, p_error_callback) { if (this.setup && this.setup.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.setup' }; return this.m_parent.server_call(this, "portal/setup", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.version = function (p_callback, p_error_callback) { if (this.version && this.version.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.version' }; return this.m_parent.server_call(this, "portal/version", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_file_store_mappings = function (p_work_server, p_options, p_callback, p_error_callback) { if (this.get_file_store_mappings && this.get_file_store_mappings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_file_store_mappings' }; if (p_work_server !== undefined) l_dict.work_server = p_work_server if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "portal/get_file_store_mappings", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.get_logical = function (p_logical, p_options, p_callback, p_error_callback) { if (this.get_logical && this.get_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.get_logical' }; if (p_logical !== undefined) l_dict.logical = p_logical if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "portal/get_logical", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.log = function (p_severity, p_message, p_url, p_data, p_options, p_callback, p_error_callback) { if (this.log && this.log.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.log' }; if (p_severity !== undefined) l_dict.severity = p_severity if (p_message !== undefined) l_dict.message = p_message if (p_url !== undefined) l_dict.url = p_url if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "portal/log", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.drop_blue_collar_definitions = function (p_mode, p_callback, p_error_callback) { if (this.drop_blue_collar_definitions && this.drop_blue_collar_definitions.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.drop_blue_collar_definitions' }; if (p_mode !== undefined) l_dict.mode = p_mode return this.m_parent.server_call(this, "portal/drop_blue_collar_definitions", l_dict, p_callback, p_error_callback); } portal_api_portal.prototype.scan_addons = function (p_callback, p_error_callback) { if (this.scan_addons && this.scan_addons.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'portal.scan_addons' }; return this.m_parent.server_call(this, "portal/scan_addons", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * preferences API */ function portal_api_preferences(p_parent) { this.m_parent = p_parent; } portal_api_preferences.prototype.get_for_current_user = function (p_application_id, p_sub_key, p_callback, p_error_callback) { if (this.get_for_current_user && this.get_for_current_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'preferences.get_for_current_user' }; if (p_application_id !== undefined) l_dict.application_id = p_application_id if (p_sub_key !== undefined) l_dict.sub_key = p_sub_key return this.m_parent.server_call(this, "preferences/get_for_current_user", l_dict, p_callback, p_error_callback); } portal_api_preferences.prototype.get_for_realm = function (p_realm_type, p_realm_value, p_application_id, p_sub_key, p_callback, p_error_callback) { if (this.get_for_realm && this.get_for_realm.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'preferences.get_for_realm' }; if (p_realm_type !== undefined) l_dict.realm_type = p_realm_type if (p_realm_value !== undefined) l_dict.realm_value = p_realm_value if (p_application_id !== undefined) l_dict.application_id = p_application_id if (p_sub_key !== undefined) l_dict.sub_key = p_sub_key return this.m_parent.server_call(this, "preferences/get_for_realm", l_dict, p_callback, p_error_callback); } portal_api_preferences.prototype.save_for_current_user = function (p_preferences, p_application_id, p_sub_key, p_callback, p_error_callback) { if (this.save_for_current_user && this.save_for_current_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'preferences.save_for_current_user' }; if (p_preferences !== undefined) l_dict.preferences = p_preferences if (p_application_id !== undefined) l_dict.application_id = p_application_id if (p_sub_key !== undefined) l_dict.sub_key = p_sub_key return this.m_parent.server_call(this, "preferences/save_for_current_user", l_dict, p_callback, p_error_callback); } portal_api_preferences.prototype.save_for_realm = function (p_preferences, p_realm_type, p_realm_value, p_application_id, p_sub_key, p_callback, p_error_callback) { if (this.save_for_realm && this.save_for_realm.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'preferences.save_for_realm' }; if (p_preferences !== undefined) l_dict.preferences = p_preferences if (p_realm_type !== undefined) l_dict.realm_type = p_realm_type if (p_realm_value !== undefined) l_dict.realm_value = p_realm_value if (p_application_id !== undefined) l_dict.application_id = p_application_id if (p_sub_key !== undefined) l_dict.sub_key = p_sub_key return this.m_parent.server_call(this, "preferences/save_for_realm", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * preprocess API */ function portal_api_preprocess(p_parent) { this.m_parent = p_parent; } portal_api_preprocess.prototype.file = function (p_url, p_callback, p_error_callback) { if (this.file && this.file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'preprocess.file' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "preprocess/file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * printer API */ function portal_api_printer(p_parent) { this.m_parent = p_parent; } portal_api_printer.prototype.print = function (p_printer_name, p_file, p_options, p_callback, p_error_callback) { if (this.print && this.print.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printer.print' }; if (p_printer_name !== undefined) l_dict.printer_name = p_printer_name if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printer/print", l_dict, p_callback, p_error_callback); } portal_api_printer.prototype.print_test_page = function (p_printer_name, p_test_type, p_options, p_callback, p_error_callback) { if (this.print_test_page && this.print_test_page.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printer.print_test_page' }; if (p_printer_name !== undefined) l_dict.printer_name = p_printer_name if (p_test_type !== undefined) l_dict.test_type = p_test_type if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printer/print_test_page", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * request API */ function portal_api_request(p_parent) { this.m_parent = p_parent; } portal_api_request.prototype.config = function (p_name, p_callback, p_error_callback) { if (this.config && this.config.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'request.config' }; if (p_name !== undefined) l_dict.name = p_name return this.m_parent.server_call(this, "request/config", l_dict, p_callback, p_error_callback); } portal_api_request.prototype.metadata = function (p_url, p_sub, p_callback, p_error_callback) { if (this.metadata && this.metadata.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'request.metadata' }; if (p_url !== undefined) l_dict.url = p_url if (p_sub !== undefined) l_dict.sub = p_sub return this.m_parent.server_call(this, "request/metadata", l_dict, p_callback, p_error_callback); } portal_api_request.prototype.requiredversion = function (p_callback, p_error_callback) { if (this.requiredversion && this.requiredversion.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'request.requiredversion' }; return this.m_parent.server_call(this, "request/requiredversion", l_dict, p_callback, p_error_callback); } portal_api_request.prototype.show_logs = function (p_parameters, p_callback, p_error_callback) { if (this.show_logs && this.show_logs.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'request.show_logs' }; if (p_parameters !== undefined) l_dict.parameters = p_parameters return this.m_parent.server_call(this, "request/show_logs", l_dict, p_callback, p_error_callback); } portal_api_request.prototype.store_config = function (p_name, p_data, p_callback, p_error_callback) { if (this.store_config && this.store_config.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'request.store_config' }; if (p_name !== undefined) l_dict.name = p_name if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "request/store_config", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * resource API */ function portal_api_resource(p_parent) { this.m_parent = p_parent; } portal_api_resource.prototype.download = function (p_url, p_options, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'resource.download' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "resource/download", l_dict, p_callback, p_error_callback); } portal_api_resource.prototype.enumerate = function (p_type, p_callback, p_error_callback) { if (this.enumerate && this.enumerate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'resource.enumerate' }; if (p_type !== undefined) l_dict.type = p_type return this.m_parent.server_call(this, "resource/enumerate", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * rss API */ function portal_api_rss(p_parent) { this.m_parent = p_parent; } portal_api_rss.prototype.get_pending_approvals_url = function (p_callback, p_error_callback) { if (this.get_pending_approvals_url && this.get_pending_approvals_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'rss.get_pending_approvals_url' }; return this.m_parent.server_call(this, "rss/get_pending_approvals_url", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * screening API */ function portal_api_screening(p_parent) { this.m_parent = p_parent; } portal_api_screening.prototype.list_angle_families = function (p_callback, p_error_callback) { if (this.list_angle_families && this.list_angle_families.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'screening.list_angle_families' }; return this.m_parent.server_call(this, "screening/list_angle_families", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * scope API */ function portal_api_scope(p_parent) { this.m_parent = p_parent; } portal_api_scope.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "scope/create", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "scope/delete", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "scope/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "scope/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "scope/get", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "scope/list", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "scope/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_scope.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scope.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "scope/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * scopes API */ function portal_api_scopes(p_parent) { this.m_parent = p_parent; } portal_api_scopes.prototype.add = function (p_name, p_filter, p_welcomepage, p_callback, p_error_callback) { if (this.add && this.add.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scopes.add' }; if (p_name !== undefined) l_dict.name = p_name if (p_filter !== undefined) l_dict.filter = p_filter if (p_welcomepage !== undefined) l_dict.welcomepage = p_welcomepage return this.m_parent.server_call(this, "scopes/add", l_dict, p_callback, p_error_callback); } portal_api_scopes.prototype.list_all = function (p_callback, p_error_callback) { if (this.list_all && this.list_all.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scopes.list_all' }; return this.m_parent.server_call(this, "scopes/list_all", l_dict, p_callback, p_error_callback); } portal_api_scopes.prototype.update = function (p_scope_id, p_name, p_filter, p_welcomepage, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scopes.update' }; if (p_scope_id !== undefined) l_dict.scope_id = p_scope_id if (p_name !== undefined) l_dict.name = p_name if (p_filter !== undefined) l_dict.filter = p_filter if (p_welcomepage !== undefined) l_dict.welcomepage = p_welcomepage return this.m_parent.server_call(this, "scopes/update", l_dict, p_callback, p_error_callback); } portal_api_scopes.prototype.get = function (p_name, p_add_if_missing, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scopes.get' }; if (p_name !== undefined) l_dict.name = p_name if (p_add_if_missing !== undefined) l_dict.add_if_missing = p_add_if_missing return this.m_parent.server_call(this, "scopes/get", l_dict, p_callback, p_error_callback); } portal_api_scopes.prototype.remove = function (p_scope_id, p_callback, p_error_callback) { if (this.remove && this.remove.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'scopes.remove' }; if (p_scope_id !== undefined) l_dict.scope_id = p_scope_id return this.m_parent.server_call(this, "scopes/remove", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * subProcess API */ function portal_api_subProcess(p_parent) { this.m_parent = p_parent; } portal_api_subProcess.prototype.call_with_options = function (p_command, p_arguments, p_options, p_callback, p_error_callback) { if (this.call_with_options && this.call_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'subProcess.call_with_options' }; if (p_command !== undefined) l_dict.command = p_command if (p_arguments !== undefined) l_dict.arguments = p_arguments if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "subProcess/call_with_options", l_dict, p_callback, p_error_callback); } portal_api_subProcess.prototype.call = function (p_command, p_arguments, p_osList, p_hostList, p_callback, p_error_callback) { if (this.call && this.call.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'subProcess.call' }; if (p_command !== undefined) l_dict.command = p_command if (p_arguments !== undefined) l_dict.arguments = p_arguments if (p_osList !== undefined) l_dict.osList = p_osList if (p_hostList !== undefined) l_dict.hostList = p_hostList return this.m_parent.server_call(this, "subProcess/call", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tag API */ function portal_api_tag(p_parent) { this.m_parent = p_parent; } portal_api_tag.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tag/create", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tag/delete", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "tag/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tag/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tag/get", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tag/list", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tag/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tag.prototype.get_all_names = function (p_callback, p_error_callback) { if (this.get_all_names && this.get_all_names.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tag.get_all_names' }; return this.m_parent.server_call(this, "tag/get_all_names", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * template API */ function portal_api_template(p_parent) { this.m_parent = p_parent; } portal_api_template.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "template/create", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "template/delete", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "template/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "template/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "template/get", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "template/list", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "template/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_template.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'template.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "template/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tenant API */ function portal_api_tenant(p_parent) { this.m_parent = p_parent; } portal_api_tenant.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tenant/get", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tenant/list", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.add_file_store = function (p_tenant, p_definition, p_options, p_callback, p_error_callback) { if (this.add_file_store && this.add_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.add_file_store' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/add_file_store", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.add_file_store_mapping = function (p_tenant, p_definition, p_options, p_callback, p_error_callback) { if (this.add_file_store_mapping && this.add_file_store_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.add_file_store_mapping' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/add_file_store_mapping", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.add_logical = function (p_tenant, p_server_name, p_definition, p_options, p_callback, p_error_callback) { if (this.add_logical && this.add_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.add_logical' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/add_logical", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.add_worker = function (p_tenant, p_server_name, p_definition, p_options, p_callback, p_error_callback) { if (this.add_worker && this.add_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.add_worker' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_definition !== undefined) l_dict.definition = p_definition if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/add_worker", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.delete_file_store = function (p_tenant, p_name, p_options, p_callback, p_error_callback) { if (this.delete_file_store && this.delete_file_store.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.delete_file_store' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_name !== undefined) l_dict.name = p_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/delete_file_store", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.delete_file_store_mapping = function (p_tenant, p_mapping_name, p_options, p_callback, p_error_callback) { if (this.delete_file_store_mapping && this.delete_file_store_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.delete_file_store_mapping' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_mapping_name !== undefined) l_dict.mapping_name = p_mapping_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/delete_file_store_mapping", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.delete_logical = function (p_tenant, p_server_name, p_logical_name, p_options, p_callback, p_error_callback) { if (this.delete_logical && this.delete_logical.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.delete_logical' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_logical_name !== undefined) l_dict.logical_name = p_logical_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/delete_logical", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.delete_worker = function (p_tenant, p_server_name, p_worker_name, p_options, p_callback, p_error_callback) { if (this.delete_worker && this.delete_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.delete_worker' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_worker_name !== undefined) l_dict.worker_name = p_worker_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/delete_worker", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.update_worker = function (p_tenant, p_server_name, p_worker_name, p_changes, p_options, p_callback, p_error_callback) { if (this.update_worker && this.update_worker.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.update_worker' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_server_name !== undefined) l_dict.server_name = p_server_name if (p_worker_name !== undefined) l_dict.worker_name = p_worker_name if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/update_worker", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.rebuild = function (p_definition, p_callback, p_error_callback) { if (this.rebuild && this.rebuild.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.rebuild' }; if (p_definition !== undefined) l_dict.definition = p_definition return this.m_parent.server_call(this, "tenant/rebuild", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.save_preference = function (p_tenant, p_value, p_application_id, p_sub_key, p_callback, p_error_callback) { if (this.save_preference && this.save_preference.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.save_preference' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_value !== undefined) l_dict.value = p_value if (p_application_id !== undefined) l_dict.application_id = p_application_id if (p_sub_key !== undefined) l_dict.sub_key = p_sub_key return this.m_parent.server_call(this, "tenant/save_preference", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.setup = function (p_definition, p_callback, p_error_callback) { if (this.setup && this.setup.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.setup' }; if (p_definition !== undefined) l_dict.definition = p_definition return this.m_parent.server_call(this, "tenant/setup", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.start = function (p_tenant, p_options, p_callback, p_error_callback) { if (this.start && this.start.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.start' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/start", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.stop = function (p_tenant, p_options, p_callback, p_error_callback) { if (this.stop && this.stop.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.stop' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/stop", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.update = function (p_tenant, p_changes, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.update' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_changes !== undefined) l_dict.changes = p_changes return this.m_parent.server_call(this, "tenant/update", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.get_settings = function (p_tenant, p_options, p_callback, p_error_callback) { if (this.get_settings && this.get_settings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.get_settings' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/get_settings", l_dict, p_callback, p_error_callback); } portal_api_tenant.prototype.update_settings = function (p_tenant, p_changes, p_options, p_callback, p_error_callback) { if (this.update_settings && this.update_settings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tenant.update_settings' }; if (p_tenant !== undefined) l_dict.tenant = p_tenant if (p_changes !== undefined) l_dict.changes = p_changes if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tenant/update_settings", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * templates API */ function portal_api_templates(p_parent) { this.m_parent = p_parent; } portal_api_templates.prototype.add = function (p_name, p_language, p_subject, p_message, p_callback, p_error_callback) { if (this.add && this.add.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'templates.add' }; if (p_name !== undefined) l_dict.name = p_name if (p_language !== undefined) l_dict.language = p_language if (p_subject !== undefined) l_dict.subject = p_subject if (p_message !== undefined) l_dict.message = p_message return this.m_parent.server_call(this, "templates/add", l_dict, p_callback, p_error_callback); } portal_api_templates.prototype.fill_template = function (p_template_name, p_template_language, p_variable_map, p_callback, p_error_callback) { if (this.fill_template && this.fill_template.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'templates.fill_template' }; if (p_template_name !== undefined) l_dict.template_name = p_template_name if (p_template_language !== undefined) l_dict.template_language = p_template_language if (p_variable_map !== undefined) l_dict.variable_map = p_variable_map return this.m_parent.server_call(this, "templates/fill_template", l_dict, p_callback, p_error_callback); } portal_api_templates.prototype.list_all = function (p_callback, p_error_callback) { if (this.list_all && this.list_all.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'templates.list_all' }; return this.m_parent.server_call(this, "templates/list_all", l_dict, p_callback, p_error_callback); } portal_api_templates.prototype.update = function (p_template_id, p_name, p_language, p_subject, p_message, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'templates.update' }; if (p_template_id !== undefined) l_dict.template_id = p_template_id if (p_name !== undefined) l_dict.name = p_name if (p_language !== undefined) l_dict.language = p_language if (p_subject !== undefined) l_dict.subject = p_subject if (p_message !== undefined) l_dict.message = p_message return this.m_parent.server_call(this, "templates/update", l_dict, p_callback, p_error_callback); } portal_api_templates.prototype.remove = function (p_template_id, p_callback, p_error_callback) { if (this.remove && this.remove.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'templates.remove' }; if (p_template_id !== undefined) l_dict.template_id = p_template_id return this.m_parent.server_call(this, "templates/remove", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * users API */ function portal_api_users(p_parent) { this.m_parent = p_parent; } portal_api_users.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "users/create", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.change_password = function (p_user_id, p_old_password, p_new_password, p_callback, p_error_callback) { if (this.change_password && this.change_password.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.change_password' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_old_password !== undefined) l_dict.old_password = p_old_password if (p_new_password !== undefined) l_dict.new_password = p_new_password return this.m_parent.server_call(this, "users/change_password", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "users/delete", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "users/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "users/get", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "users/list", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "users/update", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "users/set_keys", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_all_scopes_for_user = function (p_user_name, p_callback, p_error_callback) { if (this.get_all_scopes_for_user && this.get_all_scopes_for_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_all_scopes_for_user' }; if (p_user_name !== undefined) l_dict.user_name = p_user_name return this.m_parent.server_call(this, "users/get_all_scopes_for_user", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_by_user_name = function (p_username, p_callback, p_error_callback) { if (this.get_by_user_name && this.get_by_user_name.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_by_user_name' }; if (p_username !== undefined) l_dict.username = p_username return this.m_parent.server_call(this, "users/get_by_user_name", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_by_email = function (p_email, p_callback, p_error_callback) { if (this.get_by_email && this.get_by_email.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_by_email' }; if (p_email !== undefined) l_dict.email = p_email return this.m_parent.server_call(this, "users/get_by_email", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_contact_by_email = function (p_email, p_callback, p_error_callback) { if (this.get_contact_by_email && this.get_contact_by_email.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_contact_by_email' }; if (p_email !== undefined) l_dict.email = p_email return this.m_parent.server_call(this, "users/get_contact_by_email", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_permissions = function (p_user_id, p_callback, p_error_callback) { if (this.get_permissions && this.get_permissions.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_permissions' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id return this.m_parent.server_call(this, "users/get_permissions", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.is_admin = function (p_user_id, p_callback, p_error_callback) { if (this.is_admin && this.is_admin.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.is_admin' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id return this.m_parent.server_call(this, "users/is_admin", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.add_permission = function (p_user_id, p_permissions, p_callback, p_error_callback) { if (this.add_permission && this.add_permission.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.add_permission' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_permissions !== undefined) l_dict.permissions = p_permissions return this.m_parent.server_call(this, "users/add_permission", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.remove_permission = function (p_user_id, p_permissions, p_callback, p_error_callback) { if (this.remove_permission && this.remove_permission.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.remove_permission' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_permissions !== undefined) l_dict.permissions = p_permissions return this.m_parent.server_call(this, "users/remove_permission", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_all_permissions = function (p_callback, p_error_callback) { if (this.get_all_permissions && this.get_all_permissions.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_all_permissions' }; return this.m_parent.server_call(this, "users/get_all_permissions", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.add_contact = function (p_email, p_fullname, p_scope, p_attributes, p_callback, p_error_callback) { if (this.add_contact && this.add_contact.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.add_contact' }; if (p_email !== undefined) l_dict.email = p_email if (p_fullname !== undefined) l_dict.fullname = p_fullname if (p_scope !== undefined) l_dict.scope = p_scope if (p_attributes !== undefined) l_dict.attributes = p_attributes return this.m_parent.server_call(this, "users/add_contact", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.add_user = function (p_username, p_userpass, p_fullname, p_email, p_scope, p_callback, p_error_callback) { if (this.add_user && this.add_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.add_user' }; if (p_username !== undefined) l_dict.username = p_username if (p_userpass !== undefined) l_dict.userpass = p_userpass if (p_fullname !== undefined) l_dict.fullname = p_fullname if (p_email !== undefined) l_dict.email = p_email if (p_scope !== undefined) l_dict.scope = p_scope return this.m_parent.server_call(this, "users/add_user", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_contact_by_id = function (p_contact_id, p_callback, p_error_callback) { if (this.get_contact_by_id && this.get_contact_by_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_contact_by_id' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id return this.m_parent.server_call(this, "users/get_contact_by_id", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_user_by_username = function (p_username, p_callback, p_error_callback) { if (this.get_user_by_username && this.get_user_by_username.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_user_by_username' }; if (p_username !== undefined) l_dict.username = p_username return this.m_parent.server_call(this, "users/get_user_by_username", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.list_contacts = function (p_callback, p_error_callback) { if (this.list_contacts && this.list_contacts.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.list_contacts' }; return this.m_parent.server_call(this, "users/list_contacts", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.update_contact = function (p_contact_id, p_email, p_fullname, p_scope, p_attributes, p_callback, p_error_callback) { if (this.update_contact && this.update_contact.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.update_contact' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id if (p_email !== undefined) l_dict.email = p_email if (p_fullname !== undefined) l_dict.fullname = p_fullname if (p_scope !== undefined) l_dict.scope = p_scope if (p_attributes !== undefined) l_dict.attributes = p_attributes return this.m_parent.server_call(this, "users/update_contact", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.remove_contact = function (p_contact_id, p_callback, p_error_callback) { if (this.remove_contact && this.remove_contact.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.remove_contact' }; if (p_contact_id !== undefined) l_dict.contact_id = p_contact_id return this.m_parent.server_call(this, "users/remove_contact", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.list_users = function (p_callback, p_error_callback) { if (this.list_users && this.list_users.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.list_users' }; return this.m_parent.server_call(this, "users/list_users", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.update_user = function (p_user_id, p_username, p_userpass, p_fullname, p_email, p_scope, p_add_permissions, p_remove_permissions, p_callback, p_error_callback) { if (this.update_user && this.update_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.update_user' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_username !== undefined) l_dict.username = p_username if (p_userpass !== undefined) l_dict.userpass = p_userpass if (p_fullname !== undefined) l_dict.fullname = p_fullname if (p_email !== undefined) l_dict.email = p_email if (p_scope !== undefined) l_dict.scope = p_scope if (p_add_permissions !== undefined) l_dict.add_permissions = p_add_permissions if (p_remove_permissions !== undefined) l_dict.remove_permissions = p_remove_permissions return this.m_parent.server_call(this, "users/update_user", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.remove_user = function (p_user_id, p_callback, p_error_callback) { if (this.remove_user && this.remove_user.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.remove_user' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id return this.m_parent.server_call(this, "users/remove_user", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_user_id = function (p_username, p_callback, p_error_callback) { if (this.get_user_id && this.get_user_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_user_id' }; if (p_username !== undefined) l_dict.username = p_username return this.m_parent.server_call(this, "users/get_user_id", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.enable_mfa = function (p_user_id, p_options, p_callback, p_error_callback) { if (this.enable_mfa && this.enable_mfa.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.enable_mfa' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/enable_mfa", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.confirm_mfa = function (p_user_id, p_options, p_callback, p_error_callback) { if (this.confirm_mfa && this.confirm_mfa.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.confirm_mfa' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/confirm_mfa", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.disable_mfa = function (p_user_id, p_options, p_callback, p_error_callback) { if (this.disable_mfa && this.disable_mfa.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.disable_mfa' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/disable_mfa", l_dict, p_callback, p_error_callback); } portal_api_users.prototype.get_mfa_status = function (p_user_id, p_options, p_callback, p_error_callback) { if (this.get_mfa_status && this.get_mfa_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'users.get_mfa_status' }; if (p_user_id !== undefined) l_dict.user_id = p_user_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "users/get_mfa_status", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * license API */ function portal_api_license(p_parent) { this.m_parent = p_parent; } portal_api_license.prototype.activate = function (p_workserver, p_callback, p_error_callback) { if (this.activate && this.activate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.activate' }; if (p_workserver !== undefined) l_dict.workserver = p_workserver return this.m_parent.server_call(this, "license/activate", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.download_new = function (p_customer_code, p_serial, p_callback, p_error_callback) { if (this.download_new && this.download_new.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.download_new' }; if (p_customer_code !== undefined) l_dict.customer_code = p_customer_code if (p_serial !== undefined) l_dict.serial = p_serial return this.m_parent.server_call(this, "license/download_new", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.get = function (p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.get' }; return this.m_parent.server_call(this, "license/get", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.get_license = function (p_options, p_callback, p_error_callback) { if (this.get_license && this.get_license.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.get_license' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "license/get_license", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.get_status = function (p_callback, p_error_callback) { if (this.get_status && this.get_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.get_status' }; return this.m_parent.server_call(this, "license/get_status", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.install = function (p_customer_code, p_serial, p_license, p_callback, p_error_callback) { if (this.install && this.install.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.install' }; if (p_customer_code !== undefined) l_dict.customer_code = p_customer_code if (p_serial !== undefined) l_dict.serial = p_serial if (p_license !== undefined) l_dict.license = p_license return this.m_parent.server_call(this, "license/install", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.reset = function (p_callback, p_error_callback) { if (this.reset && this.reset.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.reset' }; return this.m_parent.server_call(this, "license/reset", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.review = function (p_sender_site, p_signature, p_callback, p_error_callback) { if (this.review && this.review.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.review' }; if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site if (p_signature !== undefined) l_dict.signature = p_signature return this.m_parent.server_call(this, "license/review", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.sync = function (p_distribution, p_sender_site, p_signature, p_timestamp, p_callback, p_error_callback) { if (this.sync && this.sync.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.sync' }; if (p_distribution !== undefined) l_dict.distribution = p_distribution if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site if (p_signature !== undefined) l_dict.signature = p_signature if (p_timestamp !== undefined) l_dict.timestamp = p_timestamp return this.m_parent.server_call(this, "license/sync", l_dict, p_callback, p_error_callback); } portal_api_license.prototype.update = function (p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'license.update' }; return this.m_parent.server_call(this, "license/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * metadata API */ function portal_api_metadata(p_parent) { this.m_parent = p_parent; } portal_api_metadata.prototype.get_from_asset_with_options = function (p_file, p_options, p_callback, p_error_callback) { if (this.get_from_asset_with_options && this.get_from_asset_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_from_asset_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "metadata/get_from_asset_with_options", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_from_asset = function (p_file, p_callback, p_error_callback) { if (this.get_from_asset && this.get_from_asset.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_from_asset' }; if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "metadata/get_from_asset", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_from_file_with_options = function (p_file, p_options, p_callback, p_error_callback) { if (this.get_from_file_with_options && this.get_from_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_from_file_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "metadata/get_from_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_from_file = function (p_file, p_callback, p_error_callback) { if (this.get_from_file && this.get_from_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_from_file' }; if (p_file !== undefined) l_dict.file = p_file return this.m_parent.server_call(this, "metadata/get_from_file", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_preview = function (p_file, p_page, p_size, p_callback, p_error_callback) { if (this.get_preview && this.get_preview.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_preview' }; if (p_file !== undefined) l_dict.file = p_file if (p_page !== undefined) l_dict.page = p_page if (p_size !== undefined) l_dict.size = p_size return this.m_parent.server_call(this, "metadata/get_preview", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_preview_with_options = function (p_file, p_options, p_callback, p_error_callback) { if (this.get_preview_with_options && this.get_preview_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_preview_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "metadata/get_preview_with_options", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_thumbnail_with_options = function (p_file, p_page, p_options, p_callback, p_error_callback) { if (this.get_thumbnail_with_options && this.get_thumbnail_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_thumbnail_with_options' }; if (p_file !== undefined) l_dict.file = p_file if (p_page !== undefined) l_dict.page = p_page if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "metadata/get_thumbnail_with_options", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.get_thumbnail = function (p_file, p_page, p_callback, p_error_callback) { if (this.get_thumbnail && this.get_thumbnail.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.get_thumbnail' }; if (p_file !== undefined) l_dict.file = p_file if (p_page !== undefined) l_dict.page = p_page return this.m_parent.server_call(this, "metadata/get_thumbnail", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.save_preview_to_file = function (p_url, p_page, p_preview_url, p_document_type, p_size, p_overwrite, p_callback, p_error_callback) { if (this.save_preview_to_file && this.save_preview_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.save_preview_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_page !== undefined) l_dict.page = p_page if (p_preview_url !== undefined) l_dict.preview_url = p_preview_url if (p_document_type !== undefined) l_dict.document_type = p_document_type if (p_size !== undefined) l_dict.size = p_size if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "metadata/save_preview_to_file", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.save_preview_to_file_with_options = function (p_url, p_preview_url, p_options, p_callback, p_error_callback) { if (this.save_preview_to_file_with_options && this.save_preview_to_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.save_preview_to_file_with_options' }; if (p_url !== undefined) l_dict.url = p_url if (p_preview_url !== undefined) l_dict.preview_url = p_preview_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "metadata/save_preview_to_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.save_thumbnail_to_file = function (p_url, p_page, p_thumbnail_url, p_document_type, p_overwrite, p_callback, p_error_callback) { if (this.save_thumbnail_to_file && this.save_thumbnail_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.save_thumbnail_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_page !== undefined) l_dict.page = p_page if (p_thumbnail_url !== undefined) l_dict.thumbnail_url = p_thumbnail_url if (p_document_type !== undefined) l_dict.document_type = p_document_type if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "metadata/save_thumbnail_to_file", l_dict, p_callback, p_error_callback); } portal_api_metadata.prototype.set_in_asset = function (p_file, p_meta_data, p_callback, p_error_callback) { if (this.set_in_asset && this.set_in_asset.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'metadata.set_in_asset' }; if (p_file !== undefined) l_dict.file = p_file if (p_meta_data !== undefined) l_dict.meta_data = p_meta_data return this.m_parent.server_call(this, "metadata/set_in_asset", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * xmp API */ function portal_api_xmp(p_parent) { this.m_parent = p_parent; } portal_api_xmp.prototype.update = function (p_file_url, p_updates, p_options, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xmp.update' }; if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_updates !== undefined) l_dict.updates = p_updates if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xmp/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * proofscope API */ function portal_api_proofscope(p_parent) { this.m_parent = p_parent; } portal_api_proofscope.prototype.calculate_graphic_difference_offset = function (p_view, p_a_x, p_a_y, p_b_x, p_b_y, p_options, p_callback, p_error_callback) { if (this.calculate_graphic_difference_offset && this.calculate_graphic_difference_offset.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.calculate_graphic_difference_offset' }; if (p_view !== undefined) l_dict.view = p_view if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/calculate_graphic_difference_offset", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.complete_view = function (p_view, p_options, p_callback, p_error_callback) { if (this.complete_view && this.complete_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.complete_view' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/complete_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_file_url = function (p_host_url, p_approval_id, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_file_url && this.create_approve_file_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_file_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_file_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_file_url_for_pending_approval = function (p_host_url, p_file_url, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_file_url_for_pending_approval && this.create_approve_file_url_for_pending_approval.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_file_url_for_pending_approval' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_file_url_for_pending_approval", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_file_url_with_options = function (p_host_url, p_approval_id, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_file_url_with_options && this.create_approve_file_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_file_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_file_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_file_url_for_pending_approval_with_options = function (p_host_url, p_file_url, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_file_url_for_pending_approval_with_options && this.create_approve_file_url_for_pending_approval_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_file_url_for_pending_approval_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_file_url_for_pending_approval_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_folder_as_versions_url = function (p_host_url, p_folder_url, p_approval_id, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_folder_as_versions_url && this.create_approve_folder_as_versions_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_folder_as_versions_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_folder_as_versions_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_folder_as_versions_url_for_pending_approval = function (p_host_url, p_folder_url, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_folder_as_versions_url_for_pending_approval && this.create_approve_folder_as_versions_url_for_pending_approval.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_folder_as_versions_url_for_pending_approval' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_folder_as_versions_url_for_pending_approval", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_folder_as_versions_url_with_options = function (p_host_url, p_folder_url, p_approval_id, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_folder_as_versions_url_with_options && this.create_approve_folder_as_versions_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_folder_as_versions_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_folder_as_versions_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_folder_as_versions_url_for_pending_approval_with_options = function (p_host_url, p_folder_url, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_folder_as_versions_url_for_pending_approval_with_options && this.create_approve_folder_as_versions_url_for_pending_approval_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_folder_as_versions_url_for_pending_approval_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_folder_as_versions_url_for_pending_approval_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_versions_url = function (p_host_url, p_file_urls, p_approval_id, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_versions_url && this.create_approve_versions_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_versions_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_versions_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_versions_url_for_pending_approval = function (p_host_url, p_file_urls, p_participant_email, p_callback, p_error_callback) { if (this.create_approve_versions_url_for_pending_approval && this.create_approve_versions_url_for_pending_approval.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_versions_url_for_pending_approval' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email return this.m_parent.server_call(this, "proofscope/create_approve_versions_url_for_pending_approval", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_versions_url_with_options = function (p_host_url, p_file_urls, p_approval_id, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_versions_url_with_options && this.create_approve_versions_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_versions_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_versions_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_approve_versions_url_for_pending_approval_with_options = function (p_host_url, p_file_urls, p_participant_email, p_options, p_callback, p_error_callback) { if (this.create_approve_versions_url_for_pending_approval_with_options && this.create_approve_versions_url_for_pending_approval_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_approve_versions_url_for_pending_approval_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls if (p_participant_email !== undefined) l_dict.participant_email = p_participant_email if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_approve_versions_url_for_pending_approval_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_file_difference_url = function (p_host_url, p_file_url, p_diff_url, p_callback, p_error_callback) { if (this.create_view_file_difference_url && this.create_view_file_difference_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_file_difference_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_diff_url !== undefined) l_dict.diff_url = p_diff_url return this.m_parent.server_call(this, "proofscope/create_view_file_difference_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_file_difference_url_with_options = function (p_host_url, p_file_url, p_diff_url, p_options, p_callback, p_error_callback) { if (this.create_view_file_difference_url_with_options && this.create_view_file_difference_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_file_difference_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_diff_url !== undefined) l_dict.diff_url = p_diff_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_view_file_difference_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_file_url = function (p_host_url, p_file_url, p_callback, p_error_callback) { if (this.create_view_file_url && this.create_view_file_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_file_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url return this.m_parent.server_call(this, "proofscope/create_view_file_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_file_url_with_options = function (p_host_url, p_file_url, p_options, p_callback, p_error_callback) { if (this.create_view_file_url_with_options && this.create_view_file_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_file_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_view_file_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_folder_as_versions_url = function (p_host_url, p_folder_url, p_callback, p_error_callback) { if (this.create_view_folder_as_versions_url && this.create_view_folder_as_versions_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_folder_as_versions_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url return this.m_parent.server_call(this, "proofscope/create_view_folder_as_versions_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_folder_as_versions_url_with_options = function (p_host_url, p_folder_url, p_options, p_callback, p_error_callback) { if (this.create_view_folder_as_versions_url_with_options && this.create_view_folder_as_versions_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_folder_as_versions_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_view_folder_as_versions_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_versions_url = function (p_host_url, p_file_urls, p_callback, p_error_callback) { if (this.create_view_versions_url && this.create_view_versions_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_versions_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls return this.m_parent.server_call(this, "proofscope/create_view_versions_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_versions_url_with_options = function (p_host_url, p_file_urls, p_options, p_callback, p_error_callback) { if (this.create_view_versions_url_with_options && this.create_view_versions_url_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_versions_url_with_options' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_urls !== undefined) l_dict.file_urls = p_file_urls if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/create_view_versions_url_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.find_text_by_view_id = function (p_view_id, p_term, p_options, p_callback, p_error_callback) { if (this.find_text_by_view_id && this.find_text_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.find_text_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_term !== undefined) l_dict.term = p_term if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/find_text_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_3d_controller_data = function (p_asset_id, p_callback, p_error_callback) { if (this.get_3d_controller_data && this.get_3d_controller_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_3d_controller_data' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id return this.m_parent.server_call(this, "proofscope/get_3d_controller_data", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_3d_render_status = function (p_asset_id, p_callback, p_error_callback) { if (this.get_3d_render_status && this.get_3d_render_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_3d_render_status' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id return this.m_parent.server_call(this, "proofscope/get_3d_render_status", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_generate_text_layer_status_by_view = function (p_view, p_callback, p_error_callback) { if (this.get_generate_text_layer_status_by_view && this.get_generate_text_layer_status_by_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_generate_text_layer_status_by_view' }; if (p_view !== undefined) l_dict.view = p_view return this.m_parent.server_call(this, "proofscope/get_generate_text_layer_status_by_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_barcode = function (p_view, p_a_x, p_a_y, p_b_x, p_b_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_barcode && this.get_graphic_barcode.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_barcode' }; if (p_view !== undefined) l_dict.view = p_view if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_barcode", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_barcode_by_view_id = function (p_view_id, p_a_x, p_a_y, p_b_x, p_b_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_barcode_by_view_id && this.get_graphic_barcode_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_barcode_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_barcode_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_halftone = function (p_view, p_a_x, p_a_y, p_b_x, p_b_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_halftone && this.get_graphic_halftone.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_halftone' }; if (p_view !== undefined) l_dict.view = p_view if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_halftone", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_halftone_by_view_id = function (p_view_id, p_a_x, p_a_y, p_b_x, p_b_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_halftone_by_view_id && this.get_graphic_halftone_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_halftone_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_halftone_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_sample = function (p_view, p_x, p_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_sample && this.get_graphic_sample.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_sample' }; if (p_view !== undefined) l_dict.view = p_view if (p_x !== undefined) l_dict.x = p_x if (p_y !== undefined) l_dict.y = p_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_sample", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_sample_by_view_id = function (p_view_id, p_x, p_y, p_options, p_callback, p_error_callback) { if (this.get_graphic_sample_by_view_id && this.get_graphic_sample_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_sample_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_x !== undefined) l_dict.x = p_x if (p_y !== undefined) l_dict.y = p_y if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_sample_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_properties = function (p_view, p_a_x, p_a_y, p_b_x, p_b_y, p_property, p_options, p_callback, p_error_callback) { if (this.get_graphic_properties && this.get_graphic_properties.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_properties' }; if (p_view !== undefined) l_dict.view = p_view if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_property !== undefined) l_dict.property = p_property if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_properties", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_properties_by_view_id = function (p_view_id, p_a_x, p_a_y, p_b_x, p_b_y, p_property, p_options, p_callback, p_error_callback) { if (this.get_graphic_properties_by_view_id && this.get_graphic_properties_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_properties_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_a_x !== undefined) l_dict.a_x = p_a_x if (p_a_y !== undefined) l_dict.a_y = p_a_y if (p_b_x !== undefined) l_dict.b_x = p_b_x if (p_b_y !== undefined) l_dict.b_y = p_b_y if (p_property !== undefined) l_dict.property = p_property if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_properties_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_graphic_text_layer = function (p_view, p_options, p_callback, p_error_callback) { if (this.get_graphic_text_layer && this.get_graphic_text_layer.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_graphic_text_layer' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_graphic_text_layer", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_render_status_by_url = function (p_url, p_callback, p_error_callback) { if (this.get_render_status_by_url && this.get_render_status_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_render_status_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "proofscope/get_render_status_by_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_render_status_by_view = function (p_view, p_callback, p_error_callback) { if (this.get_render_status_by_view && this.get_render_status_by_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_render_status_by_view' }; if (p_view !== undefined) l_dict.view = p_view return this.m_parent.server_call(this, "proofscope/get_render_status_by_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_view = function (p_view_id, p_callback, p_error_callback) { if (this.get_view && this.get_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_view' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id return this.m_parent.server_call(this, "proofscope/get_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_view_info = function (p_query, p_callback, p_error_callback) { if (this.get_view_info && this.get_view_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_view_info' }; if (p_query !== undefined) l_dict.query = p_query return this.m_parent.server_call(this, "proofscope/get_view_info", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_render_by_url = function (p_url, p_callback, p_error_callback) { if (this.request_render_by_url && this.request_render_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_render_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "proofscope/request_render_by_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.render = function (p_asset_url, p_callback, p_error_callback) { if (this.render && this.render.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.render' }; if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url return this.m_parent.server_call(this, "proofscope/render", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_3d_render = function (p_asset_id, p_callback, p_error_callback) { if (this.request_3d_render && this.request_3d_render.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_3d_render' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id return this.m_parent.server_call(this, "proofscope/request_3d_render", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_3d_render_by_url = function (p_url, p_callback, p_error_callback) { if (this.request_3d_render_by_url && this.request_3d_render_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_3d_render_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "proofscope/request_3d_render_by_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_text_layer_generation_by_view = function (p_view, p_callback, p_error_callback) { if (this.request_text_layer_generation_by_view && this.request_text_layer_generation_by_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_text_layer_generation_by_view' }; if (p_view !== undefined) l_dict.view = p_view return this.m_parent.server_call(this, "proofscope/request_text_layer_generation_by_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_text_layer_generation_by_url = function (p_url, p_callback, p_error_callback) { if (this.request_text_layer_generation_by_url && this.request_text_layer_generation_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_text_layer_generation_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "proofscope/request_text_layer_generation_by_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_rerender_by_url = function (p_url, p_callback, p_error_callback) { if (this.request_rerender_by_url && this.request_rerender_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_rerender_by_url' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "proofscope/request_rerender_by_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.request_render_by_view = function (p_view, p_callback, p_error_callback) { if (this.request_render_by_view && this.request_render_by_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.request_render_by_view' }; if (p_view !== undefined) l_dict.view = p_view return this.m_parent.server_call(this, "proofscope/request_render_by_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.save_rasterized_view_to_file = function (p_view, p_rasterized_url, p_options, p_callback, p_error_callback) { if (this.save_rasterized_view_to_file && this.save_rasterized_view_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.save_rasterized_view_to_file' }; if (p_view !== undefined) l_dict.view = p_view if (p_rasterized_url !== undefined) l_dict.rasterized_url = p_rasterized_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/save_rasterized_view_to_file", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.save_updated_view = function (p_view, p_asset_id, p_view_id, p_callback, p_error_callback) { if (this.save_updated_view && this.save_updated_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.save_updated_view' }; if (p_view !== undefined) l_dict.view = p_view if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_view_id !== undefined) l_dict.view_id = p_view_id return this.m_parent.server_call(this, "proofscope/save_updated_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.save_view = function (p_view, p_asset_id, p_callback, p_error_callback) { if (this.save_view && this.save_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.save_view' }; if (p_view !== undefined) l_dict.view = p_view if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id return this.m_parent.server_call(this, "proofscope/save_view", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.save_view_recursive = function (p_view, p_options, p_callback, p_error_callback) { if (this.save_view_recursive && this.save_view_recursive.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.save_view_recursive' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/save_view_recursive", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.set_note_state = function (p_view, p_note_id, p_type, p_state, p_options, p_callback, p_error_callback) { if (this.set_note_state && this.set_note_state.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.set_note_state' }; if (p_view !== undefined) l_dict.view = p_view if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_type !== undefined) l_dict.type = p_type if (p_state !== undefined) l_dict.state = p_state if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/set_note_state", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.add_comment = function (p_view, p_note_id, p_comment, p_options, p_callback, p_error_callback) { if (this.add_comment && this.add_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.add_comment' }; if (p_view !== undefined) l_dict.view = p_view if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment !== undefined) l_dict.comment = p_comment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/add_comment", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.edit_comment = function (p_view, p_note_id, p_comment_id, p_new_value, p_old_value, p_options, p_callback, p_error_callback) { if (this.edit_comment && this.edit_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.edit_comment' }; if (p_view !== undefined) l_dict.view = p_view if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment_id !== undefined) l_dict.comment_id = p_comment_id if (p_new_value !== undefined) l_dict.new_value = p_new_value if (p_old_value !== undefined) l_dict.old_value = p_old_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/edit_comment", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.add_note = function (p_view, p_root_view, p_note, p_options, p_callback, p_error_callback) { if (this.add_note && this.add_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.add_note' }; if (p_view !== undefined) l_dict.view = p_view if (p_root_view !== undefined) l_dict.root_view = p_root_view if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/add_note", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.delete_note = function (p_view, p_note, p_options, p_callback, p_error_callback) { if (this.delete_note && this.delete_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.delete_note' }; if (p_view !== undefined) l_dict.view = p_view if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/delete_note", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_notes = function (p_views, p_options, p_callback, p_error_callback) { if (this.get_notes && this.get_notes.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_notes' }; if (p_views !== undefined) l_dict.views = p_views if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_notes", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.save_note = function (p_view, p_note, p_options, p_callback, p_error_callback) { if (this.save_note && this.save_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.save_note' }; if (p_view !== undefined) l_dict.view = p_view if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/save_note", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_mention_list = function (p_view, p_options, p_callback, p_error_callback) { if (this.get_mention_list && this.get_mention_list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_mention_list' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_mention_list", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.get_metadata = function (p_view, p_options, p_callback, p_error_callback) { if (this.get_metadata && this.get_metadata.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.get_metadata' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/get_metadata", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_url = function (p_host_url, p_file_url, p_permissions, p_callback, p_error_callback) { if (this.create_view_url && this.create_view_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_permissions !== undefined) l_dict.permissions = p_permissions return this.m_parent.server_call(this, "proofscope/create_view_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_diff_url = function (p_host_url, p_file_url, p_fileB_url, p_permissions, p_callback, p_error_callback) { if (this.create_diff_url && this.create_diff_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_diff_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_file_url !== undefined) l_dict.file_url = p_file_url if (p_fileB_url !== undefined) l_dict.fileB_url = p_fileB_url if (p_permissions !== undefined) l_dict.permissions = p_permissions return this.m_parent.server_call(this, "proofscope/create_diff_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_view_folder_url = function (p_host_url, p_folder_url, p_email, p_permissions, p_callback, p_error_callback) { if (this.create_view_folder_url && this.create_view_folder_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_view_folder_url' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_folder_url !== undefined) l_dict.folder_url = p_folder_url if (p_email !== undefined) l_dict.email = p_email if (p_permissions !== undefined) l_dict.permissions = p_permissions return this.m_parent.server_call(this, "proofscope/create_view_folder_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_url = function (p_host, p_asset_url, p_permissions, p_expiry, p_username, p_diff_url, p_callback, p_error_callback) { if (this.create_url && this.create_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_url' }; if (p_host !== undefined) l_dict.host = p_host if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_permissions !== undefined) l_dict.permissions = p_permissions if (p_expiry !== undefined) l_dict.expiry = p_expiry if (p_username !== undefined) l_dict.username = p_username if (p_diff_url !== undefined) l_dict.diff_url = p_diff_url return this.m_parent.server_call(this, "proofscope/create_url", l_dict, p_callback, p_error_callback); } portal_api_proofscope.prototype.create_url_with_parameters = function (p_host_url, p_username, p_expiry, p_parameters, p_callback, p_error_callback) { if (this.create_url_with_parameters && this.create_url_with_parameters.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.create_url_with_parameters' }; if (p_host_url !== undefined) l_dict.host_url = p_host_url if (p_username !== undefined) l_dict.username = p_username if (p_expiry !== undefined) l_dict.expiry = p_expiry if (p_parameters !== undefined) l_dict.parameters = p_parameters return this.m_parent.server_call(this, "proofscope/create_url_with_parameters", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * notes API */ function portal_api_notes(p_parent) { this.m_parent = p_parent; } portal_api_notes.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/count", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "notes/create", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "notes/delete", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "notes/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "notes/get", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "notes/list", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "notes/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "notes/set_keys", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "notes/update", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.set_note_state = function (p_notes_id, p_note_id, p_type, p_state, p_options, p_callback, p_error_callback) { if (this.set_note_state && this.set_note_state.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.set_note_state' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_type !== undefined) l_dict.type = p_type if (p_state !== undefined) l_dict.state = p_state if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/set_note_state", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.add_comment = function (p_notes_id, p_note_id, p_comment, p_options, p_callback, p_error_callback) { if (this.add_comment && this.add_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.add_comment' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment !== undefined) l_dict.comment = p_comment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/add_comment", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.edit_comment = function (p_notes_id, p_note_id, p_comment_id, p_new_value, p_old_value, p_options, p_callback, p_error_callback) { if (this.edit_comment && this.edit_comment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.edit_comment' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note_id !== undefined) l_dict.note_id = p_note_id if (p_comment_id !== undefined) l_dict.comment_id = p_comment_id if (p_new_value !== undefined) l_dict.new_value = p_new_value if (p_old_value !== undefined) l_dict.old_value = p_old_value if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/edit_comment", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.add_note = function (p_notes_id, p_note, p_options, p_callback, p_error_callback) { if (this.add_note && this.add_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.add_note' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/add_note", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.delete_note = function (p_notes_id, p_note, p_options, p_callback, p_error_callback) { if (this.delete_note && this.delete_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.delete_note' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/delete_note", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.save_note = function (p_notes_id, p_note, p_options, p_callback, p_error_callback) { if (this.save_note && this.save_note.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.save_note' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_note !== undefined) l_dict.note = p_note if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/save_note", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.import_xfdf = function (p_notes_id, p_fdf_url, p_options, p_callback, p_error_callback) { if (this.import_xfdf && this.import_xfdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.import_xfdf' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_fdf_url !== undefined) l_dict.fdf_url = p_fdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/import_xfdf", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.import_cloudflow_preflight_report = function (p_notes_id, p_asset_url, p_preflight_data, p_options, p_callback, p_error_callback) { if (this.import_cloudflow_preflight_report && this.import_cloudflow_preflight_report.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.import_cloudflow_preflight_report' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_asset_url !== undefined) l_dict.asset_url = p_asset_url if (p_preflight_data !== undefined) l_dict.preflight_data = p_preflight_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/import_cloudflow_preflight_report", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_by_asset_id_with_options = function (p_asset_id, p_options, p_callback, p_error_callback) { if (this.get_by_asset_id_with_options && this.get_by_asset_id_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_by_asset_id_with_options' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/get_by_asset_id_with_options", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_by_asset_id = function (p_asset_id, p_comment_format, p_callback, p_error_callback) { if (this.get_by_asset_id && this.get_by_asset_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_by_asset_id' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_comment_format !== undefined) l_dict.comment_format = p_comment_format return this.m_parent.server_call(this, "notes/get_by_asset_id", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_by_notes_id = function (p_notes_id, p_options, p_callback, p_error_callback) { if (this.get_by_notes_id && this.get_by_notes_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_by_notes_id' }; if (p_notes_id !== undefined) l_dict.notes_id = p_notes_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/get_by_notes_id", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_overview_by_approval_id = function (p_approval_id, p_reference, p_options, p_callback, p_error_callback) { if (this.get_overview_by_approval_id && this.get_overview_by_approval_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_overview_by_approval_id' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_reference !== undefined) l_dict.reference = p_reference if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/get_overview_by_approval_id", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_overview_by_proofscope_view = function (p_view, p_options, p_callback, p_error_callback) { if (this.get_overview_by_proofscope_view && this.get_overview_by_proofscope_view.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_overview_by_proofscope_view' }; if (p_view !== undefined) l_dict.view = p_view if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/get_overview_by_proofscope_view", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_overview_by_reference_with_options = function (p_reference, p_options, p_callback, p_error_callback) { if (this.get_overview_by_reference_with_options && this.get_overview_by_reference_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_overview_by_reference_with_options' }; if (p_reference !== undefined) l_dict.reference = p_reference if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "notes/get_overview_by_reference_with_options", l_dict, p_callback, p_error_callback); } portal_api_notes.prototype.get_overview_by_reference = function (p_reference, p_only_comments, p_comment_format, p_callback, p_error_callback) { if (this.get_overview_by_reference && this.get_overview_by_reference.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'notes.get_overview_by_reference' }; if (p_reference !== undefined) l_dict.reference = p_reference if (p_only_comments !== undefined) l_dict.only_comments = p_only_comments if (p_comment_format !== undefined) l_dict.comment_format = p_comment_format return this.m_parent.server_call(this, "notes/get_overview_by_reference", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * proofscope API */ function portal_api_proofscope(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * proofscope.tile API */ function portal_api_proofscope_tile(p_parent) { this.m_parent = p_parent; } portal_api_proofscope_tile.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/tile/count", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/tile/create", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/tile/delete", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "proofscope/tile/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/tile/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/tile/get", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "proofscope/tile/list", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/tile/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "proofscope/tile/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/tile/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "proofscope/tile/set_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/tile/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/tile/update", l_dict, p_callback, p_error_callback); } portal_api_proofscope_tile.prototype.purge_by_access_time = function (p_date, p_callback, p_error_callback) { if (this.purge_by_access_time && this.purge_by_access_time.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.tile.purge_by_access_time' }; if (p_date !== undefined) l_dict.date = p_date return this.m_parent.server_call(this, "proofscope/tile/purge_by_access_time", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * proofscope.view API */ function portal_api_proofscope_view(p_parent) { this.m_parent = p_parent; } portal_api_proofscope_view.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/count", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/view/create", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/view/delete", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "proofscope/view/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/view/get", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "proofscope/view/list", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "proofscope/view/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "proofscope/view/set_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/view/update", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.get_by_view_id = function (p_view_id, p_callback, p_error_callback) { if (this.get_by_view_id && this.get_by_view_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.get_by_view_id' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id return this.m_parent.server_call(this, "proofscope/view/get_by_view_id", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.migrate_storage = function (p_view_id, p_options, p_callback, p_error_callback) { if (this.migrate_storage && this.migrate_storage.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.migrate_storage' }; if (p_view_id !== undefined) l_dict.view_id = p_view_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/migrate_storage", l_dict, p_callback, p_error_callback); } portal_api_proofscope_view.prototype.purge_by_access_time = function (p_date, p_options, p_callback, p_error_callback) { if (this.purge_by_access_time && this.purge_by_access_time.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.view.purge_by_access_time' }; if (p_date !== undefined) l_dict.date = p_date if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/view/purge_by_access_time", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * ic3d API */ function portal_api_ic3d(p_parent) { this.m_parent = p_parent; } portal_api_ic3d.prototype.get_label_info = function (p_url, p_callback, p_error_callback) { if (this.get_label_info && this.get_label_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.get_label_info' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "ic3d/get_label_info", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.update_labels = function (p_url, p_options, p_callback, p_error_callback) { if (this.update_labels && this.update_labels.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.update_labels' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/update_labels", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.render_view_to_file_with_options = function (p_url, p_view_url, p_options, p_callback, p_error_callback) { if (this.render_view_to_file_with_options && this.render_view_to_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.render_view_to_file_with_options' }; if (p_url !== undefined) l_dict.url = p_url if (p_view_url !== undefined) l_dict.view_url = p_view_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/render_view_to_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.render_view_to_file = function (p_url, p_view, p_view_url, p_document_type, p_size, p_overwrite, p_callback, p_error_callback) { if (this.render_view_to_file && this.render_view_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.render_view_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_view !== undefined) l_dict.view = p_view if (p_view_url !== undefined) l_dict.view_url = p_view_url if (p_document_type !== undefined) l_dict.document_type = p_document_type if (p_size !== undefined) l_dict.size = p_size if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "ic3d/render_view_to_file", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.replace_labels = function (p_url, p_replacements, p_options, p_callback, p_error_callback) { if (this.replace_labels && this.replace_labels.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.replace_labels' }; if (p_url !== undefined) l_dict.url = p_url if (p_replacements !== undefined) l_dict.replacements = p_replacements if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/replace_labels", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.export_to_file = function (p_url, p_export_url, p_options, p_callback, p_error_callback) { if (this.export_to_file && this.export_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.export_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_export_url !== undefined) l_dict.export_url = p_export_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/export_to_file", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.get_model_data = function (p_url, p_export_url, p_options, p_callback, p_error_callback) { if (this.get_model_data && this.get_model_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.get_model_data' }; if (p_url !== undefined) l_dict.url = p_url if (p_export_url !== undefined) l_dict.export_url = p_export_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/get_model_data", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.merge_files = function (p_url, p_options, p_callback, p_error_callback) { if (this.merge_files && this.merge_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.merge_files' }; if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/merge_files", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.modify_scene = function (p_url, p_scene_component_type, p_scene_component_file, p_options, p_callback, p_error_callback) { if (this.modify_scene && this.modify_scene.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.modify_scene' }; if (p_url !== undefined) l_dict.url = p_url if (p_scene_component_type !== undefined) l_dict.scene_component_type = p_scene_component_type if (p_scene_component_file !== undefined) l_dict.scene_component_file = p_scene_component_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/modify_scene", l_dict, p_callback, p_error_callback); } portal_api_ic3d.prototype.transform_model = function (p_url, p_model_name, p_options, p_callback, p_error_callback) { if (this.transform_model && this.transform_model.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'ic3d.transform_model' }; if (p_url !== undefined) l_dict.url = p_url if (p_model_name !== undefined) l_dict.model_name = p_model_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "ic3d/transform_model", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * calendar API */ function portal_api_calendar(p_parent) { this.m_parent = p_parent; } portal_api_calendar.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/count", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "calendar/create", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "calendar/delete", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "calendar/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "calendar/get", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "calendar/list", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "calendar/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "calendar/set_keys", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "calendar/update", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.add_item = function (p_calendar_id, p_data, p_options, p_callback, p_error_callback) { if (this.add_item && this.add_item.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.add_item' }; if (p_calendar_id !== undefined) l_dict.calendar_id = p_calendar_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/add_item", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.calculate_offsetted_time = function (p_calendar_id, p_time, p_offset, p_options, p_callback, p_error_callback) { if (this.calculate_offsetted_time && this.calculate_offsetted_time.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.calculate_offsetted_time' }; if (p_calendar_id !== undefined) l_dict.calendar_id = p_calendar_id if (p_time !== undefined) l_dict.time = p_time if (p_offset !== undefined) l_dict.offset = p_offset if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/calculate_offsetted_time", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.get_item = function (p_calendar_id, p_item_id, p_callback, p_error_callback) { if (this.get_item && this.get_item.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.get_item' }; if (p_calendar_id !== undefined) l_dict.calendar_id = p_calendar_id if (p_item_id !== undefined) l_dict.item_id = p_item_id return this.m_parent.server_call(this, "calendar/get_item", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.get_visualization_data = function (p_query, p_from_date, p_to_date, p_options, p_callback, p_error_callback) { if (this.get_visualization_data && this.get_visualization_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.get_visualization_data' }; if (p_query !== undefined) l_dict.query = p_query if (p_from_date !== undefined) l_dict.from_date = p_from_date if (p_to_date !== undefined) l_dict.to_date = p_to_date if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/get_visualization_data", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.remove_item = function (p_calendar_id, p_item_id, p_callback, p_error_callback) { if (this.remove_item && this.remove_item.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.remove_item' }; if (p_calendar_id !== undefined) l_dict.calendar_id = p_calendar_id if (p_item_id !== undefined) l_dict.item_id = p_item_id return this.m_parent.server_call(this, "calendar/remove_item", l_dict, p_callback, p_error_callback); } portal_api_calendar.prototype.update_item = function (p_calendar_id, p_data, p_options, p_callback, p_error_callback) { if (this.update_item && this.update_item.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'calendar.update_item' }; if (p_calendar_id !== undefined) l_dict.calendar_id = p_calendar_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "calendar/update_item", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * form API */ function portal_api_form(p_parent) { this.m_parent = p_parent; } portal_api_form.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "form/count", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "form/create", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "form/delete", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "form/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "form/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "form/get", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "form/list", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "form/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "form/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "form/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "form/set_keys", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "form/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "form/update", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.upload = function (p_contents, p_callback, p_error_callback) { if (this.upload && this.upload.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.upload' }; if (p_contents !== undefined) l_dict.contents = p_contents return this.m_parent.server_call(this, "form/upload", l_dict, p_callback, p_error_callback); } portal_api_form.prototype.get_form = function (p_whitepaper_name, p_form_name, p_callback, p_error_callback) { if (this.get_form && this.get_form.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'form.get_form' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_form_name !== undefined) l_dict.form_name = p_form_name return this.m_parent.server_call(this, "form/get_form", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * task_list API */ function portal_api_task_list(p_parent) { this.m_parent = p_parent; } portal_api_task_list.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/count", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "task_list/create", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "task_list/delete", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "task_list/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "task_list/get", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "task_list/list", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "task_list/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "task_list/set_keys", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "task_list/update", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get_by_task_list_id = function (p_task_list_id, p_options, p_callback, p_error_callback) { if (this.get_by_task_list_id && this.get_by_task_list_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get_by_task_list_id' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/get_by_task_list_id", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.add_task = function (p_task_list_id, p_data, p_options, p_callback, p_error_callback) { if (this.add_task && this.add_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.add_task' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/add_task", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get_form = function (p_task_list_id, p_task_id, p_form_type, p_callback, p_error_callback) { if (this.get_form && this.get_form.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get_form' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_form_type !== undefined) l_dict.form_type = p_form_type return this.m_parent.server_call(this, "task_list/get_form", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get_task = function (p_task_list_id, p_task_id, p_callback, p_error_callback) { if (this.get_task && this.get_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get_task' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_task_id !== undefined) l_dict.task_id = p_task_id return this.m_parent.server_call(this, "task_list/get_task", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get_tasks = function (p_task_list_id, p_item_query, p_from_date, p_options, p_callback, p_error_callback) { if (this.get_tasks && this.get_tasks.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get_tasks' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_item_query !== undefined) l_dict.item_query = p_item_query if (p_from_date !== undefined) l_dict.from_date = p_from_date if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/get_tasks", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.get_visualization_data = function (p_query, p_from_date, p_to_date, p_options, p_callback, p_error_callback) { if (this.get_visualization_data && this.get_visualization_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.get_visualization_data' }; if (p_query !== undefined) l_dict.query = p_query if (p_from_date !== undefined) l_dict.from_date = p_from_date if (p_to_date !== undefined) l_dict.to_date = p_to_date if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/get_visualization_data", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.mark = function (p_task_list_id, p_item_id, p_action, p_options, p_callback, p_error_callback) { if (this.mark && this.mark.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.mark' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_item_id !== undefined) l_dict.item_id = p_item_id if (p_action !== undefined) l_dict.action = p_action if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/mark", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.remove_task = function (p_task_list_id, p_task_id, p_options, p_callback, p_error_callback) { if (this.remove_task && this.remove_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.remove_task' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/remove_task", l_dict, p_callback, p_error_callback); } portal_api_task_list.prototype.update_task = function (p_task_list_id, p_data, p_options, p_callback, p_error_callback) { if (this.update_task && this.update_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'task_list.update_task' }; if (p_task_list_id !== undefined) l_dict.task_list_id = p_task_list_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "task_list/update_task", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * job API */ function portal_api_job(p_parent) { this.m_parent = p_parent; } portal_api_job.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/count", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "job/create", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "job/delete", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "job/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "job/get", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_copy_of = function (p_id, p_callback, p_error_callback) { if (this.get_copy_of && this.get_copy_of.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_copy_of' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "job/get_copy_of", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "job/list", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "job/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "job/set_keys", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.add_task = function (p_project_id, p_data, p_options, p_callback, p_error_callback) { if (this.add_task && this.add_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.add_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/add_task", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.add_tasks_from_template = function (p_project_id, p_template_project_id, p_options, p_callback, p_error_callback) { if (this.add_tasks_from_template && this.add_tasks_from_template.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.add_tasks_from_template' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_template_project_id !== undefined) l_dict.template_project_id = p_template_project_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/add_tasks_from_template", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.calculate = function (p_data_or_id, p_what, p_parameters, p_callback, p_error_callback) { if (this.calculate && this.calculate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.calculate' }; if (p_data_or_id !== undefined) l_dict.data_or_id = p_data_or_id if (p_what !== undefined) l_dict.what = p_what if (p_parameters !== undefined) l_dict.parameters = p_parameters return this.m_parent.server_call(this, "job/calculate", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_form = function (p_project_id, p_form_type, p_callback, p_error_callback) { if (this.get_form && this.get_form.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_form' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_form_type !== undefined) l_dict.form_type = p_form_type return this.m_parent.server_call(this, "job/get_form", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_task = function (p_project_id, p_task_id, p_callback, p_error_callback) { if (this.get_task && this.get_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id return this.m_parent.server_call(this, "job/get_task", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_task_list_visualization_data = function (p_id, p_options, p_callback, p_error_callback) { if (this.get_task_list_visualization_data && this.get_task_list_visualization_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_task_list_visualization_data' }; if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/get_task_list_visualization_data", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_recursive = function (p_id, p_options, p_callback, p_error_callback) { if (this.get_recursive && this.get_recursive.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_recursive' }; if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/get_recursive", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.get_by_project_id = function (p_project_id, p_options, p_callback, p_error_callback) { if (this.get_by_project_id && this.get_by_project_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.get_by_project_id' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/get_by_project_id", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.mark_task = function (p_project_id, p_task_id, p_action, p_options, p_callback, p_error_callback) { if (this.mark_task && this.mark_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.mark_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_action !== undefined) l_dict.action = p_action if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/mark_task", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.prepare_schedule = function (p_query, p_options, p_callback, p_error_callback) { if (this.prepare_schedule && this.prepare_schedule.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.prepare_schedule' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/prepare_schedule", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.remove_task = function (p_project_id, p_task_id, p_options, p_callback, p_error_callback) { if (this.remove_task && this.remove_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.remove_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/remove_task", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.schedule = function (p_query, p_algorithm, p_parameters, p_options, p_callback, p_error_callback) { if (this.schedule && this.schedule.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.schedule' }; if (p_query !== undefined) l_dict.query = p_query if (p_algorithm !== undefined) l_dict.algorithm = p_algorithm if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/schedule", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.set_state_with_options = function (p_project_id, p_state, p_options, p_callback, p_error_callback) { if (this.set_state_with_options && this.set_state_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.set_state_with_options' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_state !== undefined) l_dict.state = p_state if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/set_state_with_options", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.set_state = function (p_project_id, p_state, p_callback, p_error_callback) { if (this.set_state && this.set_state.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.set_state' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_state !== undefined) l_dict.state = p_state return this.m_parent.server_call(this, "job/set_state", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "job/update", l_dict, p_callback, p_error_callback); } portal_api_job.prototype.update_task = function (p_project_id, p_data, p_options, p_callback, p_error_callback) { if (this.update_task && this.update_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.update_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/update_task", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * job.resource API */ function portal_api_job_resource(p_parent) { this.m_parent = p_parent; } portal_api_job_resource.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/resource/count", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "job/resource/create", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "job/resource/delete", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "job/resource/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/resource/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "job/resource/get", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "job/resource/list", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/resource/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "job/resource/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/resource/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "job/resource/set_keys", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "job/resource/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_job_resource.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'job.resource.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "job/resource/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * project API */ function portal_api_project(p_parent) { this.m_parent = p_parent; } portal_api_project.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/count", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "project/create", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "project/delete", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "project/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "project/get", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_copy_of = function (p_id, p_callback, p_error_callback) { if (this.get_copy_of && this.get_copy_of.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_copy_of' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "project/get_copy_of", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "project/list", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "project/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "project/set_keys", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.add_task = function (p_project_id, p_data, p_options, p_callback, p_error_callback) { if (this.add_task && this.add_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.add_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/add_task", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.add_tasks_from_template = function (p_project_id, p_template_project_id, p_options, p_callback, p_error_callback) { if (this.add_tasks_from_template && this.add_tasks_from_template.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.add_tasks_from_template' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_template_project_id !== undefined) l_dict.template_project_id = p_template_project_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/add_tasks_from_template", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.calculate = function (p_data_or_id, p_what, p_parameters, p_callback, p_error_callback) { if (this.calculate && this.calculate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.calculate' }; if (p_data_or_id !== undefined) l_dict.data_or_id = p_data_or_id if (p_what !== undefined) l_dict.what = p_what if (p_parameters !== undefined) l_dict.parameters = p_parameters return this.m_parent.server_call(this, "project/calculate", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_form = function (p_project_id, p_form_type, p_callback, p_error_callback) { if (this.get_form && this.get_form.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_form' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_form_type !== undefined) l_dict.form_type = p_form_type return this.m_parent.server_call(this, "project/get_form", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_task = function (p_project_id, p_task_id, p_callback, p_error_callback) { if (this.get_task && this.get_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id return this.m_parent.server_call(this, "project/get_task", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_task_list_visualization_data = function (p_id, p_options, p_callback, p_error_callback) { if (this.get_task_list_visualization_data && this.get_task_list_visualization_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_task_list_visualization_data' }; if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/get_task_list_visualization_data", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_recursive = function (p_id, p_options, p_callback, p_error_callback) { if (this.get_recursive && this.get_recursive.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_recursive' }; if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/get_recursive", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.get_by_project_id = function (p_project_id, p_options, p_callback, p_error_callback) { if (this.get_by_project_id && this.get_by_project_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.get_by_project_id' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/get_by_project_id", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.mark_task = function (p_project_id, p_task_id, p_action, p_options, p_callback, p_error_callback) { if (this.mark_task && this.mark_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.mark_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_action !== undefined) l_dict.action = p_action if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/mark_task", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.prepare_schedule = function (p_query, p_options, p_callback, p_error_callback) { if (this.prepare_schedule && this.prepare_schedule.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.prepare_schedule' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/prepare_schedule", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.remove_task = function (p_project_id, p_task_id, p_options, p_callback, p_error_callback) { if (this.remove_task && this.remove_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.remove_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_task_id !== undefined) l_dict.task_id = p_task_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/remove_task", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.schedule = function (p_query, p_algorithm, p_parameters, p_options, p_callback, p_error_callback) { if (this.schedule && this.schedule.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.schedule' }; if (p_query !== undefined) l_dict.query = p_query if (p_algorithm !== undefined) l_dict.algorithm = p_algorithm if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/schedule", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.set_state_with_options = function (p_project_id, p_state, p_options, p_callback, p_error_callback) { if (this.set_state_with_options && this.set_state_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.set_state_with_options' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_state !== undefined) l_dict.state = p_state if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/set_state_with_options", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.set_state = function (p_project_id, p_state, p_callback, p_error_callback) { if (this.set_state && this.set_state.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.set_state' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_state !== undefined) l_dict.state = p_state return this.m_parent.server_call(this, "project/set_state", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "project/update", l_dict, p_callback, p_error_callback); } portal_api_project.prototype.update_task = function (p_project_id, p_data, p_options, p_callback, p_error_callback) { if (this.update_task && this.update_task.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.update_task' }; if (p_project_id !== undefined) l_dict.project_id = p_project_id if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/update_task", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * project.resource API */ function portal_api_project_resource(p_parent) { this.m_parent = p_parent; } portal_api_project_resource.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/resource/count", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "project/resource/create", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "project/resource/delete", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "project/resource/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/resource/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "project/resource/get", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "project/resource/list", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/resource/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "project/resource/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/resource/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "project/resource/set_keys", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "project/resource/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_project_resource.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'project.resource.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "project/resource/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * team API */ function portal_api_team(p_parent) { this.m_parent = p_parent; } portal_api_team.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "team/count", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "team/create", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "team/delete", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "team/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "team/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "team/get", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "team/list", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "team/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "team/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "team/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "team/set_keys", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "team/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "team/update", l_dict, p_callback, p_error_callback); } portal_api_team.prototype.upload = function (p_contents, p_callback, p_error_callback) { if (this.upload && this.upload.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'team.upload' }; if (p_contents !== undefined) l_dict.contents = p_contents return this.m_parent.server_call(this, "team/upload", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * bluecollardefinition API */ function portal_api_bluecollardefinition(p_parent) { this.m_parent = p_parent; } portal_api_bluecollardefinition.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bluecollardefinition/count", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "bluecollardefinition/create", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.download = function (p_id, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.download' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "bluecollardefinition/download", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "bluecollardefinition/delete", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "bluecollardefinition/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bluecollardefinition/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "bluecollardefinition/get", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "bluecollardefinition/list", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "bluecollardefinition/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "bluecollardefinition/update", l_dict, p_callback, p_error_callback); } portal_api_bluecollardefinition.prototype.upload = function (p_contents, p_callback, p_error_callback) { if (this.upload && this.upload.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'bluecollardefinition.upload' }; if (p_contents !== undefined) l_dict.contents = p_contents return this.m_parent.server_call(this, "bluecollardefinition/upload", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * hub API */ function portal_api_hub(p_parent) { this.m_parent = p_parent; } portal_api_hub.prototype.abort_jacket = function (p_jacket_id, p_immediate_kill, p_callback, p_error_callback) { if (this.abort_jacket && this.abort_jacket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.abort_jacket' }; if (p_jacket_id !== undefined) l_dict.jacket_id = p_jacket_id if (p_immediate_kill !== undefined) l_dict.immediate_kill = p_immediate_kill return this.m_parent.server_call(this, "hub/abort_jacket", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.abort_workable = function (p_workable_id, p_immediate_kill, p_callback, p_error_callback) { if (this.abort_workable && this.abort_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.abort_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_immediate_kill !== undefined) l_dict.immediate_kill = p_immediate_kill return this.m_parent.server_call(this, "hub/abort_workable", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.change_workable_priority = function (p_workable_id, p_priority, p_callback, p_error_callback) { if (this.change_workable_priority && this.change_workable_priority.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.change_workable_priority' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_priority !== undefined) l_dict.priority = p_priority return this.m_parent.server_call(this, "hub/change_workable_priority", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.check_waiting_room_of_workable = function (p_workable_id, p_collar, p_node_id, p_connector, p_callback, p_error_callback) { if (this.check_waiting_room_of_workable && this.check_waiting_room_of_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.check_waiting_room_of_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_collar !== undefined) l_dict.collar = p_collar if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_connector !== undefined) l_dict.connector = p_connector return this.m_parent.server_call(this, "hub/check_waiting_room_of_workable", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.continue_workable_with_options = function (p_workable_id, p_node_name, p_to_connector, p_options, p_callback, p_error_callback) { if (this.continue_workable_with_options && this.continue_workable_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.continue_workable_with_options' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_name !== undefined) l_dict.node_name = p_node_name if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/continue_workable_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.continue_workable = function (p_workable_id, p_node_name, p_to_connector, p_callback, p_error_callback) { if (this.continue_workable && this.continue_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.continue_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_name !== undefined) l_dict.node_name = p_node_name if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector return this.m_parent.server_call(this, "hub/continue_workable", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.continue_workable_with_variables = function (p_workable_id, p_node_name, p_to_connector, p_variables, p_callback, p_error_callback) { if (this.continue_workable_with_variables && this.continue_workable_with_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.continue_workable_with_variables' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_name !== undefined) l_dict.node_name = p_node_name if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/continue_workable_with_variables", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.continue_workable_from_kiosk = function (p_workable_id, p_node_id, p_to_connector, p_files, p_variables, p_callback, p_error_callback) { if (this.continue_workable_from_kiosk && this.continue_workable_from_kiosk.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.continue_workable_from_kiosk' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector if (p_files !== undefined) l_dict.files = p_files if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/continue_workable_from_kiosk", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.continue_workable_from_kiosk_with_options = function (p_workable_id, p_node_id, p_to_connector, p_options, p_callback, p_error_callback) { if (this.continue_workable_from_kiosk_with_options && this.continue_workable_from_kiosk_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.continue_workable_from_kiosk_with_options' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/continue_workable_from_kiosk_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.cleanup_jacket = function (p_jacket_id, p_whitepaper_id, p_callback, p_error_callback) { if (this.cleanup_jacket && this.cleanup_jacket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.cleanup_jacket' }; if (p_jacket_id !== undefined) l_dict.jacket_id = p_jacket_id if (p_whitepaper_id !== undefined) l_dict.whitepaper_id = p_whitepaper_id return this.m_parent.server_call(this, "hub/cleanup_jacket", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.create_jacket = function (p_jacket_name, p_callback, p_error_callback) { if (this.create_jacket && this.create_jacket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.create_jacket' }; if (p_jacket_name !== undefined) l_dict.jacket_name = p_jacket_name return this.m_parent.server_call(this, "hub/create_jacket", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.create_jacket_with_variables = function (p_jacket_name, p_variables, p_callback, p_error_callback) { if (this.create_jacket_with_variables && this.create_jacket_with_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.create_jacket_with_variables' }; if (p_jacket_name !== undefined) l_dict.jacket_name = p_jacket_name if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/create_jacket_with_variables", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_jacket_actions = function (p_jacket_id, p_callback, p_error_callback) { if (this.get_jacket_actions && this.get_jacket_actions.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_jacket_actions' }; if (p_jacket_id !== undefined) l_dict.jacket_id = p_jacket_id return this.m_parent.server_call(this, "hub/get_jacket_actions", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_overview_with_options = function (p_query, p_options, p_callback, p_error_callback) { if (this.get_overview_with_options && this.get_overview_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_overview_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/get_overview_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_overview = function (p_query, p_previous_timestamp, p_callback, p_error_callback) { if (this.get_overview && this.get_overview.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_overview' }; if (p_query !== undefined) l_dict.query = p_query if (p_previous_timestamp !== undefined) l_dict.previous_timestamp = p_previous_timestamp return this.m_parent.server_call(this, "hub/get_overview", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_reference_details = function (p_references, p_callback, p_error_callback) { if (this.get_reference_details && this.get_reference_details.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_reference_details' }; if (p_references !== undefined) l_dict.references = p_references return this.m_parent.server_call(this, "hub/get_reference_details", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_uploaded_file_data = function (p_file_url, p_callback, p_error_callback) { if (this.get_uploaded_file_data && this.get_uploaded_file_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_uploaded_file_data' }; if (p_file_url !== undefined) l_dict.file_url = p_file_url return this.m_parent.server_call(this, "hub/get_uploaded_file_data", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_variables_from_jacket = function (p_jacket_id, p_variables, p_callback, p_error_callback) { if (this.get_variables_from_jacket && this.get_variables_from_jacket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_variables_from_jacket' }; if (p_jacket_id !== undefined) l_dict.jacket_id = p_jacket_id if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/get_variables_from_jacket", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_variables_from_workable = function (p_workable_id, p_variables, p_callback, p_error_callback) { if (this.get_variables_from_workable && this.get_variables_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_variables_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/get_variables_from_workable", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_waiting_room_of_workable = function (p_workable_id, p_callback, p_error_callback) { if (this.get_waiting_room_of_workable && this.get_waiting_room_of_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_waiting_room_of_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id return this.m_parent.server_call(this, "hub/get_waiting_room_of_workable", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_whitepaper_input_options = function (p_whitepaper_name, p_input_name, p_callback, p_error_callback) { if (this.get_whitepaper_input_options && this.get_whitepaper_input_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_whitepaper_input_options' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name return this.m_parent.server_call(this, "hub/get_whitepaper_input_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_whitepaper_input_options_data = function (p_whitepaper_name, p_input_name, p_data, p_files, p_callback, p_error_callback) { if (this.get_whitepaper_input_options_data && this.get_whitepaper_input_options_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_whitepaper_input_options_data' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_data !== undefined) l_dict.data = p_data if (p_files !== undefined) l_dict.files = p_files return this.m_parent.server_call(this, "hub/get_whitepaper_input_options_data", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_whitepaper_inputs = function (p_options, p_callback, p_error_callback) { if (this.get_whitepaper_inputs && this.get_whitepaper_inputs.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_whitepaper_inputs' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/get_whitepaper_inputs", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_workable_hold_options_with_options = function (p_workable_id, p_node_id, p_options, p_callback, p_error_callback) { if (this.get_workable_hold_options_with_options && this.get_workable_hold_options_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_workable_hold_options_with_options' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/get_workable_hold_options_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_workable_hold_options = function (p_workable_id, p_node_id, p_callback, p_error_callback) { if (this.get_workable_hold_options && this.get_workable_hold_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_workable_hold_options' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_id !== undefined) l_dict.node_id = p_node_id return this.m_parent.server_call(this, "hub/get_workable_hold_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.get_workable_hold_options_data = function (p_workable_id, p_node_id, p_data, p_callback, p_error_callback) { if (this.get_workable_hold_options_data && this.get_workable_hold_options_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.get_workable_hold_options_data' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "hub/get_workable_hold_options_data", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.move_uploaded_files = function (p_urls, p_whitepaper_name, p_input_name, p_callback, p_error_callback) { if (this.move_uploaded_files && this.move_uploaded_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.move_uploaded_files' }; if (p_urls !== undefined) l_dict.urls = p_urls if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name return this.m_parent.server_call(this, "hub/move_uploaded_files", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.poll_for_workable_result = function (p_workable_id, p_time_out, p_callback, p_error_callback) { if (this.poll_for_workable_result && this.poll_for_workable_result.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.poll_for_workable_result' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_time_out !== undefined) l_dict.time_out = p_time_out return this.m_parent.server_call(this, "hub/poll_for_workable_result", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.prepare_jacket_rerun = function (p_whitepaper_name, p_input_name, p_jacket_id, p_workable_id, p_callback, p_error_callback) { if (this.prepare_jacket_rerun && this.prepare_jacket_rerun.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.prepare_jacket_rerun' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_jacket_id !== undefined) l_dict.jacket_id = p_jacket_id if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id return this.m_parent.server_call(this, "hub/prepare_jacket_rerun", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.process_from_whitepaper_with_options = function (p_whitepaper_name, p_input_name, p_options, p_callback, p_error_callback) { if (this.process_from_whitepaper_with_options && this.process_from_whitepaper_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.process_from_whitepaper_with_options' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/process_from_whitepaper_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.process_from_whitepaper = function (p_whitepaper_name, p_input_name, p_time_out, p_callback, p_error_callback) { if (this.process_from_whitepaper && this.process_from_whitepaper.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.process_from_whitepaper' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_time_out !== undefined) l_dict.time_out = p_time_out return this.m_parent.server_call(this, "hub/process_from_whitepaper", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.process_from_whitepaper_with_variables = function (p_whitepaper_name, p_input_name, p_variables, p_time_out, p_callback, p_error_callback) { if (this.process_from_whitepaper_with_variables && this.process_from_whitepaper_with_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.process_from_whitepaper_with_variables' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_variables !== undefined) l_dict.variables = p_variables if (p_time_out !== undefined) l_dict.time_out = p_time_out return this.m_parent.server_call(this, "hub/process_from_whitepaper_with_variables", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.process_from_whitepaper_with_files_and_variables = function (p_whitepaper_name, p_input_name, p_files, p_variables, p_time_out, p_callback, p_error_callback) { if (this.process_from_whitepaper_with_files_and_variables && this.process_from_whitepaper_with_files_and_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.process_from_whitepaper_with_files_and_variables' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_files !== undefined) l_dict.files = p_files if (p_variables !== undefined) l_dict.variables = p_variables if (p_time_out !== undefined) l_dict.time_out = p_time_out return this.m_parent.server_call(this, "hub/process_from_whitepaper_with_files_and_variables", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.start_from_whitepaper_with_options = function (p_whitepaper_name, p_input_name, p_options, p_callback, p_error_callback) { if (this.start_from_whitepaper_with_options && this.start_from_whitepaper_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.start_from_whitepaper_with_options' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hub/start_from_whitepaper_with_options", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.start_from_whitepaper = function (p_whitepaper_name, p_input_name, p_callback, p_error_callback) { if (this.start_from_whitepaper && this.start_from_whitepaper.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.start_from_whitepaper' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name return this.m_parent.server_call(this, "hub/start_from_whitepaper", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.start_from_whitepaper_with_variables = function (p_whitepaper_name, p_input_name, p_variables, p_callback, p_error_callback) { if (this.start_from_whitepaper_with_variables && this.start_from_whitepaper_with_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.start_from_whitepaper_with_variables' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/start_from_whitepaper_with_variables", l_dict, p_callback, p_error_callback); } portal_api_hub.prototype.start_from_whitepaper_with_files_and_variables = function (p_whitepaper_name, p_input_name, p_files, p_variables, p_callback, p_error_callback) { if (this.start_from_whitepaper_with_files_and_variables && this.start_from_whitepaper_with_files_and_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hub.start_from_whitepaper_with_files_and_variables' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_files !== undefined) l_dict.files = p_files if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "hub/start_from_whitepaper_with_files_and_variables", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * jacket API */ function portal_api_jacket(p_parent) { this.m_parent = p_parent; } portal_api_jacket.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "jacket/count", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "jacket/create", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "jacket/delete", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "jacket/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "jacket/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.download = function (p_id, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.download' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "jacket/download", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "jacket/get", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "jacket/list", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "jacket/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_jacket.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'jacket.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "jacket/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * valuecomposer API */ function portal_api_valuecomposer(p_parent) { this.m_parent = p_parent; } portal_api_valuecomposer.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "valuecomposer/count", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "valuecomposer/create", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "valuecomposer/delete", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "valuecomposer/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "valuecomposer/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.download = function (p_id, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.download' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "valuecomposer/download", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "valuecomposer/get", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "valuecomposer/list", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "valuecomposer/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "valuecomposer/update", l_dict, p_callback, p_error_callback); } portal_api_valuecomposer.prototype.evaluate_value_composer = function (p_composers, p_callback, p_error_callback) { if (this.evaluate_value_composer && this.evaluate_value_composer.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'valuecomposer.evaluate_value_composer' }; if (p_composers !== undefined) l_dict.composers = p_composers return this.m_parent.server_call(this, "valuecomposer/evaluate_value_composer", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * whitepaper API */ function portal_api_whitepaper(p_parent) { this.m_parent = p_parent; } portal_api_whitepaper.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/count", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.get_copy_of = function (p_id, p_callback, p_error_callback) { if (this.get_copy_of && this.get_copy_of.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.get_copy_of' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/get_copy_of", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/get", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "whitepaper/list", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "whitepaper/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "whitepaper/set_keys", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "whitepaper/create", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.create_from_template = function (p_template_id, p_callback, p_error_callback) { if (this.create_from_template && this.create_from_template.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.create_from_template' }; if (p_template_id !== undefined) l_dict.template_id = p_template_id return this.m_parent.server_call(this, "whitepaper/create_from_template", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/delete", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "whitepaper/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.download = function (p_id, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.download' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/download", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.evaluate_value_composer = function (p_composers, p_callback, p_error_callback) { if (this.evaluate_value_composer && this.evaluate_value_composer.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.evaluate_value_composer' }; if (p_composers !== undefined) l_dict.composers = p_composers return this.m_parent.server_call(this, "whitepaper/evaluate_value_composer", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.get_sub_flow_parameters = function (p_whitepaper_name, p_sub_flow_name, p_callback, p_error_callback) { if (this.get_sub_flow_parameters && this.get_sub_flow_parameters.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.get_sub_flow_parameters' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_sub_flow_name !== undefined) l_dict.sub_flow_name = p_sub_flow_name return this.m_parent.server_call(this, "whitepaper/get_sub_flow_parameters", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.get_template_parameters = function (p_id, p_template_id, p_callback, p_error_callback) { if (this.get_template_parameters && this.get_template_parameters.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.get_template_parameters' }; if (p_id !== undefined) l_dict.id = p_id if (p_template_id !== undefined) l_dict.template_id = p_template_id return this.m_parent.server_call(this, "whitepaper/get_template_parameters", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.get_value_composer_editor_configuration = function (p_context, p_callback, p_error_callback) { if (this.get_value_composer_editor_configuration && this.get_value_composer_editor_configuration.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.get_value_composer_editor_configuration' }; if (p_context !== undefined) l_dict.context = p_context return this.m_parent.server_call(this, "whitepaper/get_value_composer_editor_configuration", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.insert_partial_copy = function (p_id, p_from_id, p_node_id, p_options, p_callback, p_error_callback) { if (this.insert_partial_copy && this.insert_partial_copy.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.insert_partial_copy' }; if (p_id !== undefined) l_dict.id = p_id if (p_from_id !== undefined) l_dict.from_id = p_from_id if (p_node_id !== undefined) l_dict.node_id = p_node_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/insert_partial_copy", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "whitepaper/update", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.update_template_parameters = function (p_id, p_parameters, p_template_id, p_callback, p_error_callback) { if (this.update_template_parameters && this.update_template_parameters.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.update_template_parameters' }; if (p_id !== undefined) l_dict.id = p_id if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_template_id !== undefined) l_dict.template_id = p_template_id return this.m_parent.server_call(this, "whitepaper/update_template_parameters", l_dict, p_callback, p_error_callback); } portal_api_whitepaper.prototype.upload = function (p_contents, p_callback, p_error_callback) { if (this.upload && this.upload.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.upload' }; if (p_contents !== undefined) l_dict.contents = p_contents return this.m_parent.server_call(this, "whitepaper/upload", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * whitepaper.hook API */ function portal_api_whitepaper_hook(p_parent) { this.m_parent = p_parent; } portal_api_whitepaper_hook.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "whitepaper/hook/create", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/hook/delete", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "whitepaper/hook/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/hook/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "whitepaper/hook/get", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "whitepaper/hook/list", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "whitepaper/hook/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_whitepaper_hook.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'whitepaper.hook.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "whitepaper/hook/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * workable API */ function portal_api_workable(p_parent) { this.m_parent = p_parent; } portal_api_workable.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "workable/count", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "workable/create", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "workable/delete", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "workable/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "workable/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.download = function (p_id, p_callback, p_error_callback) { if (this.download && this.download.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.download' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "workable/download", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "workable/get", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "workable/list", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "workable/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "workable/update", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.abort = function (p_id, p_immediate_kill, p_callback, p_error_callback) { if (this.abort && this.abort.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.abort' }; if (p_id !== undefined) l_dict.id = p_id if (p_immediate_kill !== undefined) l_dict.immediate_kill = p_immediate_kill return this.m_parent.server_call(this, "workable/abort", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.evaluate_value_composer = function (p_composers, p_callback, p_error_callback) { if (this.evaluate_value_composer && this.evaluate_value_composer.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.evaluate_value_composer' }; if (p_composers !== undefined) l_dict.composers = p_composers return this.m_parent.server_call(this, "workable/evaluate_value_composer", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_container_data_by_url = function (p_container_url, p_callback, p_error_callback) { if (this.get_container_data_by_url && this.get_container_data_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_container_data_by_url' }; if (p_container_url !== undefined) l_dict.container_url = p_container_url return this.m_parent.server_call(this, "workable/get_container_data_by_url", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_executed_parameters_for_node = function (p_id, p_node, p_callback, p_error_callback) { if (this.get_executed_parameters_for_node && this.get_executed_parameters_for_node.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_executed_parameters_for_node' }; if (p_id !== undefined) l_dict.id = p_id if (p_node !== undefined) l_dict.node = p_node return this.m_parent.server_call(this, "workable/get_executed_parameters_for_node", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_merged_variables = function (p_id, p_callback, p_error_callback) { if (this.get_merged_variables && this.get_merged_variables.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_merged_variables' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "workable/get_merged_variables", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_messages = function (p_id, p_severity, p_callback, p_error_callback) { if (this.get_messages && this.get_messages.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_messages' }; if (p_id !== undefined) l_dict.id = p_id if (p_severity !== undefined) l_dict.severity = p_severity return this.m_parent.server_call(this, "workable/get_messages", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_messages_for_node = function (p_id, p_node, p_severity, p_callback, p_error_callback) { if (this.get_messages_for_node && this.get_messages_for_node.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_messages_for_node' }; if (p_id !== undefined) l_dict.id = p_id if (p_node !== undefined) l_dict.node = p_node if (p_severity !== undefined) l_dict.severity = p_severity return this.m_parent.server_call(this, "workable/get_messages_for_node", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_original_parameters_for_node = function (p_id, p_node, p_callback, p_error_callback) { if (this.get_original_parameters_for_node && this.get_original_parameters_for_node.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_original_parameters_for_node' }; if (p_id !== undefined) l_dict.id = p_id if (p_node !== undefined) l_dict.node = p_node return this.m_parent.server_call(this, "workable/get_original_parameters_for_node", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_output_for_node = function (p_id, p_node, p_callback, p_error_callback) { if (this.get_output_for_node && this.get_output_for_node.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_output_for_node' }; if (p_id !== undefined) l_dict.id = p_id if (p_node !== undefined) l_dict.node = p_node return this.m_parent.server_call(this, "workable/get_output_for_node", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_progress = function (p_id, p_callback, p_error_callback) { if (this.get_progress && this.get_progress.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_progress' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "workable/get_progress", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.get_resolved_parameters_for_node = function (p_id, p_node, p_callback, p_error_callback) { if (this.get_resolved_parameters_for_node && this.get_resolved_parameters_for_node.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.get_resolved_parameters_for_node' }; if (p_id !== undefined) l_dict.id = p_id if (p_node !== undefined) l_dict.node = p_node return this.m_parent.server_call(this, "workable/get_resolved_parameters_for_node", l_dict, p_callback, p_error_callback); } portal_api_workable.prototype.move = function (p_id, p_from_node_id, p_from_connector, p_to_node_id, p_to_connector, p_callback, p_error_callback) { if (this.move && this.move.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'workable.move' }; if (p_id !== undefined) l_dict.id = p_id if (p_from_node_id !== undefined) l_dict.from_node_id = p_from_node_id if (p_from_connector !== undefined) l_dict.from_connector = p_from_connector if (p_to_node_id !== undefined) l_dict.to_node_id = p_to_node_id if (p_to_connector !== undefined) l_dict.to_connector = p_to_connector return this.m_parent.server_call(this, "workable/move", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * approval API */ function portal_api_approval(p_parent) { this.m_parent = p_parent; } portal_api_approval.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/count", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "approval/create", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "approval/delete", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "approval/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "approval/get", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "approval/list", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "approval/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "approval/set_keys", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "approval/update", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.assess_with_options = function (p_approval_id, p_user_email, p_assessment, p_options, p_callback, p_error_callback) { if (this.assess_with_options && this.assess_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.assess_with_options' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_user_email !== undefined) l_dict.user_email = p_user_email if (p_assessment !== undefined) l_dict.assessment = p_assessment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/assess_with_options", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.assess = function (p_approval_id, p_user_email, p_assessment, p_callback, p_error_callback) { if (this.assess && this.assess.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.assess' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_user_email !== undefined) l_dict.user_email = p_user_email if (p_assessment !== undefined) l_dict.assessment = p_assessment return this.m_parent.server_call(this, "approval/assess", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.assess_from_workable_with_options = function (p_workable_id, p_assessment, p_options, p_callback, p_error_callback) { if (this.assess_from_workable_with_options && this.assess_from_workable_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.assess_from_workable_with_options' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_assessment !== undefined) l_dict.assessment = p_assessment if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "approval/assess_from_workable_with_options", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.assess_from_workable = function (p_workable_id, p_assessment, p_callback, p_error_callback) { if (this.assess_from_workable && this.assess_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.assess_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_assessment !== undefined) l_dict.assessment = p_assessment return this.m_parent.server_call(this, "approval/assess_from_workable", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.cancel = function (p_approval_id, p_callback, p_error_callback) { if (this.cancel && this.cancel.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.cancel' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id return this.m_parent.server_call(this, "approval/cancel", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.cancel_from_workable = function (p_workable_id, p_callback, p_error_callback) { if (this.cancel_from_workable && this.cancel_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.cancel_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id return this.m_parent.server_call(this, "approval/cancel_from_workable", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delegate = function (p_approval_id, p_user_email, p_delegate_emails, p_mode, p_callback, p_error_callback) { if (this.delegate && this.delegate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delegate' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_user_email !== undefined) l_dict.user_email = p_user_email if (p_delegate_emails !== undefined) l_dict.delegate_emails = p_delegate_emails if (p_mode !== undefined) l_dict.mode = p_mode return this.m_parent.server_call(this, "approval/delegate", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delegate_from_workable = function (p_workable_id, p_delegate_emails, p_mode, p_callback, p_error_callback) { if (this.delegate_from_workable && this.delegate_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delegate_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_delegate_emails !== undefined) l_dict.delegate_emails = p_delegate_emails if (p_mode !== undefined) l_dict.mode = p_mode return this.m_parent.server_call(this, "approval/delegate_from_workable", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.delete_by_approval_id = function (p_approval_id, p_callback, p_error_callback) { if (this.delete_by_approval_id && this.delete_by_approval_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.delete_by_approval_id' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id return this.m_parent.server_call(this, "approval/delete_by_approval_id", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.force = function (p_approval_id, p_assessment, p_callback, p_error_callback) { if (this.force && this.force.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.force' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_assessment !== undefined) l_dict.assessment = p_assessment return this.m_parent.server_call(this, "approval/force", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.force_from_workable = function (p_workable_id, p_assessment, p_callback, p_error_callback) { if (this.force_from_workable && this.force_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.force_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_assessment !== undefined) l_dict.assessment = p_assessment return this.m_parent.server_call(this, "approval/force_from_workable", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_approval_id_from_workable = function (p_workable_id, p_callback, p_error_callback) { if (this.get_approval_id_from_workable && this.get_approval_id_from_workable.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_approval_id_from_workable' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id return this.m_parent.server_call(this, "approval/get_approval_id_from_workable", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_assessment = function (p_approval_id, p_callback, p_error_callback) { if (this.get_assessment && this.get_assessment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_assessment' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id return this.m_parent.server_call(this, "approval/get_assessment", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_overview = function (p_approval_id, p_flatten_iterations, p_inline_sub_approvals, p_callback, p_error_callback) { if (this.get_overview && this.get_overview.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_overview' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_flatten_iterations !== undefined) l_dict.flatten_iterations = p_flatten_iterations if (p_inline_sub_approvals !== undefined) l_dict.inline_sub_approvals = p_inline_sub_approvals return this.m_parent.server_call(this, "approval/get_overview", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_overview_by_reference = function (p_reference, p_flatten_iterations, p_inline_sub_approvals, p_callback, p_error_callback) { if (this.get_overview_by_reference && this.get_overview_by_reference.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_overview_by_reference' }; if (p_reference !== undefined) l_dict.reference = p_reference if (p_flatten_iterations !== undefined) l_dict.flatten_iterations = p_flatten_iterations if (p_inline_sub_approvals !== undefined) l_dict.inline_sub_approvals = p_inline_sub_approvals return this.m_parent.server_call(this, "approval/get_overview_by_reference", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_participant_assessment = function (p_approval_id, p_user_email, p_callback, p_error_callback) { if (this.get_participant_assessment && this.get_participant_assessment.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_participant_assessment' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_user_email !== undefined) l_dict.user_email = p_user_email return this.m_parent.server_call(this, "approval/get_participant_assessment", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_participant_assessment_by_url = function (p_url, p_user_email, p_callback, p_error_callback) { if (this.get_participant_assessment_by_url && this.get_participant_assessment_by_url.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_participant_assessment_by_url' }; if (p_url !== undefined) l_dict.url = p_url if (p_user_email !== undefined) l_dict.user_email = p_user_email return this.m_parent.server_call(this, "approval/get_participant_assessment_by_url", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.get_participant_assessment_by_asset_id = function (p_asset_id, p_user_email, p_callback, p_error_callback) { if (this.get_participant_assessment_by_asset_id && this.get_participant_assessment_by_asset_id.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.get_participant_assessment_by_asset_id' }; if (p_asset_id !== undefined) l_dict.asset_id = p_asset_id if (p_user_email !== undefined) l_dict.user_email = p_user_email return this.m_parent.server_call(this, "approval/get_participant_assessment_by_asset_id", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.manage_participants = function (p_approval_id, p_manage_emails, p_mode, p_callback, p_error_callback) { if (this.manage_participants && this.manage_participants.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.manage_participants' }; if (p_approval_id !== undefined) l_dict.approval_id = p_approval_id if (p_manage_emails !== undefined) l_dict.manage_emails = p_manage_emails if (p_mode !== undefined) l_dict.mode = p_mode return this.m_parent.server_call(this, "approval/manage_participants", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.remove_by_reference = function (p_reference, p_callback, p_error_callback) { if (this.remove_by_reference && this.remove_by_reference.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.remove_by_reference' }; if (p_reference !== undefined) l_dict.reference = p_reference return this.m_parent.server_call(this, "approval/remove_by_reference", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.remove_stale_records = function (p_callback, p_error_callback) { if (this.remove_stale_records && this.remove_stale_records.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.remove_stale_records' }; return this.m_parent.server_call(this, "approval/remove_stale_records", l_dict, p_callback, p_error_callback); } portal_api_approval.prototype.start = function (p_whitepaper_name, p_input_name, p_files, p_variables, p_callback, p_error_callback) { if (this.start && this.start.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'approval.start' }; if (p_whitepaper_name !== undefined) l_dict.whitepaper_name = p_whitepaper_name if (p_input_name !== undefined) l_dict.input_name = p_input_name if (p_files !== undefined) l_dict.files = p_files if (p_variables !== undefined) l_dict.variables = p_variables return this.m_parent.server_call(this, "approval/start", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * layout API */ function portal_api_layout(p_parent) { this.m_parent = p_parent; } portal_api_layout.prototype.bin_pack = function (p_layout, p_h_margin, p_v_margin, p_exclude_patches, p_gutter_margin, p_start_bottom, p_options, p_callback, p_error_callback) { if (this.bin_pack && this.bin_pack.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.bin_pack' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_h_margin !== undefined) l_dict.h_margin = p_h_margin if (p_v_margin !== undefined) l_dict.v_margin = p_v_margin if (p_exclude_patches !== undefined) l_dict.exclude_patches = p_exclude_patches if (p_gutter_margin !== undefined) l_dict.gutter_margin = p_gutter_margin if (p_start_bottom !== undefined) l_dict.start_bottom = p_start_bottom if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/bin_pack", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.bin_pack_multi = function (p_patches, p_sheets, p_new_sheet_templates, p_gutter_margin, p_options, p_callback, p_error_callback) { if (this.bin_pack_multi && this.bin_pack_multi.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.bin_pack_multi' }; if (p_patches !== undefined) l_dict.patches = p_patches if (p_sheets !== undefined) l_dict.sheets = p_sheets if (p_new_sheet_templates !== undefined) l_dict.new_sheet_templates = p_new_sheet_templates if (p_gutter_margin !== undefined) l_dict.gutter_margin = p_gutter_margin if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/bin_pack_multi", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.detect_single_patch = function (p_files, p_options, p_callback, p_error_callback) { if (this.detect_single_patch && this.detect_single_patch.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.detect_single_patch' }; if (p_files !== undefined) l_dict.files = p_files if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/detect_single_patch", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.detect_patches = function (p_files, p_options, p_callback, p_error_callback) { if (this.detect_patches && this.detect_patches.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.detect_patches' }; if (p_files !== undefined) l_dict.files = p_files if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/detect_patches", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.get_areas = function (p_layout, p_options, p_callback, p_error_callback) { if (this.get_areas && this.get_areas.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.get_areas' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/get_areas", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.get_preview = function (p_layout_url, p_mode, p_resolution, p_options, p_callback, p_error_callback) { if (this.get_preview && this.get_preview.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.get_preview' }; if (p_layout_url !== undefined) l_dict.layout_url = p_layout_url if (p_mode !== undefined) l_dict.mode = p_mode if (p_resolution !== undefined) l_dict.resolution = p_resolution if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/get_preview", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.to_heaford = function (p_layout_url, p_csv, p_options, p_callback, p_error_callback) { if (this.to_heaford && this.to_heaford.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.to_heaford' }; if (p_layout_url !== undefined) l_dict.layout_url = p_layout_url if (p_csv !== undefined) l_dict.csv = p_csv if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/to_heaford", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.to_mountomatic = function (p_layout_url, p_mom, p_options, p_callback, p_error_callback) { if (this.to_mountomatic && this.to_mountomatic.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.to_mountomatic' }; if (p_layout_url !== undefined) l_dict.layout_url = p_layout_url if (p_mom !== undefined) l_dict.mom = p_mom if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/to_mountomatic", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.to_pdf = function (p_layout, p_pdf, p_options, p_callback, p_error_callback) { if (this.to_pdf && this.to_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.to_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_pdf !== undefined) l_dict.pdf = p_pdf if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/to_pdf", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.to_tiff = function (p_layout, p_tiff, p_options, p_callback, p_error_callback) { if (this.to_tiff && this.to_tiff.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.to_tiff' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_tiff !== undefined) l_dict.tiff = p_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/to_tiff", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.verify = function (p_layout, p_options, p_callback, p_error_callback) { if (this.verify && this.verify.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.verify' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/verify", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.from_imposition = function (p_imposition, p_layout_file, p_options, p_callback, p_error_callback) { if (this.from_imposition && this.from_imposition.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.from_imposition' }; if (p_imposition !== undefined) l_dict.imposition = p_imposition if (p_layout_file !== undefined) l_dict.layout_file = p_layout_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/from_imposition", l_dict, p_callback, p_error_callback); } portal_api_layout.prototype.decorate = function (p_input_file, p_output_file, p_decoration_file, p_options, p_callback, p_error_callback) { if (this.decorate && this.decorate.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'layout.decorate' }; if (p_input_file !== undefined) l_dict.input_file = p_input_file if (p_output_file !== undefined) l_dict.output_file = p_output_file if (p_decoration_file !== undefined) l_dict.decoration_file = p_decoration_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "layout/decorate", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * printplanner API */ function portal_api_printplanner(p_parent) { this.m_parent = p_parent; } portal_api_printplanner.prototype.create_pdf = function (p_layout, p_output, p_callback, p_error_callback) { if (this.create_pdf && this.create_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output return this.m_parent.server_call(this, "printplanner/create_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_cheatsheet_pdf = function (p_layout, p_output, p_font_size, p_callback, p_error_callback) { if (this.create_cheatsheet_pdf && this.create_cheatsheet_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_cheatsheet_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_font_size !== undefined) l_dict.font_size = p_font_size return this.m_parent.server_call(this, "printplanner/create_cheatsheet_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_heaford_mounting_pdf = function (p_layout, p_output, p_job, p_options, p_callback, p_error_callback) { if (this.create_heaford_mounting_pdf && this.create_heaford_mounting_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_heaford_mounting_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_job !== undefined) l_dict.job = p_job if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/create_heaford_mounting_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_drl_mounting_pdf = function (p_layout, p_output, p_job, p_options, p_callback, p_error_callback) { if (this.create_drl_mounting_pdf && this.create_drl_mounting_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_drl_mounting_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_job !== undefined) l_dict.job = p_job if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/create_drl_mounting_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_mom = function (p_layout, p_output, p_job, p_options, p_export_patch_surfaces, p_callback, p_error_callback) { if (this.create_mom && this.create_mom.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_mom' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_job !== undefined) l_dict.job = p_job if (p_options !== undefined) l_dict.options = p_options if (p_export_patch_surfaces !== undefined) l_dict.export_patch_surfaces = p_export_patch_surfaces return this.m_parent.server_call(this, "printplanner/create_mom", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.bin_pack = function (p_layout, p_h_margin, p_v_margin, p_exclude_patches, p_gutter_margin, p_start_bottom, p_callback, p_error_callback) { if (this.bin_pack && this.bin_pack.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.bin_pack' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_h_margin !== undefined) l_dict.h_margin = p_h_margin if (p_v_margin !== undefined) l_dict.v_margin = p_v_margin if (p_exclude_patches !== undefined) l_dict.exclude_patches = p_exclude_patches if (p_gutter_margin !== undefined) l_dict.gutter_margin = p_gutter_margin if (p_start_bottom !== undefined) l_dict.start_bottom = p_start_bottom return this.m_parent.server_call(this, "printplanner/bin_pack", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.bin_pack_with_options = function (p_layout, p_h_margin, p_v_margin, p_exclude_patches, p_gutter_margin, p_start_bottom, p_options, p_callback, p_error_callback) { if (this.bin_pack_with_options && this.bin_pack_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.bin_pack_with_options' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_h_margin !== undefined) l_dict.h_margin = p_h_margin if (p_v_margin !== undefined) l_dict.v_margin = p_v_margin if (p_exclude_patches !== undefined) l_dict.exclude_patches = p_exclude_patches if (p_gutter_margin !== undefined) l_dict.gutter_margin = p_gutter_margin if (p_start_bottom !== undefined) l_dict.start_bottom = p_start_bottom if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/bin_pack_with_options", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.detect_patches = function (p_layout, p_url, p_horizontalmargin, p_verticalmargin, p_callback, p_error_callback) { if (this.detect_patches && this.detect_patches.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.detect_patches' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_url !== undefined) l_dict.url = p_url if (p_horizontalmargin !== undefined) l_dict.horizontalmargin = p_horizontalmargin if (p_verticalmargin !== undefined) l_dict.verticalmargin = p_verticalmargin return this.m_parent.server_call(this, "printplanner/detect_patches", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.detect_full_patch = function (p_layout, p_url, p_callback, p_error_callback) { if (this.detect_full_patch && this.detect_full_patch.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.detect_full_patch' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "printplanner/detect_full_patch", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.detect_full_patch_cropped = function (p_layout, p_url, p_options, p_callback, p_error_callback) { if (this.detect_full_patch_cropped && this.detect_full_patch_cropped.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.detect_full_patch_cropped' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_url !== undefined) l_dict.url = p_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/detect_full_patch_cropped", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.detect_zero_patches = function (p_url, p_callback, p_error_callback) { if (this.detect_zero_patches && this.detect_zero_patches.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.detect_zero_patches' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "printplanner/detect_zero_patches", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.layout_to_pdf = function (p_layout, p_data, p_pdf, p_overwrite, p_callback, p_error_callback) { if (this.layout_to_pdf && this.layout_to_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.layout_to_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_data !== undefined) l_dict.data = p_data if (p_pdf !== undefined) l_dict.pdf = p_pdf if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "printplanner/layout_to_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.preview_layout_to_tiff = function (p_layout, p_tiff, p_options, p_callback, p_error_callback) { if (this.preview_layout_to_tiff && this.preview_layout_to_tiff.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.preview_layout_to_tiff' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_tiff !== undefined) l_dict.tiff = p_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/preview_layout_to_tiff", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_jdf = function (p_layout, p_output, p_flavour, p_callback, p_error_callback) { if (this.create_jdf && this.create_jdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_jdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_flavour !== undefined) l_dict.flavour = p_flavour return this.m_parent.server_call(this, "printplanner/create_jdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.decorate_pdf = function (p_file, p_decorate, p_data, p_decorated_file, p_overwrite, p_callback, p_error_callback) { if (this.decorate_pdf && this.decorate_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.decorate_pdf' }; if (p_file !== undefined) l_dict.file = p_file if (p_decorate !== undefined) l_dict.decorate = p_decorate if (p_data !== undefined) l_dict.data = p_data if (p_decorated_file !== undefined) l_dict.decorated_file = p_decorated_file if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite return this.m_parent.server_call(this, "printplanner/decorate_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.install_patchplanner = function (p_application_paths, p_callback, p_error_callback) { if (this.install_patchplanner && this.install_patchplanner.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.install_patchplanner' }; if (p_application_paths !== undefined) l_dict.application_paths = p_application_paths return this.m_parent.server_call(this, "printplanner/install_patchplanner", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.check_patchplanner_install = function (p_folders, p_callback, p_error_callback) { if (this.check_patchplanner_install && this.check_patchplanner_install.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.check_patchplanner_install' }; if (p_folders !== undefined) l_dict.folders = p_folders return this.m_parent.server_call(this, "printplanner/check_patchplanner_install", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.get_patch_placement_info = function (p_jobs_path, p_sheets_path, p_callback, p_error_callback) { if (this.get_patch_placement_info && this.get_patch_placement_info.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.get_patch_placement_info' }; if (p_jobs_path !== undefined) l_dict.jobs_path = p_jobs_path if (p_sheets_path !== undefined) l_dict.sheets_path = p_sheets_path return this.m_parent.server_call(this, "printplanner/get_patch_placement_info", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.archive_jobs_and_sheets = function (p_jobs_path, p_sheets_path, p_jobs_archive_path, p_sheets_archive_path, p_timeout, p_callback, p_error_callback) { if (this.archive_jobs_and_sheets && this.archive_jobs_and_sheets.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.archive_jobs_and_sheets' }; if (p_jobs_path !== undefined) l_dict.jobs_path = p_jobs_path if (p_sheets_path !== undefined) l_dict.sheets_path = p_sheets_path if (p_jobs_archive_path !== undefined) l_dict.jobs_archive_path = p_jobs_archive_path if (p_sheets_archive_path !== undefined) l_dict.sheets_archive_path = p_sheets_archive_path if (p_timeout !== undefined) l_dict.timeout = p_timeout return this.m_parent.server_call(this, "printplanner/archive_jobs_and_sheets", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.invalidate_cache = function (p_cloudflow_path, p_callback, p_error_callback) { if (this.invalidate_cache && this.invalidate_cache.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.invalidate_cache' }; if (p_cloudflow_path !== undefined) l_dict.cloudflow_path = p_cloudflow_path return this.m_parent.server_call(this, "printplanner/invalidate_cache", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.mom_file_exists = function (p_mom_file, p_mom_path, p_callback, p_error_callback) { if (this.mom_file_exists && this.mom_file_exists.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.mom_file_exists' }; if (p_mom_file !== undefined) l_dict.mom_file = p_mom_file if (p_mom_path !== undefined) l_dict.mom_path = p_mom_path return this.m_parent.server_call(this, "printplanner/mom_file_exists", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.install_printplanner = function (p_callback, p_error_callback) { if (this.install_printplanner && this.install_printplanner.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.install_printplanner' }; return this.m_parent.server_call(this, "printplanner/install_printplanner", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_mirror_mounting_pdf = function (p_layout, p_output, p_job, p_die_separation, p_distortion, p_callback, p_error_callback) { if (this.create_mirror_mounting_pdf && this.create_mirror_mounting_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_mirror_mounting_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_job !== undefined) l_dict.job = p_job if (p_die_separation !== undefined) l_dict.die_separation = p_die_separation if (p_distortion !== undefined) l_dict.distortion = p_distortion return this.m_parent.server_call(this, "printplanner/create_mirror_mounting_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.create_drill_mounting_pdf = function (p_layout, p_output, p_job, p_die_separation, p_distortion, p_callback, p_error_callback) { if (this.create_drill_mounting_pdf && this.create_drill_mounting_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.create_drill_mounting_pdf' }; if (p_layout !== undefined) l_dict.layout = p_layout if (p_output !== undefined) l_dict.output = p_output if (p_job !== undefined) l_dict.job = p_job if (p_die_separation !== undefined) l_dict.die_separation = p_die_separation if (p_distortion !== undefined) l_dict.distortion = p_distortion return this.m_parent.server_call(this, "printplanner/create_drill_mounting_pdf", l_dict, p_callback, p_error_callback); } portal_api_printplanner.prototype.rotate_tiff = function (p_input_tiff, p_output_tiff, p_angle, p_overwrite, p_options, p_callback, p_error_callback) { if (this.rotate_tiff && this.rotate_tiff.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'printplanner.rotate_tiff' }; if (p_input_tiff !== undefined) l_dict.input_tiff = p_input_tiff if (p_output_tiff !== undefined) l_dict.output_tiff = p_output_tiff if (p_angle !== undefined) l_dict.angle = p_angle if (p_overwrite !== undefined) l_dict.overwrite = p_overwrite if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "printplanner/rotate_tiff", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * screenpro API */ function portal_api_screenpro(p_parent) { this.m_parent = p_parent; } portal_api_screenpro.prototype.list_screens = function (p_options, p_callback, p_error_callback) { if (this.list_screens && this.list_screens.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'screenpro.list_screens' }; if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "screenpro/list_screens", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * estimation API */ function portal_api_estimation(p_parent) { this.m_parent = p_parent; } portal_api_estimation.prototype.parceling = function (p_algorithm, p_input, p_options, p_callback, p_error_callback) { if (this.parceling && this.parceling.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'estimation.parceling' }; if (p_algorithm !== undefined) l_dict.algorithm = p_algorithm if (p_input !== undefined) l_dict.input = p_input if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "estimation/parceling", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * csv API */ function portal_api_csv(p_parent) { this.m_parent = p_parent; } portal_api_csv.prototype.to_json = function (p_csv_file, p_options, p_callback, p_error_callback) { if (this.to_json && this.to_json.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'csv.to_json' }; if (p_csv_file !== undefined) l_dict.csv_file = p_csv_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "csv/to_json", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * database_proxy API */ function portal_api_database_proxy(p_parent) { this.m_parent = p_parent; } portal_api_database_proxy.prototype.count = function (p_proxy, p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.count' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/count", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.create = function (p_proxy, p_data, p_options, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.create' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/create", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.delete = function (p_proxy, p_id, p_options, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.delete' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/delete", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.get = function (p_proxy, p_id, p_options, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.get' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_id !== undefined) l_dict.id = p_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/get", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.get_all_proxies = function (p_callback, p_error_callback) { if (this.get_all_proxies && this.get_all_proxies.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.get_all_proxies' }; return this.m_parent.server_call(this, "database_proxy/get_all_proxies", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.get_columns = function (p_proxy, p_options, p_callback, p_error_callback) { if (this.get_columns && this.get_columns.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.get_columns' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/get_columns", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.list = function (p_proxy, p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.list' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/list", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.update = function (p_proxy, p_data, p_options, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.update' }; if (p_proxy !== undefined) l_dict.proxy = p_proxy if (p_data !== undefined) l_dict.data = p_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "database_proxy/update", l_dict, p_callback, p_error_callback); } portal_api_database_proxy.prototype.poll_for_result = function (p_workable_id, p_time_out, p_callback, p_error_callback) { if (this.poll_for_result && this.poll_for_result.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'database_proxy.poll_for_result' }; if (p_workable_id !== undefined) l_dict.workable_id = p_workable_id if (p_time_out !== undefined) l_dict.time_out = p_time_out return this.m_parent.server_call(this, "database_proxy/poll_for_result", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * dataconnector API */ function portal_api_dataconnector(p_parent) { this.m_parent = p_parent; } portal_api_dataconnector.prototype.custom_function = function (p_data_connector, p_function, p_parameters, p_options, p_callback, p_error_callback) { if (this.custom_function && this.custom_function.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.custom_function' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_function !== undefined) l_dict.function = p_function if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/custom_function", l_dict, p_callback, p_error_callback); } portal_api_dataconnector.prototype.get = function (p_data_connector, p_table, p_record_id, p_options, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.get' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_table !== undefined) l_dict.table = p_table if (p_record_id !== undefined) l_dict.record_id = p_record_id if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/get", l_dict, p_callback, p_error_callback); } portal_api_dataconnector.prototype.get_all_table_names = function (p_data_connector, p_options, p_callback, p_error_callback) { if (this.get_all_table_names && this.get_all_table_names.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.get_all_table_names' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/get_all_table_names", l_dict, p_callback, p_error_callback); } portal_api_dataconnector.prototype.list = function (p_data_connector, p_table, p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.list' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_table !== undefined) l_dict.table = p_table if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/list", l_dict, p_callback, p_error_callback); } portal_api_dataconnector.prototype.list_hql = function (p_data_connector, p_table, p_hql_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_hql && this.list_hql.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.list_hql' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_table !== undefined) l_dict.table = p_table if (p_hql_query !== undefined) l_dict.hql_query = p_hql_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/list_hql", l_dict, p_callback, p_error_callback); } portal_api_dataconnector.prototype.update = function (p_data_connector, p_table, p_record_data, p_options, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'dataconnector.update' }; if (p_data_connector !== undefined) l_dict.data_connector = p_data_connector if (p_table !== undefined) l_dict.table = p_table if (p_record_data !== undefined) l_dict.record_data = p_record_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "dataconnector/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * xls API */ function portal_api_xls(p_parent) { this.m_parent = p_parent; } portal_api_xls.prototype.get_cell = function (p_file, p_sheet, p_cellname, p_callback, p_error_callback) { if (this.get_cell && this.get_cell.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xls.get_cell' }; if (p_file !== undefined) l_dict.file = p_file if (p_sheet !== undefined) l_dict.sheet = p_sheet if (p_cellname !== undefined) l_dict.cellname = p_cellname return this.m_parent.server_call(this, "xls/get_cell", l_dict, p_callback, p_error_callback); } portal_api_xls.prototype.to_json = function (p_excel_data, p_options, p_callback, p_error_callback) { if (this.to_json && this.to_json.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xls.to_json' }; if (p_excel_data !== undefined) l_dict.excel_data = p_excel_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xls/to_json", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * xml API */ function portal_api_xml(p_parent) { this.m_parent = p_parent; } portal_api_xml.prototype.transform = function (p_xml_data, p_transformation_url, p_options, p_callback, p_error_callback) { if (this.transform && this.transform.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xml.transform' }; if (p_xml_data !== undefined) l_dict.xml_data = p_xml_data if (p_transformation_url !== undefined) l_dict.transformation_url = p_transformation_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xml/transform", l_dict, p_callback, p_error_callback); } portal_api_xml.prototype.update = function (p_xml_data, p_updates, p_options, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xml.update' }; if (p_xml_data !== undefined) l_dict.xml_data = p_xml_data if (p_updates !== undefined) l_dict.updates = p_updates if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xml/update", l_dict, p_callback, p_error_callback); } portal_api_xml.prototype.xml_to_json = function (p_xml_data, p_xml_template, p_strip_whitespace, p_callback, p_error_callback) { if (this.xml_to_json && this.xml_to_json.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xml.xml_to_json' }; if (p_xml_data !== undefined) l_dict.xml_data = p_xml_data if (p_xml_template !== undefined) l_dict.xml_template = p_xml_template if (p_strip_whitespace !== undefined) l_dict.strip_whitespace = p_strip_whitespace return this.m_parent.server_call(this, "xml/xml_to_json", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * len API */ function portal_api_len(p_parent) { this.m_parent = p_parent; } portal_api_len.prototype.to_tiff = function (p_len, p_tiff, p_options, p_callback, p_error_callback) { if (this.to_tiff && this.to_tiff.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'len.to_tiff' }; if (p_len !== undefined) l_dict.len = p_len if (p_tiff !== undefined) l_dict.tiff = p_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "len/to_tiff", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tiff API */ function portal_api_tiff(p_parent) { this.m_parent = p_parent; } portal_api_tiff.prototype.to_bmp = function (p_tiff, p_bmp, p_options, p_callback, p_error_callback) { if (this.to_bmp && this.to_bmp.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.to_bmp' }; if (p_tiff !== undefined) l_dict.tiff = p_tiff if (p_bmp !== undefined) l_dict.bmp = p_bmp if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/to_bmp", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.to_pdf = function (p_tiff, p_pdf, p_options, p_callback, p_error_callback) { if (this.to_pdf && this.to_pdf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.to_pdf' }; if (p_tiff !== undefined) l_dict.tiff = p_tiff if (p_pdf !== undefined) l_dict.pdf = p_pdf if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/to_pdf", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.merge = function (p_in_tiff1, p_in_tiff2, p_out_tiff, p_options, p_callback, p_error_callback) { if (this.merge && this.merge.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.merge' }; if (p_in_tiff1 !== undefined) l_dict.in_tiff1 = p_in_tiff1 if (p_in_tiff2 !== undefined) l_dict.in_tiff2 = p_in_tiff2 if (p_out_tiff !== undefined) l_dict.out_tiff = p_out_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/merge", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.autoCrop = function (p_in_tiff, p_out_tiff, p_options, p_callback, p_error_callback) { if (this.autoCrop && this.autoCrop.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.autoCrop' }; if (p_in_tiff !== undefined) l_dict.in_tiff = p_in_tiff if (p_out_tiff !== undefined) l_dict.out_tiff = p_out_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/autoCrop", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.resample = function (p_in_tiff, p_out_tiff, p_options, p_callback, p_error_callback) { if (this.resample && this.resample.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.resample' }; if (p_in_tiff !== undefined) l_dict.in_tiff = p_in_tiff if (p_out_tiff !== undefined) l_dict.out_tiff = p_out_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/resample", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.get_rip_parameters = function (p_file, p_options, p_callback, p_error_callback) { if (this.get_rip_parameters && this.get_rip_parameters.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.get_rip_parameters' }; if (p_file !== undefined) l_dict.file = p_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/get_rip_parameters", l_dict, p_callback, p_error_callback); } portal_api_tiff.prototype.deform = function (p_files, p_out_tiff, p_options, p_callback, p_error_callback) { if (this.deform && this.deform.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tiff.deform' }; if (p_files !== undefined) l_dict.files = p_files if (p_out_tiff !== undefined) l_dict.out_tiff = p_out_tiff if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tiff/deform", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * hell_gravure API */ function portal_api_hell_gravure(p_parent) { this.m_parent = p_parent; } portal_api_hell_gravure.prototype.create_heliodisk_jobticket = function (p_files, p_pro, p_options, p_callback, p_error_callback) { if (this.create_heliodisk_jobticket && this.create_heliodisk_jobticket.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'hell_gravure.create_heliodisk_jobticket' }; if (p_files !== undefined) l_dict.files = p_files if (p_pro !== undefined) l_dict.pro = p_pro if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "hell_gravure/create_heliodisk_jobticket", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * share API */ function portal_api_share(p_parent) { this.m_parent = p_parent; } portal_api_share.prototype.get_status = function (p_callback, p_error_callback) { if (this.get_status && this.get_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'share.get_status' }; return this.m_parent.server_call(this, "share/get_status", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * site API */ function portal_api_site(p_parent) { this.m_parent = p_parent; } portal_api_site.prototype.add = function (p_url, p_admin_name, p_admin_password, p_callback, p_error_callback) { if (this.add && this.add.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.add' }; if (p_url !== undefined) l_dict.url = p_url if (p_admin_name !== undefined) l_dict.admin_name = p_admin_name if (p_admin_password !== undefined) l_dict.admin_password = p_admin_password return this.m_parent.server_call(this, "site/add", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.cancel_sync = function (p_cloudflow_url, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.cancel_sync && this.cancel_sync.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.cancel_sync' }; if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/cancel_sync", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.check_deleted_files = function (p_urls, p_callback, p_error_callback) { if (this.check_deleted_files && this.check_deleted_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.check_deleted_files' }; if (p_urls !== undefined) l_dict.urls = p_urls return this.m_parent.server_call(this, "site/check_deleted_files", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.check_files = function (p_files, p_time, p_share_version, p_update_asset, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.check_files && this.check_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.check_files' }; if (p_files !== undefined) l_dict.files = p_files if (p_time !== undefined) l_dict.time = p_time if (p_share_version !== undefined) l_dict.share_version = p_share_version if (p_update_asset !== undefined) l_dict.update_asset = p_update_asset if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/check_files", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.execute = function (p_site, p_method_name, p_parameters, p_options, p_callback, p_error_callback) { if (this.execute && this.execute.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.execute' }; if (p_site !== undefined) l_dict.site = p_site if (p_method_name !== undefined) l_dict.method_name = p_method_name if (p_parameters !== undefined) l_dict.parameters = p_parameters if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "site/execute", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.finish_update_file = function (p_cloudflow_url, p_source_url, p_md5, p_md5_ad, p_data_type, p_apple_double, p_mod_time, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.finish_update_file && this.finish_update_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.finish_update_file' }; if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url if (p_source_url !== undefined) l_dict.source_url = p_source_url if (p_md5 !== undefined) l_dict.md5 = p_md5 if (p_md5_ad !== undefined) l_dict.md5_ad = p_md5_ad if (p_data_type !== undefined) l_dict.data_type = p_data_type if (p_apple_double !== undefined) l_dict.apple_double = p_apple_double if (p_mod_time !== undefined) l_dict.mod_time = p_mod_time if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/finish_update_file", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.init_send_file = function (p_cloudflow_url, p_md5, p_md5_ad, p_file_size, p_callback, p_error_callback) { if (this.init_send_file && this.init_send_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.init_send_file' }; if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url if (p_md5 !== undefined) l_dict.md5 = p_md5 if (p_md5_ad !== undefined) l_dict.md5_ad = p_md5_ad if (p_file_size !== undefined) l_dict.file_size = p_file_size return this.m_parent.server_call(this, "site/init_send_file", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.init_sync = function (p_cloudflow_url, p_md5, p_md5_ad, p_file_size, p_block_size, p_data_type, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.init_sync && this.init_sync.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.init_sync' }; if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url if (p_md5 !== undefined) l_dict.md5 = p_md5 if (p_md5_ad !== undefined) l_dict.md5_ad = p_md5_ad if (p_file_size !== undefined) l_dict.file_size = p_file_size if (p_block_size !== undefined) l_dict.block_size = p_block_size if (p_data_type !== undefined) l_dict.data_type = p_data_type if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/init_sync", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.get_changes = function (p_sync_spec_name, p_mapping_id, p_time, p_last_check, p_sender_site, p_share_version, p_sprint_major, p_sprint_minor, p_sprint_update, p_signature, p_callback, p_error_callback) { if (this.get_changes && this.get_changes.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.get_changes' }; if (p_sync_spec_name !== undefined) l_dict.sync_spec_name = p_sync_spec_name if (p_mapping_id !== undefined) l_dict.mapping_id = p_mapping_id if (p_time !== undefined) l_dict.time = p_time if (p_last_check !== undefined) l_dict.last_check = p_last_check if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site if (p_share_version !== undefined) l_dict.share_version = p_share_version if (p_sprint_major !== undefined) l_dict.sprint_major = p_sprint_major if (p_sprint_minor !== undefined) l_dict.sprint_minor = p_sprint_minor if (p_sprint_update !== undefined) l_dict.sprint_update = p_sprint_update if (p_signature !== undefined) l_dict.signature = p_signature return this.m_parent.server_call(this, "site/get_changes", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.get_changed_mappings = function (p_last_check, p_sender_site, p_callback, p_error_callback) { if (this.get_changed_mappings && this.get_changed_mappings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.get_changed_mappings' }; if (p_last_check !== undefined) l_dict.last_check = p_last_check if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/get_changed_mappings", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.list = function (p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.list' }; return this.m_parent.server_call(this, "site/list", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.list_files = function (p_sync_spec_name, p_mapping_id, p_time, p_share_version, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.list_files && this.list_files.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.list_files' }; if (p_sync_spec_name !== undefined) l_dict.sync_spec_name = p_sync_spec_name if (p_mapping_id !== undefined) l_dict.mapping_id = p_mapping_id if (p_time !== undefined) l_dict.time = p_time if (p_share_version !== undefined) l_dict.share_version = p_share_version if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/list_files", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.prepare_update_file = function (p_cloudflow_url, p_data_size, p_reuse_blocks, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.prepare_update_file && this.prepare_update_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.prepare_update_file' }; if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url if (p_data_size !== undefined) l_dict.data_size = p_data_size if (p_reuse_blocks !== undefined) l_dict.reuse_blocks = p_reuse_blocks if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/prepare_update_file", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.register = function (p_sites, p_signature, p_sender_site, p_callback, p_error_callback) { if (this.register && this.register.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.register' }; if (p_sites !== undefined) l_dict.sites = p_sites if (p_signature !== undefined) l_dict.signature = p_signature if (p_sender_site !== undefined) l_dict.sender_site = p_sender_site return this.m_parent.server_call(this, "site/register", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.remove_file_or_folder = function (p_url, p_callback, p_error_callback) { if (this.remove_file_or_folder && this.remove_file_or_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.remove_file_or_folder' }; if (p_url !== undefined) l_dict.url = p_url return this.m_parent.server_call(this, "site/remove_file_or_folder", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.request_session = function (p_site, p_user_name, p_options, p_callback, p_error_callback) { if (this.request_session && this.request_session.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.request_session' }; if (p_site !== undefined) l_dict.site = p_site if (p_user_name !== undefined) l_dict.user_name = p_user_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "site/request_session", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.sync_file_with_options = function (p_source_site, p_source_url, p_target_site, p_target_url, p_options, p_callback, p_error_callback) { if (this.sync_file_with_options && this.sync_file_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.sync_file_with_options' }; if (p_source_site !== undefined) l_dict.source_site = p_source_site if (p_source_url !== undefined) l_dict.source_url = p_source_url if (p_target_site !== undefined) l_dict.target_site = p_target_site if (p_target_url !== undefined) l_dict.target_url = p_target_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "site/sync_file_with_options", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.sync_file = function (p_source_site, p_source_url, p_target_site, p_target_url, p_callback, p_error_callback) { if (this.sync_file && this.sync_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.sync_file' }; if (p_source_site !== undefined) l_dict.source_site = p_source_site if (p_source_url !== undefined) l_dict.source_url = p_source_url if (p_target_site !== undefined) l_dict.target_site = p_target_site if (p_target_url !== undefined) l_dict.target_url = p_target_url return this.m_parent.server_call(this, "site/sync_file", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.sync_folder = function (p_source_site, p_source_url, p_target_site, p_target_url, p_options, p_callback, p_error_callback) { if (this.sync_folder && this.sync_folder.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.sync_folder' }; if (p_source_site !== undefined) l_dict.source_site = p_source_site if (p_source_url !== undefined) l_dict.source_url = p_source_url if (p_target_site !== undefined) l_dict.target_site = p_target_site if (p_target_url !== undefined) l_dict.target_url = p_target_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "site/sync_folder", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.setup = function (p_site, p_callback, p_error_callback) { if (this.setup && this.setup.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.setup' }; if (p_site !== undefined) l_dict.site = p_site return this.m_parent.server_call(this, "site/setup", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.unlink = function (p_site_name, p_callback, p_error_callback) { if (this.unlink && this.unlink.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.unlink' }; if (p_site_name !== undefined) l_dict.site_name = p_site_name return this.m_parent.server_call(this, "site/unlink", l_dict, p_callback, p_error_callback); } portal_api_site.prototype.watch_file = function (p_syncspec, p_mapping_id, p_cloudflow_url, p_callback, p_error_callback) { if (this.watch_file && this.watch_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'site.watch_file' }; if (p_syncspec !== undefined) l_dict.syncspec = p_syncspec if (p_mapping_id !== undefined) l_dict.mapping_id = p_mapping_id if (p_cloudflow_url !== undefined) l_dict.cloudflow_url = p_cloudflow_url return this.m_parent.server_call(this, "site/watch_file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * syncspec API */ function portal_api_syncspec(p_parent) { this.m_parent = p_parent; } portal_api_syncspec.prototype.clean_up_after_removal = function (p_spec, p_mapping, p_callback, p_error_callback) { if (this.clean_up_after_removal && this.clean_up_after_removal.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.clean_up_after_removal' }; if (p_spec !== undefined) l_dict.spec = p_spec if (p_mapping !== undefined) l_dict.mapping = p_mapping return this.m_parent.server_call(this, "syncspec/clean_up_after_removal", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "syncspec/create", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "syncspec/list", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "syncspec/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "syncspec/get", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.delete = function (p_spec, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.delete' }; if (p_spec !== undefined) l_dict.spec = p_spec return this.m_parent.server_call(this, "syncspec/delete", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.add_mapping = function (p_spec, p_mapping, p_callback, p_error_callback) { if (this.add_mapping && this.add_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.add_mapping' }; if (p_spec !== undefined) l_dict.spec = p_spec if (p_mapping !== undefined) l_dict.mapping = p_mapping return this.m_parent.server_call(this, "syncspec/add_mapping", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.remove_mapping = function (p_spec, p_mapping, p_callback, p_error_callback) { if (this.remove_mapping && this.remove_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.remove_mapping' }; if (p_spec !== undefined) l_dict.spec = p_spec if (p_mapping !== undefined) l_dict.mapping = p_mapping return this.m_parent.server_call(this, "syncspec/remove_mapping", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.remove_file_mapping = function (p_spec, p_source_site, p_source_url, p_callback, p_error_callback) { if (this.remove_file_mapping && this.remove_file_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.remove_file_mapping' }; if (p_spec !== undefined) l_dict.spec = p_spec if (p_source_site !== undefined) l_dict.source_site = p_source_site if (p_source_url !== undefined) l_dict.source_url = p_source_url return this.m_parent.server_call(this, "syncspec/remove_file_mapping", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "syncspec/update", l_dict, p_callback, p_error_callback); } portal_api_syncspec.prototype.update_mapping = function (p_spec, p_name, p_changes, p_callback, p_error_callback) { if (this.update_mapping && this.update_mapping.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'syncspec.update_mapping' }; if (p_spec !== undefined) l_dict.spec = p_spec if (p_name !== undefined) l_dict.name = p_name if (p_changes !== undefined) l_dict.changes = p_changes return this.m_parent.server_call(this, "syncspec/update_mapping", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * proofscope API */ function portal_api_proofscope(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * proofscope.variant API */ function portal_api_proofscope_variant(p_parent) { this.m_parent = p_parent; } portal_api_proofscope_variant.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/count", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/variant/create", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/variant/delete", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "proofscope/variant/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "proofscope/variant/get", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "proofscope/variant/list", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "proofscope/variant/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "proofscope/variant/set_keys", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "proofscope/variant/update", l_dict, p_callback, p_error_callback); } portal_api_proofscope_variant.prototype.extract = function (p_pdf_url, p_options, p_callback, p_error_callback) { if (this.extract && this.extract.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'proofscope.variant.extract' }; if (p_pdf_url !== undefined) l_dict.pdf_url = p_pdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "proofscope/variant/extract", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * agent API */ function portal_api_agent(p_parent) { this.m_parent = p_parent; } portal_api_agent.prototype.initiate_pairing = function (p_agent_id, p_pairing_id, p_public_key, p_options, p_callback, p_error_callback) { if (this.initiate_pairing && this.initiate_pairing.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.initiate_pairing' }; if (p_agent_id !== undefined) l_dict.agent_id = p_agent_id if (p_pairing_id !== undefined) l_dict.pairing_id = p_pairing_id if (p_public_key !== undefined) l_dict.public_key = p_public_key if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "agent/initiate_pairing", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.change_pairing_status = function (p_agent_id, p_change, p_options, p_callback, p_error_callback) { if (this.change_pairing_status && this.change_pairing_status.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.change_pairing_status' }; if (p_agent_id !== undefined) l_dict.agent_id = p_agent_id if (p_change !== undefined) l_dict.change = p_change if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "agent/change_pairing_status", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "agent/create", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "agent/delete", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "agent/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "agent/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "agent/get", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "agent/list", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "agent/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_agent.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'agent.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "agent/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * colorspace API */ function portal_api_colorspace(p_parent) { this.m_parent = p_parent; } portal_api_colorspace.prototype.import_ccf = function (p_ccf_url, p_options, p_callback, p_error_callback) { if (this.import_ccf && this.import_ccf.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.import_ccf' }; if (p_ccf_url !== undefined) l_dict.ccf_url = p_ccf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/import_ccf", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.remove_configuration = function (p_configuration_name, p_options, p_callback, p_error_callback) { if (this.remove_configuration && this.remove_configuration.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.remove_configuration' }; if (p_configuration_name !== undefined) l_dict.configuration_name = p_configuration_name if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/remove_configuration", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.export_settings = function (p_ccf_url, p_options, p_callback, p_error_callback) { if (this.export_settings && this.export_settings.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.export_settings' }; if (p_ccf_url !== undefined) l_dict.ccf_url = p_ccf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/export_settings", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.save_support_data = function (p_gz_url, p_options, p_callback, p_error_callback) { if (this.save_support_data && this.save_support_data.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.save_support_data' }; if (p_gz_url !== undefined) l_dict.gz_url = p_gz_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/save_support_data", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.spot_color_report = function (p_pdf_url, p_options, p_callback, p_error_callback) { if (this.spot_color_report && this.spot_color_report.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.spot_color_report' }; if (p_pdf_url !== undefined) l_dict.pdf_url = p_pdf_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/spot_color_report", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.process = function (p_pdf_url, p_output_file, p_options, p_callback, p_error_callback) { if (this.process && this.process.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.process' }; if (p_pdf_url !== undefined) l_dict.pdf_url = p_pdf_url if (p_output_file !== undefined) l_dict.output_file = p_output_file if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/process", l_dict, p_callback, p_error_callback); } portal_api_colorspace.prototype.save_colorspace_image_to_file = function (p_url, p_image_url, p_options, p_callback, p_error_callback) { if (this.save_colorspace_image_to_file && this.save_colorspace_image_to_file.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.save_colorspace_image_to_file' }; if (p_url !== undefined) l_dict.url = p_url if (p_image_url !== undefined) l_dict.image_url = p_image_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/save_colorspace_image_to_file", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * colorspace.configuration API */ function portal_api_colorspace_configuration(p_parent) { this.m_parent = p_parent; } portal_api_colorspace_configuration.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "colorspace/configuration/create", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "colorspace/configuration/delete", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "colorspace/configuration/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/configuration/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "colorspace/configuration/get", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "colorspace/configuration/list", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "colorspace/configuration/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_colorspace_configuration.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'colorspace.configuration.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "colorspace/configuration/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * xliff API */ function portal_api_xliff(p_parent) { this.m_parent = p_parent; } portal_api_xliff.prototype.from_json = function (p_json_data, p_xliff_url, p_options, p_callback, p_error_callback) { if (this.from_json && this.from_json.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xliff.from_json' }; if (p_json_data !== undefined) l_dict.json_data = p_json_data if (p_xliff_url !== undefined) l_dict.xliff_url = p_xliff_url if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xliff/from_json", l_dict, p_callback, p_error_callback); } portal_api_xliff.prototype.scan_document = function (p_dbo_url, p_xliff_url, p_source_language, p_options, p_callback, p_error_callback) { if (this.scan_document && this.scan_document.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xliff.scan_document' }; if (p_dbo_url !== undefined) l_dict.dbo_url = p_dbo_url if (p_xliff_url !== undefined) l_dict.xliff_url = p_xliff_url if (p_source_language !== undefined) l_dict.source_language = p_source_language if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xliff/scan_document", l_dict, p_callback, p_error_callback); } portal_api_xliff.prototype.to_json = function (p_xml_data, p_options, p_callback, p_error_callback) { if (this.to_json && this.to_json.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xliff.to_json' }; if (p_xml_data !== undefined) l_dict.xml_data = p_xml_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xliff/to_json", l_dict, p_callback, p_error_callback); } portal_api_xliff.prototype.update_document = function (p_dbo_url, p_xliff_url, p_source_language, p_target_language, p_options, p_callback, p_error_callback) { if (this.update_document && this.update_document.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'xliff.update_document' }; if (p_dbo_url !== undefined) l_dict.dbo_url = p_dbo_url if (p_xliff_url !== undefined) l_dict.xliff_url = p_xliff_url if (p_source_language !== undefined) l_dict.source_language = p_source_language if (p_target_language !== undefined) l_dict.target_language = p_target_language if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "xliff/update_document", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * stats API */ function portal_api_stats(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * stats.active_users API */ function portal_api_stats_active_users(p_parent) { this.m_parent = p_parent; } portal_api_stats_active_users.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.active_users.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "stats/active_users/list", l_dict, p_callback, p_error_callback); } portal_api_stats_active_users.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.active_users.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "stats/active_users/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * stats.database API */ function portal_api_stats_database(p_parent) { this.m_parent = p_parent; } portal_api_stats_database.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.database.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "stats/database/list", l_dict, p_callback, p_error_callback); } portal_api_stats_database.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.database.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "stats/database/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * stats.workers API */ function portal_api_stats_workers(p_parent) { this.m_parent = p_parent; } portal_api_stats_workers.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.workers.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "stats/workers/list", l_dict, p_callback, p_error_callback); } portal_api_stats_workers.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.workers.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "stats/workers/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * stats.work_servers API */ function portal_api_stats_work_servers(p_parent) { this.m_parent = p_parent; } portal_api_stats_work_servers.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.work_servers.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "stats/work_servers/list", l_dict, p_callback, p_error_callback); } portal_api_stats_work_servers.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'stats.work_servers.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "stats/work_servers/list_with_options", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tectonics API */ function portal_api_tectonics(p_parent) { this.m_parent = p_parent; } /*************************************************************************************************************************************** * tectonics.cutoff API */ function portal_api_tectonics_cutoff(p_parent) { this.m_parent = p_parent; } portal_api_tectonics_cutoff.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/cutoff/count", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/cutoff/create", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/cutoff/delete", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "tectonics/cutoff/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/cutoff/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/cutoff/get", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tectonics/cutoff/list", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/cutoff/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "tectonics/cutoff/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/cutoff/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "tectonics/cutoff/set_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/cutoff/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_cutoff.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.cutoff.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/cutoff/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tectonics.plate API */ function portal_api_tectonics_plate(p_parent) { this.m_parent = p_parent; } portal_api_tectonics_plate.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/plate/count", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/plate/create", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/plate/delete", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "tectonics/plate/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/plate/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/plate/get", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tectonics/plate/list", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/plate/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "tectonics/plate/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/plate/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "tectonics/plate/set_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/plate/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_plate.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.plate.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/plate/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tectonics.queue API */ function portal_api_tectonics_queue(p_parent) { this.m_parent = p_parent; } portal_api_tectonics_queue.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/queue/count", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/queue/create", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/queue/delete", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "tectonics/queue/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/queue/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/queue/get", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tectonics/queue/list", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/queue/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "tectonics/queue/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/queue/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "tectonics/queue/set_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/queue/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_queue.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.queue.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/queue/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * tectonics.sheets API */ function portal_api_tectonics_sheets(p_parent) { this.m_parent = p_parent; } portal_api_tectonics_sheets.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/sheets/count", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/sheets/create", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/sheets/delete", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "tectonics/sheets/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/sheets/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "tectonics/sheets/get", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "tectonics/sheets/list", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/sheets/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "tectonics/sheets/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/sheets/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "tectonics/sheets/set_keys", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "tectonics/sheets/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_tectonics_sheets.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'tectonics.sheets.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "tectonics/sheets/update", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * contentmanager API */ function portal_api_contentmanager(p_parent) { this.m_parent = p_parent; } portal_api_contentmanager.prototype.count = function (p_query, p_options, p_callback, p_error_callback) { if (this.count && this.count.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.count' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/count", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.create = function (p_data, p_callback, p_error_callback) { if (this.create && this.create.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.create' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "contentmanager/create", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.delete = function (p_id, p_callback, p_error_callback) { if (this.delete && this.delete.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.delete' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "contentmanager/delete", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.delete_multiple = function (p_ids, p_callback, p_error_callback) { if (this.delete_multiple && this.delete_multiple.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.delete_multiple' }; if (p_ids !== undefined) l_dict.ids = p_ids return this.m_parent.server_call(this, "contentmanager/delete_multiple", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.delete_by_query = function (p_query, p_options, p_callback, p_error_callback) { if (this.delete_by_query && this.delete_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.delete_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/delete_by_query", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.get = function (p_id, p_callback, p_error_callback) { if (this.get && this.get.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.get' }; if (p_id !== undefined) l_dict.id = p_id return this.m_parent.server_call(this, "contentmanager/get", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "contentmanager/list", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/list_with_options", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.remove_keys = function (p_id, p_keys, p_callback, p_error_callback) { if (this.remove_keys && this.remove_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.remove_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_keys !== undefined) l_dict.keys = p_keys return this.m_parent.server_call(this, "contentmanager/remove_keys", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.remove_keys_by_query = function (p_query, p_keys, p_options, p_callback, p_error_callback) { if (this.remove_keys_by_query && this.remove_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.remove_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_keys !== undefined) l_dict.keys = p_keys if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/remove_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.set_keys = function (p_id, p_key_data, p_callback, p_error_callback) { if (this.set_keys && this.set_keys.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.set_keys' }; if (p_id !== undefined) l_dict.id = p_id if (p_key_data !== undefined) l_dict.key_data = p_key_data return this.m_parent.server_call(this, "contentmanager/set_keys", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.set_keys_by_query = function (p_query, p_key_data, p_options, p_callback, p_error_callback) { if (this.set_keys_by_query && this.set_keys_by_query.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.set_keys_by_query' }; if (p_query !== undefined) l_dict.query = p_query if (p_key_data !== undefined) l_dict.key_data = p_key_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/set_keys_by_query", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.update = function (p_data, p_callback, p_error_callback) { if (this.update && this.update.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.update' }; if (p_data !== undefined) l_dict.data = p_data return this.m_parent.server_call(this, "contentmanager/update", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.export_gs1 = function (p_gs1_data, p_options, p_callback, p_error_callback) { if (this.export_gs1 && this.export_gs1.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.export_gs1' }; if (p_gs1_data !== undefined) l_dict.gs1_data = p_gs1_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/export_gs1", l_dict, p_callback, p_error_callback); } portal_api_contentmanager.prototype.import_gs1 = function (p_gs1_data, p_options, p_callback, p_error_callback) { if (this.import_gs1 && this.import_gs1.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'contentmanager.import_gs1' }; if (p_gs1_data !== undefined) l_dict.gs1_data = p_gs1_data if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "contentmanager/import_gs1", l_dict, p_callback, p_error_callback); } /*************************************************************************************************************************************** * webtrace API */ function portal_api_webtrace(p_parent) { this.m_parent = p_parent; } portal_api_webtrace.prototype.list = function (p_query, p_fields, p_callback, p_error_callback) { if (this.list && this.list.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'webtrace.list' }; if (p_query !== undefined) l_dict.query = p_query if (p_fields !== undefined) l_dict.fields = p_fields return this.m_parent.server_call(this, "webtrace/list", l_dict, p_callback, p_error_callback); } portal_api_webtrace.prototype.list_with_options = function (p_query, p_order_by, p_fields, p_options, p_callback, p_error_callback) { if (this.list_with_options && this.list_with_options.length < arguments.length) { console.error("Too many arguments") } var l_dict = { method: 'webtrace.list_with_options' }; if (p_query !== undefined) l_dict.query = p_query if (p_order_by !== undefined) l_dict.order_by = p_order_by if (p_fields !== undefined) l_dict.fields = p_fields if (p_options !== undefined) l_dict.options = p_options return this.m_parent.server_call(this, "webtrace/list_with_options", l_dict, p_callback, p_error_callback); } function portal_api_frame(p_parent) { this.m_parent = p_parent; } function portal_api_frame_os(p_parent) { this.m_parent = p_parent; this.m_promise = false; } portal_api_frame_os.prototype.get = function (pOptions) { var parent = this.m_parent; var forceVersion = pOptions !== undefined && pOptions !== null && pOptions.forceVersion === true; if (this.m_promise === false) { // Not loaded yet, load frame this.m_promise = $.Deferred(function (pDefer) { function getVersion() { var versionObject = undefined; if (typeof sessionStorage !== "undefined") { var versionCache = sessionStorage.getItem("nixps_cloudflow_version"); if (typeof versionCache === "string" && versionCache.length > 0) { try { var versionObjectCache = JSON.parse(versionCache); if (versionObjectCache && versionObjectCache.object && typeof versionObjectCache.object === "object") { versionObject = versionObjectCache.object; } }catch(e){} } } if (versionObject) { return Promise.resolve(versionObject); } return api_defer.portal.version(); } /** * Returns a promise that resolves in case that the Cloudflow version is compatible with Frame */ function isCompatible (pCompatibleCloudflowVersion) { return getVersion().then(function (pResult) { var cloudflowMajor = pResult.major; var cloudflowMinor = pResult.minor; var cloudflowVersion = cloudflowMajor * 100 + cloudflowMinor; if (cloudflowVersion >= pCompatibleCloudflowVersion) { return {}; } else { return Promise.reject({ error_code: "cloudflow_version_incompatible_with_frame", error: 'The running Cloudflow is not compatible with Frame, need at least' + pCompatibleCloudflowVersion }); } }); } var headers = { // "Access-Control-Request-Private-Network" : "true" }; /** // new code that will replace $.ajax call new Promise(function(pResolve, pReject){ var apiBootstrapScriptDOM = document.createElement("script"); apiBootstrapScriptDOM.onerror = function(pError){ console.error("failed loading apu_bootstrap script", pError); pReject({ messages: [{ type: 'Could not install the frame functions', description: 'Could not install the frame functions', severity: 'error' }] }); }; apiBootstrapScriptDOM.onload = function(){ pResolve(); }; apiBootstrapScriptDOM.setAttribute("src", "http://127.0.0.1:9091/frameCGI/frame.cgi/frame/os/get_api_bootstrap"); document.head.appendChild(apiBootstrapScriptDOM); }); **/ $.ajax({ type: "POST", url: "http://127.0.0.1:9091/frameCGI/frame.cgi/frame/os/get_api_bootstrap", contentType: "text/plain; charset=UTF-8", data: JSON.stringify({method: "frame.os.get_api_bootstrap"}), headers: headers }).then(function (responseText) { var bootSetup = responseText; if (bootSetup.javascript === undefined) { pDefer.reject({ error_code: "missing_bootstrap_javascript", error: 'Could not retrieve the bootstrap javascript' }); } var tryInstall = function () { try { var install = new Function(bootSetup.javascript); install() } catch (error) { console.log(error); // Reject with an error message that can be shown in the UI pDefer.reject({ messages: [{ type: 'Could not install the frame functions', description: 'Could not install the frame functions', severity: 'error' }] }); } }; // In case we want to force the incompatible version if (forceVersion) { tryInstall(); pDefer.resolve(parent); return; } var compatibleCloudflowVersion = bootSetup.compatibleCloudflowVersion if (compatibleCloudflowVersion !== undefined) { isCompatible(compatibleCloudflowVersion).then(function () { tryInstall(); pDefer.resolve(parent); }, function (error) { pDefer.reject(error); }); } else { tryInstall(); pDefer.resolve(parent); } }).fail(function (error) { // Reject with an error message that can be shown in the UI pDefer.reject({ error_code: "frame_not_running", messages: [{ type: 'frame os not running', description: 'Plug-in Suite Desktop Service is not running', severity: 'error' }] }); }); }); } return this.m_promise; } function portal_api_frame_host(p_parent) { this.m_parent = p_parent; } // #29894: This function is used only to bootstrap the Illustrator Javascript library. // After the javascript is loaded, the portal_api_frame_host is replaced with another object // If methods are added to this object here, they will be lost when the Illustrator library is loaded. portal_api_frame_host.prototype.get = function (pHost, pOptions) { var parent = this.m_parent; var output = new Promise(function(pResolve, pReject) { if (window.frameHostLoader === undefined) { pReject({ error_code: "missing_include", error: 'Frame Host: asking for a host handle without including the frame Javascript' }); return; } var forceVersion = !!(pOptions && pOptions.forceVersion === true); window.frameHostLoader.get(pHost, parent, forceVersion).then(pResolve, pReject); }); if (window.$) { return $.when(output); } return output; } var api_util = {}; api_util.get_cookie = function (p_key) { var mayAccessCookies; try { typeof document.cookie; mayAccessCookies = true; } catch(e){ mayAccessCookies = false; } if (mayAccessCookies === false) { return null; } var result = new RegExp('(?:^|; )' + encodeURIComponent(p_key) + '=([^;]*)').exec(document.cookie); if (result !== null) { return decodeURIComponent(result[1]); } return null; } api_util.set_cookie = function (p_key, p_value, p_options) { var options = Object.assign({ expires: undefined, path: "/", secure: document.location.protocol === "https:", samesite: "Strict" }, p_options); if (p_value === null) { options.expires = -1; } if (typeof options.expires === "number") { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } var cookieString = encodeURIComponent(p_key) + "=" + encodeURIComponent(String(p_value)); cookieString += options.expires ? "; expires=" + options.expires.toUTCString() : ""; cookieString += options.path ? "; path=" + options.path : ""; cookieString += options.domain ? "; domain=" + options.domain : ""; cookieString += options.samesite ? "; SameSite=" + options.samesite : ""; cookieString += options.secure ? "; secure" : ""; document.cookie = cookieString; } /*************************************************************************************************************************************** * Main API */ function portal_api_base() { // settings this.m_address = '/portal.cgi'; this.m_session = undefined; // modules this.account = new portal_api_account(this); this.agent = new portal_api_agent(this); this.approval = new portal_api_approval(this); this.archive = new portal_api_archive(this); this.asset = new portal_api_asset(this); this.assets = new portal_api_assets(this); this.attributes = new portal_api_attributes(this); this.auth = new portal_api_auth(this); this.bluecollardefinition = new portal_api_bluecollardefinition(this); this.braille = new portal_api_braille(this); this.bucket = new portal_api_bucket(this); this.calendar = new portal_api_calendar(this); this.colorspace = new portal_api_colorspace(this); this.colorspace.configuration = new portal_api_colorspace_configuration(this); this.config = new portal_api_config(this); this.contentmanager = new portal_api_contentmanager(this); this.csv = new portal_api_csv(this); this.curve = new portal_api_curve(this); this.custom_objects = new portal_api_custom_objects(this); this.database = new portal_api_database(this); this.database.collection = new portal_api_database_collection(this); this.database.document = new portal_api_database_document(this); this.database_proxy = new portal_api_database_proxy(this); this.dataconnector = new portal_api_dataconnector(this); this.email = new portal_api_email(this); this.estimation = new portal_api_estimation(this); this.file = new portal_api_file(this); this.file.json = new portal_api_file_json(this); this.file.text = new portal_api_file_text(this); this.folder = new portal_api_folder(this); this.form = new portal_api_form(this); this.hell_gravure = new portal_api_hell_gravure(this); this.hub = new portal_api_hub(this); this.ic3d = new portal_api_ic3d(this); this.jacket = new portal_api_jacket(this); this.job = new portal_api_job(this); this.job.resource = new portal_api_job_resource(this); this.layout = new portal_api_layout(this); this.len = new portal_api_len(this); this.license = new portal_api_license(this); this.localization = new portal_api_localization(this); this.logging = new portal_api_logging(this); this.logging.trace = new portal_api_logging_trace(this); this.metadata = new portal_api_metadata(this); this.network = new portal_api_network(this); this.notes = new portal_api_notes(this); this.output_device = new portal_api_output_device(this); this.pdf = new portal_api_pdf(this); this.portal = new portal_api_portal(this); this.preferences = new portal_api_preferences(this); this.preprocess = new portal_api_preprocess(this); this.printer = new portal_api_printer(this); this.printplanner = new portal_api_printplanner(this); this.project = new portal_api_project(this); this.project.resource = new portal_api_project_resource(this); this.proofscope = new portal_api_proofscope(this); this.proofscope.tile = new portal_api_proofscope_tile(this); this.proofscope.variant = new portal_api_proofscope_variant(this); this.proofscope.view = new portal_api_proofscope_view(this); this.registry = new portal_api_registry(this); this.registry.cfapp = new portal_api_registry_cfapp(this); this.request = new portal_api_request(this); this.resource = new portal_api_resource(this); this.rss = new portal_api_rss(this); this.scope = new portal_api_scope(this); this.scopes = new portal_api_scopes(this); this.screening = new portal_api_screening(this); this.screenpro = new portal_api_screenpro(this); this.share = new portal_api_share(this); this.site = new portal_api_site(this); this.stats = new portal_api_stats(this); this.stats.active_users = new portal_api_stats_active_users(this); this.stats.database = new portal_api_stats_database(this); this.stats.work_servers = new portal_api_stats_work_servers(this); this.stats.workers = new portal_api_stats_workers(this); this.subProcess = new portal_api_subProcess(this); this.syncspec = new portal_api_syncspec(this); this.tag = new portal_api_tag(this); this.task_list = new portal_api_task_list(this); this.team = new portal_api_team(this); this.tectonics = new portal_api_tectonics(this); this.tectonics.cutoff = new portal_api_tectonics_cutoff(this); this.tectonics.plate = new portal_api_tectonics_plate(this); this.tectonics.queue = new portal_api_tectonics_queue(this); this.tectonics.sheets = new portal_api_tectonics_sheets(this); this.template = new portal_api_template(this); this.templates = new portal_api_templates(this); this.tenant = new portal_api_tenant(this); this.tiff = new portal_api_tiff(this); this.users = new portal_api_users(this); this.utils = new portal_api_utils(this); this.utils.csv = new portal_api_utils_csv(this); this.utils.http = new portal_api_utils_http(this); this.utils.sql = new portal_api_utils_sql(this); this.utils.xml = new portal_api_utils_xml(this); this.valuecomposer = new portal_api_valuecomposer(this); this.webtrace = new portal_api_webtrace(this); this.whitepaper = new portal_api_whitepaper(this); this.whitepaper.hook = new portal_api_whitepaper_hook(this); this.workable = new portal_api_workable(this); this.xliff = new portal_api_xliff(this); this.xls = new portal_api_xls(this); this.xml = new portal_api_xml(this); this.xmp = new portal_api_xmp(this); this.frame = new portal_api_frame(this); this.frame.os = new portal_api_frame_os(this); this.frame.host = new portal_api_frame_host(this); } portal_api_base.prototype.set_session = function(pSession) { if (typeof pSession === "string" && pSession.length > 0) { api.m_session = pSession; api_sync.m_session = pSession; api_async.m_session = pSession; api_defer.m_session = pSession; } else if (pSession === null) { delete api.m_session; delete api_sync.m_session; delete api_async.m_session; delete api_defer.m_session; } } portal_api_base.prototype.get_session = function(pSession) { return api.m_session; } api_util.get_session = portal_api_base.prototype.get_session; portal_api_base.prototype.get_cookie = api_util.get_cookie; portal_api_base.prototype.set_cookie = api_util.set_cookie; portal_api_base.prototype.config_changed = function(p_type, p_data) {} portal_api_base.prototype.message = function(p_title, p_msg, p_id, p_may_close) {} portal_api_base.prototype.not_licensed = function() {} portal_api_base.prototype.session_expired = function() {} portal_api_base.prototype.session_expired_internal = function() { if (api.frame !== undefined && api.frame.host !== undefined && api.frame.host.eventManager !== undefined) { var regex = new RegExp('[?&]host(=([^&#]*)|&|#|$)'); var hostKey = regex.exec(window.location.href); if (hostKey !== null && typeof hostKey[2] === "string" && hostKey[2].length > 0) { api.frame.host.eventManager.fire('cloudflowSessionExpired', {}); return; } } if (typeof window.BroadcastChannel === "function") { var bc = new BroadcastChannel("nixps"); bc.postMessage({type: "nixps.session_expired", data: {}}); } portal_api_base.prototype.session_expired(); } portal_api_base.prototype.database_down = function() { document.location = '/database_down.html?orig=' + encodeURIComponent(document.location.search.substring(1)); } portal_api_base.prototype.http_error = function(xhr, pCommand) { if (xhr) { if (xhr.status > 500) { api.message(xhr.statusText, 'Could not execute request: HTTP error ' + xhr.status, 'closeable-error', true); } else if (xhr.status === 500) { var message = xhr.responseText || "HTTP 500"; if (pCommand && typeof pCommand.method === "string") { if (pCommand.method === "logging.trace.log") { return; // try prevent loops } message = pCommand + message; } api_async.logging.trace.log("com.nixps.api", "error", message); } } } function portal_api_sync() { var api = new portal_api_base(); var warned = false; api.server_call = function(context, url_postfix, command, cb, error_cb) { if (arguments.callee && arguments.callee.caller && typeof arguments.callee.caller.caller === "function" && !warned) { console.warn("sync calls are deprecated (" + url_postfix + ")"); warned = true; } if (context.m_parent.m_session !== undefined) { command.session = context.m_parent.m_session; } if (typeof command.session == "object") { command.session = command.session.session; } if (context.m_parent.m_site !== undefined) { var new_command = { method:"site.execute", site:context.m_parent.m_site, method_name:command.method, parameters:JSON.parse(JSON.stringify(command)), options:{} }; delete new_command.parameters.method; if (command.session !== undefined) { new_command.options.session = command.session; delete new_command.parameters.session; } command = new_command; } var headers = {}; if (typeof this.get_cookie("csrf-token") === "string") { headers["X-Csrf-Token"] = this.get_cookie("csrf-token"); } var xhttp = new XMLHttpRequest(); xhttp.onload = function(event) { if (typeof xhttp.responseText === "string" && xhttp.responseText.length > 0) { try { context.m_return = JSON.parse(xhttp.responseText); } catch(e) { context.m_return = { error_code: "return_not_json", error: "return data is not a json" } } } else { context.m_return = { error_code: "empty_return_data", error: "return data is empty" } } }; xhttp.onerror = function(event) { context.m_return = { error_code: "http_error", error: xhttp.statusText, http_result: xhttp }; }; xhttp.open("POST", context.m_parent.m_address + "/" + url_postfix, false); xhttp.setRequestHeader("Content-Type", "text/plain; charset=UTF-8"); for(var headerKey in headers) { xhttp.setRequestHeader(headerKey, headers[headerKey]); } try { xhttp.send(JSON.stringify(command)); } catch(e) { context.m_return = { error_code: "http_error", error: e.message, http_result: xhttp } } if ((context.m_return !== undefined) && (context.m_return != null) && (context.m_return.error !== undefined)) { if (context.m_return.error_code === 'no_license') { api.not_licensed(); return; } if (context.m_return.error_code === 'session_expired' || context.m_return.error_code === 'invalid_session') { api.session_expired_internal(); return; } if (context.m_return.error_code === 'database_down') { api.database_down(); return; } if (error_cb === undefined) { var feedback = ''; if (context.m_return.error_code !== 'unknown') { feedback = context.m_return.error; } if (context.m_return.messages !== undefined) { for (var countMessages=0; countMessages < context.m_return.messages.length; ++countMessages) { if (feedback.length != 0) { feedback = feedback + ' / '; } feedback = feedback + context.m_return.messages[countMessages].description; } } if (feedback.length == 0) { feedback = context.m_return.error; } api.message('Executing ' + command.method + ' failed: ', feedback, 'closeable-error', true); } else { error_cb(context.m_return); } } return context.m_return; } return api; } function portal_api_async() { var api = new portal_api_base(); api.server_call = function(context, url_postfix, command, cb, error_cb) { if (context.m_parent.m_session !== undefined) { command.session = context.m_parent.m_session; } if (typeof command.session === "object") { command.session = command.session.session; } var error_cb2 = function(xhr) { if (typeof error_cb === "function") { error_cb({ error: xhr.statusText, error_code: 'http_error', http_result: xhr }); } api.http_error(xhr, command); }; var cb2 = function(data, status, xhr) { if ((xhr.status < 200) || (xhr.status > 299)) { error_cb2(xhr); } else if (data && (data.error !== undefined)) { if (data.error_code === 'no_license') { api.not_licensed(); console.error(data); return; } if (data.error_code === 'session_expired' || data.error_code === 'invalid_session') { api.session_expired_internal(); console.error(data); return; } if (data.error_code === 'database_down') { api.database_down(); console.error(data); return; } if (typeof error_cb === "function") { error_cb(data); } else { api.message('Executing ' + command.method + ' failed: ', data.error, 'closeable-error', true); } } else { if (cb) { cb(data); } } }; if (context.m_parent.m_site !== undefined) { var new_command = {method:'site.execute', site:context.m_parent.m_site, method_name:command.method, parameters:JSON.parse(JSON.stringify(command)), options:{}}; delete new_command.parameters.method; if (command.session !== undefined) { new_command.options.session = command.session; delete new_command.parameters.session; } command = new_command; } var headers = {}; if (typeof this.get_cookie("csrf-token") === "string") { headers["X-Csrf-Token"] = this.get_cookie("csrf-token"); } if (window.no_jquery === true || window.$ === undefined) { var xhttp = new XMLHttpRequest(); xhttp.onload = function() { if ((xhttp.status < 200) || (xhttp.status > 299)) { error_cb2(xhttp); } else { if (typeof xhttp.responseText === "string" && xhttp.responseText.length > 0) { var data = {}; try { data = JSON.parse(xhttp.responseText); } catch(e) { error_cb({ error_code: "return_not_json", error: "return data is not a json", http_result: xhttp }) return; } cb2(data, xhttp.status, xhttp); } else { error_cb({ error_code: "empty_return_data", error: "return data is empty", http_result: xhttp }) } } }; xhttp.onerror = function(event) { if ((xhttp.status < 200) || (xhttp.status > 299)) { if (xhttp.status === 0 && xhttp.statusText === "") { xhttp.statusText = "error"; } else if (xhttp.status === 304 && xhttp.statusText === "") { xhttp.statusText = "notmodified"; } error_cb2(xhttp); } else if (typeof error_cb === "function") { error_cb({ error: xhttp.statusText, error_code: "http_error", http_result: xhttp }); } else { api.message("Executing " + command.method + " failed: ", "ajax call failed", "closeable-error", true); } }; xhttp.ontimeout = function() { if (typeof error_cb === "function") { error_cb({ error: xhttp.statusText, error_code: "timeout", http_result: xhttp }); } else { api.message("Executing " + command.method + " failed: ", "ajax call failed", "closeable-error", true); } }; xhttp.onabort = function() { if (typeof error_cb === "function") { error_cb({ error: xhttp.statusText, error_code: "abort", http_result: xhttp }); } }; xhttp.open("POST", context.m_parent.m_address + "/" + url_postfix, true); xhttp.setRequestHeader("Content-Type", "text/plain; charset=UTF-8"); for(var headerKey in headers) { xhttp.setRequestHeader(headerKey, headers[headerKey]); } xhttp.send(JSON.stringify(command)); } else { $.ajax({ type: 'POST', url: context.m_parent.m_address + '/' + url_postfix, contentType: 'text/plain; charset=UTF-8', data: JSON.stringify(command), success: cb2, async: true, headers: headers }).fail(function(xhr, textStatus, errorThrown) { if ((xhr.status < 200) || (xhr.status > 299)) { error_cb2(xhr); } else if (error_cb === undefined) { api.message('Executing ' + command.method + ' failed: ', 'ajax call failed', 'closeable-error', true); } else { error_cb({ error: xhr.statusText, error_code: 'http_error', http_result: xhr }); } }); } } return api; } function portal_api_defer() { var api = new portal_api_base(); api.server_call = function(context, url_postfix, command) { if (context.m_parent.m_session !== undefined) { command.session = context.m_parent.m_session; } if (typeof command.session == "object") { command.session = command.session.session; } var error_cb2 = function(xhr, textStatus, errorThrown, pResolveCB, pRejectCB) { api.http_error(xhr, command); pRejectCB({ error: xhr.statusText, error_code: 'http_error', http_result: xhr }); }; var cb2 = function(data, status, xhr, pResolveCB, pRejectCB) { if ((xhr.status < 200) || (xhr.status > 299)) { api.http_error(xhr); pRejectCB({ error: xhr.statusText, error_code: 'http_error', http_result: xhr }); } else if (data && (data.error !== undefined)) { if (data.error_code === 'no_license') { api.not_licensed(); console.error(data); return; } if (data.error_code === 'session_expired' || data.error_code === 'invalid_session') { api.session_expired_internal(); console.error(data); return; } if (data.error_code === 'database_down') { api.database_down(); console.error(data); return; } pRejectCB(data); } else { pResolveCB(data); } }; if (context.m_parent.m_site !== undefined) { var new_command = {method:'site.execute', site:context.m_parent.m_site, method_name:command.method, parameters:JSON.parse(JSON.stringify(command)), options:{}}; delete new_command.parameters.method; if (command.session !== undefined) { new_command.options.session = command.session; delete new_command.parameters.session; } command = new_command; } var headers = {}; if (typeof this.get_cookie("csrf-token") === "string") { headers["X-Csrf-Token"] = this.get_cookie("csrf-token"); } if (window.no_jquery === true || window.$ === undefined) { var outputPromise = new Promise(function(pResolve, pReject) { var xhttp = new XMLHttpRequest(); xhttp.onload = function() { if ((xhttp.status < 200) || (xhttp.status > 299)) { error_cb2(xhttp, xhttp.textStatus, undefined, pResolve, pReject); } else { if (typeof xhttp.responseText === "string" && xhttp.responseText.length > 0) { var data = {}; try { data = JSON.parse(xhttp.responseText); } catch(e) { pReject({ error_code: "return_not_json", error: "return data is not a json", http_result: xhttp }) return; } cb2(data, xhttp.status, xhttp, pResolve, pReject); } else { pReject({ error_code: "empty_return_data", error: "return data is empty", http_result: xhttp }) } } }; xhttp.onerror = function(event) { if ((xhttp.status < 200) || (xhttp.status > 299)) { if (xhttp.status === 0 && xhttp.statusText === "") { xhttp.statusText = "error"; } else if (xhttp.status === 304 && xhttp.statusText === "") { xhttp.statusText = "notmodified"; } error_cb2(xhttp, xhttp.textStatus, undefined, pResolve, pReject); } else { pReject({ error: xhttp.statusText, error_code: "http_error", http_result: xhttp }); } }; xhttp.ontimeout = function() { pReject({ error: xhttp.statusText, error_code: "timeout", http_result: xhttp }); }; xhttp.onabort = function() { pReject({ error: xhttp.statusText, error_code: "abort", http_result: xhttp }); }; xhttp.open("POST", context.m_parent.m_address + "/" + url_postfix, true); xhttp.setRequestHeader("Content-Type", "text/plain; charset=UTF-8"); for(var headerKey in headers) { xhttp.setRequestHeader(headerKey, headers[headerKey]); } xhttp.send(JSON.stringify(command)); }); if (window.$ !== undefined) { return $.when(outputPromise); // still add done() and fail() if present } return outputPromise; } else { return $.Deferred(function (pDefer) { $.ajax({ type: 'POST', url: context.m_parent.m_address + '/' + url_postfix, contentType: 'text/plain; charset=UTF-8', data: JSON.stringify(command), success: function (data, status, xhr) { cb2(data, status, xhr, pDefer.resolve, pDefer.reject); }, async: true, headers: headers }).fail(function (xhr, textStatus, errorThrown) { if ((xhr.status < 200) || (xhr.status > 299)) { error_cb2(xhr, textStatus, errorThrown, pDefer.resolve, pDefer.reject); } else { pDefer.reject({ error: (xhr.statusText === "OK" ? textStatus : xhr.statusText), error_code: 'http_error', http_result: xhr }); } }); }); } } return api; } var api_sync = new portal_api_sync(); var api_async = new portal_api_async(); var api_defer = new portal_api_defer(); var api = api_sync; (function () { var regex = new RegExp('[?&]session(=([^&#]*)|&|#|$)'); var sessionKey = regex.exec(window.location.href); if (sessionKey !== null && typeof sessionKey[2] === "string" && sessionKey[2].length > 0) { api_async.m_session = sessionKey[2]; api_sync.m_session = sessionKey[2]; api_defer.m_session = sessionKey[2]; } })(); var TINYJS = false; if (Object.isObject === undefined) { Object.isObject = function (obj) { return (typeof obj === typeof {}) && !Array.isArray(obj); } } function process_sub_jsonml(node) { var name = node[0]; var attr = {}; var first_child_index = 1; if ((node.length > 1) && !(Array.isArray(node[1]))) { attr = node[1]; first_child_index = 2; } var result = {}; var attr_keys = Object.keys(attr); for (var i = 0; i < attr_keys.length; i += 1) { var k = attr_keys[i]; result[k] = { value: attr[k] }; } var child_next_index = {}; for (var i = first_child_index; i < node.length; i += 1) { var child = node[i]; if (!Array.isArray(child)) { result.value = child; } else { var child_name = child[0]; var child_attr = {}; if ((child.length > 1) && !(Array.isArray(child[1]))) child_attr = child[1]; if (result[child_name] === undefined) result[child_name] = {}; if (child_next_index[child_name] === undefined) child_next_index[child_name] = 0; else child_next_index[child_name] += 1; var processed_child = process_sub_jsonml(child); result[child_name][child_next_index[child_name]] = processed_child; var child_attr_keys = []; if (Object.isObject(child_attr)) child_attr_keys = Object.keys(child_attr); for (var j = 0; j < child_attr_keys.length; j += 1) { var k = child_attr_keys[j]; if (result[child_name][k] === undefined) result[child_name][k] = {}; result[child_name][k].value = child_attr[k]; result[child_name][k][child_attr[k]] = processed_child; } } } var result_keys = Object.keys(result); for (var i1 = 0; i1 < result_keys.length; i1 += 1) { var k1 = result_keys[i1]; if (Object.isObject(result[k1][0]) && (result[k1][0] !== undefined) && (result[k1][1] === undefined)) { var result_k1_0_keys = Object.keys(result[k1][0]); for (var i2 = 0; i2 < result_k1_0_keys.length; i2 += 1) { var k2 = result_k1_0_keys[i2]; if (result[k1][k2] === undefined) result[k1][k2] = result[k1][0][k2]; } } } return result; } function process_jsonml(node) { var result = {}; result[node[0]] = process_sub_jsonml(node); result[node[0]][0] = result[node[0]]; if ((node.length > 1) && Object.isObject(node[1])) { var node_1_keys = Object.keys(node[1]); for (var i = 0; i < node_1_keys.length; i += 1) { var k = node_1_keys[i]; result[node[0]][k][node[1][k]] = result[node[0]]; } } return result; }