From c1dfb013ef4101a8e56da4511154a3942405ef71 Mon Sep 17 00:00:00 2001 From: delvedor Date: Wed, 21 Oct 2020 11:07:32 +0200 Subject: [PATCH] API generation --- api/api/ml.js | 4 +- api/api/security.js | 28 +++++++++++++ api/api/snapshot.js | 48 ++++++++++++++++++++++ api/api/transform.js | 4 +- api/kibana.d.ts | 2 + api/requestParams.d.ts | 23 +++++++++-- docs/reference.asciidoc | 90 ++++++++++++++++++++++++++++++++++++----- index.d.ts | 12 ++++++ 8 files changed, 194 insertions(+), 17 deletions(-) diff --git a/api/api/ml.js b/api/api/ml.js index e26b54c4c..027dd9350 100644 --- a/api/api/ml.js +++ b/api/api/ml.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'lines_to_sample', 'line_merge_size_limit', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'for_export', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'delete_intervening_results', 'enabled'] -const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', linesToSample: 'lines_to_sample', lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', grokPattern: 'grok_pattern', timestampField: 'timestamp_field', timestampFormat: 'timestamp_format', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', forExport: 'for_export', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deleteInterveningResults: 'delete_intervening_results' } +const acceptedQuerystring = ['allow_no_match', 'allow_no_jobs', 'force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'requests_per_second', 'allow_no_forecasts', 'wait_for_completion', 'lines_to_sample', 'line_merge_size_limit', 'charset', 'format', 'has_header_row', 'column_names', 'delimiter', 'quote', 'should_trim_fields', 'grok_pattern', 'timestamp_field', 'timestamp_format', 'explain', 'calc_interim', 'start', 'end', 'advance_time', 'skip_time', 'duration', 'expires_in', 'max_model_memory', 'expand', 'exclude_interim', 'from', 'size', 'anomaly_score', 'sort', 'desc', 'job_id', 'partition_field_value', 'exclude_generated', 'verbose', 'allow_no_datafeeds', 'influencer_score', 'top_n', 'bucket_span', 'overall_score', 'record_score', 'include', 'include_model_definition', 'decompress_definition', 'tags', 'reset_start', 'reset_end', 'ignore_unavailable', 'allow_no_indices', 'ignore_throttled', 'expand_wildcards', 'delete_intervening_results', 'enabled'] +const snakeCase = { allowNoMatch: 'allow_no_match', allowNoJobs: 'allow_no_jobs', errorTrace: 'error_trace', filterPath: 'filter_path', requestsPerSecond: 'requests_per_second', allowNoForecasts: 'allow_no_forecasts', waitForCompletion: 'wait_for_completion', linesToSample: 'lines_to_sample', lineMergeSizeLimit: 'line_merge_size_limit', hasHeaderRow: 'has_header_row', columnNames: 'column_names', shouldTrimFields: 'should_trim_fields', grokPattern: 'grok_pattern', timestampField: 'timestamp_field', timestampFormat: 'timestamp_format', calcInterim: 'calc_interim', advanceTime: 'advance_time', skipTime: 'skip_time', expiresIn: 'expires_in', maxModelMemory: 'max_model_memory', excludeInterim: 'exclude_interim', anomalyScore: 'anomaly_score', jobId: 'job_id', partitionFieldValue: 'partition_field_value', excludeGenerated: 'exclude_generated', allowNoDatafeeds: 'allow_no_datafeeds', influencerScore: 'influencer_score', topN: 'top_n', bucketSpan: 'bucket_span', overallScore: 'overall_score', recordScore: 'record_score', includeModelDefinition: 'include_model_definition', decompressDefinition: 'decompress_definition', resetStart: 'reset_start', resetEnd: 'reset_end', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', ignoreThrottled: 'ignore_throttled', expandWildcards: 'expand_wildcards', deleteInterveningResults: 'delete_intervening_results' } function MlApi (transport, ConfigurationError) { this.transport = transport diff --git a/api/api/security.js b/api/api/security.js index 66f61ac17..a0aed418b 100644 --- a/api/api/security.js +++ b/api/api/security.js @@ -594,6 +594,33 @@ SecurityApi.prototype.getUserPrivileges = function securityGetUserPrivilegesApi return this.transport.request(request, options, callback) } +SecurityApi.prototype.grantApiKey = function securityGrantApiKeyApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params['body'] == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + var { method, body, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + var path = '' + if (method == null) method = 'POST' + path = '/' + '_security' + '/' + 'api_key' + '/' + 'grant' + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + SecurityApi.prototype.hasPrivileges = function securityHasPrivilegesApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) @@ -821,6 +848,7 @@ Object.defineProperties(SecurityApi.prototype, { get_token: { get () { return this.getToken } }, get_user: { get () { return this.getUser } }, get_user_privileges: { get () { return this.getUserPrivileges } }, + grant_api_key: { get () { return this.grantApiKey } }, has_privileges: { get () { return this.hasPrivileges } }, invalidate_api_key: { get () { return this.invalidateApiKey } }, invalidate_token: { get () { return this.invalidateToken } }, diff --git a/api/api/snapshot.js b/api/api/snapshot.js index 377fd016b..6f2c5ce21 100644 --- a/api/api/snapshot.js +++ b/api/api/snapshot.js @@ -58,6 +58,54 @@ SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi return this.transport.request(request, options, callback) } +SnapshotApi.prototype.clone = function snapshotCloneApi (params, options, callback) { + ;[params, options, callback] = normalizeArguments(params, options, callback) + + // check required parameters + if (params['repository'] == null) { + const err = new this[kConfigurationError]('Missing required parameter: repository') + return handleError(err, callback) + } + if (params['snapshot'] == null) { + const err = new this[kConfigurationError]('Missing required parameter: snapshot') + return handleError(err, callback) + } + if (params['target_snapshot'] == null && params['targetSnapshot'] == null) { + const err = new this[kConfigurationError]('Missing required parameter: target_snapshot or targetSnapshot') + return handleError(err, callback) + } + if (params['body'] == null) { + const err = new this[kConfigurationError]('Missing required parameter: body') + return handleError(err, callback) + } + + // check required url components + if ((params['target_snapshot'] != null || params['targetSnapshot'] != null) && (params['snapshot'] == null || params['repository'] == null)) { + const err = new this[kConfigurationError]('Missing required parameter of the url: snapshot, repository') + return handleError(err, callback) + } else if (params['snapshot'] != null && (params['repository'] == null)) { + const err = new this[kConfigurationError]('Missing required parameter of the url: repository') + return handleError(err, callback) + } + + var { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = params + querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) + + var path = '' + if (method == null) method = 'PUT' + path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot) + '/' + '_clone' + '/' + encodeURIComponent(target_snapshot || targetSnapshot) + + // build request object + const request = { + method, + path, + body: body || '', + querystring + } + + return this.transport.request(request, options, callback) +} + SnapshotApi.prototype.create = function snapshotCreateApi (params, options, callback) { ;[params, options, callback] = normalizeArguments(params, options, callback) diff --git a/api/api/transform.js b/api/api/transform.js index e52130b2e..3ff90890b 100644 --- a/api/api/transform.js +++ b/api/api/transform.js @@ -23,8 +23,8 @@ /* eslint no-unused-vars: 0 */ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint'] -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint' } +const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint'] +const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint' } function TransformApi (transport, ConfigurationError) { this.transport = transport diff --git a/api/kibana.d.ts b/api/kibana.d.ts index 7fc7a7ff1..de4ece420 100644 --- a/api/kibana.d.ts +++ b/api/kibana.d.ts @@ -397,6 +397,7 @@ interface KibanaClient { getToken, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityGetToken, options?: TransportRequestOptions): TransportRequestPromise> getUser, TContext = Context>(params?: RequestParams.SecurityGetUser, options?: TransportRequestOptions): TransportRequestPromise> getUserPrivileges, TContext = Context>(params?: RequestParams.SecurityGetUserPrivileges, options?: TransportRequestOptions): TransportRequestPromise> + grantApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityGrantApiKey, options?: TransportRequestOptions): TransportRequestPromise> hasPrivileges, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityHasPrivileges, options?: TransportRequestOptions): TransportRequestPromise> invalidateApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityInvalidateApiKey, options?: TransportRequestOptions): TransportRequestPromise> invalidateToken, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityInvalidateToken, options?: TransportRequestOptions): TransportRequestPromise> @@ -418,6 +419,7 @@ interface KibanaClient { } snapshot: { cleanupRepository, TContext = Context>(params?: RequestParams.SnapshotCleanupRepository, options?: TransportRequestOptions): TransportRequestPromise> + clone, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotClone, options?: TransportRequestOptions): TransportRequestPromise> create, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotCreate, options?: TransportRequestOptions): TransportRequestPromise> createRepository, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotCreateRepository, options?: TransportRequestOptions): TransportRequestPromise> delete, TContext = Context>(params?: RequestParams.SnapshotDelete, options?: TransportRequestOptions): TransportRequestPromise> diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts index 4cfc84684..97335048a 100644 --- a/api/requestParams.d.ts +++ b/api/requestParams.d.ts @@ -1594,6 +1594,7 @@ export interface MlGetDataFrameAnalytics extends Generic { allow_no_match?: boolean; from?: number; size?: number; + exclude_generated?: boolean; } export interface MlGetDataFrameAnalyticsStats extends Generic { @@ -1614,6 +1615,7 @@ export interface MlGetDatafeeds extends Generic { datafeed_id?: string; allow_no_match?: boolean; allow_no_datafeeds?: boolean; + exclude_generated?: boolean; } export interface MlGetFilters extends Generic { @@ -1645,6 +1647,7 @@ export interface MlGetJobs extends Generic { job_id?: string; allow_no_match?: boolean; allow_no_jobs?: boolean; + exclude_generated?: boolean; } export interface MlGetModelSnapshots extends Generic { @@ -1694,7 +1697,7 @@ export interface MlGetTrainedModels extends Generic { from?: number; size?: number; tags?: string | string[]; - for_export?: boolean; + exclude_generated?: boolean; } export interface MlGetTrainedModelsStats extends Generic { @@ -2220,11 +2223,11 @@ export interface SecurityGetPrivileges extends Generic { } export interface SecurityGetRole extends Generic { - name?: string; + name?: string | string[]; } export interface SecurityGetRoleMapping extends Generic { - name?: string; + name?: string | string[]; } export interface SecurityGetToken extends Generic { @@ -2238,6 +2241,11 @@ export interface SecurityGetUser extends Generic { export interface SecurityGetUserPrivileges extends Generic { } +export interface SecurityGrantApiKey extends Generic { + refresh?: 'wait_for' | boolean; + body: T; +} + export interface SecurityHasPrivileges extends Generic { user?: string; body: T; @@ -2312,6 +2320,14 @@ export interface SnapshotCleanupRepository extends Generic { timeout?: string; } +export interface SnapshotClone extends Generic { + repository: string; + snapshot: string; + target_snapshot: string; + master_timeout?: string; + body: T; +} + export interface SnapshotCreate extends Generic { repository: string; snapshot: string; @@ -2443,6 +2459,7 @@ export interface TransformGetTransform extends Generic { from?: number; size?: number; allow_no_match?: boolean; + exclude_generated?: boolean; } export interface TransformGetTransformStats extends Generic { diff --git a/docs/reference.asciidoc b/docs/reference.asciidoc index 05f233d17..f13ca96d0 100644 --- a/docs/reference.asciidoc +++ b/docs/reference.asciidoc @@ -6609,7 +6609,8 @@ client.ml.getDataFrameAnalytics({ id: string, allow_no_match: boolean, from: number, - size: number + size: number, + exclude_generated: boolean }) ---- link:{ref}/get-dfanalytics.html[Documentation] + @@ -6629,6 +6630,9 @@ _Default:_ `true` |`number` - specifies a max number of analytics to get + _Default:_ `100` +|`exclude_generated` or `excludeGenerated` +|`boolean` - Omits fields that are illegal to set on data frame analytics PUT + |=== [discrete] @@ -6701,7 +6705,8 @@ WARNING: This parameter has been deprecated. client.ml.getDatafeeds({ datafeed_id: string, allow_no_match: boolean, - allow_no_datafeeds: boolean + allow_no_datafeeds: boolean, + exclude_generated: boolean }) ---- link:{ref}/ml-get-datafeed.html[Documentation] + @@ -6718,6 +6723,9 @@ link:{ref}/ml-get-datafeed.html[Documentation] + WARNING: This parameter has been deprecated. +|`exclude_generated` or `excludeGenerated` +|`boolean` - Omits fields that are illegal to set on datafeed PUT + |=== [discrete] @@ -6833,7 +6841,8 @@ WARNING: This parameter has been deprecated. client.ml.getJobs({ job_id: string, allow_no_match: boolean, - allow_no_jobs: boolean + allow_no_jobs: boolean, + exclude_generated: boolean }) ---- link:{ref}/ml-get-job.html[Documentation] + @@ -6850,6 +6859,9 @@ link:{ref}/ml-get-job.html[Documentation] + WARNING: This parameter has been deprecated. +|`exclude_generated` or `excludeGenerated` +|`boolean` - Omits fields that are illegal to set on job PUT + |=== [discrete] @@ -7023,7 +7035,7 @@ client.ml.getTrainedModels({ from: number, size: number, tags: string | string[], - for_export: boolean + exclude_generated: boolean }) ---- link:{ref}/get-trained-models.html[Documentation] + @@ -7058,7 +7070,7 @@ _Default:_ `100` |`tags` |`string \| string[]` - A comma-separated list of tags that the model must have. -|`for_export` or `forExport` +|`exclude_generated` or `excludeGenerated` |`boolean` - Omits fields that are illegal to set on model PUT |=== @@ -9259,14 +9271,14 @@ link:{ref}/security-api-get-privileges.html[Documentation] + [source,ts] ---- client.security.getRole({ - name: string + name: string | string[] }) ---- link:{ref}/security-api-get-role.html[Documentation] + [cols=2*] |=== |`name` -|`string` - Role name +|`string \| string[]` - A comma-separated list of role names |=== @@ -9276,14 +9288,14 @@ link:{ref}/security-api-get-role.html[Documentation] + [source,ts] ---- client.security.getRoleMapping({ - name: string + name: string | string[] }) ---- link:{ref}/security-api-get-role-mapping.html[Documentation] + [cols=2*] |=== |`name` -|`string` - Role-Mapping name +|`string \| string[]` - A comma-separated list of role-mapping names |=== @@ -9331,6 +9343,27 @@ client.security.getUserPrivileges() link:{ref}/security-api-get-privileges.html[Documentation] + +[discrete] +=== security.grantApiKey + +[source,ts] +---- +client.security.grantApiKey({ + refresh: 'true' | 'false' | 'wait_for', + body: object +}) +---- +link:{ref}/security-api-grant-api-key.html[Documentation] + +[cols=2*] +|=== +|`refresh` +|`'true' \| 'false' \| 'wait_for'` - If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. + +|`body` +|`object` - The api key request to create an API key + +|=== + [discrete] === security.hasPrivileges @@ -9629,6 +9662,39 @@ link:{ref}/clean-up-snapshot-repo-api.html[Documentation] + |=== +[discrete] +=== snapshot.clone + +[source,ts] +---- +client.snapshot.clone({ + repository: string, + snapshot: string, + target_snapshot: string, + master_timeout: string, + body: object +}) +---- +link:{ref}/modules-snapshots.html[Documentation] + +[cols=2*] +|=== +|`repository` +|`string` - A repository name + +|`snapshot` +|`string` - The name of the snapshot to clone from + +|`target_snapshot` or `targetSnapshot` +|`string` - The name of the cloned snapshot to create + +|`master_timeout` or `masterTimeout` +|`string` - Explicit operation timeout for connection to master node + +|`body` +|`object` - The snapshot clone definition + +|=== + [discrete] === snapshot.create @@ -10163,7 +10229,8 @@ client.transform.getTransform({ transform_id: string, from: number, size: number, - allow_no_match: boolean + allow_no_match: boolean, + exclude_generated: boolean }) ---- link:{ref}/get-transform.html[Documentation] + @@ -10181,6 +10248,9 @@ link:{ref}/get-transform.html[Documentation] + |`allow_no_match` or `allowNoMatch` |`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) +|`exclude_generated` or `excludeGenerated` +|`boolean` - Omits fields that are illegal to set on transform PUT + |=== [discrete] diff --git a/index.d.ts b/index.d.ts index ddbb621aa..87e120883 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2156,6 +2156,14 @@ declare class Client { getUserPrivileges, TContext = Context>(callback: callbackFn): TransportRequestCallback getUserPrivileges, TContext = Context>(params: RequestParams.SecurityGetUserPrivileges, callback: callbackFn): TransportRequestCallback getUserPrivileges, TContext = Context>(params: RequestParams.SecurityGetUserPrivileges, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + grant_api_key, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityGrantApiKey, options?: TransportRequestOptions): TransportRequestPromise> + grant_api_key, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + grant_api_key, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityGrantApiKey, callback: callbackFn): TransportRequestCallback + grant_api_key, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityGrantApiKey, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + grantApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityGrantApiKey, options?: TransportRequestOptions): TransportRequestPromise> + grantApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + grantApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityGrantApiKey, callback: callbackFn): TransportRequestCallback + grantApiKey, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityGrantApiKey, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback has_privileges, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SecurityHasPrivileges, options?: TransportRequestOptions): TransportRequestPromise> has_privileges, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback has_privileges, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SecurityHasPrivileges, callback: callbackFn): TransportRequestCallback @@ -2288,6 +2296,10 @@ declare class Client { cleanupRepository, TContext = Context>(callback: callbackFn): TransportRequestCallback cleanupRepository, TContext = Context>(params: RequestParams.SnapshotCleanupRepository, callback: callbackFn): TransportRequestCallback cleanupRepository, TContext = Context>(params: RequestParams.SnapshotCleanupRepository, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback + clone, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotClone, options?: TransportRequestOptions): TransportRequestPromise> + clone, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback + clone, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SnapshotClone, callback: callbackFn): TransportRequestCallback + clone, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SnapshotClone, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params?: RequestParams.SnapshotCreate, options?: TransportRequestOptions): TransportRequestPromise> create, TRequestBody extends RequestBody = Record, TContext = Context>(callback: callbackFn): TransportRequestCallback create, TRequestBody extends RequestBody = Record, TContext = Context>(params: RequestParams.SnapshotCreate, callback: callbackFn): TransportRequestCallback