@azure/arm-serialconsole 2.1.1 → 2.1.2-alpha.20250926.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Release History
2
2
 
3
- ## 2.1.1 (Unreleased)
3
+ ## 2.1.2 (Unreleased)
4
4
 
5
5
  ### Features Added
6
6
 
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### Other Changes
12
12
 
13
+ ## 2.1.1 (2025-08-22)
14
+
15
+ ### Other Changes
16
+
17
+ - Other fixes
18
+
13
19
  ## 2.1.0 (2022-12-09)
14
20
 
15
21
  ### Features Added
@@ -36,7 +36,7 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
36
36
  requestContentType: "application/json; charset=utf-8",
37
37
  credential: credentials
38
38
  };
39
- const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
39
+ const packageDetails = `azsdk-js-arm-serialconsole/2.1.2`;
40
40
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
41
41
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
42
42
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,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AK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA+C;YAC3D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,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AAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -40,7 +40,7 @@ class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
40
40
  requestContentType: "application/json; charset=utf-8",
41
41
  credential: credentials
42
42
  };
43
- const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
43
+ const packageDetails = `azsdk-js-arm-serialconsole/2.1.2`;
44
44
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
45
45
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
46
46
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAAwD;AAExD,2EAAqD;AACrD,qEAA+C;AAa/C,MAAa,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA+C;YAC3D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,E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xC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EACF,4GAA4G;IAC9G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAAwD;AAExD,2EAAqD;AACrD,qEAA+C;AAa/C,MAAa,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;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,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.10"
8
+ "packageVersion": "7.52.13"
9
9
  }
10
10
  ]
11
11
  }
@@ -36,7 +36,7 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
36
36
  requestContentType: "application/json; charset=utf-8",
37
37
  credential: credentials
38
38
  };
39
- const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
39
+ const packageDetails = `azsdk-js-arm-serialconsole/2.1.2`;
40
40
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
41
41
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
42
42
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UA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zD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAA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,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -36,7 +36,7 @@ export class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {
36
36
  requestContentType: "application/json; charset=utf-8",
37
37
  credential: credentials
38
38
  };
39
- const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;
39
+ const packageDetails = `azsdk-js-arm-serialconsole/2.1.2`;
40
40
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
41
41
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
42
42
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/microsoftSerialConsoleClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAa/C,MAAM,OAAO,4BAA6B,SAAQ,UAAU,CAAC,aAAa;IACxE,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAoD;QAEpD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA+C;YAC3D,kBAAkB,EAAE,iCAAiC;YACrD,UAA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,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.1`;\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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"microsoftSerialConsoleClient.js","sourceRoot":"","sources":["../../src/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cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,2BAA2B,GAA6B;IAC5D,IAAI,EACF,4GAA4G;IAC9G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EACF,2GAA2G;IAC7G,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,yBAAyB;SAC9C;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oCAAoC;SACzD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,YAAY;KACxB;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 * 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 { SerialPortsImpl } from \"./operations/index.js\";\nimport { SerialPorts } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n MicrosoftSerialConsoleClientOptionalParams,\n ListOperationsOptionalParams,\n ListOperationsResponse,\n GetConsoleStatusOptionalParams,\n GetConsoleStatusResponse,\n DisableConsoleOptionalParams,\n DisableConsoleResponse,\n EnableConsoleOptionalParams,\n EnableConsoleResponse\n} from \"./models/index.js\";\n\nexport class MicrosoftSerialConsoleClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the MicrosoftSerialConsoleClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Subscription ID which uniquely identifies the Microsoft Azure subscription.\n * The subscription ID forms part of the URI for every service call requiring it.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: MicrosoftSerialConsoleClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: MicrosoftSerialConsoleClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-serialconsole/2.1.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[] = 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 || \"2018-05-01\";\n this.serialPorts = new SerialPortsImpl(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 /**\n * Gets a list of Serial Console API operations.\n * @param options The options parameters.\n */\n listOperations(\n options?: ListOperationsOptionalParams\n ): Promise<ListOperationsResponse> {\n return this.sendOperationRequest({ options }, listOperationsOperationSpec);\n }\n\n /**\n * Gets whether or not Serial Console is disabled for a given subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n getConsoleStatus(\n defaultParam: string,\n options?: GetConsoleStatusOptionalParams\n ): Promise<GetConsoleStatusResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n getConsoleStatusOperationSpec\n );\n }\n\n /**\n * Disables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n disableConsole(\n defaultParam: string,\n options?: DisableConsoleOptionalParams\n ): Promise<DisableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n disableConsoleOperationSpec\n );\n }\n\n /**\n * Enables the Serial Console service for all VMs and VM scale sets in the provided subscription\n * @param defaultParam Default parameter. Leave the value as \"default\".\n * @param options The options parameters.\n */\n enableConsole(\n defaultParam: string,\n options?: EnableConsoleOptionalParams\n ): Promise<EnableConsoleResponse> {\n return this.sendOperationRequest(\n { defaultParam, options },\n enableConsoleOperationSpec\n );\n }\n\n serialPorts: SerialPorts;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationsOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.SerialConsole/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleOperations\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getConsoleStatusOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SerialConsoleStatus\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst disableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/disableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.DisableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst enableConsoleOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.SerialConsole/consoleServices/{default}/enableConsole\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EnableSerialConsoleResult\n },\n 404: {\n bodyMapper: Mappers.GetSerialConsoleSubscriptionNotFound\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.defaultParam\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for MicrosoftSerialConsoleClient.",
6
- "version": "2.1.1",
6
+ "version": "2.1.2-alpha.20250926.1",
7
7
  "engines": {
8
8
  "node": ">=20.0.0"
9
9
  },
@@ -33,10 +33,10 @@
33
33
  "playwright": "^1.50.1",
34
34
  "typescript": "~5.8.3",
35
35
  "vitest": "^3.2.3",
36
- "@azure-tools/test-credential": "^2.1.1",
37
- "@azure-tools/test-utils-vitest": "^1.0.0",
36
+ "@azure-tools/test-credential": "^2.1.2",
37
+ "@azure-tools/test-recorder": "^4.1.1",
38
38
  "@azure/dev-tool": "^1.0.0",
39
- "@azure-tools/test-recorder": "^4.1.0"
39
+ "@azure-tools/test-utils-vitest": "^2.0.1"
40
40
  },
41
41
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/serialconsole/arm-serialconsole",
42
42
  "repository": {
@@ -123,8 +123,7 @@
123
123
  "pack": "pnpm pack 2>&1",
124
124
  "test": "npm run test:node && npm run test:browser",
125
125
  "test:browser": "echo skipped",
126
- "test:node": "dev-tool run test:vitest",
127
- "test:node:esm": "dev-tool run test:vitest --esm",
126
+ "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest",
128
127
  "update-snippets": "dev-tool run update-snippets"
129
128
  }
130
129
  }