@scaleway/sdk-datalab 1.5.3 → 1.5.4
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.
- package/LICENSE +191 -0
- package/package.json +8 -7
- package/dist/.vite/license.md +0 -3
- package/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/index.gen.d.ts +0 -5
- package/dist/index.gen.js +0 -2
- package/dist/metadata.gen.d.ts +0 -12
- package/dist/metadata.gen.js +0 -13
- package/dist/v1beta1/api.gen.d.ts +0 -95
- package/dist/v1beta1/api.gen.js +0 -65
- package/dist/v1beta1/content.gen.d.ts +0 -3
- package/dist/v1beta1/content.gen.js +0 -9
- package/dist/v1beta1/index.gen.d.ts +0 -5
- package/dist/v1beta1/index.gen.js +0 -20
- package/dist/v1beta1/marshalling.gen.d.ts +0 -9
- package/dist/v1beta1/marshalling.gen.js +0 -160
- package/dist/v1beta1/metadata.gen.d.ts +0 -64
- package/dist/v1beta1/metadata.gen.js +0 -72
- package/dist/v1beta1/types.gen.d.ts +0 -514
- package/dist/v1beta1/types.gen.js +0 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +0 -60
- package/dist/v1beta1/validation-rules.gen.js +0 -59
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
-
//#region src/v1beta1/marshalling.gen.ts
|
|
3
|
-
const unmarshalVolume = (data) => {
|
|
4
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Volume' failed as data isn't a dictionary.`);
|
|
5
|
-
return {
|
|
6
|
-
size: data.size,
|
|
7
|
-
type: data.type
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
const unmarshalDatalabSparkMain = (data) => {
|
|
11
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatalabSparkMain' failed as data isn't a dictionary.`);
|
|
12
|
-
return {
|
|
13
|
-
nodeType: data.node_type,
|
|
14
|
-
rootVolume: data.root_volume ? unmarshalVolume(data.root_volume) : void 0,
|
|
15
|
-
sparkMasterUrl: data.spark_master_url,
|
|
16
|
-
sparkUiUrl: data.spark_ui_url
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
const unmarshalDatalabSparkWorker = (data) => {
|
|
20
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatalabSparkWorker' failed as data isn't a dictionary.`);
|
|
21
|
-
return {
|
|
22
|
-
nodeCount: data.node_count,
|
|
23
|
-
nodeType: data.node_type,
|
|
24
|
-
rootVolume: data.root_volume ? unmarshalVolume(data.root_volume) : void 0
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
const unmarshalDatalab = (data) => {
|
|
28
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Datalab' failed as data isn't a dictionary.`);
|
|
29
|
-
return {
|
|
30
|
-
createdAt: unmarshalDate(data.created_at),
|
|
31
|
-
description: data.description,
|
|
32
|
-
hasNotebook: data.has_notebook,
|
|
33
|
-
id: data.id,
|
|
34
|
-
main: data.main ? unmarshalDatalabSparkMain(data.main) : void 0,
|
|
35
|
-
name: data.name,
|
|
36
|
-
notebookMasterUrl: data.notebook_master_url,
|
|
37
|
-
notebookUrl: data.notebook_url,
|
|
38
|
-
privateNetworkId: data.private_network_id,
|
|
39
|
-
projectId: data.project_id,
|
|
40
|
-
region: data.region,
|
|
41
|
-
sparkVersion: data.spark_version,
|
|
42
|
-
status: data.status,
|
|
43
|
-
tags: data.tags,
|
|
44
|
-
totalStorage: data.total_storage ? unmarshalVolume(data.total_storage) : void 0,
|
|
45
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
46
|
-
worker: data.worker ? unmarshalDatalabSparkWorker(data.worker) : void 0
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
const unmarshalClusterVersion = (data) => {
|
|
50
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ClusterVersion' failed as data isn't a dictionary.`);
|
|
51
|
-
return {
|
|
52
|
-
beta: data.beta,
|
|
53
|
-
createdAt: unmarshalDate(data.created_at),
|
|
54
|
-
disabled: data.disabled,
|
|
55
|
-
endOfLife: unmarshalDate(data.end_of_life),
|
|
56
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
57
|
-
version: data.version
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
const unmarshalCluster = (data) => {
|
|
61
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cluster' failed as data isn't a dictionary.`);
|
|
62
|
-
return {
|
|
63
|
-
description: data.description,
|
|
64
|
-
name: data.name,
|
|
65
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalClusterVersion)
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
const unmarshalListClusterVersionsResponse = (data) => {
|
|
69
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListClusterVersionsResponse' failed as data isn't a dictionary.`);
|
|
70
|
-
return {
|
|
71
|
-
clusters: unmarshalArrayOfObject(data.clusters, unmarshalCluster),
|
|
72
|
-
totalCount: data.total_count
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
const unmarshalListDatalabsResponse = (data) => {
|
|
76
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatalabsResponse' failed as data isn't a dictionary.`);
|
|
77
|
-
return {
|
|
78
|
-
datalabs: unmarshalArrayOfObject(data.datalabs, unmarshalDatalab),
|
|
79
|
-
totalCount: data.total_count
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
const unmarshalNodeType = (data) => {
|
|
83
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NodeType' failed as data isn't a dictionary.`);
|
|
84
|
-
return {
|
|
85
|
-
beta: data.beta,
|
|
86
|
-
createdAt: unmarshalDate(data.created_at),
|
|
87
|
-
description: data.description,
|
|
88
|
-
disabled: data.disabled,
|
|
89
|
-
gpus: data.gpus,
|
|
90
|
-
memoryGigabytes: data.memory_gigabytes,
|
|
91
|
-
name: data.name,
|
|
92
|
-
stockStatus: data.stock_status,
|
|
93
|
-
targets: data.targets,
|
|
94
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
95
|
-
vcpus: data.vcpus,
|
|
96
|
-
vramGigabytes: data.vram_gigabytes
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
const unmarshalListNodeTypesResponse = (data) => {
|
|
100
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary.`);
|
|
101
|
-
return {
|
|
102
|
-
nodeTypes: unmarshalArrayOfObject(data.node_types, unmarshalNodeType),
|
|
103
|
-
totalCount: data.total_count
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
const unmarshalNotebookVersion = (data) => {
|
|
107
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'NotebookVersion' failed as data isn't a dictionary.`);
|
|
108
|
-
return {
|
|
109
|
-
beta: data.beta,
|
|
110
|
-
createdAt: unmarshalDate(data.created_at),
|
|
111
|
-
disabled: data.disabled,
|
|
112
|
-
endOfLife: unmarshalDate(data.end_of_life),
|
|
113
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
114
|
-
version: data.version
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
const unmarshalNotebook = (data) => {
|
|
118
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Notebook' failed as data isn't a dictionary.`);
|
|
119
|
-
return {
|
|
120
|
-
description: data.description,
|
|
121
|
-
name: data.name,
|
|
122
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalNotebookVersion)
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
const unmarshalListNotebookVersionsResponse = (data) => {
|
|
126
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNotebookVersionsResponse' failed as data isn't a dictionary.`);
|
|
127
|
-
return {
|
|
128
|
-
notebooks: unmarshalArrayOfObject(data.notebooks, unmarshalNotebook),
|
|
129
|
-
totalCount: data.total_count
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
const marshalCreateDatalabRequestSparkMain = (request, defaults) => ({ node_type: request.nodeType });
|
|
133
|
-
const marshalCreateDatalabRequestSparkWorker = (request, defaults) => ({
|
|
134
|
-
node_count: request.nodeCount,
|
|
135
|
-
node_type: request.nodeType
|
|
136
|
-
});
|
|
137
|
-
const marshalVolume = (request, defaults) => ({
|
|
138
|
-
size: request.size,
|
|
139
|
-
type: request.type
|
|
140
|
-
});
|
|
141
|
-
const marshalCreateDatalabRequest = (request, defaults) => ({
|
|
142
|
-
description: request.description,
|
|
143
|
-
has_notebook: request.hasNotebook,
|
|
144
|
-
main: request.main !== void 0 ? marshalCreateDatalabRequestSparkMain(request.main, defaults) : void 0,
|
|
145
|
-
name: request.name,
|
|
146
|
-
private_network_id: request.privateNetworkId,
|
|
147
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
148
|
-
spark_version: request.sparkVersion,
|
|
149
|
-
tags: request.tags,
|
|
150
|
-
total_storage: request.totalStorage !== void 0 ? marshalVolume(request.totalStorage, defaults) : void 0,
|
|
151
|
-
worker: request.worker !== void 0 ? marshalCreateDatalabRequestSparkWorker(request.worker, defaults) : void 0
|
|
152
|
-
});
|
|
153
|
-
const marshalUpdateDatalabRequest = (request, defaults) => ({
|
|
154
|
-
description: request.description,
|
|
155
|
-
name: request.name,
|
|
156
|
-
node_count: request.nodeCount,
|
|
157
|
-
tags: request.tags
|
|
158
|
-
});
|
|
159
|
-
//#endregion
|
|
160
|
-
export { marshalCreateDatalabRequest, marshalUpdateDatalabRequest, unmarshalDatalab, unmarshalListClusterVersionsResponse, unmarshalListDatalabsResponse, unmarshalListNodeTypesResponse, unmarshalListNotebookVersionsResponse };
|
|
@@ -1,64 +0,0 @@
|
|
|
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;
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
//#region src/v1beta1/metadata.gen.ts
|
|
2
|
-
const 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 };
|