Socket
Socket
Sign inDemoInstall

@opensearch-project/opensearch

Package Overview
Dependencies
Maintainers
8
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opensearch-project/opensearch - npm Package Compare versions

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

api/_core/bulk.d.ts

12

api/cat/_api.js

@@ -26,4 +26,4 @@ /*

this.allocation = apiFunc(bindObj, cache, './cat/allocation');
this.allPitSegments = apiFunc(bindObj, cache, './cat/all_pit_segments');
this.clusterManager = apiFunc(bindObj, cache, './cat/cluster_manager');
this.allPitSegments = apiFunc(bindObj, cache, './cat/allPitSegments');
this.clusterManager = apiFunc(bindObj, cache, './cat/clusterManager');
this.count = apiFunc(bindObj, cache, './cat/count');

@@ -37,8 +37,8 @@ this.fielddata = apiFunc(bindObj, cache, './cat/fielddata');

this.nodes = apiFunc(bindObj, cache, './cat/nodes');
this.pendingTasks = apiFunc(bindObj, cache, './cat/pending_tasks');
this.pitSegments = apiFunc(bindObj, cache, './cat/pit_segments');
this.pendingTasks = apiFunc(bindObj, cache, './cat/pendingTasks');
this.pitSegments = apiFunc(bindObj, cache, './cat/pitSegments');
this.plugins = apiFunc(bindObj, cache, './cat/plugins');
this.recovery = apiFunc(bindObj, cache, './cat/recovery');
this.repositories = apiFunc(bindObj, cache, './cat/repositories');
this.segmentReplication = apiFunc(bindObj, cache, './cat/segment_replication');
this.segmentReplication = apiFunc(bindObj, cache, './cat/segmentReplication');
this.segments = apiFunc(bindObj, cache, './cat/segments');

@@ -49,5 +49,5 @@ this.shards = apiFunc(bindObj, cache, './cat/shards');

this.templates = apiFunc(bindObj, cache, './cat/templates');
this.threadPool = apiFunc(bindObj, cache, './cat/thread_pool');
this.threadPool = apiFunc(bindObj, cache, './cat/threadPool');
}
module.exports = CatApi;

@@ -24,20 +24,20 @@ /*

const cache = {};
this.allocationExplain = apiFunc(bindObj, cache, './cluster/allocation_explain');
this.deleteComponentTemplate = apiFunc(bindObj, cache, './cluster/delete_component_template');
this.deleteDecommissionAwareness = apiFunc(bindObj, cache, './cluster/delete_decommission_awareness');
this.deleteVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/delete_voting_config_exclusions');
this.deleteWeightedRouting = apiFunc(bindObj, cache, './cluster/delete_weighted_routing');
this.existsComponentTemplate = apiFunc(bindObj, cache, './cluster/exists_component_template');
this.getComponentTemplate = apiFunc(bindObj, cache, './cluster/get_component_template');
this.getDecommissionAwareness = apiFunc(bindObj, cache, './cluster/get_decommission_awareness');
this.getSettings = apiFunc(bindObj, cache, './cluster/get_settings');
this.getWeightedRouting = apiFunc(bindObj, cache, './cluster/get_weighted_routing');
this.allocationExplain = apiFunc(bindObj, cache, './cluster/allocationExplain');
this.deleteComponentTemplate = apiFunc(bindObj, cache, './cluster/deleteComponentTemplate');
this.deleteDecommissionAwareness = apiFunc(bindObj, cache, './cluster/deleteDecommissionAwareness');
this.deleteVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/deleteVotingConfigExclusions');
this.deleteWeightedRouting = apiFunc(bindObj, cache, './cluster/deleteWeightedRouting');
this.existsComponentTemplate = apiFunc(bindObj, cache, './cluster/existsComponentTemplate');
this.getComponentTemplate = apiFunc(bindObj, cache, './cluster/getComponentTemplate');
this.getDecommissionAwareness = apiFunc(bindObj, cache, './cluster/getDecommissionAwareness');
this.getSettings = apiFunc(bindObj, cache, './cluster/getSettings');
this.getWeightedRouting = apiFunc(bindObj, cache, './cluster/getWeightedRouting');
this.health = apiFunc(bindObj, cache, './cluster/health');
this.pendingTasks = apiFunc(bindObj, cache, './cluster/pending_tasks');
this.postVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/post_voting_config_exclusions');
this.putComponentTemplate = apiFunc(bindObj, cache, './cluster/put_component_template');
this.putDecommissionAwareness = apiFunc(bindObj, cache, './cluster/put_decommission_awareness');
this.putSettings = apiFunc(bindObj, cache, './cluster/put_settings');
this.putWeightedRouting = apiFunc(bindObj, cache, './cluster/put_weighted_routing');
this.remoteInfo = apiFunc(bindObj, cache, './cluster/remote_info');
this.pendingTasks = apiFunc(bindObj, cache, './cluster/pendingTasks');
this.postVotingConfigExclusions = apiFunc(bindObj, cache, './cluster/postVotingConfigExclusions');
this.putComponentTemplate = apiFunc(bindObj, cache, './cluster/putComponentTemplate');
this.putDecommissionAwareness = apiFunc(bindObj, cache, './cluster/putDecommissionAwareness');
this.putSettings = apiFunc(bindObj, cache, './cluster/putSettings');
this.putWeightedRouting = apiFunc(bindObj, cache, './cluster/putWeightedRouting');
this.remoteInfo = apiFunc(bindObj, cache, './cluster/remoteInfo');
this.reroute = apiFunc(bindObj, cache, './cluster/reroute');

@@ -44,0 +44,0 @@ this.state = apiFunc(bindObj, cache, './cluster/state');

@@ -24,52 +24,52 @@ /*

const cache = {};
this.addBlock = apiFunc(bindObj, cache, './indices/add_block');
this.addBlock = apiFunc(bindObj, cache, './indices/addBlock');
this.analyze = apiFunc(bindObj, cache, './indices/analyze');
this.clearCache = apiFunc(bindObj, cache, './indices/clear_cache');
this.clearCache = apiFunc(bindObj, cache, './indices/clearCache');
this.clone = apiFunc(bindObj, cache, './indices/clone');
this.close = apiFunc(bindObj, cache, './indices/close');
this.create = apiFunc(bindObj, cache, './indices/create');
this.createDataStream = apiFunc(bindObj, cache, './indices/create_data_stream');
this.dataStreamsStats = apiFunc(bindObj, cache, './indices/data_streams_stats');
this.createDataStream = apiFunc(bindObj, cache, './indices/createDataStream');
this.dataStreamsStats = apiFunc(bindObj, cache, './indices/dataStreamsStats');
this.delete = apiFunc(bindObj, cache, './indices/delete');
this.deleteAlias = apiFunc(bindObj, cache, './indices/delete_alias');
this.deleteDataStream = apiFunc(bindObj, cache, './indices/delete_data_stream');
this.deleteIndexTemplate = apiFunc(bindObj, cache, './indices/delete_index_template');
this.deleteTemplate = apiFunc(bindObj, cache, './indices/delete_template');
this.deleteAlias = apiFunc(bindObj, cache, './indices/deleteAlias');
this.deleteDataStream = apiFunc(bindObj, cache, './indices/deleteDataStream');
this.deleteIndexTemplate = apiFunc(bindObj, cache, './indices/deleteIndexTemplate');
this.deleteTemplate = apiFunc(bindObj, cache, './indices/deleteTemplate');
this.exists = apiFunc(bindObj, cache, './indices/exists');
this.existsAlias = apiFunc(bindObj, cache, './indices/exists_alias');
this.existsIndexTemplate = apiFunc(bindObj, cache, './indices/exists_index_template');
this.existsTemplate = apiFunc(bindObj, cache, './indices/exists_template');
this.existsAlias = apiFunc(bindObj, cache, './indices/existsAlias');
this.existsIndexTemplate = apiFunc(bindObj, cache, './indices/existsIndexTemplate');
this.existsTemplate = apiFunc(bindObj, cache, './indices/existsTemplate');
this.flush = apiFunc(bindObj, cache, './indices/flush');
this.forcemerge = apiFunc(bindObj, cache, './indices/forcemerge');
this.get = apiFunc(bindObj, cache, './indices/get');
this.getAlias = apiFunc(bindObj, cache, './indices/get_alias');
this.getDataStream = apiFunc(bindObj, cache, './indices/get_data_stream');
this.getFieldMapping = apiFunc(bindObj, cache, './indices/get_field_mapping');
this.getIndexTemplate = apiFunc(bindObj, cache, './indices/get_index_template');
this.getMapping = apiFunc(bindObj, cache, './indices/get_mapping');
this.getSettings = apiFunc(bindObj, cache, './indices/get_settings');
this.getTemplate = apiFunc(bindObj, cache, './indices/get_template');
this.getUpgrade = apiFunc(bindObj, cache, './indices/get_upgrade');
this.getAlias = apiFunc(bindObj, cache, './indices/getAlias');
this.getDataStream = apiFunc(bindObj, cache, './indices/getDataStream');
this.getFieldMapping = apiFunc(bindObj, cache, './indices/getFieldMapping');
this.getIndexTemplate = apiFunc(bindObj, cache, './indices/getIndexTemplate');
this.getMapping = apiFunc(bindObj, cache, './indices/getMapping');
this.getSettings = apiFunc(bindObj, cache, './indices/getSettings');
this.getTemplate = apiFunc(bindObj, cache, './indices/getTemplate');
this.getUpgrade = apiFunc(bindObj, cache, './indices/getUpgrade');
this.open = apiFunc(bindObj, cache, './indices/open');
this.putAlias = apiFunc(bindObj, cache, './indices/put_alias');
this.putIndexTemplate = apiFunc(bindObj, cache, './indices/put_index_template');
this.putMapping = apiFunc(bindObj, cache, './indices/put_mapping');
this.putSettings = apiFunc(bindObj, cache, './indices/put_settings');
this.putTemplate = apiFunc(bindObj, cache, './indices/put_template');
this.putAlias = apiFunc(bindObj, cache, './indices/putAlias');
this.putIndexTemplate = apiFunc(bindObj, cache, './indices/putIndexTemplate');
this.putMapping = apiFunc(bindObj, cache, './indices/putMapping');
this.putSettings = apiFunc(bindObj, cache, './indices/putSettings');
this.putTemplate = apiFunc(bindObj, cache, './indices/putTemplate');
this.recovery = apiFunc(bindObj, cache, './indices/recovery');
this.refresh = apiFunc(bindObj, cache, './indices/refresh');
this.resolveIndex = apiFunc(bindObj, cache, './indices/resolve_index');
this.resolveIndex = apiFunc(bindObj, cache, './indices/resolveIndex');
this.rollover = apiFunc(bindObj, cache, './indices/rollover');
this.segments = apiFunc(bindObj, cache, './indices/segments');
this.shardStores = apiFunc(bindObj, cache, './indices/shard_stores');
this.shardStores = apiFunc(bindObj, cache, './indices/shardStores');
this.shrink = apiFunc(bindObj, cache, './indices/shrink');
this.simulateIndexTemplate = apiFunc(bindObj, cache, './indices/simulate_index_template');
this.simulateTemplate = apiFunc(bindObj, cache, './indices/simulate_template');
this.simulateIndexTemplate = apiFunc(bindObj, cache, './indices/simulateIndexTemplate');
this.simulateTemplate = apiFunc(bindObj, cache, './indices/simulateTemplate');
this.split = apiFunc(bindObj, cache, './indices/split');
this.stats = apiFunc(bindObj, cache, './indices/stats');
this.updateAliases = apiFunc(bindObj, cache, './indices/update_aliases');
this.updateAliases = apiFunc(bindObj, cache, './indices/updateAliases');
this.upgrade = apiFunc(bindObj, cache, './indices/upgrade');
this.validateQuery = apiFunc(bindObj, cache, './indices/validate_query');
this.validateQuery = apiFunc(bindObj, cache, './indices/validateQuery');
}
module.exports = IndicesApi;

@@ -24,6 +24,6 @@ /*

const cache = {};
this.deletePipeline = apiFunc(bindObj, cache, './ingest/delete_pipeline');
this.getPipeline = apiFunc(bindObj, cache, './ingest/get_pipeline');
this.processorGrok = apiFunc(bindObj, cache, './ingest/processor_grok');
this.putPipeline = apiFunc(bindObj, cache, './ingest/put_pipeline');
this.deletePipeline = apiFunc(bindObj, cache, './ingest/deletePipeline');
this.getPipeline = apiFunc(bindObj, cache, './ingest/getPipeline');
this.processorGrok = apiFunc(bindObj, cache, './ingest/processorGrok');
this.putPipeline = apiFunc(bindObj, cache, './ingest/putPipeline');
this.simulate = apiFunc(bindObj, cache, './ingest/simulate');

@@ -30,0 +30,0 @@ }

@@ -24,7 +24,7 @@ /*

const cache = {};
this.deleteModel = apiFunc(bindObj, cache, './knn/delete_model');
this.getModel = apiFunc(bindObj, cache, './knn/get_model');
this.searchModels = apiFunc(bindObj, cache, './knn/search_models');
this.deleteModel = apiFunc(bindObj, cache, './knn/deleteModel');
this.getModel = apiFunc(bindObj, cache, './knn/getModel');
this.searchModels = apiFunc(bindObj, cache, './knn/searchModels');
this.stats = apiFunc(bindObj, cache, './knn/stats');
this.trainModel = apiFunc(bindObj, cache, './knn/train_model');
this.trainModel = apiFunc(bindObj, cache, './knn/trainModel');
this.warmup = apiFunc(bindObj, cache, './knn/warmup');

@@ -31,0 +31,0 @@ }

@@ -24,11 +24,11 @@ /*

const cache = {};
this.deleteModel = apiFunc(bindObj, cache, './ml/delete_model');
this.deleteModelGroup = apiFunc(bindObj, cache, './ml/delete_model_group');
this.getModelGroup = apiFunc(bindObj, cache, './ml/get_model_group');
this.getTask = apiFunc(bindObj, cache, './ml/get_task');
this.registerModel = apiFunc(bindObj, cache, './ml/register_model');
this.registerModelGroup = apiFunc(bindObj, cache, './ml/register_model_group');
this.searchModels = apiFunc(bindObj, cache, './ml/search_models');
this.deleteModel = apiFunc(bindObj, cache, './ml/deleteModel');
this.deleteModelGroup = apiFunc(bindObj, cache, './ml/deleteModelGroup');
this.getModelGroup = apiFunc(bindObj, cache, './ml/getModelGroup');
this.getTask = apiFunc(bindObj, cache, './ml/getTask');
this.registerModel = apiFunc(bindObj, cache, './ml/registerModel');
this.registerModelGroup = apiFunc(bindObj, cache, './ml/registerModelGroup');
this.searchModels = apiFunc(bindObj, cache, './ml/searchModels');
}
module.exports = MlApi;

@@ -24,5 +24,5 @@ /*

const cache = {};
this.hotThreads = apiFunc(bindObj, cache, './nodes/hot_threads');
this.hotThreads = apiFunc(bindObj, cache, './nodes/hotThreads');
this.info = apiFunc(bindObj, cache, './nodes/info');
this.reloadSecureSettings = apiFunc(bindObj, cache, './nodes/reload_secure_settings');
this.reloadSecureSettings = apiFunc(bindObj, cache, './nodes/reloadSecureSettings');
this.stats = apiFunc(bindObj, cache, './nodes/stats');

@@ -29,0 +29,0 @@ this.usage = apiFunc(bindObj, cache, './nodes/usage');

@@ -24,13 +24,13 @@ /*

const cache = {};
this.createConfig = apiFunc(bindObj, cache, './notifications/create_config');
this.deleteConfig = apiFunc(bindObj, cache, './notifications/delete_config');
this.deleteConfigs = apiFunc(bindObj, cache, './notifications/delete_configs');
this.getConfig = apiFunc(bindObj, cache, './notifications/get_config');
this.getConfigs = apiFunc(bindObj, cache, './notifications/get_configs');
this.listChannels = apiFunc(bindObj, cache, './notifications/list_channels');
this.listFeatures = apiFunc(bindObj, cache, './notifications/list_features');
this.sendTest = apiFunc(bindObj, cache, './notifications/send_test');
this.updateConfig = apiFunc(bindObj, cache, './notifications/update_config');
this.createConfig = apiFunc(bindObj, cache, './notifications/createConfig');
this.deleteConfig = apiFunc(bindObj, cache, './notifications/deleteConfig');
this.deleteConfigs = apiFunc(bindObj, cache, './notifications/deleteConfigs');
this.getConfig = apiFunc(bindObj, cache, './notifications/getConfig');
this.getConfigs = apiFunc(bindObj, cache, './notifications/getConfigs');
this.listChannels = apiFunc(bindObj, cache, './notifications/listChannels');
this.listFeatures = apiFunc(bindObj, cache, './notifications/listFeatures');
this.sendTest = apiFunc(bindObj, cache, './notifications/sendTest');
this.updateConfig = apiFunc(bindObj, cache, './notifications/updateConfig');
}
module.exports = NotificationsApi;

@@ -25,4 +25,4 @@ /*

this.explain = apiFunc(bindObj, cache, './ppl/explain');
this.getStats = apiFunc(bindObj, cache, './ppl/get_stats');
this.postStats = apiFunc(bindObj, cache, './ppl/post_stats');
this.getStats = apiFunc(bindObj, cache, './ppl/getStats');
this.postStats = apiFunc(bindObj, cache, './ppl/postStats');
this.query = apiFunc(bindObj, cache, './ppl/query');

@@ -29,0 +29,0 @@ }

@@ -26,76 +26,76 @@ /*

this.authtoken = apiFunc(bindObj, cache, './security/authtoken');
this.changePassword = apiFunc(bindObj, cache, './security/change_password');
this.configUpgradeCheck = apiFunc(bindObj, cache, './security/config_upgrade_check');
this.configUpgradePerform = apiFunc(bindObj, cache, './security/config_upgrade_perform');
this.createActionGroup = apiFunc(bindObj, cache, './security/create_action_group');
this.createAllowlist = apiFunc(bindObj, cache, './security/create_allowlist');
this.createRole = apiFunc(bindObj, cache, './security/create_role');
this.createRoleMapping = apiFunc(bindObj, cache, './security/create_role_mapping');
this.createTenant = apiFunc(bindObj, cache, './security/create_tenant');
this.createUpdateTenancyConfig = apiFunc(bindObj, cache, './security/create_update_tenancy_config');
this.createUser = apiFunc(bindObj, cache, './security/create_user');
this.createUserLegacy = apiFunc(bindObj, cache, './security/create_user_legacy');
this.deleteActionGroup = apiFunc(bindObj, cache, './security/delete_action_group');
this.deleteDistinguishedName = apiFunc(bindObj, cache, './security/delete_distinguished_name');
this.deleteRole = apiFunc(bindObj, cache, './security/delete_role');
this.deleteRoleMapping = apiFunc(bindObj, cache, './security/delete_role_mapping');
this.deleteTenant = apiFunc(bindObj, cache, './security/delete_tenant');
this.deleteUser = apiFunc(bindObj, cache, './security/delete_user');
this.deleteUserLegacy = apiFunc(bindObj, cache, './security/delete_user_legacy');
this.flushCache = apiFunc(bindObj, cache, './security/flush_cache');
this.generateOboToken = apiFunc(bindObj, cache, './security/generate_obo_token');
this.generateUserToken = apiFunc(bindObj, cache, './security/generate_user_token');
this.generateUserTokenLegacy = apiFunc(bindObj, cache, './security/generate_user_token_legacy');
this.getAccountDetails = apiFunc(bindObj, cache, './security/get_account_details');
this.getActionGroup = apiFunc(bindObj, cache, './security/get_action_group');
this.getActionGroups = apiFunc(bindObj, cache, './security/get_action_groups');
this.getAllowlist = apiFunc(bindObj, cache, './security/get_allowlist');
this.getAuditConfiguration = apiFunc(bindObj, cache, './security/get_audit_configuration');
this.getCertificates = apiFunc(bindObj, cache, './security/get_certificates');
this.getConfiguration = apiFunc(bindObj, cache, './security/get_configuration');
this.getDashboardsInfo = apiFunc(bindObj, cache, './security/get_dashboards_info');
this.getDistinguishedName = apiFunc(bindObj, cache, './security/get_distinguished_name');
this.getDistinguishedNames = apiFunc(bindObj, cache, './security/get_distinguished_names');
this.getPermissionsInfo = apiFunc(bindObj, cache, './security/get_permissions_info');
this.getRole = apiFunc(bindObj, cache, './security/get_role');
this.getRoleMapping = apiFunc(bindObj, cache, './security/get_role_mapping');
this.getRoleMappings = apiFunc(bindObj, cache, './security/get_role_mappings');
this.getRoles = apiFunc(bindObj, cache, './security/get_roles');
this.getSslinfo = apiFunc(bindObj, cache, './security/get_sslinfo');
this.getTenancyConfig = apiFunc(bindObj, cache, './security/get_tenancy_config');
this.getTenant = apiFunc(bindObj, cache, './security/get_tenant');
this.getTenants = apiFunc(bindObj, cache, './security/get_tenants');
this.getUser = apiFunc(bindObj, cache, './security/get_user');
this.getUserLegacy = apiFunc(bindObj, cache, './security/get_user_legacy');
this.getUsers = apiFunc(bindObj, cache, './security/get_users');
this.getUsersLegacy = apiFunc(bindObj, cache, './security/get_users_legacy');
this.changePassword = apiFunc(bindObj, cache, './security/changePassword');
this.configUpgradeCheck = apiFunc(bindObj, cache, './security/configUpgradeCheck');
this.configUpgradePerform = apiFunc(bindObj, cache, './security/configUpgradePerform');
this.createActionGroup = apiFunc(bindObj, cache, './security/createActionGroup');
this.createAllowlist = apiFunc(bindObj, cache, './security/createAllowlist');
this.createRole = apiFunc(bindObj, cache, './security/createRole');
this.createRoleMapping = apiFunc(bindObj, cache, './security/createRoleMapping');
this.createTenant = apiFunc(bindObj, cache, './security/createTenant');
this.createUpdateTenancyConfig = apiFunc(bindObj, cache, './security/createUpdateTenancyConfig');
this.createUser = apiFunc(bindObj, cache, './security/createUser');
this.createUserLegacy = apiFunc(bindObj, cache, './security/createUserLegacy');
this.deleteActionGroup = apiFunc(bindObj, cache, './security/deleteActionGroup');
this.deleteDistinguishedName = apiFunc(bindObj, cache, './security/deleteDistinguishedName');
this.deleteRole = apiFunc(bindObj, cache, './security/deleteRole');
this.deleteRoleMapping = apiFunc(bindObj, cache, './security/deleteRoleMapping');
this.deleteTenant = apiFunc(bindObj, cache, './security/deleteTenant');
this.deleteUser = apiFunc(bindObj, cache, './security/deleteUser');
this.deleteUserLegacy = apiFunc(bindObj, cache, './security/deleteUserLegacy');
this.flushCache = apiFunc(bindObj, cache, './security/flushCache');
this.generateOboToken = apiFunc(bindObj, cache, './security/generateOboToken');
this.generateUserToken = apiFunc(bindObj, cache, './security/generateUserToken');
this.generateUserTokenLegacy = apiFunc(bindObj, cache, './security/generateUserTokenLegacy');
this.getAccountDetails = apiFunc(bindObj, cache, './security/getAccountDetails');
this.getActionGroup = apiFunc(bindObj, cache, './security/getActionGroup');
this.getActionGroups = apiFunc(bindObj, cache, './security/getActionGroups');
this.getAllowlist = apiFunc(bindObj, cache, './security/getAllowlist');
this.getAuditConfiguration = apiFunc(bindObj, cache, './security/getAuditConfiguration');
this.getCertificates = apiFunc(bindObj, cache, './security/getCertificates');
this.getConfiguration = apiFunc(bindObj, cache, './security/getConfiguration');
this.getDashboardsInfo = apiFunc(bindObj, cache, './security/getDashboardsInfo');
this.getDistinguishedName = apiFunc(bindObj, cache, './security/getDistinguishedName');
this.getDistinguishedNames = apiFunc(bindObj, cache, './security/getDistinguishedNames');
this.getPermissionsInfo = apiFunc(bindObj, cache, './security/getPermissionsInfo');
this.getRole = apiFunc(bindObj, cache, './security/getRole');
this.getRoleMapping = apiFunc(bindObj, cache, './security/getRoleMapping');
this.getRoleMappings = apiFunc(bindObj, cache, './security/getRoleMappings');
this.getRoles = apiFunc(bindObj, cache, './security/getRoles');
this.getSslinfo = apiFunc(bindObj, cache, './security/getSslinfo');
this.getTenancyConfig = apiFunc(bindObj, cache, './security/getTenancyConfig');
this.getTenant = apiFunc(bindObj, cache, './security/getTenant');
this.getTenants = apiFunc(bindObj, cache, './security/getTenants');
this.getUser = apiFunc(bindObj, cache, './security/getUser');
this.getUserLegacy = apiFunc(bindObj, cache, './security/getUserLegacy');
this.getUsers = apiFunc(bindObj, cache, './security/getUsers');
this.getUsersLegacy = apiFunc(bindObj, cache, './security/getUsersLegacy');
this.health = apiFunc(bindObj, cache, './security/health');
this.migrate = apiFunc(bindObj, cache, './security/migrate');
this.patchActionGroup = apiFunc(bindObj, cache, './security/patch_action_group');
this.patchActionGroups = apiFunc(bindObj, cache, './security/patch_action_groups');
this.patchAllowlist = apiFunc(bindObj, cache, './security/patch_allowlist');
this.patchAuditConfiguration = apiFunc(bindObj, cache, './security/patch_audit_configuration');
this.patchConfiguration = apiFunc(bindObj, cache, './security/patch_configuration');
this.patchDistinguishedName = apiFunc(bindObj, cache, './security/patch_distinguished_name');
this.patchDistinguishedNames = apiFunc(bindObj, cache, './security/patch_distinguished_names');
this.patchRole = apiFunc(bindObj, cache, './security/patch_role');
this.patchRoleMapping = apiFunc(bindObj, cache, './security/patch_role_mapping');
this.patchRoleMappings = apiFunc(bindObj, cache, './security/patch_role_mappings');
this.patchRoles = apiFunc(bindObj, cache, './security/patch_roles');
this.patchTenant = apiFunc(bindObj, cache, './security/patch_tenant');
this.patchTenants = apiFunc(bindObj, cache, './security/patch_tenants');
this.patchUser = apiFunc(bindObj, cache, './security/patch_user');
this.patchUsers = apiFunc(bindObj, cache, './security/patch_users');
this.postDashboardsInfo = apiFunc(bindObj, cache, './security/post_dashboards_info');
this.reloadHttpCertificates = apiFunc(bindObj, cache, './security/reload_http_certificates');
this.reloadTransportCertificates = apiFunc(bindObj, cache, './security/reload_transport_certificates');
this.tenantInfo = apiFunc(bindObj, cache, './security/tenant_info');
this.updateAuditConfiguration = apiFunc(bindObj, cache, './security/update_audit_configuration');
this.updateConfiguration = apiFunc(bindObj, cache, './security/update_configuration');
this.updateDistinguishedName = apiFunc(bindObj, cache, './security/update_distinguished_name');
this.patchActionGroup = apiFunc(bindObj, cache, './security/patchActionGroup');
this.patchActionGroups = apiFunc(bindObj, cache, './security/patchActionGroups');
this.patchAllowlist = apiFunc(bindObj, cache, './security/patchAllowlist');
this.patchAuditConfiguration = apiFunc(bindObj, cache, './security/patchAuditConfiguration');
this.patchConfiguration = apiFunc(bindObj, cache, './security/patchConfiguration');
this.patchDistinguishedName = apiFunc(bindObj, cache, './security/patchDistinguishedName');
this.patchDistinguishedNames = apiFunc(bindObj, cache, './security/patchDistinguishedNames');
this.patchRole = apiFunc(bindObj, cache, './security/patchRole');
this.patchRoleMapping = apiFunc(bindObj, cache, './security/patchRoleMapping');
this.patchRoleMappings = apiFunc(bindObj, cache, './security/patchRoleMappings');
this.patchRoles = apiFunc(bindObj, cache, './security/patchRoles');
this.patchTenant = apiFunc(bindObj, cache, './security/patchTenant');
this.patchTenants = apiFunc(bindObj, cache, './security/patchTenants');
this.patchUser = apiFunc(bindObj, cache, './security/patchUser');
this.patchUsers = apiFunc(bindObj, cache, './security/patchUsers');
this.postDashboardsInfo = apiFunc(bindObj, cache, './security/postDashboardsInfo');
this.reloadHttpCertificates = apiFunc(bindObj, cache, './security/reloadHttpCertificates');
this.reloadTransportCertificates = apiFunc(bindObj, cache, './security/reloadTransportCertificates');
this.tenantInfo = apiFunc(bindObj, cache, './security/tenantInfo');
this.updateAuditConfiguration = apiFunc(bindObj, cache, './security/updateAuditConfiguration');
this.updateConfiguration = apiFunc(bindObj, cache, './security/updateConfiguration');
this.updateDistinguishedName = apiFunc(bindObj, cache, './security/updateDistinguishedName');
this.validate = apiFunc(bindObj, cache, './security/validate');
this.whoAmI = apiFunc(bindObj, cache, './security/who_am_i');
this.whoAmIProtected = apiFunc(bindObj, cache, './security/who_am_i_protected');
this.whoAmI = apiFunc(bindObj, cache, './security/whoAmI');
this.whoAmIProtected = apiFunc(bindObj, cache, './security/whoAmIProtected');
}
module.exports = SecurityApi;

@@ -24,15 +24,15 @@ /*

const cache = {};
this.cleanupRepository = apiFunc(bindObj, cache, './snapshot/cleanup_repository');
this.cleanupRepository = apiFunc(bindObj, cache, './snapshot/cleanupRepository');
this.clone = apiFunc(bindObj, cache, './snapshot/clone');
this.create = apiFunc(bindObj, cache, './snapshot/create');
this.createRepository = apiFunc(bindObj, cache, './snapshot/create_repository');
this.createRepository = apiFunc(bindObj, cache, './snapshot/createRepository');
this.delete = apiFunc(bindObj, cache, './snapshot/delete');
this.deleteRepository = apiFunc(bindObj, cache, './snapshot/delete_repository');
this.deleteRepository = apiFunc(bindObj, cache, './snapshot/deleteRepository');
this.get = apiFunc(bindObj, cache, './snapshot/get');
this.getRepository = apiFunc(bindObj, cache, './snapshot/get_repository');
this.getRepository = apiFunc(bindObj, cache, './snapshot/getRepository');
this.restore = apiFunc(bindObj, cache, './snapshot/restore');
this.status = apiFunc(bindObj, cache, './snapshot/status');
this.verifyRepository = apiFunc(bindObj, cache, './snapshot/verify_repository');
this.verifyRepository = apiFunc(bindObj, cache, './snapshot/verifyRepository');
}
module.exports = SnapshotApi;

@@ -26,4 +26,4 @@ /*

this.explain = apiFunc(bindObj, cache, './sql/explain');
this.getStats = apiFunc(bindObj, cache, './sql/get_stats');
this.postStats = apiFunc(bindObj, cache, './sql/post_stats');
this.getStats = apiFunc(bindObj, cache, './sql/getStats');
this.postStats = apiFunc(bindObj, cache, './sql/postStats');
this.query = apiFunc(bindObj, cache, './sql/query');

@@ -30,0 +30,0 @@ this.settings = apiFunc(bindObj, cache, './sql/settings');

@@ -43,4 +43,4 @@ /*

import * as errors from './lib/errors';
import { Client } from './types/Client';
import { ClientOptions, NodeOptions, ClientExtendsCallbackOptions } from './types/client_options';
import * as API from './api';
import { Client, ClientOptions, NodeOptions, ClientExtendsCallbackOptions } from './lib/Client';

@@ -57,2 +57,3 @@ declare const events: {

export {
API,
Client,

@@ -59,0 +60,0 @@ Transport,

@@ -32,306 +32,9 @@ /*

const { EventEmitter } = require('events');
const { URL } = require('url');
const debug = require('debug')('opensearch');
const { Client } = require('./lib/Client');
const Transport = require('./lib/Transport');
const { ConnectionPool } = require('./lib/pool');
const Connection = require('./lib/Connection');
const { ConnectionPool, CloudConnectionPool } = require('./lib/pool');
const Helpers = require('./lib/Helpers');
const Serializer = require('./lib/Serializer');
const errors = require('./lib/errors');
const { ConfigurationError } = errors;
const { prepareHeaders } = Connection.internals;
let clientVersion = require('./package.json').version;
/* istanbul ignore next */
if (clientVersion.includes('-')) {
// clean prerelease
clientVersion = clientVersion.slice(0, clientVersion.indexOf('-')) + 'p';
}
const kInitialOptions = Symbol('opensearchjs-initial-options');
const kChild = Symbol('opensearchjs-child');
const kExtensions = Symbol('opensearchjs-extensions');
const kEventEmitter = Symbol('opensearchjs-event-emitter');
const OpenSearchAPI = require('./api');
class Client extends OpenSearchAPI {
constructor(opts = {}) {
super({ ConfigurationError });
if (opts.cloud && opts[kChild] === undefined) {
const { id, username, password } = opts.cloud;
// the cloud id is `cluster-name:base64encodedurl`
// the url is a string divided by two '$', the first is the cloud url
// the second the opensearch instance, the third the opensearchDashboards instance
const cloudUrls = Buffer.from(id.split(':')[1], 'base64').toString().split('$');
// TODO: remove username and password here in 8
if (username && password) {
opts.auth = Object.assign({}, opts.auth, { username, password });
}
opts.node = `https://${cloudUrls[1]}.${cloudUrls[0]}`;
// Cloud has better performances with compression enabled
// see https://github.com/elastic/elasticsearch-py/pull/704.
// So unless the user specifies otherwise, we enable compression.
if (opts.compression == null) opts.compression = 'gzip';
if (opts.suggestCompression == null) opts.suggestCompression = true;
if (opts.ssl == null || (opts.ssl && opts.ssl.secureProtocol == null)) {
opts.ssl = opts.ssl || {};
opts.ssl.secureProtocol = 'TLSv1_2_method';
}
}
if (!opts.node && !opts.nodes) {
throw new ConfigurationError('Missing node(s) option');
}
if (opts[kChild] === undefined) {
const checkAuth = getAuth(opts.node || opts.nodes);
if (checkAuth && checkAuth.username && checkAuth.password) {
opts.auth = Object.assign({}, opts.auth, {
username: checkAuth.username,
password: checkAuth.password,
});
}
}
const options =
opts[kChild] !== undefined
? opts[kChild].initialOptions
: Object.assign(
{},
{
Connection,
Transport,
Serializer,
ConnectionPool: opts.cloud ? CloudConnectionPool : ConnectionPool,
maxRetries: 3,
requestTimeout: 30000,
pingTimeout: 3000,
sniffInterval: false,
sniffOnStart: false,
sniffEndpoint: '_nodes/_all/http',
sniffOnConnectionFault: false,
resurrectStrategy: 'ping',
suggestCompression: false,
compression: false,
ssl: null,
agent: null,
headers: {},
nodeFilter: null,
nodeSelector: 'round-robin',
generateRequestId: null,
name: 'opensearch-js',
auth: null,
opaqueIdPrefix: null,
context: null,
proxy: null,
enableMetaHeader: true,
disablePrototypePoisoningProtection: false,
enableLongNumeralSupport: false,
},
opts
);
if (process.env.OPENSEARCH_CLIENT_APIVERSIONING === 'true') {
options.headers = Object.assign(
{ accept: 'application/vnd.opensearch+json; compatible-with=7' },
options.headers
);
}
this[kInitialOptions] = options;
this[kExtensions] = [];
this.name = options.name;
if (opts[kChild] !== undefined) {
this.serializer = options[kChild].serializer;
this.connectionPool = options[kChild].connectionPool;
this[kEventEmitter] = options[kChild].eventEmitter;
} else {
this[kEventEmitter] = new EventEmitter();
this.serializer = new options.Serializer({
disablePrototypePoisoningProtection: options.disablePrototypePoisoningProtection,
enableLongNumeralSupport: options.enableLongNumeralSupport,
});
this.connectionPool = new options.ConnectionPool({
pingTimeout: options.pingTimeout,
resurrectStrategy: options.resurrectStrategy,
ssl: options.ssl,
agent: options.agent,
proxy: options.proxy,
Connection: options.Connection,
auth: options.auth,
emit: this[kEventEmitter].emit.bind(this[kEventEmitter]),
sniffEnabled:
options.sniffInterval !== false ||
options.sniffOnStart !== false ||
options.sniffOnConnectionFault !== false,
});
// Add the connections before initialize the Transport
this.connectionPool.addConnection(options.node || options.nodes);
}
this.transport = new options.Transport({
emit: this[kEventEmitter].emit.bind(this[kEventEmitter]),
connectionPool: this.connectionPool,
serializer: this.serializer,
maxRetries: options.maxRetries,
requestTimeout: options.requestTimeout,
sniffInterval: options.sniffInterval,
sniffOnStart: options.sniffOnStart,
sniffOnConnectionFault: options.sniffOnConnectionFault,
sniffEndpoint: options.sniffEndpoint,
suggestCompression: options.suggestCompression,
compression: options.compression,
headers: options.headers,
nodeFilter: options.nodeFilter,
nodeSelector: options.nodeSelector,
generateRequestId: options.generateRequestId,
name: options.name,
opaqueIdPrefix: options.opaqueIdPrefix,
context: options.context,
memoryCircuitBreaker: options.memoryCircuitBreaker,
auth: options.auth,
});
this.helpers = new Helpers({
client: this,
maxRetries: options.maxRetries,
});
}
get emit() {
return this[kEventEmitter].emit.bind(this[kEventEmitter]);
}
get on() {
return this[kEventEmitter].on.bind(this[kEventEmitter]);
}
get once() {
return this[kEventEmitter].once.bind(this[kEventEmitter]);
}
get off() {
return this[kEventEmitter].off.bind(this[kEventEmitter]);
}
extend(name, opts, fn) {
if (typeof opts === 'function') {
fn = opts;
opts = {};
}
let [namespace, method] = name.split('.');
if (method == null) {
method = namespace;
namespace = null;
}
if (namespace != null) {
if (this[namespace] != null && this[namespace][method] != null && opts.force !== true) {
throw new Error(`The method "${method}" already exists on namespace "${namespace}"`);
}
if (this[namespace] == null) this[namespace] = {};
this[namespace][method] = fn({
makeRequest: this.transport.request.bind(this.transport),
result: { body: null, statusCode: null, headers: null, warnings: null },
ConfigurationError,
});
} else {
if (this[method] != null && opts.force !== true) {
throw new Error(`The method "${method}" already exists`);
}
this[method] = fn({
makeRequest: this.transport.request.bind(this.transport),
result: { body: null, statusCode: null, headers: null, warnings: null },
ConfigurationError,
});
}
this[kExtensions].push({ name, opts, fn });
}
child(opts) {
// Merge the new options with the initial ones
const options = Object.assign({}, this[kInitialOptions], opts);
// Pass to the child client the parent instances that cannot be overriden
options[kChild] = {
connectionPool: this.connectionPool,
serializer: this.serializer,
eventEmitter: this[kEventEmitter],
initialOptions: options,
};
/* istanbul ignore else */
if (options.auth !== undefined) {
options.headers = prepareHeaders(options.headers, options.auth);
}
const client = new Client(options);
// sync compatible check
const tSymbol = Object.getOwnPropertySymbols(this.transport).filter(
(symbol) => symbol.description === 'compatible check'
)[0];
client.transport[tSymbol] = this.transport[tSymbol];
// Add parent extensions
if (this[kExtensions].length > 0) {
this[kExtensions].forEach(({ name, opts, fn }) => {
client.extend(name, opts, fn);
});
}
return client;
}
close(callback) {
if (callback == null) {
return new Promise((resolve) => {
this.close(resolve);
});
}
debug('Closing the client');
this.connectionPool.empty(callback);
}
}
function getAuth(node) {
if (Array.isArray(node)) {
for (const url of node) {
const auth = getUsernameAndPassword(url);
if (auth.username !== '' && auth.password !== '') {
return auth;
}
}
return null;
}
const auth = getUsernameAndPassword(node);
if (auth.username !== '' && auth.password !== '') {
return auth;
}
return null;
function getUsernameAndPassword(node) {
/* istanbul ignore else */
if (typeof node === 'string') {
const { username, password } = new URL(node);
return {
username: decodeURIComponent(username),
password: decodeURIComponent(password),
};
} else if (node.url instanceof URL) {
return {
username: decodeURIComponent(node.url.username),
password: decodeURIComponent(node.url.password),
};
}
}
}
const events = {

@@ -352,4 +55,4 @@ RESPONSE: 'response',

Serializer,
errors,
events,
errors,
};

@@ -30,3 +30,3 @@ {

"homepage": "https://www.opensearch.org/",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"versionCanary": "7.10.0-canary.6",

@@ -33,0 +33,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc