diff --git a/api/index.js b/api/index.js index ca997bffa..f45a8ccdb 100644 --- a/api/index.js +++ b/api/index.js @@ -27,454 +27,454 @@ function ESAPI (opts) { assert(opts.result, 'Missing default result object') const apis = { - bulk: lazyLoad('./api/bulk.js', opts), + bulk: lazyLoad('bulk', opts), cat: { - aliases: lazyLoad('./api/cat.aliases.js', opts), - allocation: lazyLoad('./api/cat.allocation.js', opts), - count: lazyLoad('./api/cat.count.js', opts), - fielddata: lazyLoad('./api/cat.fielddata.js', opts), - health: lazyLoad('./api/cat.health.js', opts), - help: lazyLoad('./api/cat.help.js', opts), - indices: lazyLoad('./api/cat.indices.js', opts), - master: lazyLoad('./api/cat.master.js', opts), - nodeattrs: lazyLoad('./api/cat.nodeattrs.js', opts), - nodes: lazyLoad('./api/cat.nodes.js', opts), - pending_tasks: lazyLoad('./api/cat.pending_tasks.js', opts), - pendingTasks: lazyLoad('./api/cat.pending_tasks.js', opts), - plugins: lazyLoad('./api/cat.plugins.js', opts), - recovery: lazyLoad('./api/cat.recovery.js', opts), - repositories: lazyLoad('./api/cat.repositories.js', opts), - segments: lazyLoad('./api/cat.segments.js', opts), - shards: lazyLoad('./api/cat.shards.js', opts), - snapshots: lazyLoad('./api/cat.snapshots.js', opts), - tasks: lazyLoad('./api/cat.tasks.js', opts), - templates: lazyLoad('./api/cat.templates.js', opts), - thread_pool: lazyLoad('./api/cat.thread_pool.js', opts), - threadPool: lazyLoad('./api/cat.thread_pool.js', opts) + aliases: lazyLoad('cat.aliases', opts), + allocation: lazyLoad('cat.allocation', opts), + count: lazyLoad('cat.count', opts), + fielddata: lazyLoad('cat.fielddata', opts), + health: lazyLoad('cat.health', opts), + help: lazyLoad('cat.help', opts), + indices: lazyLoad('cat.indices', opts), + master: lazyLoad('cat.master', opts), + nodeattrs: lazyLoad('cat.nodeattrs', opts), + nodes: lazyLoad('cat.nodes', opts), + pending_tasks: lazyLoad('cat.pending_tasks', opts), + pendingTasks: lazyLoad('cat.pending_tasks', opts), + plugins: lazyLoad('cat.plugins', opts), + recovery: lazyLoad('cat.recovery', opts), + repositories: lazyLoad('cat.repositories', opts), + segments: lazyLoad('cat.segments', opts), + shards: lazyLoad('cat.shards', opts), + snapshots: lazyLoad('cat.snapshots', opts), + tasks: lazyLoad('cat.tasks', opts), + templates: lazyLoad('cat.templates', opts), + thread_pool: lazyLoad('cat.thread_pool', opts), + threadPool: lazyLoad('cat.thread_pool', opts) }, ccr: { - delete_auto_follow_pattern: lazyLoad('./api/ccr.delete_auto_follow_pattern.js', opts), - deleteAutoFollowPattern: lazyLoad('./api/ccr.delete_auto_follow_pattern.js', opts), - follow: lazyLoad('./api/ccr.follow.js', opts), - follow_info: lazyLoad('./api/ccr.follow_info.js', opts), - followInfo: lazyLoad('./api/ccr.follow_info.js', opts), - follow_stats: lazyLoad('./api/ccr.follow_stats.js', opts), - followStats: lazyLoad('./api/ccr.follow_stats.js', opts), - get_auto_follow_pattern: lazyLoad('./api/ccr.get_auto_follow_pattern.js', opts), - getAutoFollowPattern: lazyLoad('./api/ccr.get_auto_follow_pattern.js', opts), - pause_follow: lazyLoad('./api/ccr.pause_follow.js', opts), - pauseFollow: lazyLoad('./api/ccr.pause_follow.js', opts), - put_auto_follow_pattern: lazyLoad('./api/ccr.put_auto_follow_pattern.js', opts), - putAutoFollowPattern: lazyLoad('./api/ccr.put_auto_follow_pattern.js', opts), - resume_follow: lazyLoad('./api/ccr.resume_follow.js', opts), - resumeFollow: lazyLoad('./api/ccr.resume_follow.js', opts), - stats: lazyLoad('./api/ccr.stats.js', opts), - unfollow: lazyLoad('./api/ccr.unfollow.js', opts) + delete_auto_follow_pattern: lazyLoad('ccr.delete_auto_follow_pattern', opts), + deleteAutoFollowPattern: lazyLoad('ccr.delete_auto_follow_pattern', opts), + follow: lazyLoad('ccr.follow', opts), + follow_info: lazyLoad('ccr.follow_info', opts), + followInfo: lazyLoad('ccr.follow_info', opts), + follow_stats: lazyLoad('ccr.follow_stats', opts), + followStats: lazyLoad('ccr.follow_stats', opts), + get_auto_follow_pattern: lazyLoad('ccr.get_auto_follow_pattern', opts), + getAutoFollowPattern: lazyLoad('ccr.get_auto_follow_pattern', opts), + pause_follow: lazyLoad('ccr.pause_follow', opts), + pauseFollow: lazyLoad('ccr.pause_follow', opts), + put_auto_follow_pattern: lazyLoad('ccr.put_auto_follow_pattern', opts), + putAutoFollowPattern: lazyLoad('ccr.put_auto_follow_pattern', opts), + resume_follow: lazyLoad('ccr.resume_follow', opts), + resumeFollow: lazyLoad('ccr.resume_follow', opts), + stats: lazyLoad('ccr.stats', opts), + unfollow: lazyLoad('ccr.unfollow', opts) }, - clear_scroll: lazyLoad('./api/clear_scroll.js', opts), - clearScroll: lazyLoad('./api/clear_scroll.js', opts), + clear_scroll: lazyLoad('clear_scroll', opts), + clearScroll: lazyLoad('clear_scroll', opts), cluster: { - allocation_explain: lazyLoad('./api/cluster.allocation_explain.js', opts), - allocationExplain: lazyLoad('./api/cluster.allocation_explain.js', opts), - get_settings: lazyLoad('./api/cluster.get_settings.js', opts), - getSettings: lazyLoad('./api/cluster.get_settings.js', opts), - health: lazyLoad('./api/cluster.health.js', opts), - pending_tasks: lazyLoad('./api/cluster.pending_tasks.js', opts), - pendingTasks: lazyLoad('./api/cluster.pending_tasks.js', opts), - put_settings: lazyLoad('./api/cluster.put_settings.js', opts), - putSettings: lazyLoad('./api/cluster.put_settings.js', opts), - remote_info: lazyLoad('./api/cluster.remote_info.js', opts), - remoteInfo: lazyLoad('./api/cluster.remote_info.js', opts), - reroute: lazyLoad('./api/cluster.reroute.js', opts), - state: lazyLoad('./api/cluster.state.js', opts), - stats: lazyLoad('./api/cluster.stats.js', opts) + allocation_explain: lazyLoad('cluster.allocation_explain', opts), + allocationExplain: lazyLoad('cluster.allocation_explain', opts), + get_settings: lazyLoad('cluster.get_settings', opts), + getSettings: lazyLoad('cluster.get_settings', opts), + health: lazyLoad('cluster.health', opts), + pending_tasks: lazyLoad('cluster.pending_tasks', opts), + pendingTasks: lazyLoad('cluster.pending_tasks', opts), + put_settings: lazyLoad('cluster.put_settings', opts), + putSettings: lazyLoad('cluster.put_settings', opts), + remote_info: lazyLoad('cluster.remote_info', opts), + remoteInfo: lazyLoad('cluster.remote_info', opts), + reroute: lazyLoad('cluster.reroute', opts), + state: lazyLoad('cluster.state', opts), + stats: lazyLoad('cluster.stats', opts) }, - count: lazyLoad('./api/count.js', opts), - create: lazyLoad('./api/create.js', opts), - delete: lazyLoad('./api/delete.js', opts), - delete_by_query: lazyLoad('./api/delete_by_query.js', opts), - deleteByQuery: lazyLoad('./api/delete_by_query.js', opts), - delete_by_query_rethrottle: lazyLoad('./api/delete_by_query_rethrottle.js', opts), - deleteByQueryRethrottle: lazyLoad('./api/delete_by_query_rethrottle.js', opts), - delete_script: lazyLoad('./api/delete_script.js', opts), - deleteScript: lazyLoad('./api/delete_script.js', opts), - exists: lazyLoad('./api/exists.js', opts), - exists_source: lazyLoad('./api/exists_source.js', opts), - existsSource: lazyLoad('./api/exists_source.js', opts), - explain: lazyLoad('./api/explain.js', opts), - field_caps: lazyLoad('./api/field_caps.js', opts), - fieldCaps: lazyLoad('./api/field_caps.js', opts), - get: lazyLoad('./api/get.js', opts), - get_script: lazyLoad('./api/get_script.js', opts), - getScript: lazyLoad('./api/get_script.js', opts), - get_source: lazyLoad('./api/get_source.js', opts), - getSource: lazyLoad('./api/get_source.js', opts), + count: lazyLoad('count', opts), + create: lazyLoad('create', opts), + delete: lazyLoad('delete', opts), + delete_by_query: lazyLoad('delete_by_query', opts), + deleteByQuery: lazyLoad('delete_by_query', opts), + delete_by_query_rethrottle: lazyLoad('delete_by_query_rethrottle', opts), + deleteByQueryRethrottle: lazyLoad('delete_by_query_rethrottle', opts), + delete_script: lazyLoad('delete_script', opts), + deleteScript: lazyLoad('delete_script', opts), + exists: lazyLoad('exists', opts), + exists_source: lazyLoad('exists_source', opts), + existsSource: lazyLoad('exists_source', opts), + explain: lazyLoad('explain', opts), + field_caps: lazyLoad('field_caps', opts), + fieldCaps: lazyLoad('field_caps', opts), + get: lazyLoad('get', opts), + get_script: lazyLoad('get_script', opts), + getScript: lazyLoad('get_script', opts), + get_source: lazyLoad('get_source', opts), + getSource: lazyLoad('get_source', opts), ilm: { - delete_lifecycle: lazyLoad('./api/ilm.delete_lifecycle.js', opts), - deleteLifecycle: lazyLoad('./api/ilm.delete_lifecycle.js', opts), - explain_lifecycle: lazyLoad('./api/ilm.explain_lifecycle.js', opts), - explainLifecycle: lazyLoad('./api/ilm.explain_lifecycle.js', opts), - get_lifecycle: lazyLoad('./api/ilm.get_lifecycle.js', opts), - getLifecycle: lazyLoad('./api/ilm.get_lifecycle.js', opts), - get_status: lazyLoad('./api/ilm.get_status.js', opts), - getStatus: lazyLoad('./api/ilm.get_status.js', opts), - move_to_step: lazyLoad('./api/ilm.move_to_step.js', opts), - moveToStep: lazyLoad('./api/ilm.move_to_step.js', opts), - put_lifecycle: lazyLoad('./api/ilm.put_lifecycle.js', opts), - putLifecycle: lazyLoad('./api/ilm.put_lifecycle.js', opts), - remove_policy: lazyLoad('./api/ilm.remove_policy.js', opts), - removePolicy: lazyLoad('./api/ilm.remove_policy.js', opts), - retry: lazyLoad('./api/ilm.retry.js', opts), - start: lazyLoad('./api/ilm.start.js', opts), - stop: lazyLoad('./api/ilm.stop.js', opts) + delete_lifecycle: lazyLoad('ilm.delete_lifecycle', opts), + deleteLifecycle: lazyLoad('ilm.delete_lifecycle', opts), + explain_lifecycle: lazyLoad('ilm.explain_lifecycle', opts), + explainLifecycle: lazyLoad('ilm.explain_lifecycle', opts), + get_lifecycle: lazyLoad('ilm.get_lifecycle', opts), + getLifecycle: lazyLoad('ilm.get_lifecycle', opts), + get_status: lazyLoad('ilm.get_status', opts), + getStatus: lazyLoad('ilm.get_status', opts), + move_to_step: lazyLoad('ilm.move_to_step', opts), + moveToStep: lazyLoad('ilm.move_to_step', opts), + put_lifecycle: lazyLoad('ilm.put_lifecycle', opts), + putLifecycle: lazyLoad('ilm.put_lifecycle', opts), + remove_policy: lazyLoad('ilm.remove_policy', opts), + removePolicy: lazyLoad('ilm.remove_policy', opts), + retry: lazyLoad('ilm.retry', opts), + start: lazyLoad('ilm.start', opts), + stop: lazyLoad('ilm.stop', opts) }, - index: lazyLoad('./api/index.js', opts), + index: lazyLoad('index', opts), indices: { - analyze: lazyLoad('./api/indices.analyze.js', opts), - clear_cache: lazyLoad('./api/indices.clear_cache.js', opts), - clearCache: lazyLoad('./api/indices.clear_cache.js', opts), - close: lazyLoad('./api/indices.close.js', opts), - create: lazyLoad('./api/indices.create.js', opts), - delete: lazyLoad('./api/indices.delete.js', opts), - delete_alias: lazyLoad('./api/indices.delete_alias.js', opts), - deleteAlias: lazyLoad('./api/indices.delete_alias.js', opts), - delete_template: lazyLoad('./api/indices.delete_template.js', opts), - deleteTemplate: lazyLoad('./api/indices.delete_template.js', opts), - exists: lazyLoad('./api/indices.exists.js', opts), - exists_alias: lazyLoad('./api/indices.exists_alias.js', opts), - existsAlias: lazyLoad('./api/indices.exists_alias.js', opts), - exists_template: lazyLoad('./api/indices.exists_template.js', opts), - existsTemplate: lazyLoad('./api/indices.exists_template.js', opts), - exists_type: lazyLoad('./api/indices.exists_type.js', opts), - existsType: lazyLoad('./api/indices.exists_type.js', opts), - flush: lazyLoad('./api/indices.flush.js', opts), - flush_synced: lazyLoad('./api/indices.flush_synced.js', opts), - flushSynced: lazyLoad('./api/indices.flush_synced.js', opts), - forcemerge: lazyLoad('./api/indices.forcemerge.js', opts), - freeze: lazyLoad('./api/indices.freeze.js', opts), - get: lazyLoad('./api/indices.get.js', opts), - get_alias: lazyLoad('./api/indices.get_alias.js', opts), - getAlias: lazyLoad('./api/indices.get_alias.js', opts), - get_field_mapping: lazyLoad('./api/indices.get_field_mapping.js', opts), - getFieldMapping: lazyLoad('./api/indices.get_field_mapping.js', opts), - get_mapping: lazyLoad('./api/indices.get_mapping.js', opts), - getMapping: lazyLoad('./api/indices.get_mapping.js', opts), - get_settings: lazyLoad('./api/indices.get_settings.js', opts), - getSettings: lazyLoad('./api/indices.get_settings.js', opts), - get_template: lazyLoad('./api/indices.get_template.js', opts), - getTemplate: lazyLoad('./api/indices.get_template.js', opts), - get_upgrade: lazyLoad('./api/indices.get_upgrade.js', opts), - getUpgrade: lazyLoad('./api/indices.get_upgrade.js', opts), - open: lazyLoad('./api/indices.open.js', opts), - put_alias: lazyLoad('./api/indices.put_alias.js', opts), - putAlias: lazyLoad('./api/indices.put_alias.js', opts), - put_mapping: lazyLoad('./api/indices.put_mapping.js', opts), - putMapping: lazyLoad('./api/indices.put_mapping.js', opts), - put_settings: lazyLoad('./api/indices.put_settings.js', opts), - putSettings: lazyLoad('./api/indices.put_settings.js', opts), - put_template: lazyLoad('./api/indices.put_template.js', opts), - putTemplate: lazyLoad('./api/indices.put_template.js', opts), - recovery: lazyLoad('./api/indices.recovery.js', opts), - refresh: lazyLoad('./api/indices.refresh.js', opts), - rollover: lazyLoad('./api/indices.rollover.js', opts), - segments: lazyLoad('./api/indices.segments.js', opts), - shard_stores: lazyLoad('./api/indices.shard_stores.js', opts), - shardStores: lazyLoad('./api/indices.shard_stores.js', opts), - shrink: lazyLoad('./api/indices.shrink.js', opts), - split: lazyLoad('./api/indices.split.js', opts), - stats: lazyLoad('./api/indices.stats.js', opts), - unfreeze: lazyLoad('./api/indices.unfreeze.js', opts), - update_aliases: lazyLoad('./api/indices.update_aliases.js', opts), - updateAliases: lazyLoad('./api/indices.update_aliases.js', opts), - upgrade: lazyLoad('./api/indices.upgrade.js', opts), - validate_query: lazyLoad('./api/indices.validate_query.js', opts), - validateQuery: lazyLoad('./api/indices.validate_query.js', opts) + analyze: lazyLoad('indices.analyze', opts), + clear_cache: lazyLoad('indices.clear_cache', opts), + clearCache: lazyLoad('indices.clear_cache', opts), + close: lazyLoad('indices.close', opts), + create: lazyLoad('indices.create', opts), + delete: lazyLoad('indices.delete', opts), + delete_alias: lazyLoad('indices.delete_alias', opts), + deleteAlias: lazyLoad('indices.delete_alias', opts), + delete_template: lazyLoad('indices.delete_template', opts), + deleteTemplate: lazyLoad('indices.delete_template', opts), + exists: lazyLoad('indices.exists', opts), + exists_alias: lazyLoad('indices.exists_alias', opts), + existsAlias: lazyLoad('indices.exists_alias', opts), + exists_template: lazyLoad('indices.exists_template', opts), + existsTemplate: lazyLoad('indices.exists_template', opts), + exists_type: lazyLoad('indices.exists_type', opts), + existsType: lazyLoad('indices.exists_type', opts), + flush: lazyLoad('indices.flush', opts), + flush_synced: lazyLoad('indices.flush_synced', opts), + flushSynced: lazyLoad('indices.flush_synced', opts), + forcemerge: lazyLoad('indices.forcemerge', opts), + freeze: lazyLoad('indices.freeze', opts), + get: lazyLoad('indices.get', opts), + get_alias: lazyLoad('indices.get_alias', opts), + getAlias: lazyLoad('indices.get_alias', opts), + get_field_mapping: lazyLoad('indices.get_field_mapping', opts), + getFieldMapping: lazyLoad('indices.get_field_mapping', opts), + get_mapping: lazyLoad('indices.get_mapping', opts), + getMapping: lazyLoad('indices.get_mapping', opts), + get_settings: lazyLoad('indices.get_settings', opts), + getSettings: lazyLoad('indices.get_settings', opts), + get_template: lazyLoad('indices.get_template', opts), + getTemplate: lazyLoad('indices.get_template', opts), + get_upgrade: lazyLoad('indices.get_upgrade', opts), + getUpgrade: lazyLoad('indices.get_upgrade', opts), + open: lazyLoad('indices.open', opts), + put_alias: lazyLoad('indices.put_alias', opts), + putAlias: lazyLoad('indices.put_alias', opts), + put_mapping: lazyLoad('indices.put_mapping', opts), + putMapping: lazyLoad('indices.put_mapping', opts), + put_settings: lazyLoad('indices.put_settings', opts), + putSettings: lazyLoad('indices.put_settings', opts), + put_template: lazyLoad('indices.put_template', opts), + putTemplate: lazyLoad('indices.put_template', opts), + recovery: lazyLoad('indices.recovery', opts), + refresh: lazyLoad('indices.refresh', opts), + rollover: lazyLoad('indices.rollover', opts), + segments: lazyLoad('indices.segments', opts), + shard_stores: lazyLoad('indices.shard_stores', opts), + shardStores: lazyLoad('indices.shard_stores', opts), + shrink: lazyLoad('indices.shrink', opts), + split: lazyLoad('indices.split', opts), + stats: lazyLoad('indices.stats', opts), + unfreeze: lazyLoad('indices.unfreeze', opts), + update_aliases: lazyLoad('indices.update_aliases', opts), + updateAliases: lazyLoad('indices.update_aliases', opts), + upgrade: lazyLoad('indices.upgrade', opts), + validate_query: lazyLoad('indices.validate_query', opts), + validateQuery: lazyLoad('indices.validate_query', opts) }, - info: lazyLoad('./api/info.js', opts), + info: lazyLoad('info', opts), ingest: { - delete_pipeline: lazyLoad('./api/ingest.delete_pipeline.js', opts), - deletePipeline: lazyLoad('./api/ingest.delete_pipeline.js', opts), - get_pipeline: lazyLoad('./api/ingest.get_pipeline.js', opts), - getPipeline: lazyLoad('./api/ingest.get_pipeline.js', opts), - processor_grok: lazyLoad('./api/ingest.processor_grok.js', opts), - processorGrok: lazyLoad('./api/ingest.processor_grok.js', opts), - put_pipeline: lazyLoad('./api/ingest.put_pipeline.js', opts), - putPipeline: lazyLoad('./api/ingest.put_pipeline.js', opts), - simulate: lazyLoad('./api/ingest.simulate.js', opts) + delete_pipeline: lazyLoad('ingest.delete_pipeline', opts), + deletePipeline: lazyLoad('ingest.delete_pipeline', opts), + get_pipeline: lazyLoad('ingest.get_pipeline', opts), + getPipeline: lazyLoad('ingest.get_pipeline', opts), + processor_grok: lazyLoad('ingest.processor_grok', opts), + processorGrok: lazyLoad('ingest.processor_grok', opts), + put_pipeline: lazyLoad('ingest.put_pipeline', opts), + putPipeline: lazyLoad('ingest.put_pipeline', opts), + simulate: lazyLoad('ingest.simulate', opts) }, - mget: lazyLoad('./api/mget.js', opts), + mget: lazyLoad('mget', opts), ml: { - close_job: lazyLoad('./api/ml.close_job.js', opts), - closeJob: lazyLoad('./api/ml.close_job.js', opts), - delete_calendar: lazyLoad('./api/ml.delete_calendar.js', opts), - deleteCalendar: lazyLoad('./api/ml.delete_calendar.js', opts), - delete_calendar_event: lazyLoad('./api/ml.delete_calendar_event.js', opts), - deleteCalendarEvent: lazyLoad('./api/ml.delete_calendar_event.js', opts), - delete_calendar_job: lazyLoad('./api/ml.delete_calendar_job.js', opts), - deleteCalendarJob: lazyLoad('./api/ml.delete_calendar_job.js', opts), - delete_datafeed: lazyLoad('./api/ml.delete_datafeed.js', opts), - deleteDatafeed: lazyLoad('./api/ml.delete_datafeed.js', opts), - delete_expired_data: lazyLoad('./api/ml.delete_expired_data.js', opts), - deleteExpiredData: lazyLoad('./api/ml.delete_expired_data.js', opts), - delete_filter: lazyLoad('./api/ml.delete_filter.js', opts), - deleteFilter: lazyLoad('./api/ml.delete_filter.js', opts), - delete_forecast: lazyLoad('./api/ml.delete_forecast.js', opts), - deleteForecast: lazyLoad('./api/ml.delete_forecast.js', opts), - delete_job: lazyLoad('./api/ml.delete_job.js', opts), - deleteJob: lazyLoad('./api/ml.delete_job.js', opts), - delete_model_snapshot: lazyLoad('./api/ml.delete_model_snapshot.js', opts), - deleteModelSnapshot: lazyLoad('./api/ml.delete_model_snapshot.js', opts), - find_file_structure: lazyLoad('./api/ml.find_file_structure.js', opts), - findFileStructure: lazyLoad('./api/ml.find_file_structure.js', opts), - flush_job: lazyLoad('./api/ml.flush_job.js', opts), - flushJob: lazyLoad('./api/ml.flush_job.js', opts), - forecast: lazyLoad('./api/ml.forecast.js', opts), - get_buckets: lazyLoad('./api/ml.get_buckets.js', opts), - getBuckets: lazyLoad('./api/ml.get_buckets.js', opts), - get_calendar_events: lazyLoad('./api/ml.get_calendar_events.js', opts), - getCalendarEvents: lazyLoad('./api/ml.get_calendar_events.js', opts), - get_calendars: lazyLoad('./api/ml.get_calendars.js', opts), - getCalendars: lazyLoad('./api/ml.get_calendars.js', opts), - get_categories: lazyLoad('./api/ml.get_categories.js', opts), - getCategories: lazyLoad('./api/ml.get_categories.js', opts), - get_datafeed_stats: lazyLoad('./api/ml.get_datafeed_stats.js', opts), - getDatafeedStats: lazyLoad('./api/ml.get_datafeed_stats.js', opts), - get_datafeeds: lazyLoad('./api/ml.get_datafeeds.js', opts), - getDatafeeds: lazyLoad('./api/ml.get_datafeeds.js', opts), - get_filters: lazyLoad('./api/ml.get_filters.js', opts), - getFilters: lazyLoad('./api/ml.get_filters.js', opts), - get_influencers: lazyLoad('./api/ml.get_influencers.js', opts), - getInfluencers: lazyLoad('./api/ml.get_influencers.js', opts), - get_job_stats: lazyLoad('./api/ml.get_job_stats.js', opts), - getJobStats: lazyLoad('./api/ml.get_job_stats.js', opts), - get_jobs: lazyLoad('./api/ml.get_jobs.js', opts), - getJobs: lazyLoad('./api/ml.get_jobs.js', opts), - get_model_snapshots: lazyLoad('./api/ml.get_model_snapshots.js', opts), - getModelSnapshots: lazyLoad('./api/ml.get_model_snapshots.js', opts), - get_overall_buckets: lazyLoad('./api/ml.get_overall_buckets.js', opts), - getOverallBuckets: lazyLoad('./api/ml.get_overall_buckets.js', opts), - get_records: lazyLoad('./api/ml.get_records.js', opts), - getRecords: lazyLoad('./api/ml.get_records.js', opts), - info: lazyLoad('./api/ml.info.js', opts), - open_job: lazyLoad('./api/ml.open_job.js', opts), - openJob: lazyLoad('./api/ml.open_job.js', opts), - post_calendar_events: lazyLoad('./api/ml.post_calendar_events.js', opts), - postCalendarEvents: lazyLoad('./api/ml.post_calendar_events.js', opts), - post_data: lazyLoad('./api/ml.post_data.js', opts), - postData: lazyLoad('./api/ml.post_data.js', opts), - preview_datafeed: lazyLoad('./api/ml.preview_datafeed.js', opts), - previewDatafeed: lazyLoad('./api/ml.preview_datafeed.js', opts), - put_calendar: lazyLoad('./api/ml.put_calendar.js', opts), - putCalendar: lazyLoad('./api/ml.put_calendar.js', opts), - put_calendar_job: lazyLoad('./api/ml.put_calendar_job.js', opts), - putCalendarJob: lazyLoad('./api/ml.put_calendar_job.js', opts), - put_datafeed: lazyLoad('./api/ml.put_datafeed.js', opts), - putDatafeed: lazyLoad('./api/ml.put_datafeed.js', opts), - put_filter: lazyLoad('./api/ml.put_filter.js', opts), - putFilter: lazyLoad('./api/ml.put_filter.js', opts), - put_job: lazyLoad('./api/ml.put_job.js', opts), - putJob: lazyLoad('./api/ml.put_job.js', opts), - revert_model_snapshot: lazyLoad('./api/ml.revert_model_snapshot.js', opts), - revertModelSnapshot: lazyLoad('./api/ml.revert_model_snapshot.js', opts), - set_upgrade_mode: lazyLoad('./api/ml.set_upgrade_mode.js', opts), - setUpgradeMode: lazyLoad('./api/ml.set_upgrade_mode.js', opts), - start_datafeed: lazyLoad('./api/ml.start_datafeed.js', opts), - startDatafeed: lazyLoad('./api/ml.start_datafeed.js', opts), - stop_datafeed: lazyLoad('./api/ml.stop_datafeed.js', opts), - stopDatafeed: lazyLoad('./api/ml.stop_datafeed.js', opts), - update_datafeed: lazyLoad('./api/ml.update_datafeed.js', opts), - updateDatafeed: lazyLoad('./api/ml.update_datafeed.js', opts), - update_filter: lazyLoad('./api/ml.update_filter.js', opts), - updateFilter: lazyLoad('./api/ml.update_filter.js', opts), - update_job: lazyLoad('./api/ml.update_job.js', opts), - updateJob: lazyLoad('./api/ml.update_job.js', opts), - update_model_snapshot: lazyLoad('./api/ml.update_model_snapshot.js', opts), - updateModelSnapshot: lazyLoad('./api/ml.update_model_snapshot.js', opts), - validate: lazyLoad('./api/ml.validate.js', opts), - validate_detector: lazyLoad('./api/ml.validate_detector.js', opts), - validateDetector: lazyLoad('./api/ml.validate_detector.js', opts) + close_job: lazyLoad('ml.close_job', opts), + closeJob: lazyLoad('ml.close_job', opts), + delete_calendar: lazyLoad('ml.delete_calendar', opts), + deleteCalendar: lazyLoad('ml.delete_calendar', opts), + delete_calendar_event: lazyLoad('ml.delete_calendar_event', opts), + deleteCalendarEvent: lazyLoad('ml.delete_calendar_event', opts), + delete_calendar_job: lazyLoad('ml.delete_calendar_job', opts), + deleteCalendarJob: lazyLoad('ml.delete_calendar_job', opts), + delete_datafeed: lazyLoad('ml.delete_datafeed', opts), + deleteDatafeed: lazyLoad('ml.delete_datafeed', opts), + delete_expired_data: lazyLoad('ml.delete_expired_data', opts), + deleteExpiredData: lazyLoad('ml.delete_expired_data', opts), + delete_filter: lazyLoad('ml.delete_filter', opts), + deleteFilter: lazyLoad('ml.delete_filter', opts), + delete_forecast: lazyLoad('ml.delete_forecast', opts), + deleteForecast: lazyLoad('ml.delete_forecast', opts), + delete_job: lazyLoad('ml.delete_job', opts), + deleteJob: lazyLoad('ml.delete_job', opts), + delete_model_snapshot: lazyLoad('ml.delete_model_snapshot', opts), + deleteModelSnapshot: lazyLoad('ml.delete_model_snapshot', opts), + find_file_structure: lazyLoad('ml.find_file_structure', opts), + findFileStructure: lazyLoad('ml.find_file_structure', opts), + flush_job: lazyLoad('ml.flush_job', opts), + flushJob: lazyLoad('ml.flush_job', opts), + forecast: lazyLoad('ml.forecast', opts), + get_buckets: lazyLoad('ml.get_buckets', opts), + getBuckets: lazyLoad('ml.get_buckets', opts), + get_calendar_events: lazyLoad('ml.get_calendar_events', opts), + getCalendarEvents: lazyLoad('ml.get_calendar_events', opts), + get_calendars: lazyLoad('ml.get_calendars', opts), + getCalendars: lazyLoad('ml.get_calendars', opts), + get_categories: lazyLoad('ml.get_categories', opts), + getCategories: lazyLoad('ml.get_categories', opts), + get_datafeed_stats: lazyLoad('ml.get_datafeed_stats', opts), + getDatafeedStats: lazyLoad('ml.get_datafeed_stats', opts), + get_datafeeds: lazyLoad('ml.get_datafeeds', opts), + getDatafeeds: lazyLoad('ml.get_datafeeds', opts), + get_filters: lazyLoad('ml.get_filters', opts), + getFilters: lazyLoad('ml.get_filters', opts), + get_influencers: lazyLoad('ml.get_influencers', opts), + getInfluencers: lazyLoad('ml.get_influencers', opts), + get_job_stats: lazyLoad('ml.get_job_stats', opts), + getJobStats: lazyLoad('ml.get_job_stats', opts), + get_jobs: lazyLoad('ml.get_jobs', opts), + getJobs: lazyLoad('ml.get_jobs', opts), + get_model_snapshots: lazyLoad('ml.get_model_snapshots', opts), + getModelSnapshots: lazyLoad('ml.get_model_snapshots', opts), + get_overall_buckets: lazyLoad('ml.get_overall_buckets', opts), + getOverallBuckets: lazyLoad('ml.get_overall_buckets', opts), + get_records: lazyLoad('ml.get_records', opts), + getRecords: lazyLoad('ml.get_records', opts), + info: lazyLoad('ml.info', opts), + open_job: lazyLoad('ml.open_job', opts), + openJob: lazyLoad('ml.open_job', opts), + post_calendar_events: lazyLoad('ml.post_calendar_events', opts), + postCalendarEvents: lazyLoad('ml.post_calendar_events', opts), + post_data: lazyLoad('ml.post_data', opts), + postData: lazyLoad('ml.post_data', opts), + preview_datafeed: lazyLoad('ml.preview_datafeed', opts), + previewDatafeed: lazyLoad('ml.preview_datafeed', opts), + put_calendar: lazyLoad('ml.put_calendar', opts), + putCalendar: lazyLoad('ml.put_calendar', opts), + put_calendar_job: lazyLoad('ml.put_calendar_job', opts), + putCalendarJob: lazyLoad('ml.put_calendar_job', opts), + put_datafeed: lazyLoad('ml.put_datafeed', opts), + putDatafeed: lazyLoad('ml.put_datafeed', opts), + put_filter: lazyLoad('ml.put_filter', opts), + putFilter: lazyLoad('ml.put_filter', opts), + put_job: lazyLoad('ml.put_job', opts), + putJob: lazyLoad('ml.put_job', opts), + revert_model_snapshot: lazyLoad('ml.revert_model_snapshot', opts), + revertModelSnapshot: lazyLoad('ml.revert_model_snapshot', opts), + set_upgrade_mode: lazyLoad('ml.set_upgrade_mode', opts), + setUpgradeMode: lazyLoad('ml.set_upgrade_mode', opts), + start_datafeed: lazyLoad('ml.start_datafeed', opts), + startDatafeed: lazyLoad('ml.start_datafeed', opts), + stop_datafeed: lazyLoad('ml.stop_datafeed', opts), + stopDatafeed: lazyLoad('ml.stop_datafeed', opts), + update_datafeed: lazyLoad('ml.update_datafeed', opts), + updateDatafeed: lazyLoad('ml.update_datafeed', opts), + update_filter: lazyLoad('ml.update_filter', opts), + updateFilter: lazyLoad('ml.update_filter', opts), + update_job: lazyLoad('ml.update_job', opts), + updateJob: lazyLoad('ml.update_job', opts), + update_model_snapshot: lazyLoad('ml.update_model_snapshot', opts), + updateModelSnapshot: lazyLoad('ml.update_model_snapshot', opts), + validate: lazyLoad('ml.validate', opts), + validate_detector: lazyLoad('ml.validate_detector', opts), + validateDetector: lazyLoad('ml.validate_detector', opts) }, monitoring: { - bulk: lazyLoad('./api/monitoring.bulk.js', opts) + bulk: lazyLoad('monitoring.bulk', opts) }, - msearch: lazyLoad('./api/msearch.js', opts), - msearch_template: lazyLoad('./api/msearch_template.js', opts), - msearchTemplate: lazyLoad('./api/msearch_template.js', opts), - mtermvectors: lazyLoad('./api/mtermvectors.js', opts), + msearch: lazyLoad('msearch', opts), + msearch_template: lazyLoad('msearch_template', opts), + msearchTemplate: lazyLoad('msearch_template', opts), + mtermvectors: lazyLoad('mtermvectors', opts), nodes: { - hot_threads: lazyLoad('./api/nodes.hot_threads.js', opts), - hotThreads: lazyLoad('./api/nodes.hot_threads.js', opts), - info: lazyLoad('./api/nodes.info.js', opts), - reload_secure_settings: lazyLoad('./api/nodes.reload_secure_settings.js', opts), - reloadSecureSettings: lazyLoad('./api/nodes.reload_secure_settings.js', opts), - stats: lazyLoad('./api/nodes.stats.js', opts), - usage: lazyLoad('./api/nodes.usage.js', opts) + hot_threads: lazyLoad('nodes.hot_threads', opts), + hotThreads: lazyLoad('nodes.hot_threads', opts), + info: lazyLoad('nodes.info', opts), + reload_secure_settings: lazyLoad('nodes.reload_secure_settings', opts), + reloadSecureSettings: lazyLoad('nodes.reload_secure_settings', opts), + stats: lazyLoad('nodes.stats', opts), + usage: lazyLoad('nodes.usage', opts) }, - ping: lazyLoad('./api/ping.js', opts), - put_script: lazyLoad('./api/put_script.js', opts), - putScript: lazyLoad('./api/put_script.js', opts), - rank_eval: lazyLoad('./api/rank_eval.js', opts), - rankEval: lazyLoad('./api/rank_eval.js', opts), - reindex: lazyLoad('./api/reindex.js', opts), - reindex_rethrottle: lazyLoad('./api/reindex_rethrottle.js', opts), - reindexRethrottle: lazyLoad('./api/reindex_rethrottle.js', opts), - render_search_template: lazyLoad('./api/render_search_template.js', opts), - renderSearchTemplate: lazyLoad('./api/render_search_template.js', opts), - scripts_painless_execute: lazyLoad('./api/scripts_painless_execute.js', opts), - scriptsPainlessExecute: lazyLoad('./api/scripts_painless_execute.js', opts), - scroll: lazyLoad('./api/scroll.js', opts), - search: lazyLoad('./api/search.js', opts), - search_shards: lazyLoad('./api/search_shards.js', opts), - searchShards: lazyLoad('./api/search_shards.js', opts), - search_template: lazyLoad('./api/search_template.js', opts), - searchTemplate: lazyLoad('./api/search_template.js', opts), + ping: lazyLoad('ping', opts), + put_script: lazyLoad('put_script', opts), + putScript: lazyLoad('put_script', opts), + rank_eval: lazyLoad('rank_eval', opts), + rankEval: lazyLoad('rank_eval', opts), + reindex: lazyLoad('reindex', opts), + reindex_rethrottle: lazyLoad('reindex_rethrottle', opts), + reindexRethrottle: lazyLoad('reindex_rethrottle', opts), + render_search_template: lazyLoad('render_search_template', opts), + renderSearchTemplate: lazyLoad('render_search_template', opts), + scripts_painless_execute: lazyLoad('scripts_painless_execute', opts), + scriptsPainlessExecute: lazyLoad('scripts_painless_execute', opts), + scroll: lazyLoad('scroll', opts), + search: lazyLoad('search', opts), + search_shards: lazyLoad('search_shards', opts), + searchShards: lazyLoad('search_shards', opts), + search_template: lazyLoad('search_template', opts), + searchTemplate: lazyLoad('search_template', opts), security: { - authenticate: lazyLoad('./api/security.authenticate.js', opts), - change_password: lazyLoad('./api/security.change_password.js', opts), - changePassword: lazyLoad('./api/security.change_password.js', opts), - clear_cached_realms: lazyLoad('./api/security.clear_cached_realms.js', opts), - clearCachedRealms: lazyLoad('./api/security.clear_cached_realms.js', opts), - clear_cached_roles: lazyLoad('./api/security.clear_cached_roles.js', opts), - clearCachedRoles: lazyLoad('./api/security.clear_cached_roles.js', opts), - create_api_key: lazyLoad('./api/security.create_api_key.js', opts), - createApiKey: lazyLoad('./api/security.create_api_key.js', opts), - delete_privileges: lazyLoad('./api/security.delete_privileges.js', opts), - deletePrivileges: lazyLoad('./api/security.delete_privileges.js', opts), - delete_role: lazyLoad('./api/security.delete_role.js', opts), - deleteRole: lazyLoad('./api/security.delete_role.js', opts), - delete_role_mapping: lazyLoad('./api/security.delete_role_mapping.js', opts), - deleteRoleMapping: lazyLoad('./api/security.delete_role_mapping.js', opts), - delete_user: lazyLoad('./api/security.delete_user.js', opts), - deleteUser: lazyLoad('./api/security.delete_user.js', opts), - disable_user: lazyLoad('./api/security.disable_user.js', opts), - disableUser: lazyLoad('./api/security.disable_user.js', opts), - enable_user: lazyLoad('./api/security.enable_user.js', opts), - enableUser: lazyLoad('./api/security.enable_user.js', opts), - get_api_key: lazyLoad('./api/security.get_api_key.js', opts), - getApiKey: lazyLoad('./api/security.get_api_key.js', opts), - get_privileges: lazyLoad('./api/security.get_privileges.js', opts), - getPrivileges: lazyLoad('./api/security.get_privileges.js', opts), - get_role: lazyLoad('./api/security.get_role.js', opts), - getRole: lazyLoad('./api/security.get_role.js', opts), - get_role_mapping: lazyLoad('./api/security.get_role_mapping.js', opts), - getRoleMapping: lazyLoad('./api/security.get_role_mapping.js', opts), - get_token: lazyLoad('./api/security.get_token.js', opts), - getToken: lazyLoad('./api/security.get_token.js', opts), - get_user: lazyLoad('./api/security.get_user.js', opts), - getUser: lazyLoad('./api/security.get_user.js', opts), - get_user_privileges: lazyLoad('./api/security.get_user_privileges.js', opts), - getUserPrivileges: lazyLoad('./api/security.get_user_privileges.js', opts), - has_privileges: lazyLoad('./api/security.has_privileges.js', opts), - hasPrivileges: lazyLoad('./api/security.has_privileges.js', opts), - invalidate_api_key: lazyLoad('./api/security.invalidate_api_key.js', opts), - invalidateApiKey: lazyLoad('./api/security.invalidate_api_key.js', opts), - invalidate_token: lazyLoad('./api/security.invalidate_token.js', opts), - invalidateToken: lazyLoad('./api/security.invalidate_token.js', opts), - put_privileges: lazyLoad('./api/security.put_privileges.js', opts), - putPrivileges: lazyLoad('./api/security.put_privileges.js', opts), - put_role: lazyLoad('./api/security.put_role.js', opts), - putRole: lazyLoad('./api/security.put_role.js', opts), - put_role_mapping: lazyLoad('./api/security.put_role_mapping.js', opts), - putRoleMapping: lazyLoad('./api/security.put_role_mapping.js', opts), - put_user: lazyLoad('./api/security.put_user.js', opts), - putUser: lazyLoad('./api/security.put_user.js', opts) + authenticate: lazyLoad('security.authenticate', opts), + change_password: lazyLoad('security.change_password', opts), + changePassword: lazyLoad('security.change_password', opts), + clear_cached_realms: lazyLoad('security.clear_cached_realms', opts), + clearCachedRealms: lazyLoad('security.clear_cached_realms', opts), + clear_cached_roles: lazyLoad('security.clear_cached_roles', opts), + clearCachedRoles: lazyLoad('security.clear_cached_roles', opts), + create_api_key: lazyLoad('security.create_api_key', opts), + createApiKey: lazyLoad('security.create_api_key', opts), + delete_privileges: lazyLoad('security.delete_privileges', opts), + deletePrivileges: lazyLoad('security.delete_privileges', opts), + delete_role: lazyLoad('security.delete_role', opts), + deleteRole: lazyLoad('security.delete_role', opts), + delete_role_mapping: lazyLoad('security.delete_role_mapping', opts), + deleteRoleMapping: lazyLoad('security.delete_role_mapping', opts), + delete_user: lazyLoad('security.delete_user', opts), + deleteUser: lazyLoad('security.delete_user', opts), + disable_user: lazyLoad('security.disable_user', opts), + disableUser: lazyLoad('security.disable_user', opts), + enable_user: lazyLoad('security.enable_user', opts), + enableUser: lazyLoad('security.enable_user', opts), + get_api_key: lazyLoad('security.get_api_key', opts), + getApiKey: lazyLoad('security.get_api_key', opts), + get_privileges: lazyLoad('security.get_privileges', opts), + getPrivileges: lazyLoad('security.get_privileges', opts), + get_role: lazyLoad('security.get_role', opts), + getRole: lazyLoad('security.get_role', opts), + get_role_mapping: lazyLoad('security.get_role_mapping', opts), + getRoleMapping: lazyLoad('security.get_role_mapping', opts), + get_token: lazyLoad('security.get_token', opts), + getToken: lazyLoad('security.get_token', opts), + get_user: lazyLoad('security.get_user', opts), + getUser: lazyLoad('security.get_user', opts), + get_user_privileges: lazyLoad('security.get_user_privileges', opts), + getUserPrivileges: lazyLoad('security.get_user_privileges', opts), + has_privileges: lazyLoad('security.has_privileges', opts), + hasPrivileges: lazyLoad('security.has_privileges', opts), + invalidate_api_key: lazyLoad('security.invalidate_api_key', opts), + invalidateApiKey: lazyLoad('security.invalidate_api_key', opts), + invalidate_token: lazyLoad('security.invalidate_token', opts), + invalidateToken: lazyLoad('security.invalidate_token', opts), + put_privileges: lazyLoad('security.put_privileges', opts), + putPrivileges: lazyLoad('security.put_privileges', opts), + put_role: lazyLoad('security.put_role', opts), + putRole: lazyLoad('security.put_role', opts), + put_role_mapping: lazyLoad('security.put_role_mapping', opts), + putRoleMapping: lazyLoad('security.put_role_mapping', opts), + put_user: lazyLoad('security.put_user', opts), + putUser: lazyLoad('security.put_user', opts) }, snapshot: { - create: lazyLoad('./api/snapshot.create.js', opts), - create_repository: lazyLoad('./api/snapshot.create_repository.js', opts), - createRepository: lazyLoad('./api/snapshot.create_repository.js', opts), - delete: lazyLoad('./api/snapshot.delete.js', opts), - delete_repository: lazyLoad('./api/snapshot.delete_repository.js', opts), - deleteRepository: lazyLoad('./api/snapshot.delete_repository.js', opts), - get: lazyLoad('./api/snapshot.get.js', opts), - get_repository: lazyLoad('./api/snapshot.get_repository.js', opts), - getRepository: lazyLoad('./api/snapshot.get_repository.js', opts), - restore: lazyLoad('./api/snapshot.restore.js', opts), - status: lazyLoad('./api/snapshot.status.js', opts), - verify_repository: lazyLoad('./api/snapshot.verify_repository.js', opts), - verifyRepository: lazyLoad('./api/snapshot.verify_repository.js', opts) + create: lazyLoad('snapshot.create', opts), + create_repository: lazyLoad('snapshot.create_repository', opts), + createRepository: lazyLoad('snapshot.create_repository', opts), + delete: lazyLoad('snapshot.delete', opts), + delete_repository: lazyLoad('snapshot.delete_repository', opts), + deleteRepository: lazyLoad('snapshot.delete_repository', opts), + get: lazyLoad('snapshot.get', opts), + get_repository: lazyLoad('snapshot.get_repository', opts), + getRepository: lazyLoad('snapshot.get_repository', opts), + restore: lazyLoad('snapshot.restore', opts), + status: lazyLoad('snapshot.status', opts), + verify_repository: lazyLoad('snapshot.verify_repository', opts), + verifyRepository: lazyLoad('snapshot.verify_repository', opts) }, ssl: { - certificates: lazyLoad('./api/ssl.certificates.js', opts) + certificates: lazyLoad('ssl.certificates', opts) }, tasks: { - cancel: lazyLoad('./api/tasks.cancel.js', opts), - get: lazyLoad('./api/tasks.get.js', opts), - list: lazyLoad('./api/tasks.list.js', opts) + cancel: lazyLoad('tasks.cancel', opts), + get: lazyLoad('tasks.get', opts), + list: lazyLoad('tasks.list', opts) }, - termvectors: lazyLoad('./api/termvectors.js', opts), - update: lazyLoad('./api/update.js', opts), - update_by_query: lazyLoad('./api/update_by_query.js', opts), - updateByQuery: lazyLoad('./api/update_by_query.js', opts), - update_by_query_rethrottle: lazyLoad('./api/update_by_query_rethrottle.js', opts), - updateByQueryRethrottle: lazyLoad('./api/update_by_query_rethrottle.js', opts), + termvectors: lazyLoad('termvectors', opts), + update: lazyLoad('update', opts), + update_by_query: lazyLoad('update_by_query', opts), + updateByQuery: lazyLoad('update_by_query', opts), + update_by_query_rethrottle: lazyLoad('update_by_query_rethrottle', opts), + updateByQueryRethrottle: lazyLoad('update_by_query_rethrottle', opts), xpack: { graph: { - explore: lazyLoad('./api/xpack.graph.explore.js', opts) + explore: lazyLoad('xpack.graph.explore', opts) }, - info: lazyLoad('./api/xpack.info.js', opts), + info: lazyLoad('xpack.info', opts), license: { - delete: lazyLoad('./api/xpack.license.delete.js', opts), - get: lazyLoad('./api/xpack.license.get.js', opts), - get_basic_status: lazyLoad('./api/xpack.license.get_basic_status.js', opts), - getBasicStatus: lazyLoad('./api/xpack.license.get_basic_status.js', opts), - get_trial_status: lazyLoad('./api/xpack.license.get_trial_status.js', opts), - getTrialStatus: lazyLoad('./api/xpack.license.get_trial_status.js', opts), - post: lazyLoad('./api/xpack.license.post.js', opts), - post_start_basic: lazyLoad('./api/xpack.license.post_start_basic.js', opts), - postStartBasic: lazyLoad('./api/xpack.license.post_start_basic.js', opts), - post_start_trial: lazyLoad('./api/xpack.license.post_start_trial.js', opts), - postStartTrial: lazyLoad('./api/xpack.license.post_start_trial.js', opts) + delete: lazyLoad('xpack.license.delete', opts), + get: lazyLoad('xpack.license.get', opts), + get_basic_status: lazyLoad('xpack.license.get_basic_status', opts), + getBasicStatus: lazyLoad('xpack.license.get_basic_status', opts), + get_trial_status: lazyLoad('xpack.license.get_trial_status', opts), + getTrialStatus: lazyLoad('xpack.license.get_trial_status', opts), + post: lazyLoad('xpack.license.post', opts), + post_start_basic: lazyLoad('xpack.license.post_start_basic', opts), + postStartBasic: lazyLoad('xpack.license.post_start_basic', opts), + post_start_trial: lazyLoad('xpack.license.post_start_trial', opts), + postStartTrial: lazyLoad('xpack.license.post_start_trial', opts) }, migration: { - deprecations: lazyLoad('./api/xpack.migration.deprecations.js', opts), - get_assistance: lazyLoad('./api/xpack.migration.get_assistance.js', opts), - getAssistance: lazyLoad('./api/xpack.migration.get_assistance.js', opts), - upgrade: lazyLoad('./api/xpack.migration.upgrade.js', opts) + deprecations: lazyLoad('xpack.migration.deprecations', opts), + get_assistance: lazyLoad('xpack.migration.get_assistance', opts), + getAssistance: lazyLoad('xpack.migration.get_assistance', opts), + upgrade: lazyLoad('xpack.migration.upgrade', opts) }, rollup: { - delete_job: lazyLoad('./api/xpack.rollup.delete_job.js', opts), - deleteJob: lazyLoad('./api/xpack.rollup.delete_job.js', opts), - get_jobs: lazyLoad('./api/xpack.rollup.get_jobs.js', opts), - getJobs: lazyLoad('./api/xpack.rollup.get_jobs.js', opts), - get_rollup_caps: lazyLoad('./api/xpack.rollup.get_rollup_caps.js', opts), - getRollupCaps: lazyLoad('./api/xpack.rollup.get_rollup_caps.js', opts), - get_rollup_index_caps: lazyLoad('./api/xpack.rollup.get_rollup_index_caps.js', opts), - getRollupIndexCaps: lazyLoad('./api/xpack.rollup.get_rollup_index_caps.js', opts), - put_job: lazyLoad('./api/xpack.rollup.put_job.js', opts), - putJob: lazyLoad('./api/xpack.rollup.put_job.js', opts), - rollup_search: lazyLoad('./api/xpack.rollup.rollup_search.js', opts), - rollupSearch: lazyLoad('./api/xpack.rollup.rollup_search.js', opts), - start_job: lazyLoad('./api/xpack.rollup.start_job.js', opts), - startJob: lazyLoad('./api/xpack.rollup.start_job.js', opts), - stop_job: lazyLoad('./api/xpack.rollup.stop_job.js', opts), - stopJob: lazyLoad('./api/xpack.rollup.stop_job.js', opts) + delete_job: lazyLoad('xpack.rollup.delete_job', opts), + deleteJob: lazyLoad('xpack.rollup.delete_job', opts), + get_jobs: lazyLoad('xpack.rollup.get_jobs', opts), + getJobs: lazyLoad('xpack.rollup.get_jobs', opts), + get_rollup_caps: lazyLoad('xpack.rollup.get_rollup_caps', opts), + getRollupCaps: lazyLoad('xpack.rollup.get_rollup_caps', opts), + get_rollup_index_caps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts), + getRollupIndexCaps: lazyLoad('xpack.rollup.get_rollup_index_caps', opts), + put_job: lazyLoad('xpack.rollup.put_job', opts), + putJob: lazyLoad('xpack.rollup.put_job', opts), + rollup_search: lazyLoad('xpack.rollup.rollup_search', opts), + rollupSearch: lazyLoad('xpack.rollup.rollup_search', opts), + start_job: lazyLoad('xpack.rollup.start_job', opts), + startJob: lazyLoad('xpack.rollup.start_job', opts), + stop_job: lazyLoad('xpack.rollup.stop_job', opts), + stopJob: lazyLoad('xpack.rollup.stop_job', opts) }, sql: { - clear_cursor: lazyLoad('./api/xpack.sql.clear_cursor.js', opts), - clearCursor: lazyLoad('./api/xpack.sql.clear_cursor.js', opts), - query: lazyLoad('./api/xpack.sql.query.js', opts), - translate: lazyLoad('./api/xpack.sql.translate.js', opts) + clear_cursor: lazyLoad('xpack.sql.clear_cursor', opts), + clearCursor: lazyLoad('xpack.sql.clear_cursor', opts), + query: lazyLoad('xpack.sql.query', opts), + translate: lazyLoad('xpack.sql.translate', opts) }, - usage: lazyLoad('./api/xpack.usage.js', opts), + usage: lazyLoad('xpack.usage', opts), watcher: { - ack_watch: lazyLoad('./api/xpack.watcher.ack_watch.js', opts), - ackWatch: lazyLoad('./api/xpack.watcher.ack_watch.js', opts), - activate_watch: lazyLoad('./api/xpack.watcher.activate_watch.js', opts), - activateWatch: lazyLoad('./api/xpack.watcher.activate_watch.js', opts), - deactivate_watch: lazyLoad('./api/xpack.watcher.deactivate_watch.js', opts), - deactivateWatch: lazyLoad('./api/xpack.watcher.deactivate_watch.js', opts), - delete_watch: lazyLoad('./api/xpack.watcher.delete_watch.js', opts), - deleteWatch: lazyLoad('./api/xpack.watcher.delete_watch.js', opts), - execute_watch: lazyLoad('./api/xpack.watcher.execute_watch.js', opts), - executeWatch: lazyLoad('./api/xpack.watcher.execute_watch.js', opts), - get_watch: lazyLoad('./api/xpack.watcher.get_watch.js', opts), - getWatch: lazyLoad('./api/xpack.watcher.get_watch.js', opts), - put_watch: lazyLoad('./api/xpack.watcher.put_watch.js', opts), - putWatch: lazyLoad('./api/xpack.watcher.put_watch.js', opts), - start: lazyLoad('./api/xpack.watcher.start.js', opts), - stats: lazyLoad('./api/xpack.watcher.stats.js', opts), - stop: lazyLoad('./api/xpack.watcher.stop.js', opts) + ack_watch: lazyLoad('xpack.watcher.ack_watch', opts), + ackWatch: lazyLoad('xpack.watcher.ack_watch', opts), + activate_watch: lazyLoad('xpack.watcher.activate_watch', opts), + activateWatch: lazyLoad('xpack.watcher.activate_watch', opts), + deactivate_watch: lazyLoad('xpack.watcher.deactivate_watch', opts), + deactivateWatch: lazyLoad('xpack.watcher.deactivate_watch', opts), + delete_watch: lazyLoad('xpack.watcher.delete_watch', opts), + deleteWatch: lazyLoad('xpack.watcher.delete_watch', opts), + execute_watch: lazyLoad('xpack.watcher.execute_watch', opts), + executeWatch: lazyLoad('xpack.watcher.execute_watch', opts), + get_watch: lazyLoad('xpack.watcher.get_watch', opts), + getWatch: lazyLoad('xpack.watcher.get_watch', opts), + put_watch: lazyLoad('xpack.watcher.put_watch', opts), + putWatch: lazyLoad('xpack.watcher.put_watch', opts), + start: lazyLoad('xpack.watcher.start', opts), + stats: lazyLoad('xpack.watcher.stats', opts), + stop: lazyLoad('xpack.watcher.stop', opts) } } } @@ -493,7 +493,7 @@ function lazyLoad (file, opts) { var fn = null return function _lazyLoad (params, options, callback) { if (fn === null) { - fn = require(file)(opts) + fn = require(`./api/${file}.js`)(opts) } return fn(params, options, callback) } diff --git a/scripts/utils/genMain.js b/scripts/utils/genMain.js index 070ba6c00..ba89623bb 100644 --- a/scripts/utils/genMain.js +++ b/scripts/utils/genMain.js @@ -17,6 +17,8 @@ * under the License. */ +/* eslint-disable no-template-curly-in-string */ + 'use strict' const { readdirSync } = require('fs') @@ -63,12 +65,12 @@ function genFactory (folder) { .reduce((acc, val) => { const obj = { [val]: acc === null - ? `lazyLoad('./api/${file}', opts)` // `${name}(opts)` + ? `lazyLoad('${file.slice(0, -3)}', opts)` // `${name}(opts)` : acc } if (isSnakeCased(val)) { obj[camelify(val)] = acc === null - ? `lazyLoad('./api/${file}', opts)` // `${name}(opts)` + ? `lazyLoad('${file.slice(0, -3)}', opts)` // `${name}(opts)` : acc } return obj @@ -138,7 +140,7 @@ function genFactory (folder) { var fn = null return function _lazyLoad (params, options, callback) { if (fn === null) { - fn = require(file)(opts) + fn = require(${'`./api/${file}.js`'})(opts) } return fn(params, options, callback) }