From 2b0d30cefb167f349519c6edc73a96e9c0921da7 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Tue, 2 Jun 2015 11:12:03 -0700 Subject: [PATCH] regenerate apis --- src/lib/apis/0_90.js | 3 +- src/lib/apis/1_0.js | 3 +- src/lib/apis/1_1.js | 3 +- src/lib/apis/1_2.js | 3 +- src/lib/apis/1_3.js | 3 +- src/lib/apis/1_4.js | 3 +- src/lib/apis/1_5.js | 40 ++++++++++++------- src/lib/apis/1_x.js | 89 ++++++++++++++++++++++++------------------ src/lib/apis/master.js | 63 ++++++++++++++++++------------ 9 files changed, 121 insertions(+), 89 deletions(-) diff --git a/src/lib/apis/0_90.js b/src/lib/apis/0_90.js index 79c33932e..40da575df 100644 --- a/src/lib/apis/0_90.js +++ b/src/lib/apis/0_90.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -3261,7 +3260,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_0.js b/src/lib/apis/1_0.js index 3397d88c2..f3c410c1d 100644 --- a/src/lib/apis/1_0.js +++ b/src/lib/apis/1_0.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -5223,7 +5222,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_1.js b/src/lib/apis/1_1.js index 3144a3c7a..6d79437c0 100644 --- a/src/lib/apis/1_1.js +++ b/src/lib/apis/1_1.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -5398,7 +5397,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_2.js b/src/lib/apis/1_2.js index 84e4f36c7..71aa55ead 100644 --- a/src/lib/apis/1_2.js +++ b/src/lib/apis/1_2.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -5457,7 +5456,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_3.js b/src/lib/apis/1_3.js index 6c4eda476..d1fb23314 100644 --- a/src/lib/apis/1_3.js +++ b/src/lib/apis/1_3.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -5625,7 +5624,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_4.js b/src/lib/apis/1_4.js index 4c4d15dc7..ffc5174c1 100644 --- a/src/lib/apis/1_4.js +++ b/src/lib/apis/1_4.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -6186,7 +6185,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_5.js b/src/lib/apis/1_5.js index 4f8900bb3..86821ffaf 100644 --- a/src/lib/apis/1_5.js +++ b/src/lib/apis/1_5.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -6069,20 +6068,33 @@ api.termvector = ca({ required: false } }, - url: { - fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', - req: { - index: { - type: 'string' - }, - type: { - type: 'string' - }, - id: { - type: 'string' + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } } } - }, + ], method: 'POST' }); @@ -6211,7 +6223,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/1_x.js b/src/lib/apis/1_x.js index af02b0c3c..90e456925 100644 --- a/src/lib/apis/1_x.js +++ b/src/lib/apis/1_x.js @@ -1,7 +1,6 @@ /* jshint maxlen: false */ var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -2728,6 +2727,32 @@ api.indices.prototype.flush = ca({ method: 'POST' }); +/** + * Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + */ +api.indices.prototype.flushSynced = ca({ + urls: [ + { + fmt: '/<%=index%>/_flush/synced', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush/synced' + } + ], + method: 'POST' +}); + /** * Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-get-index.html) request * @@ -3825,29 +3850,6 @@ api.indices.prototype.refresh = ca({ method: 'POST' }); -/** - * Perform a [indices.seal](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-seal.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices - */ -api.indices.prototype.seal = ca({ - urls: [ - { - fmt: '/<%=index%>/_seal', - req: { - index: { - type: 'list' - } - } - }, - { - fmt: '/_seal' - } - ], - method: 'POST' -}); - /** * Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/indices-segments.html) request * @@ -6186,20 +6188,33 @@ api.termvector = ca({ required: false } }, - url: { - fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', - req: { - index: { - type: 'string' - }, - type: { - type: 'string' - }, - id: { - type: 'string' + urls: [ + { + fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + }, + id: { + type: 'string' + } + } + }, + { + fmt: '/<%=index%>/<%=type%>/_termvector', + req: { + index: { + type: 'string' + }, + type: { + type: 'string' + } } } - }, + ], method: 'POST' }); @@ -6328,7 +6343,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; } diff --git a/src/lib/apis/master.js b/src/lib/apis/master.js index f1b2af654..ad36d7154 100644 --- a/src/lib/apis/master.js +++ b/src/lib/apis/master.js @@ -1,7 +1,15 @@ /* jshint maxlen: false */ -var ca = require('../client_action').factory; -var proxy = require('../client_action').proxyFactory; +var ca = require('../client_action').makeFactoryWithModifier(function (spec) { + return require('../utils').merge(spec, { + params: { + filterPath: { + type: 'list', + name: 'filter_path' + } + } + }); +}); var namespace = require('../client_action').namespaceFactory; var api = module.exports = {}; @@ -2554,6 +2562,32 @@ api.indices.prototype.flush = ca({ method: 'POST' }); +/** + * Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request + * + * @param {Object} params - An object with parameters used to carry out this action + * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices + * @param {Boolean} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {Boolean} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {String} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + */ +api.indices.prototype.flushSynced = ca({ + urls: [ + { + fmt: '/<%=index%>/_flush/synced', + req: { + index: { + type: 'list' + } + } + }, + { + fmt: '/_flush/synced' + } + ], + method: 'POST' +}); + /** * Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request * @@ -3642,29 +3676,6 @@ api.indices.prototype.refresh = ca({ method: 'POST' }); -/** - * Perform a [indices.seal](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-seal.html) request - * - * @param {Object} params - An object with parameters used to carry out this action - * @param {String, String[], Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices - */ -api.indices.prototype.seal = ca({ - urls: [ - { - fmt: '/<%=index%>/_seal', - req: { - index: { - type: 'list' - } - } - }, - { - fmt: '/_seal' - } - ], - method: 'POST' -}); - /** * Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html) request * @@ -5969,7 +5980,7 @@ api.update = ca({ * @param {String} params.index - The name of the index * @param {String} params.type - The type of the document */ -api.create = proxy(api.index, { +api.create = ca.proxy(api.index, { transform: function (params) { params.op_type = 'create'; }