-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [FTR][CI] Use default distribution for all tests (#94968) Signed-off-by: Tyler Smalley <[email protected]> * Use default output Signed-off-by: Tyler Smalley <[email protected]> * [FTR] Use importExport for saved_object/basic archive Signed-off-by: Tyler Smalley <[email protected]> * Update suggestions tests Signed-off-by: Tyler Smalley <[email protected]> * Fix build Signed-off-by: Tyler Smalley <[email protected]> * More migrations to kbnArchiver Signed-off-by: Tyler Smalley <[email protected]>
- Loading branch information
Tyler Smalley
authored
May 28, 2021
1 parent
7b17455
commit be40e96
Showing
133 changed files
with
5,551 additions
and
6,716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { KbnClientRequester, uriencode } from './kbn_client_requester'; | ||
|
||
interface UpdateBody { | ||
name: string; | ||
description?: string; | ||
disabledFeatures?: string | string[]; | ||
initials?: string; | ||
color?: string; | ||
imageUrl?: string; | ||
} | ||
|
||
interface CreateBody extends UpdateBody { | ||
id: string; | ||
} | ||
|
||
export class KbnClientSpaces { | ||
constructor(private readonly requester: KbnClientRequester) {} | ||
|
||
async create(body: CreateBody) { | ||
await this.requester.request({ | ||
method: 'POST', | ||
path: '/api/spaces/space', | ||
body, | ||
}); | ||
} | ||
|
||
async update(id: string, body: UpdateBody) { | ||
await this.requester.request({ | ||
method: 'PUT', | ||
path: uriencode`/api/spaces/space/${id}`, | ||
body, | ||
}); | ||
} | ||
|
||
async get(id: string) { | ||
const { data } = await this.requester.request({ | ||
method: 'GET', | ||
path: uriencode`/api/spaces/space/${id}`, | ||
}); | ||
|
||
return data; | ||
} | ||
|
||
async list() { | ||
const { data } = await this.requester.request({ | ||
method: 'GET', | ||
path: '/api/spaces/space', | ||
}); | ||
|
||
return data; | ||
} | ||
|
||
async delete(id: string) { | ||
await this.requester.request({ | ||
method: 'DELETE', | ||
path: uriencode`/api/spaces/space/${id}`, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.