From 3ff7b3a08382bc04561ff0bf7a6554ccaf207a6e Mon Sep 17 00:00:00 2001 From: Josh Mock Date: Thu, 17 Aug 2023 14:16:50 -0500 Subject: [PATCH] TypeScript fixes (#2242) --- .github/validate-pr/index.js | 1 + specification/_types/query_dsl/fulltext.ts | 4 ++-- .../query_ruleset/delete/QueryRulesetDeleteRequest.ts | 2 +- specification/query_ruleset/get/QueryRulesetGetRequest.ts | 2 +- specification/query_ruleset/list/QueryRulesetListRequest.ts | 2 +- specification/query_ruleset/put/QueryRulesetPutRequest.ts | 2 +- .../delete/SearchApplicationsDeleteRequest.ts | 2 +- .../BehavioralAnalyticsDeleteRequest.ts | 2 +- .../search_application/get/SearchApplicationsGetRequest.ts | 2 +- .../get_behavioral_analytics/BehavioralAnalyticsGetRequest.ts | 2 +- .../search_application/list/SearchApplicationsListRequest.ts | 3 +-- .../search_application/put/SearchApplicationsPutRequest.ts | 2 +- .../put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts | 3 +-- .../search/SearchApplicationsSearchRequest.ts | 2 +- .../synonyms/delete_synonym/SynonymsDeleteRequest.ts | 2 +- .../synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts | 2 +- specification/synonyms/get_synonym/SynonymsGetRequest.ts | 2 +- .../synonyms/get_synonym_rule/SynonymRuleGetRequest.ts | 2 +- .../synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts | 3 +-- specification/synonyms/put_synonym/SynonymsPutRequest.ts | 2 +- .../synonyms/put_synonym_rule/SynonymRulePutRequest.ts | 2 +- specification/tsconfig.json | 4 ++++ 22 files changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/validate-pr/index.js b/.github/validate-pr/index.js index 8a23496355..b4a59b6936 100644 --- a/.github/validate-pr/index.js +++ b/.github/validate-pr/index.js @@ -70,6 +70,7 @@ async function run () { if (file.startsWith('specification/_spec_utils')) continue if (file.startsWith('specification/_doc_ids')) continue if (file.startsWith('specification/_json_spec')) continue + if (file === 'specification/tsconfig.json') continue if (getApi(file).endsWith('_types')) { const apis = specification.endpoints .filter(endpoint => endpoint.name.split('.').filter(s => !privateNames.includes(s))[0] === getApi(file).split('.')[0]) diff --git a/specification/_types/query_dsl/fulltext.ts b/specification/_types/query_dsl/fulltext.ts index b71d65ae26..8ced9fd18d 100644 --- a/specification/_types/query_dsl/fulltext.ts +++ b/specification/_types/query_dsl/fulltext.ts @@ -28,8 +28,8 @@ import { double, float, integer } from '@_types/Numeric' import { Script } from '@_types/Scripting' import { QueryBase } from './abstractions' import { Operator } from './Operator' -import { DateMath, TimeZone } from '@_types/Time' -import { FlagsEnum, PipeSeparatedFlags } from '@spec_utils/PipeSeparatedFlags' +import { TimeZone } from '@_types/Time' +import { PipeSeparatedFlags } from '@spec_utils/PipeSeparatedFlags' /** * @shortcut_property query diff --git a/specification/query_ruleset/delete/QueryRulesetDeleteRequest.ts b/specification/query_ruleset/delete/QueryRulesetDeleteRequest.ts index 272153a6c9..abaf6a902f 100644 --- a/specification/query_ruleset/delete/QueryRulesetDeleteRequest.ts +++ b/specification/query_ruleset/delete/QueryRulesetDeleteRequest.ts @@ -25,7 +25,7 @@ import { Id } from '@_types/common' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The unique identifier of the query ruleset to delete diff --git a/specification/query_ruleset/get/QueryRulesetGetRequest.ts b/specification/query_ruleset/get/QueryRulesetGetRequest.ts index 1944aeb3b1..a67f3fe17c 100644 --- a/specification/query_ruleset/get/QueryRulesetGetRequest.ts +++ b/specification/query_ruleset/get/QueryRulesetGetRequest.ts @@ -25,7 +25,7 @@ import { Id } from '@_types/common' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The unique identifier of the query ruleset diff --git a/specification/query_ruleset/list/QueryRulesetListRequest.ts b/specification/query_ruleset/list/QueryRulesetListRequest.ts index 5167688bdc..69fb1ff9f2 100644 --- a/specification/query_ruleset/list/QueryRulesetListRequest.ts +++ b/specification/query_ruleset/list/QueryRulesetListRequest.ts @@ -25,7 +25,7 @@ import { integer } from '@_types/Numeric' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { query_parameters: { /** * Starting offset (default: 0) diff --git a/specification/query_ruleset/put/QueryRulesetPutRequest.ts b/specification/query_ruleset/put/QueryRulesetPutRequest.ts index 998723bf6b..7259453a2b 100644 --- a/specification/query_ruleset/put/QueryRulesetPutRequest.ts +++ b/specification/query_ruleset/put/QueryRulesetPutRequest.ts @@ -26,7 +26,7 @@ import { QueryRuleset } from '../_types/QueryRuleset' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The unique identifier of the query ruleset to be created or updated diff --git a/specification/search_application/delete/SearchApplicationsDeleteRequest.ts b/specification/search_application/delete/SearchApplicationsDeleteRequest.ts index 689a933464..83dfdc7ae9 100644 --- a/specification/search_application/delete/SearchApplicationsDeleteRequest.ts +++ b/specification/search_application/delete/SearchApplicationsDeleteRequest.ts @@ -25,7 +25,7 @@ import { Name } from '@_types/common' * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the search application to delete diff --git a/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteRequest.ts b/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteRequest.ts index 6891f30fc1..4b34a48578 100644 --- a/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteRequest.ts +++ b/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteRequest.ts @@ -25,7 +25,7 @@ import { Name } from '@_types/common' * @availability stack since=8.8.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the analytics collection to be deleted diff --git a/specification/search_application/get/SearchApplicationsGetRequest.ts b/specification/search_application/get/SearchApplicationsGetRequest.ts index 5e3bc93602..77ef2d4bb2 100644 --- a/specification/search_application/get/SearchApplicationsGetRequest.ts +++ b/specification/search_application/get/SearchApplicationsGetRequest.ts @@ -25,7 +25,7 @@ import { Name } from '@_types/common' * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the search application diff --git a/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetRequest.ts b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetRequest.ts index ccf0420e8a..fbeb0553f4 100644 --- a/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetRequest.ts +++ b/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetRequest.ts @@ -25,7 +25,7 @@ import { Name } from '@_types/common' * @availability stack since=8.8.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * A list of analytics collections to limit the returned information diff --git a/specification/search_application/list/SearchApplicationsListRequest.ts b/specification/search_application/list/SearchApplicationsListRequest.ts index bedd79a5d5..52aba5043c 100644 --- a/specification/search_application/list/SearchApplicationsListRequest.ts +++ b/specification/search_application/list/SearchApplicationsListRequest.ts @@ -17,7 +17,6 @@ * under the License. */ import { RequestBase } from '@_types/Base' -import { Name } from '@_types/common' import { integer } from '@_types/Numeric' /** @@ -26,7 +25,7 @@ import { integer } from '@_types/Numeric' * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { query_parameters: { /** * Query in the Lucene query string syntax" diff --git a/specification/search_application/put/SearchApplicationsPutRequest.ts b/specification/search_application/put/SearchApplicationsPutRequest.ts index c58b7d9af8..11c94584e4 100644 --- a/specification/search_application/put/SearchApplicationsPutRequest.ts +++ b/specification/search_application/put/SearchApplicationsPutRequest.ts @@ -26,7 +26,7 @@ import { SearchApplication } from '../_types/SearchApplication' * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the search application to be created or updated diff --git a/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts b/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts index 5580a8055d..490ffd00ea 100644 --- a/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts +++ b/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutRequest.ts @@ -18,7 +18,6 @@ */ import { RequestBase } from '@_types/Base' import { Name } from '@_types/common' -import { SearchApplication } from '../_types/SearchApplication' /** * Creates a behavioral analytics collection @@ -26,7 +25,7 @@ import { SearchApplication } from '../_types/SearchApplication' * @availability stack since=8.8.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the analytics collection to be created or updated diff --git a/specification/search_application/search/SearchApplicationsSearchRequest.ts b/specification/search_application/search/SearchApplicationsSearchRequest.ts index 772b2e04d1..94f60c25b3 100644 --- a/specification/search_application/search/SearchApplicationsSearchRequest.ts +++ b/specification/search_application/search/SearchApplicationsSearchRequest.ts @@ -27,7 +27,7 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue' * @availability stack since=8.8.0 stability=beta * @availability serverless stability=beta visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The name of the search application to be searched diff --git a/specification/synonyms/delete_synonym/SynonymsDeleteRequest.ts b/specification/synonyms/delete_synonym/SynonymsDeleteRequest.ts index 916158adb5..cc781f8745 100644 --- a/specification/synonyms/delete_synonym/SynonymsDeleteRequest.ts +++ b/specification/synonyms/delete_synonym/SynonymsDeleteRequest.ts @@ -25,7 +25,7 @@ import { Id } from '@_types/common' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The id of the synonyms set to be deleted diff --git a/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts b/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts index 2e7404d1b2..7a9c87ff98 100644 --- a/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts +++ b/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteRequest.ts @@ -25,7 +25,7 @@ import { Id } from '@_types/common' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The id of the synonym set to be updated diff --git a/specification/synonyms/get_synonym/SynonymsGetRequest.ts b/specification/synonyms/get_synonym/SynonymsGetRequest.ts index 28178d983f..6bb218b075 100644 --- a/specification/synonyms/get_synonym/SynonymsGetRequest.ts +++ b/specification/synonyms/get_synonym/SynonymsGetRequest.ts @@ -26,7 +26,7 @@ import { integer } from '@_types/Numeric' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * "The id of the synonyms set to be retrieved diff --git a/specification/synonyms/get_synonym_rule/SynonymRuleGetRequest.ts b/specification/synonyms/get_synonym_rule/SynonymRuleGetRequest.ts index c814a02f61..77b752724f 100644 --- a/specification/synonyms/get_synonym_rule/SynonymRuleGetRequest.ts +++ b/specification/synonyms/get_synonym_rule/SynonymRuleGetRequest.ts @@ -25,7 +25,7 @@ import { Id } from '@_types/common' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The id of the synonym set to retrieve the synonym rule from diff --git a/specification/synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts b/specification/synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts index 5a182d2c4c..6b0c034bf1 100644 --- a/specification/synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts +++ b/specification/synonyms/get_synonyms_sets/SynonymsSetsGetRequest.ts @@ -17,7 +17,6 @@ * under the License. */ import { RequestBase } from '@_types/Base' -import { Name } from '@_types/common' import { integer } from '@_types/Numeric' /** @@ -26,7 +25,7 @@ import { integer } from '@_types/Numeric' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { query_parameters: { /** * Starting offset diff --git a/specification/synonyms/put_synonym/SynonymsPutRequest.ts b/specification/synonyms/put_synonym/SynonymsPutRequest.ts index 848c212605..e0b5e9c57c 100644 --- a/specification/synonyms/put_synonym/SynonymsPutRequest.ts +++ b/specification/synonyms/put_synonym/SynonymsPutRequest.ts @@ -26,7 +26,7 @@ import { SynonymRule } from '../_types/SynonymRule' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The id of the synonyms set to be created or updated diff --git a/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts b/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts index 24dc878851..30bb5374d6 100644 --- a/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts +++ b/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts @@ -26,7 +26,7 @@ import { SynonymString } from '../_types/SynonymRule' * @availability stack since=8.10.0 stability=experimental * @availability serverless stability=experimental visibility=public */ -interface Request extends RequestBase { +export interface Request extends RequestBase { path_parts: { /** * The id of the synonym set to be updated with the synonym rule diff --git a/specification/tsconfig.json b/specification/tsconfig.json index b9081a8dac..116b45177b 100644 --- a/specification/tsconfig.json +++ b/specification/tsconfig.json @@ -29,6 +29,7 @@ "@enrich/*": ["enrich/*"], "@eql/*": ["eql/*"], "@features/*": ["features/*"], + "@fleet/*": ["fleet/*"], "@graph/*": ["graph/*"], "@ilm/*": ["ilm/*"], "@indices/*": ["indices/*"], @@ -39,14 +40,17 @@ "@ml/*": ["ml/*"], "@monitoring/*": ["monitoring/*"], "@nodes/*": ["nodes/*"], + "@query_ruleset/*": ["query_ruleset/*"], "@rollup/*": ["rollup/*"], "@searchable_snapshots/*": ["searchable_snapshots/*"], + "@search_application/*": ["search_application/*"], "@security/*": ["security/*"], "@shutdown/*": ["shutdown/*"], "@slm/*": ["slm/*"], "@snapshot/*": ["snapshot/*"], "@sql/*": ["sql/*"], "@ssl/*": ["ssl/*"], + "@synonyms/*": ["synonyms/*"], "@tasks/*": ["tasks/*"], "@text_structure/*": ["text_structure/*"], "@transform/*": ["transform/*"],