-
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) * [FTR] Use importExport for saved_object/basic archive (#100244) Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
- Loading branch information
Tyler Smalley
authored
Jun 12, 2021
1 parent
e41594e
commit 73225da
Showing
72 changed files
with
2,504 additions
and
4,911 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
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.