Skip to content

Commit 47f4e21

Browse files
committed
Fix block enum
1 parent 686c483 commit 47f4e21

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

specification/indices/add_block/IndicesAddBlockRequest.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import { RequestBase } from '@_types/Base'
2121
import { ExpandWildcards, IndexName } from '@_types/common'
2222
import { Duration } from '@_types/Time'
23-
import {IndexSettingBlocks, IndexSettings} from "../_types/IndexSettings";
2423

2524
/**
2625
* Add an index block.
@@ -50,7 +49,7 @@ export interface Request extends RequestBase {
5049
/**
5150
* The block type to add to the index.
5251
*/
53-
block: keyof IndexSettingBlocks
52+
block: IndicesBlockOptions
5453
}
5554
query_parameters: {
5655
/**
@@ -88,3 +87,14 @@ export interface Request extends RequestBase {
8887
timeout?: Duration // default: 30s
8988
}
9089
}
90+
91+
export enum IndicesBlockOptions {
92+
/** Disable metadata changes, such as closing the index. */
93+
metadata,
94+
/** Disable read operations. */
95+
read,
96+
/** Disable write operations and metadata changes. */
97+
read_only,
98+
/** Disable write operations. However, metadata changes are still allowed. */
99+
write
100+
}

specification/indices/remove_block/IndicesRemoveBlockRequest.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface Request extends RequestBase {
5050
/**
5151
* The block type to remove from the index.
5252
*/
53-
block: keyof IndexSettingBlocks
53+
block: IndicesBlockOptions
5454
}
5555
query_parameters: {
5656
/**
@@ -88,3 +88,14 @@ export interface Request extends RequestBase {
8888
timeout?: Duration // default: 30s
8989
}
9090
}
91+
92+
export enum IndicesBlockOptions {
93+
/** Disable metadata changes, such as closing the index. */
94+
metadata,
95+
/** Disable read operations. */
96+
read,
97+
/** Disable write operations and metadata changes. */
98+
read_only,
99+
/** Disable write operations. However, metadata changes are still allowed. */
100+
write
101+
}

0 commit comments

Comments
 (0)