Skip to content

Commit 8cbb540

Browse files
committed
API generation
1 parent 959aee5 commit 8cbb540

File tree

5 files changed

+62
-0
lines changed

5 files changed

+62
-0
lines changed

api/api/rollup.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,37 @@ RollupApi.prototype.putJob = function rollupPutJobApi (params, options, callback
168168
return this.transport.request(request, options, callback)
169169
}
170170

171+
RollupApi.prototype.rollup = function rollupRollupApi (params, options, callback) {
172+
;[params, options, callback] = normalizeArguments(params, options, callback)
173+
174+
// check required parameters
175+
if (params['index'] == null) {
176+
const err = new this[kConfigurationError]('Missing required parameter: index')
177+
return handleError(err, callback)
178+
}
179+
if (params['body'] == null) {
180+
const err = new this[kConfigurationError]('Missing required parameter: body')
181+
return handleError(err, callback)
182+
}
183+
184+
var { method, body, index, ...querystring } = params
185+
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
186+
187+
var path = ''
188+
if (method == null) method = 'POST'
189+
path = '/' + encodeURIComponent(index) + '/' + '_rollup'
190+
191+
// build request object
192+
const request = {
193+
method,
194+
path,
195+
body: body || '',
196+
querystring
197+
}
198+
199+
return this.transport.request(request, options, callback)
200+
}
201+
171202
RollupApi.prototype.rollupSearch = function rollupRollupSearchApi (params, options, callback) {
172203
;[params, options, callback] = normalizeArguments(params, options, callback)
173204

api/kibana.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ interface KibanaClient {
360360
getRollupCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
361361
getRollupIndexCaps<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupGetRollupIndexCaps, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
362362
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupPutJob<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
363+
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollup<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
363364
rollupSearch<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollupSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
364365
startJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStartJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
365366
stopJob<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.RollupStopJob, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>

api/requestParams.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,11 @@ export interface RollupPutJob<T = RequestBody> extends Generic {
19981998
body: T;
19991999
}
20002000

2001+
export interface RollupRollup<T = RequestBody> extends Generic {
2002+
index: string;
2003+
body: T;
2004+
}
2005+
20012006
export interface RollupRollupSearch<T = RequestBody> extends Generic {
20022007
index: string | string[];
20032008
type?: string;

docs/reference.asciidoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8235,6 +8235,27 @@ link:{ref}/rollup-put-job.html[Documentation] +
82358235

82368236
|===
82378237

8238+
[discrete]
8239+
=== rollup.rollup
8240+
8241+
[source,ts]
8242+
----
8243+
client.rollup.rollup({
8244+
index: string,
8245+
body: object
8246+
})
8247+
----
8248+
link:{ref}/rollup.html[Documentation] +
8249+
[cols=2*]
8250+
|===
8251+
|`index`
8252+
|`string` - The index to roll up
8253+
8254+
|`body`
8255+
|`object` - The rollup configuration
8256+
8257+
|===
8258+
82388259
[discrete]
82398260
=== rollup.rollupSearch
82408261
*Stability:* experimental

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,10 @@ declare class Client {
18861886
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
18871887
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.RollupPutJob<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
18881888
putJob<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.RollupPutJob<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
1889+
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollup<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
1890+
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
1891+
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.RollupRollup<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
1892+
rollup<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.RollupRollup<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
18891893
rollup_search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.RollupRollupSearch<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
18901894
rollup_search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
18911895
rollup_search<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.RollupRollupSearch<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback

0 commit comments

Comments
 (0)