@azure/arm-automanage 1.0.3-alpha.20250718.1 → 1.0.3-alpha.20250730.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 (123) hide show
  1. package/dist/browser/automanageClient.js +25 -5
  2. package/dist/browser/automanageClient.js.map +1 -1
  3. package/dist/browser/models/mappers.js +65 -29
  4. package/dist/browser/models/mappers.js.map +1 -1
  5. package/dist/browser/operations/bestPractices.js +10 -27
  6. package/dist/browser/operations/bestPractices.js.map +1 -1
  7. package/dist/browser/operations/bestPracticesVersions.js +10 -27
  8. package/dist/browser/operations/bestPracticesVersions.js.map +1 -1
  9. package/dist/browser/operations/configurationProfileAssignments.js +46 -131
  10. package/dist/browser/operations/configurationProfileAssignments.js.map +1 -1
  11. package/dist/browser/operations/configurationProfileHCIAssignments.js +1 -0
  12. package/dist/browser/operations/configurationProfileHCIAssignments.js.map +1 -1
  13. package/dist/browser/operations/configurationProfileHcrpAssignments.js +1 -0
  14. package/dist/browser/operations/configurationProfileHcrpAssignments.js.map +1 -1
  15. package/dist/browser/operations/configurationProfiles.js +19 -53
  16. package/dist/browser/operations/configurationProfiles.js.map +1 -1
  17. package/dist/browser/operations/configurationProfilesVersions.js +10 -27
  18. package/dist/browser/operations/configurationProfilesVersions.js.map +1 -1
  19. package/dist/browser/operations/hCIReports.js +10 -27
  20. package/dist/browser/operations/hCIReports.js.map +1 -1
  21. package/dist/browser/operations/hcrpReports.js +10 -27
  22. package/dist/browser/operations/hcrpReports.js.map +1 -1
  23. package/dist/browser/operations/operations.js +10 -27
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/reports.js +10 -27
  26. package/dist/browser/operations/reports.js.map +1 -1
  27. package/dist/browser/operations/servicePrincipals.js +10 -27
  28. package/dist/browser/operations/servicePrincipals.js.map +1 -1
  29. package/dist/browser/pagingHelper.js +2 -4
  30. package/dist/browser/pagingHelper.js.map +1 -1
  31. package/dist/commonjs/automanageClient.js +25 -5
  32. package/dist/commonjs/automanageClient.js.map +1 -1
  33. package/dist/commonjs/models/mappers.js +65 -29
  34. package/dist/commonjs/models/mappers.js.map +1 -1
  35. package/dist/commonjs/operations/bestPractices.js +10 -26
  36. package/dist/commonjs/operations/bestPractices.js.map +1 -1
  37. package/dist/commonjs/operations/bestPracticesVersions.js +10 -26
  38. package/dist/commonjs/operations/bestPracticesVersions.js.map +1 -1
  39. package/dist/commonjs/operations/configurationProfileAssignments.js +46 -130
  40. package/dist/commonjs/operations/configurationProfileAssignments.js.map +1 -1
  41. package/dist/commonjs/operations/configurationProfileHCIAssignments.js +1 -0
  42. package/dist/commonjs/operations/configurationProfileHCIAssignments.js.map +1 -1
  43. package/dist/commonjs/operations/configurationProfileHcrpAssignments.js +1 -0
  44. package/dist/commonjs/operations/configurationProfileHcrpAssignments.js.map +1 -1
  45. package/dist/commonjs/operations/configurationProfiles.js +19 -52
  46. package/dist/commonjs/operations/configurationProfiles.js.map +1 -1
  47. package/dist/commonjs/operations/configurationProfilesVersions.js +10 -26
  48. package/dist/commonjs/operations/configurationProfilesVersions.js.map +1 -1
  49. package/dist/commonjs/operations/hCIReports.js +10 -26
  50. package/dist/commonjs/operations/hCIReports.js.map +1 -1
  51. package/dist/commonjs/operations/hcrpReports.js +10 -26
  52. package/dist/commonjs/operations/hcrpReports.js.map +1 -1
  53. package/dist/commonjs/operations/operations.js +10 -26
  54. package/dist/commonjs/operations/operations.js.map +1 -1
  55. package/dist/commonjs/operations/reports.js +10 -26
  56. package/dist/commonjs/operations/reports.js.map +1 -1
  57. package/dist/commonjs/operations/servicePrincipals.js +10 -26
  58. package/dist/commonjs/operations/servicePrincipals.js.map +1 -1
  59. package/dist/commonjs/pagingHelper.js +2 -4
  60. package/dist/commonjs/pagingHelper.js.map +1 -1
  61. package/dist/commonjs/tsdoc-metadata.json +11 -11
  62. package/dist/esm/automanageClient.js +25 -5
  63. package/dist/esm/automanageClient.js.map +1 -1
  64. package/dist/esm/models/mappers.js +65 -29
  65. package/dist/esm/models/mappers.js.map +1 -1
  66. package/dist/esm/operations/bestPractices.js +10 -27
  67. package/dist/esm/operations/bestPractices.js.map +1 -1
  68. package/dist/esm/operations/bestPracticesVersions.js +10 -27
  69. package/dist/esm/operations/bestPracticesVersions.js.map +1 -1
  70. package/dist/esm/operations/configurationProfileAssignments.js +46 -131
  71. package/dist/esm/operations/configurationProfileAssignments.js.map +1 -1
  72. package/dist/esm/operations/configurationProfileHCIAssignments.js +1 -0
  73. package/dist/esm/operations/configurationProfileHCIAssignments.js.map +1 -1
  74. package/dist/esm/operations/configurationProfileHcrpAssignments.js +1 -0
  75. package/dist/esm/operations/configurationProfileHcrpAssignments.js.map +1 -1
  76. package/dist/esm/operations/configurationProfiles.js +19 -53
  77. package/dist/esm/operations/configurationProfiles.js.map +1 -1
  78. package/dist/esm/operations/configurationProfilesVersions.js +10 -27
  79. package/dist/esm/operations/configurationProfilesVersions.js.map +1 -1
  80. package/dist/esm/operations/hCIReports.js +10 -27
  81. package/dist/esm/operations/hCIReports.js.map +1 -1
  82. package/dist/esm/operations/hcrpReports.js +10 -27
  83. package/dist/esm/operations/hcrpReports.js.map +1 -1
  84. package/dist/esm/operations/operations.js +10 -27
  85. package/dist/esm/operations/operations.js.map +1 -1
  86. package/dist/esm/operations/reports.js +10 -27
  87. package/dist/esm/operations/reports.js.map +1 -1
  88. package/dist/esm/operations/servicePrincipals.js +10 -27
  89. package/dist/esm/operations/servicePrincipals.js.map +1 -1
  90. package/dist/esm/pagingHelper.js +2 -4
  91. package/dist/esm/pagingHelper.js.map +1 -1
  92. package/dist/react-native/automanageClient.js +25 -5
  93. package/dist/react-native/automanageClient.js.map +1 -1
  94. package/dist/react-native/models/mappers.js +65 -29
  95. package/dist/react-native/models/mappers.js.map +1 -1
  96. package/dist/react-native/operations/bestPractices.js +10 -27
  97. package/dist/react-native/operations/bestPractices.js.map +1 -1
  98. package/dist/react-native/operations/bestPracticesVersions.js +10 -27
  99. package/dist/react-native/operations/bestPracticesVersions.js.map +1 -1
  100. package/dist/react-native/operations/configurationProfileAssignments.js +46 -131
  101. package/dist/react-native/operations/configurationProfileAssignments.js.map +1 -1
  102. package/dist/react-native/operations/configurationProfileHCIAssignments.js +1 -0
  103. package/dist/react-native/operations/configurationProfileHCIAssignments.js.map +1 -1
  104. package/dist/react-native/operations/configurationProfileHcrpAssignments.js +1 -0
  105. package/dist/react-native/operations/configurationProfileHcrpAssignments.js.map +1 -1
  106. package/dist/react-native/operations/configurationProfiles.js +19 -53
  107. package/dist/react-native/operations/configurationProfiles.js.map +1 -1
  108. package/dist/react-native/operations/configurationProfilesVersions.js +10 -27
  109. package/dist/react-native/operations/configurationProfilesVersions.js.map +1 -1
  110. package/dist/react-native/operations/hCIReports.js +10 -27
  111. package/dist/react-native/operations/hCIReports.js.map +1 -1
  112. package/dist/react-native/operations/hcrpReports.js +10 -27
  113. package/dist/react-native/operations/hcrpReports.js.map +1 -1
  114. package/dist/react-native/operations/operations.js +10 -27
  115. package/dist/react-native/operations/operations.js.map +1 -1
  116. package/dist/react-native/operations/reports.js +10 -27
  117. package/dist/react-native/operations/reports.js.map +1 -1
  118. package/dist/react-native/operations/servicePrincipals.js +10 -27
  119. package/dist/react-native/operations/servicePrincipals.js.map +1 -1
  120. package/dist/react-native/pagingHelper.js +2 -4
  121. package/dist/react-native/pagingHelper.js.map +1 -1
  122. package/package.json +2 -2
  123. package/review/arm-automanage-node.api.md +590 -590
@@ -5,13 +5,13 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing Operations operations. */
14
13
  export class OperationsImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class Operations class.
17
17
  * @param client Reference to the service client
@@ -33,39 +33,22 @@ export class OperationsImpl {
33
33
  return this;
34
34
  },
35
35
  byPage: (settings) => {
36
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
36
+ if (settings?.maxPageSize) {
37
37
  throw new Error("maxPageSize is not supported by this operation.");
38
38
  }
39
39
  return this.listPagingPage(options, settings);
40
40
  }
41
41
  };
42
42
  }
43
- listPagingPage(options, _settings) {
44
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
45
- let result;
46
- result = yield __await(this._list(options));
47
- yield yield __await(result.value || []);
48
- });
43
+ async *listPagingPage(options, _settings) {
44
+ let result;
45
+ result = await this._list(options);
46
+ yield result.value || [];
49
47
  }
50
- listPagingAll(options) {
51
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
52
- var _a, e_1, _b, _c;
53
- try {
54
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
55
- _c = _f.value;
56
- _d = false;
57
- const page = _c;
58
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
59
- }
60
- }
61
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
62
- finally {
63
- try {
64
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
65
- }
66
- finally { if (e_1) throw e_1.error; }
67
- }
68
- });
48
+ async *listPagingAll(options) {
49
+ for await (const page of this.listPagingPage(options)) {
50
+ yield* page;
51
+ }
69
52
  }
70
53
  /**
71
54
  * Lists all of the available Automanage REST API operations.
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AA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AAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,4CAA4C;IAClD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available Automanage REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available Automanage REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Automanage/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAQtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB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AClD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Operations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Operation,\n OperationsListOptionalParams,\n OperationsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Lists all of the available Automanage REST API operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n }\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all of the available Automanage REST API operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Automanage/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,13 +5,13 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing Reports operations. */
14
13
  export class ReportsImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class Reports class.
17
17
  * @param client Reference to the service client
@@ -36,39 +36,22 @@ export class ReportsImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, settings);
43
43
  }
44
44
  };
45
45
  }
46
- listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, _settings) {
47
- return __asyncGenerator(this, arguments, function* listByConfigurationProfileAssignmentsPagingPage_1() {
48
- let result;
49
- result = yield __await(this._listByConfigurationProfileAssignments(resourceGroupName, configurationProfileAssignmentName, vmName, options));
50
- yield yield __await(result.value || []);
51
- });
46
+ async *listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options, _settings) {
47
+ let result;
48
+ result = await this._listByConfigurationProfileAssignments(resourceGroupName, configurationProfileAssignmentName, vmName, options);
49
+ yield result.value || [];
52
50
  }
53
- listByConfigurationProfileAssignmentsPagingAll(resourceGroupName, configurationProfileAssignmentName, vmName, options) {
54
- return __asyncGenerator(this, arguments, function* listByConfigurationProfileAssignmentsPagingAll_1() {
55
- var _a, e_1, _b, _c;
56
- try {
57
- for (var _d = true, _e = __asyncValues(this.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
58
- _c = _f.value;
59
- _d = false;
60
- const page = _c;
61
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
62
- }
63
- }
64
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
65
- finally {
66
- try {
67
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
68
- }
69
- finally { if (e_1) throw e_1.error; }
70
- }
71
- });
51
+ async *listByConfigurationProfileAssignmentsPagingAll(resourceGroupName, configurationProfileAssignmentName, vmName, options) {
52
+ for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(resourceGroupName, configurationProfileAssignmentName, vmName, options)) {
53
+ yield* page;
54
+ }
72
55
  }
73
56
  /**
74
57
  * Get information about a report associated with a configuration profile assignment run
@@ -1 +1 @@
1
- {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../src/operations/reports.ts"],"names":[],"mappings":"AAAA;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C,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kDAAkD,GAA6B;IACnF,IAAI,EACF,qOAAqO;IACvO,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;KAClB;IACD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Reports } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Report,\n ReportsListByConfigurationProfileAssignmentsOptionalParams,\n ReportsListByConfigurationProfileAssignmentsResponse,\n ReportsGetOptionalParams,\n ReportsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reports operations. */\nexport class ReportsImpl implements Reports {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Reports class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n public listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): PagedAsyncIterableIterator<Report> {\n const iter = this.listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Report[]> {\n let result: ReportsListByConfigurationProfileAssignmentsResponse;\n result = await this._listByConfigurationProfileAssignments(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): AsyncIterableIterator<Report> {\n for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get information about a report associated with a configuration profile assignment run\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param reportName The report name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n reportName: string,\n vmName: string,\n options?: ReportsGetOptionalParams\n ): Promise<ReportsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n reportName,\n vmName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n private _listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): Promise<ReportsListByConfigurationProfileAssignmentsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n },\n listByConfigurationProfileAssignmentsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports/{reportName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Report\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.configurationProfileAssignmentName,\n Parameters.vmName,\n Parameters.reportName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConfigurationProfileAssignmentsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReportList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.configurationProfileAssignmentName,\n Parameters.vmName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"reports.js","sourceRoot":"","sources":["../../../src/operations/reports.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,qCAAqC,CAC1C,iBAAyB,EACzB,kCAA0C,EAC1C,MAAc,EACd,OAAoE;QAEpE,MAAM,IAAI,GAAG,IAAI,CAAC,8CAA8C,CAC9D,iBAAiB,EACjB,kCAAkC,EAClC,MAAM,EACN,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI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MAAM;YACN,OAAO;SACR,EACD,kDAAkD,CACnD,CAAC;IACJ,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,EACF,kPAAkP;IACpP,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,MAAM;SAC3B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,UAAU;KACtB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,kDAAkD,GAA6B;IACnF,IAAI,EACF,qOAAqO;IACvO,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,kCAAkC;QAC7C,UAAU,CAAC,MAAM;KAClB;IACD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { Reports } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n Report,\n ReportsListByConfigurationProfileAssignmentsOptionalParams,\n ReportsListByConfigurationProfileAssignmentsResponse,\n ReportsGetOptionalParams,\n ReportsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Reports operations. */\nexport class ReportsImpl implements Reports {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class Reports class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n public listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): PagedAsyncIterableIterator<Report> {\n const iter = this.listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<Report[]> {\n let result: ReportsListByConfigurationProfileAssignmentsResponse;\n result = await this._listByConfigurationProfileAssignments(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByConfigurationProfileAssignmentsPagingAll(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): AsyncIterableIterator<Report> {\n for await (const page of this.listByConfigurationProfileAssignmentsPagingPage(\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Get information about a report associated with a configuration profile assignment run\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param reportName The report name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n reportName: string,\n vmName: string,\n options?: ReportsGetOptionalParams\n ): Promise<ReportsGetResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n reportName,\n vmName,\n options\n },\n getOperationSpec\n );\n }\n\n /**\n * Retrieve a list of reports within a given configuration profile assignment\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param configurationProfileAssignmentName The configuration profile assignment name.\n * @param vmName The name of the virtual machine.\n * @param options The options parameters.\n */\n private _listByConfigurationProfileAssignments(\n resourceGroupName: string,\n configurationProfileAssignmentName: string,\n vmName: string,\n options?: ReportsListByConfigurationProfileAssignmentsOptionalParams\n ): Promise<ReportsListByConfigurationProfileAssignmentsResponse> {\n return this.client.sendOperationRequest(\n {\n resourceGroupName,\n configurationProfileAssignmentName,\n vmName,\n options\n },\n listByConfigurationProfileAssignmentsOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports/{reportName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Report\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.configurationProfileAssignmentName,\n Parameters.vmName,\n Parameters.reportName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByConfigurationProfileAssignmentsOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/providers/Microsoft.Automanage/configurationProfileAssignments/{configurationProfileAssignmentName}/reports\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ReportList\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.configurationProfileAssignmentName,\n Parameters.vmName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,13 +5,13 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import * as coreClient from "@azure/core-client";
10
9
  import * as Mappers from "../models/mappers.js";
11
10
  import * as Parameters from "../models/parameters.js";
12
11
  /// <reference lib="esnext.asynciterable" />
13
12
  /** Class containing ServicePrincipals operations. */
14
13
  export class ServicePrincipalsImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class ServicePrincipals class.
17
17
  * @param client Reference to the service client
@@ -33,39 +33,22 @@ export class ServicePrincipalsImpl {
33
33
  return this;
34
34
  },
35
35
  byPage: (settings) => {
36
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
36
+ if (settings?.maxPageSize) {
37
37
  throw new Error("maxPageSize is not supported by this operation.");
38
38
  }
39
39
  return this.listBySubscriptionPagingPage(options, settings);
40
40
  }
41
41
  };
42
42
  }
43
- listBySubscriptionPagingPage(options, _settings) {
44
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingPage_1() {
45
- let result;
46
- result = yield __await(this._listBySubscription(options));
47
- yield yield __await(result.value || []);
48
- });
43
+ async *listBySubscriptionPagingPage(options, _settings) {
44
+ let result;
45
+ result = await this._listBySubscription(options);
46
+ yield result.value || [];
49
47
  }
50
- listBySubscriptionPagingAll(options) {
51
- return __asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
52
- var _a, e_1, _b, _c;
53
- try {
54
- for (var _d = true, _e = __asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
55
- _c = _f.value;
56
- _d = false;
57
- const page = _c;
58
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
59
- }
60
- }
61
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
62
- finally {
63
- try {
64
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
65
- }
66
- finally { if (e_1) throw e_1.error; }
67
- }
68
- });
48
+ async *listBySubscriptionPagingAll(options) {
49
+ for await (const page of this.listBySubscriptionPagingPage(options)) {
50
+ yield* page;
51
+ }
69
52
  }
70
53
  /**
71
54
  * Get the Automanage AAD first party Application Service Principal details for the subscription id.
@@ -1 +1 @@
1
- {"version":3,"file":"servicePrincipals.js","sourceRoot":"","sources":["../../../src/operations/servicePrincipals.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAA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AE,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ServicePrincipals } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n ServicePrincipal,\n ServicePrincipalsListBySubscriptionOptionalParams,\n ServicePrincipalsListBySubscriptionResponse,\n ServicePrincipalsGetOptionalParams,\n ServicePrincipalsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServicePrincipals operations. */\nexport class ServicePrincipalsImpl implements ServicePrincipals {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class ServicePrincipals class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<ServicePrincipal> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: ServicePrincipalsListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ServicePrincipal[]> {\n let result: ServicePrincipalsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<ServicePrincipal> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): Promise<ServicePrincipalsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n get(\n options?: ServicePrincipalsGetOptionalParams\n ): Promise<ServicePrincipalsGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipalListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipal\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"servicePrincipals.js","sourceRoot":"","sources":["../../../src/operations/servicePrincipals.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH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* 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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ServicePrincipals } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { AutomanageClient } from \"../automanageClient.js\";\nimport {\n ServicePrincipal,\n ServicePrincipalsListBySubscriptionOptionalParams,\n ServicePrincipalsListBySubscriptionResponse,\n ServicePrincipalsGetOptionalParams,\n ServicePrincipalsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ServicePrincipals operations. */\nexport class ServicePrincipalsImpl implements ServicePrincipals {\n private readonly client: AutomanageClient;\n\n /**\n * Initialize a new instance of the class ServicePrincipals class.\n * @param client Reference to the service client\n */\n constructor(client: AutomanageClient) {\n this.client = client;\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): PagedAsyncIterableIterator<ServicePrincipal> {\n const iter = this.listBySubscriptionPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listBySubscriptionPagingPage(options, settings);\n }\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: ServicePrincipalsListBySubscriptionOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ServicePrincipal[]> {\n let result: ServicePrincipalsListBySubscriptionResponse;\n result = await this._listBySubscription(options);\n yield result.value || [];\n }\n\n private async *listBySubscriptionPagingAll(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): AsyncIterableIterator<ServicePrincipal> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: ServicePrincipalsListBySubscriptionOptionalParams\n ): Promise<ServicePrincipalsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec\n );\n }\n\n /**\n * Get the Automanage AAD first party Application Service Principal details for the subscription id.\n * @param options The options parameters.\n */\n get(\n options?: ServicePrincipalsGetOptionalParams\n ): Promise<ServicePrincipalsGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipalListResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Automanage/servicePrincipals/default\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicePrincipal\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage() during future calls.
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for AutomanageClient.",
6
- "version": "1.0.3-alpha.20250718.1",
6
+ "version": "1.0.3-alpha.20250730.1",
7
7
  "engines": {
8
8
  "node": ">=20.0.0"
9
9
  },
@@ -90,7 +90,7 @@
90
90
  },
91
91
  "type": "module",
92
92
  "tshy": {
93
- "project": "./tsconfig.src.json",
93
+ "project": "../../../tsconfig.src.build.json",
94
94
  "exports": {
95
95
  "./package.json": "./package.json",
96
96
  ".": "./src/index.ts"