@azure/arm-oep 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 +6 -0
- package/README.md +11 -0
- package/dist/index.js +63 -10
- 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/energyServicesCreateSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesCreateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesCreateSample.js +31 -0
- package/dist-esm/samples-dev/energyServicesCreateSample.js.map +1 -0
- package/dist-esm/samples-dev/energyServicesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesDeleteSample.js +31 -0
- package/dist-esm/samples-dev/energyServicesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/energyServicesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesGetSample.js +31 -0
- package/dist-esm/samples-dev/energyServicesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/energyServicesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/energyServicesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/energyServicesListBySubscriptionSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesListBySubscriptionSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesListBySubscriptionSample.js +43 -0
- package/dist-esm/samples-dev/energyServicesListBySubscriptionSample.js.map +1 -0
- package/dist-esm/samples-dev/energyServicesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/energyServicesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/energyServicesUpdateSample.js +31 -0
- package/dist-esm/samples-dev/energyServicesUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.d.ts +2 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.js +33 -0
- package/dist-esm/samples-dev/locationsCheckNameAvailabilitySample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +29 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.d.ts.map +1 -1
- package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.js +20 -2
- package/dist-esm/src/openEnergyPlatformManagementServiceAPIs.js.map +1 -1
- package/dist-esm/src/operations/energyServices.d.ts.map +1 -1
- package/dist-esm/src/operations/energyServices.js +6 -2
- package/dist-esm/src/operations/energyServices.js.map +1 -1
- package/package.json +27 -15
- package/rollup.config.js +6 -72
- package/src/openEnergyPlatformManagementServiceAPIs.ts +27 -2
- package/src/operations/energyServices.ts +6 -2
- package/tsconfig.json +18 -5
- package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -16,6 +16,8 @@ Open Energy Platform Management Service APIs
|
|
|
16
16
|
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
|
17
17
|
- Latest versions of Safari, Chrome, Edge and Firefox.
|
|
18
18
|
|
|
19
|
+
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
20
|
+
|
|
19
21
|
### Prerequisites
|
|
20
22
|
|
|
21
23
|
- An [Azure subscription][azure_sub].
|
|
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|
|
49
51
|
```javascript
|
|
50
52
|
const { OpenEnergyPlatformManagementServiceAPIs } = require("@azure/arm-oep");
|
|
51
53
|
const { DefaultAzureCredential } = require("@azure/identity");
|
|
54
|
+
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
|
55
|
+
|
|
52
56
|
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
|
53
57
|
const client = new OpenEnergyPlatformManagementServiceAPIs(new DefaultAzureCredential(), subscriptionId);
|
|
58
|
+
|
|
59
|
+
// For client-side applications running in the browser, use this code instead:
|
|
60
|
+
// const credential = new InteractiveBrowserCredential({
|
|
61
|
+
// tenantId: "<YOUR_TENANT_ID>",
|
|
62
|
+
// clientId: "<YOUR_CLIENT_ID>"
|
|
63
|
+
// });
|
|
64
|
+
// const client = new OpenEnergyPlatformManagementServiceAPIs(credential, subscriptionId);
|
|
54
65
|
```
|
|
55
66
|
|
|
56
67
|
|
package/dist/index.js
CHANGED
|
@@ -3,9 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var coreClient = require('@azure/core-client');
|
|
6
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
6
7
|
var tslib = require('tslib');
|
|
7
8
|
var coreLro = require('@azure/core-lro');
|
|
8
9
|
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
9
31
|
/*
|
|
10
32
|
* Copyright (c) Microsoft Corporation.
|
|
11
33
|
* Licensed under the MIT License.
|
|
@@ -13,10 +35,14 @@ var coreLro = require('@azure/core-lro');
|
|
|
13
35
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
14
36
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
15
37
|
*/
|
|
38
|
+
/** Known values of {@link CheckNameAvailabilityReason} that the service accepts. */
|
|
39
|
+
exports.KnownCheckNameAvailabilityReason = void 0;
|
|
16
40
|
(function (KnownCheckNameAvailabilityReason) {
|
|
17
41
|
KnownCheckNameAvailabilityReason["Invalid"] = "Invalid";
|
|
18
42
|
KnownCheckNameAvailabilityReason["AlreadyExists"] = "AlreadyExists";
|
|
19
43
|
})(exports.KnownCheckNameAvailabilityReason || (exports.KnownCheckNameAvailabilityReason = {}));
|
|
44
|
+
/** Known values of {@link ProvisioningState} that the service accepts. */
|
|
45
|
+
exports.KnownProvisioningState = void 0;
|
|
20
46
|
(function (KnownProvisioningState) {
|
|
21
47
|
KnownProvisioningState["Unknown"] = "Unknown";
|
|
22
48
|
KnownProvisioningState["Succeeded"] = "Succeeded";
|
|
@@ -26,17 +52,23 @@ var coreLro = require('@azure/core-lro');
|
|
|
26
52
|
KnownProvisioningState["Deleting"] = "Deleting";
|
|
27
53
|
KnownProvisioningState["Updating"] = "Updating";
|
|
28
54
|
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
|
|
55
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
56
|
+
exports.KnownCreatedByType = void 0;
|
|
29
57
|
(function (KnownCreatedByType) {
|
|
30
58
|
KnownCreatedByType["User"] = "User";
|
|
31
59
|
KnownCreatedByType["Application"] = "Application";
|
|
32
60
|
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
33
61
|
KnownCreatedByType["Key"] = "Key";
|
|
34
62
|
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
63
|
+
/** Known values of {@link Origin} that the service accepts. */
|
|
64
|
+
exports.KnownOrigin = void 0;
|
|
35
65
|
(function (KnownOrigin) {
|
|
36
66
|
KnownOrigin["User"] = "user";
|
|
37
67
|
KnownOrigin["System"] = "system";
|
|
38
68
|
KnownOrigin["UserSystem"] = "user,system";
|
|
39
69
|
})(exports.KnownOrigin || (exports.KnownOrigin = {}));
|
|
70
|
+
/** Known values of {@link ActionType} that the service accepts. */
|
|
71
|
+
exports.KnownActionType = void 0;
|
|
40
72
|
(function (KnownActionType) {
|
|
41
73
|
KnownActionType["Internal"] = "Internal";
|
|
42
74
|
})(exports.KnownActionType || (exports.KnownActionType = {}));
|
|
@@ -652,7 +684,7 @@ class LocationsImpl {
|
|
|
652
684
|
}
|
|
653
685
|
}
|
|
654
686
|
// Operation Specifications
|
|
655
|
-
const serializer =
|
|
687
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
656
688
|
const checkNameAvailabilityOperationSpec = {
|
|
657
689
|
path: "/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/checkNameAvailability",
|
|
658
690
|
httpMethod: "POST",
|
|
@@ -668,7 +700,7 @@ const checkNameAvailabilityOperationSpec = {
|
|
|
668
700
|
urlParameters: [$host, subscriptionId],
|
|
669
701
|
headerParameters: [contentType, accept],
|
|
670
702
|
mediaType: "json",
|
|
671
|
-
serializer
|
|
703
|
+
serializer: serializer$2
|
|
672
704
|
};
|
|
673
705
|
|
|
674
706
|
/*
|
|
@@ -868,11 +900,13 @@ class EnergyServicesImpl {
|
|
|
868
900
|
};
|
|
869
901
|
});
|
|
870
902
|
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, createOperationSpec);
|
|
871
|
-
|
|
903
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
872
904
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
873
905
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
874
906
|
lroResourceLocationConfig: "azure-async-operation"
|
|
875
907
|
});
|
|
908
|
+
yield poller.poll();
|
|
909
|
+
return poller;
|
|
876
910
|
});
|
|
877
911
|
}
|
|
878
912
|
/**
|
|
@@ -926,10 +960,12 @@ class EnergyServicesImpl {
|
|
|
926
960
|
};
|
|
927
961
|
});
|
|
928
962
|
const lro = new LroImpl(sendOperation, { resourceGroupName, resourceName, options }, deleteOperationSpec);
|
|
929
|
-
|
|
963
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
930
964
|
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
931
965
|
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
|
|
932
966
|
});
|
|
967
|
+
yield poller.poll();
|
|
968
|
+
return poller;
|
|
933
969
|
});
|
|
934
970
|
}
|
|
935
971
|
/**
|
|
@@ -963,7 +999,7 @@ class EnergyServicesImpl {
|
|
|
963
999
|
}
|
|
964
1000
|
}
|
|
965
1001
|
// Operation Specifications
|
|
966
|
-
const serializer$1 =
|
|
1002
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
967
1003
|
const listByResourceGroupOperationSpec = {
|
|
968
1004
|
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices",
|
|
969
1005
|
httpMethod: "GET",
|
|
@@ -1143,7 +1179,7 @@ class OperationsImpl {
|
|
|
1143
1179
|
}
|
|
1144
1180
|
}
|
|
1145
1181
|
// Operation Specifications
|
|
1146
|
-
const serializer
|
|
1182
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1147
1183
|
const listOperationSpec = {
|
|
1148
1184
|
path: "/providers/Microsoft.OpenEnergyPlatform/operations",
|
|
1149
1185
|
httpMethod: "GET",
|
|
@@ -1158,7 +1194,7 @@ const listOperationSpec = {
|
|
|
1158
1194
|
queryParameters: [apiVersion],
|
|
1159
1195
|
urlParameters: [$host],
|
|
1160
1196
|
headerParameters: [accept],
|
|
1161
|
-
serializer
|
|
1197
|
+
serializer
|
|
1162
1198
|
};
|
|
1163
1199
|
|
|
1164
1200
|
/*
|
|
@@ -1168,7 +1204,7 @@ const listOperationSpec = {
|
|
|
1168
1204
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1169
1205
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1170
1206
|
*/
|
|
1171
|
-
class OpenEnergyPlatformManagementServiceAPIs extends
|
|
1207
|
+
class OpenEnergyPlatformManagementServiceAPIs extends coreClient__namespace.ServiceClient {
|
|
1172
1208
|
/**
|
|
1173
1209
|
* Initializes a new instance of the OpenEnergyPlatformManagementServiceAPIs class.
|
|
1174
1210
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -1176,6 +1212,7 @@ class OpenEnergyPlatformManagementServiceAPIs extends coreClient.ServiceClient {
|
|
|
1176
1212
|
* @param options The parameter options
|
|
1177
1213
|
*/
|
|
1178
1214
|
constructor(credentials, subscriptionId, options) {
|
|
1215
|
+
var _a, _b;
|
|
1179
1216
|
if (credentials === undefined) {
|
|
1180
1217
|
throw new Error("'credentials' cannot be null");
|
|
1181
1218
|
}
|
|
@@ -1190,7 +1227,7 @@ class OpenEnergyPlatformManagementServiceAPIs extends coreClient.ServiceClient {
|
|
|
1190
1227
|
requestContentType: "application/json; charset=utf-8",
|
|
1191
1228
|
credential: credentials
|
|
1192
1229
|
};
|
|
1193
|
-
const packageDetails = `azsdk-js-arm-oep/1.0.0-beta.
|
|
1230
|
+
const packageDetails = `azsdk-js-arm-oep/1.0.0-beta.2`;
|
|
1194
1231
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1195
1232
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1196
1233
|
: `${packageDetails}`;
|
|
@@ -1199,8 +1236,24 @@ class OpenEnergyPlatformManagementServiceAPIs extends coreClient.ServiceClient {
|
|
|
1199
1236
|
}
|
|
1200
1237
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1201
1238
|
userAgentPrefix
|
|
1202
|
-
}, baseUri: options.endpoint
|
|
1239
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1203
1240
|
super(optionsWithDefaults);
|
|
1241
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1242
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1243
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1244
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1245
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
1246
|
+
this.pipeline.removePolicy({
|
|
1247
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1248
|
+
});
|
|
1249
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1250
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
1251
|
+
challengeCallbacks: {
|
|
1252
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1253
|
+
}
|
|
1254
|
+
}));
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1204
1257
|
// Parameter assignments
|
|
1205
1258
|
this.subscriptionId = subscriptionId;
|
|
1206
1259
|
// Assigning values to Constant parameters
|