@azure/arm-quantum 1.0.0-beta.1 → 1.0.0-beta.2
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 +29 -1
- package/LICENSE +1 -1
- package/dist/index.js +702 -526
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/offeringsListSample.js +4 -9
- package/dist-esm/samples-dev/offeringsListSample.js.map +1 -1
- package/dist-esm/samples-dev/operationsListSample.js +4 -9
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/workspaceCheckNameAvailabilitySample.js +3 -3
- package/dist-esm/samples-dev/workspaceCheckNameAvailabilitySample.js.map +1 -1
- package/dist-esm/samples-dev/workspaceListKeysSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.js +39 -0
- package/dist-esm/samples-dev/workspaceListKeysSample.js.map +1 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.d.ts +2 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.js +40 -0
- package/dist-esm/samples-dev/workspaceRegenerateKeysSample.js.map +1 -0
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js +10 -8
- package/dist-esm/samples-dev/workspacesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/workspacesGetSample.js +1 -1
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js +4 -9
- package/dist-esm/samples-dev/workspacesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js +4 -9
- package/dist-esm/samples-dev/workspacesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/workspacesUpdateTagsSample.js +2 -2
- package/dist-esm/src/azureQuantumManagementClient.d.ts +1 -1
- package/dist-esm/src/azureQuantumManagementClient.d.ts.map +1 -1
- package/dist-esm/src/azureQuantumManagementClient.js +10 -10
- package/dist-esm/src/azureQuantumManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +106 -41
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +8 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +5 -1
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +454 -345
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +1 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +43 -32
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/offerings.js +14 -19
- package/dist-esm/src/operations/offerings.js.map +1 -1
- package/dist-esm/src/operations/operations.js +12 -17
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/workspace.d.ts +19 -1
- package/dist-esm/src/operations/workspace.d.ts.map +1 -1
- package/dist-esm/src/operations/workspace.js +69 -5
- package/dist-esm/src/operations/workspace.js.map +1 -1
- package/dist-esm/src/operations/workspaces.d.ts +9 -9
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -1
- package/dist-esm/src/operations/workspaces.js +68 -77
- package/dist-esm/src/operations/workspaces.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/workspace.d.ts +19 -1
- package/dist-esm/src/operationsInterfaces/workspace.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +7 -7
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/test/quantum_operations_test.spec.js +19 -26
- package/dist-esm/test/quantum_operations_test.spec.js.map +1 -1
- package/package.json +16 -21
- package/review/arm-quantum.api.md +55 -6
- package/src/azureQuantumManagementClient.ts +19 -18
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +123 -48
- package/src/models/mappers.ts +476 -367
- package/src/models/parameters.ts +46 -33
- package/src/operations/offerings.ts +20 -21
- package/src/operations/operations.ts +16 -16
- package/src/operations/workspace.ts +94 -10
- package/src/operations/workspaces.ts +110 -117
- package/src/operationsInterfaces/offerings.ts +1 -1
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/workspace.ts +33 -2
- package/src/operationsInterfaces/workspaces.ts +16 -16
- package/src/pagingHelper.ts +1 -1
- package/types/arm-quantum.d.ts +127 -34
- package/types/tsdoc-metadata.json +1 -1
- package/rollup.config.js +0 -122
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import { __asyncValues, __awaiter } from "tslib";
|
|
9
|
-
import { env, Recorder, isPlaybackMode, } from "@azure-tools/test-recorder";
|
|
9
|
+
import { env, Recorder, delay, isPlaybackMode, } from "@azure-tools/test-recorder";
|
|
10
10
|
import { createTestCredential } from "@azure-tools/test-credential";
|
|
11
11
|
import { assert } from "chai";
|
|
12
12
|
import { AzureQuantumManagementClient } from "../src/azureQuantumManagementClient";
|
|
@@ -14,7 +14,7 @@ const replaceableVariables = {
|
|
|
14
14
|
AZURE_CLIENT_ID: "azure_client_id",
|
|
15
15
|
AZURE_CLIENT_SECRET: "azure_client_secret",
|
|
16
16
|
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
|
|
17
|
-
SUBSCRIPTION_ID: "
|
|
17
|
+
SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888"
|
|
18
18
|
};
|
|
19
19
|
const recorderOptions = {
|
|
20
20
|
envSetupForPlayback: replaceableVariables
|
|
@@ -51,15 +51,18 @@ describe("quantum test", () => {
|
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
const res = yield client.workspaces.beginCreateOrUpdateAndWait(resourceGroup, resourcename, {
|
|
53
53
|
location,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
properties: {
|
|
55
|
+
providers: [
|
|
56
|
+
{
|
|
57
|
+
providerId: "microsoft-qc",
|
|
58
|
+
providerSku: "learn-and-develop",
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
storageAccount: "/subscriptions/" + subscriptionId + "/resourcegroups/" + resourceGroup + "/providers/Microsoft.Storage/storageAccounts/czwtestsa",
|
|
62
|
+
},
|
|
61
63
|
identity: { type: "SystemAssigned" }
|
|
62
64
|
}, testPollingOptions);
|
|
65
|
+
yield delay(10000);
|
|
63
66
|
assert.equal(res.name, resourcename);
|
|
64
67
|
});
|
|
65
68
|
});
|
|
@@ -74,16 +77,11 @@ describe("quantum test", () => {
|
|
|
74
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
78
|
const resArray = new Array();
|
|
76
79
|
try {
|
|
77
|
-
for (var _d = true, _e = __asyncValues(client.workspaces.listByResourceGroup(resourceGroup)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
80
|
+
for (var _d = true, _e = __asyncValues(client.workspaces.listByResourceGroup(resourceGroup)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
78
81
|
_c = _f.value;
|
|
79
82
|
_d = false;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
resArray.push(item);
|
|
83
|
-
}
|
|
84
|
-
finally {
|
|
85
|
-
_d = true;
|
|
86
|
-
}
|
|
83
|
+
let item = _c;
|
|
84
|
+
resArray.push(item);
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
@@ -100,18 +98,13 @@ describe("quantum test", () => {
|
|
|
100
98
|
var _a, e_2, _b, _c;
|
|
101
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
100
|
const resArray = new Array();
|
|
103
|
-
const res = yield client.workspaces.beginDeleteAndWait(resourceGroup, resourcename);
|
|
101
|
+
const res = yield client.workspaces.beginDeleteAndWait(resourceGroup, resourcename, testPollingOptions);
|
|
104
102
|
try {
|
|
105
|
-
for (var _d = true, _e = __asyncValues(client.workspaces.listByResourceGroup(resourceGroup)), _f; _f = yield _e.next(), _a = _f.done, !_a;) {
|
|
103
|
+
for (var _d = true, _e = __asyncValues(client.workspaces.listByResourceGroup(resourceGroup)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
106
104
|
_c = _f.value;
|
|
107
105
|
_d = false;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
resArray.push(item);
|
|
111
|
-
}
|
|
112
|
-
finally {
|
|
113
|
-
_d = true;
|
|
114
|
-
}
|
|
106
|
+
let item = _c;
|
|
107
|
+
resArray.push(item);
|
|
115
108
|
}
|
|
116
109
|
}
|
|
117
110
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantum_operations_test.spec.js","sourceRoot":"","sources":["../../test/quantum_operations_test.spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,
|
|
1
|
+
{"version":3,"file":"quantum_operations_test.spec.js","sourceRoot":"","sources":["../../test/quantum_operations_test.spec.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,GAAG,EACH,QAAQ,EAER,KAAK,EACL,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAEnF,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBA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AkB,CACrG,CAAA;;gBACD,KAAuB,eAAA,KAAA,cAAA,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAA,IAAA,sDAAE,CAAC;oBAAvD,cAAoD;oBAApD,WAAoD;oBAAhE,IAAI,IAAI,KAAA,CAAA;oBACjB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACtB,CAAC;;;;;;;;;YACD,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
"sdk-type": "mgmt",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "A generated SDK for AzureQuantumManagementClient.",
|
|
6
|
-
"version": "1.0.0-beta.
|
|
6
|
+
"version": "1.0.0-beta.2",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@azure/core-lro": "^2.5.
|
|
11
|
+
"@azure/core-lro": "^2.5.4",
|
|
12
12
|
"@azure/abort-controller": "^1.0.0",
|
|
13
13
|
"@azure/core-paging": "^1.2.0",
|
|
14
14
|
"@azure/core-client": "^1.7.0",
|
|
15
|
-
"@azure/core-auth": "^1.
|
|
16
|
-
"@azure/core-rest-pipeline": "^1.
|
|
15
|
+
"@azure/core-auth": "^1.6.0",
|
|
16
|
+
"@azure/core-rest-pipeline": "^1.14.0",
|
|
17
17
|
"tslib": "^2.2.0"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
@@ -29,26 +29,23 @@
|
|
|
29
29
|
"types": "./types/arm-quantum.d.ts",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@microsoft/api-extractor": "^7.31.1",
|
|
32
|
-
"@rollup/plugin-commonjs": "^24.0.0",
|
|
33
|
-
"@rollup/plugin-json": "^6.0.0",
|
|
34
|
-
"@rollup/plugin-multi-entry": "^6.0.0",
|
|
35
|
-
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
36
32
|
"mkdirp": "^2.1.2",
|
|
37
|
-
"
|
|
38
|
-
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
39
|
-
"typescript": "~5.0.0",
|
|
33
|
+
"typescript": "~5.3.3",
|
|
40
34
|
"uglify-js": "^3.4.9",
|
|
41
|
-
"rimraf": "^
|
|
35
|
+
"rimraf": "^5.0.0",
|
|
42
36
|
"dotenv": "^16.0.0",
|
|
43
|
-
"@azure/
|
|
37
|
+
"@azure/dev-tool": "^1.0.0",
|
|
38
|
+
"@azure/identity": "^4.0.1",
|
|
44
39
|
"@azure-tools/test-recorder": "^3.0.0",
|
|
45
40
|
"@azure-tools/test-credential": "^1.0.0",
|
|
46
|
-
"mocha": "^
|
|
41
|
+
"mocha": "^10.0.0",
|
|
42
|
+
"@types/mocha": "^10.0.0",
|
|
43
|
+
"esm": "^3.2.18",
|
|
47
44
|
"@types/chai": "^4.2.8",
|
|
48
45
|
"chai": "^4.2.0",
|
|
49
46
|
"cross-env": "^7.0.2",
|
|
50
|
-
"@types/node": "^
|
|
51
|
-
"
|
|
47
|
+
"@types/node": "^18.0.0",
|
|
48
|
+
"ts-node": "^10.0.0"
|
|
52
49
|
},
|
|
53
50
|
"repository": {
|
|
54
51
|
"type": "git",
|
|
@@ -69,21 +66,19 @@
|
|
|
69
66
|
"src/**/*.ts",
|
|
70
67
|
"README.md",
|
|
71
68
|
"LICENSE",
|
|
72
|
-
"rollup.config.js",
|
|
73
69
|
"tsconfig.json",
|
|
74
70
|
"review/*",
|
|
75
71
|
"CHANGELOG.md",
|
|
76
72
|
"types/*"
|
|
77
73
|
],
|
|
78
74
|
"scripts": {
|
|
79
|
-
"build": "npm run clean && tsc &&
|
|
75
|
+
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api",
|
|
80
76
|
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
|
81
77
|
"prepack": "npm run build",
|
|
82
78
|
"pack": "npm pack 2>&1",
|
|
83
79
|
"extract-api": "api-extractor run --local",
|
|
84
80
|
"lint": "echo skipped",
|
|
85
|
-
"
|
|
86
|
-
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
81
|
+
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
|
87
82
|
"build:node": "echo skipped",
|
|
88
83
|
"build:browser": "echo skipped",
|
|
89
84
|
"build:test": "echo skipped",
|
|
@@ -10,6 +10,17 @@ import { OperationState } from '@azure/core-lro';
|
|
|
10
10
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
11
11
|
import { SimplePollerLike } from '@azure/core-lro';
|
|
12
12
|
|
|
13
|
+
// @public
|
|
14
|
+
export interface ApiKey {
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
readonly key?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// @public
|
|
20
|
+
export interface APIKeys {
|
|
21
|
+
keys?: KeyType_2[];
|
|
22
|
+
}
|
|
23
|
+
|
|
13
24
|
// @public (undocumented)
|
|
14
25
|
export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
15
26
|
// (undocumented)
|
|
@@ -75,6 +86,10 @@ export interface ErrorResponse {
|
|
|
75
86
|
// @public
|
|
76
87
|
export function getContinuationToken(page: unknown): string | undefined;
|
|
77
88
|
|
|
89
|
+
// @public
|
|
90
|
+
type KeyType_2 = string;
|
|
91
|
+
export { KeyType_2 as KeyType }
|
|
92
|
+
|
|
78
93
|
// @public
|
|
79
94
|
export enum KnownCreatedByType {
|
|
80
95
|
Application = "Application",
|
|
@@ -83,6 +98,12 @@ export enum KnownCreatedByType {
|
|
|
83
98
|
User = "User"
|
|
84
99
|
}
|
|
85
100
|
|
|
101
|
+
// @public
|
|
102
|
+
export enum KnownKeyType {
|
|
103
|
+
Primary = "Primary",
|
|
104
|
+
Secondary = "Secondary"
|
|
105
|
+
}
|
|
106
|
+
|
|
86
107
|
// @public
|
|
87
108
|
export enum KnownProvisioningStatus {
|
|
88
109
|
Failed = "Failed",
|
|
@@ -116,6 +137,15 @@ export enum KnownUsableStatus {
|
|
|
116
137
|
Yes = "Yes"
|
|
117
138
|
}
|
|
118
139
|
|
|
140
|
+
// @public
|
|
141
|
+
export interface ListKeysResult {
|
|
142
|
+
apiKeyEnabled?: boolean;
|
|
143
|
+
readonly primaryConnectionString?: string;
|
|
144
|
+
primaryKey?: ApiKey;
|
|
145
|
+
readonly secondaryConnectionString?: string;
|
|
146
|
+
secondaryKey?: ApiKey;
|
|
147
|
+
}
|
|
148
|
+
|
|
119
149
|
// @public
|
|
120
150
|
export interface Offerings {
|
|
121
151
|
list(locationName: string, options?: OfferingsListOptionalParams): PagedAsyncIterableIterator<ProviderDescription>;
|
|
@@ -241,13 +271,8 @@ export type ProvisioningStatus = string;
|
|
|
241
271
|
|
|
242
272
|
// @public
|
|
243
273
|
export interface QuantumWorkspace extends TrackedResource {
|
|
244
|
-
readonly endpointUri?: string;
|
|
245
274
|
identity?: QuantumWorkspaceIdentity;
|
|
246
|
-
|
|
247
|
-
readonly provisioningState?: ProvisioningStatus;
|
|
248
|
-
storageAccount?: string;
|
|
249
|
-
readonly systemData?: SystemData;
|
|
250
|
-
readonly usable?: UsableStatus;
|
|
275
|
+
properties?: WorkspaceResourceProperties;
|
|
251
276
|
}
|
|
252
277
|
|
|
253
278
|
// @public
|
|
@@ -273,6 +298,7 @@ export interface QuotaDimension {
|
|
|
273
298
|
export interface Resource {
|
|
274
299
|
readonly id?: string;
|
|
275
300
|
readonly name?: string;
|
|
301
|
+
readonly systemData?: SystemData;
|
|
276
302
|
readonly type?: string;
|
|
277
303
|
}
|
|
278
304
|
|
|
@@ -335,6 +361,8 @@ export type UsableStatus = string;
|
|
|
335
361
|
// @public
|
|
336
362
|
export interface Workspace {
|
|
337
363
|
checkNameAvailability(locationName: string, checkNameAvailabilityParameters: CheckNameAvailabilityParameters, options?: WorkspaceCheckNameAvailabilityOptionalParams): Promise<WorkspaceCheckNameAvailabilityResponse>;
|
|
364
|
+
listKeys(resourceGroupName: string, workspaceName: string, options?: WorkspaceListKeysOptionalParams): Promise<WorkspaceListKeysResponse>;
|
|
365
|
+
regenerateKeys(resourceGroupName: string, workspaceName: string, keySpecification: APIKeys, options?: WorkspaceRegenerateKeysOptionalParams): Promise<void>;
|
|
338
366
|
}
|
|
339
367
|
|
|
340
368
|
// @public
|
|
@@ -344,12 +372,33 @@ export interface WorkspaceCheckNameAvailabilityOptionalParams extends coreClient
|
|
|
344
372
|
// @public
|
|
345
373
|
export type WorkspaceCheckNameAvailabilityResponse = CheckNameAvailabilityResult;
|
|
346
374
|
|
|
375
|
+
// @public
|
|
376
|
+
export interface WorkspaceListKeysOptionalParams extends coreClient.OperationOptions {
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// @public
|
|
380
|
+
export type WorkspaceListKeysResponse = ListKeysResult;
|
|
381
|
+
|
|
347
382
|
// @public
|
|
348
383
|
export interface WorkspaceListResult {
|
|
349
384
|
nextLink?: string;
|
|
350
385
|
value?: QuantumWorkspace[];
|
|
351
386
|
}
|
|
352
387
|
|
|
388
|
+
// @public
|
|
389
|
+
export interface WorkspaceRegenerateKeysOptionalParams extends coreClient.OperationOptions {
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// @public
|
|
393
|
+
export interface WorkspaceResourceProperties {
|
|
394
|
+
apiKeyEnabled?: boolean;
|
|
395
|
+
readonly endpointUri?: string;
|
|
396
|
+
providers?: Provider[];
|
|
397
|
+
readonly provisioningState?: ProvisioningStatus;
|
|
398
|
+
storageAccount?: string;
|
|
399
|
+
readonly usable?: UsableStatus;
|
|
400
|
+
}
|
|
401
|
+
|
|
353
402
|
// @public
|
|
354
403
|
export interface Workspaces {
|
|
355
404
|
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, quantumWorkspace: QuantumWorkspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<WorkspacesCreateOrUpdateResponse>, WorkspacesCreateOrUpdateResponse>>;
|
|
@@ -11,20 +11,20 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
|
11
11
|
import {
|
|
12
12
|
PipelineRequest,
|
|
13
13
|
PipelineResponse,
|
|
14
|
-
SendRequest
|
|
14
|
+
SendRequest,
|
|
15
15
|
} from "@azure/core-rest-pipeline";
|
|
16
16
|
import * as coreAuth from "@azure/core-auth";
|
|
17
17
|
import {
|
|
18
18
|
WorkspacesImpl,
|
|
19
19
|
OfferingsImpl,
|
|
20
20
|
OperationsImpl,
|
|
21
|
-
WorkspaceImpl
|
|
21
|
+
WorkspaceImpl,
|
|
22
22
|
} from "./operations";
|
|
23
23
|
import {
|
|
24
24
|
Workspaces,
|
|
25
25
|
Offerings,
|
|
26
26
|
Operations,
|
|
27
|
-
Workspace
|
|
27
|
+
Workspace,
|
|
28
28
|
} from "./operationsInterfaces";
|
|
29
29
|
import { AzureQuantumManagementClientOptionalParams } from "./models";
|
|
30
30
|
|
|
@@ -36,13 +36,13 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
36
36
|
/**
|
|
37
37
|
* Initializes a new instance of the AzureQuantumManagementClient class.
|
|
38
38
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
39
|
-
* @param subscriptionId The
|
|
39
|
+
* @param subscriptionId The ID of the target subscription. The value must be an UUID.
|
|
40
40
|
* @param options The parameter options
|
|
41
41
|
*/
|
|
42
42
|
constructor(
|
|
43
43
|
credentials: coreAuth.TokenCredential,
|
|
44
44
|
subscriptionId: string,
|
|
45
|
-
options?: AzureQuantumManagementClientOptionalParams
|
|
45
|
+
options?: AzureQuantumManagementClientOptionalParams,
|
|
46
46
|
) {
|
|
47
47
|
if (credentials === undefined) {
|
|
48
48
|
throw new Error("'credentials' cannot be null");
|
|
@@ -57,10 +57,10 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
57
57
|
}
|
|
58
58
|
const defaults: AzureQuantumManagementClientOptionalParams = {
|
|
59
59
|
requestContentType: "application/json; charset=utf-8",
|
|
60
|
-
credential: credentials
|
|
60
|
+
credential: credentials,
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
const packageDetails = `azsdk-js-arm-quantum/1.0.0-beta.
|
|
63
|
+
const packageDetails = `azsdk-js-arm-quantum/1.0.0-beta.2`;
|
|
64
64
|
const userAgentPrefix =
|
|
65
65
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
66
66
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -70,20 +70,21 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
70
70
|
...defaults,
|
|
71
71
|
...options,
|
|
72
72
|
userAgentOptions: {
|
|
73
|
-
userAgentPrefix
|
|
73
|
+
userAgentPrefix,
|
|
74
74
|
},
|
|
75
75
|
endpoint:
|
|
76
|
-
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
76
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
77
77
|
};
|
|
78
78
|
super(optionsWithDefaults);
|
|
79
79
|
|
|
80
80
|
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
81
81
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
82
|
-
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
|
|
82
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
|
|
83
|
+
options.pipeline.getOrderedPolicies();
|
|
83
84
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
84
85
|
(pipelinePolicy) =>
|
|
85
86
|
pipelinePolicy.name ===
|
|
86
|
-
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
87
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
87
88
|
);
|
|
88
89
|
}
|
|
89
90
|
if (
|
|
@@ -93,7 +94,7 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
93
94
|
!bearerTokenAuthenticationPolicyFound
|
|
94
95
|
) {
|
|
95
96
|
this.pipeline.removePolicy({
|
|
96
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
97
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
97
98
|
});
|
|
98
99
|
this.pipeline.addPolicy(
|
|
99
100
|
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
@@ -103,9 +104,9 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
103
104
|
`${optionsWithDefaults.endpoint}/.default`,
|
|
104
105
|
challengeCallbacks: {
|
|
105
106
|
authorizeRequestOnChallenge:
|
|
106
|
-
coreClient.authorizeRequestOnClaimChallenge
|
|
107
|
-
}
|
|
108
|
-
})
|
|
107
|
+
coreClient.authorizeRequestOnClaimChallenge,
|
|
108
|
+
},
|
|
109
|
+
}),
|
|
109
110
|
);
|
|
110
111
|
}
|
|
111
112
|
// Parameter assignments
|
|
@@ -113,7 +114,7 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
113
114
|
|
|
114
115
|
// Assigning values to Constant parameters
|
|
115
116
|
this.$host = options.$host || "https://management.azure.com";
|
|
116
|
-
this.apiVersion = options.apiVersion || "
|
|
117
|
+
this.apiVersion = options.apiVersion || "2023-11-13-preview";
|
|
117
118
|
this.workspaces = new WorkspacesImpl(this);
|
|
118
119
|
this.offerings = new OfferingsImpl(this);
|
|
119
120
|
this.operations = new OperationsImpl(this);
|
|
@@ -130,7 +131,7 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
130
131
|
name: "CustomApiVersionPolicy",
|
|
131
132
|
async sendRequest(
|
|
132
133
|
request: PipelineRequest,
|
|
133
|
-
next: SendRequest
|
|
134
|
+
next: SendRequest,
|
|
134
135
|
): Promise<PipelineResponse> {
|
|
135
136
|
const param = request.url.split("?");
|
|
136
137
|
if (param.length > 1) {
|
|
@@ -144,7 +145,7 @@ export class AzureQuantumManagementClient extends coreClient.ServiceClient {
|
|
|
144
145
|
request.url = param[0] + "?" + newParams.join("&");
|
|
145
146
|
}
|
|
146
147
|
return next(request);
|
|
147
|
-
}
|
|
148
|
+
},
|
|
148
149
|
};
|
|
149
150
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
150
151
|
}
|
package/src/lroImpl.ts
CHANGED
|
@@ -28,15 +28,15 @@ export function createLroSpec<T>(inputs: {
|
|
|
28
28
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
29
29
|
sendPollRequest: (
|
|
30
30
|
path: string,
|
|
31
|
-
options?: { abortSignal?: AbortSignalLike }
|
|
31
|
+
options?: { abortSignal?: AbortSignalLike },
|
|
32
32
|
) => {
|
|
33
33
|
const { requestBody, ...restSpec } = spec;
|
|
34
34
|
return sendOperationFn(args, {
|
|
35
35
|
...restSpec,
|
|
36
36
|
httpMethod: "GET",
|
|
37
37
|
path,
|
|
38
|
-
abortSignal: options?.abortSignal
|
|
38
|
+
abortSignal: options?.abortSignal,
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
41
|
};
|
|
42
42
|
}
|