@azure/arm-support 3.0.2-alpha.20260303.1 → 3.0.2-alpha.20260305.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 (141) hide show
  1. package/dist/commonjs/index.js +35 -19
  2. package/dist/commonjs/index.js.map +7 -1
  3. package/dist/commonjs/lroImpl.js +41 -19
  4. package/dist/commonjs/lroImpl.js.map +7 -1
  5. package/dist/commonjs/microsoftSupport.js +152 -129
  6. package/dist/commonjs/microsoftSupport.js.map +7 -1
  7. package/dist/commonjs/models/index.js +96 -95
  8. package/dist/commonjs/models/index.js.map +7 -1
  9. package/dist/commonjs/models/mappers.js +1403 -1314
  10. package/dist/commonjs/models/mappers.js.map +7 -1
  11. package/dist/commonjs/models/parameters.js +242 -185
  12. package/dist/commonjs/models/parameters.js.map +7 -1
  13. package/dist/commonjs/operations/chatTranscripts.js +185 -148
  14. package/dist/commonjs/operations/chatTranscripts.js.map +7 -1
  15. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js +179 -142
  16. package/dist/commonjs/operations/chatTranscriptsNoSubscription.js.map +7 -1
  17. package/dist/commonjs/operations/communications.js +327 -282
  18. package/dist/commonjs/operations/communications.js.map +7 -1
  19. package/dist/commonjs/operations/communicationsNoSubscription.js +316 -271
  20. package/dist/commonjs/operations/communicationsNoSubscription.js.map +7 -1
  21. package/dist/commonjs/operations/fileWorkspaces.js +108 -77
  22. package/dist/commonjs/operations/fileWorkspaces.js.map +7 -1
  23. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js +100 -69
  24. package/dist/commonjs/operations/fileWorkspacesNoSubscription.js.map +7 -1
  25. package/dist/commonjs/operations/files.js +250 -207
  26. package/dist/commonjs/operations/files.js.map +7 -1
  27. package/dist/commonjs/operations/filesNoSubscription.js +242 -199
  28. package/dist/commonjs/operations/filesNoSubscription.js.map +7 -1
  29. package/dist/commonjs/operations/index.js +45 -24
  30. package/dist/commonjs/operations/index.js.map +7 -1
  31. package/dist/commonjs/operations/operations.js +101 -77
  32. package/dist/commonjs/operations/operations.js.map +7 -1
  33. package/dist/commonjs/operations/problemClassifications.js +141 -111
  34. package/dist/commonjs/operations/problemClassifications.js.map +7 -1
  35. package/dist/commonjs/operations/services.js +137 -110
  36. package/dist/commonjs/operations/services.js.map +7 -1
  37. package/dist/commonjs/operations/supportTickets.js +363 -323
  38. package/dist/commonjs/operations/supportTickets.js.map +7 -1
  39. package/dist/commonjs/operations/supportTicketsNoSubscription.js +332 -292
  40. package/dist/commonjs/operations/supportTicketsNoSubscription.js.map +7 -1
  41. package/dist/commonjs/operationsInterfaces/chatTranscripts.js +15 -10
  42. package/dist/commonjs/operationsInterfaces/chatTranscripts.js.map +7 -1
  43. package/dist/commonjs/operationsInterfaces/chatTranscriptsNoSubscription.js +15 -10
  44. package/dist/commonjs/operationsInterfaces/chatTranscriptsNoSubscription.js.map +7 -1
  45. package/dist/commonjs/operationsInterfaces/communications.js +15 -10
  46. package/dist/commonjs/operationsInterfaces/communications.js.map +7 -1
  47. package/dist/commonjs/operationsInterfaces/communicationsNoSubscription.js +15 -10
  48. package/dist/commonjs/operationsInterfaces/communicationsNoSubscription.js.map +7 -1
  49. package/dist/commonjs/operationsInterfaces/fileWorkspaces.js +15 -10
  50. package/dist/commonjs/operationsInterfaces/fileWorkspaces.js.map +7 -1
  51. package/dist/commonjs/operationsInterfaces/fileWorkspacesNoSubscription.js +15 -10
  52. package/dist/commonjs/operationsInterfaces/fileWorkspacesNoSubscription.js.map +7 -1
  53. package/dist/commonjs/operationsInterfaces/files.js +15 -10
  54. package/dist/commonjs/operationsInterfaces/files.js.map +7 -1
  55. package/dist/commonjs/operationsInterfaces/filesNoSubscription.js +15 -10
  56. package/dist/commonjs/operationsInterfaces/filesNoSubscription.js.map +7 -1
  57. package/dist/commonjs/operationsInterfaces/index.js +45 -24
  58. package/dist/commonjs/operationsInterfaces/index.js.map +7 -1
  59. package/dist/commonjs/operationsInterfaces/operations.js +15 -10
  60. package/dist/commonjs/operationsInterfaces/operations.js.map +7 -1
  61. package/dist/commonjs/operationsInterfaces/problemClassifications.js +15 -10
  62. package/dist/commonjs/operationsInterfaces/problemClassifications.js.map +7 -1
  63. package/dist/commonjs/operationsInterfaces/services.js +15 -10
  64. package/dist/commonjs/operationsInterfaces/services.js.map +7 -1
  65. package/dist/commonjs/operationsInterfaces/supportTickets.js +15 -10
  66. package/dist/commonjs/operationsInterfaces/supportTickets.js.map +7 -1
  67. package/dist/commonjs/operationsInterfaces/supportTicketsNoSubscription.js +15 -10
  68. package/dist/commonjs/operationsInterfaces/supportTicketsNoSubscription.js.map +7 -1
  69. package/dist/commonjs/pagingHelper.js +39 -30
  70. package/dist/commonjs/pagingHelper.js.map +7 -1
  71. package/dist/esm/index.js +6 -11
  72. package/dist/esm/index.js.map +7 -1
  73. package/dist/esm/lroImpl.js +19 -17
  74. package/dist/esm/lroImpl.js.map +7 -1
  75. package/dist/esm/microsoftSupport.js +132 -123
  76. package/dist/esm/microsoftSupport.js.map +7 -1
  77. package/dist/esm/models/index.js +64 -92
  78. package/dist/esm/models/index.js.map +7 -1
  79. package/dist/esm/models/mappers.js +1344 -1312
  80. package/dist/esm/models/mappers.js.map +7 -1
  81. package/dist/esm/models/parameters.js +221 -198
  82. package/dist/esm/models/parameters.js.map +7 -1
  83. package/dist/esm/operations/chatTranscripts.js +149 -140
  84. package/dist/esm/operations/chatTranscripts.js.map +7 -1
  85. package/dist/esm/operations/chatTranscriptsNoSubscription.js +143 -134
  86. package/dist/esm/operations/chatTranscriptsNoSubscription.js.map +7 -1
  87. package/dist/esm/operations/communications.js +292 -273
  88. package/dist/esm/operations/communications.js.map +7 -1
  89. package/dist/esm/operations/communicationsNoSubscription.js +281 -262
  90. package/dist/esm/operations/communicationsNoSubscription.js.map +7 -1
  91. package/dist/esm/operations/fileWorkspaces.js +73 -70
  92. package/dist/esm/operations/fileWorkspaces.js.map +7 -1
  93. package/dist/esm/operations/fileWorkspacesNoSubscription.js +65 -62
  94. package/dist/esm/operations/fileWorkspacesNoSubscription.js.map +7 -1
  95. package/dist/esm/operations/files.js +214 -199
  96. package/dist/esm/operations/files.js.map +7 -1
  97. package/dist/esm/operations/filesNoSubscription.js +206 -191
  98. package/dist/esm/operations/filesNoSubscription.js.map +7 -1
  99. package/dist/esm/operations/index.js +0 -8
  100. package/dist/esm/operations/index.js.map +7 -1
  101. package/dist/esm/operations/operations.js +66 -70
  102. package/dist/esm/operations/operations.js.map +7 -1
  103. package/dist/esm/operations/problemClassifications.js +106 -104
  104. package/dist/esm/operations/problemClassifications.js.map +7 -1
  105. package/dist/esm/operations/services.js +102 -103
  106. package/dist/esm/operations/services.js.map +7 -1
  107. package/dist/esm/operations/supportTickets.js +328 -314
  108. package/dist/esm/operations/supportTickets.js.map +7 -1
  109. package/dist/esm/operations/supportTicketsNoSubscription.js +297 -283
  110. package/dist/esm/operations/supportTicketsNoSubscription.js.map +7 -1
  111. package/dist/esm/operationsInterfaces/chatTranscripts.js +0 -9
  112. package/dist/esm/operationsInterfaces/chatTranscripts.js.map +7 -1
  113. package/dist/esm/operationsInterfaces/chatTranscriptsNoSubscription.js +0 -9
  114. package/dist/esm/operationsInterfaces/chatTranscriptsNoSubscription.js.map +7 -1
  115. package/dist/esm/operationsInterfaces/communications.js +0 -9
  116. package/dist/esm/operationsInterfaces/communications.js.map +7 -1
  117. package/dist/esm/operationsInterfaces/communicationsNoSubscription.js +0 -9
  118. package/dist/esm/operationsInterfaces/communicationsNoSubscription.js.map +7 -1
  119. package/dist/esm/operationsInterfaces/fileWorkspaces.js +0 -9
  120. package/dist/esm/operationsInterfaces/fileWorkspaces.js.map +7 -1
  121. package/dist/esm/operationsInterfaces/fileWorkspacesNoSubscription.js +0 -9
  122. package/dist/esm/operationsInterfaces/fileWorkspacesNoSubscription.js.map +7 -1
  123. package/dist/esm/operationsInterfaces/files.js +0 -9
  124. package/dist/esm/operationsInterfaces/files.js.map +7 -1
  125. package/dist/esm/operationsInterfaces/filesNoSubscription.js +0 -9
  126. package/dist/esm/operationsInterfaces/filesNoSubscription.js.map +7 -1
  127. package/dist/esm/operationsInterfaces/index.js +0 -8
  128. package/dist/esm/operationsInterfaces/index.js.map +7 -1
  129. package/dist/esm/operationsInterfaces/operations.js +0 -9
  130. package/dist/esm/operationsInterfaces/operations.js.map +7 -1
  131. package/dist/esm/operationsInterfaces/problemClassifications.js +0 -9
  132. package/dist/esm/operationsInterfaces/problemClassifications.js.map +7 -1
  133. package/dist/esm/operationsInterfaces/services.js +0 -9
  134. package/dist/esm/operationsInterfaces/services.js.map +7 -1
  135. package/dist/esm/operationsInterfaces/supportTickets.js +0 -9
  136. package/dist/esm/operationsInterfaces/supportTickets.js.map +7 -1
  137. package/dist/esm/operationsInterfaces/supportTicketsNoSubscription.js +0 -9
  138. package/dist/esm/operationsInterfaces/supportTicketsNoSubscription.js.map +7 -1
  139. package/dist/esm/pagingHelper.js +17 -28
  140. package/dist/esm/pagingHelper.js.map +7 -1
  141. package/package.json +2 -19
@@ -1,19 +1,35 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MicrosoftSupport = exports.getContinuationToken = void 0;
11
- const tslib_1 = require("tslib");
12
- /// <reference lib="esnext.asynciterable" />
13
- var pagingHelper_js_1 = require("./pagingHelper.js");
14
- Object.defineProperty(exports, "getContinuationToken", { enumerable: true, get: function () { return pagingHelper_js_1.getContinuationToken; } });
15
- tslib_1.__exportStar(require("./models/index.js"), exports);
16
- var microsoftSupport_js_1 = require("./microsoftSupport.js");
17
- Object.defineProperty(exports, "MicrosoftSupport", { enumerable: true, get: function () { return microsoftSupport_js_1.MicrosoftSupport; } });
18
- tslib_1.__exportStar(require("./operationsInterfaces/index.js"), exports);
19
- //# sourceMappingURL=index.js.map
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var src_exports = {};
20
+ __export(src_exports, {
21
+ MicrosoftSupport: () => import_microsoftSupport.MicrosoftSupport,
22
+ getContinuationToken: () => import_pagingHelper.getContinuationToken
23
+ });
24
+ module.exports = __toCommonJS(src_exports);
25
+ var import_pagingHelper = require("./pagingHelper.js");
26
+ __reExport(src_exports, require("./models/index.js"), module.exports);
27
+ var import_microsoftSupport = require("./microsoftSupport.js");
28
+ __reExport(src_exports, require("./operationsInterfaces/index.js"), module.exports);
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ MicrosoftSupport,
32
+ getContinuationToken,
33
+ ...require("./models/index.js"),
34
+ ...require("./operationsInterfaces/index.js")
35
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,4CAA4C;AAC5C,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,4DAAkC;AAClC,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AACzB,0EAAgD","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\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { MicrosoftSupport } from \"./microsoftSupport.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/support/arm-support/src/index.ts"],
4
+ "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\n/// <reference lib=\"esnext.asynciterable\" />\nexport { getContinuationToken } from \"./pagingHelper.js\";\nexport * from \"./models/index.js\";\nexport { MicrosoftSupport } from \"./microsoftSupport.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAAqC;AACrC,wBAAc,8BAVd;AAWA,8BAAiC;AACjC,wBAAc,4CAZd;",
6
+ "names": []
7
+ }
@@ -1,21 +1,43 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createLroSpec = createLroSpec;
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var lroImpl_exports = {};
19
+ __export(lroImpl_exports, {
20
+ createLroSpec: () => createLroSpec
21
+ });
22
+ module.exports = __toCommonJS(lroImpl_exports);
4
23
  function createLroSpec(inputs) {
5
- const { args, spec, sendOperationFn } = inputs;
6
- return {
7
- requestMethod: spec.httpMethod,
8
- requestPath: spec.path,
9
- sendInitialRequest: () => sendOperationFn(args, spec),
10
- sendPollRequest: (path, options) => {
11
- const { requestBody, ...restSpec } = spec;
12
- return sendOperationFn(args, {
13
- ...restSpec,
14
- httpMethod: "GET",
15
- path,
16
- abortSignal: options?.abortSignal,
17
- });
18
- },
19
- };
24
+ const { args, spec, sendOperationFn } = inputs;
25
+ return {
26
+ requestMethod: spec.httpMethod,
27
+ requestPath: spec.path,
28
+ sendInitialRequest: () => sendOperationFn(args, spec),
29
+ sendPollRequest: (path, options) => {
30
+ const { requestBody, ...restSpec } = spec;
31
+ return sendOperationFn(args, {
32
+ ...restSpec,
33
+ httpMethod: "GET",
34
+ path,
35
+ abortSignal: options?.abortSignal
36
+ });
37
+ }
38
+ };
20
39
  }
21
- //# sourceMappingURL=lroImpl.js.map
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ createLroSpec
43
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";;AAUA,sCA2BC;AA3BD,SAAgB,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/support/arm-support/src/lroImpl.ts"],
4
+ "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 */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,SAAS,cAAiB,QAQL;AAC1B,QAAM,EAAE,MAAM,MAAM,gBAAgB,IAAI;AACxC,SAAO;AAAA,IACL,eAAe,KAAK;AAAA,IACpB,aAAa,KAAK;AAAA,IAClB,oBAAoB,MAAM,gBAAgB,MAAM,IAAI;AAAA,IACpD,iBAAiB,CACf,MACA,YACG;AACH,YAAM,EAAE,aAAa,GAAG,SAAS,IAAI;AACrC,aAAO,gBAAgB,MAAM;AAAA,QAC3B,GAAG;AAAA,QACH,YAAY;AAAA,QACZ;AAAA,QACA,aAAa,SAAS;AAAA,MACxB,CAAC;AAAA,IACH;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -1,133 +1,156 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MicrosoftSupport = void 0;
11
- const tslib_1 = require("tslib");
12
- const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
- const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
14
- const index_js_1 = require("./operations/index.js");
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var microsoftSupport_exports = {};
29
+ __export(microsoftSupport_exports, {
30
+ MicrosoftSupport: () => MicrosoftSupport
31
+ });
32
+ module.exports = __toCommonJS(microsoftSupport_exports);
33
+ var coreClient = __toESM(require("@azure/core-client"));
34
+ var coreRestPipeline = __toESM(require("@azure/core-rest-pipeline"));
35
+ var import_operations = require("./operations/index.js");
15
36
  class MicrosoftSupport extends coreClient.ServiceClient {
16
- $host;
17
- apiVersion;
18
- subscriptionId;
19
- constructor(credentials, subscriptionIdOrOptions, options) {
20
- if (credentials === undefined) {
21
- throw new Error("'credentials' cannot be null");
22
- }
23
- let subscriptionId;
24
- if (typeof subscriptionIdOrOptions === "string") {
25
- subscriptionId = subscriptionIdOrOptions;
26
- }
27
- else if (typeof subscriptionIdOrOptions === "object") {
28
- options = subscriptionIdOrOptions;
29
- }
30
- // Initializing default values for options
31
- if (!options) {
32
- options = {};
33
- }
34
- const defaults = {
35
- requestContentType: "application/json; charset=utf-8",
36
- credential: credentials,
37
- };
38
- const packageDetails = `azsdk-js-arm-support/3.0.2`;
39
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
40
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
41
- : `${packageDetails}`;
42
- const optionsWithDefaults = {
43
- ...defaults,
44
- ...options,
45
- userAgentOptions: {
46
- userAgentPrefix,
47
- },
48
- endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
49
- };
50
- super(optionsWithDefaults);
51
- let bearerTokenAuthenticationPolicyFound = false;
52
- if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
53
- const pipelinePolicies = options.pipeline.getOrderedPolicies();
54
- bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
55
- coreRestPipeline.bearerTokenAuthenticationPolicyName);
56
- }
57
- if (!options ||
58
- !options.pipeline ||
59
- options.pipeline.getOrderedPolicies().length == 0 ||
60
- !bearerTokenAuthenticationPolicyFound) {
61
- this.pipeline.removePolicy({
62
- name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
63
- });
64
- this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
65
- credential: credentials,
66
- scopes: optionsWithDefaults.credentialScopes ??
67
- `${optionsWithDefaults.endpoint}/.default`,
68
- challengeCallbacks: {
69
- authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
70
- },
71
- }));
72
- }
73
- // Parameter assignments
74
- this.subscriptionId = subscriptionId;
75
- // Assigning values to Constant parameters
76
- this.$host = options.$host || "https://management.azure.com";
77
- this.apiVersion = options.apiVersion || "2024-04-01";
78
- this.operations = new index_js_1.OperationsImpl(this);
79
- this.services = new index_js_1.ServicesImpl(this);
80
- this.problemClassifications = new index_js_1.ProblemClassificationsImpl(this);
81
- this.supportTickets = new index_js_1.SupportTicketsImpl(this);
82
- this.supportTicketsNoSubscription = new index_js_1.SupportTicketsNoSubscriptionImpl(this);
83
- this.communications = new index_js_1.CommunicationsImpl(this);
84
- this.communicationsNoSubscription = new index_js_1.CommunicationsNoSubscriptionImpl(this);
85
- this.chatTranscripts = new index_js_1.ChatTranscriptsImpl(this);
86
- this.chatTranscriptsNoSubscription = new index_js_1.ChatTranscriptsNoSubscriptionImpl(this);
87
- this.fileWorkspaces = new index_js_1.FileWorkspacesImpl(this);
88
- this.fileWorkspacesNoSubscription = new index_js_1.FileWorkspacesNoSubscriptionImpl(this);
89
- this.files = new index_js_1.FilesImpl(this);
90
- this.filesNoSubscription = new index_js_1.FilesNoSubscriptionImpl(this);
91
- this.addCustomApiVersionPolicy(options.apiVersion);
37
+ $host;
38
+ apiVersion;
39
+ subscriptionId;
40
+ constructor(credentials, subscriptionIdOrOptions, options) {
41
+ if (credentials === void 0) {
42
+ throw new Error("'credentials' cannot be null");
92
43
  }
93
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
94
- addCustomApiVersionPolicy(apiVersion) {
95
- if (!apiVersion) {
96
- return;
97
- }
98
- const apiVersionPolicy = {
99
- name: "CustomApiVersionPolicy",
100
- async sendRequest(request, next) {
101
- const param = request.url.split("?");
102
- if (param.length > 1) {
103
- const newParams = param[1].split("&").map((item) => {
104
- if (item.indexOf("api-version") > -1) {
105
- return "api-version=" + apiVersion;
106
- }
107
- else {
108
- return item;
109
- }
110
- });
111
- request.url = param[0] + "?" + newParams.join("&");
112
- }
113
- return next(request);
114
- },
115
- };
116
- this.pipeline.addPolicy(apiVersionPolicy);
44
+ let subscriptionId;
45
+ if (typeof subscriptionIdOrOptions === "string") {
46
+ subscriptionId = subscriptionIdOrOptions;
47
+ } else if (typeof subscriptionIdOrOptions === "object") {
48
+ options = subscriptionIdOrOptions;
49
+ }
50
+ if (!options) {
51
+ options = {};
52
+ }
53
+ const defaults = {
54
+ requestContentType: "application/json; charset=utf-8",
55
+ credential: credentials
56
+ };
57
+ const packageDetails = `azsdk-js-arm-support/3.0.2`;
58
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
59
+ const optionsWithDefaults = {
60
+ ...defaults,
61
+ ...options,
62
+ userAgentOptions: {
63
+ userAgentPrefix
64
+ },
65
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
66
+ };
67
+ super(optionsWithDefaults);
68
+ let bearerTokenAuthenticationPolicyFound = false;
69
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
70
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
71
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
72
+ (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
73
+ );
117
74
  }
118
- operations;
119
- services;
120
- problemClassifications;
121
- supportTickets;
122
- supportTicketsNoSubscription;
123
- communications;
124
- communicationsNoSubscription;
125
- chatTranscripts;
126
- chatTranscriptsNoSubscription;
127
- fileWorkspaces;
128
- fileWorkspacesNoSubscription;
129
- files;
130
- filesNoSubscription;
75
+ if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
76
+ this.pipeline.removePolicy({
77
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
78
+ });
79
+ this.pipeline.addPolicy(
80
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
81
+ credential: credentials,
82
+ scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
83
+ challengeCallbacks: {
84
+ authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
85
+ }
86
+ })
87
+ );
88
+ }
89
+ this.subscriptionId = subscriptionId;
90
+ this.$host = options.$host || "https://management.azure.com";
91
+ this.apiVersion = options.apiVersion || "2024-04-01";
92
+ this.operations = new import_operations.OperationsImpl(this);
93
+ this.services = new import_operations.ServicesImpl(this);
94
+ this.problemClassifications = new import_operations.ProblemClassificationsImpl(this);
95
+ this.supportTickets = new import_operations.SupportTicketsImpl(this);
96
+ this.supportTicketsNoSubscription = new import_operations.SupportTicketsNoSubscriptionImpl(
97
+ this
98
+ );
99
+ this.communications = new import_operations.CommunicationsImpl(this);
100
+ this.communicationsNoSubscription = new import_operations.CommunicationsNoSubscriptionImpl(
101
+ this
102
+ );
103
+ this.chatTranscripts = new import_operations.ChatTranscriptsImpl(this);
104
+ this.chatTranscriptsNoSubscription = new import_operations.ChatTranscriptsNoSubscriptionImpl(
105
+ this
106
+ );
107
+ this.fileWorkspaces = new import_operations.FileWorkspacesImpl(this);
108
+ this.fileWorkspacesNoSubscription = new import_operations.FileWorkspacesNoSubscriptionImpl(
109
+ this
110
+ );
111
+ this.files = new import_operations.FilesImpl(this);
112
+ this.filesNoSubscription = new import_operations.FilesNoSubscriptionImpl(this);
113
+ this.addCustomApiVersionPolicy(options.apiVersion);
114
+ }
115
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
116
+ addCustomApiVersionPolicy(apiVersion) {
117
+ if (!apiVersion) {
118
+ return;
119
+ }
120
+ const apiVersionPolicy = {
121
+ name: "CustomApiVersionPolicy",
122
+ async sendRequest(request, next) {
123
+ const param = request.url.split("?");
124
+ if (param.length > 1) {
125
+ const newParams = param[1].split("&").map((item) => {
126
+ if (item.indexOf("api-version") > -1) {
127
+ return "api-version=" + apiVersion;
128
+ } else {
129
+ return item;
130
+ }
131
+ });
132
+ request.url = param[0] + "?" + newParams.join("&");
133
+ }
134
+ return next(request);
135
+ }
136
+ };
137
+ this.pipeline.addPolicy(apiVersionPolicy);
138
+ }
139
+ operations;
140
+ services;
141
+ problemClassifications;
142
+ supportTickets;
143
+ supportTicketsNoSubscription;
144
+ communications;
145
+ communicationsNoSubscription;
146
+ chatTranscripts;
147
+ chatTranscriptsNoSubscription;
148
+ fileWorkspaces;
149
+ fileWorkspacesNoSubscription;
150
+ files;
151
+ filesNoSubscription;
131
152
  }
132
- exports.MicrosoftSupport = MicrosoftSupport;
133
- //# sourceMappingURL=microsoftSupport.js.map
153
+ // Annotate the CommonJS export names for ESM import in node:
154
+ 0 && (module.exports = {
155
+ MicrosoftSupport
156
+ });
@@ -1 +1,7 @@
1
- {"version":3,"file":"microsoftSupport.js","sourceRoot":"","sources":["../../src/microsoftSupport.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAc+B;AAkB/B,MAAa,gBAAiB,SAAQ,UAAU,CAAC,aAAa;IAC5D,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAU;IAiBxB,YACE,WAAqC,EACrC,uBAAiE,EACjE,OAAwC;QAExC,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,CAAC;QAC3C,CAAC;aAAM,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YACvD,OAAO,GAAG,uBAAuB,CAAC;QACpC,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,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CAA+B;IAC3D,KAAK,CAAQ;IACb,mBAAmB,CAAsB;CAC1C;AAtKD,4CAsKC","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n ServicesImpl,\n ProblemClassificationsImpl,\n SupportTicketsImpl,\n SupportTicketsNoSubscriptionImpl,\n CommunicationsImpl,\n CommunicationsNoSubscriptionImpl,\n ChatTranscriptsImpl,\n ChatTranscriptsNoSubscriptionImpl,\n FileWorkspacesImpl,\n FileWorkspacesNoSubscriptionImpl,\n FilesImpl,\n FilesNoSubscriptionImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Services,\n ProblemClassifications,\n SupportTickets,\n SupportTicketsNoSubscription,\n Communications,\n CommunicationsNoSubscription,\n ChatTranscripts,\n ChatTranscriptsNoSubscription,\n FileWorkspaces,\n FileWorkspacesNoSubscription,\n Files,\n FilesNoSubscription,\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftSupportOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftSupport extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MicrosoftSupport class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription. The value must be an UUID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSupportOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MicrosoftSupportOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MicrosoftSupportOptionalParams | string,\n options?: MicrosoftSupportOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSupportOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-support/3.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.operations = new OperationsImpl(this);\n this.services = new ServicesImpl(this);\n this.problemClassifications = new ProblemClassificationsImpl(this);\n this.supportTickets = new SupportTicketsImpl(this);\n this.supportTicketsNoSubscription = new SupportTicketsNoSubscriptionImpl(\n this,\n );\n this.communications = new CommunicationsImpl(this);\n this.communicationsNoSubscription = new CommunicationsNoSubscriptionImpl(\n this,\n );\n this.chatTranscripts = new ChatTranscriptsImpl(this);\n this.chatTranscriptsNoSubscription = new ChatTranscriptsNoSubscriptionImpl(\n this,\n );\n this.fileWorkspaces = new FileWorkspacesImpl(this);\n this.fileWorkspacesNoSubscription = new FileWorkspacesNoSubscriptionImpl(\n this,\n );\n this.files = new FilesImpl(this);\n this.filesNoSubscription = new FilesNoSubscriptionImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n services: Services;\n problemClassifications: ProblemClassifications;\n supportTickets: SupportTickets;\n supportTicketsNoSubscription: SupportTicketsNoSubscription;\n communications: Communications;\n communicationsNoSubscription: CommunicationsNoSubscription;\n chatTranscripts: ChatTranscripts;\n chatTranscriptsNoSubscription: ChatTranscriptsNoSubscription;\n fileWorkspaces: FileWorkspaces;\n fileWorkspacesNoSubscription: FileWorkspacesNoSubscription;\n files: Files;\n filesNoSubscription: FilesNoSubscription;\n}\n"]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["/mnt/vss/_work/1/s/sdk/support/arm-support/src/microsoftSupport.ts"],
4
+ "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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n ServicesImpl,\n ProblemClassificationsImpl,\n SupportTicketsImpl,\n SupportTicketsNoSubscriptionImpl,\n CommunicationsImpl,\n CommunicationsNoSubscriptionImpl,\n ChatTranscriptsImpl,\n ChatTranscriptsNoSubscriptionImpl,\n FileWorkspacesImpl,\n FileWorkspacesNoSubscriptionImpl,\n FilesImpl,\n FilesNoSubscriptionImpl,\n} from \"./operations/index.js\";\nimport {\n Operations,\n Services,\n ProblemClassifications,\n SupportTickets,\n SupportTicketsNoSubscription,\n Communications,\n CommunicationsNoSubscription,\n ChatTranscripts,\n ChatTranscriptsNoSubscription,\n FileWorkspaces,\n FileWorkspacesNoSubscription,\n Files,\n FilesNoSubscription,\n} from \"./operationsInterfaces/index.js\";\nimport { MicrosoftSupportOptionalParams } from \"./models/index.js\";\n\nexport class MicrosoftSupport extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId?: string;\n\n /**\n * Initializes a new instance of the MicrosoftSupport class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The ID of the target subscription. The value must be an UUID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSupportOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: MicrosoftSupportOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: MicrosoftSupportOptionalParams | string,\n options?: MicrosoftSupportOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSupportOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-support/3.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-04-01\";\n this.operations = new OperationsImpl(this);\n this.services = new ServicesImpl(this);\n this.problemClassifications = new ProblemClassificationsImpl(this);\n this.supportTickets = new SupportTicketsImpl(this);\n this.supportTicketsNoSubscription = new SupportTicketsNoSubscriptionImpl(\n this,\n );\n this.communications = new CommunicationsImpl(this);\n this.communicationsNoSubscription = new CommunicationsNoSubscriptionImpl(\n this,\n );\n this.chatTranscripts = new ChatTranscriptsImpl(this);\n this.chatTranscriptsNoSubscription = new ChatTranscriptsNoSubscriptionImpl(\n this,\n );\n this.fileWorkspaces = new FileWorkspacesImpl(this);\n this.fileWorkspacesNoSubscription = new FileWorkspacesNoSubscriptionImpl(\n this,\n );\n this.files = new FilesImpl(this);\n this.filesNoSubscription = new FilesNoSubscriptionImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n services: Services;\n problemClassifications: ProblemClassifications;\n supportTickets: SupportTickets;\n supportTicketsNoSubscription: SupportTicketsNoSubscription;\n communications: Communications;\n communicationsNoSubscription: CommunicationsNoSubscription;\n chatTranscripts: ChatTranscripts;\n chatTranscriptsNoSubscription: ChatTranscriptsNoSubscription;\n fileWorkspaces: FileWorkspaces;\n fileWorkspacesNoSubscription: FileWorkspacesNoSubscription;\n files: Files;\n filesNoSubscription: FilesNoSubscription;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,iBAA4B;AAC5B,uBAAkC;AAOlC,wBAcO;AAkBA,MAAM,yBAAyB,WAAW,cAAc;AAAA,EAC7D;AAAA,EACA;AAAA,EACA;AAAA,EAiBA,YACE,aACA,yBACA,SACA;AACA,QAAI,gBAAgB,QAAW;AAC7B,YAAM,IAAI,MAAM,8BAA8B;AAAA,IAChD;AAEA,QAAI;AAEJ,QAAI,OAAO,4BAA4B,UAAU;AAC/C,uBAAiB;AAAA,IACnB,WAAW,OAAO,4BAA4B,UAAU;AACtD,gBAAU;AAAA,IACZ;AAGA,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AAAA,IACb;AACA,UAAM,WAA2C;AAAA,MAC/C,oBAAoB;AAAA,MACpB,YAAY;AAAA,IACd;AAEA,UAAM,iBAAiB;AACvB,UAAM,kBACJ,QAAQ,oBAAoB,QAAQ,iBAAiB,kBACjD,GAAG,QAAQ,iBAAiB,eAAe,IAAI,cAAc,KAC7D,GAAG,cAAc;AAEvB,UAAM,sBAAsB;AAAA,MAC1B,GAAG;AAAA,MACH,GAAG;AAAA,MACH,kBAAkB;AAAA,QAChB;AAAA,MACF;AAAA,MACA,UACE,QAAQ,YAAY,QAAQ,WAAW;AAAA,IAC3C;AACA,UAAM,mBAAmB;AAEzB,QAAI,uCAAgD;AACpD,QAAI,SAAS,YAAY,QAAQ,SAAS,mBAAmB,EAAE,SAAS,GAAG;AACzE,YAAM,mBACJ,QAAQ,SAAS,mBAAmB;AACtC,6CAA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