@scaleway/sdk-datalab 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,13 +1,14 @@
1
1
  import { DATALAB_TRANSIENT_STATUSES } from "./content.gen.js";
2
2
  import { marshalCreateDatalabRequest, marshalUpdateDatalabRequest, unmarshalDatalab, unmarshalListClusterVersionsResponse, unmarshalListDatalabsResponse, unmarshalListNodeTypesResponse, unmarshalListNotebookVersionsResponse } from "./marshalling.gen.js";
3
- import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
3
+ import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ //#region src/v1beta1/api.gen.ts
4
5
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
6
  /**
6
7
  * Data Lab API for Apache Spark™.
7
8
 
8
9
  This API allows you to manage your Data Lab resources.
9
10
  */
10
- var API$1 = class extends API {
11
+ var API = class extends API$1 {
11
12
  /**
12
13
  * Locality of this API.
13
14
  * type ∈ {'zone','region','global','unspecified'}
@@ -114,4 +115,5 @@ var API$1 = class extends API {
114
115
  */
115
116
  listClusterVersions = (request = {}) => enrichForPagination("clusters", this.pageOfListClusterVersions, request);
116
117
  };
117
- export { API$1 as API };
118
+ //#endregion
119
+ export { API };
@@ -1,7 +1,9 @@
1
+ //#region src/v1beta1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link DatalabStatus}. */
2
- const DATALAB_TRANSIENT_STATUSES = [
3
+ var DATALAB_TRANSIENT_STATUSES = [
3
4
  "creating",
4
5
  "updating",
5
6
  "deleting"
6
7
  ];
8
+ //#endregion
7
9
  export { DATALAB_TRANSIENT_STATUSES };
@@ -3,6 +3,7 @@ import { DATALAB_TRANSIENT_STATUSES } from "./content.gen.js";
3
3
  import { marshalCreateDatalabRequest, marshalUpdateDatalabRequest, unmarshalDatalab, unmarshalListClusterVersionsResponse, unmarshalListDatalabsResponse, unmarshalListNodeTypesResponse, unmarshalListNotebookVersionsResponse } from "./marshalling.gen.js";
4
4
  import { API } from "./api.gen.js";
5
5
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ //#region src/v1beta1/index.gen.ts
6
7
  var index_gen_exports = /* @__PURE__ */ __exportAll({
7
8
  API: () => API,
8
9
  DATALAB_TRANSIENT_STATUSES: () => DATALAB_TRANSIENT_STATUSES,
@@ -15,4 +16,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
15
16
  unmarshalListNodeTypesResponse: () => unmarshalListNodeTypesResponse,
16
17
  unmarshalListNotebookVersionsResponse: () => unmarshalListNotebookVersionsResponse
17
18
  });
18
- export { index_gen_exports };
19
+ //#endregion
20
+ export { API, DATALAB_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateDatalabRequest, marshalUpdateDatalabRequest, unmarshalDatalab, unmarshalListClusterVersionsResponse, unmarshalListDatalabsResponse, unmarshalListNodeTypesResponse, unmarshalListNotebookVersionsResponse };
@@ -1,4 +1,5 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
+ //#region src/v1beta1/marshalling.gen.ts
2
3
  var unmarshalVolume = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
4
5
  return {
@@ -23,7 +24,7 @@ var unmarshalDatalabSparkWorker = (data) => {
23
24
  rootVolume: data.root_volume ? unmarshalVolume(data.root_volume) : void 0
24
25
  };
25
26
  };
26
- const unmarshalDatalab = (data) => {
27
+ var unmarshalDatalab = (data) => {
27
28
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Datalab' failed as data isn't a dictionary.`);
28
29
  return {
29
30
  createdAt: unmarshalDate(data.created_at),
@@ -64,14 +65,14 @@ var unmarshalCluster = (data) => {
64
65
  versions: unmarshalArrayOfObject(data.versions, unmarshalClusterVersion)
65
66
  };
66
67
  };
67
- const unmarshalListClusterVersionsResponse = (data) => {
68
+ var unmarshalListClusterVersionsResponse = (data) => {
68
69
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterVersionsResponse' failed as data isn't a dictionary.`);
69
70
  return {
70
71
  clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
71
72
  totalCount: data.total_count
72
73
  };
73
74
  };
74
- const unmarshalListDatalabsResponse = (data) => {
75
+ var unmarshalListDatalabsResponse = (data) => {
75
76
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatalabsResponse' failed as data isn't a dictionary.`);
76
77
  return {
77
78
  datalabs: unmarshalArrayOfObject(data.datalabs, unmarshalDatalab),
@@ -95,7 +96,7 @@ var unmarshalNodeType = (data) => {
95
96
  vramGigabytes: data.vram_gigabytes
96
97
  };
97
98
  };
98
- const unmarshalListNodeTypesResponse = (data) => {
99
+ var unmarshalListNodeTypesResponse = (data) => {
99
100
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
100
101
  return {
101
102
  nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
@@ -121,7 +122,7 @@ var unmarshalNotebook = (data) => {
121
122
  versions: unmarshalArrayOfObject(data.versions, unmarshalNotebookVersion)
122
123
  };
123
124
  };
124
- const unmarshalListNotebookVersionsResponse = (data) => {
125
+ var unmarshalListNotebookVersionsResponse = (data) => {
125
126
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNotebookVersionsResponse' failed as data isn't a dictionary.`);
126
127
  return {
127
128
  notebooks: unmarshalArrayOfObject(data.notebooks, unmarshalNotebook),
@@ -137,7 +138,7 @@ var marshalVolume = (request, defaults) => ({
137
138
  size: request.size,
138
139
  type: request.type
139
140
  });
140
- const marshalCreateDatalabRequest = (request, defaults) => ({
141
+ var marshalCreateDatalabRequest = (request, defaults) => ({
141
142
  description: request.description,
142
143
  has_notebook: request.hasNotebook,
143
144
  main: request.main !== void 0 ? marshalCreateDatalabRequestSparkMain(request.main, defaults) : void 0,
@@ -149,10 +150,11 @@ const marshalCreateDatalabRequest = (request, defaults) => ({
149
150
  total_storage: request.totalStorage !== void 0 ? marshalVolume(request.totalStorage, defaults) : void 0,
150
151
  worker: request.worker !== void 0 ? marshalCreateDatalabRequestSparkWorker(request.worker, defaults) : void 0
151
152
  });
152
- const marshalUpdateDatalabRequest = (request, defaults) => ({
153
+ var marshalUpdateDatalabRequest = (request, defaults) => ({
153
154
  description: request.description,
154
155
  name: request.name,
155
156
  node_count: request.nodeCount,
156
157
  tags: request.tags
157
158
  });
159
+ //#endregion
158
160
  export { marshalCreateDatalabRequest, marshalUpdateDatalabRequest, unmarshalDatalab, unmarshalListClusterVersionsResponse, unmarshalListDatalabsResponse, unmarshalListNodeTypesResponse, unmarshalListNotebookVersionsResponse };
@@ -0,0 +1,64 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "datalab";
3
+ readonly version: "v1beta1";
4
+ readonly folderName: "datalabv1beta1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "getDatalab";
9
+ readonly protoName: "GetDatalab";
10
+ readonly paramsType: "GetDatalabRequest";
11
+ readonly returnType: "Datalab";
12
+ readonly isList: false;
13
+ readonly paginationType: "none";
14
+ readonly isPrivate: false;
15
+ readonly description: "\"";
16
+ readonly hasWaiter: true;
17
+ }, {
18
+ readonly methodName: "listDatalabs";
19
+ readonly protoName: "ListDatalabs";
20
+ readonly paramsType: "ListDatalabsRequest";
21
+ readonly returnType: "ListDatalabsResponse";
22
+ readonly isList: true;
23
+ readonly paginationType: "offset";
24
+ readonly pageParamKey: "page";
25
+ readonly listItemType: "Datalab";
26
+ readonly isPrivate: false;
27
+ readonly description: "\"";
28
+ }, {
29
+ readonly methodName: "listNodeTypes";
30
+ readonly protoName: "ListNodeTypes";
31
+ readonly paramsType: "ListNodeTypesRequest";
32
+ readonly returnType: "ListNodeTypesResponse";
33
+ readonly isList: true;
34
+ readonly paginationType: "offset";
35
+ readonly pageParamKey: "page";
36
+ readonly listItemType: "NodeType";
37
+ readonly isPrivate: false;
38
+ readonly description: "\"";
39
+ }, {
40
+ readonly methodName: "listNotebookVersions";
41
+ readonly protoName: "ListNotebookVersions";
42
+ readonly paramsType: "ListNotebookVersionsRequest";
43
+ readonly returnType: "ListNotebookVersionsResponse";
44
+ readonly isList: true;
45
+ readonly paginationType: "offset";
46
+ readonly pageParamKey: "page";
47
+ readonly listItemType: "Notebook";
48
+ readonly isPrivate: false;
49
+ readonly description: "\"";
50
+ }, {
51
+ readonly methodName: "listClusterVersions";
52
+ readonly protoName: "ListClusterVersions";
53
+ readonly paramsType: "ListClusterVersionsRequest";
54
+ readonly returnType: "ListClusterVersionsResponse";
55
+ readonly isList: true;
56
+ readonly paginationType: "offset";
57
+ readonly pageParamKey: "page";
58
+ readonly listItemType: "Cluster";
59
+ readonly isPrivate: false;
60
+ readonly description: "\"";
61
+ }];
62
+ }];
63
+ };
64
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,72 @@
1
+ //#region src/v1beta1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "datalab",
4
+ version: "v1beta1",
5
+ folderName: "datalabv1beta1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "getDatalab",
11
+ protoName: "GetDatalab",
12
+ paramsType: "GetDatalabRequest",
13
+ returnType: "Datalab",
14
+ isList: false,
15
+ paginationType: "none",
16
+ isPrivate: false,
17
+ description: "\"",
18
+ hasWaiter: true
19
+ },
20
+ {
21
+ methodName: "listDatalabs",
22
+ protoName: "ListDatalabs",
23
+ paramsType: "ListDatalabsRequest",
24
+ returnType: "ListDatalabsResponse",
25
+ isList: true,
26
+ paginationType: "offset",
27
+ pageParamKey: "page",
28
+ listItemType: "Datalab",
29
+ isPrivate: false,
30
+ description: "\""
31
+ },
32
+ {
33
+ methodName: "listNodeTypes",
34
+ protoName: "ListNodeTypes",
35
+ paramsType: "ListNodeTypesRequest",
36
+ returnType: "ListNodeTypesResponse",
37
+ isList: true,
38
+ paginationType: "offset",
39
+ pageParamKey: "page",
40
+ listItemType: "NodeType",
41
+ isPrivate: false,
42
+ description: "\""
43
+ },
44
+ {
45
+ methodName: "listNotebookVersions",
46
+ protoName: "ListNotebookVersions",
47
+ paramsType: "ListNotebookVersionsRequest",
48
+ returnType: "ListNotebookVersionsResponse",
49
+ isList: true,
50
+ paginationType: "offset",
51
+ pageParamKey: "page",
52
+ listItemType: "Notebook",
53
+ isPrivate: false,
54
+ description: "\""
55
+ },
56
+ {
57
+ methodName: "listClusterVersions",
58
+ protoName: "ListClusterVersions",
59
+ paramsType: "ListClusterVersionsRequest",
60
+ returnType: "ListClusterVersionsResponse",
61
+ isList: true,
62
+ paginationType: "offset",
63
+ pageParamKey: "page",
64
+ listItemType: "Cluster",
65
+ isPrivate: false,
66
+ description: "\""
67
+ }
68
+ ]
69
+ }]
70
+ };
71
+ //#endregion
72
+ export { queriesMetadata };
File without changes
@@ -1,4 +1,5 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/v1beta1/validation-rules.gen.ts
2
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
4
  CreateDatalabRequest: () => CreateDatalabRequest,
4
5
  CreateDatalabRequestSparkWorker: () => CreateDatalabRequestSparkWorker,
@@ -8,23 +9,23 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
8
9
  ListNotebookVersionsRequest: () => ListNotebookVersionsRequest,
9
10
  UpdateDatalabRequest: () => UpdateDatalabRequest
10
11
  });
11
- const CreateDatalabRequest = { name: {
12
+ var CreateDatalabRequest = { name: {
12
13
  maxLength: 100,
13
14
  minLength: 3,
14
15
  pattern: /^[A-Za-z0-9-_. ]+$/
15
16
  } };
16
- const CreateDatalabRequestSparkWorker = { nodeCount: {
17
+ var CreateDatalabRequestSparkWorker = { nodeCount: {
17
18
  greaterThanOrEqual: 1,
18
19
  lessThanOrEqual: 150
19
20
  } };
20
- const ListClusterVersionsRequest = {
21
+ var ListClusterVersionsRequest = {
21
22
  page: { greaterThanOrEqual: 1 },
22
23
  pageSize: {
23
24
  greaterThanOrEqual: 0,
24
25
  lessThanOrEqual: 100
25
26
  }
26
27
  };
27
- const ListDatalabsRequest = {
28
+ var ListDatalabsRequest = {
28
29
  name: {
29
30
  maxLength: 100,
30
31
  minLength: 3,
@@ -36,22 +37,23 @@ const ListDatalabsRequest = {
36
37
  lessThanOrEqual: 100
37
38
  }
38
39
  };
39
- const ListNodeTypesRequest = {
40
+ var ListNodeTypesRequest = {
40
41
  page: { greaterThanOrEqual: 1 },
41
42
  pageSize: {
42
43
  greaterThanOrEqual: 0,
43
44
  lessThanOrEqual: 100
44
45
  }
45
46
  };
46
- const ListNotebookVersionsRequest = {
47
+ var ListNotebookVersionsRequest = {
47
48
  page: { greaterThanOrEqual: 1 },
48
49
  pageSize: {
49
50
  greaterThanOrEqual: 1,
50
51
  lessThanOrEqual: 100
51
52
  }
52
53
  };
53
- const UpdateDatalabRequest = { nodeCount: {
54
+ var UpdateDatalabRequest = { nodeCount: {
54
55
  greaterThanOrEqual: 0,
55
56
  lessThanOrEqual: 150
56
57
  } };
57
- export { validation_rules_gen_exports };
58
+ //#endregion
59
+ export { CreateDatalabRequest, CreateDatalabRequestSparkWorker, ListClusterVersionsRequest, ListDatalabsRequest, ListNodeTypesRequest, ListNotebookVersionsRequest, UpdateDatalabRequest, validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-datalab",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Scaleway SDK datalab",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.18.3"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",