Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import { RequestBase } from '@_types/Base'
import { Id, MediaType } from '@_types/common'
import { float } from '@_types/Numeric'
import { GroupBy } from '@tasks/_types/GroupBy'

/**
* Throttle a reindex operation.
Expand Down Expand Up @@ -60,5 +61,9 @@ export interface Request extends RequestBase {
* It can be either `-1` to turn off throttling or any decimal number like `1.7` or `12` to throttle to that level.
*/
requests_per_second: float
/**
* @availability stack stability=stable
*/
group_by?: GroupBy
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@
* under the License.
*/

import { ErrorCause, TaskFailure } from '@_types/Errors'
import { Dictionary } from '@spec_utils/Dictionary'
import { ReindexNode } from './types'
import { ReindexNode, ReindexTasks } from './types'

export class Response {
body: { nodes: Dictionary<string, ReindexNode> }
body: {
node_failures?: ErrorCause[]
task_failures?: TaskFailure[]
nodes?: Dictionary<string, ReindexNode>
tasks?: ReindexTasks
}
}
9 changes: 9 additions & 0 deletions specification/_global/reindex_rethrottle/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ export class ReindexTask {
type: string
headers: HttpHeaders
}

/**
* @codegen_names flat, grouped
*/
export type ReindexTasks = ReindexTask[] | Dictionary<string, ParentReindexTask>

export class ParentReindexTask extends ReindexTask {
children?: ReindexTask[]
}
Loading