Version: 0.0.91.0.01.0.11.0.21.0.31.0.41.0.51.0.61.1.01.1.11.2.01.3.01.3.11.3.21.3.31.3.41.3.51.4.01.5.0
module.exports = (client) -> (bulk, callback) ->
bulk.reduce (p, c) ->
p.then ->
t = c.template
client.indices.putTemplate {name:t._name, body:t._template}
, Promise.resolve()
.then ->
callback null, {}
.catch (err) ->
callback err