@@ -11,15 +11,13 @@ import type {
1111 IndicesDataStream ,
1212 IndicesGetDataStreamResponse ,
1313 QueryDslQueryContainer ,
14- Result ,
1514} from '@elastic/elasticsearch/lib/api/types' ;
16- import type { IScopedClusterClient , Logger , KibanaRequest } from '@kbn/core/server' ;
15+ import type { IScopedClusterClient , KibanaRequest , Logger } from '@kbn/core/server' ;
1716import { isNotFoundError } from '@kbn/es-errors' ;
18- import type { RoutingStatus } from '@kbn/streams-schema' ;
19- import { Streams , getAncestors , getParentId } from '@kbn/streams-schema' ;
2017import type { LockManagerService } from '@kbn/lock-manager' ;
2118import type { Condition } from '@kbn/streamlang' ;
22- import { MAX_STREAM_NAME_LENGTH } from '../../../common/constants' ;
19+ import type { RoutingStatus } from '@kbn/streams-schema' ;
20+ import { Streams , getAncestors , getParentId } from '@kbn/streams-schema' ;
2321import type { AssetClient } from './assets/asset_client' ;
2422import { ASSET_ID , ASSET_TYPE } from './assets/fields' ;
2523import type { QueryClient } from './assets/query/query_client' ;
@@ -29,18 +27,12 @@ import {
2927} from './errors/definition_not_found_error' ;
3028import { SecurityError } from './errors/security_error' ;
3129import { StatusError } from './errors/status_error' ;
30+ import { StreamsStatusConflictError } from './errors/streams_status_conflict_error' ;
31+ import type { FeatureClient } from './feature/feature_client' ;
3232import { LOGS_ROOT_STREAM_NAME , rootStreamDefinition } from './root_stream_definition' ;
33- import type { StreamsStorageClient } from './storage/streams_storage_client' ;
3433import { State } from './state_management/state' ;
34+ import type { StreamsStorageClient } from './storage/streams_storage_client' ;
3535import { checkAccess , checkAccessBulk } from './stream_crud' ;
36- import { StreamsStatusConflictError } from './errors/streams_status_conflict_error' ;
37- import type { FeatureClient } from './feature/feature_client' ;
38- interface AcknowledgeResponse < TResult extends Result > {
39- acknowledged : true ;
40- result : TResult ;
41- }
42-
43- export type EnableStreamsResponse = AcknowledgeResponse < 'noop' | 'created' > ;
4436export type DisableStreamsResponse = AcknowledgeResponse < 'noop' | 'deleted' > ;
4537export type DeleteStreamResponse = AcknowledgeResponse < 'noop' | 'deleted' > ;
4638export type SyncStreamResponse = AcknowledgeResponse < 'updated' | 'created' > ;
@@ -324,18 +316,6 @@ export class StreamsClient {
324316 throw new StatusError ( `Child stream ${ name } already exists` , 409 ) ;
325317 }
326318
327- const prefix = parent + '.' ;
328- if ( name . length <= prefix . length ) {
329- throw new StatusError ( 'Stream name must not be empty.' , 400 ) ;
330- }
331-
332- if ( name . length > MAX_STREAM_NAME_LENGTH ) {
333- throw new StatusError (
334- `Stream name cannot be longer than ${ MAX_STREAM_NAME_LENGTH } characters.` ,
335- 400
336- ) ;
337- }
338-
339319 await State . attemptChanges (
340320 [
341321 {
0 commit comments