@azure/arm-attestation 2.0.1-alpha.20220406.1 → 2.0.1-alpha.20220413.1

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +2 -6
  2. package/LICENSE +1 -1
  3. package/README.md +11 -0
  4. package/dist/index.js +56 -27
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/attestationProvidersCreateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/attestationProvidersCreateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/attestationProvidersCreateSample.js +32 -0
  11. package/dist-esm/samples-dev/attestationProvidersCreateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/attestationProvidersDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/attestationProvidersDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/attestationProvidersDeleteSample.js +31 -0
  15. package/dist-esm/samples-dev/attestationProvidersDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/attestationProvidersGetDefaultByLocationSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/attestationProvidersGetDefaultByLocationSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/attestationProvidersGetDefaultByLocationSample.js +30 -0
  19. package/dist-esm/samples-dev/attestationProvidersGetDefaultByLocationSample.js.map +1 -0
  20. package/dist-esm/samples-dev/attestationProvidersGetSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/attestationProvidersGetSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/attestationProvidersGetSample.js +31 -0
  23. package/dist-esm/samples-dev/attestationProvidersGetSample.js.map +1 -0
  24. package/dist-esm/samples-dev/attestationProvidersListByResourceGroupSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/attestationProvidersListByResourceGroupSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/attestationProvidersListByResourceGroupSample.js +30 -0
  27. package/dist-esm/samples-dev/attestationProvidersListByResourceGroupSample.js.map +1 -0
  28. package/dist-esm/samples-dev/attestationProvidersListDefaultSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/attestationProvidersListDefaultSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/attestationProvidersListDefaultSample.js +29 -0
  31. package/dist-esm/samples-dev/attestationProvidersListDefaultSample.js.map +1 -0
  32. package/dist-esm/samples-dev/attestationProvidersListSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/attestationProvidersListSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/attestationProvidersListSample.js +29 -0
  35. package/dist-esm/samples-dev/attestationProvidersListSample.js.map +1 -0
  36. package/dist-esm/samples-dev/attestationProvidersUpdateSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/attestationProvidersUpdateSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/attestationProvidersUpdateSample.js +34 -0
  39. package/dist-esm/samples-dev/attestationProvidersUpdateSample.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsListSample.js +29 -0
  43. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js +38 -0
  47. package/dist-esm/samples-dev/privateEndpointConnectionsCreateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +32 -0
  51. package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +32 -0
  55. package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js +45 -0
  59. package/dist-esm/samples-dev/privateEndpointConnectionsListSample.js.map +1 -0
  60. package/dist-esm/src/attestationManagementClient.d.ts.map +1 -1
  61. package/dist-esm/src/attestationManagementClient.js +3 -2
  62. package/dist-esm/src/attestationManagementClient.js.map +1 -1
  63. package/package.json +24 -8
  64. package/rollup.config.js +6 -72
  65. package/src/attestationManagementClient.ts +3 -2
  66. package/tsconfig.json +19 -5
package/CHANGELOG.md CHANGED
@@ -2,13 +2,9 @@
2
2
 
3
3
  ## 2.0.1 (Unreleased)
4
4
 
5
- ### Features Added
5
+ **features**
6
6
 
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
7
+ - Bug fix
12
8
 
13
9
  ## 2.0.0 (2021-12-30)
14
10
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Microsoft
3
+ Copyright (c) 2022 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -16,6 +16,8 @@ Various APIs for managing resources in attestation service. This primarily encom
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 { AttestationManagementClient } = require("@azure/arm-attestation");
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 AttestationManagementClient(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 AttestationManagementClient(credential, subscriptionId);
54
65
  ```
55
66
 
56
67
 
package/dist/index.js CHANGED
@@ -5,6 +5,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var coreClient = require('@azure/core-client');
6
6
  var tslib = require('tslib');
7
7
 
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n["default"] = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
27
+
8
28
  /*
9
29
  * Copyright (c) Microsoft Corporation.
10
30
  * Licensed under the MIT License.
@@ -12,22 +32,30 @@ var tslib = require('tslib');
12
32
  * Code generated by Microsoft (R) AutoRest Code Generator.
13
33
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
14
34
  */
35
+ /** Known values of {@link CreatedByType} that the service accepts. */
36
+ exports.KnownCreatedByType = void 0;
15
37
  (function (KnownCreatedByType) {
16
38
  KnownCreatedByType["User"] = "User";
17
39
  KnownCreatedByType["Application"] = "Application";
18
40
  KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
19
41
  KnownCreatedByType["Key"] = "Key";
20
42
  })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
43
+ /** Known values of {@link AttestationServiceStatus} that the service accepts. */
44
+ exports.KnownAttestationServiceStatus = void 0;
21
45
  (function (KnownAttestationServiceStatus) {
22
46
  KnownAttestationServiceStatus["Ready"] = "Ready";
23
47
  KnownAttestationServiceStatus["NotReady"] = "NotReady";
24
48
  KnownAttestationServiceStatus["Error"] = "Error";
25
49
  })(exports.KnownAttestationServiceStatus || (exports.KnownAttestationServiceStatus = {}));
50
+ /** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */
51
+ exports.KnownPrivateEndpointServiceConnectionStatus = void 0;
26
52
  (function (KnownPrivateEndpointServiceConnectionStatus) {
27
53
  KnownPrivateEndpointServiceConnectionStatus["Pending"] = "Pending";
28
54
  KnownPrivateEndpointServiceConnectionStatus["Approved"] = "Approved";
29
55
  KnownPrivateEndpointServiceConnectionStatus["Rejected"] = "Rejected";
30
56
  })(exports.KnownPrivateEndpointServiceConnectionStatus || (exports.KnownPrivateEndpointServiceConnectionStatus = {}));
57
+ /** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */
58
+ exports.KnownPrivateEndpointConnectionProvisioningState = void 0;
31
59
  (function (KnownPrivateEndpointConnectionProvisioningState) {
32
60
  KnownPrivateEndpointConnectionProvisioningState["Succeeded"] = "Succeeded";
33
61
  KnownPrivateEndpointConnectionProvisioningState["Creating"] = "Creating";
@@ -779,12 +807,12 @@ class OperationsImpl {
779
807
  * @param options The options parameters.
780
808
  */
781
809
  list(options) {
782
- return this.client.sendOperationRequest({ options }, listOperationSpec);
810
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
783
811
  }
784
812
  }
785
813
  // Operation Specifications
786
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
787
- const listOperationSpec = {
814
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
815
+ const listOperationSpec$2 = {
788
816
  path: "/providers/Microsoft.Attestation/operations",
789
817
  httpMethod: "GET",
790
818
  responses: {
@@ -798,7 +826,7 @@ const listOperationSpec = {
798
826
  queryParameters: [apiVersion],
799
827
  urlParameters: [$host],
800
828
  headerParameters: [accept],
801
- serializer
829
+ serializer: serializer$2
802
830
  };
803
831
 
804
832
  /*
@@ -824,7 +852,7 @@ class AttestationProvidersImpl {
824
852
  * @param options The options parameters.
825
853
  */
826
854
  get(resourceGroupName, providerName, options) {
827
- return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, getOperationSpec);
855
+ return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, getOperationSpec$1);
828
856
  }
829
857
  /**
830
858
  * Creates a new Attestation Provider.
@@ -834,7 +862,7 @@ class AttestationProvidersImpl {
834
862
  * @param options The options parameters.
835
863
  */
836
864
  create(resourceGroupName, providerName, creationParams, options) {
837
- return this.client.sendOperationRequest({ resourceGroupName, providerName, creationParams, options }, createOperationSpec);
865
+ return this.client.sendOperationRequest({ resourceGroupName, providerName, creationParams, options }, createOperationSpec$1);
838
866
  }
839
867
  /**
840
868
  * Updates the Attestation Provider.
@@ -853,7 +881,7 @@ class AttestationProvidersImpl {
853
881
  * @param options The options parameters.
854
882
  */
855
883
  delete(resourceGroupName, providerName, options) {
856
- return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, deleteOperationSpec);
884
+ return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, deleteOperationSpec$1);
857
885
  }
858
886
  /**
859
887
  * Returns a list of attestation providers in a subscription.
@@ -887,8 +915,8 @@ class AttestationProvidersImpl {
887
915
  }
888
916
  }
889
917
  // Operation Specifications
890
- const serializer$1 = coreClient.createSerializer(Mappers, /* isXml */ false);
891
- const getOperationSpec = {
918
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
919
+ const getOperationSpec$1 = {
892
920
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
893
921
  httpMethod: "GET",
894
922
  responses: {
@@ -909,7 +937,7 @@ const getOperationSpec = {
909
937
  headerParameters: [accept],
910
938
  serializer: serializer$1
911
939
  };
912
- const createOperationSpec = {
940
+ const createOperationSpec$1 = {
913
941
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
914
942
  httpMethod: "PUT",
915
943
  responses: {
@@ -958,7 +986,7 @@ const updateOperationSpec = {
958
986
  mediaType: "json",
959
987
  serializer: serializer$1
960
988
  };
961
- const deleteOperationSpec = {
989
+ const deleteOperationSpec$1 = {
962
990
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}",
963
991
  httpMethod: "DELETE",
964
992
  responses: {
@@ -1120,7 +1148,7 @@ class PrivateEndpointConnectionsImpl {
1120
1148
  * @param options The options parameters.
1121
1149
  */
1122
1150
  _list(resourceGroupName, providerName, options) {
1123
- return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, listOperationSpec$2);
1151
+ return this.client.sendOperationRequest({ resourceGroupName, providerName, options }, listOperationSpec);
1124
1152
  }
1125
1153
  /**
1126
1154
  * Gets the specified private endpoint connection associated with the attestation provider.
@@ -1136,7 +1164,7 @@ class PrivateEndpointConnectionsImpl {
1136
1164
  providerName,
1137
1165
  privateEndpointConnectionName,
1138
1166
  options
1139
- }, getOperationSpec$1);
1167
+ }, getOperationSpec);
1140
1168
  }
1141
1169
  /**
1142
1170
  * Update the state of specified private endpoint connection associated with the attestation provider.
@@ -1154,7 +1182,7 @@ class PrivateEndpointConnectionsImpl {
1154
1182
  privateEndpointConnectionName,
1155
1183
  properties,
1156
1184
  options
1157
- }, createOperationSpec$1);
1185
+ }, createOperationSpec);
1158
1186
  }
1159
1187
  /**
1160
1188
  * Deletes the specified private endpoint connection associated with the attestation provider.
@@ -1170,12 +1198,12 @@ class PrivateEndpointConnectionsImpl {
1170
1198
  providerName,
1171
1199
  privateEndpointConnectionName,
1172
1200
  options
1173
- }, deleteOperationSpec$1);
1201
+ }, deleteOperationSpec);
1174
1202
  }
1175
1203
  }
1176
1204
  // Operation Specifications
1177
- const serializer$2 = coreClient.createSerializer(Mappers, /* isXml */ false);
1178
- const listOperationSpec$2 = {
1205
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1206
+ const listOperationSpec = {
1179
1207
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections",
1180
1208
  httpMethod: "GET",
1181
1209
  responses: {
@@ -1194,9 +1222,9 @@ const listOperationSpec$2 = {
1194
1222
  providerName1
1195
1223
  ],
1196
1224
  headerParameters: [accept],
1197
- serializer: serializer$2
1225
+ serializer
1198
1226
  };
1199
- const getOperationSpec$1 = {
1227
+ const getOperationSpec = {
1200
1228
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
1201
1229
  httpMethod: "GET",
1202
1230
  responses: {
@@ -1216,9 +1244,9 @@ const getOperationSpec$1 = {
1216
1244
  privateEndpointConnectionName
1217
1245
  ],
1218
1246
  headerParameters: [accept],
1219
- serializer: serializer$2
1247
+ serializer
1220
1248
  };
1221
- const createOperationSpec$1 = {
1249
+ const createOperationSpec = {
1222
1250
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
1223
1251
  httpMethod: "PUT",
1224
1252
  responses: {
@@ -1240,9 +1268,9 @@ const createOperationSpec$1 = {
1240
1268
  ],
1241
1269
  headerParameters: [accept, contentType],
1242
1270
  mediaType: "json",
1243
- serializer: serializer$2
1271
+ serializer
1244
1272
  };
1245
- const deleteOperationSpec$1 = {
1273
+ const deleteOperationSpec = {
1246
1274
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateEndpointConnections/{privateEndpointConnectionName}",
1247
1275
  httpMethod: "DELETE",
1248
1276
  responses: {
@@ -1261,7 +1289,7 @@ const deleteOperationSpec$1 = {
1261
1289
  privateEndpointConnectionName
1262
1290
  ],
1263
1291
  headerParameters: [accept],
1264
- serializer: serializer$2
1292
+ serializer
1265
1293
  };
1266
1294
 
1267
1295
  /*
@@ -1271,7 +1299,7 @@ const deleteOperationSpec$1 = {
1271
1299
  * Code generated by Microsoft (R) AutoRest Code Generator.
1272
1300
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1273
1301
  */
1274
- class AttestationManagementClient extends coreClient.ServiceClient {
1302
+ class AttestationManagementClient extends coreClient__namespace.ServiceClient {
1275
1303
  /**
1276
1304
  * Initializes a new instance of the AttestationManagementClient class.
1277
1305
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -1279,6 +1307,7 @@ class AttestationManagementClient extends coreClient.ServiceClient {
1279
1307
  * @param options The parameter options
1280
1308
  */
1281
1309
  constructor(credentials, subscriptionId, options) {
1310
+ var _a, _b;
1282
1311
  if (credentials === undefined) {
1283
1312
  throw new Error("'credentials' cannot be null");
1284
1313
  }
@@ -1293,7 +1322,7 @@ class AttestationManagementClient extends coreClient.ServiceClient {
1293
1322
  requestContentType: "application/json; charset=utf-8",
1294
1323
  credential: credentials
1295
1324
  };
1296
- const packageDetails = `azsdk-js-arm-attestation/2.0.0`;
1325
+ const packageDetails = `azsdk-js-arm-attestation/2.0.1`;
1297
1326
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1298
1327
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1299
1328
  : `${packageDetails}`;
@@ -1302,7 +1331,7 @@ class AttestationManagementClient extends coreClient.ServiceClient {
1302
1331
  }
1303
1332
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1304
1333
  userAgentPrefix
1305
- }, baseUri: options.endpoint || "https://management.azure.com" });
1334
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1306
1335
  super(optionsWithDefaults);
1307
1336
  // Parameter assignments
1308
1337
  this.subscriptionId = subscriptionId;