Skip to content

Commit a7753ef

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 9a4b94d of spec repo (DataDog#317)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 21dc30f commit a7753ef

16 files changed

+318
-24
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2021-10-07 18:59:10.892446",
8-
"spec_repo_commit": "0e7768c"
7+
"regenerated": "2021-10-08 15:41:58.607796",
8+
"spec_repo_commit": "9a4b94d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-10-07 19:00:06.359257",
13-
"spec_repo_commit": "0e7768c"
12+
"regenerated": "2021-10-08 15:42:47.853128",
13+
"spec_repo_commit": "9a4b94d"
1414
}
1515
}
1616
}

docs/v1/NotebooksApi.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ example content`,
5252
type: "notebook_cells",
5353
},
5454
],
55+
metadata: {
56+
isTemplate: false,
57+
takeSnapshots: false,
58+
type: "investigation",
59+
},
5560
name: "Example Notebook",
5661
status: "published",
5762
time: {
@@ -247,14 +252,18 @@ let params: v1.NotebooksApiListNotebooksRequest = {
247252
start: 0,
248253
// number | The number of notebooks to be returned. (optional)
249254
count: 5,
250-
// string | Sort by field `modified` or `name`. (optional)
255+
// string | Sort by field `modified`, `name`, or `created`. (optional)
251256
sortField: "modified",
252257
// string | Sort by direction `asc` or `desc`. (optional)
253258
sortDir: "desc",
254259
// string | Return only notebooks with `query` string in notebook name or author handle. (optional)
255260
query: "postmortem",
256261
// boolean | Value of `false` excludes the `cells` and global `time` for each notebook. (optional)
257262
includeCells: false,
263+
// boolean | True value returns only template notebooks. Default is false (returns only non-template notebooks). (optional)
264+
isTemplate: false,
265+
// string | If type is provided, returns only notebooks with that metadata type. Default does not have type filtering. (optional)
266+
type: "investigation",
258267
};
259268

260269
apiInstance
@@ -269,16 +278,18 @@ apiInstance
269278

270279
### Parameters
271280

272-
| Name | Type | Description | Notes |
273-
| ----------------------- | ------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------- |
274-
| **authorHandle** | [**string**] | Return notebooks created by the given &#x60;author_handle&#x60;. | (optional) defaults to undefined |
275-
| **excludeAuthorHandle** | [**string**] | Return notebooks not created by the given &#x60;author_handle&#x60;. | (optional) defaults to undefined |
276-
| **start** | [**number**] | The index of the first notebook you want returned. | (optional) defaults to undefined |
277-
| **count** | [**number**] | The number of notebooks to be returned. | (optional) defaults to undefined |
278-
| **sortField** | [**string**] | Sort by field &#x60;modified&#x60; or &#x60;name&#x60;. | (optional) defaults to 'modified' |
279-
| **sortDir** | [**string**] | Sort by direction &#x60;asc&#x60; or &#x60;desc&#x60;. | (optional) defaults to 'desc' |
280-
| **query** | [**string**] | Return only notebooks with &#x60;query&#x60; string in notebook name or author handle. | (optional) defaults to undefined |
281-
| **includeCells** | [**boolean**] | Value of &#x60;false&#x60; excludes the &#x60;cells&#x60; and global &#x60;time&#x60; for each notebook. | (optional) defaults to undefined |
281+
| Name | Type | Description | Notes |
282+
| ----------------------- | ------------- | ---------------------------------------------------------------------------------------------------------- | --------------------------------- |
283+
| **authorHandle** | [**string**] | Return notebooks created by the given &#x60;author_handle&#x60;. | (optional) defaults to undefined |
284+
| **excludeAuthorHandle** | [**string**] | Return notebooks not created by the given &#x60;author_handle&#x60;. | (optional) defaults to undefined |
285+
| **start** | [**number**] | The index of the first notebook you want returned. | (optional) defaults to undefined |
286+
| **count** | [**number**] | The number of notebooks to be returned. | (optional) defaults to undefined |
287+
| **sortField** | [**string**] | Sort by field &#x60;modified&#x60;, &#x60;name&#x60;, or &#x60;created&#x60;. | (optional) defaults to 'modified' |
288+
| **sortDir** | [**string**] | Sort by direction &#x60;asc&#x60; or &#x60;desc&#x60;. | (optional) defaults to 'desc' |
289+
| **query** | [**string**] | Return only notebooks with &#x60;query&#x60; string in notebook name or author handle. | (optional) defaults to undefined |
290+
| **includeCells** | [**boolean**] | Value of &#x60;false&#x60; excludes the &#x60;cells&#x60; and global &#x60;time&#x60; for each notebook. | (optional) defaults to undefined |
291+
| **isTemplate** | [**boolean**] | True value returns only template notebooks. Default is false (returns only non-template notebooks). | (optional) defaults to undefined |
292+
| **type** | [**string**] | If type is provided, returns only notebooks with that metadata type. Default does not have type filtering. | (optional) defaults to undefined |
282293

283294
### Return type
284295

@@ -347,6 +358,11 @@ example content`,
347358
type: "notebook_cells",
348359
},
349360
],
361+
metadata: {
362+
isTemplate: false,
363+
takeSnapshots: false,
364+
type: "investigation",
365+
},
350366
name: "Example Notebook",
351367
status: "published",
352368
time: {

features/v1/notebooks.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Notebooks
1313
@generated @skip
1414
Scenario: Create a notebook returns "Bad Request" response
1515
Given new "CreateNotebook" request
16-
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
16+
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
1717
When the request is sent
1818
Then the response status is 400 Bad Request
1919

@@ -79,23 +79,23 @@ Feature: Notebooks
7979
Scenario: Update a notebook returns "Bad Request" response
8080
Given new "UpdateNotebook" request
8181
And request contains "notebook_id" parameter from "<PATH>"
82-
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
82+
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
8383
When the request is sent
8484
Then the response status is 400 Bad Request
8585

8686
@generated @skip
8787
Scenario: Update a notebook returns "Conflict" response
8888
Given new "UpdateNotebook" request
8989
And request contains "notebook_id" parameter from "<PATH>"
90-
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
90+
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
9191
When the request is sent
9292
Then the response status is 409 Conflict
9393

9494
@generated @skip
9595
Scenario: Update a notebook returns "Not Found" response
9696
Given new "UpdateNotebook" request
9797
And request contains "notebook_id" parameter from "<PATH>"
98-
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
98+
And body with value {"data": {"attributes": {"cells": [{"attributes": {"definition": {"text": "## Some test markdown\n\n```js\nvar x, y;\nx = 5;\ny = 6;\n```", "type": "markdown"}}, "id": "bzbycoya", "type": "notebook_cells"}, {"attributes": {"definition": {"requests": [{"display_type": "line", "q": "avg:system.load.1{*}", "style": {"line_type": "solid", "line_width": "normal", "palette": "dog_classic"}}], "show_legend": true, "type": "timeseries", "yaxis": {"scale": "linear"}}, "graph_size": "m", "split_by": {"keys": [], "tags": []}, "time": null}, "id": "9k6bc6xc", "type": "notebook_cells"}], "metadata": {"is_template": false, "take_snapshots": false, "type": "investigation"}, "name": "Example Notebook", "status": "published", "time": {"live_span": "1h"}}, "type": "notebooks"}}
9999
When the request is sent
100100
Then the response status is 404 Not Found
101101

packages/datadog-api-client-v1/.openapi-generator/FILES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ models/NotebookLogStreamCellAttributes.ts
346346
models/NotebookMarkdownCellAttributes.ts
347347
models/NotebookMarkdownCellDefinition.ts
348348
models/NotebookMarkdownCellDefinitionType.ts
349+
models/NotebookMetadata.ts
350+
models/NotebookMetadataType.ts
349351
models/NotebookRelativeTime.ts
350352
models/NotebookResourceType.ts
351353
models/NotebookResponse.ts

packages/datadog-api-client-v1/apis/NotebooksApi.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,12 @@ export class NotebooksApiRequestFactory extends BaseAPIRequestFactory {
194194
* @param excludeAuthorHandle Return notebooks not created by the given &#x60;author_handle&#x60;.
195195
* @param start The index of the first notebook you want returned.
196196
* @param count The number of notebooks to be returned.
197-
* @param sortField Sort by field &#x60;modified&#x60; or &#x60;name&#x60;.
197+
* @param sortField Sort by field &#x60;modified&#x60;, &#x60;name&#x60;, or &#x60;created&#x60;.
198198
* @param sortDir Sort by direction &#x60;asc&#x60; or &#x60;desc&#x60;.
199199
* @param query Return only notebooks with &#x60;query&#x60; string in notebook name or author handle.
200200
* @param includeCells Value of &#x60;false&#x60; excludes the &#x60;cells&#x60; and global &#x60;time&#x60; for each notebook.
201+
* @param isTemplate True value returns only template notebooks. Default is false (returns only non-template notebooks).
202+
* @param type If type is provided, returns only notebooks with that metadata type. Default does not have type filtering.
201203
*/
202204
public async listNotebooks(
203205
authorHandle?: string,
@@ -208,6 +210,8 @@ export class NotebooksApiRequestFactory extends BaseAPIRequestFactory {
208210
sortDir?: string,
209211
query?: string,
210212
includeCells?: boolean,
213+
isTemplate?: boolean,
214+
type?: string,
211215
_options?: Configuration
212216
): Promise<RequestContext> {
213217
const _config = _options || this.configuration;
@@ -272,6 +276,18 @@ export class NotebooksApiRequestFactory extends BaseAPIRequestFactory {
272276
ObjectSerializer.serialize(includeCells, "boolean", "")
273277
);
274278
}
279+
if (isTemplate !== undefined) {
280+
requestContext.setQueryParam(
281+
"is_template",
282+
ObjectSerializer.serialize(isTemplate, "boolean", "")
283+
);
284+
}
285+
if (type !== undefined) {
286+
requestContext.setQueryParam(
287+
"type",
288+
ObjectSerializer.serialize(type, "string", "")
289+
);
290+
}
275291

276292
// Header Params
277293

packages/datadog-api-client-v1/models/NotebookCreateDataAttributes.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import { NotebookCellCreateRequest } from "./NotebookCellCreateRequest";
1212
import { NotebookGlobalTime } from "./NotebookGlobalTime";
13+
import { NotebookMetadata } from "./NotebookMetadata";
1314
import { NotebookStatus } from "./NotebookStatus";
1415
import { ObjectSerializer } from "./ObjectSerializer";
1516

@@ -22,6 +23,7 @@ export class NotebookCreateDataAttributes {
2223
* List of cells to display in the notebook.
2324
*/
2425
"cells": Array<NotebookCellCreateRequest>;
26+
"metadata"?: NotebookMetadata;
2527
/**
2628
* The name of the notebook.
2729
*/
@@ -41,6 +43,11 @@ export class NotebookCreateDataAttributes {
4143
type: "Array<NotebookCellCreateRequest>",
4244
format: "",
4345
},
46+
metadata: {
47+
baseName: "metadata",
48+
type: "NotebookMetadata",
49+
format: "",
50+
},
4451
name: {
4552
baseName: "name",
4653
type: "string",
@@ -78,6 +85,12 @@ export class NotebookCreateDataAttributes {
7885
""
7986
);
8087

88+
res.metadata = ObjectSerializer.deserialize(
89+
data.metadata,
90+
"NotebookMetadata",
91+
""
92+
);
93+
8194
if (data.name === undefined) {
8295
throw new TypeError(
8396
"missing required attribute 'name' on 'NotebookCreateDataAttributes' object"
@@ -129,6 +142,12 @@ export class NotebookCreateDataAttributes {
129142
""
130143
);
131144

145+
res.metadata = ObjectSerializer.serialize(
146+
data.metadata,
147+
"NotebookMetadata",
148+
""
149+
);
150+
132151
if (data.name === undefined) {
133152
throw new TypeError(
134153
"missing required attribute 'name' on 'NotebookCreateDataAttributes' object"

0 commit comments

Comments
 (0)