@azure/synapse-artifacts 1.0.0-beta.1 → 1.0.0-beta.10
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/CHANGELOG.md +60 -0
- package/README.md +6 -4
- package/dist/index.js +22546 -19192
- package/dist/index.js.map +1 -1
- package/dist-esm/src/artifactsClient.js +72 -0
- package/dist-esm/src/artifactsClient.js.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.js +25 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.js +822 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.js +22801 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.js +541 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/bigDataPools.js +100 -0
- package/dist-esm/src/operations/bigDataPools.js.map +1 -0
- package/dist-esm/src/operations/dataFlowDebugSession.js +403 -0
- package/dist-esm/src/operations/dataFlowDebugSession.js.map +1 -0
- package/dist-esm/src/operations/dataFlowOperations.js +439 -0
- package/dist-esm/src/operations/dataFlowOperations.js.map +1 -0
- package/dist-esm/src/operations/datasetOperations.js +439 -0
- package/dist-esm/src/operations/datasetOperations.js.map +1 -0
- package/dist-esm/src/operations/index.js +31 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/integrationRuntimes.js +100 -0
- package/dist-esm/src/operations/integrationRuntimes.js.map +1 -0
- package/dist-esm/src/operations/kqlScriptOperations.js +309 -0
- package/dist-esm/src/operations/kqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operations/kqlScripts.js +150 -0
- package/dist-esm/src/operations/kqlScripts.js.map +1 -0
- package/dist-esm/src/operations/library.js +512 -0
- package/dist-esm/src/operations/library.js.map +1 -0
- package/dist-esm/src/operations/linkConnectionOperations.js +534 -0
- package/dist-esm/src/operations/linkConnectionOperations.js.map +1 -0
- package/dist-esm/src/operations/linkedServiceOperations.js +440 -0
- package/dist-esm/src/operations/linkedServiceOperations.js.map +1 -0
- package/dist-esm/src/operations/metastore.js +182 -0
- package/dist-esm/src/operations/metastore.js.map +1 -0
- package/dist-esm/src/operations/notebookOperationResult.js +64 -0
- package/dist-esm/src/operations/notebookOperationResult.js.map +1 -0
- package/dist-esm/src/operations/notebookOperations.js +564 -0
- package/dist-esm/src/operations/notebookOperations.js.map +1 -0
- package/dist-esm/src/operations/pipelineOperations.js +485 -0
- package/dist-esm/src/operations/pipelineOperations.js.map +1 -0
- package/dist-esm/src/operations/pipelineRunOperations.js +185 -0
- package/dist-esm/src/operations/pipelineRunOperations.js.map +1 -0
- package/dist-esm/src/operations/sparkConfigurationOperations.js +440 -0
- package/dist-esm/src/operations/sparkConfigurationOperations.js.map +1 -0
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js +612 -0
- package/dist-esm/src/operations/sparkJobDefinitionOperations.js.map +1 -0
- package/dist-esm/src/operations/sqlPools.js +100 -0
- package/dist-esm/src/operations/sqlPools.js.map +1 -0
- package/dist-esm/src/operations/sqlScriptOperations.js +440 -0
- package/dist-esm/src/operations/sqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operations/triggerOperations.js +717 -0
- package/dist-esm/src/operations/triggerOperations.js.map +1 -0
- package/dist-esm/src/operations/triggerRunOperations.js +147 -0
- package/dist-esm/src/operations/triggerRunOperations.js.map +1 -0
- package/dist-esm/src/operations/workspaceGitRepoManagement.js +66 -0
- package/dist-esm/src/operations/workspaceGitRepoManagement.js.map +1 -0
- package/dist-esm/src/operations/workspaceOperations.js +62 -0
- package/dist-esm/src/operations/workspaceOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/bigDataPools.js +9 -0
- package/dist-esm/src/operationsInterfaces/bigDataPools.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataFlowDebugSession.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataFlowOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataFlowOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/datasetOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/datasetOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +31 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/integrationRuntimes.js +9 -0
- package/dist-esm/src/operationsInterfaces/integrationRuntimes.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/kqlScriptOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/kqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/kqlScripts.js +9 -0
- package/dist-esm/src/operationsInterfaces/kqlScripts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/library.js +9 -0
- package/dist-esm/src/operationsInterfaces/library.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkConnectionOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkConnectionOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedServiceOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkedServiceOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/metastore.js +9 -0
- package/dist-esm/src/operationsInterfaces/metastore.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/notebookOperationResult.js +9 -0
- package/dist-esm/src/operationsInterfaces/notebookOperationResult.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/notebookOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/notebookOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/pipelineOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/pipelineOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/pipelineRunOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/pipelineRunOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sparkConfigurationOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sparkConfigurationOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sparkJobDefinitionOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sparkJobDefinitionOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlPools.js +9 -0
- package/dist-esm/src/operationsInterfaces/sqlPools.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sqlScriptOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sqlScriptOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/triggerOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/triggerOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/triggerRunOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/triggerRunOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceGitRepoManagement.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaceGitRepoManagement.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaceOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaceOperations.js.map +1 -0
- package/dist-esm/src/tracing.js +13 -0
- package/dist-esm/src/tracing.js.map +1 -0
- package/package.json +82 -34
- package/types/synapse-artifacts.d.ts +6680 -11132
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/rollup.config.js +0 -41
- package/tsconfig.json +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metastore.js","sourceRoot":"","sources":["../../../src/operations/metastore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBA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,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createSpan } from \"../tracing\";\nimport { Metastore } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreTracing from \"@azure/core-tracing\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport {\n MetastoreRegisterObject,\n MetastoreRegisterOptionalParams,\n MetastoreRegisterResponse,\n MetastoreGetDatabaseOperationsOptionalParams,\n MetastoreGetDatabaseOperationsResponse,\n MetastoreUpdateObject,\n MetastoreUpdateOptionalParams,\n MetastoreUpdateResponse,\n MetastoreDeleteOptionalParams\n} from \"../models\";\n\n/** Class containing Metastore operations. */\nexport class MetastoreImpl implements Metastore {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class Metastore class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Register files in Syms\n * @param id The name of the database to be created. The name can contain only alphanumeric characters\n * and should not exceed 24 characters\n * @param registerBody The body for the register request\n * @param options The options parameters.\n */\n async register(\n id: string,\n registerBody: MetastoreRegisterObject,\n options?: MetastoreRegisterOptionalParams\n ): Promise<MetastoreRegisterResponse> {\n const { span } = createSpan(\"ArtifactsClient-register\", options || {});\n try {\n const result = await this.client.sendOperationRequest(\n { id, registerBody, options },\n registerOperationSpec\n );\n return result as MetastoreRegisterResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets status of the database\n * @param id\n * @param options The options parameters.\n */\n async getDatabaseOperations(\n id: string,\n options?: MetastoreGetDatabaseOperationsOptionalParams\n ): Promise<MetastoreGetDatabaseOperationsResponse> {\n const { span } = createSpan(\n \"ArtifactsClient-getDatabaseOperations\",\n options || {}\n );\n try {\n const result = await this.client.sendOperationRequest(\n { id, options },\n getDatabaseOperationsOperationSpec\n );\n return result as MetastoreGetDatabaseOperationsResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Update files in Syms\n * @param id The name of the database to be updated\n * @param updateBody The body for the update request\n * @param options The options parameters.\n */\n async update(\n id: string,\n updateBody: MetastoreUpdateObject,\n options?: MetastoreUpdateOptionalParams\n ): Promise<MetastoreUpdateResponse> {\n const { span } = createSpan(\"ArtifactsClient-update\", options || {});\n try {\n const result = await this.client.sendOperationRequest(\n { id, updateBody, options },\n updateOperationSpec\n );\n return result as MetastoreUpdateResponse;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n\n /**\n * Remove files in Syms\n * @param id\n * @param options The options parameters.\n */\n async delete(\n id: string,\n options?: MetastoreDeleteOptionalParams\n ): Promise<void> {\n const { span } = createSpan(\"ArtifactsClient-delete\", options || {});\n try {\n const result = await this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec\n );\n return result as void;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst registerOperationSpec: coreClient.OperationSpec = {\n path: \"/metastore/create-database-operations/{id}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.MetastoreRegistrationResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.registerBody,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getDatabaseOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/metastore/create-database-operations/{id}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.MetastoreRequestSuccessResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/metastore/update-database-operations/{id}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.MetastoreUpdationResponse\n },\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n requestBody: Parameters.updateBody,\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/metastore/databases/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion2],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { createSpan } from "../tracing";
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreTracing from "@azure/core-tracing";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
13
|
+
/** Class containing NotebookOperationResult operations. */
|
|
14
|
+
export class NotebookOperationResultImpl {
|
|
15
|
+
/**
|
|
16
|
+
* Initialize a new instance of the class NotebookOperationResult class.
|
|
17
|
+
* @param client Reference to the service client
|
|
18
|
+
*/
|
|
19
|
+
constructor(client) {
|
|
20
|
+
this.client = client;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get notebook operation result
|
|
24
|
+
* @param operationId Operation ID.
|
|
25
|
+
* @param options The options parameters.
|
|
26
|
+
*/
|
|
27
|
+
async get(operationId, options) {
|
|
28
|
+
const { span } = createSpan("ArtifactsClient-get", options || {});
|
|
29
|
+
try {
|
|
30
|
+
const result = await this.client.sendOperationRequest({ operationId, options }, getOperationSpec);
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
span.setStatus({
|
|
35
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
36
|
+
message: error.message
|
|
37
|
+
});
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
finally {
|
|
41
|
+
span.end();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Operation Specifications
|
|
46
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
47
|
+
const getOperationSpec = {
|
|
48
|
+
path: "/notebookOperationResults/{operationId}",
|
|
49
|
+
httpMethod: "GET",
|
|
50
|
+
responses: {
|
|
51
|
+
200: {},
|
|
52
|
+
201: {},
|
|
53
|
+
202: {},
|
|
54
|
+
204: {},
|
|
55
|
+
default: {
|
|
56
|
+
bodyMapper: Mappers.ErrorContract
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
queryParameters: [Parameters.apiVersion4],
|
|
60
|
+
urlParameters: [Parameters.endpoint, Parameters.operationId],
|
|
61
|
+
headerParameters: [Parameters.accept],
|
|
62
|
+
serializer
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=notebookOperationResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notebookOperationResult.js","sourceRoot":"","sources":["../../../src/operations/notebookOperationResult.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAInD,2DAA2D;AAC3D,MAAM,OAAO,2BAA2B;IAGtC;;;OAGG;IACH,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CACP,WAAmB,EACnB,OAAkD;QAElD,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,qBAAqB,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;QAClE,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACnD,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,gBAAgB,CACjB,CAAC;YACF,OAAO,MAAc,CAAC;SACvB;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,EAAE,WAAW,CAAC,cAAc,CAAC,KAAK;gBACtC,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CAAC;YACH,MAAM,KAAK,CAAC;SACb;gBAAS;YACR,IAAI,CAAC,GAAG,EAAE,CAAC;SACZ;IACH,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,yCAAyC;IAC/C,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createSpan } from \"../tracing\";\nimport { NotebookOperationResult } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreTracing from \"@azure/core-tracing\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { ArtifactsClient } from \"../artifactsClient\";\nimport { NotebookOperationResultGetOptionalParams } from \"../models\";\n\n/** Class containing NotebookOperationResult operations. */\nexport class NotebookOperationResultImpl implements NotebookOperationResult {\n private readonly client: ArtifactsClient;\n\n /**\n * Initialize a new instance of the class NotebookOperationResult class.\n * @param client Reference to the service client\n */\n constructor(client: ArtifactsClient) {\n this.client = client;\n }\n\n /**\n * Get notebook operation result\n * @param operationId Operation ID.\n * @param options The options parameters.\n */\n async get(\n operationId: string,\n options?: NotebookOperationResultGetOptionalParams\n ): Promise<void> {\n const { span } = createSpan(\"ArtifactsClient-get\", options || {});\n try {\n const result = await this.client.sendOperationRequest(\n { operationId, options },\n getOperationSpec\n );\n return result as void;\n } catch (error) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.UNSET,\n message: error.message\n });\n throw error;\n } finally {\n span.end();\n }\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/notebookOperationResults/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {},\n 201: {},\n 202: {},\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorContract\n }\n },\n queryParameters: [Parameters.apiVersion4],\n urlParameters: [Parameters.endpoint, Parameters.operationId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import { createSpan } from "../tracing";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as coreTracing from "@azure/core-tracing";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { LroEngine } from "@azure/core-lro";
|
|
15
|
+
import { LroImpl } from "../lroImpl";
|
|
16
|
+
/// <reference lib="esnext.asynciterable" />
|
|
17
|
+
/** Class containing NotebookOperations operations. */
|
|
18
|
+
export class NotebookOperationsImpl {
|
|
19
|
+
/**
|
|
20
|
+
* Initialize a new instance of the class NotebookOperations class.
|
|
21
|
+
* @param client Reference to the service client
|
|
22
|
+
*/
|
|
23
|
+
constructor(client) {
|
|
24
|
+
this.client = client;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lists Notebooks.
|
|
28
|
+
* @param options The options parameters.
|
|
29
|
+
*/
|
|
30
|
+
listNotebooksByWorkspace(options) {
|
|
31
|
+
const iter = this.getNotebooksByWorkspacePagingAll(options);
|
|
32
|
+
return {
|
|
33
|
+
next() {
|
|
34
|
+
return iter.next();
|
|
35
|
+
},
|
|
36
|
+
[Symbol.asyncIterator]() {
|
|
37
|
+
return this;
|
|
38
|
+
},
|
|
39
|
+
byPage: () => {
|
|
40
|
+
return this.getNotebooksByWorkspacePagingPage(options);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
getNotebooksByWorkspacePagingPage(options) {
|
|
45
|
+
return __asyncGenerator(this, arguments, function* getNotebooksByWorkspacePagingPage_1() {
|
|
46
|
+
let result = yield __await(this._getNotebooksByWorkspace(options));
|
|
47
|
+
yield yield __await(result.value || []);
|
|
48
|
+
let continuationToken = result.nextLink;
|
|
49
|
+
while (continuationToken) {
|
|
50
|
+
result = yield __await(this._getNotebooksByWorkspaceNext(continuationToken, options));
|
|
51
|
+
continuationToken = result.nextLink;
|
|
52
|
+
yield yield __await(result.value || []);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getNotebooksByWorkspacePagingAll(options) {
|
|
57
|
+
return __asyncGenerator(this, arguments, function* getNotebooksByWorkspacePagingAll_1() {
|
|
58
|
+
var e_1, _a;
|
|
59
|
+
try {
|
|
60
|
+
for (var _b = __asyncValues(this.getNotebooksByWorkspacePagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
61
|
+
const page = _c.value;
|
|
62
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_1) throw e_1.error; }
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Lists a summary of Notebooks.
|
|
76
|
+
* @param options The options parameters.
|
|
77
|
+
*/
|
|
78
|
+
listNotebookSummaryByWorkSpace(options) {
|
|
79
|
+
const iter = this.getNotebookSummaryByWorkSpacePagingAll(options);
|
|
80
|
+
return {
|
|
81
|
+
next() {
|
|
82
|
+
return iter.next();
|
|
83
|
+
},
|
|
84
|
+
[Symbol.asyncIterator]() {
|
|
85
|
+
return this;
|
|
86
|
+
},
|
|
87
|
+
byPage: () => {
|
|
88
|
+
return this.getNotebookSummaryByWorkSpacePagingPage(options);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
getNotebookSummaryByWorkSpacePagingPage(options) {
|
|
93
|
+
return __asyncGenerator(this, arguments, function* getNotebookSummaryByWorkSpacePagingPage_1() {
|
|
94
|
+
let result = yield __await(this._getNotebookSummaryByWorkSpace(options));
|
|
95
|
+
yield yield __await(result.value || []);
|
|
96
|
+
let continuationToken = result.nextLink;
|
|
97
|
+
while (continuationToken) {
|
|
98
|
+
result = yield __await(this._getNotebookSummaryByWorkSpaceNext(continuationToken, options));
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
yield yield __await(result.value || []);
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
getNotebookSummaryByWorkSpacePagingAll(options) {
|
|
105
|
+
return __asyncGenerator(this, arguments, function* getNotebookSummaryByWorkSpacePagingAll_1() {
|
|
106
|
+
var e_2, _a;
|
|
107
|
+
try {
|
|
108
|
+
for (var _b = __asyncValues(this.getNotebookSummaryByWorkSpacePagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
|
|
109
|
+
const page = _c.value;
|
|
110
|
+
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
114
|
+
finally {
|
|
115
|
+
try {
|
|
116
|
+
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
|
|
117
|
+
}
|
|
118
|
+
finally { if (e_2) throw e_2.error; }
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Lists Notebooks.
|
|
124
|
+
* @param options The options parameters.
|
|
125
|
+
*/
|
|
126
|
+
async _getNotebooksByWorkspace(options) {
|
|
127
|
+
const { span } = createSpan("ArtifactsClient-_getNotebooksByWorkspace", options || {});
|
|
128
|
+
try {
|
|
129
|
+
const result = await this.client.sendOperationRequest({ options }, getNotebooksByWorkspaceOperationSpec);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
span.setStatus({
|
|
134
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
135
|
+
message: error.message
|
|
136
|
+
});
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
finally {
|
|
140
|
+
span.end();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Lists a summary of Notebooks.
|
|
145
|
+
* @param options The options parameters.
|
|
146
|
+
*/
|
|
147
|
+
async _getNotebookSummaryByWorkSpace(options) {
|
|
148
|
+
const { span } = createSpan("ArtifactsClient-_getNotebookSummaryByWorkSpace", options || {});
|
|
149
|
+
try {
|
|
150
|
+
const result = await this.client.sendOperationRequest({ options }, getNotebookSummaryByWorkSpaceOperationSpec);
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
span.setStatus({
|
|
155
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
156
|
+
message: error.message
|
|
157
|
+
});
|
|
158
|
+
throw error;
|
|
159
|
+
}
|
|
160
|
+
finally {
|
|
161
|
+
span.end();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Creates or updates a Note Book.
|
|
166
|
+
* @param notebookName The notebook name.
|
|
167
|
+
* @param notebook Note book resource definition.
|
|
168
|
+
* @param options The options parameters.
|
|
169
|
+
*/
|
|
170
|
+
async beginCreateOrUpdateNotebook(notebookName, notebook, options) {
|
|
171
|
+
const { span } = createSpan("ArtifactsClient-beginCreateOrUpdateNotebook", options || {});
|
|
172
|
+
const directSendOperation = async (args, spec) => {
|
|
173
|
+
try {
|
|
174
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
175
|
+
return result;
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
span.setStatus({
|
|
179
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
180
|
+
message: error.message
|
|
181
|
+
});
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
span.end();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const sendOperation = async (args, spec) => {
|
|
189
|
+
var _a;
|
|
190
|
+
let currentRawResponse = undefined;
|
|
191
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
192
|
+
const callback = (rawResponse, flatResponse) => {
|
|
193
|
+
currentRawResponse = rawResponse;
|
|
194
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
195
|
+
};
|
|
196
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
197
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
198
|
+
return {
|
|
199
|
+
flatResponse,
|
|
200
|
+
rawResponse: {
|
|
201
|
+
statusCode: currentRawResponse.status,
|
|
202
|
+
body: currentRawResponse.parsedBody,
|
|
203
|
+
headers: currentRawResponse.headers.toJSON()
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
const lro = new LroImpl(sendOperation, { notebookName, notebook, options }, createOrUpdateNotebookOperationSpec);
|
|
208
|
+
const poller = new LroEngine(lro, {
|
|
209
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
210
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
211
|
+
});
|
|
212
|
+
await poller.poll();
|
|
213
|
+
return poller;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Creates or updates a Note Book.
|
|
217
|
+
* @param notebookName The notebook name.
|
|
218
|
+
* @param notebook Note book resource definition.
|
|
219
|
+
* @param options The options parameters.
|
|
220
|
+
*/
|
|
221
|
+
async beginCreateOrUpdateNotebookAndWait(notebookName, notebook, options) {
|
|
222
|
+
const poller = await this.beginCreateOrUpdateNotebook(notebookName, notebook, options);
|
|
223
|
+
return poller.pollUntilDone();
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Gets a Note Book.
|
|
227
|
+
* @param notebookName The notebook name.
|
|
228
|
+
* @param options The options parameters.
|
|
229
|
+
*/
|
|
230
|
+
async getNotebook(notebookName, options) {
|
|
231
|
+
const { span } = createSpan("ArtifactsClient-getNotebook", options || {});
|
|
232
|
+
try {
|
|
233
|
+
const result = await this.client.sendOperationRequest({ notebookName, options }, getNotebookOperationSpec);
|
|
234
|
+
return result;
|
|
235
|
+
}
|
|
236
|
+
catch (error) {
|
|
237
|
+
span.setStatus({
|
|
238
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
239
|
+
message: error.message
|
|
240
|
+
});
|
|
241
|
+
throw error;
|
|
242
|
+
}
|
|
243
|
+
finally {
|
|
244
|
+
span.end();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Deletes a Note book.
|
|
249
|
+
* @param notebookName The notebook name.
|
|
250
|
+
* @param options The options parameters.
|
|
251
|
+
*/
|
|
252
|
+
async beginDeleteNotebook(notebookName, options) {
|
|
253
|
+
const { span } = createSpan("ArtifactsClient-beginDeleteNotebook", options || {});
|
|
254
|
+
const directSendOperation = async (args, spec) => {
|
|
255
|
+
try {
|
|
256
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
257
|
+
return result;
|
|
258
|
+
}
|
|
259
|
+
catch (error) {
|
|
260
|
+
span.setStatus({
|
|
261
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
262
|
+
message: error.message
|
|
263
|
+
});
|
|
264
|
+
throw error;
|
|
265
|
+
}
|
|
266
|
+
finally {
|
|
267
|
+
span.end();
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
const sendOperation = async (args, spec) => {
|
|
271
|
+
var _a;
|
|
272
|
+
let currentRawResponse = undefined;
|
|
273
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
274
|
+
const callback = (rawResponse, flatResponse) => {
|
|
275
|
+
currentRawResponse = rawResponse;
|
|
276
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
277
|
+
};
|
|
278
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
279
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
280
|
+
return {
|
|
281
|
+
flatResponse,
|
|
282
|
+
rawResponse: {
|
|
283
|
+
statusCode: currentRawResponse.status,
|
|
284
|
+
body: currentRawResponse.parsedBody,
|
|
285
|
+
headers: currentRawResponse.headers.toJSON()
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
const lro = new LroImpl(sendOperation, { notebookName, options }, deleteNotebookOperationSpec);
|
|
290
|
+
const poller = new LroEngine(lro, {
|
|
291
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
292
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
293
|
+
});
|
|
294
|
+
await poller.poll();
|
|
295
|
+
return poller;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Deletes a Note book.
|
|
299
|
+
* @param notebookName The notebook name.
|
|
300
|
+
* @param options The options parameters.
|
|
301
|
+
*/
|
|
302
|
+
async beginDeleteNotebookAndWait(notebookName, options) {
|
|
303
|
+
const poller = await this.beginDeleteNotebook(notebookName, options);
|
|
304
|
+
return poller.pollUntilDone();
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Renames a notebook.
|
|
308
|
+
* @param notebookName The notebook name.
|
|
309
|
+
* @param request proposed new name.
|
|
310
|
+
* @param options The options parameters.
|
|
311
|
+
*/
|
|
312
|
+
async beginRenameNotebook(notebookName, request, options) {
|
|
313
|
+
const { span } = createSpan("ArtifactsClient-beginRenameNotebook", options || {});
|
|
314
|
+
const directSendOperation = async (args, spec) => {
|
|
315
|
+
try {
|
|
316
|
+
const result = await this.client.sendOperationRequest(args, spec);
|
|
317
|
+
return result;
|
|
318
|
+
}
|
|
319
|
+
catch (error) {
|
|
320
|
+
span.setStatus({
|
|
321
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
322
|
+
message: error.message
|
|
323
|
+
});
|
|
324
|
+
throw error;
|
|
325
|
+
}
|
|
326
|
+
finally {
|
|
327
|
+
span.end();
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const sendOperation = async (args, spec) => {
|
|
331
|
+
var _a;
|
|
332
|
+
let currentRawResponse = undefined;
|
|
333
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
334
|
+
const callback = (rawResponse, flatResponse) => {
|
|
335
|
+
currentRawResponse = rawResponse;
|
|
336
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
337
|
+
};
|
|
338
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
339
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
340
|
+
return {
|
|
341
|
+
flatResponse,
|
|
342
|
+
rawResponse: {
|
|
343
|
+
statusCode: currentRawResponse.status,
|
|
344
|
+
body: currentRawResponse.parsedBody,
|
|
345
|
+
headers: currentRawResponse.headers.toJSON()
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
const lro = new LroImpl(sendOperation, { notebookName, request, options }, renameNotebookOperationSpec);
|
|
350
|
+
const poller = new LroEngine(lro, {
|
|
351
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
352
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
353
|
+
});
|
|
354
|
+
await poller.poll();
|
|
355
|
+
return poller;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Renames a notebook.
|
|
359
|
+
* @param notebookName The notebook name.
|
|
360
|
+
* @param request proposed new name.
|
|
361
|
+
* @param options The options parameters.
|
|
362
|
+
*/
|
|
363
|
+
async beginRenameNotebookAndWait(notebookName, request, options) {
|
|
364
|
+
const poller = await this.beginRenameNotebook(notebookName, request, options);
|
|
365
|
+
return poller.pollUntilDone();
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* GetNotebooksByWorkspaceNext
|
|
369
|
+
* @param nextLink The nextLink from the previous successful call to the GetNotebooksByWorkspace
|
|
370
|
+
* method.
|
|
371
|
+
* @param options The options parameters.
|
|
372
|
+
*/
|
|
373
|
+
async _getNotebooksByWorkspaceNext(nextLink, options) {
|
|
374
|
+
const { span } = createSpan("ArtifactsClient-_getNotebooksByWorkspaceNext", options || {});
|
|
375
|
+
try {
|
|
376
|
+
const result = await this.client.sendOperationRequest({ nextLink, options }, getNotebooksByWorkspaceNextOperationSpec);
|
|
377
|
+
return result;
|
|
378
|
+
}
|
|
379
|
+
catch (error) {
|
|
380
|
+
span.setStatus({
|
|
381
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
382
|
+
message: error.message
|
|
383
|
+
});
|
|
384
|
+
throw error;
|
|
385
|
+
}
|
|
386
|
+
finally {
|
|
387
|
+
span.end();
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* GetNotebookSummaryByWorkSpaceNext
|
|
392
|
+
* @param nextLink The nextLink from the previous successful call to the GetNotebookSummaryByWorkSpace
|
|
393
|
+
* method.
|
|
394
|
+
* @param options The options parameters.
|
|
395
|
+
*/
|
|
396
|
+
async _getNotebookSummaryByWorkSpaceNext(nextLink, options) {
|
|
397
|
+
const { span } = createSpan("ArtifactsClient-_getNotebookSummaryByWorkSpaceNext", options || {});
|
|
398
|
+
try {
|
|
399
|
+
const result = await this.client.sendOperationRequest({ nextLink, options }, getNotebookSummaryByWorkSpaceNextOperationSpec);
|
|
400
|
+
return result;
|
|
401
|
+
}
|
|
402
|
+
catch (error) {
|
|
403
|
+
span.setStatus({
|
|
404
|
+
code: coreTracing.SpanStatusCode.UNSET,
|
|
405
|
+
message: error.message
|
|
406
|
+
});
|
|
407
|
+
throw error;
|
|
408
|
+
}
|
|
409
|
+
finally {
|
|
410
|
+
span.end();
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
// Operation Specifications
|
|
415
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
416
|
+
const getNotebooksByWorkspaceOperationSpec = {
|
|
417
|
+
path: "/notebooks",
|
|
418
|
+
httpMethod: "GET",
|
|
419
|
+
responses: {
|
|
420
|
+
200: {
|
|
421
|
+
bodyMapper: Mappers.NotebookListResponse
|
|
422
|
+
},
|
|
423
|
+
default: {
|
|
424
|
+
bodyMapper: Mappers.CloudError
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
queryParameters: [Parameters.apiVersion4],
|
|
428
|
+
urlParameters: [Parameters.endpoint],
|
|
429
|
+
headerParameters: [Parameters.accept],
|
|
430
|
+
serializer
|
|
431
|
+
};
|
|
432
|
+
const getNotebookSummaryByWorkSpaceOperationSpec = {
|
|
433
|
+
path: "/notebooksSummary",
|
|
434
|
+
httpMethod: "GET",
|
|
435
|
+
responses: {
|
|
436
|
+
200: {
|
|
437
|
+
bodyMapper: Mappers.NotebookListResponse
|
|
438
|
+
},
|
|
439
|
+
default: {
|
|
440
|
+
bodyMapper: Mappers.CloudError
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
queryParameters: [Parameters.apiVersion4],
|
|
444
|
+
urlParameters: [Parameters.endpoint],
|
|
445
|
+
headerParameters: [Parameters.accept],
|
|
446
|
+
serializer
|
|
447
|
+
};
|
|
448
|
+
const createOrUpdateNotebookOperationSpec = {
|
|
449
|
+
path: "/notebooks/{notebookName}",
|
|
450
|
+
httpMethod: "PUT",
|
|
451
|
+
responses: {
|
|
452
|
+
200: {
|
|
453
|
+
bodyMapper: Mappers.NotebookResource
|
|
454
|
+
},
|
|
455
|
+
201: {
|
|
456
|
+
bodyMapper: Mappers.NotebookResource
|
|
457
|
+
},
|
|
458
|
+
202: {
|
|
459
|
+
bodyMapper: Mappers.NotebookResource
|
|
460
|
+
},
|
|
461
|
+
204: {
|
|
462
|
+
bodyMapper: Mappers.NotebookResource
|
|
463
|
+
},
|
|
464
|
+
default: {
|
|
465
|
+
bodyMapper: Mappers.CloudError
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
requestBody: Parameters.notebook,
|
|
469
|
+
queryParameters: [Parameters.apiVersion4],
|
|
470
|
+
urlParameters: [Parameters.endpoint, Parameters.notebookName],
|
|
471
|
+
headerParameters: [
|
|
472
|
+
Parameters.accept,
|
|
473
|
+
Parameters.contentType,
|
|
474
|
+
Parameters.ifMatch
|
|
475
|
+
],
|
|
476
|
+
mediaType: "json",
|
|
477
|
+
serializer
|
|
478
|
+
};
|
|
479
|
+
const getNotebookOperationSpec = {
|
|
480
|
+
path: "/notebooks/{notebookName}",
|
|
481
|
+
httpMethod: "GET",
|
|
482
|
+
responses: {
|
|
483
|
+
200: {
|
|
484
|
+
bodyMapper: Mappers.NotebookResource
|
|
485
|
+
},
|
|
486
|
+
304: {},
|
|
487
|
+
default: {
|
|
488
|
+
bodyMapper: Mappers.CloudError
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
queryParameters: [Parameters.apiVersion4],
|
|
492
|
+
urlParameters: [Parameters.endpoint, Parameters.notebookName],
|
|
493
|
+
headerParameters: [Parameters.accept, Parameters.ifNoneMatch],
|
|
494
|
+
serializer
|
|
495
|
+
};
|
|
496
|
+
const deleteNotebookOperationSpec = {
|
|
497
|
+
path: "/notebooks/{notebookName}",
|
|
498
|
+
httpMethod: "DELETE",
|
|
499
|
+
responses: {
|
|
500
|
+
200: {},
|
|
501
|
+
201: {},
|
|
502
|
+
202: {},
|
|
503
|
+
204: {},
|
|
504
|
+
default: {
|
|
505
|
+
bodyMapper: Mappers.CloudError
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
queryParameters: [Parameters.apiVersion4],
|
|
509
|
+
urlParameters: [Parameters.endpoint, Parameters.notebookName],
|
|
510
|
+
headerParameters: [Parameters.accept],
|
|
511
|
+
serializer
|
|
512
|
+
};
|
|
513
|
+
const renameNotebookOperationSpec = {
|
|
514
|
+
path: "/notebooks/{notebookName}/rename",
|
|
515
|
+
httpMethod: "POST",
|
|
516
|
+
responses: {
|
|
517
|
+
200: {},
|
|
518
|
+
201: {},
|
|
519
|
+
202: {},
|
|
520
|
+
204: {},
|
|
521
|
+
default: {
|
|
522
|
+
bodyMapper: Mappers.CloudError
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
requestBody: Parameters.request,
|
|
526
|
+
queryParameters: [Parameters.apiVersion4],
|
|
527
|
+
urlParameters: [Parameters.endpoint, Parameters.notebookName],
|
|
528
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
529
|
+
mediaType: "json",
|
|
530
|
+
serializer
|
|
531
|
+
};
|
|
532
|
+
const getNotebooksByWorkspaceNextOperationSpec = {
|
|
533
|
+
path: "{nextLink}",
|
|
534
|
+
httpMethod: "GET",
|
|
535
|
+
responses: {
|
|
536
|
+
200: {
|
|
537
|
+
bodyMapper: Mappers.NotebookListResponse
|
|
538
|
+
},
|
|
539
|
+
default: {
|
|
540
|
+
bodyMapper: Mappers.CloudError
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
queryParameters: [Parameters.apiVersion4],
|
|
544
|
+
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
|
545
|
+
headerParameters: [Parameters.accept],
|
|
546
|
+
serializer
|
|
547
|
+
};
|
|
548
|
+
const getNotebookSummaryByWorkSpaceNextOperationSpec = {
|
|
549
|
+
path: "{nextLink}",
|
|
550
|
+
httpMethod: "GET",
|
|
551
|
+
responses: {
|
|
552
|
+
200: {
|
|
553
|
+
bodyMapper: Mappers.NotebookListResponse
|
|
554
|
+
},
|
|
555
|
+
default: {
|
|
556
|
+
bodyMapper: Mappers.CloudError
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
queryParameters: [Parameters.apiVersion4],
|
|
560
|
+
urlParameters: [Parameters.endpoint, Parameters.nextLink],
|
|
561
|
+
headerParameters: [Parameters.accept],
|
|
562
|
+
serializer
|
|
563
|
+
};
|
|
564
|
+
//# sourceMappingURL=notebookOperations.js.map
|