@azure/arm-support 3.0.1-alpha.20250718.1 → 3.0.1-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 (139) hide show
  1. package/dist/browser/lroImpl.js +7 -3
  2. package/dist/browser/lroImpl.js.map +1 -1
  3. package/dist/browser/microsoftSupport.js +26 -5
  4. package/dist/browser/microsoftSupport.js.map +1 -1
  5. package/dist/browser/models/mappers.js +28 -12
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/chatTranscripts.js +23 -40
  8. package/dist/browser/operations/chatTranscripts.js.map +1 -1
  9. package/dist/browser/operations/chatTranscriptsNoSubscription.js +23 -40
  10. package/dist/browser/operations/chatTranscriptsNoSubscription.js.map +1 -1
  11. package/dist/browser/operations/communications.js +34 -46
  12. package/dist/browser/operations/communications.js.map +1 -1
  13. package/dist/browser/operations/communicationsNoSubscription.js +34 -46
  14. package/dist/browser/operations/communicationsNoSubscription.js.map +1 -1
  15. package/dist/browser/operations/fileWorkspaces.js +1 -0
  16. package/dist/browser/operations/fileWorkspaces.js.map +1 -1
  17. package/dist/browser/operations/fileWorkspacesNoSubscription.js +1 -0
  18. package/dist/browser/operations/fileWorkspacesNoSubscription.js.map +1 -1
  19. package/dist/browser/operations/files.js +23 -40
  20. package/dist/browser/operations/files.js.map +1 -1
  21. package/dist/browser/operations/filesNoSubscription.js +23 -40
  22. package/dist/browser/operations/filesNoSubscription.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/problemClassifications.js +10 -27
  26. package/dist/browser/operations/problemClassifications.js.map +1 -1
  27. package/dist/browser/operations/services.js +10 -27
  28. package/dist/browser/operations/services.js.map +1 -1
  29. package/dist/browser/operations/supportTickets.js +34 -46
  30. package/dist/browser/operations/supportTickets.js.map +1 -1
  31. package/dist/browser/operations/supportTicketsNoSubscription.js +34 -46
  32. package/dist/browser/operations/supportTicketsNoSubscription.js.map +1 -1
  33. package/dist/browser/pagingHelper.js +2 -4
  34. package/dist/browser/pagingHelper.js.map +1 -1
  35. package/dist/commonjs/lroImpl.js +7 -3
  36. package/dist/commonjs/lroImpl.js.map +1 -1
  37. package/dist/commonjs/microsoftSupport.js +26 -5
  38. package/dist/commonjs/microsoftSupport.js.map +1 -1
  39. package/dist/commonjs/models/mappers.js +28 -12
  40. package/dist/commonjs/models/mappers.js.map +1 -1
  41. package/dist/commonjs/operations/chatTranscripts.js +23 -39
  42. package/dist/commonjs/operations/chatTranscripts.js.map +1 -1
  43. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js +23 -39
  44. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js.map +1 -1
  45. package/dist/commonjs/operations/communications.js +34 -45
  46. package/dist/commonjs/operations/communications.js.map +1 -1
  47. package/dist/commonjs/operations/communicationsNoSubscription.js +34 -45
  48. package/dist/commonjs/operations/communicationsNoSubscription.js.map +1 -1
  49. package/dist/commonjs/operations/fileWorkspaces.js +1 -0
  50. package/dist/commonjs/operations/fileWorkspaces.js.map +1 -1
  51. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js +1 -0
  52. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js.map +1 -1
  53. package/dist/commonjs/operations/files.js +23 -39
  54. package/dist/commonjs/operations/files.js.map +1 -1
  55. package/dist/commonjs/operations/filesNoSubscription.js +23 -39
  56. package/dist/commonjs/operations/filesNoSubscription.js.map +1 -1
  57. package/dist/commonjs/operations/operations.js +10 -26
  58. package/dist/commonjs/operations/operations.js.map +1 -1
  59. package/dist/commonjs/operations/problemClassifications.js +10 -26
  60. package/dist/commonjs/operations/problemClassifications.js.map +1 -1
  61. package/dist/commonjs/operations/services.js +10 -26
  62. package/dist/commonjs/operations/services.js.map +1 -1
  63. package/dist/commonjs/operations/supportTickets.js +34 -45
  64. package/dist/commonjs/operations/supportTickets.js.map +1 -1
  65. package/dist/commonjs/operations/supportTicketsNoSubscription.js +34 -45
  66. package/dist/commonjs/operations/supportTicketsNoSubscription.js.map +1 -1
  67. package/dist/commonjs/pagingHelper.js +2 -4
  68. package/dist/commonjs/pagingHelper.js.map +1 -1
  69. package/dist/commonjs/tsdoc-metadata.json +11 -11
  70. package/dist/esm/lroImpl.js +7 -3
  71. package/dist/esm/lroImpl.js.map +1 -1
  72. package/dist/esm/microsoftSupport.js +26 -5
  73. package/dist/esm/microsoftSupport.js.map +1 -1
  74. package/dist/esm/models/mappers.js +28 -12
  75. package/dist/esm/models/mappers.js.map +1 -1
  76. package/dist/esm/operations/chatTranscripts.js +23 -40
  77. package/dist/esm/operations/chatTranscripts.js.map +1 -1
  78. package/dist/esm/operations/chatTranscriptsNoSubscription.js +23 -40
  79. package/dist/esm/operations/chatTranscriptsNoSubscription.js.map +1 -1
  80. package/dist/esm/operations/communications.js +34 -46
  81. package/dist/esm/operations/communications.js.map +1 -1
  82. package/dist/esm/operations/communicationsNoSubscription.js +34 -46
  83. package/dist/esm/operations/communicationsNoSubscription.js.map +1 -1
  84. package/dist/esm/operations/fileWorkspaces.js +1 -0
  85. package/dist/esm/operations/fileWorkspaces.js.map +1 -1
  86. package/dist/esm/operations/fileWorkspacesNoSubscription.js +1 -0
  87. package/dist/esm/operations/fileWorkspacesNoSubscription.js.map +1 -1
  88. package/dist/esm/operations/files.js +23 -40
  89. package/dist/esm/operations/files.js.map +1 -1
  90. package/dist/esm/operations/filesNoSubscription.js +23 -40
  91. package/dist/esm/operations/filesNoSubscription.js.map +1 -1
  92. package/dist/esm/operations/operations.js +10 -27
  93. package/dist/esm/operations/operations.js.map +1 -1
  94. package/dist/esm/operations/problemClassifications.js +10 -27
  95. package/dist/esm/operations/problemClassifications.js.map +1 -1
  96. package/dist/esm/operations/services.js +10 -27
  97. package/dist/esm/operations/services.js.map +1 -1
  98. package/dist/esm/operations/supportTickets.js +34 -46
  99. package/dist/esm/operations/supportTickets.js.map +1 -1
  100. package/dist/esm/operations/supportTicketsNoSubscription.js +34 -46
  101. package/dist/esm/operations/supportTicketsNoSubscription.js.map +1 -1
  102. package/dist/esm/pagingHelper.js +2 -4
  103. package/dist/esm/pagingHelper.js.map +1 -1
  104. package/dist/react-native/lroImpl.js +7 -3
  105. package/dist/react-native/lroImpl.js.map +1 -1
  106. package/dist/react-native/microsoftSupport.js +26 -5
  107. package/dist/react-native/microsoftSupport.js.map +1 -1
  108. package/dist/react-native/models/mappers.js +28 -12
  109. package/dist/react-native/models/mappers.js.map +1 -1
  110. package/dist/react-native/operations/chatTranscripts.js +23 -40
  111. package/dist/react-native/operations/chatTranscripts.js.map +1 -1
  112. package/dist/react-native/operations/chatTranscriptsNoSubscription.js +23 -40
  113. package/dist/react-native/operations/chatTranscriptsNoSubscription.js.map +1 -1
  114. package/dist/react-native/operations/communications.js +34 -46
  115. package/dist/react-native/operations/communications.js.map +1 -1
  116. package/dist/react-native/operations/communicationsNoSubscription.js +34 -46
  117. package/dist/react-native/operations/communicationsNoSubscription.js.map +1 -1
  118. package/dist/react-native/operations/fileWorkspaces.js +1 -0
  119. package/dist/react-native/operations/fileWorkspaces.js.map +1 -1
  120. package/dist/react-native/operations/fileWorkspacesNoSubscription.js +1 -0
  121. package/dist/react-native/operations/fileWorkspacesNoSubscription.js.map +1 -1
  122. package/dist/react-native/operations/files.js +23 -40
  123. package/dist/react-native/operations/files.js.map +1 -1
  124. package/dist/react-native/operations/filesNoSubscription.js +23 -40
  125. package/dist/react-native/operations/filesNoSubscription.js.map +1 -1
  126. package/dist/react-native/operations/operations.js +10 -27
  127. package/dist/react-native/operations/operations.js.map +1 -1
  128. package/dist/react-native/operations/problemClassifications.js +10 -27
  129. package/dist/react-native/operations/problemClassifications.js.map +1 -1
  130. package/dist/react-native/operations/services.js +10 -27
  131. package/dist/react-native/operations/services.js.map +1 -1
  132. package/dist/react-native/operations/supportTickets.js +34 -46
  133. package/dist/react-native/operations/supportTickets.js.map +1 -1
  134. package/dist/react-native/operations/supportTicketsNoSubscription.js +34 -46
  135. package/dist/react-native/operations/supportTicketsNoSubscription.js.map +1 -1
  136. package/dist/react-native/pagingHelper.js +2 -4
  137. package/dist/react-native/pagingHelper.js.map +1 -1
  138. package/package.json +2 -2
  139. package/review/arm-support-node.api.md +889 -889
@@ -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 ProblemClassifications operations. */
14
13
  export class ProblemClassificationsImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class ProblemClassifications class.
17
17
  * @param client Reference to the service client
@@ -37,39 +37,22 @@ export class ProblemClassificationsImpl {
37
37
  return this;
38
38
  },
39
39
  byPage: (settings) => {
40
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
40
+ if (settings?.maxPageSize) {
41
41
  throw new Error("maxPageSize is not supported by this operation.");
42
42
  }
43
43
  return this.listPagingPage(serviceName, options, settings);
44
44
  },
45
45
  };
46
46
  }
47
- listPagingPage(serviceName, options, _settings) {
48
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
49
- let result;
50
- result = yield __await(this._list(serviceName, options));
51
- yield yield __await(result.value || []);
52
- });
47
+ async *listPagingPage(serviceName, options, _settings) {
48
+ let result;
49
+ result = await this._list(serviceName, options);
50
+ yield result.value || [];
53
51
  }
54
- listPagingAll(serviceName, options) {
55
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
56
- var _a, e_1, _b, _c;
57
- try {
58
- for (var _d = true, _e = __asyncValues(this.listPagingPage(serviceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
59
- _c = _f.value;
60
- _d = false;
61
- const page = _c;
62
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
63
- }
64
- }
65
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
66
- finally {
67
- try {
68
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
69
- }
70
- finally { if (e_1) throw e_1.error; }
71
- }
72
- });
52
+ async *listPagingAll(serviceName, options) {
53
+ for await (const page of this.listPagingPage(serviceName, options)) {
54
+ yield* page;
55
+ }
73
56
  }
74
57
  /**
75
58
  * Lists all the problem classifications (categories) available for a specific Azure service. Always
@@ -1 +1 @@
1
- {"version":3,"file":"problemClassifications.js","sourceRoot":"","sources":["../../../src/operations/problemClassifications.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,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,WAAmB,EACnB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QACtD,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,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO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,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;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,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,wGAAwG;IAC9G,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;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,WAAW;QACtB,UAAU,CAAC,yBAAyB;KACrC;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 { ProblemClassifications } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n ProblemClassification,\n ProblemClassificationsListOptionalParams,\n ProblemClassificationsListResponse,\n ProblemClassificationsGetOptionalParams,\n ProblemClassificationsGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProblemClassifications operations. */\nexport class ProblemClassificationsImpl implements ProblemClassifications {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class ProblemClassifications class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n public list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): PagedAsyncIterableIterator<ProblemClassification> {\n const iter = this.listPagingAll(serviceName, 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(serviceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ProblemClassification[]> {\n let result: ProblemClassificationsListResponse;\n result = await this._list(serviceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): AsyncIterableIterator<ProblemClassification> {\n for await (const page of this.listPagingPage(serviceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n private _list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): Promise<ProblemClassificationsListResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get problem classification details for a specific Azure service.\n * @param serviceName Name of the Azure service available for support.\n * @param problemClassificationName Name of problem classification.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n problemClassificationName: string,\n options?: ProblemClassificationsGetOptionalParams,\n ): Promise<ProblemClassificationsGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, problemClassificationName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassificationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassification,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.serviceName,\n Parameters.problemClassificationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"problemClassifications.js","sourceRoot":"","sources":["../../../src/operations/problemClassifications.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,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IACpB,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,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,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,yBAAyB,EAAE,OAAO,EAAE,EACnD,gBAAgB,CACjB,CAAC;IACJ,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,4EAA4E;IAClF,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;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,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,wGAAwG;IAC9G,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;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,WAAW;QACtB,UAAU,CAAC,yBAAyB;KACrC;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 { ProblemClassifications } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n ProblemClassification,\n ProblemClassificationsListOptionalParams,\n ProblemClassificationsListResponse,\n ProblemClassificationsGetOptionalParams,\n ProblemClassificationsGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ProblemClassifications operations. */\nexport class ProblemClassificationsImpl implements ProblemClassifications {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class ProblemClassifications class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n public list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): PagedAsyncIterableIterator<ProblemClassification> {\n const iter = this.listPagingAll(serviceName, 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(serviceName, options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<ProblemClassification[]> {\n let result: ProblemClassificationsListResponse;\n result = await this._list(serviceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): AsyncIterableIterator<ProblemClassification> {\n for await (const page of this.listPagingPage(serviceName, options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the problem classifications (categories) available for a specific Azure service. Always\n * use the service and problem classifications obtained programmatically. This practice ensures that\n * you always have the most recent set of service and problem classification Ids.\n * @param serviceName Name of the Azure service for which the problem classifications need to be\n * retrieved.\n * @param options The options parameters.\n */\n private _list(\n serviceName: string,\n options?: ProblemClassificationsListOptionalParams,\n ): Promise<ProblemClassificationsListResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n listOperationSpec,\n );\n }\n\n /**\n * Get problem classification details for a specific Azure service.\n * @param serviceName Name of the Azure service available for support.\n * @param problemClassificationName Name of problem classification.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n problemClassificationName: string,\n options?: ProblemClassificationsGetOptionalParams,\n ): Promise<ProblemClassificationsGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, problemClassificationName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassificationsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}/problemClassifications/{problemClassificationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ProblemClassification,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.serviceName,\n Parameters.problemClassificationName,\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 Services operations. */
14
13
  export class ServicesImpl {
14
+ client;
15
15
  /**
16
16
  * Initialize a new instance of the class Services class.
17
17
  * @param client Reference to the service client
@@ -39,39 +39,22 @@ export class ServicesImpl {
39
39
  return this;
40
40
  },
41
41
  byPage: (settings) => {
42
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
42
+ if (settings?.maxPageSize) {
43
43
  throw new Error("maxPageSize is not supported by this operation.");
44
44
  }
45
45
  return this.listPagingPage(options, settings);
46
46
  },
47
47
  };
48
48
  }
49
- listPagingPage(options, _settings) {
50
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
51
- let result;
52
- result = yield __await(this._list(options));
53
- yield yield __await(result.value || []);
54
- });
49
+ async *listPagingPage(options, _settings) {
50
+ let result;
51
+ result = await this._list(options);
52
+ yield result.value || [];
55
53
  }
56
- listPagingAll(options) {
57
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
58
- var _a, e_1, _b, _c;
59
- try {
60
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
61
- _c = _f.value;
62
- _d = false;
63
- const page = _c;
64
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
65
- }
66
- }
67
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
68
- finally {
69
- try {
70
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
71
- }
72
- finally { if (e_1) throw e_1.error; }
73
- }
74
- });
54
+ async *listPagingAll(options) {
55
+ for await (const page of this.listPagingPage(options)) {
56
+ yield* page;
57
+ }
75
58
  }
76
59
  /**
77
60
  * Lists all the Azure services available for support ticket creation. For **Technical** issues, select
@@ -1 +1 @@
1
- {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/operations/services.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,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,cAAc,CAC3B,OAAoC,EACpC,SAAwB;;YAExB,IAAI,MAA4B,CAAC;YACjC,MAAM,GAAG,cAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;YACnC,oBAAM,MAAM,CAAC,KAAK,IAAI,EAAE,CAAA,CAAC;QAC3B,CAAC;KAAA;IAEc,aAAa,CAC1B,OAAoC;;;;gBAEpC,KAAyB,eAAA,KAAA,cAAA,IAAI,CAAC,cAA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AE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,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 { Services } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Service,\n ServicesListOptionalParams,\n ServicesListResponse,\n ServicesGetOptionalParams,\n ServicesGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Services operations. */\nexport class ServicesImpl implements Services {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Services class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n public list(\n options?: ServicesListOptionalParams,\n ): PagedAsyncIterableIterator<Service> {\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?: ServicesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Service[]> {\n let result: ServicesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: ServicesListOptionalParams,\n ): AsyncIterableIterator<Service> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n private _list(\n options?: ServicesListOptionalParams,\n ): Promise<ServicesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets a specific Azure service for support ticket creation.\n * @param serviceName Name of the Azure service.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n options?: ServicesGetOptionalParams,\n ): Promise<ServicesGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Service,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/operations/services.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,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;OASG;IACI,IAAI,CACT,OAAoC;QAEpC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAChD,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,CAAC,cAAc,CAC3B,OAAoC,EACpC,SAAwB;QAExB,IAAI,MAA4B,CAAC;QACjC,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,MAAM,CAAC,KAAK,IAAI,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OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC;IACzD,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 { Services } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n Service,\n ServicesListOptionalParams,\n ServicesListResponse,\n ServicesGetOptionalParams,\n ServicesGetResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Services operations. */\nexport class ServicesImpl implements Services {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class Services class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n public list(\n options?: ServicesListOptionalParams,\n ): PagedAsyncIterableIterator<Service> {\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?: ServicesListOptionalParams,\n _settings?: PageSettings,\n ): AsyncIterableIterator<Service[]> {\n let result: ServicesListResponse;\n result = await this._list(options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n options?: ServicesListOptionalParams,\n ): AsyncIterableIterator<Service> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Lists all the Azure services available for support ticket creation. For **Technical** issues, select\n * the Service Id that maps to the Azure service/product as displayed in the **Services** drop-down\n * list on the Azure portal's [New support\n * request](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview) page.\n * Always use the service and its corresponding problem classification(s) obtained programmatically for\n * support ticket creation. This practice ensures that you always have the most recent set of service\n * and problem classification Ids.\n * @param options The options parameters.\n */\n private _list(\n options?: ServicesListOptionalParams,\n ): Promise<ServicesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Gets a specific Azure service for support ticket creation.\n * @param serviceName Name of the Azure service.\n * @param options The options parameters.\n */\n get(\n serviceName: string,\n options?: ServicesGetOptionalParams,\n ): Promise<ServicesGetResponse> {\n return this.client.sendOperationRequest(\n { serviceName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServicesListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Support/services/{serviceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.Service,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.serviceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,7 +5,6 @@
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 { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing SupportTickets operations. */
17
16
  export class SupportTicketsImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class SupportTickets class.
20
20
  * @param client Reference to the service client
@@ -40,52 +40,35 @@ export class SupportTicketsImpl {
40
40
  return this;
41
41
  },
42
42
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
44
44
  throw new Error("maxPageSize is not supported by this operation.");
45
45
  }
46
46
  return this.listPagingPage(options, settings);
47
47
  },
48
48
  };
49
49
  }
50
- listPagingPage(options, settings) {
51
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield __await(this._list(options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- setContinuationToken(page, continuationToken);
59
- yield yield __await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield __await(this._listNext(continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- });
50
+ async *listPagingPage(options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ setContinuationToken(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
69
67
  }
70
- listPagingAll(options) {
71
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
68
+ async *listPagingAll(options) {
69
+ for await (const page of this.listPagingPage(options)) {
70
+ yield* page;
71
+ }
89
72
  }
90
73
  /**
91
74
  * Check the availability of a resource name. This API should be used to check the uniqueness of the
@@ -157,14 +140,19 @@ export class SupportTicketsImpl {
157
140
  return this.client.sendOperationRequest(args, spec);
158
141
  };
159
142
  const sendOperationFn = async (args, spec) => {
160
- var _a;
161
143
  let currentRawResponse = undefined;
162
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
144
+ const providedCallback = args.options?.onResponse;
163
145
  const callback = (rawResponse, flatResponse) => {
164
146
  currentRawResponse = rawResponse;
165
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
147
+ providedCallback?.(rawResponse, flatResponse);
148
+ };
149
+ const updatedArgs = {
150
+ ...args,
151
+ options: {
152
+ ...args.options,
153
+ onResponse: callback,
154
+ },
166
155
  };
167
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
168
156
  const flatResponse = await directSendOperation(updatedArgs, spec);
169
157
  return {
170
158
  flatResponse,
@@ -181,8 +169,8 @@ export class SupportTicketsImpl {
181
169
  spec: createOperationSpec,
182
170
  });
183
171
  const poller = await createHttpPoller(lro, {
184
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
185
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
172
+ restoreFrom: options?.resumeFrom,
173
+ intervalInMs: options?.updateIntervalInMs,
186
174
  resourceLocationConfig: "azure-async-operation",
187
175
  });
188
176
  await poller.poll();
@@ -1 +1 @@
1
- {"version":3,"file":"supportTickets.js","sourceRoot":"","sources":["../../../src/operations/supportTickets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAmB9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAA0C;QAE1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC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,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,6BAA6B;IACrD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTickets } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsListNextOptionalParams,\n SupportTicketsListOptionalParams,\n SupportTicketsListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsCheckNameAvailabilityOptionalParams,\n SupportTicketsCheckNameAvailabilityResponse,\n SupportTicketsGetOptionalParams,\n SupportTicketsGetResponse,\n UpdateSupportTicket,\n SupportTicketsUpdateOptionalParams,\n SupportTicketsUpdateResponse,\n SupportTicketsCreateOptionalParams,\n SupportTicketsCreateResponse,\n SupportTicketsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTickets operations. */\nexport class SupportTicketsImpl implements SupportTickets {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTickets class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\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?: SupportTicketsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsListOptionalParams,\n ): Promise<SupportTicketsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsGetOptionalParams,\n ): Promise<SupportTicketsGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, advanced diagnostic consent and\n * your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed\n * if a support ticket is actively being worked upon by an Azure support engineer. In such a case,\n * contact your support engineer to request severity update by adding a new communication using the\n * Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsUpdateOptionalParams,\n ): Promise<SupportTicketsUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsCreateResponse>,\n SupportTicketsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsCreateResponse,\n OperationState<SupportTicketsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<SupportTicketsCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsListNextOptionalParams,\n ): Promise<SupportTicketsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
1
+ {"version":3,"file":"supportTickets.js","sourceRoot":"","sources":["../../../src/operations/supportTickets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAGL,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAmB9C,4CAA4C;AAC5C,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IACZ,MAAM,CAAmB;IAE1C;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,IAAI,CACT,OAA0C;QAE1C,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,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AE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,6BAA6B;IACrD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;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 { setContinuationToken } from \"../pagingHelper.js\";\nimport { SupportTickets } 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 { MicrosoftSupport } from \"../microsoftSupport.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n SupportTicketDetails,\n SupportTicketsListNextOptionalParams,\n SupportTicketsListOptionalParams,\n SupportTicketsListResponse,\n CheckNameAvailabilityInput,\n SupportTicketsCheckNameAvailabilityOptionalParams,\n SupportTicketsCheckNameAvailabilityResponse,\n SupportTicketsGetOptionalParams,\n SupportTicketsGetResponse,\n UpdateSupportTicket,\n SupportTicketsUpdateOptionalParams,\n SupportTicketsUpdateResponse,\n SupportTicketsCreateOptionalParams,\n SupportTicketsCreateResponse,\n SupportTicketsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing SupportTickets operations. */\nexport class SupportTicketsImpl implements SupportTickets {\n private readonly client: MicrosoftSupport;\n\n /**\n * Initialize a new instance of the class SupportTickets class.\n * @param client Reference to the service client\n */\n constructor(client: MicrosoftSupport) {\n this.client = client;\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n public list(\n options?: SupportTicketsListOptionalParams,\n ): PagedAsyncIterableIterator<SupportTicketDetails> {\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?: SupportTicketsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SupportTicketDetails[]> {\n let result: SupportTicketsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: SupportTicketsListOptionalParams,\n ): AsyncIterableIterator<SupportTicketDetails> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * Check the availability of a resource name. This API should be used to check the uniqueness of the\n * name for support ticket creation for the selected subscription.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: SupportTicketsCheckNameAvailabilityOptionalParams,\n ): Promise<SupportTicketsCheckNameAvailabilityResponse> {\n return this.client.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by\n * _Status_, _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter.\n * Output will be a paged result with _nextLink_, using which you can retrieve the next set of support\n * tickets. <br/><br/>Support ticket data is available for 18 months after ticket creation. If a ticket\n * was created more than 18 months ago, a request for data might cause an error.\n * @param options The options parameters.\n */\n private _list(\n options?: SupportTicketsListOptionalParams,\n ): Promise<SupportTicketsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after\n * ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an\n * error.\n * @param supportTicketName Support ticket name.\n * @param options The options parameters.\n */\n get(\n supportTicketName: string,\n options?: SupportTicketsGetOptionalParams,\n ): Promise<SupportTicketsGetResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, options },\n getOperationSpec,\n );\n }\n\n /**\n * This API allows you to update the severity level, ticket status, advanced diagnostic consent and\n * your contact information in the support ticket.<br/><br/>Note: The severity levels cannot be changed\n * if a support ticket is actively being worked upon by an Azure support engineer. In such a case,\n * contact your support engineer to request severity update by adding a new communication using the\n * Communications API.\n * @param supportTicketName Support ticket name.\n * @param updateSupportTicket UpdateSupportTicket object.\n * @param options The options parameters.\n */\n update(\n supportTicketName: string,\n updateSupportTicket: UpdateSupportTicket,\n options?: SupportTicketsUpdateOptionalParams,\n ): Promise<SupportTicketsUpdateResponse> {\n return this.client.sendOperationRequest(\n { supportTicketName, updateSupportTicket, options },\n updateOperationSpec,\n );\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreate(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<SupportTicketsCreateResponse>,\n SupportTicketsCreateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<SupportTicketsCreateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { supportTicketName, createSupportTicketParameters, options },\n spec: createOperationSpec,\n });\n const poller = await createHttpPoller<\n SupportTicketsCreateResponse,\n OperationState<SupportTicketsCreateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a new support ticket for Subscription and Service limits (Quota), Technical, Billing, and\n * Subscription Management issues for the specified subscription. Learn the\n * [prerequisites](https://aka.ms/supportAPI) required to create a support ticket.<br/><br/>Always call\n * the Services and ProblemClassifications API to get the most recent set of services and problem\n * categories required for support ticket creation.<br/><br/>Adding attachments is not currently\n * supported via the API. To add a file to an existing support ticket, visit the [Manage support\n * ticket](https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/managesupportrequest)\n * page in the Azure portal, select the support ticket, and use the file upload control to add a new\n * file.<br/><br/>Providing consent to share diagnostic information with Azure support is currently not\n * supported via the API. The Azure support engineer working on your ticket will reach out to you for\n * consent if your issue requires gathering diagnostic information from your Azure\n * resources.<br/><br/>**Creating a support ticket for on-behalf-of**: Include\n * _x-ms-authorization-auxiliary_ header to provide an auxiliary token as per\n * [documentation](https://docs.microsoft.com/azure/azure-resource-manager/management/authenticate-multi-tenant).\n * The primary token will be from the tenant for whom a support ticket is being raised against the\n * subscription, i.e. Cloud solution provider (CSP) customer tenant. The auxiliary token will be from\n * the Cloud solution provider (CSP) partner tenant.\n * @param supportTicketName Support ticket name.\n * @param createSupportTicketParameters Support ticket request payload.\n * @param options The options parameters.\n */\n async beginCreateAndWait(\n supportTicketName: string,\n createSupportTicketParameters: SupportTicketDetails,\n options?: SupportTicketsCreateOptionalParams,\n ): Promise<SupportTicketsCreateResponse> {\n const poller = await this.beginCreate(\n supportTicketName,\n createSupportTicketParameters,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: SupportTicketsListNextOptionalParams,\n ): Promise<SupportTicketsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.top, Parameters.filter],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.updateSupportTicket,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Support/supportTickets/{supportTicketName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 201: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 202: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n 204: {\n bodyMapper: Mappers.SupportTicketDetails,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.createSupportTicketParameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.supportTicketName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SupportTicketsListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.nextLink,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
@@ -5,7 +5,6 @@
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 { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
15
14
  /// <reference lib="esnext.asynciterable" />
16
15
  /** Class containing SupportTicketsNoSubscription operations. */
17
16
  export class SupportTicketsNoSubscriptionImpl {
17
+ client;
18
18
  /**
19
19
  * Initialize a new instance of the class SupportTicketsNoSubscription class.
20
20
  * @param client Reference to the service client
@@ -40,52 +40,35 @@ export class SupportTicketsNoSubscriptionImpl {
40
40
  return this;
41
41
  },
42
42
  byPage: (settings) => {
43
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
43
+ if (settings?.maxPageSize) {
44
44
  throw new Error("maxPageSize is not supported by this operation.");
45
45
  }
46
46
  return this.listPagingPage(options, settings);
47
47
  },
48
48
  };
49
49
  }
50
- listPagingPage(options, settings) {
51
- return __asyncGenerator(this, arguments, function* listPagingPage_1() {
52
- let result;
53
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
54
- if (!continuationToken) {
55
- result = yield __await(this._list(options));
56
- let page = result.value || [];
57
- continuationToken = result.nextLink;
58
- setContinuationToken(page, continuationToken);
59
- yield yield __await(page);
60
- }
61
- while (continuationToken) {
62
- result = yield __await(this._listNext(continuationToken, options));
63
- continuationToken = result.nextLink;
64
- let page = result.value || [];
65
- setContinuationToken(page, continuationToken);
66
- yield yield __await(page);
67
- }
68
- });
50
+ async *listPagingPage(options, settings) {
51
+ let result;
52
+ let continuationToken = settings?.continuationToken;
53
+ if (!continuationToken) {
54
+ result = await this._list(options);
55
+ let page = result.value || [];
56
+ continuationToken = result.nextLink;
57
+ setContinuationToken(page, continuationToken);
58
+ yield page;
59
+ }
60
+ while (continuationToken) {
61
+ result = await this._listNext(continuationToken, options);
62
+ continuationToken = result.nextLink;
63
+ let page = result.value || [];
64
+ setContinuationToken(page, continuationToken);
65
+ yield page;
66
+ }
69
67
  }
70
- listPagingAll(options) {
71
- return __asyncGenerator(this, arguments, function* listPagingAll_1() {
72
- var _a, e_1, _b, _c;
73
- try {
74
- for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
75
- _c = _f.value;
76
- _d = false;
77
- const page = _c;
78
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
79
- }
80
- }
81
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
82
- finally {
83
- try {
84
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
85
- }
86
- finally { if (e_1) throw e_1.error; }
87
- }
88
- });
68
+ async *listPagingAll(options) {
69
+ for await (const page of this.listPagingPage(options)) {
70
+ yield* page;
71
+ }
89
72
  }
90
73
  /**
91
74
  * Check the availability of a resource name. This API should be used to check the uniqueness of the
@@ -149,14 +132,19 @@ export class SupportTicketsNoSubscriptionImpl {
149
132
  return this.client.sendOperationRequest(args, spec);
150
133
  };
151
134
  const sendOperationFn = async (args, spec) => {
152
- var _a;
153
135
  let currentRawResponse = undefined;
154
- const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
136
+ const providedCallback = args.options?.onResponse;
155
137
  const callback = (rawResponse, flatResponse) => {
156
138
  currentRawResponse = rawResponse;
157
- providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
139
+ providedCallback?.(rawResponse, flatResponse);
140
+ };
141
+ const updatedArgs = {
142
+ ...args,
143
+ options: {
144
+ ...args.options,
145
+ onResponse: callback,
146
+ },
158
147
  };
159
- const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
160
148
  const flatResponse = await directSendOperation(updatedArgs, spec);
161
149
  return {
162
150
  flatResponse,
@@ -173,8 +161,8 @@ export class SupportTicketsNoSubscriptionImpl {
173
161
  spec: createOperationSpec,
174
162
  });
175
163
  const poller = await createHttpPoller(lro, {
176
- restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
177
- intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
164
+ restoreFrom: options?.resumeFrom,
165
+ intervalInMs: options?.updateIntervalInMs,
178
166
  resourceLocationConfig: "azure-async-operation",
179
167
  });
180
168
  await poller.poll();